[Libreoffice-commits] core.git: svl/source

Stephan Bergmann sbergman at redhat.com
Tue Sep 19 06:35:38 UTC 2017


 svl/source/config/languageoptions.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 382c9174b38b96a7d890dd72ab00567a8b687e10
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Sep 19 08:33:07 2017 +0200

    Clean up the code by using LOWORD
    
    <https://msdn.microsoft.com/en-us/library/windows/desktop/
    ms646296(v=vs.85).aspx> documents:  "The low word contains a Language Identifier
    for the input language and the high word contains a device handle to the
    physical layout of the keyboard.
    
    Change-Id: I0b35e7a0f2bf5570dcf57cffe59ed2e2db361d2e

diff --git a/svl/source/config/languageoptions.cxx b/svl/source/config/languageoptions.cxx
index bb256d9f70f3..abc2c7630fb3 100644
--- a/svl/source/config/languageoptions.cxx
+++ b/svl/source/config/languageoptions.cxx
@@ -239,7 +239,7 @@ bool SvtSystemLanguageOptions::isKeyboardLayoutTypeInstalled(sal_Int16 scriptTyp
 
             for(int i = 0; i < nLayouts; ++i)
             {
-                LCID lang = MAKELCID((WORD)(reinterpret_cast<DWORD_PTR>(lpList[i]) & 0xffff), SORT_DEFAULT);
+                LCID lang = MAKELCID(LOWORD(lpList[i]), SORT_DEFAULT);
                 if (MsLangId::getScriptType(LanguageType(lang)) == scriptType)
                 {
                     isInstalled = true;


More information about the Libreoffice-commits mailing list