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
ccf04d64
Commit
ccf04d64
authored
Jul 30, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jul 30, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Implement setting attributes properties with IMXAttributes.
parent
11736f36
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
14 deletions
+49
-14
mxwriter.c
dlls/msxml3/mxwriter.c
+49
-14
No files found.
dlls/msxml3/mxwriter.c
View file @
ccf04d64
...
...
@@ -1888,14 +1888,20 @@ static HRESULT WINAPI MXAttributes_clear(IMXAttributes *iface)
return
S_OK
;
}
static
mxattribute
*
get_attribute_byindex
(
mxattributes
*
attrs
,
int
index
)
{
if
(
index
<
0
||
index
>=
attrs
->
length
)
return
NULL
;
return
&
attrs
->
attr
[
index
];
}
static
HRESULT
WINAPI
MXAttributes_removeAttribute
(
IMXAttributes
*
iface
,
int
index
)
{
mxattributes
*
This
=
impl_from_IMXAttributes
(
iface
);
mxattribute
*
src
,
*
dst
;
mxattribute
*
dst
;
TRACE
(
"(%p)->(%d)
\n
"
,
This
,
index
);
if
(
index
<
0
||
index
>=
This
->
length
)
return
E_INVALIDARG
;
if
(
!
(
dst
=
get_attribute_byindex
(
This
,
index
))
)
return
E_INVALIDARG
;
/* no need to remove last attribute, just make it inaccessible */
if
(
index
+
1
==
This
->
length
)
...
...
@@ -1904,10 +1910,7 @@ static HRESULT WINAPI MXAttributes_removeAttribute(IMXAttributes *iface, int ind
return
S_OK
;
}
dst
=
&
This
->
attr
[
index
];
src
=
&
This
->
attr
[
index
+
1
];
memmove
(
dst
,
src
,
(
This
->
length
-
index
-
1
)
*
sizeof
(
*
dst
));
memmove
(
dst
,
dst
+
1
,
(
This
->
length
-
index
-
1
)
*
sizeof
(
*
dst
));
This
->
length
--
;
return
S_OK
;
...
...
@@ -1933,29 +1936,61 @@ static HRESULT WINAPI MXAttributes_setLocalName(IMXAttributes *iface, int index,
BSTR
localName
)
{
mxattributes
*
This
=
impl_from_IMXAttributes
(
iface
);
FIXME
(
"(%p)->(%d %s): stub
\n
"
,
This
,
index
,
debugstr_w
(
localName
));
return
E_NOTIMPL
;
mxattribute
*
attr
;
TRACE
(
"(%p)->(%d %s)
\n
"
,
This
,
index
,
debugstr_w
(
localName
));
if
(
!
(
attr
=
get_attribute_byindex
(
This
,
index
)))
return
E_INVALIDARG
;
SysFreeString
(
attr
->
local
);
attr
->
local
=
SysAllocString
(
localName
);
return
S_OK
;
}
static
HRESULT
WINAPI
MXAttributes_setQName
(
IMXAttributes
*
iface
,
int
index
,
BSTR
QName
)
{
mxattributes
*
This
=
impl_from_IMXAttributes
(
iface
);
FIXME
(
"(%p)->(%d %s): stub
\n
"
,
This
,
index
,
debugstr_w
(
QName
));
return
E_NOTIMPL
;
mxattribute
*
attr
;
TRACE
(
"(%p)->(%d %s)
\n
"
,
This
,
index
,
debugstr_w
(
QName
));
if
(
!
(
attr
=
get_attribute_byindex
(
This
,
index
)))
return
E_INVALIDARG
;
SysFreeString
(
attr
->
qname
);
attr
->
qname
=
SysAllocString
(
QName
);
return
S_OK
;
}
static
HRESULT
WINAPI
MXAttributes_setURI
(
IMXAttributes
*
iface
,
int
index
,
BSTR
uri
)
{
mxattributes
*
This
=
impl_from_IMXAttributes
(
iface
);
FIXME
(
"(%p)->(%d %s): stub
\n
"
,
This
,
index
,
debugstr_w
(
uri
));
return
E_NOTIMPL
;
mxattribute
*
attr
;
TRACE
(
"(%p)->(%d %s)
\n
"
,
This
,
index
,
debugstr_w
(
uri
));
if
(
!
(
attr
=
get_attribute_byindex
(
This
,
index
)))
return
E_INVALIDARG
;
SysFreeString
(
attr
->
uri
);
attr
->
uri
=
SysAllocString
(
uri
);
return
S_OK
;
}
static
HRESULT
WINAPI
MXAttributes_setValue
(
IMXAttributes
*
iface
,
int
index
,
BSTR
value
)
{
mxattributes
*
This
=
impl_from_IMXAttributes
(
iface
);
FIXME
(
"(%p)->(%d %s): stub
\n
"
,
This
,
index
,
debugstr_w
(
value
));
return
E_NOTIMPL
;
mxattribute
*
attr
;
TRACE
(
"(%p)->(%d %s)
\n
"
,
This
,
index
,
debugstr_w
(
value
));
if
(
!
(
attr
=
get_attribute_byindex
(
This
,
index
)))
return
E_INVALIDARG
;
SysFreeString
(
attr
->
value
);
attr
->
value
=
SysAllocString
(
value
);
return
S_OK
;
}
static
const
IMXAttributesVtbl
MXAttributesVtbl
=
{
...
...
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