summaryrefslogtreecommitdiff
path: root/svl/source/config
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-10-14 16:46:54 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-10-15 07:59:32 +0000
commit6e64342d34f97db9dcb70426d44c0fb5efec4fc0 (patch)
tree8dff9a366d5915aa135e6ca57b53a23319a56be8 /svl/source/config
parent0deb7d16f32b4c89260f6aac29fc29f4e5bd8261 (diff)
clang-cl loplugin: svl
The DdeInternal::Cli/SrvCallback functions apparently had broken signatures for 64-bit Windows (32-bit DWORD vs. 64-bit ULONG_PTR parameters), but I assume that was actually harmless, as I think that, for Windows x86-64, those arguments are pushed on the stack right-to-left (regardless of CALLBACK), and they are the last arguments, and SrvCallback doesn't look at them at all, and CliCallback only looks at the lower 32-bit DWORD of the first one (nInfo1). Change-Id: Id77749dd2d29180e2d11b0ae2ad248ac1a7f1bdf Reviewed-on: https://gerrit.libreoffice.org/29848 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'svl/source/config')
-rw-r--r--svl/source/config/languageoptions.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/svl/source/config/languageoptions.cxx b/svl/source/config/languageoptions.cxx
index bee71bb4534e..8757244437f7 100644
--- a/svl/source/config/languageoptions.cxx
+++ b/svl/source/config/languageoptions.cxx
@@ -226,17 +226,17 @@ bool SvtSystemLanguageOptions::isKeyboardLayoutTypeInstalled(sal_Int16 scriptTyp
{
bool isInstalled = false;
#ifdef _WIN32
- int nLayouts = GetKeyboardLayoutList(0, NULL);
+ int nLayouts = GetKeyboardLayoutList(0, nullptr);
if (nLayouts > 0)
{
- HKL *lpList = (HKL*)LocalAlloc(LPTR, (nLayouts * sizeof(HKL)));
+ HKL *lpList = static_cast<HKL*>(LocalAlloc(LPTR, (nLayouts * sizeof(HKL))));
if (lpList)
{
nLayouts = GetKeyboardLayoutList(nLayouts, lpList);
for(int i = 0; i < nLayouts; ++i)
{
- LCID lang = MAKELCID((WORD)((DWORD_PTR)lpList[i] & 0xffff), SORT_DEFAULT);
+ LCID lang = MAKELCID((WORD)(reinterpret_cast<DWORD_PTR>(lpList[i]) & 0xffff), SORT_DEFAULT);
if (MsLangId::getScriptType(lang) == scriptType)
{
isInstalled = true;