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
da7c4f97
Commit
da7c4f97
authored
Feb 29, 2016
by
Huw Davies
Committed by
Alexandre Julliard
Mar 01, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Add handling for a few more special characters.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
372a16af
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
0 deletions
+44
-0
reader.c
dlls/riched20/reader.c
+18
-0
editor.c
dlls/riched20/tests/editor.c
+26
-0
No files found.
dlls/riched20/reader.c
View file @
da7c4f97
...
...
@@ -2544,6 +2544,12 @@ static void SpecialChar (RTF_Info *info)
case
rtfEnDash
:
RTFPutUnicodeChar
(
info
,
0x2013
);
break
;
case
rtfEmSpace
:
RTFPutUnicodeChar
(
info
,
' '
);
break
;
case
rtfEnSpace
:
RTFPutUnicodeChar
(
info
,
' '
);
break
;
case
rtfLQuote
:
RTFPutUnicodeChar
(
info
,
0x2018
);
break
;
...
...
@@ -2556,6 +2562,18 @@ static void SpecialChar (RTF_Info *info)
case
rtfRDblQuote
:
RTFPutUnicodeChar
(
info
,
0x201D
);
break
;
case
rtfLTRMark
:
RTFPutUnicodeChar
(
info
,
0x200E
);
break
;
case
rtfRTLMark
:
RTFPutUnicodeChar
(
info
,
0x200F
);
break
;
case
rtfNoWidthJoiner
:
RTFPutUnicodeChar
(
info
,
0x200D
);
break
;
case
rtfNoWidthNonJoiner
:
RTFPutUnicodeChar
(
info
,
0x200C
);
break
;
}
}
...
...
dlls/riched20/tests/editor.c
View file @
da7c4f97
...
...
@@ -8278,6 +8278,31 @@ static void test_WM_GETTEXTLENGTH(void)
DestroyWindow
(
hwndRichEdit
);
}
static
void
test_rtf_specials
(
void
)
{
const
char
*
specials
=
"{
\\
rtf1
\\
emspace
\\
enspace
\\
bullet
\\
lquote"
"
\\
rquote
\\
ldblquote
\\
rdblquote
\\
ltrmark
\\
rtlmark
\\
zwj
\\
zwnj}"
;
const
WCHAR
expect_specials
[]
=
{
' '
,
' '
,
0x2022
,
0x2018
,
0x2019
,
0x201c
,
0x201d
,
0x200e
,
0x200f
,
0x200d
,
0x200c
};
HWND
edit
=
new_richeditW
(
NULL
);
EDITSTREAM
es
;
WCHAR
buf
[
80
];
LRESULT
result
;
es
.
dwCookie
=
(
DWORD_PTR
)
&
specials
;
es
.
dwError
=
0
;
es
.
pfnCallback
=
test_EM_STREAMIN_esCallback
;
result
=
SendMessageA
(
edit
,
EM_STREAMIN
,
SF_RTF
,
(
LPARAM
)
&
es
);
ok
(
result
==
11
,
"got %ld
\n
"
,
result
);
result
=
SendMessageW
(
edit
,
WM_GETTEXT
,
sizeof
(
buf
)
/
sizeof
(
buf
[
0
]),
(
LPARAM
)
buf
);
ok
(
result
==
sizeof
(
expect_specials
)
/
sizeof
(
expect_specials
[
0
]),
"got %ld
\n
"
,
result
);
ok
(
!
memcmp
(
buf
,
expect_specials
,
sizeof
(
expect_specials
)
),
"got %s
\n
"
,
wine_dbgstr_w
(
buf
)
);
DestroyWindow
(
edit
);
}
START_TEST
(
editor
)
{
BOOL
ret
;
...
...
@@ -8347,6 +8372,7 @@ START_TEST( editor )
test_EM_SETREADONLY
();
test_EM_SETFONTSIZE
();
test_alignment_style
();
test_rtf_specials
();
/* Set the environment variable WINETEST_RICHED20 to keep windows
* responsive and open for 30 seconds. This is useful for debugging.
...
...
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