summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2020-07-10 18:52:42 +0200
committerLászló Németh <nemeth@numbertext.org>2020-07-14 13:02:13 +0200
commit616a47c9570f9ce67b18a124f08f4a342bff3468 (patch)
treea3c43e756b31dfa7f78cfaf61fe95d597433b41b /sw
parentacedfab7a3fc0f49a77d674e393ff63125dc0d9b (diff)
tdf#134793 DOCX import: fix numbering with inline images
before page break. Previous fix for tdf#118701 didn't keep numbering of the paragraph marked for deletion. This reverts commit b216fc5b583050cfb1cdf9bd82ec3c1bd2e09d70 (tdf#118701 DOCX import: fix image position on page break). Change-Id: I5bde927f15b4b1f682d81482734fadff7690f6d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98541 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf118701.docxbin25229 -> 21644 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport15.cxx18
2 files changed, 16 insertions, 2 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf118701.docx b/sw/qa/extras/ooxmlexport/data/tdf118701.docx
index 654a22709919..8fb26669d1fa 100644
--- a/sw/qa/extras/ooxmlexport/data/tdf118701.docx
+++ b/sw/qa/extras/ooxmlexport/data/tdf118701.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
index 776fe5df0010..6168211ce34e 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
@@ -34,9 +34,23 @@ DECLARE_OOXMLEXPORT_TEST(testTdf133334_followPgStyle, "tdf133334_followPgStyle.o
CPPUNIT_ASSERT_EQUAL(2, getPages());
}
-DECLARE_OOXMLIMPORT_TEST(testTdf118701, "tdf118701.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf118701, "tdf118701.docx")
{
- CPPUNIT_ASSERT_EQUAL_MESSAGE("At least one paragraph is missing from the file!", 3, getParagraphs());
+ // This was 6, related to moving inline images after the page breaks
+ CPPUNIT_ASSERT_EQUAL(4, getPages());
+
+ xmlDocUniquePtr pXmlDoc = parseExport();
+
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr[1]/w:numPr", 0);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr[1]/w:numPr", 0);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:pPr[1]/w:numPr", 0);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:pPr[1]/w:numPr", 1);
+
+ // Keep numbering of the paragraph of the inline image
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[8]/w:pPr[1]/w:numPr", 0);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[9]/w:pPr[1]/w:numPr", 1);
+ // This was 0
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[10]/w:pPr[1]/w:numPr", 1);
}
DECLARE_OOXMLEXPORT_TEST(testTdf133370_columnBreak, "tdf133370_columnBreak.odt")