diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-10-01 13:01:58 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-10-01 20:58:11 +0200 |
commit | 581efdec36787dc5e378e54d13e7328fddcf3a50 (patch) | |
tree | 29f04e719f8402028a4e26088a8ea825ebe9fdca /i18npool | |
parent | e512b53ef8ae7945131876d32121fdbbdeb1de35 (diff) |
loplugin:constmethod
Change-Id: I3ed657c5c5e6840e38e3c8505505b4b372125df0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122910
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'i18npool')
-rw-r--r-- | i18npool/inc/cclass_unicode.hxx | 2 | ||||
-rw-r--r-- | i18npool/inc/characterclassificationImpl.hxx | 8 | ||||
-rw-r--r-- | i18npool/inc/indexentrysupplier_common.hxx | 2 | ||||
-rw-r--r-- | i18npool/inc/transliteration_Numeric.hxx | 2 | ||||
-rw-r--r-- | i18npool/inc/xdictionary.hxx | 6 | ||||
-rw-r--r-- | i18npool/source/breakiterator/xdictionary.cxx | 6 | ||||
-rw-r--r-- | i18npool/source/characterclassification/cclass_unicode_parser.cxx | 2 | ||||
-rw-r--r-- | i18npool/source/indexentry/indexentrysupplier_common.cxx | 2 | ||||
-rw-r--r-- | i18npool/source/localedata/localedata.cxx | 2 | ||||
-rw-r--r-- | i18npool/source/search/levdis.hxx | 2 | ||||
-rw-r--r-- | i18npool/source/transliteration/transliteration_Numeric.cxx | 2 |
11 files changed, 18 insertions, 18 deletions
diff --git a/i18npool/inc/cclass_unicode.hxx b/i18npool/inc/cclass_unicode.hxx index 704deabc46b5..b08170638de8 100644 --- a/i18npool/inc/cclass_unicode.hxx +++ b/i18npool/inc/cclass_unicode.hxx @@ -147,7 +147,7 @@ private: ParserFlags getFlags(sal_uInt32 c); /// Access parser flags via International and special definitions. - ParserFlags getFlagsExtended(sal_uInt32 c); + ParserFlags getFlagsExtended(sal_uInt32 c) const; /// Access parser table flags for user defined start characters. ParserFlags getStartCharsFlags( sal_uInt32 c ); diff --git a/i18npool/inc/characterclassificationImpl.hxx b/i18npool/inc/characterclassificationImpl.hxx index 4e03a54fd3be..9fc342d3949b 100644 --- a/i18npool/inc/characterclassificationImpl.hxx +++ b/i18npool/inc/characterclassificationImpl.hxx @@ -76,10 +76,10 @@ private: css::lang::Locale aLocale; OUString aName; css::uno::Reference < XCharacterClassification > xCI; - bool equals(const css::lang::Locale& rLocale) { - return aLocale.Language == rLocale.Language && - aLocale.Country == rLocale.Country && - aLocale.Variant == rLocale.Variant; + bool equals(const css::lang::Locale& rLocale) const { + return aLocale.Language == rLocale.Language && + aLocale.Country == rLocale.Country && + aLocale.Variant == rLocale.Variant; }; }; std::vector<lookupTableItem> lookupTable; diff --git a/i18npool/inc/indexentrysupplier_common.hxx b/i18npool/inc/indexentrysupplier_common.hxx index 72685fda9aa2..f728e4230500 100644 --- a/i18npool/inc/indexentrysupplier_common.hxx +++ b/i18npool/inc/indexentrysupplier_common.hxx @@ -87,7 +87,7 @@ protected: /// @throws css::uno::RuntimeException const OUString& getEntry( const OUString& IndexEntry, - const OUString& PhoneticEntry, const css::lang::Locale& rLocale ); + const OUString& PhoneticEntry, const css::lang::Locale& rLocale ) const; }; } diff --git a/i18npool/inc/transliteration_Numeric.hxx b/i18npool/inc/transliteration_Numeric.hxx index 1e50e4a5d69c..10dc5f662afb 100644 --- a/i18npool/inc/transliteration_Numeric.hxx +++ b/i18npool/inc/transliteration_Numeric.hxx @@ -51,7 +51,7 @@ private: /// @throws css::uno::RuntimeException OUString transliterateBullet( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, - css::uno::Sequence< sal_Int32 >* pOffset ); + css::uno::Sequence< sal_Int32 >* pOffset ) const; }; } diff --git a/i18npool/inc/xdictionary.hxx b/i18npool/inc/xdictionary.hxx index 6d6e20f10240..664e88a4fa48 100644 --- a/i18npool/inc/xdictionary.hxx +++ b/i18npool/inc/xdictionary.hxx @@ -36,7 +36,7 @@ struct WordBreakCache { sal_Int32 size; // size of wordboundary WordBreakCache(); - bool equals(const sal_Unicode *str, css::i18n::Boundary const & boundary); // checking cached string + bool equals(const sal_Unicode *str, css::i18n::Boundary const & boundary) const; // checking cached string }; struct xdictionarydata @@ -80,8 +80,8 @@ private: bool seekSegment(const OUString& rText, sal_Int32 pos, css::i18n::Boundary& boundary); WordBreakCache& getCache(const sal_Unicode *text, css::i18n::Boundary const & boundary); - bool exists(const sal_uInt32 u); - sal_Int32 getLongestMatch(const sal_Unicode *text, sal_Int32 len); + bool exists(const sal_uInt32 u) const; + sal_Int32 getLongestMatch(const sal_Unicode *text, sal_Int32 len) const; }; } diff --git a/i18npool/source/breakiterator/xdictionary.cxx b/i18npool/source/breakiterator/xdictionary.cxx index 86a703db0440..9134fbc4be13 100644 --- a/i18npool/source/breakiterator/xdictionary.cxx +++ b/i18npool/source/breakiterator/xdictionary.cxx @@ -195,7 +195,7 @@ void xdictionary::setJapaneseWordBreak() japaneseWordBreak = true; } -bool xdictionary::exists(const sal_uInt32 c) +bool xdictionary::exists(const sal_uInt32 c) const { // 0x1FFF is the hardcoded limit in gendict for data.existMarks bool exist = data.existMark && (c>>3) < 0x1FFF && (data.existMark[c>>3] & (1<<(c&0x07))) != 0; @@ -205,7 +205,7 @@ bool xdictionary::exists(const sal_uInt32 c) return exist; } -sal_Int32 xdictionary::getLongestMatch(const sal_Unicode* str, sal_Int32 sLen) +sal_Int32 xdictionary::getLongestMatch(const sal_Unicode* str, sal_Int32 sLen) const { if ( !data.index1 ) return 0; @@ -252,7 +252,7 @@ WordBreakCache::WordBreakCache() : * Compare two unicode string, */ -bool WordBreakCache::equals(const sal_Unicode* str, Boundary const & boundary) +bool WordBreakCache::equals(const sal_Unicode* str, Boundary const & boundary) const { // Different length, different string. if (length != boundary.endPos - boundary.startPos) return false; diff --git a/i18npool/source/characterclassification/cclass_unicode_parser.cxx b/i18npool/source/characterclassification/cclass_unicode_parser.cxx index 5b7fb25fe47d..c5637e8ae876 100644 --- a/i18npool/source/characterclassification/cclass_unicode_parser.cxx +++ b/i18npool/source/characterclassification/cclass_unicode_parser.cxx @@ -593,7 +593,7 @@ ParserFlags cclass_Unicode::getFlags(sal_uInt32 const c) } -ParserFlags cclass_Unicode::getFlagsExtended(sal_uInt32 const c) +ParserFlags cclass_Unicode::getFlagsExtended(sal_uInt32 const c) const { if ( c == cGroupSep ) return ParserFlags::VALUE; diff --git a/i18npool/source/indexentry/indexentrysupplier_common.cxx b/i18npool/source/indexentry/indexentrysupplier_common.cxx index b7c08a0ed82a..0a078f01d323 100644 --- a/i18npool/source/indexentry/indexentrysupplier_common.cxx +++ b/i18npool/source/indexentry/indexentrysupplier_common.cxx @@ -100,7 +100,7 @@ OUString SAL_CALL IndexEntrySupplier_Common::getIndexFollowPageWord( sal_Bool, const OUString& IndexEntrySupplier_Common::getEntry( const OUString& IndexEntry, - const OUString& PhoneticEntry, const lang::Locale& rLocale ) + const OUString& PhoneticEntry, const lang::Locale& rLocale ) const { // The condition for using phonetic entry is: // usePhonetic is set for the algorithm; diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx index 33da5647adc3..3dc113fe7eed 100644 --- a/i18npool/source/localedata/localedata.cxx +++ b/i18npool/source/localedata/localedata.cxx @@ -357,7 +357,7 @@ struct LocaleDataLookupTableItem LocaleDataLookupTableItem(const char *name, osl::Module* m, const char* lname) : dllName(name), module(m), localeName(lname) { } - bool equals(const css::lang::Locale& rLocale) + bool equals(const css::lang::Locale& rLocale) const { return (rLocale == aLocale); } diff --git a/i18npool/source/search/levdis.hxx b/i18npool/source/search/levdis.hxx index 1dc570d39c21..c58fba842ef0 100644 --- a/i18npool/source/search/levdis.hxx +++ b/i18npool/source/search/levdis.hxx @@ -178,7 +178,7 @@ public: // c == cpPattern[jj] == cString[ii] // First seek up to found place, if the balance is still equal there then // also compare after the found place. - int levdisbalance(sal_Int32 jj, sal_Int32 ii, sal_Unicode c, const sal_Unicode* cString, sal_Int32 nStringLen) + int levdisbalance(sal_Int32 jj, sal_Int32 ii, sal_Unicode c, const sal_Unicode* cString, sal_Int32 nStringLen) const { int nBalance = 0; diff --git a/i18npool/source/transliteration/transliteration_Numeric.cxx b/i18npool/source/transliteration/transliteration_Numeric.cxx index 35b2b2549b34..22b3769068f5 100644 --- a/i18npool/source/transliteration/transliteration_Numeric.cxx +++ b/i18npool/source/transliteration/transliteration_Numeric.cxx @@ -59,7 +59,7 @@ Sequence< OUString > SAL_CALL OUString transliteration_Numeric::transliterateBullet( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, - Sequence< sal_Int32 >* pOffset ) + Sequence< sal_Int32 >* pOffset ) const { sal_Int32 number = -1, j = 0, endPos = startPos + nCount; |