summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2022-06-30 14:41:51 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2022-06-30 23:33:32 +0200
commit59cf9a433e1ea74ccdb1abe080511353a6c0af08 (patch)
tree159cd5b3cbe80b52e5d0fd6b2f3d0c7e1a57d13e /sd
parentc6f1659fa2be14f830fb4a8264b70420df22f7e0 (diff)
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 <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/data/pptx/tdf149785.pptxbin0 -> 35030 bytes
-rw-r--r--sd/qa/unit/import-tests2.cxx16
2 files changed, 16 insertions, 0 deletions
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
--- /dev/null
+++ b/sd/qa/unit/data/pptx/tdf149785.pptx
Binary files 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.