summaryrefslogtreecommitdiff
path: root/unoxml/source/dom/saxbuilder.cxx
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2019-06-23 16:10:50 +0300
committerArkadiy Illarionov <qarkai@gmail.com>2019-06-25 21:42:40 +0200
commit9a2fbfa3cc1da8bd9388d5b4c780e86f0dccc791 (patch)
tree56b99d36d0b01a346ec3bd15abd1ef3fba5a96ba /unoxml/source/dom/saxbuilder.cxx
parent75957a96c43b83418d387e9174415b6d90cf9c63 (diff)
Simplify Sequence iterations in unoxml
Use range-based loops or replace with STL functions Change-Id: Ib1c49834a2c5c67a73ec05ba8f30c1d39a5c019c Reviewed-on: https://gerrit.libreoffice.org/74600 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Tested-by: Jenkins
Diffstat (limited to 'unoxml/source/dom/saxbuilder.cxx')
-rw-r--r--unoxml/source/dom/saxbuilder.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/unoxml/source/dom/saxbuilder.cxx b/unoxml/source/dom/saxbuilder.cxx
index 994a6c0392f6..968971f29d2c 100644
--- a/unoxml/source/dom/saxbuilder.cxx
+++ b/unoxml/source/dom/saxbuilder.cxx
@@ -254,12 +254,11 @@ namespace DOM
{
setElementFastAttributes(aElement, xAttribs);
Sequence< css::xml::Attribute > unknownAttribs = xAttribs->getUnknownAttributes();
- sal_Int32 len = unknownAttribs.getLength();
- for ( sal_Int32 i = 0; i < len; i++ )
+ for ( const auto& rUnknownAttrib : unknownAttribs )
{
- const OUString& rAttrValue = unknownAttribs[i].Value;
- const OUString& rAttrName = unknownAttribs[i].Name;
- const OUString& rAttrNamespace = unknownAttribs[i].NamespaceURL;
+ const OUString& rAttrValue = rUnknownAttrib.Value;
+ const OUString& rAttrName = rUnknownAttrib.Name;
+ const OUString& rAttrNamespace = rUnknownAttrib.NamespaceURL;
if ( !rAttrNamespace.isEmpty() )
aElement->setAttributeNS( rAttrNamespace, rAttrName, rAttrValue );
else