summaryrefslogtreecommitdiff
path: root/sd/qa
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2021-03-29 10:54:17 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2021-03-29 12:06:37 +0200
commitfc4881aafd70326830cd4e2b51cd09b55ea03ced (patch)
treeca0d6d5736e807c61a27a056cb40e9bfc6595d8d /sd/qa
parentff321dd36554d25f0817903becf4598065e0a194 (diff)
tdf#131269: sd_import: Add unittest
Change-Id: I81ced436c4b4484ec58af35a559412ea1f97aaf0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113294 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd/qa')
-rw-r--r--sd/qa/unit/data/tdf131269.pptbin0 -> 154112 bytes
-rw-r--r--sd/qa/unit/import-tests.cxx17
2 files changed, 17 insertions, 0 deletions
diff --git a/sd/qa/unit/data/tdf131269.ppt b/sd/qa/unit/data/tdf131269.ppt
new file mode 100644
index 000000000000..480691d3b7ef
--- /dev/null
+++ b/sd/qa/unit/data/tdf131269.ppt
Binary files differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 19fda935620a..64c215d9b02a 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -119,6 +119,7 @@ public:
void testDocumentLayout();
void testSmoketest();
+ void testTdf131269();
void testN759180();
void testN778859();
void testMasterPageStyleParent();
@@ -236,6 +237,7 @@ public:
CPPUNIT_TEST(testDocumentLayout);
CPPUNIT_TEST(testSmoketest);
+ CPPUNIT_TEST(testTdf131269);
CPPUNIT_TEST(testN759180);
CPPUNIT_TEST(testN778859);
CPPUNIT_TEST(testMasterPageStyleParent);
@@ -447,6 +449,21 @@ void SdImportTest::testSmoketest()
xDocShRef->DoClose();
}
+void SdImportTest::testTdf131269()
+{
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/tdf131269.ppt"), PPT);
+
+ SdDrawDocument *pDoc = xDocShRef->GetDoc();
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: 115
+ // - Actual : 3
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(115), pDoc->GetPageCount());
+
+ xDocShRef->DoClose();
+}
+
void SdImportTest::testN759180()
{
sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/n759180.pptx"), PPTX);