234{
243
244 TRACE(
"(%p)->(%p)\n",
This, pClientSite);
245
246 if(pClientSite ==
This->doc_obj->client)
248
249 if(
This->doc_obj->client) {
250 IOleClientSite_Release(
This->doc_obj->client);
253 }
254
255 if(
This->doc_obj->client_cmdtrg) {
256 IOleCommandTarget_Release(
This->doc_obj->client_cmdtrg);
257 This->doc_obj->client_cmdtrg =
NULL;
258 }
259
260 if(
This->doc_obj->hostui && !
This->doc_obj->custom_hostui) {
261 IDocHostUIHandler_Release(
This->doc_obj->hostui);
263 }
264
265 if(
This->doc_obj->doc_object_service) {
266 IDocObjectService_Release(
This->doc_obj->doc_object_service);
267 This->doc_obj->doc_object_service =
NULL;
268 }
269
270 if(
This->doc_obj->webbrowser) {
271 IUnknown_Release(
This->doc_obj->webbrowser);
273 }
274
275 if(
This->doc_obj->browser_service) {
276 IUnknown_Release(
This->doc_obj->browser_service);
277 This->doc_obj->browser_service =
NULL;
278 }
279
280 if(
This->doc_obj->travel_log) {
281 ITravelLog_Release(
This->doc_obj->travel_log);
283 }
284
285 memset(&
This->doc_obj->hostinfo, 0,
sizeof(DOCHOSTUIINFO));
286
287 if(!pClientSite)
289
290 IOleClientSite_AddRef(pClientSite);
291 This->doc_obj->client = pClientSite;
292
293 hostui_setup =
This->doc_obj->hostui_setup;
294
295 if(!
This->doc_obj->hostui) {
297
299
300 hres = IOleClientSite_QueryInterface(pClientSite, &IID_IDocHostUIHandler, (
void**)&uihandler);
302 This->doc_obj->hostui = uihandler;
303 }
304
305 if(
This->doc_obj->hostui) {
306 DOCHOSTUIINFO hostinfo;
309
310 memset(&hostinfo, 0,
sizeof(DOCHOSTUIINFO));
311 hostinfo.cbSize = sizeof(DOCHOSTUIINFO);
312 hres = IDocHostUIHandler_GetHostInfo(
This->doc_obj->hostui, &hostinfo);
314 TRACE(
"hostinfo = {%u %08x %08x %s %s}\n",
315 hostinfo.cbSize, hostinfo.dwFlags, hostinfo.dwDoubleClick,
318 This->doc_obj->hostinfo = hostinfo;
319 }
320
321 if(!hostui_setup) {
322 hres = IDocHostUIHandler_GetOptionKeyPath(
This->doc_obj->hostui, &key_path, 0);
324 if(key_path[0]) {
325
327 }
329 }
330
331 hres = IDocHostUIHandler_QueryInterface(
This->doc_obj->hostui, &IID_IDocHostUIHandler2,
332 (void**)&uihandler2);
334 hres = IDocHostUIHandler2_GetOverrideKeyPath(uihandler2, &override_key_path, 0);
335 if(
hres ==
S_OK && override_key_path) {
336 if(override_key_path[0]) {
337
339 }
341 }
342 IDocHostUIHandler2_Release(uihandler2);
343 }
344
346 }
347 }
348
350
351
352
353 hres = IOleClientSite_QueryInterface(pClientSite, &
IID_IOleWindow, (
void**)&ole_window);
355 IOleWindow_GetWindow(ole_window, &
hwnd);
356 IOleWindow_Release(ole_window);
357 }
358
360 &IID_IBrowserService, (void**)&browser_service);
363
364 This->doc_obj->browser_service = (
IUnknown*)browser_service;
365
366 hres = IBrowserService_GetTravelLog(browser_service, &travel_log);
368 This->doc_obj->travel_log = travel_log;
369 }else {
370 browser_service =
NULL;
371 }
372
373 hres = IOleClientSite_QueryInterface(pClientSite, &IID_IOleCommandTarget, (
void**)&cmdtrg);
376 OLECMD
cmd = {OLECMDID_SETPROGRESSTEXT, 0};
377
378 This->doc_obj->client_cmdtrg = cmdtrg;
379
380 if(!hostui_setup) {
382 IWebBrowser2 *wb;
383
385
386 if(browser_service) {
387 hres = IBrowserService_QueryInterface(browser_service,
388 &IID_IDocObjectService, (void**)&doc_object_service);
390 This->doc_obj->doc_object_service = doc_object_service;
391
392
393
394
395
399 }
400 }
401 }
402
404
405 IOleCommandTarget_QueryStatus(cmdtrg,
NULL, 1, &
cmd,
NULL);
406
409 IOleCommandTarget_Exec(cmdtrg,
NULL, OLECMDID_SETPROGRESSMAX,
410 OLECMDEXECOPT_DONTPROMPTUSER, &
var,
NULL);
411 IOleCommandTarget_Exec(cmdtrg,
NULL, OLECMDID_SETPROGRESSPOS,
412 OLECMDEXECOPT_DONTPROMPTUSER, &
var,
NULL);
413 }
414
417
418 IOleControl_OnAmbientPropertyChange(&
This->IOleControl_iface,
420
426 FIXME(
"silent == true\n");
427 }
428
431
433}
HRESULT do_query_service(IUnknown *unk, REFGUID guid_service, REFIID riid, void **ppv)
VOID WINAPI CoTaskMemFree(LPVOID ptr)
void set_document_navigation(HTMLDocumentObj *doc, BOOL doc_can_navigate)
static void update_hostinfo(HTMLDocumentObj *This, DOCHOSTUIINFO *hostinfo)
static void load_settings(HTMLDocumentObj *doc)
void call_docview_84(HTMLDocumentObj *doc)
const GUID IID_IOleWindow