summaryrefslogtreecommitdiff
path: root/framework/source/uielement/controlmenucontroller.cxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-04-07 11:48:47 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2019-04-07 17:53:04 +0200
commit5a824268dfdd48c00f656b767b48cd12ccbdaabb (patch)
treea25f4afd3ca49cff41fc44559aedea70c82e6c7e /framework/source/uielement/controlmenucontroller.cxx
parenta6186a678cd9f67359da885606b3c3983f6bdc74 (diff)
Don't use resettable/clearable guard where plain guard is enough
Also use scope where possible. This allows to limit guard scope at language level; visualises the scope clearly; and helps avoiding errors like fixed in commit 61e4437c857854b331fa01da6f39b2b3b58a800b. Change-Id: Ifeca96e2df8e8a0897770d9546b2536806275f41 Reviewed-on: https://gerrit.libreoffice.org/70376 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'framework/source/uielement/controlmenucontroller.cxx')
-rw-r--r--framework/source/uielement/controlmenucontroller.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/framework/source/uielement/controlmenucontroller.cxx b/framework/source/uielement/controlmenucontroller.cxx
index 62b1dcf9047a..c4f8a8b33877 100644
--- a/framework/source/uielement/controlmenucontroller.cxx
+++ b/framework/source/uielement/controlmenucontroller.cxx
@@ -211,7 +211,7 @@ void SAL_CALL ControlMenuController::disposing( const EventObject& )
{
Reference< css::awt::XMenuListener > xHolder(static_cast<OWeakObject *>(this), UNO_QUERY );
- osl::ResettableMutexGuard aLock( m_aMutex );
+ osl::MutexGuard aLock( m_aMutex );
m_xFrame.clear();
m_xDispatch.clear();
@@ -225,7 +225,7 @@ void SAL_CALL ControlMenuController::disposing( const EventObject& )
// XStatusListener
void SAL_CALL ControlMenuController::statusChanged( const FeatureStateEvent& Event )
{
- osl::ResettableMutexGuard aLock( m_aMutex );
+ osl::MutexGuard aLock( m_aMutex );
OString sIdent;
for (size_t i=0; i < SAL_N_ELEMENTS(aCommands); ++i)
@@ -285,7 +285,7 @@ void SAL_CALL ControlMenuController::statusChanged( const FeatureStateEvent& Eve
// XMenuListener
void SAL_CALL ControlMenuController::itemActivated( const css::awt::MenuEvent& )
{
- osl::ResettableMutexGuard aLock( m_aMutex );
+ osl::MutexGuard aLock( m_aMutex );
if ( m_xPopupMenu.is() )
{
@@ -323,7 +323,7 @@ void ControlMenuController::impl_setPopupMenu()
void SAL_CALL ControlMenuController::updatePopupMenu()
{
- osl::ResettableMutexGuard aLock( m_aMutex );
+ osl::MutexGuard aLock( m_aMutex );
throwIfDisposed();
@@ -353,7 +353,7 @@ void SAL_CALL ControlMenuController::updatePopupMenu()
// XInitialization
void SAL_CALL ControlMenuController::initialize( const Sequence< Any >& aArguments )
{
- osl::ResettableMutexGuard aLock( m_aMutex );
+ osl::MutexGuard aLock( m_aMutex );
svt::PopupMenuControllerBase::initialize(aArguments);
m_aBaseURL.clear();
}