mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-01 09:50:52 +00:00
msxml3: Get rid of ::get_dataType() forward to IXMLDOMNode interface.
This commit is contained in:
parent
032a2ba164
commit
0f19df8b6a
11 changed files with 51 additions and 58 deletions
|
@ -422,10 +422,11 @@ static HRESULT WINAPI domattr_put_nodeTypedValue(
|
|||
|
||||
static HRESULT WINAPI domattr_get_dataType(
|
||||
IXMLDOMAttribute *iface,
|
||||
VARIANT* var1)
|
||||
VARIANT* typename)
|
||||
{
|
||||
domattr *This = impl_from_IXMLDOMAttribute( iface );
|
||||
return IXMLDOMNode_get_dataType( IXMLDOMNode_from_impl(&This->node), var1 );
|
||||
TRACE("(%p)->(%p)\n", This, typename);
|
||||
return return_null_var( typename );
|
||||
}
|
||||
|
||||
static HRESULT WINAPI domattr_put_dataType(
|
||||
|
|
|
@ -433,10 +433,11 @@ static HRESULT WINAPI domcdata_put_nodeTypedValue(
|
|||
|
||||
static HRESULT WINAPI domcdata_get_dataType(
|
||||
IXMLDOMCDATASection *iface,
|
||||
VARIANT* var1)
|
||||
VARIANT* typename)
|
||||
{
|
||||
domcdata *This = impl_from_IXMLDOMCDATASection( iface );
|
||||
return IXMLDOMNode_get_dataType( IXMLDOMNode_from_impl(&This->node), var1 );
|
||||
TRACE("(%p)->(%p)\n", This, typename);
|
||||
return return_null_var( typename );
|
||||
}
|
||||
|
||||
static HRESULT WINAPI domcdata_put_dataType(
|
||||
|
|
|
@ -426,10 +426,11 @@ static HRESULT WINAPI domcomment_put_nodeTypedValue(
|
|||
|
||||
static HRESULT WINAPI domcomment_get_dataType(
|
||||
IXMLDOMComment *iface,
|
||||
VARIANT* var1)
|
||||
VARIANT* typename)
|
||||
{
|
||||
domcomment *This = impl_from_IXMLDOMComment( iface );
|
||||
return IXMLDOMNode_get_dataType( IXMLDOMNode_from_impl(&This->node), var1 );
|
||||
TRACE("(%p)->(%p)\n", This, typename);
|
||||
return return_null_var( typename );
|
||||
}
|
||||
|
||||
static HRESULT WINAPI domcomment_put_dataType(
|
||||
|
|
|
@ -430,10 +430,11 @@ static HRESULT WINAPI domfrag_put_nodeTypedValue(
|
|||
|
||||
static HRESULT WINAPI domfrag_get_dataType(
|
||||
IXMLDOMDocumentFragment *iface,
|
||||
VARIANT* var1)
|
||||
VARIANT* typename)
|
||||
{
|
||||
domfrag *This = impl_from_IXMLDOMDocumentFragment( iface );
|
||||
return IXMLDOMNode_get_dataType( IXMLDOMNode_from_impl(&This->node), var1 );
|
||||
TRACE("(%p)->(%p)\n", This, typename);
|
||||
return return_null_var( typename );
|
||||
}
|
||||
|
||||
static HRESULT WINAPI domfrag_put_dataType(
|
||||
|
|
|
@ -1154,10 +1154,11 @@ static HRESULT WINAPI domdoc_put_nodeTypedValue(
|
|||
|
||||
static HRESULT WINAPI domdoc_get_dataType(
|
||||
IXMLDOMDocument3 *iface,
|
||||
VARIANT* dataTypeName )
|
||||
VARIANT* typename )
|
||||
{
|
||||
domdoc *This = impl_from_IXMLDOMDocument3( iface );
|
||||
return IXMLDOMNode_get_dataType( IXMLDOMNode_from_impl(&This->node), dataTypeName );
|
||||
TRACE("(%p)->(%p)\n", This, typename);
|
||||
return return_null_var( typename );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -438,10 +438,24 @@ static HRESULT WINAPI domelem_put_nodeTypedValue(
|
|||
|
||||
static HRESULT WINAPI domelem_get_dataType(
|
||||
IXMLDOMElement *iface,
|
||||
VARIANT* var1)
|
||||
VARIANT* typename)
|
||||
{
|
||||
domelem *This = impl_from_IXMLDOMElement( iface );
|
||||
return IXMLDOMNode_get_dataType( IXMLDOMNode_from_impl(&This->node), var1 );
|
||||
xmlChar *pVal = xmlGetNsProp(get_element(This), (const xmlChar*)"dt",
|
||||
(const xmlChar*)"urn:schemas-microsoft-com:datatypes");
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, typename);
|
||||
|
||||
V_VT(typename) = VT_NULL;
|
||||
|
||||
if (pVal)
|
||||
{
|
||||
V_VT(typename) = VT_BSTR;
|
||||
V_BSTR(typename) = bstr_from_xmlChar( pVal );
|
||||
xmlFree(pVal);
|
||||
}
|
||||
|
||||
return (V_VT(typename) != VT_NULL) ? S_OK : S_FALSE;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI domelem_put_dataType(
|
||||
|
|
|
@ -424,10 +424,11 @@ static HRESULT WINAPI entityref_put_nodeTypedValue(
|
|||
|
||||
static HRESULT WINAPI entityref_get_dataType(
|
||||
IXMLDOMEntityReference *iface,
|
||||
VARIANT* var1)
|
||||
VARIANT* typename)
|
||||
{
|
||||
entityref *This = impl_from_IXMLDOMEntityReference( iface );
|
||||
return IXMLDOMNode_get_dataType( IXMLDOMNode_from_impl(&This->node), var1 );
|
||||
FIXME("(%p)->(%p): should return a valid value\n", This, typename);
|
||||
return return_null_var( typename );
|
||||
}
|
||||
|
||||
static HRESULT WINAPI entityref_put_dataType(
|
||||
|
|
|
@ -172,7 +172,6 @@ extern HRESULT node_get_next_sibling(xmlnode*,IXMLDOMNode**);
|
|||
extern HRESULT node_insert_before(xmlnode*,IXMLDOMNode*,const VARIANT*,IXMLDOMNode**);
|
||||
extern HRESULT node_replace_child(xmlnode*,IXMLDOMNode*,IXMLDOMNode*,IXMLDOMNode**);
|
||||
|
||||
|
||||
extern HRESULT DOMDocument_create_from_xmldoc(xmlDocPtr xmldoc, IXMLDOMDocument3 **document);
|
||||
|
||||
static inline BSTR bstr_from_xmlChar(const xmlChar *str)
|
||||
|
@ -223,6 +222,15 @@ static inline HRESULT return_null_ptr(void **p)
|
|||
return S_FALSE;
|
||||
}
|
||||
|
||||
static inline HRESULT return_null_var(VARIANT *p)
|
||||
{
|
||||
if(!p)
|
||||
return E_INVALIDARG;
|
||||
|
||||
V_VT(p) = VT_NULL;
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
extern void* libxslt_handle;
|
||||
|
|
|
@ -1020,45 +1020,8 @@ static HRESULT WINAPI xmlnode_get_dataType(
|
|||
IXMLDOMNode *iface,
|
||||
VARIANT* dataTypeName)
|
||||
{
|
||||
xmlnode *This = impl_from_IXMLDOMNode( iface );
|
||||
xmlChar *pVal;
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, dataTypeName);
|
||||
|
||||
if(!dataTypeName)
|
||||
return E_INVALIDARG;
|
||||
|
||||
/* Attribute, CDATA Section, Comment, Document, Document Fragment,
|
||||
Entity, Notation, PI, and Text Node are non-typed. */
|
||||
V_BSTR(dataTypeName) = NULL;
|
||||
V_VT(dataTypeName) = VT_NULL;
|
||||
|
||||
switch ( This->node->type )
|
||||
{
|
||||
case XML_ELEMENT_NODE:
|
||||
pVal = xmlGetNsProp(This->node, (const xmlChar*)"dt",
|
||||
(const xmlChar*)"urn:schemas-microsoft-com:datatypes");
|
||||
if (pVal)
|
||||
{
|
||||
V_VT(dataTypeName) = VT_BSTR;
|
||||
V_BSTR(dataTypeName) = bstr_from_xmlChar( pVal );
|
||||
xmlFree(pVal);
|
||||
}
|
||||
break;
|
||||
case XML_ENTITY_REF_NODE:
|
||||
FIXME("XML_ENTITY_REF_NODE should return a valid value.\n");
|
||||
break;
|
||||
default:
|
||||
TRACE("Type %d returning NULL\n", This->node->type);
|
||||
}
|
||||
|
||||
/* non-typed nodes return S_FALSE */
|
||||
if(V_VT(dataTypeName) == VT_NULL)
|
||||
{
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
ERR("Should not be called\n");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI xmlnode_put_dataType(
|
||||
|
|
|
@ -440,10 +440,11 @@ static HRESULT WINAPI dom_pi_put_nodeTypedValue(
|
|||
|
||||
static HRESULT WINAPI dom_pi_get_dataType(
|
||||
IXMLDOMProcessingInstruction *iface,
|
||||
VARIANT* var1)
|
||||
VARIANT* typename)
|
||||
{
|
||||
dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface );
|
||||
return IXMLDOMNode_get_dataType( IXMLDOMNode_from_impl(&This->node), var1 );
|
||||
TRACE("(%p)->(%p)\n", This, typename);
|
||||
return return_null_var( typename );
|
||||
}
|
||||
|
||||
static HRESULT WINAPI dom_pi_put_dataType(
|
||||
|
|
|
@ -439,10 +439,11 @@ static HRESULT WINAPI domtext_put_nodeTypedValue(
|
|||
|
||||
static HRESULT WINAPI domtext_get_dataType(
|
||||
IXMLDOMText *iface,
|
||||
VARIANT* var1)
|
||||
VARIANT* typename)
|
||||
{
|
||||
domtext *This = impl_from_IXMLDOMText( iface );
|
||||
return IXMLDOMNode_get_dataType( IXMLDOMNode_from_impl(&This->node), var1 );
|
||||
TRACE("(%p)->(%p)\n", This, typename);
|
||||
return return_null_var( typename );
|
||||
}
|
||||
|
||||
static HRESULT WINAPI domtext_put_dataType(
|
||||
|
|
Loading…
Reference in a new issue