diff options
author | Justin Luth <justin_luth@sil.org> | 2016-11-29 08:15:40 +0300 |
---|---|---|
committer | Justin Luth <justin_luth@sil.org> | 2016-11-30 04:22:23 +0000 |
commit | 4307a850a310c0371bee1f79a8eb41fa8ff7fed2 (patch) | |
tree | b8fa4173572b97cc84f814a68b971c5b5ec09699 /writerfilter | |
parent | d53262282aed31819aa1ce9f608d5edba658dae4 (diff) |
tdf#103975 docx import: don't lose column break #2
Change-Id: I871e10d675d9009c163dd2b0fc74d29206934e34
Reviewed-on: https://gerrit.libreoffice.org/31342
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index aa279d6d4ac1..439ecf2abb14 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -3252,8 +3252,10 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len) m_pImpl->m_bIgnoreNextPara = false; return; } + + const bool bSingleParagraph = m_pImpl->GetIsFirstParagraphInSection() && m_pImpl->GetIsLastParagraphInSection(); PropertyMapPtr pContext = m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH); - if (pContext && m_pImpl->GetSettingsTable()->GetSplitPgBreakAndParaMark()) + if (pContext && (m_pImpl->GetSettingsTable()->GetSplitPgBreakAndParaMark() || bSingleParagraph)) { if (m_pImpl->isBreakDeferred(PAGE_BREAK)) pContext->Insert(PROP_BREAK_TYPE, uno::makeAny(style::BreakType_PAGE_BEFORE)); @@ -3271,7 +3273,6 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len) m_pImpl->clearDeferredBreaks(); } - 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() |