Commit 630e5f81 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

msxml3: Support indent() property.

parent 2dfa1bff
......@@ -44,7 +44,8 @@ static const char crlfA[] = "\r\n";
typedef enum
{
MXWriter_OmitXmlDecl = 0,
MXWriter_Indent = 0,
MXWriter_OmitXmlDecl,
MXWriter_Standalone,
MXWriter_LastProp
} MXWRITER_PROPS;
......@@ -308,18 +309,27 @@ static HRESULT WINAPI mxwriter_get_byteOrderMark(IMXWriter *iface, VARIANT_BOOL
return E_NOTIMPL;
}
static HRESULT WINAPI mxwriter_put_indent(IMXWriter *iface, VARIANT_BOOL indent)
static HRESULT WINAPI mxwriter_put_indent(IMXWriter *iface, VARIANT_BOOL value)
{
mxwriter *This = impl_from_IMXWriter( iface );
FIXME("(%p)->(%d)\n", This, indent);
return E_NOTIMPL;
TRACE("(%p)->(%d)\n", This, value);
This->props[MXWriter_Indent] = value;
return S_OK;
}
static HRESULT WINAPI mxwriter_get_indent(IMXWriter *iface, VARIANT_BOOL *indent)
static HRESULT WINAPI mxwriter_get_indent(IMXWriter *iface, VARIANT_BOOL *value)
{
mxwriter *This = impl_from_IMXWriter( iface );
FIXME("(%p)->(%p)\n", This, indent);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, value);
if (!value) return E_POINTER;
*value = This->props[MXWriter_Indent];
return S_OK;
}
static HRESULT WINAPI mxwriter_put_standalone(IMXWriter *iface, VARIANT_BOOL value)
......@@ -698,6 +708,7 @@ HRESULT MXWriter_create(IUnknown *pUnkOuter, void **ppObj)
This->ISAXContentHandler_iface.lpVtbl = &mxwriter_saxcontent_vtbl;
This->ref = 1;
This->props[MXWriter_Indent] = VARIANT_FALSE;
This->props[MXWriter_OmitXmlDecl] = VARIANT_FALSE;
This->props[MXWriter_Standalone] = VARIANT_FALSE;
This->encoding = SysAllocString(utf16W);
......
......@@ -936,6 +936,14 @@ static void test_mxwriter_properties(void)
&IID_IMXWriter, (void**)&writer);
ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
hr = IMXWriter_get_indent(writer, NULL);
ok(hr == E_POINTER, "got %08x\n", hr);
b = VARIANT_TRUE;
hr = IMXWriter_get_indent(writer, &b);
ok(hr == S_OK, "got %08x\n", hr);
ok(b == VARIANT_FALSE, "got %d\n", b);
hr = IMXWriter_get_omitXMLDeclaration(writer, NULL);
ok(hr == E_POINTER, "got %08x\n", hr);
......
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