msxml3: libxml2 is not used for writer.

This commit is contained in:
Nikolay Sivov 2011-12-18 21:12:19 +03:00 committed by Alexandre Julliard
parent 02414775e9
commit 477fd6ef3c
2 changed files with 21 additions and 34 deletions

View File

@ -375,6 +375,27 @@ static inline BSTR bstr_from_xmlChar(const xmlChar *str)
return ret;
}
static inline xmlChar *xmlchar_from_wcharn(const WCHAR *str, int nchars)
{
xmlChar *xmlstr;
DWORD len = WideCharToMultiByte( CP_UTF8, 0, str, nchars, NULL, 0, NULL, NULL );
xmlstr = heap_alloc( len+1 );
if ( xmlstr )
{
WideCharToMultiByte( CP_UTF8, 0, str, nchars, (LPSTR) xmlstr, len+1, NULL, NULL );
xmlstr[len] = 0;
}
return xmlstr;
}
static inline xmlChar *xmlchar_from_wchar( const WCHAR *str )
{
return xmlchar_from_wcharn(str, -1);
}
#endif
static inline HRESULT return_bstr(const WCHAR *value, BSTR *p)
{
if(!p)
@ -425,27 +446,6 @@ static inline HRESULT return_null_bstr(BSTR *p)
return S_FALSE;
}
static inline xmlChar *xmlchar_from_wcharn(const WCHAR *str, int nchars)
{
xmlChar *xmlstr;
DWORD len = WideCharToMultiByte( CP_UTF8, 0, str, nchars, NULL, 0, NULL, NULL );
xmlstr = heap_alloc( len+1 );
if ( xmlstr )
{
WideCharToMultiByte( CP_UTF8, 0, str, nchars, (LPSTR) xmlstr, len+1, NULL, NULL );
xmlstr[len] = 0;
}
return xmlstr;
}
static inline xmlChar *xmlchar_from_wchar( const WCHAR *str )
{
return xmlchar_from_wcharn(str, -1);
}
#endif
extern IXMLDOMParseError *create_parseError( LONG code, BSTR url, BSTR reason, BSTR srcText,
LONG line, LONG linepos, LONG filepos ) DECLSPEC_HIDDEN;
extern HRESULT DOMDocument_create(MSXML_VERSION, IUnknown*, void**) DECLSPEC_HIDDEN;

View File

@ -39,8 +39,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(msxml);
#ifdef HAVE_LIBXML2
static const WCHAR utf16W[] = {'U','T','F','-','1','6',0};
static const WCHAR emptyW[] = {0};
@ -1144,14 +1142,3 @@ HRESULT MXWriter_create(MSXML_VERSION version, IUnknown *outer, void **ppObj)
return S_OK;
}
#else
HRESULT MXWriter_create(MSXML_VERSION version, IUnknown *outer, void **obj)
{
MESSAGE("This program tried to use a MXXMLWriter object, but\n"
"libxml2 support was not present at compile time.\n");
return E_NOTIMPL;
}
#endif /* HAVE_LIBXML2 */