diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2014-09-14 15:48:45 +0300 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2014-09-14 16:41:40 +0300 |
commit | f5129ca7610ec4ec20ed1c00e5c94bf51d5de2cc (patch) | |
tree | 1a1f1327f1ca245a195f246863e418e62ee8dacb /sd | |
parent | fdo#80650 src transl. merge must be case sensitive (diff) | |
download | core-f5129ca7610ec4ec20ed1c00e5c94bf51d5de2cc.tar.gz core-f5129ca7610ec4ec20ed1c00e5c94bf51d5de2cc.zip |
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
Diffstat (limited to 'sd')
-rw-r--r-- | sd/inc/app.hrc | 1 | ||||
-rw-r--r-- | sd/sdi/_drvwsh.sdi | 5 | ||||
-rw-r--r-- | sd/sdi/sdraw.sdi | 24 | ||||
-rw-r--r-- | sd/source/ui/view/drviews2.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/drviews7.cxx | 1 | ||||
-rw-r--r-- | sd/source/ui/view/drviewsc.cxx | 1 | ||||
-rw-r--r-- | sd/source/ui/view/drviewse.cxx | 14 | ||||
-rw-r--r-- | sd/source/ui/view/outlnvs2.cxx | 10 | ||||
-rw-r--r-- | sd/uiconfig/sdraw/toolbar/zoombar.xml | 1 | ||||
-rw-r--r-- | sd/uiconfig/simpress/toolbar/zoombar.xml | 1 |
10 files changed, 57 insertions, 3 deletions
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 |