From 5833acad1fe8a43ca532b7bb3136d93476532726 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 13 Jan 2022 12:27:20 +0100 Subject: sw: DOCX export: don't export numPr to style, but only... ... if the outline level doesn't have numbering. This should fix the originally reported vague problem, in case it really is a problem. Change-Id: I12a7bc4cd9455e84b596b8e403421f04a515d393 --- sw/source/filter/ww8/docxattributeoutput.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 8e894d68117c..6d76edcd13de 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -8154,9 +8154,11 @@ void DocxAttributeOutput::ParaNumRule_Impl( const SwTextNode* pTextNd, sal_Int32 const sal_Int32 nTableSize = m_rExport.m_pUsedNumTable ? m_rExport.m_pUsedNumTable->size() : 0; const SwNumRule* pRule = nNumId > 0 && nNumId <= nTableSize ? (*m_rExport.m_pUsedNumTable)[nNumId-1] : nullptr; const bool bOutlineRule = pRule && pRule->IsOutlineRule(); + const bool bIsNumbered(pRule && pRule->Get(nLvl).GetNumberingType() != SVX_NUM_NUMBER_NONE); // Do not export outline rules (Chapter Numbering) as paragraph properties, only as style properties. - if ( !pTextNd || !bOutlineRule ) + // Only export them as style properties if the outline level actually applies numbering. + if ((!pTextNd && bIsNumbered) || !bOutlineRule) { m_pSerializer->startElementNS(XML_w, XML_numPr); m_pSerializer->singleElementNS(XML_w, XML_ilvl, -- cgit v1.2.3