diff options
author | Ras-al-Ghul <dipankar1995@gmail.com> | 2016-01-09 21:58:11 +0530 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2016-01-11 11:39:03 +0000 |
commit | 0f3a3c38bb4e7c4b4717e8dd7999fecba1288275 (patch) | |
tree | 391928200b2541af52403518b366a5c18edecf3a /vcl/source/window/toolbox2.cxx | |
parent | ba539fa91f9c3316107dcdf4a95718a49335d92e (diff) |
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.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'vcl/source/window/toolbox2.cxx')
-rw-r--r-- | vcl/source/window/toolbox2.cxx | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index e288bbeea82b..b2c75649f717 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 ); |