Module: wine Branch: master Commit: 3196f7801c6887d66d2609c4307c5888017d3af5 URL: http://source.winehq.org/git/wine.git/?a=commit;h=3196f7801c6887d66d2609c430...
Author: Piotr Caban piotr.caban@gmail.com Date: Thu Jul 17 00:42:07 2008 +0200
msxml3: Added ISAXLocator_getSystemId.
---
dlls/msxml3/saxreader.c | 20 ++++++++++++++++++-- 1 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/dlls/msxml3/saxreader.c b/dlls/msxml3/saxreader.c index 3d807bb..5fbcf89 100644 --- a/dlls/msxml3/saxreader.c +++ b/dlls/msxml3/saxreader.c @@ -63,6 +63,7 @@ typedef struct _saxlocator HRESULT ret; xmlParserCtxtPtr pParserCtxt; WCHAR *publicId; + WCHAR *systemId; int lastLine; int lastColumn; } saxlocator; @@ -310,6 +311,8 @@ static ULONG WINAPI isaxlocator_Release( { if(This->publicId) SysFreeString(This->publicId); + if(This->systemId) + SysFreeString(This->systemId);
ISAXXMLReader_Release((ISAXXMLReader*)&This->saxreader->lpSAXXMLReaderVtbl); HeapFree( GetProcessHeap(), 0, This ); @@ -365,10 +368,22 @@ static HRESULT WINAPI isaxlocator_getSystemId( ISAXLocator* iface, const WCHAR ** ppwchSystemId) { + BSTR systemId; saxlocator *This = impl_from_ISAXLocator( iface );
- FIXME("(%p)->(%p) stub\n", This, ppwchSystemId); - return E_NOTIMPL; + if(This->systemId) SysFreeString(This->systemId); + + systemId = bstr_from_xmlChar(xmlSAX2GetSystemId(This->pParserCtxt)); + if(SysStringLen(systemId)) + This->systemId = (WCHAR*)&systemId; + else + { + SysFreeString(systemId); + This->systemId = NULL; + } + + *ppwchSystemId = This->systemId; + return S_OK; }
static const struct ISAXLocatorVtbl isaxlocator_vtbl = @@ -398,6 +413,7 @@ static HRESULT SAXLocator_create(saxreader *reader, saxlocator **ppsaxlocator)
locator->pParserCtxt = NULL; locator->publicId = NULL; + locator->systemId = NULL; locator->lastLine = 0; locator->lastColumn = 0; locator->ret = S_OK;