[Libreoffice-commits] core.git: sw/source

Justin Luth (via logerrit) logerrit at kemper.freedesktop.org
Mon Jun 21 16:49:51 UTC 2021


 sw/source/filter/ww8/ww8atr.cxx |   13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

New commits:
commit 8259a221e0d090a00eb5f102406626dcc7beeb25
Author:     Justin Luth <justin.luth at collabora.com>
AuthorDate: Thu Apr 1 12:40:06 2021 +0200
Commit:     Justin Luth <justin_luth at sil.org>
CommitDate: Mon Jun 21 18:49:14 2021 +0200

    related tdf#81705 doc export: eliminate duplicating OutlineNumbering
    
    It just looks redundant. And all three formats
    handle it very different.
    RTF - never writes RES_PARATR_OUTLINELEVEL
    or RES_PARATR_NUMRULE in styles,
    only via this OutlineNumbering.
    
    DOCX does nothing. That's because there always
    seems to be a RES_PARATR_OUTLINELEVEL and
    RES_PARATR_NUMRULE.
    
    DOC does BOTH. It writes RES_PARATR_NUMRULE
    (and now also writes RES_PARATR_OUTLINELEVEL)
    and also writes them via OutlineNumbering.
    
    So OutlineNumbering seems to always have
    been partially redundant and now is fully
    redundant. Thus it can be treated like DOCX.
    
    Change-Id: Ib9fd32c440e0151b462d6499a60952f120887082
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113452
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <justin_luth at sil.org>

diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 3361e58c5bbc..80aad82b3545 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -753,18 +753,9 @@ sal_uInt8 WW8Export::GetNumId( sal_uInt16 eNumType )
     return nRet;
 }
 
-void WW8AttributeOutput::OutlineNumbering(sal_uInt8 nLvl)
+void WW8AttributeOutput::OutlineNumbering(sal_uInt8 /*nLvl*/)
 {
-    if ( nLvl >= WW8ListManager::nMaxLevel )
-        nLvl = WW8ListManager::nMaxLevel-1;
-
-    // write sprmPIlvl and sprmPIlfo
-    // (sprmPOutLvl now handled by ParaOutlineLevel)
-    SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::PIlvl::val );
-    m_rWW8Export.pO->push_back( nLvl );
-    SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::PIlfo::val );
-    SwWW8Writer::InsUInt16( *m_rWW8Export.pO,
-        1 + m_rWW8Export.GetNumberingId(*m_rWW8Export.m_rDoc.GetOutlineNumRule()) );
+    // Handled by ParaOutlineLevel and ParaNumRule
 }
 
 // #i77805#


More information about the Libreoffice-commits mailing list