summaryrefslogtreecommitdiff
path: root/i18nlangtag
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2013-09-18 23:15:00 +0200
committerEike Rathke <erack@redhat.com>2013-09-18 23:16:07 +0200
commit0194900585b142d390ca7695c0730fdf37866f89 (patch)
tree79d717c9ba9e93b4c02a6cab3c367ed6e269eb9b /i18nlangtag
parent5bb3c27140c72b14c5832bf4ca171e026e4302a4 (diff)
impl getBcp47() always resolves system
Change-Id: Id052b5ed9ec47a2bf02b8707825fdcbbd64af186
Diffstat (limited to 'i18nlangtag')
-rw-r--r--i18nlangtag/source/languagetag/languagetag.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/i18nlangtag/source/languagetag/languagetag.cxx b/i18nlangtag/source/languagetag/languagetag.cxx
index 889c07950ee9..a366c7289820 100644
--- a/i18nlangtag/source/languagetag/languagetag.cxx
+++ b/i18nlangtag/source/languagetag/languagetag.cxx
@@ -238,7 +238,7 @@ private:
mutable bool mbCachedCountry : 1;
mutable bool mbCachedVariants : 1;
- const OUString & getBcp47( bool bResolveSystem = true ) const;
+ const OUString & getBcp47() const;
OUString getLanguage() const;
OUString getScript() const;
OUString getCountry() const;
@@ -645,7 +645,7 @@ bool LanguageTagImpl::canonicalize()
// Some methods calling canonicalize() (or not calling it due to
// meIsLiblangtagNeeded==DECISION_NO) rely on this! Hence do not set
// meIsLiblangtagNeeded anywhere else than hereafter.
- getBcp47( true );
+ getBcp47();
// The simple cases and known locales don't need liblangtag processing,
// which also avoids loading liblangtag data on startup.
@@ -1023,10 +1023,8 @@ void LanguageTag::convertFromRtlLocale()
}
-const OUString & LanguageTagImpl::getBcp47( bool bResolveSystem ) const
+const OUString & LanguageTagImpl::getBcp47() const
{
- if (!bResolveSystem && mbSystemLocale)
- return theEmptyBcp47::get();
if (!mbInitializedBcp47)
{
if (mbInitializedLocale)
@@ -1046,7 +1044,7 @@ const OUString & LanguageTag::getBcp47( bool bResolveSystem ) const
const_cast<LanguageTag*>(this)->syncFromImpl();
if (!mbInitializedBcp47)
{
- getImpl()->getBcp47( bResolveSystem);
+ getImpl()->getBcp47();
const_cast<LanguageTag*>(this)->syncFromImpl();
}
return maBcp47;