include/vcl/menu.hxx | 2 +- vcl/source/window/menu.cxx | 21 ++++++--------------- 2 files changed, 7 insertions(+), 16 deletions(-)
New commits: commit 31bc9a228ed02dfa082e3a59c20b0ce106d5c75c Author: Ras-al-Ghul <dipankar1...@gmail.com> Date: Sat Jan 9 03:09:49 2016 +0530 tdf#96888 Kill internal vcl dog-tags ... This is a cleanup to https://gerrit.libreoffice.org/#/c/21233/ Change-Id: I731b9cb8e64fb07e8d0a6d89e4f420e2e4570a8e Reviewed-on: https://gerrit.libreoffice.org/21279 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/include/vcl/menu.hxx b/include/vcl/menu.hxx index ade703b..d5eec40 100644 --- a/include/vcl/menu.hxx +++ b/include/vcl/menu.hxx @@ -519,7 +519,7 @@ private: SAL_DLLPRIVATE MenuFloatingWindow * ImplGetFloatingWindow() const; protected: - SAL_DLLPRIVATE sal_uInt16 ImplExecute( vcl::Window* pWindow, const Rectangle& rRect, FloatWinPopupFlags nPopupFlags, Menu* pStaredFrom, bool bPreSelectFirst ); + SAL_DLLPRIVATE sal_uInt16 ImplExecute( const VclPtr<vcl::Window>& xWindow, const Rectangle& rRect, FloatWinPopupFlags nPopupFlags, Menu* pStaredFrom, bool bPreSelectFirst ); SAL_DLLPRIVATE long ImplCalcHeight( sal_uInt16 nEntries ) const; SAL_DLLPRIVATE sal_uInt16 ImplCalcVisEntries( long nMaxHeight, sal_uInt16 nStartEntry = 0, sal_uInt16* pLastVisible = nullptr ) const; diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 0b866be..29fd6b9 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -2928,7 +2928,7 @@ sal_uInt16 PopupMenu::Execute( vcl::Window* pExecWindow, const Rectangle& rRect, return ImplExecute( pExecWindow, rRect, nPopupModeFlags, nullptr, false ); } -sal_uInt16 PopupMenu::ImplExecute( vcl::Window* pW, const Rectangle& rRect, FloatWinPopupFlags nPopupModeFlags, Menu* pSFrom, bool bPreSelectFirst ) +sal_uInt16 PopupMenu::ImplExecute( const VclPtr<vcl::Window>& pW, const Rectangle& rRect, FloatWinPopupFlags nPopupModeFlags, Menu* pSFrom, bool bPreSelectFirst ) { if ( !pSFrom && ( PopupMenu::IsInExecute() || !GetItemCount() ) ) return 0; @@ -2972,18 +2972,13 @@ sal_uInt16 PopupMenu::ImplExecute( vcl::Window* pW, const Rectangle& rRect, Floa // could be useful during debugging. // nPopupModeFlags |= FloatWinPopupFlags::NoFocusClose; - ImplDelData aDelData; - pW->ImplAddDel( &aDelData ); - bInCallback = true; // set it here, if Activate overridden Activate(); bInCallback = false; - if ( aDelData.IsDead() ) + if ( pW->IsDisposed() ) return 0; // Error - pW->ImplRemoveDel( &aDelData ); - if ( bCanceled || bKilled ) return 0; @@ -3135,20 +3130,16 @@ sal_uInt16 PopupMenu::ImplExecute( vcl::Window* pW, const Rectangle& rRect, Floa } if ( bRealExecute ) { - pWin->ImplAddDel( &aDelData ); - - ImplDelData aModalWinDel; - pW->ImplAddDel( &aModalWinDel ); pW->ImplIncModalCount(); pWin->Execute(); - DBG_ASSERT( ! aModalWinDel.IsDead(), "window for popup died, modal count incorrect !" ); - if( ! aModalWinDel.IsDead() ) + DBG_ASSERT( ! pW->IsDisposed(), "window for popup died, modal count incorrect !" ); + if( ! pW->IsDisposed() ) pW->ImplDecModalCount(); - if ( !aDelData.IsDead() ) - pWin->ImplRemoveDel( &aDelData ); + if ( !pWin->IsDisposed() ) + return 0; else return 0; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits