Commit ac83cb99 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

xmllite: Store and return MultiLanguage reader property.

parent 4b09e848
......@@ -244,6 +244,7 @@ typedef struct
XmlNodeType nodetype;
DtdProcessing dtdmode;
IXmlResolver *resolver;
IUnknown *mlang;
UINT line, pos; /* reader position in XML stream */
struct list attrs; /* attributes list for current node */
struct attribute *attr; /* current attribute */
......@@ -2474,6 +2475,7 @@ static ULONG WINAPI xmlreader_Release(IXmlReader *iface)
IMalloc *imalloc = This->imalloc;
if (This->input) IUnknown_Release(&This->input->IXmlReaderInput_iface);
if (This->resolver) IXmlResolver_Release(This->resolver);
if (This->mlang) IUnknown_Release(This->mlang);
reader_clear_attrs(This);
reader_clear_elements(This);
reader_free_strvalues(This);
......@@ -2558,6 +2560,11 @@ static HRESULT WINAPI xmlreader_GetProperty(IXmlReader* iface, UINT property, LO
switch (property)
{
case XmlReaderProperty_MultiLanguage:
*value = (LONG_PTR)This->mlang;
if (This->mlang)
IUnknown_AddRef(This->mlang);
break;
case XmlReaderProperty_XmlResolver:
*value = (LONG_PTR)This->resolver;
if (This->resolver)
......@@ -2586,8 +2593,13 @@ static HRESULT WINAPI xmlreader_SetProperty(IXmlReader* iface, UINT property, LO
switch (property)
{
case XmlReaderProperty_MultiLanguage:
if (value)
FIXME("Ignoring MultiLanguage %lx\n", value);
if (This->mlang)
IUnknown_Release(This->mlang);
This->mlang = (IUnknown*)value;
if (This->mlang)
IUnknown_AddRef(This->mlang);
if (This->mlang)
FIXME("Ignoring MultiLanguage %p\n", This->mlang);
break;
case XmlReaderProperty_XmlResolver:
if (This->resolver)
......@@ -2996,6 +3008,7 @@ HRESULT WINAPI CreateXmlReader(REFIID riid, void **obj, IMalloc *imalloc)
reader->resumestate = XmlReadResumeState_Initial;
reader->dtdmode = DtdProcessing_Prohibit;
reader->resolver = NULL;
reader->mlang = NULL;
reader->line = reader->pos = 0;
reader->imalloc = imalloc;
if (imalloc) IMalloc_AddRef(imalloc);
......
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