Commit 5a39fab4 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

msxml3: Do not depend on libxml2 for msxwriter object.

parent 99d2bda5
......@@ -113,4 +113,35 @@ void release_dispex(DispatchEx*) DECLSPEC_HIDDEN;
BOOL dispex_query_interface(DispatchEx*,REFIID,void**) DECLSPEC_HIDDEN;
const IID *get_riid_from_tid(enum tid_t tid) DECLSPEC_HIDDEN;
static inline HRESULT return_bstr(const WCHAR *value, BSTR *p)
{
if (!p)
return E_INVALIDARG;
if (value)
{
*p = SysAllocString(value);
if (!*p)
return E_OUTOFMEMORY;
}
else
*p = NULL;
return S_OK;
}
static inline HRESULT return_bstrn(const WCHAR *value, int len, BSTR *p)
{
if (value)
{
*p = SysAllocStringLen(value, len);
if (!*p)
return E_OUTOFMEMORY;
}
else
*p = NULL;
return S_OK;
}
#endif /* __MSXML_DISPEX__ */
......@@ -340,34 +340,6 @@ static inline xmlChar *heap_strdupxmlChar(const xmlChar *str)
#endif
static inline HRESULT return_bstr(const WCHAR *value, BSTR *p)
{
if(!p)
return E_INVALIDARG;
if(value) {
*p = SysAllocString(value);
if(!*p)
return E_OUTOFMEMORY;
}else {
*p = NULL;
}
return S_OK;
}
static inline HRESULT return_bstrn(const WCHAR *value, int len, BSTR *p)
{
if(value) {
*p = SysAllocStringLen(value, len);
if(!*p)
return E_OUTOFMEMORY;
}else
*p = NULL;
return S_OK;
}
static inline HRESULT return_null_node(IXMLDOMNode **p)
{
if(!p)
......
......@@ -20,12 +20,8 @@
*/
#define COBJMACROS
#include "config.h"
#include <stdarg.h>
#ifdef HAVE_LIBXML2
# include <libxml/parser.h>
#endif
#include "windef.h"
#include "winbase.h"
......@@ -34,9 +30,9 @@
#include "msxml6.h"
#include "wine/debug.h"
#include "wine/list.h"
#include "wine/unicode.h"
#include "msxml_private.h"
#include "msxml_dispex.h"
WINE_DEFAULT_DEBUG_CHANNEL(msxml);
......@@ -258,7 +254,7 @@ static xml_encoding parse_encoding_name(const WCHAR *encoding)
{
n = (min+max)/2;
c = strcmpiW(xml_encoding_map[n].encoding, encoding);
c = lstrcmpiW(xml_encoding_map[n].encoding, encoding);
if (!c)
return xml_encoding_map[n].enc;
......@@ -347,7 +343,7 @@ static HRESULT write_output_buffer(mxwriter *writer, const WCHAR *data, int len)
if (!len || !*data)
return S_OK;
src_len = len == -1 ? strlenW(data) : len;
src_len = len == -1 ? lstrlenW(data) : len;
if (writer->dest)
{
buff = &buffer->encoded;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment