diff options
author | László Németh <nemeth@numbertext.org> | 2021-12-10 10:37:33 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2021-12-11 15:04:27 +0100 |
commit | 9f41f860fc084bbfe7aef0691a061c6b9e99e04b (patch) | |
tree | 070737c79945f8b36709d406e6ef35bbf72788ae /sw/source/core/doc | |
parent | 0ad78d7c1148fd7cde305eb34ab3a921a18632a0 (diff) |
tdf#146140 sw DOCX import: fix moveFrom regression with broken text content
(Also a small clean-up: increase the character limit for tracked text
moving detection: Only 2 or more (non-whitespace) character deletions
are checked for it, because single characters are often typos or some
control-like characters, e.g. soft hyphen, not real text movings.)
Details of the regression: commit d32d9a2b3c5e3963f4a18f6c7bbf50fab2e9b2be
"tdf#123460 DOCX track changes: moveFrom completely" fixed
the missing redline import of the end of the moved paragraphs,
but paragraph end was imported as w:del, not w:moveFrom explicitly.
From commit f51fa7534421a195a58b4a737a2e836d8c25ba81
"tdf#145718 sw, DOCX import: complete tracked text moving"
this resulted two deletions (a moved one and a plain one) instead of
the previous single one.
Moreover, exporting these double deletions at the same position to
ODT, raised a back-compatibility issue with broken text content, see
tdf#107292 (solved recently, but not in older LibreOffice versions).
Removing the explicit w:del code path in writerfilter, it solved
the regression from commit f51fa7534421a195a58b4a737a2e836d8c25ba81
"tdf#145718 sw, DOCX import: complete tracked text moving".
See also commit 9e1e88ad5cf2dc0e9b188c60930445652a6c7519
"tdf#145720 DOCX export: fix loss of tracked moving".
Change-Id: I15bfc83b87dd42a762ff84edf5bae765fe02a5ae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126631
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
(cherry picked from commit 692bc46b25db61176b4ced7b7beffeca7d55068e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126669
Tested-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/source/core/doc')
-rw-r--r-- | sw/source/core/doc/docredln.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx index 28d7295fe344..96f3742ce8f1 100644 --- a/sw/source/core/doc/docredln.cxx +++ b/sw/source/core/doc/docredln.cxx @@ -802,7 +802,7 @@ bool SwRedlineTable::isMoved( size_type rPos ) const } const OUString sTrimmed = pPaM->GetText().trim(); - if ( sTrimmed.isEmpty() ) + if ( sTrimmed.getLength() < 2 ) { if ( bDeletePaM ) delete pPaM; |