[Libreoffice-commits] core.git: framework/qa
Stephan Bergmann
sbergman at redhat.com
Wed Apr 13 10:12:38 UTC 2016
framework/qa/complex/XTitle/CheckXTitle.java | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
New commits:
commit e2d97f16482cf997e91433cc411d107f26bf7b75
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Apr 13 12:12:14 2016 +0200
Use UNO service constructors
Change-Id: I8ac2621a4594b2d8a7cf8fdafd2191f3bf52579b
diff --git a/framework/qa/complex/XTitle/CheckXTitle.java b/framework/qa/complex/XTitle/CheckXTitle.java
index 4228f5b..adb16da 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.
More information about the Libreoffice-commits
mailing list