Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
b7ac3bde
Commit
b7ac3bde
authored
Oct 11, 2008
by
Michael Karcher
Committed by
Alexandre Julliard
Oct 13, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: IXMLDOMNode_put_nodeValue: Use variant coercion.
parent
c7293055
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
3 deletions
+39
-3
node.c
dlls/msxml3/node.c
+15
-3
domdoc.c
dlls/msxml3/tests/domdoc.c
+24
-0
No files found.
dlls/msxml3/node.c
View file @
b7ac3bde
...
...
@@ -344,11 +344,22 @@ static HRESULT WINAPI xmlnode_put_nodeValue(
VARIANT
value
)
{
xmlnode
*
This
=
impl_from_IXMLDOMNode
(
iface
);
HRESULT
hr
=
S_FALSE
;
HRESULT
hr
;
xmlChar
*
str
=
NULL
;
VARIANT
string_value
;
TRACE
(
"%p type(%d)
\n
"
,
This
,
This
->
node
->
type
);
VariantInit
(
&
string_value
);
hr
=
VariantChangeType
(
&
string_value
,
&
value
,
0
,
VT_BSTR
);
if
(
FAILED
(
hr
))
{
VariantClear
(
&
string_value
);
WARN
(
"Couldn't convert to VT_BSTR
\n
"
);
return
hr
;
}
hr
=
S_FALSE
;
/* Document, Document Fragment, Document Type, Element,
Entity, Entity Reference, Notation aren't supported. */
switch
(
This
->
node
->
type
)
...
...
@@ -359,8 +370,7 @@ static HRESULT WINAPI xmlnode_put_nodeValue(
case
XML_PI_NODE
:
case
XML_TEXT_NODE
:
{
str
=
xmlChar_from_wchar
((
WCHAR
*
)
V_BSTR
(
&
value
));
str
=
xmlChar_from_wchar
((
WCHAR
*
)
V_BSTR
(
&
string_value
));
xmlNodeSetContent
(
This
->
node
,
str
);
hr
=
S_OK
;
break
;
...
...
@@ -370,6 +380,8 @@ static HRESULT WINAPI xmlnode_put_nodeValue(
break
;
}
VariantClear
(
&
string_value
);
return
hr
;
}
...
...
dlls/msxml3/tests/domdoc.c
View file @
b7ac3bde
...
...
@@ -724,6 +724,30 @@ static void test_domdoc( void )
ok
(
!
lstrcmpW
(
str
,
_bstr_
(
"Begin This &is a Middle; test <>
\\
Append End"
)
),
"incorrect get_text string
\n
"
);
SysFreeString
(
str
);
/* test put_data */
V_VT
(
&
var
)
=
VT_BSTR
;
V_BSTR
(
&
var
)
=
SysAllocString
(
szstr1
);
r
=
IXMLDOMText_put_nodeValue
(
nodetext
,
var
);
ok
(
r
==
S_OK
,
"ret %08x
\n
"
,
r
);
VariantClear
(
&
var
);
r
=
IXMLDOMText_get_text
(
nodetext
,
&
str
);
ok
(
r
==
S_OK
,
"ret %08x
\n
"
,
r
);
ok
(
!
lstrcmpW
(
str
,
szstr1
),
"incorrect get_text string
\n
"
);
SysFreeString
(
str
);
/* test put_data */
V_VT
(
&
var
)
=
VT_I4
;
V_I4
(
&
var
)
=
99
;
r
=
IXMLDOMText_put_nodeValue
(
nodetext
,
var
);
ok
(
r
==
S_OK
,
"ret %08x
\n
"
,
r
);
VariantClear
(
&
var
);
r
=
IXMLDOMText_get_text
(
nodetext
,
&
str
);
ok
(
r
==
S_OK
,
"ret %08x
\n
"
,
r
);
ok
(
!
lstrcmpW
(
str
,
_bstr_
(
"99"
)
),
"incorrect get_text string
\n
"
);
SysFreeString
(
str
);
IXMLDOMText_Release
(
nodetext
);
}
...
...
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