[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sw/source

Justin Luth justin_luth at sil.org
Wed Jul 13 07:45:52 UTC 2016


 sw/source/core/layout/flowfrm.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 5647eb6f8ef5828ce14973a91946d5d7cdfeae30
Author: Justin Luth <justin_luth at sil.org>
Date:   Sat Jun 11 10:30:18 2016 +0300

    tdf#76349 writer: treat single-column break as page break
    
    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 <justin_luth at sil.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    (cherry picked from commit 2721111437706372eaac9bf1d748723196c573ac)
    Reviewed-on: https://gerrit.libreoffice.org/26786
    Reviewed-by: Justin Luth <justin_luth at sil.org>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx
index 7946f5b..dad6f97 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
             {


More information about the Libreoffice-commits mailing list