Commit 11736f36 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

msxml3: Implement IMXAttributes_removeAttribute().

parent 2fe34bfb
...@@ -1891,8 +1891,26 @@ static HRESULT WINAPI MXAttributes_clear(IMXAttributes *iface) ...@@ -1891,8 +1891,26 @@ static HRESULT WINAPI MXAttributes_clear(IMXAttributes *iface)
static HRESULT WINAPI MXAttributes_removeAttribute(IMXAttributes *iface, int index) static HRESULT WINAPI MXAttributes_removeAttribute(IMXAttributes *iface, int index)
{ {
mxattributes *This = impl_from_IMXAttributes( iface ); mxattributes *This = impl_from_IMXAttributes( iface );
FIXME("(%p)->(%d): stub\n", This, index); mxattribute *src, *dst;
return E_NOTIMPL;
TRACE("(%p)->(%d)\n", This, index);
if (index < 0 || index >= This->length) return E_INVALIDARG;
/* no need to remove last attribute, just make it inaccessible */
if (index + 1 == This->length)
{
This->length--;
return S_OK;
}
dst = &This->attr[index];
src = &This->attr[index+1];
memmove(dst, src, (This->length-index-1)*sizeof(*dst));
This->length--;
return S_OK;
} }
static HRESULT WINAPI MXAttributes_setAttribute(IMXAttributes *iface, int index, static HRESULT WINAPI MXAttributes_setAttribute(IMXAttributes *iface, int index,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment