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
392934af
Commit
392934af
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: Basic put_input() method for IXSLProcessor.
parent
7a3226be
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
2 deletions
+48
-2
stylesheet.c
dlls/msxml3/stylesheet.c
+38
-2
domdoc.c
dlls/msxml3/tests/domdoc.c
+10
-0
No files found.
dlls/msxml3/stylesheet.c
View file @
392934af
...
@@ -49,6 +49,8 @@ typedef struct _xslprocessor
...
@@ -49,6 +49,8 @@ typedef struct _xslprocessor
{
{
IXSLProcessor
IXSLProcessor_iface
;
IXSLProcessor
IXSLProcessor_iface
;
LONG
ref
;
LONG
ref
;
IXMLDOMNode
*
input
;
}
xslprocessor
;
}
xslprocessor
;
static
HRESULT
XSLProcessor_create
(
IXSLProcessor
**
);
static
HRESULT
XSLProcessor_create
(
IXSLProcessor
**
);
...
@@ -302,7 +304,10 @@ static ULONG WINAPI xslprocessor_Release( IXSLProcessor *iface )
...
@@ -302,7 +304,10 @@ static ULONG WINAPI xslprocessor_Release( IXSLProcessor *iface )
ref
=
InterlockedDecrement
(
&
This
->
ref
);
ref
=
InterlockedDecrement
(
&
This
->
ref
);
if
(
ref
==
0
)
if
(
ref
==
0
)
{
if
(
This
->
input
)
IXMLDOMNode_Release
(
This
->
input
);
heap_free
(
This
);
heap_free
(
This
);
}
return
ref
;
return
ref
;
}
}
...
@@ -381,9 +386,39 @@ static HRESULT WINAPI xslprocessor_Invoke(
...
@@ -381,9 +386,39 @@ static HRESULT WINAPI xslprocessor_Invoke(
static
HRESULT
WINAPI
xslprocessor_put_input
(
IXSLProcessor
*
iface
,
VARIANT
input
)
static
HRESULT
WINAPI
xslprocessor_put_input
(
IXSLProcessor
*
iface
,
VARIANT
input
)
{
{
xslprocessor
*
This
=
impl_from_IXSLProcessor
(
iface
);
xslprocessor
*
This
=
impl_from_IXSLProcessor
(
iface
);
IXMLDOMNode
*
input_node
;
HRESULT
hr
;
FIXME
(
"(%p): stub
\n
"
,
This
);
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_variant
(
&
input
));
return
E_NOTIMPL
;
/* try IXMLDOMNode directly first */
if
(
V_VT
(
&
input
)
==
VT_UNKNOWN
)
hr
=
IUnknown_QueryInterface
(
V_UNKNOWN
(
&
input
),
&
IID_IXMLDOMNode
,
(
void
**
)
&
input_node
);
else
if
(
V_VT
(
&
input
)
==
VT_DISPATCH
)
hr
=
IDispatch_QueryInterface
(
V_DISPATCH
(
&
input
),
&
IID_IXMLDOMNode
,
(
void
**
)
&
input_node
);
else
{
IXMLDOMDocument
*
doc
;
hr
=
DOMDocument_create
(
&
CLSID_DOMDocument
,
NULL
,
(
void
**
)
&
doc
);
if
(
hr
==
S_OK
)
{
VARIANT_BOOL
b
;
hr
=
IXMLDOMDocument_load
(
doc
,
input
,
&
b
);
if
(
hr
==
S_OK
)
hr
=
IXMLDOMDocument_QueryInterface
(
doc
,
&
IID_IXMLDOMNode
,
(
void
**
)
&
input_node
);
IXMLDOMDocument_Release
(
doc
);
}
}
if
(
hr
==
S_OK
)
{
if
(
This
->
input
)
IXMLDOMNode_Release
(
This
->
input
);
This
->
input
=
input_node
;
}
return
hr
;
}
}
static
HRESULT
WINAPI
xslprocessor_get_input
(
IXSLProcessor
*
iface
,
VARIANT
*
input
)
static
HRESULT
WINAPI
xslprocessor_get_input
(
IXSLProcessor
*
iface
,
VARIANT
*
input
)
...
@@ -554,6 +589,7 @@ HRESULT XSLProcessor_create(IXSLProcessor **ppObj)
...
@@ -554,6 +589,7 @@ HRESULT XSLProcessor_create(IXSLProcessor **ppObj)
This
->
IXSLProcessor_iface
.
lpVtbl
=
&
xslprocessor_vtbl
;
This
->
IXSLProcessor_iface
.
lpVtbl
=
&
xslprocessor_vtbl
;
This
->
ref
=
1
;
This
->
ref
=
1
;
This
->
input
=
NULL
;
*
ppObj
=
&
This
->
IXSLProcessor_iface
;
*
ppObj
=
&
This
->
IXSLProcessor_iface
;
...
...
dlls/msxml3/tests/domdoc.c
View file @
392934af
...
@@ -7666,6 +7666,7 @@ static void test_xsltemplate(void)
...
@@ -7666,6 +7666,7 @@ static void test_xsltemplate(void)
VARIANT_BOOL
b
;
VARIANT_BOOL
b
;
HRESULT
hr
;
HRESULT
hr
;
ULONG
ref1
,
ref2
;
ULONG
ref1
,
ref2
;
VARIANT
v
;
template
=
create_xsltemplate
(
&
IID_IXSLTemplate
);
template
=
create_xsltemplate
(
&
IID_IXSLTemplate
);
if
(
!
template
)
return
;
if
(
!
template
)
return
;
...
@@ -7724,6 +7725,15 @@ static void test_xsltemplate(void)
...
@@ -7724,6 +7725,15 @@ static void test_xsltemplate(void)
hr
=
IXSLTemplate_createProcessor
(
template
,
&
processor
);
hr
=
IXSLTemplate_createProcessor
(
template
,
&
processor
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
/* input no set yet */
V_VT
(
&
v
)
=
VT_BSTR
;
V_BSTR
(
&
v
)
=
NULL
;
hr
=
IXSLProcessor_get_input
(
processor
,
&
v
);
todo_wine
{
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
V_VT
(
&
v
)
==
VT_EMPTY
,
"got %d
\n
"
,
V_VT
(
&
v
));
}
IXSLProcessor_Release
(
processor
);
IXSLProcessor_Release
(
processor
);
/* drop reference */
/* 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