From ac2a6ee9618e377806e529ed641f67e88684f7e7 Mon Sep 17 00:00:00 2001 From: Chris Sherlock Date: Mon, 13 Jun 2022 17:20:15 +1000 Subject: basegfx: zoomIn() and zoomOut() should be sal_uInt16 All zoom functions use sal_uInt16 values. For some reason, basegfx used long when zoomIn and zoomOut were created in 2012 (see commit 315d2ddc16: "optimized zoom to use more common intervals"), this then got mass converted to tools::Long in commit 387a88fa25: "use tools::Long in basegfx..chart2". So fix is to change zoomIn/Out() to use sal_uInt16. Change-Id: I2a56d6f58e14f77aeb8741d332fe9bc282eb969f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135715 Tested-by: Jenkins Reviewed-by: Thorsten Behrens --- sd/source/ui/view/viewshel.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sd/source/ui') diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx index 866b794611bb..c74a2b57e64d 100644 --- a/sd/source/ui/view/viewshel.cxx +++ b/sd/source/ui/view/viewshel.cxx @@ -717,14 +717,14 @@ bool ViewShell::HandleScrollCommand(const CommandEvent& rCEvt, ::sd::Window* pWi { if( !GetDocSh()->IsUIActive() ) { - const ::tools::Long nOldZoom = GetActiveWindow()->GetZoom(); - ::tools::Long nNewZoom; + const sal_uInt16 nOldZoom = GetActiveWindow()->GetZoom(); + sal_uInt16 nNewZoom; Point aOldMousePos = GetActiveWindow()->PixelToLogic(rCEvt.GetMousePosPixel()); if( pData->GetDelta() < 0 ) - nNewZoom = std::max<::tools::Long>( pWin->GetMinZoom(), basegfx::zoomtools::zoomOut( nOldZoom )); + nNewZoom = std::max( pWin->GetMinZoom(), basegfx::zoomtools::zoomOut( nOldZoom )); else - nNewZoom = std::min<::tools::Long>( pWin->GetMaxZoom(), basegfx::zoomtools::zoomIn( nOldZoom )); + nNewZoom = std::min( pWin->GetMaxZoom(), basegfx::zoomtools::zoomIn( nOldZoom )); SetZoom( nNewZoom ); // Keep mouse at same doc point before zoom -- cgit