[Libreoffice-commits] core.git: setup_native/source
Mike Kaganski (via logerrit)
logerrit at kemper.freedesktop.org
Sun Jul 12 20:59:47 UTC 2020
setup_native/source/win32/customactions/sellang/sellang.cxx | 9 +++++++++
1 file changed, 9 insertions(+)
New commits:
commit 840db2a536938a8c6fa6018db48e4a6dd419db9b
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Sun Jul 12 22:56:27 2020 +0300
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Sun Jul 12 22:59:11 2020 +0200
Related: tdf#82184: consider installer language for UI list to install
If user has a language set as user locale, and installer is shown in that
language, it's likely that that language is needed for installation.
Change-Id: I37fb959291262b772ec8e1b35c687d64e0ee76a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98612
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/setup_native/source/win32/customactions/sellang/sellang.cxx b/setup_native/source/win32/customactions/sellang/sellang.cxx
index 3154e1190e41..35022ac7dd50 100644
--- a/setup_native/source/win32/customactions/sellang/sellang.cxx
+++ b/setup_native/source/win32/customactions/sellang/sellang.cxx
@@ -330,6 +330,15 @@ extern "C" __declspec(dllexport) UINT __stdcall SelectLanguage( MSIHANDLE handle
//TODO: are the above two explicit additions necessary, or will
// those values always be included in the below EnumUILanguages
// anyway?
+ if (GetMsiPropA(handle, "ProductLanguage", &pVal))
+ {
+ // This addition might refer to a language without an installed system language pack
+ // If the installer is run in this language, then this language is likely needed
+ long langid = strtol(pVal, nullptr, 10);
+ if (langid > 0xFFFF)
+ return TRUE;
+ add_ui_lang(langid_to_string(static_cast<LANGID>(langid)));
+ }
EnumUILanguagesA(enum_ui_lang_proc, 0, 0);
}
More information about the Libreoffice-commits
mailing list