diff options
author | Ras-al-Ghul <dipankar1995@gmail.com> | 2016-01-07 22:08:05 +0530 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2016-01-08 14:25:07 +0000 |
commit | 5e2a0f007b106af2ad02e5244e13061e28878cba (patch) | |
tree | 85c91cb3defef3321da42c7479ec498b3bcc1f03 | |
parent | 2f79c760b48965a04c260745fb9a23a6e1086faa (diff) |
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 <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
-rw-r--r-- | vcl/source/window/event.cxx | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx index 1f3eb24078f3..a4a64c14673e 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(); } } |