Commit 27b4f11c authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

msxml3: Use xmlnode child object's IXMLDOMNode implementation as base interface.

The plan is to get rid of IXMLDOMNode interface in xmlnode object and use proper inheritance.
parent 8a82ae66
...@@ -58,15 +58,12 @@ static HRESULT WINAPI domattr_QueryInterface( ...@@ -58,15 +58,12 @@ static HRESULT WINAPI domattr_QueryInterface(
TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject); TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject);
if ( IsEqualGUID( riid, &IID_IXMLDOMAttribute ) || if ( IsEqualGUID( riid, &IID_IXMLDOMAttribute ) ||
IsEqualGUID( riid, &IID_IXMLDOMNode ) ||
IsEqualGUID( riid, &IID_IDispatch ) || IsEqualGUID( riid, &IID_IDispatch ) ||
IsEqualGUID( riid, &IID_IUnknown ) ) IsEqualGUID( riid, &IID_IUnknown ) )
{ {
*ppvObject = iface; *ppvObject = iface;
} }
else if ( IsEqualGUID( riid, &IID_IXMLDOMNode ) )
{
*ppvObject = IXMLDOMNode_from_impl(&This->node);
}
else if(node_query_interface(&This->node, riid, ppvObject)) else if(node_query_interface(&This->node, riid, ppvObject))
{ {
return *ppvObject ? S_OK : E_NOINTERFACE; return *ppvObject ? S_OK : E_NOINTERFACE;
......
...@@ -59,15 +59,12 @@ static HRESULT WINAPI domcdata_QueryInterface( ...@@ -59,15 +59,12 @@ static HRESULT WINAPI domcdata_QueryInterface(
if ( IsEqualGUID( riid, &IID_IXMLDOMCDATASection ) || if ( IsEqualGUID( riid, &IID_IXMLDOMCDATASection ) ||
IsEqualGUID( riid, &IID_IXMLDOMCharacterData) || IsEqualGUID( riid, &IID_IXMLDOMCharacterData) ||
IsEqualGUID( riid, &IID_IXMLDOMNode ) ||
IsEqualGUID( riid, &IID_IDispatch ) || IsEqualGUID( riid, &IID_IDispatch ) ||
IsEqualGUID( riid, &IID_IUnknown ) ) IsEqualGUID( riid, &IID_IUnknown ) )
{ {
*ppvObject = iface; *ppvObject = iface;
} }
else if ( IsEqualGUID( riid, &IID_IXMLDOMNode ) )
{
*ppvObject = IXMLDOMNode_from_impl(&This->node);
}
else if ( IsEqualGUID( riid, &IID_IXMLDOMText ) || else if ( IsEqualGUID( riid, &IID_IXMLDOMText ) ||
IsEqualGUID( riid, &IID_IXMLDOMElement ) ) IsEqualGUID( riid, &IID_IXMLDOMElement ) )
{ {
...@@ -483,14 +480,13 @@ static HRESULT WINAPI domcdata_get_data( ...@@ -483,14 +480,13 @@ static HRESULT WINAPI domcdata_get_data(
IXMLDOMCDATASection *iface, IXMLDOMCDATASection *iface,
BSTR *p) BSTR *p)
{ {
domcdata *This = impl_from_IXMLDOMCDATASection( iface );
HRESULT hr; HRESULT hr;
VARIANT vRet; VARIANT vRet;
if(!p) if(!p)
return E_INVALIDARG; return E_INVALIDARG;
hr = IXMLDOMNode_get_nodeValue( IXMLDOMNode_from_impl(&This->node), &vRet ); hr = IXMLDOMCDATASection_get_nodeValue( iface, &vRet );
if(hr == S_OK) if(hr == S_OK)
{ {
*p = V_BSTR(&vRet); *p = V_BSTR(&vRet);
...@@ -511,7 +507,7 @@ static HRESULT WINAPI domcdata_put_data( ...@@ -511,7 +507,7 @@ static HRESULT WINAPI domcdata_put_data(
V_VT(&val) = VT_BSTR; V_VT(&val) = VT_BSTR;
V_BSTR(&val) = data; V_BSTR(&val) = data;
return IXMLDOMNode_put_nodeValue( IXMLDOMNode_from_impl(&This->node), val ); return IXMLDOMCDATASection_put_nodeValue( iface, val );
} }
static HRESULT WINAPI domcdata_get_length( static HRESULT WINAPI domcdata_get_length(
......
...@@ -59,15 +59,12 @@ static HRESULT WINAPI domcomment_QueryInterface( ...@@ -59,15 +59,12 @@ static HRESULT WINAPI domcomment_QueryInterface(
if ( IsEqualGUID( riid, &IID_IXMLDOMComment ) || if ( IsEqualGUID( riid, &IID_IXMLDOMComment ) ||
IsEqualGUID( riid, &IID_IXMLDOMCharacterData) || IsEqualGUID( riid, &IID_IXMLDOMCharacterData) ||
IsEqualGUID( riid, &IID_IXMLDOMNode ) ||
IsEqualGUID( riid, &IID_IDispatch ) || IsEqualGUID( riid, &IID_IDispatch ) ||
IsEqualGUID( riid, &IID_IUnknown ) ) IsEqualGUID( riid, &IID_IUnknown ) )
{ {
*ppvObject = iface; *ppvObject = iface;
} }
else if ( IsEqualGUID( riid, &IID_IXMLDOMNode ) )
{
*ppvObject = IXMLDOMNode_from_impl(&This->node);
}
else if(node_query_interface(&This->node, riid, ppvObject)) else if(node_query_interface(&This->node, riid, ppvObject))
{ {
return *ppvObject ? S_OK : E_NOINTERFACE; return *ppvObject ? S_OK : E_NOINTERFACE;
...@@ -486,7 +483,7 @@ static HRESULT WINAPI domcomment_get_data( ...@@ -486,7 +483,7 @@ static HRESULT WINAPI domcomment_get_data(
if(!p) if(!p)
return E_INVALIDARG; return E_INVALIDARG;
hr = IXMLDOMNode_get_nodeValue( IXMLDOMNode_from_impl(&This->node), &vRet ); hr = IXMLDOMComment_get_nodeValue( iface, &vRet );
if(hr == S_OK) if(hr == S_OK)
{ {
*p = V_BSTR(&vRet); *p = V_BSTR(&vRet);
......
...@@ -58,15 +58,12 @@ static HRESULT WINAPI domfrag_QueryInterface( ...@@ -58,15 +58,12 @@ static HRESULT WINAPI domfrag_QueryInterface(
TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject); TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject);
if ( IsEqualGUID( riid, &IID_IXMLDOMDocumentFragment ) || if ( IsEqualGUID( riid, &IID_IXMLDOMDocumentFragment ) ||
IsEqualGUID( riid, &IID_IXMLDOMNode ) ||
IsEqualGUID( riid, &IID_IDispatch ) || IsEqualGUID( riid, &IID_IDispatch ) ||
IsEqualGUID( riid, &IID_IUnknown ) ) IsEqualGUID( riid, &IID_IUnknown ) )
{ {
*ppvObject = iface; *ppvObject = iface;
} }
else if ( IsEqualGUID( riid, &IID_IXMLDOMNode ) )
{
*ppvObject = IXMLDOMNode_from_impl(&This->node);
}
else if(node_query_interface(&This->node, riid, ppvObject)) else if(node_query_interface(&This->node, riid, ppvObject))
{ {
return *ppvObject ? S_OK : E_NOINTERFACE; return *ppvObject ? S_OK : E_NOINTERFACE;
......
...@@ -425,7 +425,7 @@ static HRESULT WINAPI domdoc_IPersistStreamInit_Save( ...@@ -425,7 +425,7 @@ static HRESULT WINAPI domdoc_IPersistStreamInit_Save(
TRACE("(%p)->(%p %d)\n", This, stream, clr_dirty); TRACE("(%p)->(%p %d)\n", This, stream, clr_dirty);
hr = IXMLDOMNode_get_xml( IXMLDOMNode_from_impl(&This->node), &xmlString ); hr = IXMLDOMDocument3_get_xml( (IXMLDOMDocument3*)&This->lpVtbl, &xmlString );
if(hr == S_OK) if(hr == S_OK)
{ {
DWORD len = SysStringLen(xmlString) * sizeof(WCHAR); DWORD len = SysStringLen(xmlString) * sizeof(WCHAR);
...@@ -518,16 +518,13 @@ static HRESULT WINAPI domdoc_QueryInterface( IXMLDOMDocument3 *iface, REFIID rii ...@@ -518,16 +518,13 @@ static HRESULT WINAPI domdoc_QueryInterface( IXMLDOMDocument3 *iface, REFIID rii
if ( IsEqualGUID( riid, &IID_IUnknown ) || if ( IsEqualGUID( riid, &IID_IUnknown ) ||
IsEqualGUID( riid, &IID_IDispatch ) || IsEqualGUID( riid, &IID_IDispatch ) ||
IsEqualGUID( riid, &IID_IXMLDOMNode ) ||
IsEqualGUID( riid, &IID_IXMLDOMDocument ) || IsEqualGUID( riid, &IID_IXMLDOMDocument ) ||
IsEqualGUID( riid, &IID_IXMLDOMDocument2 )|| IsEqualGUID( riid, &IID_IXMLDOMDocument2 )||
IsEqualGUID( riid, &IID_IXMLDOMDocument3 )) IsEqualGUID( riid, &IID_IXMLDOMDocument3 ))
{ {
*ppvObject = iface; *ppvObject = iface;
} }
else if ( IsEqualGUID( riid, &IID_IXMLDOMNode ) )
{
*ppvObject = IXMLDOMNode_from_impl(&This->node);
}
else if (IsEqualGUID(&IID_IPersistStream, riid) || else if (IsEqualGUID(&IID_IPersistStream, riid) ||
IsEqualGUID(&IID_IPersistStreamInit, riid)) IsEqualGUID(&IID_IPersistStreamInit, riid))
{ {
...@@ -1284,12 +1281,14 @@ static HRESULT WINAPI domdoc_createProcessingInstruction( ...@@ -1284,12 +1281,14 @@ static HRESULT WINAPI domdoc_createProcessingInstruction(
if (hr == S_OK) if (hr == S_OK)
{ {
VARIANT v_data; VARIANT v_data;
xmlnode *node_obj;
/* this is to bypass check in ::put_data() that blocks "<?xml" PIs */ /* this is to bypass check in ::put_data() that blocks "<?xml" PIs */
node_obj = get_node_obj(node);
V_VT(&v_data) = VT_BSTR; V_VT(&v_data) = VT_BSTR;
V_BSTR(&v_data) = data; V_BSTR(&v_data) = data;
hr = IXMLDOMNode_put_nodeValue( node, v_data ); hr = IXMLDOMNode_put_nodeValue( IXMLDOMNode_from_impl(node_obj), v_data );
IXMLDOMNode_QueryInterface(node, &IID_IXMLDOMProcessingInstruction, (void**)pi); IXMLDOMNode_QueryInterface(node, &IID_IXMLDOMProcessingInstruction, (void**)pi);
IXMLDOMNode_Release(node); IXMLDOMNode_Release(node);
......
...@@ -65,15 +65,12 @@ static HRESULT WINAPI domelem_QueryInterface( ...@@ -65,15 +65,12 @@ static HRESULT WINAPI domelem_QueryInterface(
TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject); TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject);
if ( IsEqualGUID( riid, &IID_IXMLDOMElement ) || if ( IsEqualGUID( riid, &IID_IXMLDOMElement ) ||
IsEqualGUID( riid, &IID_IXMLDOMNode ) ||
IsEqualGUID( riid, &IID_IDispatch ) || IsEqualGUID( riid, &IID_IDispatch ) ||
IsEqualGUID( riid, &IID_IUnknown ) ) IsEqualGUID( riid, &IID_IUnknown ) )
{ {
*ppvObject = &This->lpVtbl; *ppvObject = &This->lpVtbl;
} }
else if ( IsEqualGUID( riid, &IID_IXMLDOMNode ) )
{
*ppvObject = IXMLDOMNode_from_impl(&This->node);
}
else if(node_query_interface(&This->node, riid, ppvObject)) else if(node_query_interface(&This->node, riid, ppvObject))
{ {
return *ppvObject ? S_OK : E_NOINTERFACE; return *ppvObject ? S_OK : E_NOINTERFACE;
......
...@@ -58,15 +58,12 @@ static HRESULT WINAPI entityref_QueryInterface( ...@@ -58,15 +58,12 @@ static HRESULT WINAPI entityref_QueryInterface(
TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject); TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject);
if ( IsEqualGUID( riid, &IID_IXMLDOMEntityReference ) || if ( IsEqualGUID( riid, &IID_IXMLDOMEntityReference ) ||
IsEqualGUID( riid, &IID_IXMLDOMNode ) ||
IsEqualGUID( riid, &IID_IDispatch ) || IsEqualGUID( riid, &IID_IDispatch ) ||
IsEqualGUID( riid, &IID_IUnknown ) ) IsEqualGUID( riid, &IID_IUnknown ) )
{ {
*ppvObject = iface; *ppvObject = iface;
} }
else if ( IsEqualGUID( riid, &IID_IXMLDOMNode ) )
{
*ppvObject = IXMLDOMNode_from_impl(&This->node);
}
else if(node_query_interface(&This->node, riid, ppvObject)) else if(node_query_interface(&This->node, riid, ppvObject))
{ {
return *ppvObject ? S_OK : E_NOINTERFACE; return *ppvObject ? S_OK : E_NOINTERFACE;
......
...@@ -115,55 +115,30 @@ static HRESULT WINAPI xmlnode_QueryInterface( ...@@ -115,55 +115,30 @@ static HRESULT WINAPI xmlnode_QueryInterface(
REFIID riid, REFIID riid,
void** ppvObject ) void** ppvObject )
{ {
xmlnode *This = impl_from_IXMLDOMNode( iface ); ERR("Should not be called\n");
TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject);
if(This->iface)
return IXMLDOMNode_QueryInterface(This->iface, riid, ppvObject);
if (IsEqualGUID(riid, &IID_IUnknown)) {
*ppvObject = iface;
}else if (IsEqualGUID( riid, &IID_IDispatch) ||
IsEqualGUID( riid, &IID_IXMLDOMNode)) {
*ppvObject = &This->lpVtbl;
}else if(node_query_interface(This, riid, ppvObject)) {
return *ppvObject ? S_OK : E_NOINTERFACE;
}else {
FIXME("interface %s not implemented\n", debugstr_guid(riid));
*ppvObject = NULL;
return E_NOINTERFACE; return E_NOINTERFACE;
}
IUnknown_AddRef( (IUnknown*)*ppvObject );
return S_OK;
} }
static ULONG WINAPI xmlnode_AddRef( static ULONG WINAPI xmlnode_AddRef(
IXMLDOMNode *iface ) IXMLDOMNode *iface )
{ {
xmlnode *This = impl_from_IXMLDOMNode( iface ); ERR("Should not be called\n");
return IXMLDOMNode_AddRef(This->iface); return 2;
} }
static ULONG WINAPI xmlnode_Release( static ULONG WINAPI xmlnode_Release(
IXMLDOMNode *iface ) IXMLDOMNode *iface )
{ {
xmlnode *This = impl_from_IXMLDOMNode( iface ); ERR("Should not be called\n");
return IXMLDOMNode_Release(This->iface); return 1;
} }
static HRESULT WINAPI xmlnode_GetTypeInfoCount( static HRESULT WINAPI xmlnode_GetTypeInfoCount(
IXMLDOMNode *iface, IXMLDOMNode *iface,
UINT* pctinfo ) UINT* pctinfo )
{ {
xmlnode *This = impl_from_IXMLDOMNode( iface ); ERR("Should not be called\n");
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, pctinfo);
*pctinfo = 1;
return S_OK;
} }
static HRESULT WINAPI xmlnode_GetTypeInfo( static HRESULT WINAPI xmlnode_GetTypeInfo(
...@@ -172,14 +147,8 @@ static HRESULT WINAPI xmlnode_GetTypeInfo( ...@@ -172,14 +147,8 @@ static HRESULT WINAPI xmlnode_GetTypeInfo(
LCID lcid, LCID lcid,
ITypeInfo** ppTInfo ) ITypeInfo** ppTInfo )
{ {
xmlnode *This = impl_from_IXMLDOMNode( iface ); ERR("Should not be called\n");
HRESULT hr; return E_NOTIMPL;
TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
hr = get_typeinfo(IXMLDOMNode_tid, ppTInfo);
return hr;
} }
static HRESULT WINAPI xmlnode_GetIDsOfNames( static HRESULT WINAPI xmlnode_GetIDsOfNames(
...@@ -190,25 +159,8 @@ static HRESULT WINAPI xmlnode_GetIDsOfNames( ...@@ -190,25 +159,8 @@ static HRESULT WINAPI xmlnode_GetIDsOfNames(
LCID lcid, LCID lcid,
DISPID* rgDispId ) DISPID* rgDispId )
{ {
xmlnode *This = impl_from_IXMLDOMNode( iface ); ERR("Should not be called\n");
return E_NOTIMPL;
ITypeInfo *typeinfo;
HRESULT hr;
TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
lcid, rgDispId);
if(!rgszNames || cNames == 0 || !rgDispId)
return E_INVALIDARG;
hr = get_typeinfo(IXMLDOMNode_tid, &typeinfo);
if(SUCCEEDED(hr))
{
hr = ITypeInfo_GetIDsOfNames(typeinfo, rgszNames, cNames, rgDispId);
ITypeInfo_Release(typeinfo);
}
return hr;
} }
static HRESULT WINAPI xmlnode_Invoke( static HRESULT WINAPI xmlnode_Invoke(
...@@ -222,22 +174,8 @@ static HRESULT WINAPI xmlnode_Invoke( ...@@ -222,22 +174,8 @@ static HRESULT WINAPI xmlnode_Invoke(
EXCEPINFO* pExcepInfo, EXCEPINFO* pExcepInfo,
UINT* puArgErr ) UINT* puArgErr )
{ {
xmlnode *This = impl_from_IXMLDOMNode( iface ); ERR("Should not be called\n");
ITypeInfo *typeinfo; return E_NOTIMPL;
HRESULT hr;
TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
hr = get_typeinfo(IXMLDOMNode_tid, &typeinfo);
if(SUCCEEDED(hr))
{
hr = ITypeInfo_Invoke(typeinfo, &(This->lpVtbl), dispIdMember, wFlags, pDispParams,
pVarResult, pExcepInfo, puArgErr);
ITypeInfo_Release(typeinfo);
}
return hr;
} }
static HRESULT WINAPI xmlnode_get_nodeName( static HRESULT WINAPI xmlnode_get_nodeName(
...@@ -556,7 +494,7 @@ static HRESULT WINAPI xmlnode_get_attributes( ...@@ -556,7 +494,7 @@ static HRESULT WINAPI xmlnode_get_attributes(
*attributeMap = NULL; *attributeMap = NULL;
return S_FALSE; return S_FALSE;
default: default:
*attributeMap = create_nodemap( iface ); *attributeMap = create_nodemap( This->iface );
return S_OK; return S_OK;
} }
} }
...@@ -764,7 +702,7 @@ static HRESULT WINAPI xmlnode_appendChild( ...@@ -764,7 +702,7 @@ static HRESULT WINAPI xmlnode_appendChild(
} }
VariantInit(&var); VariantInit(&var);
return IXMLDOMNode_insertBefore(iface, newChild, var, outNewChild); return IXMLDOMNode_insertBefore(This->iface, newChild, var, outNewChild);
} }
static HRESULT WINAPI xmlnode_hasChildNodes( static HRESULT WINAPI xmlnode_hasChildNodes(
...@@ -1176,10 +1114,10 @@ static HRESULT WINAPI xmlnode_get_nodeTypedValue( ...@@ -1176,10 +1114,10 @@ static HRESULT WINAPI xmlnode_get_nodeTypedValue(
if(This->node->type == XML_ELEMENT_NODE || if(This->node->type == XML_ELEMENT_NODE ||
This->node->type == XML_TEXT_NODE || This->node->type == XML_TEXT_NODE ||
This->node->type == XML_ENTITY_REF_NODE) This->node->type == XML_ENTITY_REF_NODE)
hres = IXMLDOMNode_get_dataType(iface, &type); hres = IXMLDOMNode_get_dataType(This->iface, &type);
if(hres != S_OK && This->node->type != XML_ELEMENT_NODE) if(hres != S_OK && This->node->type != XML_ELEMENT_NODE)
return IXMLDOMNode_get_nodeValue(iface, typedValue); return IXMLDOMNode_get_nodeValue(This->iface, typedValue);
content = xmlNodeGetContent(This->node); content = xmlNodeGetContent(This->node);
hres = VARIANT_from_xmlChar(content, typedValue, hres = VARIANT_from_xmlChar(content, typedValue,
...@@ -1566,7 +1504,7 @@ static HRESULT WINAPI xmlnode_selectSingleNode( ...@@ -1566,7 +1504,7 @@ static HRESULT WINAPI xmlnode_selectSingleNode(
TRACE("(%p)->(%s %p)\n", This, debugstr_w(queryString), resultNode ); TRACE("(%p)->(%s %p)\n", This, debugstr_w(queryString), resultNode );
*resultNode = NULL; *resultNode = NULL;
r = IXMLDOMNode_selectNodes(iface, queryString, &list); r = IXMLDOMNode_selectNodes(This->iface, queryString, &list);
if(r == S_OK) if(r == S_OK)
{ {
r = IXMLDOMNodeList_nextNode(list, resultNode); r = IXMLDOMNodeList_nextNode(list, resultNode);
......
...@@ -58,15 +58,12 @@ static HRESULT WINAPI dom_pi_QueryInterface( ...@@ -58,15 +58,12 @@ static HRESULT WINAPI dom_pi_QueryInterface(
TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject); TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject);
if ( IsEqualGUID( riid, &IID_IXMLDOMProcessingInstruction ) || if ( IsEqualGUID( riid, &IID_IXMLDOMProcessingInstruction ) ||
IsEqualGUID( riid, &IID_IXMLDOMNode ) ||
IsEqualGUID( riid, &IID_IDispatch ) || IsEqualGUID( riid, &IID_IDispatch ) ||
IsEqualGUID( riid, &IID_IUnknown ) ) IsEqualGUID( riid, &IID_IUnknown ) )
{ {
*ppvObject = iface; *ppvObject = iface;
} }
else if ( IsEqualGUID( riid, &IID_IXMLDOMNode ) )
{
*ppvObject = IXMLDOMNode_from_impl(&This->node);
}
else if(node_query_interface(&This->node, riid, ppvObject)) else if(node_query_interface(&This->node, riid, ppvObject))
{ {
return *ppvObject ? S_OK : E_NOINTERFACE; return *ppvObject ? S_OK : E_NOINTERFACE;
...@@ -504,14 +501,13 @@ static HRESULT WINAPI dom_pi_get_data( ...@@ -504,14 +501,13 @@ static HRESULT WINAPI dom_pi_get_data(
IXMLDOMProcessingInstruction *iface, IXMLDOMProcessingInstruction *iface,
BSTR *p) BSTR *p)
{ {
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
HRESULT hr = E_FAIL; HRESULT hr = E_FAIL;
VARIANT vRet; VARIANT vRet;
if(!p) if(!p)
return E_INVALIDARG; return E_INVALIDARG;
hr = IXMLDOMNode_get_nodeValue( IXMLDOMNode_from_impl(&This->node), &vRet ); hr = IXMLDOMProcessingInstruction_get_nodeValue( iface, &vRet );
if(hr == S_OK) if(hr == S_OK)
{ {
*p = V_BSTR(&vRet); *p = V_BSTR(&vRet);
...@@ -548,7 +544,7 @@ static HRESULT WINAPI dom_pi_put_data( ...@@ -548,7 +544,7 @@ static HRESULT WINAPI dom_pi_put_data(
V_VT(&val) = VT_BSTR; V_VT(&val) = VT_BSTR;
V_BSTR(&val) = data; V_BSTR(&val) = data;
hr = IXMLDOMNode_put_nodeValue( IXMLDOMNode_from_impl(&This->node), val ); hr = IXMLDOMProcessingInstruction_put_nodeValue( iface, val );
return hr; return hr;
} }
......
...@@ -60,15 +60,12 @@ static HRESULT WINAPI domtext_QueryInterface( ...@@ -60,15 +60,12 @@ static HRESULT WINAPI domtext_QueryInterface(
if ( IsEqualGUID( riid, &IID_IXMLDOMText ) || if ( IsEqualGUID( riid, &IID_IXMLDOMText ) ||
IsEqualGUID( riid, &IID_IXMLDOMCharacterData) || IsEqualGUID( riid, &IID_IXMLDOMCharacterData) ||
IsEqualGUID( riid, &IID_IXMLDOMNode ) ||
IsEqualGUID( riid, &IID_IDispatch ) || IsEqualGUID( riid, &IID_IDispatch ) ||
IsEqualGUID( riid, &IID_IUnknown ) ) IsEqualGUID( riid, &IID_IUnknown ) )
{ {
*ppvObject = iface; *ppvObject = iface;
} }
else if ( IsEqualGUID( riid, &IID_IXMLDOMNode ) )
{
*ppvObject = IXMLDOMNode_from_impl(&This->node);
}
else if(node_query_interface(&This->node, riid, ppvObject)) else if(node_query_interface(&This->node, riid, ppvObject))
{ {
return *ppvObject ? S_OK : E_NOINTERFACE; return *ppvObject ? S_OK : E_NOINTERFACE;
...@@ -485,14 +482,13 @@ static HRESULT WINAPI domtext_get_data( ...@@ -485,14 +482,13 @@ static HRESULT WINAPI domtext_get_data(
IXMLDOMText *iface, IXMLDOMText *iface,
BSTR *p) BSTR *p)
{ {
domtext *This = impl_from_IXMLDOMText( iface );
HRESULT hr; HRESULT hr;
VARIANT vRet; VARIANT vRet;
if(!p) if(!p)
return E_INVALIDARG; return E_INVALIDARG;
hr = IXMLDOMNode_get_nodeValue( IXMLDOMNode_from_impl(&This->node), &vRet ); hr = IXMLDOMNode_get_nodeValue( iface, &vRet );
if(hr == S_OK) if(hr == S_OK)
{ {
*p = V_BSTR(&vRet); *p = V_BSTR(&vRet);
......
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