Commit c9c2692d authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

riched20: Move DestroyIRichEditOle() into IRichEditOle:Release().

parent 3b87dbe0
......@@ -241,7 +241,6 @@ int ME_GetParaBorderWidth(const ME_Context *c, int flags) DECLSPEC_HIDDEN;
/* richole.c */
LRESULT CreateIRichEditOle(IUnknown *outer_unk, ME_TextEditor *editor, LPVOID *ppvObj) DECLSPEC_HIDDEN;
void DestroyIRichEditOle(IRichEditOle *iface) DECLSPEC_HIDDEN;
void ME_DrawOLE(ME_Context *c, int x, int y, ME_Run* run, ME_Paragraph *para, BOOL selected) DECLSPEC_HIDDEN;
void ME_GetOLEObjectSize(const ME_Context *c, ME_Run *run, SIZE *pSize) DECLSPEC_HIDDEN;
void ME_CopyReObject(REOBJECT* dst, const REOBJECT* src) DECLSPEC_HIDDEN;
......
......@@ -143,7 +143,18 @@ static ULONG WINAPI IRichEditOleImpl_inner_fnRelease(IUnknown *iface)
TRACE ("%p ref=%u\n", This, ref);
if (!ref)
DestroyIRichEditOle(&This->IRichEditOle_iface);
{
ITextRangeImpl *txtRge;
TRACE("Destroying %p\n", This);
This->txtSel->reOle = NULL;
This->editor->reOle = NULL;
ITextSelection_Release(&This->txtSel->ITextSelection_iface);
IOleClientSite_Release(&This->clientSite->IOleClientSite_iface);
LIST_FOR_EACH_ENTRY(txtRge, &This->rangelist, ITextRangeImpl, entry)
txtRge->reOle = NULL;
heap_free(This);
}
return ref;
}
......@@ -2365,21 +2376,6 @@ LRESULT CreateIRichEditOle(IUnknown *outer_unk, ME_TextEditor *editor, LPVOID *p
return 1;
}
void DestroyIRichEditOle(IRichEditOle *iface)
{
IRichEditOleImpl *This = impl_from_IRichEditOle(iface);
ITextRangeImpl *txtRge;
TRACE("Destroying %p\n", This);
This->txtSel->reOle = NULL;
This->editor->reOle = NULL;
ITextSelection_Release(&This->txtSel->ITextSelection_iface);
IOleClientSite_Release(&This->clientSite->IOleClientSite_iface);
LIST_FOR_EACH_ENTRY(txtRge, &This->rangelist, ITextRangeImpl, entry)
txtRge->reOle = NULL;
heap_free(This);
}
static void convert_sizel(const ME_Context *c, const SIZEL* szl, SIZE* sz)
{
/* sizel is in .01 millimeters, sz in pixels */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment