summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
Diffstat (limited to 'framework')
-rw-r--r--framework/inc/jobs/job.hxx6
-rw-r--r--framework/inc/jobs/jobdispatch.hxx4
-rw-r--r--framework/inc/jobs/jobexecutor.hxx4
-rw-r--r--framework/inc/uiconfiguration/moduleimagemanager.hxx2
-rw-r--r--framework/inc/uiconfiguration/moduleuiconfigurationmanager.hxx4
-rw-r--r--framework/source/accelerators/acceleratorconfiguration.cxx34
-rw-r--r--framework/source/accelerators/documentacceleratorconfiguration.cxx12
-rw-r--r--framework/source/accelerators/globalacceleratorconfiguration.cxx12
-rw-r--r--framework/source/accelerators/moduleacceleratorconfiguration.cxx12
-rw-r--r--framework/source/accelerators/presethandler.cxx18
-rw-r--r--framework/source/inc/accelerators/acceleratorconfiguration.hxx8
-rw-r--r--framework/source/inc/accelerators/documentacceleratorconfiguration.hxx2
-rw-r--r--framework/source/inc/accelerators/globalacceleratorconfiguration.hxx2
-rw-r--r--framework/source/inc/accelerators/moduleacceleratorconfiguration.hxx2
-rw-r--r--framework/source/inc/accelerators/presethandler.hxx6
-rw-r--r--framework/source/jobs/job.cxx20
-rw-r--r--framework/source/jobs/jobdispatch.cxx36
-rw-r--r--framework/source/jobs/jobexecutor.cxx36
-rw-r--r--framework/source/uiconfiguration/moduleimagemanager.cxx4
-rw-r--r--framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx26
20 files changed, 125 insertions, 125 deletions
diff --git a/framework/inc/jobs/job.hxx b/framework/inc/jobs/job.hxx
index 6ed4f5580a3f..a9861caad220 100644
--- a/framework/inc/jobs/job.hxx
+++ b/framework/inc/jobs/job.hxx
@@ -92,7 +92,7 @@ class Job : public css::lang::XTypeProvider
/**
We need it to create own services on demand.
*/
- css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR;
+ css::uno::Reference< css::uno::XComponentContext > m_xContext;
/**
Hold the (may asynchronous) job alive.
@@ -176,9 +176,9 @@ class Job : public css::lang::XTypeProvider
public:
- Job( const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR ,
+ Job( const css::uno::Reference< css::uno::XComponentContext >& xContext ,
const css::uno::Reference< css::frame::XFrame >& xFrame );
- Job( const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR ,
+ Job( const css::uno::Reference< css::uno::XComponentContext >& xContext ,
const css::uno::Reference< css::frame::XModel >& xModel );
virtual ~Job( );
diff --git a/framework/inc/jobs/jobdispatch.hxx b/framework/inc/jobs/jobdispatch.hxx
index 47f2c62b17b8..950023034545 100644
--- a/framework/inc/jobs/jobdispatch.hxx
+++ b/framework/inc/jobs/jobdispatch.hxx
@@ -77,7 +77,7 @@ class JobDispatch : public css::lang::XTypeProvider
private:
/** reference to the uno service manager */
- css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR;
+ css::uno::Reference< css::uno::XComponentContext > m_xContext;
/** reference to the frame, inside which this dispatch is used */
css::uno::Reference< css::frame::XFrame > m_xFrame;
@@ -90,7 +90,7 @@ class JobDispatch : public css::lang::XTypeProvider
public:
- JobDispatch( const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR );
+ JobDispatch( const css::uno::Reference< css::uno::XComponentContext >& xContext );
virtual ~JobDispatch( );
void impl_dispatchEvent ( const OUString& sEvent ,
diff --git a/framework/inc/jobs/jobexecutor.hxx b/framework/inc/jobs/jobexecutor.hxx
index 931fb071af80..a557470b52ee 100644
--- a/framework/inc/jobs/jobexecutor.hxx
+++ b/framework/inc/jobs/jobexecutor.hxx
@@ -65,7 +65,7 @@ class JobExecutor : public css::lang::XTypeProvider
private:
/** reference to the uno service manager */
- css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR;
+ css::uno::Reference< css::uno::XComponentContext > m_xContext;
/** reference to the module info service */
css::uno::Reference< css::frame::XModuleManager2 > m_xModuleManager;
@@ -84,7 +84,7 @@ class JobExecutor : public css::lang::XTypeProvider
public:
- JobExecutor( const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR );
+ JobExecutor( const css::uno::Reference< css::uno::XComponentContext >& xContext );
virtual ~JobExecutor( );
//___________________________________
diff --git a/framework/inc/uiconfiguration/moduleimagemanager.hxx b/framework/inc/uiconfiguration/moduleimagemanager.hxx
index 0a8be679a7bd..de9525eaa88c 100644
--- a/framework/inc/uiconfiguration/moduleimagemanager.hxx
+++ b/framework/inc/uiconfiguration/moduleimagemanager.hxx
@@ -63,7 +63,7 @@ namespace framework
public ::cppu::WeakImplHelper1< ::com::sun::star::ui::XImageManager>
{
public:
- ModuleImageManager( com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > xServiceManager );
+ ModuleImageManager( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& xContext );
virtual ~ModuleImageManager();
// XComponent
diff --git a/framework/inc/uiconfiguration/moduleuiconfigurationmanager.hxx b/framework/inc/uiconfiguration/moduleuiconfigurationmanager.hxx
index 25894ce5ecff..efa56ec0a3ab 100644
--- a/framework/inc/uiconfiguration/moduleuiconfigurationmanager.hxx
+++ b/framework/inc/uiconfiguration/moduleuiconfigurationmanager.hxx
@@ -74,7 +74,7 @@ namespace framework
FWK_DECLARE_XTYPEPROVIDER
DECLARE_XSERVICEINFO
- ModuleUIConfigurationManager( com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > xServiceManager );
+ ModuleUIConfigurationManager( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& xServiceManager );
virtual ~ModuleUIConfigurationManager();
// XComponent
@@ -199,7 +199,7 @@ namespace framework
OUString m_aModuleIdentifier;
OUString m_aModuleShortName;
com::sun::star::uno::Reference< com::sun::star::embed::XTransactedObject > m_xUserRootCommit;
- com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
+ com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > m_xContext;
::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; /// container for ALL Listener
com::sun::star::uno::Reference< com::sun::star::lang::XComponent > m_xModuleImageManager;
com::sun::star::uno::Reference< com::sun::star::ui::XAcceleratorConfiguration > m_xModuleAcceleratorManager;
diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx
index 01a43399b8dc..cfb5618722a0 100644
--- a/framework/source/accelerators/acceleratorconfiguration.cxx
+++ b/framework/source/accelerators/acceleratorconfiguration.cxx
@@ -104,10 +104,10 @@ DEFINE_XTYPEPROVIDER_6(XMLBasedAcceleratorConfiguration ,
css::ui::XUIConfiguration )
//-----------------------------------------------
-XMLBasedAcceleratorConfiguration::XMLBasedAcceleratorConfiguration(const css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR)
+XMLBasedAcceleratorConfiguration::XMLBasedAcceleratorConfiguration(const css::uno::Reference< css::uno::XComponentContext >& xContext)
: ThreadHelpBase (&Application::GetSolarMutex())
- , m_xSMGR (xSMGR )
- , m_aPresetHandler(xSMGR )
+ , m_xContext (xContext )
+ , m_aPresetHandler(xContext )
, m_pWriteCache (0 )
{
}
@@ -485,7 +485,7 @@ void XMLBasedAcceleratorConfiguration::impl_ts_load(const css::uno::Reference< c
// SAFE -> ----------------------------------
WriteGuard aWriteLock(m_aLock);
- css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = m_xSMGR;
+ css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext;
if (m_pWriteCache)
{
// be aware of reentrance problems - use temp variable for calling delete ... :-)
@@ -515,7 +515,7 @@ void XMLBasedAcceleratorConfiguration::impl_ts_load(const css::uno::Reference< c
css::uno::Reference< css::xml::sax::XDocumentHandler > xFilter (static_cast< ::cppu::OWeakObject* >(pFilter), css::uno::UNO_QUERY_THROW);
// connect parser, filter and stream
- css::uno::Reference< css::xml::sax::XParser > xParser = css::xml::sax::Parser::create(comphelper::getComponentContext(xSMGR));
+ css::uno::Reference< css::xml::sax::XParser > xParser = css::xml::sax::Parser::create(xContext);
xParser->setDocumentHandler(xFilter);
css::xml::sax::InputSource aSource;
@@ -540,7 +540,7 @@ void XMLBasedAcceleratorConfiguration::impl_ts_save(const css::uno::Reference< c
aCache.takeOver(*m_pWriteCache);
else
aCache.takeOver(m_aReadCache);
- css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = m_xSMGR;
+ css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext;
aReadLock.unlock();
// <- SAFE ----------------------------------
@@ -554,7 +554,7 @@ void XMLBasedAcceleratorConfiguration::impl_ts_save(const css::uno::Reference< c
xSeek->seek(0);
// combine writer/cache/stream etcpp.
- css::uno::Reference< css::xml::sax::XWriter > xWriter = css::xml::sax::Writer::create(comphelper::getComponentContext(xSMGR));
+ css::uno::Reference< css::xml::sax::XWriter > xWriter = css::xml::sax::Writer::create(xContext);
xWriter->setOutputStream(xStream);
// write into the stream
@@ -611,11 +611,11 @@ OUString XMLBasedAcceleratorConfiguration::impl_ts_getLocale() const
{
// SAFE -> ----------------------------------
ReadGuard aReadLock(m_aLock);
- css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = m_xSMGR;
+ css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext;
aReadLock.unlock();
// <- SAFE ----------------------------------
- css::uno::Reference< css::uno::XInterface > xCFG = fpc::ConfigurationHelper::openConfig( comphelper::getComponentContext(xSMGR),
+ css::uno::Reference< css::uno::XInterface > xCFG = fpc::ConfigurationHelper::openConfig( xContext,
"/org.openoffice.Setup", "L10N", fpc::ConfigurationHelper::E_READONLY);
css::uno::Reference< css::beans::XPropertySet > xProp (xCFG, css::uno::UNO_QUERY_THROW);
OUString sISOLocale;
@@ -656,15 +656,15 @@ DEFINE_XINTERFACE_8(XCUBasedAcceleratorConfiguration ,
css::ui::XUIConfiguration )
//-----------------------------------------------
-XCUBasedAcceleratorConfiguration::XCUBasedAcceleratorConfiguration(const css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR)
+XCUBasedAcceleratorConfiguration::XCUBasedAcceleratorConfiguration(const css::uno::Reference< css::uno::XComponentContext >& xContext)
: ThreadHelpBase (&Application::GetSolarMutex())
- , m_xSMGR (xSMGR )
+ , m_xContext (xContext )
, m_pPrimaryWriteCache(0 )
, m_pSecondaryWriteCache(0 )
{
const OUString CFG_ENTRY_ACCELERATORS("org.openoffice.Office.Accelerators");
m_xCfg = css::uno::Reference< css::container::XNameAccess > (
- ::comphelper::ConfigurationHelper::openConfig( comphelper::getComponentContext(m_xSMGR), CFG_ENTRY_ACCELERATORS, ::comphelper::ConfigurationHelper::E_ALL_LOCALES ),
+ ::comphelper::ConfigurationHelper::openConfig( m_xContext, CFG_ENTRY_ACCELERATORS, ::comphelper::ConfigurationHelper::E_ALL_LOCALES ),
css::uno::UNO_QUERY );
}
@@ -1105,7 +1105,7 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::storeToStorage(const css::uno::R
if (xSeek.is())
xSeek->seek(0);
- css::uno::Reference< css::xml::sax::XWriter > xWriter = css::xml::sax::Writer::create(comphelper::getComponentContext(m_xSMGR));
+ css::uno::Reference< css::xml::sax::XWriter > xWriter = css::xml::sax::Writer::create(m_xContext);
xWriter->setOutputStream(xOut);
// write into the stream
@@ -1166,14 +1166,14 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::reset()
if ( sConfig == "Global" )
{
m_xCfg = css::uno::Reference< css::container::XNameAccess > (
- ::comphelper::ConfigurationHelper::openConfig( comphelper::getComponentContext(m_xSMGR), CFG_ENTRY_GLOBAL, ::comphelper::ConfigurationHelper::E_ALL_LOCALES ),
+ ::comphelper::ConfigurationHelper::openConfig( m_xContext, CFG_ENTRY_GLOBAL, ::comphelper::ConfigurationHelper::E_ALL_LOCALES ),
css::uno::UNO_QUERY );
XCUBasedAcceleratorConfiguration::reload();
}
else if ( sConfig == "Modules" )
{
m_xCfg = css::uno::Reference< css::container::XNameAccess > (
- ::comphelper::ConfigurationHelper::openConfig( comphelper::getComponentContext(m_xSMGR), CFG_ENTRY_MODULES, ::comphelper::ConfigurationHelper::E_ALL_LOCALES ),
+ ::comphelper::ConfigurationHelper::openConfig( m_xContext, CFG_ENTRY_MODULES, ::comphelper::ConfigurationHelper::E_ALL_LOCALES ),
css::uno::UNO_QUERY );
XCUBasedAcceleratorConfiguration::reload();
}
@@ -1672,11 +1672,11 @@ OUString XCUBasedAcceleratorConfiguration::impl_ts_getLocale() const
{
// SAFE -> ----------------------------------
ReadGuard aReadLock(m_aLock);
- css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = m_xSMGR;
+ css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext;
aReadLock.unlock();
// <- SAFE ----------------------------------
- css::uno::Reference< css::uno::XInterface > xCFG = fpc::ConfigurationHelper::openConfig( comphelper::getComponentContext(xSMGR),
+ css::uno::Reference< css::uno::XInterface > xCFG = fpc::ConfigurationHelper::openConfig( xContext,
"/org.openoffice.Setup", "L10N", fpc::ConfigurationHelper::E_READONLY);
css::uno::Reference< css::beans::XPropertySet > xProp (xCFG, css::uno::UNO_QUERY_THROW);
OUString sISOLocale;
diff --git a/framework/source/accelerators/documentacceleratorconfiguration.cxx b/framework/source/accelerators/documentacceleratorconfiguration.cxx
index b28c47893cfc..2feca7985faf 100644
--- a/framework/source/accelerators/documentacceleratorconfiguration.cxx
+++ b/framework/source/accelerators/documentacceleratorconfiguration.cxx
@@ -66,10 +66,10 @@ DEFINE_XTYPEPROVIDER_2_WITH_BASECLASS(DocumentAcceleratorConfiguration ,
css::lang::XInitialization)
// css::ui::XUIConfigurationStorage)
-DEFINE_XSERVICEINFO_MULTISERVICE(DocumentAcceleratorConfiguration ,
- ::cppu::OWeakObject ,
- SERVICENAME_DOCUMENTACCELERATORCONFIGURATION ,
- IMPLEMENTATIONNAME_DOCUMENTACCELERATORCONFIGURATION)
+DEFINE_XSERVICEINFO_MULTISERVICE_2(DocumentAcceleratorConfiguration ,
+ ::cppu::OWeakObject ,
+ SERVICENAME_DOCUMENTACCELERATORCONFIGURATION ,
+ IMPLEMENTATIONNAME_DOCUMENTACCELERATORCONFIGURATION)
DEFINE_INIT_SERVICE(DocumentAcceleratorConfiguration,
{
@@ -82,8 +82,8 @@ DEFINE_INIT_SERVICE(DocumentAcceleratorConfiguration,
)
//-----------------------------------------------
-DocumentAcceleratorConfiguration::DocumentAcceleratorConfiguration(const css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR)
- : XMLBasedAcceleratorConfiguration(xSMGR)
+DocumentAcceleratorConfiguration::DocumentAcceleratorConfiguration(const css::uno::Reference< css::uno::XComponentContext >& xContext)
+ : XMLBasedAcceleratorConfiguration(xContext)
{
}
diff --git a/framework/source/accelerators/globalacceleratorconfiguration.cxx b/framework/source/accelerators/globalacceleratorconfiguration.cxx
index cc9a36ff2af8..1bc6c0388d83 100644
--- a/framework/source/accelerators/globalacceleratorconfiguration.cxx
+++ b/framework/source/accelerators/globalacceleratorconfiguration.cxx
@@ -52,10 +52,10 @@ DEFINE_XTYPEPROVIDER_2_WITH_BASECLASS(GlobalAcceleratorConfiguration,
css::lang::XServiceInfo ,
css::lang::XInitialization)
-DEFINE_XSERVICEINFO_MULTISERVICE(GlobalAcceleratorConfiguration ,
- ::cppu::OWeakObject ,
- DECLARE_ASCII("com.sun.star.ui.GlobalAcceleratorConfiguration"),
- IMPLEMENTATIONNAME_GLOBALACCELERATORCONFIGURATION)
+DEFINE_XSERVICEINFO_MULTISERVICE_2(GlobalAcceleratorConfiguration ,
+ ::cppu::OWeakObject ,
+ DECLARE_ASCII("com.sun.star.ui.GlobalAcceleratorConfiguration"),
+ IMPLEMENTATIONNAME_GLOBALACCELERATORCONFIGURATION)
DEFINE_INIT_SERVICE(GlobalAcceleratorConfiguration,
{
@@ -69,8 +69,8 @@ DEFINE_INIT_SERVICE(GlobalAcceleratorConfiguration,
)
//-----------------------------------------------
-GlobalAcceleratorConfiguration::GlobalAcceleratorConfiguration(const css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR)
- : XCUBasedAcceleratorConfiguration(xSMGR)
+GlobalAcceleratorConfiguration::GlobalAcceleratorConfiguration(const css::uno::Reference< css::uno::XComponentContext >& xContext)
+ : XCUBasedAcceleratorConfiguration(xContext)
{
}
diff --git a/framework/source/accelerators/moduleacceleratorconfiguration.cxx b/framework/source/accelerators/moduleacceleratorconfiguration.cxx
index 45305ed0bb4c..8717e9144692 100644
--- a/framework/source/accelerators/moduleacceleratorconfiguration.cxx
+++ b/framework/source/accelerators/moduleacceleratorconfiguration.cxx
@@ -59,10 +59,10 @@ DEFINE_XTYPEPROVIDER_2_WITH_BASECLASS(ModuleAcceleratorConfiguration,
css::lang::XServiceInfo ,
css::lang::XInitialization )
-DEFINE_XSERVICEINFO_MULTISERVICE(ModuleAcceleratorConfiguration ,
- ::cppu::OWeakObject ,
- SERVICENAME_MODULEACCELERATORCONFIGURATION ,
- IMPLEMENTATIONNAME_MODULEACCELERATORCONFIGURATION)
+DEFINE_XSERVICEINFO_MULTISERVICE_2(ModuleAcceleratorConfiguration ,
+ ::cppu::OWeakObject ,
+ SERVICENAME_MODULEACCELERATORCONFIGURATION ,
+ IMPLEMENTATIONNAME_MODULEACCELERATORCONFIGURATION)
DEFINE_INIT_SERVICE(ModuleAcceleratorConfiguration,
{
@@ -75,8 +75,8 @@ DEFINE_INIT_SERVICE(ModuleAcceleratorConfiguration,
)
//-----------------------------------------------
-ModuleAcceleratorConfiguration::ModuleAcceleratorConfiguration(const css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR)
- : XCUBasedAcceleratorConfiguration(xSMGR)
+ModuleAcceleratorConfiguration::ModuleAcceleratorConfiguration(const css::uno::Reference< css::uno::XComponentContext >& xContext)
+ : XCUBasedAcceleratorConfiguration(xContext)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleAcceleratorConfiguration::ModuleAcceleratorConfiguration" );
}
diff --git a/framework/source/accelerators/presethandler.cxx b/framework/source/accelerators/presethandler.cxx
index 7735ea59d41d..6c6539d1f6ae 100644
--- a/framework/source/accelerators/presethandler.cxx
+++ b/framework/source/accelerators/presethandler.cxx
@@ -97,9 +97,9 @@ OUString PresetHandler::RESOURCETYPE_STATUSBAR()
}
//-----------------------------------------------
-PresetHandler::PresetHandler(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR)
+PresetHandler::PresetHandler(const css::uno::Reference< css::uno::XComponentContext >& xContext)
: ThreadHelpBase (&Application::GetSolarMutex() )
- , m_xSMGR (xSMGR )
+ , m_xContext (xContext )
, m_aSharedStorages ( )
, m_lDocumentStorages()
, m_aLanguageTag (LANGUAGE_USER_PRIV_NOTRANSLATE)
@@ -111,7 +111,7 @@ PresetHandler::PresetHandler(const PresetHandler& rCopy)
: ThreadHelpBase (&Application::GetSolarMutex() )
, m_aLanguageTag( rCopy.m_aLanguageTag)
{
- m_xSMGR = rCopy.m_xSMGR;
+ m_xContext = rCopy.m_xContext;
m_eConfigType = rCopy.m_eConfigType;
m_sResourceType = rCopy.m_sResourceType;
m_sModule = rCopy.m_sModule;
@@ -222,12 +222,12 @@ css::uno::Reference< css::embed::XStorage > PresetHandler::getOrCreateRootStorag
// SAFE -> ----------------------------------
ReadGuard aReadLock(m_aLock);
- css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = m_xSMGR;
+ css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext;
aReadLock.unlock();
// <- SAFE ----------------------------------
css::uno::Reference< css::util::XPathSettings > xPathSettings =
- css::util::PathSettings::create( comphelper::getComponentContext(xSMGR) );
+ css::util::PathSettings::create( xContext );
OUString sShareLayer = xPathSettings->getBasePathShareLayer();
@@ -252,7 +252,7 @@ css::uno::Reference< css::embed::XStorage > PresetHandler::getOrCreateRootStorag
lArgs[0] <<= sShareLayer;
lArgs[1] <<= css::embed::ElementModes::READ | css::embed::ElementModes::NOCREATE;
- css::uno::Reference< css::lang::XSingleServiceFactory > xStorageFactory = css::embed::FileSystemStorageFactory::create( comphelper::getComponentContext(xSMGR) );
+ css::uno::Reference< css::lang::XSingleServiceFactory > xStorageFactory = css::embed::FileSystemStorageFactory::create( xContext );
css::uno::Reference< css::embed::XStorage > xStorage;
try
@@ -280,12 +280,12 @@ css::uno::Reference< css::embed::XStorage > PresetHandler::getOrCreateRootStorag
// SAFE -> ----------------------------------
ReadGuard aReadLock(m_aLock);
- css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = m_xSMGR;
+ css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext;
aReadLock.unlock();
// <- SAFE ----------------------------------
css::uno::Reference< css::util::XPathSettings > xPathSettings =
- css::util::PathSettings::create( comphelper::getComponentContext(xSMGR) );
+ css::util::PathSettings::create( xContext );
OUString sUserLayer = xPathSettings->getBasePathUserLayer();
@@ -300,7 +300,7 @@ css::uno::Reference< css::embed::XStorage > PresetHandler::getOrCreateRootStorag
lArgs[0] <<= sUserLayer;
lArgs[1] <<= css::embed::ElementModes::READWRITE;
- css::uno::Reference< css::lang::XSingleServiceFactory > xStorageFactory = css::embed::FileSystemStorageFactory::create( comphelper::getComponentContext(xSMGR) );
+ css::uno::Reference< css::lang::XSingleServiceFactory > xStorageFactory = css::embed::FileSystemStorageFactory::create( xContext );
css::uno::Reference< css::embed::XStorage > xStorage;
try
diff --git a/framework/source/inc/accelerators/acceleratorconfiguration.hxx b/framework/source/inc/accelerators/acceleratorconfiguration.hxx
index f4e77e5841b9..ff30b448d57b 100644
--- a/framework/source/inc/accelerators/acceleratorconfiguration.hxx
+++ b/framework/source/inc/accelerators/acceleratorconfiguration.hxx
@@ -85,7 +85,7 @@ class XMLBasedAcceleratorConfiguration : protected ThreadHelpBase
//---------------------------------------
/** the global uno service manager.
Must be used to create own needed services. */
- css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR;
+ css::uno::Reference< css::uno::XComponentContext > m_xContext;
//---------------------------------------
/** used to:
@@ -108,7 +108,7 @@ class XMLBasedAcceleratorConfiguration : protected ThreadHelpBase
public:
- XMLBasedAcceleratorConfiguration( const css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR );
+ XMLBasedAcceleratorConfiguration( const css::uno::Reference< css::uno::XComponentContext >& xContext);
virtual ~XMLBasedAcceleratorConfiguration( );
//______________________________________
@@ -304,7 +304,7 @@ class XCUBasedAcceleratorConfiguration : protected ThreadHelpBase
//---------------------------------------
/** the global uno service manager.
Must be used to create own needed services. */
- css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR;
+ css::uno::Reference< css::uno::XComponentContext > m_xContext;
css::uno::Reference< css::container::XNameAccess > m_xCfg;
AcceleratorCache m_aPrimaryReadCache;
@@ -322,7 +322,7 @@ class XCUBasedAcceleratorConfiguration : protected ThreadHelpBase
public:
- XCUBasedAcceleratorConfiguration( const css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR );
+ XCUBasedAcceleratorConfiguration( const css::uno::Reference< css::uno::XComponentContext >& xContext );
virtual ~XCUBasedAcceleratorConfiguration( );
//______________________________________
diff --git a/framework/source/inc/accelerators/documentacceleratorconfiguration.hxx b/framework/source/inc/accelerators/documentacceleratorconfiguration.hxx
index 2bddcc562031..d6283f0adb94 100644
--- a/framework/source/inc/accelerators/documentacceleratorconfiguration.hxx
+++ b/framework/source/inc/accelerators/documentacceleratorconfiguration.hxx
@@ -67,7 +67,7 @@ class DocumentAcceleratorConfiguration : public XMLBasedAcceleratorConfiguration
@param xSMGR
reference to an uno service manager, which is used internaly.
*/
- DocumentAcceleratorConfiguration(const css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR);
+ DocumentAcceleratorConfiguration(const css::uno::Reference< css::uno::XComponentContext >& xContext);
virtual ~DocumentAcceleratorConfiguration();
// XInterface, XTypeProvider, XServiceInfo
diff --git a/framework/source/inc/accelerators/globalacceleratorconfiguration.hxx b/framework/source/inc/accelerators/globalacceleratorconfiguration.hxx
index 2d0e33016ebe..3f8a6c6b00e8 100644
--- a/framework/source/inc/accelerators/globalacceleratorconfiguration.hxx
+++ b/framework/source/inc/accelerators/globalacceleratorconfiguration.hxx
@@ -54,7 +54,7 @@ class GlobalAcceleratorConfiguration : public XCUBasedAcceleratorConfiguration
@param xSMGR
reference to an uno service manager, which is used internaly.
*/
- GlobalAcceleratorConfiguration(const css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR);
+ GlobalAcceleratorConfiguration(const css::uno::Reference< css::uno::XComponentContext >& xContext);
//----------------------------------
/** TODO */
diff --git a/framework/source/inc/accelerators/moduleacceleratorconfiguration.hxx b/framework/source/inc/accelerators/moduleacceleratorconfiguration.hxx
index 8ff1c9426452..816d2d8c8d89 100644
--- a/framework/source/inc/accelerators/moduleacceleratorconfiguration.hxx
+++ b/framework/source/inc/accelerators/moduleacceleratorconfiguration.hxx
@@ -65,7 +65,7 @@ class ModuleAcceleratorConfiguration : public XCUBasedAcceleratorConfiguration
@param xSMGR
reference to an uno service manager, which is used internaly.
*/
- ModuleAcceleratorConfiguration(const css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR);
+ ModuleAcceleratorConfiguration(const css::uno::Reference< css::uno::XComponentContext >& xContext);
//----------------------------------
/** TODO */
diff --git a/framework/source/inc/accelerators/presethandler.hxx b/framework/source/inc/accelerators/presethandler.hxx
index 30ef101ec93f..7cb7ea075d11 100644
--- a/framework/source/inc/accelerators/presethandler.hxx
+++ b/framework/source/inc/accelerators/presethandler.hxx
@@ -119,7 +119,7 @@ class PresetHandler : private ThreadHelpBase // attention! Must be the first bas
//---------------------------------------
/** @short can be used to create on needed uno resources. */
- css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR;
+ css::uno::Reference< css::uno::XComponentContext > m_xContext;
//---------------------------------------
/** @short knows the type of provided configuration.
@@ -225,11 +225,11 @@ class PresetHandler : private ThreadHelpBase // attention! Must be the first bas
with ::salhelper::SingletonRef template this ctor
cant have any special parameters!
- @param xSMGR
+ @param xContext
points to an uno service manager, which is used internaly
to create own needed uno resources.
*/
- PresetHandler(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR);
+ PresetHandler(const css::uno::Reference< css::uno::XComponentContext >& xContext);
//---------------------------------------
/** @short copy ctor */
diff --git a/framework/source/jobs/job.cxx b/framework/source/jobs/job.cxx
index 22d286cdad3d..0629df3553b9 100644
--- a/framework/source/jobs/job.cxx
+++ b/framework/source/jobs/job.cxx
@@ -58,19 +58,19 @@ DEFINE_XTYPEPROVIDER_4( Job ,
Specialized information (e.g. the alias or service name ofthis job) will be set
later using the method setJobData().
- @param xSMGR
+ @param xContext
reference to the uno service manager
@param xFrame
reference to the frame, in which environment we run
(May be null!)
*/
-Job::Job( /*IN*/ const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR ,
+Job::Job( /*IN*/ const css::uno::Reference< css::uno::XComponentContext >& xContext ,
/*IN*/ const css::uno::Reference< css::frame::XFrame >& xFrame )
: ThreadHelpBase (&Application::GetSolarMutex())
, ::cppu::OWeakObject ( )
- , m_aJobCfg (comphelper::getComponentContext(xSMGR))
- , m_xSMGR (xSMGR )
+ , m_aJobCfg (xContext )
+ , m_xContext (xContext )
, m_xFrame (xFrame )
, m_bListenOnDesktop (sal_False )
, m_bListenOnFrame (sal_False )
@@ -88,19 +88,19 @@ Job::Job( /*IN*/ const css::uno::Reference< css::lang::XMultiServiceFactory >& x
Specialized information (e.g. the alias or service name ofthis job) will be set
later using the method setJobData().
- @param xSMGR
+ @param xContext
reference to the uno service manager
@param xModel
reference to the model, in which environment we run
(May be null!)
*/
-Job::Job( /*IN*/ const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR ,
+Job::Job( /*IN*/ const css::uno::Reference< css::uno::XComponentContext >& xContext ,
/*IN*/ const css::uno::Reference< css::frame::XModel >& xModel )
: ThreadHelpBase (&Application::GetSolarMutex())
, ::cppu::OWeakObject ( )
- , m_aJobCfg (comphelper::getComponentContext(xSMGR))
- , m_xSMGR (xSMGR )
+ , m_aJobCfg (xContext )
+ , m_xContext (xContext )
, m_xModel (xModel )
, m_bListenOnDesktop (sal_False )
, m_bListenOnFrame (sal_False )
@@ -212,7 +212,7 @@ void Job::execute( /*IN*/ const css::uno::Sequence< css::beans::NamedValue >& lD
// create the job
// We must check for the supported interface on demand!
// But we preferr the synchronous one ...
- m_xJob = m_xSMGR->createInstance(m_aJobCfg.getService());
+ m_xJob = m_xContext->getServiceManager()->createInstanceWithContext(m_aJobCfg.getService(), m_xContext);
xSJob = css::uno::Reference< css::task::XJob >(m_xJob, css::uno::UNO_QUERY);
if (!xSJob.is())
xAJob = css::uno::Reference< css::task::XAsyncJob >(m_xJob, css::uno::UNO_QUERY);
@@ -542,7 +542,7 @@ void Job::impl_startListening()
{
try
{
- m_xDesktop = css::frame::Desktop::create( comphelper::getComponentContext(m_xSMGR) );
+ m_xDesktop = css::frame::Desktop::create( m_xContext );
css::uno::Reference< css::frame::XTerminateListener > xThis(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY);
m_xDesktop->addTerminateListener(xThis);
m_bListenOnDesktop = sal_True;
diff --git a/framework/source/jobs/jobdispatch.cxx b/framework/source/jobs/jobdispatch.cxx
index d66feca76179..adc4690fb97e 100644
--- a/framework/source/jobs/jobdispatch.cxx
+++ b/framework/source/jobs/jobdispatch.cxx
@@ -55,11 +55,11 @@ DEFINE_XTYPEPROVIDER_6( JobDispatch ,
css::frame::XDispatch
)
-DEFINE_XSERVICEINFO_MULTISERVICE( JobDispatch ,
- ::cppu::OWeakObject ,
- SERVICENAME_PROTOCOLHANDLER ,
- IMPLEMENTATIONNAME_JOBDISPATCH
- )
+DEFINE_XSERVICEINFO_MULTISERVICE_2( JobDispatch ,
+ ::cppu::OWeakObject ,
+ SERVICENAME_PROTOCOLHANDLER ,
+ IMPLEMENTATIONNAME_JOBDISPATCH
+ )
DEFINE_INIT_SERVICE( JobDispatch,
{
@@ -76,13 +76,13 @@ DEFINE_INIT_SERVICE( JobDispatch,
@short standard ctor
@descr It initialize this new instance.
- @param xSMGR
+ @param xContext
reference to the uno service manager
*/
-JobDispatch::JobDispatch( /*IN*/ const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR )
+JobDispatch::JobDispatch( /*IN*/ const css::uno::Reference< css::uno::XComponentContext >& xContext )
: ThreadHelpBase(&Application::GetSolarMutex())
, OWeakObject ( )
- , m_xSMGR (xSMGR )
+ , m_xContext (xContext )
{
}
@@ -94,8 +94,8 @@ JobDispatch::JobDispatch( /*IN*/ const css::uno::Reference< css::lang::XMultiSer
JobDispatch::~JobDispatch()
{
// release all used resources
- m_xSMGR = css::uno::Reference< css::lang::XMultiServiceFactory >();
- m_xFrame = css::uno::Reference< css::frame::XFrame >();
+ m_xContext.clear();
+ m_xFrame.clear();
}
//________________________________
@@ -121,7 +121,7 @@ void SAL_CALL JobDispatch::initialize( const css::uno::Sequence< css::uno::Any >
lArguments[a] >>= m_xFrame;
css::uno::Reference< css::frame::XModuleManager2 > xModuleManager =
- css::frame::ModuleManager::create(comphelper::getComponentContext(m_xSMGR));
+ css::frame::ModuleManager::create(m_xContext);
try
{
m_sModuleIdentifier = xModuleManager->identify( m_xFrame );
@@ -262,7 +262,7 @@ void JobDispatch::impl_dispatchEvent( /*IN*/ const OUString&
// filter disabled jobs using it's time stamp values.
/* SAFE { */
ReadGuard aReadLock(m_aLock);
- css::uno::Sequence< OUString > lJobs = JobData::getEnabledJobsForEvent(comphelper::getComponentContext(m_xSMGR), sEvent);
+ css::uno::Sequence< OUString > lJobs = JobData::getEnabledJobsForEvent(m_xContext, sEvent);
aReadLock.unlock();
/* } SAFE */
@@ -279,7 +279,7 @@ void JobDispatch::impl_dispatchEvent( /*IN*/ const OUString&
/* SAFE { */
aReadLock.lock();
- JobData aCfg(comphelper::getComponentContext(m_xSMGR));
+ JobData aCfg(m_xContext);
aCfg.setEvent(sEvent, lJobs[j]);
aCfg.setEnvironment(JobData::E_DISPATCH);
const bool bIsEnabled=aCfg.hasCorrectContext(m_sModuleIdentifier);
@@ -289,7 +289,7 @@ void JobDispatch::impl_dispatchEvent( /*IN*/ const OUString&
And freeing of such uno object is done by uno itself.
So we have to use dynamic memory everytimes.
*/
- Job* pJob = new Job(m_xSMGR, m_xFrame);
+ Job* pJob = new Job(m_xContext, m_xFrame);
css::uno::Reference< css::uno::XInterface > xJob(static_cast< ::cppu::OWeakObject* >(pJob), css::uno::UNO_QUERY);
pJob->setJobData(aCfg);
@@ -343,7 +343,7 @@ void JobDispatch::impl_dispatchService( /*IN*/ const OUString&
/* SAFE { */
ReadGuard aReadLock(m_aLock);
- JobData aCfg(comphelper::getComponentContext(m_xSMGR));
+ JobData aCfg(m_xContext);
aCfg.setService(sService);
aCfg.setEnvironment(JobData::E_DISPATCH);
@@ -352,7 +352,7 @@ void JobDispatch::impl_dispatchService( /*IN*/ const OUString&
And freeing of such uno object is done by uno itself.
So we have to use dynamic memory everytimes.
*/
- Job* pJob = new Job(m_xSMGR, m_xFrame);
+ Job* pJob = new Job(m_xContext, m_xFrame);
css::uno::Reference< css::uno::XInterface > xJob(static_cast< ::cppu::OWeakObject* >(pJob), css::uno::UNO_QUERY);
pJob->setJobData(aCfg);
@@ -394,7 +394,7 @@ void JobDispatch::impl_dispatchAlias( /*IN*/ const OUString&
/* SAFE { */
ReadGuard aReadLock(m_aLock);
- JobData aCfg(comphelper::getComponentContext(m_xSMGR));
+ JobData aCfg(m_xContext);
aCfg.setAlias(sAlias);
aCfg.setEnvironment(JobData::E_DISPATCH);
@@ -403,7 +403,7 @@ void JobDispatch::impl_dispatchAlias( /*IN*/ const OUString&
And freeing of such uno object is done by uno itself.
So we have to use dynamic memory everytimes.
*/
- Job* pJob = new Job(m_xSMGR, m_xFrame);
+ Job* pJob = new Job(m_xContext, m_xFrame);
css::uno::Reference< css::uno::XInterface > xJob(static_cast< ::cppu::OWeakObject* >(pJob), css::uno::UNO_QUERY);
pJob->setJobData(aCfg);
diff --git a/framework/source/jobs/jobexecutor.cxx b/framework/source/jobs/jobexecutor.cxx
index 54fe8469ae08..6d6de63c989c 100644
--- a/framework/source/jobs/jobexecutor.cxx
+++ b/framework/source/jobs/jobexecutor.cxx
@@ -62,15 +62,15 @@ DEFINE_XTYPEPROVIDER_6( JobExecutor ,
css::lang::XEventListener
)
-DEFINE_XSERVICEINFO_ONEINSTANCESERVICE( JobExecutor ,
- ::cppu::OWeakObject ,
- "com.sun.star.task.JobExecutor",
- IMPLEMENTATIONNAME_JOBEXECUTOR
- )
+DEFINE_XSERVICEINFO_ONEINSTANCESERVICE_2( JobExecutor ,
+ ::cppu::OWeakObject ,
+ "com.sun.star.task.JobExecutor",
+ IMPLEMENTATIONNAME_JOBEXECUTOR
+ )
DEFINE_INIT_SERVICE( JobExecutor,
{
- m_xModuleManager = css::frame::ModuleManager::create( comphelper::getComponentContext(m_xSMGR) );
+ m_xModuleManager = css::frame::ModuleManager::create( m_xContext );
/*Attention
I think we don't need any mutex or lock here ... because we are called by our own static method impl_createInstance()
@@ -109,15 +109,15 @@ DEFINE_INIT_SERVICE( JobExecutor,
@short standard ctor
@descr It initialize this new instance.
- @param xSMGR
+ @param xContext
reference to the uno service manager
*/
-JobExecutor::JobExecutor( /*IN*/ const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR )
+JobExecutor::JobExecutor( /*IN*/ const css::uno::Reference< css::uno::XComponentContext >& xContext )
: ThreadHelpBase (&Application::GetSolarMutex() )
, ::cppu::OWeakObject ( )
- , m_xSMGR (xSMGR )
+ , m_xContext (xContext )
, m_xModuleManager ( )
- , m_aConfig (comphelper::getComponentContext(xSMGR), OUString::createFromAscii(JobData::EVENTCFG_ROOT) )
+ , m_aConfig (xContext, OUString::createFromAscii(JobData::EVENTCFG_ROOT) )
{
// Don't do any reference related code here! Do it inside special
// impl_ method() ... see DEFINE_INIT_SERVICE() macro for further information.
@@ -157,7 +157,7 @@ void SAL_CALL JobExecutor::trigger( const OUString& sEvent ) throw(css::uno::Run
// get list of all enabled jobs
// The called static helper methods read it from the configuration and
// filter disabled jobs using it's time stamp values.
- css::uno::Sequence< OUString > lJobs = JobData::getEnabledJobsForEvent(comphelper::getComponentContext(m_xSMGR), sEvent);
+ css::uno::Sequence< OUString > lJobs = JobData::getEnabledJobsForEvent(m_xContext, sEvent);
aReadLock.unlock();
/* } SAFE */
@@ -169,7 +169,7 @@ void SAL_CALL JobExecutor::trigger( const OUString& sEvent ) throw(css::uno::Run
/* SAFE { */
aReadLock.lock();
- JobData aCfg(comphelper::getComponentContext(m_xSMGR));
+ JobData aCfg(m_xContext);
aCfg.setEvent(sEvent, lJobs[j]);
aCfg.setEnvironment(JobData::E_EXECUTION);
@@ -178,7 +178,7 @@ void SAL_CALL JobExecutor::trigger( const OUString& sEvent ) throw(css::uno::Run
And freeing of such uno object is done by uno itself.
So we have to use dynamic memory everytimes.
*/
- Job* pJob = new Job(m_xSMGR, css::uno::Reference< css::frame::XFrame >());
+ Job* pJob = new Job(m_xContext, css::uno::Reference< css::frame::XFrame >());
css::uno::Reference< css::uno::XInterface > xJob(static_cast< ::cppu::OWeakObject* >(pJob), css::uno::UNO_QUERY);
pJob->setJobData(aCfg);
@@ -226,7 +226,7 @@ void SAL_CALL JobExecutor::notifyEvent( const css::document::EventObject& aEvent
)
{
if (m_lEvents.find(EVENT_ON_DOCUMENT_OPENED) != m_lEvents.end())
- JobData::appendEnabledJobsForEvent(comphelper::getComponentContext(m_xSMGR), EVENT_ON_DOCUMENT_OPENED, lJobs);
+ JobData::appendEnabledJobsForEvent(m_xContext, EVENT_ON_DOCUMENT_OPENED, lJobs);
}
// Special feature: If the events "OnCreate" or "OnLoadFinished" occures - we generate our own event "onDocumentAdded".
@@ -236,12 +236,12 @@ void SAL_CALL JobExecutor::notifyEvent( const css::document::EventObject& aEvent
)
{
if (m_lEvents.find(EVENT_ON_DOCUMENT_ADDED) != m_lEvents.end())
- JobData::appendEnabledJobsForEvent(comphelper::getComponentContext(m_xSMGR), EVENT_ON_DOCUMENT_ADDED, lJobs);
+ JobData::appendEnabledJobsForEvent(m_xContext, EVENT_ON_DOCUMENT_ADDED, lJobs);
}
// Add all jobs for "real" notified event too .-)
if (m_lEvents.find(aEvent.EventName) != m_lEvents.end())
- JobData::appendEnabledJobsForEvent(comphelper::getComponentContext(m_xSMGR), aEvent.EventName, lJobs);
+ JobData::appendEnabledJobsForEvent(m_xContext, aEvent.EventName, lJobs);
aReadLock.unlock();
/* } SAFE */
@@ -257,7 +257,7 @@ void SAL_CALL JobExecutor::notifyEvent( const css::document::EventObject& aEvent
const JobData::TJob2DocEventBinding& rBinding = *pIt;
- JobData aCfg(comphelper::getComponentContext(m_xSMGR));
+ JobData aCfg(m_xContext);
aCfg.setEvent(rBinding.m_sDocEvent, rBinding.m_sJobName);
aCfg.setEnvironment(JobData::E_DOCUMENTEVENT);
@@ -270,7 +270,7 @@ void SAL_CALL JobExecutor::notifyEvent( const css::document::EventObject& aEvent
So we have to use dynamic memory everytimes.
*/
css::uno::Reference< css::frame::XModel > xModel(aEvent.Source, css::uno::UNO_QUERY);
- Job* pJob = new Job(m_xSMGR, xModel);
+ Job* pJob = new Job(m_xContext, xModel);
css::uno::Reference< css::uno::XInterface > xJob(static_cast< ::cppu::OWeakObject* >(pJob), css::uno::UNO_QUERY);
pJob->setJobData(aCfg);
diff --git a/framework/source/uiconfiguration/moduleimagemanager.cxx b/framework/source/uiconfiguration/moduleimagemanager.cxx
index 1125c547100d..b009b1c8af40 100644
--- a/framework/source/uiconfiguration/moduleimagemanager.cxx
+++ b/framework/source/uiconfiguration/moduleimagemanager.cxx
@@ -71,9 +71,9 @@ using namespace ::com::sun::star::ui;
namespace framework
{
-ModuleImageManager::ModuleImageManager( uno::Reference< XMultiServiceFactory > xServiceManager ) :
+ModuleImageManager::ModuleImageManager( const uno::Reference< uno::XComponentContext >& xContext ) :
ThreadHelpBase( &Application::GetSolarMutex() )
- , m_pImpl( new ImageManagerImpl(comphelper::getComponentContext(xServiceManager),static_cast< OWeakObject* >(this),true) )
+ , m_pImpl( new ImageManagerImpl(xContext,static_cast< OWeakObject* >(this),true) )
{
}
diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
index 40b02ec97416..ff702cc06359 100644
--- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
@@ -83,7 +83,7 @@ DEFINE_XTYPEPROVIDER_8 ( ModuleUIConfigurationManager
::com::sun::star::ui::XUIConfigurationPersistence
)
-DEFINE_XSERVICEINFO_MULTISERVICE ( ModuleUIConfigurationManager ,
+DEFINE_XSERVICEINFO_MULTISERVICE_2 ( ModuleUIConfigurationManager ,
::cppu::OWeakObject ,
SERVICENAME_MODULEUICONFIGURATIONMANAGER ,
IMPLEMENTATIONNAME_MODULEUICONFIGURATIONMANAGER
@@ -304,7 +304,7 @@ void ModuleUIConfigurationManager::impl_requestUIElementData( sal_Int16 nElement
{
try
{
- MenuConfiguration aMenuCfg( comphelper::getComponentContext(m_xServiceManager) );
+ MenuConfiguration aMenuCfg( m_xContext );
Reference< XIndexAccess > xContainer( aMenuCfg.CreateMenuBarConfigurationFromXML( xInputStream ));
RootItemContainer* pRootItemContainer = RootItemContainer::GetImplementation( xContainer );
if ( pRootItemContainer )
@@ -329,7 +329,7 @@ void ModuleUIConfigurationManager::impl_requestUIElementData( sal_Int16 nElement
try
{
Reference< XIndexContainer > xIndexContainer( static_cast< OWeakObject * >( new RootItemContainer() ), UNO_QUERY );
- ToolBoxConfiguration::LoadToolBox( comphelper::getComponentContext(m_xServiceManager), xInputStream, xIndexContainer );
+ ToolBoxConfiguration::LoadToolBox( m_xContext, xInputStream, xIndexContainer );
RootItemContainer* pRootItemContainer = RootItemContainer::GetImplementation( xIndexContainer );
aUIElementData.xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( pRootItemContainer, sal_True ) ), UNO_QUERY );
return;
@@ -346,7 +346,7 @@ void ModuleUIConfigurationManager::impl_requestUIElementData( sal_Int16 nElement
try
{
Reference< XIndexContainer > xIndexContainer( static_cast< OWeakObject * >( new RootItemContainer() ), UNO_QUERY );
- StatusBarConfiguration::LoadStatusBar( comphelper::getComponentContext(m_xServiceManager), xInputStream, xIndexContainer );
+ StatusBarConfiguration::LoadStatusBar( m_xContext, xInputStream, xIndexContainer );
RootItemContainer* pRootItemContainer = RootItemContainer::GetImplementation( xIndexContainer );
aUIElementData.xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( pRootItemContainer, sal_True ) ), UNO_QUERY );
return;
@@ -445,7 +445,7 @@ void ModuleUIConfigurationManager::impl_storeElementTypeData( Reference< XStorag
{
try
{
- MenuConfiguration aMenuCfg( comphelper::getComponentContext(m_xServiceManager) );
+ MenuConfiguration aMenuCfg( m_xContext );
aMenuCfg.StoreMenuBarConfigurationToXML( rElement.xSettings, xOutputStream );
}
catch ( const ::com::sun::star::lang::WrappedTargetException& )
@@ -458,7 +458,7 @@ void ModuleUIConfigurationManager::impl_storeElementTypeData( Reference< XStorag
{
try
{
- ToolBoxConfiguration::StoreToolBox( comphelper::getComponentContext(m_xServiceManager), xOutputStream, rElement.xSettings );
+ ToolBoxConfiguration::StoreToolBox( m_xContext, xOutputStream, rElement.xSettings );
}
catch ( const ::com::sun::star::lang::WrappedTargetException& )
{
@@ -470,7 +470,7 @@ void ModuleUIConfigurationManager::impl_storeElementTypeData( Reference< XStorag
{
try
{
- StatusBarConfiguration::StoreStatusBar( comphelper::getComponentContext(m_xServiceManager), xOutputStream, rElement.xSettings );
+ StatusBarConfiguration::StoreStatusBar( m_xContext, xOutputStream, rElement.xSettings );
}
catch ( const ::com::sun::star::lang::WrappedTargetException& )
{
@@ -717,7 +717,7 @@ void ModuleUIConfigurationManager::impl_Initialize()
}
}
-ModuleUIConfigurationManager::ModuleUIConfigurationManager( com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > xServiceManager ) :
+ModuleUIConfigurationManager::ModuleUIConfigurationManager( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& xContext ) :
ThreadHelpBase( &Application::GetSolarMutex() )
, m_xDefaultConfigStorage( 0 )
, m_xUserConfigStorage( 0 )
@@ -729,7 +729,7 @@ ModuleUIConfigurationManager::ModuleUIConfigurationManager( com::sun::star::uno:
, m_aXMLPostfix( ".xml" )
, m_aPropUIName( "UIName" )
, m_aPropResourceURL( "ResourceURL" )
- , m_xServiceManager( xServiceManager )
+ , m_xContext( xContext )
, m_aListenerContainer( m_aLock.getShareableOslMutex() )
{
for ( int i = 0; i < ::com::sun::star::ui::UIElementType::COUNT; i++ )
@@ -826,7 +826,7 @@ void SAL_CALL ModuleUIConfigurationManager::initialize( const Sequence< Any >& a
if ( !aResourceType.isEmpty() )
{
- m_pStorageHandler[i] = new PresetHandler( m_xServiceManager );
+ m_pStorageHandler[i] = new PresetHandler( m_xContext );
m_pStorageHandler[i]->connectToResource( PresetHandler::E_MODULES,
aResourceType, // this path wont be used later ... seee next lines!
m_aModuleShortName,
@@ -1325,7 +1325,7 @@ Reference< XInterface > SAL_CALL ModuleUIConfigurationManager::getImageManager()
if ( !m_xModuleImageManager.is() )
{
- m_xModuleImageManager = Reference< XComponent >( static_cast< cppu::OWeakObject *>( new ModuleImageManager( m_xServiceManager )),
+ m_xModuleImageManager = Reference< XComponent >( static_cast< cppu::OWeakObject *>( new ModuleImageManager( m_xContext )),
UNO_QUERY );
Reference< XInitialization > xInit( m_xModuleImageManager, UNO_QUERY );
@@ -1354,12 +1354,12 @@ Reference< XAcceleratorConfiguration > SAL_CALL ModuleUIConfigurationManager::ge
if ( m_bDisposed )
throw DisposedException();
- Reference< XMultiServiceFactory > xSMGR = m_xServiceManager;
+ Reference< XComponentContext > xContext = m_xContext;
OUString aModule = m_aModuleIdentifier;
if ( !m_xModuleAcceleratorManager.is() )
{
- Reference< XAcceleratorConfiguration > xManager = ModuleAcceleratorConfiguration::createWithModuleIdentifier(comphelper::getComponentContext(xSMGR), aModule);
+ Reference< XAcceleratorConfiguration > xManager = ModuleAcceleratorConfiguration::createWithModuleIdentifier(xContext, aModule);
m_xModuleAcceleratorManager = xManager;
}