summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2017-12-07 08:49:12 -0400
committerJan Holesovsky <kendy@collabora.com>2017-12-13 20:24:26 +0100
commite8400fb18cfc3f8f09ee1e13b4a6fd1eec11d9ba (patch)
tree54639fe3921ff4978a5e9c4fccf83a7fa74ad19b /desktop
parentd895dc24654b6dd356dbdf16c8b3e3bd4878e33d (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> Reviewed-on: https://gerrit.libreoffice.org/46064 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
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 d6f8d8646f8f..e169c768e430 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2612,10 +2612,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);