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
d0372b4e
Commit
d0372b4e
authored
Jan 23, 2003
by
Marcus Meissner
Committed by
Alexandre Julliard
Jan 23, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed ICOM_CALLs for IFont_xx methods.
Added IPersistPropertyBag, IPersistStreamInit interfaces with stubs. Implemented IDispatch::Invoke for the used DISPIDs.
parent
66b29b27
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
366 additions
and
79 deletions
+366
-79
olefont.c
dlls/oleaut32/olefont.c
+344
-55
obj_olefont.h
include/wine/obj_olefont.h
+22
-24
No files found.
dlls/oleaut32/olefont.c
View file @
d0372b4e
...
@@ -59,10 +59,12 @@ struct OLEFontImpl
...
@@ -59,10 +59,12 @@ struct OLEFontImpl
* The first two are supported by the first vtable, the next two are
* The first two are supported by the first vtable, the next two are
* supported by the second table and the last two have their own.
* supported by the second table and the last two have their own.
*/
*/
ICOM_VTABLE
(
IFont
)
*
lpvtbl1
;
ICOM_VTABLE
(
IFont
)
*
lpvtbl1
;
ICOM_VTABLE
(
IDispatch
)
*
lpvtbl2
;
ICOM_VTABLE
(
IDispatch
)
*
lpvtbl2
;
ICOM_VTABLE
(
IPersistStream
)
*
lpvtbl3
;
ICOM_VTABLE
(
IPersistStream
)
*
lpvtbl3
;
ICOM_VTABLE
(
IConnectionPointContainer
)
*
lpvtbl4
;
ICOM_VTABLE
(
IConnectionPointContainer
)
*
lpvtbl4
;
ICOM_VTABLE
(
IPersistPropertyBag
)
*
lpvtbl5
;
ICOM_VTABLE
(
IPersistStreamInit
)
*
lpvtbl6
;
/*
/*
* Reference count for that instance of the class.
* Reference count for that instance of the class.
*/
*/
...
@@ -98,10 +100,12 @@ struct OLEFontImpl
...
@@ -98,10 +100,12 @@ struct OLEFontImpl
* There is a version to accomodate all of the VTables implemented
* There is a version to accomodate all of the VTables implemented
* by this object.
* by this object.
*/
*/
#define _ICOM_THIS(class,name) class* this = (class*)name;
#define _ICOM_THIS(class,name) class* this = (class*)name
#define _ICOM_THIS_From_IDispatch(class, name) class* this = (class*)(((char*)name)-sizeof(void*));
#define _ICOM_THIS_From_IDispatch(class, name) class* this = (class*)(((char*)name)-sizeof(void*))
#define _ICOM_THIS_From_IPersistStream(class, name) class* this = (class*)(((char*)name)-2*sizeof(void*));
#define _ICOM_THIS_From_IPersistStream(class, name) class* this = (class*)(((char*)name)-2*sizeof(void*))
#define _ICOM_THIS_From_IConnectionPointContainer(class, name) class* this = (class*)(((char*)name)-3*sizeof(void*));
#define _ICOM_THIS_From_IConnectionPointContainer(class, name) class* this = (class*)(((char*)name)-3*sizeof(void*))
#define _ICOM_THIS_From_IPersistPropertyBag(class, name) class* this = (class*)(((char*)name)-4*sizeof(void*))
#define _ICOM_THIS_From_IPersistStreamInit(class, name) class* this = (class*)(((char*)name)-5*sizeof(void*))
/***********************************************************************
/***********************************************************************
...
@@ -280,6 +284,8 @@ static ICOM_VTABLE(IConnectionPointContainer)
...
@@ -280,6 +284,8 @@ static ICOM_VTABLE(IConnectionPointContainer)
OLEFontImpl_FindConnectionPoint
OLEFontImpl_FindConnectionPoint
};
};
static
ICOM_VTABLE
(
IPersistPropertyBag
)
OLEFontImpl_IPersistPropertyBag_VTable
;
static
ICOM_VTABLE
(
IPersistStreamInit
)
OLEFontImpl_IPersistStreamInit_VTable
;
/******************************************************************************
/******************************************************************************
* OleCreateFontIndirect [OLEAUT32.420]
* OleCreateFontIndirect [OLEAUT32.420]
*/
*/
...
@@ -340,8 +346,11 @@ static void OLEFont_SendNotify(OLEFontImpl* this, DISPID dispID)
...
@@ -340,8 +346,11 @@ static void OLEFont_SendNotify(OLEFontImpl* this, DISPID dispID)
{
{
IEnumConnections
*
pEnum
;
IEnumConnections
*
pEnum
;
CONNECTDATA
CD
;
CONNECTDATA
CD
;
HRESULT
hres
;
IConnectionPoint_EnumConnections
(
this
->
pCP
,
&
pEnum
);
hres
=
IConnectionPoint_EnumConnections
(
this
->
pCP
,
&
pEnum
);
if
(
FAILED
(
hres
))
/* When we have 0 connections. */
return
;
while
(
IEnumConnections_Next
(
pEnum
,
1
,
&
CD
,
NULL
)
==
S_OK
)
{
while
(
IEnumConnections_Next
(
pEnum
,
1
,
&
CD
,
NULL
)
==
S_OK
)
{
IPropertyNotifySink
*
sink
;
IPropertyNotifySink
*
sink
;
...
@@ -383,6 +392,8 @@ static OLEFontImpl* OLEFontImpl_Construct(LPFONTDESC fontDesc)
...
@@ -383,6 +392,8 @@ static OLEFontImpl* OLEFontImpl_Construct(LPFONTDESC fontDesc)
newObject
->
lpvtbl2
=
&
OLEFontImpl_IDispatch_VTable
;
newObject
->
lpvtbl2
=
&
OLEFontImpl_IDispatch_VTable
;
newObject
->
lpvtbl3
=
&
OLEFontImpl_IPersistStream_VTable
;
newObject
->
lpvtbl3
=
&
OLEFontImpl_IPersistStream_VTable
;
newObject
->
lpvtbl4
=
&
OLEFontImpl_IConnectionPointContainer_VTable
;
newObject
->
lpvtbl4
=
&
OLEFontImpl_IConnectionPointContainer_VTable
;
newObject
->
lpvtbl5
=
&
OLEFontImpl_IPersistPropertyBag_VTable
;
newObject
->
lpvtbl6
=
&
OLEFontImpl_IPersistStreamInit_VTable
;
/*
/*
* Start with one reference count. The caller of this function
* Start with one reference count. The caller of this function
...
@@ -412,11 +423,9 @@ static OLEFontImpl* OLEFontImpl_Construct(LPFONTDESC fontDesc)
...
@@ -412,11 +423,9 @@ static OLEFontImpl* OLEFontImpl_Construct(LPFONTDESC fontDesc)
*/
*/
newObject
->
gdiFont
=
0
;
newObject
->
gdiFont
=
0
;
newObject
->
fontLock
=
0
;
newObject
->
fontLock
=
0
;
newObject
->
cyHimetric
=
1
;
newObject
->
cyLogical
=
72L
;
newObject
->
cyLogical
=
1
;
newObject
->
cyHimetric
=
2540L
;
CreateConnectionPoint
((
IUnknown
*
)
newObject
,
&
IID_IPropertyNotifySink
,
&
newObject
->
pCP
);
CreateConnectionPoint
((
IUnknown
*
)
newObject
,
&
IID_IPropertyNotifySink
,
&
newObject
->
pCP
);
TRACE
(
"returning %p
\n
"
,
newObject
);
TRACE
(
"returning %p
\n
"
,
newObject
);
return
newObject
;
return
newObject
;
}
}
...
@@ -468,47 +477,32 @@ HRESULT WINAPI OLEFontImpl_QueryInterface(
...
@@ -468,47 +477,32 @@ HRESULT WINAPI OLEFontImpl_QueryInterface(
/*
/*
* Compare the riid with the interface IDs implemented by this object.
* Compare the riid with the interface IDs implemented by this object.
*/
*/
if
(
memcmp
(
&
IID_IUnknown
,
riid
,
sizeof
(
IID_IUnknown
))
==
0
)
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
))
{
*
ppvObject
=
(
IFont
*
)
this
;
*
ppvObject
=
(
IFont
*
)
this
;
}
if
(
IsEqualGUID
(
&
IID_IFont
,
riid
))
else
if
(
memcmp
(
&
IID_IFont
,
riid
,
sizeof
(
IID_IFont
))
==
0
)
{
*
ppvObject
=
(
IFont
*
)
this
;
*
ppvObject
=
(
IFont
*
)
this
;
}
if
(
IsEqualGUID
(
&
IID_IDispatch
,
riid
))
else
if
(
memcmp
(
&
IID_IDispatch
,
riid
,
sizeof
(
IID_IDispatch
))
==
0
)
{
*
ppvObject
=
(
IDispatch
*
)
&
(
this
->
lpvtbl2
);
*
ppvObject
=
(
IDispatch
*
)
&
(
this
->
lpvtbl2
);
}
if
(
IsEqualGUID
(
&
IID_IFontDisp
,
riid
))
else
if
(
memcmp
(
&
IID_IFontDisp
,
riid
,
sizeof
(
IID_IFontDisp
))
==
0
)
{
*
ppvObject
=
(
IDispatch
*
)
&
(
this
->
lpvtbl2
);
*
ppvObject
=
(
IDispatch
*
)
&
(
this
->
lpvtbl2
);
}
if
(
IsEqualGUID
(
&
IID_IPersistStream
,
riid
))
else
if
(
memcmp
(
&
IID_IPersistStream
,
riid
,
sizeof
(
IID_IPersistStream
))
==
0
)
{
*
ppvObject
=
(
IPersistStream
*
)
&
(
this
->
lpvtbl3
);
*
ppvObject
=
(
IPersistStream
*
)
&
(
this
->
lpvtbl3
);
}
if
(
IsEqualGUID
(
&
IID_IConnectionPointContainer
,
riid
))
else
if
(
memcmp
(
&
IID_IConnectionPointContainer
,
riid
,
*
ppvObject
=
(
IConnectionPointContainer
*
)
&
(
this
->
lpvtbl4
);
sizeof
(
IID_IConnectionPointContainer
))
==
0
)
if
(
IsEqualGUID
(
&
IID_IPersistPropertyBag
,
riid
)
)
{
*
ppvObject
=
(
IPersistPropertyBag
*
)
&
(
this
->
lpvtbl5
);
*
ppvObject
=
(
IPersistStream
*
)
&
(
this
->
lpvtbl4
);
if
(
IsEqualGUID
(
&
IID_IPersistStreamInit
,
riid
))
}
*
ppvObject
=
(
IPersistStreamInit
*
)
&
(
this
->
lpvtbl6
);
/*
/*
* Check that we obtained an interface.
* Check that we obtained an interface.
*/
*/
if
((
*
ppvObject
)
==
0
)
if
((
*
ppvObject
)
==
0
)
{
{
FIXME
(
"() : asking for un
supported interface %s
\n
"
,
debugstr_guid
(
riid
));
FIXME
(
"() : asking for unsupported interface %s
\n
"
,
debugstr_guid
(
riid
));
return
E_NOINTERFACE
;
return
E_NOINTERFACE
;
}
}
/*
* Query Interface always increases the reference count by one when it is
* successful
*/
OLEFontImpl_AddRef
((
IFont
*
)
this
);
OLEFontImpl_AddRef
((
IFont
*
)
this
);
return
S_OK
;
return
S_OK
;
}
}
...
@@ -932,13 +926,12 @@ static HRESULT WINAPI OLEFontImpl_get_hFont(
...
@@ -932,13 +926,12 @@ static HRESULT WINAPI OLEFontImpl_get_hFont(
*/
*/
IFont_get_Size
(
iface
,
&
cySize
);
IFont_get_Size
(
iface
,
&
cySize
);
fontHeight
=
MulDiv
(
cySize
.
s
.
Lo
,
2540L
,
72L
);
fontHeight
=
MulDiv
(
cySize
.
s
.
Lo
,
this
->
cyLogical
,
this
->
cyHimetric
);
fontHeight
=
MulDiv
(
fontHeight
,
this
->
cyLogical
,
this
->
cyHimetric
);
memset
(
&
logFont
,
0
,
sizeof
(
LOGFONTW
));
memset
(
&
logFont
,
0
,
sizeof
(
LOGFONTW
));
logFont
.
lfHeight
=
((
fontHeight
%
10000L
)
>
5000L
)
?
(
-
fontHeight
/
10000L
)
-
1
:
logFont
.
lfHeight
=
((
fontHeight
%
10000L
)
>
5000L
)
?
(
-
fontHeight
/
10000L
)
-
1
:
(
-
fontHeight
/
10000L
);
(
-
fontHeight
/
10000L
);
logFont
.
lfItalic
=
this
->
description
.
fItalic
;
logFont
.
lfItalic
=
this
->
description
.
fItalic
;
logFont
.
lfUnderline
=
this
->
description
.
fUnderline
;
logFont
.
lfUnderline
=
this
->
description
.
fUnderline
;
logFont
.
lfStrikeOut
=
this
->
description
.
fStrikethrough
;
logFont
.
lfStrikeOut
=
this
->
description
.
fStrikethrough
;
...
@@ -1000,8 +993,7 @@ static HRESULT WINAPI OLEFontImpl_Clone(
...
@@ -1000,8 +993,7 @@ static HRESULT WINAPI OLEFontImpl_Clone(
/* We need to clone the HFONT too. This is just cut & paste from above */
/* We need to clone the HFONT too. This is just cut & paste from above */
IFont_get_Size
(
iface
,
&
cySize
);
IFont_get_Size
(
iface
,
&
cySize
);
fontHeight
=
MulDiv
(
cySize
.
s
.
Lo
,
2540L
,
72L
);
fontHeight
=
MulDiv
(
cySize
.
s
.
Lo
,
this
->
cyLogical
,
this
->
cyHimetric
);
fontHeight
=
MulDiv
(
fontHeight
,
this
->
cyLogical
,
this
->
cyHimetric
);
memset
(
&
logFont
,
0
,
sizeof
(
LOGFONTW
));
memset
(
&
logFont
,
0
,
sizeof
(
LOGFONTW
));
...
@@ -1038,7 +1030,7 @@ static HRESULT WINAPI OLEFontImpl_IsEqual(
...
@@ -1038,7 +1030,7 @@ static HRESULT WINAPI OLEFontImpl_IsEqual(
IFont
*
iface
,
IFont
*
iface
,
IFont
*
pFontOther
)
IFont
*
pFontOther
)
{
{
FIXME
(
"(
):Stub
\n
"
);
FIXME
(
"(
%p, %p), stub!
\n
"
,
iface
,
pFontOther
);
return
E_NOTIMPL
;
return
E_NOTIMPL
;
}
}
...
@@ -1070,7 +1062,7 @@ static HRESULT WINAPI OLEFontImpl_QueryTextMetrics(
...
@@ -1070,7 +1062,7 @@ static HRESULT WINAPI OLEFontImpl_QueryTextMetrics(
IFont
*
iface
,
IFont
*
iface
,
TEXTMETRICOLE
*
ptm
)
TEXTMETRICOLE
*
ptm
)
{
{
FIXME
(
"(
):Stub
\n
"
);
FIXME
(
"(
%p, %p), stub!
\n
"
,
iface
,
ptm
);
return
E_NOTIMPL
;
return
E_NOTIMPL
;
}
}
...
@@ -1206,10 +1198,24 @@ static HRESULT WINAPI OLEFontImpl_GetTypeInfo(
...
@@ -1206,10 +1198,24 @@ static HRESULT WINAPI OLEFontImpl_GetTypeInfo(
LCID
lcid
,
LCID
lcid
,
ITypeInfo
**
ppTInfo
)
ITypeInfo
**
ppTInfo
)
{
{
_ICOM_THIS_From_IDispatch
(
IFont
,
iface
);
WCHAR
stdole32tlb
[]
=
{
's'
,
't'
,
'd'
,
'o'
,
'l'
,
'e'
,
'3'
,
'2'
,
'.'
,
't'
,
'l'
,
'b'
,
0
};
FIXME
(
"(%p):Stub
\n
"
,
this
);
ITypeLib
*
tl
;
HRESULT
hres
;
return
E_NOTIMPL
;
_ICOM_THIS_From_IDispatch
(
OLEFontImpl
,
iface
);
TRACE
(
"(%p, iTInfo=%d, lcid=%04x, %p), unimplemented stub!
\n
"
,
this
,
iTInfo
,
(
int
)
lcid
,
ppTInfo
);
if
(
iTInfo
!=
0
)
return
E_FAIL
;
hres
=
LoadTypeLib
(
stdole32tlb
,
&
tl
);
if
(
FAILED
(
hres
))
{
FIXME
(
"Could not load the stdole32.tlb?
\n
"
);
return
hres
;
}
hres
=
ITypeLib_GetTypeInfoOfGuid
(
tl
,
&
IID_IDispatch
,
ppTInfo
);
if
(
FAILED
(
hres
))
{
FIXME
(
"Did not IDispatch typeinfo from typelib, hres %lx
\n
"
,
hres
);
}
return
hres
;
}
}
/************************************************************************
/************************************************************************
...
@@ -1226,8 +1232,9 @@ static HRESULT WINAPI OLEFontImpl_GetIDsOfNames(
...
@@ -1226,8 +1232,9 @@ static HRESULT WINAPI OLEFontImpl_GetIDsOfNames(
DISPID
*
rgDispId
)
DISPID
*
rgDispId
)
{
{
_ICOM_THIS_From_IDispatch
(
IFont
,
iface
);
_ICOM_THIS_From_IDispatch
(
IFont
,
iface
);
FIXME
(
"(%p):Stub
\n
"
,
this
);
FIXME
(
"(%p,%s,%p,%d,%04x,%p), stub!
\n
"
,
this
,
debugstr_guid
(
riid
),
rgszNames
,
cNames
,
(
int
)
lcid
,
rgDispId
);
return
E_NOTIMPL
;
return
E_NOTIMPL
;
}
}
...
@@ -1235,6 +1242,10 @@ static HRESULT WINAPI OLEFontImpl_GetIDsOfNames(
...
@@ -1235,6 +1242,10 @@ static HRESULT WINAPI OLEFontImpl_GetIDsOfNames(
* OLEFontImpl_Invoke (IDispatch)
* OLEFontImpl_Invoke (IDispatch)
*
*
* See Windows documentation for more details on IDispatch methods.
* See Windows documentation for more details on IDispatch methods.
*
* Note: Do not call _put_Xxx methods, since setting things here
* should not call notify functions as I found out debugging the generic
* MS VB5 installer.
*/
*/
static
HRESULT
WINAPI
OLEFontImpl_Invoke
(
static
HRESULT
WINAPI
OLEFontImpl_Invoke
(
IDispatch
*
iface
,
IDispatch
*
iface
,
...
@@ -1248,8 +1259,137 @@ static HRESULT WINAPI OLEFontImpl_Invoke(
...
@@ -1248,8 +1259,137 @@ static HRESULT WINAPI OLEFontImpl_Invoke(
UINT
*
puArgErr
)
UINT
*
puArgErr
)
{
{
_ICOM_THIS_From_IDispatch
(
IFont
,
iface
);
_ICOM_THIS_From_IDispatch
(
IFont
,
iface
);
FIXME
(
"%p->(%ld,%s,%lx,%x), stub!
\n
"
,
this
,
dispIdMember
,
debugstr_guid
(
riid
),
lcid
,
OLEFontImpl
*
xthis
=
(
OLEFontImpl
*
)
this
;
wFlags
switch
(
dispIdMember
)
{
case
DISPID_FONT_NAME
:
switch
(
wFlags
)
{
case
DISPATCH_PROPERTYGET
:
case
DISPATCH_PROPERTYGET
|
DISPATCH_METHOD
:
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
;
}
if
(
!
xthis
->
description
.
lpstrName
)
xthis
->
description
.
lpstrName
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
lstrlenW
(
name
)
+
1
)
*
sizeof
(
WCHAR
));
else
xthis
->
description
.
lpstrName
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
xthis
->
description
.
lpstrName
,
(
lstrlenW
(
name
)
+
1
)
*
sizeof
(
WCHAR
));
if
(
xthis
->
description
.
lpstrName
==
0
)
return
E_OUTOFMEMORY
;
strcpyW
(
xthis
->
description
.
lpstrName
,
name
);
return
S_OK
;
}
}
break
;
case
DISPID_FONT_BOLD
:
switch
(
wFlags
)
{
case
DISPATCH_PROPERTYGET
:
case
DISPATCH_PROPERTYGET
|
DISPATCH_METHOD
:
V_VT
(
pVarResult
)
=
VT_BOOL
;
return
OLEFontImpl_get_Bold
(
this
,
(
BOOL
*
)
&
V_BOOL
(
pVarResult
));
case
DISPATCH_PROPERTYPUT
:
if
(
V_VT
(
&
pDispParams
->
rgvarg
[
0
])
!=
VT_BOOL
)
{
FIXME
(
"DISPID_FONT_BOLD/put, vt is %d, not VT_BOOL.
\n
"
,
V_VT
(
&
pDispParams
->
rgvarg
[
0
]));
return
E_FAIL
;
}
else
{
xthis
->
description
.
sWeight
=
V_BOOL
(
&
pDispParams
->
rgvarg
[
0
])
?
FW_BOLD
:
FW_NORMAL
;
return
S_OK
;
}
}
break
;
case
DISPID_FONT_ITALIC
:
switch
(
wFlags
)
{
case
DISPATCH_PROPERTYGET
:
case
DISPATCH_PROPERTYGET
|
DISPATCH_METHOD
:
V_VT
(
pVarResult
)
=
VT_BOOL
;
return
OLEFontImpl_get_Italic
(
this
,
(
BOOL
*
)
&
V_BOOL
(
pVarResult
));
case
DISPATCH_PROPERTYPUT
:
if
(
V_VT
(
&
pDispParams
->
rgvarg
[
0
])
!=
VT_BOOL
)
{
FIXME
(
"DISPID_FONT_ITALIC/put, vt is %d, not VT_BOOL.
\n
"
,
V_VT
(
&
pDispParams
->
rgvarg
[
0
]));
return
E_FAIL
;
}
else
{
xthis
->
description
.
fItalic
=
V_BOOL
(
&
pDispParams
->
rgvarg
[
0
]);
return
S_OK
;
}
}
break
;
case
DISPID_FONT_UNDER
:
switch
(
wFlags
)
{
case
DISPATCH_PROPERTYGET
:
case
DISPATCH_PROPERTYGET
|
DISPATCH_METHOD
:
V_VT
(
pVarResult
)
=
VT_BOOL
;
return
OLEFontImpl_get_Underline
(
this
,
(
BOOL
*
)
&
V_BOOL
(
pVarResult
));
case
DISPATCH_PROPERTYPUT
:
if
(
V_VT
(
&
pDispParams
->
rgvarg
[
0
])
!=
VT_BOOL
)
{
FIXME
(
"DISPID_FONT_UNDER/put, vt is %d, not VT_BOOL.
\n
"
,
V_VT
(
&
pDispParams
->
rgvarg
[
0
]));
return
E_FAIL
;
}
else
{
xthis
->
description
.
fUnderline
=
V_BOOL
(
&
pDispParams
->
rgvarg
[
0
]);
return
S_OK
;
}
}
break
;
case
DISPID_FONT_STRIKE
:
switch
(
wFlags
)
{
case
DISPATCH_PROPERTYGET
:
case
DISPATCH_PROPERTYGET
|
DISPATCH_METHOD
:
V_VT
(
pVarResult
)
=
VT_BOOL
;
return
OLEFontImpl_get_Strikethrough
(
this
,
(
BOOL
*
)
&
V_BOOL
(
pVarResult
));
case
DISPATCH_PROPERTYPUT
:
if
(
V_VT
(
&
pDispParams
->
rgvarg
[
0
])
!=
VT_BOOL
)
{
FIXME
(
"DISPID_FONT_STRIKE/put, vt is %d, not VT_BOOL.
\n
"
,
V_VT
(
&
pDispParams
->
rgvarg
[
0
]));
return
E_FAIL
;
}
else
{
xthis
->
description
.
fStrikethrough
=
V_BOOL
(
&
pDispParams
->
rgvarg
[
0
]);
return
S_OK
;
}
}
break
;
case
DISPID_FONT_SIZE
:
switch
(
wFlags
)
{
case
DISPATCH_PROPERTYPUT
:
{
assert
(
pDispParams
->
cArgs
==
1
);
xthis
->
description
.
cySize
.
s
.
Hi
=
0
;
if
(
V_VT
(
&
pDispParams
->
rgvarg
[
0
])
!=
VT_CY
)
{
if
(
V_VT
(
&
pDispParams
->
rgvarg
[
0
])
==
VT_I2
)
{
xthis
->
description
.
cySize
.
s
.
Lo
=
V_I2
(
&
pDispParams
->
rgvarg
[
0
])
*
10000
;
}
else
{
FIXME
(
"property put for Size with vt %d unsupported!
\n
"
,
V_VT
(
&
pDispParams
->
rgvarg
[
0
]));
}
}
else
{
xthis
->
description
.
cySize
.
s
.
Lo
=
V_CY
(
&
pDispParams
->
rgvarg
[
0
]).
s
.
Lo
;
}
return
S_OK
;
}
case
DISPATCH_PROPERTYGET
:
case
DISPATCH_PROPERTYGET
|
DISPATCH_METHOD
:
V_VT
(
pVarResult
)
=
VT_CY
;
return
OLEFontImpl_get_Size
(
this
,
&
V_CY
(
pVarResult
));
}
break
;
case
DISPID_FONT_CHARSET
:
switch
(
wFlags
)
{
case
DISPATCH_PROPERTYPUT
:
assert
(
pDispParams
->
cArgs
==
1
);
if
(
V_VT
(
&
pDispParams
->
rgvarg
[
0
])
!=
VT_I2
)
FIXME
(
"varg of first disparg is not VT_I2, but %d
\n
"
,
V_VT
(
&
pDispParams
->
rgvarg
[
0
]));
xthis
->
description
.
sCharset
=
V_I2
(
&
pDispParams
->
rgvarg
[
0
]);
return
S_OK
;
case
DISPATCH_PROPERTYGET
:
case
DISPATCH_PROPERTYGET
|
DISPATCH_METHOD
:
V_VT
(
pVarResult
)
=
VT_I2
;
return
OLEFontImpl_get_Charset
(
this
,
&
V_I2
(
pVarResult
));
}
break
;
}
FIXME
(
"%p->(%ld,%s,%lx,%x,%p,%p,%p,%p), unhandled dispid/flag!
\n
"
,
this
,
dispIdMember
,
debugstr_guid
(
riid
),
lcid
,
wFlags
,
pDispParams
,
pVarResult
,
pExepInfo
,
puArgErr
);
);
return
S_OK
;
return
S_OK
;
}
}
...
@@ -1304,6 +1444,7 @@ static HRESULT WINAPI OLEFontImpl_GetClassID(
...
@@ -1304,6 +1444,7 @@ static HRESULT WINAPI OLEFontImpl_GetClassID(
IPersistStream
*
iface
,
IPersistStream
*
iface
,
CLSID
*
pClassID
)
CLSID
*
pClassID
)
{
{
TRACE
(
"(%p,%p)
\n
"
,
iface
,
pClassID
);
if
(
pClassID
==
0
)
if
(
pClassID
==
0
)
return
E_POINTER
;
return
E_POINTER
;
...
@@ -1320,6 +1461,7 @@ static HRESULT WINAPI OLEFontImpl_GetClassID(
...
@@ -1320,6 +1461,7 @@ static HRESULT WINAPI OLEFontImpl_GetClassID(
static
HRESULT
WINAPI
OLEFontImpl_IsDirty
(
static
HRESULT
WINAPI
OLEFontImpl_IsDirty
(
IPersistStream
*
iface
)
IPersistStream
*
iface
)
{
{
TRACE
(
"(%p)
\n
"
,
iface
);
return
S_OK
;
return
S_OK
;
}
}
...
@@ -1642,6 +1784,153 @@ static HRESULT WINAPI OLEFontImpl_FindConnectionPoint(
...
@@ -1642,6 +1784,153 @@ static HRESULT WINAPI OLEFontImpl_FindConnectionPoint(
}
}
}
}
/************************************************************************
* OLEFontImpl implementation of IPersistPropertyBag.
*/
static
HRESULT
WINAPI
OLEFontImpl_IPersistPropertyBag_QueryInterface
(
IPersistPropertyBag
*
iface
,
REFIID
riid
,
LPVOID
*
ppvObj
)
{
_ICOM_THIS_From_IPersistPropertyBag
(
IFont
,
iface
);
return
IFont_QueryInterface
(
this
,
riid
,
ppvObj
);
}
static
ULONG
WINAPI
OLEFontImpl_IPersistPropertyBag_AddRef
(
IPersistPropertyBag
*
iface
)
{
_ICOM_THIS_From_IPersistPropertyBag
(
IFont
,
iface
);
return
IFont_AddRef
(
this
);
}
static
ULONG
WINAPI
OLEFontImpl_IPersistPropertyBag_Release
(
IPersistPropertyBag
*
iface
)
{
_ICOM_THIS_From_IPersistPropertyBag
(
IFont
,
iface
);
return
IFont_Release
(
this
);
}
static
HRESULT
WINAPI
OLEFontImpl_IPersistPropertyBag_GetClassID
(
IPersistPropertyBag
*
iface
,
CLSID
*
classid
)
{
FIXME
(
"(%p,%p), stub!
\n
"
,
iface
,
classid
);
return
E_FAIL
;
}
static
HRESULT
WINAPI
OLEFontImpl_IPersistPropertyBag_InitNew
(
IPersistPropertyBag
*
iface
)
{
FIXME
(
"(%p), stub!
\n
"
,
iface
);
return
S_OK
;
}
static
HRESULT
WINAPI
OLEFontImpl_IPersistPropertyBag_Load
(
IPersistPropertyBag
*
iface
,
IPropertyBag
*
pPropBag
,
IErrorLog
*
pErrorLog
)
{
FIXME
(
"(%p,%p,%p), stub!
\n
"
,
iface
,
pPropBag
,
pErrorLog
);
return
E_FAIL
;
}
static
HRESULT
WINAPI
OLEFontImpl_IPersistPropertyBag_Save
(
IPersistPropertyBag
*
iface
,
IPropertyBag
*
pPropBag
,
BOOL
fClearDirty
,
BOOL
fSaveAllProperties
)
{
FIXME
(
"(%p,%p,%d,%d), stub!
\n
"
,
iface
,
pPropBag
,
fClearDirty
,
fSaveAllProperties
);
return
E_FAIL
;
}
static
ICOM_VTABLE
(
IPersistPropertyBag
)
OLEFontImpl_IPersistPropertyBag_VTable
=
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
OLEFontImpl_IPersistPropertyBag_QueryInterface
,
OLEFontImpl_IPersistPropertyBag_AddRef
,
OLEFontImpl_IPersistPropertyBag_Release
,
OLEFontImpl_IPersistPropertyBag_GetClassID
,
OLEFontImpl_IPersistPropertyBag_InitNew
,
OLEFontImpl_IPersistPropertyBag_Load
,
OLEFontImpl_IPersistPropertyBag_Save
};
/************************************************************************
* OLEFontImpl implementation of IPersistStreamInit.
*/
static
HRESULT
WINAPI
OLEFontImpl_IPersistStreamInit_QueryInterface
(
IPersistStreamInit
*
iface
,
REFIID
riid
,
LPVOID
*
ppvObj
)
{
_ICOM_THIS_From_IPersistStreamInit
(
IFont
,
iface
);
return
IFont_QueryInterface
(
this
,
riid
,
ppvObj
);
}
static
ULONG
WINAPI
OLEFontImpl_IPersistStreamInit_AddRef
(
IPersistStreamInit
*
iface
)
{
_ICOM_THIS_From_IPersistStreamInit
(
IFont
,
iface
);
return
IFont_AddRef
(
this
);
}
static
ULONG
WINAPI
OLEFontImpl_IPersistStreamInit_Release
(
IPersistStreamInit
*
iface
)
{
_ICOM_THIS_From_IPersistStreamInit
(
IFont
,
iface
);
return
IFont_Release
(
this
);
}
static
HRESULT
WINAPI
OLEFontImpl_IPersistStreamInit_GetClassID
(
IPersistStreamInit
*
iface
,
CLSID
*
classid
)
{
FIXME
(
"(%p,%p), stub!
\n
"
,
iface
,
classid
);
return
E_FAIL
;
}
static
HRESULT
WINAPI
OLEFontImpl_IPersistStreamInit_IsDirty
(
IPersistStreamInit
*
iface
)
{
FIXME
(
"(%p), stub!
\n
"
,
iface
);
return
E_FAIL
;
}
static
HRESULT
WINAPI
OLEFontImpl_IPersistStreamInit_Load
(
IPersistStreamInit
*
iface
,
LPSTREAM
pStm
)
{
FIXME
(
"(%p,%p), stub!
\n
"
,
iface
,
pStm
);
return
E_FAIL
;
}
static
HRESULT
WINAPI
OLEFontImpl_IPersistStreamInit_Save
(
IPersistStreamInit
*
iface
,
LPSTREAM
pStm
,
BOOL
fClearDirty
)
{
FIXME
(
"(%p,%p,%d), stub!
\n
"
,
iface
,
pStm
,
fClearDirty
);
return
E_FAIL
;
}
static
HRESULT
WINAPI
OLEFontImpl_IPersistStreamInit_GetSizeMax
(
IPersistStreamInit
*
iface
,
ULARGE_INTEGER
*
pcbSize
)
{
FIXME
(
"(%p,%p), stub!
\n
"
,
iface
,
pcbSize
);
return
E_FAIL
;
}
static
HRESULT
WINAPI
OLEFontImpl_IPersistStreamInit_InitNew
(
IPersistStreamInit
*
iface
)
{
FIXME
(
"(%p), stub!
\n
"
,
iface
);
return
S_OK
;
}
static
ICOM_VTABLE
(
IPersistStreamInit
)
OLEFontImpl_IPersistStreamInit_VTable
=
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
OLEFontImpl_IPersistStreamInit_QueryInterface
,
OLEFontImpl_IPersistStreamInit_AddRef
,
OLEFontImpl_IPersistStreamInit_Release
,
OLEFontImpl_IPersistStreamInit_GetClassID
,
OLEFontImpl_IPersistStreamInit_IsDirty
,
OLEFontImpl_IPersistStreamInit_Load
,
OLEFontImpl_IPersistStreamInit_Save
,
OLEFontImpl_IPersistStreamInit_GetSizeMax
,
OLEFontImpl_IPersistStreamInit_InitNew
};
/*******************************************************************************
/*******************************************************************************
* StdFont ClassFactory
* StdFont ClassFactory
*/
*/
...
...
include/wine/obj_olefont.h
View file @
d0372b4e
...
@@ -82,27 +82,27 @@ ICOM_DEFINE(IFont,IUnknown)
...
@@ -82,27 +82,27 @@ ICOM_DEFINE(IFont,IUnknown)
#define IFont_putName(p,a) ICOM_CALL1(put_Name,p,a)
#define IFont_putName(p,a) ICOM_CALL1(put_Name,p,a)
#define IFont_get_Size(p,a) ICOM_CALL1(get_Size,p,a)
#define IFont_get_Size(p,a) ICOM_CALL1(get_Size,p,a)
#define IFont_put_Size(p,a) ICOM_CALL1(put_Size,p,a)
#define IFont_put_Size(p,a) ICOM_CALL1(put_Size,p,a)
#define IFont_get_Bold(p,a) ICOM_CALL1(get_Bold,a)
#define IFont_get_Bold(p,a) ICOM_CALL1(get_Bold,
p,
a)
#define IFont_put_Bold(p,a) ICOM_CALL1(put_Bold,a)
#define IFont_put_Bold(p,a) ICOM_CALL1(put_Bold,
p,
a)
#define IFont_get_Italic(p,a) ICOM_CALL1(get_Italic,a)
#define IFont_get_Italic(p,a) ICOM_CALL1(get_Italic,
p,
a)
#define IFont_put_Italic(p,a) ICOM_CALL1(put_Italic,a)
#define IFont_put_Italic(p,a) ICOM_CALL1(put_Italic,
p,
a)
#define IFont_get_Underline(p,a) ICOM_CALL1(get_Underline,a)
#define IFont_get_Underline(p,a) ICOM_CALL1(get_Underline,
p,
a)
#define IFont_put_Underline(p,a) ICOM_CALL1(put_Underline,a)
#define IFont_put_Underline(p,a) ICOM_CALL1(put_Underline,
p,
a)
#define IFont_get_Strikethrough(p,a) ICOM_CALL1(get_Strikethrough,a)
#define IFont_get_Strikethrough(p,a) ICOM_CALL1(get_Strikethrough,
p,
a)
#define IFont_put_Strikethrough(p,a) ICOM_CALL1(put_Strikethrough,a)
#define IFont_put_Strikethrough(p,a) ICOM_CALL1(put_Strikethrough,
p,
a)
#define IFont_get_Weight(p,a) ICOM_CALL1(get_Weight,a)
#define IFont_get_Weight(p,a) ICOM_CALL1(get_Weight,
p,
a)
#define IFont_put_Weight(p,a) ICOM_CALL1(put_Weight,a)
#define IFont_put_Weight(p,a) ICOM_CALL1(put_Weight,
p,
a)
#define IFont_get_Charset(p,a) ICOM_CALL1(get_Charset,a)
#define IFont_get_Charset(p,a) ICOM_CALL1(get_Charset,
p,
a)
#define IFont_put_Charset(p,a) ICOM_CALL1(put_Charset,a)
#define IFont_put_Charset(p,a) ICOM_CALL1(put_Charset,
p,
a)
#define IFont_get_hFont(p,a) ICOM_CALL1(get_hFont,a)
#define IFont_get_hFont(p,a) ICOM_CALL1(get_hFont,
p,
a)
#define IFont_put_hFont(p,a) ICOM_CALL1(put_hFont,a)
#define IFont_put_hFont(p,a) ICOM_CALL1(put_hFont,
p,
a)
#define IFont_Clone(p,a) ICOM_CALL1(Clone,a)
#define IFont_Clone(p,a) ICOM_CALL1(Clone,
p,
a)
#define IFont_IsEqual(p,a) ICOM_CALL1(IsEqual,a)
#define IFont_IsEqual(p,a) ICOM_CALL1(IsEqual,
p,
a)
#define IFont_SetRatio(p,a,b) ICOM_CALL2(SetRatio,a,b)
#define IFont_SetRatio(p,a,b) ICOM_CALL2(SetRatio,
p,
a,b)
#define IFont_QueryTextMetrics(p,a) ICOM_CALL1(QueryTextMetrics,a)
#define IFont_QueryTextMetrics(p,a) ICOM_CALL1(QueryTextMetrics,
p,
a)
#define IFont_AddRefHfont(p,a) ICOM_CALL1(AddRefHfont,a)
#define IFont_AddRefHfont(p,a) ICOM_CALL1(AddRefHfont,
p,
a)
#define IFont_ReleaseHfont(p,a) ICOM_CALL1(ReleaseHfont,a)
#define IFont_ReleaseHfont(p,a) ICOM_CALL1(ReleaseHfont,
p,
a)
#define IFont_SetHdc(p,a) ICOM_CALL1(SetHdc,a)
#define IFont_SetHdc(p,a) ICOM_CALL1(SetHdc,
p,
a)
/*****************************************************************************
/*****************************************************************************
* IFont interface
* IFont interface
...
@@ -121,7 +121,7 @@ ICOM_DEFINE(IFontDisp,IDispatch)
...
@@ -121,7 +121,7 @@ ICOM_DEFINE(IFontDisp,IDispatch)
#define IFontDisp_Release(p) ICOM_CALL (Release,p)
#define IFontDisp_Release(p) ICOM_CALL (Release,p)
/*** IDispatch methods ***/
/*** IDispatch methods ***/
#define IFontDisp_GetTypeInfoCount(p,a) ICOM_CALL1 (GetTypeInfoCount,p,a)
#define IFontDisp_GetTypeInfoCount(p,a) ICOM_CALL1 (GetTypeInfoCount,p,a)
#define IFontDisp_GetTypeInfo(p,a,b,c) ICOM_CALL3 (GetTypeInfo,p,b,c)
#define IFontDisp_GetTypeInfo(p,a,b,c) ICOM_CALL3 (GetTypeInfo,p,
a,
b,c)
#define IFontDisp_GetIDsOfNames(p,a,b,c,d,e) ICOM_CALL5 (GetIDsOfNames,p,a,b,c,d,e)
#define IFontDisp_GetIDsOfNames(p,a,b,c,d,e) ICOM_CALL5 (GetIDsOfNames,p,a,b,c,d,e)
#define IFontDisp_Invoke(p,a,b,c,d,e,f,g,h) ICOM_CALL8 (Invoke,p,a,b,c,d,e,f,g,h)
#define IFontDisp_Invoke(p,a,b,c,d,e,f,g,h) ICOM_CALL8 (Invoke,p,a,b,c,d,e,f,g,h)
/*** IFontDisp methods ***/
/*** IFontDisp methods ***/
...
@@ -131,5 +131,3 @@ ICOM_DEFINE(IFontDisp,IDispatch)
...
@@ -131,5 +131,3 @@ ICOM_DEFINE(IFontDisp,IDispatch)
#endif
/* defined(__cplusplus) */
#endif
/* defined(__cplusplus) */
#endif
/* __WINE_WINE_OBJ_OLEFONT_H */
#endif
/* __WINE_WINE_OBJ_OLEFONT_H */
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