diff options
Diffstat (limited to 'qadevOOo')
-rw-r--r-- | qadevOOo/tests/java/mod/_sc/ScTableSheetObj.java | 70 |
1 files changed, 40 insertions, 30 deletions
diff --git a/qadevOOo/tests/java/mod/_sc/ScTableSheetObj.java b/qadevOOo/tests/java/mod/_sc/ScTableSheetObj.java index b85f42079fa6..c3096baf7d44 100644 --- a/qadevOOo/tests/java/mod/_sc/ScTableSheetObj.java +++ b/qadevOOo/tests/java/mod/_sc/ScTableSheetObj.java @@ -2,9 +2,9 @@ * * $RCSfile: ScTableSheetObj.java,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change:$Date: 2003-11-18 16:30:56 $ + * last change:$Date: 2004-03-19 14:37:09 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -60,15 +60,6 @@ ************************************************************************/ package mod._sc; -import java.io.PrintWriter; - -import lib.StatusException; -import lib.TestCase; -import lib.TestEnvironment; -import lib.TestParameters; -import util.SOfficeFactory; -import util.ValueComparer; - import com.sun.star.beans.XPropertySet; import com.sun.star.container.XIndexAccess; import com.sun.star.lang.XMultiServiceFactory; @@ -82,8 +73,19 @@ import com.sun.star.uno.Type; import com.sun.star.uno.UnoRuntime; import com.sun.star.uno.XInterface; import com.sun.star.util.XCloseable; + import ifc.sheet._XCellRangesQuery; +import java.io.PrintWriter; + +import lib.StatusException; +import lib.TestCase; +import lib.TestEnvironment; +import lib.TestParameters; + +import util.SOfficeFactory; +import util.ValueComparer; + /** * Test for object which is represented by service @@ -200,7 +202,9 @@ public class ScTableSheetObj extends TestCase { try { log.println("Sleeping 500 Millis"); Thread.sleep(500); - } catch (InterruptedException ex) {} + } catch (InterruptedException ex) { + } + log.println("... Done"); } @@ -263,7 +267,6 @@ public class ScTableSheetObj extends TestCase { TestEnvironment tEnv = new TestEnvironment(oObj); - log.println("adding ObjRelation 'noArray' to avoid the test" + " 'XArrayFormulaRange'"); tEnv.addObjRelation("noArray", "ScTableSheetObj"); @@ -272,8 +275,9 @@ public class ScTableSheetObj extends TestCase { XPropertySet.class, oObj); tEnv.addObjRelation("PropSet", PropSet); tEnv.addObjRelation("SHEET", oSheet); + // add expected results for the XCellRangesQuery interface test - String[]expectedResults = new String[7]; + String[] expectedResults = new String[7]; expectedResults[_XCellRangesQuery.QUERYCOLUMNDIFFERENCES] = "Sheet1.B5;Sheet1.C1"; expectedResults[_XCellRangesQuery.QUERYCONTENTCELLS] = "Sheet1.B5;Sheet1.C1;Sheet1.F6"; expectedResults[_XCellRangesQuery.QUERYEMPTYCELLS] = "Sheet1.A1 ... Sheet1.B1 ... Sheet1.B6 ... Sheet1.C2 ... Sheet1.D1 ... Sheet1.F1 ... Sheet1.F7 ... Sheet1.G1"; @@ -281,30 +285,36 @@ public class ScTableSheetObj extends TestCase { expectedResults[_XCellRangesQuery.QUERYINTERSECTION] = "Sheet1.D4"; expectedResults[_XCellRangesQuery.QUERYROWDIFFERENCES] = "Sheet1.A5;Sheet1.C1"; expectedResults[_XCellRangesQuery.QUERYVISIBLECELLS] = "Sheet1.A2"; - tEnv.addObjRelation("XCellRangesQuery.EXPECTEDRESULTS", expectedResults); + tEnv.addObjRelation("XCellRangesQuery.EXPECTEDRESULTS", + expectedResults); // for XFormulaQuery interface test try { - tEnv.addObjRelation("MAKEENTRYINCELL", oSheet.getCellByPosition(15, 15)); - tEnv.addObjRelation("RANGEINDICES", new int[]{0,0}); - tEnv.addObjRelation("EXPECTEDDEPENDENTVALUES", new int[]{0,255,0,31999}); - tEnv.addObjRelation("EXPECTEDPRECEDENTVALUES", new int[]{0,255,0,31999}); - } - catch(com.sun.star.lang.IndexOutOfBoundsException e) { - log.println("Cannot add the necessary object relation for XFormulaQuery test."); + tEnv.addObjRelation("MAKEENTRYINCELL", + oSheet.getCellByPosition(15, 15)); + tEnv.addObjRelation("RANGEINDICES", new int[] { 0, 0 }); + tEnv.addObjRelation("EXPECTEDDEPENDENTVALUES", + new int[] { 0, 255, 0, 31999 }); + tEnv.addObjRelation("EXPECTEDPRECEDENTVALUES", + new int[] { 0, 255, 0, 31999 }); + } catch (com.sun.star.lang.IndexOutOfBoundsException e) { + log.println( + "Cannot add the necessary object relation for XFormulaQuery test."); } // XSearchable interface test try { - tEnv.addObjRelation("XSearchable.MAKEENTRYINCELL", oSheet.getCellByPosition(15, 15)); - } - catch(com.sun.star.lang.IndexOutOfBoundsException e){ - e.printStackTrace((PrintWriter)log); - log.println("Cannot make required object relation 'XSearchable.MAKEENTRYINCELL'."); + tEnv.addObjRelation("XSearchable.MAKEENTRYINCELL", + new XCell[] { + oSheet.getCellByPosition(15, 15), + oSheet.getCellByPosition(15, 16) + }); + } catch (com.sun.star.lang.IndexOutOfBoundsException e) { + e.printStackTrace((PrintWriter) log); + log.println( + "Cannot make required object relation 'XSearchable.MAKEENTRYINCELL'."); } - - //Adding relation for util.XSortable final PrintWriter finalLog = log; final XCellRange oTable = oSheet; @@ -393,4 +403,4 @@ public class ScTableSheetObj extends TestCase { return tEnv; } -} +}
\ No newline at end of file |