diff options
author | László Németh <nemeth@numbertext.org> | 2021-04-15 11:20:27 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2021-04-15 14:09:44 +0200 |
commit | 79aa866b184678e3d306d64da59a7deb54c41aef (patch) | |
tree | e4b8ec4e30da1c3809543cc07a0bc9381a3e348a /sw/qa | |
parent | 46ce0d28b4c765076c7871358375c4e85e44534b (diff) |
tdf#141660 DOCX import: fix footnotes of deletions
Footnotes of tracked deletions resulted exception
during import. They don't need redline copying, because
the anchor point (the footnote index) is already part of
a redline.
Note: handle also remaining unhandled w:footnote type
"separationNotice", which could result shift of the
footnote numbering.
Regression from commit 9b39ce0e66acfe812e1d50e530dc2ccdef3e1357
(tdf#76260 DOCX import: fix slow footnote import).
Change-Id: I01e06fb25aba4f97cca31b5da34f5a7a3f18a54a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114137
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf141660.docx | bin | 0 -> 35150 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport11.cxx | 11 |
2 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf141660.docx b/sw/qa/extras/ooxmlexport/data/tdf141660.docx Binary files differnew file mode 100644 index 000000000000..dbcceeebd2f5 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf141660.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx index 943938f67307..280d29f3d596 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx @@ -1306,6 +1306,17 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf121597TrackedDeletionOfMultipleParagr assertXPath(pXmlDoc, "/w:document/w:body/w:p[10]/w:pPr/w:rPr/w:del"); } +DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf141660, "tdf141660.docx") +{ + CPPUNIT_ASSERT_EQUAL(1, getPages()); + xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml"); + + assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[2]/w:footnoteReference", "id", "2"); + // w:del is imported correctly with its footnote + assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:del[2]/w:r/w:footnoteReference", "id", "3"); + assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:r/w:footnoteReference", "id", "4"); +} + DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf133643, "tdf133643.doc") { CPPUNIT_ASSERT_EQUAL(1, getPages()); |