2005-04-12 13:57:51 +02:00
|
|
|
/*
|
|
|
|
* Copyright 2005 Jacek Caban
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2005-04-12 13:57:51 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include <stdio.h>
|
2014-02-19 17:24:24 +01:00
|
|
|
#include <assert.h>
|
2005-04-12 13:57:51 +02:00
|
|
|
|
|
|
|
#define COBJMACROS
|
|
|
|
|
|
|
|
#include "windef.h"
|
|
|
|
#include "winbase.h"
|
|
|
|
#include "winuser.h"
|
|
|
|
#include "ole2.h"
|
2005-08-18 12:50:05 +02:00
|
|
|
#include "shlguid.h"
|
2011-03-11 11:14:18 +01:00
|
|
|
#include "shdeprecated.h"
|
2005-08-22 11:25:20 +02:00
|
|
|
#include "mshtmdid.h"
|
|
|
|
#include "idispids.h"
|
2005-04-12 13:57:51 +02:00
|
|
|
|
|
|
|
#include "wine/debug.h"
|
|
|
|
|
|
|
|
#include "mshtml_private.h"
|
|
|
|
|
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
|
|
|
|
|
2010-03-03 14:56:56 +01:00
|
|
|
#define DOCHOST_DOCCANNAVIGATE 0
|
|
|
|
|
2012-01-19 17:03:37 +01:00
|
|
|
typedef struct {
|
|
|
|
IEnumUnknown IEnumUnknown_iface;
|
|
|
|
LONG ref;
|
|
|
|
} EnumUnknown;
|
|
|
|
|
|
|
|
static inline EnumUnknown *impl_from_IEnumUnknown(IEnumUnknown *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, EnumUnknown, IEnumUnknown_iface);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI EnumUnknown_QueryInterface(IEnumUnknown *iface, REFIID riid, void **ppv)
|
|
|
|
{
|
|
|
|
EnumUnknown *This = impl_from_IEnumUnknown(iface);
|
|
|
|
|
|
|
|
if(IsEqualGUID(&IID_IUnknown, riid)) {
|
|
|
|
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
|
|
|
|
*ppv = &This->IEnumUnknown_iface;
|
|
|
|
}else if(IsEqualGUID(&IID_IEnumUnknown, riid)) {
|
|
|
|
TRACE("(%p)->(IID_IEnumUnknown %p)\n", This, ppv);
|
|
|
|
*ppv = &This->IEnumUnknown_iface;
|
|
|
|
}else {
|
|
|
|
WARN("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
|
|
|
|
*ppv = NULL;
|
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
|
|
|
|
IUnknown_AddRef((IUnknown*)*ppv);
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI EnumUnknown_AddRef(IEnumUnknown *iface)
|
|
|
|
{
|
|
|
|
EnumUnknown *This = impl_from_IEnumUnknown(iface);
|
|
|
|
LONG ref = InterlockedIncrement(&This->ref);
|
|
|
|
|
|
|
|
TRACE("(%p) ref=%d\n", This, ref);
|
|
|
|
|
|
|
|
return ref;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI EnumUnknown_Release(IEnumUnknown *iface)
|
|
|
|
{
|
|
|
|
EnumUnknown *This = impl_from_IEnumUnknown(iface);
|
|
|
|
LONG ref = InterlockedDecrement(&This->ref);
|
|
|
|
|
|
|
|
TRACE("(%p) ref=%d\n", This, ref);
|
|
|
|
|
|
|
|
if(!ref)
|
|
|
|
heap_free(This);
|
|
|
|
|
|
|
|
return ref;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI EnumUnknown_Next(IEnumUnknown *iface, ULONG celt, IUnknown **rgelt, ULONG *pceltFetched)
|
|
|
|
{
|
|
|
|
EnumUnknown *This = impl_from_IEnumUnknown(iface);
|
|
|
|
|
|
|
|
TRACE("(%p)->(%u %p %p)\n", This, celt, rgelt, pceltFetched);
|
|
|
|
|
|
|
|
/* FIXME: It's not clear if we should ever return something here */
|
|
|
|
if(pceltFetched)
|
|
|
|
*pceltFetched = 0;
|
|
|
|
return S_FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI EnumUnknown_Skip(IEnumUnknown *iface, ULONG celt)
|
|
|
|
{
|
|
|
|
EnumUnknown *This = impl_from_IEnumUnknown(iface);
|
|
|
|
FIXME("(%p)->(%u)\n", This, celt);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI EnumUnknown_Reset(IEnumUnknown *iface)
|
|
|
|
{
|
|
|
|
EnumUnknown *This = impl_from_IEnumUnknown(iface);
|
|
|
|
FIXME("(%p)\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI EnumUnknown_Clone(IEnumUnknown *iface, IEnumUnknown **ppenum)
|
|
|
|
{
|
|
|
|
EnumUnknown *This = impl_from_IEnumUnknown(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, ppenum);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const IEnumUnknownVtbl EnumUnknownVtbl = {
|
|
|
|
EnumUnknown_QueryInterface,
|
|
|
|
EnumUnknown_AddRef,
|
|
|
|
EnumUnknown_Release,
|
|
|
|
EnumUnknown_Next,
|
|
|
|
EnumUnknown_Skip,
|
|
|
|
EnumUnknown_Reset,
|
|
|
|
EnumUnknown_Clone
|
|
|
|
};
|
|
|
|
|
2005-04-12 13:57:51 +02:00
|
|
|
/**********************************************************
|
|
|
|
* IOleObject implementation
|
|
|
|
*/
|
|
|
|
|
2010-12-23 02:16:00 +01:00
|
|
|
static inline HTMLDocument *impl_from_IOleObject(IOleObject *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, HTMLDocument, IOleObject_iface);
|
|
|
|
}
|
2005-04-12 13:57:51 +02:00
|
|
|
|
2010-12-16 14:59:51 +01:00
|
|
|
static HRESULT WINAPI OleObject_QueryInterface(IOleObject *iface, REFIID riid, void **ppv)
|
2005-04-12 13:57:51 +02:00
|
|
|
{
|
2010-12-23 02:16:00 +01:00
|
|
|
HTMLDocument *This = impl_from_IOleObject(iface);
|
2010-12-16 14:59:51 +01:00
|
|
|
return htmldoc_query_interface(This, riid, ppv);
|
2005-04-12 13:57:51 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI OleObject_AddRef(IOleObject *iface)
|
|
|
|
{
|
2010-12-23 02:16:00 +01:00
|
|
|
HTMLDocument *This = impl_from_IOleObject(iface);
|
2010-12-16 14:59:51 +01:00
|
|
|
return htmldoc_addref(This);
|
2005-04-12 13:57:51 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI OleObject_Release(IOleObject *iface)
|
|
|
|
{
|
2010-12-23 02:16:00 +01:00
|
|
|
HTMLDocument *This = impl_from_IOleObject(iface);
|
2010-12-16 14:59:51 +01:00
|
|
|
return htmldoc_release(This);
|
2005-04-12 13:57:51 +02:00
|
|
|
}
|
|
|
|
|
2009-09-16 22:09:17 +02:00
|
|
|
static void update_hostinfo(HTMLDocumentObj *This, DOCHOSTUIINFO *hostinfo)
|
2008-06-30 21:37:56 +02:00
|
|
|
{
|
|
|
|
nsIScrollable *scrollable;
|
|
|
|
nsresult nsres;
|
|
|
|
|
|
|
|
if(!This->nscontainer)
|
|
|
|
return;
|
|
|
|
|
|
|
|
nsres = nsIWebBrowser_QueryInterface(This->nscontainer->webbrowser, &IID_nsIScrollable, (void**)&scrollable);
|
|
|
|
if(NS_SUCCEEDED(nsres)) {
|
|
|
|
nsres = nsIScrollable_SetDefaultScrollbarPreferences(scrollable, ScrollOrientation_Y,
|
|
|
|
(hostinfo->dwFlags & DOCHOSTUIFLAG_SCROLL_NO) ? Scrollbar_Never : Scrollbar_Always);
|
|
|
|
if(NS_FAILED(nsres))
|
|
|
|
ERR("Could not set default Y scrollbar prefs: %08x\n", nsres);
|
|
|
|
|
|
|
|
nsres = nsIScrollable_SetDefaultScrollbarPreferences(scrollable, ScrollOrientation_X,
|
|
|
|
hostinfo->dwFlags & DOCHOSTUIFLAG_SCROLL_NO ? Scrollbar_Never : Scrollbar_Auto);
|
|
|
|
if(NS_FAILED(nsres))
|
|
|
|
ERR("Could not set default X scrollbar prefs: %08x\n", nsres);
|
|
|
|
|
|
|
|
nsIScrollable_Release(scrollable);
|
|
|
|
}else {
|
|
|
|
ERR("Could not get nsIScrollable: %08x\n", nsres);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-05-29 14:38:04 +02:00
|
|
|
/* Calls undocumented 84 cmd of CGID_ShellDocView */
|
|
|
|
void call_docview_84(HTMLDocumentObj *doc)
|
|
|
|
{
|
|
|
|
IOleCommandTarget *olecmd;
|
|
|
|
VARIANT var;
|
|
|
|
HRESULT hres;
|
|
|
|
|
|
|
|
if(!doc->client)
|
|
|
|
return;
|
|
|
|
|
|
|
|
hres = IOleClientSite_QueryInterface(doc->client, &IID_IOleCommandTarget, (void**)&olecmd);
|
|
|
|
if(FAILED(hres))
|
|
|
|
return;
|
|
|
|
|
|
|
|
VariantInit(&var);
|
|
|
|
hres = IOleCommandTarget_Exec(olecmd, &CGID_ShellDocView, 84, 0, NULL, &var);
|
|
|
|
IOleCommandTarget_Release(olecmd);
|
|
|
|
if(SUCCEEDED(hres) && V_VT(&var) != VT_NULL)
|
|
|
|
FIXME("handle result\n");
|
|
|
|
}
|
|
|
|
|
2013-09-19 16:13:06 +02:00
|
|
|
void set_document_navigation(HTMLDocumentObj *doc, BOOL doc_can_navigate)
|
2013-09-18 16:57:56 +02:00
|
|
|
{
|
|
|
|
VARIANT var;
|
|
|
|
|
|
|
|
if(!doc->client_cmdtrg)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if(doc_can_navigate) {
|
|
|
|
V_VT(&var) = VT_UNKNOWN;
|
|
|
|
V_UNKNOWN(&var) = (IUnknown*)&doc->basedoc.window->base.IHTMLWindow2_iface;
|
|
|
|
}
|
|
|
|
|
|
|
|
IOleCommandTarget_Exec(doc->client_cmdtrg, &CGID_DocHostCmdPriv, DOCHOST_DOCCANNAVIGATE, 0,
|
|
|
|
doc_can_navigate ? &var : NULL, NULL);
|
|
|
|
}
|
|
|
|
|
2014-02-19 17:24:24 +01:00
|
|
|
static void load_settings(HTMLDocumentObj *doc)
|
|
|
|
{
|
|
|
|
HKEY settings_key;
|
|
|
|
DWORD val, size;
|
|
|
|
LONG res;
|
|
|
|
|
2020-11-24 23:29:19 +01:00
|
|
|
res = RegOpenKeyW(HKEY_CURRENT_USER, L"SOFTWARE\\Microsoft\\Internet Explorer", &settings_key);
|
2014-02-19 17:24:24 +01:00
|
|
|
if(res != ERROR_SUCCESS)
|
|
|
|
return;
|
|
|
|
|
|
|
|
size = sizeof(val);
|
2020-11-24 23:29:19 +01:00
|
|
|
res = RegGetValueW(settings_key, L"Zoom", L"ZoomFactor", RRF_RT_REG_DWORD, NULL, &val, &size);
|
2014-02-19 17:24:24 +01:00
|
|
|
RegCloseKey(settings_key);
|
2015-01-23 14:38:16 +01:00
|
|
|
if(res == ERROR_SUCCESS)
|
|
|
|
set_viewer_zoom(doc->nscontainer, (float)val/100000);
|
2014-02-19 17:24:24 +01:00
|
|
|
}
|
|
|
|
|
2005-04-12 13:57:51 +02:00
|
|
|
static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite *pClientSite)
|
|
|
|
{
|
2010-12-23 02:16:00 +01:00
|
|
|
HTMLDocument *This = impl_from_IOleObject(iface);
|
2005-08-18 12:50:05 +02:00
|
|
|
IOleCommandTarget *cmdtrg = NULL;
|
2010-06-28 12:51:11 +02:00
|
|
|
IOleWindow *ole_window;
|
2013-04-23 16:21:04 +02:00
|
|
|
IBrowserService *browser_service;
|
2010-03-03 14:56:56 +01:00
|
|
|
BOOL hostui_setup;
|
2007-03-09 16:48:09 +01:00
|
|
|
VARIANT silent;
|
2010-06-28 12:51:11 +02:00
|
|
|
HWND hwnd;
|
2005-07-11 12:56:28 +02:00
|
|
|
HRESULT hres;
|
|
|
|
|
2005-04-12 13:57:51 +02:00
|
|
|
TRACE("(%p)->(%p)\n", This, pClientSite);
|
|
|
|
|
2009-09-16 22:10:03 +02:00
|
|
|
if(pClientSite == This->doc_obj->client)
|
2005-08-22 16:07:49 +02:00
|
|
|
return S_OK;
|
|
|
|
|
2009-09-16 22:10:03 +02:00
|
|
|
if(This->doc_obj->client) {
|
|
|
|
IOleClientSite_Release(This->doc_obj->client);
|
|
|
|
This->doc_obj->client = NULL;
|
2019-03-12 16:10:24 +01:00
|
|
|
This->doc_obj->nscontainer->usermode = UNKNOWN_USERMODE;
|
2006-01-14 17:04:54 +01:00
|
|
|
}
|
2005-07-11 12:56:28 +02:00
|
|
|
|
2012-11-12 12:58:27 +01:00
|
|
|
if(This->doc_obj->client_cmdtrg) {
|
|
|
|
IOleCommandTarget_Release(This->doc_obj->client_cmdtrg);
|
|
|
|
This->doc_obj->client_cmdtrg = NULL;
|
|
|
|
}
|
|
|
|
|
2010-11-29 00:18:18 +01:00
|
|
|
if(This->doc_obj->hostui && !This->doc_obj->custom_hostui) {
|
2009-09-16 22:10:03 +02:00
|
|
|
IDocHostUIHandler_Release(This->doc_obj->hostui);
|
|
|
|
This->doc_obj->hostui = NULL;
|
2006-01-14 17:04:54 +01:00
|
|
|
}
|
2005-07-12 19:00:58 +02:00
|
|
|
|
2011-03-11 11:14:18 +01:00
|
|
|
if(This->doc_obj->doc_object_service) {
|
|
|
|
IDocObjectService_Release(This->doc_obj->doc_object_service);
|
|
|
|
This->doc_obj->doc_object_service = NULL;
|
|
|
|
}
|
|
|
|
|
2013-04-15 17:40:43 +02:00
|
|
|
if(This->doc_obj->webbrowser) {
|
|
|
|
IUnknown_Release(This->doc_obj->webbrowser);
|
|
|
|
This->doc_obj->webbrowser = NULL;
|
|
|
|
}
|
|
|
|
|
2013-04-23 16:21:04 +02:00
|
|
|
if(This->doc_obj->browser_service) {
|
|
|
|
IUnknown_Release(This->doc_obj->browser_service);
|
|
|
|
This->doc_obj->browser_service = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(This->doc_obj->travel_log) {
|
|
|
|
ITravelLog_Release(This->doc_obj->travel_log);
|
|
|
|
This->doc_obj->travel_log = NULL;
|
|
|
|
}
|
|
|
|
|
2009-09-16 22:11:05 +02:00
|
|
|
memset(&This->doc_obj->hostinfo, 0, sizeof(DOCHOSTUIINFO));
|
2006-11-12 17:09:38 +01:00
|
|
|
|
2006-01-14 17:04:54 +01:00
|
|
|
if(!pClientSite)
|
2005-07-11 12:56:28 +02:00
|
|
|
return S_OK;
|
|
|
|
|
2010-06-28 12:51:11 +02:00
|
|
|
IOleClientSite_AddRef(pClientSite);
|
|
|
|
This->doc_obj->client = pClientSite;
|
|
|
|
|
2010-03-03 14:56:56 +01:00
|
|
|
hostui_setup = This->doc_obj->hostui_setup;
|
|
|
|
|
2010-11-29 00:18:18 +01:00
|
|
|
if(!This->doc_obj->hostui) {
|
|
|
|
IDocHostUIHandler *uihandler;
|
|
|
|
|
|
|
|
This->doc_obj->custom_hostui = FALSE;
|
|
|
|
|
2012-07-26 11:37:48 +02:00
|
|
|
hres = IOleClientSite_QueryInterface(pClientSite, &IID_IDocHostUIHandler, (void**)&uihandler);
|
2010-11-29 00:18:18 +01:00
|
|
|
if(SUCCEEDED(hres))
|
|
|
|
This->doc_obj->hostui = uihandler;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(This->doc_obj->hostui) {
|
2005-07-11 12:56:28 +02:00
|
|
|
DOCHOSTUIINFO hostinfo;
|
|
|
|
LPOLESTR key_path = NULL, override_key_path = NULL;
|
2010-11-29 00:18:18 +01:00
|
|
|
IDocHostUIHandler2 *uihandler2;
|
2010-06-28 12:51:11 +02:00
|
|
|
|
2005-07-11 12:56:28 +02:00
|
|
|
memset(&hostinfo, 0, sizeof(DOCHOSTUIINFO));
|
|
|
|
hostinfo.cbSize = sizeof(DOCHOSTUIINFO);
|
2010-11-29 00:18:18 +01:00
|
|
|
hres = IDocHostUIHandler_GetHostInfo(This->doc_obj->hostui, &hostinfo);
|
2006-11-12 17:09:38 +01:00
|
|
|
if(SUCCEEDED(hres)) {
|
2006-10-05 23:50:39 +02:00
|
|
|
TRACE("hostinfo = {%u %08x %08x %s %s}\n",
|
2005-07-11 12:56:28 +02:00
|
|
|
hostinfo.cbSize, hostinfo.dwFlags, hostinfo.dwDoubleClick,
|
|
|
|
debugstr_w(hostinfo.pchHostCss), debugstr_w(hostinfo.pchHostNS));
|
2009-09-16 22:09:17 +02:00
|
|
|
update_hostinfo(This->doc_obj, &hostinfo);
|
2009-09-16 22:11:05 +02:00
|
|
|
This->doc_obj->hostinfo = hostinfo;
|
2006-11-12 17:09:38 +01:00
|
|
|
}
|
2005-07-11 12:56:28 +02:00
|
|
|
|
2010-03-03 14:56:56 +01:00
|
|
|
if(!hostui_setup) {
|
2010-11-29 00:18:18 +01:00
|
|
|
hres = IDocHostUIHandler_GetOptionKeyPath(This->doc_obj->hostui, &key_path, 0);
|
2005-07-18 11:13:32 +02:00
|
|
|
if(hres == S_OK && key_path) {
|
|
|
|
if(key_path[0]) {
|
|
|
|
/* FIXME: use key_path */
|
2014-02-19 17:24:24 +01:00
|
|
|
FIXME("key_path = %s\n", debugstr_w(key_path));
|
2005-07-18 11:13:32 +02:00
|
|
|
}
|
|
|
|
CoTaskMemFree(key_path);
|
|
|
|
}
|
2005-07-11 12:56:28 +02:00
|
|
|
|
2010-11-29 00:18:18 +01:00
|
|
|
hres = IDocHostUIHandler_QueryInterface(This->doc_obj->hostui, &IID_IDocHostUIHandler2,
|
|
|
|
(void**)&uihandler2);
|
2005-07-18 11:13:32 +02:00
|
|
|
if(SUCCEEDED(hres)) {
|
2010-11-29 00:18:18 +01:00
|
|
|
hres = IDocHostUIHandler2_GetOverrideKeyPath(uihandler2, &override_key_path, 0);
|
2014-08-16 11:53:13 +02:00
|
|
|
if(hres == S_OK && override_key_path) {
|
2005-07-18 11:13:32 +02:00
|
|
|
if(override_key_path[0]) {
|
|
|
|
/*FIXME: use override_key_path */
|
2014-02-19 17:24:24 +01:00
|
|
|
FIXME("override_key_path = %s\n", debugstr_w(override_key_path));
|
2005-07-18 11:13:32 +02:00
|
|
|
}
|
|
|
|
CoTaskMemFree(override_key_path);
|
|
|
|
}
|
2010-11-29 00:18:18 +01:00
|
|
|
IDocHostUIHandler2_Release(uihandler2);
|
2005-07-18 11:13:32 +02:00
|
|
|
}
|
|
|
|
|
2010-03-03 14:56:56 +01:00
|
|
|
This->doc_obj->hostui_setup = TRUE;
|
2005-07-11 12:56:28 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-02-19 17:24:24 +01:00
|
|
|
load_settings(This->doc_obj);
|
|
|
|
|
2005-07-14 14:18:59 +02:00
|
|
|
/* Native calls here GetWindow. What is it for?
|
|
|
|
* We don't have anything to do with it here (yet). */
|
2010-06-28 12:51:11 +02:00
|
|
|
hres = IOleClientSite_QueryInterface(pClientSite, &IID_IOleWindow, (void**)&ole_window);
|
|
|
|
if(SUCCEEDED(hres)) {
|
|
|
|
IOleWindow_GetWindow(ole_window, &hwnd);
|
|
|
|
IOleWindow_Release(ole_window);
|
2005-07-14 14:18:59 +02:00
|
|
|
}
|
|
|
|
|
2013-04-23 16:21:04 +02:00
|
|
|
hres = do_query_service((IUnknown*)pClientSite, &IID_IShellBrowser,
|
|
|
|
&IID_IBrowserService, (void**)&browser_service);
|
|
|
|
if(SUCCEEDED(hres)) {
|
|
|
|
ITravelLog *travel_log;
|
|
|
|
|
|
|
|
This->doc_obj->browser_service = (IUnknown*)browser_service;
|
|
|
|
|
|
|
|
hres = IBrowserService_GetTravelLog(browser_service, &travel_log);
|
|
|
|
if(SUCCEEDED(hres))
|
|
|
|
This->doc_obj->travel_log = travel_log;
|
|
|
|
}else {
|
|
|
|
browser_service = NULL;
|
|
|
|
}
|
|
|
|
|
2005-08-18 12:50:05 +02:00
|
|
|
hres = IOleClientSite_QueryInterface(pClientSite, &IID_IOleCommandTarget, (void**)&cmdtrg);
|
|
|
|
if(SUCCEEDED(hres)) {
|
|
|
|
VARIANT var;
|
|
|
|
OLECMD cmd = {OLECMDID_SETPROGRESSTEXT, 0};
|
|
|
|
|
2012-11-12 12:58:27 +01:00
|
|
|
This->doc_obj->client_cmdtrg = cmdtrg;
|
|
|
|
|
2010-03-03 14:56:56 +01:00
|
|
|
if(!hostui_setup) {
|
2012-01-05 18:30:36 +01:00
|
|
|
IDocObjectService *doc_object_service;
|
|
|
|
IWebBrowser2 *wb;
|
2011-11-12 14:54:09 +01:00
|
|
|
|
2013-09-18 16:57:56 +02:00
|
|
|
set_document_navigation(This->doc_obj, TRUE);
|
2011-11-12 14:54:09 +01:00
|
|
|
|
2013-04-23 16:21:04 +02:00
|
|
|
if(browser_service) {
|
2012-01-05 18:30:36 +01:00
|
|
|
hres = IBrowserService_QueryInterface(browser_service,
|
|
|
|
&IID_IDocObjectService, (void**)&doc_object_service);
|
2011-11-12 14:54:09 +01:00
|
|
|
if(SUCCEEDED(hres)) {
|
2012-01-05 18:30:36 +01:00
|
|
|
This->doc_obj->doc_object_service = doc_object_service;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Some embedding routines, esp. in regards to use of IDocObjectService, differ if
|
|
|
|
* embedder supports IWebBrowserApp.
|
|
|
|
*/
|
|
|
|
hres = do_query_service((IUnknown*)pClientSite, &IID_IWebBrowserApp, &IID_IWebBrowser2, (void**)&wb);
|
2013-04-15 17:40:43 +02:00
|
|
|
if(SUCCEEDED(hres))
|
|
|
|
This->doc_obj->webbrowser = (IUnknown*)wb;
|
2011-11-12 14:54:09 +01:00
|
|
|
}
|
|
|
|
}
|
2010-03-03 14:56:56 +01:00
|
|
|
}
|
|
|
|
|
2012-05-29 14:38:04 +02:00
|
|
|
call_docview_84(This->doc_obj);
|
|
|
|
|
2005-08-18 12:50:05 +02:00
|
|
|
IOleCommandTarget_QueryStatus(cmdtrg, NULL, 1, &cmd, NULL);
|
|
|
|
|
|
|
|
V_VT(&var) = VT_I4;
|
|
|
|
V_I4(&var) = 0;
|
2006-08-18 14:53:25 +02:00
|
|
|
IOleCommandTarget_Exec(cmdtrg, NULL, OLECMDID_SETPROGRESSMAX,
|
|
|
|
OLECMDEXECOPT_DONTPROMPTUSER, &var, NULL);
|
|
|
|
IOleCommandTarget_Exec(cmdtrg, NULL, OLECMDID_SETPROGRESSPOS,
|
|
|
|
OLECMDEXECOPT_DONTPROMPTUSER, &var, NULL);
|
2005-08-18 12:50:05 +02:00
|
|
|
}
|
|
|
|
|
2019-03-12 16:10:24 +01:00
|
|
|
if(This->doc_obj->nscontainer->usermode == UNKNOWN_USERMODE)
|
2010-12-27 01:46:09 +01:00
|
|
|
IOleControl_OnAmbientPropertyChange(&This->IOleControl_iface, DISPID_AMBIENT_USERMODE);
|
2006-06-30 23:44:04 +02:00
|
|
|
|
2010-12-27 01:46:09 +01:00
|
|
|
IOleControl_OnAmbientPropertyChange(&This->IOleControl_iface,
|
|
|
|
DISPID_AMBIENT_OFFLINEIFNOTCONNECTED);
|
2007-03-09 16:48:09 +01:00
|
|
|
|
2009-09-16 22:10:03 +02:00
|
|
|
hres = get_client_disp_property(This->doc_obj->client, DISPID_AMBIENT_SILENT, &silent);
|
2007-03-09 16:48:09 +01:00
|
|
|
if(SUCCEEDED(hres)) {
|
|
|
|
if(V_VT(&silent) != VT_BOOL)
|
2012-03-28 14:27:20 +02:00
|
|
|
WARN("silent = %s\n", debugstr_variant(&silent));
|
2007-03-09 16:48:09 +01:00
|
|
|
else if(V_BOOL(&silent))
|
|
|
|
FIXME("silent == true\n");
|
|
|
|
}
|
|
|
|
|
2010-12-27 01:46:09 +01:00
|
|
|
IOleControl_OnAmbientPropertyChange(&This->IOleControl_iface, DISPID_AMBIENT_USERAGENT);
|
|
|
|
IOleControl_OnAmbientPropertyChange(&This->IOleControl_iface, DISPID_AMBIENT_PALETTE);
|
2005-08-22 11:25:20 +02:00
|
|
|
|
2005-04-12 13:57:51 +02:00
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleObject_GetClientSite(IOleObject *iface, IOleClientSite **ppClientSite)
|
|
|
|
{
|
2010-12-23 02:16:00 +01:00
|
|
|
HTMLDocument *This = impl_from_IOleObject(iface);
|
2005-07-11 12:56:28 +02:00
|
|
|
|
2005-04-12 13:57:51 +02:00
|
|
|
TRACE("(%p)->(%p)\n", This, ppClientSite);
|
|
|
|
|
|
|
|
if(!ppClientSite)
|
|
|
|
return E_INVALIDARG;
|
|
|
|
|
2009-09-16 22:10:03 +02:00
|
|
|
if(This->doc_obj->client)
|
|
|
|
IOleClientSite_AddRef(This->doc_obj->client);
|
|
|
|
*ppClientSite = This->doc_obj->client;
|
2005-04-12 13:57:51 +02:00
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleObject_SetHostNames(IOleObject *iface, LPCOLESTR szContainerApp, LPCOLESTR szContainerObj)
|
|
|
|
{
|
2010-12-23 02:16:00 +01:00
|
|
|
HTMLDocument *This = impl_from_IOleObject(iface);
|
2005-04-12 13:57:51 +02:00
|
|
|
FIXME("(%p)->(%s %s)\n", This, debugstr_w(szContainerApp), debugstr_w(szContainerObj));
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleObject_Close(IOleObject *iface, DWORD dwSaveOption)
|
|
|
|
{
|
2010-12-23 02:16:00 +01:00
|
|
|
HTMLDocument *This = impl_from_IOleObject(iface);
|
2005-07-14 14:18:59 +02:00
|
|
|
|
2006-10-05 23:50:39 +02:00
|
|
|
TRACE("(%p)->(%08x)\n", This, dwSaveOption);
|
2005-08-12 17:51:55 +02:00
|
|
|
|
|
|
|
if(dwSaveOption == OLECLOSE_PROMPTSAVE)
|
|
|
|
FIXME("OLECLOSE_PROMPTSAVE not implemented\n");
|
|
|
|
|
2009-09-16 22:11:26 +02:00
|
|
|
if(This->doc_obj->in_place_active)
|
2010-12-23 02:22:21 +01:00
|
|
|
IOleInPlaceObjectWindowless_InPlaceDeactivate(&This->IOleInPlaceObjectWindowless_iface);
|
2005-07-14 14:18:59 +02:00
|
|
|
|
2009-09-16 22:10:03 +02:00
|
|
|
HTMLDocument_LockContainer(This->doc_obj, FALSE);
|
2009-12-07 14:54:05 +01:00
|
|
|
|
2017-11-22 16:15:38 +01:00
|
|
|
if(This->doc_obj->advise_holder)
|
|
|
|
IOleAdviseHolder_SendOnClose(This->doc_obj->advise_holder);
|
2005-07-14 14:18:59 +02:00
|
|
|
|
|
|
|
return S_OK;
|
2005-04-12 13:57:51 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleObject_SetMoniker(IOleObject *iface, DWORD dwWhichMoniker, IMoniker *pmk)
|
|
|
|
{
|
2010-12-23 02:16:00 +01:00
|
|
|
HTMLDocument *This = impl_from_IOleObject(iface);
|
2006-10-05 23:50:39 +02:00
|
|
|
FIXME("(%p %d %p)->()\n", This, dwWhichMoniker, pmk);
|
2005-04-12 13:57:51 +02:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleObject_GetMoniker(IOleObject *iface, DWORD dwAssign, DWORD dwWhichMoniker, IMoniker **ppmk)
|
|
|
|
{
|
2010-12-23 02:16:00 +01:00
|
|
|
HTMLDocument *This = impl_from_IOleObject(iface);
|
2006-10-05 23:50:39 +02:00
|
|
|
FIXME("(%p)->(%d %d %p)\n", This, dwAssign, dwWhichMoniker, ppmk);
|
2005-04-12 13:57:51 +02:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleObject_InitFromData(IOleObject *iface, IDataObject *pDataObject, BOOL fCreation,
|
|
|
|
DWORD dwReserved)
|
|
|
|
{
|
2010-12-23 02:16:00 +01:00
|
|
|
HTMLDocument *This = impl_from_IOleObject(iface);
|
2006-10-05 23:50:39 +02:00
|
|
|
FIXME("(%p)->(%p %x %d)\n", This, pDataObject, fCreation, dwReserved);
|
2005-04-12 13:57:51 +02:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleObject_GetClipboardData(IOleObject *iface, DWORD dwReserved, IDataObject **ppDataObject)
|
|
|
|
{
|
2010-12-23 02:16:00 +01:00
|
|
|
HTMLDocument *This = impl_from_IOleObject(iface);
|
2006-10-05 23:50:39 +02:00
|
|
|
FIXME("(%p)->(%d %p)\n", This, dwReserved, ppDataObject);
|
2005-04-12 13:57:51 +02:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleObject_DoVerb(IOleObject *iface, LONG iVerb, LPMSG lpmsg, IOleClientSite *pActiveSite,
|
|
|
|
LONG lindex, HWND hwndParent, LPCRECT lprcPosRect)
|
|
|
|
{
|
2010-12-23 02:16:00 +01:00
|
|
|
HTMLDocument *This = impl_from_IOleObject(iface);
|
2005-04-13 16:41:19 +02:00
|
|
|
IOleDocumentSite *pDocSite;
|
|
|
|
HRESULT hres;
|
|
|
|
|
2006-10-05 23:50:39 +02:00
|
|
|
TRACE("(%p)->(%d %p %p %d %p %p)\n", This, iVerb, lpmsg, pActiveSite, lindex, hwndParent, lprcPosRect);
|
2005-04-13 16:41:19 +02:00
|
|
|
|
2005-08-12 17:51:55 +02:00
|
|
|
if(iVerb != OLEIVERB_SHOW && iVerb != OLEIVERB_UIACTIVATE && iVerb != OLEIVERB_INPLACEACTIVATE) {
|
2006-10-05 23:50:39 +02:00
|
|
|
FIXME("iVerb = %d not supported\n", iVerb);
|
2005-04-13 16:41:19 +02:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(!pActiveSite)
|
2009-09-16 22:10:03 +02:00
|
|
|
pActiveSite = This->doc_obj->client;
|
2005-04-13 16:41:19 +02:00
|
|
|
|
|
|
|
hres = IOleClientSite_QueryInterface(pActiveSite, &IID_IOleDocumentSite, (void**)&pDocSite);
|
|
|
|
if(SUCCEEDED(hres)) {
|
2009-09-16 22:10:03 +02:00
|
|
|
HTMLDocument_LockContainer(This->doc_obj, TRUE);
|
2005-08-22 16:07:49 +02:00
|
|
|
|
2005-07-12 19:00:58 +02:00
|
|
|
/* FIXME: Create new IOleDocumentView. See CreateView for more info. */
|
2018-02-28 16:31:56 +01:00
|
|
|
hres = IOleDocumentSite_ActivateMe(pDocSite, &This->doc_obj->IOleDocumentView_iface);
|
2005-04-13 16:41:19 +02:00
|
|
|
IOleDocumentSite_Release(pDocSite);
|
|
|
|
}else {
|
2018-02-28 16:31:56 +01:00
|
|
|
hres = IOleDocumentView_UIActivate(&This->doc_obj->IOleDocumentView_iface, TRUE);
|
2005-04-13 16:41:19 +02:00
|
|
|
if(SUCCEEDED(hres)) {
|
|
|
|
if(lprcPosRect) {
|
|
|
|
RECT rect; /* We need to pass rect as not const pointer */
|
2008-03-05 22:35:16 +01:00
|
|
|
rect = *lprcPosRect;
|
2018-02-28 16:31:56 +01:00
|
|
|
IOleDocumentView_SetRect(&This->doc_obj->IOleDocumentView_iface, &rect);
|
2005-04-13 16:41:19 +02:00
|
|
|
}
|
2018-02-28 16:31:56 +01:00
|
|
|
IOleDocumentView_Show(&This->doc_obj->IOleDocumentView_iface, TRUE);
|
2005-04-13 16:41:19 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return hres;
|
2005-04-12 13:57:51 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleObject_EnumVerbs(IOleObject *iface, IEnumOLEVERB **ppEnumOleVerb)
|
|
|
|
{
|
2010-12-23 02:16:00 +01:00
|
|
|
HTMLDocument *This = impl_from_IOleObject(iface);
|
2005-04-12 13:57:51 +02:00
|
|
|
FIXME("(%p)->(%p)\n", This, ppEnumOleVerb);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleObject_Update(IOleObject *iface)
|
|
|
|
{
|
2010-12-23 02:16:00 +01:00
|
|
|
HTMLDocument *This = impl_from_IOleObject(iface);
|
2005-04-12 13:57:51 +02:00
|
|
|
FIXME("(%p)\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleObject_IsUpToDate(IOleObject *iface)
|
|
|
|
{
|
2010-12-23 02:16:00 +01:00
|
|
|
HTMLDocument *This = impl_from_IOleObject(iface);
|
2005-04-12 13:57:51 +02:00
|
|
|
FIXME("(%p)\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleObject_GetUserClassID(IOleObject *iface, CLSID *pClsid)
|
|
|
|
{
|
2010-12-23 02:16:00 +01:00
|
|
|
HTMLDocument *This = impl_from_IOleObject(iface);
|
2005-07-11 12:56:28 +02:00
|
|
|
|
2005-04-12 13:57:51 +02:00
|
|
|
TRACE("(%p)->(%p)\n", This, pClsid);
|
|
|
|
|
|
|
|
if(!pClsid)
|
|
|
|
return E_INVALIDARG;
|
|
|
|
|
2008-03-05 22:35:16 +01:00
|
|
|
*pClsid = CLSID_HTMLDocument;
|
2005-04-12 13:57:51 +02:00
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleObject_GetUserType(IOleObject *iface, DWORD dwFormOfType, LPOLESTR *pszUserType)
|
|
|
|
{
|
2010-12-23 02:16:00 +01:00
|
|
|
HTMLDocument *This = impl_from_IOleObject(iface);
|
2006-10-05 23:50:39 +02:00
|
|
|
FIXME("(%p)->(%d %p)\n", This, dwFormOfType, pszUserType);
|
2005-04-12 13:57:51 +02:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleObject_SetExtent(IOleObject *iface, DWORD dwDrawAspect, SIZEL *psizel)
|
|
|
|
{
|
2010-12-23 02:16:00 +01:00
|
|
|
HTMLDocument *This = impl_from_IOleObject(iface);
|
2020-09-23 16:47:07 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%d %p)\n", This, dwDrawAspect, psizel);
|
|
|
|
|
|
|
|
if (dwDrawAspect != DVASPECT_CONTENT)
|
|
|
|
return E_INVALIDARG;
|
|
|
|
|
|
|
|
This->doc_obj->extent = *psizel;
|
|
|
|
return S_OK;
|
2005-04-12 13:57:51 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleObject_GetExtent(IOleObject *iface, DWORD dwDrawAspect, SIZEL *psizel)
|
|
|
|
{
|
2010-12-23 02:16:00 +01:00
|
|
|
HTMLDocument *This = impl_from_IOleObject(iface);
|
2020-09-23 16:47:07 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%d %p)\n", This, dwDrawAspect, psizel);
|
|
|
|
|
|
|
|
if (dwDrawAspect != DVASPECT_CONTENT)
|
|
|
|
return E_INVALIDARG;
|
|
|
|
|
|
|
|
*psizel = This->doc_obj->extent;
|
|
|
|
return S_OK;
|
2005-04-12 13:57:51 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleObject_Advise(IOleObject *iface, IAdviseSink *pAdvSink, DWORD *pdwConnection)
|
|
|
|
{
|
2010-12-23 02:16:00 +01:00
|
|
|
HTMLDocument *This = impl_from_IOleObject(iface);
|
2009-12-07 14:52:28 +01:00
|
|
|
TRACE("(%p)->(%p %p)\n", This, pAdvSink, pdwConnection);
|
|
|
|
|
|
|
|
if(!pdwConnection)
|
|
|
|
return E_INVALIDARG;
|
|
|
|
|
|
|
|
if(!pAdvSink) {
|
|
|
|
*pdwConnection = 0;
|
|
|
|
return E_INVALIDARG;
|
|
|
|
}
|
|
|
|
|
2017-11-22 16:15:38 +01:00
|
|
|
if(!This->doc_obj->advise_holder) {
|
|
|
|
CreateOleAdviseHolder(&This->doc_obj->advise_holder);
|
|
|
|
if(!This->doc_obj->advise_holder)
|
2009-12-07 14:52:28 +01:00
|
|
|
return E_OUTOFMEMORY;
|
|
|
|
}
|
|
|
|
|
2017-11-22 16:15:38 +01:00
|
|
|
return IOleAdviseHolder_Advise(This->doc_obj->advise_holder, pAdvSink, pdwConnection);
|
2005-04-12 13:57:51 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleObject_Unadvise(IOleObject *iface, DWORD dwConnection)
|
|
|
|
{
|
2010-12-23 02:16:00 +01:00
|
|
|
HTMLDocument *This = impl_from_IOleObject(iface);
|
2009-12-07 14:52:54 +01:00
|
|
|
TRACE("(%p)->(%d)\n", This, dwConnection);
|
|
|
|
|
2017-11-22 16:15:38 +01:00
|
|
|
if(!This->doc_obj->advise_holder)
|
2009-12-07 14:52:54 +01:00
|
|
|
return OLE_E_NOCONNECTION;
|
|
|
|
|
2017-11-22 16:15:38 +01:00
|
|
|
return IOleAdviseHolder_Unadvise(This->doc_obj->advise_holder, dwConnection);
|
2005-04-12 13:57:51 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleObject_EnumAdvise(IOleObject *iface, IEnumSTATDATA **ppenumAdvise)
|
|
|
|
{
|
2010-12-23 02:16:00 +01:00
|
|
|
HTMLDocument *This = impl_from_IOleObject(iface);
|
2009-12-07 14:53:19 +01:00
|
|
|
|
2017-11-22 16:15:38 +01:00
|
|
|
if(!This->doc_obj->advise_holder) {
|
2009-12-07 14:53:19 +01:00
|
|
|
*ppenumAdvise = NULL;
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2017-11-22 16:15:38 +01:00
|
|
|
return IOleAdviseHolder_EnumAdvise(This->doc_obj->advise_holder, ppenumAdvise);
|
2005-04-12 13:57:51 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleObject_GetMiscStatus(IOleObject *iface, DWORD dwAspect, DWORD *pdwStatus)
|
|
|
|
{
|
2010-12-23 02:16:00 +01:00
|
|
|
HTMLDocument *This = impl_from_IOleObject(iface);
|
2006-10-05 23:50:39 +02:00
|
|
|
FIXME("(%p)->(%d %p)\n", This, dwAspect, pdwStatus);
|
2005-04-12 13:57:51 +02:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleObject_SetColorScheme(IOleObject *iface, LOGPALETTE *pLogpal)
|
|
|
|
{
|
2010-12-23 02:16:00 +01:00
|
|
|
HTMLDocument *This = impl_from_IOleObject(iface);
|
2005-04-12 13:57:51 +02:00
|
|
|
FIXME("(%p)->(%p)\n", This, pLogpal);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2005-06-01 21:57:42 +02:00
|
|
|
static const IOleObjectVtbl OleObjectVtbl = {
|
2005-04-12 13:57:51 +02:00
|
|
|
OleObject_QueryInterface,
|
|
|
|
OleObject_AddRef,
|
|
|
|
OleObject_Release,
|
|
|
|
OleObject_SetClientSite,
|
|
|
|
OleObject_GetClientSite,
|
|
|
|
OleObject_SetHostNames,
|
|
|
|
OleObject_Close,
|
|
|
|
OleObject_SetMoniker,
|
|
|
|
OleObject_GetMoniker,
|
|
|
|
OleObject_InitFromData,
|
|
|
|
OleObject_GetClipboardData,
|
|
|
|
OleObject_DoVerb,
|
|
|
|
OleObject_EnumVerbs,
|
|
|
|
OleObject_Update,
|
|
|
|
OleObject_IsUpToDate,
|
|
|
|
OleObject_GetUserClassID,
|
|
|
|
OleObject_GetUserType,
|
|
|
|
OleObject_SetExtent,
|
|
|
|
OleObject_GetExtent,
|
|
|
|
OleObject_Advise,
|
|
|
|
OleObject_Unadvise,
|
|
|
|
OleObject_EnumAdvise,
|
|
|
|
OleObject_GetMiscStatus,
|
|
|
|
OleObject_SetColorScheme
|
|
|
|
};
|
|
|
|
|
|
|
|
/**********************************************************
|
|
|
|
* IOleDocument implementation
|
|
|
|
*/
|
|
|
|
|
2010-12-23 02:17:39 +01:00
|
|
|
static inline HTMLDocument *impl_from_IOleDocument(IOleDocument *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, HTMLDocument, IOleDocument_iface);
|
|
|
|
}
|
2005-04-12 13:57:51 +02:00
|
|
|
|
2010-12-16 14:59:51 +01:00
|
|
|
static HRESULT WINAPI OleDocument_QueryInterface(IOleDocument *iface, REFIID riid, void **ppv)
|
2005-04-12 13:57:51 +02:00
|
|
|
{
|
2010-12-23 02:17:39 +01:00
|
|
|
HTMLDocument *This = impl_from_IOleDocument(iface);
|
2010-12-16 14:59:51 +01:00
|
|
|
return htmldoc_query_interface(This, riid, ppv);
|
2005-04-12 13:57:51 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI OleDocument_AddRef(IOleDocument *iface)
|
|
|
|
{
|
2010-12-23 02:17:39 +01:00
|
|
|
HTMLDocument *This = impl_from_IOleDocument(iface);
|
2010-12-16 14:59:51 +01:00
|
|
|
return htmldoc_addref(This);
|
2005-04-12 13:57:51 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI OleDocument_Release(IOleDocument *iface)
|
|
|
|
{
|
2010-12-23 02:17:39 +01:00
|
|
|
HTMLDocument *This = impl_from_IOleDocument(iface);
|
2010-12-16 14:59:51 +01:00
|
|
|
return htmldoc_release(This);
|
2005-04-12 13:57:51 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleDocument_CreateView(IOleDocument *iface, IOleInPlaceSite *pIPSite, IStream *pstm,
|
|
|
|
DWORD dwReserved, IOleDocumentView **ppView)
|
|
|
|
{
|
2010-12-23 02:17:39 +01:00
|
|
|
HTMLDocument *This = impl_from_IOleDocument(iface);
|
2005-04-13 16:41:19 +02:00
|
|
|
HRESULT hres;
|
|
|
|
|
2006-10-05 23:50:39 +02:00
|
|
|
TRACE("(%p)->(%p %p %d %p)\n", This, pIPSite, pstm, dwReserved, ppView);
|
2005-04-13 16:41:19 +02:00
|
|
|
|
|
|
|
if(!ppView)
|
|
|
|
return E_INVALIDARG;
|
|
|
|
|
|
|
|
/* FIXME:
|
|
|
|
* Windows implementation creates new IOleDocumentView when function is called for the
|
|
|
|
* first time and returns E_FAIL when it is called for the second time, but it doesn't matter
|
|
|
|
* if the application uses returned interfaces, passed to ActivateMe or returned by
|
|
|
|
* QueryInterface, so there is no reason to create new interface. This needs more testing.
|
|
|
|
*/
|
|
|
|
|
|
|
|
if(pIPSite) {
|
2018-02-28 16:31:56 +01:00
|
|
|
hres = IOleDocumentView_SetInPlaceSite(&This->doc_obj->IOleDocumentView_iface, pIPSite);
|
2005-04-13 16:41:19 +02:00
|
|
|
if(FAILED(hres))
|
|
|
|
return hres;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(pstm)
|
|
|
|
FIXME("pstm is not supported\n");
|
|
|
|
|
2018-02-28 16:31:56 +01:00
|
|
|
IOleDocumentView_AddRef(&This->doc_obj->IOleDocumentView_iface);
|
|
|
|
*ppView = &This->doc_obj->IOleDocumentView_iface;
|
2005-04-13 16:41:19 +02:00
|
|
|
return S_OK;
|
2005-04-12 13:57:51 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleDocument_GetDocMiscStatus(IOleDocument *iface, DWORD *pdwStatus)
|
|
|
|
{
|
2010-12-23 02:17:39 +01:00
|
|
|
HTMLDocument *This = impl_from_IOleDocument(iface);
|
2005-04-12 13:57:51 +02:00
|
|
|
FIXME("(%p)->(%p)\n", This, pdwStatus);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleDocument_EnumViews(IOleDocument *iface, IEnumOleDocumentViews **ppEnum,
|
|
|
|
IOleDocumentView **ppView)
|
|
|
|
{
|
2010-12-23 02:17:39 +01:00
|
|
|
HTMLDocument *This = impl_from_IOleDocument(iface);
|
2005-04-12 13:57:51 +02:00
|
|
|
FIXME("(%p)->(%p %p)\n", This, ppEnum, ppView);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2005-06-01 21:57:42 +02:00
|
|
|
static const IOleDocumentVtbl OleDocumentVtbl = {
|
2005-04-12 13:57:51 +02:00
|
|
|
OleDocument_QueryInterface,
|
|
|
|
OleDocument_AddRef,
|
|
|
|
OleDocument_Release,
|
|
|
|
OleDocument_CreateView,
|
|
|
|
OleDocument_GetDocMiscStatus,
|
|
|
|
OleDocument_EnumViews
|
|
|
|
};
|
|
|
|
|
2005-08-08 13:07:48 +02:00
|
|
|
/**********************************************************
|
|
|
|
* IOleControl implementation
|
|
|
|
*/
|
|
|
|
|
2010-12-27 01:46:09 +01:00
|
|
|
static inline HTMLDocument *impl_from_IOleControl(IOleControl *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, HTMLDocument, IOleControl_iface);
|
|
|
|
}
|
2005-08-08 13:07:48 +02:00
|
|
|
|
|
|
|
static HRESULT WINAPI OleControl_QueryInterface(IOleControl *iface, REFIID riid, void **ppv)
|
|
|
|
{
|
2010-12-27 01:46:09 +01:00
|
|
|
HTMLDocument *This = impl_from_IOleControl(iface);
|
2010-12-16 14:59:51 +01:00
|
|
|
return htmldoc_query_interface(This, riid, ppv);
|
2005-08-08 13:07:48 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI OleControl_AddRef(IOleControl *iface)
|
|
|
|
{
|
2010-12-27 01:46:09 +01:00
|
|
|
HTMLDocument *This = impl_from_IOleControl(iface);
|
2010-12-16 14:59:51 +01:00
|
|
|
return htmldoc_addref(This);
|
2005-08-08 13:07:48 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI OleControl_Release(IOleControl *iface)
|
|
|
|
{
|
2010-12-27 01:46:09 +01:00
|
|
|
HTMLDocument *This = impl_from_IOleControl(iface);
|
2010-12-16 14:59:51 +01:00
|
|
|
return htmldoc_release(This);
|
2005-08-08 13:07:48 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleControl_GetControlInfo(IOleControl *iface, CONTROLINFO *pCI)
|
|
|
|
{
|
2010-12-27 01:46:09 +01:00
|
|
|
HTMLDocument *This = impl_from_IOleControl(iface);
|
2005-08-08 13:07:48 +02:00
|
|
|
FIXME("(%p)->(%p)\n", This, pCI);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleControl_OnMnemonic(IOleControl *iface, MSG *pMsg)
|
|
|
|
{
|
2010-12-27 01:46:09 +01:00
|
|
|
HTMLDocument *This = impl_from_IOleControl(iface);
|
2005-08-08 13:07:48 +02:00
|
|
|
FIXME("(%p)->(%p)\n", This, pMsg);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2006-08-17 03:34:22 +02:00
|
|
|
HRESULT get_client_disp_property(IOleClientSite *client, DISPID dispid, VARIANT *res)
|
2005-08-22 11:25:20 +02:00
|
|
|
{
|
|
|
|
IDispatch *disp = NULL;
|
|
|
|
DISPPARAMS dispparams = {NULL, 0};
|
|
|
|
UINT err;
|
|
|
|
HRESULT hres;
|
|
|
|
|
|
|
|
hres = IOleClientSite_QueryInterface(client, &IID_IDispatch, (void**)&disp);
|
|
|
|
if(FAILED(hres)) {
|
|
|
|
TRACE("Could not get IDispatch\n");
|
|
|
|
return hres;
|
|
|
|
}
|
|
|
|
|
|
|
|
VariantInit(res);
|
|
|
|
|
|
|
|
hres = IDispatch_Invoke(disp, dispid, &IID_NULL, LOCALE_SYSTEM_DEFAULT,
|
|
|
|
DISPATCH_PROPERTYGET, &dispparams, res, NULL, &err);
|
|
|
|
|
|
|
|
IDispatch_Release(disp);
|
|
|
|
|
|
|
|
return hres;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT on_change_dlcontrol(HTMLDocument *This)
|
|
|
|
{
|
|
|
|
VARIANT res;
|
|
|
|
HRESULT hres;
|
|
|
|
|
2009-09-16 22:10:03 +02:00
|
|
|
hres = get_client_disp_property(This->doc_obj->client, DISPID_AMBIENT_DLCONTROL, &res);
|
2005-08-22 11:25:20 +02:00
|
|
|
if(SUCCEEDED(hres))
|
2006-10-05 23:50:39 +02:00
|
|
|
FIXME("unsupported dlcontrol %08x\n", V_I4(&res));
|
2005-08-22 11:25:20 +02:00
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2005-08-08 13:07:48 +02:00
|
|
|
static HRESULT WINAPI OleControl_OnAmbientPropertyChange(IOleControl *iface, DISPID dispID)
|
|
|
|
{
|
2010-12-27 01:46:09 +01:00
|
|
|
HTMLDocument *This = impl_from_IOleControl(iface);
|
2009-09-16 22:10:03 +02:00
|
|
|
IOleClientSite *client;
|
2005-08-22 11:25:20 +02:00
|
|
|
VARIANT res;
|
|
|
|
HRESULT hres;
|
|
|
|
|
2009-09-16 22:10:03 +02:00
|
|
|
client = This->doc_obj->client;
|
|
|
|
if(!client) {
|
|
|
|
TRACE("client = NULL\n");
|
2005-08-22 11:25:20 +02:00
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
switch(dispID) {
|
|
|
|
case DISPID_AMBIENT_USERMODE:
|
|
|
|
TRACE("(%p)->(DISPID_AMBIENT_USERMODE)\n", This);
|
2009-09-16 22:10:03 +02:00
|
|
|
hres = get_client_disp_property(client, DISPID_AMBIENT_USERMODE, &res);
|
2005-08-22 11:25:20 +02:00
|
|
|
if(FAILED(hres))
|
|
|
|
return S_OK;
|
|
|
|
|
|
|
|
if(V_VT(&res) == VT_BOOL) {
|
2006-06-30 23:44:04 +02:00
|
|
|
if(V_BOOL(&res)) {
|
2019-03-12 16:10:24 +01:00
|
|
|
This->doc_obj->nscontainer->usermode = BROWSEMODE;
|
2006-06-30 23:44:04 +02:00
|
|
|
}else {
|
2005-08-22 11:25:20 +02:00
|
|
|
FIXME("edit mode is not supported\n");
|
2019-03-12 16:10:24 +01:00
|
|
|
This->doc_obj->nscontainer->usermode = EDITMODE;
|
2005-08-22 11:25:20 +02:00
|
|
|
}
|
|
|
|
}else {
|
2012-03-28 14:27:20 +02:00
|
|
|
FIXME("usermode=%s\n", debugstr_variant(&res));
|
2005-08-22 11:25:20 +02:00
|
|
|
}
|
|
|
|
return S_OK;
|
|
|
|
case DISPID_AMBIENT_DLCONTROL:
|
|
|
|
TRACE("(%p)->(DISPID_AMBIENT_DLCONTROL)\n", This);
|
|
|
|
return on_change_dlcontrol(This);
|
|
|
|
case DISPID_AMBIENT_OFFLINEIFNOTCONNECTED:
|
|
|
|
TRACE("(%p)->(DISPID_AMBIENT_OFFLINEIFNOTCONNECTED)\n", This);
|
|
|
|
on_change_dlcontrol(This);
|
2009-09-16 22:10:03 +02:00
|
|
|
hres = get_client_disp_property(client, DISPID_AMBIENT_OFFLINEIFNOTCONNECTED, &res);
|
2005-08-22 11:25:20 +02:00
|
|
|
if(FAILED(hres))
|
|
|
|
return S_OK;
|
|
|
|
|
|
|
|
if(V_VT(&res) == VT_BOOL) {
|
|
|
|
if(V_BOOL(&res)) {
|
|
|
|
FIXME("offline connection is not supported\n");
|
|
|
|
hres = E_FAIL;
|
|
|
|
}
|
|
|
|
}else {
|
2012-03-28 14:27:20 +02:00
|
|
|
FIXME("offlineconnected=%s\n", debugstr_variant(&res));
|
2005-08-22 11:25:20 +02:00
|
|
|
}
|
|
|
|
return S_OK;
|
|
|
|
case DISPID_AMBIENT_SILENT:
|
|
|
|
TRACE("(%p)->(DISPID_AMBIENT_SILENT)\n", This);
|
|
|
|
on_change_dlcontrol(This);
|
2009-09-16 22:10:03 +02:00
|
|
|
hres = get_client_disp_property(client, DISPID_AMBIENT_SILENT, &res);
|
2005-08-22 11:25:20 +02:00
|
|
|
if(FAILED(hres))
|
|
|
|
return S_OK;
|
|
|
|
|
|
|
|
if(V_VT(&res) == VT_BOOL) {
|
|
|
|
if(V_BOOL(&res)) {
|
|
|
|
FIXME("silent mode is not supported\n");
|
|
|
|
}
|
|
|
|
}else {
|
2012-03-28 14:27:20 +02:00
|
|
|
FIXME("silent=%s\n", debugstr_variant(&res));
|
2005-08-22 11:25:20 +02:00
|
|
|
}
|
|
|
|
return S_OK;
|
|
|
|
case DISPID_AMBIENT_USERAGENT:
|
|
|
|
TRACE("(%p)->(DISPID_AMBIENT_USERAGENT)\n", This);
|
2009-09-16 22:10:03 +02:00
|
|
|
hres = get_client_disp_property(client, DISPID_AMBIENT_USERAGENT, &res);
|
2005-08-22 11:25:20 +02:00
|
|
|
if(FAILED(hres))
|
|
|
|
return S_OK;
|
|
|
|
|
|
|
|
FIXME("not supported AMBIENT_USERAGENT\n");
|
|
|
|
return S_OK;
|
|
|
|
case DISPID_AMBIENT_PALETTE:
|
|
|
|
TRACE("(%p)->(DISPID_AMBIENT_PALETTE)\n", This);
|
2009-09-16 22:10:03 +02:00
|
|
|
hres = get_client_disp_property(client, DISPID_AMBIENT_PALETTE, &res);
|
2005-08-22 11:25:20 +02:00
|
|
|
if(FAILED(hres))
|
|
|
|
return S_OK;
|
|
|
|
|
|
|
|
FIXME("not supported AMBIENT_PALETTE\n");
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2006-10-05 23:50:39 +02:00
|
|
|
FIXME("(%p) unsupported dispID=%d\n", This, dispID);
|
2005-08-22 11:25:20 +02:00
|
|
|
return E_FAIL;
|
2005-08-08 13:07:48 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleControl_FreezeEvents(IOleControl *iface, BOOL bFreeze)
|
|
|
|
{
|
2010-12-27 01:46:09 +01:00
|
|
|
HTMLDocument *This = impl_from_IOleControl(iface);
|
2005-08-08 13:07:48 +02:00
|
|
|
FIXME("(%p)->(%x)\n", This, bFreeze);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const IOleControlVtbl OleControlVtbl = {
|
|
|
|
OleControl_QueryInterface,
|
|
|
|
OleControl_AddRef,
|
|
|
|
OleControl_Release,
|
|
|
|
OleControl_GetControlInfo,
|
|
|
|
OleControl_OnMnemonic,
|
|
|
|
OleControl_OnAmbientPropertyChange,
|
|
|
|
OleControl_FreezeEvents
|
|
|
|
};
|
|
|
|
|
2017-11-17 17:46:20 +01:00
|
|
|
/**********************************************************
|
|
|
|
* IOleInPlaceActiveObject implementation
|
|
|
|
*/
|
|
|
|
|
|
|
|
static inline HTMLDocument *impl_from_IOleInPlaceActiveObject(IOleInPlaceActiveObject *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, HTMLDocument, IOleInPlaceActiveObject_iface);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleInPlaceActiveObject_QueryInterface(IOleInPlaceActiveObject *iface, REFIID riid, void **ppv)
|
|
|
|
{
|
|
|
|
HTMLDocument *This = impl_from_IOleInPlaceActiveObject(iface);
|
|
|
|
return htmldoc_query_interface(This, riid, ppv);
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI OleInPlaceActiveObject_AddRef(IOleInPlaceActiveObject *iface)
|
|
|
|
{
|
|
|
|
HTMLDocument *This = impl_from_IOleInPlaceActiveObject(iface);
|
|
|
|
return htmldoc_addref(This);
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI OleInPlaceActiveObject_Release(IOleInPlaceActiveObject *iface)
|
|
|
|
{
|
|
|
|
HTMLDocument *This = impl_from_IOleInPlaceActiveObject(iface);
|
|
|
|
return htmldoc_release(This);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleInPlaceActiveObject_GetWindow(IOleInPlaceActiveObject *iface, HWND *phwnd)
|
|
|
|
{
|
|
|
|
HTMLDocument *This = impl_from_IOleInPlaceActiveObject(iface);
|
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, phwnd);
|
|
|
|
|
|
|
|
if(!phwnd)
|
|
|
|
return E_INVALIDARG;
|
|
|
|
|
|
|
|
if(!This->doc_obj->in_place_active) {
|
|
|
|
*phwnd = NULL;
|
|
|
|
return E_FAIL;
|
|
|
|
}
|
|
|
|
|
|
|
|
*phwnd = This->doc_obj->hwnd;
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleInPlaceActiveObject_ContextSensitiveHelp(IOleInPlaceActiveObject *iface, BOOL fEnterMode)
|
|
|
|
{
|
|
|
|
HTMLDocument *This = impl_from_IOleInPlaceActiveObject(iface);
|
|
|
|
FIXME("(%p)->(%x)\n", This, fEnterMode);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleInPlaceActiveObject_TranslateAccelerator(IOleInPlaceActiveObject *iface, LPMSG lpmsg)
|
|
|
|
{
|
|
|
|
HTMLDocument *This = impl_from_IOleInPlaceActiveObject(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, lpmsg);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleInPlaceActiveObject_OnFrameWindowActivate(IOleInPlaceActiveObject *iface,
|
|
|
|
BOOL fActivate)
|
|
|
|
{
|
|
|
|
HTMLDocument *This = impl_from_IOleInPlaceActiveObject(iface);
|
|
|
|
|
|
|
|
TRACE("(%p)->(%x)\n", This, fActivate);
|
|
|
|
|
|
|
|
if(This->doc_obj->hostui)
|
|
|
|
IDocHostUIHandler_OnFrameWindowActivate(This->doc_obj->hostui, fActivate);
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleInPlaceActiveObject_OnDocWindowActivate(IOleInPlaceActiveObject *iface, BOOL fActivate)
|
|
|
|
{
|
|
|
|
HTMLDocument *This = impl_from_IOleInPlaceActiveObject(iface);
|
|
|
|
FIXME("(%p)->(%x)\n", This, fActivate);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleInPlaceActiveObject_ResizeBorder(IOleInPlaceActiveObject *iface, LPCRECT prcBorder,
|
|
|
|
IOleInPlaceUIWindow *pUIWindow, BOOL fFrameWindow)
|
|
|
|
{
|
|
|
|
HTMLDocument *This = impl_from_IOleInPlaceActiveObject(iface);
|
|
|
|
FIXME("(%p)->(%p %p %x)\n", This, prcBorder, pUIWindow, fFrameWindow);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleInPlaceActiveObject_EnableModeless(IOleInPlaceActiveObject *iface, BOOL fEnable)
|
|
|
|
{
|
|
|
|
HTMLDocument *This = impl_from_IOleInPlaceActiveObject(iface);
|
|
|
|
FIXME("(%p)->(%x)\n", This, fEnable);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const IOleInPlaceActiveObjectVtbl OleInPlaceActiveObjectVtbl = {
|
|
|
|
OleInPlaceActiveObject_QueryInterface,
|
|
|
|
OleInPlaceActiveObject_AddRef,
|
|
|
|
OleInPlaceActiveObject_Release,
|
|
|
|
OleInPlaceActiveObject_GetWindow,
|
|
|
|
OleInPlaceActiveObject_ContextSensitiveHelp,
|
|
|
|
OleInPlaceActiveObject_TranslateAccelerator,
|
|
|
|
OleInPlaceActiveObject_OnFrameWindowActivate,
|
|
|
|
OleInPlaceActiveObject_OnDocWindowActivate,
|
|
|
|
OleInPlaceActiveObject_ResizeBorder,
|
|
|
|
OleInPlaceActiveObject_EnableModeless
|
|
|
|
};
|
|
|
|
|
|
|
|
/**********************************************************
|
|
|
|
* IOleInPlaceObjectWindowless implementation
|
|
|
|
*/
|
|
|
|
|
|
|
|
static inline HTMLDocument *impl_from_IOleInPlaceObjectWindowless(IOleInPlaceObjectWindowless *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, HTMLDocument, IOleInPlaceObjectWindowless_iface);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleInPlaceObjectWindowless_QueryInterface(IOleInPlaceObjectWindowless *iface,
|
|
|
|
REFIID riid, void **ppv)
|
|
|
|
{
|
|
|
|
HTMLDocument *This = impl_from_IOleInPlaceObjectWindowless(iface);
|
|
|
|
return htmldoc_query_interface(This, riid, ppv);
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI OleInPlaceObjectWindowless_AddRef(IOleInPlaceObjectWindowless *iface)
|
|
|
|
{
|
|
|
|
HTMLDocument *This = impl_from_IOleInPlaceObjectWindowless(iface);
|
|
|
|
return htmldoc_addref(This);
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI OleInPlaceObjectWindowless_Release(IOleInPlaceObjectWindowless *iface)
|
|
|
|
{
|
|
|
|
HTMLDocument *This = impl_from_IOleInPlaceObjectWindowless(iface);
|
|
|
|
return htmldoc_release(This);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleInPlaceObjectWindowless_GetWindow(IOleInPlaceObjectWindowless *iface,
|
|
|
|
HWND *phwnd)
|
|
|
|
{
|
|
|
|
HTMLDocument *This = impl_from_IOleInPlaceObjectWindowless(iface);
|
|
|
|
return IOleInPlaceActiveObject_GetWindow(&This->IOleInPlaceActiveObject_iface, phwnd);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleInPlaceObjectWindowless_ContextSensitiveHelp(IOleInPlaceObjectWindowless *iface,
|
|
|
|
BOOL fEnterMode)
|
|
|
|
{
|
|
|
|
HTMLDocument *This = impl_from_IOleInPlaceObjectWindowless(iface);
|
|
|
|
return IOleInPlaceActiveObject_ContextSensitiveHelp(&This->IOleInPlaceActiveObject_iface, fEnterMode);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleInPlaceObjectWindowless_InPlaceDeactivate(IOleInPlaceObjectWindowless *iface)
|
|
|
|
{
|
|
|
|
HTMLDocument *This = impl_from_IOleInPlaceObjectWindowless(iface);
|
|
|
|
|
|
|
|
TRACE("(%p)\n", This);
|
|
|
|
|
|
|
|
if(This->doc_obj->ui_active)
|
2018-02-28 16:31:56 +01:00
|
|
|
IOleDocumentView_UIActivate(&This->doc_obj->IOleDocumentView_iface, FALSE);
|
2017-11-17 17:46:20 +01:00
|
|
|
This->doc_obj->window_active = FALSE;
|
|
|
|
|
|
|
|
if(!This->doc_obj->in_place_active)
|
|
|
|
return S_OK;
|
|
|
|
|
|
|
|
if(This->doc_obj->frame) {
|
|
|
|
IOleInPlaceFrame_Release(This->doc_obj->frame);
|
|
|
|
This->doc_obj->frame = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(This->doc_obj->hwnd) {
|
|
|
|
ShowWindow(This->doc_obj->hwnd, SW_HIDE);
|
|
|
|
SetWindowPos(This->doc_obj->hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);
|
|
|
|
}
|
|
|
|
|
|
|
|
This->doc_obj->focus = FALSE;
|
|
|
|
notif_focus(This->doc_obj);
|
|
|
|
|
|
|
|
This->doc_obj->in_place_active = FALSE;
|
|
|
|
if(This->doc_obj->ipsite) {
|
|
|
|
IOleInPlaceSiteEx *ipsiteex;
|
|
|
|
HRESULT hres;
|
|
|
|
|
|
|
|
hres = IOleInPlaceSite_QueryInterface(This->doc_obj->ipsite, &IID_IOleInPlaceSiteEx, (void**)&ipsiteex);
|
|
|
|
if(SUCCEEDED(hres)) {
|
|
|
|
IOleInPlaceSiteEx_OnInPlaceDeactivateEx(ipsiteex, TRUE);
|
|
|
|
IOleInPlaceSiteEx_Release(ipsiteex);
|
|
|
|
}else {
|
|
|
|
IOleInPlaceSite_OnInPlaceDeactivate(This->doc_obj->ipsite);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleInPlaceObjectWindowless_UIDeactivate(IOleInPlaceObjectWindowless *iface)
|
|
|
|
{
|
|
|
|
HTMLDocument *This = impl_from_IOleInPlaceObjectWindowless(iface);
|
|
|
|
FIXME("(%p)\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleInPlaceObjectWindowless_SetObjectRects(IOleInPlaceObjectWindowless *iface,
|
2019-05-21 16:36:18 +02:00
|
|
|
const RECT *pos, const RECT *clip)
|
2017-11-17 17:46:20 +01:00
|
|
|
{
|
|
|
|
HTMLDocument *This = impl_from_IOleInPlaceObjectWindowless(iface);
|
2019-05-21 16:36:18 +02:00
|
|
|
RECT r;
|
|
|
|
|
2019-06-04 20:28:20 +02:00
|
|
|
TRACE("(%p)->(%s %s)\n", This, wine_dbgstr_rect(pos), wine_dbgstr_rect(clip));
|
2019-05-21 16:36:18 +02:00
|
|
|
|
|
|
|
if(clip && !EqualRect(clip, pos))
|
|
|
|
FIXME("Ignoring clip rect %s\n", wine_dbgstr_rect(clip));
|
|
|
|
|
|
|
|
r = *pos;
|
|
|
|
return IOleDocumentView_SetRect(&This->doc_obj->IOleDocumentView_iface, &r);
|
2017-11-17 17:46:20 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleInPlaceObjectWindowless_ReactivateAndUndo(IOleInPlaceObjectWindowless *iface)
|
|
|
|
{
|
|
|
|
HTMLDocument *This = impl_from_IOleInPlaceObjectWindowless(iface);
|
|
|
|
FIXME("(%p)\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleInPlaceObjectWindowless_OnWindowMessage(IOleInPlaceObjectWindowless *iface,
|
|
|
|
UINT msg, WPARAM wParam, LPARAM lParam, LRESULT *lpResult)
|
|
|
|
{
|
|
|
|
HTMLDocument *This = impl_from_IOleInPlaceObjectWindowless(iface);
|
|
|
|
FIXME("(%p)->(%u %lu %lu %p)\n", This, msg, wParam, lParam, lpResult);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleInPlaceObjectWindowless_GetDropTarget(IOleInPlaceObjectWindowless *iface,
|
|
|
|
IDropTarget **ppDropTarget)
|
|
|
|
{
|
|
|
|
HTMLDocument *This = impl_from_IOleInPlaceObjectWindowless(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, ppDropTarget);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const IOleInPlaceObjectWindowlessVtbl OleInPlaceObjectWindowlessVtbl = {
|
|
|
|
OleInPlaceObjectWindowless_QueryInterface,
|
|
|
|
OleInPlaceObjectWindowless_AddRef,
|
|
|
|
OleInPlaceObjectWindowless_Release,
|
|
|
|
OleInPlaceObjectWindowless_GetWindow,
|
|
|
|
OleInPlaceObjectWindowless_ContextSensitiveHelp,
|
|
|
|
OleInPlaceObjectWindowless_InPlaceDeactivate,
|
|
|
|
OleInPlaceObjectWindowless_UIDeactivate,
|
|
|
|
OleInPlaceObjectWindowless_SetObjectRects,
|
|
|
|
OleInPlaceObjectWindowless_ReactivateAndUndo,
|
|
|
|
OleInPlaceObjectWindowless_OnWindowMessage,
|
|
|
|
OleInPlaceObjectWindowless_GetDropTarget
|
|
|
|
};
|
|
|
|
|
2009-12-15 23:46:24 +01:00
|
|
|
/**********************************************************
|
|
|
|
* IObjectWithSite implementation
|
|
|
|
*/
|
|
|
|
|
2010-12-27 01:49:48 +01:00
|
|
|
static inline HTMLDocument *impl_from_IObjectWithSite(IObjectWithSite *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, HTMLDocument, IObjectWithSite_iface);
|
|
|
|
}
|
2009-12-15 23:46:24 +01:00
|
|
|
|
2010-12-16 14:59:51 +01:00
|
|
|
static HRESULT WINAPI ObjectWithSite_QueryInterface(IObjectWithSite *iface, REFIID riid, void **ppv)
|
2009-12-15 23:46:24 +01:00
|
|
|
{
|
2010-12-27 01:49:48 +01:00
|
|
|
HTMLDocument *This = impl_from_IObjectWithSite(iface);
|
2010-12-16 14:59:51 +01:00
|
|
|
return htmldoc_query_interface(This, riid, ppv);
|
2009-12-15 23:46:24 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI ObjectWithSite_AddRef(IObjectWithSite *iface)
|
|
|
|
{
|
2010-12-27 01:49:48 +01:00
|
|
|
HTMLDocument *This = impl_from_IObjectWithSite(iface);
|
2010-12-16 14:59:51 +01:00
|
|
|
return htmldoc_addref(This);
|
2009-12-15 23:46:24 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI ObjectWithSite_Release(IObjectWithSite *iface)
|
|
|
|
{
|
2010-12-27 01:49:48 +01:00
|
|
|
HTMLDocument *This = impl_from_IObjectWithSite(iface);
|
2010-12-16 14:59:51 +01:00
|
|
|
return htmldoc_release(This);
|
2009-12-15 23:46:24 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI ObjectWithSite_SetSite(IObjectWithSite *iface, IUnknown *pUnkSite)
|
|
|
|
{
|
2010-12-27 01:49:48 +01:00
|
|
|
HTMLDocument *This = impl_from_IObjectWithSite(iface);
|
2009-12-15 23:46:24 +01:00
|
|
|
FIXME("(%p)->(%p)\n", This, pUnkSite);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI ObjectWithSite_GetSite(IObjectWithSite* iface, REFIID riid, PVOID *ppvSite)
|
|
|
|
{
|
2010-12-27 01:49:48 +01:00
|
|
|
HTMLDocument *This = impl_from_IObjectWithSite(iface);
|
2009-12-15 23:46:24 +01:00
|
|
|
FIXME("(%p)->(%p)\n", This, ppvSite);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const IObjectWithSiteVtbl ObjectWithSiteVtbl = {
|
|
|
|
ObjectWithSite_QueryInterface,
|
|
|
|
ObjectWithSite_AddRef,
|
|
|
|
ObjectWithSite_Release,
|
|
|
|
ObjectWithSite_SetSite,
|
|
|
|
ObjectWithSite_GetSite
|
|
|
|
};
|
|
|
|
|
2011-01-19 21:31:43 +01:00
|
|
|
/**********************************************************
|
|
|
|
* IOleContainer implementation
|
|
|
|
*/
|
|
|
|
|
2010-12-15 00:42:32 +01:00
|
|
|
static inline HTMLDocument *impl_from_IOleContainer(IOleContainer *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, HTMLDocument, IOleContainer_iface);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleContainer_QueryInterface(IOleContainer *iface, REFIID riid, void **ppv)
|
|
|
|
{
|
|
|
|
HTMLDocument *This = impl_from_IOleContainer(iface);
|
2010-12-16 14:59:51 +01:00
|
|
|
return htmldoc_query_interface(This, riid, ppv);
|
2010-12-15 00:42:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI OleContainer_AddRef(IOleContainer *iface)
|
|
|
|
{
|
|
|
|
HTMLDocument *This = impl_from_IOleContainer(iface);
|
2010-12-16 14:59:51 +01:00
|
|
|
return htmldoc_addref(This);
|
2010-12-15 00:42:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI OleContainer_Release(IOleContainer *iface)
|
|
|
|
{
|
|
|
|
HTMLDocument *This = impl_from_IOleContainer(iface);
|
2010-12-16 14:59:51 +01:00
|
|
|
return htmldoc_release(This);
|
2010-12-15 00:42:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleContainer_ParseDisplayName(IOleContainer *iface, IBindCtx *pbc, LPOLESTR pszDisplayName,
|
|
|
|
ULONG *pchEaten, IMoniker **ppmkOut)
|
|
|
|
{
|
|
|
|
HTMLDocument *This = impl_from_IOleContainer(iface);
|
|
|
|
FIXME("(%p)->(%p %s %p %p)\n", This, pbc, debugstr_w(pszDisplayName), pchEaten, ppmkOut);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleContainer_EnumObjects(IOleContainer *iface, DWORD grfFlags, IEnumUnknown **ppenum)
|
|
|
|
{
|
|
|
|
HTMLDocument *This = impl_from_IOleContainer(iface);
|
2012-01-19 17:03:37 +01:00
|
|
|
EnumUnknown *ret;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%x %p)\n", This, grfFlags, ppenum);
|
|
|
|
|
|
|
|
ret = heap_alloc(sizeof(*ret));
|
|
|
|
if(!ret)
|
|
|
|
return E_OUTOFMEMORY;
|
|
|
|
|
|
|
|
ret->IEnumUnknown_iface.lpVtbl = &EnumUnknownVtbl;
|
|
|
|
ret->ref = 1;
|
|
|
|
|
|
|
|
*ppenum = &ret->IEnumUnknown_iface;
|
|
|
|
return S_OK;
|
2010-12-15 00:42:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleContainer_LockContainer(IOleContainer *iface, BOOL fLock)
|
|
|
|
{
|
|
|
|
HTMLDocument *This = impl_from_IOleContainer(iface);
|
|
|
|
FIXME("(%p)->(%x)\n", This, fLock);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const IOleContainerVtbl OleContainerVtbl = {
|
|
|
|
OleContainer_QueryInterface,
|
|
|
|
OleContainer_AddRef,
|
|
|
|
OleContainer_Release,
|
|
|
|
OleContainer_ParseDisplayName,
|
|
|
|
OleContainer_EnumObjects,
|
|
|
|
OleContainer_LockContainer
|
|
|
|
};
|
|
|
|
|
2012-01-18 19:52:34 +01:00
|
|
|
static inline HTMLDocumentObj *impl_from_ITargetContainer(ITargetContainer *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, HTMLDocumentObj, ITargetContainer_iface);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI TargetContainer_QueryInterface(ITargetContainer *iface, REFIID riid, void **ppv)
|
|
|
|
{
|
|
|
|
HTMLDocumentObj *This = impl_from_ITargetContainer(iface);
|
|
|
|
return ICustomDoc_QueryInterface(&This->ICustomDoc_iface, riid, ppv);
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI TargetContainer_AddRef(ITargetContainer *iface)
|
|
|
|
{
|
|
|
|
HTMLDocumentObj *This = impl_from_ITargetContainer(iface);
|
|
|
|
return ICustomDoc_AddRef(&This->ICustomDoc_iface);
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI TargetContainer_Release(ITargetContainer *iface)
|
|
|
|
{
|
|
|
|
HTMLDocumentObj *This = impl_from_ITargetContainer(iface);
|
|
|
|
return ICustomDoc_Release(&This->ICustomDoc_iface);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI TargetContainer_GetFrameUrl(ITargetContainer *iface, LPWSTR *ppszFrameSrc)
|
|
|
|
{
|
|
|
|
HTMLDocumentObj *This = impl_from_ITargetContainer(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, ppszFrameSrc);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI TargetContainer_GetFramesContainer(ITargetContainer *iface, IOleContainer **ppContainer)
|
|
|
|
{
|
|
|
|
HTMLDocumentObj *This = impl_from_ITargetContainer(iface);
|
2012-01-19 17:03:24 +01:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, ppContainer);
|
|
|
|
|
|
|
|
/* NOTE: we should return wrapped interface here */
|
|
|
|
IOleContainer_AddRef(&This->basedoc.IOleContainer_iface);
|
|
|
|
*ppContainer = &This->basedoc.IOleContainer_iface;
|
|
|
|
return S_OK;
|
2012-01-18 19:52:34 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static const ITargetContainerVtbl TargetContainerVtbl = {
|
|
|
|
TargetContainer_QueryInterface,
|
|
|
|
TargetContainer_AddRef,
|
|
|
|
TargetContainer_Release,
|
|
|
|
TargetContainer_GetFrameUrl,
|
|
|
|
TargetContainer_GetFramesContainer
|
|
|
|
};
|
|
|
|
|
|
|
|
void TargetContainer_Init(HTMLDocumentObj *This)
|
|
|
|
{
|
|
|
|
This->ITargetContainer_iface.lpVtbl = &TargetContainerVtbl;
|
|
|
|
}
|
|
|
|
|
2011-01-19 21:31:43 +01:00
|
|
|
/**********************************************************
|
|
|
|
* IObjectSafety implementation
|
|
|
|
*/
|
|
|
|
|
|
|
|
static inline HTMLDocument *impl_from_IObjectSafety(IObjectSafety *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, HTMLDocument, IObjectSafety_iface);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI ObjectSafety_QueryInterface(IObjectSafety *iface, REFIID riid, void **ppv)
|
|
|
|
{
|
|
|
|
HTMLDocument *This = impl_from_IObjectSafety(iface);
|
|
|
|
return htmldoc_query_interface(This, riid, ppv);
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI ObjectSafety_AddRef(IObjectSafety *iface)
|
|
|
|
{
|
|
|
|
HTMLDocument *This = impl_from_IObjectSafety(iface);
|
|
|
|
return htmldoc_addref(This);
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI ObjectSafety_Release(IObjectSafety *iface)
|
|
|
|
{
|
|
|
|
HTMLDocument *This = impl_from_IObjectSafety(iface);
|
|
|
|
return htmldoc_release(This);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI ObjectSafety_GetInterfaceSafetyOptions(IObjectSafety *iface,
|
|
|
|
REFIID riid, DWORD *pdwSupportedOptions, DWORD *pdwEnabledOptions)
|
|
|
|
{
|
|
|
|
HTMLDocument *This = impl_from_IObjectSafety(iface);
|
|
|
|
FIXME("(%p)->(%s %p %p)\n", This, debugstr_guid(riid), pdwSupportedOptions, pdwEnabledOptions);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI ObjectSafety_SetInterfaceSafetyOptions(IObjectSafety *iface,
|
|
|
|
REFIID riid, DWORD dwOptionSetMask, DWORD dwEnabledOptions)
|
|
|
|
{
|
|
|
|
HTMLDocument *This = impl_from_IObjectSafety(iface);
|
|
|
|
FIXME("(%p)->(%s %x %x)\n", This, debugstr_guid(riid), dwOptionSetMask, dwEnabledOptions);
|
|
|
|
|
|
|
|
if(IsEqualGUID(&IID_IPersistMoniker, riid) &&
|
|
|
|
dwOptionSetMask==INTERFACESAFE_FOR_UNTRUSTED_DATA &&
|
|
|
|
dwEnabledOptions==INTERFACESAFE_FOR_UNTRUSTED_DATA)
|
|
|
|
return S_OK;
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const IObjectSafetyVtbl ObjectSafetyVtbl = {
|
|
|
|
ObjectSafety_QueryInterface,
|
|
|
|
ObjectSafety_AddRef,
|
|
|
|
ObjectSafety_Release,
|
|
|
|
ObjectSafety_GetInterfaceSafetyOptions,
|
|
|
|
ObjectSafety_SetInterfaceSafetyOptions
|
|
|
|
};
|
|
|
|
|
2009-09-16 22:10:03 +02:00
|
|
|
void HTMLDocument_LockContainer(HTMLDocumentObj *This, BOOL fLock)
|
2005-08-22 16:07:49 +02:00
|
|
|
{
|
|
|
|
IOleContainer *container;
|
|
|
|
HRESULT hres;
|
|
|
|
|
2009-09-16 22:11:26 +02:00
|
|
|
if(!This->client || This->container_locked == fLock)
|
2005-08-22 16:07:49 +02:00
|
|
|
return;
|
|
|
|
|
|
|
|
hres = IOleClientSite_GetContainer(This->client, &container);
|
|
|
|
if(SUCCEEDED(hres)) {
|
|
|
|
IOleContainer_LockContainer(container, fLock);
|
2009-09-16 22:11:26 +02:00
|
|
|
This->container_locked = fLock;
|
2005-08-22 16:07:49 +02:00
|
|
|
IOleContainer_Release(container);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-04-12 13:57:51 +02:00
|
|
|
void HTMLDocument_OleObj_Init(HTMLDocument *This)
|
|
|
|
{
|
2010-12-23 02:16:00 +01:00
|
|
|
This->IOleObject_iface.lpVtbl = &OleObjectVtbl;
|
2010-12-23 02:17:39 +01:00
|
|
|
This->IOleDocument_iface.lpVtbl = &OleDocumentVtbl;
|
2010-12-27 01:46:09 +01:00
|
|
|
This->IOleControl_iface.lpVtbl = &OleControlVtbl;
|
2017-11-17 17:46:20 +01:00
|
|
|
This->IOleInPlaceActiveObject_iface.lpVtbl = &OleInPlaceActiveObjectVtbl;
|
|
|
|
This->IOleInPlaceObjectWindowless_iface.lpVtbl = &OleInPlaceObjectWindowlessVtbl;
|
2010-12-27 01:49:48 +01:00
|
|
|
This->IObjectWithSite_iface.lpVtbl = &ObjectWithSiteVtbl;
|
2010-12-15 00:42:32 +01:00
|
|
|
This->IOleContainer_iface.lpVtbl = &OleContainerVtbl;
|
2011-01-19 21:31:43 +01:00
|
|
|
This->IObjectSafety_iface.lpVtbl = &ObjectSafetyVtbl;
|
2020-09-23 16:47:07 +02:00
|
|
|
This->doc_obj->extent.cx = 1;
|
|
|
|
This->doc_obj->extent.cy = 1;
|
2005-04-12 13:57:51 +02:00
|
|
|
}
|