Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3567

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/67/3567/1

Java cleanup - reduce use of global fields

This field does not need to be global, it is returned from the relevant
methods

Change-Id: Ic53eec4a699d6acc4410e71dde385e6a49ded745
---
M qadevOOo/runner/util/AccessibilityTools.java
M qadevOOo/tests/java/ifc/sheet/_XRangeSelection.java
M qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewCell.java
M qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewTable.java
M qadevOOo/tests/java/mod/_sc/ScAccessibleSpreadsheet.java
M qadevOOo/tests/java/mod/_sch/AccessibleDocumentView.java
M qadevOOo/tests/java/mod/_sd/AccessibleDrawDocumentView.java
M qadevOOo/tests/java/mod/_sd/AccessibleOutlineView.java
M qadevOOo/tests/java/mod/_sd/AccessibleSlideView.java
M qadevOOo/tests/java/mod/_sw/SwAccessibleDocumentPageView.java
M qadevOOo/tests/java/mod/_sw/SwAccessibleDocumentView.java
M qadevOOo/tests/java/mod/_sw/SwAccessibleEndnoteView.java
M qadevOOo/tests/java/mod/_sw/SwAccessibleFooterView.java
M qadevOOo/tests/java/mod/_sw/SwAccessibleFootnoteView.java
M qadevOOo/tests/java/mod/_sw/SwAccessibleHeaderView.java
M qadevOOo/tests/java/mod/_sw/SwAccessibleParagraphView.java
M qadevOOo/tests/java/mod/_sw/SwAccessibleTableCellView.java
M qadevOOo/tests/java/mod/_sw/SwAccessibleTableView.java
M qadevOOo/tests/java/mod/_sw/SwAccessibleTextEmbeddedObject.java
M qadevOOo/tests/java/mod/_sw/SwAccessibleTextFrameView.java
M qadevOOo/tests/java/mod/_sw/SwAccessibleTextGraphicObject.java
M sw/qa/complex/accessibility/AccessibleRelationSet.java
22 files changed, 46 insertions(+), 91 deletions(-)



diff --git a/qadevOOo/runner/util/AccessibilityTools.java 
b/qadevOOo/runner/util/AccessibilityTools.java
index e6f345b..85cd442 100644
--- a/qadevOOo/runner/util/AccessibilityTools.java
+++ b/qadevOOo/runner/util/AccessibilityTools.java
@@ -32,13 +32,11 @@
 
 
 public class AccessibilityTools {
-    public static XAccessibleContext SearchedContext = null;
     public static XAccessible SearchedAccessible = null;
     private static boolean debug = false;
 
     public AccessibilityTools() {
         //done = false;
-        SearchedContext = null;
     }
 
     public static XAccessible getAccessibleObject(XInterface xObject) {
@@ -93,35 +91,29 @@
 
     public static XAccessibleContext getAccessibleObjectForRole(XAccessible xacc,
         short role) {
-        SearchedContext = null;
         SearchedAccessible = null;
-        getAccessibleObjectForRole_(xacc, role);
-
-        return SearchedContext;
+        return getAccessibleObjectForRole_(xacc, role);
     }
 
     public static XAccessibleContext getAccessibleObjectForRole(XAccessible xacc,
         short role,
         boolean ignoreShowing) {
-        SearchedContext = null;
         SearchedAccessible = null;
 
         if (ignoreShowing) {
-            getAccessibleObjectForRoleIgnoreShowing_(xacc, role);
+            return getAccessibleObjectForRoleIgnoreShowing_(xacc, role);
         } else {
-            getAccessibleObjectForRole_(xacc, role);
+            return getAccessibleObjectForRole_(xacc, role);
         }
-
-        return SearchedContext;
     }
 
-    public static void getAccessibleObjectForRoleIgnoreShowing_(XAccessible xacc,
+    public static XAccessibleContext getAccessibleObjectForRoleIgnoreShowing_(XAccessible xacc,
         short role) {
         XAccessibleContext ac = xacc.getAccessibleContext();
 
         if (ac.getAccessibleRole() == role) {
-            SearchedContext = ac;
             SearchedAccessible = xacc;
+            return ac;
         } else {
             int k = ac.getAccessibleChildCount();
 
@@ -131,28 +123,29 @@
 
             for (int i = 0; i < k; i++) {
                 try {
-                    getAccessibleObjectForRoleIgnoreShowing_(
+                    XAccessibleContext ac2 = getAccessibleObjectForRoleIgnoreShowing_(
                         ac.getAccessibleChild(i), role);
 
-                    if (SearchedContext != null) {
-                        return;
+                    if (ac2 != null) {
+                        return ac2;
                     }
                 } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
                     System.out.println("Couldn't get Child");
                 }
             }
+            return null;
         }
     }
 
-    public static void getAccessibleObjectForRole_(XAccessible xacc,
+    public static XAccessibleContext getAccessibleObjectForRole_(XAccessible xacc,
         short role) {
         XAccessibleContext ac = xacc.getAccessibleContext();
         boolean isShowing = ac.getAccessibleStateSet()
         .contains(com.sun.star.accessibility.AccessibleStateType.SHOWING);
 
         if ((ac.getAccessibleRole() == role) && isShowing) {
-            SearchedContext = ac;
             SearchedAccessible = xacc;
+            return ac;
         } else {
             int k = ac.getAccessibleChildCount();
 
@@ -162,15 +155,16 @@
 
             for (int i = 0; i < k; i++) {
                 try {
-                    getAccessibleObjectForRole_(ac.getAccessibleChild(i), role);
+                    XAccessibleContext ac2 = getAccessibleObjectForRole_(ac.getAccessibleChild(i), 
role);
 
-                    if (SearchedContext != null) {
-                        return;
+                    if (ac2 != null) {
+                        return ac2;
                     }
                 } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
                     System.out.println("Couldn't get Child");
                 }
             }
+            return null;
         }
     }
 
@@ -238,7 +232,7 @@
         .contains(com.sun.star.accessibility.AccessibleStateType.SHOWING);
 
         // hotfix for i91828:
-        // if role to serach is 0 then ignore the role.
+        // if role to search is 0 then ignore the role.
         if ( (role == 0 || ac.getAccessibleRole() == role) &&
             (ac.getAccessibleName().indexOf(name) > -1) &&
             (utils.getImplName(ac).indexOf(implName) > -1) &&
@@ -297,7 +291,7 @@
                 cellIndex= cellIndex+ (bytes[0]-65);
             } else {
                 String sNumb = cellName.substring(n, cellName.length());
-                int iNumb = new Integer(0).valueOf(sNumb).intValue();
+                int iNumb = Integer.valueOf(sNumb).intValue();
                 cellIndex += (iNumb-1) * 256;
                 System.out.println("numb:" + (iNumb-1) * 256);
             }
diff --git a/qadevOOo/tests/java/ifc/sheet/_XRangeSelection.java 
b/qadevOOo/tests/java/ifc/sheet/_XRangeSelection.java
index 882ad10..4d6922c 100644
--- a/qadevOOo/tests/java/ifc/sheet/_XRangeSelection.java
+++ b/qadevOOo/tests/java/ifc/sheet/_XRangeSelection.java
@@ -176,9 +176,9 @@
         XWindow xWindow = at.getCurrentWindow((XMultiServiceFactory)tParam.getMSF(), xModel);
         XAccessible xRoot = at.getAccessibleObject(xWindow);
 
-        at.getAccessibleObjectForRole(xRoot, AccessibleRole.TABLE  );
+        XAccessibleContext ctx = at.getAccessibleObjectForRole(xRoot, AccessibleRole.TABLE  );
 
-        XAccessibleComponent AccessibleSpreadsheet = 
UnoRuntime.queryInterface(XAccessibleComponent.class,AccessibilityTools.SearchedContext);
+        XAccessibleComponent AccessibleSpreadsheet = 
UnoRuntime.queryInterface(XAccessibleComponent.class,ctx);
 
         log.println("Got " + util.utils.getImplName(AccessibleSpreadsheet));
 
diff --git a/qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewCell.java 
b/qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewCell.java
index 93565d8..cabb17e 100644
--- a/qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewCell.java
+++ b/qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewCell.java
@@ -167,9 +167,7 @@
         XWindow xWindow = at.getCurrentWindow((XMultiServiceFactory)Param.getMSF(), xModel);
         XAccessible xRoot = at.getAccessibleObject(xWindow);
 
-        at.getAccessibleObjectForRole(xRoot, AccessibleRole.TABLE_CELL, true);
-
-        oObj = AccessibilityTools.SearchedContext;
+        oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.TABLE_CELL, true);
 
         log.println("ImplementationName " + utils.getImplName(oObj));
 
diff --git a/qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewTable.java 
b/qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewTable.java
index 9560d46..1955484 100644
--- a/qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewTable.java
+++ b/qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewTable.java
@@ -172,9 +172,7 @@
 
         at.printAccessibleTree(log,xRoot, Param.getBool(PropertyName.DEBUG_IS_ACTIVE));
 
-        at.getAccessibleObjectForRole(xRoot, AccessibleRole.TABLE);
-
-        oObj = AccessibilityTools.SearchedContext;
+        oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.TABLE);
 
         log.println("ImplementationName " + utils.getImplName(oObj));
 
diff --git a/qadevOOo/tests/java/mod/_sc/ScAccessibleSpreadsheet.java 
b/qadevOOo/tests/java/mod/_sc/ScAccessibleSpreadsheet.java
index 9e1d545..2ba1da5 100644
--- a/qadevOOo/tests/java/mod/_sc/ScAccessibleSpreadsheet.java
+++ b/qadevOOo/tests/java/mod/_sc/ScAccessibleSpreadsheet.java
@@ -112,9 +112,7 @@
         XWindow xWindow = at.getCurrentWindow((XMultiServiceFactory)Param.getMSF(), xModel);
         XAccessible xRoot = at.getAccessibleObject(xWindow);
 
-        at.getAccessibleObjectForRole(xRoot, AccessibleRole.TABLE  );
-
-        oObj = AccessibilityTools.SearchedContext;
+        oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.TABLE  );
 
         log.println("ImplementationName " + utils.getImplName(oObj));
 
diff --git a/qadevOOo/tests/java/mod/_sch/AccessibleDocumentView.java 
b/qadevOOo/tests/java/mod/_sch/AccessibleDocumentView.java
index 4e5e83c..2927527 100644
--- a/qadevOOo/tests/java/mod/_sch/AccessibleDocumentView.java
+++ b/qadevOOo/tests/java/mod/_sch/AccessibleDocumentView.java
@@ -54,15 +54,12 @@
         XWindow xWindow = at.getCurrentWindow((XMultiServiceFactory)Param.getMSF(), aModel);
         XAccessible xRoot = at.getAccessibleObject(xWindow);
 
-        at.getAccessibleObjectForRole(xRoot, AccessibleRole.DOCUMENT);
-
-        oObj = AccessibilityTools.SearchedContext;
+        oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.DOCUMENT);
 
         if (oObj == null) {
             log.println("DocumentView hasn't the role 'Document'");
             log.println("trying the role 'Shape'");
-            at.getAccessibleObjectForRole(xRoot, AccessibleRole.SHAPE);
-            oObj = AccessibilityTools.SearchedContext;
+            oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.SHAPE);
         }
 
         log.println("ImplementationName " + utils.getImplName(oObj));
diff --git a/qadevOOo/tests/java/mod/_sd/AccessibleDrawDocumentView.java 
b/qadevOOo/tests/java/mod/_sd/AccessibleDrawDocumentView.java
index 17a7800..5068fcb 100644
--- a/qadevOOo/tests/java/mod/_sd/AccessibleDrawDocumentView.java
+++ b/qadevOOo/tests/java/mod/_sd/AccessibleDrawDocumentView.java
@@ -105,9 +105,7 @@
         XAccessible xRoot = at.getAccessibleObject(xWindow);
 
         //com.sun.star.accessibility.AccessibleRole
-        at.getAccessibleObjectForRole(xRoot, AccessibleRole.DOCUMENT);
-
-        oObj = AccessibilityTools.SearchedContext;
+        oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.DOCUMENT);
 
         log.println("ImplementationName "+utils.getImplName(oObj));
 
diff --git a/qadevOOo/tests/java/mod/_sd/AccessibleOutlineView.java 
b/qadevOOo/tests/java/mod/_sd/AccessibleOutlineView.java
index 5225a05..9ac839f 100644
--- a/qadevOOo/tests/java/mod/_sd/AccessibleOutlineView.java
+++ b/qadevOOo/tests/java/mod/_sd/AccessibleOutlineView.java
@@ -70,9 +70,7 @@
                         (XMultiServiceFactory)Param.getMSF(),aModel);
         XAccessible xRoot = at.getAccessibleObject(xWindow);
 
-        at.getAccessibleObjectForRole(xRoot, AccessibleRole.DOCUMENT);
-
-        oObj = AccessibilityTools.SearchedContext;
+        oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.DOCUMENT);
 
         log.println("ImplementationName "+utils.getImplName(oObj));
 
diff --git a/qadevOOo/tests/java/mod/_sd/AccessibleSlideView.java 
b/qadevOOo/tests/java/mod/_sd/AccessibleSlideView.java
index 214da23..1f08155 100644
--- a/qadevOOo/tests/java/mod/_sd/AccessibleSlideView.java
+++ b/qadevOOo/tests/java/mod/_sd/AccessibleSlideView.java
@@ -79,9 +79,7 @@
 
         at.printAccessibleTree(log, xRoot, Param.getBool(util.PropertyName.DEBUG_IS_ACTIVE));
 
-        at.getAccessibleObjectForRole(xRoot, AccessibleRole.DOCUMENT);
-
-        oObj = AccessibilityTools.SearchedContext;
+        oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.DOCUMENT);
 
         System.out.println("ImplementationName "+utils.getImplName(oObj));
 
diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessibleDocumentPageView.java 
b/qadevOOo/tests/java/mod/_sw/SwAccessibleDocumentPageView.java
index 2bf763e..d116123 100644
--- a/qadevOOo/tests/java/mod/_sw/SwAccessibleDocumentPageView.java
+++ b/qadevOOo/tests/java/mod/_sw/SwAccessibleDocumentPageView.java
@@ -121,9 +121,7 @@
         XWindow xWindow = at.getCurrentWindow( (XMultiServiceFactory) Param.getMSF(), aModel);
         XAccessible xRoot = at.getAccessibleObject(xWindow);
 
-        at.getAccessibleObjectForRole(xRoot, AccessibleRole.DOCUMENT );
-
-        oObj = AccessibilityTools.SearchedContext;
+        oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.DOCUMENT );
 
         log.println("ImplementationName " + utils.getImplName(oObj));
 
diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessibleDocumentView.java 
b/qadevOOo/tests/java/mod/_sw/SwAccessibleDocumentView.java
index b48a85f..cb512e7 100644
--- a/qadevOOo/tests/java/mod/_sw/SwAccessibleDocumentView.java
+++ b/qadevOOo/tests/java/mod/_sw/SwAccessibleDocumentView.java
@@ -102,9 +102,7 @@
         XWindow xWindow = at.getCurrentWindow((XMultiServiceFactory)Param.getMSF(), aModel);
         XAccessible xRoot = at.getAccessibleObject(xWindow);
 
-        at.getAccessibleObjectForRole(xRoot, AccessibleRole.DOCUMENT);
-
-        oObj = AccessibilityTools.SearchedContext;
+        oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.DOCUMENT);
 
         log.println("ImplementationName " + utils.getImplName(oObj));
         at.printAccessibleTree(log, xRoot, Param.getBool(util.PropertyName.DEBUG_IS_ACTIVE));
diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessibleEndnoteView.java 
b/qadevOOo/tests/java/mod/_sw/SwAccessibleEndnoteView.java
index fee79ae..4aa5c4b 100644
--- a/qadevOOo/tests/java/mod/_sw/SwAccessibleEndnoteView.java
+++ b/qadevOOo/tests/java/mod/_sw/SwAccessibleEndnoteView.java
@@ -118,9 +118,7 @@
         XWindow xWindow = at.getCurrentWindow((XMultiServiceFactory)Param.getMSF(), aModel);
         XAccessible xRoot = at.getAccessibleObject(xWindow);
 
-        at.getAccessibleObjectForRole(xRoot, AccessibleRole.END_NOTE);
-
-        oObj = AccessibilityTools.SearchedContext;
+        oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.END_NOTE);
 
         log.println("ImplementationName " + utils.getImplName(oObj));
         at.printAccessibleTree(log, xRoot, Param.getBool(util.PropertyName.DEBUG_IS_ACTIVE));
diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessibleFooterView.java 
b/qadevOOo/tests/java/mod/_sw/SwAccessibleFooterView.java
index 439a9df..736639c 100644
--- a/qadevOOo/tests/java/mod/_sw/SwAccessibleFooterView.java
+++ b/qadevOOo/tests/java/mod/_sw/SwAccessibleFooterView.java
@@ -132,9 +132,7 @@
         XWindow xWindow = at.getCurrentWindow((XMultiServiceFactory)Param.getMSF(), aModel);
         XAccessible xRoot = at.getAccessibleObject(xWindow);
 
-        at.getAccessibleObjectForRole(xRoot, AccessibleRole.FOOTER);
-
-        oObj = AccessibilityTools.SearchedContext;
+        oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.FOOTER);
 
         log.println("ImplementationName " + utils.getImplName(oObj));
         at.printAccessibleTree(log, xRoot, Param.getBool(util.PropertyName.DEBUG_IS_ACTIVE));
diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessibleFootnoteView.java 
b/qadevOOo/tests/java/mod/_sw/SwAccessibleFootnoteView.java
index 4a1c921..ec2a1db 100644
--- a/qadevOOo/tests/java/mod/_sw/SwAccessibleFootnoteView.java
+++ b/qadevOOo/tests/java/mod/_sw/SwAccessibleFootnoteView.java
@@ -119,9 +119,7 @@
         XWindow xWindow = at.getCurrentWindow((XMultiServiceFactory)Param.getMSF(), aModel);
         XAccessible xRoot = at.getAccessibleObject(xWindow);
 
-        at.getAccessibleObjectForRole(xRoot, AccessibleRole.FOOTNOTE);
-
-        oObj = AccessibilityTools.SearchedContext;
+        oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.FOOTNOTE);
 
         log.println("ImplementationName " + utils.getImplName(oObj));
         at.printAccessibleTree(log, xRoot, Param.getBool(util.PropertyName.DEBUG_IS_ACTIVE));
diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessibleHeaderView.java 
b/qadevOOo/tests/java/mod/_sw/SwAccessibleHeaderView.java
index 5443b19..9d51b5c 100644
--- a/qadevOOo/tests/java/mod/_sw/SwAccessibleHeaderView.java
+++ b/qadevOOo/tests/java/mod/_sw/SwAccessibleHeaderView.java
@@ -122,9 +122,7 @@
         XWindow xWindow = at.getCurrentWindow((XMultiServiceFactory)Param.getMSF(), aModel);
         XAccessible xRoot = at.getAccessibleObject(xWindow);
 
-        at.getAccessibleObjectForRole(xRoot, AccessibleRole.HEADER);
-
-        oObj = AccessibilityTools.SearchedContext;
+        oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.HEADER);
 
         log.println("ImplementationName " + utils.getImplName(oObj));
         at.printAccessibleTree(log, xRoot, Param.getBool(util.PropertyName.DEBUG_IS_ACTIVE));
diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessibleParagraphView.java 
b/qadevOOo/tests/java/mod/_sw/SwAccessibleParagraphView.java
index a6b7d15..63988cf 100644
--- a/qadevOOo/tests/java/mod/_sw/SwAccessibleParagraphView.java
+++ b/qadevOOo/tests/java/mod/_sw/SwAccessibleParagraphView.java
@@ -74,9 +74,7 @@
         XWindow xWindow = at.getCurrentWindow( (XMultiServiceFactory) Param.getMSF(), aModel);
         XAccessible xRoot = at.getAccessibleObject(xWindow);
 
-        at.getAccessibleObjectForRole(xRoot, AccessibleRole.PARAGRAPH);
-
-        oObj = at.SearchedContext;
+        oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.PARAGRAPH);
 
         log.println("ImplementationName " + utils.getImplName(oObj));
 
diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessibleTableCellView.java 
b/qadevOOo/tests/java/mod/_sw/SwAccessibleTableCellView.java
index 2404af5..573b0ca 100644
--- a/qadevOOo/tests/java/mod/_sw/SwAccessibleTableCellView.java
+++ b/qadevOOo/tests/java/mod/_sw/SwAccessibleTableCellView.java
@@ -30,6 +30,7 @@
 
 import com.sun.star.accessibility.AccessibleRole;
 import com.sun.star.accessibility.XAccessible;
+import com.sun.star.accessibility.XAccessibleContext;
 import com.sun.star.accessibility.XAccessibleSelection;
 import com.sun.star.awt.XWindow;
 import com.sun.star.frame.XModel;
@@ -37,7 +38,6 @@
 import com.sun.star.text.XTextDocument;
 import com.sun.star.text.XTextTable;
 import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
 
 
 /**
@@ -65,7 +65,7 @@
     */
     protected TestEnvironment createTestEnvironment(TestParameters Param,
                                                     PrintWriter log) {
-        XInterface oObj = null;
+        XAccessibleContext oObj = null;
         XTextTable oTable = null;
 
         SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory) Param.getMSF());
@@ -94,9 +94,7 @@
         XWindow xWindow = at.getCurrentWindow( (XMultiServiceFactory) Param.getMSF(), aModel);
         XAccessible xRoot = at.getAccessibleObject(xWindow);
 
-        at.getAccessibleObjectForRole(xRoot, AccessibleRole.TABLE_CELL);
-
-        oObj = at.SearchedContext;
+        oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.TABLE_CELL);
 
         log.println("ImplementationName " + utils.getImplName(oObj));
 
@@ -105,7 +103,7 @@
 
         final XAccessibleSelection accSel = UnoRuntime.queryInterface(
                                                     XAccessibleSelection.class,
-                                                    at.SearchedContext.getAccessibleParent());
+                                                    oObj.getAccessibleParent());
 
         tEnv.addObjRelation("EventProducer",
                             new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer() {
diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessibleTableView.java 
b/qadevOOo/tests/java/mod/_sw/SwAccessibleTableView.java
index 184814c..e20761c 100644
--- a/qadevOOo/tests/java/mod/_sw/SwAccessibleTableView.java
+++ b/qadevOOo/tests/java/mod/_sw/SwAccessibleTableView.java
@@ -95,9 +95,7 @@
         XWindow xWindow = at.getCurrentWindow((XMultiServiceFactory)Param.getMSF(), aModel);
         XAccessible xRoot = at.getAccessibleObject(xWindow);
 
-        at.getAccessibleObjectForRole(xRoot, AccessibleRole.TABLE);
-
-        oObj = at.SearchedContext;
+        oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.TABLE);
 
         log.println("ImplementationName " + utils.getImplName(oObj));
         at.printAccessibleTree(log, xRoot, Param.getBool(util.PropertyName.DEBUG_IS_ACTIVE));
diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessibleTextEmbeddedObject.java 
b/qadevOOo/tests/java/mod/_sw/SwAccessibleTextEmbeddedObject.java
index e5c1776..d805a5a 100644
--- a/qadevOOo/tests/java/mod/_sw/SwAccessibleTextEmbeddedObject.java
+++ b/qadevOOo/tests/java/mod/_sw/SwAccessibleTextEmbeddedObject.java
@@ -73,9 +73,7 @@
         XWindow xWindow = at.getCurrentWindow((XMultiServiceFactory)Param.getMSF(), aModel);
         XAccessible xRoot = at.getAccessibleObject(xWindow);
 
-        at.getAccessibleObjectForRole(xRoot, AccessibleRole.EMBEDDED_OBJECT);
-
-        oObj = at.SearchedContext;
+        oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.EMBEDDED_OBJECT);
 
         log.println("ImplementationName " + utils.getImplName(oObj));
         at.printAccessibleTree(log, xRoot, Param.getBool(util.PropertyName.DEBUG_IS_ACTIVE));
diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessibleTextFrameView.java 
b/qadevOOo/tests/java/mod/_sw/SwAccessibleTextFrameView.java
index 8c78416..977e848 100644
--- a/qadevOOo/tests/java/mod/_sw/SwAccessibleTextFrameView.java
+++ b/qadevOOo/tests/java/mod/_sw/SwAccessibleTextFrameView.java
@@ -106,9 +106,7 @@
         XWindow xWindow = at.getCurrentWindow((XMultiServiceFactory)Param.getMSF(), aModel);
         XAccessible xRoot = at.getAccessibleObject(xWindow);
 
-        at.getAccessibleObjectForRole(xRoot, AccessibleRole.TEXT_FRAME);
-
-        oObj = at.SearchedContext;
+        oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.TEXT_FRAME);
 
         log.println("ImplementationName " + utils.getImplName(oObj));
         at.printAccessibleTree(log, xRoot, Param.getBool(util.PropertyName.DEBUG_IS_ACTIVE));
diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessibleTextGraphicObject.java 
b/qadevOOo/tests/java/mod/_sw/SwAccessibleTextGraphicObject.java
index a1f1ae2..765778b 100644
--- a/qadevOOo/tests/java/mod/_sw/SwAccessibleTextGraphicObject.java
+++ b/qadevOOo/tests/java/mod/_sw/SwAccessibleTextGraphicObject.java
@@ -95,9 +95,7 @@
         XWindow xWindow = at.getCurrentWindow((XMultiServiceFactory)Param.getMSF(), aModel);
         XAccessible xRoot = at.getAccessibleObject(xWindow);
 
-        at.getAccessibleObjectForRole(xRoot, AccessibleRole.GRAPHIC);
-
-        oObj = at.SearchedContext;
+        oObj = at.getAccessibleObjectForRole(xRoot, AccessibleRole.GRAPHIC);
 
         log.println("ImplementationName " + utils.getImplName(oObj));
         at.printAccessibleTree(log, xRoot, Param.getBool(util.PropertyName.DEBUG_IS_ACTIVE));
diff --git a/sw/qa/complex/accessibility/AccessibleRelationSet.java 
b/sw/qa/complex/accessibility/AccessibleRelationSet.java
index 286f005..1e64978 100644
--- a/sw/qa/complex/accessibility/AccessibleRelationSet.java
+++ b/sw/qa/complex/accessibility/AccessibleRelationSet.java
@@ -174,11 +174,11 @@
         XWindow xWindow = at.getCurrentWindow(factory, aModel);
         XAccessible xRoot = at.getAccessibleObject(xWindow);
 
-        at.getAccessibleObjectForRole(xRoot, AccessibleRole.DOCUMENT);
+        XAccessibleContext ctx = at.getAccessibleObjectForRole(xRoot, AccessibleRole.DOCUMENT);
 
-        para1 = at.SearchedContext.getAccessibleChild(0);
-        para2 = at.SearchedContext.getAccessibleChild(1);
-        para3 = at.SearchedContext.getAccessibleChild(2);
+        para1 = ctx.getAccessibleChild(0);
+        para2 = ctx.getAccessibleChild(1);
+        para3 = ctx.getAccessibleChild(2);
     }
 
     @After public void after() {

-- 
To view, visit https://gerrit.libreoffice.org/3567
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic53eec4a699d6acc4410e71dde385e6a49ded745
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Noel Grandin <noelgrandin@gmail.com>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.