diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-03-17 16:14:27 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-03-17 16:52:34 +0100 |
commit | ab3acb7ef79fcae8776b8d1ce0e81da5698ef516 (patch) | |
tree | 0dad3a5d6c6897887cc8ff5c6837d83b7e89a070 /framework/source/recording | |
parent | 803a8a04e980d24bf6c336e4416615a49614367f (diff) |
Consolidate framework::{Read,Write}Guard
...now that it is obvious that they both do the same
Change-Id: I6878acca4750ef4204fe32a695b6d9e1c5140115
Diffstat (limited to 'framework/source/recording')
-rw-r--r-- | framework/source/recording/dispatchrecorder.cxx | 7 | ||||
-rw-r--r-- | framework/source/recording/dispatchrecordersupplier.cxx | 9 |
2 files changed, 7 insertions, 9 deletions
diff --git a/framework/source/recording/dispatchrecorder.cxx b/framework/source/recording/dispatchrecorder.cxx index 6f9d0882e484..9e10d7b7859f 100644 --- a/framework/source/recording/dispatchrecorder.cxx +++ b/framework/source/recording/dispatchrecorder.cxx @@ -21,8 +21,7 @@ #include <recording/dispatchrecorder.hxx> #include <com/sun/star/frame/DispatchStatement.hpp> #include <com/sun/star/script/Converter.hpp> -#include <threadhelp/writeguard.hxx> -#include <threadhelp/readguard.hxx> +#include <threadhelp/guard.hxx> #include <services.h> #include <vcl/svapp.hxx> #include <comphelper/processfactory.hxx> @@ -144,7 +143,7 @@ void SAL_CALL DispatchRecorder::recordDispatchAsComment( const css::util::URL& void SAL_CALL DispatchRecorder::endRecording() throw( css::uno::RuntimeException, std::exception ) { /* SAFE{ */ - WriteGuard aWriteLock(m_aLock); + Guard aWriteLock(m_aLock); m_aStatements.clear(); /* } */ } @@ -152,7 +151,7 @@ void SAL_CALL DispatchRecorder::endRecording() throw( css::uno::RuntimeException OUString SAL_CALL DispatchRecorder::getRecordedMacro() throw( css::uno::RuntimeException, std::exception ) { /* SAFE{ */ - WriteGuard aWriteLock(m_aLock); + Guard aWriteLock(m_aLock); if ( m_aStatements.empty() ) return OUString(); diff --git a/framework/source/recording/dispatchrecordersupplier.cxx b/framework/source/recording/dispatchrecordersupplier.cxx index 209afd78af71..6fbcad461624 100644 --- a/framework/source/recording/dispatchrecordersupplier.cxx +++ b/framework/source/recording/dispatchrecordersupplier.cxx @@ -18,8 +18,7 @@ */ #include <recording/dispatchrecordersupplier.hxx> -#include <threadhelp/writeguard.hxx> -#include <threadhelp/readguard.hxx> +#include <threadhelp/guard.hxx> #include <services.h> #include <com/sun/star/frame/XRecordableDispatch.hpp> @@ -97,7 +96,7 @@ DispatchRecorderSupplier::~DispatchRecorderSupplier() void SAL_CALL DispatchRecorderSupplier::setDispatchRecorder( const css::uno::Reference< css::frame::XDispatchRecorder >& xRecorder ) throw (css::uno::RuntimeException, std::exception) { // SAFE => - WriteGuard aWriteLock(m_aLock); + Guard aWriteLock(m_aLock); m_xDispatchRecorder=xRecorder; // => SAFE } @@ -119,7 +118,7 @@ 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 => - ReadGuard aReadLock(m_aLock); + Guard aReadLock(m_aLock); return m_xDispatchRecorder; // => SAFE } @@ -143,7 +142,7 @@ void SAL_CALL DispatchRecorderSupplier::dispatchAndRecord( const css::util::URL& const css::uno::Reference< css::frame::XDispatch >& xDispatcher ) throw (css::uno::RuntimeException, std::exception) { // SAFE => - ReadGuard aReadLock(m_aLock); + Guard aReadLock(m_aLock); css::uno::Reference< css::frame::XDispatchRecorder > xRecorder = m_xDispatchRecorder; aReadLock.unlock(); // => SAFE |