Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
51936be0
Commit
51936be0
authored
Jan 05, 2014
by
Jactry Zeng
Committed by
Alexandre Julliard
Jan 06, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Use CP_UNICODE instead of 1200.
parent
289bdc4f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
editor.c
dlls/riched20/editor.c
+4
-4
editor.h
dlls/riched20/editor.h
+2
-0
No files found.
dlls/riched20/editor.c
View file @
51936be0
...
...
@@ -1968,7 +1968,7 @@ static int ME_GetTextEx(ME_TextEditor *editor, GETTEXTEX *ex, LPARAM pText)
ME_SetCursorToStart
(
editor
,
&
start
);
nChars
=
INT_MAX
;
}
if
(
ex
->
codepage
==
1200
)
if
(
ex
->
codepage
==
CP_UNICODE
)
{
return
ME_GetTextW
(
editor
,
(
LPWSTR
)
pText
,
ex
->
cb
/
sizeof
(
WCHAR
)
-
1
,
&
start
,
nChars
,
ex
->
flags
&
GT_USECRLF
);
...
...
@@ -3338,7 +3338,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
* we know it isn't unicode. */
bRtf
=
(
lParam
&&
(
!
strncmp
((
char
*
)
lParam
,
"{
\\
rtf"
,
5
)
||
!
strncmp
((
char
*
)
lParam
,
"{
\\
urtf"
,
6
)));
bUnicode
=
!
bRtf
&&
pStruct
->
codepage
==
1200
;
bUnicode
=
!
bRtf
&&
pStruct
->
codepage
==
CP_UNICODE
;
TRACE
(
"EM_SETTEXTEX - %s, flags %d, cp %d
\n
"
,
bUnicode
?
debugstr_w
((
LPCWSTR
)
lParam
)
:
debugstr_a
((
LPCSTR
)
lParam
),
...
...
@@ -3691,7 +3691,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
/* CR/LF conversion required in 2.0 mode, verbatim in 1.0 mode */
how
.
flags
=
GTL_CLOSE
|
(
editor
->
bEmulateVersion10
?
0
:
GTL_USECRLF
)
|
GTL_NUMCHARS
;
how
.
codepage
=
unicode
?
1200
:
CP_ACP
;
how
.
codepage
=
unicode
?
CP_UNICODE
:
CP_ACP
;
return
ME_GetTextLengthEx
(
editor
,
&
how
);
}
case
EM_GETTEXTLENGTHEX
:
...
...
@@ -3701,7 +3701,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
GETTEXTEX
ex
;
ex
.
cb
=
wParam
*
(
unicode
?
sizeof
(
WCHAR
)
:
sizeof
(
CHAR
));
ex
.
flags
=
GT_USECRLF
;
ex
.
codepage
=
unicode
?
1200
:
CP_ACP
;
ex
.
codepage
=
unicode
?
CP_UNICODE
:
CP_ACP
;
ex
.
lpDefaultChar
=
NULL
;
ex
.
lpUsedDefChar
=
NULL
;
return
ME_GetTextEx
(
editor
,
&
ex
,
lParam
);
...
...
dlls/riched20/editor.h
View file @
51936be0
...
...
@@ -108,6 +108,8 @@ int ME_CallWordBreakProc(ME_TextEditor *editor, WCHAR *str, INT len, INT start,
void
ME_StrDeleteV
(
ME_String
*
s
,
int
nVChar
,
int
nChars
)
DECLSPEC_HIDDEN
;
BOOL
ME_InsertString
(
ME_String
*
s
,
int
ofs
,
const
WCHAR
*
insert
,
int
len
)
DECLSPEC_HIDDEN
;
#define CP_UNICODE 1200
/* smart helpers for A<->W conversions, they reserve/free memory and call MultiByte<->WideChar functions */
LPWSTR
ME_ToUnicode
(
BOOL
unicode
,
LPVOID
psz
,
INT
*
len
)
DECLSPEC_HIDDEN
;
void
ME_EndToUnicode
(
BOOL
unicode
,
LPVOID
psz
)
DECLSPEC_HIDDEN
;
...
...
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