diff options
author | sb <sb@openoffice.org> | 2010-05-14 13:50:22 +0200 |
---|---|---|
committer | sb <sb@openoffice.org> | 2010-05-14 13:50:22 +0200 |
commit | f9c107a9c4a7cea54e6bb133bb92da7e6b4a1d99 (patch) | |
tree | b839cb0a05807f269f5f7a141f8a1ee4ad3407fb /sw/qa/complex/writer | |
parent | 3f5077dcef319f2ae226d11a4aa7c486849da189 (diff) |
sb123: #i111598# OfficeConnection getFactory -> getComponentContext
Diffstat (limited to 'sw/qa/complex/writer')
-rw-r--r-- | sw/qa/complex/writer/CheckBookmarks.java | 4 | ||||
-rw-r--r-- | sw/qa/complex/writer/CheckCrossReferences.java | 4 | ||||
-rw-r--r-- | sw/qa/complex/writer/CheckFlies.java | 5 | ||||
-rwxr-xr-x | sw/qa/complex/writer/CheckIndexedPropertyValues.java | 6 | ||||
-rwxr-xr-x | sw/qa/complex/writer/CheckNamedPropertyValues.java | 6 | ||||
-rwxr-xr-x | sw/qa/complex/writer/TextPortionEnumerationTest.java | 4 |
6 files changed, 21 insertions, 8 deletions
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"); |