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
3d18a77a
Commit
3d18a77a
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: Get rid of libxml2 accessors in ::substringData() for Text, Comment and CDATA nodes.
parent
19c30897
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
50 deletions
+41
-50
cdata.c
dlls/msxml3/cdata.c
+14
-17
comment.c
dlls/msxml3/comment.c
+13
-16
text.c
dlls/msxml3/text.c
+14
-17
No files found.
dlls/msxml3/cdata.c
View file @
3d18a77a
...
...
@@ -538,11 +538,10 @@ static HRESULT WINAPI domcdata_substringData(
LONG
offset
,
LONG
count
,
BSTR
*
p
)
{
domcdata
*
This
=
impl_from_IXMLDOMCDATASection
(
iface
);
xmlChar
*
pContent
;
LONG
nLength
=
0
;
HRESULT
hr
=
S_FALSE
;
HRESULT
hr
;
BSTR
data
;
TRACE
(
"%p
\n
"
,
iface
);
TRACE
(
"%p
%d %d %p
\n
"
,
This
,
offset
,
count
,
p
);
if
(
!
p
)
return
E_INVALIDARG
;
...
...
@@ -552,26 +551,24 @@ static HRESULT WINAPI domcdata_substringData(
return
E_INVALIDARG
;
if
(
count
==
0
)
return
hr
;
return
S_FALSE
;
pContent
=
xmlNodeGetContent
(
This
->
node
.
node
);
if
(
pContent
)
hr
=
IXMLDOMCDATASection_get_data
(
iface
,
&
data
);
if
(
hr
==
S_OK
)
{
nLength
=
xmlStrlen
(
pContent
);
LONG
len
=
SysStringLen
(
data
);
if
(
offset
<
nLength
)
if
(
offset
<
len
)
{
BSTR
sContent
=
bstr_from_xmlChar
(
pContent
);
if
(
offset
+
count
>
nLength
)
*
p
=
SysAllocString
(
&
sContent
[
offset
]);
if
(
offset
+
count
>
len
)
*
p
=
SysAllocString
(
&
data
[
offset
]);
else
*
p
=
SysAllocStringLen
(
&
sContent
[
offset
],
count
);
SysFreeString
(
sContent
);
hr
=
S_OK
;
*
p
=
SysAllocStringLen
(
&
data
[
offset
],
count
);
}
else
hr
=
S_FALSE
;
xmlFree
(
pContent
);
SysFreeString
(
data
);
}
return
hr
;
...
...
dlls/msxml3/comment.c
View file @
3d18a77a
...
...
@@ -532,11 +532,10 @@ static HRESULT WINAPI domcomment_substringData(
LONG
offset
,
LONG
count
,
BSTR
*
p
)
{
domcomment
*
This
=
impl_from_IXMLDOMComment
(
iface
);
xmlChar
*
pContent
;
LONG
nLength
=
0
;
HRESULT
hr
=
S_FALSE
;
HRESULT
hr
;
BSTR
data
;
TRACE
(
"%p %d %d %p
\n
"
,
iface
,
offset
,
count
,
p
);
TRACE
(
"%p %d %d %p
\n
"
,
This
,
offset
,
count
,
p
);
if
(
!
p
)
return
E_INVALIDARG
;
...
...
@@ -548,24 +547,22 @@ static HRESULT WINAPI domcomment_substringData(
if
(
count
==
0
)
return
S_FALSE
;
pContent
=
xmlNodeGetContent
(
This
->
node
.
node
);
if
(
pContent
)
hr
=
IXMLDOMComment_get_data
(
iface
,
&
data
);
if
(
hr
==
S_OK
)
{
nLength
=
xmlStrlen
(
pContent
);
LONG
len
=
SysStringLen
(
data
);
if
(
offset
<
nLength
)
if
(
offset
<
len
)
{
BSTR
sContent
=
bstr_from_xmlChar
(
pContent
);
if
(
offset
+
count
>
nLength
)
*
p
=
SysAllocString
(
&
sContent
[
offset
]);
if
(
offset
+
count
>
len
)
*
p
=
SysAllocString
(
&
data
[
offset
]);
else
*
p
=
SysAllocStringLen
(
&
sContent
[
offset
],
count
);
SysFreeString
(
sContent
);
hr
=
S_OK
;
*
p
=
SysAllocStringLen
(
&
data
[
offset
],
count
);
}
else
hr
=
S_FALSE
;
xmlFree
(
pContent
);
SysFreeString
(
data
);
}
return
hr
;
...
...
dlls/msxml3/text.c
View file @
3d18a77a
...
...
@@ -540,11 +540,10 @@ static HRESULT WINAPI domtext_substringData(
LONG
offset
,
LONG
count
,
BSTR
*
p
)
{
domtext
*
This
=
impl_from_IXMLDOMText
(
iface
);
xmlChar
*
pContent
;
LONG
nLength
=
0
;
HRESULT
hr
=
S_FALSE
;
HRESULT
hr
;
BSTR
data
;
TRACE
(
"%p
\n
"
,
iface
);
TRACE
(
"%p
%d %d %p
\n
"
,
This
,
offset
,
count
,
p
);
if
(
!
p
)
return
E_INVALIDARG
;
...
...
@@ -554,26 +553,24 @@ static HRESULT WINAPI domtext_substringData(
return
E_INVALIDARG
;
if
(
count
==
0
)
return
hr
;
return
S_FALSE
;
pContent
=
xmlNodeGetContent
(
This
->
node
.
node
);
if
(
pContent
)
hr
=
IXMLDOMText_get_data
(
iface
,
&
data
);
if
(
hr
==
S_OK
)
{
nLength
=
xmlStrlen
(
pContent
);
LONG
len
=
SysStringLen
(
data
);
if
(
offset
<
nLength
)
if
(
offset
<
len
)
{
BSTR
sContent
=
bstr_from_xmlChar
(
pContent
);
if
(
offset
+
count
>
nLength
)
*
p
=
SysAllocString
(
&
sContent
[
offset
]);
if
(
offset
+
count
>
len
)
*
p
=
SysAllocString
(
&
data
[
offset
]);
else
*
p
=
SysAllocStringLen
(
&
sContent
[
offset
],
count
);
SysFreeString
(
sContent
);
hr
=
S_OK
;
*
p
=
SysAllocStringLen
(
&
data
[
offset
],
count
);
}
else
hr
=
S_FALSE
;
xmlFree
(
pContent
);
SysFreeString
(
data
);
}
return
hr
;
...
...
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