Kaydet (Commit) fe9f937f authored tarafından Noel Grandin's avatar Noel Grandin

fdo#46808, Convert XMultiServiceFactory to XComponentContext

Change-Id: I804845860bf28b2f87e0474bc54e821426473a0c
üst 1a2ab98a
...@@ -65,7 +65,7 @@ namespace framework ...@@ -65,7 +65,7 @@ namespace framework
// XInterface, XTypeProvider, XServiceInfo // XInterface, XTypeProvider, XServiceInfo
DECLARE_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(); virtual ~ImageManager();
// XComponent // XComponent
......
...@@ -80,7 +80,7 @@ namespace framework ...@@ -80,7 +80,7 @@ namespace framework
//***************************************************************************************************************** //*****************************************************************************************************************
// XInterface, XTypeProvider, XServiceInfo // XInterface, XTypeProvider, XServiceInfo
//***************************************************************************************************************** //*****************************************************************************************************************
DEFINE_XSERVICEINFO_MULTISERVICE ( ImageManager , DEFINE_XSERVICEINFO_MULTISERVICE_2 ( ImageManager ,
::cppu::OWeakObject , ::cppu::OWeakObject ,
SERVICENAME_IMAGEMANAGER , SERVICENAME_IMAGEMANAGER ,
IMPLEMENTATIONNAME_IMAGEMANAGER IMPLEMENTATIONNAME_IMAGEMANAGER
...@@ -88,9 +88,9 @@ DEFINE_XSERVICEINFO_MULTISERVICE ( ImageManager ...@@ -88,9 +88,9 @@ DEFINE_XSERVICEINFO_MULTISERVICE ( ImageManager
DEFINE_INIT_SERVICE ( ImageManager, {} ) DEFINE_INIT_SERVICE ( ImageManager, {} )
ImageManager::ImageManager( uno::Reference< XMultiServiceFactory > xServiceManager ) : ImageManager::ImageManager( const uno::Reference< uno::XComponentContext >& rxContext ) :
ThreadHelpBase( &Application::GetSolarMutex() ) ThreadHelpBase( &Application::GetSolarMutex() )
, m_pImpl( new ImageManagerImpl(comphelper::getComponentContext(xServiceManager),this,false) ) , m_pImpl( new ImageManagerImpl(rxContext, this, false) )
{ {
} }
......
...@@ -1043,9 +1043,7 @@ Reference< XInterface > SAL_CALL UIConfigurationManager::getImageManager() throw ...@@ -1043,9 +1043,7 @@ Reference< XInterface > SAL_CALL UIConfigurationManager::getImageManager() throw
if ( !m_xImageManager.is() ) if ( !m_xImageManager.is() )
{ {
Reference<XMultiServiceFactory> xMSF(m_xContext->getServiceManager(), UNO_QUERY_THROW); m_xImageManager = Reference< XComponent >( static_cast< cppu::OWeakObject *>( new ImageManager( m_xContext )),
m_xImageManager = Reference< XComponent >( static_cast< cppu::OWeakObject *>( new ImageManager( xMSF )),
UNO_QUERY ); UNO_QUERY );
Reference< XInitialization > xInit( m_xImageManager, UNO_QUERY ); Reference< XInitialization > xInit( m_xImageManager, UNO_QUERY );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment