[Libreoffice-commits] core.git: Branch 'libreoffice-6-4-7' - svl/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue Sep 29 09:25:36 UTC 2020


 svl/source/items/slstitm.cxx |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit e88369905f04ad22e424b03358450b584fdeaebe
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Sep 25 15:08:51 2020 +0100
Commit:     Adolfo Jayme Barrientos <fitojb at ubuntu.com>
CommitDate: Tue Sep 29 11:25:03 2020 +0200

    Related: tdf#136985 SfxStringListItem::GetString() crash in empty case
    
    probably since...
    
    commit a573b8b21688d9681f4fa129ec37cf89954e9d1c
    Date:   Sat May 21 16:14:56 2011 -0430
    
        Replace List for std::vector in SfxStringListItem.
    
    Change-Id: I7060b5693ba08fa5f70cc5cb3ae1b7a4722a31a7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103340
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
    (cherry picked from commit 7c8f997321e136208e8983ab6ad78cc33891125f)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103572
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
    (cherry picked from commit 0451222f307e00ce688c564c10f39e894973c91e)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103576
    Tested-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>

diff --git a/svl/source/items/slstitm.cxx b/svl/source/items/slstitm.cxx
index 225c43f08cfe..a18497a06b39 100644
--- a/svl/source/items/slstitm.cxx
+++ b/svl/source/items/slstitm.cxx
@@ -127,13 +127,12 @@ OUString SfxStringListItem::GetString()
     OUStringBuffer aStr;
     if ( mpList )
     {
-        std::vector<OUString>::const_iterator iter = mpList->begin();
-        for (;;)
+        for (auto iter = mpList->begin(), end = mpList->end(); iter != end;)
         {
             aStr.append(*iter);
             ++iter;
 
-            if (iter == mpList->end())
+            if (iter == end)
                 break;
 
             aStr.append("\r");


More information about the Libreoffice-commits mailing list