From 1e998bfc3f14ccfc9ee1b250d1a6a9c18bca3541 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Sun, 31 Oct 2010 12:39:53 +0300 Subject: [PATCH] msxml3: Get rid of ::get_baseName() forward. --- dlls/msxml3/attribute.c | 5 +++-- dlls/msxml3/cdata.c | 5 +++-- dlls/msxml3/comment.c | 5 +++-- dlls/msxml3/docfrag.c | 5 +++-- dlls/msxml3/domdoc.c | 5 +++-- dlls/msxml3/element.c | 5 +++-- dlls/msxml3/entityref.c | 5 +++-- dlls/msxml3/msxml_private.h | 1 + dlls/msxml3/node.c | 38 +++++++------------------------------ dlls/msxml3/pi.c | 5 +++-- dlls/msxml3/text.c | 5 +++-- 11 files changed, 35 insertions(+), 49 deletions(-) diff --git a/dlls/msxml3/attribute.c b/dlls/msxml3/attribute.c index c9a2cc753d8..34cc007150f 100644 --- a/dlls/msxml3/attribute.c +++ b/dlls/msxml3/attribute.c @@ -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( diff --git a/dlls/msxml3/cdata.c b/dlls/msxml3/cdata.c index e62a7d62fac..d602bfa8fc5 100644 --- a/dlls/msxml3/cdata.c +++ b/dlls/msxml3/cdata.c @@ -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( diff --git a/dlls/msxml3/comment.c b/dlls/msxml3/comment.c index b74963878f7..5402a543c2d 100644 --- a/dlls/msxml3/comment.c +++ b/dlls/msxml3/comment.c @@ -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( diff --git a/dlls/msxml3/docfrag.c b/dlls/msxml3/docfrag.c index 2c0ad817cd4..792298cf9c7 100644 --- a/dlls/msxml3/docfrag.c +++ b/dlls/msxml3/docfrag.c @@ -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( diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c index b70acd4380f..500bde8ceb4 100644 --- a/dlls/msxml3/domdoc.c +++ b/dlls/msxml3/domdoc.c @@ -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 ); } diff --git a/dlls/msxml3/element.c b/dlls/msxml3/element.c index fd49874fb0f..418307eb6a2 100644 --- a/dlls/msxml3/element.c +++ b/dlls/msxml3/element.c @@ -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( diff --git a/dlls/msxml3/entityref.c b/dlls/msxml3/entityref.c index fae2a2c1802..308b9ce56c1 100644 --- a/dlls/msxml3/entityref.c +++ b/dlls/msxml3/entityref.c @@ -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( diff --git a/dlls/msxml3/msxml_private.h b/dlls/msxml3/msxml_private.h index 8ae84cf6bd7..3d7903cd68f 100644 --- a/dlls/msxml3/msxml_private.h +++ b/dlls/msxml3/msxml_private.h @@ -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); diff --git a/dlls/msxml3/node.c b/dlls/msxml3/node.c index 3b2ce35c9be..3bb09700ee4 100644 --- a/dlls/msxml3/node.c +++ b/dlls/msxml3/node.c @@ -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; + if (!name) return E_INVALIDARG; - TRACE("(%p)->(%p)\n", This, nameString ); + *name = bstr_from_xmlChar(This->node->name); + if (!*name) return E_OUTOFMEMORY; - if ( !nameString ) - return E_INVALIDARG; + TRACE("returning %s\n", debugstr_w(*name)); - 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; - } - - TRACE("returning %08x str = %s\n", r, debugstr_w( str ) ); - - *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, }; diff --git a/dlls/msxml3/pi.c b/dlls/msxml3/pi.c index 2158c132dc1..44ccb965e87 100644 --- a/dlls/msxml3/pi.c +++ b/dlls/msxml3/pi.c @@ -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( diff --git a/dlls/msxml3/text.c b/dlls/msxml3/text.c index 0fd8b4256cf..47bb1f057ee 100644 --- a/dlls/msxml3/text.c +++ b/dlls/msxml3/text.c @@ -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(