summaryrefslogtreecommitdiff
path: root/sd/qa/unit/import-tests-smartart.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/qa/unit/import-tests-smartart.cxx')
-rw-r--r--sd/qa/unit/import-tests-smartart.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/sd/qa/unit/import-tests-smartart.cxx b/sd/qa/unit/import-tests-smartart.cxx
index 4fe544a86000..b243a2bc395f 100644
--- a/sd/qa/unit/import-tests-smartart.cxx
+++ b/sd/qa/unit/import-tests-smartart.cxx
@@ -75,6 +75,7 @@ public:
void testRotation();
void testTextAutoRotation();
void testPyramid();
+ void testPyramidOneChild();
void testChevron();
void testCycle();
void testvenndiagram();
@@ -125,6 +126,7 @@ public:
CPPUNIT_TEST(testRotation);
CPPUNIT_TEST(testTextAutoRotation);
CPPUNIT_TEST(testPyramid);
+ CPPUNIT_TEST(testPyramidOneChild);
CPPUNIT_TEST(testChevron);
CPPUNIT_TEST(testCycle);
CPPUNIT_TEST(testHierarchy);
@@ -429,6 +431,19 @@ void SdImportTestSmartArt::testPyramid()
//FIXME : so far this only introduce the test document, but the actual importer was not fixed yet.
}
+void SdImportTestSmartArt::testPyramidOneChild()
+{
+ // Load a document with a pyra algorithm in it.
+ // Without the accompanying fix in place, this test would have crashed.
+ sd::DrawDocShellRef xDocShRef = loadURL(
+ m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/smartart-pyramid-1child.pptx"), PPTX);
+ uno::Reference<drawing::XShape> xGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xText(getChildShape(getChildShape(xGroup, 1), 1),
+ uno::UNO_QUERY);
+ // Verify that the text of the only child is imported correctly.
+ CPPUNIT_ASSERT_EQUAL(OUString("A"), xText->getString());
+}
+
void SdImportTestSmartArt::testChevron()
{
sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/smartart-chevron.pptx"), PPTX);