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
aba1e680
Commit
aba1e680
authored
May 17, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 18, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Added ITextFont stub.
parent
9cffed78
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
648 additions
and
19 deletions
+648
-19
richole.c
dlls/riched20/richole.c
+588
-19
richole.c
dlls/riched20/tests/richole.c
+60
-0
No files found.
dlls/riched20/richole.c
View file @
aba1e680
...
...
@@ -45,6 +45,7 @@ DEFINE_GUID(IID_ITextHost2, 0x13e670f5,0x1a5a,0x11cf,0xab,0xeb,0x00,0xaa,0x00,0x
DEFINE_GUID
(
IID_ITextDocument
,
0x8cc497c0
,
0xa1df
,
0x11ce
,
0x80
,
0x98
,
0x00
,
0xaa
,
0x00
,
0x47
,
0xbe
,
0x5d
);
DEFINE_GUID
(
IID_ITextRange
,
0x8cc497c2
,
0xa1df
,
0x11ce
,
0x80
,
0x98
,
0x00
,
0xaa
,
0x00
,
0x47
,
0xbe
,
0x5d
);
DEFINE_GUID
(
IID_ITextSelection
,
0x8cc497c1
,
0xa1df
,
0x11ce
,
0x80
,
0x98
,
0x00
,
0xaa
,
0x00
,
0x47
,
0xbe
,
0x5d
);
DEFINE_GUID
(
IID_ITextFont
,
0x8cc497c3
,
0xa1df
,
0x11ce
,
0x80
,
0x98
,
0x00
,
0xaa
,
0x00
,
0x47
,
0xbe
,
0x5d
);
typedef
struct
ITextSelectionImpl
ITextSelectionImpl
;
typedef
struct
IOleClientSiteImpl
IOleClientSiteImpl
;
...
...
@@ -79,6 +80,13 @@ struct ITextSelectionImpl {
IRichEditOleImpl
*
reOle
;
};
typedef
struct
ITextFontImpl
{
ITextFont
ITextFont_iface
;
LONG
ref
;
ITextRange
*
range
;
}
ITextFontImpl
;
struct
IOleClientSiteImpl
{
IOleClientSite
IOleClientSite_iface
;
IOleWindow
IOleWindow_iface
;
...
...
@@ -103,6 +111,28 @@ static inline IRichEditOleImpl *impl_from_IUnknown(IUnknown *iface)
return
CONTAINING_RECORD
(
iface
,
IRichEditOleImpl
,
IUnknown_inner
);
}
static
inline
IOleClientSiteImpl
*
impl_from_IOleWindow
(
IOleWindow
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IOleClientSiteImpl
,
IOleWindow_iface
);
}
static
inline
IOleClientSiteImpl
*
impl_from_IOleInPlaceSite
(
IOleInPlaceSite
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IOleClientSiteImpl
,
IOleInPlaceSite_iface
);
}
static
inline
ITextSelectionImpl
*
impl_from_ITextSelection
(
ITextSelection
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
ITextSelectionImpl
,
ITextSelection_iface
);
}
static
inline
ITextFontImpl
*
impl_from_ITextFont
(
ITextFont
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
ITextFontImpl
,
ITextFont_iface
);
}
static
HRESULT
create_textfont
(
ITextRange
*
,
ITextFont
**
);
static
HRESULT
WINAPI
IRichEditOleImpl_inner_fnQueryInterface
(
IUnknown
*
iface
,
REFIID
riid
,
LPVOID
*
ppvObj
)
{
IRichEditOleImpl
*
This
=
impl_from_IUnknown
(
iface
);
...
...
@@ -332,11 +362,6 @@ static const IOleClientSiteVtbl ocst = {
};
/* IOleWindow interface */
static
inline
IOleClientSiteImpl
*
impl_from_IOleWindow
(
IOleWindow
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IOleClientSiteImpl
,
IOleWindow_iface
);
}
static
HRESULT
WINAPI
IOleWindow_fnQueryInterface
(
IOleWindow
*
iface
,
REFIID
riid
,
void
**
ppvObj
)
{
IOleClientSiteImpl
*
This
=
impl_from_IOleWindow
(
iface
);
...
...
@@ -383,11 +408,6 @@ static const IOleWindowVtbl olewinvt = {
};
/* IOleInPlaceSite interface */
static
inline
IOleClientSiteImpl
*
impl_from_IOleInPlaceSite
(
IOleInPlaceSite
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IOleClientSiteImpl
,
IOleInPlaceSite_iface
);
}
static
HRESULT
STDMETHODCALLTYPE
IOleInPlaceSite_fnQueryInterface
(
IOleInPlaceSite
*
iface
,
REFIID
riid
,
void
**
ppvObj
)
{
IOleClientSiteImpl
*
This
=
impl_from_IOleInPlaceSite
(
iface
);
...
...
@@ -904,14 +924,19 @@ static HRESULT WINAPI ITextRange_fnSetEnd(ITextRange *me, LONG cpLim)
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ITextRange_fnGetFont
(
ITextRange
*
me
,
ITextFont
**
pF
ont
)
static
HRESULT
WINAPI
ITextRange_fnGetFont
(
ITextRange
*
me
,
ITextFont
**
f
ont
)
{
ITextRangeImpl
*
This
=
impl_from_ITextRange
(
me
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
font
);
if
(
!
This
->
reOle
)
return
CO_E_RELEASED
;
FIXME
(
"not implemented %p
\n
"
,
This
);
return
E_NOTIMPL
;
if
(
!
font
)
return
E_INVALIDARG
;
return
create_textfont
(
me
,
font
);
}
static
HRESULT
WINAPI
ITextRange_fnSetFont
(
ITextRange
*
me
,
ITextFont
*
pFont
)
...
...
@@ -1392,8 +1417,556 @@ static const ITextRangeVtbl trvt = {
ITextRange_fnScrollIntoView
,
ITextRange_fnGetEmbeddedObject
};
/* ITextRange interface */
/* ITextFont */
static
HRESULT
WINAPI
TextFont_QueryInterface
(
ITextFont
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
if
(
IsEqualIID
(
riid
,
&
IID_ITextFont
)
||
IsEqualIID
(
riid
,
&
IID_IDispatch
)
||
IsEqualIID
(
riid
,
&
IID_IUnknown
))
{
*
ppv
=
iface
;
ITextFont_AddRef
(
iface
);
return
S_OK
;
}
*
ppv
=
NULL
;
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
TextFont_AddRef
(
ITextFont
*
iface
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(%u)
\n
"
,
This
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
TextFont_Release
(
ITextFont
*
iface
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(%u)
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
ITextRange_Release
(
This
->
range
);
heap_free
(
This
);
}
return
ref
;
}
static
HRESULT
WINAPI
TextFont_GetTypeInfoCount
(
ITextFont
*
iface
,
UINT
*
pctinfo
)
{
FIXME
(
"stub
\n
"
);
*
pctinfo
=
0
;
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_GetTypeInfo
(
ITextFont
*
iface
,
UINT
iTInfo
,
LCID
lcid
,
ITypeInfo
**
ppTInfo
)
{
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_GetIDsOfNames
(
ITextFont
*
iface
,
REFIID
riid
,
LPOLESTR
*
rgszNames
,
UINT
cNames
,
LCID
lcid
,
DISPID
*
rgDispId
)
{
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_Invoke
(
ITextFont
*
iface
,
DISPID
dispIdMember
,
REFIID
riid
,
LCID
lcid
,
WORD
wFlags
,
DISPPARAMS
*
pDispParams
,
VARIANT
*
pVarResult
,
EXCEPINFO
*
pExcepInfo
,
UINT
*
puArgErr
)
{
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_GetDuplicate
(
ITextFont
*
iface
,
ITextFont
**
ret
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
ret
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_SetDuplicate
(
ITextFont
*
iface
,
ITextFont
*
pFont
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
pFont
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_CanChange
(
ITextFont
*
iface
,
LONG
*
ret
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
ret
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_IsEqual
(
ITextFont
*
iface
,
ITextFont
*
font
,
LONG
*
ret
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
ret
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_Reset
(
ITextFont
*
iface
,
LONG
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p): stub
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_GetStyle
(
ITextFont
*
iface
,
LONG
*
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_SetStyle
(
ITextFont
*
iface
,
LONG
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%d): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_GetAllCaps
(
ITextFont
*
iface
,
LONG
*
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_SetAllCaps
(
ITextFont
*
iface
,
LONG
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%d): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_GetAnimation
(
ITextFont
*
iface
,
LONG
*
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_SetAnimation
(
ITextFont
*
iface
,
LONG
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%d): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_GetBackColor
(
ITextFont
*
iface
,
LONG
*
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_SetBackColor
(
ITextFont
*
iface
,
LONG
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%d): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_GetBold
(
ITextFont
*
iface
,
LONG
*
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_SetBold
(
ITextFont
*
iface
,
LONG
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%d): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_GetEmboss
(
ITextFont
*
iface
,
LONG
*
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_SetEmboss
(
ITextFont
*
iface
,
LONG
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%d): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_GetForeColor
(
ITextFont
*
iface
,
LONG
*
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_SetForeColor
(
ITextFont
*
iface
,
LONG
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%d): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_GetHidden
(
ITextFont
*
iface
,
LONG
*
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_SetHidden
(
ITextFont
*
iface
,
LONG
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%d): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_GetEngrave
(
ITextFont
*
iface
,
LONG
*
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_SetEngrave
(
ITextFont
*
iface
,
LONG
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%d): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_GetItalic
(
ITextFont
*
iface
,
LONG
*
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_SetItalic
(
ITextFont
*
iface
,
LONG
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%d): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_GetKerning
(
ITextFont
*
iface
,
FLOAT
*
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_SetKerning
(
ITextFont
*
iface
,
FLOAT
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%.2f): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_GetLanguageID
(
ITextFont
*
iface
,
LONG
*
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_SetLanguageID
(
ITextFont
*
iface
,
LONG
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%d): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_GetName
(
ITextFont
*
iface
,
BSTR
*
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_SetName
(
ITextFont
*
iface
,
BSTR
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%s): stub
\n
"
,
This
,
debugstr_w
(
value
));
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_GetOutline
(
ITextFont
*
iface
,
LONG
*
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_SetOutline
(
ITextFont
*
iface
,
LONG
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%d): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_GetPosition
(
ITextFont
*
iface
,
FLOAT
*
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_SetPosition
(
ITextFont
*
iface
,
FLOAT
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%.2f): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_GetProtected
(
ITextFont
*
iface
,
LONG
*
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_SetProtected
(
ITextFont
*
iface
,
LONG
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%d): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_GetShadow
(
ITextFont
*
iface
,
LONG
*
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_SetShadow
(
ITextFont
*
iface
,
LONG
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%d): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_GetSize
(
ITextFont
*
iface
,
FLOAT
*
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_SetSize
(
ITextFont
*
iface
,
FLOAT
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%.2f): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_GetSmallCaps
(
ITextFont
*
iface
,
LONG
*
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_SetSmallCaps
(
ITextFont
*
iface
,
LONG
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%d): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_GetSpacing
(
ITextFont
*
iface
,
FLOAT
*
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_SetSpacing
(
ITextFont
*
iface
,
FLOAT
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%.2f): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_GetStrikeThrough
(
ITextFont
*
iface
,
LONG
*
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_SetStrikeThrough
(
ITextFont
*
iface
,
LONG
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%d): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_GetSubscript
(
ITextFont
*
iface
,
LONG
*
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_SetSubscript
(
ITextFont
*
iface
,
LONG
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%d): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_GetSuperscript
(
ITextFont
*
iface
,
LONG
*
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_SetSuperscript
(
ITextFont
*
iface
,
LONG
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%d): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_GetUnderline
(
ITextFont
*
iface
,
LONG
*
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_SetUnderline
(
ITextFont
*
iface
,
LONG
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%d): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_GetWeight
(
ITextFont
*
iface
,
LONG
*
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
TextFont_SetWeight
(
ITextFont
*
iface
,
LONG
value
)
{
ITextFontImpl
*
This
=
impl_from_ITextFont
(
iface
);
FIXME
(
"(%p)->(%d): stub
\n
"
,
This
,
value
);
return
E_NOTIMPL
;
}
static
ITextFontVtbl
textfontvtbl
=
{
TextFont_QueryInterface
,
TextFont_AddRef
,
TextFont_Release
,
TextFont_GetTypeInfoCount
,
TextFont_GetTypeInfo
,
TextFont_GetIDsOfNames
,
TextFont_Invoke
,
TextFont_GetDuplicate
,
TextFont_SetDuplicate
,
TextFont_CanChange
,
TextFont_IsEqual
,
TextFont_Reset
,
TextFont_GetStyle
,
TextFont_SetStyle
,
TextFont_GetAllCaps
,
TextFont_SetAllCaps
,
TextFont_GetAnimation
,
TextFont_SetAnimation
,
TextFont_GetBackColor
,
TextFont_SetBackColor
,
TextFont_GetBold
,
TextFont_SetBold
,
TextFont_GetEmboss
,
TextFont_SetEmboss
,
TextFont_GetForeColor
,
TextFont_SetForeColor
,
TextFont_GetHidden
,
TextFont_SetHidden
,
TextFont_GetEngrave
,
TextFont_SetEngrave
,
TextFont_GetItalic
,
TextFont_SetItalic
,
TextFont_GetKerning
,
TextFont_SetKerning
,
TextFont_GetLanguageID
,
TextFont_SetLanguageID
,
TextFont_GetName
,
TextFont_SetName
,
TextFont_GetOutline
,
TextFont_SetOutline
,
TextFont_GetPosition
,
TextFont_SetPosition
,
TextFont_GetProtected
,
TextFont_SetProtected
,
TextFont_GetShadow
,
TextFont_SetShadow
,
TextFont_GetSize
,
TextFont_SetSize
,
TextFont_GetSmallCaps
,
TextFont_SetSmallCaps
,
TextFont_GetSpacing
,
TextFont_SetSpacing
,
TextFont_GetStrikeThrough
,
TextFont_SetStrikeThrough
,
TextFont_GetSubscript
,
TextFont_SetSubscript
,
TextFont_GetSuperscript
,
TextFont_SetSuperscript
,
TextFont_GetUnderline
,
TextFont_SetUnderline
,
TextFont_GetWeight
,
TextFont_SetWeight
};
static
HRESULT
create_textfont
(
ITextRange
*
range
,
ITextFont
**
ret
)
{
ITextFontImpl
*
font
;
*
ret
=
NULL
;
font
=
heap_alloc
(
sizeof
(
*
font
));
if
(
!
font
)
return
E_OUTOFMEMORY
;
font
->
ITextFont_iface
.
lpVtbl
=
&
textfontvtbl
;
font
->
ref
=
1
;
font
->
range
=
range
;
ITextRange_AddRef
(
range
);
*
ret
=
&
font
->
ITextFont_iface
;
return
S_OK
;
}
/* ITextDocument */
static
HRESULT
WINAPI
ITextDocument_fnQueryInterface
(
ITextDocument
*
me
,
REFIID
riid
,
void
**
ppvObject
)
...
...
@@ -1679,11 +2252,7 @@ static const ITextDocumentVtbl tdvt = {
ITextDocument_fnRangeFromPoint
};
static
inline
ITextSelectionImpl
*
impl_from_ITextSelection
(
ITextSelection
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
ITextSelectionImpl
,
ITextSelection_iface
);
}
/* ITextSelection */
static
HRESULT
WINAPI
ITextSelection_fnQueryInterface
(
ITextSelection
*
me
,
REFIID
riid
,
...
...
dlls/riched20/tests/richole.c
View file @
aba1e680
...
...
@@ -35,6 +35,15 @@
static
HMODULE
hmoduleRichEdit
;
#define EXPECT_REF(obj,ref) _expect_ref((IUnknown*)obj, ref, __LINE__)
static
void
_expect_ref
(
IUnknown
*
obj
,
ULONG
ref
,
int
line
)
{
ULONG
rc
;
IUnknown_AddRef
(
obj
);
rc
=
IUnknown_Release
(
obj
);
ok_
(
__FILE__
,
line
)(
rc
==
ref
,
"expected refcount %d, got %d
\n
"
,
ref
,
rc
);
}
static
HWND
new_window
(
LPCSTR
lpClassName
,
DWORD
dwStyle
,
HWND
parent
)
{
HWND
hwnd
=
CreateWindowA
(
lpClassName
,
NULL
,
...
...
@@ -1081,6 +1090,56 @@ static void test_IOleInPlaceSite_GetWindow(void)
release_interfaces
(
&
w
,
&
reOle
,
&
txtDoc
,
NULL
);
}
static
void
test_GetFont
(
void
)
{
static
const
CHAR
test_text1
[]
=
"TestSomeText"
;
IRichEditOle
*
reOle
=
NULL
;
ITextDocument
*
doc
=
NULL
;
ITextRange
*
range
=
NULL
;
ITextFont
*
font
,
*
font2
;
HRESULT
hr
;
HWND
hwnd
;
create_interfaces
(
&
hwnd
,
&
reOle
,
&
doc
,
NULL
);
SendMessageA
(
hwnd
,
WM_SETTEXT
,
0
,
(
LPARAM
)
test_text1
);
EXPECT_REF
(
reOle
,
3
);
EXPECT_REF
(
doc
,
3
);
hr
=
ITextDocument_Range
(
doc
,
0
,
4
,
&
range
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
EXPECT_REF
(
reOle
,
3
);
EXPECT_REF
(
doc
,
3
);
EXPECT_REF
(
range
,
1
);
hr
=
ITextRange_GetFont
(
range
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
hr
=
ITextRange_GetFont
(
range
,
&
font
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
EXPECT_REF
(
reOle
,
3
);
EXPECT_REF
(
doc
,
3
);
EXPECT_REF
(
range
,
2
);
EXPECT_REF
(
font
,
1
);
hr
=
ITextRange_GetFont
(
range
,
&
font2
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
font
!=
font2
,
"got %p, %p
\n
"
,
font
,
font2
);
EXPECT_REF
(
reOle
,
3
);
EXPECT_REF
(
doc
,
3
);
EXPECT_REF
(
range
,
3
);
EXPECT_REF
(
font
,
1
);
EXPECT_REF
(
font2
,
1
);
ITextFont_Release
(
font
);
ITextFont_Release
(
font2
);
ITextRange_Release
(
range
);
release_interfaces
(
&
hwnd
,
&
reOle
,
&
doc
,
NULL
);
}
START_TEST
(
richole
)
{
/* Must explicitly LoadLibrary(). The test has no references to functions in
...
...
@@ -1102,4 +1161,5 @@ START_TEST(richole)
test_IOleClientSite_QueryInterface
();
test_IOleWindow_GetWindow
();
test_IOleInPlaceSite_GetWindow
();
test_GetFont
();
}
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