diff options
Diffstat (limited to 'framework/source/helper/persistentwindowstate.cxx')
-rw-r--r-- | framework/source/helper/persistentwindowstate.cxx | 22 |
1 files changed, 11 insertions, 11 deletions
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, |