summaryrefslogtreecommitdiff
path: root/sw/qa/extras/layout
diff options
context:
space:
mode:
authorMark Hung <marklh9@gmail.com>2018-05-23 11:25:05 +0800
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-05-24 17:30:47 +0200
commite87cc12eaf53efa9b221eae7167ea15bc7896752 (patch)
tree3e08a8d37f343dc136f0f539c1ab371eb4ae79a8 /sw/qa/extras/layout
parent47d53d6929d449b0b53dc73eddf29fe9c18fb49e (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. Change-Id: I2505d876d20e44ded1faf760bc3b7b1d34b0fd8d Reviewed-on: https://gerrit.libreoffice.org/54684 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw/qa/extras/layout')
-rwxr-xr-xsw/qa/extras/layout/data/tdf106390.odtbin0 -> 13081 bytes
-rw-r--r--sw/qa/extras/layout/layout.cxx20
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
new file mode 100755
index 000000000000..b2adf5332e34
--- /dev/null
+++ b/sw/qa/extras/layout/data/tdf106390.odt
Binary files differ
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 4d05162a7d74..a7eb24e89208 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -19,6 +19,7 @@ public:
void testTdf116830();
void testTdf116925();
void testTdf117028();
+ void testTdf106390();
void testTdf116848();
void testTdf117245();
@@ -26,6 +27,7 @@ public:
CPPUNIT_TEST(testTdf116830);
CPPUNIT_TEST(testTdf116925);
CPPUNIT_TEST(testTdf117028);
+ CPPUNIT_TEST(testTdf106390);
CPPUNIT_TEST(testTdf116848);
CPPUNIT_TEST(testTdf117245);
CPPUNIT_TEST_SUITE_END();
@@ -112,6 +114,24 @@ void SwLayoutWriter::testTdf117028()
assertXPathContent(pXmlDoc, "//textarray/text", "Hello");
}
+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);
+}
+
void SwLayoutWriter::testTdf116848()
{
SwDoc* pDoc = createDoc("tdf116848.odt");