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
bb47bab7
Commit
bb47bab7
authored
Feb 16, 2011
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 16, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Store output stream for processor.
parent
392934af
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
3 deletions
+60
-3
stylesheet.c
dlls/msxml3/stylesheet.c
+27
-2
domdoc.c
dlls/msxml3/tests/domdoc.c
+33
-1
No files found.
dlls/msxml3/stylesheet.c
View file @
bb47bab7
...
...
@@ -51,6 +51,7 @@ typedef struct _xslprocessor
LONG
ref
;
IXMLDOMNode
*
input
;
IStream
*
output
;
}
xslprocessor
;
static
HRESULT
XSLProcessor_create
(
IXSLProcessor
**
);
...
...
@@ -306,6 +307,7 @@ static ULONG WINAPI xslprocessor_Release( IXSLProcessor *iface )
if
(
ref
==
0
)
{
if
(
This
->
input
)
IXMLDOMNode_Release
(
This
->
input
);
if
(
This
->
output
)
IStream_Release
(
This
->
output
);
heap_free
(
This
);
}
...
...
@@ -475,9 +477,31 @@ static HRESULT WINAPI xslprocessor_put_output(
VARIANT
output
)
{
xslprocessor
*
This
=
impl_from_IXSLProcessor
(
iface
);
IStream
*
stream
;
HRESULT
hr
;
FIXME
(
"(%p): stub
\n
"
,
This
);
return
E_NOTIMPL
;
FIXME
(
"(%p)->(%s): semi-stub
\n
"
,
This
,
debugstr_variant
(
&
output
));
switch
(
V_VT
(
&
output
))
{
case
VT_EMPTY
:
stream
=
NULL
;
hr
=
S_OK
;
break
;
case
VT_UNKNOWN
:
hr
=
IUnknown_QueryInterface
(
V_UNKNOWN
(
&
output
),
&
IID_IStream
,
(
void
**
)
&
stream
);
break
;
default:
hr
=
E_FAIL
;
}
if
(
hr
==
S_OK
)
{
if
(
This
->
output
)
IStream_Release
(
This
->
output
);
This
->
output
=
stream
;
}
return
hr
;
}
static
HRESULT
WINAPI
xslprocessor_get_output
(
...
...
@@ -590,6 +614,7 @@ HRESULT XSLProcessor_create(IXSLProcessor **ppObj)
This
->
IXSLProcessor_iface
.
lpVtbl
=
&
xslprocessor_vtbl
;
This
->
ref
=
1
;
This
->
input
=
NULL
;
This
->
output
=
NULL
;
*
ppObj
=
&
This
->
IXSLProcessor_iface
;
...
...
dlls/msxml3/tests/domdoc.c
View file @
bb47bab7
...
...
@@ -7663,9 +7663,10 @@ static void test_xsltemplate(void)
IXSLTemplate
*
template
;
IXSLProcessor
*
processor
;
IXMLDOMDocument
*
doc
;
IStream
*
stream
;
VARIANT_BOOL
b
;
HRESULT
hr
;
ULONG
ref1
,
ref2
;
ULONG
ref1
,
ref2
,
ref
;
VARIANT
v
;
template
=
create_xsltemplate
(
&
IID_IXSLTemplate
);
...
...
@@ -7734,6 +7735,37 @@ todo_wine {
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
V_VT
(
&
v
)
==
VT_EMPTY
,
"got %d
\n
"
,
V_VT
(
&
v
));
}
/* reset before it was set */
V_VT
(
&
v
)
=
VT_EMPTY
;
hr
=
IXSLProcessor_put_output
(
processor
,
v
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
CreateStreamOnHGlobal
(
NULL
,
TRUE
,
&
stream
);
ref
=
IStream_AddRef
(
stream
);
IStream_Release
(
stream
);
ok
(
ref
==
2
,
"got %d
\n
"
,
ref
);
V_VT
(
&
v
)
=
VT_UNKNOWN
;
V_UNKNOWN
(
&
v
)
=
(
IUnknown
*
)
stream
;
hr
=
IXSLProcessor_put_output
(
processor
,
v
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
/* it seems processor grabs 2 references */
ref
=
IStream_AddRef
(
stream
);
IStream_Release
(
stream
);
todo_wine
ok
(
ref
==
4
,
"got %d
\n
"
,
ref
);
/* reset and check stream refcount */
V_VT
(
&
v
)
=
VT_EMPTY
;
hr
=
IXSLProcessor_put_output
(
processor
,
v
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ref
=
IStream_AddRef
(
stream
);
IStream_Release
(
stream
);
ok
(
ref
==
2
,
"got %d
\n
"
,
ref
);
IStream_Release
(
stream
);
IXSLProcessor_Release
(
processor
);
/* drop reference */
...
...
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