summaryrefslogtreecommitdiff
path: root/sd/source/ui
diff options
context:
space:
mode:
authorJim Raykowski <raykowj@gmail.com>2021-05-27 19:21:11 -0800
committerJim Raykowski <raykowj@gmail.com>2021-06-07 08:51:02 +0200
commitec629c5ee22d02f99d66a5cf975ce239876b7f4d (patch)
treeed83864367da9323ced378cc9c6363d3c901345a /sd/source/ui
parent7f059ce157da0de40a98f63f61d923cc67d93884 (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>
Diffstat (limited to 'sd/source/ui')
-rw-r--r--sd/source/ui/view/drviews7.cxx4
-rw-r--r--sd/source/ui/view/drviewse.cxx5
-rw-r--r--sd/source/ui/view/outlnvs2.cxx5
-rw-r--r--sd/source/ui/view/outlnvsh.cxx4
4 files changed, 10 insertions, 8 deletions
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index 6e695b1d4f06..141910870d63 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -985,11 +985,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 2247294cfaba..9fb69869a0da 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -1179,7 +1179,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() ) );
@@ -1193,7 +1193,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() ) );
@@ -1201,6 +1201,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 5e9caef9e395..a1b2c9382663 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 b18a0460b4e9..ed810ca0f4fe 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -738,9 +738,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();