summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2022-07-19 17:17:52 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2022-07-19 19:48:37 +0200
commit93b07a377b93875b28464546f1292e4aa5f9e17d (patch)
tree1d3f14e04e0e36a5df3ffecf3be719d6893548e1 /sd
parentd4ea357e3cf1328597716c701adc255ec8f70a2c (diff)
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 <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/data/pptx/tdf149985.pptxbin0 -> 43600 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/tdf149985.pptx b/sd/qa/unit/data/pptx/tdf149985.pptx
new file mode 100644
index 000000000000..fedc3234a1e3
--- /dev/null
+++ b/sd/qa/unit/data/pptx/tdf149985.pptx
Binary files 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.