qadevOOo/runner/util/DesktopTools.java | 26 +++------- qadevOOo/tests/java/mod/_dbaccess/ODatasourceBrowser.java | 8 +-- qadevOOo/tests/java/mod/_dbaccess/OQueryDesign.java | 3 - qadevOOo/tests/java/mod/_pcr/ObjectInspector.java | 11 ++-- qadevOOo/tests/java/mod/_pcr/ObjectInspectorModel.java | 9 +-- qadevOOo/tests/java/mod/_sc/ScAccessibleDocumentPagePreview.java | 3 - qadevOOo/tests/java/mod/_sd/DrawController_HandoutView.java | 8 +-- qadevOOo/tests/java/mod/_sd/DrawController_NotesView.java | 8 +-- qadevOOo/tests/java/mod/_sd/DrawController_OutlineView.java | 8 +-- qadevOOo/tests/java/mod/_sd/DrawController_PresentationView.java | 8 +-- qadevOOo/tests/java/mod/_sd/SdUnoDrawView.java | 8 +-- qadevOOo/tests/java/mod/_sd/SdUnoOutlineView.java | 8 +-- qadevOOo/tests/java/mod/_sd/SdUnoPresView.java | 8 +-- qadevOOo/tests/java/mod/_sd/SdUnoSlideView.java | 8 +-- qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBox.java | 7 +- qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxHeaderBar.java | 8 +-- qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxTableCell.java | 7 +- qadevOOo/tests/java/mod/_svtools/AccessibleIconChoiceCtrl.java | 6 -- qadevOOo/tests/java/mod/_svtools/AccessibleIconChoiceCtrlEntry.java | 5 - qadevOOo/tests/java/mod/_svtools/AccessibleTreeListBox.java | 7 +- qadevOOo/tests/java/mod/_svtools/AccessibleTreeListBoxEntry.java | 8 +-- qadevOOo/tests/java/mod/_toolkit/AccessiblePopupMenu.java | 9 --- qadevOOo/tests/java/mod/_toolkit/AccessibleRadioButton.java | 11 ---- qadevOOo/tests/java/mod/_toolkit/AccessibleScrollBar.java | 10 --- qadevOOo/tests/java/mod/_toolkit/AccessibleStatusBarItem.java | 10 --- qadevOOo/tests/java/mod/_toolkit/AccessibleTabControl.java | 10 --- qadevOOo/tests/java/mod/_toolkit/AccessibleTabPage.java | 10 --- qadevOOo/tests/java/mod/_toolkit/AccessibleToolBox.java | 10 --- qadevOOo/tests/java/mod/_toolkit/AccessibleToolBoxItem.java | 10 --- qadevOOo/tests/java/mod/_toolkit/AccessibleWindow.java | 10 --- 30 files changed, 68 insertions(+), 194 deletions(-)
New commits: commit 065ef005e9c93db43efdb7733bf7371673fcbd17 Author: Samuel Mehrbrodt <samuel.mehrbr...@cib.de> Date: Fri Sep 23 09:34:17 2016 +0200 Make createDesktop return XDesktop, not Object and adjust/cleanup calling instances Change-Id: I6b7be34fe6fce0a6fdbf2227f3e565b2f434c88c Reviewed-on: https://gerrit.libreoffice.org/29221 Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de> Tested-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de> diff --git a/qadevOOo/runner/util/DesktopTools.java b/qadevOOo/runner/util/DesktopTools.java index 3bc95dc..1650a04 100644 --- a/qadevOOo/runner/util/DesktopTools.java +++ b/qadevOOo/runner/util/DesktopTools.java @@ -58,11 +58,8 @@ public class DesktopTools */ private static XComponentLoader getCLoader(XMultiServiceFactory xMSF) { - XDesktop oDesktop = UnoRuntime.queryInterface( - XDesktop.class, createDesktop(xMSF)); - XComponentLoader oCLoader = UnoRuntime.queryInterface( - XComponentLoader.class, oDesktop); + XComponentLoader.class, createDesktop(xMSF)); return oCLoader; } @@ -71,22 +68,23 @@ public class DesktopTools * Creates an Instance of the Desktop service * * @param xMSF the MultiServiceFactory - * @return the gained Object + * @return the gained XDesktop object */ - public static Object createDesktop(XMultiServiceFactory xMSF) + public static XDesktop createDesktop(XMultiServiceFactory xMSF) { - Object oInterface; + XDesktop xDesktop; try { - oInterface = xMSF.createInstance("com.sun.star.comp.framework.Desktop"); + xDesktop = UnoRuntime.queryInterface( + XDesktop.class, xMSF.createInstance("com.sun.star.comp.framework.Desktop")); } catch (com.sun.star.uno.Exception e) { throw new IllegalArgumentException("Desktop Service not available", e); } - return oInterface; + return xDesktop; } /** @@ -96,9 +94,7 @@ public class DesktopTools */ public static XEnumeration getAllComponents(XMultiServiceFactory xMSF) { - XDesktop xDesktop = UnoRuntime.queryInterface( - XDesktop.class, createDesktop(xMSF)); - return xDesktop.getComponents().createEnumeration(); + return createDesktop(xMSF).getComponents().createEnumeration(); } @@ -110,9 +106,7 @@ public class DesktopTools */ public static XFrame getCurrentFrame(XMultiServiceFactory xMSF) { - XDesktop xDesktop = UnoRuntime.queryInterface( - XDesktop.class, createDesktop(xMSF)); - return xDesktop.getCurrentFrame(); + return createDesktop(xMSF).getCurrentFrame(); } /** @@ -123,8 +117,6 @@ public class DesktopTools public static Object[] getAllOpenDocuments(XMultiServiceFactory xMSF) { ArrayList<XComponent> components = new ArrayList<XComponent>(); - UnoRuntime.queryInterface( - XDesktop.class, createDesktop(xMSF)); XEnumeration allComp = getAllComponents(xMSF); diff --git a/qadevOOo/tests/java/mod/_dbaccess/ODatasourceBrowser.java b/qadevOOo/tests/java/mod/_dbaccess/ODatasourceBrowser.java index 039658e..21f3e1f 100644 --- a/qadevOOo/tests/java/mod/_dbaccess/ODatasourceBrowser.java +++ b/qadevOOo/tests/java/mod/_dbaccess/ODatasourceBrowser.java @@ -88,7 +88,7 @@ import com.sun.star.view.XControlAccess; * @see ifc.lang._XComponent */ public class ODatasourceBrowser extends TestCase { - XDesktop the_Desk; + XDesktop xDesktop; XTextDocument xTextDoc; /** @@ -96,9 +96,7 @@ public class ODatasourceBrowser extends TestCase { */ @Override protected void initialize(TestParameters Param, PrintWriter log) { - the_Desk = UnoRuntime.queryInterface(XDesktop.class, - DesktopTools.createDesktop( - Param.getMSF())); + xDesktop = DesktopTools.createDesktop(Param.getMSF()); System.setProperty("hideMe", "false"); } @@ -204,7 +202,7 @@ public class ODatasourceBrowser extends TestCase { XController secondController = aModel1.getCurrentController(); - XFrame the_frame1 = the_Desk.getCurrentFrame(); + XFrame the_frame1 = xDesktop.getCurrentFrame(); if (the_frame1 == null) { log.println("Current frame was not found !!!"); diff --git a/qadevOOo/tests/java/mod/_dbaccess/OQueryDesign.java b/qadevOOo/tests/java/mod/_dbaccess/OQueryDesign.java index 4cc3a16..80f9b5b 100644 --- a/qadevOOo/tests/java/mod/_dbaccess/OQueryDesign.java +++ b/qadevOOo/tests/java/mod/_dbaccess/OQueryDesign.java @@ -58,8 +58,7 @@ public class OQueryDesign extends TestCase { */ @Override protected void initialize(TestParameters Param, PrintWriter log) throws Exception { - xDesk = UnoRuntime.queryInterface( - XDesktop.class, DesktopTools.createDesktop(Param.getMSF()) ); + xDesk = DesktopTools.createDesktop(Param.getMSF()); } @Override diff --git a/qadevOOo/tests/java/mod/_pcr/ObjectInspector.java b/qadevOOo/tests/java/mod/_pcr/ObjectInspector.java index c83a2f4..d226e6b 100644 --- a/qadevOOo/tests/java/mod/_pcr/ObjectInspector.java +++ b/qadevOOo/tests/java/mod/_pcr/ObjectInspector.java @@ -20,6 +20,7 @@ package mod._pcr; import com.sun.star.awt.XWindow; import com.sun.star.awt.XWindowPeer; +import com.sun.star.frame.XDesktop; import com.sun.star.frame.XFrame; import com.sun.star.frame.XFrames; import com.sun.star.frame.XFramesSupplier; @@ -62,10 +63,10 @@ public class ObjectInspector extends TestCase { * module variable which holds the Desktop * @see com.sun.star.frame.Desktop */ - protected static Object StarDesktop = null; + protected static XDesktop xDesktop = null; /** - * assign to the module variable <CODE>StarDesktop</CODE> the desktop + * assign to the module variable <CODE>xDesktop</CODE> the desktop * @param Param the test parameters * @param log the log writer * @see lib.TestParameters @@ -75,7 +76,7 @@ public class ObjectInspector extends TestCase { @Override protected void initialize(TestParameters Param, PrintWriter log) throws Exception { log.println("create a desktop..."); - StarDesktop = DesktopTools.createDesktop(Param.getMSF()); + xDesktop = DesktopTools.createDesktop(Param.getMSF()); } /** @@ -127,7 +128,7 @@ public class ObjectInspector extends TestCase { xFrame.setName("ObjectInspector"); xFrame.initialize(xWindow); - XFramesSupplier xFramesSup = UnoRuntime.queryInterface(XFramesSupplier.class, StarDesktop); + XFramesSupplier xFramesSup = UnoRuntime.queryInterface(XFramesSupplier.class, xDesktop); XFrames xFrames = xFramesSup.getFrames(); xFrames.append(xFrame); @@ -173,7 +174,7 @@ public class ObjectInspector extends TestCase { XFrame existentInspector = null; - XFrame xFrame = UnoRuntime.queryInterface(XFrame.class, StarDesktop); + XFrame xFrame = UnoRuntime.queryInterface(XFrame.class, xDesktop); existentInspector = xFrame.findFrame( "ObjectInspector", 255 ); diff --git a/qadevOOo/tests/java/mod/_pcr/ObjectInspectorModel.java b/qadevOOo/tests/java/mod/_pcr/ObjectInspectorModel.java index 62fa3c2..a87d0d7 100644 --- a/qadevOOo/tests/java/mod/_pcr/ObjectInspectorModel.java +++ b/qadevOOo/tests/java/mod/_pcr/ObjectInspectorModel.java @@ -18,6 +18,7 @@ package mod._pcr; import com.sun.star.beans.XPropertySet; +import com.sun.star.frame.XDesktop; import com.sun.star.frame.XFrame; import com.sun.star.inspection.XObjectInspectorModel; import com.sun.star.uno.UnoRuntime; @@ -52,10 +53,10 @@ public class ObjectInspectorModel extends TestCase { * module variable which holds the Desktop * @see com.sun.star.frame.Desktop */ - protected static Object StarDesktop = null; + protected static XDesktop xDesktop = null; /** - * assign to the module variable <CODE>StarDesktop</CODE> the desktop + * assign to the module variable <CODE>xDesktop</CODE> the desktop * @param Param the test parameters * @param log the log writer * @see lib.TestParameters @@ -65,7 +66,7 @@ public class ObjectInspectorModel extends TestCase { @Override protected void initialize(TestParameters Param, PrintWriter log) throws Exception { log.println("create a desktop..."); - StarDesktop = DesktopTools.createDesktop(Param.getMSF()); + xDesktop = DesktopTools.createDesktop(Param.getMSF()); } /** @@ -129,7 +130,7 @@ public class ObjectInspectorModel extends TestCase { XFrame existentInspector = null; - XFrame xFrame = UnoRuntime.queryInterface(XFrame.class, StarDesktop); + XFrame xFrame = UnoRuntime.queryInterface(XFrame.class, xDesktop); existentInspector = xFrame.findFrame( "ObjectInspector", 255 ); diff --git a/qadevOOo/tests/java/mod/_sc/ScAccessibleDocumentPagePreview.java b/qadevOOo/tests/java/mod/_sc/ScAccessibleDocumentPagePreview.java index 1c800d2..6474f8d 100644 --- a/qadevOOo/tests/java/mod/_sc/ScAccessibleDocumentPagePreview.java +++ b/qadevOOo/tests/java/mod/_sc/ScAccessibleDocumentPagePreview.java @@ -144,8 +144,7 @@ public class ScAccessibleDocumentPagePreview extends TestCase { TestEnvironment tEnv = new TestEnvironment(oObj); - XDesktop desk = UnoRuntime.queryInterface( - XDesktop.class,util.DesktopTools.createDesktop(Param.getMSF())); + XDesktop desk = util.DesktopTools.createDesktop(Param.getMSF()); final XWindow win = desk.getCurrentFrame().getComponentWindow(); tEnv.addObjRelation("EventProducer", diff --git a/qadevOOo/tests/java/mod/_sd/DrawController_HandoutView.java b/qadevOOo/tests/java/mod/_sd/DrawController_HandoutView.java index a3c7012..eb3144e 100644 --- a/qadevOOo/tests/java/mod/_sd/DrawController_HandoutView.java +++ b/qadevOOo/tests/java/mod/_sd/DrawController_HandoutView.java @@ -77,7 +77,7 @@ import com.sun.star.util.XModifiable; * @see ifc.drawing._XDrawView */ public class DrawController_HandoutView extends TestCase { - static XDesktop the_Desk; + static XDesktop xDesktop; static XComponent xDrawDoc; static XComponent xSecondDrawDoc; @@ -88,9 +88,7 @@ public class DrawController_HandoutView extends TestCase { */ @Override protected void initialize(TestParameters Param, PrintWriter log) throws Exception { - the_Desk = UnoRuntime.queryInterface( - XDesktop.class, DesktopTools.createDesktop( - Param.getMSF()) ); + xDesktop = DesktopTools.createDesktop(Param.getMSF()); } /** @@ -244,7 +242,7 @@ public class DrawController_HandoutView extends TestCase { tEnv.addObjRelation("XUserInputInterception.XModel", aModel); - XFrame the_frame = the_Desk.getCurrentFrame(); + XFrame the_frame = xDesktop.getCurrentFrame(); tEnv.addObjRelation("Frame", the_frame); aModel = UnoRuntime.queryInterface(XModel.class, xSecondDrawDoc); diff --git a/qadevOOo/tests/java/mod/_sd/DrawController_NotesView.java b/qadevOOo/tests/java/mod/_sd/DrawController_NotesView.java index 12168ee..36b57de 100644 --- a/qadevOOo/tests/java/mod/_sd/DrawController_NotesView.java +++ b/qadevOOo/tests/java/mod/_sd/DrawController_NotesView.java @@ -77,7 +77,7 @@ import com.sun.star.util.XModifiable; * @see ifc.drawing._XDrawView */ public class DrawController_NotesView extends TestCase { - static XDesktop the_Desk; + static XDesktop xDesktop; static XComponent xDrawDoc; static XComponent xSecondDrawDoc; @@ -88,9 +88,7 @@ public class DrawController_NotesView extends TestCase { */ @Override protected void initialize(TestParameters Param, PrintWriter log) throws Exception { - the_Desk = UnoRuntime.queryInterface( - XDesktop.class, DesktopTools.createDesktop( - Param.getMSF()) ); + xDesktop = DesktopTools.createDesktop(Param.getMSF()); } /** @@ -241,7 +239,7 @@ public class DrawController_NotesView extends TestCase { tEnv.addObjRelation("XUserInputInterception.XModel", aModel); - XFrame the_frame = the_Desk.getCurrentFrame(); + XFrame the_frame = xDesktop.getCurrentFrame(); tEnv.addObjRelation("Frame", the_frame); aModel = UnoRuntime.queryInterface(XModel.class, xSecondDrawDoc); diff --git a/qadevOOo/tests/java/mod/_sd/DrawController_OutlineView.java b/qadevOOo/tests/java/mod/_sd/DrawController_OutlineView.java index 09747f8..85bea8b 100644 --- a/qadevOOo/tests/java/mod/_sd/DrawController_OutlineView.java +++ b/qadevOOo/tests/java/mod/_sd/DrawController_OutlineView.java @@ -77,7 +77,7 @@ import com.sun.star.util.XModifiable; * @see ifc.drawing._XDrawView */ public class DrawController_OutlineView extends TestCase { - static XDesktop the_Desk; + static XDesktop xDesktop; static XComponent xDrawDoc; static XComponent xSecondDrawDoc; @@ -88,9 +88,7 @@ public class DrawController_OutlineView extends TestCase { */ @Override protected void initialize(TestParameters Param, PrintWriter log) throws Exception { - the_Desk = UnoRuntime.queryInterface( - XDesktop.class, DesktopTools.createDesktop( - Param.getMSF()) ); + xDesktop = DesktopTools.createDesktop(Param.getMSF()); } /** @@ -241,7 +239,7 @@ public class DrawController_OutlineView extends TestCase { tEnv.addObjRelation("XUserInputInterception.XModel", aModel); - XFrame the_frame = the_Desk.getCurrentFrame(); + XFrame the_frame = xDesktop.getCurrentFrame(); tEnv.addObjRelation("Frame", the_frame); aModel = UnoRuntime.queryInterface(XModel.class, xSecondDrawDoc); diff --git a/qadevOOo/tests/java/mod/_sd/DrawController_PresentationView.java b/qadevOOo/tests/java/mod/_sd/DrawController_PresentationView.java index d3d6a09..07609f2 100644 --- a/qadevOOo/tests/java/mod/_sd/DrawController_PresentationView.java +++ b/qadevOOo/tests/java/mod/_sd/DrawController_PresentationView.java @@ -77,7 +77,7 @@ import com.sun.star.util.XModifiable; * @see ifc.drawing._XDrawView */ public class DrawController_PresentationView extends TestCase { - static XDesktop the_Desk; + static XDesktop xDesktop; static XComponent xDrawDoc; static XComponent xSecondDrawDoc; @@ -88,9 +88,7 @@ public class DrawController_PresentationView extends TestCase { */ @Override protected void initialize(TestParameters Param, PrintWriter log) throws Exception { - the_Desk = UnoRuntime.queryInterface( - XDesktop.class, DesktopTools.createDesktop( - Param.getMSF()) ); + xDesktop = DesktopTools.createDesktop(Param.getMSF()); } /** @@ -241,7 +239,7 @@ public class DrawController_PresentationView extends TestCase { tEnv.addObjRelation("XUserInputInterception.XModel", aModel); - XFrame the_frame = the_Desk.getCurrentFrame(); + XFrame the_frame = xDesktop.getCurrentFrame(); tEnv.addObjRelation("Frame", the_frame); aModel = UnoRuntime.queryInterface(XModel.class, xSecondDrawDoc); diff --git a/qadevOOo/tests/java/mod/_sd/SdUnoDrawView.java b/qadevOOo/tests/java/mod/_sd/SdUnoDrawView.java index f3a9632..fc4bd27 100644 --- a/qadevOOo/tests/java/mod/_sd/SdUnoDrawView.java +++ b/qadevOOo/tests/java/mod/_sd/SdUnoDrawView.java @@ -75,7 +75,7 @@ import com.sun.star.util.XModifiable; * @see ifc.drawing._XDrawView */ public class SdUnoDrawView extends TestCase { - static XDesktop the_Desk; + static XDesktop xDesktop; static XComponent xDrawDoc; static XComponent xSecondDrawDoc; @@ -86,9 +86,7 @@ public class SdUnoDrawView extends TestCase { */ @Override protected void initialize(TestParameters Param, PrintWriter log) throws Exception { - the_Desk = UnoRuntime.queryInterface( - XDesktop.class, DesktopTools.createDesktop( - Param.getMSF()) ); + xDesktop = DesktopTools.createDesktop(Param.getMSF()); } /** @@ -206,7 +204,7 @@ public class SdUnoDrawView extends TestCase { tEnv.addObjRelation("XUserInputInterception.XModel", aModel); - XFrame the_frame = the_Desk.getCurrentFrame(); + XFrame the_frame = xDesktop.getCurrentFrame(); tEnv.addObjRelation("Frame", the_frame); aModel = UnoRuntime.queryInterface(XModel.class, xSecondDrawDoc); diff --git a/qadevOOo/tests/java/mod/_sd/SdUnoOutlineView.java b/qadevOOo/tests/java/mod/_sd/SdUnoOutlineView.java index 7a857ca..01b5b23 100644 --- a/qadevOOo/tests/java/mod/_sd/SdUnoOutlineView.java +++ b/qadevOOo/tests/java/mod/_sd/SdUnoOutlineView.java @@ -71,7 +71,7 @@ import com.sun.star.util.XURLTransformer; * @see ifc.frame._XDispatchProvider */ public class SdUnoOutlineView extends TestCase { - XDesktop the_Desk; + XDesktop xDesktop; XComponent xImpressDoc; XComponent xSecondDrawDoc; @@ -81,9 +81,7 @@ public class SdUnoOutlineView extends TestCase { */ @Override protected void initialize(TestParameters Param, PrintWriter log) throws Exception { - the_Desk = UnoRuntime.queryInterface( - XDesktop.class, DesktopTools.createDesktop( - Param.getMSF()) ); + xDesktop = DesktopTools.createDesktop(Param.getMSF()); } /** @@ -188,7 +186,7 @@ public class SdUnoOutlineView extends TestCase { tEnv.addObjRelation("XUserInputInterception.XModel", aModel); - XFrame the_frame = the_Desk.getCurrentFrame(); + XFrame the_frame = xDesktop.getCurrentFrame(); tEnv.addObjRelation("Frame", the_frame); aModel = UnoRuntime.queryInterface(XModel.class, xSecondDrawDoc); diff --git a/qadevOOo/tests/java/mod/_sd/SdUnoPresView.java b/qadevOOo/tests/java/mod/_sd/SdUnoPresView.java index 0e9ba16..f8860c8 100644 --- a/qadevOOo/tests/java/mod/_sd/SdUnoPresView.java +++ b/qadevOOo/tests/java/mod/_sd/SdUnoPresView.java @@ -75,7 +75,7 @@ import com.sun.star.util.XModifiable; * @see ifc.drawing._XDrawView */ public class SdUnoPresView extends TestCase { - static XDesktop the_Desk; + static XDesktop xDesktop; static XComponent xImpressDoc; static XComponent xSecondDrawDoc; @@ -85,9 +85,7 @@ public class SdUnoPresView extends TestCase { */ @Override protected void initialize(TestParameters Param, PrintWriter log) throws Exception { - the_Desk = UnoRuntime.queryInterface( - XDesktop.class, DesktopTools.createDesktop( - Param.getMSF()) ); + xDesktop = DesktopTools.createDesktop(Param.getMSF()); } /** @@ -221,7 +219,7 @@ public class SdUnoPresView extends TestCase { tEnv.addObjRelation("XUserInputInterception.XModel", aModel); - XFrame the_frame = the_Desk.getCurrentFrame(); + XFrame the_frame = xDesktop.getCurrentFrame(); tEnv.addObjRelation("Frame", the_frame); aModel = UnoRuntime.queryInterface(XModel.class, xSecondDrawDoc); diff --git a/qadevOOo/tests/java/mod/_sd/SdUnoSlideView.java b/qadevOOo/tests/java/mod/_sd/SdUnoSlideView.java index 510e610..8a38622 100644 --- a/qadevOOo/tests/java/mod/_sd/SdUnoSlideView.java +++ b/qadevOOo/tests/java/mod/_sd/SdUnoSlideView.java @@ -44,7 +44,7 @@ import com.sun.star.util.URL; import com.sun.star.util.XURLTransformer; public class SdUnoSlideView extends TestCase { - XDesktop the_Desk; + XDesktop xDesktop; XComponent xImpressDoc; XComponent xSecondDrawDoc; @@ -54,9 +54,7 @@ public class SdUnoSlideView extends TestCase { */ @Override protected void initialize(TestParameters Param, PrintWriter log) throws Exception { - the_Desk = UnoRuntime.queryInterface( - XDesktop.class, DesktopTools.createDesktop( - Param.getMSF()) ); + xDesktop = DesktopTools.createDesktop(Param.getMSF()); } /** @@ -157,7 +155,7 @@ public class SdUnoSlideView extends TestCase { //Adding ObjRelations for XController tEnv.addObjRelation("FirstModel", aModel); - XFrame the_frame = the_Desk.getCurrentFrame(); + XFrame the_frame = xDesktop.getCurrentFrame(); tEnv.addObjRelation("Frame", the_frame); //Adding ObjRelations for XController diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBox.java b/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBox.java index cc58600..2bba029 100644 --- a/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBox.java +++ b/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBox.java @@ -44,7 +44,7 @@ import com.sun.star.view.XSelectionSupplier; public class AccessibleBrowseBox extends TestCase { - static XDesktop the_Desk; + static XDesktop xDesktop; static XTextDocument xTextDoc; /** @@ -52,8 +52,7 @@ public class AccessibleBrowseBox extends TestCase { */ @Override protected void initialize(TestParameters Param, PrintWriter log) throws Exception { - the_Desk = UnoRuntime.queryInterface( - XDesktop.class, DesktopTools.createDesktop(Param.getMSF())); + xDesktop = DesktopTools.createDesktop(Param.getMSF()); } /** @@ -116,7 +115,7 @@ public class AccessibleBrowseBox extends TestCase { util.utils.waitForEventIdle(tParam.getMSF()); - XFrame the_frame1 = the_Desk.getCurrentFrame(); + XFrame the_frame1 = xDesktop.getCurrentFrame(); if (the_frame1 == null) { log.println("Current frame was not found !!!"); diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxHeaderBar.java b/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxHeaderBar.java index 3eed69f..65a9e69 100644 --- a/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxHeaderBar.java +++ b/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxHeaderBar.java @@ -65,7 +65,7 @@ import com.sun.star.util.URL; * @see ifc.accessibility._XAccessibleContext */ public class AccessibleBrowseBoxHeaderBar extends TestCase { - static XDesktop the_Desk; + static XDesktop xDesktop; static XTextDocument xTextDoc; /** @@ -73,9 +73,7 @@ public class AccessibleBrowseBoxHeaderBar extends TestCase { */ @Override protected void initialize(TestParameters Param, PrintWriter log) throws Exception { - the_Desk = UnoRuntime.queryInterface(XDesktop.class, - DesktopTools.createDesktop( - Param.getMSF())); + xDesktop = DesktopTools.createDesktop(Param.getMSF()); } /** @@ -167,7 +165,7 @@ public class AccessibleBrowseBoxHeaderBar extends TestCase { util.utils.waitForEventIdle(tParam.getMSF()); - XFrame the_frame1 = the_Desk.getCurrentFrame(); + XFrame the_frame1 = xDesktop.getCurrentFrame(); if (the_frame1 == null) { log.println("Current frame was not found !!!"); diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxTableCell.java b/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxTableCell.java index 164c9d5..921a45e 100644 --- a/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxTableCell.java +++ b/qadevOOo/tests/java/mod/_svtools/AccessibleBrowseBoxTableCell.java @@ -61,7 +61,7 @@ import com.sun.star.util.URL; */ public class AccessibleBrowseBoxTableCell extends TestCase { - static XDesktop the_Desk; + static XDesktop xDesktop; static XTextDocument xTextDoc; /** @@ -69,8 +69,7 @@ public class AccessibleBrowseBoxTableCell extends TestCase { */ @Override protected void initialize(TestParameters Param, PrintWriter log) throws Exception { - the_Desk = UnoRuntime.queryInterface( - XDesktop.class, DesktopTools.createDesktop(Param.getMSF()) ); + xDesktop = DesktopTools.createDesktop(Param.getMSF()); } /** @@ -142,7 +141,7 @@ public class AccessibleBrowseBoxTableCell extends TestCase { util.utils.waitForEventIdle(tParam.getMSF()); - XFrame the_frame1 = the_Desk.getCurrentFrame(); + XFrame the_frame1 = xDesktop.getCurrentFrame(); if (the_frame1 == null) { log.println("Current frame was not found !!!"); diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleIconChoiceCtrl.java b/qadevOOo/tests/java/mod/_svtools/AccessibleIconChoiceCtrl.java index 97bd9856..05907d2 100644 --- a/qadevOOo/tests/java/mod/_svtools/AccessibleIconChoiceCtrl.java +++ b/qadevOOo/tests/java/mod/_svtools/AccessibleIconChoiceCtrl.java @@ -70,7 +70,7 @@ import com.sun.star.util.XURLTransformer; * @see ifc.accessibility._XAccessibleSelection */ public class AccessibleIconChoiceCtrl extends TestCase { - static XDesktop the_Desk; + static XDesktop xDesktop; static XTextDocument xTextDoc; static XAccessibleAction accCloseButton = null; @@ -79,9 +79,7 @@ public class AccessibleIconChoiceCtrl extends TestCase { */ @Override protected void initialize(TestParameters Param, PrintWriter log) throws Exception { - the_Desk = UnoRuntime.queryInterface(XDesktop.class, - DesktopTools.createDesktop( - Param.getMSF())); + xDesktop = DesktopTools.createDesktop(Param.getMSF()); } /** diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleIconChoiceCtrlEntry.java b/qadevOOo/tests/java/mod/_svtools/AccessibleIconChoiceCtrlEntry.java index ad15971..847ae38 100644 --- a/qadevOOo/tests/java/mod/_svtools/AccessibleIconChoiceCtrlEntry.java +++ b/qadevOOo/tests/java/mod/_svtools/AccessibleIconChoiceCtrlEntry.java @@ -70,7 +70,7 @@ import com.sun.star.util.XURLTransformer; */ public class AccessibleIconChoiceCtrlEntry extends TestCase { - static XDesktop the_Desk; + static XDesktop xDesktop; static XTextDocument xTextDoc; static XAccessibleAction accCloseButton = null; @@ -79,8 +79,7 @@ public class AccessibleIconChoiceCtrlEntry extends TestCase { */ @Override protected void initialize(TestParameters Param, PrintWriter log) throws Exception { - the_Desk = UnoRuntime.queryInterface( - XDesktop.class, DesktopTools.createDesktop(Param.getMSF())); + xDesktop = DesktopTools.createDesktop(Param.getMSF()); } /** diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleTreeListBox.java b/qadevOOo/tests/java/mod/_svtools/AccessibleTreeListBox.java index d20621a..42371dd 100644 --- a/qadevOOo/tests/java/mod/_svtools/AccessibleTreeListBox.java +++ b/qadevOOo/tests/java/mod/_svtools/AccessibleTreeListBox.java @@ -67,7 +67,7 @@ import com.sun.star.util.URL; */ public class AccessibleTreeListBox extends TestCase { - static XDesktop the_Desk; + static XDesktop xDesktop; static XTextDocument xTextDoc; /** @@ -75,8 +75,7 @@ public class AccessibleTreeListBox extends TestCase { */ @Override protected void initialize(TestParameters Param, PrintWriter log) throws Exception { - the_Desk = UnoRuntime.queryInterface( - XDesktop.class, DesktopTools.createDesktop(Param.getMSF())); + xDesktop = DesktopTools.createDesktop(Param.getMSF()); } /** @@ -151,7 +150,7 @@ public class AccessibleTreeListBox extends TestCase { util.utils.waitForEventIdle(tParam.getMSF()); - XFrame the_frame1 = the_Desk.getCurrentFrame(); + XFrame the_frame1 = xDesktop.getCurrentFrame(); if (the_frame1 == null) { log.println("Current frame was not found !!!"); diff --git a/qadevOOo/tests/java/mod/_svtools/AccessibleTreeListBoxEntry.java b/qadevOOo/tests/java/mod/_svtools/AccessibleTreeListBoxEntry.java index 647b495..73f7764 100644 --- a/qadevOOo/tests/java/mod/_svtools/AccessibleTreeListBoxEntry.java +++ b/qadevOOo/tests/java/mod/_svtools/AccessibleTreeListBoxEntry.java @@ -77,7 +77,7 @@ import com.sun.star.util.XCloseable; * @see ifc.accessibility._XAccessibleText */ public class AccessibleTreeListBoxEntry extends TestCase { - static XDesktop the_Desk; + static XDesktop xDesktop; static XTextDocument xTextDoc; /** @@ -85,9 +85,7 @@ public class AccessibleTreeListBoxEntry extends TestCase { */ @Override protected void initialize(TestParameters Param, PrintWriter log) throws Exception { - the_Desk = UnoRuntime.queryInterface(XDesktop.class, - DesktopTools.createDesktop( - Param.getMSF())); + xDesktop = DesktopTools.createDesktop(Param.getMSF()); } /** @@ -174,7 +172,7 @@ public class AccessibleTreeListBoxEntry extends TestCase { util.utils.waitForEventIdle(tParam.getMSF()); - XFrame the_frame1 = the_Desk.getCurrentFrame(); + XFrame the_frame1 = xDesktop.getCurrentFrame(); if (the_frame1 == null) { log.println("Current frame was not found !!!"); diff --git a/qadevOOo/tests/java/mod/_toolkit/AccessiblePopupMenu.java b/qadevOOo/tests/java/mod/_toolkit/AccessiblePopupMenu.java index e5d1157..730ebe9 100644 --- a/qadevOOo/tests/java/mod/_toolkit/AccessiblePopupMenu.java +++ b/qadevOOo/tests/java/mod/_toolkit/AccessiblePopupMenu.java @@ -47,15 +47,6 @@ public class AccessiblePopupMenu extends TestCase { private static Point point; /** - * Creates the Desktop service (<code>com.sun.star.frame.Desktop</code>). - */ - @Override - protected void initialize(TestParameters Param, PrintWriter log) throws Exception { - UnoRuntime.queryInterface(XDesktop.class, - DesktopTools.createDesktop(Param.getMSF())); - } - - /** * Disposes the document, if exists, created in * <code>createTestEnvironment</code> method. */ diff --git a/qadevOOo/tests/java/mod/_toolkit/AccessibleRadioButton.java b/qadevOOo/tests/java/mod/_toolkit/AccessibleRadioButton.java index 9dff232..fd184ab 100644 --- a/qadevOOo/tests/java/mod/_toolkit/AccessibleRadioButton.java +++ b/qadevOOo/tests/java/mod/_toolkit/AccessibleRadioButton.java @@ -84,17 +84,6 @@ public class AccessibleRadioButton extends TestCase { private static XTextDocument xTextDoc; private static XAccessibleAction accCloseButton; - - /** - * Creates the Desktop service (<code>com.sun.star.frame.Desktop</code>). - */ - @Override - protected void initialize(TestParameters Param, PrintWriter log) throws Exception { - UnoRuntime.queryInterface(XDesktop.class, - DesktopTools.createDesktop( - Param.getMSF())); - } - /** * Closes a Hyperlink dialog, disposes the document, if exists, created in * <code>createTestEnvironment</code> method. diff --git a/qadevOOo/tests/java/mod/_toolkit/AccessibleScrollBar.java b/qadevOOo/tests/java/mod/_toolkit/AccessibleScrollBar.java index 393bb0d..210e416 100644 --- a/qadevOOo/tests/java/mod/_toolkit/AccessibleScrollBar.java +++ b/qadevOOo/tests/java/mod/_toolkit/AccessibleScrollBar.java @@ -73,16 +73,6 @@ public class AccessibleScrollBar extends TestCase { private static XComponent xDoc; /** - * Creates the Desktop service (<code>com.sun.star.frame.Desktop</code>). - */ - @Override - protected void initialize(TestParameters Param, PrintWriter log) throws Exception { - UnoRuntime.queryInterface(XDesktop.class, - DesktopTools.createDesktop( - Param.getMSF())); - } - - /** * Disposes the document, if exists, created in * <code>createTestEnvironment</code> method. */ diff --git a/qadevOOo/tests/java/mod/_toolkit/AccessibleStatusBarItem.java b/qadevOOo/tests/java/mod/_toolkit/AccessibleStatusBarItem.java index 6b2bb95..f20ed26 100644 --- a/qadevOOo/tests/java/mod/_toolkit/AccessibleStatusBarItem.java +++ b/qadevOOo/tests/java/mod/_toolkit/AccessibleStatusBarItem.java @@ -73,16 +73,6 @@ public class AccessibleStatusBarItem extends TestCase { private static XTextDocument xTextDoc; /** - * Creates the Desktop service (<code>com.sun.star.frame.Desktop</code>). - */ - @Override - protected void initialize(TestParameters Param, PrintWriter log) throws Exception { - UnoRuntime.queryInterface(XDesktop.class, - DesktopTools.createDesktop( - Param.getMSF())); - } - - /** * Disposes the document, if exists, created in * <code>createTestEnvironment</code> method. */ diff --git a/qadevOOo/tests/java/mod/_toolkit/AccessibleTabControl.java b/qadevOOo/tests/java/mod/_toolkit/AccessibleTabControl.java index 5fe895c..145d1f2 100644 --- a/qadevOOo/tests/java/mod/_toolkit/AccessibleTabControl.java +++ b/qadevOOo/tests/java/mod/_toolkit/AccessibleTabControl.java @@ -80,16 +80,6 @@ public class AccessibleTabControl extends TestCase { private static XAccessibleAction accCloseButton = null; /** - * Creates the Desktop service (<code>com.sun.star.frame.Desktop</code>). - */ - @Override - protected void initialize(TestParameters Param, PrintWriter log) throws Exception { - UnoRuntime.queryInterface(XDesktop.class, - DesktopTools.createDesktop( - Param.getMSF())); - } - - /** * Closes an InsertFields dialog, disposes the document, if exists, created in * <code>createTestEnvironment</code> method. */ diff --git a/qadevOOo/tests/java/mod/_toolkit/AccessibleTabPage.java b/qadevOOo/tests/java/mod/_toolkit/AccessibleTabPage.java index 4cf4858..659269a 100644 --- a/qadevOOo/tests/java/mod/_toolkit/AccessibleTabPage.java +++ b/qadevOOo/tests/java/mod/_toolkit/AccessibleTabPage.java @@ -75,16 +75,6 @@ public class AccessibleTabPage extends TestCase { private static XAccessibleAction accCloseButton = null; /** - * Creates the Desktop service (<code>com.sun.star.frame.Desktop</code>). - */ - @Override - protected void initialize(TestParameters Param, PrintWriter log) throws Exception { - UnoRuntime.queryInterface(XDesktop.class, - DesktopTools.createDesktop( - Param.getMSF())); - } - - /** * Closes an InsertFields dialog, disposes the document, if exists, created in * <code>createTestEnvironment</code> method. */ diff --git a/qadevOOo/tests/java/mod/_toolkit/AccessibleToolBox.java b/qadevOOo/tests/java/mod/_toolkit/AccessibleToolBox.java index cf94625..faf2c39 100644 --- a/qadevOOo/tests/java/mod/_toolkit/AccessibleToolBox.java +++ b/qadevOOo/tests/java/mod/_toolkit/AccessibleToolBox.java @@ -65,16 +65,6 @@ public class AccessibleToolBox extends TestCase { private XTextDocument xTextDoc; /** - * Creates the Desktop service (<code>com.sun.star.frame.Desktop</code>). - */ - @Override - protected void initialize(TestParameters Param, PrintWriter log) throws Exception { - UnoRuntime.queryInterface(XDesktop.class, - DesktopTools.createDesktop( - Param.getMSF())); - } - - /** * Disposes the document, if exists, created in * <code>createTestEnvironment</code> method. */ diff --git a/qadevOOo/tests/java/mod/_toolkit/AccessibleToolBoxItem.java b/qadevOOo/tests/java/mod/_toolkit/AccessibleToolBoxItem.java index 6f6b27c..4dd8452 100644 --- a/qadevOOo/tests/java/mod/_toolkit/AccessibleToolBoxItem.java +++ b/qadevOOo/tests/java/mod/_toolkit/AccessibleToolBoxItem.java @@ -77,16 +77,6 @@ public class AccessibleToolBoxItem extends TestCase { private static XTextDocument xTextDoc; /** - * Creates the Desktop service (<code>com.sun.star.frame.Desktop</code>). - */ - @Override - protected void initialize(TestParameters Param, PrintWriter log) throws Exception { - UnoRuntime.queryInterface(XDesktop.class, - DesktopTools.createDesktop( - Param.getMSF())); - } - - /** * Disposes the document, if exists, created in * <code>createTestEnvironment</code> method. */ diff --git a/qadevOOo/tests/java/mod/_toolkit/AccessibleWindow.java b/qadevOOo/tests/java/mod/_toolkit/AccessibleWindow.java index a2ed123..89fdc2e 100644 --- a/qadevOOo/tests/java/mod/_toolkit/AccessibleWindow.java +++ b/qadevOOo/tests/java/mod/_toolkit/AccessibleWindow.java @@ -79,16 +79,6 @@ public class AccessibleWindow extends TestCase { private static XTextDocument xTextDoc; /** - * Creates the Desktop service (<code>com.sun.star.frame.Desktop</code>). - */ - @Override - protected void initialize(TestParameters Param, PrintWriter log) throws Exception { - UnoRuntime.queryInterface(XDesktop.class, - DesktopTools.createDesktop( - Param.getMSF())); - } - - /** * Disposes the document, if exists, created in * <code>createTestEnvironment</code> method. */ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits