summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-11-08 16:14:32 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-11-08 16:14:32 +0100
commitcb34498395a5eb0d33fb019c2ec8534f8854afcd (patch)
treec3ae28f43d43da949c3484c1d251fb862765a954 /framework
parent16efafc27ac2162d798ef68c4f09b946c66b9bfc (diff)
Clean up (calls to) StatusBarManger::RemoveControllers
...which turns out to be only called with SolarMutex locked and m_bDisposed being false Change-Id: I454e7951ea579fb6d9dc71d0aabebd373380b3e4
Diffstat (limited to 'framework')
-rw-r--r--framework/source/uielement/statusbarmanager.cxx25
1 files changed, 10 insertions, 15 deletions
diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx
index 9b6a86bc42ba..0c0e0e6b87ee 100644
--- a/framework/source/uielement/statusbarmanager.cxx
+++ b/framework/source/uielement/statusbarmanager.cxx
@@ -50,6 +50,7 @@
#include <vcl/settings.hxx>
#include <vcl/commandinfoprovider.hxx>
+#include <cassert>
#include <functional>
using namespace ::com::sun::star;
@@ -161,21 +162,17 @@ throw ( uno::RuntimeException, std::exception )
void SAL_CALL StatusBarManager::disposing( const lang::EventObject& Source ) throw ( uno::RuntimeException, std::exception )
{
- {
- SolarMutexGuard g;
- if ( m_bDisposed )
- return;
- }
+ SolarMutexGuard g;
+
+ if ( m_bDisposed )
+ return;
RemoveControllers();
- {
- SolarMutexGuard g;
- if ( Source.Source == uno::Reference< uno::XInterface >( m_xFrame, uno::UNO_QUERY ))
- m_xFrame.clear();
+ if ( Source.Source == uno::Reference< uno::XInterface >( m_xFrame, uno::UNO_QUERY ))
+ m_xFrame.clear();
- m_xContext.clear();
- }
+ m_xContext.clear();
}
// XComponent
@@ -279,10 +276,8 @@ void StatusBarManager::UpdateControllers()
void StatusBarManager::RemoveControllers()
{
- SolarMutexGuard g;
-
- if ( m_bDisposed )
- return;
+ DBG_TESTSOLARMUTEX();
+ assert(!m_bDisposed);
std::for_each( m_aControllerMap.begin(),
m_aControllerMap.end(),