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
45eba514
Commit
45eba514
authored
Nov 06, 2004
by
Mike Hearn
Committed by
Alexandre Julliard
Nov 06, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support assigning font objects to other font objects.
parent
8d28e031
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
5 deletions
+33
-5
olefont.c
dlls/oleaut32/olefont.c
+33
-5
No files found.
dlls/oleaut32/olefont.c
View file @
45eba514
...
...
@@ -1210,7 +1210,7 @@ static HRESULT WINAPI OLEFontImpl_GetTypeInfo(
HRESULT
hres
;
_ICOM_THIS_From_IDispatch
(
OLEFontImpl
,
iface
);
TRACE
(
"(%p, iTInfo=%d, lcid=%04x, %p)
, unimplemented stub!
\n
"
,
this
,
iTInfo
,
(
int
)
lcid
,
ppTInfo
);
TRACE
(
"(%p, iTInfo=%d, lcid=%04x, %p)
\n
"
,
this
,
iTInfo
,
(
int
)
lcid
,
ppTInfo
);
if
(
iTInfo
!=
0
)
return
E_FAIL
;
hres
=
LoadTypeLib
(
stdole32tlb
,
&
tl
);
...
...
@@ -1276,11 +1276,36 @@ static HRESULT WINAPI OLEFontImpl_Invoke(
V_VT
(
pVarResult
)
=
VT_BSTR
;
return
OLEFontImpl_get_Name
(
this
,
&
V_BSTR
(
pVarResult
));
case
DISPATCH_PROPERTYPUT
:
{
BSTR
name
=
V_BSTR
(
&
pDispParams
->
rgvarg
[
0
]);
if
(
V_VT
(
&
pDispParams
->
rgvarg
[
0
])
!=
VT_BSTR
)
{
FIXME
(
"property put of Name, vt is not VT_BSTR but %d
\n
"
,
V_VT
(
&
pDispParams
->
rgvarg
[
0
]));
return
E_FAIL
;
BSTR
name
;
BOOL
freename
;
if
(
V_VT
(
&
pDispParams
->
rgvarg
[
0
])
==
VT_DISPATCH
)
{
IFont
*
font
;
HRESULT
hr
=
S_OK
;
hr
=
IUnknown_QueryInterface
(
V_DISPATCH
(
&
pDispParams
->
rgvarg
[
0
]),
&
IID_IFont
,
(
void
**
)
&
font
);
if
(
FAILED
(
hr
))
{
FIXME
(
"dispatch value for name property is not an OleFont, returning hr=0x%lx
\n
"
,
hr
);
return
hr
;
}
hr
=
IFont_get_Name
(
font
,
&
name
);
/* this allocates a new BSTR so free it later */
if
(
FAILED
(
hr
))
return
hr
;
IUnknown_Release
(
font
);
freename
=
TRUE
;
}
else
if
(
V_VT
(
&
pDispParams
->
rgvarg
[
0
])
==
VT_BSTR
)
{
name
=
V_BSTR
(
&
pDispParams
->
rgvarg
[
0
]);
freename
=
FALSE
;
}
else
{
FIXME
(
"app is trying to set name property with a non BSTR, non dispatch value. returning E_FAIL
\n
"
);
return
E_FAIL
;
}
TRACE
(
"name is %s
\n
"
,
debugstr_w
(
name
));
if
(
!
xthis
->
description
.
lpstrName
)
xthis
->
description
.
lpstrName
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
lstrlenW
(
name
)
+
1
)
*
sizeof
(
WCHAR
));
else
...
...
@@ -1289,6 +1314,9 @@ static HRESULT WINAPI OLEFontImpl_Invoke(
if
(
xthis
->
description
.
lpstrName
==
0
)
return
E_OUTOFMEMORY
;
strcpyW
(
xthis
->
description
.
lpstrName
,
name
);
if
(
freename
)
SysFreeString
(
name
);
return
S_OK
;
}
}
...
...
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