summaryrefslogtreecommitdiff
path: root/sw/qa/complex/indeterminateState
diff options
context:
space:
mode:
authorsb <sb@openoffice.org>2010-05-14 13:50:22 +0200
committersb <sb@openoffice.org>2010-05-14 13:50:22 +0200
commitf9c107a9c4a7cea54e6bb133bb92da7e6b4a1d99 (patch)
treeb839cb0a05807f269f5f7a141f8a1ee4ad3407fb /sw/qa/complex/indeterminateState
parent3f5077dcef319f2ae226d11a4aa7c486849da189 (diff)
sb123: #i111598# OfficeConnection getFactory -> getComponentContext
Diffstat (limited to 'sw/qa/complex/indeterminateState')
-rwxr-xr-xsw/qa/complex/indeterminateState/CheckIndeterminateState.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/sw/qa/complex/indeterminateState/CheckIndeterminateState.java b/sw/qa/complex/indeterminateState/CheckIndeterminateState.java
index cb756da46b60..23a6d89ccf51 100755
--- a/sw/qa/complex/indeterminateState/CheckIndeterminateState.java
+++ b/sw/qa/complex/indeterminateState/CheckIndeterminateState.java
@@ -37,6 +37,7 @@ import com.sun.star.awt.XWindow;
import com.sun.star.beans.XPropertySet;
import com.sun.star.frame.XController;
import com.sun.star.frame.XModel;
+import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.text.XText;
import com.sun.star.text.XTextDocument;
import com.sun.star.text.XTextRange;
@@ -79,7 +80,7 @@ public class CheckIndeterminateState {
XInterface oObj = null;
AccessibilityTools at = new AccessibilityTools();
- XWindow xWindow = at.getCurrentContainerWindow(connection.getFactory(), aModel);
+ XWindow xWindow = at.getCurrentContainerWindow(getFactory(), aModel);
XAccessible xRoot = at.getAccessibleObject(xWindow);
oObj = at.getAccessibleObjectForRole(xRoot,
@@ -95,8 +96,7 @@ public class CheckIndeterminateState {
}
@Before public void setUpDocument() throws com.sun.star.uno.Exception {
- document = SOfficeFactory.getFactory(connection.getFactory()).
- createTextDoc(null);
+ document = SOfficeFactory.getFactory(getFactory()).createTextDoc(null);
}
@After public void tearDownDocument() {
@@ -116,4 +116,10 @@ public class CheckIndeterminateState {
}
private static final OfficeConnection connection = new OfficeConnection();
+
+ private static final XMultiServiceFactory getFactory() {
+ return UnoRuntime.queryInterface(
+ XMultiServiceFactory.class,
+ connection.getComponentContext().getServiceManager());
+ }
}