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(
compdata = ImmLockIMCC(data->IMC.hCompStr);
compstr = (LPCOMPOSITIONSTRING)compdata;
if (dwIndex == GCS_RESULTSTR && compstr->dwResultStrLen > 0 &&
compstr->dwResultStrOffset > 0)
switch (dwIndex)
{
case GCS_RESULTSTR:
if (compstr->dwResultStrLen > 0 && compstr->dwResultStrOffset > 0)
{
LPWSTR ResultStr = (LPWSTR)(compdata + compstr->dwResultStrOffset);
......@@ -1025,8 +1027,9 @@ LONG WINAPI ImmGetCompositionStringA(
HeapFree( GetProcessHeap(), 0, buf );
}
else if (dwIndex == GCS_COMPSTR && compstr->dwCompStrLen > 0 &&
compstr->dwCompStrOffset > 0)
break;
case GCS_COMPSTR:
if (compstr->dwCompStrLen > 0 && compstr->dwCompStrOffset > 0)
{
LPWSTR CompString = (LPWSTR)(compdata + compstr->dwCompStrOffset);
......@@ -1040,8 +1043,9 @@ LONG WINAPI ImmGetCompositionStringA(
memcpy(lpBuf,buf,rc);
HeapFree( GetProcessHeap(), 0, buf );
}
else if (dwIndex == GCS_COMPATTR && compstr->dwCompAttrLen > 0 &&
compstr->dwCompAttrOffset > 0)
break;
case GCS_COMPATTR:
if (compstr->dwCompAttrLen > 0 && compstr->dwCompAttrOffset > 0)
{
LPWSTR Compattr = (LPWSTR)(compdata + compstr->dwCompAttrOffset);
TRACE("GCS_COMPATTR %p %i\n", Compattr , compstr->dwCompAttrLen);
......@@ -1050,8 +1054,9 @@ LONG WINAPI ImmGetCompositionStringA(
if (dwBufLen >= rc)
memcpy(lpBuf,Compattr,rc);
}
else if (dwIndex == GCS_COMPCLAUSE && compstr->dwCompClauseLen > 0 &&
compstr->dwCompClauseOffset > 0)
break;
case GCS_COMPCLAUSE:
if (compstr->dwCompClauseLen > 0 && compstr->dwCompClauseOffset > 0)
{
LPWSTR Compclause = (LPWSTR)(compdata + compstr->dwCompClauseOffset);
TRACE("GCS_COMPCLAUSE %p %i\n", Compclause, compstr->dwCompClauseLen);
......@@ -1060,8 +1065,9 @@ LONG WINAPI ImmGetCompositionStringA(
if (dwBufLen >= compstr->dwCompClauseLen)
memcpy(lpBuf,Compclause,rc);
}
else if (dwIndex == GCS_RESULTCLAUSE && compstr->dwResultClauseLen > 0 &&
compstr->dwResultClauseOffset > 0)
break;
case GCS_RESULTCLAUSE:
if (compstr->dwResultClauseLen > 0 && compstr->dwResultClauseOffset > 0)
{
LPWSTR Resultclause = (LPWSTR)(compdata + compstr->dwResultClauseOffset);
TRACE("GCS_RESULTCLAUSE %p %i\n", Resultclause, compstr->dwResultClauseLen);
......@@ -1070,19 +1076,18 @@ LONG WINAPI ImmGetCompositionStringA(
if (dwBufLen >= compstr->dwResultClauseLen)
memcpy(lpBuf,Resultclause,rc);
}
else if (dwIndex == GCS_CURSORPOS)
{
break;
case GCS_CURSORPOS:
TRACE("GCS_CURSORPOS\n");
rc = compstr->dwCursorPos;
}
else if (dwIndex == GCS_DELTASTART)
{
break;
case GCS_DELTASTART:
TRACE("GCS_DELTASTART\n");
rc = compstr->dwDeltaStart;
}
else
{
break;
default:
FIXME("Unhandled index 0x%x\n",dwIndex);
break;
}
ImmUnlockIMCC(data->IMC.hCompStr);
......@@ -1113,8 +1118,10 @@ LONG WINAPI ImmGetCompositionStringW(
compdata = ImmLockIMCC(data->IMC.hCompStr);
compstr = (LPCOMPOSITIONSTRING)compdata;
if (dwIndex == GCS_RESULTSTR && compstr->dwResultStrLen > 0 &&
compstr->dwResultStrOffset > 0)
switch (dwIndex)
{
case GCS_RESULTSTR:
if (compstr->dwResultStrLen > 0 && compstr->dwResultStrOffset > 0)
{
LPWSTR ResultStr = (LPWSTR)(compdata + compstr->dwResultStrOffset);
rc = compstr->dwResultStrLen * sizeof(WCHAR);
......@@ -1122,8 +1129,9 @@ LONG WINAPI ImmGetCompositionStringW(
if (dwBufLen >= rc)
memcpy(lpBuf,ResultStr,rc);
}
else if (dwIndex == GCS_RESULTREADSTR && compstr->dwResultReadStrLen > 0 &&
compstr->dwResultReadStrOffset > 0)
break;
case GCS_RESULTREADSTR:
if (compstr->dwResultReadStrLen > 0 && compstr->dwResultReadStrOffset > 0)
{
LPWSTR ResultReadString = (LPWSTR)(compdata + compstr->dwResultReadStrOffset);
......@@ -1131,16 +1139,18 @@ LONG WINAPI ImmGetCompositionStringW(
if (dwBufLen >= rc)
memcpy(lpBuf,ResultReadString,rc);
}
else if (dwIndex == GCS_COMPSTR && compstr->dwCompStrLen > 0 &&
compstr->dwCompStrOffset > 0)
break;
case GCS_COMPSTR:
if (compstr->dwCompStrLen > 0 && compstr->dwCompStrOffset > 0)
{
LPWSTR CompString = (LPWSTR)(compdata + compstr->dwCompStrOffset);
rc = compstr->dwCompStrLen * sizeof(WCHAR);
if (dwBufLen >= rc)
memcpy(lpBuf,CompString,rc);
}
else if (dwIndex == GCS_COMPATTR && compstr->dwCompAttrLen > 0 &&
compstr->dwCompAttrOffset > 0)
break;
case GCS_COMPATTR:
if (compstr->dwCompAttrLen > 0 && compstr->dwCompAttrOffset > 0)
{
LPWSTR Compattr = (LPWSTR)(compdata + compstr->dwCompAttrOffset);
......@@ -1149,8 +1159,9 @@ LONG WINAPI ImmGetCompositionStringW(
if (dwBufLen >= rc)
memcpy(lpBuf,Compattr,rc);
}
else if (dwIndex == GCS_COMPCLAUSE && compstr->dwCompClauseLen > 0 &&
compstr->dwCompClauseOffset > 0)
break;
case GCS_COMPCLAUSE:
if (compstr->dwCompClauseLen > 0 && compstr->dwCompClauseOffset > 0)
{
LPWSTR Compclause = (LPWSTR)(compdata + compstr->dwCompClauseOffset);
......@@ -1158,8 +1169,9 @@ LONG WINAPI ImmGetCompositionStringW(
if (dwBufLen >= compstr->dwCompClauseLen)
memcpy(lpBuf,Compclause,rc);
}
else if (dwIndex == GCS_COMPREADSTR && compstr->dwCompReadStrLen > 0 &&
compstr->dwCompReadStrOffset > 0)
break;
case GCS_COMPREADSTR:
if (compstr->dwCompReadStrLen > 0 && compstr->dwCompReadStrOffset > 0)
{
LPWSTR CompReadString = (LPWSTR)(compdata + compstr->dwCompReadStrOffset);
......@@ -1168,19 +1180,18 @@ LONG WINAPI ImmGetCompositionStringW(
if (dwBufLen >= rc)
memcpy(lpBuf,CompReadString,rc);
}
else if (dwIndex == GCS_CURSORPOS)
{
break;
case GCS_CURSORPOS:
TRACE("GCS_CURSORPOS\n");
rc = compstr->dwCursorPos;
}
else if (dwIndex == GCS_DELTASTART)
{
break;
case GCS_DELTASTART:
TRACE("GCS_DELTASTART\n");
rc = compstr->dwDeltaStart;
}
else
{
break;
default:
FIXME("Unhandled index 0x%x\n",dwIndex);
break;
}
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