sw/source/filter/ww8/docxattributeoutput.cxx |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

New commits:
commit 32d11fb200d45cdacb973b625488d0b8bbee6d81
Author:     Justin Luth <justin_l...@sil.org>
AuthorDate: Mon Jan 25 08:28:35 2021 +0300
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Mon Jan 25 10:45:19 2021 +0100

    Revert "sw: DOCX export: don't export numPr to style from outline numrule"
    
    This reverts 7.1 commit 9e455724e50bf512683b1cddfeb7493e047c19ae.
    to fix regression bugs tdf#138780 and tdf#139089
    
    Change-Id: I2a5bbcd990a6648667342cc989160582e0367f09
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109864
    Tested-by: Justin Luth <justin_l...@sil.org>
    Tested-by: Xisco Fauli <xiscofa...@libreoffice.org>
    Reviewed-by: Justin Luth <justin_l...@sil.org>
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 1808db7a3369..36cf9f570c78 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -8614,7 +8614,7 @@ void DocxAttributeOutput::ParaHyphenZone( const 
SvxHyphenZoneItem& rHyphenZone )
             FSNS( XML_w, XML_val ), OString::boolean( !rHyphenZone.IsHyphen() 
) );
 }
 
-void DocxAttributeOutput::ParaNumRule_Impl(const SwTextNode*, sal_Int32 nLvl, 
sal_Int32 nNumId)
+void DocxAttributeOutput::ParaNumRule_Impl( const SwTextNode* pTextNd, 
sal_Int32 nLvl, sal_Int32 nNumId )
 {
     if ( USHRT_MAX == nNumId )
         return;
@@ -8623,9 +8623,8 @@ void DocxAttributeOutput::ParaNumRule_Impl(const 
SwTextNode*, sal_Int32 nLvl, sa
     const SwNumRule* pRule = nNumId > 0 && nNumId <= nTableSize ? 
(*m_rExport.m_pUsedNumTable)[nNumId-1] : nullptr;
     const bool bOutlineRule = pRule && pRule->IsOutlineRule();
 
-    // Do not export outline rules (Chapter Numbering) as paragraph properties,
-    // neither as style properties - there's w:outlineLvl for that.
-    if (!bOutlineRule)
+    // Do not export outline rules (Chapter Numbering) as paragraph 
properties, only as style properties.
+    if ( !pTextNd || !bOutlineRule )
     {
         m_pSerializer->startElementNS(XML_w, XML_numPr);
         m_pSerializer->singleElementNS(XML_w, XML_ilvl,
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to