diff options
author | Gülşah Köse <gulsah.kose@collabora.com> | 2020-02-20 14:13:40 +0300 |
---|---|---|
committer | Gülşah Köse <gulsah.kose@collabora.com> | 2020-02-24 08:23:59 +0100 |
commit | 73cac1031131021819a0fbd4d60554196aea230c (patch) | |
tree | c21fdd4d4bbbd759047f329f1867a48f475b67e2 /sd | |
parent | 1e97fb44829481845a7e768392f92f6c00f324de (diff) |
tdf130839: Corrects second level left margin in Smartart
Change-Id: Ifec339759427336fd53012e0a8a906d240be9654
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89085
Tested-by: Jenkins
Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
(cherry picked from commit eeaa7aba6e7ace8b69d7056645b15be2f996d8fb)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89277
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/import-tests-smartart.cxx | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/sd/qa/unit/import-tests-smartart.cxx b/sd/qa/unit/import-tests-smartart.cxx index 2d47381c4e67..d14c4bc6950a 100644 --- a/sd/qa/unit/import-tests-smartart.cxx +++ b/sd/qa/unit/import-tests-smartart.cxx @@ -101,7 +101,7 @@ public: void testFontSize(); void testVerticalBlockList(); void testBulletList(); - void testMissingBullet(); + void testMissingBulletAndIndent(); void testRecursion(); void testDataFollow(); void testOrgChart2(); @@ -145,7 +145,7 @@ public: CPPUNIT_TEST(testFontSize); CPPUNIT_TEST(testVerticalBlockList); CPPUNIT_TEST(testBulletList); - CPPUNIT_TEST(testMissingBullet); + CPPUNIT_TEST(testMissingBulletAndIndent); CPPUNIT_TEST(testRecursion); CPPUNIT_TEST(testDataFollow); CPPUNIT_TEST(testOrgChart2); @@ -1277,7 +1277,7 @@ void SdImportTestSmartArt::testVerticalBlockList() xDocShRef->DoClose(); } -void SdImportTestSmartArt::testMissingBullet() +void SdImportTestSmartArt::testMissingBulletAndIndent() { sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-missing-bullet.pptx"), @@ -1297,8 +1297,19 @@ void SdImportTestSmartArt::testMissingBullet() sal_Int16 nNumberingLevel = -1; xPara1->getPropertyValue("NumberingLevel")>>= nNumberingLevel; - CPPUNIT_ASSERT_EQUAL(sal_Int16(1), nNumberingLevel); + + uno::Reference< container::XIndexAccess > xNumRule; + xPara1->getPropertyValue("NumberingRules") >>= xNumRule; + uno::Sequence<beans::PropertyValue> aBulletProps; + xNumRule->getByIndex(1) >>= aBulletProps; + + for (int i = 0; i < aBulletProps.getLength(); ++i) + { + const beans::PropertyValue& rProp = aBulletProps[i]; + if(rProp.Name == "LeftMargin") + CPPUNIT_ASSERT_EQUAL(sal_Int32(309), rProp.Value.get<sal_Int32>()); + } } void SdImportTestSmartArt::testBulletList() |