diff options
author | Gülşah Köse <gulsah.kose@collabora.com> | 2020-02-19 09:08:45 +0300 |
---|---|---|
committer | Gülşah Köse <gulsah.kose@collabora.com> | 2020-02-20 20:17:40 +0100 |
commit | 09a027f682e873f572df533ed558ee99965f5839 (patch) | |
tree | 151dd77974ada1d8b771409200db14e9a4b0524e /sd | |
parent | tdf#130794 qt5: Actually, ignore non-spontaneous QEvent::ShortcutOverride (diff) | |
download | core-09a027f682e873f572df533ed558ee99965f5839.tar.gz core-09a027f682e873f572df533ed558ee99965f5839.zip |
tdf#130776 Show the bullet on second level in smartart.
Change-Id: Ie35867862d30d490a97dc6f245b50c7311dafe50
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88993
Tested-by: Jenkins
Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
(cherry picked from commit 7865c662a4fdc9dc07f59d6ecd76b9c56d0020ae)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88963
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/data/pptx/smartart-missing-bullet.pptx | bin | 0 -> 30139 bytes | |||
-rw-r--r-- | sd/qa/unit/import-tests-smartart.cxx | 26 |
2 files changed, 26 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/smartart-missing-bullet.pptx b/sd/qa/unit/data/pptx/smartart-missing-bullet.pptx Binary files differnew file mode 100644 index 000000000000..2917875a005a --- /dev/null +++ b/sd/qa/unit/data/pptx/smartart-missing-bullet.pptx diff --git a/sd/qa/unit/import-tests-smartart.cxx b/sd/qa/unit/import-tests-smartart.cxx index 9226bbe79152..842cc979ca9c 100644 --- a/sd/qa/unit/import-tests-smartart.cxx +++ b/sd/qa/unit/import-tests-smartart.cxx @@ -101,6 +101,7 @@ public: void testFontSize(); void testVerticalBlockList(); void testBulletList(); + void testMissingBullet(); void testRecursion(); void testDataFollow(); void testOrgChart2(); @@ -144,6 +145,7 @@ public: CPPUNIT_TEST(testFontSize); CPPUNIT_TEST(testVerticalBlockList); CPPUNIT_TEST(testBulletList); + CPPUNIT_TEST(testMissingBullet); CPPUNIT_TEST(testRecursion); CPPUNIT_TEST(testDataFollow); CPPUNIT_TEST(testOrgChart2); @@ -1276,6 +1278,30 @@ void SdImportTestSmartArt::testVerticalBlockList() xDocShRef->DoClose(); } +void SdImportTestSmartArt::testMissingBullet() +{ + sd::DrawDocShellRef xDocShRef = loadURL( + m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-missing-bullet.pptx"), + PPTX); + uno::Reference<drawing::XShapes> xGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY); + uno::Reference<drawing::XShapes> xGroup1(xGroup->getByIndex(2), uno::UNO_QUERY); + uno::Reference<drawing::XShapes> xGroup2(xGroup1->getByIndex(0), uno::UNO_QUERY); + uno::Reference<text::XText> xText(xGroup2->getByIndex(0), uno::UNO_QUERY); + CPPUNIT_ASSERT(xText.is()); + + uno::Reference<container::XEnumerationAccess> xParasAccess(xText, uno::UNO_QUERY); + uno::Reference<container::XEnumeration> xParas = xParasAccess->createEnumeration(); + xParas->nextElement();// skip parent + + uno::Reference<beans::XPropertySet> xPara1(xParas->nextElement(), uno::UNO_QUERY); + CPPUNIT_ASSERT(xPara1.is()); + + sal_Int16 nNumberingLevel = -1; + xPara1->getPropertyValue("NumberingLevel")>>= nNumberingLevel; + + CPPUNIT_ASSERT_EQUAL(sal_Int16(1), nNumberingLevel); +} + void SdImportTestSmartArt::testBulletList() { sd::DrawDocShellRef xDocShRef = loadURL( |