diff options
Diffstat (limited to 'qadevOOo/tests/java/ifc/view/_XSelectionSupplier.java')
-rw-r--r-- | qadevOOo/tests/java/ifc/view/_XSelectionSupplier.java | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/qadevOOo/tests/java/ifc/view/_XSelectionSupplier.java b/qadevOOo/tests/java/ifc/view/_XSelectionSupplier.java index e304789f3430..d21c21709abf 100644 --- a/qadevOOo/tests/java/ifc/view/_XSelectionSupplier.java +++ b/qadevOOo/tests/java/ifc/view/_XSelectionSupplier.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -56,26 +56,26 @@ import lib.StatusException; * @see com.sun.star.view.XSelectionSupplier */ public class _XSelectionSupplier extends MultiMethodTest { - + public XSelectionSupplier oObj = null; public boolean selectionChanged = false; Object[] selections = null; Comparator ObjCompare = null; - + protected void before() { selections = (Object[])tEnv.getObjRelation("Selections"); if (selections == null) { throw new StatusException(Status.failed( "Couldn't get relation 'Selections'")); } - - ObjCompare = (Comparator)tEnv.getObjRelation("Comparer"); + + ObjCompare = (Comparator)tEnv.getObjRelation("Comparer"); } - + protected void after() { disposeEnvironment(); } - + /** * Listener implementation which just set flag when listener * method is called. @@ -86,11 +86,11 @@ public class _XSelectionSupplier extends MultiMethodTest { log.println("listener called"); selectionChanged = true; } - + } - + XSelectionChangeListener listener = new MyChangeListener(); - + /** * Test adds listener to the object, then selects first and * then second instances to be sure that selection was changed.<p> @@ -111,7 +111,7 @@ public class _XSelectionSupplier extends MultiMethodTest { } tRes.tested("addSelectionChangeListener()", res); } - + /** * Selects an instance from relation 'First'. <p> * Has <b> OK </b> status if no exceptions were thrown. <p> @@ -127,8 +127,8 @@ public class _XSelectionSupplier extends MultiMethodTest { locRes = oObj.select(selections[i]); log.println("select #" + i + ": " + locRes); Object curSelection = oObj.getSelection(); - if (locRes) { - + if (locRes) { + if (ObjCompare != null) { ObjCompare.compare(selections[i], curSelection); } else { @@ -155,10 +155,10 @@ public class _XSelectionSupplier extends MultiMethodTest { ex.printStackTrace(log); res = false; } - + tRes.tested("select()", res); } - + /** * Test removes listener, then selects first and * then second instances to be sure that selection was changed.<p> @@ -185,7 +185,7 @@ public class _XSelectionSupplier extends MultiMethodTest { } tRes.tested("removeSelectionChangeListener()", res); } - + /** * First test changes selection of the object : if nothing is * currently selected or first instance ('First' relation) is @@ -200,8 +200,8 @@ public class _XSelectionSupplier extends MultiMethodTest { public void _getSelection() { requiredMethod("select()"); tRes.tested("getSelection()", true); - } - + } + } // finish class _XSelectionSupplier |