Module: wine Branch: master Commit: 7e32a1abb31fe5667a586bce40b0afda2136e949 URL: http://source.winehq.org/git/wine.git/?a=commit;h=7e32a1abb31fe5667a586bce40...
Author: Michael Stefaniuc mstefani@redhat.de Date: Thu Dec 23 02:12:25 2010 +0100
mshtml: COM cleanup for the IMonikerProp iface.
---
dlls/mshtml/htmldoc.c | 2 +- dlls/mshtml/mshtml_private.h | 3 +-- dlls/mshtml/persist.c | 15 +++++++++------ 3 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index 90cafd7..486eefa 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -1740,7 +1740,7 @@ static BOOL htmldoc_qi(HTMLDocument *This, REFIID riid, void **ppv) *ppv = &This->IPersistFile_iface; }else if(IsEqualGUID(&IID_IMonikerProp, riid)) { TRACE("(%p)->(IID_IMonikerProp, %p)\n", This, ppv); - *ppv = MONPROP(This); + *ppv = &This->IMonikerProp_iface; }else if(IsEqualGUID(&IID_IOleObject, riid)) { TRACE("(%p)->(IID_IOleObject, %p)\n", This, ppv); *ppv = OLEOBJ(This); diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 9059ded..62a2adf 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -350,7 +350,7 @@ struct HTMLDocument { IPersistMoniker IPersistMoniker_iface; IPersistFile IPersistFile_iface; IPersistHistory IPersistHistory_iface; - const IMonikerPropVtbl *lpMonikerPropVtbl; + IMonikerProp IMonikerProp_iface; const IOleObjectVtbl *lpOleObjectVtbl; const IOleDocumentVtbl *lpOleDocumentVtbl; const IOleDocumentViewVtbl *lpOleDocumentViewVtbl; @@ -626,7 +626,6 @@ struct HTMLDocumentNode { #define HTMLWINDOW3(x) ((IHTMLWindow3*) &(x)->lpHTMLWindow3Vtbl) #define HTMLWINDOW4(x) ((IHTMLWindow4*) &(x)->lpHTMLWindow4Vtbl)
-#define MONPROP(x) ((IMonikerProp*) &(x)->lpMonikerPropVtbl) #define OLEOBJ(x) ((IOleObject*) &(x)->lpOleObjectVtbl) #define OLEDOC(x) ((IOleDocument*) &(x)->lpOleDocumentVtbl) #define DOCVIEW(x) ((IOleDocumentView*) &(x)->lpOleDocumentViewVtbl) diff --git a/dlls/mshtml/persist.c b/dlls/mshtml/persist.c index 46d00a3..24d3c21 100644 --- a/dlls/mshtml/persist.c +++ b/dlls/mshtml/persist.c @@ -466,29 +466,32 @@ static const IPersistMonikerVtbl PersistMonikerVtbl = { * IMonikerProp implementation */
-#define MONPROP_THIS(iface) DEFINE_THIS(HTMLDocument, MonikerProp, iface) +static inline HTMLDocument *impl_from_IMonikerProp(IMonikerProp *iface) +{ + return CONTAINING_RECORD(iface, HTMLDocument, IMonikerProp_iface); +}
static HRESULT WINAPI MonikerProp_QueryInterface(IMonikerProp *iface, REFIID riid, void **ppv) { - HTMLDocument *This = MONPROP_THIS(iface); + HTMLDocument *This = impl_from_IMonikerProp(iface); return htmldoc_query_interface(This, riid, ppv); }
static ULONG WINAPI MonikerProp_AddRef(IMonikerProp *iface) { - HTMLDocument *This = MONPROP_THIS(iface); + HTMLDocument *This = impl_from_IMonikerProp(iface); return htmldoc_addref(This); }
static ULONG WINAPI MonikerProp_Release(IMonikerProp *iface) { - HTMLDocument *This = MONPROP_THIS(iface); + HTMLDocument *This = impl_from_IMonikerProp(iface); return htmldoc_release(This); }
static HRESULT WINAPI MonikerProp_PutProperty(IMonikerProp *iface, MONIKERPROPERTY mkp, LPCWSTR val) { - HTMLDocument *This = MONPROP_THIS(iface); + HTMLDocument *This = impl_from_IMonikerProp(iface);
TRACE("(%p)->(%d %s)\n", This, mkp, debugstr_w(val));
@@ -835,7 +838,7 @@ void HTMLDocument_Persist_Init(HTMLDocument *This) { This->IPersistMoniker_iface.lpVtbl = &PersistMonikerVtbl; This->IPersistFile_iface.lpVtbl = &PersistFileVtbl; - This->lpMonikerPropVtbl = &MonikerPropVtbl; + This->IMonikerProp_iface.lpVtbl = &MonikerPropVtbl; This->IPersistStreamInit_iface.lpVtbl = &PersistStreamInitVtbl; This->IPersistHistory_iface.lpVtbl = &PersistHistoryVtbl; }