summaryrefslogtreecommitdiff
path: root/sax
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-02-20 13:09:32 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-02-20 13:37:48 +0100
commit4e97fa0f4e73acdf522643aeec486b1395e63727 (patch)
treef17fbdfd152063a111e6ac819dc29d9a67654e8c /sax
parent4ee389d1ecf0de90fe3ab433d0d5b6f208fa0951 (diff)
use fast-parser APIs for embedded script parsing
essentially, this duplicates and converts the service in xmlscript/source/xmlflat_impexp/ and then converts it to use SvXMLImport APIs, stripping about 3 layers of unnecessary indirection in the process. Also improve some exception throwing in sax/ to make the next programmers life easier when finding the source of exceptions. Change-Id: I1ac552ee0565349e8322a55f6f609cf9f4521cab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89084 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sax')
-rw-r--r--sax/source/tools/fastattribs.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sax/source/tools/fastattribs.cxx b/sax/source/tools/fastattribs.cxx
index 9b65718764fc..587749938c6b 100644
--- a/sax/source/tools/fastattribs.cxx
+++ b/sax/source/tools/fastattribs.cxx
@@ -144,7 +144,7 @@ sal_Int32 FastAttributeList::getValueToken( ::sal_Int32 Token )
getFastAttributeValue(i),
AttributeValueLength( i ) );
- throw SAXException();
+ throw SAXException("FastAttributeList::getValueToken: unknown token " + OUString::number(Token), nullptr, Any());
}
sal_Int32 FastAttributeList::getOptionalValueToken( ::sal_Int32 Token, ::sal_Int32 Default )
@@ -216,7 +216,7 @@ OUString FastAttributeList::getValue( ::sal_Int32 Token )
if (maAttributeTokens[i] == Token)
return OUString( getFastAttributeValue(i), AttributeValueLength(i), RTL_TEXTENCODING_UTF8 );
- throw SAXException();
+ throw SAXException("FastAttributeList::getValue: unknown token " + OUString::number(Token), nullptr, Any());
}
OUString FastAttributeList::getValueByIndex( ::sal_Int32 nTokenIndex ) const