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/qa/extras/layout | |
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/qa/extras/layout')
-rw-r--r-- | sw/qa/extras/layout/layout2.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/qa/extras/layout/layout2.cxx b/sw/qa/extras/layout/layout2.cxx index 92910435383e..10d01fa05e33 100644 --- a/sw/qa/extras/layout/layout2.cxx +++ b/sw/qa/extras/layout/layout2.cxx @@ -337,7 +337,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testRedlineMovingDOCX) SwEditShell* const pEditShell(pDoc->GetEditShell()); // This was 2 (moveFrom and moveTo joined other redlines) - CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(6), pEditShell->GetRedlineCount()); + CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(5), pEditShell->GetRedlineCount()); // Dump the rendering of the first page as an XML file. std::shared_ptr<GDIMetaFile> xMetaFile = pShell->GetPreviewMetaFile(); |