summaryrefslogtreecommitdiff
path: root/sax/source/fastparser/legacyfastparser.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sax/source/fastparser/legacyfastparser.cxx')
-rw-r--r--sax/source/fastparser/legacyfastparser.cxx18
1 files changed, 8 insertions, 10 deletions
diff --git a/sax/source/fastparser/legacyfastparser.cxx b/sax/source/fastparser/legacyfastparser.cxx
index 13dfc3b1d9bf..994835acc666 100644
--- a/sax/source/fastparser/legacyfastparser.cxx
+++ b/sax/source/fastparser/legacyfastparser.cxx
@@ -227,12 +227,11 @@ void SAL_CALL CallbackDocumentHandler::startUnknownElement( const OUString& /*Na
rtl::Reference < comphelper::AttributeList > rAttrList = new comphelper::AttributeList;
m_aNamespaceHandler->addNSDeclAttributes( rAttrList );
- Sequence< xml::FastAttribute > fastAttribs = Attribs->getFastAttributes();
- sal_uInt16 len = fastAttribs.getLength();
- for (sal_uInt16 i = 0; i < len; i++)
+ const Sequence< xml::FastAttribute > fastAttribs = Attribs->getFastAttributes();
+ for (const auto& rAttr : fastAttribs)
{
- const OUString& rAttrValue = fastAttribs[i].Value;
- sal_Int32 nToken = fastAttribs[i].Token;
+ const OUString& rAttrValue = rAttr.Value;
+ sal_Int32 nToken = rAttr.Token;
const OUString& rAttrNamespacePrefix = CallbackDocumentHandler::getNamespacePrefixFromToken( nToken );
OUString sAttrName = CallbackDocumentHandler::getNameFromToken( nToken );
if ( !rAttrNamespacePrefix.isEmpty() )
@@ -241,12 +240,11 @@ void SAL_CALL CallbackDocumentHandler::startUnknownElement( const OUString& /*Na
rAttrList->AddAttribute( sAttrName, "CDATA", rAttrValue );
}
- Sequence< xml::Attribute > unknownAttribs = Attribs->getUnknownAttributes();
- len = unknownAttribs.getLength();
- for (sal_uInt16 i = 0; i < len; i++)
+ const Sequence< xml::Attribute > unknownAttribs = Attribs->getUnknownAttributes();
+ for (const auto& rAttr : unknownAttribs)
{
- const OUString& rAttrValue = unknownAttribs[i].Value;
- const OUString& rAttrName = unknownAttribs[i].Name;
+ const OUString& rAttrValue = rAttr.Value;
+ const OUString& rAttrName = rAttr.Name;
rAttrList->AddAttribute( rAttrName, "CDATA", rAttrValue );
}