Commit f9c5856c authored by Alistair Leslie-Hughes's avatar Alistair Leslie-Hughes Committed by Alexandre Julliard

msxml3: Implement IXMLDOMText_appendData.

parent 9238ccca
......@@ -638,6 +638,21 @@ static void test_domdoc( void )
ok( !lstrcmpW( str, _bstr_("\\") ), "incorrect substringData string\n");
SysFreeString(str);
/* test appendData */
r = IXMLDOMText_appendData(nodetext, NULL);
ok(r == S_OK, "ret %08x\n", r );
r = IXMLDOMText_appendData(nodetext, _bstr_(""));
ok(r == S_OK, "ret %08x\n", r );
r = IXMLDOMText_appendData(nodetext, _bstr_("Append"));
ok(r == S_OK, "ret %08x\n", r );
r = IXMLDOMText_get_text(nodetext, &str);
ok(r == S_OK, "ret %08x\n", r );
ok( !lstrcmpW( str, _bstr_("This &is a ; test <>\\Append") ), "incorrect get_text string\n");
SysFreeString(str);
IXMLDOMText_Release( nodetext );
}
SysFreeString( str );
......
......@@ -584,8 +584,32 @@ static HRESULT WINAPI domtext_appendData(
IXMLDOMText *iface,
BSTR p)
{
FIXME("\n");
return E_NOTIMPL;
domtext *This = impl_from_IXMLDOMText( iface );
xmlnode *pDOMNode = impl_from_IXMLDOMNode( (IXMLDOMNode*)This->element );
xmlChar *pContent;
HRESULT hr = S_FALSE;
TRACE("%p\n", iface);
/* Nothing to do if NULL or an Empty string passed in. */
if(p == NULL || SysStringLen(p) == 0)
return S_OK;
pContent = xmlChar_from_wchar( (WCHAR*)p );
if(pContent)
{
if(xmlTextConcat(pDOMNode->node, pContent, SysStringLen(p) ) == 0)
hr = S_OK;
else
{
hr = E_FAIL;
xmlFree(pContent);
}
}
else
hr = E_FAIL;
return hr;
}
static HRESULT WINAPI domtext_insertData(
......
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