diff options
author | Noel Grandin <noel@peralex.com> | 2012-09-13 13:30:07 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-09-17 14:28:22 +0200 |
commit | 900d60b3cd648be79aaaa84c992edf9953c0c7f9 (patch) | |
tree | 8d2c6eb55fa57ee8917b6f2c27663ad92a17f2ad /remotebridges | |
parent | e3c05e34fddcecb81a8bd1f625ebcd601a0c0238 (diff) |
fdo#46808, Adapt bridge::BridgeFactory UNO service to new style
Create a merged XBridgeFactory2 interface for this service to implement.
Which is backwards-compatible, but does not require creating a new service.
Change-Id: I7309f4d30f0e772bc203c701eb3407b920ffafcc
Diffstat (limited to 'remotebridges')
-rw-r--r-- | remotebridges/source/unourl_resolver/unourl_resolver.cxx | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/remotebridges/source/unourl_resolver/unourl_resolver.cxx b/remotebridges/source/unourl_resolver/unourl_resolver.cxx index b3a54c6a67a8..a44d0b481320 100644 --- a/remotebridges/source/unourl_resolver/unourl_resolver.cxx +++ b/remotebridges/source/unourl_resolver/unourl_resolver.cxx @@ -32,6 +32,7 @@ #include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/registry/XRegistryKey.hpp> #include <com/sun/star/connection/XConnector.hpp> +#include <com/sun/star/bridge/BridgeFactory.hpp> #include <com/sun/star/bridge/XBridgeFactory.hpp> #include <com/sun/star/bridge/XUnoUrlResolver.hpp> @@ -158,14 +159,7 @@ Reference< XInterface > ResolverImpl::resolve( const OUString & rUnoUrl ) Reference< XConnection > xConnection( xConnector->connect( aConnectDescr ) ); // As soon as singletons are ready, switch to singleton ! - Reference< XBridgeFactory > xBridgeFactory( - _xSMgr->createInstanceWithContext( - OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.bridge.BridgeFactory") ), - _xCtx ), - UNO_QUERY ); - - if (! xBridgeFactory.is()) - throw RuntimeException( OUString( RTL_CONSTASCII_USTRINGPARAM("no bridge factory!" ) ), Reference< XInterface >() ); + Reference< XBridgeFactory2 > xBridgeFactory( BridgeFactory::create(_xCtx) ); // bridge Reference< XBridge > xBridge( xBridgeFactory->createBridge( |