summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/layout/data/tabellen_test_windows_1.odtbin0 -> 11954 bytes
-rw-r--r--sw/qa/extras/layout/layout.cxx12
-rw-r--r--sw/source/core/layout/flowfrm.cxx3
3 files changed, 13 insertions, 2 deletions
diff --git a/sw/qa/extras/layout/data/tabellen_test_windows_1.odt b/sw/qa/extras/layout/data/tabellen_test_windows_1.odt
new file mode 100644
index 000000000000..a666fe5fd47d
--- /dev/null
+++ b/sw/qa/extras/layout/data/tabellen_test_windows_1.odt
Binary files differ
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 15e33d74d18e..d4450264826a 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -492,6 +492,18 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, TestTdf134272)
assertXPath(pXmlDoc, "/root/page[1]/header/txt[2]/infos/bounds", "bottom", "2819");
}
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, TestNestedTableMoveFwd)
+{
+ SwDoc* pDoc = createDoc("tabellen_test_windows_1.odt");
+ CPPUNIT_ASSERT(pDoc);
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+ // the row with the nested table should not be split but be the first row on page 2
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab[1]/row[last()]/cell[1]/txt[1]/Text", "Portion",
+ "Tabelle 1");
+ assertXPath(pXmlDoc, "/root/page[2]/body/tab[1]/row[1]/cell[1]/tab[1]/row[1]/cell[1]/txt/Text",
+ "Portion", "Tabelle 2");
+}
+
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, TestTdf136613)
{
SwDoc* pDoc = createDoc("tdf136613.docx");
diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx
index aeeb9df158cf..6a2c12a5044f 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -1951,8 +1951,7 @@ bool SwFlowFrame::MoveFwd( bool bMakePage, bool bPageBreak, bool bMoveAlways )
// Allow the MoveFwd even if we do not have an IndPrev in these cases:
if ( m_rThis.IsInTab() &&
( !m_rThis.IsTabFrame() ||
- ( m_rThis.GetUpper()->IsInTab() &&
- m_rThis.GetUpper()->FindTabFrame()->IsFwdMoveAllowed() ) ) &&
+ m_rThis.GetUpper()->IsInTab() ) &&
nullptr != m_rThis.GetNextCellLeaf() )
{
bNoFwd = false;