Commit f090ddfe authored by Adam Martinson's avatar Adam Martinson Committed by Alexandre Julliard

msxml3: Add BSTR versions of the XDR_DT <-> string functions.

parent c19fa9b0
......@@ -635,7 +635,7 @@ static inline HRESULT VARIANT_from_DT(XDR_DT dt, xmlChar* str, VARIANT* v)
case DT_IDREF:
case DT_IDREFS:
case DT_NOTATION:
FIXME("need to handle dt:%s\n", dt_get_str(dt));
FIXME("need to handle dt:%s\n", dt_to_str(dt));
V_VT(v) = VT_BSTR;
V_BSTR(v) = bstr_from_xmlChar(str);
if (!V_BSTR(v))
......@@ -731,14 +731,14 @@ XDR_DT element_get_dt(xmlNodePtr node)
if (node->ns && xmlStrEqual(node->ns->href, DT_nsURI))
{
dt = dt_get_type(node->name, -1);
dt = str_to_dt(node->name, -1);
}
else
{
xmlChar* pVal = xmlGetNsProp(node, BAD_CAST "dt", DT_nsURI);
if (pVal)
{
dt = dt_get_type(pVal, -1);
dt = str_to_dt(pVal, -1);
xmlFree(pVal);
}
else if (node->doc)
......@@ -760,7 +760,7 @@ XDR_DT element_get_dt(xmlNodePtr node)
}
}
TRACE("=> dt:%s\n", dt_get_str(dt));
TRACE("=> dt:%s\n", dt_to_str(dt));
return dt;
}
......@@ -806,7 +806,7 @@ static HRESULT WINAPI domelem_get_dataType(
case DT_URI:
case DT_UUID:
V_VT(typename) = VT_BSTR;
V_BSTR(typename) = bstr_from_xmlChar(dt_get_str(dt));
V_BSTR(typename) = SysAllocString(dt_to_bstr(dt));
if (!V_BSTR(typename))
return E_OUTOFMEMORY;
......
......@@ -268,8 +268,10 @@ extern HRESULT DOMDocument_create_from_xmldoc(xmlDocPtr xmldoc, IXMLDOMDocument3
extern HRESULT SchemaCache_validate_tree(IXMLDOMSchemaCollection2* iface, xmlNodePtr tree);
extern XDR_DT SchemaCache_get_node_dt(IXMLDOMSchemaCollection2* iface, xmlNodePtr node);
extern XDR_DT dt_get_type(xmlChar const* str, int len /* calculated if -1 */);
extern xmlChar const* dt_get_str(XDR_DT dt);
extern XDR_DT str_to_dt(xmlChar const* str, int len /* calculated if -1 */);
extern XDR_DT bstr_to_dt(OLECHAR const* bstr, int len /* calculated if -1 */);
extern xmlChar const* dt_to_str(XDR_DT dt);
extern OLECHAR const* dt_to_bstr(XDR_DT dt);
extern XDR_DT element_get_dt(xmlNodePtr node);
extern BSTR EnsureCorrectEOL(BSTR);
......
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