[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sw/source
Justin Luth
justin_luth at sil.org
Tue Oct 25 07:40:47 UTC 2016
sw/source/filter/ww8/ww8par2.cxx | 7 +++++++
1 file changed, 7 insertions(+)
New commits:
commit 55840d90c43d0ba6db4a9cda4af648df0776749b
Author: Justin Luth <justin_luth at sil.org>
Date: Mon Oct 24 15:46:45 2016 +0300
tdf#89377 ww8import: table honors ParaStyle break-before-page
MS Word can page-break inside a table at any row
(using paragraph styles from the first column).
Thus a table can be split across many pages.
Writer can't because it ignores all page-breaks while inside a table,
although the entire table itself can specify starting on a new page.
This imported .doc patch checks to see if the very first paragraph style
in a table is set with a page-break, and if so, then transfers
that setting to the table itself. That at least mimics the most
common layout scenario.
Cherry pick from f5f51cb93d11731c64dfd68044144100f5fc4b28
Reviewed-by: Justin Luth <justin_luth at sil.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Change-Id: I25d99c812281e3654c44f21c2b6030a820917890
Reviewed-on: https://gerrit.libreoffice.org/30228
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Justin Luth <justin_luth at sil.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 2259939..989fec4 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -3380,6 +3380,13 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp, SvxULSpaceItem* pULSpaceItem)
}
}
}
+ // if first paragraph in table has break-before-page, transfer that setting to the table itself.
+ else if( StyleExists(m_nAktColl) )
+ {
+ const SwFormat* pStyleFormat = m_vColl[m_nAktColl].m_pFormat;
+ if( pStyleFormat && pStyleFormat->GetBreak().GetBreak() == SVX_BREAK_PAGE_BEFORE )
+ NewAttr( pStyleFormat->GetBreak() );
+ }
m_pTableDesc = new WW8TabDesc( this, nStartCp );
More information about the Libreoffice-commits
mailing list