summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2020-11-13 19:49:04 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-11-13 22:18:26 +0100
commitbbbcd382af9e60bd1c23205804740b8dae9272c3 (patch)
tree3a086ad5aaa7bf11f592bcc3551eaaa9bfd57825 /sc
parent64c93c950e191d8c6ee7cf138ff60d085c9486de (diff)
loplugin:toolslong
following: https://cgit.freedesktop.org/libreoffice/core/commit/?id=95b27dd2e5b5bdcb39962f72882dcdf406bcb393 author Jim Raykowski <raykowj@gmail.com> 2020-10-11 16:15:47 -0800 committer Jim Raykowski <raykowj@gmail.com> 2020-11-13 17:53:20 +0100 commit 95b27dd2e5b5bdcb39962f72882dcdf406bcb393 (patch) tree 84c49a7daadf1ce908a9f5608d40494af164917d parent d40f2d02df26e216f367b5da3f9546b73f250469 (diff) tdf#45705 rework zoom in and zoom out UI commands in Calc Similar to commit 2cddaa6e199ed8bb6185b7825791199f9da4a670 done for Writer view shell, this patch makes zoom in and zoom out commands functional for Calc view shell in addition to the preview shell. Change-Id: I1128d0990829015e21e352c2084a44849a37a7f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105806 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/tabvwsh3.cxx8
-rw-r--r--sc/source/ui/view/tabvwsha.cxx8
2 files changed, 8 insertions, 8 deletions
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index c2f496b3e2cd..72e6a72707ab 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -706,12 +706,12 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
// and can't be changed directly
const Fraction& rOldY = GetViewData().GetZoomY();
- long nOld = static_cast<long>(rOldY * 100);
- long nNew;
+ tools::Long nOld = tools::Long(rOldY * 100);
+ tools::Long nNew;
if (SID_ZOOM_OUT == nSlot)
- nNew = std::max(long(MINZOOM), basegfx::zoomtools::zoomOut(nOld));
+ nNew = std::max(tools::Long(MINZOOM), basegfx::zoomtools::zoomOut(nOld));
else
- nNew = std::min(long(MAXZOOM), basegfx::zoomtools::zoomIn(nOld));
+ nNew = std::min(tools::Long(MAXZOOM), basegfx::zoomtools::zoomIn(nOld));
if ( nNew != nOld)
{
bool bSyncZoom = SC_MOD()->GetAppOptions().GetSynchronizeZoom();
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index 8b6674dca3c9..4a6062fddff5 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -294,16 +294,16 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
case SID_ZOOM_IN:
{
const Fraction& rZoomY = GetViewData().GetZoomY();
- long nZoom = static_cast<long>(rZoomY * 100);
- if (nZoom >= long(MAXZOOM))
+ tools::Long nZoom = tools::Long(rZoomY * 100);
+ if (nZoom >= tools::Long(MAXZOOM))
rSet.DisableItem(nWhich);
}
break;
case SID_ZOOM_OUT:
{
const Fraction& rZoomY = GetViewData().GetZoomY();
- long nZoom = static_cast<long>(rZoomY * 100);
- if (nZoom <= long(MINZOOM))
+ tools::Long nZoom = tools::Long(rZoomY * 100);
+ if (nZoom <= tools::Long(MINZOOM))
rSet.DisableItem(nWhich);
}
break;