summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRas-al-Ghul <dipankar1995@gmail.com>2016-01-09 03:09:49 +0530
committerMichael Meeks <michael.meeks@collabora.com>2016-01-09 12:15:47 +0000
commit31bc9a228ed02dfa082e3a59c20b0ce106d5c75c (patch)
treef107fa4c7eec4eb8b0ef53837ccb241ffb2e412d
parent269f953aaa46d7dce26d061ce487d2f76a16a34e (diff)
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 <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
-rw-r--r--include/vcl/menu.hxx2
-rw-r--r--vcl/source/window/menu.cxx21
2 files changed, 7 insertions, 16 deletions
diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx
index ade703bf8060..d5eec407ba42 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 0b866bec67f6..29fd6b9e4580 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;