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
892b2108
Commit
892b2108
authored
Jul 01, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jul 02, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Implement _newEnum() for schema cache.
parent
03ad0acf
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
29 deletions
+42
-29
msxml_private.h
dlls/msxml3/msxml_private.h
+1
-1
nodelist.c
dlls/msxml3/nodelist.c
+3
-2
schema.c
dlls/msxml3/schema.c
+14
-6
selection.c
dlls/msxml3/selection.c
+9
-11
domdoc.c
dlls/msxml3/tests/domdoc.c
+15
-9
No files found.
dlls/msxml3/msxml_private.h
View file @
892b2108
...
...
@@ -259,7 +259,7 @@ struct nodemap_funcs
/* used by IEnumVARIANT to access outer object items */
struct
enumvariant_funcs
{
HRESULT
(
*
get_item
)(
IUnknown
*
,
LONG
,
IDispatch
*
*
);
HRESULT
(
*
get_item
)(
IUnknown
*
,
LONG
,
VARIANT
*
);
HRESULT
(
*
next
)(
IUnknown
*
);
};
...
...
dlls/msxml3/nodelist.c
View file @
892b2108
...
...
@@ -62,9 +62,10 @@ typedef struct
IEnumVARIANT
*
enumvariant
;
}
xmlnodelist
;
static
HRESULT
nodelist_get_item
(
IUnknown
*
iface
,
LONG
index
,
IDispatch
**
item
)
static
HRESULT
nodelist_get_item
(
IUnknown
*
iface
,
LONG
index
,
VARIANT
*
item
)
{
return
IXMLDOMNodeList_get_item
((
IXMLDOMNodeList
*
)
iface
,
index
,
(
IXMLDOMNode
**
)
item
);
V_VT
(
item
)
=
VT_DISPATCH
;
return
IXMLDOMNodeList_get_item
((
IXMLDOMNodeList
*
)
iface
,
index
,
(
IXMLDOMNode
**
)
&
V_DISPATCH
(
item
));
}
static
const
struct
enumvariant_funcs
nodelist_enumvariant
=
{
...
...
dlls/msxml3/schema.c
View file @
892b2108
...
...
@@ -288,6 +288,17 @@ static void validate_serror(void* ctx, xmlErrorPtr err)
}
#endif
static
HRESULT
schema_cache_get_item
(
IUnknown
*
iface
,
LONG
index
,
VARIANT
*
item
)
{
V_VT
(
item
)
=
VT_BSTR
;
return
IXMLDOMSchemaCollection2_get_namespaceURI
((
IXMLDOMSchemaCollection2
*
)
iface
,
index
,
&
V_BSTR
(
item
));
}
static
const
struct
enumvariant_funcs
schemacache_enumvariant
=
{
schema_cache_get_item
,
NULL
};
static
inline
HRESULT
Schema_validate_tree
(
xmlSchemaPtr
schema
,
xmlNodePtr
tree
)
{
xmlSchemaValidCtxtPtr
svctx
;
...
...
@@ -1327,14 +1338,11 @@ static HRESULT WINAPI schema_cache_addCollection(IXMLDOMSchemaCollection2* iface
return
S_OK
;
}
static
HRESULT
WINAPI
schema_cache_get__newEnum
(
IXMLDOMSchemaCollection2
*
iface
,
IUnknown
**
ppUnk
)
static
HRESULT
WINAPI
schema_cache_get__newEnum
(
IXMLDOMSchemaCollection2
*
iface
,
IUnknown
**
enumv
)
{
schema_cache
*
This
=
impl_from_IXMLDOMSchemaCollection2
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
ppUnk
);
if
(
ppUnk
)
*
ppUnk
=
NULL
;
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
enumv
);
return
create_enumvariant
((
IUnknown
*
)
iface
,
TRUE
,
&
schemacache_enumvariant
,
(
IEnumVARIANT
**
)
enumv
);
}
static
HRESULT
WINAPI
schema_cache_validate
(
IXMLDOMSchemaCollection2
*
iface
)
...
...
dlls/msxml3/selection.c
View file @
892b2108
...
...
@@ -83,9 +83,10 @@ typedef struct
IEnumVARIANT
*
enumvariant
;
}
domselection
;
static
HRESULT
selection_get_item
(
IUnknown
*
iface
,
LONG
index
,
IDispatch
*
*
item
)
static
HRESULT
selection_get_item
(
IUnknown
*
iface
,
LONG
index
,
VARIANT
*
item
)
{
return
IXMLDOMSelection_get_item
((
IXMLDOMSelection
*
)
iface
,
index
,
(
IXMLDOMNode
**
)
item
);
V_VT
(
item
)
=
VT_DISPATCH
;
return
IXMLDOMSelection_get_item
((
IXMLDOMSelection
*
)
iface
,
index
,
(
IXMLDOMNode
**
)
&
V_DISPATCH
(
item
));
}
static
HRESULT
selection_next
(
IUnknown
*
iface
)
...
...
@@ -510,15 +511,12 @@ static HRESULT WINAPI enumvariant_Next(
for
(;
celt
>
0
;
celt
--
,
var
++
,
This
->
pos
++
)
{
IDispatch
*
disp
=
NULL
;
HRESULT
hr
;
hr
=
This
->
funcs
->
get_item
(
This
->
outer
,
This
->
pos
,
&
disp
);
if
(
hr
!=
S_OK
)
break
;
V_VT
(
var
)
=
VT_DISPATCH
;
V_DISPATCH
(
var
)
=
disp
;
HRESULT
hr
=
This
->
funcs
->
get_item
(
This
->
outer
,
This
->
pos
,
var
);
if
(
hr
!=
S_OK
)
{
V_VT
(
var
)
=
VT_EMPTY
;
break
;
}
ret_count
++
;
}
...
...
dlls/msxml3/tests/domdoc.c
View file @
892b2108
...
...
@@ -11700,7 +11700,8 @@ static void test_get_namespaces(void)
{
IXMLDOMSchemaCollection
*
collection
,
*
collection2
;
IXMLDOMDocument2
*
doc
,
*
doc2
;
IEnumVARIANT
*
enumv
;
IEnumVARIANT
*
enumv
,
*
enum2
;
IUnknown
*
unk1
,
*
unk2
;
IXMLDOMNode
*
node
;
VARIANT_BOOL
b
;
HRESULT
hr
;
...
...
@@ -11789,13 +11790,23 @@ static void test_get_namespaces(void)
/* enumerate */
enumv
=
(
void
*
)
0xdeadbeef
;
EXPECT_REF
(
collection
,
2
);
hr
=
IXMLDOMSchemaCollection_get__newEnum
(
collection
,
(
IUnknown
**
)
&
enumv
);
todo_wine
EXPECT_HR
(
hr
,
S_OK
);
if
(
hr
==
S_OK
)
{
EXPECT_REF
(
collection
,
3
);
ok
(
enumv
!=
NULL
,
"got %p
\n
"
,
enumv
);
hr
=
IXMLDOMSchemaCollection_QueryInterface
(
collection
,
&
IID_IUnknown
,
(
void
**
)
&
unk1
);
EXPECT_HR
(
hr
,
S_OK
);
hr
=
IEnumVARIANT_QueryInterface
(
enumv
,
&
IID_IUnknown
,
(
void
**
)
&
unk2
);
EXPECT_HR
(
hr
,
S_OK
);
ok
(
unk1
!=
unk2
,
"got %p, %p
\n
"
,
unk1
,
unk2
);
IUnknown_Release
(
unk1
);
IUnknown_Release
(
unk2
);
hr
=
IXMLDOMSchemaCollection_QueryInterface
(
collection
,
&
IID_IEnumVARIANT
,
(
void
**
)
&
enum2
);
EXPECT_HR
(
hr
,
E_NOINTERFACE
);
V_VT
(
&
v
)
=
VT_EMPTY
;
hr
=
IEnumVARIANT_Next
(
enumv
,
1
,
&
v
,
NULL
);
EXPECT_HR
(
hr
,
S_OK
);
...
...
@@ -11816,7 +11827,6 @@ todo_wine
ok
(
V_VT
(
&
v
)
==
VT_EMPTY
,
"got %d
\n
"
,
V_VT
(
&
v
));
IEnumVARIANT_Release
(
enumv
);
}
IXMLDOMSchemaCollection_Release
(
collection
);
IXMLDOMDocument2_Release
(
doc
);
...
...
@@ -11900,10 +11910,7 @@ todo_wine
/* enumerate */
enumv
=
(
void
*
)
0xdeadbeef
;
hr
=
IXMLDOMSchemaCollection_get__newEnum
(
collection
,
(
IUnknown
**
)
&
enumv
);
todo_wine
EXPECT_HR
(
hr
,
S_OK
);
if
(
hr
==
S_OK
)
{
ok
(
enumv
!=
NULL
,
"got %p
\n
"
,
enumv
);
V_VT
(
&
v
)
=
VT_EMPTY
;
...
...
@@ -11926,7 +11933,6 @@ todo_wine
ok
(
V_VT
(
&
v
)
==
VT_EMPTY
,
"got %d
\n
"
,
V_VT
(
&
v
));
IEnumVARIANT_Release
(
enumv
);
}
IXMLDOMSchemaCollection_Release
(
collection
);
IXMLDOMDocument2_Release
(
doc
);
free_bstrs
();
...
...
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