diff options
author | Attila Szűcs <attila.szucs@collabora.com> | 2024-06-13 21:33:13 +0200 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-06-18 09:49:07 +0200 |
commit | ada05b8874aa2c5161550dbc87d79b47f40f0df8 (patch) | |
tree | df87258587618575c9740737c7f2da9319db9714 /chart2/qa/extras/chart2export2.cxx | |
parent | 62c99a31de22561e0e38dd10f3b3fd2b6dd9971d (diff) |
tdf#161607 Chart: import-export LeaderLines data
Implemented Importexport of some leaderLines data
(color and width of the lines) from/to OOXML.
It now supports only the solidFill color.
Used properties: "LineColor" and "LineWidth"
Change-Id: Ib33392d0404e1186328176fd93322e02b4006f3c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168974
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'chart2/qa/extras/chart2export2.cxx')
-rw-r--r-- | chart2/qa/extras/chart2export2.cxx | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2export2.cxx b/chart2/qa/extras/chart2export2.cxx index 7d81dbb6f6a7..440c526cb5fc 100644 --- a/chart2/qa/extras/chart2export2.cxx +++ b/chart2/qa/extras/chart2export2.cxx @@ -549,6 +549,33 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testLeaderLines) } } +CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testTdf161607PieChartLeaderLinesColorWidth) +{ + // FIXME: validation error in OOXML export + skipValidation(); + + loadFromFile(u"xlsx/tdf161607PieChartLeaderLinesColorWidth.xlsx"); + save(u"Calc Office Open XML"_ustr); + xmlDocUniquePtr pXmlDoc = parseExport(u"xl/charts/chart1.xml"_ustr); + CPPUNIT_ASSERT(pXmlDoc); + + // test LeaderLines width + OUString aWidth = getXPath( + pXmlDoc, + "/c:chartSpace/c:chart/c:plotArea/c:doughnutChart/c:ser/c:dLbls/c:leaderLines/c:spPr/" + "a:ln"_ostr, + "w"_ostr); + sal_Int32 nWidth = aWidth.toInt32(); + CPPUNIT_ASSERT_LESSEQUAL(static_cast<sal_Int32>(100), std::abs(nWidth - 88900)); + + // test LeaderLines Color + assertXPath( + pXmlDoc, + "/c:chartSpace/c:chart/c:plotArea/c:doughnutChart/c:ser/c:dLbls/c:leaderLines/c:spPr/" + "a:ln/a:solidFill/a:srgbClr"_ostr, + "val"_ostr, u"7030a0"_ustr); +} + CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testNumberFormatExportPPTX) { loadFromFile(u"pptx/tdf115859.pptx"); |