sd/qa/unit/data/pptx/tdf149985.pptx |binary
 sd/qa/unit/import-tests2.cxx        |   16 ++++++++++++++++
 2 files changed, 16 insertions(+)

New commits:
commit 93b07a377b93875b28464546f1292e4aa5f9e17d
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Tue Jul 19 17:17:52 2022 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Tue Jul 19 19:48:37 2022 +0200

    tdf#149985: sd_import_tests2: Add unittest
    
    Change-Id: I0ce12e862ca90ab62da508820aecb3bce93445b7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137235
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sd/qa/unit/data/pptx/tdf149985.pptx 
b/sd/qa/unit/data/pptx/tdf149985.pptx
new file mode 100644
index 000000000000..fedc3234a1e3
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf149985.pptx differ
diff --git a/sd/qa/unit/import-tests2.cxx b/sd/qa/unit/import-tests2.cxx
index d7273967be67..a1750c34042b 100644
--- a/sd/qa/unit/import-tests2.cxx
+++ b/sd/qa/unit/import-tests2.cxx
@@ -120,6 +120,7 @@ public:
     void testPptCrop();
     void testTdf149206();
     void testTdf149785();
+    void testTdf149985();
     void testTdf120028();
     void testDescriptionImport();
     void testTdf83247();
@@ -185,6 +186,7 @@ public:
     CPPUNIT_TEST(testPptCrop);
     CPPUNIT_TEST(testTdf149206);
     CPPUNIT_TEST(testTdf149785);
+    CPPUNIT_TEST(testTdf149985);
     CPPUNIT_TEST(testTdf120028);
     CPPUNIT_TEST(testDescriptionImport);
     CPPUNIT_TEST(testTdf83247);
@@ -1583,6 +1585,20 @@ void SdImportTest2::testTdf149785()
     xDocShRef->DoClose();
 }
 
+void SdImportTest2::testTdf149985()
+{
+    // Without the fix in place, this test would have failed to load the file
+    ::sd::DrawDocShellRef xDocShRef
+        = 
loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf149985.pptx"), 
PPTX);
+    uno::Reference<drawing::XDrawPagesSupplier> 
xDoc(xDocShRef->GetDoc()->getUnoModel(),
+                                                     uno::UNO_QUERY);
+
+    const SdrPage* pPage = GetPage(1, xDocShRef);
+    CPPUNIT_ASSERT_EQUAL(size_t(1), pPage->GetObjCount());
+
+    xDocShRef->DoClose();
+}
+
 void SdImportTest2::testTdf120028()
 {
     // Check that the text shape has 4 columns.

Reply via email to