static void set_downloading_proc(task_t *_task) { download_proc_task_t *task = (download_proc_task_t*)_task; HTMLDocumentObj *doc = task->doc; HRESULT hres; TRACE("(%p)\n", doc); set_statustext(doc, IDS_STATUS_DOWNLOADINGFROM, task->url); if(task->set_download) set_download_state(doc, 1); if(!doc->client) return; if(doc->view_sink) IAdviseSink_OnViewChange(doc->view_sink, DVASPECT_CONTENT, -1); if(doc->hostui) { IDropTarget *drop_target = NULL; hres = IDocHostUIHandler_GetDropTarget(doc->hostui, NULL /* FIXME */, &drop_target); if(SUCCEEDED(hres) && drop_target) { FIXME("Use IDropTarget\n"); IDropTarget_Release(drop_target); } } }
static void handle_docobj_load(HTMLDocumentObj *doc) { IOleCommandTarget *olecmd = NULL; HRESULT hres; if(doc->nscontainer->editor_controller) { nsIController_Release(doc->nscontainer->editor_controller); doc->nscontainer->editor_controller = NULL; } if(doc->usermode == EDITMODE) handle_edit_load(&doc->basedoc); if(doc->client) { hres = IOleClientSite_QueryInterface(doc->client, &IID_IOleCommandTarget, (void**)&olecmd); if(FAILED(hres)) olecmd = NULL; } if(doc->download_state) { if(olecmd) { VARIANT progress; V_VT(&progress) = VT_I4; V_I4(&progress) = 0; IOleCommandTarget_Exec(olecmd, NULL, OLECMDID_SETPROGRESSPOS, OLECMDEXECOPT_DONTPROMPTUSER, &progress, NULL); } set_download_state(doc, 0); } if(olecmd) { IOleCommandTarget_Exec(olecmd, &CGID_ShellDocView, 103, 0, NULL, NULL); IOleCommandTarget_Exec(olecmd, &CGID_MSHTML, IDM_PARSECOMPLETE, 0, NULL, NULL); IOleCommandTarget_Exec(olecmd, NULL, OLECMDID_HTTPEQUIV_DONE, 0, NULL, NULL); IOleCommandTarget_Release(olecmd); } }