diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-03-18 16:49:49 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-03-18 17:37:55 +0100 |
commit | 8a2e5420fe584aa4f2785acc72cd8403beb88073 (patch) | |
tree | 3605db7e4a5f38a2b106a06816d6b4201afe39a6 | |
parent | 98861476f23c54adb1514f9ebf62b28a34002e99 (diff) |
Use SolarMutexGuard directly
Change-Id: I0ff561aecfd16f59be90f054d076d771179c77cd
-rw-r--r-- | framework/inc/recording/dispatchrecordersupplier.hxx | 7 | ||||
-rw-r--r-- | framework/source/recording/dispatchrecordersupplier.cxx | 21 |
2 files changed, 6 insertions, 22 deletions
diff --git a/framework/inc/recording/dispatchrecordersupplier.hxx b/framework/inc/recording/dispatchrecordersupplier.hxx index df0170719926..996010ea6bc8 100644 --- a/framework/inc/recording/dispatchrecordersupplier.hxx +++ b/framework/inc/recording/dispatchrecordersupplier.hxx @@ -20,7 +20,6 @@ #ifndef INCLUDED_FRAMEWORK_INC_RECORDING_DISPATCHRECORDERSUPPLIER_HXX #define INCLUDED_FRAMEWORK_INC_RECORDING_DISPATCHRECORDERSUPPLIER_HXX -#include <threadhelp/threadhelpbase.hxx> #include <macros/xinterface.hxx> #include <macros/xtypeprovider.hxx> #include <macros/xserviceinfo.hxx> @@ -45,11 +44,7 @@ namespace framework{ @threadsafe yes */ -class DispatchRecorderSupplier : // baseclasses - // Order is necessary for right initialization! - private ThreadHelpBase , - // interfaces - public ::cppu::WeakImplHelper2< +class DispatchRecorderSupplier : public ::cppu::WeakImplHelper2< css::lang::XServiceInfo , css::frame::XDispatchRecorderSupplier > { diff --git a/framework/source/recording/dispatchrecordersupplier.cxx b/framework/source/recording/dispatchrecordersupplier.cxx index 6fbcad461624..41e9c2664456 100644 --- a/framework/source/recording/dispatchrecordersupplier.cxx +++ b/framework/source/recording/dispatchrecordersupplier.cxx @@ -18,7 +18,6 @@ */ #include <recording/dispatchrecordersupplier.hxx> -#include <threadhelp/guard.hxx> #include <services.h> #include <com/sun/star/frame/XRecordableDispatch.hpp> @@ -55,11 +54,7 @@ DEFINE_INIT_SERVICE( it's not necessary to do anything here. */ DispatchRecorderSupplier::DispatchRecorderSupplier( const css::uno::Reference< css::lang::XMultiServiceFactory >& ) - // init baseclasses first! - // Attention: Don't change order of initialization! - : ThreadHelpBase ( &Application::GetSolarMutex() ) - // init member - , m_xDispatchRecorder( NULL ) + : m_xDispatchRecorder( NULL ) { } @@ -95,10 +90,8 @@ DispatchRecorderSupplier::~DispatchRecorderSupplier() */ void SAL_CALL DispatchRecorderSupplier::setDispatchRecorder( const css::uno::Reference< css::frame::XDispatchRecorder >& xRecorder ) throw (css::uno::RuntimeException, std::exception) { - // SAFE => - Guard aWriteLock(m_aLock); + SolarMutexGuard g; m_xDispatchRecorder=xRecorder; - // => SAFE } /** @@ -117,10 +110,8 @@ void SAL_CALL DispatchRecorderSupplier::setDispatchRecorder( const css::uno::Ref */ css::uno::Reference< css::frame::XDispatchRecorder > SAL_CALL DispatchRecorderSupplier::getDispatchRecorder() throw (css::uno::RuntimeException, std::exception) { - // SAFE => - Guard aReadLock(m_aLock); + SolarMutexGuard g; return m_xDispatchRecorder; - // => SAFE } @@ -141,11 +132,9 @@ void SAL_CALL DispatchRecorderSupplier::dispatchAndRecord( const css::util::URL& const css::uno::Sequence< css::beans::PropertyValue >& lArguments , const css::uno::Reference< css::frame::XDispatch >& xDispatcher ) throw (css::uno::RuntimeException, std::exception) { - // SAFE => - Guard aReadLock(m_aLock); + SolarMutexClearableGuard aReadLock; css::uno::Reference< css::frame::XDispatchRecorder > xRecorder = m_xDispatchRecorder; - aReadLock.unlock(); - // => SAFE + aReadLock.clear(); // clear unspecific situations if (!xDispatcher.is()) |