summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorTünde Tóth <tundeth@gmail.com>2020-06-23 13:52:39 +0200
committerLászló Németh <nemeth@numbertext.org>2020-06-29 12:04:52 +0200
commitb3057b7944dc52cc2ee3c57f44d4265c625e8dad (patch)
tree4cc03bf04f0cd9188cababd3aafd8913334553bf /sw/qa
parent9294b76982ef9d80c387afe109a3ec1c6c4da661 (diff)
tdf#134247 Chart OOXML import: fix order of legend entries
The order of legend entries was reversed in stacked column, line and area charts. Change-Id: Ia4a439aa6cee0619ad323c3fb728ff358cf28537 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96941 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/layout/data/legend-itemorder-min.docxbin0 -> 27053 bytes
-rw-r--r--sw/qa/extras/layout/layout.cxx17
2 files changed, 17 insertions, 0 deletions
diff --git a/sw/qa/extras/layout/data/legend-itemorder-min.docx b/sw/qa/extras/layout/data/legend-itemorder-min.docx
new file mode 100644
index 000000000000..8783d3908267
--- /dev/null
+++ b/sw/qa/extras/layout/data/legend-itemorder-min.docx
Binary files differ
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 2f324bb026bd..a44d0396cf3d 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -2324,6 +2324,23 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf125335)
// This failed, if the legend first label is not "Data3". The legend position is bottom.
}
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf134247)
+{
+ SwDoc* pDoc = createDoc("legend-itemorder-min.docx");
+ 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);
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ assertXPathContent(pXmlDoc,
+ "/metafile/push[1]/push[1]/push[1]/push[4]/push[1]/textarray[14]/text",
+ "1. adatsor");
+ // This failed, if the legend first label is not "1. adatsor".
+}
+
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf75659)
{
SwDoc* pDoc = createDoc("tdf75659.docx");