ieframe: Use stored IOleCommandTarget in Exec implementation and get rid of no longer needed exec in IDocHostContainerVtbl.
This commit is contained in:
parent
221bb4261c
commit
dfb79624cc
|
@ -639,8 +639,15 @@ static HRESULT WINAPI ClOleCommandTarget_Exec(IOleCommandTarget *iface,
|
|||
if(!pguidCmdGroup) {
|
||||
switch(nCmdID) {
|
||||
case OLECMDID_UPDATECOMMANDS:
|
||||
if(!This->olecmd)
|
||||
return E_NOTIMPL;
|
||||
return IOleCommandTarget_Exec(This->olecmd, pguidCmdGroup, nCmdID, nCmdexecopt, pvaIn, pvaOut);
|
||||
case OLECMDID_SETDOWNLOADSTATE:
|
||||
return This->container_vtbl->exec(This, pguidCmdGroup, nCmdID, nCmdexecopt, pvaIn, pvaOut);
|
||||
if(This->olecmd)
|
||||
return IOleCommandTarget_Exec(This->olecmd, pguidCmdGroup, nCmdID, nCmdexecopt, pvaIn, pvaOut);
|
||||
|
||||
FIXME("Default action not implemented.\n");
|
||||
return E_NOTIMPL;
|
||||
default:
|
||||
FIXME("Unimplemented cmdid %d\n", nCmdID);
|
||||
return E_NOTIMPL;
|
||||
|
@ -719,8 +726,11 @@ static HRESULT WINAPI ClOleCommandTarget_Exec(IOleCommandTarget *iface,
|
|||
}
|
||||
}
|
||||
|
||||
if(IsEqualGUID(&CGID_DocHostCommandHandler, pguidCmdGroup))
|
||||
return This->container_vtbl->exec(This, pguidCmdGroup, nCmdID, nCmdexecopt, pvaIn, pvaOut);
|
||||
if(IsEqualGUID(&CGID_DocHostCommandHandler, pguidCmdGroup)) {
|
||||
if(!This->olecmd)
|
||||
return E_NOTIMPL;
|
||||
return IOleCommandTarget_Exec(This->olecmd, pguidCmdGroup, nCmdID, nCmdexecopt, pvaIn, pvaOut);
|
||||
}
|
||||
|
||||
FIXME("Unimplemented cmdid %d of group %s\n", nCmdID, debugstr_guid(pguidCmdGroup));
|
||||
return E_NOTIMPL;
|
||||
|
|
|
@ -106,7 +106,6 @@ typedef struct _IDocHostContainerVtbl
|
|||
void (WINAPI* GetDocObjRect)(DocHost*,RECT*);
|
||||
HRESULT (WINAPI* SetStatusText)(DocHost*,LPCWSTR);
|
||||
void (WINAPI* SetURL)(DocHost*,LPCWSTR);
|
||||
HRESULT (*exec)(DocHost*,const GUID*,DWORD,DWORD,VARIANT*,VARIANT*);
|
||||
} IDocHostContainerVtbl;
|
||||
|
||||
struct DocHost {
|
||||
|
|
|
@ -771,19 +771,12 @@ static void WINAPI DocHostContainer_SetURL(DocHost* iface, LPCWSTR url)
|
|||
SendMessageW(This->frame_hwnd, WM_UPDATEADDRBAR, 0, (LPARAM)url);
|
||||
}
|
||||
|
||||
static HRESULT DocHostContainer_exec(DocHost* This, const GUID *cmd_group, DWORD cmdid, DWORD execopt, VARIANT *in,
|
||||
VARIANT *out)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static const IDocHostContainerVtbl DocHostContainerVtbl = {
|
||||
IEDocHost_addref,
|
||||
IEDocHost_release,
|
||||
DocHostContainer_GetDocObjRect,
|
||||
DocHostContainer_SetStatusText,
|
||||
DocHostContainer_SetURL,
|
||||
DocHostContainer_exec
|
||||
DocHostContainer_SetURL
|
||||
};
|
||||
|
||||
static HRESULT create_ie(InternetExplorer **ret_obj)
|
||||
|
|
|
@ -1208,30 +1208,12 @@ static void WINAPI DocHostContainer_SetURL(DocHost* This, LPCWSTR url)
|
|||
{
|
||||
}
|
||||
|
||||
static HRESULT DocHostContainer_exec(DocHost *doc_host, const GUID *cmd_group, DWORD cmdid, DWORD execopt, VARIANT *in,
|
||||
VARIANT *out)
|
||||
{
|
||||
HRESULT hres;
|
||||
|
||||
if(!doc_host->olecmd)
|
||||
return E_NOTIMPL;
|
||||
|
||||
hres = IOleCommandTarget_Exec(doc_host->olecmd, cmd_group, cmdid, execopt, in, out);
|
||||
if(SUCCEEDED(hres))
|
||||
TRACE("Exec returned %08x %s\n", hres, debugstr_variant(out));
|
||||
else
|
||||
FIXME("Exec failed\n");
|
||||
|
||||
return hres;
|
||||
}
|
||||
|
||||
static const IDocHostContainerVtbl DocHostContainerVtbl = {
|
||||
WebBrowser_addref,
|
||||
WebBrowser_release,
|
||||
DocHostContainer_GetDocObjRect,
|
||||
DocHostContainer_SetStatusText,
|
||||
DocHostContainer_SetURL,
|
||||
DocHostContainer_exec
|
||||
DocHostContainer_SetURL
|
||||
};
|
||||
|
||||
static HRESULT create_webbrowser(int version, IUnknown *outer, REFIID riid, void **ppv)
|
||||
|
|
Loading…
Reference in New Issue