From 5647eb6f8ef5828ce14973a91946d5d7cdfeae30 Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Sat, 11 Jun 2016 10:30:18 +0300 Subject: tdf#76349 writer: treat single-column break as page break MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Writerfilter imports docx-defined column breaks that exist without being in a column. Word treats these as if they were a page break. Writer basically just preserved and ignored them. I limited the fix to only consider SVX_BREAK_COLUMN_BEFORE since writerfilter is only given “column break” and treats it as column_before. Change-Id: I0d974441d53243c4426048dd7cb60b3897b803f6 Reviewed-on: https://gerrit.libreoffice.org/26181 Tested-by: Justin Luth Reviewed-by: Miklos Vajna (cherry picked from commit 2721111437706372eaac9bf1d748723196c573ac) Reviewed-on: https://gerrit.libreoffice.org/26786 Reviewed-by: Justin Luth Tested-by: Jenkins --- sw/source/core/layout/flowfrm.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx index 7946f5b29c4c..dad6f97c0a89 100644 --- a/sw/source/core/layout/flowfrm.cxx +++ b/sw/source/core/layout/flowfrm.cxx @@ -1127,8 +1127,11 @@ bool SwFlowFrame::IsPageBreak( bool bAct ) const return false; } + //for compatibility, also break at column break if no columns exist const SvxBreak eBreak = pSet->GetBreak().GetBreak(); - if ( eBreak == SVX_BREAK_PAGE_BEFORE || eBreak == SVX_BREAK_PAGE_BOTH ) + if ( eBreak == SVX_BREAK_PAGE_BEFORE || + eBreak == SVX_BREAK_PAGE_BOTH || + (eBreak == SVX_BREAK_COLUMN_BEFORE && !m_rThis.FindColFrame()) ) return true; else { -- cgit v1.2.3