From 07872404ccfc99324b81b17bb90f1dc624b234fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 13 Mar 2024 12:13:54 +0000 Subject: [PATCH] These methods can be const too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Iaef46216dac6584f57b7933d658384f54d0a4544 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164772 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- include/svl/zformat.hxx | 8 ++++---- svl/source/numbers/zformat.cxx | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/svl/zformat.hxx b/include/svl/zformat.hxx index 9b584ad5877d..b4d7ddb0ac29 100644 --- a/include/svl/zformat.hxx +++ b/include/svl/zformat.hxx @@ -638,7 +638,7 @@ private: sal_uInt16 j, sal_uInt16 nIx, sal_Int32 nDigCnt, - bool bAddDecSep = true ); + bool bAddDecSep = true ) const; // Helper function to fill in the group (AKA thousand) separators // or to skip additional digits @@ -647,14 +647,14 @@ private: sal_Int32& k, sal_uInt16 nIx, sal_Int32 & nDigitCount, - utl::DigitGroupingIterator & ); + utl::DigitGroupingIterator & ) const; SVL_DLLPRIVATE bool ImpDecimalFill( OUStringBuffer& sStr, double& rNumber, sal_Int32 nDecPos, sal_uInt16 j, sal_uInt16 nIx, - bool bInteger ); + bool bInteger ) const; /** Calculate each element of fraction: * integer part, numerator part, denominator part @@ -705,7 +705,7 @@ private: SVL_DLLPRIVATE bool ImpGetNumberOutput( double fNumber, sal_uInt16 nIx, - OUStringBuffer& OutString ); + OUStringBuffer& OutString ) const; SVL_DLLPRIVATE void ImpCopyNumberformat( const SvNumberformat& rFormat ); diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index 3948c5f70206..062f86fe4c59 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -4352,7 +4352,7 @@ bool SvNumberformat::ImpGetLogicalOutput(double fNumber, bool SvNumberformat::ImpGetNumberOutput(double fNumber, sal_uInt16 nIx, - OUStringBuffer& sStr) + OUStringBuffer& sStr) const { bool bRes = false; bool bSign; @@ -4470,7 +4470,7 @@ bool SvNumberformat::ImpDecimalFill( OUStringBuffer& sStr, // number string sal_Int32 nDecPos, // decimals start sal_uInt16 j, // symbol index within format code sal_uInt16 nIx, // subformat index - bool bInteger) // is integer + bool bInteger) const // is integer { bool bRes = false; bool bFilled = false; // Was filled? @@ -4592,7 +4592,7 @@ bool SvNumberformat::ImpNumberFillWithThousands( OUStringBuffer& sBuff, // numb sal_uInt16 j, // symbol index within format code sal_uInt16 nIx, // subformat index sal_Int32 nDigCnt, // count of integer digits in format - bool bAddDecSep) // add decimal separator if necessary + bool bAddDecSep) const // add decimal separator if necessary { bool bRes = false; sal_Int32 nLeadingStringChars = 0; // inserted StringChars before number @@ -4752,7 +4752,7 @@ void SvNumberformat::ImpDigitFill(OUStringBuffer& sStr, // number string sal_Int32 & k, // position within string sal_uInt16 nIx, // subformat index sal_Int32 & nDigitCount, // count of integer digits from the right so far - utl::DigitGroupingIterator & rGrouping ) // current grouping + utl::DigitGroupingIterator & rGrouping ) const // current grouping { if (NumFor[nIx].Info().bThousand) // Only if grouping fill in separators {