Commit 1e998bfc authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

msxml3: Get rid of ::get_baseName() forward.

parent 6556ad57
......@@ -506,10 +506,11 @@ static HRESULT WINAPI domattr_get_prefix(
static HRESULT WINAPI domattr_get_baseName(
IXMLDOMAttribute *iface,
BSTR* p)
BSTR* name)
{
domattr *This = impl_from_IXMLDOMAttribute( iface );
return IXMLDOMNode_get_baseName( IXMLDOMNode_from_impl(&This->node), p );
TRACE("(%p)->(%p)\n", This, name);
return node_get_base_name( &This->node, name );
}
static HRESULT WINAPI domattr_transformNodeToObject(
......
......@@ -517,10 +517,11 @@ static HRESULT WINAPI domcdata_get_prefix(
static HRESULT WINAPI domcdata_get_baseName(
IXMLDOMCDATASection *iface,
BSTR* p)
BSTR* name)
{
domcdata *This = impl_from_IXMLDOMCDATASection( iface );
return IXMLDOMNode_get_baseName( IXMLDOMNode_from_impl(&This->node), p );
FIXME("(%p)->(%p): needs test\n", This, name);
return return_null_bstr( name );
}
static HRESULT WINAPI domcdata_transformNodeToObject(
......
......@@ -510,10 +510,11 @@ static HRESULT WINAPI domcomment_get_prefix(
static HRESULT WINAPI domcomment_get_baseName(
IXMLDOMComment *iface,
BSTR* p)
BSTR* name)
{
domcomment *This = impl_from_IXMLDOMComment( iface );
return IXMLDOMNode_get_baseName( IXMLDOMNode_from_impl(&This->node), p );
TRACE("(%p)->(%p)\n", This, name);
return return_null_bstr( name );
}
static HRESULT WINAPI domcomment_transformNodeToObject(
......
......@@ -514,10 +514,11 @@ static HRESULT WINAPI domfrag_get_prefix(
static HRESULT WINAPI domfrag_get_baseName(
IXMLDOMDocumentFragment *iface,
BSTR* p)
BSTR* name)
{
domfrag *This = impl_from_IXMLDOMDocumentFragment( iface );
return IXMLDOMNode_get_baseName( IXMLDOMNode_from_impl(&This->node), p );
FIXME("(%p)->(%p): needs test\n", This, name);
return return_null_bstr( name );
}
static HRESULT WINAPI domfrag_transformNodeToObject(
......
......@@ -1341,10 +1341,11 @@ static HRESULT WINAPI domdoc_get_prefix(
static HRESULT WINAPI domdoc_get_baseName(
IXMLDOMDocument3 *iface,
BSTR* nameString )
BSTR* name )
{
domdoc *This = impl_from_IXMLDOMDocument3( iface );
return IXMLDOMNode_get_baseName( IXMLDOMNode_from_impl(&This->node), nameString );
TRACE("(%p)->(%p)\n", This, name);
return return_null_bstr( name );
}
......
......@@ -562,10 +562,11 @@ static HRESULT WINAPI domelem_get_prefix(
static HRESULT WINAPI domelem_get_baseName(
IXMLDOMElement *iface,
BSTR* p)
BSTR* name)
{
domelem *This = impl_from_IXMLDOMElement( iface );
return IXMLDOMNode_get_baseName( IXMLDOMNode_from_impl(&This->node), p );
TRACE("(%p)->(%p)\n", This, name);
return node_get_base_name( &This->node, name );
}
static HRESULT WINAPI domelem_transformNodeToObject(
......
......@@ -508,10 +508,11 @@ static HRESULT WINAPI entityref_get_prefix(
static HRESULT WINAPI entityref_get_baseName(
IXMLDOMEntityReference *iface,
BSTR* p)
BSTR* name)
{
entityref *This = impl_from_IXMLDOMEntityReference( iface );
return IXMLDOMNode_get_baseName( IXMLDOMNode_from_impl(&This->node), p );
FIXME("(%p)->(%p): needs test\n", This, name);
return return_null_bstr( name );
}
static HRESULT WINAPI entityref_transformNodeToObject(
......
......@@ -194,6 +194,7 @@ extern HRESULT node_put_text(xmlnode*,BSTR);
extern HRESULT node_get_xml(xmlnode*,BOOL,BOOL,BSTR*);
extern HRESULT node_clone(xmlnode*,VARIANT_BOOL,IXMLDOMNode**);
extern HRESULT node_get_prefix(xmlnode*,BSTR*);
extern HRESULT node_get_base_name(xmlnode*,BSTR*);
extern HRESULT DOMDocument_create_from_xmldoc(xmlDocPtr xmldoc, IXMLDOMDocument3 **document);
......
......@@ -1170,40 +1170,16 @@ HRESULT node_get_prefix(xmlnode *This, BSTR *prefix)
return *prefix ? S_OK : S_FALSE;
}
static HRESULT WINAPI xmlnode_get_baseName(
IXMLDOMNode *iface,
BSTR* nameString)
HRESULT node_get_base_name(xmlnode *This, BSTR *name)
{
xmlnode *This = impl_from_IXMLDOMNode( iface );
BSTR str = NULL;
HRESULT r = S_FALSE;
TRACE("(%p)->(%p)\n", This, nameString );
if ( !nameString )
return E_INVALIDARG;
if (!name) return E_INVALIDARG;
switch ( This->node->type )
{
case XML_ELEMENT_NODE:
case XML_ATTRIBUTE_NODE:
case XML_PI_NODE:
str = bstr_from_xmlChar( This->node->name );
r = S_OK;
break;
case XML_TEXT_NODE:
case XML_COMMENT_NODE:
case XML_DOCUMENT_NODE:
break;
default:
ERR("Unhandled type %d\n", This->node->type );
break;
}
*name = bstr_from_xmlChar(This->node->name);
if (!*name) return E_OUTOFMEMORY;
TRACE("returning %08x str = %s\n", r, debugstr_w( str ) );
TRACE("returning %s\n", debugstr_w(*name));
*nameString = str;
return r;
return S_OK;
}
static HRESULT WINAPI xmlnode_transformNodeToObject(
......@@ -1259,7 +1235,7 @@ static const struct IXMLDOMNodeVtbl xmlnode_vtbl =
NULL,
xmlnode_get_namespaceURI,
NULL,
xmlnode_get_baseName,
NULL,
xmlnode_transformNodeToObject,
};
......
......@@ -524,10 +524,11 @@ static HRESULT WINAPI dom_pi_get_prefix(
static HRESULT WINAPI dom_pi_get_baseName(
IXMLDOMProcessingInstruction *iface,
BSTR* p)
BSTR* name)
{
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_get_baseName( IXMLDOMNode_from_impl(&This->node), p );
TRACE("(%p)->(%p)\n", This, name);
return node_get_base_name( &This->node, name );
}
static HRESULT WINAPI dom_pi_transformNodeToObject(
......
......@@ -523,10 +523,11 @@ static HRESULT WINAPI domtext_get_prefix(
static HRESULT WINAPI domtext_get_baseName(
IXMLDOMText *iface,
BSTR* p)
BSTR* name)
{
domtext *This = impl_from_IXMLDOMText( iface );
return IXMLDOMNode_get_baseName( IXMLDOMNode_from_impl(&This->node), p );
TRACE("(%p)->(%p)\n", This, name);
return return_null_bstr( name );
}
static HRESULT WINAPI domtext_transformNodeToObject(
......
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