summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2014-09-14 15:48:45 +0300
committerMaxim Monastirsky <momonasmon@gmail.com>2014-09-14 16:41:40 +0300
commitf5129ca7610ec4ec20ed1c00e5c94bf51d5de2cc (patch)
tree1a1f1327f1ca245a195f246863e418e62ee8dacb
parent03626d7940d5e2fc2abf65ef1b49a7a89623f08f (diff)
fdo#55903 Immediate effect for zoom in button
That's what apparently people expect from this button to do, similar to the nearby zoom out button. This is also consistent with a similar button in math, and in print preview (both are using the same icon and same tooltip). The zoom mode that was assigned to this button until now, moved to a dedicated button (thus could be further improved to host other functionality as well - see the next commit). Change-Id: Ie640c72cf1aab1e3fc8a14211702a33a86bb3672
-rw-r--r--icon-themes/galaxy/links.txt2
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu8
-rw-r--r--sd/inc/app.hrc1
-rw-r--r--sd/sdi/_drvwsh.sdi5
-rw-r--r--sd/sdi/sdraw.sdi24
-rw-r--r--sd/source/ui/view/drviews2.cxx2
-rw-r--r--sd/source/ui/view/drviews7.cxx1
-rw-r--r--sd/source/ui/view/drviewsc.cxx1
-rw-r--r--sd/source/ui/view/drviewse.cxx14
-rw-r--r--sd/source/ui/view/outlnvs2.cxx10
-rw-r--r--sd/uiconfig/sdraw/toolbar/zoombar.xml1
-rw-r--r--sd/uiconfig/simpress/toolbar/zoombar.xml1
12 files changed, 67 insertions, 3 deletions
diff --git a/icon-themes/galaxy/links.txt b/icon-themes/galaxy/links.txt
index 94b4da2d59f5..69160dcc4831 100644
--- a/icon-themes/galaxy/links.txt
+++ b/icon-themes/galaxy/links.txt
@@ -4,3 +4,5 @@ cmd/lc_datastreamsstop.png avmedia/res/avl02051.png
cmd/sc_datastreamsstop.png avmedia/res/av02051.png
cmd/lc_showsinglepage.png cmd/lc_adddirect.png
cmd/sc_showsinglepage.png cmd/sc_adddirect.png
+cmd/lc_zoommode.png cmd/lc_zoomoptimal.png
+cmd/sc_zoommode.png cmd/sc_zoomoptimal.png \ No newline at end of file
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
index 31aa4d7f9e18..8819d852ef5c 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
@@ -1480,6 +1480,14 @@
<value xml:lang="en-US">E-mail as ~OpenDocument Presentation...</value>
</prop>
</node>
+ <node oor:name=".uno:ZoomMode" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Zoom Tool</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
</node>
<node oor:name="Popups">
<node oor:name=".uno:ModifyMenu" oor:op="replace">
diff --git a/sd/inc/app.hrc b/sd/inc/app.hrc
index aacb35794623..0bbd319ef9fc 100644
--- a/sd/inc/app.hrc
+++ b/sd/inc/app.hrc
@@ -447,6 +447,7 @@
#define SID_ADD_MOTION_PATH (SID_SD_START+442)
#define SID_TABLE_TOOLBOX (SID_SD_START+443)
// free
+#define SID_ZOOM_MODE (SID_SD_START+447)
#define SID_HIDE_LAST_LEVEL (SID_SD_START+448)
#define SID_SHOW_NEXT_LEVEL (SID_SD_START+449)
#define SID_PRESENTATION_MINIMIZER (SID_SD_START+450)
diff --git a/sd/sdi/_drvwsh.sdi b/sd/sdi/_drvwsh.sdi
index 999bb69b9b46..151900826d00 100644
--- a/sd/sdi/_drvwsh.sdi
+++ b/sd/sdi/_drvwsh.sdi
@@ -624,6 +624,11 @@ interface DrawView
]
SID_ZOOM_OUT // ole : no, status : play rec
[
+ ExecMethod = FuSupport ;
+ StateMethod = GetMenuState ;
+ ]
+ SID_ZOOM_MODE // ole : no, status : play rec
+ [
ExecMethod = FuTemporary ;
StateMethod = GetMenuState ;
]
diff --git a/sd/sdi/sdraw.sdi b/sd/sdi/sdraw.sdi
index 7b9f7eadee9d..a77402625816 100644
--- a/sd/sdi/sdraw.sdi
+++ b/sd/sdi/sdraw.sdi
@@ -6151,6 +6151,30 @@ SfxVoidItem ZoomPanning SID_ZOOM_PANNING
GroupId = GID_VIEW;
]
+SfxVoidItem ZoomMode SID_ZOOM_MODE
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
SfxVoidItem Mirror SID_OBJECT_MIRROR
( SfxBoolItem MirrorVert ID_VAL_MIRRORVERT )
[
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 05c6c4086b83..8a21b68812f1 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -1222,7 +1222,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
}
break;
- case SID_ZOOM_OUT:
+ case SID_ZOOM_MODE:
case SID_ZOOM_PANNING:
{
mbZoomOnPage = false;
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index b6dff0c24dd6..67227ba524db 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -1345,6 +1345,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
rSet.DisableItem( SID_ZOOM_IN );
rSet.DisableItem( SID_ZOOM_OUT );
rSet.DisableItem( SID_ZOOM_PANNING );
+ rSet.DisableItem( SID_ZOOM_MODE );
rSet.DisableItem( SID_ZOOM_NEXT );
rSet.DisableItem( SID_ZOOM_PREV );
rSet.DisableItem( SID_SIZE_REAL );
diff --git a/sd/source/ui/view/drviewsc.cxx b/sd/source/ui/view/drviewsc.cxx
index b5a4e3147a81..84a1a2e86ffe 100644
--- a/sd/source/ui/view/drviewsc.cxx
+++ b/sd/source/ui/view/drviewsc.cxx
@@ -106,6 +106,7 @@ sal_uInt16 DrawViewShell::GetIdBySubId( sal_uInt16 nSId )
case SID_SIZE_OPTIMAL:
case SID_ZOOM_NEXT:
case SID_ZOOM_PREV:
+ case SID_ZOOM_MODE:
{
nMappedSId = SID_ZOOM_TOOLBOX;
}
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index 45f0fd775694..373a2bcde9a3 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -1142,6 +1142,20 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
}
break;
+ case SID_ZOOM_OUT:
+ {
+ mbZoomOnPage = false;
+ SetZoom( std::min( (long) ( GetActiveWindow()->GetZoom() * 2 ), (long) GetActiveWindow()->GetMaxZoom() ) );
+ Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0),
+ GetActiveWindow()->GetOutputSizePixel()) );
+ mpZoomList->InsertZoomRect(aVisAreaWin);
+ Invalidate( SID_ZOOM_IN );
+ Invalidate( SID_ZOOM_PANNING );
+ Invalidate( SID_ZOOM_TOOLBOX );
+ rReq.Done ();
+ }
+ break;
+
case SID_SIZE_VISAREA:
{
Rectangle aVisArea = mpFrameView->GetVisArea();
diff --git a/sd/source/ui/view/outlnvs2.cxx b/sd/source/ui/view/outlnvs2.cxx
index 7ad626c01597..249780c5177e 100644
--- a/sd/source/ui/view/outlnvs2.cxx
+++ b/sd/source/ui/view/outlnvs2.cxx
@@ -143,8 +143,14 @@ void OutlineViewShell::FuTemporary(SfxRequest &rReq)
case SID_ZOOM_OUT:
{
- SetCurrentFunction( FuZoom::Create(this, GetActiveWindow(), pOlView, GetDoc(), rReq) );
- // ends itself, no need for Cancel()!
+ SetZoom( std::min( (long) ( GetActiveWindow()->GetZoom() * 2 ), (long) GetActiveWindow()->GetMaxZoom() ) );
+ Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0),
+ GetActiveWindow()->GetOutputSizePixel()) );
+ mpZoomList->InsertZoomRect(aVisAreaWin);
+ Invalidate( SID_ATTR_ZOOM );
+ Invalidate( SID_ZOOM_IN );
+ Invalidate( SID_ATTR_ZOOMSLIDER );
+ Cancel();
rReq.Done();
}
break;
diff --git a/sd/uiconfig/sdraw/toolbar/zoombar.xml b/sd/uiconfig/sdraw/toolbar/zoombar.xml
index 4d18688bc9e2..788568aeeafb 100644
--- a/sd/uiconfig/sdraw/toolbar/zoombar.xml
+++ b/sd/uiconfig/sdraw/toolbar/zoombar.xml
@@ -29,5 +29,6 @@
<toolbar:toolbaritem xlink:href=".uno:ZoomOptimal" toolbar:helpid="10101"/>
<toolbar:toolbaritem xlink:href=".uno:ZoomObjects" toolbar:helpid="27099"/>
<toolbar:toolbarseparator/>
+ <toolbar:toolbaritem xlink:href=".uno:ZoomMode"/>
<toolbar:toolbaritem xlink:href=".uno:ZoomPanning" toolbar:helpid="27017"/>
</toolbar:toolbar> \ No newline at end of file
diff --git a/sd/uiconfig/simpress/toolbar/zoombar.xml b/sd/uiconfig/simpress/toolbar/zoombar.xml
index 4d18688bc9e2..788568aeeafb 100644
--- a/sd/uiconfig/simpress/toolbar/zoombar.xml
+++ b/sd/uiconfig/simpress/toolbar/zoombar.xml
@@ -29,5 +29,6 @@
<toolbar:toolbaritem xlink:href=".uno:ZoomOptimal" toolbar:helpid="10101"/>
<toolbar:toolbaritem xlink:href=".uno:ZoomObjects" toolbar:helpid="27099"/>
<toolbar:toolbarseparator/>
+ <toolbar:toolbaritem xlink:href=".uno:ZoomMode"/>
<toolbar:toolbaritem xlink:href=".uno:ZoomPanning" toolbar:helpid="27017"/>
</toolbar:toolbar> \ No newline at end of file