summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx14
1 files changed, 12 insertions, 2 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 224f8c2aa902..cc05d84cef4a 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -3892,13 +3892,23 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len)
// 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.
- SectionPropertyMap* pSectionContext = m_pImpl->GetSectionContext();
+ // Also do not remove here column breaks: they are treated in a different way and place.
+ bool bIsColumnBreak = false;
+ if (pContext->isSet(PROP_BREAK_TYPE))
+ {
+ const uno::Any aBreakType = pContext->getProperty(PROP_BREAK_TYPE)->second;
+ bIsColumnBreak =
+ aBreakType == style::BreakType_COLUMN_BEFORE ||
+ aBreakType == style::BreakType_COLUMN_AFTER ||
+ aBreakType == style::BreakType_COLUMN_BOTH;
+ }
+
bool bRemove = (!m_pImpl->GetParaChanged() && m_pImpl->GetRemoveThisPara()) ||
(!m_pImpl->GetParaChanged() && m_pImpl->GetParaSectpr()
&& !bSingleParagraphAfterRedline
+ && !bIsColumnBreak
&& !m_pImpl->GetParaHadField()
&& (!m_pImpl->GetIsDummyParaAddedForTableInSectionPage())
- && !( pSectionContext && pSectionContext->GetBreakType() != -1 && pContext && pContext->isSet(PROP_BREAK_TYPE) )
&& !m_pImpl->GetIsPreviousParagraphFramed()
&& !m_pImpl->HasTopAnchoredObjects()
&& !m_pImpl->IsParaWithInlineObject());