diff options
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 557b09fa5917..ba94dc430577 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1403,7 +1403,9 @@ void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap, con isNumberingViaStyle = true; // Since LO7.0/tdf#131321 fixed the loss of numbering in styles, this OUGHT to be obsolete, // but now other new/critical LO7.0 code expects it, and perhaps some corner cases still need it as well. - pParaContext->Insert( PROP_NUMBERING_STYLE_NAME, uno::makeAny(pList->GetStyleName()), true ); + // So we skip it only for default outline styles, which are recognized by NumberingManager. + if (!GetCurrentParaStyleName().startsWith("Heading ")) + pParaContext->Insert( PROP_NUMBERING_STYLE_NAME, uno::makeAny(pList->GetStyleName()), true ); } else if ( !pList->isOutlineNumbering(nListLevel) ) { @@ -1758,11 +1760,13 @@ void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap, con { OUString paraId; m_xPreviousParagraph->getPropertyValue("ListId") >>= paraId; - assert(!paraId.isEmpty()); // must be on some list? - OUString const listId = pAbsList->MapListId(paraId); - if (listId != paraId) + if (!paraId.isEmpty()) // must be on some list? { - m_xPreviousParagraph->setPropertyValue("ListId", uno::makeAny(listId)); + OUString const listId = pAbsList->MapListId(paraId); + if (listId != paraId) + { + m_xPreviousParagraph->setPropertyValue("ListId", uno::makeAny(listId)); + } } } if (pList->GetCurrentLevel()) |