summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-07-14 12:45:07 +0200
committerStephan Bergmann <sbergman@redhat.com>2022-07-14 16:18:21 +0200
commit95706c680c509016b8cd60c026d820c7d4575a12 (patch)
treef0513588697006196acf48ee98aede4909c72dcb /sc
parent8c15ccc2671d93b06c00730d03b441f3466984d4 (diff)
Drop some needless casts
...that were present ever since the surrounding code was added in 95b27dd2e5b5bdcb39962f72882dcdf406bcb393 "tdf#45705 rework zoom in and zoom out UI commands in Calc", but for no apparent reason (when MAXZOOM and MINZOOM were macros expanding to unadorned int literals). But even after ac2a6ee9618e377806e529ed641f67e88684f7e7 "basegfx: zoomIn() and zoomOut() should be sal_uInt16" changed MAXZOOM and MINZOOM to be constants of type sal_uInt16, contemporary compilers are unlikely to emit warnings for these nominally signed-vs.-unsigned comparisons. Change-Id: If4481a2e539632dbdca2ce4b13aab63fb84225b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137075 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/tabvwsha.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index 67cd905341f0..dc389eb70723 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -306,7 +306,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
{
const Fraction& rZoomY = GetViewData().GetZoomY();
tools::Long nZoom = tools::Long(rZoomY * 100);
- if (nZoom >= tools::Long(MAXZOOM))
+ if (nZoom >= MAXZOOM)
rSet.DisableItem(nWhich);
}
break;
@@ -314,7 +314,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
{
const Fraction& rZoomY = GetViewData().GetZoomY();
tools::Long nZoom = tools::Long(rZoomY * 100);
- if (nZoom <= tools::Long(MINZOOM))
+ if (nZoom <= MINZOOM)
rSet.DisableItem(nWhich);
}
break;