tdf#128737: sw_odfimport: Add unittest

Change-Id: Iaf6f83ae7ca3691682a849830f208218195088e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113062
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
diff --git a/sw/qa/extras/odfimport/data/tdf128737.odt b/sw/qa/extras/odfimport/data/tdf128737.odt
new file mode 100644
index 0000000..85f2c32
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/tdf128737.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx
index f6e6577..33018ab 100644
--- a/sw/qa/extras/odfimport/odfimport.cxx
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -560,6 +560,13 @@ DECLARE_ODFIMPORT_TEST(testFdo56272, "fdo56272.odt")
    CPPUNIT_ASSERT_EQUAL(sal_Int32(422), xShape->getPosition().Y); // Was -2371
}

DECLARE_ODFIMPORT_TEST(testTdf128737, "tdf128737.odt")
{
    // Without the fix in place, this test would have crashed
    CPPUNIT_ASSERT_EQUAL(4, getPages());
    CPPUNIT_ASSERT_EQUAL(8, getShapes());
}

DECLARE_ODFIMPORT_TEST(testCalcFootnoteContent, "ooo32780-1.odt")
{
    //this was a CalcFootnoteContent crash