diff options
author | Mark Hung <marklh9@gmail.com> | 2018-05-23 11:25:05 +0800 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-06-07 17:58:30 +0200 |
commit | 50eafa86655e0e9fe5860d68c6a75b2a363b3bad (patch) | |
tree | 8a81eefccd053ca23fd450df9a847bf4e90236e7 /sw/qa | |
parent | e87f6c248a939c27d7023e752a16c3c278aa922b (diff) |
tdf#106390 Intersect the table borders with upper frames.
Also removes dead code because SwTabFramePainter::Insert()
is always called with a cell frame and IsTabFrame() always
returns false.
Reviewed-on: https://gerrit.libreoffice.org/54684
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
(cherry picked from commit e87cc12eaf53efa9b221eae7167ea15bc7896752)
Conflicts:
sw/qa/extras/layout/layout.cxx
sw/source/core/layout/paintfrm.cxx
(cherry picked from commit 948283caae76fa5c42216d10519c86bcbffb6d1d)
Change-Id: I2505d876d20e44ded1faf760bc3b7b1d34b0fd8d
Diffstat (limited to 'sw/qa')
-rwxr-xr-x | sw/qa/extras/layout/data/tdf106390.odt | bin | 0 -> 13081 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/tdf106390.odt b/sw/qa/extras/layout/data/tdf106390.odt Binary files differnew file mode 100755 index 000000000000..b2adf5332e34 --- /dev/null +++ b/sw/qa/extras/layout/data/tdf106390.odt diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx index 84d1e55e5a22..2baa48dea3aa 100644 --- a/sw/qa/extras/layout/layout.cxx +++ b/sw/qa/extras/layout/layout.cxx @@ -19,9 +19,11 @@ class SwLayoutWriter : public SwModelTestBase { public: void testUserFieldTypeLanguage(); + void testTdf106390(); CPPUNIT_TEST_SUITE(SwLayoutWriter); CPPUNIT_TEST(testUserFieldTypeLanguage); + CPPUNIT_TEST(testTdf106390); CPPUNIT_TEST_SUITE_END(); private: @@ -57,6 +59,24 @@ void SwLayoutWriter::testUserFieldTypeLanguage() assertXPath(pXmlDoc, "/root/page/body/txt/Special[@nType='POR_FLD']", "rText", "1,234.56"); } +void SwLayoutWriter::testTdf106390() +{ + SwDoc* pDoc = createDoc("tdf106390.odt"); + SwDocShell* pShell = pDoc->GetDocShell(); + + // Dump the rendering of the first page as an XML file. + std::shared_ptr<GDIMetaFile> xMetaFile = pShell->GetPreviewMetaFile(); + MetafileXmlDump dumper; + xmlDocPtr pXmlDoc = dumper.dumpAndParse(*xMetaFile); + CPPUNIT_ASSERT(pXmlDoc); + sal_Int32 nBottom = getXPath(pXmlDoc, "//sectrectclipregion", "bottom").toInt32(); + + // No end point of line segments shall go below the bottom of the clipping area. + const OString sXPath = "//polyline/point[@y>" + OString::number(nBottom) + "]"; + + assertXPath(pXmlDoc, sXPath, 0); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SwLayoutWriter); CPPUNIT_PLUGIN_IMPLEMENT(); |