diff options
Diffstat (limited to 'sw/qa/extras/layout')
-rw-r--r-- | sw/qa/extras/layout/data/tdf134298.ott | bin | 0 -> 40880 bytes | |||
-rw-r--r-- | sw/qa/extras/layout/layout.cxx | 21 |
2 files changed, 21 insertions, 0 deletions
diff --git a/sw/qa/extras/layout/data/tdf134298.ott b/sw/qa/extras/layout/data/tdf134298.ott Binary files differnew file mode 100644 index 000000000000..effb595eb328 --- /dev/null +++ b/sw/qa/extras/layout/data/tdf134298.ott diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx index 8760640d86bf..682b8b27a8d7 100644 --- a/sw/qa/extras/layout/layout.cxx +++ b/sw/qa/extras/layout/layout.cxx @@ -3269,6 +3269,27 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf127235) pDoc->getIDocumentLayoutAccess().GetCurrentViewShell()->CalcLayout(); } +CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf134298) +{ + createDoc("tdf134298.ott"); + + xmlDocPtr pXmlDoc = parseLayoutDump(); + + // there are 2 pages + assertXPath(pXmlDoc, "/root/page", 2); + // table and first para on first page + assertXPath(pXmlDoc, "/root/page[1]/body/tab", 1); + assertXPath(pXmlDoc, "/root/page[1]/body/txt", 1); + assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/anchored", 0); + // paragraph with large fly on second page + assertXPath(pXmlDoc, "/root/page[2]/body/tab", 0); + assertXPath(pXmlDoc, "/root/page[2]/body/txt", 1); + assertXPath(pXmlDoc, "/root/page[2]/body/txt[1]/anchored/fly", 1); + assertXPath(pXmlDoc, "/root/page[2]/body/txt[1]/anchored/fly[1]/infos/bounds", "top", "17897"); + assertXPath(pXmlDoc, "/root/page[2]/body/txt[1]/anchored/fly[1]/infos/bounds", "height", + "15819"); +} + CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf124601b) { // Table has an image, which is anchored in the first row, but its vertical position is large |