diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2016-01-28 13:38:46 +0200 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2016-01-28 15:03:55 +0200 |
commit | 291544d481a79ce037018dd7cefbfec719b76f2d (patch) | |
tree | 1080c81afc3e877525812f7a905ac21da2189a79 /starmath/source | |
parent | b9160c2511287223d7e014de3134fde917b9320e (diff) |
tdf#93837 starmath: Convert RID_VIEWMENU to xml
Also fixes .uno:Adjust->.uno:ZoomOptimal forgotten by
ffc2e5be1f712b09710e2096ad2f7eb81b80118d
Change-Id: Ifa3d1144b2d85290d7d27de50f5ad430ae0cfc8d
Diffstat (limited to 'starmath/source')
-rw-r--r-- | starmath/source/document.cxx | 3 | ||||
-rw-r--r-- | starmath/source/smres.src | 53 | ||||
-rw-r--r-- | starmath/source/view.cxx | 13 |
3 files changed, 2 insertions, 67 deletions
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx index 0ff39dc7f8dd..6d6bd01003c6 100644 --- a/starmath/source/document.cxx +++ b/starmath/source/document.cxx @@ -108,8 +108,7 @@ SFX_IMPL_SUPERCLASS_INTERFACE(SmDocShell, SfxObjectShell) void SmDocShell::InitInterface_Impl() { - GetStaticInterface()->RegisterPopupMenu(SmResId(RID_VIEWMENU)); - GetStaticInterface()->RegisterPopupMenu(SmResId(RID_COMMANDMENU)); + GetStaticInterface()->RegisterPopupMenu("view"); } SFX_IMPL_OBJECTFACTORY(SmDocShell, SvGlobalName(SO3_SM_CLASSID), SfxObjectShellFlags::STD_NORMAL, "smath" ) diff --git a/starmath/source/smres.src b/starmath/source/smres.src index 1909f556526c..50872d97fda0 100644 --- a/starmath/source/smres.src +++ b/starmath/source/smres.src @@ -20,7 +20,6 @@ #include <sfx2/sfx.hrc> #include <svx/globlmn.hrc> #include "starmath.hrc" -#include "smcommands.h" String RID_FONTREGULAR { @@ -42,58 +41,6 @@ String GID_MATH { Text = "StarMath" ; }; -Menu RID_VIEWMENU -{ - ItemList = - { - MenuItem - { - Identifier = SID_ZOOM_50_PERCENT; - HelpId = CMD_SID_VIEW050 ; - Text [ en-US ] = "~View 50%" ; - }; - MenuItem - { - Identifier = SID_ZOOM_100_PERCENT ; - HelpId = CMD_SID_VIEW100 ; - Text [ en-US ] = "View ~100%" ; - }; - MenuItem - { - Identifier = SID_ZOOM_200_PERCENT ; - HelpId = CMD_SID_VIEW200 ; - Text [ en-US ] = "View ~200%" ; - }; - MenuItem - { - Identifier = SID_ZOOMIN ; - HelpId = CMD_SID_ZOOMIN ; - Text [ en-US ] = "~Zoom In" ; - }; - MenuItem - { - Identifier = SID_ZOOMOUT ; - HelpId = CMD_SID_ZOOMOUT ; - Text [ en-US ] = "Zoom ~Out" ; - }; - MenuItem - { - Identifier = SID_ZOOM_OPTIMAL ; - HelpId = CMD_SID_ADJUST ; - Text [ en-US ] = "~Display All" ; - }; - MenuItem - { - Separator = TRUE ; - }; - MenuItem - { - Identifier = SID_DRAW ; - HelpId = CMD_SID_DRAW ; - Text [ en-US ] = "U~pdate" ; - }; - }; -}; String STR_BLACK { diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index a808a6868a5f..fc7c04ca5173 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -563,9 +563,6 @@ void SmGraphicWindow::Command(const CommandEvent& rCEvt) case CommandEventId::ContextMenu: { GetParent()->ToTop(); - SmResId aResId( RID_VIEWMENU ); - std::unique_ptr<PopupMenu> xPopupMenu(new PopupMenu(aResId)); - xPopupMenu->SetSelectHdl(LINK(this, SmGraphicWindow, MenuSelectHdl)); Point aPos(5, 5); if (rCEvt.IsMouseEvent()) aPos = rCEvt.GetMousePosPixel(); @@ -573,7 +570,7 @@ void SmGraphicWindow::Command(const CommandEvent& rCEvt) // added for replaceability of context menus pViewShell->GetViewFrame()->GetBindings().GetDispatcher() - ->ExecutePopup( aResId, this, &aPos ); + ->ExecutePopup( this, &aPos ); bCallBase = false; } @@ -603,14 +600,6 @@ void SmGraphicWindow::Command(const CommandEvent& rCEvt) } -IMPL_LINK_TYPED( SmGraphicWindow, MenuSelectHdl, Menu *, pMenu, bool ) -{ - SmViewShell *pViewSh = GetView(); - if (pViewSh) - pViewSh->GetViewFrame()->GetDispatcher()->Execute( pMenu->GetCurItemId() ); - return false; -} - void SmGraphicWindow::SetZoom(sal_uInt16 Factor) { nZoom = std::min(std::max((sal_uInt16) Factor, (sal_uInt16) MINZOOM), (sal_uInt16) MAXZOOM); |