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
08f578a6
Commit
08f578a6
authored
Aug 21, 2011
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 22, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: FONTDESC size field value is not important for OleCreateFontIndirect.
parent
78ca68c8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
5 deletions
+37
-5
olefont.c
dlls/oleaut32/olefont.c
+0
-5
olefont.c
dlls/oleaut32/tests/olefont.c
+37
-0
No files found.
dlls/oleaut32/olefont.c
View file @
08f578a6
...
...
@@ -2245,11 +2245,6 @@ static OLEFontImpl* OLEFontImpl_Construct(const FONTDESC *fontDesc)
newObject
->
ref
=
1
;
/*
* Copy the description of the font in the object.
*/
assert
(
fontDesc
->
cbSizeofstruct
>=
sizeof
(
FONTDESC
));
newObject
->
description
.
cbSizeofstruct
=
sizeof
(
FONTDESC
);
newObject
->
description
.
lpstrName
=
HeapAlloc
(
GetProcessHeap
(),
0
,
...
...
dlls/oleaut32/tests/olefont.c
View file @
08f578a6
...
...
@@ -1104,6 +1104,42 @@ static void test_realization(void)
IFont_Release
(
font
);
}
static
void
test_OleCreateFontIndirect
(
void
)
{
FONTDESC
fontdesc
;
IFont
*
font
;
HRESULT
hr
;
fontdesc
.
cbSizeofstruct
=
sizeof
(
fontdesc
);
fontdesc
.
lpstrName
=
arial_font
;
fontdesc
.
cySize
.
int64
=
12
*
10000
;
/* 12 pt */
fontdesc
.
sWeight
=
FW_NORMAL
;
fontdesc
.
sCharset
=
ANSI_CHARSET
;
fontdesc
.
fItalic
=
FALSE
;
fontdesc
.
fUnderline
=
FALSE
;
fontdesc
.
fStrikethrough
=
FALSE
;
hr
=
pOleCreateFontIndirect
(
&
fontdesc
,
&
IID_IFont
,
(
void
**
)
&
font
);
EXPECT_HR
(
hr
,
S_OK
);
IFont_Release
(
font
);
/* play with cbSizeofstruct value */
fontdesc
.
cbSizeofstruct
=
sizeof
(
fontdesc
)
-
1
;
hr
=
pOleCreateFontIndirect
(
&
fontdesc
,
&
IID_IFont
,
(
void
**
)
&
font
);
EXPECT_HR
(
hr
,
S_OK
);
IFont_Release
(
font
);
fontdesc
.
cbSizeofstruct
=
sizeof
(
fontdesc
)
+
1
;
hr
=
pOleCreateFontIndirect
(
&
fontdesc
,
&
IID_IFont
,
(
void
**
)
&
font
);
EXPECT_HR
(
hr
,
S_OK
);
IFont_Release
(
font
);
fontdesc
.
cbSizeofstruct
=
0
;
hr
=
pOleCreateFontIndirect
(
&
fontdesc
,
&
IID_IFont
,
(
void
**
)
&
font
);
EXPECT_HR
(
hr
,
S_OK
);
IFont_Release
(
font
);
}
START_TEST
(
olefont
)
{
hOleaut32
=
GetModuleHandleA
(
"oleaut32.dll"
);
...
...
@@ -1126,4 +1162,5 @@ START_TEST(olefont)
test_returns
();
test_hfont_lifetime
();
test_realization
();
test_OleCreateFontIndirect
();
}
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