summaryrefslogtreecommitdiff
path: root/writerfilter/source/dmapper
diff options
context:
space:
mode:
Diffstat (limited to 'writerfilter/source/dmapper')
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx3
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx8
2 files changed, 6 insertions, 5 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 74502be05b3f..9604361fc110 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -3520,7 +3520,8 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len)
if (bNewLine)
{
const bool bSingleParagraph = m_pImpl->GetIsFirstParagraphInSection() && m_pImpl->GetIsLastParagraphInSection();
- const bool bSingleParagraphAfterRedline = m_pImpl->GetIsFirstParagraphInSection(true) && m_pImpl->GetIsLastParagraphInSection();
+ const bool bSingleParagraphAfterRedline = m_pImpl->GetIsFirstParagraphInSection(/*bAfterRedline=*/true) &&
+ m_pImpl->GetIsLastParagraphInSection();
PropertyMapPtr pContext = m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH);
if (!m_pImpl->GetFootnoteContext())
{
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index c0aff5d713a3..a7d488b47a89 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -2077,20 +2077,20 @@ void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap, con
else
SetIsPreviousParagraphFramed(false);
- m_bParaChanged = false;
m_bRemoveThisParagraph = false;
if( !IsInHeaderFooter() && !IsInShape() && (!pParaContext || !pParaContext->IsFrameMode()) )
{ // If the paragraph is in a frame, shape or header/footer, it's not a paragraph of the section itself.
SetIsFirstParagraphInSection(false);
- // count first not deleted paragraph as first paragraph in section to avoid of
- // its deletion later, resulting loss of the associated page break
- if (!m_previousRedline)
+ // don't count an empty deleted paragraph as first paragraph in section to avoid of
+ // the deletion of the next empty paragraph later, resulting loss of the associated page break
+ if (!m_previousRedline || m_bParaChanged)
{
SetIsFirstParagraphInSectionAfterRedline(false);
SetIsLastParagraphInSection(false);
}
}
m_previousRedline.clear();
+ m_bParaChanged = false;
if (m_bIsFirstParaInShape)
m_bIsFirstParaInShape = false;