Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
1552f22a
Commit
1552f22a
authored
Feb 06, 2008
by
Francois Gouget
Committed by
Alexandre Julliard
Feb 06, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Fix the name of the lpUsedDefChar field of GETTEXTEX.
parent
8ad3a1f4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
21 deletions
+21
-21
editor.c
dlls/riched20/editor.c
+2
-2
editor.c
dlls/riched20/tests/editor.c
+18
-18
richedit.h
include/richedit.h
+1
-1
No files found.
dlls/riched20/editor.c
View file @
1552f22a
...
...
@@ -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
.
lpUsedDef
ault
Char
=
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
->
lpUsedDef
ault
Char
);
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
);
...
...
dlls/riched20/tests/editor.c
View file @
1552f22a
...
...
@@ -1134,7 +1134,7 @@ static void test_EM_SETTEXTEX(void)
getText
.
cb
=
MAX_BUF_LEN
;
getText
.
flags
=
GT_DEFAULT
;
getText
.
lpDefaultChar
=
NULL
;
getText
.
lpUsedDef
ault
Char
=
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
.
lpUsedDef
ault
Char
=
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
.
lpUsedDef
ault
Char
=
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
.
lpUsedDef
ault
Char
=
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
.
lpUsedDef
ault
Char
=
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
.
lpUsedDef
ault
Char
=
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
.
lpUsedDef
ault
Char
=
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
.
lpUsedDef
ault
Char
=
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
.
lpUsedDef
ault
Char
=
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
.
lpUsedDef
ault
Char
=
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
.
lpUsedDef
ault
Char
=
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
.
lpUsedDef
ault
Char
=
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
.
lpUsedDef
ault
Char
=
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
.
lpUsedDef
ault
Char
=
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
.
lpUsedDef
ault
Char
=
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
.
lpUsedDef
ault
Char
=
NULL
;
getText
.
lpUsedDefChar
=
NULL
;
SendMessage
(
hwndRichEdit
,
EM_GETTEXTEX
,
(
WPARAM
)
&
getText
,
(
LPARAM
)
buffer
);
ok
(
strcmp
(
buffer
,
"
\r
X
\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
.
lpUsedDef
ault
Char
=
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
.
lpUsedDef
ault
Char
=
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
"
);
...
...
include/richedit.h
View file @
1552f22a
...
...
@@ -531,7 +531,7 @@ typedef struct _gettextex {
DWORD
flags
;
UINT
codepage
;
LPCSTR
lpDefaultChar
;
LPBOOL
lpUsedDef
ault
Char
;
LPBOOL
lpUsedDefChar
;
}
GETTEXTEX
;
#define SF_TEXT 0x00000001
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment