diff options
author | Eike Rathke <erack@redhat.com> | 2019-09-02 14:03:33 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2019-09-02 15:38:46 +0200 |
commit | 8346af902491ef3c77ec614ce6c26782f4f37712 (patch) | |
tree | ff04da5986fb9b9dfc1f7bd039a5e9047d88f96c | |
parent | ed5e44054c4c5c0fd7d9555dba777df250b7f301 (diff) |
Unnecessary to convert Locale to LanguageTag twice
Change-Id: Ie2de1a8c5555ac1f8a46cacd052efc1a03e6f2ac
Reviewed-on: https://gerrit.libreoffice.org/78395
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
-rw-r--r-- | desktop/source/lib/init.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index b9af5f7f9962..d26bfaa896cb 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3873,11 +3873,12 @@ static char* getLanguages(const char* pCommand) OUString sLanguage; for ( sal_Int32 itLocale = 0; itLocale < aLocales.getLength(); itLocale++ ) { - sLanguage = SvtLanguageTable::GetLanguageString(LanguageTag::convertToLanguageType(aLocales[itLocale])); + const LanguageTag aLanguageTag( aLocales[itLocale]); + sLanguage = SvtLanguageTable::GetLanguageString(aLanguageTag.getLanguageType()); if (sLanguage.startsWith("{") && sLanguage.endsWith("}")) continue; - sLanguage += ";" + LanguageTag(aLocales[itLocale]).getBcp47(false); + sLanguage += ";" + aLanguageTag.getBcp47(false); aChild.put("", sLanguage.toUtf8()); aValues.push_back(std::make_pair("", aChild)); } |