summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-05-21 15:52:35 +0200
committerNoel Grandin <noel@peralex.com>2013-05-22 15:19:56 +0200
commitfe9f937f46773b6978a8774ba40c971ea7acc500 (patch)
tree334a37f60e26fbf285a9b0ac1524be1f98b9350d /framework
parent1a2ab98ab809a13cb01a33de15fb288c76103e5e (diff)
fdo#46808, Convert XMultiServiceFactory to XComponentContext
Change-Id: I804845860bf28b2f87e0474bc54e821426473a0c
Diffstat (limited to 'framework')
-rw-r--r--framework/inc/uiconfiguration/imagemanager.hxx2
-rw-r--r--framework/source/uiconfiguration/imagemanager.cxx6
-rw-r--r--framework/source/uiconfiguration/uiconfigurationmanager.cxx4
3 files changed, 5 insertions, 7 deletions
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<XMultiServiceFactory> 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 );