editeng/source/editeng/editobj.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 91f91815124c00727eefdd92fbed2d927faaf60b
Author:     Stanislav Lopatin <genkiginc...@gmail.com>
AuthorDate: Sat Aug 13 11:40:24 2022 +0500
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Tue Aug 30 06:36:06 2022 +0200

    tdf#145538 Change common loops to range based.
    
    Just convert some loops to range based.
    
    Change-Id: Id80d9366f77bb08a130004db800b19e967496541
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138221
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/editeng/source/editeng/editobj.cxx 
b/editeng/source/editeng/editobj.cxx
index ce39e37d3d83..6d57c7497c2b 100644
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -150,12 +150,12 @@ void ContentInfo::dumpAsXml(xmlTextWriterPtr pWriter) 
const
     (void)xmlTextWriterWriteString(pWriter, BAD_CAST(aText.replaceAll("\x01", 
"&#1;").toUtf8().getStr()));
     (void)xmlTextWriterEndElement(pWriter);
     aParaAttribs.dumpAsXml(pWriter);
-    for (size_t i=0; i<maCharAttribs.size(); ++i)
+    for (auto const& rCharAttribs : maCharAttribs)
     {
         (void)xmlTextWriterStartElement(pWriter, BAD_CAST("attribs"));
-        (void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("start"), 
"%" SAL_PRIdINT32, maCharAttribs[i].GetStart());
-        (void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("end"), "%" 
SAL_PRIdINT32, maCharAttribs[i].GetEnd());
-        maCharAttribs[i].GetItem()->dumpAsXml(pWriter);
+        (void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("start"), 
"%" SAL_PRIdINT32, rCharAttribs.GetStart());
+        (void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("end"), "%" 
SAL_PRIdINT32, rCharAttribs.GetEnd());
+        rCharAttribs.GetItem()->dumpAsXml(pWriter);
         (void)xmlTextWriterEndElement(pWriter);
     }
     (void)xmlTextWriterEndElement(pWriter);

Reply via email to