sw/qa/extras/ooxmlexport/ooxmlexport16.cxx        |    4 ++++
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |    2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit ba7dc3413388449303745fdcbaa7e4ac478cd5a2
Author:     Justin Luth <justin_l...@sil.org>
AuthorDate: Fri Apr 30 15:37:33 2021 +0200
Commit:     Justin Luth <justin_l...@sil.org>
CommitDate: Fri Jul 9 16:14:13 2021 +0200

    tdf#141964 writerfilter CN: also insert inherited listLevels
    
    If direct formatting specifies a numId, but does not provide
    a listLevel, the listLevel can be inherited from styles.
    Since this is a NOT-OVERWRITE, it is fine to try to
    insert again even if direct formatting has already
    inserted a level.
    
    Change-Id: Id6e492c8f686949de862cb052866b824ef90d8ef
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115259
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <justin_l...@sil.org>

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
index c65e59e2ff78..120c312969d2 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
@@ -178,6 +178,10 @@ 
DECLARE_OOXMLEXPORT_TEST(testTdf141966_chapterNumberTortureTest, "tdf141966_chap
     xPara.set(getParagraph(11, "direct formatting - Body listLvl(9)."), 
uno::UNO_QUERY);
     CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(xPara, 
"ListLabelString"));
 
+    xPara.set(getParagraph(12, "direct numId, inherit listLvl."), 
uno::UNO_QUERY);
+    //CPPUNIT_ASSERT_EQUAL(OUString("2nd.ii.a.1.I"), 
getProperty<OUString>(xPara, "ListLabelString"));
+    CPPUNIT_ASSERT_EQUAL(sal_Int16(4), getProperty<sal_Int16>(xPara, 
"NumberingLevel")); // Level 5
+
     xPara.set(getParagraph(13, "Style numId0 cancels inherited numbering."), 
uno::UNO_QUERY);
     CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty<OUString>(xPara, 
"ListLabelString"));
 }
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 01ea5230ecfa..40602ee0d40d 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1548,7 +1548,7 @@ void DomainMapper_Impl::finishParagraph( const 
PropertyMapPtr& pPropertyMap, con
         if (nListLevel == -1 && nListId > 0)
             nListLevel = 0;
 
-        if (!bNoNumbering && !isNumberingViaRule && nListLevel >= 0 && 
nListLevel < 9)
+        if (!bNoNumbering && nListLevel >= 0 && nListLevel < 9)
             pParaContext->Insert( PROP_NUMBERING_LEVEL, 
uno::makeAny(nListLevel), false );
 
         auto const pList(GetListTable()->GetList(nListId));
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to