summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-05-27 15:33:07 +0200
committerNoel Grandin <noel@peralex.com>2013-05-28 08:10:24 +0200
commit5835d8d2716448fb5549e7bae433704143d63e84 (patch)
tree1d96349685458c469c72b7bf12a60bdb9286677a /framework
parent052de9c16bc4018d2ae3edc6282267e04d3956ac (diff)
fdo#46808, Convert some XMultiServiceFactory to XComponentContext
Change-Id: Ia55bb7af6e5d1c76f3cf8001ea53892e1e1bdac0
Diffstat (limited to 'framework')
-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);