diff options
-rw-r--r-- | i18nlangtag/source/languagetag/languagetag.cxx | 12 | ||||
-rw-r--r-- | include/i18nlangtag/languagetag.hxx | 6 |
2 files changed, 18 insertions, 0 deletions
diff --git a/i18nlangtag/source/languagetag/languagetag.cxx b/i18nlangtag/source/languagetag/languagetag.cxx index 5779397f3309..99611f17a8d1 100644 --- a/i18nlangtag/source/languagetag/languagetag.cxx +++ b/i18nlangtag/source/languagetag/languagetag.cxx @@ -487,6 +487,18 @@ LanguageTag::LanguageTag( LanguageType nLanguage ) } +LanguageTag::LanguageTag() + : + mnLangID( LANGUAGE_DONTKNOW), + mbSystemLocale( false), + mbInitializedBcp47( false), + mbInitializedLocale( false), + mbInitializedLangID( false), + mbIsFallback( false) +{ +} + + LanguageTag::LanguageTag( const OUString& rBcp47, const OUString& rLanguage, const OUString& rScript, const OUString& rCountry ) : diff --git a/include/i18nlangtag/languagetag.hxx b/include/i18nlangtag/languagetag.hxx index c8ee7177603a..f8f9ae87bcbd 100644 --- a/include/i18nlangtag/languagetag.hxx +++ b/include/i18nlangtag/languagetag.hxx @@ -76,6 +76,12 @@ public: /** Init LanguageTag with LanguageType MS-LangID. */ explicit LanguageTag( LanguageType nLanguage ); + /** Default ctor, init LanguageTag with LanguageType LANGUAGE_DONTKNOW. + + To be able to use LanguageTag in maps etc., avoid otherwise. + */ + explicit LanguageTag(); + /** Init LanguageTag with either BCP 47 language tag (precedence if not empty), or a combination of language, script and country. |