[Wine-devel] mshtml.dll: Add IPersistPropertyBag interface to HTMLDocument
Иван Синицын
=?iso-8859-1?q?ivan_=CE=C1_etersoft=2Eru?=
Пн Июн 30 17:46:15 MSD 2008
бага 1997
патч так же отправлю в основную ветку wine.
--
Sinitsin Ivan
----------- следующая часть -----------
From 15428d769883cfa141bd05e1da0ff6d6c1b0aaf9 Mon Sep 17 00:00:00 2001
From: Sinitsin Ivan <ivan на etersoft.ru>
Date: Mon, 30 Jun 2008 17:42:24 +0400
Subject: [PATCH] mshtml.dll:Add IPersistPropertyBag interface to HTMLDOcument.
---
dlls/mshtml/htmldoc.c | 3 ++
dlls/mshtml/mshtml_private.h | 2 +
dlls/mshtml/persist.c | 63 ++++++++++++++++++++++++++++++++++++++++++
3 files changed, 68 insertions(+), 0 deletions(-)
diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c
index 3a457cb..a633628 100644
--- a/dlls/mshtml/htmldoc.c
+++ b/dlls/mshtml/htmldoc.c
@@ -134,6 +134,9 @@ static HRESULT WINAPI HTMLDocument_QueryInterface(IHTMLDocument2 *iface, REFIID
}else if(IsEqualGUID(&IID_IRunnableObject, riid)) {
TRACE("(%p)->(IID_IRunnableObject %p) returning NULL\n", This, ppvObject);
return E_NOINTERFACE;
+ }else if(IsEqualGUID(&IID_IPersistPropertyBag, riid)) {
+ TRACE("(%p)->(IID_IPersistPropertyBag %p)\n", This, ppvObject);
+ *ppvObject = PERPROPBAG(This);
}
if(*ppvObject) {
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h
index 836ce96..5a9de84 100644
--- a/dlls/mshtml/mshtml_private.h
+++ b/dlls/mshtml/mshtml_private.h
@@ -218,6 +218,7 @@ struct HTMLDocument {
const IPersistStreamInitVtbl *lpPersistStreamInitVtbl;
const ICustomDocVtbl *lpCustomDocVtbl;
const IDispatchExVtbl *lpIDispatchExVtbl;
+ const IPersistPropertyBagVtbl *lpPersistPropertyBagVtbl;
LONG ref;
@@ -428,6 +429,7 @@ typedef struct {
#define HTMLLOCATION(x) ((IHTMLLocation*) &(x)->lpHTMLLocationVtbl)
#define DISPATCHEX(x) ((IDispatchEx*) &(x)->lpIDispatchExVtbl)
+#define PERPROPBAG(x) ((IPersistPropertyBag*) &(x)->lpPersistPropertyBagVtbl)
#define DEFINE_THIS2(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,ifc)))
#define DEFINE_THIS(cls,ifc,iface) DEFINE_THIS2(cls,lp ## ifc ## Vtbl,iface)
diff --git a/dlls/mshtml/persist.c b/dlls/mshtml/persist.c
index 78a5d6b..49c56c8 100644
--- a/dlls/mshtml/persist.c
+++ b/dlls/mshtml/persist.c
@@ -745,12 +745,75 @@ static const IPersistStreamInitVtbl PersistStreamInitVtbl = {
PersistStreamInit_InitNew
};
+#define PERPROPBAG_THIS(iface) DEFINE_THIS(HTMLDocument, PersistStreamInit, iface)
+
+static HRESULT WINAPI PersistPropertyBag_QueryInterface(IPersistPropertyBag *iface,
+ REFIID riid, void **ppv)
+{
+ HTMLDocument *This = PERPROPBAG_THIS(iface);
+ return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppv);
+}
+
+static ULONG WINAPI PersistPropertyBag_AddRef(IPersistPropertyBag *iface)
+{
+ HTMLDocument *This = PERPROPBAG_THIS(iface);
+ return IHTMLDocument2_AddRef(HTMLDOC(This));
+}
+
+static ULONG WINAPI PersistPropertyBag_Release(IPersistPropertyBag *iface)
+{
+ HTMLDocument *This = PERPROPBAG_THIS(iface);
+ return IHTMLDocument2_Release(HTMLDOC(This));
+}
+
+static HRESULT WINAPI PersistPropertyBag_GetClassID(IPersistPropertyBag *iface, CLSID *pClassID)
+{
+ HTMLDocument *This = PERPROPBAG_THIS(iface);
+ return IPersist_GetClassID(PERSIST(This), pClassID);
+}
+
+static HRESULT WINAPI PersistPropertyBag_InitNew(IPersistPropertyBag *iface)
+{
+ HTMLDocument *This = PERPROPBAG_THIS(iface);
+ FIXME("(%p)\n", This);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI PersistPropertyBag_Load(IPersistPropertyBag *iface, IPropertyBag *pPropBag, IErrorLog *pErrorLog)
+{
+ HTMLDocument *This = PERPROPBAG_THIS(iface);
+
+ FIXME("(%p) not implemented\n", This);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI PersistPropertyBag_Save(IPersistPropertyBag *iface,IPropertyBag *pPropBag, BOOL fClearDirty, BOOL fSaveAllProperties)
+{
+ HTMLDocument *This = PERPROPBAG_THIS(iface);
+
+ FIXME("(%p)->(%x) not implemented\n", This, fClearDirty);
+ return E_NOTIMPL;
+}
+
+#undef PERPROPBAG_THIS
+
+static const IPersistPropertyBagVtbl PersistPropertyBagVtbl = {
+ PersistPropertyBag_QueryInterface,
+ PersistPropertyBag_AddRef,
+ PersistPropertyBag_Release,
+ PersistPropertyBag_GetClassID,
+ PersistPropertyBag_InitNew,
+ PersistPropertyBag_Load,
+ PersistPropertyBag_Save
+};
+
void HTMLDocument_Persist_Init(HTMLDocument *This)
{
This->lpPersistMonikerVtbl = &PersistMonikerVtbl;
This->lpPersistFileVtbl = &PersistFileVtbl;
This->lpMonikerPropVtbl = &MonikerPropVtbl;
This->lpPersistStreamInitVtbl = &PersistStreamInitVtbl;
+ This->lpPersistPropertyBagVtbl = &PersistPropertyBagVtbl;
This->bscallback = NULL;
This->mon = NULL;
--
1.5.4.5.GIT
Подробная информация о списке рассылки Wine-devel