summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorAdam Kovacs <christo161@gmail.com>2018-09-13 04:04:41 -0400
committerLászló Németh <nemeth@numbertext.org>2018-09-14 08:06:39 +0200
commit761308edb65a6cf44ef84cebc387e77af8b70f83 (patch)
tree1d9cbf1d5353cdd1f239e183fe6d3d6d58aa0403 /sw
parent4464f851a34fb000673e54a3f7d6395682d53003 (diff)
tdf#108064 OOXML export: fixing linestyle export in charts
getLineDash function copy paste from ChartLinePanel.cxx. We query the actual linedash value associated to the LineDashName of the chart line via DashTable service. Thanks for the guidance of László Németh! Change-Id: I565fc968ce009803f9872da1f01dd56cfe07ddb3 Reviewed-on: https://gerrit.libreoffice.org/60424 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw')
-rwxr-xr-xsw/qa/extras/ooxmlexport/data/Chart_BorderLine_Style.docxbin0 -> 25288 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport11.cxx15
2 files changed, 15 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/Chart_BorderLine_Style.docx b/sw/qa/extras/ooxmlexport/data/Chart_BorderLine_Style.docx
new file mode 100755
index 000000000000..0d3b74b77c42
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/Chart_BorderLine_Style.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index 2ffaa7008ff3..35209c0cecc3 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -689,6 +689,21 @@ DECLARE_OOXMLEXPORT_TEST(testTdf119188_list_margin_in_cell, "tdf119188_list_marg
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(494), getProperty<sal_Int32>(getParagraphOfText(3, xCell->getText()), "ParaBottomMargin"));
}
+DECLARE_OOXMLEXPORT_TEST(testChart_BorderLine_Style, "Chart_BorderLine_Style.docx")
+{
+ /* DOCX containing Chart with BorderLine Style as Dash Type should get preserved
+ * inside an XML tag <a:prstDash> with value "dash", "sysDot, "lgDot", etc.
+ */
+ xmlDocPtr pXmlDoc = parseExport("word/charts/chart1.xml");
+ if (!pXmlDoc)
+ return;
+
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[1]/c:spPr/a:ln/a:prstDash", "val", "sysDot");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[2]/c:spPr/a:ln/a:prstDash", "val", "sysDash");
+ assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[3]/c:spPr/a:ln/a:prstDash", "val", "dash");
+
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */