summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/layout/data/fdo48718-1.docxbin0 -> 25400 bytes
-rw-r--r--sw/qa/extras/layout/layout3.cxx12
-rw-r--r--sw/source/core/layout/tabfrm.cxx3
3 files changed, 14 insertions, 1 deletions
diff --git a/sw/qa/extras/layout/data/fdo48718-1.docx b/sw/qa/extras/layout/data/fdo48718-1.docx
new file mode 100644
index 000000000000..373aa357fd5c
--- /dev/null
+++ b/sw/qa/extras/layout/data/fdo48718-1.docx
Binary files differ
diff --git a/sw/qa/extras/layout/layout3.cxx b/sw/qa/extras/layout/layout3.cxx
index 7c36605bb82d..3ee4953e52cc 100644
--- a/sw/qa/extras/layout/layout3.cxx
+++ b/sw/qa/extras/layout/layout3.cxx
@@ -2290,6 +2290,18 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf138124)
1);
}
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, TestTdf161348)
+{
+ createSwDoc("fdo48718-1.docx");
+
+ xmlDocUniquePtr pXml = parseLayoutDump();
+
+ // the floating table is on page 1
+ // apparently both parts of the split table are on this text frame
+ assertXPath(pXml, "/root/page[1]/body/txt[2]/anchored/fly"_ostr, 2);
+ assertXPath(pXml, "/root/page[1]/body/txt[2]/anchored/fly/tab"_ostr, 2);
+}
+
CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf154113)
{
createSwDoc("three_sections.fodt");
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index efc716052fe0..42116672708f 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -807,7 +807,8 @@ static bool lcl_RecalcSplitLine( SwRowFrame& rLastLine, SwRowFrame& rFollowLine,
bRet = false;
// apparently checking nFootnoteHeight here does *not* guarantee that it fits into the body
- if (bRet && nDistanceToFootnoteBodyPrtBottom + nFollowFootnotes < 0)
+ if (bRet && rTab.IsInDocBody()
+ && nDistanceToFootnoteBodyPrtBottom + nFollowFootnotes < 0)
{
assert(rTab.GetUpper() != rTab.FindFootnoteBossFrame()->FindBodyCont());
SAL_INFO("sw.layout", "SwTabFrame Split failed because of footnote growth");