diff options
author | Noel Grandin <noel@peralex.com> | 2012-10-16 14:05:41 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-10-24 11:29:53 +0200 |
commit | e8aa70b5d44a6cbedacfe0e5d1b1da2c76a3c588 (patch) | |
tree | 2cb20208eb30391718b57c6302d3dcd6b2e99673 /framework | |
parent | 3688466ab127d7801b4cb752ee6205cc04acb2f7 (diff) |
fdo#46808, convert comphelper::ConfigurationHelper to XComponentContext
Convert the helper methods to take an XComponentContext parameter,
instead of XMultiServiceFactory.
Change-Id: I9f0098af37b91f107d8799f14caa04756eac82b1
Diffstat (limited to 'framework')
-rw-r--r-- | framework/inc/helper/persistentwindowstate.hxx | 14 | ||||
-rw-r--r-- | framework/source/accelerators/acceleratorconfiguration.cxx | 6 | ||||
-rw-r--r-- | framework/source/classes/taskcreator.cxx | 3 | ||||
-rw-r--r-- | framework/source/helper/persistentwindowstate.cxx | 22 | ||||
-rw-r--r-- | framework/source/helper/statusindicatorfactory.cxx | 2 | ||||
-rw-r--r-- | framework/source/jobs/helponstartup.cxx | 9 | ||||
-rw-r--r-- | framework/source/loadenv/loadenv.cxx | 6 | ||||
-rw-r--r-- | framework/source/services/autorecovery.cxx | 24 | ||||
-rw-r--r-- | framework/source/services/modulemanager.cxx | 4 | ||||
-rw-r--r-- | framework/source/services/pathsettings.cxx | 4 | ||||
-rw-r--r-- | framework/source/services/substitutepathvars.cxx | 4 |
11 files changed, 50 insertions, 48 deletions
diff --git a/framework/inc/helper/persistentwindowstate.hxx b/framework/inc/helper/persistentwindowstate.hxx index 76adf8f4e43c..d9e1ae2fdfd5 100644 --- a/framework/inc/helper/persistentwindowstate.hxx +++ b/framework/inc/helper/persistentwindowstate.hxx @@ -132,7 +132,7 @@ class PersistentWindowState : // interfaces //____________________________ /** @short retrieve the window state from the configuration. - @param xSMGR + @param rxContext needed to create the configuration access. @param sModuleName @@ -142,8 +142,8 @@ class PersistentWindowState : // interfaces @return [string] contains the information about position and size. */ - static ::rtl::OUString implst_getWindowStateFromConfig(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR , - const ::rtl::OUString& sModuleName); + static ::rtl::OUString implst_getWindowStateFromConfig(const css::uno::Reference< css::uno::XComponentContext >& rxContext , + const ::rtl::OUString& sModuleName); //____________________________ /** @short retrieve the window state from the container window. @@ -161,7 +161,7 @@ class PersistentWindowState : // interfaces //____________________________ /** @short restore the position and size on the container window. - @param xSMGR + @param rxContext needed to create the configuration access. @param sModuleName @@ -171,9 +171,9 @@ class PersistentWindowState : // interfaces @param sWindowState contains the information about position and size. */ - static void implst_setWindowStateOnConfig(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR , - const ::rtl::OUString& sModuleName , - const ::rtl::OUString& sWindowState ); + static void implst_setWindowStateOnConfig(const css::uno::Reference< css::uno::XComponentContext >& rxContext, + const ::rtl::OUString& sModuleName , + const ::rtl::OUString& sWindowState ); //____________________________ /** @short restore the position and size on the container window. diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx index 8becd7d34b89..eef8c1dd94cc 100644 --- a/framework/source/accelerators/acceleratorconfiguration.cxx +++ b/framework/source/accelerators/acceleratorconfiguration.cxx @@ -671,7 +671,7 @@ XCUBasedAcceleratorConfiguration::XCUBasedAcceleratorConfiguration(const css::un { const ::rtl::OUString CFG_ENTRY_ACCELERATORS("org.openoffice.Office.Accelerators"); m_xCfg = css::uno::Reference< css::container::XNameAccess > ( - ::comphelper::ConfigurationHelper::openConfig( m_xSMGR, CFG_ENTRY_ACCELERATORS, ::comphelper::ConfigurationHelper::E_ALL_LOCALES ), + ::comphelper::ConfigurationHelper::openConfig( comphelper::getComponentContext(m_xSMGR), CFG_ENTRY_ACCELERATORS, ::comphelper::ConfigurationHelper::E_ALL_LOCALES ), css::uno::UNO_QUERY ); } @@ -1173,14 +1173,14 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::reset() if ( sConfig == "Global" ) { m_xCfg = css::uno::Reference< css::container::XNameAccess > ( - ::comphelper::ConfigurationHelper::openConfig( m_xSMGR, CFG_ENTRY_GLOBAL, ::comphelper::ConfigurationHelper::E_ALL_LOCALES ), + ::comphelper::ConfigurationHelper::openConfig( comphelper::getComponentContext(m_xSMGR), 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( m_xSMGR, CFG_ENTRY_MODULES, ::comphelper::ConfigurationHelper::E_ALL_LOCALES ), + ::comphelper::ConfigurationHelper::openConfig( comphelper::getComponentContext(m_xSMGR), CFG_ENTRY_MODULES, ::comphelper::ConfigurationHelper::E_ALL_LOCALES ), css::uno::UNO_QUERY ); XCUBasedAcceleratorConfiguration::reload(); } diff --git a/framework/source/classes/taskcreator.cxx b/framework/source/classes/taskcreator.cxx index 147f5f4eeb50..c7d8689a6023 100644 --- a/framework/source/classes/taskcreator.cxx +++ b/framework/source/classes/taskcreator.cxx @@ -85,7 +85,8 @@ css::uno::Reference< css::frame::XFrame > TaskCreator::createTask( const ::rtl:: ( TargetHelper::matchSpecialTarget(sName, TargetHelper::E_DEFAULT) ) ) { - ::comphelper::ConfigurationHelper::readDirectKey(xSMGR, + ::comphelper::ConfigurationHelper::readDirectKey( + comphelper::getComponentContext(xSMGR), "org.openoffice.Office.TabBrowse", "TaskCreatorService", "ImplementationName", diff --git a/framework/source/helper/persistentwindowstate.cxx b/framework/source/helper/persistentwindowstate.cxx index 1733b922f407..26d6c2d121fe 100644 --- a/framework/source/helper/persistentwindowstate.cxx +++ b/framework/source/helper/persistentwindowstate.cxx @@ -119,7 +119,7 @@ void SAL_CALL PersistentWindowState::frameAction(const css::frame::FrameActionEv { // SAFE -> ---------------------------------- ReadGuard aReadLock(m_aLock); - css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = m_xSMGR ; + css::uno::Reference< css::uno::XComponentContext > xContext = comphelper::getComponentContext(m_xSMGR); css::uno::Reference< css::frame::XFrame > xFrame(m_xFrame.get(), css::uno::UNO_QUERY); sal_Bool bRestoreWindowState = !m_bWindowStateAlreadySet; aReadLock.unlock(); @@ -135,7 +135,7 @@ void SAL_CALL PersistentWindowState::frameAction(const css::frame::FrameActionEv return; // unknown module -> no configuration available! - ::rtl::OUString sModuleName = PersistentWindowState::implst_identifyModule(comphelper::getComponentContext(xSMGR), xFrame); + ::rtl::OUString sModuleName = PersistentWindowState::implst_identifyModule(xContext, xFrame); if (sModuleName.isEmpty()) return; @@ -145,7 +145,7 @@ void SAL_CALL PersistentWindowState::frameAction(const css::frame::FrameActionEv { if (bRestoreWindowState) { - ::rtl::OUString sWindowState = PersistentWindowState::implst_getWindowStateFromConfig(xSMGR, sModuleName); + ::rtl::OUString sWindowState = PersistentWindowState::implst_getWindowStateFromConfig(xContext, sModuleName); PersistentWindowState::implst_setWindowStateOnWindow(xWindow,sWindowState); // SAFE -> ---------------------------------- WriteGuard aWriteLock(m_aLock); @@ -166,7 +166,7 @@ void SAL_CALL PersistentWindowState::frameAction(const css::frame::FrameActionEv case css::frame::FrameAction_COMPONENT_DETACHING : { ::rtl::OUString sWindowState = PersistentWindowState::implst_getWindowStateFromWindow(xWindow); - PersistentWindowState::implst_setWindowStateOnConfig(xSMGR, sModuleName, sWindowState); + PersistentWindowState::implst_setWindowStateOnConfig(xContext, sModuleName, sWindowState); } break; default: @@ -203,8 +203,8 @@ void SAL_CALL PersistentWindowState::disposing(const css::lang::EventObject&) } //***************************************************************************************************************** -::rtl::OUString PersistentWindowState::implst_getWindowStateFromConfig(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR , - const ::rtl::OUString& sModuleName) +::rtl::OUString PersistentWindowState::implst_getWindowStateFromConfig(const css::uno::Reference< css::uno::XComponentContext >& rxContext, + const ::rtl::OUString& sModuleName) { ::rtl::OUString sWindowState; @@ -219,7 +219,7 @@ void SAL_CALL PersistentWindowState::disposing(const css::lang::EventObject&) try { - ::comphelper::ConfigurationHelper::readDirectKey(xSMGR, + ::comphelper::ConfigurationHelper::readDirectKey(rxContext, sPackage, sRelPath, sKey, @@ -234,9 +234,9 @@ void SAL_CALL PersistentWindowState::disposing(const css::lang::EventObject&) } //***************************************************************************************************************** -void PersistentWindowState::implst_setWindowStateOnConfig(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR , - const ::rtl::OUString& sModuleName , - const ::rtl::OUString& sWindowState) +void PersistentWindowState::implst_setWindowStateOnConfig(const css::uno::Reference< css::uno::XComponentContext >& rxContext, + const ::rtl::OUString& sModuleName , + const ::rtl::OUString& sWindowState) { ::rtl::OUStringBuffer sRelPathBuf(256); sRelPathBuf.appendAscii("Office/Factories/*[\""); @@ -249,7 +249,7 @@ void PersistentWindowState::implst_setWindowStateOnConfig(const css::uno::Refere try { - ::comphelper::ConfigurationHelper::writeDirectKey(xSMGR, + ::comphelper::ConfigurationHelper::writeDirectKey(rxContext, sPackage, sRelPath, sKey, diff --git a/framework/source/helper/statusindicatorfactory.cxx b/framework/source/helper/statusindicatorfactory.cxx index d5ce6042a1be..5a1ba9d822a9 100644 --- a/framework/source/helper/statusindicatorfactory.cxx +++ b/framework/source/helper/statusindicatorfactory.cxx @@ -420,7 +420,7 @@ void StatusIndicatorFactory::implts_makeParentVisibleIfAllowed() { bool bForceFrontAndFocus(false); ::comphelper::ConfigurationHelper::readDirectKey( - xSMGR, + comphelper::getComponentContext(xSMGR), ::rtl::OUString("org.openoffice.Office.Common/View"), ::rtl::OUString("NewDocumentHandling"), ::rtl::OUString("ForceFocusAndToFront"), diff --git a/framework/source/jobs/helponstartup.cxx b/framework/source/jobs/helponstartup.cxx index 8c7201d55938..a803db41a62b 100644 --- a/framework/source/jobs/helponstartup.cxx +++ b/framework/source/jobs/helponstartup.cxx @@ -91,7 +91,8 @@ DEFINE_INIT_SERVICE(HelpOnStartup, see macro DEFINE_XSERVICEINFO_MULTISERVICE and "impl_initService()" for further informations! */ // create some needed uno services and cache it - m_xModuleManager = css::frame::ModuleManager::create( comphelper::getComponentContext(m_xSMGR) ); + css::uno::Reference<css::uno::XComponentContext> xContext = comphelper::getComponentContext(m_xSMGR); + m_xModuleManager = css::frame::ModuleManager::create( xContext ); m_xDesktop = css::uno::Reference< css::frame::XFrame >( m_xSMGR->createInstance(SERVICENAME_DESKTOP), @@ -99,14 +100,14 @@ DEFINE_INIT_SERVICE(HelpOnStartup, m_xConfig = css::uno::Reference< css::container::XNameAccess >( ::comphelper::ConfigurationHelper::openConfig( - m_xSMGR, + xContext, CFG_PACKAGE_MODULES, ::comphelper::ConfigurationHelper::E_READONLY), css::uno::UNO_QUERY_THROW); // ask for office locale ::comphelper::ConfigurationHelper::readDirectKey( - m_xSMGR, + xContext, CFG_PACKAGE_SETUP, CFG_PATH_L10N, CFG_KEY_LOCALE, @@ -114,7 +115,7 @@ DEFINE_INIT_SERVICE(HelpOnStartup, // detect system ::comphelper::ConfigurationHelper::readDirectKey( - m_xSMGR, + xContext, CFG_PACKAGE_COMMON, CFG_PATH_HELP, CFG_KEY_HELPSYSTEM, diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index 799a48ddb587..fc5581312e04 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -952,7 +952,7 @@ sal_Bool LoadEnv::impl_furtherDocsAllowed() try { css::uno::Any aVal = ::comphelper::ConfigurationHelper::readDirectKey( - xSMGR, + comphelper::getComponentContext(xSMGR), ::rtl::OUString("org.openoffice.Office.Common/"), ::rtl::OUString("Misc"), ::rtl::OUString("MaxOpenDocuments"), @@ -1690,7 +1690,7 @@ void LoadEnv::impl_makeFrameWindowVisible(const css::uno::Reference< css::awt::X { css::uno::Any const a = ::comphelper::ConfigurationHelper::readDirectKey( - xSMGR, + comphelper::getComponentContext(xSMGR), ::rtl::OUString("org.openoffice.Office.Common/View"), ::rtl::OUString("NewDocumentHandling"), ::rtl::OUString("ForceFocusAndToFront"), @@ -1770,7 +1770,7 @@ void LoadEnv::impl_applyPersistentWindowState(const css::uno::Reference< css::aw // get access to the configuration of this office module css::uno::Reference< css::container::XNameAccess > xModuleCfg(::comphelper::ConfigurationHelper::openConfig( - xSMGR, + comphelper::getComponentContext(xSMGR), PACKAGE_SETUP_MODULES, ::comphelper::ConfigurationHelper::E_READONLY), css::uno::UNO_QUERY_THROW); diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx index 519c5cddf7fa..6390970898e7 100644 --- a/framework/source/services/autorecovery.cxx +++ b/framework/source/services/autorecovery.cxx @@ -931,7 +931,7 @@ css::uno::Reference< css::container::XNameAccess > AutoRecovery::implts_openConf if (m_xRecoveryCFG.is()) return m_xRecoveryCFG; - css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = m_xSMGR; + css::uno::Reference< css::uno::XComponentContext > xContext = comphelper::getComponentContext(m_xSMGR); aWriteLock.unlock(); // <- SAFE ---------------------------------- @@ -939,7 +939,7 @@ css::uno::Reference< css::container::XNameAccess > AutoRecovery::implts_openConf rtl::OUString sCFG_PACKAGE_RECOVERY(RTL_CONSTASCII_USTRINGPARAM(CFG_PACKAGE_RECOVERY)); // throws a RuntimeException if an error occure! css::uno::Reference< css::container::XNameAccess > xCFG( - ::comphelper::ConfigurationHelper::openConfig(xSMGR, sCFG_PACKAGE_RECOVERY, ::comphelper::ConfigurationHelper::E_STANDARD), + ::comphelper::ConfigurationHelper::openConfig(xContext, sCFG_PACKAGE_RECOVERY, ::comphelper::ConfigurationHelper::E_STANDARD), css::uno::UNO_QUERY); sal_Int32 nMinSpaceDocSave = MIN_DISCSPACE_DOCSAVE; @@ -948,13 +948,13 @@ css::uno::Reference< css::container::XNameAccess > AutoRecovery::implts_openConf try { rtl::OUString sCFG_PATH_AUTOSAVE(CFG_PATH_AUTOSAVE); - ::comphelper::ConfigurationHelper::readDirectKey(xSMGR, + ::comphelper::ConfigurationHelper::readDirectKey(xContext, sCFG_PACKAGE_RECOVERY, sCFG_PATH_AUTOSAVE, rtl::OUString(CFG_ENTRY_MINSPACE_DOCSAVE), ::comphelper::ConfigurationHelper::E_STANDARD) >>= nMinSpaceDocSave; - ::comphelper::ConfigurationHelper::readDirectKey(xSMGR, + ::comphelper::ConfigurationHelper::readDirectKey(xContext, sCFG_PACKAGE_RECOVERY, sCFG_PATH_AUTOSAVE, rtl::OUString(CFG_ENTRY_MINSPACE_CONFIGSAVE), @@ -1129,7 +1129,7 @@ void AutoRecovery::implts_specifyDefaultFilterAndExtension(AutoRecovery::TDocume { // open module config on demand and cache the update access xCFG = css::uno::Reference< css::container::XNameAccess >( - ::comphelper::ConfigurationHelper::openConfig(xSMGR, rtl::OUString(CFG_PACKAGE_MODULES), + ::comphelper::ConfigurationHelper::openConfig(comphelper::getComponentContext(xSMGR), rtl::OUString(CFG_PACKAGE_MODULES), ::comphelper::ConfigurationHelper::E_STANDARD), css::uno::UNO_QUERY_THROW); @@ -2973,7 +2973,7 @@ void AutoRecovery::implts_doEmergencySave(const DispatchParams& aParams) // the error report tool is started too in case no recovery // documents exists and was saved. ::comphelper::ConfigurationHelper::writeDirectKey( - m_xSMGR, + comphelper::getComponentContext(m_xSMGR), rtl::OUString(CFG_PACKAGE_RECOVERY), rtl::OUString(CFG_PATH_RECOVERYINFO), rtl::OUString(CFG_ENTRY_CRASHED), @@ -3034,7 +3034,7 @@ void AutoRecovery::implts_doRecovery(const DispatchParams& aParams) // Reset the configuration hint "we was crashed"! ::comphelper::ConfigurationHelper::writeDirectKey( - m_xSMGR, + comphelper::getComponentContext(m_xSMGR), rtl::OUString(CFG_PACKAGE_RECOVERY), rtl::OUString(CFG_PATH_RECOVERYINFO), rtl::OUString(CFG_ENTRY_CRASHED), @@ -3101,7 +3101,7 @@ void AutoRecovery::implts_doSessionQuietQuit(const DispatchParams& /*aParams*/) // Write a hint for "stored session data" into the configuration, so // the on next startup we know what's happen last time ::comphelper::ConfigurationHelper::writeDirectKey( - m_xSMGR, + comphelper::getComponentContext(m_xSMGR), rtl::OUString(CFG_PACKAGE_RECOVERY), rtl::OUString(CFG_PATH_RECOVERYINFO), rtl::OUString(CFG_ENTRY_SESSIONDATA), @@ -3138,7 +3138,7 @@ void AutoRecovery::implts_doSessionRestore(const DispatchParams& aParams) // Reset the configuration hint for "session save"! LOG_RECOVERY("... reset config key 'SessionData'") ::comphelper::ConfigurationHelper::writeDirectKey( - m_xSMGR, + comphelper::getComponentContext(m_xSMGR), rtl::OUString(CFG_PACKAGE_RECOVERY), rtl::OUString(CFG_PATH_RECOVERYINFO), rtl::OUString(CFG_ENTRY_SESSIONDATA), @@ -3275,7 +3275,7 @@ void SAL_CALL AutoRecovery::getFastPropertyValue(css::uno::Any& aValue , { sal_Bool bSessionData = sal_False; ::comphelper::ConfigurationHelper::readDirectKey( - m_xSMGR, + comphelper::getComponentContext(m_xSMGR), rtl::OUString(CFG_PACKAGE_RECOVERY), rtl::OUString(CFG_PATH_RECOVERYINFO), rtl::OUString(CFG_ENTRY_SESSIONDATA), @@ -3294,7 +3294,7 @@ void SAL_CALL AutoRecovery::getFastPropertyValue(css::uno::Any& aValue , case AUTORECOVERY_PROPHANDLE_CRASHED : aValue = ::comphelper::ConfigurationHelper::readDirectKey( - m_xSMGR, + comphelper::getComponentContext(m_xSMGR), rtl::OUString(CFG_PACKAGE_RECOVERY), rtl::OUString(CFG_PATH_RECOVERYINFO), rtl::OUString(CFG_ENTRY_CRASHED), @@ -3303,7 +3303,7 @@ void SAL_CALL AutoRecovery::getFastPropertyValue(css::uno::Any& aValue , case AUTORECOVERY_PROPHANDLE_EXISTS_SESSIONDATA : aValue = ::comphelper::ConfigurationHelper::readDirectKey( - m_xSMGR, + comphelper::getComponentContext(m_xSMGR), rtl::OUString(CFG_PACKAGE_RECOVERY), rtl::OUString(CFG_PATH_RECOVERYINFO), rtl::OUString(CFG_ENTRY_SESSIONDATA), diff --git a/framework/source/services/modulemanager.cxx b/framework/source/services/modulemanager.cxx index df2a40f89cb0..307e3fc1af2e 100644 --- a/framework/source/services/modulemanager.cxx +++ b/framework/source/services/modulemanager.cxx @@ -194,7 +194,7 @@ void SAL_CALL ModuleManager::replaceByName(const ::rtl::OUString& sName , // flush changes (because an error occurred) we will read them later. If we use a different config access // we can close it without a flush ... and our read data wont be affected .-) css::uno::Reference< css::uno::XInterface > xCfg = ::comphelper::ConfigurationHelper::openConfig( - xSMGR, + comphelper::getComponentContext(xSMGR), rtl::OUString(CFGPATH_FACTORIES), ::comphelper::ConfigurationHelper::E_STANDARD); css::uno::Reference< css::container::XNameAccess > xModules (xCfg, css::uno::UNO_QUERY_THROW); @@ -333,7 +333,7 @@ css::uno::Reference< css::container::XNameAccess > ModuleManager::implts_getConf try { xCfg = ::comphelper::ConfigurationHelper::openConfig( - xSMGR, + comphelper::getComponentContext(xSMGR), rtl::OUString(CFGPATH_FACTORIES), ::comphelper::ConfigurationHelper::E_READONLY); } diff --git a/framework/source/services/pathsettings.cxx b/framework/source/services/pathsettings.cxx index f8698868009d..00b807bef137 100644 --- a/framework/source/services/pathsettings.cxx +++ b/framework/source/services/pathsettings.cxx @@ -1112,7 +1112,7 @@ css::uno::Reference< css::container::XNameAccess > PathSettings::fa_getCfgOld() { xCfg = css::uno::Reference< css::container::XNameAccess >( ::comphelper::ConfigurationHelper::openConfig( - xSMGR, + comphelper::getComponentContext(xSMGR), CFG_NODE_OLD, ::comphelper::ConfigurationHelper::E_STANDARD), // not readonly! Somtimes we need write access there !!! css::uno::UNO_QUERY_THROW); @@ -1142,7 +1142,7 @@ css::uno::Reference< css::container::XNameAccess > PathSettings::fa_getCfgNew() { xCfg = css::uno::Reference< css::container::XNameAccess >( ::comphelper::ConfigurationHelper::openConfig( - xSMGR, + comphelper::getComponentContext(xSMGR), CFG_NODE_NEW, ::comphelper::ConfigurationHelper::E_STANDARD), css::uno::UNO_QUERY_THROW); diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx index f554854388d8..23d7b77733f1 100644 --- a/framework/source/services/substitutepathvars.cxx +++ b/framework/source/services/substitutepathvars.cxx @@ -698,7 +698,7 @@ rtl::OUString SubstitutePathVariables::GetWorkPath() const try { ::comphelper::ConfigurationHelper::readDirectKey( - m_xServiceManager, + comphelper::getComponentContext(m_xServiceManager), ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Paths")), ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Paths/Work")), ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WritePath")), @@ -723,7 +723,7 @@ rtl::OUString SubstitutePathVariables::GetWorkVariableValue() const try { ::comphelper::ConfigurationHelper::readDirectKey( - m_xServiceManager, + comphelper::getComponentContext(m_xServiceManager), ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Paths")), ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Variables")), ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Work")), |