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
4cddf045
Commit
4cddf045
authored
Mar 14, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 14, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Implement getValue() for MXAttributes.
parent
99db789e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
4 deletions
+51
-4
mxwriter.c
dlls/msxml3/mxwriter.c
+14
-4
saxreader.c
dlls/msxml3/tests/saxreader.c
+37
-0
No files found.
dlls/msxml3/mxwriter.c
View file @
4cddf045
...
...
@@ -1819,12 +1819,22 @@ static HRESULT WINAPI SAXAttributes_getTypeFromQName(ISAXAttributes *iface, cons
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
SAXAttributes_getValue
(
ISAXAttributes
*
iface
,
int
nIndex
,
const
WCHAR
**
pV
alue
,
int
*
nValue
)
static
HRESULT
WINAPI
SAXAttributes_getValue
(
ISAXAttributes
*
iface
,
int
index
,
const
WCHAR
**
v
alue
,
int
*
len
)
{
mxattributes
*
This
=
impl_from_ISAXAttributes
(
iface
);
FIXME
(
"(%p)->(%d %p %p): stub
\n
"
,
This
,
nIndex
,
pValue
,
nValue
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%d %p %p)
\n
"
,
This
,
index
,
value
,
len
);
if
(
index
>=
This
->
length
)
return
E_INVALIDARG
;
if
((
!
value
||
!
len
)
&&
(
This
->
class_version
==
MSXML_DEFAULT
||
This
->
class_version
==
MSXML3
))
return
E_POINTER
;
*
value
=
This
->
attr
[
index
].
value
;
*
len
=
SysStringLen
(
This
->
attr
[
index
].
value
);
return
S_OK
;
}
static
HRESULT
WINAPI
SAXAttributes_getValueFromName
(
ISAXAttributes
*
iface
,
const
WCHAR
*
pUri
,
...
...
dlls/msxml3/tests/saxreader.c
View file @
4cddf045
...
...
@@ -3298,6 +3298,7 @@ static void test_mxattr_addAttribute(void)
{
ISAXAttributes
*
saxattr
;
IMXAttributes
*
mxattr
;
const
WCHAR
*
value
;
HRESULT
hr
;
int
len
;
...
...
@@ -3328,10 +3329,46 @@ static void test_mxattr_addAttribute(void)
EXPECT_HR
(
hr
,
S_OK
);
ok
(
len
==
0
,
"got %d
\n
"
,
len
);
hr
=
ISAXAttributes_getValue
(
saxattr
,
0
,
&
value
,
&
len
);
EXPECT_HR
(
hr
,
E_INVALIDARG
);
hr
=
ISAXAttributes_getValue
(
saxattr
,
0
,
NULL
,
&
len
);
EXPECT_HR
(
hr
,
E_INVALIDARG
);
hr
=
ISAXAttributes_getValue
(
saxattr
,
0
,
&
value
,
NULL
);
EXPECT_HR
(
hr
,
E_INVALIDARG
);
hr
=
ISAXAttributes_getValue
(
saxattr
,
0
,
NULL
,
NULL
);
EXPECT_HR
(
hr
,
E_INVALIDARG
);
hr
=
IMXAttributes_addAttribute
(
mxattr
,
_bstr_
(
table
->
uri
),
_bstr_
(
table
->
local
),
_bstr_
(
table
->
qname
),
_bstr_
(
table
->
type
),
_bstr_
(
table
->
value
));
ok
(
hr
==
table
->
hr
,
"%d: got 0x%08x, expected 0x%08x
\n
"
,
i
,
hr
,
table
->
hr
);
if
(
hr
==
S_OK
)
{
/* SAXAttributes40 and SAXAttributes60 both crash on this test */
if
(
IsEqualGUID
(
table
->
clsid
,
&
CLSID_SAXAttributes
)
||
IsEqualGUID
(
table
->
clsid
,
&
CLSID_SAXAttributes30
))
{
hr
=
ISAXAttributes_getValue
(
saxattr
,
0
,
NULL
,
&
len
);
EXPECT_HR
(
hr
,
E_POINTER
);
hr
=
ISAXAttributes_getValue
(
saxattr
,
0
,
&
value
,
NULL
);
EXPECT_HR
(
hr
,
E_POINTER
);
hr
=
ISAXAttributes_getValue
(
saxattr
,
0
,
NULL
,
NULL
);
EXPECT_HR
(
hr
,
E_POINTER
);
}
len
=
-
1
;
hr
=
ISAXAttributes_getValue
(
saxattr
,
0
,
&
value
,
&
len
);
EXPECT_HR
(
hr
,
S_OK
);
ok
(
!
lstrcmpW
(
_bstr_
(
table
->
value
),
value
),
"%d: got %s, expected %s
\n
"
,
i
,
wine_dbgstr_w
(
value
),
table
->
value
);
ok
(
lstrlenW
(
value
)
==
len
,
"%d: got wrong value length %d
\n
"
,
i
,
len
);
}
len
=
-
1
;
hr
=
ISAXAttributes_getLength
(
saxattr
,
&
len
);
EXPECT_HR
(
hr
,
S_OK
);
...
...
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