mshtml: COM cleanup for the IOleInPlaceObjectWindowless iface.
This commit is contained in:
parent
176358216f
commit
62e9961e29
|
@ -1767,10 +1767,10 @@ static BOOL htmldoc_qi(HTMLDocument *This, REFIID riid, void **ppv)
|
||||||
*ppv = &This->IOleInPlaceActiveObject_iface;
|
*ppv = &This->IOleInPlaceActiveObject_iface;
|
||||||
}else if(IsEqualGUID(&IID_IOleInPlaceObject, riid)) {
|
}else if(IsEqualGUID(&IID_IOleInPlaceObject, riid)) {
|
||||||
TRACE("(%p)->(IID_IOleInPlaceObject, %p)\n", This, ppv);
|
TRACE("(%p)->(IID_IOleInPlaceObject, %p)\n", This, ppv);
|
||||||
*ppv = INPLACEOBJ(This);
|
*ppv = &This->IOleInPlaceObjectWindowless_iface;
|
||||||
}else if(IsEqualGUID(&IID_IOleInPlaceObjectWindowless, riid)) {
|
}else if(IsEqualGUID(&IID_IOleInPlaceObjectWindowless, riid)) {
|
||||||
TRACE("(%p)->(IID_IOleInPlaceObjectWindowless, %p)\n", This, ppv);
|
TRACE("(%p)->(IID_IOleInPlaceObjectWindowless, %p)\n", This, ppv);
|
||||||
*ppv = INPLACEWIN(This);
|
*ppv = &This->IOleInPlaceObjectWindowless_iface;
|
||||||
}else if(IsEqualGUID(&IID_IServiceProvider, riid)) {
|
}else if(IsEqualGUID(&IID_IServiceProvider, riid)) {
|
||||||
TRACE("(%p)->(IID_IServiceProvider, %p)\n", This, ppv);
|
TRACE("(%p)->(IID_IServiceProvider, %p)\n", This, ppv);
|
||||||
*ppv = SERVPROV(This);
|
*ppv = SERVPROV(This);
|
||||||
|
@ -2106,7 +2106,7 @@ static ULONG WINAPI CustomDoc_Release(ICustomDoc *iface)
|
||||||
if(This->hostui)
|
if(This->hostui)
|
||||||
ICustomDoc_SetUIHandler(CUSTOMDOC(This), NULL);
|
ICustomDoc_SetUIHandler(CUSTOMDOC(This), NULL);
|
||||||
if(This->in_place_active)
|
if(This->in_place_active)
|
||||||
IOleInPlaceObjectWindowless_InPlaceDeactivate(INPLACEWIN(&This->basedoc));
|
IOleInPlaceObjectWindowless_InPlaceDeactivate(&This->basedoc.IOleInPlaceObjectWindowless_iface);
|
||||||
if(This->ipsite)
|
if(This->ipsite)
|
||||||
IOleDocumentView_SetInPlaceSite(&This->basedoc.IOleDocumentView_iface, NULL);
|
IOleDocumentView_SetInPlaceSite(&This->basedoc.IOleDocumentView_iface, NULL);
|
||||||
if(This->undomgr)
|
if(This->undomgr)
|
||||||
|
|
|
@ -356,7 +356,7 @@ struct HTMLDocument {
|
||||||
IOleDocumentView IOleDocumentView_iface;
|
IOleDocumentView IOleDocumentView_iface;
|
||||||
IOleInPlaceActiveObject IOleInPlaceActiveObject_iface;
|
IOleInPlaceActiveObject IOleInPlaceActiveObject_iface;
|
||||||
IViewObjectEx IViewObjectEx_iface;
|
IViewObjectEx IViewObjectEx_iface;
|
||||||
const IOleInPlaceObjectWindowlessVtbl *lpOleInPlaceObjectWindowlessVtbl;
|
IOleInPlaceObjectWindowless IOleInPlaceObjectWindowless_iface;
|
||||||
const IServiceProviderVtbl *lpServiceProviderVtbl;
|
const IServiceProviderVtbl *lpServiceProviderVtbl;
|
||||||
const IOleCommandTargetVtbl *lpOleCommandTargetVtbl;
|
const IOleCommandTargetVtbl *lpOleCommandTargetVtbl;
|
||||||
const IOleControlVtbl *lpOleControlVtbl;
|
const IOleControlVtbl *lpOleControlVtbl;
|
||||||
|
@ -625,8 +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 INPLACEOBJ(x) ((IOleInPlaceObject*) &(x)->lpOleInPlaceObjectWindowlessVtbl)
|
|
||||||
#define INPLACEWIN(x) ((IOleInPlaceObjectWindowless*) &(x)->lpOleInPlaceObjectWindowlessVtbl)
|
|
||||||
#define SERVPROV(x) ((IServiceProvider*) &(x)->lpServiceProviderVtbl)
|
#define SERVPROV(x) ((IServiceProvider*) &(x)->lpServiceProviderVtbl)
|
||||||
#define CMDTARGET(x) ((IOleCommandTarget*) &(x)->lpOleCommandTargetVtbl)
|
#define CMDTARGET(x) ((IOleCommandTarget*) &(x)->lpOleCommandTargetVtbl)
|
||||||
#define CONTROL(x) ((IOleControl*) &(x)->lpOleControlVtbl)
|
#define CONTROL(x) ((IOleControl*) &(x)->lpOleControlVtbl)
|
||||||
|
|
|
@ -267,7 +267,7 @@ static HRESULT WINAPI OleObject_Close(IOleObject *iface, DWORD dwSaveOption)
|
||||||
FIXME("OLECLOSE_PROMPTSAVE not implemented\n");
|
FIXME("OLECLOSE_PROMPTSAVE not implemented\n");
|
||||||
|
|
||||||
if(This->doc_obj->in_place_active)
|
if(This->doc_obj->in_place_active)
|
||||||
IOleInPlaceObjectWindowless_InPlaceDeactivate(INPLACEWIN(This));
|
IOleInPlaceObjectWindowless_InPlaceDeactivate(&This->IOleInPlaceObjectWindowless_iface);
|
||||||
|
|
||||||
HTMLDocument_LockContainer(This->doc_obj, FALSE);
|
HTMLDocument_LockContainer(This->doc_obj, FALSE);
|
||||||
|
|
||||||
|
|
|
@ -146,44 +146,47 @@ static const IOleInPlaceActiveObjectVtbl OleInPlaceActiveObjectVtbl = {
|
||||||
* IOleInPlaceObjectWindowless implementation
|
* IOleInPlaceObjectWindowless implementation
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define OLEINPLACEWND_THIS(iface) DEFINE_THIS(HTMLDocument, OleInPlaceObjectWindowless, iface)
|
static inline HTMLDocument *impl_from_IOleInPlaceObjectWindowless(IOleInPlaceObjectWindowless *iface)
|
||||||
|
{
|
||||||
|
return CONTAINING_RECORD(iface, HTMLDocument, IOleInPlaceObjectWindowless_iface);
|
||||||
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI OleInPlaceObjectWindowless_QueryInterface(IOleInPlaceObjectWindowless *iface,
|
static HRESULT WINAPI OleInPlaceObjectWindowless_QueryInterface(IOleInPlaceObjectWindowless *iface,
|
||||||
REFIID riid, void **ppv)
|
REFIID riid, void **ppv)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = OLEINPLACEWND_THIS(iface);
|
HTMLDocument *This = impl_from_IOleInPlaceObjectWindowless(iface);
|
||||||
return htmldoc_query_interface(This, riid, ppv);
|
return htmldoc_query_interface(This, riid, ppv);
|
||||||
}
|
}
|
||||||
|
|
||||||
static ULONG WINAPI OleInPlaceObjectWindowless_AddRef(IOleInPlaceObjectWindowless *iface)
|
static ULONG WINAPI OleInPlaceObjectWindowless_AddRef(IOleInPlaceObjectWindowless *iface)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = OLEINPLACEWND_THIS(iface);
|
HTMLDocument *This = impl_from_IOleInPlaceObjectWindowless(iface);
|
||||||
return htmldoc_addref(This);
|
return htmldoc_addref(This);
|
||||||
}
|
}
|
||||||
|
|
||||||
static ULONG WINAPI OleInPlaceObjectWindowless_Release(IOleInPlaceObjectWindowless *iface)
|
static ULONG WINAPI OleInPlaceObjectWindowless_Release(IOleInPlaceObjectWindowless *iface)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = OLEINPLACEWND_THIS(iface);
|
HTMLDocument *This = impl_from_IOleInPlaceObjectWindowless(iface);
|
||||||
return htmldoc_release(This);
|
return htmldoc_release(This);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI OleInPlaceObjectWindowless_GetWindow(IOleInPlaceObjectWindowless *iface,
|
static HRESULT WINAPI OleInPlaceObjectWindowless_GetWindow(IOleInPlaceObjectWindowless *iface,
|
||||||
HWND *phwnd)
|
HWND *phwnd)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = OLEINPLACEWND_THIS(iface);
|
HTMLDocument *This = impl_from_IOleInPlaceObjectWindowless(iface);
|
||||||
return IOleWindow_GetWindow(&This->IOleInPlaceActiveObject_iface, phwnd);
|
return IOleWindow_GetWindow(&This->IOleInPlaceActiveObject_iface, phwnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI OleInPlaceObjectWindowless_ContextSensitiveHelp(IOleInPlaceObjectWindowless *iface,
|
static HRESULT WINAPI OleInPlaceObjectWindowless_ContextSensitiveHelp(IOleInPlaceObjectWindowless *iface,
|
||||||
BOOL fEnterMode)
|
BOOL fEnterMode)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = OLEINPLACEWND_THIS(iface);
|
HTMLDocument *This = impl_from_IOleInPlaceObjectWindowless(iface);
|
||||||
return IOleWindow_ContextSensitiveHelp(&This->IOleInPlaceActiveObject_iface, fEnterMode);
|
return IOleWindow_ContextSensitiveHelp(&This->IOleInPlaceActiveObject_iface, fEnterMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI OleInPlaceObjectWindowless_InPlaceDeactivate(IOleInPlaceObjectWindowless *iface)
|
static HRESULT WINAPI OleInPlaceObjectWindowless_InPlaceDeactivate(IOleInPlaceObjectWindowless *iface)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = OLEINPLACEWND_THIS(iface);
|
HTMLDocument *This = impl_from_IOleInPlaceObjectWindowless(iface);
|
||||||
|
|
||||||
TRACE("(%p)\n", This);
|
TRACE("(%p)\n", This);
|
||||||
|
|
||||||
|
@ -224,7 +227,7 @@ static HRESULT WINAPI OleInPlaceObjectWindowless_InPlaceDeactivate(IOleInPlaceOb
|
||||||
|
|
||||||
static HRESULT WINAPI OleInPlaceObjectWindowless_UIDeactivate(IOleInPlaceObjectWindowless *iface)
|
static HRESULT WINAPI OleInPlaceObjectWindowless_UIDeactivate(IOleInPlaceObjectWindowless *iface)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = OLEINPLACEWND_THIS(iface);
|
HTMLDocument *This = impl_from_IOleInPlaceObjectWindowless(iface);
|
||||||
FIXME("(%p)\n", This);
|
FIXME("(%p)\n", This);
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
@ -232,14 +235,14 @@ static HRESULT WINAPI OleInPlaceObjectWindowless_UIDeactivate(IOleInPlaceObjectW
|
||||||
static HRESULT WINAPI OleInPlaceObjectWindowless_SetObjectRects(IOleInPlaceObjectWindowless *iface,
|
static HRESULT WINAPI OleInPlaceObjectWindowless_SetObjectRects(IOleInPlaceObjectWindowless *iface,
|
||||||
LPCRECT lprcPosRect, LPCRECT lprcClipRect)
|
LPCRECT lprcPosRect, LPCRECT lprcClipRect)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = OLEINPLACEWND_THIS(iface);
|
HTMLDocument *This = impl_from_IOleInPlaceObjectWindowless(iface);
|
||||||
FIXME("(%p)->(%p %p)\n", This, lprcPosRect, lprcClipRect);
|
FIXME("(%p)->(%p %p)\n", This, lprcPosRect, lprcClipRect);
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI OleInPlaceObjectWindowless_ReactivateAndUndo(IOleInPlaceObjectWindowless *iface)
|
static HRESULT WINAPI OleInPlaceObjectWindowless_ReactivateAndUndo(IOleInPlaceObjectWindowless *iface)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = OLEINPLACEWND_THIS(iface);
|
HTMLDocument *This = impl_from_IOleInPlaceObjectWindowless(iface);
|
||||||
FIXME("(%p)\n", This);
|
FIXME("(%p)\n", This);
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
@ -247,7 +250,7 @@ static HRESULT WINAPI OleInPlaceObjectWindowless_ReactivateAndUndo(IOleInPlaceOb
|
||||||
static HRESULT WINAPI OleInPlaceObjectWindowless_OnWindowMessage(IOleInPlaceObjectWindowless *iface,
|
static HRESULT WINAPI OleInPlaceObjectWindowless_OnWindowMessage(IOleInPlaceObjectWindowless *iface,
|
||||||
UINT msg, WPARAM wParam, LPARAM lParam, LRESULT *lpResult)
|
UINT msg, WPARAM wParam, LPARAM lParam, LRESULT *lpResult)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = OLEINPLACEWND_THIS(iface);
|
HTMLDocument *This = impl_from_IOleInPlaceObjectWindowless(iface);
|
||||||
FIXME("(%p)->(%u %lu %lu %p)\n", This, msg, wParam, lParam, lpResult);
|
FIXME("(%p)->(%u %lu %lu %p)\n", This, msg, wParam, lParam, lpResult);
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
@ -255,7 +258,7 @@ static HRESULT WINAPI OleInPlaceObjectWindowless_OnWindowMessage(IOleInPlaceObje
|
||||||
static HRESULT WINAPI OleInPlaceObjectWindowless_GetDropTarget(IOleInPlaceObjectWindowless *iface,
|
static HRESULT WINAPI OleInPlaceObjectWindowless_GetDropTarget(IOleInPlaceObjectWindowless *iface,
|
||||||
IDropTarget **ppDropTarget)
|
IDropTarget **ppDropTarget)
|
||||||
{
|
{
|
||||||
HTMLDocument *This = OLEINPLACEWND_THIS(iface);
|
HTMLDocument *This = impl_from_IOleInPlaceObjectWindowless(iface);
|
||||||
FIXME("(%p)->(%p)\n", This, ppDropTarget);
|
FIXME("(%p)->(%p)\n", This, ppDropTarget);
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
@ -274,10 +277,8 @@ static const IOleInPlaceObjectWindowlessVtbl OleInPlaceObjectWindowlessVtbl = {
|
||||||
OleInPlaceObjectWindowless_GetDropTarget
|
OleInPlaceObjectWindowless_GetDropTarget
|
||||||
};
|
};
|
||||||
|
|
||||||
#undef INPLACEWIN_THIS
|
|
||||||
|
|
||||||
void HTMLDocument_Window_Init(HTMLDocument *This)
|
void HTMLDocument_Window_Init(HTMLDocument *This)
|
||||||
{
|
{
|
||||||
This->IOleInPlaceActiveObject_iface.lpVtbl = &OleInPlaceActiveObjectVtbl;
|
This->IOleInPlaceActiveObject_iface.lpVtbl = &OleInPlaceActiveObjectVtbl;
|
||||||
This->lpOleInPlaceObjectWindowlessVtbl = &OleInPlaceObjectWindowlessVtbl;
|
This->IOleInPlaceObjectWindowless_iface.lpVtbl = &OleInPlaceObjectWindowlessVtbl;
|
||||||
}
|
}
|
||||||
|
|
|
@ -574,7 +574,7 @@ static HRESULT WINAPI OleDocumentView_Show(IOleDocumentView *iface, BOOL fShow)
|
||||||
ShowWindow(This->doc_obj->hwnd, SW_HIDE);
|
ShowWindow(This->doc_obj->hwnd, SW_HIDE);
|
||||||
|
|
||||||
if(This->doc_obj->in_place_active)
|
if(This->doc_obj->in_place_active)
|
||||||
IOleInPlaceObjectWindowless_InPlaceDeactivate(INPLACEWIN(This));
|
IOleInPlaceObjectWindowless_InPlaceDeactivate(&This->IOleInPlaceObjectWindowless_iface);
|
||||||
|
|
||||||
if(This->doc_obj->ip_window) {
|
if(This->doc_obj->ip_window) {
|
||||||
IOleInPlaceUIWindow_Release(This->doc_obj->ip_window);
|
IOleInPlaceUIWindow_Release(This->doc_obj->ip_window);
|
||||||
|
|
Loading…
Reference in New Issue