mirror of
https://github.com/reactos/wine.git
synced 2025-02-24 15:01:41 +00:00
msxml3: Implement IXMLDOMCDATASection_get_length.
This commit is contained in:
parent
be435c47cb
commit
0d4db95d99
@ -501,8 +501,26 @@ static HRESULT WINAPI domcdata_get_length(
|
||||
IXMLDOMCDATASection *iface,
|
||||
long *len)
|
||||
{
|
||||
FIXME("\n");
|
||||
return E_NOTIMPL;
|
||||
domcdata *This = impl_from_IXMLDOMCDATASection( iface );
|
||||
xmlnode *pDOMNode = impl_from_IXMLDOMNode( (IXMLDOMNode*)This->element );
|
||||
xmlChar *pContent;
|
||||
long nLength = 0;
|
||||
|
||||
TRACE("%p\n", iface);
|
||||
|
||||
if(!len)
|
||||
return E_INVALIDARG;
|
||||
|
||||
pContent = xmlNodeGetContent(pDOMNode->node);
|
||||
if(pContent)
|
||||
{
|
||||
nLength = xmlStrlen(pContent);
|
||||
xmlFree(pContent);
|
||||
}
|
||||
|
||||
*len = nLength;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI domcdata_substringData(
|
||||
|
@ -2315,6 +2315,11 @@ static void test_xmlTypes(void)
|
||||
ok( !lstrcmpW( str, _bstr_("This &is a ; test <>\\") ), "incorrect text string\n");
|
||||
SysFreeString(str);
|
||||
|
||||
/* test length property */
|
||||
hr = IXMLDOMCDATASection_get_length(pComment, &len);
|
||||
ok(hr == S_OK, "ret %08x\n", hr );
|
||||
ok(len == 21, "expected 21 got %ld\n", len);
|
||||
|
||||
IXMLDOMCDATASection_Release(pCDataSec);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user