Author: cwittich
Date: Sat Mar 6 09:56:21 2010
New Revision: 45908
URL:
http://svn.reactos.org/svn/reactos?rev=45908&view=rev
Log:
[MSXML3]
sync msxml3 to wine 1.1.40
Modified:
trunk/reactos/dll/win32/msxml3/domdoc.c
trunk/reactos/dll/win32/msxml3/element.c
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 Mar 6 09:56:21 2010
@@ -2214,7 +2214,7 @@
return IXMLDocument_Release((IXMLDocument *)This);
}
-#define SAFETY_SUPPORTED_OPTIONS
(INTERFACESAFE_FOR_UNTRUSTED_CALLER|INTERFACESAFE_FOR_UNTRUSTED_DATA)
+#define SAFETY_SUPPORTED_OPTIONS
(INTERFACESAFE_FOR_UNTRUSTED_CALLER|INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_SECURITY_MANAGER)
static HRESULT WINAPI xmldoc_Safety_GetInterfaceSafetyOptions(IObjectSafety *iface,
REFIID riid,
DWORD *pdwSupportedOptions, DWORD *pdwEnabledOptions)
@@ -2237,6 +2237,9 @@
{
domdoc *This = impl_from_IObjectSafety(iface);
TRACE("(%p)->(%s %x %x)\n", This, debugstr_guid(riid), dwOptionSetMask,
dwEnabledOptions);
+
+ if ((dwOptionSetMask & ~SAFETY_SUPPORTED_OPTIONS) != 0)
+ return E_FAIL;
This->safeopt = dwEnabledOptions & dwOptionSetMask &
SAFETY_SUPPORTED_OPTIONS;
return S_OK;
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 Mar 6 09:56:21 2010
@@ -489,32 +489,24 @@
{
domelem *This = impl_from_IXMLDOMElement( iface );
xmlNodePtr element;
- DWORD len;
- DWORD offset = 0;
- LPWSTR str;
+ const xmlChar *prefix;
+ xmlChar *qname;
TRACE("(%p)->(%p)\n", This, p );
+
+ if (!p) return E_INVALIDARG;
element = get_element( This );
if ( !element )
return E_FAIL;
- len = MultiByteToWideChar( CP_UTF8, 0, (LPCSTR) element->name, -1, NULL, 0 );
- if (element->ns)
- len += MultiByteToWideChar( CP_UTF8, 0, (LPCSTR) element->ns->prefix, -1,
NULL, 0 );
- str = heap_alloc( len * sizeof (WCHAR) );
- if ( !str )
- return E_OUTOFMEMORY;
- if (element->ns)
- {
- offset = MultiByteToWideChar( CP_UTF8, 0, (LPCSTR) element->ns->prefix, -1,
str, len );
- str[offset - 1] = ':';
- }
- MultiByteToWideChar( CP_UTF8, 0, (LPCSTR) element->name, -1, str + offset, len -
offset );
- *p = SysAllocString( str );
- heap_free( str );
-
- return S_OK;
+ prefix = element->ns ? element->ns->prefix : NULL;
+ qname = xmlBuildQName(element->name, prefix, NULL, 0);
+
+ *p = bstr_from_xmlChar(qname);
+ if (qname != element->name) xmlFree(qname);
+
+ return *p ? S_OK : E_OUTOFMEMORY;
}
static HRESULT WINAPI domelem_getAttribute(