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

Vasily Melenchuk (via logerrit) logerrit at kemper.freedesktop.org
Thu Jun 11 09:28:01 UTC 2020


 sw/qa/extras/ooxmlexport/data/tdf132754.docx     |binary
 sw/qa/extras/ooxmlexport/ooxmlexport14.cxx       |   16 ++++++++++++++++
 writerfilter/source/dmapper/NumberingManager.cxx |    4 +++-
 3 files changed, 19 insertions(+), 1 deletion(-)

New commits:
commit 10abc94f9b3b223747f9dffd8d43f277343c8e1c
Author:     Vasily Melenchuk <vasily.melenchuk at cib.de>
AuthorDate: Sun May 10 00:43:59 2020 +0300
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Thu Jun 11 11:27:31 2020 +0200

    tdf#132754: DOCX import: changed default list start nubmer
    
    Default value for list numbering startAt is zero. If it is not
    proveded numbering starts from this value.
    
    Change-Id: I2cf7be9063e7bfb8b72d6ba77fcd9507e33bb848
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93899
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    (cherry picked from commit f8211e84a5239de25fe6dc45a4bb6b6f8673a1ee)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96048

diff --git a/sw/qa/extras/ooxmlexport/data/tdf132754.docx b/sw/qa/extras/ooxmlexport/data/tdf132754.docx
new file mode 100644
index 000000000000..baec54f5e0d7
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf132754.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
index f410c889375d..ca870b54e06b 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
@@ -351,6 +351,22 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf128889, "tdf128889.fodt")
     assertXPath(pXml, "/w:document/w:body/w:p[1]/w:r[2]/w:br", "type", "page");
 }
 
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf132754, "tdf132754.docx")
+{
+    {
+        uno::Reference<beans::XPropertySet> xPara(getParagraph(1), uno::UNO_QUERY);
+        CPPUNIT_ASSERT_EQUAL(OUString("0.0.0."), getProperty<OUString>(xPara, "ListLabelString"));
+    }
+    {
+        uno::Reference<beans::XPropertySet> xPara(getParagraph(2), uno::UNO_QUERY);
+        CPPUNIT_ASSERT_EQUAL(OUString("0.0.1."), getProperty<OUString>(xPara, "ListLabelString"));
+    }
+    {
+        uno::Reference<beans::XPropertySet> xPara(getParagraph(3), uno::UNO_QUERY);
+        CPPUNIT_ASSERT_EQUAL(OUString("0.0.2."), getProperty<OUString>(xPara, "ListLabelString"));
+    }
+}
+
 DECLARE_OOXMLEXPORT_TEST(testTdf129353, "tdf129353.docx")
 {
     CPPUNIT_ASSERT_EQUAL(8, getParagraphs());
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index 322c99200230..a00e780ad240 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -187,8 +187,10 @@ uno::Sequence<beans::PropertyValue> ListLevel::GetLevelProperties(bool bDefaults
 {
     std::vector<beans::PropertyValue> aNumberingProperties;
 
-    if( m_nIStartAt >= 0)
+    if (m_nIStartAt >= 0)
         aNumberingProperties.push_back(lcl_makePropVal<sal_Int16>(PROP_START_WITH, m_nIStartAt) );
+    else if (bDefaults)
+        aNumberingProperties.push_back(lcl_makePropVal<sal_Int16>(PROP_START_WITH, 0));
 
     sal_Int16 nNumberFormat = ConversionHelper::ConvertNumberingType(m_nNFC);
     if( m_nNFC >= 0)


More information about the Libreoffice-commits mailing list