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
b8282638
Commit
b8282638
authored
Feb 16, 2010
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 16, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Use interface methods for ::get_length() calls.
parent
3afa6576
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
47 deletions
+31
-47
cdata.c
dlls/msxml3/cdata.c
+9
-14
comment.c
dlls/msxml3/comment.c
+10
-15
text.c
dlls/msxml3/text.c
+12
-18
No files found.
dlls/msxml3/cdata.c
View file @
b8282638
...
...
@@ -480,7 +480,7 @@ static HRESULT WINAPI domcdata_get_data(
BSTR
*
p
)
{
domcdata
*
This
=
impl_from_IXMLDOMCDATASection
(
iface
);
HRESULT
hr
=
E_FAIL
;
HRESULT
hr
;
VARIANT
vRet
;
if
(
!
p
)
...
...
@@ -500,7 +500,6 @@ static HRESULT WINAPI domcdata_put_data(
BSTR
data
)
{
domcdata
*
This
=
impl_from_IXMLDOMCDATASection
(
iface
);
HRESULT
hr
=
E_FAIL
;
VARIANT
val
;
TRACE
(
"%p %s
\n
"
,
This
,
debugstr_w
(
data
)
);
...
...
@@ -508,9 +507,7 @@ static HRESULT WINAPI domcdata_put_data(
V_VT
(
&
val
)
=
VT_BSTR
;
V_BSTR
(
&
val
)
=
data
;
hr
=
IXMLDOMNode_put_nodeValue
(
IXMLDOMNode_from_impl
(
&
This
->
node
),
val
);
return
hr
;
return
IXMLDOMNode_put_nodeValue
(
IXMLDOMNode_from_impl
(
&
This
->
node
),
val
);
}
static
HRESULT
WINAPI
domcdata_get_length
(
...
...
@@ -518,23 +515,21 @@ static HRESULT WINAPI domcdata_get_length(
LONG
*
len
)
{
domcdata
*
This
=
impl_from_IXMLDOMCDATASection
(
iface
);
xmlChar
*
pContent
;
LONG
nLength
=
0
;
HRESULT
hr
;
BSTR
data
;
TRACE
(
"%p
\n
"
,
iface
);
TRACE
(
"%p
%p
\n
"
,
This
,
len
);
if
(
!
len
)
return
E_INVALIDARG
;
pContent
=
xmlNodeGetContent
(
This
->
node
.
node
);
if
(
pContent
)
hr
=
IXMLDOMCDATASection_get_data
(
iface
,
&
data
);
if
(
hr
==
S_OK
)
{
nLength
=
xmlStrlen
(
pContent
);
xmlFree
(
pContent
);
*
len
=
SysStringLen
(
data
);
SysFreeString
(
data
);
}
*
len
=
nLength
;
return
S_OK
;
}
...
...
dlls/msxml3/comment.c
View file @
b8282638
...
...
@@ -474,7 +474,7 @@ static HRESULT WINAPI domcomment_get_data(
BSTR
*
p
)
{
domcomment
*
This
=
impl_from_IXMLDOMComment
(
iface
);
HRESULT
hr
=
E_FAIL
;
HRESULT
hr
;
VARIANT
vRet
;
if
(
!
p
)
...
...
@@ -494,7 +494,6 @@ static HRESULT WINAPI domcomment_put_data(
BSTR
data
)
{
domcomment
*
This
=
impl_from_IXMLDOMComment
(
iface
);
HRESULT
hr
=
E_FAIL
;
VARIANT
val
;
TRACE
(
"%p %s
\n
"
,
This
,
debugstr_w
(
data
)
);
...
...
@@ -502,9 +501,7 @@ static HRESULT WINAPI domcomment_put_data(
V_VT
(
&
val
)
=
VT_BSTR
;
V_BSTR
(
&
val
)
=
data
;
hr
=
IXMLDOMNode_put_nodeValue
(
IXMLDOMNode_from_impl
(
&
This
->
node
),
val
);
return
hr
;
return
IXMLDOMNode_put_nodeValue
(
IXMLDOMNode_from_impl
(
&
This
->
node
),
val
);
}
static
HRESULT
WINAPI
domcomment_get_length
(
...
...
@@ -512,24 +509,22 @@ static HRESULT WINAPI domcomment_get_length(
LONG
*
len
)
{
domcomment
*
This
=
impl_from_IXMLDOMComment
(
iface
);
xmlChar
*
pContent
;
LONG
nLength
=
0
;
HRESULT
hr
;
BSTR
data
;
TRACE
(
"%p
\n
"
,
iface
);
TRACE
(
"%p
%p
\n
"
,
This
,
len
);
if
(
!
len
)
return
E_INVALIDARG
;
pContent
=
xmlNodeGetContent
(
This
->
node
.
node
);
if
(
pContent
)
hr
=
IXMLDOMComment_get_data
(
iface
,
&
data
);
if
(
hr
==
S_OK
)
{
nLength
=
xmlStrlen
(
pContent
);
xmlFree
(
pContent
);
*
len
=
SysStringLen
(
data
);
SysFreeString
(
data
);
}
*
len
=
nLength
;
return
S_OK
;
return
hr
;
}
static
HRESULT
WINAPI
domcomment_substringData
(
...
...
dlls/msxml3/text.c
View file @
b8282638
...
...
@@ -482,7 +482,7 @@ static HRESULT WINAPI domtext_get_data(
BSTR
*
p
)
{
domtext
*
This
=
impl_from_IXMLDOMText
(
iface
);
HRESULT
hr
=
E_FAIL
;
HRESULT
hr
;
VARIANT
vRet
;
if
(
!
p
)
...
...
@@ -502,7 +502,6 @@ static HRESULT WINAPI domtext_put_data(
BSTR
data
)
{
domtext
*
This
=
impl_from_IXMLDOMText
(
iface
);
HRESULT
hr
=
E_FAIL
;
VARIANT
val
;
TRACE
(
"%p %s
\n
"
,
This
,
debugstr_w
(
data
)
);
...
...
@@ -510,9 +509,7 @@ static HRESULT WINAPI domtext_put_data(
V_VT
(
&
val
)
=
VT_BSTR
;
V_BSTR
(
&
val
)
=
data
;
hr
=
IXMLDOMNode_put_nodeValue
(
IXMLDOMNode_from_impl
(
&
This
->
node
),
val
);
return
hr
;
return
IXMLDOMNode_put_nodeValue
(
IXMLDOMNode_from_impl
(
&
This
->
node
),
val
);
}
static
HRESULT
WINAPI
domtext_get_length
(
...
...
@@ -520,24 +517,22 @@ static HRESULT WINAPI domtext_get_length(
LONG
*
len
)
{
domtext
*
This
=
impl_from_IXMLDOMText
(
iface
);
xmlChar
*
pContent
;
LONG
nLength
=
0
;
HRESULT
hr
;
BSTR
data
;
TRACE
(
"%p
\n
"
,
iface
);
TRACE
(
"%p
%p
\n
"
,
This
,
len
);
if
(
!
len
)
return
E_INVALIDARG
;
pContent
=
xmlNodeGetContent
(
This
->
node
.
node
);
if
(
pContent
)
hr
=
IXMLDOMText_get_data
(
iface
,
&
data
);
if
(
hr
==
S_OK
)
{
nLength
=
xmlStrlen
(
pContent
);
xmlFree
(
pContent
);
*
len
=
SysStringLen
(
data
);
SysFreeString
(
data
);
}
*
len
=
nLength
;
return
S_OK
;
return
hr
;
}
static
HRESULT
WINAPI
domtext_substringData
(
...
...
@@ -595,8 +590,7 @@ static HRESULT WINAPI domtext_appendData(
TRACE
(
"%p
\n
"
,
iface
);
/* Nothing to do if NULL or an Empty string passed in. */
if
(
p
==
NULL
||
SysStringLen
(
p
)
==
0
)
return
S_OK
;
if
(
SysStringLen
(
p
)
==
0
)
return
S_OK
;
pContent
=
xmlChar_from_wchar
(
p
);
if
(
pContent
)
...
...
@@ -624,7 +618,7 @@ static HRESULT WINAPI domtext_insertData(
LONG
nLength
=
0
,
nLengthP
=
0
;
xmlChar
*
str
=
NULL
;
TRACE
(
"%p
\n
"
,
This
);
TRACE
(
"%p
%d %s
\n
"
,
This
,
offset
,
debugstr_w
(
p
)
);
/* If have a NULL or empty string, don't do anything. */
if
(
SysStringLen
(
p
)
==
0
)
...
...
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