summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--framework/inc/helper/persistentwindowstate.hxx4
-rw-r--r--framework/source/helper/persistentwindowstate.cxx6
-rw-r--r--framework/source/services/taskcreatorsrv.cxx2
3 files changed, 6 insertions, 6 deletions
diff --git a/framework/inc/helper/persistentwindowstate.hxx b/framework/inc/helper/persistentwindowstate.hxx
index e2af1bd0db2f..60cc05d93f8a 100644
--- a/framework/inc/helper/persistentwindowstate.hxx
+++ b/framework/inc/helper/persistentwindowstate.hxx
@@ -70,7 +70,7 @@ class PersistentWindowState : // interfaces
private:
/// may we need an uno service manager to create own services
- css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR;
+ css::uno::Reference< css::uno::XComponentContext > m_xContext;
/// reference to the frame which was created by the office himself
css::uno::WeakReference< css::frame::XFrame > m_xFrame;
@@ -85,7 +85,7 @@ class PersistentWindowState : // interfaces
//____________________________
// ctor/dtor
- PersistentWindowState(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR);
+ PersistentWindowState(const css::uno::Reference< css::uno::XComponentContext >& xContext);
virtual ~PersistentWindowState( );
//____________________________
diff --git a/framework/source/helper/persistentwindowstate.cxx b/framework/source/helper/persistentwindowstate.cxx
index d6733eadd3c5..4cc20cd7a3df 100644
--- a/framework/source/helper/persistentwindowstate.cxx
+++ b/framework/source/helper/persistentwindowstate.cxx
@@ -61,9 +61,9 @@ DEFINE_XTYPEPROVIDER_4(PersistentWindowState ,
css::lang::XEventListener )
//*****************************************************************************************************************
-PersistentWindowState::PersistentWindowState(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR)
+PersistentWindowState::PersistentWindowState(const css::uno::Reference< css::uno::XComponentContext >& xContext)
: ThreadHelpBase (&Application::GetSolarMutex())
- , m_xSMGR (xSMGR )
+ , m_xContext (xContext )
, m_bWindowStateAlreadySet(sal_False )
{
}
@@ -110,7 +110,7 @@ void SAL_CALL PersistentWindowState::frameAction(const css::frame::FrameActionEv
{
// SAFE -> ----------------------------------
ReadGuard aReadLock(m_aLock);
- css::uno::Reference< css::uno::XComponentContext > xContext = comphelper::getComponentContext(m_xSMGR);
+ css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext;
css::uno::Reference< css::frame::XFrame > xFrame(m_xFrame.get(), css::uno::UNO_QUERY);
sal_Bool bRestoreWindowState = !m_bWindowStateAlreadySet;
aReadLock.unlock();
diff --git a/framework/source/services/taskcreatorsrv.cxx b/framework/source/services/taskcreatorsrv.cxx
index 123106626816..a7e0d6c93113 100644
--- a/framework/source/services/taskcreatorsrv.cxx
+++ b/framework/source/services/taskcreatorsrv.cxx
@@ -311,7 +311,7 @@ void TaskCreatorService::implts_establishWindowStateListener( const css::uno::Re
// We must create a special listener service and couple it with the new created task frame.
// He will restore or save the window state of it ...
// See used classes for further information too.
- PersistentWindowState* pPersistentStateHandler = new PersistentWindowState(xSMGR);
+ PersistentWindowState* pPersistentStateHandler = new PersistentWindowState( comphelper::getComponentContext(xSMGR));
css::uno::Reference< css::lang::XInitialization > xInit(static_cast< ::cppu::OWeakObject* >(pPersistentStateHandler), css::uno::UNO_QUERY_THROW);
css::uno::Sequence< css::uno::Any > lInitData(1);