diff options
author | Noel Grandin <noel@peralex.com> | 2012-12-11 11:45:28 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2012-12-13 05:20:59 +0200 |
commit | 37b6871fa1fb12c4b2b45db5f3e6ac583577f538 (patch) | |
tree | 82fbd5378c21cdbc5fa0b2de16706812d515b2b9 /sfx2 | |
parent | b552f521f6bbf917ae41ccfcddeb498c75c824e3 (diff) |
Remove unnecessary member field
If SfxPopup is always going to use
comphelper::getProcessServiceFactory, it doesn't need to store it
in a member field.
Change-Id: Id8806bcc4cc92e66e94d4a5c54c3413570963335
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/inc/sfx2/tbxctrl.hxx | 4 | ||||
-rw-r--r-- | sfx2/source/toolbox/tbxitem.cxx | 8 |
2 files changed, 3 insertions, 9 deletions
diff --git a/sfx2/inc/sfx2/tbxctrl.hxx b/sfx2/inc/sfx2/tbxctrl.hxx index b0c35990c0e2..f675140c752a 100644 --- a/sfx2/inc/sfx2/tbxctrl.hxx +++ b/sfx2/inc/sfx2/tbxctrl.hxx @@ -26,6 +26,7 @@ #include <vcl/menu.hxx> #include <vcl/fixed.hxx> #include <vcl/floatwin.hxx> +#include <comphelper/processfactory.hxx> #include <sfx2/ctrlitem.hxx> #include <sfx2/sfxstatuslistener.hxx> #include <svtools/toolboxcontroller.hxx> @@ -109,7 +110,6 @@ class SFX2_DLLPUBLIC SfxPopupWindow: public FloatingWindow, public SfxStatusList ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xFrame; SfxFrameStatusListener* m_pStatusListener; ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xStatusListener; - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager; private: SfxFrameStatusListener* GetOrCreateStatusListener(); @@ -125,7 +125,7 @@ protected: sal_uInt16 GetId() const { return m_nId; } const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& GetFrame() const { return m_xFrame; } - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& GetServiceManager() const { return m_xServiceManager; } + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > GetServiceManager() const { return ::comphelper::getProcessServiceFactory(); } void BindListener(); void UnbindListener(); diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index 340924714d38..64e8901ed514 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -1159,8 +1159,6 @@ SfxPopupWindow::SfxPopupWindow( , m_xFrame( rFrame ) , m_pStatusListener( 0 ) { - m_xServiceManager = ::comphelper::getProcessServiceFactory(); - Window* pWindow = GetTopMostParentSystemWindow( this ); if ( pWindow ) ((SystemWindow *)pWindow)->GetTaskPaneList()->AddWindow( this ); @@ -1179,8 +1177,6 @@ SfxPopupWindow::SfxPopupWindow( , m_xFrame( rFrame ) , m_pStatusListener( 0 ) { - m_xServiceManager = ::comphelper::getProcessServiceFactory(); - Window* pWindow = GetTopMostParentSystemWindow( this ); if ( pWindow ) ((SystemWindow *)pWindow)->GetTaskPaneList()->AddWindow( this ); @@ -1200,8 +1196,6 @@ SfxPopupWindow::SfxPopupWindow( , m_xFrame( rFrame ) , m_pStatusListener( 0 ) { - m_xServiceManager = ::comphelper::getProcessServiceFactory(); - Window* pWindow = GetTopMostParentSystemWindow( this ); if ( pWindow ) ((SystemWindow *)pWindow)->GetTaskPaneList()->AddWindow( this ); @@ -1229,7 +1223,7 @@ SfxFrameStatusListener* SfxPopupWindow::GetOrCreateStatusListener() if ( !m_xStatusListener.is() ) { m_pStatusListener = new SfxFrameStatusListener( - m_xServiceManager, + ::comphelper::getProcessServiceFactory(), m_xFrame, this ); m_xStatusListener = Reference< XComponent >( static_cast< cppu::OWeakObject* >( |