diff options
author | Michael Stahl <mstahl@redhat.com> | 2017-05-12 17:08:01 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-05-12 21:18:58 +0200 |
commit | f6785b99a3f7e7531c8ef7ed16402cc4e02c9750 (patch) | |
tree | 0d553ed9910e8ea8f1b6348feac71525bce94e2f | |
parent | a280c61f7d2dafe10d8f9dbcfc7476a372dfd5a0 (diff) |
tdf#107568 sw: prevent moving/splitting of tables in footnotes
The problem here is that for a table in a footnote on page 42,
SwTabFrm::MakeAll() calls Split(), which first creates a
follow-table-frame and then reformats the last row of the table;
somehow the SwTextFrame id="4636" in that row doesn't fit and wants
to split and then move to the following page with that page's footnote
container as its parent.
So this doesn't work currently.
commit 971adcd9e19e0bcab5855aae9be58d2203b46169 tried to prevent just
the moving forward of the table itself, but the table can still be split;
if IsMoveable() returns false then that also prevents splitting the table.
Change-Id: I1977c65f97cb0f66dbe5b89d7ef7e2cd05125331
-rw-r--r-- | sw/source/core/layout/findfrm.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/layout/flowfrm.cxx | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/sw/source/core/layout/findfrm.cxx b/sw/source/core/layout/findfrm.cxx index eded8b3def6d..490a95439715 100644 --- a/sw/source/core/layout/findfrm.cxx +++ b/sw/source/core/layout/findfrm.cxx @@ -1329,7 +1329,7 @@ bool SwFrame::IsMoveable( const SwLayoutFrame* _pLayoutFrame ) const } } } - else + else if (!(_pLayoutFrame->IsInFootnote() && (IsTabFrame() || IsInTab()))) { bRetVal = true; } diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx index 5724da1b87a9..cf10f8805a96 100644 --- a/sw/source/core/layout/flowfrm.cxx +++ b/sw/source/core/layout/flowfrm.cxx @@ -1803,6 +1803,8 @@ bool SwFlowFrame::MoveFwd( bool bMakePage, bool bPageBreak, bool bMoveAlways ) SwFootnoteBossFrame *pOldBoss = m_rThis.FindFootnoteBossFrame(); if (m_rThis.IsInFootnote()) { + assert(!m_rThis.IsTabFrame()); // prevented by IsMoveable() + assert(!m_rThis.IsInTab()); if (!m_rThis.IsContentFrame() || !pOldBoss) { SAL_WARN("sw.core", "Tables in footnotes are not truly supported"); |