[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source

Henry Castro hcastro at collabora.com
Wed Dec 13 19:26:07 UTC 2017


 desktop/source/lib/init.cxx |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit e8400fb18cfc3f8f09ee1e13b4a6fd1eec11d9ba
Author: Henry Castro <hcastro at collabora.com>
Date:   Thu Dec 7 08:49:12 2017 -0400

    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 at libreoffice.org>
    Reviewed-by: Henry Castro <hcastro at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/46064
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jan Holesovsky <kendy at collabora.com>

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);


More information about the Libreoffice-commits mailing list