Kaydet (Commit) f5129ca7 authored tarafından Maxim Monastirsky's avatar Maxim Monastirsky

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
üst 03626d79
......@@ -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
......@@ -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">
......
......@@ -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)
......
......@@ -623,6 +623,11 @@ interface DrawView
StateMethod = GetMenuState ;
]
SID_ZOOM_OUT // ole : no, status : play rec
[
ExecMethod = FuSupport ;
StateMethod = GetMenuState ;
]
SID_ZOOM_MODE // ole : no, status : play rec
[
ExecMethod = FuTemporary ;
StateMethod = GetMenuState ;
......
......@@ -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 )
[
......
......@@ -1222,7 +1222,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
}
break;
case SID_ZOOM_OUT:
case SID_ZOOM_MODE:
case SID_ZOOM_PANNING:
{
mbZoomOnPage = false;
......
......@@ -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 );
......
......@@ -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;
}
......
......@@ -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();
......
......@@ -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;
......
......@@ -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
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment