vcl/source/window/event.cxx | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-)
New commits: commit 5e2a0f007b106af2ad02e5244e13061e28878cba Author: Ras-al-Ghul <dipankar1...@gmail.com> Date: Thu Jan 7 22:08:05 2016 +0530 tdf#96888 Kill internal vcl dog-tags ... Did a small change to void Window::CallEventListeners( sal_uLong nEvent, void* pData ) in event.cxx file. Patch No. 4 Change-Id: I6dff8f0611833d1514552afad163cdb55f693980 Reviewed-on: https://gerrit.libreoffice.org/21216 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Michael Meeks <michael.me...@collabora.com> Tested-by: Michael Meeks <michael.me...@collabora.com> diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx index 1f3eb24..a4a64c1 100644 --- a/vcl/source/window/event.cxx +++ b/vcl/source/window/event.cxx @@ -205,12 +205,11 @@ void Window::CallEventListeners( sal_uLong nEvent, void* pData ) { VclWindowEvent aEvent( this, nEvent, pData ); - ImplDelData aDelData; - ImplAddDel( &aDelData ); + VclPtr<vcl::Window> xWindow = this; Application::ImplCallEventListeners( aEvent ); - if ( aDelData.IsDead() ) + if ( xWindow->IsDisposed() ) return; if (!mpWindowImpl->maEventListeners.empty()) @@ -219,27 +218,23 @@ void Window::CallEventListeners( sal_uLong nEvent, void* pData ) std::vector<Link<VclWindowEvent&,void>> aCopy( mpWindowImpl->maEventListeners ); for ( Link<VclWindowEvent&,void>& rLink : aCopy ) { - if (aDelData.IsDead()) break; + if (xWindow->IsDisposed()) break; // check this hasn't been removed in some re-enterancy scenario fdo#47368 if( std::find(mpWindowImpl->maEventListeners.begin(), mpWindowImpl->maEventListeners.end(), rLink) != mpWindowImpl->maEventListeners.end() ) rLink.Call( aEvent ); } } - if ( aDelData.IsDead() ) + if ( xWindow->IsDisposed() ) return; - ImplRemoveDel( &aDelData ); - - vcl::Window* pWindow = this; - while ( pWindow ) + while ( xWindow ) { - pWindow->ImplAddDel( &aDelData ); - if ( aDelData.IsDead() ) + if ( xWindow->IsDisposed() ) return; - auto& rWindowImpl = *pWindow->mpWindowImpl; + auto& rWindowImpl = *xWindow->mpWindowImpl; if (!rWindowImpl.maChildEventListeners.empty()) { // Copy the list, because this can be destroyed when calling a Link... @@ -256,7 +251,7 @@ void Window::CallEventListeners( sal_uLong nEvent, void* pData ) ); for ( Link<VclWindowEvent&,void>& rLink : aCopy ) { - if (aDelData.IsDead()) + if (xWindow->IsDisposed()) return; // Check this hasn't been removed in some re-enterancy scenario fdo#47368. if( rWindowImpl.maChildEventListenersDeleted.find(rLink) == rWindowImpl.maChildEventListenersDeleted.end() ) @@ -264,12 +259,10 @@ void Window::CallEventListeners( sal_uLong nEvent, void* pData ) } } - if ( aDelData.IsDead() ) + if ( xWindow->IsDisposed() ) return; - pWindow->ImplRemoveDel( &aDelData ); - - pWindow = pWindow->GetParent(); + xWindow = xWindow->GetParent(); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits