oox/source/export/drawingml.cxx | 25 +++++++--- sw/qa/extras/ooxmlexport/data/Chart_Plot_BorderLine_Style.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport11.cxx | 14 +++++ 3 files changed, 32 insertions(+), 7 deletions(-)
New commits: commit bd4e761cde3d42dfa37501e7f0c49e94beb917bf Author: Adam Kovacs <christo...@gmail.com> AuthorDate: Thu Nov 15 13:36:45 2018 +0100 Commit: László Németh <nem...@numbertext.org> CommitDate: Fri Nov 30 12:51:33 2018 +0100 tdf#121435 OOXML export: fixing linestyle export in charts Fixing linestyle export of chart wall (plot area) and chart page. Change-Id: Id5265110352d393d9c3e01ff55cea0770d4e0cef Reviewed-on: https://gerrit.libreoffice.org/63418 Tested-by: Jenkins Reviewed-by: László Németh <nem...@numbertext.org> Tested-by: László Németh <nem...@numbertext.org> (cherry picked from commit 5bdc78f65da36d65e94de1e2dde5659f0563f08f) Reviewed-on: https://gerrit.libreoffice.org/64322 diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 58164ba4065a..a797adbc1f1e 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -671,15 +671,26 @@ void DrawingML::WriteOutline( const Reference<XPropertySet>& rXPropSet, Referenc aAny >>= aLineDash; } } - bDashSet = true; - if (aLineDash.Style == DashStyle_ROUND || aLineDash.Style == DashStyle_ROUNDRELATIVE) - { - cap = "rnd"; + } + else + { + //export the linestyle of chart wall (plot area) and chart page + OUString aLineDashName; + GET(aLineDashName, LineDashName); + if (!aLineDashName.isEmpty() && xModel) { + css::uno::Any aAny = getLineDash(xModel, aLineDashName); + aAny >>= aLineDash; } - - SAL_INFO("oox.shape", "dash dots: " << aLineDash.Dots << " dashes: " << aLineDash.Dashes - << " dotlen: " << aLineDash.DotLen << " dashlen: " << aLineDash.DashLen << " distance: " << aLineDash.Distance); } + bDashSet = true; + if (aLineDash.Style == DashStyle_ROUND || aLineDash.Style == DashStyle_ROUNDRELATIVE) + { + cap = "rnd"; + } + + SAL_INFO("oox.shape", "dash dots: " << aLineDash.Dots << " dashes: " << aLineDash.Dashes + << " dotlen: " << aLineDash.DotLen << " dashlen: " << aLineDash.DashLen << " distance: " << aLineDash.Distance); + SAL_FALLTHROUGH; case drawing::LineStyle_SOLID: default: diff --git a/sw/qa/extras/ooxmlexport/data/Chart_Plot_BorderLine_Style.docx b/sw/qa/extras/ooxmlexport/data/Chart_Plot_BorderLine_Style.docx new file mode 100755 index 000000000000..d1f0f97f1063 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/Chart_Plot_BorderLine_Style.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx index c4a76e33ad92..e40a6bfc4cd6 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx @@ -736,6 +736,20 @@ DECLARE_OOXMLEXPORT_TEST(testChart_BorderLine_Style, "Chart_BorderLine_Style.doc assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser[3]/c:spPr/a:ln/a:prstDash", "val", "dash"); } +DECLARE_OOXMLEXPORT_TEST(testChart_Plot_BorderLine_Style, "Chart_Plot_BorderLine_Style.docx") +{ + /* DOCX containing Chart wall (plot area) and Chart Page 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:spPr/a:ln/a:prstDash", "val", "lgDashDot"); + assertXPath(pXmlDoc, "/c:chartSpace/c:spPr/a:ln/a:prstDash", "val", "sysDash"); + +} + DECLARE_OOXMLEXPORT_TEST(testTrackChangesDeletedEmptyParagraph, "testTrackChangesDeletedEmptyParagraph.docx") { xmlDocPtr pXmlDoc = parseExport("word/document.xml"); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits