[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - oox/source sd/qa

Gülşah Köse (via logerrit) logerrit at kemper.freedesktop.org
Fri Feb 21 11:00:47 UTC 2020


 oox/source/drawingml/textparagraphproperties.cxx  |    3 ++
 sd/qa/unit/data/pptx/smartart-missing-bullet.pptx |binary
 sd/qa/unit/import-tests-smartart.cxx              |   26 ++++++++++++++++++++++
 3 files changed, 29 insertions(+)

New commits:
commit 9ed15a8f5e9a7f4de190499fbfc1fa9a4ff26c67
Author:     Gülşah Köse <gulsah.kose at collabora.com>
AuthorDate: Wed Feb 19 09:08:45 2020 +0300
Commit:     Gülşah Köse <gulsah.kose at collabora.com>
CommitDate: Fri Feb 21 12:00:17 2020 +0100

    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 at collabora.com>
    (cherry picked from commit 7865c662a4fdc9dc07f59d6ecd76b9c56d0020ae)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88962

diff --git a/oox/source/drawingml/textparagraphproperties.cxx b/oox/source/drawingml/textparagraphproperties.cxx
index f1c966deeaa4..9183c2f53e64 100644
--- a/oox/source/drawingml/textparagraphproperties.cxx
+++ b/oox/source/drawingml/textparagraphproperties.cxx
@@ -396,7 +396,10 @@ void TextParagraphProperties::pushToPropSet( const ::oox::core::XmlFilterBase* p
 
     sal_Int32 nNumberingType = NumberingType::NUMBER_NONE;
     if ( maBulletList.mnNumberingType.hasValue() )
+    {
         maBulletList.mnNumberingType >>= nNumberingType;
+        aPropSet.setProperty< sal_Int16 >( PROP_NumberingLevel, getLevel() );
+    }
     else if ( pMasterBuList && pMasterBuList->mnNumberingType.hasValue() )
         pMasterBuList->mnNumberingType >>= nNumberingType;
     if ( nNumberingType == NumberingType::NUMBER_NONE )
diff --git a/sd/qa/unit/data/pptx/smartart-missing-bullet.pptx b/sd/qa/unit/data/pptx/smartart-missing-bullet.pptx
new file mode 100644
index 000000000000..2917875a005a
Binary files /dev/null and b/sd/qa/unit/data/pptx/smartart-missing-bullet.pptx differ
diff --git a/sd/qa/unit/import-tests-smartart.cxx b/sd/qa/unit/import-tests-smartart.cxx
index a55e340e3ec4..2d47381c4e67 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);
@@ -1275,6 +1277,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(


More information about the Libreoffice-commits mailing list