Commit 6c706e02 authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

mshtml: Move the IOleCommandTarget interface out of basedoc.

parent 07bf1d73
......@@ -1266,7 +1266,7 @@ HRESULT setup_edit_mode(HTMLDocumentObj *doc)
if(doc->hostui)
IDocHostUIHandler_ShowUI(doc->hostui, DOCHOSTUITYPE_AUTHOR,
&doc->basedoc.IOleInPlaceActiveObject_iface, &doc->basedoc.IOleCommandTarget_iface,
&doc->basedoc.IOleInPlaceActiveObject_iface, &doc->IOleCommandTarget_iface,
doc->frame, doc->ip_window);
if(doc->ip_window)
......
......@@ -1562,7 +1562,7 @@ static HRESULT WINAPI HTMLDocument_execCommand(IHTMLDocument2 *iface, BSTR cmdID
return OLECMDERR_E_NOTSUPPORTED;
V_VT(&ret) = VT_EMPTY;
hres = IOleCommandTarget_Exec(&This->IOleCommandTarget_iface, &CGID_MSHTML, cmdid,
hres = IOleCommandTarget_Exec(&This->doc_node->IOleCommandTarget_iface, &CGID_MSHTML, cmdid,
showUI ? 0 : OLECMDEXECOPT_DONTPROMPTUSER, &value, &ret);
if(FAILED(hres))
return hres;
......@@ -5625,8 +5625,6 @@ static BOOL htmldoc_qi(HTMLDocument *This, REFIID riid, void **ppv)
*ppv = &This->IOleInPlaceObjectWindowless_iface;
else if(IsEqualGUID(&IID_IOleInPlaceObjectWindowless, riid))
*ppv = &This->IOleInPlaceObjectWindowless_iface;
else if(IsEqualGUID(&IID_IOleCommandTarget, riid))
*ppv = &This->IOleCommandTarget_iface;
else if(IsEqualGUID(&IID_IOleControl, riid))
*ppv = &This->IOleControl_iface;
else if(IsEqualGUID(&DIID_DispHTMLDocument, riid))
......@@ -5709,7 +5707,6 @@ static void init_doc(HTMLDocument *doc, IUnknown *outer, IDispatchEx *dispex)
doc->outer_unk = outer;
doc->dispex = dispex;
HTMLDocument_OleCmd_Init(doc);
HTMLDocument_OleObj_Init(doc);
}
......@@ -5743,6 +5740,8 @@ static HRESULT HTMLDocumentNode_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
*ppv = &This->IPersistHistory_iface;
else if(IsEqualGUID(&IID_IHlinkTarget, riid))
*ppv = &This->IHlinkTarget_iface;
else if(IsEqualGUID(&IID_IOleCommandTarget, riid))
*ppv = &This->IOleCommandTarget_iface;
else if(IsEqualGUID(&IID_IServiceProvider, riid))
*ppv = &This->IServiceProvider_iface;
else if(IsEqualGUID(&IID_IConnectionPointContainer, riid))
......@@ -6136,6 +6135,7 @@ static HTMLDocumentNode *alloc_doc_node(HTMLDocumentObj *doc_obj, HTMLInnerWindo
ConnectionPointContainer_Init(&doc->cp_container, (IUnknown*)&doc->basedoc.IHTMLDocument2_iface, HTMLDocumentNode_cpc);
HTMLDocumentNode_Persist_Init(doc);
HTMLDocumentNode_Service_Init(doc);
HTMLDocumentNode_OleCmd_Init(doc);
HTMLDocumentNode_SecMgr_Init(doc);
list_init(&doc->selection_list);
......@@ -6268,6 +6268,8 @@ static HRESULT WINAPI HTMLDocumentObj_QueryInterface(IUnknown *iface, REFIID rii
*ppv = &This->IPersistHistory_iface;
}else if(IsEqualGUID(&IID_IHlinkTarget, riid)) {
*ppv = &This->IHlinkTarget_iface;
}else if(IsEqualGUID(&IID_IOleCommandTarget, riid)) {
*ppv = &This->IOleCommandTarget_iface;
}else if(IsEqualGUID(&IID_IServiceProvider, riid)) {
*ppv = &This->IServiceProvider_iface;
}else if(IsEqualGUID(&IID_ITargetContainer, riid)) {
......@@ -6498,6 +6500,7 @@ static HRESULT create_document_object(BOOL is_mhtml, IUnknown *outer, REFIID rii
ConnectionPointContainer_Init(&doc->cp_container, &doc->IUnknown_inner, HTMLDocumentObj_cpc);
HTMLDocumentObj_Persist_Init(doc);
HTMLDocumentObj_Service_Init(doc);
HTMLDocumentObj_OleCmd_Init(doc);
TargetContainer_Init(doc);
doc->is_mhtml = is_mhtml;
......
......@@ -652,7 +652,6 @@ struct HTMLDocument {
IOleDocument IOleDocument_iface;
IOleInPlaceActiveObject IOleInPlaceActiveObject_iface;
IOleInPlaceObjectWindowless IOleInPlaceObjectWindowless_iface;
IOleCommandTarget IOleCommandTarget_iface;
IOleControl IOleControl_iface;
IDispatchEx IDispatchEx_iface;
ISupportErrorInfo ISupportErrorInfo_iface;
......@@ -702,6 +701,7 @@ struct HTMLDocumentObj {
IPersistStreamInit IPersistStreamInit_iface;
IPersistHistory IPersistHistory_iface;
IHlinkTarget IHlinkTarget_iface;
IOleCommandTarget IOleCommandTarget_iface;
IServiceProvider IServiceProvider_iface;
ITargetContainer ITargetContainer_iface;
......@@ -902,6 +902,7 @@ struct HTMLDocumentNode {
IPersistStreamInit IPersistStreamInit_iface;
IPersistHistory IPersistHistory_iface;
IHlinkTarget IHlinkTarget_iface;
IOleCommandTarget IOleCommandTarget_iface;
IServiceProvider IServiceProvider_iface;
IInternetHostSecurityManager IInternetHostSecurityManager_iface;
......@@ -969,16 +970,17 @@ void detach_dom_implementation(IHTMLDOMImplementation*) DECLSPEC_HIDDEN;
HRESULT create_html_storage(HTMLInnerWindow*,BOOL,IHTMLStorage**) DECLSPEC_HIDDEN;
void detach_html_storage(IHTMLStorage*) DECLSPEC_HIDDEN;
void HTMLDocument_OleCmd_Init(HTMLDocument*) DECLSPEC_HIDDEN;
void HTMLDocument_OleObj_Init(HTMLDocument*) DECLSPEC_HIDDEN;
void HTMLDocument_View_Init(HTMLDocumentObj*) DECLSPEC_HIDDEN;
void HTMLDocumentObj_Persist_Init(HTMLDocumentObj*) DECLSPEC_HIDDEN;
void HTMLDocumentObj_Service_Init(HTMLDocumentObj*) DECLSPEC_HIDDEN;
void HTMLDocumentObj_OleCmd_Init(HTMLDocumentObj*) DECLSPEC_HIDDEN;
void TargetContainer_Init(HTMLDocumentObj*) DECLSPEC_HIDDEN;
void HTMLDocumentNode_Persist_Init(HTMLDocumentNode*) DECLSPEC_HIDDEN;
void HTMLDocumentNode_Service_Init(HTMLDocumentNode*) DECLSPEC_HIDDEN;
void HTMLDocumentNode_OleCmd_Init(HTMLDocumentNode*) DECLSPEC_HIDDEN;
void HTMLDocumentNode_SecMgr_Init(HTMLDocumentNode*) DECLSPEC_HIDDEN;
HRESULT HTMLCurrentStyle_Create(HTMLElement*,IHTMLCurrentStyle**) DECLSPEC_HIDDEN;
......
......@@ -625,7 +625,7 @@ static HRESULT WINAPI OleDocumentView_UIActivate(IOleDocumentView *iface, BOOL f
if(This->hostui) {
hres = IDocHostUIHandler_ShowUI(This->hostui,
This->nscontainer->usermode == EDITMODE ? DOCHOSTUITYPE_AUTHOR : DOCHOSTUITYPE_BROWSE,
&This->basedoc.IOleInPlaceActiveObject_iface, &This->basedoc.IOleCommandTarget_iface,
&This->basedoc.IOleInPlaceActiveObject_iface, &This->IOleCommandTarget_iface,
This->frame, This->ip_window);
if(FAILED(hres))
IDocHostUIHandler_HideUI(This->hostui);
......
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