setup_native/source/win32/customactions/sellang/sellang.cxx |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 0794fb0edc85bf147e4d199e541efaad578e4b96
Author: Andras Timar <andras.ti...@collabora.com>
Date:   Thu Sep 8 10:36:52 2016 +0200

    tdf#92266 better language selection in Windows installer
    
    It won't select 'kok' when we have 'ko', 'sid' when we have
    'si', but language variants will fall back, e.g. en_ZW -> en.
    
    Change-Id: Ie417b6be664d5148829d2f7280e20653f84bc7a3
    Reviewed-on: https://gerrit.libreoffice.org/28744
    Reviewed-by: Andras Timar <andras.ti...@collabora.com>
    Tested-by: Andras Timar <andras.ti...@collabora.com>

diff --git a/setup_native/source/win32/customactions/sellang/sellang.cxx 
b/setup_native/source/win32/customactions/sellang/sellang.cxx
index f83b0ac..0d82244 100644
--- a/setup_native/source/win32/customactions/sellang/sellang.cxx
+++ b/setup_native/source/win32/customactions/sellang/sellang.cxx
@@ -185,8 +185,13 @@ static BOOL
 present_in_ui_langs(const char *lang)
 {
     for (int i = 0; i < num_ui_langs; i++)
-        if (memcmp (ui_langs[i], lang, std::min(strlen(ui_langs[i]), 
strlen(lang))) == 0)
+    {
+        if (strchr (lang, '_') != NULL)
+            if (memcmp (ui_langs[i], lang, std::min(strlen(ui_langs[i]), 
strlen(lang))) == 0)
+                return TRUE;
+        if (strcmp (ui_langs[i], lang) == 0)
             return TRUE;
+    }
     return FALSE;
 }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to