From 79af5b389b42284ddea3e486c17ace4776bd8e4c Mon Sep 17 00:00:00 2001 From: Ras-al-Ghul Date: Fri, 8 Jan 2016 01:42:50 +0530 Subject: tdf#96888 Kill internal vcl dog-tags ... Did some changes to toolbox.cxx file. Patch No. 19 Change-Id: Ia66d208230c8ffeca095af60b311510a826321d8 Reviewed-on: https://gerrit.libreoffice.org/21236 Tested-by: Jenkins Reviewed-by: Michael Meeks --- vcl/source/window/toolbox.cxx | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index 3cd2cab483c6..0aa3f19c05c2 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -3543,12 +3543,10 @@ bool ToolBox::ImplHandleMouseButtonUp( const MouseEvent& rMEvt, bool bCancel ) if ( !(pItem->mnBits & ToolBoxItemBits::REPEAT) ) { // prevent from being destroyed in the select handler - ImplDelData aDelData; - ImplAddDel( &aDelData ); + VclPtr xWindow = this; Select(); - if ( aDelData.IsDead() ) + if ( xWindow->IsDisposed() ) return true; - ImplRemoveDel( &aDelData ); } } @@ -4048,18 +4046,16 @@ void ToolBox::MouseButtonUp( const MouseEvent& rMEvt ) void ToolBox::Tracking( const TrackingEvent& rTEvt ) { - ImplDelData aDelData; - ImplAddDel( &aDelData ); + VclPtr xWindow = this; if ( rTEvt.IsTrackingEnded() ) ImplHandleMouseButtonUp( rTEvt.GetMouseEvent(), rTEvt.IsTrackingCanceled() ); else ImplHandleMouseMove( rTEvt.GetMouseEvent(), rTEvt.IsTrackingRepeat() ); - if ( aDelData.IsDead() ) + if ( xWindow->IsDisposed() ) // toolbox was deleted return; - ImplRemoveDel( &aDelData ); DockingWindow::Tracking( rTEvt ); } @@ -5044,12 +5040,10 @@ bool ToolBox::ImplActivateItem( vcl::KeyCode aKeyCode ) Click(); // #107776# we might be destroyed in the selecthandler - ImplDelData aDelData; - ImplAddDel( &aDelData ); + VclPtr xWindow = this; Select(); - if ( aDelData.IsDead() ) + if ( xWindow->IsDisposed() ) return bRet; - ImplRemoveDel( &aDelData ); Deactivate(); mbIsKeyEvent = false; @@ -5140,8 +5134,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt ) bool bGrabFocusToDocument = false; // #107776# we might be destroyed in the keyhandler - ImplDelData aDelData; - ImplAddDel( &aDelData ); + VclPtr xWindow = this; switch ( nCode ) { @@ -5288,9 +5281,8 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt ) } } - if ( aDelData.IsDead() ) + if ( xWindow->IsDisposed() ) return; - ImplRemoveDel( &aDelData ); // #107251# move focus away if this toolbox was disabled during keyinput if (HasFocus() && mpData->mbKeyInputDisabled && bParentIsContainer) -- cgit