msxml3: Remove no longer used get_xml() option to mess with encoding attribute.

This commit is contained in:
Nikolay Sivov 2012-05-15 11:49:58 +04:00 committed by Alexandre Julliard
parent fac36c55e9
commit edf6162340
10 changed files with 11 additions and 44 deletions

View file

@ -497,7 +497,7 @@ static HRESULT WINAPI domattr_get_xml(
TRACE("(%p)->(%p)\n", This, p);
return node_get_xml(&This->node, FALSE, FALSE, p);
return node_get_xml(&This->node, FALSE, p);
}
static HRESULT WINAPI domattr_transformNode(

View file

@ -452,7 +452,7 @@ static HRESULT WINAPI domcdata_get_xml(
TRACE("(%p)->(%p)\n", This, p);
return node_get_xml(&This->node, FALSE, FALSE, p);
return node_get_xml(&This->node, FALSE, p);
}
static HRESULT WINAPI domcdata_transformNode(

View file

@ -451,7 +451,7 @@ static HRESULT WINAPI domcomment_get_xml(
TRACE("(%p)->(%p)\n", This, p);
return node_get_xml(&This->node, FALSE, FALSE, p);
return node_get_xml(&This->node, FALSE, p);
}
static HRESULT WINAPI domcomment_transformNode(

View file

@ -449,7 +449,7 @@ static HRESULT WINAPI domfrag_get_xml(
TRACE("(%p)->(%p)\n", This, p);
return node_get_xml(&This->node, FALSE, FALSE, p);
return node_get_xml(&This->node, FALSE, p);
}
static HRESULT WINAPI domfrag_transformNode(

View file

@ -926,7 +926,7 @@ static HRESULT WINAPI domelem_get_xml(
TRACE("(%p)->(%p)\n", This, p);
return node_get_xml(&This->node, TRUE, FALSE, p);
return node_get_xml(&This->node, TRUE, p);
}
static HRESULT WINAPI domelem_transformNode(

View file

@ -444,7 +444,7 @@ static HRESULT WINAPI entityref_get_xml(
TRACE("(%p)->(%p)\n", This, p);
return node_get_xml(&This->node, FALSE, FALSE, p);
return node_get_xml(&This->node, FALSE, p);
}
static HRESULT WINAPI entityref_transformNode(

View file

@ -329,7 +329,7 @@ extern HRESULT node_get_next_sibling(xmlnode*,IXMLDOMNode**) DECLSPEC_HIDDEN;
extern HRESULT node_insert_before(xmlnode*,IXMLDOMNode*,const VARIANT*,IXMLDOMNode**) DECLSPEC_HIDDEN;
extern HRESULT node_replace_child(xmlnode*,IXMLDOMNode*,IXMLDOMNode*,IXMLDOMNode**) DECLSPEC_HIDDEN;
extern HRESULT node_put_text(xmlnode*,BSTR) DECLSPEC_HIDDEN;
extern HRESULT node_get_xml(xmlnode*,BOOL,BOOL,BSTR*) DECLSPEC_HIDDEN;
extern HRESULT node_get_xml(xmlnode*,BOOL,BSTR*) DECLSPEC_HIDDEN;
extern HRESULT node_clone(xmlnode*,VARIANT_BOOL,IXMLDOMNode**) DECLSPEC_HIDDEN;
extern HRESULT node_get_prefix(xmlnode*,BSTR*) DECLSPEC_HIDDEN;
extern HRESULT node_get_base_name(xmlnode*,BSTR*) DECLSPEC_HIDDEN;

View file

@ -787,37 +787,6 @@ BSTR EnsureCorrectEOL(BSTR sInput)
return sNew;
}
/* Removes encoding information and last character (nullbyte) */
static BSTR EnsureNoEncoding(BSTR sInput)
{
static const WCHAR wszEncoding[] = {'e','n','c','o','d','i','n','g','='};
BSTR sNew;
WCHAR *pBeg, *pEnd;
pBeg = sInput;
while(*pBeg != '\n' && memcmp(pBeg, wszEncoding, sizeof(wszEncoding)))
pBeg++;
if(*pBeg == '\n')
{
SysReAllocStringLen(&sInput, sInput, SysStringLen(sInput)-1);
return sInput;
}
pBeg--;
pEnd = pBeg + sizeof(wszEncoding)/sizeof(WCHAR) + 2;
while(*pEnd != '\"') pEnd++;
pEnd++;
sNew = SysAllocStringLen(NULL,
pBeg-sInput + SysStringLen(sInput)-(pEnd-sInput)-1);
memcpy(sNew, sInput, (pBeg-sInput)*sizeof(WCHAR));
memcpy(&sNew[pBeg-sInput], pEnd, (SysStringLen(sInput)-(pEnd-sInput)-1)*sizeof(WCHAR));
SysFreeString(sInput);
return sNew;
}
/*
* We are trying to replicate the same behaviour as msxml by converting
* line endings to \r\n and using indents as \t. The problem is that msxml
@ -825,7 +794,7 @@ static BSTR EnsureNoEncoding(BSTR sInput)
* reproduce behaviour exactly.
*
*/
HRESULT node_get_xml(xmlnode *This, BOOL ensure_eol, BOOL ensure_no_encoding, BSTR *ret)
HRESULT node_get_xml(xmlnode *This, BOOL ensure_eol, BSTR *ret)
{
xmlBufferPtr xml_buf;
xmlNodePtr xmldecl;
@ -853,8 +822,6 @@ HRESULT node_get_xml(xmlnode *This, BOOL ensure_eol, BOOL ensure_no_encoding, BS
content = bstr_from_xmlChar(buf_content + (buf_content[0] == ' ' ? 1 : 0));
if(ensure_eol)
content = EnsureCorrectEOL(content);
if(ensure_no_encoding)
content = EnsureNoEncoding(content);
*ret = content;
}else {
@ -1453,7 +1420,7 @@ static HRESULT WINAPI unknode_get_xml(
FIXME("(%p)->(%p)\n", This, p);
return node_get_xml(&This->node, FALSE, FALSE, p);
return node_get_xml(&This->node, FALSE, p);
}
static HRESULT WINAPI unknode_transformNode(

View file

@ -487,7 +487,7 @@ static HRESULT WINAPI dom_pi_get_xml(
TRACE("(%p)->(%p)\n", This, p);
return node_get_xml(&This->node, FALSE, FALSE, p);
return node_get_xml(&This->node, FALSE, p);
}
static HRESULT WINAPI dom_pi_transformNode(

View file

@ -514,7 +514,7 @@ static HRESULT WINAPI domtext_get_xml(
TRACE("(%p)->(%p)\n", This, p);
return node_get_xml(&This->node, FALSE, FALSE, p);
return node_get_xml(&This->node, FALSE, p);
}
static HRESULT WINAPI domtext_transformNode(