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
7fbca4c1
Commit
7fbca4c1
authored
Feb 23, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
Feb 24, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut: Fix standard font cloning.
Create new empty connection points on clone of the standard Font (based on a patch by Alex Villacís Lasso).
parent
1f297893
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
3 deletions
+25
-3
olefont.c
dlls/oleaut32/olefont.c
+11
-0
olefont.c
dlls/oleaut32/tests/olefont.c
+14
-3
No files found.
dlls/oleaut32/olefont.c
View file @
7fbca4c1
...
...
@@ -1109,6 +1109,17 @@ static HRESULT WINAPI OLEFontImpl_Clone(
newObject
->
gdiFont
=
CreateFontIndirectW
(
&
logFont
);
/* create new connection points */
newObject
->
pPropertyNotifyCP
=
NULL
;
newObject
->
pFontEventsCP
=
NULL
;
CreateConnectionPoint
((
IUnknown
*
)
newObject
,
&
IID_IPropertyNotifySink
,
&
newObject
->
pPropertyNotifyCP
);
CreateConnectionPoint
((
IUnknown
*
)
newObject
,
&
IID_IFontEventsDisp
,
&
newObject
->
pFontEventsCP
);
if
(
!
newObject
->
pPropertyNotifyCP
||
!
newObject
->
pFontEventsCP
)
{
OLEFontImpl_Destroy
(
newObject
);
return
E_OUTOFMEMORY
;
}
/* The cloned object starts with a reference count of 1 */
newObject
->
ref
=
1
;
...
...
dlls/oleaut32/tests/olefont.c
View file @
7fbca4c1
...
...
@@ -206,7 +206,7 @@ static ULONG WINAPI FontEventsDisp_Release(
return
1
;
}
static
BOOL
fonteventsdisp_invoke_called
=
FALSE
;
static
int
fonteventsdisp_invoke_called
=
0
;
static
HRESULT
WINAPI
FontEventsDisp_Invoke
(
IFontEventsDisp
__RPC_FAR
*
iface
,
...
...
@@ -226,7 +226,7 @@ static HRESULT WINAPI FontEventsDisp_Invoke(
ok
(
V_VT
(
&
pDispParams
->
rgvarg
[
0
])
==
VT_BSTR
,
"VT of first param should have been VT_BSTR instead of %d
\n
"
,
V_VT
(
&
pDispParams
->
rgvarg
[
0
]));
ok
(
!
lstrcmpW
(
V_BSTR
(
&
pDispParams
->
rgvarg
[
0
]),
wszBold
),
"String in first param should have been
\"
Bold
\"\n
"
);
fonteventsdisp_invoke_called
=
TRUE
;
fonteventsdisp_invoke_called
++
;
return
S_OK
;
}
...
...
@@ -246,6 +246,7 @@ static IFontEventsDisp FontEventsDisp = { &FontEventsDisp_Vtbl };
static
void
test_font_events_disp
(
void
)
{
IFont
*
pFont
;
IFont
*
pFont2
;
IConnectionPointContainer
*
pCPC
;
IConnectionPoint
*
pCP
;
FONTDESC
fontdesc
;
...
...
@@ -279,9 +280,19 @@ static void test_font_events_disp(void)
hr
=
IFont_put_Bold
(
pFont
,
TRUE
);
ok_ole_success
(
hr
,
"IFont_put_Bold"
);
ok
(
fonteventsdisp_invoke_called
,
"IFontEventDisp::Invoke wasn't called
\n
"
);
ok
(
fonteventsdisp_invoke_called
==
1
,
"IFontEventDisp::Invoke wasn't called once
\n
"
);
hr
=
IFont_Clone
(
pFont
,
&
pFont2
);
ok_ole_success
(
hr
,
"IFont_Clone"
);
IFont_Release
(
pFont
);
hr
=
IFont_put_Bold
(
pFont2
,
TRUE
);
ok_ole_success
(
hr
,
"IFont_put_Bold"
);
/* this test shows that the notification routine isn't called again */
ok
(
fonteventsdisp_invoke_called
==
1
,
"IFontEventDisp::Invoke wasn't called once
\n
"
);
IFont_Release
(
pFont2
);
}
START_TEST
(
olefont
)
...
...
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