diff options
author | László Németh <nemeth@numbertext.org> | 2022-07-07 13:04:45 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2022-07-08 09:31:49 +0200 |
commit | 11071d95f4f3cbe578c3393729c42b7cce011b45 (patch) | |
tree | c579cd74c4d978dc15fa13f45224afa0f41a7b90 /sw | |
parent | 19347d219fb017eeffb998c7ebd857585f263752 (diff) |
tdf#149711 sw_redlinenum DOCX: import moveTo paragraph mark
It was imported as an old paragraph with new content,
resulting that e.g. rejecting a moved list item left
an empty list item instead of removing the moved list
item completely.
Follow-up to commit 80694a8fcfeb86ed69425ab6954b353b9a0ae854
"tdf#149708 sw_redlinenum DOCX export: track inserted list items"
and commit d32d9a2b3c5e3963f4a18f6c7bbf50fab2e9b2be
"tdf#123460 DOCX track changes: moveFrom completely".
Change-Id: Ia1997aeffeb45f89bb738c6faa95fb2efc54fd7e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136886
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/layout/data/tdf149711.docx | bin | 0 -> 13619 bytes | |||
-rw-r--r-- | sw/qa/extras/layout/layout2.cxx | 17 |
2 files changed, 17 insertions, 0 deletions
diff --git a/sw/qa/extras/layout/data/tdf149711.docx b/sw/qa/extras/layout/data/tdf149711.docx Binary files differnew file mode 100644 index 000000000000..d90efa7c1f88 --- /dev/null +++ b/sw/qa/extras/layout/data/tdf149711.docx diff --git a/sw/qa/extras/layout/layout2.cxx b/sw/qa/extras/layout/layout2.cxx index c755bd62514f..cb36569fbc8f 100644 --- a/sw/qa/extras/layout/layout2.cxx +++ b/sw/qa/extras/layout/layout2.cxx @@ -566,6 +566,23 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf149709_RedlineNumberingLevel) assertXPathContent(pXmlDoc, "/metafile/push/push/push/textarray[8]/text", "2."); } +CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf149711_importDOCXMoveToParagraphMark) +{ + SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf149711.docx"); + xmlDocUniquePtr pXmlDoc = parseLayoutDump(); + assertXPath(pXmlDoc, "/root/page[1]/body/txt", 6); + + // reject tracked insertion (moveTo) + SwEditShell* const pEditShell(pDoc->GetEditShell()); + CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(2), pEditShell->GetRedlineCount()); + pEditShell->RejectRedline(1); + + discardDumpedLayout(); + pXmlDoc = parseLayoutDump(); + // This was 6 (not tracked paragraph mark of the moveTo list item) + assertXPath(pXmlDoc, "/root/page[1]/body/txt", 5); +} + CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testRedlineNumberInFootnote) { SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf85610.fodt"); |