sw/source/core/doc/docredln.cxx | 1 + 1 file changed, 1 insertion(+) New commits: commit bfeb6375a96d75ed7117f1581b0a0d7cb0d236ca 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: Tue Oct 31 16:27:25 2023 +0100
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> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158721 Tested-by: Jenkins diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx index 0472343d8eb3..8ef699787b3f 100644 --- a/sw/source/core/doc/docredln.cxx +++ b/sw/source/core/doc/docredln.cxx @@ -846,6 +846,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)) {