riched20: Get rid of casts from COM objects to interfaces.
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
1bcc7ce75f
commit
d357dbfdd7
|
@ -159,7 +159,8 @@ static const IEnumFORMATETCVtbl VT_EnumFormatImpl = {
|
||||||
EnumFormatImpl_Clone
|
EnumFormatImpl_Clone
|
||||||
};
|
};
|
||||||
|
|
||||||
static HRESULT EnumFormatImpl_Create(const FORMATETC *fmtetc, UINT fmtetc_cnt, IEnumFORMATETC **lplpformatetc)
|
static HRESULT EnumFormatImpl_Create(const FORMATETC *fmtetc, UINT fmtetc_cnt,
|
||||||
|
IEnumFORMATETC **formatetc)
|
||||||
{
|
{
|
||||||
EnumFormatImpl *ret;
|
EnumFormatImpl *ret;
|
||||||
TRACE("\n");
|
TRACE("\n");
|
||||||
|
@ -171,7 +172,7 @@ static HRESULT EnumFormatImpl_Create(const FORMATETC *fmtetc, UINT fmtetc_cnt, I
|
||||||
ret->fmtetc_cnt = fmtetc_cnt;
|
ret->fmtetc_cnt = fmtetc_cnt;
|
||||||
ret->fmtetc = GlobalAlloc(GMEM_ZEROINIT, fmtetc_cnt*sizeof(FORMATETC));
|
ret->fmtetc = GlobalAlloc(GMEM_ZEROINIT, fmtetc_cnt*sizeof(FORMATETC));
|
||||||
memcpy(ret->fmtetc, fmtetc, fmtetc_cnt*sizeof(FORMATETC));
|
memcpy(ret->fmtetc, fmtetc, fmtetc_cnt*sizeof(FORMATETC));
|
||||||
*lplpformatetc = (LPENUMFORMATETC)ret;
|
*formatetc = &ret->IEnumFORMATETC_iface;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -401,8 +402,8 @@ static HGLOBAL get_rtf_text(ME_TextEditor *editor, const ME_Cursor *start, int n
|
||||||
return gds.hData;
|
return gds.hData;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT ME_GetDataObject(ME_TextEditor *editor, const ME_Cursor *start,
|
HRESULT ME_GetDataObject(ME_TextEditor *editor, const ME_Cursor *start, int nChars,
|
||||||
int nChars, LPDATAOBJECT *lplpdataobj)
|
IDataObject **dataobj)
|
||||||
{
|
{
|
||||||
DataObjectImpl *obj;
|
DataObjectImpl *obj;
|
||||||
TRACE("(%p,%d,%d)\n", editor, ME_GetCursorOfs(start), nChars);
|
TRACE("(%p,%d,%d)\n", editor, ME_GetCursorOfs(start), nChars);
|
||||||
|
@ -426,6 +427,6 @@ HRESULT ME_GetDataObject(ME_TextEditor *editor, const ME_Cursor *start,
|
||||||
InitFormatEtc(obj->fmtetc[1], cfRTF, TYMED_HGLOBAL);
|
InitFormatEtc(obj->fmtetc[1], cfRTF, TYMED_HGLOBAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
*lplpdataobj = (LPDATAOBJECT)obj;
|
*dataobj = &obj->IDataObject_iface;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue