summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-05-12 17:08:01 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-05-16 12:03:21 +0200
commitc4b55ea03da881590e5fac1ffc97177e4ce16b0b (patch)
treecf0e3405df63b5c9cda2f5cbf9da0061a70aa7ac
parentb462870a3a5053b1efd507960c2d0d2a13a838c7 (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 (cherry picked from commit f6785b99a3f7e7531c8ef7ed16402cc4e02c9750) Reviewed-on: https://gerrit.libreoffice.org/37561 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r--sw/source/core/layout/findfrm.cxx2
-rw-r--r--sw/source/core/layout/flowfrm.cxx2
2 files changed, 3 insertions, 1 deletions
diff --git a/sw/source/core/layout/findfrm.cxx b/sw/source/core/layout/findfrm.cxx
index 89cf31663e2c..9caa4894e1f9 100644
--- a/sw/source/core/layout/findfrm.cxx
+++ b/sw/source/core/layout/findfrm.cxx
@@ -1330,7 +1330,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 7ab8e85c7119..c2ccaddaf66c 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -1805,6 +1805,8 @@ bool SwFlowFrame::MoveFwd( bool bMakePage, bool bPageBreak, bool bMoveAlways )
return false;
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");