summaryrefslogtreecommitdiffstats
path: root/sw/qa/extras/layout/layout3.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/extras/layout/layout3.cxx')
-rw-r--r--sw/qa/extras/layout/layout3.cxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/sw/qa/extras/layout/layout3.cxx b/sw/qa/extras/layout/layout3.cxx
index a074a35dc6..98c77b18ec 100644
--- a/sw/qa/extras/layout/layout3.cxx
+++ b/sw/qa/extras/layout/layout3.cxx
@@ -2353,6 +2353,27 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testPageBreakInHiddenSection)
assertXPath(pXmlDoc, "//page[4]/body/section/infos/bounds"_ostr, "height"_ostr, u"0"_ustr);
}
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf160549)
+{
+ // Given a document with a large as-char object, alone in its paragraph, shifted down by a
+ // header object: it must not hang in a layout loop on import (similar to i84870, but not
+ // fixed by its fix)
+ createSwDoc("tdf160549.fodt");
+ // The object is the first in the document; it must not move to the next page
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf160526)
+{
+ // Given a document with a large as-char object, alone in its paragraph, shifted down by
+ // another body object
+ createSwDoc("tdf160526.fodt");
+ // It must move to the next page
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+ auto pExportDump = parseLayoutDump();
+ assertXPath(pExportDump, "//page[2]/body/txt/anchored/SwAnchoredDrawObject"_ostr);
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */