summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-02-01 11:07:30 +0100
committerMichael Stahl <mstahl@redhat.com>2016-02-01 13:07:14 +0100
commit57def64bec0853de7d6f4243e31e8e9650491914 (patch)
tree14b35f548b76229f770a6e8a728dcf303887b445 /writerfilter
parent61e80cd9e3e425674e18221237b8b0574645f377 (diff)
writerfilter: tdf#97417: don't insert numbering on end-of-section
... paragraph, it will be copied to every following paragraph. (Before commit 2b78f2cd7b9e4bab0f3b3b9119238f36a1bbc7b2 the properties of the end-of-section paragraph would be overwritten by the properties inside the header) Change-Id: Ibe095cf873a09ef9e12f898d09b5fd6f61c914c9
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx13
1 files changed, 11 insertions, 2 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 4f2e981236bb..96edc575c600 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -3194,10 +3194,19 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len)
bool bSingleParagraph = m_pImpl->GetIsFirstParagraphInSection() && m_pImpl->GetIsLastParagraphInSection();
// If the paragraph contains only the section properties and it has
// no runs, we should not create a paragraph for it in Writer, unless that would remove the whole section.
- bool bRemove = !m_pImpl->GetParaChanged() && m_pImpl->GetParaSectpr() && !bSingleParagraph;
+ bool bRemove = !m_pImpl->GetParaChanged() && m_pImpl->GetParaSectpr() && !bSingleParagraph && !m_pImpl->GetIsDummyParaAddedForTableInSection();
+ if (bRemove)
+ {
+ // tdf#97417 delete numbering of the paragraph
+ // it will be deleted anyway, and the numbering would be copied
+ // to the next paragraph in sw SplitNode and then be applied to
+ // every following paragraph
+ m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH)->Erase(PROP_NUMBERING_RULES);
+ m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH)->Erase(PROP_NUMBERING_LEVEL);
+ }
m_pImpl->SetParaSectpr(false);
m_pImpl->finishParagraph(m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH));
- if (bRemove && !m_pImpl->GetIsDummyParaAddedForTableInSection())
+ if (bRemove)
m_pImpl->RemoveLastParagraph();
}
else