sd/qa/unit/data/pptx/tdf149785.pptx |binary sd/qa/unit/import-tests2.cxx | 16 ++++++++++++++++ 2 files changed, 16 insertions(+)
New commits: commit 59cf9a433e1ea74ccdb1abe080511353a6c0af08 Author: Xisco Fauli <[email protected]> AuthorDate: Thu Jun 30 14:41:51 2022 +0200 Commit: Xisco Fauli <[email protected]> CommitDate: Thu Jun 30 23:33:32 2022 +0200 tdf#149785: sd_import_tests2: Add unittest Change-Id: I8d11508adc999381a119da26a5cf438072c8aff2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136672 Tested-by: Jenkins Reviewed-by: Xisco Fauli <[email protected]> diff --git a/sd/qa/unit/data/pptx/tdf149785.pptx b/sd/qa/unit/data/pptx/tdf149785.pptx new file mode 100644 index 000000000000..9b969af171c1 Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf149785.pptx differ diff --git a/sd/qa/unit/import-tests2.cxx b/sd/qa/unit/import-tests2.cxx index 33bbcca615b7..d7273967be67 100644 --- a/sd/qa/unit/import-tests2.cxx +++ b/sd/qa/unit/import-tests2.cxx @@ -119,6 +119,7 @@ public: void testPatternImport(); void testPptCrop(); void testTdf149206(); + void testTdf149785(); void testTdf120028(); void testDescriptionImport(); void testTdf83247(); @@ -183,6 +184,7 @@ public: CPPUNIT_TEST(testTdf116266); CPPUNIT_TEST(testPptCrop); CPPUNIT_TEST(testTdf149206); + CPPUNIT_TEST(testTdf149785); CPPUNIT_TEST(testTdf120028); CPPUNIT_TEST(testDescriptionImport); CPPUNIT_TEST(testTdf83247); @@ -1567,6 +1569,20 @@ void SdImportTest2::testTdf149206() CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), aCrop.Right); } +void SdImportTest2::testTdf149785() +{ + // 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/tdf149785.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.
