msxml3: Added ISAXLocator_getPublicId.
This commit is contained in:
parent
e47cbd1e5d
commit
60ca0a7b53
|
@ -62,6 +62,7 @@ typedef struct _saxlocator
|
||||||
saxreader *saxreader;
|
saxreader *saxreader;
|
||||||
HRESULT ret;
|
HRESULT ret;
|
||||||
xmlParserCtxtPtr pParserCtxt;
|
xmlParserCtxtPtr pParserCtxt;
|
||||||
|
WCHAR *publicId;
|
||||||
int lastLine;
|
int lastLine;
|
||||||
int lastColumn;
|
int lastColumn;
|
||||||
} saxlocator;
|
} saxlocator;
|
||||||
|
@ -307,6 +308,9 @@ static ULONG WINAPI isaxlocator_Release(
|
||||||
ref = InterlockedDecrement( &This->ref );
|
ref = InterlockedDecrement( &This->ref );
|
||||||
if ( ref == 0 )
|
if ( ref == 0 )
|
||||||
{
|
{
|
||||||
|
if(This->publicId)
|
||||||
|
SysFreeString(This->publicId);
|
||||||
|
|
||||||
ISAXXMLReader_Release((ISAXXMLReader*)&This->saxreader->lpSAXXMLReaderVtbl);
|
ISAXXMLReader_Release((ISAXXMLReader*)&This->saxreader->lpSAXXMLReaderVtbl);
|
||||||
HeapFree( GetProcessHeap(), 0, This );
|
HeapFree( GetProcessHeap(), 0, This );
|
||||||
}
|
}
|
||||||
|
@ -339,10 +343,22 @@ static HRESULT WINAPI isaxlocator_getPublicId(
|
||||||
ISAXLocator* iface,
|
ISAXLocator* iface,
|
||||||
const WCHAR ** ppwchPublicId)
|
const WCHAR ** ppwchPublicId)
|
||||||
{
|
{
|
||||||
|
BSTR publicId;
|
||||||
saxlocator *This = impl_from_ISAXLocator( iface );
|
saxlocator *This = impl_from_ISAXLocator( iface );
|
||||||
|
|
||||||
FIXME("(%p)->(%p) stub\n", This, ppwchPublicId);
|
if(This->publicId) SysFreeString(This->publicId);
|
||||||
return E_NOTIMPL;
|
|
||||||
|
publicId = bstr_from_xmlChar(xmlSAX2GetPublicId(This->pParserCtxt));
|
||||||
|
if(SysStringLen(publicId))
|
||||||
|
This->publicId = (WCHAR*)&publicId;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SysFreeString(publicId);
|
||||||
|
This->publicId = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
*ppwchPublicId = This->publicId;
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI isaxlocator_getSystemId(
|
static HRESULT WINAPI isaxlocator_getSystemId(
|
||||||
|
@ -381,6 +397,7 @@ static HRESULT SAXLocator_create(saxreader *reader, saxlocator **ppsaxlocator)
|
||||||
ISAXXMLReader_AddRef((ISAXXMLReader*)&reader->lpSAXXMLReaderVtbl);
|
ISAXXMLReader_AddRef((ISAXXMLReader*)&reader->lpSAXXMLReaderVtbl);
|
||||||
|
|
||||||
locator->pParserCtxt = NULL;
|
locator->pParserCtxt = NULL;
|
||||||
|
locator->publicId = NULL;
|
||||||
locator->lastLine = 0;
|
locator->lastLine = 0;
|
||||||
locator->lastColumn = 0;
|
locator->lastColumn = 0;
|
||||||
locator->ret = S_OK;
|
locator->ret = S_OK;
|
||||||
|
|
Loading…
Reference in New Issue