diff options
author | Grzegorz Araminowicz <g.araminowicz@gmail.com> | 2017-08-07 12:42:36 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2017-08-17 15:18:15 +0200 |
commit | f1d65b13ff6f0cd82ae36a3e6d58961d3c7273ac (patch) | |
tree | 8a9fb8b1308adaca8b5abf6b803c16f517cb7c56 /sd | |
parent | 8cba023cbd8f1576d7f30855847a85d762b7b1fa (diff) |
SmartArt: support cnt function
it was necessary to introduce in LayoutAtoms reference to containing
LayoutNode passed by constructors, so that ConditionAtom can
access LayoutNode's name and diagram data
Change-Id: I35c9cb9061f23eb15e7a9372476530e2ead5d0dc
Reviewed-on: https://gerrit.libreoffice.org/41108
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'sd')
-rwxr-xr-x | sd/qa/unit/data/pptx/smartart-cnt.pptx | bin | 0 -> 47360 bytes | |||
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 19 |
2 files changed, 19 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/smartart-cnt.pptx b/sd/qa/unit/data/pptx/smartart-cnt.pptx Binary files differnew file mode 100755 index 000000000000..4ab27d169a7b --- /dev/null +++ b/sd/qa/unit/data/pptx/smartart-cnt.pptx diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 47daa04cd3ce..a4de6d9b5978 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -166,6 +166,7 @@ public: void testSmartArt1(); void testSmartArtChildren(); void testSmartArtText(); + void testSmartArtCnt(); void testTdf109223(); void testTdf109187(); @@ -241,6 +242,7 @@ public: CPPUNIT_TEST(testSmartArt1); CPPUNIT_TEST(testSmartArtChildren); CPPUNIT_TEST(testSmartArtText); + CPPUNIT_TEST(testSmartArtCnt); CPPUNIT_TEST(testTdf109223); CPPUNIT_TEST(testTdf109187); @@ -2316,6 +2318,23 @@ void SdImportTest::testSmartArtText() xDocShRef->DoClose(); } +void SdImportTest::testSmartArtCnt() +{ + sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/smartart-cnt.pptx"), PPTX); + uno::Reference<drawing::XShapes> xShapeGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY_THROW); + sal_Int32 nCount = xShapeGroup->getCount(); + sal_Int32 nCorrect = 0; + for (sal_Int32 i=0; i<nCount; i++) + { + uno::Reference<text::XText> xText(xShapeGroup->getByIndex(i), uno::UNO_QUERY); + if (xText.is() && !xText->getString().isEmpty()) + nCorrect++; + } + CPPUNIT_ASSERT_EQUAL(sal_Int32(3), nCorrect); + + xDocShRef->DoClose(); +} + void SdImportTest::testTdf109223() { // In the test document flipV attribute is defined for a group shape |