Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
6241b9d6
Commit
6241b9d6
authored
Oct 29, 2010
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 29, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Don't use xmlnode's IXMLDOMNode iface in get_xml implementations.
parent
d147ee13
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
69 additions
and
55 deletions
+69
-55
attribute.c
dlls/msxml3/attribute.c
+4
-1
cdata.c
dlls/msxml3/cdata.c
+4
-1
comment.c
dlls/msxml3/comment.c
+4
-1
docfrag.c
dlls/msxml3/docfrag.c
+4
-1
domdoc.c
dlls/msxml3/domdoc.c
+5
-2
element.c
dlls/msxml3/element.c
+4
-1
entityref.c
dlls/msxml3/entityref.c
+4
-1
msxml_private.h
dlls/msxml3/msxml_private.h
+2
-0
node.c
dlls/msxml3/node.c
+30
-45
pi.c
dlls/msxml3/pi.c
+4
-1
text.c
dlls/msxml3/text.c
+4
-1
No files found.
dlls/msxml3/attribute.c
View file @
6241b9d6
...
...
@@ -446,7 +446,10 @@ static HRESULT WINAPI domattr_get_xml(
BSTR
*
p
)
{
domattr
*
This
=
impl_from_IXMLDOMAttribute
(
iface
);
return
IXMLDOMNode_get_xml
(
IXMLDOMNode_from_impl
(
&
This
->
node
),
p
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
node_get_xml
(
&
This
->
node
,
FALSE
,
FALSE
,
p
);
}
static
HRESULT
WINAPI
domattr_transformNode
(
...
...
dlls/msxml3/cdata.c
View file @
6241b9d6
...
...
@@ -457,7 +457,10 @@ static HRESULT WINAPI domcdata_get_xml(
BSTR
*
p
)
{
domcdata
*
This
=
impl_from_IXMLDOMCDATASection
(
iface
);
return
IXMLDOMNode_get_xml
(
IXMLDOMNode_from_impl
(
&
This
->
node
),
p
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
node_get_xml
(
&
This
->
node
,
FALSE
,
FALSE
,
p
);
}
static
HRESULT
WINAPI
domcdata_transformNode
(
...
...
dlls/msxml3/comment.c
View file @
6241b9d6
...
...
@@ -450,7 +450,10 @@ static HRESULT WINAPI domcomment_get_xml(
BSTR
*
p
)
{
domcomment
*
This
=
impl_from_IXMLDOMComment
(
iface
);
return
IXMLDOMNode_get_xml
(
IXMLDOMNode_from_impl
(
&
This
->
node
),
p
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
node_get_xml
(
&
This
->
node
,
FALSE
,
FALSE
,
p
);
}
static
HRESULT
WINAPI
domcomment_transformNode
(
...
...
dlls/msxml3/docfrag.c
View file @
6241b9d6
...
...
@@ -454,7 +454,10 @@ static HRESULT WINAPI domfrag_get_xml(
BSTR
*
p
)
{
domfrag
*
This
=
impl_from_IXMLDOMDocumentFragment
(
iface
);
return
IXMLDOMNode_get_xml
(
IXMLDOMNode_from_impl
(
&
This
->
node
),
p
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
node_get_xml
(
&
This
->
node
,
FALSE
,
FALSE
,
p
);
}
static
HRESULT
WINAPI
domfrag_transformNode
(
...
...
dlls/msxml3/domdoc.c
View file @
6241b9d6
...
...
@@ -1268,10 +1268,13 @@ static HRESULT WINAPI domdoc_put_dataType(
static
HRESULT
WINAPI
domdoc_get_xml
(
IXMLDOMDocument3
*
iface
,
BSTR
*
xmlString
)
BSTR
*
p
)
{
domdoc
*
This
=
impl_from_IXMLDOMDocument3
(
iface
);
return
IXMLDOMNode_get_xml
(
IXMLDOMNode_from_impl
(
&
This
->
node
),
xmlString
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
node_get_xml
(
&
This
->
node
,
TRUE
,
TRUE
,
p
);
}
...
...
dlls/msxml3/element.c
View file @
6241b9d6
...
...
@@ -475,7 +475,10 @@ static HRESULT WINAPI domelem_get_xml(
BSTR
*
p
)
{
domelem
*
This
=
impl_from_IXMLDOMElement
(
iface
);
return
IXMLDOMNode_get_xml
(
IXMLDOMNode_from_impl
(
&
This
->
node
),
p
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
node_get_xml
(
&
This
->
node
,
TRUE
,
FALSE
,
p
);
}
static
HRESULT
WINAPI
domelem_transformNode
(
...
...
dlls/msxml3/entityref.c
View file @
6241b9d6
...
...
@@ -448,7 +448,10 @@ static HRESULT WINAPI entityref_get_xml(
BSTR
*
p
)
{
entityref
*
This
=
impl_from_IXMLDOMEntityReference
(
iface
);
return
IXMLDOMNode_get_xml
(
IXMLDOMNode_from_impl
(
&
This
->
node
),
p
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
node_get_xml
(
&
This
->
node
,
FALSE
,
FALSE
,
p
);
}
static
HRESULT
WINAPI
entityref_transformNode
(
...
...
dlls/msxml3/msxml_private.h
View file @
6241b9d6
...
...
@@ -106,6 +106,7 @@ BOOL dispex_query_interface(DispatchEx*,REFIID,void**);
#include <libxml/parser.h>
#endif
#include <libxml/xmlerror.h>
/* constructors */
...
...
@@ -190,6 +191,7 @@ 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
node_put_text
(
xmlnode
*
,
BSTR
);
extern
HRESULT
node_get_xml
(
xmlnode
*
,
BOOL
,
BOOL
,
BSTR
*
);
extern
HRESULT
DOMDocument_create_from_xmldoc
(
xmlDocPtr
xmldoc
,
IXMLDOMDocument3
**
document
);
...
...
dlls/msxml3/node.c
View file @
6241b9d6
...
...
@@ -978,63 +978,45 @@ static BSTR EnsureNoEncoding(BSTR sInput)
* reproduce behaviour exactly.
*
*/
static
HRESULT
WINAPI
xmlnode_get_xml
(
IXMLDOMNode
*
iface
,
BSTR
*
xmlString
)
HRESULT
node_get_xml
(
xmlnode
*
This
,
BOOL
ensure_eol
,
BOOL
ensure_no_encoding
,
BSTR
*
ret
)
{
xmlnode
*
This
=
impl_from_IXMLDOMNode
(
iface
);
xmlBufferPtr
pXmlBuf
;
xmlBufferPtr
xml_buf
;
xmlNodePtr
xmldecl
;
int
nS
ize
;
int
s
ize
;
TRACE
(
"(%p %d)->(%p)
\n
"
,
This
,
This
->
node
->
type
,
xmlString
);
if
(
!
xmlString
)
if
(
!
ret
)
return
E_INVALIDARG
;
*
xmlString
=
NULL
;
*
ret
=
NULL
;
xml_buf
=
xmlBufferCreate
();
if
(
!
xml_buf
)
return
E_OUTOFMEMORY
;
xmldecl
=
xmldoc_unlink_xmldecl
(
This
->
node
->
doc
);
pXmlBuf
=
xmlBufferCreate
();
if
(
pXmlBuf
)
{
nSize
=
xmlNodeDump
(
pXmlBuf
,
This
->
node
->
doc
,
This
->
node
,
0
,
1
);
if
(
nSize
>
0
)
{
const
xmlChar
*
pContent
;
BSTR
bstrContent
;
size
=
xmlNodeDump
(
xml_buf
,
This
->
node
->
doc
,
This
->
node
,
0
,
1
);
if
(
size
>
0
)
{
const
xmlChar
*
buf_content
;
BSTR
content
;
/* Attribute Nodes return a space in front of their name */
pContent
=
xmlBufferContent
(
pXmlBuf
);
if
(
((
const
char
*
)
pContent
)[
0
]
==
' '
)
bstrContent
=
bstr_from_xmlChar
(
pContent
+
1
);
else
bstrContent
=
bstr_from_xmlChar
(
pContent
);
/* Attribute Nodes return a space in front of their name */
buf_content
=
xmlBufferContent
(
xml_buf
);
switch
(
This
->
node
->
type
)
{
case
XML_ELEMENT_NODE
:
*
xmlString
=
EnsureCorrectEOL
(
bstrContent
);
break
;
case
XML_DOCUMENT_NODE
:
*
xmlString
=
EnsureCorrectEOL
(
bstrContent
);
*
xmlString
=
EnsureNoEncoding
(
*
xmlString
);
break
;
default:
*
xmlString
=
bstrContent
;
}
}
content
=
bstr_from_xmlChar
(
buf_content
+
(
buf_content
[
0
]
==
' '
?
1
:
0
));
if
(
ensure_eol
)
content
=
EnsureCorrectEOL
(
content
);
if
(
ensure_no_encoding
)
content
=
EnsureNoEncoding
(
content
);
xmlBufferFree
(
pXmlBuf
);
*
ret
=
content
;
}
else
{
*
ret
=
SysAllocStringLen
(
NULL
,
0
);
}
xmlBufferFree
(
xml_buf
);
xmldoc_link_xmldecl
(
This
->
node
->
doc
,
xmldecl
);
/* Always returns a string. */
if
(
*
xmlString
==
NULL
)
*
xmlString
=
SysAllocStringLen
(
NULL
,
0
);
return
S_OK
;
return
*
ret
?
S_OK
:
E_OUTOFMEMORY
;
}
static
HRESULT
WINAPI
xmlnode_transformNode
(
...
...
@@ -1283,7 +1265,7 @@ static const struct IXMLDOMNodeVtbl xmlnode_vtbl =
xmlnode_put_nodeTypedValue
,
NULL
,
xmlnode_put_dataType
,
xmlnode_get_xml
,
NULL
,
xmlnode_transformNode
,
xmlnode_selectNodes
,
xmlnode_selectSingleNode
,
...
...
@@ -1731,7 +1713,10 @@ static HRESULT WINAPI unknode_get_xml(
BSTR
*
p
)
{
unknode
*
This
=
impl_from_unkIXMLDOMNode
(
iface
);
return
IXMLDOMNode_get_xml
(
IXMLDOMNode_from_impl
(
&
This
->
node
),
p
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
node_get_xml
(
&
This
->
node
,
FALSE
,
FALSE
,
p
);
}
static
HRESULT
WINAPI
unknode_transformNode
(
...
...
dlls/msxml3/pi.c
View file @
6241b9d6
...
...
@@ -464,7 +464,10 @@ static HRESULT WINAPI dom_pi_get_xml(
BSTR
*
p
)
{
dom_pi
*
This
=
impl_from_IXMLDOMProcessingInstruction
(
iface
);
return
IXMLDOMNode_get_xml
(
IXMLDOMNode_from_impl
(
&
This
->
node
),
p
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
node_get_xml
(
&
This
->
node
,
FALSE
,
FALSE
,
p
);
}
static
HRESULT
WINAPI
dom_pi_transformNode
(
...
...
dlls/msxml3/text.c
View file @
6241b9d6
...
...
@@ -463,7 +463,10 @@ static HRESULT WINAPI domtext_get_xml(
BSTR
*
p
)
{
domtext
*
This
=
impl_from_IXMLDOMText
(
iface
);
return
IXMLDOMNode_get_xml
(
IXMLDOMNode_from_impl
(
&
This
->
node
),
p
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
node_get_xml
(
&
This
->
node
,
FALSE
,
FALSE
,
p
);
}
static
HRESULT
WINAPI
domtext_transformNode
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment