Commit b2214981 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

msxml3: Get rid of ::put_text() forward to IXMLDOMNode interface.

parent 0f19df8b
...@@ -385,7 +385,8 @@ static HRESULT WINAPI domattr_put_text( ...@@ -385,7 +385,8 @@ static HRESULT WINAPI domattr_put_text(
BSTR p) BSTR p)
{ {
domattr *This = impl_from_IXMLDOMAttribute( iface ); domattr *This = impl_from_IXMLDOMAttribute( iface );
return IXMLDOMNode_put_text( IXMLDOMNode_from_impl(&This->node), p ); TRACE("(%p)->(%s)\n", This, debugstr_w(p));
return node_put_text( &This->node, p );
} }
static HRESULT WINAPI domattr_get_specified( static HRESULT WINAPI domattr_get_specified(
......
...@@ -396,7 +396,8 @@ static HRESULT WINAPI domcdata_put_text( ...@@ -396,7 +396,8 @@ static HRESULT WINAPI domcdata_put_text(
BSTR p) BSTR p)
{ {
domcdata *This = impl_from_IXMLDOMCDATASection( iface ); domcdata *This = impl_from_IXMLDOMCDATASection( iface );
return IXMLDOMNode_put_text( IXMLDOMNode_from_impl(&This->node), p ); TRACE("(%p)->(%p)\n", This, debugstr_w(p));
return node_put_text( &This->node, p );
} }
static HRESULT WINAPI domcdata_get_specified( static HRESULT WINAPI domcdata_get_specified(
......
...@@ -389,7 +389,8 @@ static HRESULT WINAPI domcomment_put_text( ...@@ -389,7 +389,8 @@ static HRESULT WINAPI domcomment_put_text(
BSTR p) BSTR p)
{ {
domcomment *This = impl_from_IXMLDOMComment( iface ); domcomment *This = impl_from_IXMLDOMComment( iface );
return IXMLDOMNode_put_text( IXMLDOMNode_from_impl(&This->node), p ); TRACE("(%p)->(%s)\n", This, debugstr_w(p));
return node_put_text( &This->node, p );
} }
static HRESULT WINAPI domcomment_get_specified( static HRESULT WINAPI domcomment_get_specified(
......
...@@ -393,7 +393,8 @@ static HRESULT WINAPI domfrag_put_text( ...@@ -393,7 +393,8 @@ static HRESULT WINAPI domfrag_put_text(
BSTR p) BSTR p)
{ {
domfrag *This = impl_from_IXMLDOMDocumentFragment( iface ); domfrag *This = impl_from_IXMLDOMDocumentFragment( iface );
return IXMLDOMNode_put_text( IXMLDOMNode_from_impl(&This->node), p ); TRACE("(%p)->(%s)\n", This, debugstr_w(p));
return node_put_text( &This->node, p );
} }
static HRESULT WINAPI domfrag_get_specified( static HRESULT WINAPI domfrag_get_specified(
......
...@@ -1113,7 +1113,8 @@ static HRESULT WINAPI domdoc_put_text( ...@@ -1113,7 +1113,8 @@ static HRESULT WINAPI domdoc_put_text(
BSTR text ) BSTR text )
{ {
domdoc *This = impl_from_IXMLDOMDocument3( iface ); domdoc *This = impl_from_IXMLDOMDocument3( iface );
return IXMLDOMNode_put_text( IXMLDOMNode_from_impl(&This->node), text ); TRACE("(%p)->(%s)\n", This, debugstr_w(text));
return E_FAIL;
} }
......
...@@ -401,7 +401,8 @@ static HRESULT WINAPI domelem_put_text( ...@@ -401,7 +401,8 @@ static HRESULT WINAPI domelem_put_text(
BSTR p) BSTR p)
{ {
domelem *This = impl_from_IXMLDOMElement( iface ); domelem *This = impl_from_IXMLDOMElement( iface );
return IXMLDOMNode_put_text( IXMLDOMNode_from_impl(&This->node), p ); TRACE("(%p)->(%s)\n", This, debugstr_w(p));
return node_put_text( &This->node, p );
} }
static HRESULT WINAPI domelem_get_specified( static HRESULT WINAPI domelem_get_specified(
......
...@@ -387,7 +387,8 @@ static HRESULT WINAPI entityref_put_text( ...@@ -387,7 +387,8 @@ static HRESULT WINAPI entityref_put_text(
BSTR p) BSTR p)
{ {
entityref *This = impl_from_IXMLDOMEntityReference( iface ); entityref *This = impl_from_IXMLDOMEntityReference( iface );
return IXMLDOMNode_put_text( IXMLDOMNode_from_impl(&This->node), p ); TRACE("(%p)->(%s)\n", This, debugstr_w(p));
return node_put_text( &This->node, p );
} }
static HRESULT WINAPI entityref_get_specified( static HRESULT WINAPI entityref_get_specified(
......
...@@ -171,6 +171,7 @@ extern HRESULT node_get_previous_sibling(xmlnode*,IXMLDOMNode**); ...@@ -171,6 +171,7 @@ extern HRESULT node_get_previous_sibling(xmlnode*,IXMLDOMNode**);
extern HRESULT node_get_next_sibling(xmlnode*,IXMLDOMNode**); extern HRESULT node_get_next_sibling(xmlnode*,IXMLDOMNode**);
extern HRESULT node_insert_before(xmlnode*,IXMLDOMNode*,const VARIANT*,IXMLDOMNode**); extern HRESULT node_insert_before(xmlnode*,IXMLDOMNode*,const VARIANT*,IXMLDOMNode**);
extern HRESULT node_replace_child(xmlnode*,IXMLDOMNode*,IXMLDOMNode*,IXMLDOMNode**); extern HRESULT node_replace_child(xmlnode*,IXMLDOMNode*,IXMLDOMNode*,IXMLDOMNode**);
extern HRESULT node_put_text(xmlnode*,BSTR);
extern HRESULT DOMDocument_create_from_xmldoc(xmlDocPtr xmldoc, IXMLDOMDocument3 **document); extern HRESULT DOMDocument_create_from_xmldoc(xmlDocPtr xmldoc, IXMLDOMDocument3 **document);
......
...@@ -745,23 +745,12 @@ static HRESULT WINAPI xmlnode_get_text( ...@@ -745,23 +745,12 @@ static HRESULT WINAPI xmlnode_get_text(
return S_OK; return S_OK;
} }
static HRESULT WINAPI xmlnode_put_text( HRESULT node_put_text(xmlnode *This, BSTR text)
IXMLDOMNode *iface,
BSTR text)
{ {
xmlnode *This = impl_from_IXMLDOMNode( iface );
xmlChar *str, *str2; xmlChar *str, *str2;
TRACE("(%p)->(%s)\n", This, debugstr_w(text)); TRACE("(%p)->(%s)\n", This, debugstr_w(text));
switch(This->node->type)
{
case XML_DOCUMENT_NODE:
return E_FAIL;
default:
break;
}
str = xmlChar_from_wchar(text); str = xmlChar_from_wchar(text);
/* Escape the string. */ /* Escape the string. */
...@@ -774,6 +763,14 @@ static HRESULT WINAPI xmlnode_put_text( ...@@ -774,6 +763,14 @@ static HRESULT WINAPI xmlnode_put_text(
return S_OK; return S_OK;
} }
static HRESULT WINAPI xmlnode_put_text(
IXMLDOMNode *iface,
BSTR text)
{
ERR("Should not be called\n");
return E_NOTIMPL;
}
static HRESULT WINAPI xmlnode_get_specified( static HRESULT WINAPI xmlnode_get_specified(
IXMLDOMNode *iface, IXMLDOMNode *iface,
VARIANT_BOOL* isSpecified) VARIANT_BOOL* isSpecified)
......
...@@ -403,7 +403,8 @@ static HRESULT WINAPI dom_pi_put_text( ...@@ -403,7 +403,8 @@ static HRESULT WINAPI dom_pi_put_text(
BSTR p) BSTR p)
{ {
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
return IXMLDOMNode_put_text( IXMLDOMNode_from_impl(&This->node), p ); TRACE("(%p)->(%s)\n", This, debugstr_w(p));
return node_put_text( &This->node, p );
} }
static HRESULT WINAPI dom_pi_get_specified( static HRESULT WINAPI dom_pi_get_specified(
......
...@@ -402,7 +402,8 @@ static HRESULT WINAPI domtext_put_text( ...@@ -402,7 +402,8 @@ static HRESULT WINAPI domtext_put_text(
BSTR p) BSTR p)
{ {
domtext *This = impl_from_IXMLDOMText( iface ); domtext *This = impl_from_IXMLDOMText( iface );
return IXMLDOMNode_put_text( IXMLDOMNode_from_impl(&This->node), p ); TRACE("(%p)->(%s)\n", This, debugstr_w(p));
return node_put_text( &This->node, p );
} }
static HRESULT WINAPI domtext_get_specified( static HRESULT WINAPI domtext_get_specified(
......
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