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
c685b92b
Commit
c685b92b
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 getIndexFromQName() for MXAttributes.
parent
69bc0966
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
5 deletions
+54
-5
mxwriter.c
dlls/msxml3/mxwriter.c
+21
-4
saxreader.c
dlls/msxml3/tests/saxreader.c
+33
-1
No files found.
dlls/msxml3/mxwriter.c
View file @
c685b92b
...
...
@@ -1786,12 +1786,29 @@ static HRESULT WINAPI SAXAttributes_getIndexFromName(ISAXAttributes *iface, cons
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
SAXAttributes_getIndexFromQName
(
ISAXAttributes
*
iface
,
const
WCHAR
*
pQN
ame
,
int
nQNameLength
,
int
*
index
)
static
HRESULT
WINAPI
SAXAttributes_getIndexFromQName
(
ISAXAttributes
*
iface
,
const
WCHAR
*
qn
ame
,
int
len
,
int
*
index
)
{
mxattributes
*
This
=
impl_from_ISAXAttributes
(
iface
);
FIXME
(
"(%p)->(%s:%d %p): stub
\n
"
,
This
,
debugstr_wn
(
pQName
,
nQNameLength
),
nQNameLength
,
index
);
return
E_NOTIMPL
;
int
i
;
TRACE
(
"(%p)->(%s:%d %p)
\n
"
,
This
,
debugstr_wn
(
qname
,
len
),
len
,
index
);
if
(
!
index
&&
(
This
->
class_version
==
MSXML_DEFAULT
||
This
->
class_version
==
MSXML3
))
return
E_POINTER
;
if
(
!
qname
||
!
index
||
!
len
)
return
E_INVALIDARG
;
for
(
i
=
0
;
i
<
This
->
length
;
i
++
)
{
if
(
len
!=
SysStringLen
(
This
->
attr
[
i
].
qname
))
continue
;
if
(
strncmpW
(
qname
,
This
->
attr
[
i
].
qname
,
len
))
continue
;
*
index
=
i
;
return
S_OK
;
}
return
E_INVALIDARG
;
}
static
HRESULT
WINAPI
SAXAttributes_getType
(
ISAXAttributes
*
iface
,
int
index
,
const
WCHAR
**
type
,
...
...
dlls/msxml3/tests/saxreader.c
View file @
c685b92b
...
...
@@ -3299,8 +3299,8 @@ static void test_mxattr_addAttribute(void)
ISAXAttributes
*
saxattr
;
IMXAttributes
*
mxattr
;
const
WCHAR
*
value
;
int
len
,
index
;
HRESULT
hr
;
int
len
;
if
(
!
is_clsid_supported
(
table
->
clsid
,
mxattributes_support_data
))
{
...
...
@@ -3405,6 +3405,38 @@ static void test_mxattr_addAttribute(void)
ok
(
*
value
==
0
,
"%d: got type value %s
\n
"
,
i
,
wine_dbgstr_w
(
value
));
ok
(
len
==
0
,
"%d: got wrong type value length %d
\n
"
,
i
,
len
);
}
hr
=
ISAXAttributes_getIndexFromQName
(
saxattr
,
NULL
,
0
,
NULL
);
if
(
IsEqualGUID
(
table
->
clsid
,
&
CLSID_SAXAttributes
)
||
IsEqualGUID
(
table
->
clsid
,
&
CLSID_SAXAttributes30
))
{
EXPECT_HR
(
hr
,
E_POINTER
);
}
else
EXPECT_HR
(
hr
,
E_INVALIDARG
);
hr
=
ISAXAttributes_getIndexFromQName
(
saxattr
,
NULL
,
0
,
&
index
);
EXPECT_HR
(
hr
,
E_INVALIDARG
);
index
=
-
1
;
hr
=
ISAXAttributes_getIndexFromQName
(
saxattr
,
_bstr_
(
"nonexistent"
),
11
,
&
index
);
EXPECT_HR
(
hr
,
E_INVALIDARG
);
ok
(
index
==
-
1
,
"%d: got wrong index %d
\n
"
,
i
,
index
);
index
=
-
1
;
hr
=
ISAXAttributes_getIndexFromQName
(
saxattr
,
_bstr_
(
table
->
qname
),
0
,
&
index
);
EXPECT_HR
(
hr
,
E_INVALIDARG
);
ok
(
index
==
-
1
,
"%d: got wrong index %d
\n
"
,
i
,
index
);
index
=
-
1
;
hr
=
ISAXAttributes_getIndexFromQName
(
saxattr
,
_bstr_
(
table
->
qname
),
strlen
(
table
->
qname
),
&
index
);
EXPECT_HR
(
hr
,
S_OK
);
ok
(
index
==
0
,
"%d: got wrong index %d
\n
"
,
i
,
index
);
index
=
-
1
;
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
);
}
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