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
eef194a7
Commit
eef194a7
authored
Oct 30, 2010
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 01, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Implement a trivial case of ::put_nodeTypedValue() for elements.
parent
94f74a7c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
72 additions
and
2 deletions
+72
-2
element.c
dlls/msxml3/element.c
+29
-2
domdoc.c
dlls/msxml3/tests/domdoc.c
+43
-0
No files found.
dlls/msxml3/element.c
View file @
eef194a7
...
...
@@ -434,10 +434,37 @@ static HRESULT WINAPI domelem_get_nodeTypedValue(
static
HRESULT
WINAPI
domelem_put_nodeTypedValue
(
IXMLDOMElement
*
iface
,
VARIANT
va
r1
)
VARIANT
va
lue
)
{
domelem
*
This
=
impl_from_IXMLDOMElement
(
iface
);
return
IXMLDOMNode_put_nodeTypedValue
(
IXMLDOMNode_from_impl
(
&
This
->
node
),
var1
);
VARIANT
type
;
HRESULT
hr
;
TRACE
(
"(%p)
\n
"
,
This
);
/* for untyped node coerce to BSTR and set */
if
(
IXMLDOMElement_get_dataType
(
iface
,
&
type
)
==
S_FALSE
)
{
if
(
V_VT
(
&
value
)
!=
VT_BSTR
)
{
hr
=
VariantChangeType
(
&
value
,
&
value
,
0
,
VT_BSTR
);
if
(
hr
==
S_OK
)
{
hr
=
node_set_content
(
&
This
->
node
,
V_BSTR
(
&
value
));
VariantClear
(
&
value
);
}
}
else
hr
=
node_set_content
(
&
This
->
node
,
V_BSTR
(
&
value
));
}
else
{
FIXME
(
"not implemented for typed nodes. type %s
\n
"
,
debugstr_w
(
V_BSTR
(
&
value
)));
VariantClear
(
&
type
);
return
E_NOTIMPL
;
}
return
hr
;
}
static
HRESULT
WINAPI
domelem_get_dataType
(
...
...
dlls/msxml3/tests/domdoc.c
View file @
eef194a7
...
...
@@ -7409,6 +7409,48 @@ static void test_createProcessingInstruction(void)
IXMLDOMDocument_Release
(
doc
);
}
static
void
test_put_nodeTypedValue
(
void
)
{
IXMLDOMDocument
*
doc
;
IXMLDOMElement
*
elem
;
VARIANT
type
;
HRESULT
hr
;
doc
=
create_document
(
&
IID_IXMLDOMDocument
);
if
(
!
doc
)
return
;
hr
=
IXMLDOMDocument_createElement
(
doc
,
_bstr_
(
"Element"
),
&
elem
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
V_VT
(
&
type
)
=
VT_EMPTY
;
hr
=
IXMLDOMElement_get_dataType
(
elem
,
&
type
);
ok
(
hr
==
S_FALSE
,
"got 0x%08x
\n
"
,
hr
);
ok
(
V_VT
(
&
type
)
==
VT_NULL
,
"got %d, expected VT_NULL
\n
"
,
V_VT
(
&
type
));
/* set typed value for untyped node */
V_VT
(
&
type
)
=
VT_I1
;
V_I1
(
&
type
)
=
1
;
hr
=
IXMLDOMElement_put_nodeTypedValue
(
elem
,
type
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
V_VT
(
&
type
)
=
VT_EMPTY
;
hr
=
IXMLDOMElement_get_dataType
(
elem
,
&
type
);
ok
(
hr
==
S_FALSE
,
"got 0x%08x
\n
"
,
hr
);
ok
(
V_VT
(
&
type
)
==
VT_NULL
,
"got %d, expected VT_NULL
\n
"
,
V_VT
(
&
type
));
/* no type info stored */
V_VT
(
&
type
)
=
VT_EMPTY
;
hr
=
IXMLDOMElement_get_nodeTypedValue
(
elem
,
&
type
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
V_VT
(
&
type
)
==
VT_BSTR
,
"got %d, expected VT_BSTR
\n
"
,
V_VT
(
&
type
));
ok
(
memcmp
(
V_BSTR
(
&
type
),
_bstr_
(
"1"
),
2
*
sizeof
(
WCHAR
))
==
0
,
"got %s, expected
\"
1
\"\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
type
)));
VariantClear
(
&
type
);
IXMLDOMDocument_Release
(
doc
);
free_bstrs
();
}
START_TEST
(
domdoc
)
{
IXMLDOMDocument
*
doc
;
...
...
@@ -7471,6 +7513,7 @@ START_TEST(domdoc)
test_selectSingleNode
();
test_events
();
test_createProcessingInstruction
();
test_put_nodeTypedValue
();
CoUninitialize
();
}
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