Author: cwittich
Date: Sun Sep 14 01:24:36 2008
New Revision: 36220
URL:
http://svn.reactos.org/svn/reactos?rev=36220&view=rev
Log:
sync msxml3 to wine 1.1.4
Modified:
trunk/reactos/dll/win32/msxml3/dispex.c
trunk/reactos/dll/win32/msxml3/domdoc.c
trunk/reactos/dll/win32/msxml3/msxml_private.h
trunk/reactos/dll/win32/msxml3/node.c
trunk/reactos/dll/win32/msxml3/queryresult.c
Modified: trunk/reactos/dll/win32/msxml3/dispex.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/dispex.c?…
==============================================================================
--- trunk/reactos/dll/win32/msxml3/dispex.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msxml3/dispex.c [iso-8859-1] Sun Sep 14 01:24:36 2008
@@ -79,6 +79,7 @@
&IID_IXMLDOMAttribute,
&IID_IXMLDOMCDATASection,
&IID_IXMLDOMComment,
+ &IID_IXMLDOMDocument,
&IID_IXMLDOMDocument2,
&IID_IXMLDOMDocumentFragment,
&IID_IXMLDOMElement,
@@ -542,42 +543,42 @@
static HRESULT WINAPI DispatchEx_DeleteMemberByName(IDispatchEx *iface, BSTR bstrName,
DWORD grfdex)
{
DispatchEx *This = impl_from_IDispatchEx(iface);
- FIXME("(%p)->(%s %x)\n", This, debugstr_w(bstrName), grfdex);
- return S_OK;
+ TRACE("Not implemented in native msxml3 (%p)->(%s %x)\n", This,
debugstr_w(bstrName), grfdex);
+ return E_NOTIMPL;
}
static HRESULT WINAPI DispatchEx_DeleteMemberByDispID(IDispatchEx *iface, DISPID id)
{
DispatchEx *This = impl_from_IDispatchEx(iface);
- FIXME("(%p)->(%x)\n", This, id);
+ TRACE("Not implemented in native msxml3 (%p)->(%x)\n", This, id);
return E_NOTIMPL;
}
static HRESULT WINAPI DispatchEx_GetMemberProperties(IDispatchEx *iface, DISPID id, DWORD
grfdexFetch, DWORD *pgrfdex)
{
DispatchEx *This = impl_from_IDispatchEx(iface);
- FIXME("(%p)->(%x %x %p)\n", This, id, grfdexFetch, pgrfdex);
+ TRACE("Not implemented in native msxml3 (%p)->(%x %x %p)\n", This, id,
grfdexFetch, pgrfdex);
return E_NOTIMPL;
}
static HRESULT WINAPI DispatchEx_GetMemberName(IDispatchEx *iface, DISPID id, BSTR
*pbstrName)
{
DispatchEx *This = impl_from_IDispatchEx(iface);
- FIXME("(%p)->(%x %p)\n", This, id, pbstrName);
+ TRACE("Not implemented in native msxml3 (%p)->(%x %p)\n", This, id,
pbstrName);
return E_NOTIMPL;
}
static HRESULT WINAPI DispatchEx_GetNextDispID(IDispatchEx *iface, DWORD grfdex, DISPID
id, DISPID *pid)
{
DispatchEx *This = impl_from_IDispatchEx(iface);
- FIXME("(%p)->(%x %x %p)\n", This, grfdex, id, pid);
+ TRACE(" Not implemented in native msxml3 (%p)->(%x %x %p)\n", This,
grfdex, id, pid);
return E_NOTIMPL;
}
static HRESULT WINAPI DispatchEx_GetNameSpaceParent(IDispatchEx *iface, IUnknown **ppunk)
{
DispatchEx *This = impl_from_IDispatchEx(iface);
- FIXME("(%p)->(%p)\n", This, ppunk);
+ TRACE("Not implemented in native msxml3 (%p)->(%p)\n", This, ppunk);
return E_NOTIMPL;
}
Modified: trunk/reactos/dll/win32/msxml3/domdoc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/domdoc.c?…
==============================================================================
--- trunk/reactos/dll/win32/msxml3/domdoc.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msxml3/domdoc.c [iso-8859-1] Sun Sep 14 01:24:36 2008
@@ -36,6 +36,7 @@
#include "shlwapi.h"
#include "ocidl.h"
#include "objsafe.h"
+#include "dispex.h"
#include "wine/debug.h"
@@ -75,6 +76,9 @@
/* IObjectSafety */
DWORD safeopt;
+
+ /* IDispatchEx */
+ DispatchEx dispex;
} domdoc;
static xmlDocPtr doparse( char *ptr, int len )
@@ -289,6 +293,10 @@
else if (IsEqualGUID(&IID_IObjectWithSite, riid))
{
*ppvObject = (IObjectWithSite*)&(This->lpvtblIObjectWithSite);
+ }
+ else if(dispex_query_interface(&This->dispex, riid, ppvObject))
+ {
+ return *ppvObject ? S_OK : E_NOINTERFACE;
}
else if(IsEqualGUID(&IID_IRunnableObject, riid))
{
@@ -1475,7 +1483,7 @@
IXMLDOMDocument_Release(pDocument);
}
- TRACE("ret %d", ret);
+ TRACE("ret %d\n", ret);
return ret;
}
@@ -1967,6 +1975,20 @@
xmldoc_Safety_SetInterfaceSafetyOptions
};
+
+static const tid_t domdoc_iface_tids[] = {
+ IXMLDOMNode_tid,
+ IXMLDOMDocument_tid,
+ IXMLDOMDocument2_tid,
+ 0
+};
+static dispex_static_data_t domdoc_dispex = {
+ NULL,
+ IXMLDOMDocument2_tid,
+ NULL,
+ domdoc_iface_tids
+};
+
HRESULT DOMDocument_create_from_xmldoc(xmlDocPtr xmldoc, IXMLDOMDocument2 **document)
{
domdoc *doc;
@@ -2007,6 +2029,9 @@
HeapFree( GetProcessHeap(), 0, doc );
return E_FAIL;
}
+
+ init_dispex(&doc->dispex, (IUnknown*)&doc->lpVtbl, &domdoc_dispex);
+
/* The ref on doc->node is actually looped back into this object, so release it */
IXMLDOMNode_Release(doc->node);
Modified: trunk/reactos/dll/win32/msxml3/msxml_private.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/msxml_pri…
==============================================================================
--- trunk/reactos/dll/win32/msxml3/msxml_private.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msxml3/msxml_private.h [iso-8859-1] Sun Sep 14 01:24:36 2008
@@ -107,6 +107,7 @@
IXMLDOMAttribute_tid,
IXMLDOMCDATASection_tid,
IXMLDOMComment_tid,
+ IXMLDOMDocument_tid,
IXMLDOMDocument2_tid,
IXMLDOMDocumentFragment_tid,
IXMLDOMElement_tid,
Modified: trunk/reactos/dll/win32/msxml3/node.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/node.c?re…
==============================================================================
--- trunk/reactos/dll/win32/msxml3/node.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msxml3/node.c [iso-8859-1] Sun Sep 14 01:24:36 2008
@@ -802,7 +802,7 @@
str = (const xmlChar*) "text";
break;
default:
- FIXME("nodeName not mapped correctly (%d)\n", This->node->type);
+ FIXME("Unknown node type (%d)\n", This->node->type);
str = This->node->name;
break;
}
Modified: trunk/reactos/dll/win32/msxml3/queryresult.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/queryresu…
==============================================================================
--- trunk/reactos/dll/win32/msxml3/queryresult.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msxml3/queryresult.c [iso-8859-1] Sun Sep 14 01:24:36 2008
@@ -302,12 +302,51 @@
queryresult__newEnum,
};
+static HRESULT queryresult_get_dispid(IUnknown *iface, BSTR name, DWORD flags, DISPID
*dispid)
+{
+ queryresult *This = impl_from_IXMLDOMNodeList( (IXMLDOMNodeList*)iface );
+ WCHAR *ptr;
+ DWORD idx=0;
+
+ for(ptr = name; *ptr && isdigitW(*ptr); ptr++)
+ idx = idx*10 + (*ptr-'0');
+ if(*ptr)
+ return DISP_E_UNKNOWNNAME;
+
+ if(idx >= xmlXPathNodeSetGetLength(This->result->nodesetval))
+ return DISP_E_UNKNOWNNAME;
+
+ *dispid = MSXML_DISPID_CUSTOM_MIN + idx;
+ TRACE("ret %x\n", *dispid);
+ return S_OK;
+}
+
+static HRESULT queryresult_invoke(IUnknown *iface, DISPID id, LCID lcid, WORD flags,
DISPPARAMS *params,
+ VARIANT *res, EXCEPINFO *ei)
+{
+ queryresult *This = impl_from_IXMLDOMNodeList( (IXMLDOMNodeList*)iface );
+
+ if(flags != DISPATCH_PROPERTYGET) {
+ FIXME("flags %x\n", flags);
+ return E_NOTIMPL;
+ }
+
+ V_VT(res) = VT_DISPATCH;
+ V_DISPATCH(res) =
(IDispatch*)create_node(This->result->nodesetval->nodeTab[This->resultPos]);
+ return S_OK;
+}
+
+static const dispex_static_data_vtbl_t queryresult_dispex_vtbl = {
+ queryresult_get_dispid,
+ queryresult_invoke
+};
+
static const tid_t queryresult_iface_tids[] = {
IXMLDOMNodeList_tid,
0
};
static dispex_static_data_t queryresult_dispex = {
- NULL,
+ &queryresult_dispex_vtbl,
IXMLDOMNodeList_tid,
NULL,
queryresult_iface_tids