Author: cwittich
Date: Sat Jan 31 05:27:22 2009
New Revision: 39221
URL:
http://svn.reactos.org/svn/reactos?rev=39221&view=rev
Log:
sync msxml3 to wine 1.1.14
Modified:
trunk/reactos/dll/win32/msxml3/cdata.c
trunk/reactos/dll/win32/msxml3/comment.c
trunk/reactos/dll/win32/msxml3/domdoc.c
trunk/reactos/dll/win32/msxml3/element.c
trunk/reactos/dll/win32/msxml3/node.c
trunk/reactos/dll/win32/msxml3/regsvr.c
trunk/reactos/dll/win32/msxml3/saxreader.c
trunk/reactos/dll/win32/msxml3/text.c
trunk/reactos/dll/win32/msxml3/xmldoc.c
trunk/reactos/dll/win32/msxml3/xmlelem.c
Modified: trunk/reactos/dll/win32/msxml3/cdata.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/cdata.c?r…
==============================================================================
--- trunk/reactos/dll/win32/msxml3/cdata.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msxml3/cdata.c [iso-8859-1] Sat Jan 31 05:27:22 2009
@@ -520,7 +520,7 @@
long *len)
{
domcdata *This = impl_from_IXMLDOMCDATASection( iface );
- xmlnode *pDOMNode = impl_from_IXMLDOMNode( (IXMLDOMNode*)This->node );
+ xmlnode *pDOMNode = impl_from_IXMLDOMNode( This->node );
xmlChar *pContent;
long nLength = 0;
@@ -546,7 +546,7 @@
long offset, long count, BSTR *p)
{
domcdata *This = impl_from_IXMLDOMCDATASection( iface );
- xmlnode *pDOMNode = impl_from_IXMLDOMNode( (IXMLDOMNode*)This->node );
+ xmlnode *pDOMNode = impl_from_IXMLDOMNode( This->node );
xmlChar *pContent;
long nLength = 0;
HRESULT hr = S_FALSE;
@@ -591,7 +591,7 @@
BSTR p)
{
domcdata *This = impl_from_IXMLDOMCDATASection( iface );
- xmlnode *pDOMNode = impl_from_IXMLDOMNode( (IXMLDOMNode*)This->node );
+ xmlnode *pDOMNode = impl_from_IXMLDOMNode( This->node );
xmlChar *pContent;
HRESULT hr = S_FALSE;
@@ -601,7 +601,7 @@
if(p == NULL || SysStringLen(p) == 0)
return S_OK;
- pContent = xmlChar_from_wchar( (WCHAR*)p );
+ pContent = xmlChar_from_wchar( p );
if(pContent)
{
if(xmlTextConcat(pDOMNode->node, pContent, SysStringLen(p) ) == 0)
@@ -621,7 +621,7 @@
long offset, BSTR p)
{
domcdata *This = impl_from_IXMLDOMCDATASection( iface );
- xmlnode *pDOMNode = impl_from_IXMLDOMNode( (IXMLDOMNode*)This->node );
+ xmlnode *pDOMNode = impl_from_IXMLDOMNode( This->node );
xmlChar *pXmlContent;
BSTR sNewString;
HRESULT hr = S_FALSE;
@@ -667,7 +667,7 @@
sNewString[nLengthP + nLength] = 0;
- str = xmlChar_from_wchar((WCHAR*)sNewString);
+ str = xmlChar_from_wchar(sNewString);
if(str)
{
xmlNodeSetContent(pDOMNode->node, str);
Modified: trunk/reactos/dll/win32/msxml3/comment.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/comment.c…
==============================================================================
--- trunk/reactos/dll/win32/msxml3/comment.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msxml3/comment.c [iso-8859-1] Sat Jan 31 05:27:22 2009
@@ -595,7 +595,7 @@
if(p == NULL || SysStringLen(p) == 0)
return S_OK;
- pContent = xmlChar_from_wchar( (WCHAR*)p );
+ pContent = xmlChar_from_wchar( p );
if(pContent)
{
/* Older versions of libxml < 2.6.27 didn't correctly support
@@ -675,7 +675,7 @@
sNewString[nLengthP + nLength] = 0;
- str = xmlChar_from_wchar((WCHAR*)sNewString);
+ str = xmlChar_from_wchar(sNewString);
if(str)
{
xmlNodeSetContent(pDOMNode->node, str);
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] Sat Jan 31 05:27:22 2009
@@ -357,8 +357,26 @@
static HRESULT WINAPI xmldoc_IPersistStream_Save(
IPersistStream *iface, LPSTREAM pStm, BOOL fClearDirty)
{
- FIXME("(%p, %p, %d): stub!\n", iface, pStm, fClearDirty);
- return E_NOTIMPL;
+ domdoc *This = impl_from_IPersistStream(iface);
+ HRESULT hr;
+ BSTR xmlString;
+
+ TRACE("(%p, %p, %d)\n", iface, pStm, fClearDirty);
+
+ hr = IXMLDOMNode_get_xml( This->node, &xmlString );
+ if(hr == S_OK)
+ {
+ DWORD count;
+ DWORD len = strlenW(xmlString) * sizeof(WCHAR);
+
+ hr = IStream_Write( pStm, xmlString, len, &count );
+
+ SysFreeString(xmlString);
+ }
+
+ TRACE("ret 0x%08x\n", hr);
+
+ return hr;
}
static HRESULT WINAPI xmldoc_IPersistStream_GetSizeMax(
@@ -441,11 +459,11 @@
}
else if (IsEqualGUID(&IID_IPersistStream, riid))
{
- *ppvObject = (IPersistStream*)&(This->lpvtblIPersistStream);
+ *ppvObject = &(This->lpvtblIPersistStream);
}
else if (IsEqualGUID(&IID_IObjectWithSite, riid))
{
- *ppvObject = (IObjectWithSite*)&(This->lpvtblIObjectWithSite);
+ *ppvObject = &(This->lpvtblIObjectWithSite);
}
else if( IsEqualGUID( riid, &IID_ISupportErrorInfo ))
{
@@ -1023,7 +1041,7 @@
TRACE("%p->(%s,%p)\n", iface, debugstr_w(tagname), element);
- xml_name = xmlChar_from_wchar((WCHAR*)tagname);
+ xml_name = xmlChar_from_wchar(tagname);
xmlnode = xmlNewDocNode(get_doc(This), NULL, xml_name, NULL);
xmldoc_add_orphan(xmlnode->doc, xmlnode);
@@ -1080,7 +1098,7 @@
*text = NULL;
- xml_content = xmlChar_from_wchar((WCHAR*)data);
+ xml_content = xmlChar_from_wchar(data);
xmlnode = xmlNewText(xml_content);
HeapFree(GetProcessHeap(), 0, xml_content);
@@ -1112,7 +1130,7 @@
*comment = NULL;
- xml_content = xmlChar_from_wchar((WCHAR*)data);
+ xml_content = xmlChar_from_wchar(data);
xmlnode = xmlNewComment(xml_content);
HeapFree(GetProcessHeap(), 0, xml_content);
@@ -1144,7 +1162,7 @@
*cdata = NULL;
- xml_content = xmlChar_from_wchar((WCHAR*)data);
+ xml_content = xmlChar_from_wchar(data);
xmlnode = xmlNewCDataBlock(get_doc( This ), xml_content, strlen( (char*)xml_content)
);
HeapFree(GetProcessHeap(), 0, xml_content);
@@ -1179,8 +1197,8 @@
if(!target || lstrlenW(target) == 0)
return E_FAIL;
- xml_target = xmlChar_from_wchar((WCHAR*)target);
- xml_content = xmlChar_from_wchar((WCHAR*)data);
+ xml_target = xmlChar_from_wchar(target);
+ xml_content = xmlChar_from_wchar(data);
xmlnode = xmlNewDocPI(get_doc(This), xml_target, xml_content);
xmldoc_add_orphan(xmlnode->doc, xmlnode);
@@ -1214,7 +1232,7 @@
*attribute = NULL;
- xml_name = xmlChar_from_wchar((WCHAR*)name);
+ xml_name = xmlChar_from_wchar(name);
xmlnode = (xmlNode *)xmlNewProp(NULL, xml_name, NULL);
HeapFree(GetProcessHeap(), 0, xml_name);
@@ -1246,7 +1264,7 @@
*entityRef = NULL;
- xml_name = xmlChar_from_wchar((WCHAR*)name);
+ xml_name = xmlChar_from_wchar(name);
xmlnode = xmlNewReference(get_doc( This ), xml_name );
HeapFree(GetProcessHeap(), 0, xml_name);
@@ -1312,13 +1330,16 @@
TRACE("(%p)->(type,%s,%s,%p)\n", This, debugstr_w(name),
debugstr_w(namespaceURI), node);
+ if(namespaceURI && namespaceURI[0])
+ FIXME("nodes with namespaces currently not supported.\n");
+
hr = get_node_type(Type, &node_type);
if(FAILED(hr))
return hr;
TRACE("node_type %d\n", node_type);
- xml_name = xmlChar_from_wchar((WCHAR*)name);
+ xml_name = xmlChar_from_wchar(name);
switch(node_type)
{
@@ -2189,7 +2210,7 @@
doc->lpvtblIObjectSafety = &domdocObjectSafetyVtbl;
doc->lpvtblISupportErrorInfo = &support_error_vtbl;
doc->ref = 1;
- doc->async = 0;
+ doc->async = VARIANT_TRUE;
doc->validating = 0;
doc->resolving = 0;
doc->preserving = 0;
@@ -2258,7 +2279,7 @@
if (FAILED(hr))
return NULL;
- return (IUnknown*)pObj;
+ return pObj;
}
#else
Modified: trunk/reactos/dll/win32/msxml3/element.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/element.c…
==============================================================================
--- trunk/reactos/dll/win32/msxml3/element.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msxml3/element.c [iso-8859-1] Sat Jan 31 05:27:22 2009
@@ -644,6 +644,7 @@
{
domelem *This = impl_from_IXMLDOMElement( iface );
LPWSTR szPattern;
+ xmlNodePtr element;
HRESULT hr;
TRACE("(%p)->(%s,%p)\n", This, debugstr_w(bstrName), resultList);
@@ -654,7 +655,11 @@
lstrcpyW(szPattern+3, bstrName);
TRACE("%s\n", debugstr_w(szPattern));
- hr = queryresult_create(get_element(This), szPattern, resultList);
+ element = get_element(This);
+ if (!element)
+ hr = E_FAIL;
+ else
+ hr = queryresult_create(element, szPattern, resultList);
HeapFree(GetProcessHeap(), 0, szPattern);
return hr;
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] Sat Jan 31 05:27:22 2009
@@ -345,7 +345,7 @@
case XML_PI_NODE:
case XML_TEXT_NODE:
{
- str = xmlChar_from_wchar((WCHAR*)V_BSTR(&string_value));
+ str = xmlChar_from_wchar(V_BSTR(&string_value));
xmlNodeSetContent(This->node, str);
HeapFree(GetProcessHeap(),0,str);
hr = S_OK;
@@ -904,7 +904,7 @@
break;
}
- str = xmlChar_from_wchar((WCHAR*)text);
+ str = xmlChar_from_wchar(text);
/* Escape the string. */
str2 = xmlEncodeEntitiesReentrant(This->node->doc, str);
@@ -1060,7 +1060,7 @@
{
xmlNsPtr pNS = NULL;
xmlAttrPtr pAttr = NULL;
- xmlChar* str = xmlChar_from_wchar((WCHAR*)dataTypeName);
+ xmlChar* str = xmlChar_from_wchar(dataTypeName);
pAttr = xmlHasNsProp(This->node, (xmlChar*)"dt",
(xmlChar*)"urn:schemas-microsoft-com:datatypes");
Modified: trunk/reactos/dll/win32/msxml3/regsvr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/regsvr.c?…
==============================================================================
--- trunk/reactos/dll/win32/msxml3/regsvr.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msxml3/regsvr.c [iso-8859-1] Sat Jan 31 05:27:22 2009
@@ -564,6 +564,14 @@
"Msxml2.SAXXMLReader",
"3.0"
},
+ { &CLSID_SAXXMLReader30,
+ "SAX XML Reader 3.0",
+ NULL,
+ "msxml3.dll",
+ "Both",
+ "Msxml2.SAXXMLReader",
+ "3.0"
+ },
{ NULL } /* list terminator */
};
@@ -651,6 +659,16 @@
{ "Msxml2.XMLSchemaCache.3.0",
"XML Schema Cache 3.0",
&CLSID_XMLSchemaCache30,
+ NULL
+ },
+ { "Msxml2.SAXXMLReader",
+ "SAX XML Reader",
+ &CLSID_SAXXMLReader,
+ "Msxml2.SAXXMLReader.3.0"
+ },
+ { "Msxml2.SAXXMLReader.3.0",
+ "SAX XML Reader 3.0",
+ &CLSID_SAXXMLReader30,
NULL
},
Modified: trunk/reactos/dll/win32/msxml3/saxreader.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/saxreader…
==============================================================================
--- trunk/reactos/dll/win32/msxml3/saxreader.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msxml3/saxreader.c [iso-8859-1] Sat Jan 31 05:27:22 2009
@@ -457,9 +457,8 @@
{
saxattributes *This = impl_from_IVBSAXAttributes( iface );
return ISAXAttributes_getIndexFromName(
- (ISAXAttributes*)&This->lpSAXAttributesVtbl,
- (const WCHAR*)uri, SysStringLen(uri),
- (const WCHAR*)localName, SysStringLen(localName), index);
+ (ISAXAttributes*)&This->lpSAXAttributesVtbl, uri, SysStringLen(uri),
+ localName, SysStringLen(localName), index);
}
static HRESULT WINAPI ivbsaxattributes_getIndexFromQName(
@@ -469,8 +468,8 @@
{
saxattributes *This = impl_from_IVBSAXAttributes( iface );
return ISAXAttributes_getIndexFromQName(
- (ISAXAttributes*)&This->lpSAXAttributesVtbl,
- (const WCHAR*)QName, SysStringLen(QName), index);
+ (ISAXAttributes*)&This->lpSAXAttributesVtbl, QName,
+ SysStringLen(QName), index);
}
static HRESULT WINAPI ivbsaxattributes_getType(
@@ -494,10 +493,8 @@
int len;
saxattributes *This = impl_from_IVBSAXAttributes( iface );
return ISAXAttributes_getTypeFromName(
- (ISAXAttributes*)&This->lpSAXAttributesVtbl,
- (const WCHAR*)uri, SysStringLen(uri),
- (const WCHAR*)localName, SysStringLen(localName),
- (const WCHAR**)type, &len);
+ (ISAXAttributes*)&This->lpSAXAttributesVtbl, uri, SysStringLen(uri),
+ localName, SysStringLen(localName), (const WCHAR**)type, &len);
}
static HRESULT WINAPI ivbsaxattributes_getTypeFromQName(
@@ -508,9 +505,8 @@
int len;
saxattributes *This = impl_from_IVBSAXAttributes( iface );
return ISAXAttributes_getTypeFromQName(
- (ISAXAttributes*)&This->lpSAXAttributesVtbl,
- (const WCHAR*)QName, SysStringLen(QName),
- (const WCHAR**)type, &len);
+ (ISAXAttributes*)&This->lpSAXAttributesVtbl, QName,
+ SysStringLen(QName), (const WCHAR**)type, &len);
}
static HRESULT WINAPI ivbsaxattributes_getValue(
@@ -534,10 +530,8 @@
int len;
saxattributes *This = impl_from_IVBSAXAttributes( iface );
return ISAXAttributes_getValueFromName(
- (ISAXAttributes*)&This->lpSAXAttributesVtbl,
- (const WCHAR*)uri, SysStringLen(uri),
- (const WCHAR*)localName, SysStringLen(localName),
- (const WCHAR**)value, &len);
+ (ISAXAttributes*)&This->lpSAXAttributesVtbl, uri, SysStringLen(uri),
+ localName, SysStringLen(localName), (const WCHAR**)value, &len);
}
static HRESULT WINAPI ivbsaxattributes_getValueFromQName(
@@ -548,9 +542,8 @@
int len;
saxattributes *This = impl_from_IVBSAXAttributes( iface );
return ISAXAttributes_getValueFromQName(
- (ISAXAttributes*)&This->lpSAXAttributesVtbl,
- (const WCHAR*)QName, SysStringLen(QName),
- (const WCHAR**)value, &len);
+ (ISAXAttributes*)&This->lpSAXAttributesVtbl, QName,
+ SysStringLen(QName), (const WCHAR**)value, &len);
}
static const struct IVBSAXAttributesVtbl ivbsaxattributes_vtbl =
@@ -1329,7 +1322,7 @@
len = MultiByteToWideChar(CP_UNIXCP, 0, message, -1, NULL, 0);
wszError = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*len);
if(wszError)
- MultiByteToWideChar(CP_UNIXCP, 0, message, -1, (LPWSTR)wszError, len);
+ MultiByteToWideChar(CP_UNIXCP, 0, message, -1, wszError, len);
if(This->vbInterface)
{
@@ -2031,7 +2024,7 @@
hr = SafeArrayGetUBound(V_ARRAY(&varInput), 1, &uBound);
if(hr != S_OK) break;
dataRead = (uBound-lBound)*SafeArrayGetElemsize(V_ARRAY(&varInput));
- hr = SafeArrayAccessData(V_ARRAY(&varInput), (void**)&pSAData);
+ hr = SafeArrayAccessData(V_ARRAY(&varInput), &pSAData);
if(hr != S_OK) break;
hr = internal_parseBuffer(This, pSAData, dataRead, vbInterface);
SafeArrayUnaccessData(V_ARRAY(&varInput));
@@ -2267,7 +2260,7 @@
}
else if( IsEqualGUID( riid, &IID_ISAXXMLReader ))
{
- *ppvObject = (ISAXXMLReader*)&This->lpSAXXMLReaderVtbl;
+ *ppvObject = &This->lpSAXXMLReaderVtbl;
}
else
{
Modified: trunk/reactos/dll/win32/msxml3/text.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/text.c?re…
==============================================================================
--- trunk/reactos/dll/win32/msxml3/text.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msxml3/text.c [iso-8859-1] Sat Jan 31 05:27:22 2009
@@ -603,7 +603,7 @@
if(p == NULL || SysStringLen(p) == 0)
return S_OK;
- pContent = xmlChar_from_wchar( (WCHAR*)p );
+ pContent = xmlChar_from_wchar( p );
if(pContent)
{
if(xmlTextConcat(pDOMNode->node, pContent, SysStringLen(p) ) == 0)
@@ -669,7 +669,7 @@
sNewString[nLengthP + nLength] = 0;
- str = xmlChar_from_wchar((WCHAR*)sNewString);
+ str = xmlChar_from_wchar(sNewString);
if(str)
{
xmlNodeSetContent(pDOMNode->node, str);
Modified: trunk/reactos/dll/win32/msxml3/xmldoc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/xmldoc.c?…
==============================================================================
--- trunk/reactos/dll/win32/msxml3/xmldoc.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msxml3/xmldoc.c [iso-8859-1] Sat Jan 31 05:27:22 2009
@@ -86,7 +86,7 @@
else if (IsEqualGUID(&IID_IPersistStreamInit, riid) ||
IsEqualGUID(&IID_IPersistStream, riid))
{
- *ppvObject = (IPersistStreamInit *)&(This->lpvtblIPersistStreamInit);
+ *ppvObject = &(This->lpvtblIPersistStreamInit);
}
else
{
Modified: trunk/reactos/dll/win32/msxml3/xmlelem.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msxml3/xmlelem.c…
==============================================================================
--- trunk/reactos/dll/win32/msxml3/xmlelem.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msxml3/xmlelem.c [iso-8859-1] Sat Jan 31 05:27:22 2009
@@ -516,7 +516,7 @@
}
else if (IsEqualGUID(riid, &IID_IEnumVARIANT))
{
- *ppvObject = (IEnumVARIANT *)&(This->lpvtblIEnumVARIANT);
+ *ppvObject = &(This->lpvtblIEnumVARIANT);
}
else
{