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
3ac78b76
Commit
3ac78b76
authored
Oct 14, 2016
by
Huw Davies
Committed by
Alexandre Julliard
Oct 14, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Initialize the remaining CHARFORMAT2 members.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b21f4d07
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
3 deletions
+21
-3
para.c
dlls/riched20/para.c
+4
-2
editor.c
dlls/riched20/tests/editor.c
+17
-0
richole.c
dlls/riched20/tests/richole.c
+0
-1
No files found.
dlls/riched20/para.c
View file @
3ac78b76
...
...
@@ -52,11 +52,12 @@ void ME_MakeFirstParagraph(ME_TextEditor *editor)
GetObjectW
(
hf
,
sizeof
(
LOGFONTW
),
&
lf
);
ZeroMemory
(
&
cf
,
sizeof
(
cf
));
cf
.
cbSize
=
sizeof
(
cf
);
cf
.
dwMask
=
CFM_BACKCOLOR
|
CFM_COLOR
|
CFM_FACE
|
CFM_SIZE
|
CFM_CHARSET
;
cf
.
dwMask
=
CFM_ANIMATION
|
CFM_BACKCOLOR
|
CFM_CHARSET
|
CFM_COLOR
|
CFM_FACE
|
CFM_KERNING
|
CFM_LCID
|
CFM_OFFSET
;
cf
.
dwMask
|=
CFM_REVAUTHOR
|
CFM_SIZE
|
CFM_SPACING
|
CFM_STYLE
|
CFM_UNDERLINETYPE
|
CFM_WEIGHT
;
cf
.
dwMask
|=
CFM_ALLCAPS
|
CFM_BOLD
|
CFM_DISABLED
|
CFM_EMBOSS
|
CFM_HIDDEN
;
cf
.
dwMask
|=
CFM_IMPRINT
|
CFM_ITALIC
|
CFM_LINK
|
CFM_OUTLINE
|
CFM_PROTECTED
;
cf
.
dwMask
|=
CFM_REVISED
|
CFM_SHADOW
|
CFM_SMALLCAPS
|
CFM_STRIKEOUT
;
cf
.
dwMask
|=
CFM_SUBSCRIPT
|
CFM_UNDERLINE
TYPE
|
CFM_WEIGHT
;
cf
.
dwMask
|=
CFM_SUBSCRIPT
|
CFM_UNDERLINE
;
cf
.
dwEffects
=
CFE_AUTOCOLOR
|
CFE_AUTOBACKCOLOR
;
lstrcpyW
(
cf
.
szFaceName
,
lf
.
lfFaceName
);
...
...
@@ -69,6 +70,7 @@ void ME_MakeFirstParagraph(ME_TextEditor *editor)
if
(
lf
.
lfStrikeOut
)
cf
.
dwEffects
|=
CFE_STRIKEOUT
;
cf
.
bPitchAndFamily
=
lf
.
lfPitchAndFamily
;
cf
.
bCharSet
=
lf
.
lfCharSet
;
cf
.
lcid
=
GetSystemDefaultLCID
();
style
=
ME_MakeStyle
(
&
cf
);
text
->
pDefaultStyle
=
style
;
...
...
dlls/riched20/tests/editor.c
View file @
3ac78b76
...
...
@@ -764,11 +764,28 @@ static void test_EM_SETCHARFORMAT(void)
CHARRANGE
cr
;
LOCALESIGNATURE
sig
;
BOOL
rtl
;
DWORD
expect_effects
;
rtl
=
(
GetLocaleInfoA
(
LOCALE_USER_DEFAULT
,
LOCALE_FONTSIGNATURE
,
(
LPSTR
)
&
sig
,
sizeof
(
LOCALESIGNATURE
))
&&
(
sig
.
lsUsb
[
3
]
&
0x08000000
)
!=
0
);
/* check charformat defaults */
memset
(
&
cf2
,
0
,
sizeof
(
CHARFORMAT2A
));
cf2
.
cbSize
=
sizeof
(
CHARFORMAT2A
);
SendMessageA
(
hwndRichEdit
,
EM_GETCHARFORMAT
,
SCF_SELECTION
,
(
LPARAM
)
&
cf2
);
ok
(
cf2
.
dwMask
==
CFM_ALL2
,
"got %08x
\n
"
,
cf2
.
dwMask
);
expect_effects
=
CFE_AUTOCOLOR
|
CFE_AUTOBACKCOLOR
;
if
(
cf2
.
wWeight
>
550
)
expect_effects
|=
CFE_BOLD
;
ok
(
cf2
.
dwEffects
==
expect_effects
,
"got %08x
\n
"
,
cf2
.
dwEffects
);
ok
(
cf2
.
yOffset
==
0
,
"got %d
\n
"
,
cf2
.
yOffset
);
ok
(
cf2
.
sSpacing
==
0
,
"got %d
\n
"
,
cf2
.
sSpacing
);
ok
(
cf2
.
lcid
==
GetSystemDefaultLCID
(),
"got %x
\n
"
,
cf2
.
lcid
);
ok
(
cf2
.
sStyle
==
0
,
"got %d
\n
"
,
cf2
.
sStyle
);
ok
(
cf2
.
wKerning
==
0
,
"got %d
\n
"
,
cf2
.
wKerning
);
ok
(
cf2
.
bAnimation
==
0
,
"got %d
\n
"
,
cf2
.
bAnimation
);
ok
(
cf2
.
bRevAuthor
==
0
,
"got %d
\n
"
,
cf2
.
bRevAuthor
);
/* Invalid flags, CHARFORMAT2 structure blanked out */
memset
(
&
cf2
,
0
,
sizeof
(
cf2
));
rc
=
SendMessageA
(
hwndRichEdit
,
EM_SETCHARFORMAT
,
(
WPARAM
)
0xfffffff0
,
(
LPARAM
)
&
cf2
);
...
...
dlls/riched20/tests/richole.c
View file @
3ac78b76
...
...
@@ -1741,7 +1741,6 @@ static void test_GetFont(void)
value
=
0
;
hr
=
ITextFont_GetLanguageID
(
font
,
&
value
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
todo_wine
ok
(
value
==
GetSystemDefaultLCID
(),
"got lcid %x, user lcid %x
\n
"
,
value
,
GetSystemDefaultLCID
());
...
...
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