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 <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@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 0472343..8ef6997 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))
{