summaryrefslogtreecommitdiff
path: root/framework/qa
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-04-13 12:12:14 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-04-13 12:12:14 +0200
commite2d97f16482cf997e91433cc411d107f26bf7b75 (patch)
tree784a8024c8d35d6b4ab346379fdbeee243f384e1 /framework/qa
parentc03a11b8f0c93b1c55d9abc9aa224aeb298d1976 (diff)
Use UNO service constructors
Change-Id: I8ac2621a4594b2d8a7cf8fdafd2191f3bf52579b
Diffstat (limited to 'framework/qa')
-rw-r--r--framework/qa/complex/XTitle/CheckXTitle.java14
1 files changed, 4 insertions, 10 deletions
diff --git a/framework/qa/complex/XTitle/CheckXTitle.java b/framework/qa/complex/XTitle/CheckXTitle.java
index 4228f5be67fc..adb16da97df5 100644
--- a/framework/qa/complex/XTitle/CheckXTitle.java
+++ b/framework/qa/complex/XTitle/CheckXTitle.java
@@ -34,9 +34,9 @@ import org.openoffice.test.OfficeConnection;
import org.openoffice.test.OfficeFileUrl;
import com.sun.star.beans.PropertyValue;
+import com.sun.star.frame.Desktop;
import com.sun.star.frame.FrameSearchFlag;
import com.sun.star.frame.XComponentLoader;
-import com.sun.star.frame.XFrame;
import com.sun.star.frame.XFrame2;
import com.sun.star.frame.XModel;
import com.sun.star.frame.XTitle;
@@ -45,6 +45,7 @@ import com.sun.star.frame.XStorable;
import com.sun.star.lang.XComponent;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.uno.UnoRuntime;
+import com.sun.star.util.URLTransformer;
import com.sun.star.util.XCloseable;
import com.sun.star.util.XURLTransformer;
import com.sun.star.util.URL;
@@ -90,18 +91,11 @@ public class CheckXTitle
/* points to the global uno service manager. */
m_xMSF = getMSF();
- // create desktop instance
- /* provides XComponentLoader interface. */
- XFrame xDesktop = UnoRuntime.queryInterface(XFrame.class, m_xMSF.createInstance("com.sun.star.frame.Desktop"));
-
// define default loader
- m_xLoader = UnoRuntime.queryInterface(XComponentLoader.class, xDesktop);
- assertNotNull("Desktop service doesn't support needed component loader interface.", m_xLoader);
+ m_xLoader = Desktop.create(connection.getComponentContext());
// get URL parser
- m_xParser = UnoRuntime.queryInterface(XURLTransformer.class, m_xMSF.createInstance("com.sun.star.util.URLTransformer"));
- assertNotNull("Could not obtain URL parser instance", m_xParser);
-
+ m_xParser = URLTransformer.create(connection.getComponentContext());
}
/** @short close the environment.