[Libreoffice-commits] core.git: sw/source

Serge Krot (via logerrit) logerrit at kemper.freedesktop.org
Fri Apr 3 09:11:56 UTC 2020


 sw/source/core/layout/paintfrm.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 8666dfecbaac69b9dc9a9c23a05654d847608907
Author:     Serge Krot <Serge.Krot at cib.de>
AuthorDate: Wed Apr 1 21:08:29 2020 +0200
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Fri Apr 3 11:11:23 2020 +0200

    tdf#131004 fix unstable paint of writer consecutive section frames
    
    Change-Id: I565129dcd077ddbfccedb37dfbf1b9e1acf4eb95
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91532
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 2f7f4e4d4dc3..ec99cacfd9f6 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -853,8 +853,8 @@ void SwSubsRects::RemoveSuperfluousSubsidiaryLines( const SwLineRects &rRects, S
 
 void SwLineRects::LockLines( bool bLock )
 {
-    for (iterator it = aLineRects.begin(); it != aLineRects.end(); ++it)
-       (*it).Lock( bLock );
+    for (SwLineRect& rLRect : aLineRects)
+       rLRect.Lock( bLock );
 }
 
 static void lcl_DrawDashedRect( OutputDevice * pOut, SwLineRect const & rLRect )
@@ -1033,7 +1033,7 @@ void SwSubsRects::PaintSubsidiary( OutputDevice *pOut,
                                  ((nLi < rLk.Left() && nLi+21 > rLk.Left()) ||
                                   (nLk < rLi.Left() && nLk+21 > rLi.Left())))
                             {
-                                aLineRects.erase(aLineRects.begin() + k);
+                                aLineRects.erase(aLineRects.begin() + i);
                                 // don't continue with inner loop any more:
                                 // the array may shrink!
                                 --i;
@@ -1048,7 +1048,7 @@ void SwSubsRects::PaintSubsidiary( OutputDevice *pOut,
                                  ((nLi < rLk.Top() && nLi+21 > rLk.Top()) ||
                                   (nLk < rLi.Top() && nLk+21 > rLi.Top())))
                             {
-                                aLineRects.erase(aLineRects.begin() + k);
+                                aLineRects.erase(aLineRects.begin() + i);
                                 // don't continue with inner loop any more:
                                 // the array may shrink!
                                 --i;


More information about the Libreoffice-commits mailing list