From aac690d4fc425ff91a3a02857420fdc35c51966c Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Wed, 23 Feb 2011 14:44:20 +0300 Subject: [PATCH] msxml3: Remove selectSingleNode() forward. --- dlls/msxml3/attribute.c | 3 ++- dlls/msxml3/cdata.c | 3 ++- dlls/msxml3/comment.c | 3 ++- dlls/msxml3/docfrag.c | 3 ++- dlls/msxml3/domdoc.c | 7 ++++--- dlls/msxml3/element.c | 3 ++- dlls/msxml3/entityref.c | 3 ++- dlls/msxml3/msxml_private.h | 1 + dlls/msxml3/node.c | 22 ++++++++-------------- dlls/msxml3/pi.c | 3 ++- dlls/msxml3/text.c | 3 ++- 11 files changed, 29 insertions(+), 25 deletions(-) diff --git a/dlls/msxml3/attribute.c b/dlls/msxml3/attribute.c index a2775b354a9..332c2567e36 100644 --- a/dlls/msxml3/attribute.c +++ b/dlls/msxml3/attribute.c @@ -498,7 +498,8 @@ static HRESULT WINAPI domattr_selectSingleNode( BSTR p, IXMLDOMNode** outNode) { domattr *This = impl_from_IXMLDOMAttribute( iface ); - return IXMLDOMNode_selectSingleNode( &This->node.IXMLDOMNode_iface, p, outNode ); + TRACE("(%p)->(%s %p)\n", This, debugstr_w(p), outNode); + return node_select_singlenode(&This->node, p, outNode); } static HRESULT WINAPI domattr_get_parsed( diff --git a/dlls/msxml3/cdata.c b/dlls/msxml3/cdata.c index 7dc72a4a8b1..0a5f631b876 100644 --- a/dlls/msxml3/cdata.c +++ b/dlls/msxml3/cdata.c @@ -508,7 +508,8 @@ static HRESULT WINAPI domcdata_selectSingleNode( BSTR p, IXMLDOMNode** outNode) { domcdata *This = impl_from_IXMLDOMCDATASection( iface ); - return IXMLDOMNode_selectSingleNode( &This->node.IXMLDOMNode_iface, p, outNode ); + TRACE("(%p)->(%s %p)\n", This, debugstr_w(p), outNode); + return node_select_singlenode(&This->node, p, outNode); } static HRESULT WINAPI domcdata_get_parsed( diff --git a/dlls/msxml3/comment.c b/dlls/msxml3/comment.c index 378379d4547..4724ba3555d 100644 --- a/dlls/msxml3/comment.c +++ b/dlls/msxml3/comment.c @@ -501,7 +501,8 @@ static HRESULT WINAPI domcomment_selectSingleNode( BSTR p, IXMLDOMNode** outNode) { domcomment *This = impl_from_IXMLDOMComment( iface ); - return IXMLDOMNode_selectSingleNode( &This->node.IXMLDOMNode_iface, p, outNode ); + TRACE("(%p)->(%s %p)\n", This, debugstr_w(p), outNode); + return node_select_singlenode(&This->node, p, outNode); } static HRESULT WINAPI domcomment_get_parsed( diff --git a/dlls/msxml3/docfrag.c b/dlls/msxml3/docfrag.c index bf480d65501..cf0129631f8 100644 --- a/dlls/msxml3/docfrag.c +++ b/dlls/msxml3/docfrag.c @@ -505,7 +505,8 @@ static HRESULT WINAPI domfrag_selectSingleNode( BSTR p, IXMLDOMNode** outNode) { domfrag *This = impl_from_IXMLDOMDocumentFragment( iface ); - return IXMLDOMNode_selectSingleNode( &This->node.IXMLDOMNode_iface, p, outNode ); + TRACE("(%p)->(%s %p)\n", This, debugstr_w(p), outNode); + return node_select_singlenode(&This->node, p, outNode); } static HRESULT WINAPI domfrag_get_parsed( diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c index 34639136bbc..3c51e4fef6c 100644 --- a/dlls/msxml3/domdoc.c +++ b/dlls/msxml3/domdoc.c @@ -1453,11 +1453,12 @@ static HRESULT WINAPI domdoc_selectNodes( static HRESULT WINAPI domdoc_selectSingleNode( IXMLDOMDocument3 *iface, - BSTR queryString, - IXMLDOMNode** resultNode ) + BSTR p, + IXMLDOMNode **outNode) { domdoc *This = impl_from_IXMLDOMDocument3( iface ); - return IXMLDOMNode_selectSingleNode( &This->node.IXMLDOMNode_iface, queryString, resultNode ); + TRACE("(%p)->(%s %p)\n", This, debugstr_w(p), outNode); + return node_select_singlenode(&This->node, p, outNode); } diff --git a/dlls/msxml3/element.c b/dlls/msxml3/element.c index bbcc302e1dd..e0091766d6f 100644 --- a/dlls/msxml3/element.c +++ b/dlls/msxml3/element.c @@ -957,7 +957,8 @@ static HRESULT WINAPI domelem_selectSingleNode( BSTR p, IXMLDOMNode** outNode) { domelem *This = impl_from_IXMLDOMElement( iface ); - return IXMLDOMNode_selectSingleNode( &This->node.IXMLDOMNode_iface, p, outNode ); + TRACE("(%p)->(%s %p)\n", This, debugstr_w(p), outNode); + return node_select_singlenode(&This->node, p, outNode); } static HRESULT WINAPI domelem_get_parsed( diff --git a/dlls/msxml3/entityref.c b/dlls/msxml3/entityref.c index 2c23c66c7ba..2e250bb78e5 100644 --- a/dlls/msxml3/entityref.c +++ b/dlls/msxml3/entityref.c @@ -499,7 +499,8 @@ static HRESULT WINAPI entityref_selectSingleNode( BSTR p, IXMLDOMNode** outNode) { entityref *This = impl_from_IXMLDOMEntityReference( iface ); - return IXMLDOMNode_selectSingleNode( &This->node.IXMLDOMNode_iface, p, outNode ); + TRACE("(%p)->(%s %p)\n", This, debugstr_w(p), outNode); + return node_select_singlenode(&This->node, p, outNode); } static HRESULT WINAPI entityref_get_parsed( diff --git a/dlls/msxml3/msxml_private.h b/dlls/msxml3/msxml_private.h index fdf4575a9db..f8241e26095 100644 --- a/dlls/msxml3/msxml_private.h +++ b/dlls/msxml3/msxml_private.h @@ -269,6 +269,7 @@ extern HRESULT node_has_childnodes(const xmlnode*,VARIANT_BOOL*); extern HRESULT node_get_owner_doc(const xmlnode*,IXMLDOMDocument**); extern HRESULT node_get_text(const xmlnode*,BSTR*); extern HRESULT node_select_nodes(const xmlnode*,BSTR,IXMLDOMNodeList**); +extern HRESULT node_select_singlenode(const xmlnode*,BSTR,IXMLDOMNode**); extern HRESULT get_domdoc_from_xmldoc(xmlDocPtr xmldoc, IXMLDOMDocument3 **document); diff --git a/dlls/msxml3/node.c b/dlls/msxml3/node.c index 6ea3250ee92..e2f50b5c225 100644 --- a/dlls/msxml3/node.c +++ b/dlls/msxml3/node.c @@ -1046,24 +1046,18 @@ HRESULT node_select_nodes(const xmlnode *This, BSTR query, IXMLDOMNodeList **nod return hr; } -static HRESULT WINAPI xmlnode_selectSingleNode( - IXMLDOMNode *iface, - BSTR queryString, - IXMLDOMNode** resultNode) +HRESULT node_select_singlenode(const xmlnode *This, BSTR query, IXMLDOMNode **node) { - xmlnode *This = impl_from_IXMLDOMNode( iface ); IXMLDOMNodeList *list; - HRESULT r; + HRESULT hr; - TRACE("(%p)->(%s %p)\n", This, debugstr_w(queryString), resultNode ); - - r = IXMLDOMNode_selectNodes(This->iface, queryString, &list); - if(r == S_OK) + hr = node_select_nodes(This, query, &list); + if (hr == S_OK) { - r = IXMLDOMNodeList_nextNode(list, resultNode); + hr = IXMLDOMNodeList_nextNode(list, node); IXMLDOMNodeList_Release(list); } - return r; + return hr; } HRESULT node_get_namespaceURI(xmlnode *This, BSTR *namespaceURI) @@ -1156,7 +1150,7 @@ static const struct IXMLDOMNodeVtbl xmlnode_vtbl = NULL, xmlnode_transformNode, NULL, - xmlnode_selectSingleNode + NULL }; void destroy_xmlnode(xmlnode *This) @@ -1634,7 +1628,7 @@ static HRESULT WINAPI unknode_selectSingleNode( BSTR p, IXMLDOMNode** outNode) { unknode *This = unknode_from_IXMLDOMNode( iface ); - return IXMLDOMNode_selectSingleNode( &This->node.IXMLDOMNode_iface, p, outNode ); + return node_select_singlenode(&This->node, p, outNode); } static HRESULT WINAPI unknode_get_parsed( diff --git a/dlls/msxml3/pi.c b/dlls/msxml3/pi.c index 27c41c1ebff..72e0d819f02 100644 --- a/dlls/msxml3/pi.c +++ b/dlls/msxml3/pi.c @@ -516,7 +516,8 @@ static HRESULT WINAPI dom_pi_selectSingleNode( BSTR p, IXMLDOMNode** outNode) { dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); - return IXMLDOMNode_selectSingleNode( &This->node.IXMLDOMNode_iface, p, outNode ); + TRACE("(%p)->(%s %p)\n", This, debugstr_w(p), outNode); + return node_select_singlenode(&This->node, p, outNode); } static HRESULT WINAPI dom_pi_get_parsed( diff --git a/dlls/msxml3/text.c b/dlls/msxml3/text.c index ca11387152b..cc0b8299f43 100644 --- a/dlls/msxml3/text.c +++ b/dlls/msxml3/text.c @@ -586,7 +586,8 @@ static HRESULT WINAPI domtext_selectSingleNode( BSTR p, IXMLDOMNode** outNode) { domtext *This = impl_from_IXMLDOMText( iface ); - return IXMLDOMNode_selectSingleNode( &This->node.IXMLDOMNode_iface, p, outNode ); + TRACE("(%p)->(%s %p)\n", This, debugstr_w(p), outNode); + return node_select_singlenode(&This->node, p, outNode); } static HRESULT WINAPI domtext_get_parsed(