diff options
author | Thomas Lange <tl@openoffice.org> | 2002-07-22 12:22:22 +0000 |
---|---|---|
committer | Thomas Lange <tl@openoffice.org> | 2002-07-22 12:22:22 +0000 |
commit | e4eb9351bf1f990302532a375f81f110a16334ce (patch) | |
tree | 335adc260b031b2175f887778599359bd19f433d /starmath/source/view.cxx | |
parent | b11cdfc7cb2ff352c0f90c4ed3ef9d415e2f2783 (diff) |
#96085# enable replaceability of context menus
Diffstat (limited to 'starmath/source/view.cxx')
-rw-r--r-- | starmath/source/view.cxx | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index 1f530a10bb21..5b1c7b362275 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -2,9 +2,9 @@ * * $RCSfile: view.cxx,v $ * - * $Revision: 1.21 $ + * $Revision: 1.22 $ * - * last change: $Author: tl $ $Date: 2002-06-13 14:41:41 $ + * last change: $Author: tl $ $Date: 2002-07-22 13:22:22 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -429,12 +429,19 @@ void SmGraphicWindow::Command(const CommandEvent& rCEvt) case COMMAND_CONTEXTMENU: { GetParent()->ToTop(); - PopupMenu* pPopupMenu = new PopupMenu(SmResId(RID_VIEWMENU)); + SmResId aResId( RID_VIEWMENU ); + PopupMenu* pPopupMenu = new PopupMenu(aResId); pPopupMenu->SetSelectHdl(LINK(this, SmGraphicWindow, MenuSelectHdl)); Point aPos(5, 5); if (rCEvt.IsMouseEvent()) aPos = rCEvt.GetMousePosPixel(); - pPopupMenu->Execute( this, aPos ); + DBG_ASSERT( pViewShell, "view shell missing" ); + + // added for replaceability of context menus #96085, #93782 + pViewShell->GetViewFrame()->GetBindings().GetDispatcher() + ->ExecutePopup( aResId, this, &aPos ); + //pPopupMenu->Execute( this, aPos ); + delete pPopupMenu; bCallBase = FALSE; } |