mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 17:05:46 +00:00
sync msxml3 to wine 1.1.4
svn path=/trunk/; revision=36220
This commit is contained in:
parent
42f6e7844c
commit
27378d78cf
5 changed files with 76 additions and 10 deletions
|
@ -79,6 +79,7 @@ static REFIID tid_ids[] = {
|
|||
&IID_IXMLDOMAttribute,
|
||||
&IID_IXMLDOMCDATASection,
|
||||
&IID_IXMLDOMComment,
|
||||
&IID_IXMLDOMDocument,
|
||||
&IID_IXMLDOMDocument2,
|
||||
&IID_IXMLDOMDocumentFragment,
|
||||
&IID_IXMLDOMElement,
|
||||
|
@ -542,42 +543,42 @@ static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lc
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include "shlwapi.h"
|
||||
#include "ocidl.h"
|
||||
#include "objsafe.h"
|
||||
#include "dispex.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
|
@ -75,6 +76,9 @@ typedef struct _domdoc
|
|||
|
||||
/* IObjectSafety */
|
||||
DWORD safeopt;
|
||||
|
||||
/* IDispatchEx */
|
||||
DispatchEx dispex;
|
||||
} domdoc;
|
||||
|
||||
static xmlDocPtr doparse( char *ptr, int len )
|
||||
|
@ -290,6 +294,10 @@ static HRESULT WINAPI domdoc_QueryInterface( IXMLDOMDocument2 *iface, REFIID rii
|
|||
{
|
||||
*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))
|
||||
{
|
||||
TRACE("IID_IRunnableObject not supported returning NULL\n");
|
||||
|
@ -1475,7 +1483,7 @@ static HRESULT WINAPI domdoc_save(
|
|||
IXMLDOMDocument_Release(pDocument);
|
||||
}
|
||||
|
||||
TRACE("ret %d", ret);
|
||||
TRACE("ret %d\n", ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -1967,6 +1975,20 @@ static const IObjectSafetyVtbl domdocObjectSafetyVtbl = {
|
|||
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 @@ HRESULT DOMDocument_create_from_xmldoc(xmlDocPtr xmldoc, IXMLDOMDocument2 **docu
|
|||
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);
|
||||
|
||||
|
|
|
@ -107,6 +107,7 @@ typedef enum tid_t {
|
|||
IXMLDOMAttribute_tid,
|
||||
IXMLDOMCDATASection_tid,
|
||||
IXMLDOMComment_tid,
|
||||
IXMLDOMDocument_tid,
|
||||
IXMLDOMDocument2_tid,
|
||||
IXMLDOMDocumentFragment_tid,
|
||||
IXMLDOMElement_tid,
|
||||
|
|
|
@ -802,7 +802,7 @@ static HRESULT WINAPI xmlnode_get_nodeTypeString(
|
|||
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;
|
||||
}
|
||||
|
|
|
@ -302,12 +302,51 @@ static const struct IXMLDOMNodeListVtbl queryresult_vtbl =
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue