diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-11-08 16:53:57 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-11-08 16:53:57 +0100 |
commit | 991dad0a93ab6cefb2847ef1a98df87bcacd1fb1 (patch) | |
tree | ab6b0f800a69f06c77d08e7602f3d6191cd983f2 /framework | |
parent | 6c946f3dd8ec3d71a7e9512ea9122179e6ca9696 (diff) |
Clean up (calls to) ToolBarManager::RemoveControllers
...which turns out to be only called with SolarMutex locked
Change-Id: I3264b0a043da7111b8ca12c59ee7a590f1a43b8e
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/uielement/toolbarmanager.cxx | 62 |
1 files changed, 29 insertions, 33 deletions
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index cc00fc9bd5fc..26d7e50f124a 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -401,50 +401,46 @@ throw ( RuntimeException, std::exception ) void SAL_CALL ToolBarManager::disposing( const EventObject& Source ) throw ( RuntimeException, std::exception ) { - { - SolarMutexGuard g; - if ( m_bDisposed ) - return; - } + SolarMutexGuard g; + + if ( m_bDisposed ) + return; RemoveControllers(); + if ( m_xDocImageManager.is() ) { - SolarMutexGuard g; - if ( m_xDocImageManager.is() ) + try + { + m_xDocImageManager->removeConfigurationListener( + Reference< XUIConfigurationListener >( + static_cast< OWeakObject* >( this ), UNO_QUERY )); + } + catch (const Exception&) { - try - { - m_xDocImageManager->removeConfigurationListener( - Reference< XUIConfigurationListener >( - static_cast< OWeakObject* >( this ), UNO_QUERY )); - } - catch (const Exception&) - { - } } + } - if ( m_xModuleImageManager.is() ) + if ( m_xModuleImageManager.is() ) + { + try + { + m_xModuleImageManager->removeConfigurationListener( + Reference< XUIConfigurationListener >( + static_cast< OWeakObject* >( this ), UNO_QUERY )); + } + catch (const Exception&) { - try - { - m_xModuleImageManager->removeConfigurationListener( - Reference< XUIConfigurationListener >( - static_cast< OWeakObject* >( this ), UNO_QUERY )); - } - catch (const Exception&) - { - } } + } - m_xDocImageManager.clear(); - m_xModuleImageManager.clear(); + m_xDocImageManager.clear(); + m_xModuleImageManager.clear(); - if ( Source.Source == Reference< XInterface >( m_xFrame, UNO_QUERY )) - m_xFrame.clear(); + if ( Source.Source == Reference< XInterface >( m_xFrame, UNO_QUERY )) + m_xFrame.clear(); - m_xContext.clear(); - } + m_xContext.clear(); } // XComponent @@ -619,7 +615,7 @@ void SAL_CALL ToolBarManager::elementReplaced( const css::ui::ConfigurationEvent void ToolBarManager::RemoveControllers() { - SolarMutexGuard g; + DBG_TESTSOLARMUTEX(); if ( m_bDisposed ) return; |