diff options
author | Attila Szűcs <attila.szucs@collabora.com> | 2023-10-25 11:40:23 +0200 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-10-30 00:39:12 +0100 |
commit | 2c3f731992a294d4f35b41193af034fe9a6dd65c (patch) | |
tree | 1ca3c67add9a22d3fcf18ee51854226a8a23157b /sw/source/core/doc/docredln.cxx | |
parent | e123c772db8a12a37dfa14370b9db7c220f33ef1 (diff) |
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 <jenkinscollaboraoffice@gmail.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158612
Diffstat (limited to 'sw/source/core/doc/docredln.cxx')
-rw-r--r-- | sw/source/core/doc/docredln.cxx | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx index 02ded9bc1acd..26a3c7bc24df 100644 --- a/sw/source/core/doc/docredln.cxx +++ b/sw/source/core/doc/docredln.cxx @@ -908,11 +908,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 @@ -982,7 +978,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) { |