diff --git a/framework/inc/uiconfiguration/imagemanager.hxx b/framework/inc/uiconfiguration/imagemanager.hxx index 82c52d56d17b..f9d03e060065 100644 --- a/framework/inc/uiconfiguration/imagemanager.hxx +++ b/framework/inc/uiconfiguration/imagemanager.hxx @@ -65,7 +65,7 @@ namespace framework // XInterface, XTypeProvider, XServiceInfo DECLARE_XSERVICEINFO - ImageManager( com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > xServiceManager ); + ImageManager( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext ); virtual ~ImageManager(); // XComponent diff --git a/framework/source/uiconfiguration/imagemanager.cxx b/framework/source/uiconfiguration/imagemanager.cxx index 6e5aae68f230..39d58a4071d5 100644 --- a/framework/source/uiconfiguration/imagemanager.cxx +++ b/framework/source/uiconfiguration/imagemanager.cxx @@ -80,7 +80,7 @@ namespace framework //***************************************************************************************************************** // XInterface, XTypeProvider, XServiceInfo //***************************************************************************************************************** -DEFINE_XSERVICEINFO_MULTISERVICE ( ImageManager , +DEFINE_XSERVICEINFO_MULTISERVICE_2 ( ImageManager , ::cppu::OWeakObject , SERVICENAME_IMAGEMANAGER , IMPLEMENTATIONNAME_IMAGEMANAGER @@ -88,9 +88,9 @@ DEFINE_XSERVICEINFO_MULTISERVICE ( ImageManager DEFINE_INIT_SERVICE ( ImageManager, {} ) -ImageManager::ImageManager( uno::Reference< XMultiServiceFactory > xServiceManager ) : +ImageManager::ImageManager( const uno::Reference< uno::XComponentContext >& rxContext ) : ThreadHelpBase( &Application::GetSolarMutex() ) - , m_pImpl( new ImageManagerImpl(comphelper::getComponentContext(xServiceManager),this,false) ) + , m_pImpl( new ImageManagerImpl(rxContext, this, false) ) { } diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx b/framework/source/uiconfiguration/uiconfigurationmanager.cxx index 51ee1de325f2..a448d8945579 100644 --- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx @@ -1043,9 +1043,7 @@ Reference< XInterface > SAL_CALL UIConfigurationManager::getImageManager() throw if ( !m_xImageManager.is() ) { - Reference xMSF(m_xContext->getServiceManager(), UNO_QUERY_THROW); - - m_xImageManager = Reference< XComponent >( static_cast< cppu::OWeakObject *>( new ImageManager( xMSF )), + m_xImageManager = Reference< XComponent >( static_cast< cppu::OWeakObject *>( new ImageManager( m_xContext )), UNO_QUERY ); Reference< XInitialization > xInit( m_xImageManager, UNO_QUERY );