[Libreoffice-commits] core.git: sw/source
Justin Luth (via logerrit)
logerrit at kemper.freedesktop.org
Mon Sep 13 06:53:40 UTC 2021
sw/source/filter/ww8/docxattributeoutput.cxx | 13 -------------
sw/source/filter/ww8/ww8atr.cxx | 9 +++++++++
2 files changed, 9 insertions(+), 13 deletions(-)
New commits:
commit f76f2fc99dcb4a6a250835ec1d52e7c3f6a73321
Author: Justin Luth <justin_luth at sil.org>
AuthorDate: Fri Sep 10 16:48:47 2021 +0200
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon Sep 13 08:53:08 2021 +0200
tdf#137363 DOC export: don't lose sprmPIlvl of para style
Move the DOCX code so that it provides the style's level
to all three formats. (RTF just returns when no text node,
so there is no impact in that case).
Change-Id: Iadeb3e6d9f4e3f0d86222cb3f6bfef84d87d87f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121909
Tested-by: Justin Luth <justin_luth at sil.org>
Reviewed-by: Justin Luth <justin_luth at sil.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index d4067db3703b..c2aa3880ece0 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -8829,19 +8829,6 @@ void DocxAttributeOutput::ParaNumRule_Impl( const SwTextNode* pTextNd, sal_Int32
return;
}
- if (!pTextNd && nLvl == 0)
- {
- // This is a paragraph style and the level would be zero. Then see if the importer set a
- // custom numbering level.
- const SfxItemSet* pSet = m_rExport.m_pISet;
- if (pSet && pSet->HasItem(RES_PARATR_LIST_LEVEL))
- {
- // It did, so use that level.
- const SfxPoolItem* pItem = pSet->GetItem(RES_PARATR_LIST_LEVEL);
- nLvl = pItem->StaticWhichCast(RES_PARATR_LIST_LEVEL).GetValue();
- }
- }
-
m_pSerializer->startElementNS(XML_w, XML_numPr);
m_pSerializer->singleElementNS(XML_w, XML_ilvl, FSNS(XML_w, XML_val), OString::number(nLvl));
m_pSerializer->singleElementNS(XML_w, XML_numId, FSNS(XML_w, XML_val), OString::number(nNumId));
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 0783784cce46..8d5710e2b1cd 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -3745,6 +3745,15 @@ void AttributeOutputBase::ParaNumRule( const SwNumRuleItem& rNumRule )
{
if ( pC && pC->IsAssignedToListLevelOfOutlineStyle() )
nLvl = static_cast< sal_uInt8 >( pC->GetAssignedOutlineStyleLevel() );
+ else
+ {
+ const SfxItemSet* pSet = GetExport().m_pISet;
+ if (pSet && pSet->HasItem(RES_PARATR_LIST_LEVEL))
+ {
+ const SfxPoolItem* pItem = pSet->GetItem(RES_PARATR_LIST_LEVEL);
+ nLvl = pItem->StaticWhichCast(RES_PARATR_LIST_LEVEL).GetValue();
+ }
+ }
}
if ( nLvl >= WW8ListManager::nMaxLevel )
More information about the Libreoffice-commits
mailing list