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
ac5edd1b
Commit
ac5edd1b
authored
Mar 10, 2016
by
Huw Davies
Committed by
Alexandre Julliard
Mar 11, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: \pard resets the reading direction.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5b7c9ecd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
1 deletion
+24
-1
editor.c
dlls/riched20/editor.c
+2
-1
editor.c
dlls/riched20/tests/editor.c
+22
-0
No files found.
dlls/riched20/editor.c
View file @
ac5edd1b
...
...
@@ -553,7 +553,7 @@ void ME_RTFParAttrHook(RTF_Info *info)
info
->
borderType
=
RTFBorderParaTop
;
info
->
fmt
.
dwMask
=
PFM_ALIGNMENT
|
PFM_BORDER
|
PFM_LINESPACING
|
PFM_TABSTOPS
|
PFM_OFFSET
|
PFM_RIGHTINDENT
|
PFM_SPACEAFTER
|
PFM_SPACEBEFORE
|
PFM_STARTINDENT
;
PFM_STARTINDENT
|
PFM_RTLPARA
;
/* TODO: numbering, shading */
info
->
fmt
.
wAlignment
=
PFA_LEFT
;
info
->
fmt
.
cTabCount
=
0
;
...
...
@@ -563,6 +563,7 @@ void ME_RTFParAttrHook(RTF_Info *info)
info
->
fmt
.
bLineSpacingRule
=
0
;
info
->
fmt
.
dySpaceBefore
=
info
->
fmt
.
dySpaceAfter
=
0
;
info
->
fmt
.
dyLineSpacing
=
0
;
info
->
fmt
.
wEffects
&=
~
PFE_RTLPARA
;
if
(
!
info
->
editor
->
bEmulateVersion10
)
/* v4.1 */
{
if
(
info
->
tableDef
&&
info
->
tableDef
->
tableRowStart
&&
...
...
dlls/riched20/tests/editor.c
View file @
ac5edd1b
...
...
@@ -8284,10 +8284,12 @@ static void test_rtf_specials(void)
"
\\
rquote
\\
ldblquote
\\
rdblquote
\\
ltrmark
\\
rtlmark
\\
zwj
\\
zwnj}"
;
const
WCHAR
expect_specials
[]
=
{
' '
,
' '
,
0x2022
,
0x2018
,
0x2019
,
0x201c
,
0x201d
,
0x200e
,
0x200f
,
0x200d
,
0x200c
};
const
char
*
pard
=
"{
\\
rtf1 ABC
\\
rtlpar
\\
par DEF
\\
par HIJ
\\
pard
\\
par}"
;
HWND
edit
=
new_richeditW
(
NULL
);
EDITSTREAM
es
;
WCHAR
buf
[
80
];
LRESULT
result
;
PARAFORMAT2
fmt
;
es
.
dwCookie
=
(
DWORD_PTR
)
&
specials
;
es
.
dwError
=
0
;
...
...
@@ -8299,6 +8301,26 @@ static void test_rtf_specials(void)
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
)
);
/* Show that \rtlpar propagates to the second paragraph and is
reset by \pard in the third. */
es
.
dwCookie
=
(
DWORD_PTR
)
&
pard
;
result
=
SendMessageA
(
edit
,
EM_STREAMIN
,
SF_RTF
,
(
LPARAM
)
&
es
);
ok
(
result
==
11
,
"got %ld
\n
"
,
result
);
fmt
.
cbSize
=
sizeof
(
fmt
);
SendMessageW
(
edit
,
EM_SETSEL
,
1
,
1
);
SendMessageW
(
edit
,
EM_GETPARAFORMAT
,
0
,
(
LPARAM
)
&
fmt
);
ok
(
fmt
.
dwMask
&
PFM_RTLPARA
,
"rtl para mask not set
\n
"
);
ok
(
fmt
.
wEffects
&
PFE_RTLPARA
,
"rtl para not set
\n
"
);
SendMessageW
(
edit
,
EM_SETSEL
,
5
,
5
);
SendMessageW
(
edit
,
EM_GETPARAFORMAT
,
0
,
(
LPARAM
)
&
fmt
);
ok
(
fmt
.
dwMask
&
PFM_RTLPARA
,
"rtl para mask not set
\n
"
);
ok
(
fmt
.
wEffects
&
PFE_RTLPARA
,
"rtl para not set
\n
"
);
SendMessageW
(
edit
,
EM_SETSEL
,
9
,
9
);
SendMessageW
(
edit
,
EM_GETPARAFORMAT
,
0
,
(
LPARAM
)
&
fmt
);
ok
(
fmt
.
dwMask
&
PFM_RTLPARA
,
"rtl para mask not set
\n
"
);
ok
(
!
(
fmt
.
wEffects
&
PFE_RTLPARA
),
"rtl para set
\n
"
);
DestroyWindow
(
edit
);
}
...
...
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