summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/uiwriter/data/tdf34957.odtbin0 -> 19634 bytes
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx12
-rw-r--r--sw/source/core/layout/tabfrm.cxx3
3 files changed, 13 insertions, 2 deletions
diff --git a/sw/qa/extras/uiwriter/data/tdf34957.odt b/sw/qa/extras/uiwriter/data/tdf34957.odt
new file mode 100644
index 000000000000..5aacca0c4127
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf34957.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 3e40dffbcfa1..6ce9814e20da 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -169,6 +169,7 @@ public:
void testShapeAnchorUndo();
void testDde();
void testTdf94804();
+ void testTdf34957();
void testTdf89954();
void testTdf89720();
void testTdf88986();
@@ -250,6 +251,7 @@ public:
CPPUNIT_TEST(testShapeAnchorUndo);
CPPUNIT_TEST(testDde);
CPPUNIT_TEST(testTdf94804);
+ CPPUNIT_TEST(testTdf34957);
CPPUNIT_TEST(testTdf89954);
CPPUNIT_TEST(testTdf89720);
CPPUNIT_TEST(testTdf88986);
@@ -2771,6 +2773,16 @@ void SwUiWriterTest::testUnicodeNotationToggle()
CPPUNIT_ASSERT( sDocString.equals(sOriginalDocString) );
}
+void SwUiWriterTest::testTdf34957()
+{
+ load(DATA_DIRECTORY, "tdf34957.odt");
+ // table with "keep with next" always started on a new page if the table was large,
+ // regardless of whether it was already kept with the previous paragraph,
+ // or whether the following paragraph actually fit on the same page (MAB 3.6 - 5.0)
+ CPPUNIT_ASSERT_EQUAL( OUString("Row 1"), parseDump("/root/page[2]/body/tab[1]/row[2]/cell[1]/txt") );
+ CPPUNIT_ASSERT_EQUAL( OUString("Row 1"), parseDump("/root/page[4]/body/tab[1]/row[2]/cell[1]/txt") );
+}
+
void SwUiWriterTest::testTdf89954()
{
SwDoc* pDoc = createDoc("tdf89954.odt");
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index cea182f6360c..236ac881d9d7 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -1768,9 +1768,8 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
const bool bKeep = IsKeep( pAttrs->GetAttrSet() );
// All rows should keep together
- // OD 2004-05-25 #i21478# - don't split table, if it has to keep with next
const bool bDontSplit = !IsFollow() &&
- ( !GetFormat()->GetLayoutSplit().GetValue() || bKeep );
+ ( !GetFormat()->GetLayoutSplit().GetValue() );
// The number of repeated headlines
const sal_uInt16 nRepeat = GetTable()->GetRowsToRepeat();