[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - oox/source sw/qa
oox/source/export/drawingml.cxx | 10 +++--- sw/qa/extras/ooxmlexport/data/tdf127085.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport13.cxx |7 +++ 3 files changed, 14 insertions(+), 3 deletions(-) New commits: commit 136ab631a3d2f7cfa22ca7b657e1c54c9d022b66 Author: Tamás Zolnai AuthorDate: Thu Aug 22 15:57:41 2019 +0200 Commit: Xisco Faulí CommitDate: Mon Sep 2 08:49:25 2019 +0200 tdf#127085: FILESAVE: Transparency is lost after RT Reviewed-on: https://gerrit.libreoffice.org/77963 Tested-by: Jenkins Reviewed-by: Tamás Zolnai (cherry picked from commit 505cbb9c3d2771a12c989515663cc1eb73dd0c2f) Change-Id: I22ba83b5cc00f84112a3755898ee2be58337afd6 Reviewed-on: https://gerrit.libreoffice.org/78263 Tested-by: Jenkins Reviewed-by: Xisco Faulí diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 0f4f75c155cc..b8598b36030b 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -1194,14 +1194,18 @@ void DrawingML::WriteImageBrightnessContrastTransparence(uno::Reference(); if (GetProperty(rXPropSet, "AdjustContrast")) nContrast = mAny.get(); -if (GetProperty(rXPropSet, "Transparency")) -nTransparence = mAny.get(); +// Used for shapes with picture fill +if (GetProperty(rXPropSet, "FillTransparence")) +nTransparence = mAny.get(); +// Used for pictures +if (nTransparence == 0 && GetProperty(rXPropSet, "Transparency")) +nTransparence = static_cast(mAny.get()); if (nBright || nContrast) diff --git a/sw/qa/extras/ooxmlexport/data/tdf127085.docx b/sw/qa/extras/ooxmlexport/data/tdf127085.docx new file mode 100644 index ..65556fe38abd Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf127085.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx index a3a7184b34e0..4942409a78d5 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx @@ -124,6 +124,13 @@ DECLARE_OOXMLEXPORT_TEST(testTdf125324, "tdf125324.docx") assertXPath(pXmlDoc, "/root/page/body/txt[2]/anchored/fly/tab/infos/bounds", "top", "4193"); } +DECLARE_OOXMLEXPORT_TEST(tdf127085, "tdf127085.docx") +{ +// Fill transparency was lost during export +uno::Reference xShape(getShape(1), uno::UNO_QUERY); +CPPUNIT_ASSERT_EQUAL(sal_Int16(50), getProperty(xShape, "FillTransparence")); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - oox/source sw/qa
oox/source/drawingml/shape.cxx |5 - oox/source/shape/WpgContext.cxx |6 +- sw/qa/extras/ooxmlimport/data/tdf124398.docx |binary sw/qa/extras/ooxmlimport/ooxmlimport2.cxx| 12 4 files changed, 21 insertions(+), 2 deletions(-) New commits: commit 9baed128acbbac24ef85a8470d721e8ee59b776f Author: Miklos Vajna AuthorDate: Mon Apr 29 08:35:29 2019 +0200 Commit: Caolán McNamara CommitDate: Fri May 17 13:25:59 2019 +0200 tdf#124398 DOCX drawingML import: handle charts in group shapes Regression from commit 8c73b16f5f18f3bc1dbf9ff6c1475db56b44d304 (DOCX import: declare wpg as a supported feature, 2013-12-05), the problem was that did not forward to to the relevant oox context, and also Writer had no idea how to create a com.sun.star.drawing.OLE2Shape. Fix the later by using the same service name that's in use for the non-groupshape case. (cherry picked from commit fdf4aaa3dc5cc1d2e7a112e6c32d7845f13caef8) Change-Id: Id3536854da7c1f01525bb38d801496ecebd4c161 Reviewed-on: https://gerrit.libreoffice.org/71524 Tested-by: Xisco Faulí Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index ba3e8d7fdb5d..d45a88a692cf 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -218,7 +218,10 @@ ChartShapeInfo& Shape::setChartType( bool bEmbedShapes ) { OSL_ENSURE( meFrameType == FRAMETYPE_GENERIC, "Shape::setChartType - multiple frame types" ); meFrameType = FRAMETYPE_CHART; -msServiceName = "com.sun.star.drawing.OLE2Shape"; +if (mbWps) +msServiceName = "com.sun.star.drawing.temporaryForXMLImportOLE2Shape"; +else +msServiceName = "com.sun.star.drawing.OLE2Shape"; mxChartShapeInfo.reset( new ChartShapeInfo( bEmbedShapes ) ); return *mxChartShapeInfo; } diff --git a/oox/source/shape/WpgContext.cxx b/oox/source/shape/WpgContext.cxx index 95264e53ce15..75ff0422bcf2 100644 --- a/oox/source/shape/WpgContext.cxx +++ b/oox/source/shape/WpgContext.cxx @@ -57,7 +57,11 @@ oox::core::ContextHandlerRef WpgContext::onCreateContext(sal_Int32 nElementToken return new oox::drawingml::ShapeGroupContext(*this, mpShape, std::make_shared("com.sun.star.drawing.GroupShape")); } case XML_graphicFrame: -break; +{ +auto pShape = std::make_shared("com.sun.star.drawing.GraphicObjectShape"); +pShape->setWps(true); +return new oox::drawingml::GraphicalObjectFrameContext(*this, mpShape, pShape, /*bEmbedShapesInChart=*/true); +} default: SAL_WARN("oox", "WpgContext::createFastChildContext: unhandled element: " << getBaseToken(nElementToken)); break; diff --git a/sw/qa/extras/ooxmlimport/data/tdf124398.docx b/sw/qa/extras/ooxmlimport/data/tdf124398.docx new file mode 100644 index ..4d1855347fd6 Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tdf124398.docx differ diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx index 57c7f7ef4245..e5c6e182a02e 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx @@ -235,6 +235,18 @@ DECLARE_OOXMLIMPORT_TEST(testTdf112443, "tdf112443.docx") // and as result only one page should be generated. DECLARE_OOXMLIMPORT_TEST(testTdf113182, "tdf113182.docx") { CPPUNIT_ASSERT_EQUAL(1, getPages()); } +DECLARE_OOXMLIMPORT_TEST(testTdf124398, "tdf124398.docx") +{ +uno::Reference xGroup(getShape(1), uno::UNO_QUERY); +CPPUNIT_ASSERT(xGroup.is()); +// Without the accompanying fix in place, this test would have failed with 'Expected: 2; Actual: +// 1', i.e. the chart children of the group shape was lost. +CPPUNIT_ASSERT_EQUAL(static_cast(2), xGroup->getCount()); + +uno::Reference xShape(xGroup->getByIndex(1), uno::UNO_QUERY); +CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.drawing.OLE2Shape"), xShape->getShapeType()); +} + DECLARE_OOXMLIMPORT_TEST(testTdf113946, "tdf113946.docx") { OUString aTop = parseDump("/root/page/body/txt/anchored/SwAnchoredDrawObject/bounds", "top"); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - oox/source sw/qa
oox/source/shape/WpsContext.cxx |8 +++- sw/qa/extras/ooxmlimport/data/tdf124754.docx |binary sw/qa/extras/ooxmlimport/ooxmlimport2.cxx| 15 +++ 3 files changed, 22 insertions(+), 1 deletion(-) New commits: commit 1b1caaf4bce6b60c4c1af7dfc6f90dbdf4c3f817 Author: Serge Krot AuthorDate: Mon May 13 15:43:44 2019 +0200 Commit: Michael Stahl CommitDate: Tue May 14 18:31:22 2019 +0200 tdf#124754 sw docx import: do not override text color with -1 (auto) color Change-Id: Id821b0d8bef69a7124ee41558e822cf8b025df9d Reviewed-on: https://gerrit.libreoffice.org/72232 Tested-by: Jenkins Reviewed-by: Thorsten Behrens Reviewed-on: https://gerrit.libreoffice.org/72293 Reviewed-by: Michael Stahl diff --git a/oox/source/shape/WpsContext.cxx b/oox/source/shape/WpsContext.cxx index e196449ec7ed..2b2ad8b2b1b7 100644 --- a/oox/source/shape/WpsContext.cxx +++ b/oox/source/shape/WpsContext.cxx @@ -151,7 +151,13 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken if (ePropertyState == beans::PropertyState_DEFAULT_VALUE) { uno::Reference xTextBoxPropertySet(xTextCursor, uno::UNO_QUERY); -xTextBoxPropertySet->setPropertyValue("CharColor", xPropertySet->getPropertyValue("CharColor")); +uno::Any xCharColor = xPropertySet->getPropertyValue("CharColor"); +Color aColor = COL_AUTO; +if (xCharColor >>= aColor) +{ +if (aColor != COL_AUTO) +xTextBoxPropertySet->setPropertyValue("CharColor", xCharColor); +} } return this; } diff --git a/sw/qa/extras/ooxmlimport/data/tdf124754.docx b/sw/qa/extras/ooxmlimport/data/tdf124754.docx new file mode 100644 index ..2f7f4e14bda5 Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tdf124754.docx differ diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx index a74501cd708c..57c7f7ef4245 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx @@ -197,6 +197,7 @@ DECLARE_OOXMLIMPORT_TEST(testTdf117843, "tdf117843.docx") getProperty(getParagraphOfText(1, xHeaderText), "ParaTopMargin")); } +// related tdf#124754 DECLARE_OOXMLIMPORT_TEST(testTdf43017, "tdf43017.docx") { uno::Reference xParagraph = getParagraph(1); @@ -207,6 +208,20 @@ DECLARE_OOXMLIMPORT_TEST(testTdf43017, "tdf43017.docx") getProperty(xText, "CharColor")); } +// related tdf#43017 +DECLARE_OOXMLIMPORT_TEST(testTdf124754, "tdf124754.docx") +{ +uno::Reference textbox(getShape(1), uno::UNO_QUERY); +CPPUNIT_ASSERT_EQUAL(1, getParagraphs(textbox)); + +uno::Reference xParagraph = getParagraphOfText(1, textbox); +uno::Reference xText = getRun(xParagraph, 2); + +// Ensure that hyperlink text color is not black +CPPUNIT_ASSERT_EQUAL_MESSAGE("Hyperlink color should be not black!", sal_Int32(353217), + getProperty(xText, "CharColor")); +} + DECLARE_OOXMLIMPORT_TEST(testTdf112443, "tdf112443.docx") { // the position of the flying text frame should be off page ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - oox/source sw/qa
oox/source/drawingml/diagram/diagramlayoutatoms.cxx |6 ++ sw/qa/core/data/ooxml/fail/ofz14422-1.docx |binary 2 files changed, 6 insertions(+) New commits: commit b7662cffb5e12935ffaa4252c081659165600ada Author: Caolán McNamara AuthorDate: Wed Apr 24 11:38:53 2019 +0100 Commit: Michael Stahl CommitDate: Fri Apr 26 11:32:49 2019 +0200 ofz#14422 null deref Change-Id: Icd00e2aaa5932564668cd12ce4ee63aecc34419a Reviewed-on: https://gerrit.libreoffice.org/71305 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx index 1832183d298a..bc30ec38e219 100644 --- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx +++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx @@ -1277,6 +1277,12 @@ bool LayoutNode::setupShape( const ShapePtr& rShape, const dgm::Point* pPresNode continue; } +if (!aDataNode2->second->mpShape) +{ +//busted, skip it +continue; +} + rShape->setDataNodeType(aDataNode2->second->mnType); if( rItem.mnDepth == 0 ) diff --git a/sw/qa/core/data/ooxml/fail/ofz14422-1.docx b/sw/qa/core/data/ooxml/fail/ofz14422-1.docx new file mode 100644 index ..8284f6afc4b3 Binary files /dev/null and b/sw/qa/core/data/ooxml/fail/ofz14422-1.docx differ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - oox/source sw/qa
oox/source/vml/vmlshapecontext.cxx |4 +++- sw/qa/extras/ooxmlexport/data/tdf122563.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport12.cxx | 11 +++ 3 files changed, 14 insertions(+), 1 deletion(-) New commits: commit d55cc244aba92f4e9fbdd7d51c65112075c6e8a8 Author: László Németh AuthorDate: Wed Jan 9 22:15:26 2019 +0100 Commit: Miklos Vajna CommitDate: Mon Jan 28 15:00:41 2019 +0100 tdf#122563 DOCX import: fix OLE size after roundtrip Embedded XLSX spreadsheets and other OLE objects became small in Writer after a roundtrip between LibO and MSO, caused by the empty drawing path of OLE shapes. Change-Id: I4cd39d4bcd6707cc5a3b8e40dde8c6148a20cabc Reviewed-on: https://gerrit.libreoffice.org/66053 Tested-by: Jenkins Reviewed-by: László Németh (cherry picked from commit bdb0177b550d27a541cdfc0668714b2e9ac28540) Reviewed-on: https://gerrit.libreoffice.org/66689 Reviewed-by: Miklos Vajna diff --git a/oox/source/vml/vmlshapecontext.cxx b/oox/source/vml/vmlshapecontext.cxx index f5f4bf884e31..621f20d29895 100644 --- a/oox/source/vml/vmlshapecontext.cxx +++ b/oox/source/vml/vmlshapecontext.cxx @@ -240,7 +240,9 @@ ContextHandlerRef ShapeContextBase::createShapeContext( ContextHandler2Helper co case VML_TOKEN( group ): return new GroupShapeContext( rParent, rShapes.createShape< GroupShape >(), rAttribs ); case VML_TOKEN( shape ): -if (rAttribs.hasAttribute(XML_path)) +if (rAttribs.hasAttribute(XML_path) && +// tdf#122563 skip in the case of empty path +!rAttribs.getString(XML_path, "").isEmpty()) return new ShapeContext( rParent, rShapes.createShape< BezierShape >(), rAttribs ); else return new ShapeContext( rParent, rShapes.createShape< ComplexShape >(), rAttribs ); diff --git a/sw/qa/extras/ooxmlexport/data/tdf122563.docx b/sw/qa/extras/ooxmlexport/data/tdf122563.docx new file mode 100644 index ..69168a382623 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf122563.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx index 3e90ed1b4d9d..a91fe0c3b67b 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx @@ -936,6 +936,17 @@ DECLARE_OOXMLEXPORT_TEST(testTdf99631, "tdf99631.docx") assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/w:object[1]", "dyaOrig", "768"); } +DECLARE_OOXMLEXPORT_TEST(testTdf122563, "tdf122563.docx") +{ +xmlDocPtr pXmlDoc = parseExport("word/document.xml"); +if (!pXmlDoc) +return; +assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/w:object", 1); +// Size of the embedded OLE spreadsheet was the bad "width:28.35pt;height:28.35pt" +assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/w:object/v:shape", "style", +"width:255.75pt;height:63.75pt"); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - oox/source sw/qa
oox/source/drawingml/textcharacterpropertiescontext.cxx | 11 + sw/qa/extras/ooxmlimport/data/tdf121804.docx|binary sw/qa/extras/ooxmlimport/ooxmlimport2.cxx | 18 3 files changed, 29 insertions(+) New commits: commit 248ecee4ea28a3873cdd0ef0c1ef501537be961d Author: Miklos Vajna AuthorDate: Mon Dec 17 21:13:00 2018 +0100 Commit: Mike Kaganski CommitDate: Wed Dec 19 15:32:27 2018 +0100 tdf#121804 DOCX import: handle sub/superscript inside group shapes Regression from commit d5c934d150cb6cea5f96cbbee4fb5e8312bf027e (n#792778 DOCX import: parse group shapes in oox only, 2012-12-14), where where manual wordprocessingML -> drawingML translation did not handle this character property. Change-Id: I87481bc9c26651fd15dd39a58a92f467e8311256 Reviewed-on: https://gerrit.libreoffice.org/65289 Tested-by: Jenkins Reviewed-by: Miklos Vajna (cherry picked from commit dafbc86037d63e938967c0f501bdfe3ae19fa992) Reviewed-on: https://gerrit.libreoffice.org/65413 Tested-by: Xisco Faulí Reviewed-by: Mike Kaganski diff --git a/oox/source/drawingml/textcharacterpropertiescontext.cxx b/oox/source/drawingml/textcharacterpropertiescontext.cxx index 2b63f9f5237b..236219d844cf 100644 --- a/oox/source/drawingml/textcharacterpropertiescontext.cxx +++ b/oox/source/drawingml/textcharacterpropertiescontext.cxx @@ -205,6 +205,17 @@ ContextHandlerRef TextCharacterPropertiesContext::onCreateContext( sal_Int32 aEl mrTextCharacterProperties.moCaseMap = XML_none; } break; +case W_TOKEN(vertAlign): +{ +// Map wordprocessingML to drawingML +// . +sal_Int32 nVal = rAttribs.getToken(W_TOKEN(val), 0); +if (nVal == XML_superscript) +mrTextCharacterProperties.moBaseline = 3; +else if (nVal == XML_subscript) +mrTextCharacterProperties.moBaseline = -25000; +break; +} case OOX_TOKEN(w14, glow): case OOX_TOKEN(w14, shadow): case OOX_TOKEN(w14, reflection): diff --git a/sw/qa/extras/ooxmlimport/data/tdf121804.docx b/sw/qa/extras/ooxmlimport/data/tdf121804.docx new file mode 100644 index ..af3f0d247952 Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tdf121804.docx differ diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx index 877a645da288..c1e353a9243b 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx @@ -222,6 +222,24 @@ DECLARE_OOXMLIMPORT_TEST(testTdf113946, "tdf113946.docx") CPPUNIT_ASSERT_EQUAL(OUString("1695"), aTop); } +DECLARE_OOXMLIMPORT_TEST(testTdf121804, "tdf121804.docx") +{ +uno::Reference xGroup(getShape(1), uno::UNO_QUERY); +uno::Reference xShape(xGroup->getByIndex(0), uno::UNO_QUERY); +uno::Reference xFirstPara = getParagraphOfText(1, xShape->getText()); +uno::Reference xFirstRun = getRun(xFirstPara, 1); +CPPUNIT_ASSERT_EQUAL(static_cast(0), + getProperty(xFirstRun, "CharEscapement")); +// This failed with a NoSuchElementException, super/subscript property was +// lost on import, so the whole paragraph was a single run. +uno::Reference xSecondRun = getRun(xFirstPara, 2); +CPPUNIT_ASSERT_EQUAL(static_cast(30), + getProperty(xSecondRun, "CharEscapement")); +uno::Reference xThirdRun = getRun(xFirstPara, 3); +CPPUNIT_ASSERT_EQUAL(static_cast(-25), + getProperty(xThirdRun, "CharEscapement")); +} + DECLARE_OOXMLIMPORT_TEST(testTdf114217, "tdf114217.docx") { uno::Reference xDrawPageSupplier(mxComponent, uno::UNO_QUERY); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - oox/source sw/qa
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 AuthorDate: Thu Nov 15 13:36:45 2018 +0100 Commit: László Németh 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 Tested-by: László Németh (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& 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 ..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 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