Commit 17635821 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

mshtml: COM cleanup for the IViewObjectEx iface.

parent b09dc2e5
...@@ -1755,13 +1755,13 @@ static BOOL htmldoc_qi(HTMLDocument *This, REFIID riid, void **ppv) ...@@ -1755,13 +1755,13 @@ static BOOL htmldoc_qi(HTMLDocument *This, REFIID riid, void **ppv)
*ppv = &This->IOleInPlaceActiveObject_iface; *ppv = &This->IOleInPlaceActiveObject_iface;
}else if(IsEqualGUID(&IID_IViewObject, riid)) { }else if(IsEqualGUID(&IID_IViewObject, riid)) {
TRACE("(%p)->(IID_IViewObject, %p)\n", This, ppv); TRACE("(%p)->(IID_IViewObject, %p)\n", This, ppv);
*ppv = VIEWOBJ(This); *ppv = &This->IViewObjectEx_iface;
}else if(IsEqualGUID(&IID_IViewObject2, riid)) { }else if(IsEqualGUID(&IID_IViewObject2, riid)) {
TRACE("(%p)->(IID_IViewObject2, %p)\n", This, ppv); TRACE("(%p)->(IID_IViewObject2, %p)\n", This, ppv);
*ppv = VIEWOBJ2(This); *ppv = &This->IViewObjectEx_iface;
}else if(IsEqualGUID(&IID_IViewObjectEx, riid)) { }else if(IsEqualGUID(&IID_IViewObjectEx, riid)) {
TRACE("(%p)->(IID_IViewObjectEx, %p)\n", This, ppv); TRACE("(%p)->(IID_IViewObjectEx, %p)\n", This, ppv);
*ppv = VIEWOBJEX(This); *ppv = &This->IViewObjectEx_iface;
}else if(IsEqualGUID(&IID_IOleWindow, riid)) { }else if(IsEqualGUID(&IID_IOleWindow, riid)) {
TRACE("(%p)->(IID_IOleWindow, %p)\n", This, ppv); TRACE("(%p)->(IID_IOleWindow, %p)\n", This, ppv);
*ppv = &This->IOleInPlaceActiveObject_iface; *ppv = &This->IOleInPlaceActiveObject_iface;
......
...@@ -355,7 +355,7 @@ struct HTMLDocument { ...@@ -355,7 +355,7 @@ struct HTMLDocument {
IOleDocument IOleDocument_iface; IOleDocument IOleDocument_iface;
IOleDocumentView IOleDocumentView_iface; IOleDocumentView IOleDocumentView_iface;
IOleInPlaceActiveObject IOleInPlaceActiveObject_iface; IOleInPlaceActiveObject IOleInPlaceActiveObject_iface;
const IViewObjectExVtbl *lpViewObjectExVtbl; IViewObjectEx IViewObjectEx_iface;
const IOleInPlaceObjectWindowlessVtbl *lpOleInPlaceObjectWindowlessVtbl; const IOleInPlaceObjectWindowlessVtbl *lpOleInPlaceObjectWindowlessVtbl;
const IServiceProviderVtbl *lpServiceProviderVtbl; const IServiceProviderVtbl *lpServiceProviderVtbl;
const IOleCommandTargetVtbl *lpOleCommandTargetVtbl; const IOleCommandTargetVtbl *lpOleCommandTargetVtbl;
...@@ -625,9 +625,6 @@ struct HTMLDocumentNode { ...@@ -625,9 +625,6 @@ struct HTMLDocumentNode {
#define HTMLWINDOW2(x) ((IHTMLWindow2*) &(x)->lpHTMLWindow2Vtbl) #define HTMLWINDOW2(x) ((IHTMLWindow2*) &(x)->lpHTMLWindow2Vtbl)
#define HTMLWINDOW3(x) ((IHTMLWindow3*) &(x)->lpHTMLWindow3Vtbl) #define HTMLWINDOW3(x) ((IHTMLWindow3*) &(x)->lpHTMLWindow3Vtbl)
#define HTMLWINDOW4(x) ((IHTMLWindow4*) &(x)->lpHTMLWindow4Vtbl) #define HTMLWINDOW4(x) ((IHTMLWindow4*) &(x)->lpHTMLWindow4Vtbl)
#define VIEWOBJ(x) ((IViewObject*) &(x)->lpViewObjectExVtbl)
#define VIEWOBJ2(x) ((IViewObject2*) &(x)->lpViewObjectExVtbl)
#define VIEWOBJEX(x) ((IViewObjectEx*) &(x)->lpViewObjectExVtbl)
#define INPLACEOBJ(x) ((IOleInPlaceObject*) &(x)->lpOleInPlaceObjectWindowlessVtbl) #define INPLACEOBJ(x) ((IOleInPlaceObject*) &(x)->lpOleInPlaceObjectWindowlessVtbl)
#define INPLACEWIN(x) ((IOleInPlaceObjectWindowless*) &(x)->lpOleInPlaceObjectWindowlessVtbl) #define INPLACEWIN(x) ((IOleInPlaceObjectWindowless*) &(x)->lpOleInPlaceObjectWindowlessVtbl)
#define SERVPROV(x) ((IServiceProvider*) &(x)->lpServiceProviderVtbl) #define SERVPROV(x) ((IServiceProvider*) &(x)->lpServiceProviderVtbl)
......
...@@ -759,23 +759,26 @@ static const IOleDocumentViewVtbl OleDocumentViewVtbl = { ...@@ -759,23 +759,26 @@ static const IOleDocumentViewVtbl OleDocumentViewVtbl = {
* IViewObject implementation * IViewObject implementation
*/ */
#define VIEWOBJ_THIS(iface) DEFINE_THIS(HTMLDocument, ViewObjectEx, iface) static inline HTMLDocument *impl_from_IViewObjectEx(IViewObjectEx *iface)
{
return CONTAINING_RECORD(iface, HTMLDocument, IViewObjectEx_iface);
}
static HRESULT WINAPI ViewObject_QueryInterface(IViewObjectEx *iface, REFIID riid, void **ppv) static HRESULT WINAPI ViewObject_QueryInterface(IViewObjectEx *iface, REFIID riid, void **ppv)
{ {
HTMLDocument *This = VIEWOBJ_THIS(iface); HTMLDocument *This = impl_from_IViewObjectEx(iface);
return htmldoc_query_interface(This, riid, ppv); return htmldoc_query_interface(This, riid, ppv);
} }
static ULONG WINAPI ViewObject_AddRef(IViewObjectEx *iface) static ULONG WINAPI ViewObject_AddRef(IViewObjectEx *iface)
{ {
HTMLDocument *This = VIEWOBJ_THIS(iface); HTMLDocument *This = impl_from_IViewObjectEx(iface);
return htmldoc_addref(This); return htmldoc_addref(This);
} }
static ULONG WINAPI ViewObject_Release(IViewObjectEx *iface) static ULONG WINAPI ViewObject_Release(IViewObjectEx *iface)
{ {
HTMLDocument *This = VIEWOBJ_THIS(iface); HTMLDocument *This = impl_from_IViewObjectEx(iface);
return htmldoc_release(This); return htmldoc_release(This);
} }
...@@ -783,7 +786,7 @@ static HRESULT WINAPI ViewObject_Draw(IViewObjectEx *iface, DWORD dwDrawAspect, ...@@ -783,7 +786,7 @@ static HRESULT WINAPI ViewObject_Draw(IViewObjectEx *iface, DWORD dwDrawAspect,
DVTARGETDEVICE *ptd, HDC hdcTargetDev, HDC hdcDraw, LPCRECTL lprcBounds, DVTARGETDEVICE *ptd, HDC hdcTargetDev, HDC hdcDraw, LPCRECTL lprcBounds,
LPCRECTL lprcWBounds, BOOL (CALLBACK *pfnContinue)(ULONG_PTR dwContinue), ULONG_PTR dwContinue) LPCRECTL lprcWBounds, BOOL (CALLBACK *pfnContinue)(ULONG_PTR dwContinue), ULONG_PTR dwContinue)
{ {
HTMLDocument *This = VIEWOBJ_THIS(iface); HTMLDocument *This = impl_from_IViewObjectEx(iface);
FIXME("(%p)->(%d %d %p %p %p %p %p %p %p %ld)\n", This, dwDrawAspect, lindex, pvAspect, FIXME("(%p)->(%d %d %p %p %p %p %p %p %p %ld)\n", This, dwDrawAspect, lindex, pvAspect,
ptd, hdcTargetDev, hdcDraw, lprcBounds, lprcWBounds, pfnContinue, dwContinue); ptd, hdcTargetDev, hdcDraw, lprcBounds, lprcWBounds, pfnContinue, dwContinue);
return E_NOTIMPL; return E_NOTIMPL;
...@@ -792,7 +795,7 @@ static HRESULT WINAPI ViewObject_Draw(IViewObjectEx *iface, DWORD dwDrawAspect, ...@@ -792,7 +795,7 @@ static HRESULT WINAPI ViewObject_Draw(IViewObjectEx *iface, DWORD dwDrawAspect,
static HRESULT WINAPI ViewObject_GetColorSet(IViewObjectEx *iface, DWORD dwDrawAspect, LONG lindex, void *pvAspect, static HRESULT WINAPI ViewObject_GetColorSet(IViewObjectEx *iface, DWORD dwDrawAspect, LONG lindex, void *pvAspect,
DVTARGETDEVICE *ptd, HDC hicTargetDev, LOGPALETTE **ppColorSet) DVTARGETDEVICE *ptd, HDC hicTargetDev, LOGPALETTE **ppColorSet)
{ {
HTMLDocument *This = VIEWOBJ_THIS(iface); HTMLDocument *This = impl_from_IViewObjectEx(iface);
FIXME("(%p)->(%d %d %p %p %p %p)\n", This, dwDrawAspect, lindex, pvAspect, ptd, hicTargetDev, ppColorSet); FIXME("(%p)->(%d %d %p %p %p %p)\n", This, dwDrawAspect, lindex, pvAspect, ptd, hicTargetDev, ppColorSet);
return E_NOTIMPL; return E_NOTIMPL;
} }
...@@ -800,21 +803,21 @@ static HRESULT WINAPI ViewObject_GetColorSet(IViewObjectEx *iface, DWORD dwDrawA ...@@ -800,21 +803,21 @@ static HRESULT WINAPI ViewObject_GetColorSet(IViewObjectEx *iface, DWORD dwDrawA
static HRESULT WINAPI ViewObject_Freeze(IViewObjectEx *iface, DWORD dwDrawAspect, LONG lindex, static HRESULT WINAPI ViewObject_Freeze(IViewObjectEx *iface, DWORD dwDrawAspect, LONG lindex,
void *pvAspect, DWORD *pdwFreeze) void *pvAspect, DWORD *pdwFreeze)
{ {
HTMLDocument *This = VIEWOBJ_THIS(iface); HTMLDocument *This = impl_from_IViewObjectEx(iface);
FIXME("(%p)->(%d %d %p %p)\n", This, dwDrawAspect, lindex, pvAspect, pdwFreeze); FIXME("(%p)->(%d %d %p %p)\n", This, dwDrawAspect, lindex, pvAspect, pdwFreeze);
return E_NOTIMPL; return E_NOTIMPL;
} }
static HRESULT WINAPI ViewObject_Unfreeze(IViewObjectEx *iface, DWORD dwFreeze) static HRESULT WINAPI ViewObject_Unfreeze(IViewObjectEx *iface, DWORD dwFreeze)
{ {
HTMLDocument *This = VIEWOBJ_THIS(iface); HTMLDocument *This = impl_from_IViewObjectEx(iface);
FIXME("(%p)->(%d)\n", This, dwFreeze); FIXME("(%p)->(%d)\n", This, dwFreeze);
return E_NOTIMPL; return E_NOTIMPL;
} }
static HRESULT WINAPI ViewObject_SetAdvise(IViewObjectEx *iface, DWORD aspects, DWORD advf, IAdviseSink *pAdvSink) static HRESULT WINAPI ViewObject_SetAdvise(IViewObjectEx *iface, DWORD aspects, DWORD advf, IAdviseSink *pAdvSink)
{ {
HTMLDocument *This = VIEWOBJ_THIS(iface); HTMLDocument *This = impl_from_IViewObjectEx(iface);
TRACE("(%p)->(%d %d %p)\n", This, aspects, advf, pAdvSink); TRACE("(%p)->(%d %d %p)\n", This, aspects, advf, pAdvSink);
...@@ -832,7 +835,7 @@ static HRESULT WINAPI ViewObject_SetAdvise(IViewObjectEx *iface, DWORD aspects, ...@@ -832,7 +835,7 @@ static HRESULT WINAPI ViewObject_SetAdvise(IViewObjectEx *iface, DWORD aspects,
static HRESULT WINAPI ViewObject_GetAdvise(IViewObjectEx *iface, DWORD *pAspects, DWORD *pAdvf, IAdviseSink **ppAdvSink) static HRESULT WINAPI ViewObject_GetAdvise(IViewObjectEx *iface, DWORD *pAspects, DWORD *pAdvf, IAdviseSink **ppAdvSink)
{ {
HTMLDocument *This = VIEWOBJ_THIS(iface); HTMLDocument *This = impl_from_IViewObjectEx(iface);
FIXME("(%p)->(%p %p %p)\n", This, pAspects, pAdvf, ppAdvSink); FIXME("(%p)->(%p %p %p)\n", This, pAspects, pAdvf, ppAdvSink);
return E_NOTIMPL; return E_NOTIMPL;
} }
...@@ -840,21 +843,21 @@ static HRESULT WINAPI ViewObject_GetAdvise(IViewObjectEx *iface, DWORD *pAspects ...@@ -840,21 +843,21 @@ static HRESULT WINAPI ViewObject_GetAdvise(IViewObjectEx *iface, DWORD *pAspects
static HRESULT WINAPI ViewObject_GetExtent(IViewObjectEx *iface, DWORD dwDrawAspect, LONG lindex, static HRESULT WINAPI ViewObject_GetExtent(IViewObjectEx *iface, DWORD dwDrawAspect, LONG lindex,
DVTARGETDEVICE* ptd, LPSIZEL lpsizel) DVTARGETDEVICE* ptd, LPSIZEL lpsizel)
{ {
HTMLDocument *This = VIEWOBJ_THIS(iface); HTMLDocument *This = impl_from_IViewObjectEx(iface);
FIXME("(%p)->(%d %d %p %p)\n", This, dwDrawAspect, lindex, ptd, lpsizel); FIXME("(%p)->(%d %d %p %p)\n", This, dwDrawAspect, lindex, ptd, lpsizel);
return E_NOTIMPL; return E_NOTIMPL;
} }
static HRESULT WINAPI ViewObject_GetRect(IViewObjectEx *iface, DWORD dwAspect, LPRECTL pRect) static HRESULT WINAPI ViewObject_GetRect(IViewObjectEx *iface, DWORD dwAspect, LPRECTL pRect)
{ {
HTMLDocument *This = VIEWOBJ_THIS(iface); HTMLDocument *This = impl_from_IViewObjectEx(iface);
FIXME("(%p)->(%d %p)\n", This, dwAspect, pRect); FIXME("(%p)->(%d %p)\n", This, dwAspect, pRect);
return E_NOTIMPL; return E_NOTIMPL;
} }
static HRESULT WINAPI ViewObject_GetViewStatus(IViewObjectEx *iface, DWORD *pdwStatus) static HRESULT WINAPI ViewObject_GetViewStatus(IViewObjectEx *iface, DWORD *pdwStatus)
{ {
HTMLDocument *This = VIEWOBJ_THIS(iface); HTMLDocument *This = impl_from_IViewObjectEx(iface);
FIXME("(%p)->(%p)\n", This, pdwStatus); FIXME("(%p)->(%p)\n", This, pdwStatus);
return E_NOTIMPL; return E_NOTIMPL;
} }
...@@ -862,7 +865,7 @@ static HRESULT WINAPI ViewObject_GetViewStatus(IViewObjectEx *iface, DWORD *pdwS ...@@ -862,7 +865,7 @@ static HRESULT WINAPI ViewObject_GetViewStatus(IViewObjectEx *iface, DWORD *pdwS
static HRESULT WINAPI ViewObject_QueryHitPoint(IViewObjectEx* iface, DWORD dwAspect, static HRESULT WINAPI ViewObject_QueryHitPoint(IViewObjectEx* iface, DWORD dwAspect,
LPCRECT pRectBounds, POINT ptlLoc, LONG lCloseHint, DWORD *pHitResult) LPCRECT pRectBounds, POINT ptlLoc, LONG lCloseHint, DWORD *pHitResult)
{ {
HTMLDocument *This = VIEWOBJ_THIS(iface); HTMLDocument *This = impl_from_IViewObjectEx(iface);
FIXME("(%p)->(%d %p (%d %d) %d %p)\n", This, dwAspect, pRectBounds, ptlLoc.x, FIXME("(%p)->(%d %p (%d %d) %d %p)\n", This, dwAspect, pRectBounds, ptlLoc.x,
ptlLoc.y, lCloseHint, pHitResult); ptlLoc.y, lCloseHint, pHitResult);
return E_NOTIMPL; return E_NOTIMPL;
...@@ -871,7 +874,7 @@ static HRESULT WINAPI ViewObject_QueryHitPoint(IViewObjectEx* iface, DWORD dwAsp ...@@ -871,7 +874,7 @@ static HRESULT WINAPI ViewObject_QueryHitPoint(IViewObjectEx* iface, DWORD dwAsp
static HRESULT WINAPI ViewObject_QueryHitRect(IViewObjectEx *iface, DWORD dwAspect, static HRESULT WINAPI ViewObject_QueryHitRect(IViewObjectEx *iface, DWORD dwAspect,
LPCRECT pRectBounds, LPCRECT pRectLoc, LONG lCloseHint, DWORD *pHitResult) LPCRECT pRectBounds, LPCRECT pRectLoc, LONG lCloseHint, DWORD *pHitResult)
{ {
HTMLDocument *This = VIEWOBJ_THIS(iface); HTMLDocument *This = impl_from_IViewObjectEx(iface);
FIXME("(%p)->(%d %p %p %d %p)\n", This, dwAspect, pRectBounds, pRectLoc, lCloseHint, pHitResult); FIXME("(%p)->(%d %p %p %d %p)\n", This, dwAspect, pRectBounds, pRectLoc, lCloseHint, pHitResult);
return E_NOTIMPL; return E_NOTIMPL;
} }
...@@ -879,14 +882,12 @@ static HRESULT WINAPI ViewObject_QueryHitRect(IViewObjectEx *iface, DWORD dwAspe ...@@ -879,14 +882,12 @@ static HRESULT WINAPI ViewObject_QueryHitRect(IViewObjectEx *iface, DWORD dwAspe
static HRESULT WINAPI ViewObject_GetNaturalExtent(IViewObjectEx *iface, DWORD dwAspect, LONG lindex, static HRESULT WINAPI ViewObject_GetNaturalExtent(IViewObjectEx *iface, DWORD dwAspect, LONG lindex,
DVTARGETDEVICE *ptd, HDC hicTargetDev, DVEXTENTINFO *pExtentInfo, LPSIZEL pSizel) DVTARGETDEVICE *ptd, HDC hicTargetDev, DVEXTENTINFO *pExtentInfo, LPSIZEL pSizel)
{ {
HTMLDocument *This = VIEWOBJ_THIS(iface); HTMLDocument *This = impl_from_IViewObjectEx(iface);
FIXME("(%p)->(%d %d %p %p %p %p\n", This, dwAspect,lindex, ptd, FIXME("(%p)->(%d %d %p %p %p %p\n", This, dwAspect,lindex, ptd,
hicTargetDev, pExtentInfo, pSizel); hicTargetDev, pExtentInfo, pSizel);
return E_NOTIMPL; return E_NOTIMPL;
} }
#undef VIEWOBJ_THIS
static const IViewObjectExVtbl ViewObjectVtbl = { static const IViewObjectExVtbl ViewObjectVtbl = {
ViewObject_QueryInterface, ViewObject_QueryInterface,
ViewObject_AddRef, ViewObject_AddRef,
...@@ -908,5 +909,5 @@ static const IViewObjectExVtbl ViewObjectVtbl = { ...@@ -908,5 +909,5 @@ static const IViewObjectExVtbl ViewObjectVtbl = {
void HTMLDocument_View_Init(HTMLDocument *This) void HTMLDocument_View_Init(HTMLDocument *This)
{ {
This->IOleDocumentView_iface.lpVtbl = &OleDocumentViewVtbl; This->IOleDocumentView_iface.lpVtbl = &OleDocumentViewVtbl;
This->lpViewObjectExVtbl = &ViewObjectVtbl; This->IViewObjectEx_iface.lpVtbl = &ViewObjectVtbl;
} }
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