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
c69be3bf
Commit
c69be3bf
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: Clean QueryInterface() method, turn impl. calls to interface calls.
parent
92054ef0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
20 deletions
+30
-20
olefont.c
dlls/oleaut32/olefont.c
+30
-20
No files found.
dlls/oleaut32/olefont.c
View file @
c69be3bf
...
...
@@ -476,32 +476,42 @@ static HRESULT WINAPI OLEFontImpl_QueryInterface(
*
ppvObject
=
0
;
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
)
)
*
ppvObject
=
this
;
if
(
IsEqualGUID
(
&
IID_IFont
,
riid
))
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
)
||
IsEqualGUID
(
&
IID_IFont
,
riid
))
{
*
ppvObject
=
this
;
if
(
IsEqualGUID
(
&
IID_IDispatch
,
riid
))
*
ppvObject
=
&
this
->
IDispatch_iface
;
if
(
IsEqualGUID
(
&
IID_IFontDisp
,
riid
))
}
else
if
(
IsEqualGUID
(
&
IID_IDispatch
,
riid
)
||
IsEqualGUID
(
&
IID_IFontDisp
,
riid
))
{
*
ppvObject
=
&
this
->
IDispatch_iface
;
if
(
IsEqualIID
(
&
IID_IPersist
,
riid
)
||
IsEqualGUID
(
&
IID_IPersistStream
,
riid
))
}
else
if
(
IsEqualGUID
(
&
IID_IPersist
,
riid
)
||
IsEqualGUID
(
&
IID_IPersistStream
,
riid
))
{
*
ppvObject
=
&
this
->
IPersistStream_iface
;
if
(
IsEqualGUID
(
&
IID_IConnectionPointContainer
,
riid
))
}
else
if
(
IsEqualGUID
(
&
IID_IConnectionPointContainer
,
riid
))
{
*
ppvObject
=
&
this
->
IConnectionPointContainer_iface
;
if
(
IsEqualGUID
(
&
IID_IPersistPropertyBag
,
riid
))
}
else
if
(
IsEqualGUID
(
&
IID_IPersistPropertyBag
,
riid
))
{
*
ppvObject
=
&
this
->
IPersistPropertyBag_iface
;
if
(
IsEqualGUID
(
&
IID_IPersistStreamInit
,
riid
))
}
else
if
(
IsEqualGUID
(
&
IID_IPersistStreamInit
,
riid
))
{
*
ppvObject
=
&
this
->
IPersistStreamInit_iface
;
}
/*
* Check that we obtained an interface.
*/
if
((
*
ppvObject
)
==
0
)
if
(
!*
ppvObject
)
{
FIXME
(
"() : asking for unsupported interface %s
\n
"
,
debugstr_guid
(
riid
));
FIXME
(
"() : asking for unsupported interface %s
\n
"
,
debugstr_guid
(
riid
));
return
E_NOINTERFACE
;
}
OLEFontImpl_AddRef
(
&
this
->
IFont_iface
);
IFont_AddRef
(
iface
);
return
S_OK
;
}
...
...
@@ -1124,7 +1134,7 @@ static HRESULT WINAPI OLEFontImpl_QueryTextMetrics(
HFONT
hOldFont
,
hNewFont
;
hdcRef
=
GetDC
(
0
);
OLEFontImpl
_get_hFont
(
iface
,
&
hNewFont
);
IFont
_get_hFont
(
iface
,
&
hNewFont
);
hOldFont
=
SelectObject
(
hdcRef
,
hNewFont
);
GetTextMetricsW
(
hdcRef
,
ptm
);
SelectObject
(
hdcRef
,
hOldFont
);
...
...
@@ -1304,7 +1314,7 @@ static HRESULT WINAPI OLEFontImpl_GetIDsOfNames(
if
(
cNames
==
0
)
return
E_INVALIDARG
;
hres
=
OLEFontImpl
_GetTypeInfo
(
iface
,
0
,
lcid
,
&
pTInfo
);
hres
=
IDispatch
_GetTypeInfo
(
iface
,
0
,
lcid
,
&
pTInfo
);
if
(
FAILED
(
hres
))
{
ERR
(
"GetTypeInfo failed.
\n
"
);
...
...
@@ -1484,7 +1494,7 @@ static HRESULT WINAPI OLEFontImpl_Invoke(
case
DISPID_FONT_SIZE
:
if
(
wFlags
&
DISPATCH_PROPERTYGET
)
{
V_VT
(
pVarResult
)
=
VT_CY
;
return
OLEFontImpl
_get_Size
(
&
this
->
IFont_iface
,
&
V_CY
(
pVarResult
));
return
IFont
_get_Size
(
&
this
->
IFont_iface
,
&
V_CY
(
pVarResult
));
}
else
{
VARIANTARG
vararg
;
...
...
@@ -1502,7 +1512,7 @@ static HRESULT WINAPI OLEFontImpl_Invoke(
case
DISPID_FONT_WEIGHT
:
if
(
wFlags
&
DISPATCH_PROPERTYGET
)
{
V_VT
(
pVarResult
)
=
VT_I2
;
return
OLEFontImpl
_get_Weight
(
&
this
->
IFont_iface
,
&
V_I2
(
pVarResult
));
return
IFont
_get_Weight
(
&
this
->
IFont_iface
,
&
V_I2
(
pVarResult
));
}
else
{
VARIANTARG
vararg
;
...
...
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