diff options
-rw-r--r-- | qadevOOo/tests/java/mod/_svtools/AccessibleTreeListBoxEntry.java | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleTreeListBoxEntry.java b/qadevOOo/tests/java/mod/_svtools/AccessibleTreeListBoxEntry.java index afe4957fb0ea..4ec216b2d9ad 100644 --- a/qadevOOo/tests/java/mod/_svtools/AccessibleTreeListBoxEntry.java +++ b/qadevOOo/tests/java/mod/_svtools/AccessibleTreeListBoxEntry.java @@ -4,9 +4,9 @@ * * $RCSfile: AccessibleTreeListBoxEntry.java,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: rt $ $Date: 2005-09-09 03:31:49 $ + * last change: $Author: vg $ $Date: 2006-11-21 14:14:09 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -34,6 +34,7 @@ ************************************************************************/ package mod._svtools; +import com.sun.star.view.XSelectionSupplier; import java.io.PrintWriter; import lib.StatusException; @@ -95,8 +96,8 @@ import com.sun.star.util.XCloseable; * @see ifc.accessibility._XAccessibleText */ public class AccessibleTreeListBoxEntry extends TestCase { - XDesktop the_Desk; - XTextDocument xTextDoc; + static XDesktop the_Desk; + static XTextDocument xTextDoc; /** * Creates the Desktop service (<code>com.sun.star.frame.Desktop</code>). @@ -211,7 +212,7 @@ public class AccessibleTreeListBoxEntry extends TestCase { XInitialization.class, the_frame2.getController()); - Object[] params = new Object[3]; + PropertyValue[] params = new PropertyValue[3]; PropertyValue param1 = new PropertyValue(); param1.Name = "DataSourceName"; param1.Value = "Bibliography"; @@ -227,14 +228,23 @@ public class AccessibleTreeListBoxEntry extends TestCase { param3.Value = "select * from biblio"; params[2] = param3; + XController xCont = the_frame2.getController(); + + XSelectionSupplier xSelect = (XSelectionSupplier) UnoRuntime.queryInterface( + XSelectionSupplier.class, xCont); + + try { + xSelect.select(params); + } catch (com.sun.star.lang.IllegalArgumentException ex) { + throw new StatusException("Could not select Biblio-Database", ex); + } + + try { - xInit.initialize(params); shortWait(); oObj = (XInterface) ( (XMultiServiceFactory) tParam.getMSF()) .createInstance("com.sun.star.awt.Toolkit"); } catch (com.sun.star.uno.Exception e) { - log.println("Couldn't get toolkit"); - e.printStackTrace(log); throw new StatusException("Couldn't get toolkit", e); } |