diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2019-02-07 11:17:21 +0100 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2019-02-12 09:13:58 +0100 |
commit | e41b09d0126ecb28cff277c9b4b40eae7cc7c3f4 (patch) | |
tree | f1664189feae1930cd817d1ad9e539e52ab8d4dc /sw/qa | |
parent | fe2e315e21ccc53c2b15e1b2648001b638e13d58 (diff) |
tdf#122607 Fix layout invalidation in headless mode
Layout was not invalidated correctly since the visible area is 0
in headless mode.
So just reformat the whole doc when doing the pdf conversion headless.
An attempt to fix this was already made with commit 1ecca673b40fedc53db125e332b087d1c120a254
but that didn't cover all cases.
Change-Id: I3f620b2f2db2c4a6e5bf279b33e5c93697e4e2d4
Reviewed-on: https://gerrit.libreoffice.org/67417
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/layout/data/tdf122607.odt | bin | 0 -> 23271 bytes | |||
-rw-r--r-- | sw/qa/extras/layout/layout.cxx | 20 |
2 files changed, 20 insertions, 0 deletions
diff --git a/sw/qa/extras/layout/data/tdf122607.odt b/sw/qa/extras/layout/data/tdf122607.odt Binary files differnew file mode 100644 index 000000000000..123e04702ef8 --- /dev/null +++ b/sw/qa/extras/layout/data/tdf122607.odt diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx index 83af848df67f..f02d8a3fbbbc 100644 --- a/sw/qa/extras/layout/layout.cxx +++ b/sw/qa/extras/layout/layout.cxx @@ -66,6 +66,7 @@ public: void testTdf120287c(); void testTdf122878(); void testTdf115094(); + void testTdf122607(); CPPUNIT_TEST_SUITE(SwLayoutWriter); CPPUNIT_TEST(testRedlineFootnotes); @@ -105,6 +106,7 @@ public: CPPUNIT_TEST(testTdf120287c); CPPUNIT_TEST(testTdf122878); CPPUNIT_TEST(testTdf115094); + CPPUNIT_TEST(testTdf122607); CPPUNIT_TEST_SUITE_END(); private: @@ -2767,6 +2769,24 @@ void SwLayoutWriter::testTdf115094() CPPUNIT_ASSERT_LESS(nTopOfB2Anchored, nTopOfB2); } +void SwLayoutWriter::testTdf122607() +{ + createDoc("tdf122607.odt"); + xmlDocPtr pXmlDoc = parseLayoutDump(); + assertXPath(pXmlDoc, + "/root/page[1]/anchored/fly/txt[1]/anchored/fly/tab/row[2]/cell/txt[7]/anchored/" + "fly/txt/Text[1]", + "nHeight", "253"); + assertXPath(pXmlDoc, + "/root/page[1]/anchored/fly/txt[1]/anchored/fly/tab/row[2]/cell/txt[7]/anchored/" + "fly/txt/Text[1]", + "nWidth", "428"); + assertXPath(pXmlDoc, + "/root/page[1]/anchored/fly/txt[1]/anchored/fly/tab/row[2]/cell/txt[7]/anchored/" + "fly/txt/Text[1]", + "Portion", "Fax:"); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SwLayoutWriter); CPPUNIT_PLUGIN_IMPLEMENT(); |