diff options
author | Justin Luth <justin_luth@sil.org> | 2021-08-19 18:44:35 +0200 |
---|---|---|
committer | Justin Luth <justin_luth@sil.org> | 2021-08-24 08:28:59 +0200 |
commit | 763f1e8236657a20b359991057679cf12bfac4f5 (patch) | |
tree | 0829e74778d3d67a5a762bb084c98078d4de9569 /writerfilter/source/dmapper/NumberingManager.cxx | |
parent | 1044496d10f2dc5097324dd8857bc6969ac013dc (diff) |
tdf#143692 writerfilter CN: reapply lost OutlineLevel
The paragraph styles had already set their numbering-related
properties before numbering.xml choses some styles
to be assigned as Chapter Numbering. Part of this CN process
in SW is to clear the inheriting styles of any inherited
numbering properties (numId, listLevel, outlineLevel).
So, we need to re-address outline levels after
numbering has been imported, and fix up anything
that has been cleared.
[P.S. No need to do the same thing for listLevel yet,
b/c LO does not support listLevel on paragraph styles in general.]
Change-Id: Idfb4d150b94558b069dbb1a87c764460396b34d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120757
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'writerfilter/source/dmapper/NumberingManager.cxx')
-rw-r--r-- | writerfilter/source/dmapper/NumberingManager.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx index b0f1102ad785..9e2072bc6ee6 100644 --- a/writerfilter/source/dmapper/NumberingManager.cxx +++ b/writerfilter/source/dmapper/NumberingManager.cxx @@ -610,6 +610,7 @@ void ListDef::CreateNumberingRules( DomainMapper& rDMapper, xOutlines->getChapterNumberingRules( ); StyleSheetEntryPtr pParaStyle = pAbsLevel->GetParaStyle( ); + pParaStyle->bAssignedAsChapterNumbering = true; aLvlProps.push_back(comphelper::makePropertyValue(getPropertyName(PROP_HEADING_STYLE_NAME), pParaStyle->sConvertedStyleName)); xOutlineRules->replaceByIndex(nLevel, uno::makeAny(comphelper::containerToSequence(aLvlProps))); @@ -1206,6 +1207,7 @@ void ListsManager::CreateNumberingRules( ) { rList->CreateNumberingRules(m_rDMapper, m_xFactory, nChosenAsChapterNumberingId); } + m_rDMapper.GetStyleSheetTable()->ReApplyInheritedOutlineLevelFromChapterNumbering(); m_rDMapper.GetStyleSheetTable()->ApplyNumberingStyleNameToParaStyles(); } |