diff options
author | Noel Grandin <noel@peralex.com> | 2013-06-06 16:38:03 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-06-10 10:20:44 +0200 |
commit | 9db162b6048284ae43dd0be45694ade2d0800bd7 (patch) | |
tree | af9f8b96f36c3d9965e0e089f7fd11e6b770bea1 | |
parent | 34e5e9c650ef8653b12d16a1d5de535b5f5b3ead (diff) |
fdo#46808, Use service constructor for connection::Acceptor
Change-Id: I0e69e43b5e6c6907447d6a8c23c0579b88ceb9a3
-rw-r--r-- | cpputools/source/unoexe/unoexe.cxx | 7 | ||||
-rw-r--r-- | desktop/source/offacc/acceptor.cxx | 11 |
2 files changed, 7 insertions, 11 deletions
diff --git a/cpputools/source/unoexe/unoexe.cxx b/cpputools/source/unoexe/unoexe.cxx index 073a9751522c..54be5c8038e9 100644 --- a/cpputools/source/unoexe/unoexe.cxx +++ b/cpputools/source/unoexe/unoexe.cxx @@ -43,7 +43,7 @@ #include <com/sun/star/container/XSet.hpp> #include <com/sun/star/loader/XImplementationLoader.hpp> #include <com/sun/star/registry/XRegistryKey.hpp> -#include <com/sun/star/connection/XAcceptor.hpp> +#include <com/sun/star/connection/Acceptor.hpp> #include <com/sun/star/connection/XConnection.hpp> #include <com/sun/star/bridge/XBridgeFactory.hpp> #include <com/sun/star/bridge/XBridge.hpp> @@ -547,10 +547,7 @@ SAL_IMPLEMENT_MAIN() OUString aConnectDescr( aUnoUrl.getToken( 0, ';', nIndex ).copy( 4 ) ); // uno:CONNECTDESCR;iiop;InstanceName OUString aInstanceName( aUnoUrl.getToken( 1, ';', nIndex ) ); - Reference< XAcceptor > xAcceptor; - createInstance( - xAcceptor, xContext, - OUString("com.sun.star.connection.Acceptor") ); + Reference< XAcceptor > xAcceptor = Acceptor::create(xContext); // init params Sequence< Any > aInitParams( aParams.getLength() ); diff --git a/desktop/source/offacc/acceptor.cxx b/desktop/source/offacc/acceptor.cxx index dd06969ae66c..9266f568676c 100644 --- a/desktop/source/offacc/acceptor.cxx +++ b/desktop/source/offacc/acceptor.cxx @@ -20,6 +20,7 @@ #include "acceptor.hxx" #include <com/sun/star/bridge/BridgeFactory.hpp> +#include <com/sun/star/connection/Acceptor.hpp> #include <com/sun/star/uno/XNamingService.hpp> #include <comphelper/processfactory.hxx> #include <cppuhelper/factory.hxx> @@ -51,9 +52,7 @@ Acceptor::Acceptor( const Reference< XComponentContext >& rxContext ) , m_bInit(sal_False) , m_bDying(false) { - m_rAcceptor.set( - m_rContext->getServiceManager()->createInstanceWithContext("com.sun.star.connection.Acceptor", m_rContext), - UNO_QUERY ); + m_rAcceptor = css::connection::Acceptor::create(m_rContext); m_rBridgeFactory = BridgeFactory::create(m_rContext); } @@ -286,11 +285,11 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL offacc_component_getFactory(const sal_Char Reference< XMultiServiceFactory > xServiceManager( reinterpret_cast< XMultiServiceFactory* >(pServiceManager)); - if (Acceptor::impl_getImplementationName().equalsAscii( pImplementationName ) ) + if (desktop::Acceptor::impl_getImplementationName().equalsAscii( pImplementationName ) ) { xFactory = Reference< XSingleServiceFactory >( cppu::createSingleFactory( - xServiceManager, Acceptor::impl_getImplementationName(), - Acceptor::impl_getInstance, Acceptor::impl_getSupportedServiceNames()) ); + xServiceManager, desktop::Acceptor::impl_getImplementationName(), + desktop::Acceptor::impl_getInstance, desktop::Acceptor::impl_getSupportedServiceNames()) ); } // Factory is valid - service was found. |