vcl/source/window/toolbox2.cxx | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-)
New commits: commit 0f3a3c38bb4e7c4b4717e8dd7999fecba1288275 Author: Ras-al-Ghul <dipankar1...@gmail.com> Date: Sat Jan 9 21:58:11 2016 +0530 tdf#96888 Kill internal vcl dog-tags .. Made pBorderWin a VclPtr Change-Id: I1869371b410276df2e7504b32617c2d1e2b6725f Reviewed-on: https://gerrit.libreoffice.org/21281 Reviewed-by: Michael Meeks <michael.me...@collabora.com> Tested-by: Michael Meeks <michael.me...@collabora.com> diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index e288bbe..b2c7564 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -432,15 +432,13 @@ void ToolBox::Highlight() void ToolBox::Select() { - ImplDelData aDelData; - ImplAddDel( &aDelData ); + VclPtr<vcl::Window> xWindow = this; CallEventListeners( VCLEVENT_TOOLBOX_SELECT ); maSelectHdl.Call( this ); - if ( aDelData.IsDead() ) + if ( xWindow->IsDisposed() ) return; - ImplRemoveDel( &aDelData ); // TODO: GetFloatingWindow in DockingWindow is currently inline, change it to check dockingwrapper ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this ); @@ -1892,22 +1890,19 @@ void ToolBox::ImplExecuteCustomMenu() GetMenu()->GetMenuFlags() | MenuFlags::AlwaysShowDisabledEntries ); // toolbox might be destroyed during execute - ImplDelData aDelData; - ImplAddDel( &aDelData ); - ImplDelData aBorderDel; bool bBorderDel = false; - vcl::Window *pWin = this; + VclPtr<vcl::Window> pWin = this; Rectangle aMenuRect = mpData->maMenubuttonItem.maRect; + VclPtr<ImplBorderWindow> pBorderWin; if( IsFloatingMode() ) { // custom menu is placed in the decoration - ImplBorderWindow *pBorderWin = dynamic_cast<ImplBorderWindow*>( GetWindow( GetWindowType::Border ) ); + pBorderWin = dynamic_cast<ImplBorderWindow*>( GetWindow( GetWindowType::Border ) ); if( pBorderWin && !pBorderWin->GetMenuRect().IsEmpty() ) { pWin = pBorderWin; aMenuRect = pBorderWin->GetMenuRect(); - pWin->ImplAddDel( &aBorderDel ); bBorderDel = true; } } @@ -1915,17 +1910,15 @@ void ToolBox::ImplExecuteCustomMenu() sal_uInt16 uId = GetMenu()->Execute( pWin, Rectangle( ImplGetPopupPosition( aMenuRect, Size() ), Size() ), PopupMenuFlags::ExecuteDown | PopupMenuFlags::NoMouseUpClose ); - if ( aDelData.IsDead() ) + if ( pWin->IsDisposed() ) return; - ImplRemoveDel( &aDelData ); if( GetMenu() ) GetMenu()->RemoveEventListener( LINK( this, ToolBox, ImplCustomMenuListener ) ); if( bBorderDel ) { - if( aBorderDel.IsDead() ) + if( pBorderWin->IsDisposed() ) return; - pWin->ImplRemoveDel( &aBorderDel ); } pWin->Invalidate( aMenuRect ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits