summaryrefslogtreecommitdiffstats
path: root/sw/qa/extras/layout/layout3.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/extras/layout/layout3.cxx')
-rw-r--r--sw/qa/extras/layout/layout3.cxx25
1 files changed, 25 insertions, 0 deletions
diff --git a/sw/qa/extras/layout/layout3.cxx b/sw/qa/extras/layout/layout3.cxx
index 04bf1fc6c318..ccc69ab1b2bc 100644
--- a/sw/qa/extras/layout/layout3.cxx
+++ b/sw/qa/extras/layout/layout3.cxx
@@ -2440,6 +2440,31 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf159422)
CPPUNIT_ASSERT_DOUBLES_EQUAL(6573, nYSymbol3, 20);
}
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf159456)
+{
+ // Given a document with chart, which have a datatable
+ createSwDoc("charttable.odt");
+ SwDoc* pDoc = getSwDoc();
+ SwDocShell* pShell = pDoc->GetDocShell();
+
+ // Dump the rendering of the first page as an XML file.
+ std::shared_ptr<GDIMetaFile> xMetaFile = pShell->GetPreviewMetaFile();
+ MetafileXmlDump dumper;
+ xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
+ //// Without the fix, this would fail:
+ //// - Expected: 1
+ //// - Actual : 1.5
+ //// - In <>, XPath contents of child does not match
+ assertXPathContent(pXmlDoc,
+ "/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/push[1]/"
+ "push[103]/textarray/text",
+ "1");
+ assertXPathContent(pXmlDoc,
+ "/metafile/push[1]/push[1]/push[1]/push[3]/push[1]/push[1]/push[1]/"
+ "push[104]/textarray/text",
+ "2");
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */