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/+/89278
diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
index 12dcae7..51b4c8c 100644
--- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
+++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
@@ -1224,10 +1224,16 @@ void AlgAtom::layoutShape( const ShapePtr& rShape,
                aParagraph->getProperties().setLevel(nLevel);
                if (nLevel >= nStartBulletsAtLevel)
                {
                    if (!aParagraph->getProperties().getParaLeftMargin().has_value())
                    {
                        sal_Int32 nLeftMargin = 285750 * (nLevel - nStartBulletsAtLevel + 1) / EMU_PER_HMM;
                        aParagraph->getProperties().getParaLeftMargin() = nLeftMargin;
                    }

                    if (!aParagraph->getProperties().getFirstLineIndentation().has_value())
                        aParagraph->getProperties().getFirstLineIndentation() = -285750 / EMU_PER_HMM;

                    // It is not possible to change the bullet style for text.
                    sal_Int32 nLeftMargin = 285750 * (nLevel - nStartBulletsAtLevel + 1) / EMU_PER_HMM;
                    aParagraph->getProperties().getParaLeftMargin() = nLeftMargin;
                    aParagraph->getProperties().getFirstLineIndentation() = -285750 / EMU_PER_HMM;
                    OUString aBulletChar = OUString::fromUtf8(u8"•");
                    aParagraph->getProperties().getBulletList().setBulletChar(aBulletChar);
                    aParagraph->getProperties().getBulletList().setSuffixNone();
diff --git a/sd/qa/unit/import-tests-smartart.cxx b/sd/qa/unit/import-tests-smartart.cxx
index 842cc97..f0ab9ff 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);
@@ -1278,7 +1278,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"),
@@ -1298,8 +1298,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()