[Libreoffice-commits] core.git: xmloff/source
Noel (via logerrit)
logerrit at kemper.freedesktop.org
Mon Nov 30 17:38:02 UTC 2020
xmloff/source/chart/SchXMLSeries2Context.cxx | 25 +++++++++++--------------
1 file changed, 11 insertions(+), 14 deletions(-)
New commits:
commit 07028e4026ec96aea76a921f95e6217b9b328634
Author: Noel <noelgrandin at gmail.com>
AuthorDate: Mon Nov 30 14:59:50 2020 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Nov 30 18:37:16 2020 +0100
fastparser in SchXMLDomain2Context
Change-Id: Ie55eb55d8ec4c8acd02dd24d19fe7f4b2b017a54
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106865
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx
index 572bbba89c42..b02d35c331b8 100644
--- a/xmloff/source/chart/SchXMLSeries2Context.cxx
+++ b/xmloff/source/chart/SchXMLSeries2Context.cxx
@@ -74,7 +74,9 @@ private:
public:
SchXMLDomain2Context( SvXMLImport& rImport,
::std::vector< OUString > & rAddresses );
- virtual void StartElement( const Reference< xml::sax::XAttributeList >& xAttrList ) override;
+ virtual void SAL_CALL startFastElement(
+ sal_Int32 nElement,
+ const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
};
SchXMLDomain2Context::SchXMLDomain2Context(
@@ -85,21 +87,16 @@ SchXMLDomain2Context::SchXMLDomain2Context(
{
}
-void SchXMLDomain2Context::StartElement( const uno::Reference< xml::sax::XAttributeList >& xAttrList )
+void SchXMLDomain2Context::startFastElement(
+ sal_Int32 /*nElement*/,
+ const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
{
- sal_Int16 nAttrCount = xAttrList.is()? xAttrList->getLength(): 0;
-
- for( sal_Int16 i = 0; i < nAttrCount; i++ )
+ for( auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList) )
{
- OUString sAttrName = xAttrList->getNameByIndex( i );
- OUString aLocalName;
- sal_uInt16 nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
-
- if( nPrefix == XML_NAMESPACE_TABLE &&
- IsXMLToken( aLocalName, XML_CELL_RANGE_ADDRESS ) )
- {
- mrAddresses.push_back( xAttrList->getValueByIndex( i ));
- }
+ if (aIter.getToken() == XML_ELEMENT(TABLE, XML_CELL_RANGE_ADDRESS) )
+ mrAddresses.push_back( aIter.toString() );
+ else
+ XMLOFF_WARN_UNKNOWN("xmloff", aIter);
}
}
More information about the Libreoffice-commits
mailing list