diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2022-01-13 12:27:20 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2022-01-13 17:22:29 +0100 |
commit | 5833acad1fe8a43ca532b7bb3136d93476532726 (patch) | |
tree | b6a753a6f9b1136417aa2181ebd9b960146bb944 | |
parent | 286cced269e44e1393caad792a184eecd5455b1a (diff) |
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
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
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, |