summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRas-al-Ghul <dipankar1995@gmail.com>2016-01-08 01:42:50 +0530
committerMichael Meeks <michael.meeks@collabora.com>2016-01-09 20:35:49 +0000
commit79af5b389b42284ddea3e486c17ace4776bd8e4c (patch)
treeede732ed43df9901c70a8362a47e029d0e5ee482
parente02f5d421933a58b32dc8b9bb0a2027fb3914649 (diff)
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 <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
-rw-r--r--vcl/source/window/toolbox.cxx24
1 files 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<vcl::Window> 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<vcl::Window> 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<vcl::Window> 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<vcl::Window> 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)