diff options
author | Ras-al-Ghul <dipankar1995@gmail.com> | 2016-02-02 19:42:15 +0530 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2016-02-03 12:53:08 +0000 |
commit | 60d6cb4faaffeef7e4660b2077c7d41a6865b761 (patch) | |
tree | ecbbda974d0bf4752ff56e22f55376d870f733d7 /vcl/source/window | |
parent | 384c815eda697d75706f686dc2ceb227b4d3f245 (diff) |
tdf#96888 - Kill internal vcl dog-tags ...
Removed some more usages of ImplDelData
Change-Id: Ieb3c83ecebaa799bec6ae409dd480ac123b8a460
Reviewed-on: https://gerrit.libreoffice.org/22040
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'vcl/source/window')
-rw-r--r-- | vcl/source/window/window.cxx | 65 |
1 files changed, 15 insertions, 50 deletions
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 3489e0d1413d..a6c4fc8d4d30 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -1377,41 +1377,6 @@ void Window::ImplSetReallyVisible() } } -void Window::ImplAddDel( ImplDelData* pDel ) const -{ - if ( IsDisposed() ) - { - pDel->mbDel = true; - return; - } - - DBG_ASSERT( !pDel->mpWindow, "Window::ImplAddDel(): cannot add ImplDelData twice !" ); - if( !pDel->mpWindow ) - { - pDel->mpWindow = const_cast<vcl::Window*>(this); // #112873# store ref to this window, so pDel can remove itself - pDel->mpNext = mpWindowImpl->mpFirstDel; - mpWindowImpl->mpFirstDel = pDel; - } -} - -void Window::ImplRemoveDel( ImplDelData* pDel ) const -{ - pDel->mpWindow = nullptr; // #112873# pDel is not associated with a Window anymore - - if ( IsDisposed() ) - return; - - if ( mpWindowImpl->mpFirstDel == pDel ) - mpWindowImpl->mpFirstDel = pDel->mpNext; - else - { - ImplDelData* pData = mpWindowImpl->mpFirstDel; - while ( pData->mpNext != pDel ) - pData = pData->mpNext; - pData->mpNext = pDel->mpNext; - } -} - void Window::ImplInitResolutionSettings() { // recalculate AppFont-resolution and DPI-resolution @@ -1949,9 +1914,9 @@ void Window::GetFocus() { if ( HasFocus() && mpWindowImpl->mpLastFocusWindow && !(mpWindowImpl->mnDlgCtrlFlags & DialogControlFlags::WantFocus) ) { - ImplDelData aDogtag( this ); + VclPtr<vcl::Window> xWindow(this); mpWindowImpl->mpLastFocusWindow->GrabFocus(); - if( aDogtag.IsDead() ) + if( xWindow->IsDisposed() ) return; } @@ -2296,7 +2261,7 @@ void Window::Show(bool bVisible, ShowFlags nFlags) if ( IsDisposed() || mpWindowImpl->mbVisible == bVisible ) return; - ImplDelData aDogTag( this ); + VclPtr<vcl::Window> xWindow(this); bool bRealVisibilityChanged = false; mpWindowImpl->mbVisible = bVisible; @@ -2304,7 +2269,7 @@ void Window::Show(bool bVisible, ShowFlags nFlags) if ( !bVisible ) { ImplHideAllOverlaps(); - if( aDogTag.IsDead() ) + if( xWindow->IsDisposed() ) return; if ( mpWindowImpl->mpBorderWindow ) @@ -2330,7 +2295,7 @@ void Window::Show(bool bVisible, ShowFlags nFlags) vcl::Region aInvRegion = mpWindowImpl->maWinClipRegion; - if( aDogTag.IsDead() ) + if( xWindow->IsDisposed() ) return; bRealVisibilityChanged = mpWindowImpl->mbReallyVisible; @@ -2463,7 +2428,7 @@ void Window::Show(bool bVisible, ShowFlags nFlags) bool bNoActivate(nFlags & (ShowFlags::NoActivate|ShowFlags::NoFocusChange)); mpWindowImpl->mpFrame->Show( true, bNoActivate ); } - if( aDogTag.IsDead() ) + if( xWindow->IsDisposed() ) return; // Query the correct size of the window, if we are waiting for @@ -2481,13 +2446,13 @@ void Window::Show(bool bVisible, ShowFlags nFlags) mpWindowImpl->mpFrameData->mpBuffer->SetOutputSizePixel(GetOutputSizePixel()); } - if( aDogTag.IsDead() ) + if( xWindow->IsDisposed() ) return; ImplShowAllOverlaps(); } - if( aDogTag.IsDead() ) + if( xWindow->IsDisposed() ) return; // the SHOW/HIDE events also serve as indicators to send child creation/destroy events to the access bridge @@ -2497,7 +2462,7 @@ void Window::Show(bool bVisible, ShowFlags nFlags) // now only notify with a NULL data pointer, for all other clients except the access bridge. if ( !bRealVisibilityChanged ) CallEventListeners( mpWindowImpl->mbVisible ? VCLEVENT_WINDOW_SHOW : VCLEVENT_WINDOW_HIDE ); - if( aDogTag.IsDead() ) + if( xWindow->IsDisposed() ) return; } @@ -2513,10 +2478,10 @@ Size Window::GetSizePixel() const // #i43257# trigger pending resize handler to assure correct window sizes if( mpWindowImpl->mpFrameData->maResizeIdle.IsActive() ) { - ImplDelData aDogtag( const_cast<Window*>(this) ); + VclPtr<vcl::Window> xWindow( const_cast<Window*>(this) ); mpWindowImpl->mpFrameData->maResizeIdle.Stop(); mpWindowImpl->mpFrameData->maResizeIdle.GetIdleHdl().Call( nullptr ); - if( aDogtag.IsDead() ) + if( xWindow->IsDisposed() ) return Size(0,0); } @@ -3300,9 +3265,9 @@ void Window::ImplCallDeactivateListeners( vcl::Window *pNew ) // no deactivation if the newly activated window is my child if ( !pNew || !ImplIsChild( pNew ) ) { - ImplDelData aDogtag( this ); + VclPtr<vcl::Window> xWindow(this); CallEventListeners( VCLEVENT_WINDOW_DEACTIVATE ); - if( aDogtag.IsDead() ) + if( xWindow->IsDisposed() ) return; // #100759#, avoid walking the wrong frame's hierarchy @@ -3317,9 +3282,9 @@ void Window::ImplCallActivateListeners( vcl::Window *pOld ) // no activation if the old active window is my child if ( !pOld || !ImplIsChild( pOld ) ) { - ImplDelData aDogtag( this ); + VclPtr<vcl::Window> xWindow(this); CallEventListeners( VCLEVENT_WINDOW_ACTIVATE, pOld ); - if( aDogtag.IsDead() ) + if( xWindow->IsDisposed() ) return; if ( ImplGetParent() ) |