[Libreoffice-commits] core.git: sd/qa

Xisco Fauli (via logerrit) logerrit at kemper.freedesktop.org
Mon Mar 29 10:07:15 UTC 2021


 sd/qa/unit/data/tdf131269.ppt |binary
 sd/qa/unit/import-tests.cxx   |   17 +++++++++++++++++
 2 files changed, 17 insertions(+)

New commits:
commit fc4881aafd70326830cd4e2b51cd09b55ea03ced
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Mon Mar 29 10:54:17 2021 +0200
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Mon Mar 29 12:06:37 2021 +0200

    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 at libreoffice.org>

diff --git a/sd/qa/unit/data/tdf131269.ppt b/sd/qa/unit/data/tdf131269.ppt
new file mode 100644
index 000000000000..480691d3b7ef
Binary files /dev/null and b/sd/qa/unit/data/tdf131269.ppt 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);


More information about the Libreoffice-commits mailing list