From 9a16f796f2dab991a70973aef4f9de00d2759b0f Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Thu, 30 Dec 2010 13:07:50 +0100 Subject: [PATCH] msxml3: Don't forward put_nodeTypedValue and put_dataType calls to node IXMLDOMNode iface. --- dlls/msxml3/attribute.c | 13 +++++++++--- dlls/msxml3/cdata.c | 13 +++++++++--- dlls/msxml3/comment.c | 13 +++++++++--- dlls/msxml3/docfrag.c | 13 +++++++++--- dlls/msxml3/domdoc.c | 11 ++++++++-- dlls/msxml3/entityref.c | 13 +++++++++--- dlls/msxml3/main.c | 27 ++++++++++++++++++++++++ dlls/msxml3/msxml_private.h | 2 ++ dlls/msxml3/node.c | 42 +++++++++++-------------------------- dlls/msxml3/pi.c | 13 +++++++++--- 10 files changed, 110 insertions(+), 50 deletions(-) diff --git a/dlls/msxml3/attribute.c b/dlls/msxml3/attribute.c index b99d1d18c7c..d5768cb6713 100644 --- a/dlls/msxml3/attribute.c +++ b/dlls/msxml3/attribute.c @@ -423,10 +423,11 @@ static HRESULT WINAPI domattr_get_nodeTypedValue( static HRESULT WINAPI domattr_put_nodeTypedValue( IXMLDOMAttribute *iface, - VARIANT var1) + VARIANT typedValue) { domattr *This = impl_from_IXMLDOMAttribute( iface ); - return IXMLDOMNode_put_nodeTypedValue( IXMLDOMNode_from_impl(&This->node), var1 ); + FIXME("(%p)->(%s)\n", This, debugstr_variant(&typedValue)); + return E_NOTIMPL; } static HRESULT WINAPI domattr_get_dataType( @@ -443,7 +444,13 @@ static HRESULT WINAPI domattr_put_dataType( BSTR p) { domattr *This = impl_from_IXMLDOMAttribute( iface ); - return IXMLDOMNode_put_dataType( IXMLDOMNode_from_impl(&This->node), p ); + + FIXME("(%p)->(%s)\n", This, debugstr_w(p)); + + if(!p) + return E_INVALIDARG; + + return E_FAIL; } static HRESULT WINAPI domattr_get_xml( diff --git a/dlls/msxml3/cdata.c b/dlls/msxml3/cdata.c index 227563f94c3..856ed93e858 100644 --- a/dlls/msxml3/cdata.c +++ b/dlls/msxml3/cdata.c @@ -434,10 +434,11 @@ static HRESULT WINAPI domcdata_get_nodeTypedValue( static HRESULT WINAPI domcdata_put_nodeTypedValue( IXMLDOMCDATASection *iface, - VARIANT var1) + VARIANT typedValue) { domcdata *This = impl_from_IXMLDOMCDATASection( iface ); - return IXMLDOMNode_put_nodeTypedValue( IXMLDOMNode_from_impl(&This->node), var1 ); + FIXME("(%p)->(%s)\n", This, debugstr_variant(&typedValue)); + return E_NOTIMPL; } static HRESULT WINAPI domcdata_get_dataType( @@ -454,7 +455,13 @@ static HRESULT WINAPI domcdata_put_dataType( BSTR p) { domcdata *This = impl_from_IXMLDOMCDATASection( iface ); - return IXMLDOMNode_put_dataType( IXMLDOMNode_from_impl(&This->node), p ); + + FIXME("(%p)->(%s)\n", This, debugstr_w(p)); + + if(!p) + return E_INVALIDARG; + + return E_FAIL; } static HRESULT WINAPI domcdata_get_xml( diff --git a/dlls/msxml3/comment.c b/dlls/msxml3/comment.c index 8513ef0180f..08cf10386b2 100644 --- a/dlls/msxml3/comment.c +++ b/dlls/msxml3/comment.c @@ -427,10 +427,11 @@ static HRESULT WINAPI domcomment_get_nodeTypedValue( static HRESULT WINAPI domcomment_put_nodeTypedValue( IXMLDOMComment *iface, - VARIANT var1) + VARIANT typedValue) { domcomment *This = impl_from_IXMLDOMComment( iface ); - return IXMLDOMNode_put_nodeTypedValue( IXMLDOMNode_from_impl(&This->node), var1 ); + FIXME("(%p)->(%s)\n", This, debugstr_variant(&typedValue)); + return E_NOTIMPL; } static HRESULT WINAPI domcomment_get_dataType( @@ -447,7 +448,13 @@ static HRESULT WINAPI domcomment_put_dataType( BSTR p) { domcomment *This = impl_from_IXMLDOMComment( iface ); - return IXMLDOMNode_put_dataType( IXMLDOMNode_from_impl(&This->node), p ); + + FIXME("(%p)->(%s)\n", This, debugstr_w(p)); + + if(!p) + return E_INVALIDARG; + + return E_FAIL; } static HRESULT WINAPI domcomment_get_xml( diff --git a/dlls/msxml3/docfrag.c b/dlls/msxml3/docfrag.c index 5eb3a2c6906..40af0d27bb2 100644 --- a/dlls/msxml3/docfrag.c +++ b/dlls/msxml3/docfrag.c @@ -431,10 +431,11 @@ static HRESULT WINAPI domfrag_get_nodeTypedValue( static HRESULT WINAPI domfrag_put_nodeTypedValue( IXMLDOMDocumentFragment *iface, - VARIANT var1) + VARIANT typedValue) { domfrag *This = impl_from_IXMLDOMDocumentFragment( iface ); - return IXMLDOMNode_put_nodeTypedValue( IXMLDOMNode_from_impl(&This->node), var1 ); + FIXME("(%p)->(%s)\n", This, debugstr_variant(&typedValue)); + return E_NOTIMPL; } static HRESULT WINAPI domfrag_get_dataType( @@ -451,7 +452,13 @@ static HRESULT WINAPI domfrag_put_dataType( BSTR p) { domfrag *This = impl_from_IXMLDOMDocumentFragment( iface ); - return IXMLDOMNode_put_dataType( IXMLDOMNode_from_impl(&This->node), p ); + + FIXME("(%p)->(%s)\n", This, debugstr_w(p)); + + if(!p) + return E_INVALIDARG; + + return E_FAIL; } static HRESULT WINAPI domfrag_get_xml( diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c index fcdb83a01a5..bfb676ac7ae 100644 --- a/dlls/msxml3/domdoc.c +++ b/dlls/msxml3/domdoc.c @@ -1288,7 +1288,8 @@ static HRESULT WINAPI domdoc_put_nodeTypedValue( VARIANT typedValue ) { domdoc *This = impl_from_IXMLDOMDocument3( iface ); - return IXMLDOMNode_put_nodeTypedValue( IXMLDOMNode_from_impl(&This->node), typedValue ); + FIXME("(%p)->(%s)\n", This, debugstr_variant(&typedValue)); + return E_NOTIMPL; } @@ -1307,7 +1308,13 @@ static HRESULT WINAPI domdoc_put_dataType( BSTR dataTypeName ) { domdoc *This = impl_from_IXMLDOMDocument3( iface ); - return IXMLDOMNode_put_dataType( IXMLDOMNode_from_impl(&This->node), dataTypeName ); + + FIXME("(%p)->(%s)\n", This, debugstr_w(dataTypeName)); + + if(!dataTypeName) + return E_INVALIDARG; + + return E_FAIL; } static int XMLCALL domdoc_get_xml_writecallback(void *ctx, const char *data, int len) diff --git a/dlls/msxml3/entityref.c b/dlls/msxml3/entityref.c index 032c7799b9c..f3a4b190b82 100644 --- a/dlls/msxml3/entityref.c +++ b/dlls/msxml3/entityref.c @@ -425,10 +425,11 @@ static HRESULT WINAPI entityref_get_nodeTypedValue( static HRESULT WINAPI entityref_put_nodeTypedValue( IXMLDOMEntityReference *iface, - VARIANT var1) + VARIANT typedValue) { entityref *This = impl_from_IXMLDOMEntityReference( iface ); - return IXMLDOMNode_put_nodeTypedValue( IXMLDOMNode_from_impl(&This->node), var1 ); + FIXME("(%p)->(%s)\n", This, debugstr_variant(&typedValue)); + return E_NOTIMPL; } static HRESULT WINAPI entityref_get_dataType( @@ -445,7 +446,13 @@ static HRESULT WINAPI entityref_put_dataType( BSTR p) { entityref *This = impl_from_IXMLDOMEntityReference( iface ); - return IXMLDOMNode_put_dataType( IXMLDOMNode_from_impl(&This->node), p ); + + FIXME("(%p)->(%s)\n", This, debugstr_w(p)); + + if(!p) + return E_INVALIDARG; + + return E_FAIL; } static HRESULT WINAPI entityref_get_xml( diff --git a/dlls/msxml3/main.c b/dlls/msxml3/main.c index 8e3a13be2b4..c9e897b75ba 100644 --- a/dlls/msxml3/main.c +++ b/dlls/msxml3/main.c @@ -245,6 +245,33 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) return TRUE; } +const char *debugstr_variant(const VARIANT *v) +{ + if(!v) + return "(null)"; + + switch(V_VT(v)) { + case VT_EMPTY: + return "{VT_EMPTY}"; + case VT_NULL: + return "{VT_NULL}"; + case VT_I4: + return wine_dbg_sprintf("{VT_I4: %d}", V_I4(v)); + case VT_R8: + return wine_dbg_sprintf("{VT_R8: %lf}", V_R8(v)); + case VT_BSTR: + return wine_dbg_sprintf("{VT_BSTR: %s}", debugstr_w(V_BSTR(v))); + case VT_DISPATCH: + return wine_dbg_sprintf("{VT_DISPATCH: %p}", V_DISPATCH(v)); + case VT_BOOL: + return wine_dbg_sprintf("{VT_BOOL: %x}", V_BOOL(v)); + case VT_UINT: + return wine_dbg_sprintf("{VT_UINT: %u}", V_UINT(v)); + default: + return wine_dbg_sprintf("{vt %d}", V_VT(v)); + } +} + /*********************************************************************** * DllRegisterServer (MSXML3.@) */ diff --git a/dlls/msxml3/msxml_private.h b/dlls/msxml3/msxml_private.h index 6dc6cdef8b6..bbe839440ae 100644 --- a/dlls/msxml3/msxml_private.h +++ b/dlls/msxml3/msxml_private.h @@ -413,6 +413,8 @@ typedef struct bsc_t bsc_t; HRESULT bind_url(LPCWSTR, HRESULT (*onDataAvailable)(void*,char*,DWORD), void*, bsc_t**); void detach_bsc(bsc_t*); +const char *debugstr_variant(const VARIANT*); + /* memory allocation functions */ static inline void *heap_alloc(size_t len) diff --git a/dlls/msxml3/node.c b/dlls/msxml3/node.c index 43aec69ccdb..228fa65faf2 100644 --- a/dlls/msxml3/node.c +++ b/dlls/msxml3/node.c @@ -873,31 +873,6 @@ static HRESULT WINAPI xmlnode_get_nodeTypedValue( return hres; } -static HRESULT WINAPI xmlnode_put_nodeTypedValue( - IXMLDOMNode *iface, - VARIANT typedValue) -{ - xmlnode *This = impl_from_IXMLDOMNode( iface ); - FIXME("%p\n", This); - return E_NOTIMPL; -} - -static HRESULT WINAPI xmlnode_put_dataType( - IXMLDOMNode *iface, - BSTR dtName) -{ - xmlnode *This = impl_from_IXMLDOMNode( iface ); - - TRACE("(%p)->(%s)\n", This, debugstr_w(dtName)); - - if(!dtName) - return E_INVALIDARG; - - FIXME("need to handle node type %i\n", This->node->type); - - return E_FAIL; -} - BSTR EnsureCorrectEOL(BSTR sInput) { int nNum = 0; @@ -1240,9 +1215,9 @@ static const struct IXMLDOMNodeVtbl xmlnode_vtbl = NULL, NULL, xmlnode_get_nodeTypedValue, - xmlnode_put_nodeTypedValue, NULL, - xmlnode_put_dataType, + NULL, + NULL, NULL, xmlnode_transformNode, xmlnode_selectNodes, @@ -1667,10 +1642,11 @@ static HRESULT WINAPI unknode_get_nodeTypedValue( static HRESULT WINAPI unknode_put_nodeTypedValue( IXMLDOMNode *iface, - VARIANT var1) + VARIANT typedValue) { unknode *This = impl_from_unkIXMLDOMNode( iface ); - return IXMLDOMNode_put_nodeTypedValue( IXMLDOMNode_from_impl(&This->node), var1 ); + FIXME("(%p)->(%s)\n", This, debugstr_variant(&typedValue)); + return E_NOTIMPL; } static HRESULT WINAPI unknode_get_dataType( @@ -1686,7 +1662,13 @@ static HRESULT WINAPI unknode_put_dataType( BSTR p) { unknode *This = impl_from_unkIXMLDOMNode( iface ); - return IXMLDOMNode_put_dataType( IXMLDOMNode_from_impl(&This->node), p ); + + FIXME("(%p)->(%s)\n", This, debugstr_w(p)); + + if(!p) + return E_INVALIDARG; + + return E_FAIL; } static HRESULT WINAPI unknode_get_xml( diff --git a/dlls/msxml3/pi.c b/dlls/msxml3/pi.c index 9c3857dbeb2..e78a6f3997f 100644 --- a/dlls/msxml3/pi.c +++ b/dlls/msxml3/pi.c @@ -442,10 +442,11 @@ static HRESULT WINAPI dom_pi_get_nodeTypedValue( static HRESULT WINAPI dom_pi_put_nodeTypedValue( IXMLDOMProcessingInstruction *iface, - VARIANT var1) + VARIANT typedValue) { dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); - return IXMLDOMNode_put_nodeTypedValue( IXMLDOMNode_from_impl(&This->node), var1 ); + FIXME("(%p)->(%s)\n", This, debugstr_variant(&typedValue)); + return E_NOTIMPL; } static HRESULT WINAPI dom_pi_get_dataType( @@ -462,7 +463,13 @@ static HRESULT WINAPI dom_pi_put_dataType( BSTR p) { dom_pi *This = impl_from_IXMLDOMProcessingInstruction( iface ); - return IXMLDOMNode_put_dataType( IXMLDOMNode_from_impl(&This->node), p ); + + FIXME("(%p)->(%s)\n", This, debugstr_w(p)); + + if(!p) + return E_INVALIDARG; + + return E_FAIL; } static HRESULT WINAPI dom_pi_get_xml(