Commit 3fa75f49 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msxml3: Added ISAXXMLReader_putContentHandler implementation.

parent 5b350582
...@@ -49,6 +49,7 @@ typedef struct _saxreader ...@@ -49,6 +49,7 @@ typedef struct _saxreader
const struct IVBSAXXMLReaderVtbl *lpVtbl; const struct IVBSAXXMLReaderVtbl *lpVtbl;
const struct ISAXXMLReaderVtbl *lpSAXXMLReaderVtbl; const struct ISAXXMLReaderVtbl *lpSAXXMLReaderVtbl;
LONG ref; LONG ref;
struct ISAXContentHandler *contentHandler;
xmlSAXHandler sax; xmlSAXHandler sax;
} saxreader; } saxreader;
...@@ -111,6 +112,9 @@ static ULONG WINAPI saxxmlreader_Release( ...@@ -111,6 +112,9 @@ static ULONG WINAPI saxxmlreader_Release(
ref = InterlockedDecrement( &This->ref ); ref = InterlockedDecrement( &This->ref );
if ( ref == 0 ) if ( ref == 0 )
{ {
if(This->contentHandler)
ISAXContentHandler_Release(This->contentHandler);
HeapFree( GetProcessHeap(), 0, This ); HeapFree( GetProcessHeap(), 0, This );
} }
...@@ -505,12 +509,8 @@ static HRESULT WINAPI isaxxmlreader_getContentHandler( ...@@ -505,12 +509,8 @@ static HRESULT WINAPI isaxxmlreader_getContentHandler(
{ {
saxreader *This = impl_from_ISAXXMLReader( iface ); saxreader *This = impl_from_ISAXXMLReader( iface );
TRACE("(%p)->(%p)\n", This, pContentHandler); FIXME("(%p)->(%p) stub\n", This, pContentHandler);
if(This->contentHandler) return E_NOTIMPL;
ISAXContentHandler_AddRef(This->contentHandler);
*pContentHandler = This->contentHandler;
return S_OK;
} }
static HRESULT WINAPI isaxxmlreader_putContentHandler( static HRESULT WINAPI isaxxmlreader_putContentHandler(
...@@ -519,8 +519,14 @@ static HRESULT WINAPI isaxxmlreader_putContentHandler( ...@@ -519,8 +519,14 @@ static HRESULT WINAPI isaxxmlreader_putContentHandler(
{ {
saxreader *This = impl_from_ISAXXMLReader( iface ); saxreader *This = impl_from_ISAXXMLReader( iface );
FIXME("(%p)->(%p) stub\n", This, contentHandler); TRACE("(%p)->(%p)\n", This, contentHandler);
return E_NOTIMPL; if(contentHandler)
ISAXContentHandler_AddRef(contentHandler);
if(This->contentHandler)
ISAXContentHandler_Release(This->contentHandler);
This->contentHandler = contentHandler;
return S_OK;
} }
static HRESULT WINAPI isaxxmlreader_getDTDHandler( static HRESULT WINAPI isaxxmlreader_getDTDHandler(
...@@ -661,6 +667,7 @@ HRESULT SAXXMLReader_create(IUnknown *pUnkOuter, LPVOID *ppObj) ...@@ -661,6 +667,7 @@ HRESULT SAXXMLReader_create(IUnknown *pUnkOuter, LPVOID *ppObj)
reader->lpVtbl = &saxreader_vtbl; reader->lpVtbl = &saxreader_vtbl;
reader->lpSAXXMLReaderVtbl = &isaxreader_vtbl; reader->lpSAXXMLReaderVtbl = &isaxreader_vtbl;
reader->ref = 1; reader->ref = 1;
reader->contentHandler = NULL;
*ppObj = &reader->lpVtbl; *ppObj = &reader->lpVtbl;
......
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