imm32: dwIndex flags are mutually exclusive.
This commit is contained in:
parent
5d530fee54
commit
4ae16e37ee
|
@ -2130,6 +2130,13 @@ BOOL WINAPI ImmSetCompositionStringA(
|
|||
if (!data)
|
||||
return FALSE;
|
||||
|
||||
if (!(dwIndex == SCS_SETSTR ||
|
||||
dwIndex == SCS_CHANGEATTR ||
|
||||
dwIndex == SCS_CHANGECLAUSE ||
|
||||
dwIndex == SCS_SETRECONVERTSTRING ||
|
||||
dwIndex == SCS_QUERYRECONVERTSTRING))
|
||||
return FALSE;
|
||||
|
||||
if (!is_himc_ime_unicode(data))
|
||||
return data->immKbd->pImeSetCompositionString(hIMC, dwIndex, lpComp,
|
||||
dwCompLen, lpRead, dwReadLen);
|
||||
|
@ -2178,6 +2185,13 @@ BOOL WINAPI ImmSetCompositionStringW(
|
|||
if (!data)
|
||||
return FALSE;
|
||||
|
||||
if (!(dwIndex == SCS_SETSTR ||
|
||||
dwIndex == SCS_CHANGEATTR ||
|
||||
dwIndex == SCS_CHANGECLAUSE ||
|
||||
dwIndex == SCS_SETRECONVERTSTRING ||
|
||||
dwIndex == SCS_QUERYRECONVERTSTRING))
|
||||
return FALSE;
|
||||
|
||||
if (is_himc_ime_unicode(data))
|
||||
return data->immKbd->pImeSetCompositionString(hIMC, dwIndex, lpComp,
|
||||
dwCompLen, lpRead, dwReadLen);
|
||||
|
|
|
@ -274,22 +274,18 @@ static void test_ImmSetCompositionString(void)
|
|||
|
||||
ret = ImmSetCompositionStringW(imc, SCS_SETSTR | SCS_CHANGEATTR,
|
||||
NULL, 0, NULL, 0);
|
||||
todo_wine
|
||||
ok(!ret, "ImmSetCompositionStringW() succeeded.\n");
|
||||
|
||||
ret = ImmSetCompositionStringW(imc, SCS_SETSTR | SCS_CHANGECLAUSE,
|
||||
NULL, 0, NULL, 0);
|
||||
todo_wine
|
||||
ok(!ret, "ImmSetCompositionStringW() succeeded.\n");
|
||||
|
||||
ret = ImmSetCompositionStringW(imc, SCS_CHANGEATTR | SCS_CHANGECLAUSE,
|
||||
NULL, 0, NULL, 0);
|
||||
todo_wine
|
||||
ok(!ret, "ImmSetCompositionStringW() succeeded.\n");
|
||||
|
||||
ret = ImmSetCompositionStringW(imc, SCS_SETSTR | SCS_CHANGEATTR | SCS_CHANGECLAUSE,
|
||||
NULL, 0, NULL, 0);
|
||||
todo_wine
|
||||
ok(!ret, "ImmSetCompositionStringW() succeeded.\n");
|
||||
|
||||
ImmReleaseContext(hwnd, imc);
|
||||
|
|
Loading…
Reference in New Issue