diff options
author | Jim Raykowski <raykowj@gmail.com> | 2021-05-27 19:21:11 -0800 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2021-06-17 13:00:12 +0200 |
commit | 1c10af136ef00cddd81452ae8e2202e8d4f6a7bf (patch) | |
tree | 686c5de0e281b617de81e126ee2d78cb2c930f18 /sd | |
parent | a4d78bbbd7b264d3445a0adc9b25bc008eaea10b (diff) |
Resolves tdf#142513 fix zoom caller handling
Calling ZoomPlus has always executed shell SID_ZOOM_OUT case handling.
ZoomMinus, which replaced ZoomIn, does SID_ZOOM_IN case handling.
This patch changes ZoomPlus to do SID_ZOOM_IN case handling and
ZoomMinus to do SID_ZOOM_OUT case handling and makes appropriate
changes required by these name changes to provide expected zoom
results in all module shells that have handling for these calls.
Change-Id: If148f4f7866bfc8fc6452ad1c1dace723a125ef6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116287
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj@gmail.com>
(cherry picked from commit ec629c5ee22d02f99d66a5cf975ce239876b7f4d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116702
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/view/drviews7.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/view/drviewse.cxx | 5 | ||||
-rw-r--r-- | sd/source/ui/view/outlnvs2.cxx | 5 | ||||
-rw-r--r-- | sd/source/ui/view/outlnvsh.cxx | 4 |
4 files changed, 10 insertions, 8 deletions
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index baac52ee46e1..4e6d10ede19d 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -988,11 +988,11 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) { if( GetActiveWindow()->GetZoom() <= GetActiveWindow()->GetMinZoom() || GetDocSh()->IsUIActive() ) { - rSet.DisableItem( SID_ZOOM_IN ); + rSet.DisableItem( SID_ZOOM_OUT ); rSet.DisableItem( SID_ZOOM_PANNING ); } if( GetActiveWindow()->GetZoom() >= GetActiveWindow()->GetMaxZoom() || GetDocSh()->IsUIActive() ) - rSet.DisableItem( SID_ZOOM_OUT ); + rSet.DisableItem( SID_ZOOM_IN ); } if (!mpZoomList->IsNextPossible()) diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index ca4b46223954..ddac65d20231 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -1181,7 +1181,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) } break; - case SID_ZOOM_IN: // BASIC + case SID_ZOOM_OUT: // BASIC { mbZoomOnPage = false; SetZoom( std::max<::tools::Long>( GetActiveWindow()->GetZoom() / 2, GetActiveWindow()->GetMinZoom() ) ); @@ -1195,7 +1195,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) } break; - case SID_ZOOM_OUT: + case SID_ZOOM_IN: { mbZoomOnPage = false; SetZoom( std::min<::tools::Long>( GetActiveWindow()->GetZoom() * 2, GetActiveWindow()->GetMaxZoom() ) ); @@ -1203,6 +1203,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) GetActiveWindow()->GetOutputSizePixel()) ); mpZoomList->InsertZoomRect(aVisAreaWin); Invalidate( SID_ZOOM_IN ); + Invalidate(SID_ZOOM_OUT); Invalidate( SID_ZOOM_PANNING ); rReq.Done (); } diff --git a/sd/source/ui/view/outlnvs2.cxx b/sd/source/ui/view/outlnvs2.cxx index 4acabdf2dbf7..94e1d90e8656 100644 --- a/sd/source/ui/view/outlnvs2.cxx +++ b/sd/source/ui/view/outlnvs2.cxx @@ -125,7 +125,7 @@ void OutlineViewShell::FuTemporary(SfxRequest &rReq) break; } - case SID_ZOOM_OUT: + case SID_ZOOM_IN: { SetZoom( std::min<::tools::Long>( GetActiveWindow()->GetZoom() * 2, GetActiveWindow()->GetMaxZoom() ) ); ::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), @@ -133,6 +133,7 @@ void OutlineViewShell::FuTemporary(SfxRequest &rReq) mpZoomList->InsertZoomRect(aVisAreaWin); Invalidate( SID_ATTR_ZOOM ); Invalidate( SID_ZOOM_IN ); + Invalidate(SID_ZOOM_OUT); Invalidate( SID_ATTR_ZOOMSLIDER ); Cancel(); rReq.Done(); @@ -152,7 +153,7 @@ void OutlineViewShell::FuTemporary(SfxRequest &rReq) } break; - case SID_ZOOM_IN: + case SID_ZOOM_OUT: { SetZoom( std::max<::tools::Long>( GetActiveWindow()->GetZoom() / 2, GetActiveWindow()->GetMinZoom() ) ); ::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx index ce1cb0ceeee3..7bd920d931fc 100644 --- a/sd/source/ui/view/outlnvsh.cxx +++ b/sd/source/ui/view/outlnvsh.cxx @@ -736,9 +736,9 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet ) SfxItemState::DEFAULT == rSet.GetItemState( SID_ZOOM_OUT ) ) { if( GetActiveWindow()->GetZoom() <= GetActiveWindow()->GetMinZoom() || GetDocSh()->IsUIActive() ) - rSet.DisableItem( SID_ZOOM_IN ); - if( GetActiveWindow()->GetZoom() >= GetActiveWindow()->GetMaxZoom() || GetDocSh()->IsUIActive() ) rSet.DisableItem( SID_ZOOM_OUT ); + if( GetActiveWindow()->GetZoom() >= GetActiveWindow()->GetMaxZoom() || GetDocSh()->IsUIActive() ) + rSet.DisableItem( SID_ZOOM_IN ); } ::Outliner& rOutl = pOlView->GetOutliner(); |