From ab3acb7ef79fcae8776b8d1ce0e81da5698ef516 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 17 Mar 2014 16:14:27 +0100 Subject: Consolidate framework::{Read,Write}Guard ...now that it is obvious that they both do the same Change-Id: I6878acca4750ef4204fe32a695b6d9e1c5140115 --- framework/source/dispatch/closedispatcher.cxx | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'framework/source/dispatch/closedispatcher.cxx') diff --git a/framework/source/dispatch/closedispatcher.cxx b/framework/source/dispatch/closedispatcher.cxx index 042250975ecc..f21ec96b9395 100644 --- a/framework/source/dispatch/closedispatcher.cxx +++ b/framework/source/dispatch/closedispatcher.cxx @@ -19,8 +19,7 @@ #include #include -#include -#include +#include #include #include #include @@ -150,7 +149,7 @@ void SAL_CALL CloseDispatcher::dispatchWithNotification(const css::util::URL& throw(css::uno::RuntimeException, std::exception) { // SAFE -> ---------------------------------- - WriteGuard aWriteLock(m_aLock); + Guard aWriteLock(m_aLock); // This reference indicates, that we was already called before and // our asynchronous process was not finished yet. @@ -260,7 +259,7 @@ IMPL_LINK_NOARG(CloseDispatcher, impl_asyncCallback) sal_Bool bControllerSuspended = sal_False; // SAFE -> ---------------------------------- - ReadGuard aReadLock(m_aLock); + Guard aReadLock(m_aLock); // Closing of all views, related to the same document, is allowed // only if the dispatched URL was ".uno:CloseDoc"! @@ -411,7 +410,7 @@ IMPL_LINK_NOARG(CloseDispatcher, impl_asyncCallback) implts_notifyResultListener(xListener, nState, css::uno::Any()); // SAFE -> ---------------------------------- - WriteGuard aWriteLock(m_aLock); + Guard aWriteLock(m_aLock); // This method was called asynchronous from our main thread by using a pointer. // We reached this method only, by using a reference to ourself :-) @@ -450,7 +449,7 @@ sal_Bool CloseDispatcher::implts_prepareFrameForClosing(const css::uno::Referenc if (bCloseAllOtherViewsToo) { // SAFE -> ---------------------------------- - ReadGuard aReadLock(m_aLock); + Guard aReadLock(m_aLock); css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext; aReadLock.unlock(); // <- SAFE ---------------------------------- @@ -490,7 +489,7 @@ sal_Bool CloseDispatcher::implts_prepareFrameForClosing(const css::uno::Referenc sal_Bool CloseDispatcher::implts_closeFrame() { // SAFE -> ---------------------------------- - ReadGuard aReadLock(m_aLock); + Guard aReadLock(m_aLock); css::uno::Reference< css::frame::XFrame > xFrame (m_xCloseFrame.get(), css::uno::UNO_QUERY); aReadLock.unlock(); // <- SAFE ---------------------------------- @@ -506,7 +505,7 @@ sal_Bool CloseDispatcher::implts_closeFrame() return sal_False; // SAFE -> ---------------------------------- - WriteGuard aWriteLock(m_aLock); + Guard aWriteLock(m_aLock); m_xCloseFrame = css::uno::WeakReference< css::frame::XFrame >(); aWriteLock.unlock(); // <- SAFE ---------------------------------- @@ -518,7 +517,7 @@ sal_Bool CloseDispatcher::implts_closeFrame() sal_Bool CloseDispatcher::implts_establishBackingMode() { // SAFE -> ---------------------------------- - ReadGuard aReadLock(m_aLock); + Guard aReadLock(m_aLock); css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext; css::uno::Reference< css::frame::XFrame > xFrame (m_xCloseFrame.get(), css::uno::UNO_QUERY); aReadLock.unlock(); @@ -549,7 +548,7 @@ sal_Bool CloseDispatcher::implts_establishBackingMode() sal_Bool CloseDispatcher::implts_terminateApplication() { // SAFE -> ---------------------------------- - ReadGuard aReadLock(m_aLock); + Guard aReadLock(m_aLock); css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext; aReadLock.unlock(); // <- SAFE ---------------------------------- -- cgit