summaryrefslogtreecommitdiff
path: root/sd/qa/unit/layout-tests.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/qa/unit/layout-tests.cxx')
-rw-r--r--sd/qa/unit/layout-tests.cxx38
1 files changed, 38 insertions, 0 deletions
diff --git a/sd/qa/unit/layout-tests.cxx b/sd/qa/unit/layout-tests.cxx
index e4dfe0e3d47c..f34e2fb136f2 100644
--- a/sd/qa/unit/layout-tests.cxx
+++ b/sd/qa/unit/layout-tests.cxx
@@ -253,6 +253,44 @@ void SdLayoutTest::tdf143258_testTbRlLayout()
CPPUNIT_TEST_SUITE_REGISTRATION(SdLayoutTest);
+CPPUNIT_TEST_FIXTURE(SdLayoutTest, testTdf135843_InsideHBorders)
+{
+ sd::DrawDocShellRef xDocShRef = loadURL(
+ m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf135843_insideH.pptx"), PPTX);
+
+ std::shared_ptr<GDIMetaFile> xMetaFile = xDocShRef->GetPreviewMetaFile();
+ MetafileXmlDump dumper;
+
+ xmlDocUniquePtr pXmlDoc = XmlTestTools::dumpAndParse(dumper, *xMetaFile);
+ CPPUNIT_ASSERT(pXmlDoc);
+ // Without the fix, the test fails with:
+ //- Expected: 34
+ //- Actual : 36
+ // We shouldn't see two vertical borders inside the table on ui.
+
+ assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/push", 34);
+ xDocShRef->DoClose();
+}
+
+CPPUNIT_TEST_FIXTURE(SdLayoutTest, testBnc480256)
+{
+ sd::DrawDocShellRef xDocShRef
+ = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/bnc480256-2.pptx"), PPTX);
+
+ std::shared_ptr<GDIMetaFile> xMetaFile = xDocShRef->GetPreviewMetaFile();
+ MetafileXmlDump dumper;
+
+ xmlDocUniquePtr pXmlDoc = XmlTestTools::dumpAndParse(dumper, *xMetaFile);
+ CPPUNIT_ASSERT(pXmlDoc);
+ // Without the fix, the test fails with:
+ //- Expected: #ff0000
+ //- Actual : #ffffff
+ // We should see the red vertical border inside the table.
+
+ assertXPath(pXmlDoc, "/metafile/push[1]/push[1]/push[8]/linecolor[1]", "color", "#ff0000");
+ xDocShRef->DoClose();
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */