diff options
authorJustin Luth <>2016-10-24 15:46:45 +0300
committerMiklos Vajna <>2016-10-25 07:40:27 +0000
commit55840d90c43d0ba6db4a9cda4af648df0776749b (patch)
parentc6b34fd6db956a7b3e695c412131715f32a6e2a9 (diff)
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 <> Reviewed-by: Miklos Vajna <> Change-Id: I25d99c812281e3654c44f21c2b6030a820917890 Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Justin Luth <> Reviewed-by: Miklos Vajna <>
1 files changed, 7 insertions, 0 deletions
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 2259939b0e5f..989fec47297f 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 );