sw/source/core/doc/docredln.cxx |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit ff767b645077c1b10dc541ee2a202ff94446f604
Author:     Attila Szűcs <attila.sz...@collabora.com>
AuthorDate: Thu Oct 26 23:11:03 2023 +0200
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Fri Oct 27 10:15:18 2023 +0200

    tdf#157662 SW: fix connected area calculation
    
    Reset pRedline to its origin value between the 2 loops,
    because the 1. loop may change it.
    
    without this fix, if it discover neightbours in the 1. direction,
    it will not discover them in the other direction.
    
    Change-Id: Ia1ab357ada17cb7574907a3aa1bf0dd4d7a90255
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158517
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index 4d3493515d6a..c5a6b6885a71 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -811,6 +811,7 @@ void SwRedlineTable::getConnectedArea(size_type nPosOrigin, 
size_type& rPosStart
         rPosStart--;
         pRedline = pOther;
     }
+    pRedline = pOrigin;
     while (rPosEnd + 1 < size() && (pOther = (*this)[rPosEnd + 1])
            && lcl_CanCombineWithRange(pOrigin, pRedline, pOther, false, 
bCheckChilds))
     {

Reply via email to