Kaydet (Commit) 991dad0a authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Clean up (calls to) ToolBarManager::RemoveControllers

...which turns out to be only called with SolarMutex locked

Change-Id: I3264b0a043da7111b8ca12c59ee7a590f1a43b8e
üst 6c946f3d
...@@ -401,50 +401,46 @@ throw ( RuntimeException, std::exception ) ...@@ -401,50 +401,46 @@ throw ( RuntimeException, std::exception )
void SAL_CALL ToolBarManager::disposing( const EventObject& Source ) throw ( RuntimeException, std::exception ) void SAL_CALL ToolBarManager::disposing( const EventObject& Source ) throw ( RuntimeException, std::exception )
{ {
{ SolarMutexGuard g;
SolarMutexGuard g;
if ( m_bDisposed ) if ( m_bDisposed )
return; return;
}
RemoveControllers(); RemoveControllers();
if ( m_xDocImageManager.is() )
{ {
SolarMutexGuard g; try
if ( m_xDocImageManager.is() ) {
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_xDocImageManager.clear();
m_xModuleImageManager.clear(); m_xModuleImageManager.clear();
if ( Source.Source == Reference< XInterface >( m_xFrame, UNO_QUERY )) if ( Source.Source == Reference< XInterface >( m_xFrame, UNO_QUERY ))
m_xFrame.clear(); m_xFrame.clear();
m_xContext.clear(); m_xContext.clear();
}
} }
// XComponent // XComponent
...@@ -619,7 +615,7 @@ void SAL_CALL ToolBarManager::elementReplaced( const css::ui::ConfigurationEvent ...@@ -619,7 +615,7 @@ void SAL_CALL ToolBarManager::elementReplaced( const css::ui::ConfigurationEvent
void ToolBarManager::RemoveControllers() void ToolBarManager::RemoveControllers()
{ {
SolarMutexGuard g; DBG_TESTSOLARMUTEX();
if ( m_bDisposed ) if ( m_bDisposed )
return; return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment