Commit a8474118 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Added IViewObject::SetAdvise implementation.

parent 72e2b7f1
......@@ -1992,6 +1992,8 @@ static ULONG WINAPI CustomDoc_Release(ICustomDoc *iface)
if(This->basedoc.advise_holder)
IOleAdviseHolder_Release(This->basedoc.advise_holder);
if(This->view_sink)
IAdviseSink_Release(This->view_sink);
if(This->client)
IOleObject_SetClientSite(OLEOBJ(&This->basedoc), NULL);
if(This->in_place_active)
......
......@@ -380,6 +380,7 @@ struct HTMLDocumentObj {
IOleInPlaceSite *ipsite;
IOleInPlaceFrame *frame;
IOleInPlaceUIWindow *ip_window;
IAdviseSink *view_sink;
DOCHOSTUIINFO hostinfo;
......
......@@ -322,6 +322,8 @@ static void parse_complete_proc(task_t *task)
init_editor(&doc->basedoc);
call_explorer_69(doc);
if(doc->view_sink)
IAdviseSink_OnViewChange(doc->view_sink, DVASPECT_CONTENT, -1);
call_property_onchanged(&doc->basedoc.cp_propnotif, 1005);
call_explorer_69(doc);
......
......@@ -236,6 +236,9 @@ static nsresult NSAPI handle_load(nsIDOMEventListener *iface, nsIDOMEvent *event
set_ready_state(doc->basedoc.window, READYSTATE_COMPLETE);
if(doc == doc_obj->basedoc.doc_node) {
if(doc_obj->view_sink)
IAdviseSink_OnViewChange(doc_obj->view_sink, DVASPECT_CONTENT, -1);
if(doc_obj->frame) {
static const WCHAR wszDone[] = {'D','o','n','e',0};
IOleInPlaceFrame_SetStatusText(doc_obj->frame, wszDone);
......
......@@ -807,8 +807,19 @@ static HRESULT WINAPI ViewObject_Unfreeze(IViewObjectEx *iface, DWORD dwFreeze)
static HRESULT WINAPI ViewObject_SetAdvise(IViewObjectEx *iface, DWORD aspects, DWORD advf, IAdviseSink *pAdvSink)
{
HTMLDocument *This = VIEWOBJ_THIS(iface);
FIXME("(%p)->(%d %d %p)\n", This, aspects, advf, pAdvSink);
return E_NOTIMPL;
TRACE("(%p)->(%d %d %p)\n", This, aspects, advf, pAdvSink);
if(aspects != DVASPECT_CONTENT || advf != ADVF_PRIMEFIRST)
FIXME("unsuported arguments\n");
if(This->doc_obj->view_sink)
IAdviseSink_Release(This->doc_obj->view_sink);
if(pAdvSink)
IAdviseSink_AddRef(pAdvSink);
This->doc_obj->view_sink = pAdvSink;
return S_OK;
}
static HRESULT WINAPI ViewObject_GetAdvise(IViewObjectEx *iface, DWORD *pAspects, DWORD *pAdvf, IAdviseSink **ppAdvSink)
......
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