sw/source/core/doc/docredln.cxx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
New commits: commit 94d578ea6009cfc44cc512171fd453bb0286888b Author: Attila Szűcs <attila.sz...@collabora.com> AuthorDate: Wed Oct 25 11:40:23 2023 +0200 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Thu Oct 26 09:30:11 2023 +0200 tdf#157663 SW: reenable move recognition improvements Re-enabled the improvement of move recognition in redlines, that is able to recognize movements split into more redlines. Probably it does not effect performance too much, but if in some cases it would become a problem then this small patch can be reverted easily. Change-Id: I6598d4d4f98f472f3972aec41b82ec26d90db860 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158455 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Tested-by: Caolán McNamara <caolan.mcnam...@collabora.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 95498d625c90..4d3493515d6a 100644 --- a/sw/source/core/doc/docredln.cxx +++ b/sw/source/core/doc/docredln.cxx @@ -873,11 +873,7 @@ bool SwRedlineTable::isMoved(size_type rPos) const if (isMovedImpl(rPos, false)) return true; else - { - // Commented out because of probably performance issue - //return isMovedImpl(rPos, true); - return false; - } + return isMovedImpl(rPos, true); } bool SwRedlineTable::isMovedImpl(size_type rPos, bool bTryCombined) const @@ -947,7 +943,7 @@ bool SwRedlineTable::isMovedImpl(size_type rPos, bool bTryCombined) const size_type nStart = rPos > nLookahead ? rPos - nLookahead : 0; // first, try to compare to single redlines // next, try to compare to combined redlines - for (int nPass = 0; nPass < (bTryCombined ? 2 : 1) && !bRet; nPass++) + for (int nPass = 0; nPass < 2 && !bRet; nPass++) { for (size_type nPosAct = nStart; nPosAct < nEnd && !bRet; ++nPosAct) {