Commit fb35a575 authored by Kusanagi Kouichi's avatar Kusanagi Kouichi Committed by Alexandre Julliard

imm32: Avoid false FIXMEs.

parent b8a57423
...@@ -1008,8 +1008,10 @@ LONG WINAPI ImmGetCompositionStringA( ...@@ -1008,8 +1008,10 @@ LONG WINAPI ImmGetCompositionStringA(
compdata = ImmLockIMCC(data->IMC.hCompStr); compdata = ImmLockIMCC(data->IMC.hCompStr);
compstr = (LPCOMPOSITIONSTRING)compdata; compstr = (LPCOMPOSITIONSTRING)compdata;
if (dwIndex == GCS_RESULTSTR && compstr->dwResultStrLen > 0 && switch (dwIndex)
compstr->dwResultStrOffset > 0) {
case GCS_RESULTSTR:
if (compstr->dwResultStrLen > 0 && compstr->dwResultStrOffset > 0)
{ {
LPWSTR ResultStr = (LPWSTR)(compdata + compstr->dwResultStrOffset); LPWSTR ResultStr = (LPWSTR)(compdata + compstr->dwResultStrOffset);
...@@ -1025,8 +1027,9 @@ LONG WINAPI ImmGetCompositionStringA( ...@@ -1025,8 +1027,9 @@ LONG WINAPI ImmGetCompositionStringA(
HeapFree( GetProcessHeap(), 0, buf ); HeapFree( GetProcessHeap(), 0, buf );
} }
else if (dwIndex == GCS_COMPSTR && compstr->dwCompStrLen > 0 && break;
compstr->dwCompStrOffset > 0) case GCS_COMPSTR:
if (compstr->dwCompStrLen > 0 && compstr->dwCompStrOffset > 0)
{ {
LPWSTR CompString = (LPWSTR)(compdata + compstr->dwCompStrOffset); LPWSTR CompString = (LPWSTR)(compdata + compstr->dwCompStrOffset);
...@@ -1040,8 +1043,9 @@ LONG WINAPI ImmGetCompositionStringA( ...@@ -1040,8 +1043,9 @@ LONG WINAPI ImmGetCompositionStringA(
memcpy(lpBuf,buf,rc); memcpy(lpBuf,buf,rc);
HeapFree( GetProcessHeap(), 0, buf ); HeapFree( GetProcessHeap(), 0, buf );
} }
else if (dwIndex == GCS_COMPATTR && compstr->dwCompAttrLen > 0 && break;
compstr->dwCompAttrOffset > 0) case GCS_COMPATTR:
if (compstr->dwCompAttrLen > 0 && compstr->dwCompAttrOffset > 0)
{ {
LPWSTR Compattr = (LPWSTR)(compdata + compstr->dwCompAttrOffset); LPWSTR Compattr = (LPWSTR)(compdata + compstr->dwCompAttrOffset);
TRACE("GCS_COMPATTR %p %i\n", Compattr , compstr->dwCompAttrLen); TRACE("GCS_COMPATTR %p %i\n", Compattr , compstr->dwCompAttrLen);
...@@ -1050,8 +1054,9 @@ LONG WINAPI ImmGetCompositionStringA( ...@@ -1050,8 +1054,9 @@ LONG WINAPI ImmGetCompositionStringA(
if (dwBufLen >= rc) if (dwBufLen >= rc)
memcpy(lpBuf,Compattr,rc); memcpy(lpBuf,Compattr,rc);
} }
else if (dwIndex == GCS_COMPCLAUSE && compstr->dwCompClauseLen > 0 && break;
compstr->dwCompClauseOffset > 0) case GCS_COMPCLAUSE:
if (compstr->dwCompClauseLen > 0 && compstr->dwCompClauseOffset > 0)
{ {
LPWSTR Compclause = (LPWSTR)(compdata + compstr->dwCompClauseOffset); LPWSTR Compclause = (LPWSTR)(compdata + compstr->dwCompClauseOffset);
TRACE("GCS_COMPCLAUSE %p %i\n", Compclause, compstr->dwCompClauseLen); TRACE("GCS_COMPCLAUSE %p %i\n", Compclause, compstr->dwCompClauseLen);
...@@ -1060,8 +1065,9 @@ LONG WINAPI ImmGetCompositionStringA( ...@@ -1060,8 +1065,9 @@ LONG WINAPI ImmGetCompositionStringA(
if (dwBufLen >= compstr->dwCompClauseLen) if (dwBufLen >= compstr->dwCompClauseLen)
memcpy(lpBuf,Compclause,rc); memcpy(lpBuf,Compclause,rc);
} }
else if (dwIndex == GCS_RESULTCLAUSE && compstr->dwResultClauseLen > 0 && break;
compstr->dwResultClauseOffset > 0) case GCS_RESULTCLAUSE:
if (compstr->dwResultClauseLen > 0 && compstr->dwResultClauseOffset > 0)
{ {
LPWSTR Resultclause = (LPWSTR)(compdata + compstr->dwResultClauseOffset); LPWSTR Resultclause = (LPWSTR)(compdata + compstr->dwResultClauseOffset);
TRACE("GCS_RESULTCLAUSE %p %i\n", Resultclause, compstr->dwResultClauseLen); TRACE("GCS_RESULTCLAUSE %p %i\n", Resultclause, compstr->dwResultClauseLen);
...@@ -1070,19 +1076,18 @@ LONG WINAPI ImmGetCompositionStringA( ...@@ -1070,19 +1076,18 @@ LONG WINAPI ImmGetCompositionStringA(
if (dwBufLen >= compstr->dwResultClauseLen) if (dwBufLen >= compstr->dwResultClauseLen)
memcpy(lpBuf,Resultclause,rc); memcpy(lpBuf,Resultclause,rc);
} }
else if (dwIndex == GCS_CURSORPOS) break;
{ case GCS_CURSORPOS:
TRACE("GCS_CURSORPOS\n"); TRACE("GCS_CURSORPOS\n");
rc = compstr->dwCursorPos; rc = compstr->dwCursorPos;
} break;
else if (dwIndex == GCS_DELTASTART) case GCS_DELTASTART:
{
TRACE("GCS_DELTASTART\n"); TRACE("GCS_DELTASTART\n");
rc = compstr->dwDeltaStart; rc = compstr->dwDeltaStart;
} break;
else default:
{
FIXME("Unhandled index 0x%x\n",dwIndex); FIXME("Unhandled index 0x%x\n",dwIndex);
break;
} }
ImmUnlockIMCC(data->IMC.hCompStr); ImmUnlockIMCC(data->IMC.hCompStr);
...@@ -1113,8 +1118,10 @@ LONG WINAPI ImmGetCompositionStringW( ...@@ -1113,8 +1118,10 @@ LONG WINAPI ImmGetCompositionStringW(
compdata = ImmLockIMCC(data->IMC.hCompStr); compdata = ImmLockIMCC(data->IMC.hCompStr);
compstr = (LPCOMPOSITIONSTRING)compdata; compstr = (LPCOMPOSITIONSTRING)compdata;
if (dwIndex == GCS_RESULTSTR && compstr->dwResultStrLen > 0 && switch (dwIndex)
compstr->dwResultStrOffset > 0) {
case GCS_RESULTSTR:
if (compstr->dwResultStrLen > 0 && compstr->dwResultStrOffset > 0)
{ {
LPWSTR ResultStr = (LPWSTR)(compdata + compstr->dwResultStrOffset); LPWSTR ResultStr = (LPWSTR)(compdata + compstr->dwResultStrOffset);
rc = compstr->dwResultStrLen * sizeof(WCHAR); rc = compstr->dwResultStrLen * sizeof(WCHAR);
...@@ -1122,8 +1129,9 @@ LONG WINAPI ImmGetCompositionStringW( ...@@ -1122,8 +1129,9 @@ LONG WINAPI ImmGetCompositionStringW(
if (dwBufLen >= rc) if (dwBufLen >= rc)
memcpy(lpBuf,ResultStr,rc); memcpy(lpBuf,ResultStr,rc);
} }
else if (dwIndex == GCS_RESULTREADSTR && compstr->dwResultReadStrLen > 0 && break;
compstr->dwResultReadStrOffset > 0) case GCS_RESULTREADSTR:
if (compstr->dwResultReadStrLen > 0 && compstr->dwResultReadStrOffset > 0)
{ {
LPWSTR ResultReadString = (LPWSTR)(compdata + compstr->dwResultReadStrOffset); LPWSTR ResultReadString = (LPWSTR)(compdata + compstr->dwResultReadStrOffset);
...@@ -1131,16 +1139,18 @@ LONG WINAPI ImmGetCompositionStringW( ...@@ -1131,16 +1139,18 @@ LONG WINAPI ImmGetCompositionStringW(
if (dwBufLen >= rc) if (dwBufLen >= rc)
memcpy(lpBuf,ResultReadString,rc); memcpy(lpBuf,ResultReadString,rc);
} }
else if (dwIndex == GCS_COMPSTR && compstr->dwCompStrLen > 0 && break;
compstr->dwCompStrOffset > 0) case GCS_COMPSTR:
if (compstr->dwCompStrLen > 0 && compstr->dwCompStrOffset > 0)
{ {
LPWSTR CompString = (LPWSTR)(compdata + compstr->dwCompStrOffset); LPWSTR CompString = (LPWSTR)(compdata + compstr->dwCompStrOffset);
rc = compstr->dwCompStrLen * sizeof(WCHAR); rc = compstr->dwCompStrLen * sizeof(WCHAR);
if (dwBufLen >= rc) if (dwBufLen >= rc)
memcpy(lpBuf,CompString,rc); memcpy(lpBuf,CompString,rc);
} }
else if (dwIndex == GCS_COMPATTR && compstr->dwCompAttrLen > 0 && break;
compstr->dwCompAttrOffset > 0) case GCS_COMPATTR:
if (compstr->dwCompAttrLen > 0 && compstr->dwCompAttrOffset > 0)
{ {
LPWSTR Compattr = (LPWSTR)(compdata + compstr->dwCompAttrOffset); LPWSTR Compattr = (LPWSTR)(compdata + compstr->dwCompAttrOffset);
...@@ -1149,8 +1159,9 @@ LONG WINAPI ImmGetCompositionStringW( ...@@ -1149,8 +1159,9 @@ LONG WINAPI ImmGetCompositionStringW(
if (dwBufLen >= rc) if (dwBufLen >= rc)
memcpy(lpBuf,Compattr,rc); memcpy(lpBuf,Compattr,rc);
} }
else if (dwIndex == GCS_COMPCLAUSE && compstr->dwCompClauseLen > 0 && break;
compstr->dwCompClauseOffset > 0) case GCS_COMPCLAUSE:
if (compstr->dwCompClauseLen > 0 && compstr->dwCompClauseOffset > 0)
{ {
LPWSTR Compclause = (LPWSTR)(compdata + compstr->dwCompClauseOffset); LPWSTR Compclause = (LPWSTR)(compdata + compstr->dwCompClauseOffset);
...@@ -1158,8 +1169,9 @@ LONG WINAPI ImmGetCompositionStringW( ...@@ -1158,8 +1169,9 @@ LONG WINAPI ImmGetCompositionStringW(
if (dwBufLen >= compstr->dwCompClauseLen) if (dwBufLen >= compstr->dwCompClauseLen)
memcpy(lpBuf,Compclause,rc); memcpy(lpBuf,Compclause,rc);
} }
else if (dwIndex == GCS_COMPREADSTR && compstr->dwCompReadStrLen > 0 && break;
compstr->dwCompReadStrOffset > 0) case GCS_COMPREADSTR:
if (compstr->dwCompReadStrLen > 0 && compstr->dwCompReadStrOffset > 0)
{ {
LPWSTR CompReadString = (LPWSTR)(compdata + compstr->dwCompReadStrOffset); LPWSTR CompReadString = (LPWSTR)(compdata + compstr->dwCompReadStrOffset);
...@@ -1168,19 +1180,18 @@ LONG WINAPI ImmGetCompositionStringW( ...@@ -1168,19 +1180,18 @@ LONG WINAPI ImmGetCompositionStringW(
if (dwBufLen >= rc) if (dwBufLen >= rc)
memcpy(lpBuf,CompReadString,rc); memcpy(lpBuf,CompReadString,rc);
} }
else if (dwIndex == GCS_CURSORPOS) break;
{ case GCS_CURSORPOS:
TRACE("GCS_CURSORPOS\n"); TRACE("GCS_CURSORPOS\n");
rc = compstr->dwCursorPos; rc = compstr->dwCursorPos;
} break;
else if (dwIndex == GCS_DELTASTART) case GCS_DELTASTART:
{
TRACE("GCS_DELTASTART\n"); TRACE("GCS_DELTASTART\n");
rc = compstr->dwDeltaStart; rc = compstr->dwDeltaStart;
} break;
else default:
{
FIXME("Unhandled index 0x%x\n",dwIndex); FIXME("Unhandled index 0x%x\n",dwIndex);
break;
} }
ImmUnlockIMCC(data->IMC.hCompStr); ImmUnlockIMCC(data->IMC.hCompStr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment