[Libreoffice-commits] core.git: include/svl include/unotools jvmfwk/source svl/source
Noel Grandin
noel.grandin at collabora.co.uk
Thu Oct 26 09:44:03 UTC 2017
include/svl/filenotation.hxx | 2 +-
include/svl/itemiter.hxx | 2 +-
include/svl/lockfilecommon.hxx | 2 +-
include/svl/ownlist.hxx | 2 +-
include/svl/sharecontrolfile.hxx | 2 +-
include/svl/style.hxx | 2 +-
include/svl/zforlist.hxx | 8 ++++----
include/svl/zformat.hxx | 10 +++++-----
include/unotools/digitgroupingiterator.hxx | 2 +-
jvmfwk/source/fwkbase.cxx | 4 ++--
jvmfwk/source/fwkbase.hxx | 4 ++--
svl/source/items/style.cxx | 2 +-
svl/source/misc/filenotation.cxx | 2 +-
svl/source/misc/inethist.cxx | 4 ++--
svl/source/misc/lockfilecommon.cxx | 2 +-
svl/source/misc/ownlist.cxx | 2 +-
svl/source/numbers/zforfind.cxx | 20 ++++++++++----------
svl/source/numbers/zforfind.hxx | 20 ++++++++++----------
svl/source/numbers/zforlist.cxx | 10 +++++-----
svl/source/numbers/zformat.cxx | 8 ++++----
svl/source/numbers/zforscan.cxx | 20 ++++++++++----------
svl/source/numbers/zforscan.hxx | 22 +++++++++++-----------
22 files changed, 76 insertions(+), 76 deletions(-)
New commits:
commit b9fd0d1c42686fed09ec8781780a8ffc61198bcf
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Wed Oct 25 16:43:05 2017 +0200
loplugin:constmethod in svl
Change-Id: If92869e19c413e11f1f299a97f96b9637aaba65d
Reviewed-on: https://gerrit.libreoffice.org/43864
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/include/svl/filenotation.hxx b/include/svl/filenotation.hxx
index ff89fa462d4a..e5cf1c78a320 100644
--- a/include/svl/filenotation.hxx
+++ b/include/svl/filenotation.hxx
@@ -42,7 +42,7 @@ namespace svt
OFileNotation( const OUString& _rUrlOrPath );
OFileNotation( const OUString& _rUrlOrPath, NOTATION _eInputNotation );
- OUString get(NOTATION _eOutputNotation);
+ OUString get(NOTATION _eOutputNotation) const;
private:
SVL_DLLPRIVATE void construct( const OUString& _rUrlOrPath );
diff --git a/include/svl/itemiter.hxx b/include/svl/itemiter.hxx
index 30b6bd13d00d..aba136d2aa85 100644
--- a/include/svl/itemiter.hxx
+++ b/include/svl/itemiter.hxx
@@ -43,7 +43,7 @@ public:
m_nCurrent = m_nStart;
return m_rSet.m_nCount ? *(m_rSet.m_pItems + m_nCurrent) : nullptr;
}
- const SfxPoolItem* GetCurItem()
+ const SfxPoolItem* GetCurItem() const
{
return m_rSet.m_nCount ? *(m_rSet.m_pItems + m_nCurrent) : nullptr;
}
diff --git a/include/svl/lockfilecommon.hxx b/include/svl/lockfilecommon.hxx
index ce6c435ceef2..ee4674840029 100644
--- a/include/svl/lockfilecommon.hxx
+++ b/include/svl/lockfilecommon.hxx
@@ -49,7 +49,7 @@ protected:
::osl::Mutex m_aMutex;
OUString m_aURL;
- INetURLObject ResolveLinks( const INetURLObject& aDocURL );
+ INetURLObject ResolveLinks( const INetURLObject& aDocURL ) const;
public:
LockFileCommon( const OUString& aOrigURL, const OUString& aPrefix );
diff --git a/include/svl/ownlist.hxx b/include/svl/ownlist.hxx
index 6a29f993f62d..620b48078ac7 100644
--- a/include/svl/ownlist.hxx
+++ b/include/svl/ownlist.hxx
@@ -64,7 +64,7 @@ public:
void Append( const OUString & rCommand, const OUString & rArg );
void FillFromSequence( const css::uno::Sequence < css::beans::PropertyValue >& );
- void FillSequence( css::uno::Sequence < css::beans::PropertyValue >& );
+ void FillSequence( css::uno::Sequence < css::beans::PropertyValue >& ) const;
size_t size() const { return aCommandList.size(); }
diff --git a/include/svl/sharecontrolfile.hxx b/include/svl/sharecontrolfile.hxx
index ad899ac133ba..60f478651342 100644
--- a/include/svl/sharecontrolfile.hxx
+++ b/include/svl/sharecontrolfile.hxx
@@ -45,7 +45,7 @@ class SVL_DLLPUBLIC ShareControlFile : public LockFileCommon
std::vector< LockFileEntry > m_aUsersData;
void Close();
- bool IsValid()
+ bool IsValid() const
{
return ( m_xStream.is() && m_xInputStream.is() && m_xOutputStream.is() && m_xSeekable.is() && m_xTruncate.is() );
}
diff --git a/include/svl/style.hxx b/include/svl/style.hxx
index 1695c8fd3483..b23c4fee6e26 100644
--- a/include/svl/style.hxx
+++ b/include/svl/style.hxx
@@ -193,7 +193,7 @@ protected:
private:
- SVL_DLLPRIVATE bool IsTrivialSearch();
+ SVL_DLLPRIVATE bool IsTrivialSearch() const;
SfxStyleSheetBase* pAktStyle;
sal_uInt16 nAktPosition;
diff --git a/include/svl/zforlist.hxx b/include/svl/zforlist.hxx
index 20fb1d453652..0d82b6d6d4b4 100644
--- a/include/svl/zforlist.hxx
+++ b/include/svl/zforlist.hxx
@@ -589,11 +589,11 @@ public:
LanguageType eLnge, SvNumberformat* pFormat );
/// Return the reference date
- const Date& GetNullDate();
+ const Date& GetNullDate() const;
/// Return the standard decimal precision
- sal_uInt16 GetStandardPrec();
+ sal_uInt16 GetStandardPrec() const;
/// Return whether zero suppression is switched on
- bool GetNoZero();
+ bool GetNoZero() const;
/** Get the type of a format (or css::util::NumberFormat::UNDEFINED if no entry),
but with css::util::NumberFormat::DEFINED masked out */
short GetType(sal_uInt32 nFIndex);
@@ -902,7 +902,7 @@ private:
DECL_DLLPRIVATE_STATIC_LINK( SvNumberFormatter, CurrencyChangeLink, LinkParamNone*, void );
// return position of a special character
- sal_Int32 ImpPosToken ( const OUStringBuffer & sFormat, sal_Unicode token, sal_Int32 nStartPos = 0 );
+ sal_Int32 ImpPosToken ( const OUStringBuffer & sFormat, sal_Unicode token, sal_Int32 nStartPos = 0 ) const;
// Substitute a format during GetFormatEntry(), i.e. system formats.
SvNumberformat* ImpSubstituteEntry( SvNumberformat* pFormat, sal_uInt32 * o_pRealKey = nullptr );
diff --git a/include/svl/zformat.hxx b/include/svl/zformat.hxx
index a5ceeeac2e64..9f6305e807b3 100644
--- a/include/svl/zformat.hxx
+++ b/include/svl/zformat.hxx
@@ -468,7 +468,7 @@ public:
#endif
/// Whether it's a (YY)YY-M(M)-D(D) format.
- bool IsIso8601( sal_uInt16 nNumFor )
+ bool IsIso8601( sal_uInt16 nNumFor ) const
{
if ( nNumFor < 4 )
return ImpIsIso8601( NumFor[nNumFor]);
@@ -535,7 +535,7 @@ private:
// divide in substrings and color conditions
SVL_DLLPRIVATE short ImpNextSymbol( OUStringBuffer& rString,
sal_Int32& nPos,
- OUString& sSymbol );
+ OUString& sSymbol ) const;
// read string until ']' and strip blanks (after condition)
SVL_DLLPRIVATE static sal_Int32 ImpGetNumber( OUStringBuffer& rString,
@@ -585,11 +585,11 @@ private:
const LocaleType & aTmpLocale );
// standard number output
- SVL_DLLPRIVATE void ImpGetOutputStandard( double& fNumber, OUString& OutString );
- SVL_DLLPRIVATE void ImpGetOutputStandard( double& fNumber, OUStringBuffer& OutString );
+ SVL_DLLPRIVATE void ImpGetOutputStandard( double& fNumber, OUString& OutString ) const;
+ SVL_DLLPRIVATE void ImpGetOutputStandard( double& fNumber, OUStringBuffer& OutString ) const;
SVL_DLLPRIVATE void ImpGetOutputStdToPrecision( double& rNumber, OUString& rOutString, sal_uInt16 nPrecision ) const;
// numbers in input line
- SVL_DLLPRIVATE void ImpGetOutputInputLine( double fNumber, OUString& OutString );
+ SVL_DLLPRIVATE void ImpGetOutputInputLine( double fNumber, OUString& OutString ) const;
// check subcondition
// OP undefined => -1
diff --git a/include/unotools/digitgroupingiterator.hxx b/include/unotools/digitgroupingiterator.hxx
index 542925298d6c..7206f72f1374 100644
--- a/include/unotools/digitgroupingiterator.hxx
+++ b/include/unotools/digitgroupingiterator.hxx
@@ -148,7 +148,7 @@ public:
/** The next position (in integer digits) from the right where to insert a
group separator. */
- sal_Int32 getPos()
+ sal_Int32 getPos() const
{
return mnNextPos;
}
diff --git a/jvmfwk/source/fwkbase.cxx b/jvmfwk/source/fwkbase.cxx
index c48acac4cec7..b7044217edc1 100644
--- a/jvmfwk/source/fwkbase.cxx
+++ b/jvmfwk/source/fwkbase.cxx
@@ -116,7 +116,7 @@ VendorSettings::VendorSettings():
}
}
-VersionInfo VendorSettings::getVersionInformation(const OUString & sVendor)
+VersionInfo VendorSettings::getVersionInformation(const OUString & sVendor) const
{
OSL_ASSERT(!sVendor.isEmpty());
VersionInfo aVersionInfo;
@@ -198,7 +198,7 @@ VersionInfo VendorSettings::getVersionInformation(const OUString & sVendor)
return aVersionInfo;
}
-std::vector<OUString> VendorSettings::getSupportedVendors()
+std::vector<OUString> VendorSettings::getSupportedVendors() const
{
std::vector<OUString> vecVendors;
//get the nodeset for the vendor elements
diff --git a/jvmfwk/source/fwkbase.hxx b/jvmfwk/source/fwkbase.hxx
index e1f9edda354c..b3779cda96b6 100644
--- a/jvmfwk/source/fwkbase.hxx
+++ b/jvmfwk/source/fwkbase.hxx
@@ -34,9 +34,9 @@ class VendorSettings
public:
VendorSettings();
- VersionInfo getVersionInformation(const OUString & sVendor);
+ VersionInfo getVersionInformation(const OUString & sVendor) const;
- ::std::vector< OUString> getSupportedVendors();
+ ::std::vector< OUString> getSupportedVendors() const;
};
/* The class offers functions to retrieve verified bootstrap parameters.
diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx
index ec5de87916e8..281a4d8d8472 100644
--- a/svl/source/items/style.cxx
+++ b/svl/source/items/style.cxx
@@ -368,7 +368,7 @@ SfxStyleFamily SfxStyleSheetIterator::GetSearchFamily() const
return nSearchFamily;
}
-inline bool SfxStyleSheetIterator::IsTrivialSearch()
+inline bool SfxStyleSheetIterator::IsTrivialSearch() const
{
return (( nMask & SFXSTYLEBIT_ALL_VISIBLE ) == SFXSTYLEBIT_ALL_VISIBLE) &&
(GetSearchFamily() == SfxStyleFamily::All);
diff --git a/svl/source/misc/filenotation.cxx b/svl/source/misc/filenotation.cxx
index e99415de09a3..bc3f5ccf946c 100644
--- a/svl/source/misc/filenotation.cxx
+++ b/svl/source/misc/filenotation.cxx
@@ -105,7 +105,7 @@ namespace svt
OSL_ENSURE( bSuccess, "OFileNotation::OFileNotation: could not detect the format!" );
}
- OUString OFileNotation::get(NOTATION _eOutputNotation)
+ OUString OFileNotation::get(NOTATION _eOutputNotation) const
{
switch (_eOutputNotation)
{
diff --git a/svl/source/misc/inethist.cxx b/svl/source/misc/inethist.cxx
index 9dd95296c354..3c302e43447b 100644
--- a/svl/source/misc/inethist.cxx
+++ b/svl/source/misc/inethist.cxx
@@ -155,7 +155,7 @@ public:
/** putUrl/queryUrl.
*/
void putUrl (const OUString &rUrl);
- bool queryUrl (const OUString &rUrl);
+ bool queryUrl (const OUString &rUrl) const;
};
INetURLHistory_Impl::INetURLHistory_Impl()
@@ -272,7 +272,7 @@ void INetURLHistory_Impl::putUrl (const OUString &rUrl)
}
}
-bool INetURLHistory_Impl::queryUrl (const OUString &rUrl)
+bool INetURLHistory_Impl::queryUrl (const OUString &rUrl) const
{
sal_uInt32 h = crc32 (rUrl);
sal_uInt16 k = find (h);
diff --git a/svl/source/misc/lockfilecommon.cxx b/svl/source/misc/lockfilecommon.cxx
index 7949f7213cb0..6768b7b07f87 100644
--- a/svl/source/misc/lockfilecommon.cxx
+++ b/svl/source/misc/lockfilecommon.cxx
@@ -73,7 +73,7 @@ LockFileCommon::~LockFileCommon()
}
-INetURLObject LockFileCommon::ResolveLinks( const INetURLObject& aDocURL )
+INetURLObject LockFileCommon::ResolveLinks( const INetURLObject& aDocURL ) const
{
if ( aDocURL.HasError() )
throw lang::IllegalArgumentException();
diff --git a/svl/source/misc/ownlist.cxx b/svl/source/misc/ownlist.cxx
index 7d2b926ebe12..572bd39f7a8d 100644
--- a/svl/source/misc/ownlist.cxx
+++ b/svl/source/misc/ownlist.cxx
@@ -52,7 +52,7 @@ void SvCommandList::FillFromSequence( const css::uno::Sequence < css::beans::Pro
}
}
-void SvCommandList::FillSequence( css::uno::Sequence < css::beans::PropertyValue >& aCommandSequence )
+void SvCommandList::FillSequence( css::uno::Sequence < css::beans::PropertyValue >& aCommandSequence ) const
{
const sal_Int32 nCount = aCommandList.size();
aCommandSequence.realloc( nCount );
diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx
index c051dd5d9053..83c37af79c2e 100644
--- a/svl/source/numbers/zforfind.cxx
+++ b/svl/source/numbers/zforfind.cxx
@@ -289,7 +289,7 @@ bool ImpSvNumberInputScan::NextNumberStringSymbol( const sal_Unicode*& pStr,
// near SV_MAX_COUNT_INPUT_STRINGS, in NumberStringDivision().
bool ImpSvNumberInputScan::SkipThousands( const sal_Unicode*& pStr,
- OUString& rSymbol )
+ OUString& rSymbol ) const
{
bool res = false;
OUStringBuffer sBuff(rSymbol);
@@ -427,7 +427,7 @@ bool ImpSvNumberInputScan::StringPtrContainsImpl( const OUString& rWhat,
* Whether rString contains word rWhat at nPos
*/
bool ImpSvNumberInputScan::StringContainsWord( const OUString& rWhat,
- const OUString& rString, sal_Int32 nPos )
+ const OUString& rString, sal_Int32 nPos ) const
{
if (rWhat.isEmpty() || rString.getLength() < nPos + rWhat.getLength())
return false;
@@ -535,7 +535,7 @@ inline bool ImpSvNumberInputScan::SkipString( const OUString& rWhat,
*/
inline bool ImpSvNumberInputScan::GetThousandSep( const OUString& rString,
sal_Int32& nPos,
- sal_uInt16 nStringPos )
+ sal_uInt16 nStringPos ) const
{
const OUString& rSep = pFormatter->GetNumThousandSep();
// Is it an ordinary space instead of a no-break space?
@@ -574,7 +574,7 @@ inline bool ImpSvNumberInputScan::GetThousandSep( const OUString& rString,
* "false"=> -1:
* else => 0:
*/
-short ImpSvNumberInputScan::GetLogical( const OUString& rString )
+short ImpSvNumberInputScan::GetLogical( const OUString& rString ) const
{
short res;
@@ -784,7 +784,7 @@ bool ImpSvNumberInputScan::GetTimeAmPm( const OUString& rString, sal_Int32& nPos
* ',' => true
* else => false
*/
-inline bool ImpSvNumberInputScan::GetDecSep( const OUString& rString, sal_Int32& nPos )
+inline bool ImpSvNumberInputScan::GetDecSep( const OUString& rString, sal_Int32& nPos ) const
{
if ( rString.getLength() > nPos )
{
@@ -802,7 +802,7 @@ inline bool ImpSvNumberInputScan::GetDecSep( const OUString& rString, sal_Int32&
/**
* Reading a hundredth seconds separator
*/
-inline bool ImpSvNumberInputScan::GetTime100SecSep( const OUString& rString, sal_Int32& nPos )
+inline bool ImpSvNumberInputScan::GetTime100SecSep( const OUString& rString, sal_Int32& nPos ) const
{
if ( rString.getLength() > nPos )
{
@@ -888,7 +888,7 @@ short ImpSvNumberInputScan::GetESign( const OUString& rString, sal_Int32& nPos )
* i counts string portions, j counts numbers thereof.
* It should had been called SkipNumber instead.
*/
-inline bool ImpSvNumberInputScan::GetNextNumber( sal_uInt16& i, sal_uInt16& j )
+inline bool ImpSvNumberInputScan::GetNextNumber( sal_uInt16& i, sal_uInt16& j ) const
{
if ( i < nStringsCnt && IsNum[i] )
{
@@ -902,7 +902,7 @@ inline bool ImpSvNumberInputScan::GetNextNumber( sal_uInt16& i, sal_uInt16& j )
bool ImpSvNumberInputScan::GetTimeRef( double& fOutNumber,
sal_uInt16 nIndex, // j-value of the first numeric time part of input, default 0
- sal_uInt16 nCnt ) // count of numeric time parts
+ sal_uInt16 nCnt ) const // count of numeric time parts
{
bool bRet = true;
sal_uInt16 nHour;
@@ -961,7 +961,7 @@ bool ImpSvNumberInputScan::GetTimeRef( double& fOutNumber,
}
-sal_uInt16 ImpSvNumberInputScan::ImplGetDay( sal_uInt16 nIndex )
+sal_uInt16 ImpSvNumberInputScan::ImplGetDay( sal_uInt16 nIndex ) const
{
sal_uInt16 nRes = 0;
@@ -978,7 +978,7 @@ sal_uInt16 ImpSvNumberInputScan::ImplGetDay( sal_uInt16 nIndex )
}
-sal_uInt16 ImpSvNumberInputScan::ImplGetMonth( sal_uInt16 nIndex )
+sal_uInt16 ImpSvNumberInputScan::ImplGetMonth( sal_uInt16 nIndex ) const
{
// Preset invalid month number
sal_uInt16 nRes = pFormatter->GetCalendar()->getNumberOfMonthsInYear();
diff --git a/svl/source/numbers/zforfind.hxx b/svl/source/numbers/zforfind.hxx
index 8dff9a68c81e..c257eed70608 100644
--- a/svl/source/numbers/zforfind.hxx
+++ b/svl/source/numbers/zforfind.hxx
@@ -194,7 +194,7 @@ private:
// Concatenate ,000,23 blocks
// in input to 000123
- bool SkipThousands( const sal_Unicode*& pStr, OUString& rSymbol );
+ bool SkipThousands( const sal_Unicode*& pStr, OUString& rSymbol ) const;
// Divide numbers/strings into
// arrays and variables above.
@@ -208,7 +208,7 @@ private:
*/
bool StringContainsWord( const OUString& rWhat,
const OUString& rString,
- sal_Int32 nPos );
+ sal_Int32 nPos ) const;
// optimized substring versions
@@ -268,9 +268,9 @@ private:
// Recognizes exactly ,111 as group separator
inline bool GetThousandSep( const OUString& rString,
sal_Int32& nPos,
- sal_uInt16 nStringPos );
+ sal_uInt16 nStringPos ) const;
// Get boolean value
- short GetLogical( const OUString& rString );
+ short GetLogical( const OUString& rString ) const;
// Get month and advance string position
short GetMonth( const OUString& rString,
@@ -291,11 +291,11 @@ private:
// Get decimal separator and advance string position
inline bool GetDecSep( const OUString& rString,
- sal_Int32& nPos );
+ sal_Int32& nPos ) const;
// Get hundredth seconds separator and advance string position
inline bool GetTime100SecSep( const OUString& rString,
- sal_Int32& nPos );
+ sal_Int32& nPos ) const;
// Get sign and advance string position
// Including special case '('
@@ -308,7 +308,7 @@ private:
// Get next number as array offset
inline bool GetNextNumber( sal_uInt16& i,
- sal_uInt16& j );
+ sal_uInt16& j ) const;
/** Converts time -> double (only decimals)
@@ -316,9 +316,9 @@ private:
*/
bool GetTimeRef( double& fOutNumber, // result as double
sal_uInt16 nIndex, // Index of hour in input
- sal_uInt16 nCnt ); // Count of time substrings in input
- sal_uInt16 ImplGetDay ( sal_uInt16 nIndex ); // Day input, 0 if no match
- sal_uInt16 ImplGetMonth( sal_uInt16 nIndex ); // Month input, zero based return, NumberOfMonths if no match
+ sal_uInt16 nCnt ) const; // Count of time substrings in input
+ sal_uInt16 ImplGetDay ( sal_uInt16 nIndex ) const; // Day input, 0 if no match
+ sal_uInt16 ImplGetMonth( sal_uInt16 nIndex ) const; // Month input, zero based return, NumberOfMonths if no match
sal_uInt16 ImplGetYear ( sal_uInt16 nIndex ); // Year input, 0 if no match
// Conversion of date to number
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index 720070d869c6..94912797057c 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -175,7 +175,7 @@ public:
void Remove( SvNumberFormatter const * pThis );
- size_t Count()
+ size_t Count() const
{ return aFormatters.size(); }
virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, ConfigurationHints ) override;
@@ -395,7 +395,7 @@ void SvNumberFormatter::ChangeNullDate(sal_uInt16 nDay,
pStringScanner->ChangeNullDate(nDay, nMonth, nYear);
}
-const Date& SvNumberFormatter::GetNullDate()
+const Date& SvNumberFormatter::GetNullDate() const
{
return pFormatScanner->GetNullDate();
}
@@ -410,12 +410,12 @@ void SvNumberFormatter::SetNoZero(bool bNZ)
bNoZero = bNZ;
}
-sal_uInt16 SvNumberFormatter::GetStandardPrec()
+sal_uInt16 SvNumberFormatter::GetStandardPrec() const
{
return pFormatScanner->GetStandardPrec();
}
-bool SvNumberFormatter::GetNoZero()
+bool SvNumberFormatter::GetNoZero() const
{
return bNoZero;
}
@@ -2768,7 +2768,7 @@ void SvNumberFormatter::ImpGenerateAdditionalFormats( sal_uInt32 CLOffset,
}
-sal_Int32 SvNumberFormatter::ImpPosToken ( const OUStringBuffer & sFormat, sal_Unicode token, sal_Int32 nStartPos /* = 0*/ )
+sal_Int32 SvNumberFormatter::ImpPosToken ( const OUStringBuffer & sFormat, sal_Unicode token, sal_Int32 nStartPos /* = 0*/ ) const
{
sal_Int32 nLength = sFormat.getLength();
for ( sal_Int32 i=nStartPos; i<nLength && i>=0 ; i++ )
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 9d2700e6a185..34121edce041 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -1566,7 +1566,7 @@ static bool lcl_matchKeywordAndGetNumber( const OUString & rString, const sal_In
short SvNumberformat::ImpNextSymbol(OUStringBuffer& rString,
sal_Int32& nPos,
- OUString& sSymbol)
+ OUString& sSymbol) const
{
short eSymbolType = BRACKET_SYMBOLTYPE_FORMAT;
sal_Unicode cToken;
@@ -1967,14 +1967,14 @@ OUString SvNumberformat::StripNewCurrencyDelimiters( const OUString& rStr,
return aTmp;
}
-void SvNumberformat::ImpGetOutputStandard(double& fNumber, OUStringBuffer& rOutString)
+void SvNumberformat::ImpGetOutputStandard(double& fNumber, OUStringBuffer& rOutString) const
{
OUString sTemp;
ImpGetOutputStandard(fNumber, sTemp);
rOutString = sTemp;
}
-void SvNumberformat::ImpGetOutputStandard(double& fNumber, OUString& rOutString)
+void SvNumberformat::ImpGetOutputStandard(double& fNumber, OUString& rOutString) const
{
sal_uInt16 nStandardPrec = rScan.GetStandardPrec();
@@ -2012,7 +2012,7 @@ void SvNumberformat::ImpGetOutputStdToPrecision(double& rNumber, OUString& rOutS
rOutString = impTransliterate(rOutString, NumFor[0].GetNatNum());
}
-void SvNumberformat::ImpGetOutputInputLine(double fNumber, OUString& OutString)
+void SvNumberformat::ImpGetOutputInputLine(double fNumber, OUString& OutString) const
{
bool bModified = false;
if ( (eType & css::util::NumberFormat::PERCENT) && (fabs(fNumber) < D_MAX_D_BY_100))
diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index cbb71aa47733..e5e2b7dc83ff 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -585,7 +585,7 @@ Color* ImpSvNumberformatScan::GetColor(OUString& sStr)
return pResult;
}
-short ImpSvNumberformatScan::GetKeyWord( const OUString& sSymbol, sal_Int32 nPos )
+short ImpSvNumberformatScan::GetKeyWord( const OUString& sSymbol, sal_Int32 nPos ) const
{
OUString sString = pFormatter->GetCharClass()->uppercase( sSymbol, nPos, sSymbol.getLength() - nPos );
const NfKeywordTable & rKeyword = GetKeywords();
@@ -761,7 +761,7 @@ enum ScanState
short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr,
sal_Int32& nPos,
- OUString& sSymbol )
+ OUString& sSymbol ) const
{
InitKeywords();
const CharClass* pChrCls = pFormatter->GetCharClass();
@@ -1065,7 +1065,7 @@ sal_Int32 ImpSvNumberformatScan::Symbol_Division(const OUString& rString)
return 0; // 0 => ok
}
-void ImpSvNumberformatScan::SkipStrings(sal_uInt16& i, sal_Int32& nPos)
+void ImpSvNumberformatScan::SkipStrings(sal_uInt16& i, sal_Int32& nPos) const
{
while (i < nStringsCnt && ( nTypeArray[i] == NF_SYMBOLTYPE_STRING
|| nTypeArray[i] == NF_SYMBOLTYPE_BLANK
@@ -1076,7 +1076,7 @@ void ImpSvNumberformatScan::SkipStrings(sal_uInt16& i, sal_Int32& nPos)
}
}
-sal_uInt16 ImpSvNumberformatScan::PreviousKeyword(sal_uInt16 i)
+sal_uInt16 ImpSvNumberformatScan::PreviousKeyword(sal_uInt16 i) const
{
short res = 0;
if (i > 0 && i < nStringsCnt)
@@ -1094,7 +1094,7 @@ sal_uInt16 ImpSvNumberformatScan::PreviousKeyword(sal_uInt16 i)
return res;
}
-sal_uInt16 ImpSvNumberformatScan::NextKeyword(sal_uInt16 i)
+sal_uInt16 ImpSvNumberformatScan::NextKeyword(sal_uInt16 i) const
{
short res = 0;
if (i < nStringsCnt-1)
@@ -1112,7 +1112,7 @@ sal_uInt16 ImpSvNumberformatScan::NextKeyword(sal_uInt16 i)
return res;
}
-short ImpSvNumberformatScan::PreviousType( sal_uInt16 i )
+short ImpSvNumberformatScan::PreviousType( sal_uInt16 i ) const
{
if ( i > 0 && i < nStringsCnt )
{
@@ -1126,7 +1126,7 @@ short ImpSvNumberformatScan::PreviousType( sal_uInt16 i )
return 0;
}
-sal_Unicode ImpSvNumberformatScan::PreviousChar(sal_uInt16 i)
+sal_Unicode ImpSvNumberformatScan::PreviousChar(sal_uInt16 i) const
{
sal_Unicode res = ' ';
if (i > 0 && i < nStringsCnt)
@@ -1148,7 +1148,7 @@ sal_Unicode ImpSvNumberformatScan::PreviousChar(sal_uInt16 i)
return res;
}
-sal_Unicode ImpSvNumberformatScan::NextChar(sal_uInt16 i)
+sal_Unicode ImpSvNumberformatScan::NextChar(sal_uInt16 i) const
{
sal_Unicode res = ' ';
if (i < nStringsCnt-1)
@@ -1170,7 +1170,7 @@ sal_Unicode ImpSvNumberformatScan::NextChar(sal_uInt16 i)
return res;
}
-bool ImpSvNumberformatScan::IsLastBlankBeforeFrac(sal_uInt16 i)
+bool ImpSvNumberformatScan::IsLastBlankBeforeFrac(sal_uInt16 i) const
{
bool res = true;
if (i < nStringsCnt-1)
@@ -1224,7 +1224,7 @@ void ImpSvNumberformatScan::Reset()
nNatNumModifier = 0;
}
-bool ImpSvNumberformatScan::Is100SecZero( sal_uInt16 i, bool bHadDecSep )
+bool ImpSvNumberformatScan::Is100SecZero( sal_uInt16 i, bool bHadDecSep ) const
{
sal_uInt16 nIndexPre = PreviousKeyword( i );
return (nIndexPre == NF_KEY_S || nIndexPre == NF_KEY_SS) &&
diff --git a/svl/source/numbers/zforscan.hxx b/svl/source/numbers/zforscan.hxx
index ed3e15feb2db..77c16ab1db4c 100644
--- a/svl/source/numbers/zforscan.hxx
+++ b/svl/source/numbers/zforscan.hxx
@@ -209,31 +209,31 @@ private: // Private section
void SetDependentKeywords();
// Sets the language dependent keywords
- void SkipStrings(sal_uInt16& i, sal_Int32& nPos);// Skips StringSymbols
- sal_uInt16 PreviousKeyword(sal_uInt16 i); // Returns index of the preceding one
+ void SkipStrings(sal_uInt16& i, sal_Int32& nPos) const;// Skips StringSymbols
+ sal_uInt16 PreviousKeyword(sal_uInt16 i) const; // Returns index of the preceding one
// Keyword or 0
- sal_uInt16 NextKeyword(sal_uInt16 i); // Returns index of the next one
+ sal_uInt16 NextKeyword(sal_uInt16 i) const; // Returns index of the next one
// Keyword or 0
- sal_Unicode PreviousChar(sal_uInt16 i); // Returns last char before index skips EMPTY, STRING, STAR, BLANK
- sal_Unicode NextChar(sal_uInt16 i); // Returns first following char
- short PreviousType( sal_uInt16 i ); // Returns type before position skips EMPTY
- bool IsLastBlankBeforeFrac(sal_uInt16 i); // True <=> there won't be a ' ' until the '/'
+ sal_Unicode PreviousChar(sal_uInt16 i) const; // Returns last char before index skips EMPTY, STRING, STAR, BLANK
+ sal_Unicode NextChar(sal_uInt16 i) const; // Returns first following char
+ short PreviousType( sal_uInt16 i ) const; // Returns type before position skips EMPTY
+ bool IsLastBlankBeforeFrac(sal_uInt16 i) const; // True <=> there won't be a ' ' until the '/'
void Reset(); // Reset all variables before starting the analysis
short GetKeyWord( const OUString& sSymbol, // Determine keyword at nPos
- sal_Int32 nPos ); // Return 0 <=> not found
+ sal_Int32 nPos ) const; // Return 0 <=> not found
- bool IsAmbiguousE( short nKey ) // whether nKey is ambiguous E of NF_KEY_E/NF_KEY_EC
+ bool IsAmbiguousE( short nKey ) const // whether nKey is ambiguous E of NF_KEY_E/NF_KEY_EC
{
return (nKey == NF_KEY_EC || nKey == NF_KEY_E) &&
(GetKeywords()[NF_KEY_EC] == GetKeywords()[NF_KEY_E]);
}
// if 0 at strArray[i] is of S,00 or SS,00 or SS"any"00 in ScanType() or FinalScan()
- bool Is100SecZero( sal_uInt16 i, bool bHadDecSep );
+ bool Is100SecZero( sal_uInt16 i, bool bHadDecSep ) const;
short Next_Symbol(const OUString& rStr,
sal_Int32& nPos,
- OUString& sSymbol); // Next Symbol
+ OUString& sSymbol) const; // Next Symbol
sal_Int32 Symbol_Division(const OUString& rString);// Initial lexical scan
sal_Int32 ScanType(); // Analysis of the Format type
sal_Int32 FinalScan( OUString& rString ); // Final analysis with supplied type
More information about the Libreoffice-commits
mailing list