summaryrefslogtreecommitdiff
path: root/sw/qa/extras/uiwriter
diff options
context:
space:
mode:
authorManfred Blume <manfred.blume@cib.de>2017-12-08 15:01:51 +0100
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2017-12-22 00:20:40 +0100
commit18765b9fa739337d2d891513f6e2fb7c3ce23b50 (patch)
tree61acc1c9001d529d0df88affe48310187784cc99 /sw/qa/extras/uiwriter
parentbaaf6c12c8e9f785dc91e5d3db8b2f5072d4e3f5 (diff)
tdf#114306 fix unexpected page break in row-spanned table
If a para gets moved off to another page, it never gets moved back. Make IsMoveable() more symmetric, add condition to MoveBwd to also claim table content back. Change-Id: I5366eb824f0ef7016599c777786cbdf42f65b9b5 Reviewed-on: https://gerrit.libreoffice.org/46021 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'sw/qa/extras/uiwriter')
-rwxr-xr-xsw/qa/extras/uiwriter/data/fdo114306.odtbin0 -> 17107 bytes
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx15
2 files changed, 15 insertions, 0 deletions
diff --git a/sw/qa/extras/uiwriter/data/fdo114306.odt b/sw/qa/extras/uiwriter/data/fdo114306.odt
new file mode 100755
index 000000000000..5a7d2f9ca864
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/fdo114306.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 6d6469c376d4..256b3ea8077c 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -289,6 +289,7 @@ public:
void testTdf99689TableOfTables();
void testTdf113790();
void testTdf108048();
+ void testTdf114306();
CPPUNIT_TEST_SUITE(SwUiWriterTest);
CPPUNIT_TEST(testReplaceForward);
@@ -458,6 +459,7 @@ public:
CPPUNIT_TEST(testTdf99689TableOfTables);
CPPUNIT_TEST(testTdf113790);
CPPUNIT_TEST(testTdf108048);
+ CPPUNIT_TEST(testTdf114306);
CPPUNIT_TEST_SUITE_END();
private:
@@ -5243,6 +5245,19 @@ void SwUiWriterTest::testTdf112025()
CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xStyle, "IsLandscape"));
}
+void SwUiWriterTest::testTdf114306()
+{
+ load(DATA_DIRECTORY, "fdo114306.odt");
+ xmlDocPtr pXmlDoc = parseLayoutDump();
+
+ // There are 2 long paragraphs in cell A1.
+ // A part of paragraph 2 should flow over to the second page but
+ // *not* the whole paragraph. There should be 2 paragraphs on
+ // page 1 and 1 paragraph on page 2.
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab[1]/row[1]/cell[1]/txt", 2);
+ assertXPath(pXmlDoc, "/root/page[2]/body/tab[1]/row[1]/cell[1]/txt", 1);
+}
+
void SwUiWriterTest::testTdf108524()
{
createDoc("tdf108524.odt");