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
72187762
Commit
72187762
authored
Mar 15, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 15, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Implement getValueFromQName() for MXAttributes.
parent
10a584a6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
4 deletions
+49
-4
mxwriter.c
dlls/msxml3/mxwriter.c
+15
-4
saxreader.c
dlls/msxml3/tests/saxreader.c
+34
-0
No files found.
dlls/msxml3/mxwriter.c
View file @
72187762
...
...
@@ -1873,12 +1873,23 @@ static HRESULT WINAPI SAXAttributes_getValueFromName(ISAXAttributes *iface, cons
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
SAXAttributes_getValueFromQName
(
ISAXAttributes
*
iface
,
const
WCHAR
*
pQN
ame
,
int
nQName
,
const
WCHAR
**
pValue
,
int
*
nValue
)
static
HRESULT
WINAPI
SAXAttributes_getValueFromQName
(
ISAXAttributes
*
iface
,
const
WCHAR
*
qn
ame
,
int
qname_len
,
const
WCHAR
**
value
,
int
*
value_len
)
{
mxattributes
*
This
=
impl_from_ISAXAttributes
(
iface
);
FIXME
(
"(%p)->(%s:%d %p %p): stub
\n
"
,
This
,
debugstr_wn
(
pQName
,
nQName
),
nQName
,
pValue
,
nValue
);
return
E_NOTIMPL
;
HRESULT
hr
;
int
index
;
TRACE
(
"(%p)->(%s:%d %p %p)
\n
"
,
This
,
debugstr_wn
(
qname
,
qname_len
),
qname_len
,
value
,
value_len
);
if
(
!
qname
||
!
value
||
!
value_len
)
return
(
This
->
class_version
==
MSXML_DEFAULT
||
This
->
class_version
==
MSXML3
)
?
E_POINTER
:
E_INVALIDARG
;
hr
=
ISAXAttributes_getIndexFromQName
(
iface
,
qname
,
qname_len
,
&
index
);
if
(
hr
==
S_OK
)
hr
=
ISAXAttributes_getValue
(
iface
,
index
,
value
,
value_len
);
return
hr
;
}
static
const
ISAXAttributesVtbl
SAXAttributesVtbl
=
{
...
...
dlls/msxml3/tests/saxreader.c
View file @
72187762
...
...
@@ -3437,6 +3437,40 @@ static void test_mxattr_addAttribute(void)
hr
=
ISAXAttributes_getIndexFromQName
(
saxattr
,
_bstr_
(
table
->
qname
),
strlen
(
table
->
qname
)
-
1
,
&
index
);
EXPECT_HR
(
hr
,
E_INVALIDARG
);
ok
(
index
==
-
1
,
"%d: got wrong index %d
\n
"
,
i
,
index
);
if
(
IsEqualGUID
(
table
->
clsid
,
&
CLSID_SAXAttributes40
)
||
IsEqualGUID
(
table
->
clsid
,
&
CLSID_SAXAttributes60
))
{
hr
=
ISAXAttributes_getValueFromQName
(
saxattr
,
NULL
,
0
,
NULL
,
NULL
);
EXPECT_HR
(
hr
,
E_INVALIDARG
);
hr
=
ISAXAttributes_getValueFromQName
(
saxattr
,
_bstr_
(
table
->
qname
),
0
,
NULL
,
NULL
);
EXPECT_HR
(
hr
,
E_INVALIDARG
);
hr
=
ISAXAttributes_getValueFromQName
(
saxattr
,
_bstr_
(
table
->
qname
),
0
,
&
value
,
NULL
);
EXPECT_HR
(
hr
,
E_INVALIDARG
);
}
else
{
hr
=
ISAXAttributes_getValueFromQName
(
saxattr
,
NULL
,
0
,
NULL
,
NULL
);
EXPECT_HR
(
hr
,
E_POINTER
);
hr
=
ISAXAttributes_getValueFromQName
(
saxattr
,
_bstr_
(
table
->
qname
),
0
,
NULL
,
NULL
);
EXPECT_HR
(
hr
,
E_POINTER
);
hr
=
ISAXAttributes_getValueFromQName
(
saxattr
,
_bstr_
(
table
->
qname
),
0
,
&
value
,
NULL
);
EXPECT_HR
(
hr
,
E_POINTER
);
/* versions 4 and 6 crash */
hr
=
ISAXAttributes_getValueFromQName
(
saxattr
,
_bstr_
(
table
->
qname
),
strlen
(
table
->
qname
),
NULL
,
NULL
);
EXPECT_HR
(
hr
,
E_POINTER
);
hr
=
ISAXAttributes_getValueFromQName
(
saxattr
,
_bstr_
(
table
->
qname
),
strlen
(
table
->
qname
),
NULL
,
&
len
);
EXPECT_HR
(
hr
,
E_POINTER
);
}
hr
=
ISAXAttributes_getValueFromQName
(
saxattr
,
_bstr_
(
table
->
qname
),
strlen
(
table
->
qname
),
&
value
,
&
len
);
EXPECT_HR
(
hr
,
S_OK
);
}
len
=
-
1
;
...
...
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