diff options
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; |