diff options
author | Noel <noelgrandin@gmail.com> | 2020-12-15 15:18:47 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-12-17 12:00:08 +0100 |
commit | 5c543f7ae6de63ddf2a563162c296f69f74e7d38 (patch) | |
tree | 9d64d7a174ca4f7694deb2fcb16791643e3e2f72 /xmloff/source/text/XMLIndexSourceBaseContext.cxx | |
parent | 4484accf4d331a95ebf8475d6cd91950f4c27bcc (diff) |
use views to parse
Change-Id: I1e6678e18e5ef298021c818036b44c5b71b180fa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107760
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source/text/XMLIndexSourceBaseContext.cxx')
-rw-r--r-- | xmloff/source/text/XMLIndexSourceBaseContext.cxx | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/xmloff/source/text/XMLIndexSourceBaseContext.cxx b/xmloff/source/text/XMLIndexSourceBaseContext.cxx index 6d133473ac98..b9975b7e8766 100644 --- a/xmloff/source/text/XMLIndexSourceBaseContext.cxx +++ b/xmloff/source/text/XMLIndexSourceBaseContext.cxx @@ -61,17 +61,15 @@ void XMLIndexSourceBaseContext::startFastElement( { // process attributes for( auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList) ) - ProcessAttribute(aIter.getToken(), aIter.toString()); + ProcessAttribute(aIter); } -void XMLIndexSourceBaseContext::ProcessAttribute( - sal_Int32 nAttributeToken, - const OUString& rValue) +void XMLIndexSourceBaseContext::ProcessAttribute(const sax_fastparser::FastAttributeList::FastAttributeIter & aIter) { - switch (nAttributeToken) + switch (aIter.getToken()) { case XML_ELEMENT(TEXT, XML_INDEX_SCOPE): - if ( IsXMLToken( rValue, XML_CHAPTER ) ) + if ( IsXMLToken( aIter, XML_CHAPTER ) ) { bChapterIndex = true; } @@ -80,7 +78,7 @@ void XMLIndexSourceBaseContext::ProcessAttribute( case XML_ELEMENT(TEXT, XML_RELATIVE_TAB_STOP_POSITION): { bool bTmp(false); - if (::sax::Converter::convertBool(bTmp, rValue)) + if (::sax::Converter::convertBool(bTmp, aIter.toView())) { bRelativeTabs = bTmp; } @@ -89,7 +87,7 @@ void XMLIndexSourceBaseContext::ProcessAttribute( default: // unknown attribute -> ignore - XMLOFF_WARN_UNKNOWN_ATTR("xmloff", nAttributeToken, rValue); + XMLOFF_WARN_UNKNOWN("xmloff", aIter); break; } } |