Commit 1552f22a authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

riched20: Fix the name of the lpUsedDefChar field of GETTEXTEX.

parent 8ad3a1f4
......@@ -2426,7 +2426,7 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam,
ex.flags = GT_USECRLF;
ex.codepage = unicode ? 1200 : CP_ACP;
ex.lpDefaultChar = NULL;
ex.lpUsedDefaultChar = NULL;
ex.lpUsedDefChar = NULL;
rc = RichEditWndProc_common(hWnd, EM_GETTEXTEX, (WPARAM)&ex, unicode ? (LPARAM)bufferW : (LPARAM)bufferA, unicode);
if (unicode)
......@@ -2480,7 +2480,7 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam,
buffer = heap_alloc((crlfmul*nCount + 1) * sizeof(WCHAR));
buflen = ME_GetTextW(editor, buffer, nStart, nCount, ex->flags & GT_USECRLF);
rc = WideCharToMultiByte(ex->codepage, flags, buffer, -1, (LPSTR)lParam, ex->cb, ex->lpDefaultChar, ex->lpUsedDefaultChar);
rc = WideCharToMultiByte(ex->codepage, flags, buffer, -1, (LPSTR)lParam, ex->cb, ex->lpDefaultChar, ex->lpUsedDefChar);
if (rc) rc--; /* do not count 0 terminator */
heap_free(buffer);
......
......@@ -1134,7 +1134,7 @@ static void test_EM_SETTEXTEX(void)
getText.cb = MAX_BUF_LEN;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
getText.lpUsedDefChar = NULL;
setText.flags = 0;
SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) TestItem1);
......@@ -1150,7 +1150,7 @@ static void test_EM_SETTEXTEX(void)
getText.cb = MAX_BUF_LEN;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
getText.lpUsedDefChar = NULL;
setText.flags = 0;
SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) TestItem2);
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buf);
......@@ -1167,7 +1167,7 @@ static void test_EM_SETTEXTEX(void)
getText.codepage = 1200; /* no constant for unicode */
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
getText.lpUsedDefChar = NULL;
memset(buf, 0, MAX_BUF_LEN);
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buf);
ok(lstrcmpW(buf, TestItem2) == 0,
......@@ -1182,7 +1182,7 @@ static void test_EM_SETTEXTEX(void)
getText.codepage = 1200; /* no constant for unicode */
getText.flags = GT_USECRLF; /* <-- asking for CR -> CRLF conversion */
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
getText.lpUsedDefChar = NULL;
memset(buf, 0, MAX_BUF_LEN);
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buf);
ok(lstrcmpW(buf, TestItem1) == 0,
......@@ -1195,7 +1195,7 @@ static void test_EM_SETTEXTEX(void)
getText.cb = MAX_BUF_LEN;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
getText.lpUsedDefChar = NULL;
setText.flags = 0;
SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) TestItem3);
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buf);
......@@ -1208,7 +1208,7 @@ static void test_EM_SETTEXTEX(void)
getText.cb = MAX_BUF_LEN;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
getText.lpUsedDefChar = NULL;
setText.flags = 0;
SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) TestItem3alt);
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buf);
......@@ -1221,7 +1221,7 @@ static void test_EM_SETTEXTEX(void)
getText.cb = MAX_BUF_LEN;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
getText.lpUsedDefChar = NULL;
setText.flags = 0;
SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) TestItem4);
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buf);
......@@ -1829,7 +1829,7 @@ static void test_EM_REPLACESEL(void)
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
getText.lpUsedDefChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, "RichEdit1") == 0,
"EM_GETTEXTEX results not what was set by EM_REPLACESEL\n");
......@@ -1844,7 +1844,7 @@ static void test_EM_REPLACESEL(void)
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
getText.lpUsedDefChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, "RichEdit1\r") == 0,
"EM_GETTEXTEX returned incorrect string\n");
......@@ -1873,7 +1873,7 @@ static void test_EM_REPLACESEL(void)
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
getText.lpUsedDefChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, "RichEdit1\r") == 0,
"EM_GETTEXTEX returned incorrect string\n");
......@@ -1902,7 +1902,7 @@ static void test_EM_REPLACESEL(void)
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
getText.lpUsedDefChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, "\r\r") == 0,
"EM_GETTEXTEX returned incorrect string\n");
......@@ -1921,7 +1921,7 @@ static void test_EM_REPLACESEL(void)
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
getText.lpUsedDefChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, " ") == 0,
"EM_GETTEXTEX returned incorrect string\n");
......@@ -1940,7 +1940,7 @@ static void test_EM_REPLACESEL(void)
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
getText.lpUsedDefChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, "\r\r\r \r\r\r") == 0,
"EM_GETTEXTEX returned incorrect string\n");
......@@ -1959,7 +1959,7 @@ static void test_EM_REPLACESEL(void)
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
getText.lpUsedDefChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, " \r") == 0,
"EM_GETTEXTEX returned incorrect string\n");
......@@ -1978,7 +1978,7 @@ static void test_EM_REPLACESEL(void)
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
getText.lpUsedDefChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, " \r\r") == 0,
"EM_GETTEXTEX returned incorrect string\n");
......@@ -1997,7 +1997,7 @@ static void test_EM_REPLACESEL(void)
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
getText.lpUsedDefChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, "\rX\r\r\r") == 0,
"EM_GETTEXTEX returned incorrect string\n");
......@@ -2015,7 +2015,7 @@ static void test_EM_REPLACESEL(void)
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
getText.lpUsedDefChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, "\r\r") == 0,
"EM_GETTEXTEX returned incorrect string\n");
......@@ -2034,7 +2034,7 @@ static void test_EM_REPLACESEL(void)
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
getText.lpUsedDefChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, "\r\r\r\r\r\r ") == 0,
"EM_GETTEXTEX returned incorrect string\n");
......
......@@ -531,7 +531,7 @@ typedef struct _gettextex {
DWORD flags;
UINT codepage;
LPCSTR lpDefaultChar;
LPBOOL lpUsedDefaultChar;
LPBOOL lpUsedDefChar;
} GETTEXTEX;
#define SF_TEXT 0x00000001
......
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