From 8a2f7704cd0e43304e54bf2281232335cc0979a3 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 12 Oct 2018 15:42:59 +0100 Subject: drop LazyDeletor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I7d2e00466f321994a46b0529d645e342f229c929 Reviewed-on: https://gerrit.libreoffice.org/61718 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- framework/source/uielement/toolbarmanager.cxx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'framework') diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index 5ca1bb8daa69..1ee4797d889b 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -232,13 +232,10 @@ void ToolBarManager::Destroy() delete static_cast< AddonsParams* >( m_pToolBar->GetItemData( nItemId )); } - // Hide toolbar as lazy delete can destroy the toolbar much later. - m_pToolBar->Hide(); - // #i93173# delete toolbar lazily as we can still be in one of its handlers // tdf#119390 this will reparent the toolbar, so focus is restored from a // floating toolbar to the last focused control of the application window. - m_pToolBar->doLazyDelete(); - + m_pToolBar->SetParentToDefaultWindow(); + // #i93173# note we can still be in one of the toolbar's handlers m_pToolBar->SetSelectHdl( Link() ); m_pToolBar->SetActivateHdl( Link() ); m_pToolBar->SetDeactivateHdl( Link() ); @@ -248,7 +245,7 @@ void ToolBarManager::Destroy() m_pToolBar->SetStateChangedHdl( Link() ); m_pToolBar->SetDataChangedHdl( Link() ); - m_pToolBar.clear(); + m_pToolBar.disposeAndClear(); SvtMiscOptions().RemoveListenerLink( LINK( this, ToolBarManager, MiscOptionsChanged ) ); } -- cgit