msxml3: Implement get_line() and get_linepos().

This commit is contained in:
Nikolay Sivov 2011-11-04 23:26:53 +03:00 committed by Alexandre Julliard
parent cfce8ab459
commit 945dccb7d6
2 changed files with 41 additions and 8 deletions

View File

@ -135,13 +135,10 @@ static HRESULT WINAPI parseError_GetTypeInfo(
ITypeInfo** ppTInfo ) ITypeInfo** ppTInfo )
{ {
parse_error_t *This = impl_from_IXMLDOMParseError( iface ); parse_error_t *This = impl_from_IXMLDOMParseError( iface );
HRESULT hr;
TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo); TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
hr = get_typeinfo(IXMLDOMParseError_tid, ppTInfo); return get_typeinfo(IXMLDOMParseError_tid, ppTInfo);
return hr;
} }
static HRESULT WINAPI parseError_GetIDsOfNames( static HRESULT WINAPI parseError_GetIDsOfNames(
@ -255,8 +252,13 @@ static HRESULT WINAPI parseError_get_line(
LONG *line ) LONG *line )
{ {
parse_error_t *This = impl_from_IXMLDOMParseError( iface ); parse_error_t *This = impl_from_IXMLDOMParseError( iface );
FIXME("(%p)->(%p)\n", This, line);
return E_NOTIMPL; TRACE("(%p)->(%p): stub\n", This, line);
if (!line) return E_INVALIDARG;
*line = This->line;
return S_OK;
} }
static HRESULT WINAPI parseError_get_linepos( static HRESULT WINAPI parseError_get_linepos(
@ -264,8 +266,13 @@ static HRESULT WINAPI parseError_get_linepos(
LONG *linepos ) LONG *linepos )
{ {
parse_error_t *This = impl_from_IXMLDOMParseError( iface ); parse_error_t *This = impl_from_IXMLDOMParseError( iface );
FIXME("(%p)->(%p)\n", This, linepos);
return E_NOTIMPL; TRACE("(%p)->(%p)\n", This, linepos);
if (!linepos) return E_INVALIDARG;
*linepos = This->linepos;
return S_OK;
} }
static HRESULT WINAPI parseError_get_filepos( static HRESULT WINAPI parseError_get_filepos(

View File

@ -10752,6 +10752,31 @@ static void test_dispex(void)
free_bstrs(); free_bstrs();
} }
static void test_parseerror(void)
{
IXMLDOMParseError *error;
IXMLDOMDocument *doc;
HRESULT hr;
doc = create_document(&IID_IXMLDOMDocument);
hr = IXMLDOMDocument_get_parseError(doc, &error);
EXPECT_HR(hr, S_OK);
hr = IXMLDOMParseError_get_line(error, NULL);
EXPECT_HR(hr, E_INVALIDARG);
hr = IXMLDOMParseError_get_srcText(error, NULL);
todo_wine EXPECT_HR(hr, E_INVALIDARG);
hr = IXMLDOMParseError_get_linepos(error, NULL);
EXPECT_HR(hr, E_INVALIDARG);
IXMLDOMParseError_Release(error);
IXMLDOMDocument_Release(doc);
}
START_TEST(domdoc) START_TEST(domdoc)
{ {
IXMLDOMDocument *doc; IXMLDOMDocument *doc;
@ -10824,6 +10849,7 @@ START_TEST(domdoc)
test_selection(); test_selection();
test_load(); test_load();
test_dispex(); test_dispex();
test_parseerror();
test_xsltemplate(); test_xsltemplate();