diff options
author | Eike Rathke <erack@redhat.com> | 2013-12-18 18:08:09 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-12-18 18:10:08 +0100 |
commit | cc54c08a66046c00af3713fbe5e69995ccb7f73b (patch) | |
tree | f9d3498f427d315013868b7964645cbc36fdb4a5 /include/i18nlangtag | |
parent | fab34eb54fffaaf1fc32a0901436d8940f6c8b43 (diff) |
resolved fdo#72778 keep setting system locale and LanguageTag in sync
Change-Id: I3547786bf77b8f611bc08d0e52c66ac00e199f13
Diffstat (limited to 'include/i18nlangtag')
-rw-r--r-- | include/i18nlangtag/languagetag.hxx | 3 | ||||
-rw-r--r-- | include/i18nlangtag/mslangid.hxx | 18 |
2 files changed, 20 insertions, 1 deletions
diff --git a/include/i18nlangtag/languagetag.hxx b/include/i18nlangtag/languagetag.hxx index 7e282bbd56c5..3c1a135fab5a 100644 --- a/include/i18nlangtag/languagetag.hxx +++ b/include/i18nlangtag/languagetag.hxx @@ -498,6 +498,9 @@ public: /** If nLang is a generated on-the-fly LangID */ static bool isOnTheFlyID( LanguageType nLang ); + /** @ATTENTION: _ONLY_ to be called by the application's configuration! */ + static void setConfiguredSystemLanguage( LanguageType nLang ); + typedef ::boost::shared_ptr< LanguageTagImpl > ImplPtr; private: diff --git a/include/i18nlangtag/mslangid.hxx b/include/i18nlangtag/mslangid.hxx index 36931e5aadf7..a30bb1d20cbc 100644 --- a/include/i18nlangtag/mslangid.hxx +++ b/include/i18nlangtag/mslangid.hxx @@ -172,7 +172,6 @@ public: /** @ATTENTION: these are _ONLY_ to be called by the application's configuration! */ - static void setConfiguredSystemLanguage( LanguageType nLang ); static void setConfiguredSystemUILanguage( LanguageType nLang ); static void setConfiguredWesternFallback( LanguageType nLang ); static void setConfiguredComplexFallback( LanguageType nLang ); @@ -180,6 +179,23 @@ public: // --------------------------------------------------------------------------- + /** Encapsulated methods that shall only be accessed through + class LanguageTag. + */ + class LanguageTagAccess + { + private: + + friend class LanguageTag; + + /** Configured system locale needs always be synchronized with + LanguageTag's system locale. + */ + I18NLANGTAG_DLLPRIVATE static void setConfiguredSystemLanguage( LanguageType nLang ); + }; + +// --------------------------------------------------------------------------- + struct LanguagetagMapping { OUString maBcp47; |