msxml3: Don't use xmlnode's IXMLDOMNode iface in get_attributes implementations.
This commit is contained in:
parent
55175042eb
commit
e9ebd8c964
|
@ -293,7 +293,10 @@ static HRESULT WINAPI domattr_get_attributes(
|
|||
IXMLDOMNamedNodeMap** attributeMap)
|
||||
{
|
||||
domattr *This = impl_from_IXMLDOMAttribute( iface );
|
||||
return IXMLDOMNode_get_attributes( IXMLDOMNode_from_impl(&This->node), attributeMap );
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, attributeMap);
|
||||
|
||||
return return_null_ptr((void**)attributeMap);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI domattr_insertBefore(
|
||||
|
|
|
@ -303,8 +303,11 @@ static HRESULT WINAPI domcdata_get_attributes(
|
|||
IXMLDOMCDATASection *iface,
|
||||
IXMLDOMNamedNodeMap** attributeMap)
|
||||
{
|
||||
domcdata *This = impl_from_IXMLDOMCDATASection( iface );
|
||||
return IXMLDOMNode_get_attributes( IXMLDOMNode_from_impl(&This->node), attributeMap );
|
||||
domcdata *This = impl_from_IXMLDOMCDATASection( iface );
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, attributeMap);
|
||||
|
||||
return return_null_ptr((void**)attributeMap);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI domcdata_insertBefore(
|
||||
|
|
|
@ -297,7 +297,10 @@ static HRESULT WINAPI domcomment_get_attributes(
|
|||
IXMLDOMNamedNodeMap** attributeMap)
|
||||
{
|
||||
domcomment *This = impl_from_IXMLDOMComment( iface );
|
||||
return IXMLDOMNode_get_attributes( IXMLDOMNode_from_impl(&This->node), attributeMap );
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, attributeMap);
|
||||
|
||||
return return_null_ptr((void**)attributeMap);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI domcomment_insertBefore(
|
||||
|
|
|
@ -299,7 +299,10 @@ static HRESULT WINAPI domfrag_get_attributes(
|
|||
IXMLDOMNamedNodeMap** attributeMap)
|
||||
{
|
||||
domfrag *This = impl_from_IXMLDOMDocumentFragment( iface );
|
||||
return IXMLDOMNode_get_attributes( IXMLDOMNode_from_impl(&This->node), attributeMap );
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, attributeMap);
|
||||
|
||||
return return_null_ptr((void**)attributeMap);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI domfrag_insertBefore(
|
||||
|
|
|
@ -812,7 +812,10 @@ static HRESULT WINAPI domdoc_get_attributes(
|
|||
IXMLDOMNamedNodeMap** attributeMap )
|
||||
{
|
||||
domdoc *This = impl_from_IXMLDOMDocument3( iface );
|
||||
return IXMLDOMNode_get_attributes( IXMLDOMNode_from_impl(&This->node), attributeMap );
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, attributeMap);
|
||||
|
||||
return return_null_ptr((void**)attributeMap);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -308,7 +308,11 @@ static HRESULT WINAPI domelem_get_attributes(
|
|||
IXMLDOMNamedNodeMap** attributeMap)
|
||||
{
|
||||
domelem *This = impl_from_IXMLDOMElement( iface );
|
||||
return IXMLDOMNode_get_attributes( IXMLDOMNode_from_impl(&This->node), attributeMap );
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, attributeMap);
|
||||
|
||||
*attributeMap = create_nodemap((IXMLDOMNode*)&This->lpVtbl);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI domelem_insertBefore(
|
||||
|
|
|
@ -295,7 +295,10 @@ static HRESULT WINAPI entityref_get_attributes(
|
|||
IXMLDOMNamedNodeMap** attributeMap)
|
||||
{
|
||||
entityref *This = impl_from_IXMLDOMEntityReference( iface );
|
||||
return IXMLDOMNode_get_attributes( IXMLDOMNode_from_impl(&This->node), attributeMap );
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, attributeMap);
|
||||
|
||||
return return_null_ptr((void**)attributeMap);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI entityref_insertBefore(
|
||||
|
|
|
@ -212,6 +212,14 @@ static inline HRESULT return_null_node(IXMLDOMNode **p)
|
|||
return S_FALSE;
|
||||
}
|
||||
|
||||
static inline HRESULT return_null_ptr(void **p)
|
||||
{
|
||||
if(!p)
|
||||
return E_INVALIDARG;
|
||||
*p = NULL;
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void* libxslt_handle;
|
||||
|
|
|
@ -369,30 +369,8 @@ static HRESULT WINAPI xmlnode_get_attributes(
|
|||
IXMLDOMNode *iface,
|
||||
IXMLDOMNamedNodeMap** attributeMap)
|
||||
{
|
||||
xmlnode *This = impl_from_IXMLDOMNode( iface );
|
||||
TRACE("(%p)->(%p)\n", This, attributeMap);
|
||||
|
||||
if (!attributeMap)
|
||||
return E_INVALIDARG;
|
||||
|
||||
switch( This->node->type )
|
||||
{
|
||||
/* Attribute, CDataSection, Comment, Documents, Documents Fragments,
|
||||
Entity and Text Nodes does not support get_attributes */
|
||||
case XML_ATTRIBUTE_NODE:
|
||||
case XML_CDATA_SECTION_NODE:
|
||||
case XML_COMMENT_NODE:
|
||||
case XML_DOCUMENT_NODE:
|
||||
case XML_DOCUMENT_FRAG_NODE:
|
||||
case XML_ENTITY_NODE:
|
||||
case XML_ENTITY_REF_NODE:
|
||||
case XML_TEXT_NODE:
|
||||
*attributeMap = NULL;
|
||||
return S_FALSE;
|
||||
default:
|
||||
*attributeMap = create_nodemap( This->iface );
|
||||
return S_OK;
|
||||
}
|
||||
ERR("Should not be called\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI xmlnode_insertBefore(
|
||||
|
@ -1852,7 +1830,10 @@ static HRESULT WINAPI unknode_get_attributes(
|
|||
IXMLDOMNamedNodeMap** attributeMap)
|
||||
{
|
||||
unknode *This = impl_from_unkIXMLDOMNode( iface );
|
||||
return IXMLDOMNode_get_attributes( IXMLDOMNode_from_impl(&This->node), attributeMap );
|
||||
|
||||
FIXME("(%p)->(%p)\n", This, attributeMap);
|
||||
|
||||
return return_null_ptr((void**)attributeMap);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI unknode_insertBefore(
|
||||
|
|
|
@ -310,7 +310,11 @@ static HRESULT WINAPI dom_pi_get_attributes(
|
|||
IXMLDOMNamedNodeMap** attributeMap)
|
||||
{
|
||||
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
|
||||
return IXMLDOMNode_get_attributes( IXMLDOMNode_from_impl(&This->node), attributeMap );
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, attributeMap);
|
||||
|
||||
*attributeMap = create_nodemap((IXMLDOMNode*)&This->lpVtbl);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI dom_pi_insertBefore(
|
||||
|
|
|
@ -310,7 +310,10 @@ static HRESULT WINAPI domtext_get_attributes(
|
|||
IXMLDOMNamedNodeMap** attributeMap)
|
||||
{
|
||||
domtext *This = impl_from_IXMLDOMText( iface );
|
||||
return IXMLDOMNode_get_attributes( IXMLDOMNode_from_impl(&This->node), attributeMap );
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, attributeMap);
|
||||
|
||||
return return_null_ptr((void**)attributeMap);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI domtext_insertBefore(
|
||||
|
|
Loading…
Reference in New Issue