diff options
author | Rodolfo Ribeiro Gomes <rodolforg@gmail.com> | 2013-05-28 11:22:05 -0300 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2013-05-30 15:44:47 +0000 |
commit | ffc2e5be1f712b09710e2096ad2f7eb81b80118d (patch) | |
tree | 7f4fa2234c3b41d49d12f1d1760b4e6d73e5c7ea /starmath/source | |
parent | 615b3c8425fa0c5e91f61c434cd03f94897b2cac (diff) |
Clean zoom redundances in Math and fix fdo#55929
Zoom can be handled by sfx2 in many ways:
- 50%, 75%, 100%, 150%, 200%
- Optimal view (fit in window)
- Entire page
- Page width
The math module was doing the first two by itself. Remove it.
Strange enough, state methods for zoom interface definitions on
sfx2's appslots.sdi were needed. I thought 'Container' property
in sfx.sdi should do the job. It seems to do nothing, though.
(The zoom should be disabled only if the object is an OLE/Container).
The Help-Ids from pop-up menu in Math/Formula were kept, because
they doesn't exist in sfx2.
Change-Id: Ie1ae413780551b34aa36b338f9a9df79a198319c
Reviewed-on: https://gerrit.libreoffice.org/4076
Reviewed-by: Luboš Luňák <l.lunak@suse.cz>
Tested-by: Luboš Luňák <l.lunak@suse.cz>
Diffstat (limited to 'starmath/source')
-rw-r--r-- | starmath/source/smres.src | 8 | ||||
-rw-r--r-- | starmath/source/view.cxx | 21 |
2 files changed, 6 insertions, 23 deletions
diff --git a/starmath/source/smres.src b/starmath/source/smres.src index f5c36b4cd36c..147291d93c24 100644 --- a/starmath/source/smres.src +++ b/starmath/source/smres.src @@ -831,19 +831,19 @@ Menu RID_VIEWMENU { MenuItem { - Identifier = SID_VIEW050 ; + Identifier = SID_ZOOM_50_PERCENT; HelpId = CMD_SID_VIEW050 ; Text [ en-US ] = "~View 50%" ; }; MenuItem { - Identifier = SID_VIEW100 ; + Identifier = SID_ZOOM_100_PERCENT ; HelpId = CMD_SID_VIEW100 ; Text [ en-US ] = "View ~100%" ; }; MenuItem { - Identifier = SID_VIEW200 ; + Identifier = SID_ZOOM_200_PERCENT ; HelpId = CMD_SID_VIEW200 ; Text [ en-US ] = "View ~200%" ; }; @@ -861,7 +861,7 @@ Menu RID_VIEWMENU }; MenuItem { - Identifier = SID_ADJUST ; + Identifier = SID_ZOOM_OPTIMAL ; HelpId = CMD_SID_ADJUST ; Text [ en-US ] = "~Display All" ; }; diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index 997908d786da..42325559e34f 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -1573,23 +1573,10 @@ void SmViewShell::Execute(SfxRequest& rReq) } break; - case SID_ADJUST: - case SID_FITINWINDOW: + case SID_ZOOM_OPTIMAL: aGraphic.ZoomToFitInWindow(); break; - case SID_VIEW050: - aGraphic.SetZoom(50); - break; - - case SID_VIEW100: - aGraphic.SetZoom(100); - break; - - case SID_VIEW200: - aGraphic.SetZoom(200); - break; - case SID_ZOOMIN: aGraphic.SetZoom(aGraphic.GetZoom() + 25); break; @@ -1942,13 +1929,9 @@ void SmViewShell::GetState(SfxItemSet &rSet) case SID_ATTR_ZOOM: rSet.Put(SvxZoomItem( SVX_ZOOM_PERCENT, aGraphic.GetZoom())); /* no break here */ - case SID_VIEW050: - case SID_VIEW100: - case SID_VIEW200: - case SID_ADJUST: case SID_ZOOMIN: case SID_ZOOMOUT: - case SID_FITINWINDOW: + case SID_ZOOM_OPTIMAL: if ( GetViewFrame()->GetFrame().IsInPlace() ) rSet.DisableItem( nWh ); break; |