diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-20 14:49:42 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-23 07:56:34 +0200 |
commit | 9605f1cd1375fc56e3a3ec76fa04e5a7a3caa70f (patch) | |
tree | 70fb79012cb07b5ea16a58493762e30e4a647d4e /sfx2 | |
parent | 87a8d05946cb63ff421c14b961ce74fa75bbf083 (diff) |
use rtl::Reference in SfxAppData_Impl
instead of manual acquire/release
Change-Id: Id8c1b2dbb9acb0861f71f05a83842f357edfc1e8
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/appdata.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/appl/appinit.cxx | 7 | ||||
-rw-r--r-- | sfx2/source/inc/appdata.hxx | 2 |
3 files changed, 5 insertions, 6 deletions
diff --git a/sfx2/source/appl/appdata.cxx b/sfx2/source/appl/appdata.cxx index e60ec8a6ef83..b4a5ff441f4c 100644 --- a/sfx2/source/appl/appdata.cxx +++ b/sfx2/source/appl/appdata.cxx @@ -40,6 +40,7 @@ #include <sfx2/docfile.hxx> #include <sfx2/request.hxx> #include <sfx2/sidebar/Theme.hxx> +#include <sfx2/unoctitm.hxx> #include "app.hrc" #include <sfx2/sfxresid.hxx> #include "objshimp.hxx" @@ -99,7 +100,6 @@ SfxAppData_Impl::SfxAppData_Impl( SfxApplication* ) #if HAVE_FEATURE_SCRIPTING , m_pSbxErrorHdl(nullptr) #endif - , pAppDispatch(nullptr) , pTemplates( nullptr ) , pPool(nullptr) , pProgress(nullptr) diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx index c3808798d0f8..93f634958c83 100644 --- a/sfx2/source/appl/appinit.cxx +++ b/sfx2/source/appl/appinit.cxx @@ -112,8 +112,8 @@ void SAL_CALL SfxTerminateListener_Impl::notifyTermination( const EventObject& a SfxApplication* pApp = SfxGetpApp(); pApp->Broadcast( SfxHint( SfxHintId::Deinitializing ) ); - pApp->Get_Impl()->pAppDispatch->ReleaseAll(); - pApp->Get_Impl()->pAppDispatch->release(); + pApp->Get_Impl()->mxAppDispatch->ReleaseAll(); + pApp->Get_Impl()->mxAppDispatch.clear(); css::uno::Reference< css::uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext(); css::uno::Reference< css::document::XDocumentEventListener > xGlobalBroadcaster(css::frame::theGlobalEventBroadcaster::get(xContext), css::uno::UNO_QUERY_THROW); @@ -205,8 +205,7 @@ void SfxApplication::Initialize_Impl() Reference < XDesktop2 > xDesktop = Desktop::create ( ::comphelper::getProcessComponentContext() ); xDesktop->addTerminateListener( new SfxTerminateListener_Impl() ); - pImpl->pAppDispatch = new SfxStatusDispatcher; - pImpl->pAppDispatch->acquire(); + pImpl->mxAppDispatch = new SfxStatusDispatcher; // SV-Look Help::EnableContextHelp(); diff --git a/sfx2/source/inc/appdata.hxx b/sfx2/source/inc/appdata.hxx index bc98e985dcb3..29b6bfd1c9db 100644 --- a/sfx2/source/inc/appdata.hxx +++ b/sfx2/source/inc/appdata.hxx @@ -93,7 +93,7 @@ public: #if HAVE_FEATURE_SCRIPTING SfxErrorHandler *m_pSbxErrorHdl; #endif - SfxStatusDispatcher* pAppDispatch; + rtl::Reference<SfxStatusDispatcher> mxAppDispatch; SfxDocumentTemplates* pTemplates; // global pointers |