summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2022-01-12 20:39:21 +0100
committerMichael Stahl <michael.stahl@allotropia.de>2022-01-13 12:29:18 +0100
commit286cced269e44e1393caad792a184eecd5455b1a (patch)
tree88aaca117a4a2068be77db9c384e076e0b143a55
parente6f6cac6a36c1a63950871dfba22ad9565c0a0c6 (diff)
Revert "sw: DOCX export: don't export numPr to style from outline numrule"
This reverts commit b6b63c7ce92f7cc830593dbdd639cfde4951b971. This doesn't work if there actually is numbering. Change-Id: I9a801d92d70733c13deaca1d624cb3cc60d43ac2
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index f987ca7dfff0..8e894d68117c 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -8147,7 +8147,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 )
{
@@ -8155,9 +8155,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,