summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2005-07-12 13:15:32 +0000
committerKurt Zenker <kz@openoffice.org>2005-07-12 13:15:32 +0000
commit384db44b92ba36bbb15df68a0dcd633dd2930813 (patch)
tree1f20bd9e37fefaa5b4854836b4daab8c75b13975
parentb644571bae062e17c6e05af6fc69a42ae332ac29 (diff)
INTEGRATION: CWS fwk16 (1.18.24); FILE MERGED
2005/07/07 09:34:46 cd 1.18.24.2: #124193# Toolbarmanager shouldn't destroy members in dtor, but in dispose 2005/07/07 07:56:00 cd 1.18.24.1: #124193# Fix potential crash on toolbarmanager dtor. As this class gets disposed it must destroy it members in the dispose method and not in the dtor
-rw-r--r--framework/source/uielement/toolbarmanager.cxx25
1 files changed, 10 insertions, 15 deletions
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index 85ee65081533..94cfe17b1500 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: toolbarmanager.cxx,v $
*
- * $Revision: 1.18 $
+ * $Revision: 1.19 $
*
- * last change: $Author: obo $ $Date: 2005-05-06 09:36:51 $
+ * last change: $Author: kz $ $Date: 2005-07-12 14:15:32 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -374,6 +374,10 @@ ToolBarManager::ToolBarManager( const Reference< XMultiServiceFactory >& rServic
ToolBarManager::~ToolBarManager()
{
+}
+
+void ToolBarManager::Destroy()
+{
ResetableGuard aGuard( m_aLock );
if ( m_bAddedToTaskPaneList )
{
@@ -386,6 +390,7 @@ ToolBarManager::~ToolBarManager()
m_bAddedToTaskPaneList = sal_False;
}
delete m_pToolBar;
+ m_pToolBar = 0;
}
ToolBox* ToolBarManager::GetToolBar() const
@@ -647,20 +652,10 @@ void SAL_CALL ToolBarManager::dispose() throw( RuntimeException )
}
m_xModuleImageManager.clear();
- if ( m_bAddedToTaskPaneList )
- {
- Window* pWindow = m_pToolBar;
- while ( pWindow && !pWindow->IsSystemWindow() )
- pWindow = pWindow->GetParent();
-
- if ( pWindow )
- ((SystemWindow *)pWindow)->GetTaskPaneList()->RemoveWindow( m_pToolBar );
- m_bAddedToTaskPaneList = sal_False;
- }
-
ImplClearPopupMenu( m_pToolBar );
- delete m_pToolBar;
- m_pToolBar = 0;
+
+ // We have to destroy our toolbar instance now.
+ Destroy();
if ( m_bFrameActionRegistered && m_xFrame.is() )
{