forked from Mirrors/wine-wine
xmllite: Store and return MultiLanguage reader property.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>oldstable
parent
4b09e848b8
commit
ac83cb99ee
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue