tdf#57155: sw_ooxmlexport7: Add unittest
Change-Id: Idc6f35fdffed9a466c574f20baba6ec75a797d1c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99131
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
diff --git a/sw/qa/extras/ooxmlexport/data/tdf57155.docx b/sw/qa/extras/ooxmlexport/data/tdf57155.docx
new file mode 100644
index 0000000..5cca9b3
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf57155.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
index 74e822f..cb0ed23 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
@@ -156,10 +156,17 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf104539, "tdf104539.odt")
"dir", "13500000");
}
DECLARE_OOXMLEXPORT_TEST(testTdf57155, "tdf57155.docx")
{
CPPUNIT_ASSERT_EQUAL(2, getPages());
// Without the fix in place, the image in the header of page 2 wouldn't exist
CPPUNIT_ASSERT_EQUAL(4, getShapes());
}
DECLARE_OOXMLEXPORT_TEST(testTdf129582, "tdf129582.docx")
{
CPPUNIT_ASSERT_EQUAL(2, getPages());
// Without the fix in place, the image on the second footer would be imported
// Without the fix in place, the image in the footer of page 2 wouldn't exist
CPPUNIT_ASSERT_EQUAL(2, getShapes());
}