diff options
-rw-r--r-- | i18nlangtag/source/languagetag/languagetag.cxx | 6 | ||||
-rw-r--r-- | include/i18nlangtag/languagetag.hxx | 13 | ||||
-rw-r--r-- | svl/source/numbers/zforlist.cxx | 2 |
3 files changed, 9 insertions, 12 deletions
diff --git a/i18nlangtag/source/languagetag/languagetag.cxx b/i18nlangtag/source/languagetag/languagetag.cxx index dc8708b3cd24..e8df2a4a1593 100644 --- a/i18nlangtag/source/languagetag/languagetag.cxx +++ b/i18nlangtag/source/languagetag/languagetag.cxx @@ -2268,15 +2268,15 @@ LanguageTag & LanguageTag::makeFallback() } -bool LanguageTag::equals( const LanguageTag & rLanguageTag, bool bResolveSystem ) const +bool LanguageTag::equals( const LanguageTag & rLanguageTag ) const { // If SYSTEM is not to be resolved or either both are SYSTEM or none, we // can use the operator==() optimization. - if (!bResolveSystem || isSystemLocale() == rLanguageTag.isSystemLocale()) + if (isSystemLocale() == rLanguageTag.isSystemLocale()) return operator==( rLanguageTag); // Compare full language tag strings. - return getBcp47( bResolveSystem) == rLanguageTag.getBcp47( bResolveSystem); + return getBcp47() == rLanguageTag.getBcp47(); } diff --git a/include/i18nlangtag/languagetag.hxx b/include/i18nlangtag/languagetag.hxx index 2bbf0331d86f..f494d78bfb25 100644 --- a/include/i18nlangtag/languagetag.hxx +++ b/include/i18nlangtag/languagetag.hxx @@ -361,19 +361,16 @@ public: /** Test equality of two LanguageTag, possibly resolving system locale. - @param bResolveSystem - If TRUE, resolve empty language tags denoting the system - locale to the real locale used before comparing. - If FALSE, the behavior is identical to operator==(), system - locales are not resolved first. + Resolve empty language tags denoting the system + locale to the real locale used before comparing. */ - bool equals( const LanguageTag & rLanguageTag, bool bResolveSystem = false ) const; + bool equals( const LanguageTag & rLanguageTag ) const; /** Test equality of two LanguageTag. Does NOT resolve system, i.e. if the system locale is en-US LanguageTag("")==LanguageTag("en-US") returns false! Use - equals(...,true) instead if system locales shall be resolved. + equals(...) instead if system locales shall be resolved. */ bool operator==( const LanguageTag & rLanguageTag ) const; @@ -381,7 +378,7 @@ public: Does NOT resolve system, i.e. if the system locale is en-US LanguageTag("")!=LanguageTag("en-US") returns true! Use - !equals(,...true) instead if system locales shall be resolved. + !equals(,..) instead if system locales shall be resolved. */ bool operator!=( const LanguageTag & rLanguageTag ) const; diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index 70a013aea6d7..e7fcccc6f909 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -954,7 +954,7 @@ sal_uInt32 SvNumberFormatter::ImpGenerateCL( LanguageType eLnge ) if (LocaleDataWrapper::areChecksEnabled()) { const LanguageTag& rLoadedLocale = xLocaleData->getLoadedLanguageTag(); - if ( !rLoadedLocale.equals( maLanguageTag, true) ) + if ( !rLoadedLocale.equals( maLanguageTag ) ) { OUString aMsg("SvNumberFormatter::ImpGenerateCL: locales don't match:"); LocaleDataWrapper::outputCheckMessage( xLocaleData->appendLocaleInfo( aMsg )); |