Piotr Caban : msxml3: Implemented xmlnode_get_nodeTypedValue 'fixed.14.4' data type handling.

Alexandre Julliard julliard at winehq.org
Wed Nov 18 09:40:43 CST 2009


Module: wine
Branch: master
Commit: 47e037d4bb945c6d7ddcea80b1f6fd0dd0bfcf1c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=47e037d4bb945c6d7ddcea80b1f6fd0dd0bfcf1c

Author: Piotr Caban <piotr.caban at gmail.com>
Date:   Wed Nov 18 00:51:24 2009 +0100

msxml3: Implemented xmlnode_get_nodeTypedValue 'fixed.14.4' data type handling.

---

 dlls/msxml3/node.c         |    2 ++
 dlls/msxml3/tests/domdoc.c |   22 ++++++++++++++++++++++
 2 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/dlls/msxml3/node.c b/dlls/msxml3/node.c
index b1f8a9d..0f515c4 100644
--- a/dlls/msxml3/node.c
+++ b/dlls/msxml3/node.c
@@ -964,6 +964,8 @@ inline HRESULT VARIANT_from_xmlChar(xmlChar *str, VARIANT *v, BSTR type)
 
         if(!lstrcmpiW(type, szInt))
             V_VT(v) = VT_I4;
+        else if(!lstrcmpiW(type, szFixed))
+            V_VT(v) = VT_CY;
         else
         {
             FIXME("Type handling not yet implemented\n");
diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c
index a0dbe02..cb8aa4e 100644
--- a/dlls/msxml3/tests/domdoc.c
+++ b/dlls/msxml3/tests/domdoc.c
@@ -154,6 +154,7 @@ static const CHAR szTypeValueXML[] =
 "   <number dt:dt=\"number\">12.44</number>\n"
 "   <number2 dt:dt=\"NUMbEr\">-3.71e3</number2>\n"
 "   <int dt:dt=\"int\">-13</int>\n"
+"   <fixed dt:dt=\"fixed.14.4\">7322.9371</fixed>\n"
 "</root>";
 
 static const CHAR szBasicTransformSSXMLPart1[] =
@@ -4051,6 +4052,27 @@ static void test_NodeTypeValue(void)
 
             IXMLDOMNode_Release(pNode);
         }
+
+        hr = IXMLDOMDocument2_selectSingleNode(doc, _bstr_("root/fixed"), &pNode);
+        ok(hr == S_OK, "ret %08x\n", hr );
+        if(hr == S_OK)
+        {
+            VARIANT hlp_in, hlp_out;
+            V_VT(&hlp_in) = VT_BSTR;
+            V_BSTR(&hlp_in) = _bstr_("7322.9371");
+            V_VT(&hlp_out) = VT_CY;
+            ok(VariantChangeType(&hlp_out, &hlp_in, 0, VT_CY) == S_OK, "VariantChangeType failed\n");
+            VariantClear(&hlp_in);
+
+            hr = IXMLDOMNode_get_nodeTypedValue(pNode, &v);
+            ok(hr == S_OK, "ret %08x\n", hr );
+            ok(V_VT(&v) == VT_CY, "incorrect type\n");
+            ok(VarCyCmp(V_CY(&v), V_CY(&hlp_out)) == VARCMP_EQ, "incorrect value\n");
+            VariantClear(&hlp_out);
+            VariantClear(&v);
+
+            IXMLDOMNode_Release(pNode);
+        }
     }
 
     IXMLDOMDocument2_Release(doc);




More information about the wine-cvs mailing list