diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2022-06-13 17:20:15 +1000 |
---|---|---|
committer | Thorsten Behrens <thorsten.behrens@allotropia.de> | 2022-07-13 18:54:28 +0200 |
commit | ac2a6ee9618e377806e529ed641f67e88684f7e7 (patch) | |
tree | 1572db055b02358bba8e666d87ea418b66398206 /sd/source/ui | |
parent | d818c341206895a6dda1c19fc8b32f04b5b7c520 (diff) |
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 <thorsten.behrens@allotropia.de>
Diffstat (limited to 'sd/source/ui')
-rw-r--r-- | sd/source/ui/view/viewshel.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
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<sal_uInt16>( pWin->GetMinZoom(), basegfx::zoomtools::zoomOut( nOldZoom )); else - nNewZoom = std::min<::tools::Long>( pWin->GetMaxZoom(), basegfx::zoomtools::zoomIn( nOldZoom )); + nNewZoom = std::min<sal_uInt16>( pWin->GetMaxZoom(), basegfx::zoomtools::zoomIn( nOldZoom )); SetZoom( nNewZoom ); // Keep mouse at same doc point before zoom |