summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2017-12-07 08:49:12 -0400
committerAndras Timar <andras.timar@collabora.com>2018-03-19 14:56:10 +0100
commitdafb3855306dd86480d029bfc9eb81efe036721a (patch)
tree890698199ddc561defcc96663a0186efc30804b6 /desktop
parent9db03f5fdc322dbffe8b2b22cd0244bf41d78d4a (diff)
lok: discard name languages not registered
there is a STR_ARR_SVT_LANGUAGE_TABLE table that all language names are registered But not all, like locale "es" { LANGUAGE_SPANISH_LATIN_AMERICA, "es", "" , k0 } Avoid that names until get registered appropriately Change-Id: I148f2c30f72c82c978f5e9a1e977bf4b5e923a9c Reviewed-on: https://gerrit.libreoffice.org/46027 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Henry Castro <hcastro@collabora.com> (cherry picked from commit 45a27e55d418422cf61ea3d4eed8eb5a6e309c90)
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/lib/init.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 94afb956ebc7..2ea79a076e9a 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2582,10 +2582,15 @@ static char* getLanguages(const char* pCommand)
boost::property_tree::ptree aTree;
aTree.put("commandName", pCommand);
boost::property_tree::ptree aValues;
+ boost::property_tree::ptree aChild;
+ OUString sLanguage;
for ( sal_Int32 itLocale = 0; itLocale < aLocales.getLength(); itLocale++ )
{
- boost::property_tree::ptree aChild;
- aChild.put("", SvtLanguageTable::GetLanguageString(LanguageTag::convertToLanguageType(aLocales[itLocale])).toUtf8());
+ sLanguage = SvtLanguageTable::GetLanguageString(LanguageTag::convertToLanguageType(aLocales[itLocale]));
+ if (sLanguage.startsWith("{") && sLanguage.endsWith("}"))
+ continue;
+
+ aChild.put("", sLanguage.toUtf8());
aValues.push_back(std::make_pair("", aChild));
}
aTree.add_child("commandValues", aValues);