summaryrefslogtreecommitdiff
path: root/sw/source/uibase/inc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-02-03 19:59:25 +0000
committerCaolán McNamara <caolanm@redhat.com>2022-02-04 11:21:00 +0100
commitea771e85b2302829394df545bb82c02bff2750c2 (patch)
tree8ff097ea232a02968ee5e1312fb24b3d11507065 /sw/source/uibase/inc
parentf2d62b11cd7d47925fd098b3947726313d6b296e (diff)
Resolves: tdf#146997 use sal_Int64 instead of sal_Int32 for spinbutton values
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 <caolanm@redhat.com>
Diffstat (limited to 'sw/source/uibase/inc')
-rw-r--r--sw/source/uibase/inc/prcntfld.hxx38
1 files changed, 19 insertions, 19 deletions
diff --git a/sw/source/uibase/inc/prcntfld.hxx b/sw/source/uibase/inc/prcntfld.hxx
index bd39d2841b96..aabb04b8aa30 100644
--- a/sw/source/uibase/inc/prcntfld.hxx
+++ b/sw/source/uibase/inc/prcntfld.hxx
@@ -27,13 +27,13 @@ class SW_DLLPUBLIC SwPercentField
{
std::unique_ptr<weld::MetricSpinButton> m_pField;
- int nRefValue; // 100% value for conversion (in Twips)
- int nOldMax;
- int nOldMin;
+ sal_Int64 nRefValue; // 100% value for conversion (in Twips)
+ sal_Int64 nOldMax;
+ sal_Int64 nOldMin;
int nOldSpinSize;
int nOldPageSize;
- int nLastPercent;
- int nLastValue;
+ sal_Int64 nLastPercent;
+ sal_Int64 nLastValue;
sal_uInt16 nOldDigits;
FieldUnit eOldUnit;
bool bLockAutoCalculation; //prevent recalculation of percent values when the
@@ -55,26 +55,26 @@ public:
bool get_value_changed_from_saved() const { return m_pField->get_value_changed_from_saved(); }
void set_text(const OUString& rStr) { m_pField->set_text(rStr); }
void set_accessible_name(const OUString& rStr) { m_pField->set_accessible_name(rStr); }
- void SetMetricFieldMin(int nNewMin) { m_pField->set_min(nNewMin, FieldUnit::NONE); }
- void SetMetricFieldMax(int nNewMax) { m_pField->set_max(nNewMax, FieldUnit::NONE); }
- void SetMetricFieldRange(int nNewMin, int nNewMax) { m_pField->set_range(nNewMin, nNewMax, FieldUnit::NONE); }
- void GetMetricFieldRange(int &rOldMin, int& rOldMax) const { m_pField->get_range(rOldMin, rOldMax, FieldUnit::NONE); }
+ void SetMetricFieldMin(sal_Int64 nNewMin) { m_pField->set_min(nNewMin, FieldUnit::NONE); }
+ void SetMetricFieldMax(sal_Int64 nNewMax) { m_pField->set_max(nNewMax, FieldUnit::NONE); }
+ void SetMetricFieldRange(sal_Int64 nNewMin, sal_Int64 nNewMax) { m_pField->set_range(nNewMin, nNewMax, FieldUnit::NONE); }
+ void GetMetricFieldRange(sal_Int64 &rOldMin, sal_Int64& rOldMax) const { m_pField->get_range(rOldMin, rOldMax, FieldUnit::NONE); }
- void set_value(int nNewValue, FieldUnit eInUnit = FieldUnit::NONE);
- int get_value(FieldUnit eOutUnit = FieldUnit::NONE);
+ void set_value(sal_Int64 nNewValue, FieldUnit eInUnit = FieldUnit::NONE);
+ sal_Int64 get_value(FieldUnit eOutUnit = FieldUnit::NONE);
- void set_min(int nNewMin, FieldUnit eInUnit);
- void set_max(int nNewMax, FieldUnit eInUnit);
+ void set_min(sal_Int64 nNewMin, FieldUnit eInUnit);
+ void set_max(sal_Int64 nNewMax, FieldUnit eInUnit);
- int get_min(FieldUnit eOutUnit = FieldUnit::NONE) const { return m_pField->get_min(eOutUnit); }
+ sal_Int64 get_min(FieldUnit eOutUnit = FieldUnit::NONE) const { return m_pField->get_min(eOutUnit); }
- int NormalizePercent(int nValue);
- int DenormalizePercent(int nValue);
+ sal_Int64 NormalizePercent(sal_Int64 nValue);
+ sal_Int64 DenormalizePercent(sal_Int64 nValue);
- void SetRefValue(int nValue);
- int GetRealValue(FieldUnit eOutUnit);
+ void SetRefValue(sal_Int64 nValue);
+ sal_Int64 GetRealValue(FieldUnit eOutUnit);
- int Convert(int nValue, FieldUnit eInUnit, FieldUnit eOutUnit);
+ sal_Int64 Convert(sal_Int64 nValue, FieldUnit eInUnit, FieldUnit eOutUnit);
void ShowPercent(bool bPercent);