summaryrefslogtreecommitdiff
path: root/ure
diff options
context:
space:
mode:
Diffstat (limited to 'ure')
-rw-r--r--ure/source/uretest/JavaClient.java7
-rw-r--r--ure/source/uretest/cppmain.cc11
2 files changed, 3 insertions, 15 deletions
diff --git a/ure/source/uretest/JavaClient.java b/ure/source/uretest/JavaClient.java
index d37e6f8f5f74..f86d61af66cf 100644
--- a/ure/source/uretest/JavaClient.java
+++ b/ure/source/uretest/JavaClient.java
@@ -23,7 +23,6 @@ import com.sun.star.bridge.XBridgeFactory;
import com.sun.star.comp.helper.Bootstrap;
import com.sun.star.connection.Connector;
import com.sun.star.lang.XComponent;
-import com.sun.star.lang.XMultiComponentFactory;
import com.sun.star.lib.uno.helper.UnoUrl;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XComponentContext;
@@ -34,13 +33,9 @@ public final class JavaClient {
public static void main(String[] arguments) throws Exception {
XComponentContext context = Bootstrap.createInitialComponentContext(
null);
- XMultiComponentFactory manager = context.getServiceManager();
- if (manager == null) {
- throw new NullPointerException("no service manager");
- }
XBridgeFactory factory = UnoRuntime.queryInterface(
XBridgeFactory.class,
- manager.createInstanceWithContext(
+ context.getServiceManager().createInstanceWithContext(
"com.sun.star.bridge.BridgeFactory", context));
if (factory == null) {
throw new NullPointerException("no bridge factory");
diff --git a/ure/source/uretest/cppmain.cc b/ure/source/uretest/cppmain.cc
index 3cc496c14496..54e6c6890018 100644
--- a/ure/source/uretest/cppmain.cc
+++ b/ure/source/uretest/cppmain.cc
@@ -26,7 +26,6 @@
#include <boost/unordered_map.hpp>
#include "com/sun/star/lang/XMain.hpp"
-#include "com/sun/star/lang/XMultiComponentFactory.hpp"
#include "com/sun/star/uno/Exception.hpp"
#include "com/sun/star/uno/Reference.hxx"
#include "com/sun/star/uno/RuntimeException.hpp"
@@ -141,18 +140,12 @@ private:
"com.sun.star.uri.UriSchemeParser_vndDOTsunDOTstarDOTscript",
"com.sun.star.uri.VndSunStarPkgUrlReferenceFactory"
};
- ::css::uno::Reference< ::css::lang::XMultiComponentFactory > manager(
- context_->getServiceManager());
- if (!manager.is()) {
- throw ::css::uno::RuntimeException(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("no service manager")),
- static_cast< ::cppu::OWeakObject * >(this));
- }
for (::std::size_t i = 0; i < SAL_N_ELEMENTS(services); ++i) {
::rtl::OUString name(::rtl::OUString::createFromAscii(services[i]));
::css::uno::Reference< ::css::uno::XInterface > instance;
try {
- instance = manager->createInstanceWithContext(name, context_);
+ instance = context_->getServiceManager()->createInstanceWithContext(
+ name, context_);
} catch (::css::uno::RuntimeException &) {
throw;
} catch (::css::uno::Exception &) {