summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/complex/accessibility/AccessibleRelationSet.java9
-rwxr-xr-xsw/qa/complex/checkColor/CheckChangeColor.java6
-rwxr-xr-xsw/qa/complex/indeterminateState/CheckIndeterminateState.java12
-rw-r--r--sw/qa/complex/writer/CheckBookmarks.java4
-rw-r--r--sw/qa/complex/writer/CheckCrossReferences.java4
-rw-r--r--sw/qa/complex/writer/CheckFlies.java5
-rwxr-xr-xsw/qa/complex/writer/CheckIndexedPropertyValues.java6
-rwxr-xr-xsw/qa/complex/writer/CheckNamedPropertyValues.java6
-rwxr-xr-xsw/qa/complex/writer/TextPortionEnumerationTest.java4
9 files changed, 42 insertions, 14 deletions
diff --git a/sw/qa/complex/accessibility/AccessibleRelationSet.java b/sw/qa/complex/accessibility/AccessibleRelationSet.java
index e71ff23e1684..a6da2f29115a 100644
--- a/sw/qa/complex/accessibility/AccessibleRelationSet.java
+++ b/sw/qa/complex/accessibility/AccessibleRelationSet.java
@@ -35,6 +35,7 @@ import com.sun.star.accessibility.XAccessibleRelationSet;
import com.sun.star.awt.XWindow;
import com.sun.star.frame.XModel;
import com.sun.star.lang.IndexOutOfBoundsException;
+import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.text.ControlCharacter;
import com.sun.star.text.XText;
import com.sun.star.text.XTextCursor;
@@ -160,7 +161,11 @@ public class AccessibleRelationSet {
throws com.sun.star.lang.IllegalArgumentException,
IndexOutOfBoundsException
{
- xTextDoc = WriterTools.createTextDoc(connection.getFactory());
+ XMultiServiceFactory factory = UnoRuntime.queryInterface(
+ XMultiServiceFactory.class,
+ connection.getComponentContext().getServiceManager());
+
+ xTextDoc = WriterTools.createTextDoc(factory);
XText oText = xTextDoc.getText();
XTextCursor oCursor = oText.createTextCursor();
@@ -176,7 +181,7 @@ public class AccessibleRelationSet {
AccessibilityTools at = new AccessibilityTools();
- XWindow xWindow = at.getCurrentWindow(connection.getFactory(), aModel);
+ XWindow xWindow = at.getCurrentWindow(factory, aModel);
XAccessible xRoot = at.getAccessibleObject(xWindow);
at.getAccessibleObjectForRole(xRoot, AccessibleRole.DOCUMENT);
diff --git a/sw/qa/complex/checkColor/CheckChangeColor.java b/sw/qa/complex/checkColor/CheckChangeColor.java
index e77964dc2e21..a072072e18c8 100755
--- a/sw/qa/complex/checkColor/CheckChangeColor.java
+++ b/sw/qa/complex/checkColor/CheckChangeColor.java
@@ -4,6 +4,7 @@ import com.sun.star.awt.Size;
import com.sun.star.beans.XPropertySet;
import com.sun.star.container.XNameAccess;
import com.sun.star.container.XNameContainer;
+import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.style.XStyleFamiliesSupplier;
import com.sun.star.text.XTextDocument;
import com.sun.star.uno.Any;
@@ -61,7 +62,10 @@ public class CheckChangeColor {
}
@Before public void setUpDocument() throws com.sun.star.uno.Exception {
- document = SOfficeFactory.getFactory(connection.getFactory()).
+ document = SOfficeFactory.getFactory(
+ UnoRuntime.queryInterface(
+ XMultiServiceFactory.class,
+ connection.getComponentContext().getServiceManager())).
createTextDoc(null);
}
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());
+ }
}
diff --git a/sw/qa/complex/writer/CheckBookmarks.java b/sw/qa/complex/writer/CheckBookmarks.java
index f1167b09a18e..84bfe15ba045 100644
--- a/sw/qa/complex/writer/CheckBookmarks.java
+++ b/sw/qa/complex/writer/CheckBookmarks.java
@@ -120,7 +120,9 @@ public class CheckBookmarks {
}
@Before public void setUpDocuments() throws Exception {
- m_xMsf = connection.getFactory();
+ m_xMsf = UnoRuntime.queryInterface(
+ XMultiServiceFactory.class,
+ connection.getComponentContext().getServiceManager());
m_xDoc = util.WriterTools.createTextDoc(m_xMsf);
setupBookmarks();
actualHashes.m_nSetupHash = BookmarkHashes.getBookmarksHash(m_xDoc);
diff --git a/sw/qa/complex/writer/CheckCrossReferences.java b/sw/qa/complex/writer/CheckCrossReferences.java
index 720b3a4b7600..cc7fcb1c7e53 100644
--- a/sw/qa/complex/writer/CheckCrossReferences.java
+++ b/sw/qa/complex/writer/CheckCrossReferences.java
@@ -265,7 +265,9 @@ public class CheckCrossReferences {
@Before public void setUpDocument() throws com.sun.star.uno.Exception {
document = util.WriterTools.loadTextDoc(
- connection.getFactory(),
+ UnoRuntime.queryInterface(
+ XMultiServiceFactory.class,
+ connection.getComponentContext().getServiceManager()),
TestDocument.getUrl("CheckCrossReferences.odt"));
}
diff --git a/sw/qa/complex/writer/CheckFlies.java b/sw/qa/complex/writer/CheckFlies.java
index 7b4cdd8098d3..a65c01ec147d 100644
--- a/sw/qa/complex/writer/CheckFlies.java
+++ b/sw/qa/complex/writer/CheckFlies.java
@@ -31,6 +31,7 @@ import com.sun.star.beans.PropertyValue;
import com.sun.star.container.XNamed;
import com.sun.star.container.XNameAccess;
import com.sun.star.container.XIndexAccess;
+import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.text.XTextDocument;
import com.sun.star.uno.UnoRuntime;
import complexlib.ComplexTestCase;
@@ -195,7 +196,9 @@ public class CheckFlies {
@Before public void setUpDocument() throws com.sun.star.uno.Exception {
document = util.WriterTools.loadTextDoc(
- connection.getFactory(),
+ UnoRuntime.queryInterface(
+ XMultiServiceFactory.class,
+ connection.getComponentContext().getServiceManager()),
TestDocument.getUrl("CheckFlies.odt"));
}
diff --git a/sw/qa/complex/writer/CheckIndexedPropertyValues.java b/sw/qa/complex/writer/CheckIndexedPropertyValues.java
index bd086afc3e65..c381cd5825c4 100755
--- a/sw/qa/complex/writer/CheckIndexedPropertyValues.java
+++ b/sw/qa/complex/writer/CheckIndexedPropertyValues.java
@@ -46,8 +46,10 @@ public class CheckIndexedPropertyValues {
{
XIndexContainer xCont = UnoRuntime.queryInterface(
XIndexContainer.class,
- connection.getFactory().createInstance(
- "com.sun.star.document.IndexedPropertyValues"));
+ (connection.getComponentContext().getServiceManager().
+ createInstanceWithContext(
+ "com.sun.star.document.IndexedPropertyValues",
+ connection.getComponentContext())));
assertNotNull("XIndexContainer was queried but returned null.", xCont);
PropertyValue[] prop1 = new PropertyValue[1];
diff --git a/sw/qa/complex/writer/CheckNamedPropertyValues.java b/sw/qa/complex/writer/CheckNamedPropertyValues.java
index bad8bbda3303..b2541954ce9f 100755
--- a/sw/qa/complex/writer/CheckNamedPropertyValues.java
+++ b/sw/qa/complex/writer/CheckNamedPropertyValues.java
@@ -46,8 +46,10 @@ public class CheckNamedPropertyValues {
{
XNameContainer xCont = UnoRuntime.queryInterface(
XNameContainer.class,
- connection.getFactory().createInstance(
- "com.sun.star.document.NamedPropertyValues"));
+ (connection.getComponentContext().getServiceManager().
+ createInstanceWithContext(
+ "com.sun.star.document.NamedPropertyValues",
+ connection.getComponentContext())));
assertNotNull("XNameContainer was queried but returned null.", xCont);
PropertyValue[] prop1 = new PropertyValue[1];
diff --git a/sw/qa/complex/writer/TextPortionEnumerationTest.java b/sw/qa/complex/writer/TextPortionEnumerationTest.java
index 8c84cae3ce16..04860820a86c 100755
--- a/sw/qa/complex/writer/TextPortionEnumerationTest.java
+++ b/sw/qa/complex/writer/TextPortionEnumerationTest.java
@@ -1235,7 +1235,9 @@ public class TextPortionEnumerationTest
@Before public void before() throws Exception
{
- m_xMSF = connection.getFactory();
+ m_xMSF = UnoRuntime.queryInterface(
+ XMultiServiceFactory.class,
+ connection.getComponentContext().getServiceManager());
XPropertySet xPropertySet = (XPropertySet)
UnoRuntime.queryInterface(XPropertySet.class, m_xMSF);
Object defaultCtx = xPropertySet.getPropertyValue("DefaultContext");