[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - sw/source
Michael Stahl
mstahl at redhat.com
Tue May 16 10:04:26 UTC 2017
sw/source/core/layout/findfrm.cxx | 2 +-
sw/source/core/layout/flowfrm.cxx | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
New commits:
commit c4b55ea03da881590e5fac1ffc97177e4ce16b0b
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri May 12 17:08:01 2017 +0200
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 at libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
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");
More information about the Libreoffice-commits
mailing list