From bfeb6375a96d75ed7117f1581b0a0d7cb0d236ca Mon Sep 17 00:00:00 2001 From: Attila Szűcs Date: Thu, 26 Oct 2023 23:11:03 +0200 Subject: tdf#157662 SW: fix connected area calculation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Caolán McNamara Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158721 Tested-by: Jenkins --- sw/source/core/doc/docredln.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'sw') 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)) { -- cgit