From ea771e85b2302829394df545bb82c02bff2750c2 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 3 Feb 2022 19:59:25 +0000 Subject: Resolves: tdf#146997 use sal_Int64 instead of sal_Int32 for spinbutton values MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit for these cases where draw wants to massively scale the units the underlying "metric conversion" are already using sal_Int64 anyway Change-Id: I94e120d72644319548f75b2f68cfe60d4829a2e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129356 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- svx/source/dialog/optgrid.cxx | 8 ++++---- svx/source/sidebar/possize/PosSizePropertyPanel.cxx | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'svx') diff --git a/svx/source/dialog/optgrid.cxx b/svx/source/dialog/optgrid.cxx index b836a042c03d..06cedb798ca4 100644 --- a/svx/source/dialog/optgrid.cxx +++ b/svx/source/dialog/optgrid.cxx @@ -25,14 +25,14 @@ #include // local functions -static void lcl_GetMinMax(weld::MetricSpinButton const& rField, int& nMin, int& nMax) +static void lcl_GetMinMax(weld::MetricSpinButton const& rField, sal_Int64& nMin, sal_Int64& nMax) { rField.get_range(nMin, nMax, FieldUnit::TWIP); nMin = rField.denormalize(nMin); nMax = rField.denormalize(nMax); } -static void lcl_SetMinMax(weld::MetricSpinButton& rField, int nMin, int nMax) +static void lcl_SetMinMax(weld::MetricSpinButton& rField, sal_Int64 nMin, sal_Int64 nMax) { rField.set_range(rField.normalize(nMin), rField.normalize(nMax), FieldUnit::TWIP); } @@ -114,7 +114,7 @@ SvxGridTabPage::SvxGridTabPage(weld::Container* pPage, weld::DialogController* p // Set Metrics FieldUnit eFUnit = GetModuleFieldUnit( rCoreSet ); - int nMin, nMax; + sal_Int64 nMin, nMax; lcl_GetMinMax(*m_xMtrFldDrawX, nMin, nMax); SetFieldUnit( *m_xMtrFldDrawX, eFUnit, true ); @@ -223,7 +223,7 @@ void SvxGridTabPage::ActivatePage( const SfxItemSet& rSet ) return; // Set Metrics - int nMin, nMax; + sal_Int64 nMin, nMax; int nVal = m_xMtrFldDrawX->denormalize(m_xMtrFldDrawX->get_value(FieldUnit::TWIP)); lcl_GetMinMax(*m_xMtrFldDrawX, nMin, nMax); diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx index 8c211c853bce..5afedbf01868 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx @@ -429,8 +429,8 @@ IMPL_LINK_NOARG( PosSizePropertyPanel, ClickAutoHdl, weld::Toggleable&, void ) { if ( mxCbxScale->get_active() ) { - mlOldWidth = std::max(GetCoreValue(*mxMtrWidth, mePoolUnit), 1); - mlOldHeight = std::max(GetCoreValue(*mxMtrHeight, mePoolUnit), 1); + mlOldWidth = std::max(GetCoreValue(*mxMtrWidth, mePoolUnit), SAL_CONST_INT64(1)); + mlOldHeight = std::max(GetCoreValue(*mxMtrHeight, mePoolUnit), SAL_CONST_INT64(1)); } // mxCbxScale must synchronized with that on Position and Size tabpage on Shape Properties dialog -- cgit