summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/data/pptx/tdf120028.pptxbin0 -> 30465 bytes
-rw-r--r--sd/qa/unit/import-tests.cxx26
2 files changed, 26 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/tdf120028.pptx b/sd/qa/unit/data/pptx/tdf120028.pptx
new file mode 100644
index 000000000000..035c36730663
--- /dev/null
+++ b/sd/qa/unit/data/pptx/tdf120028.pptx
Binary files differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index cb06f043a0aa..cca17846c666 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -189,6 +189,7 @@ public:
void testPatternImport();
void testPptCrop();
void testTdf119015();
+ void testTdf120028();
CPPUNIT_TEST_SUITE(SdImportTest);
@@ -271,6 +272,7 @@ public:
CPPUNIT_TEST(testTdf116266);
CPPUNIT_TEST(testPptCrop);
CPPUNIT_TEST(testTdf119015);
+ CPPUNIT_TEST(testTdf120028);
CPPUNIT_TEST_SUITE_END();
};
@@ -2557,6 +2559,30 @@ void SdImportTest::testTdf119015()
xDocShRef->DoClose();
}
+void SdImportTest::testTdf120028()
+{
+ ::sd::DrawDocShellRef xDocShRef
+ = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf120028.pptx"), PPTX);
+ uno::Reference<drawing::XDrawPagesSupplier> xDoc(xDocShRef->GetDoc()->getUnoModel(),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xDoc.is());
+
+ uno::Reference<drawing::XDrawPage> xPage(xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xPage.is());
+
+ // This failed, shape was not a table, all text was rendered in a single
+ // column.
+ uno::Reference<beans::XPropertySet> xShape(getShape(0, xPage));
+ uno::Reference<table::XColumnRowRange> xModel(xShape->getPropertyValue("Model"),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xModel.is());
+
+ uno::Reference<table::XTableColumns> xColumns = xModel->getColumns();
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(4), xColumns->getCount());
+
+ xDocShRef->DoClose();
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTest);
CPPUNIT_PLUGIN_IMPLEMENT();