oox/source/export/drawingml.cxx | 28 +--------------------------- sw/qa/extras/ooxmlexport/ooxmlexport6.cxx | 2 +- 2 files changed, 2 insertions(+), 28 deletions(-)
New commits: commit d67809efc6b372f5c8ddfa88551fcc89efe48cdc Author: Regényi Balázs <regenyi.bal...@nisz.hu> AuthorDate: Wed Sep 16 14:48:33 2020 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Tue Sep 29 16:36:16 2020 +0200 tdf#124013 XLSX shape export: fix missing solidFill of the inside of the shape (resulting for example, invisible shapes). See also commit 83c30743eaf44d8eded4a73e3ac2585b5bdbaffc (tdf#77236 DOCX shape export: fix missing solidFill). Co-authored-by: Szabolcs Toth Change-Id: I4efde86f82e22e1aa49b89dc13557ef5f238ba83 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102871 Tested-by: László Németh <nem...@numbertext.org> Reviewed-by: László Németh <nem...@numbertext.org> Signed-off-by: Xisco Fauli <xiscofa...@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103616 Tested-by: Jenkins diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 8a45e22d3fc3..9e803aa6f38c 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -438,36 +438,10 @@ void DrawingML::WriteSolidFill( const Reference< XPropertySet >& rXPropSet ) // the shape had a scheme color and the user didn't change it WriteSolidFill( sColorFillScheme, aTransformations, nAlpha ); } - else if ( aStyleProperties.hasElements() ) - { - sal_uInt32 nThemeColor = 0; - sal_Int32 nThemeAlpha = MAX_PERCENT; - for( const auto& rStyleProp : std::as_const(aStyleProperties) ) - { - if( rStyleProp.Name == "Color" ) - { - rStyleProp.Value >>= nThemeColor; - } - else if(rStyleProp.Name == "Transformations" ) - { - Sequence< PropertyValue > aStyleTransformations; - rStyleProp.Value >>= aStyleTransformations; - auto pProp = std::find_if(std::cbegin(aStyleTransformations), std::cend(aStyleTransformations), - [](const PropertyValue& rProp) { return rProp.Name == "alpha"; }); - if (pProp != std::cend(aStyleTransformations)) - pProp->Value >>= nThemeAlpha; - } - } - if ( nFillColor != nThemeColor || nAlpha != nThemeAlpha ) - // the shape contains a theme but it wasn't being used - WriteSolidFill( ::Color(nFillColor & 0xffffff), nAlpha ); - - // in case the shape used the style color and the user didn't change it, - // we must not write a <a: solidFill> tag. - } else { // the shape had a custom color and the user didn't change it + // tdf#124013 WriteSolidFill( ::Color(nFillColor & 0xffffff), nAlpha ); } } diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx index d52a867045bd..d3099505aa12 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx @@ -790,7 +790,7 @@ DECLARE_OOXMLEXPORT_TEST(testShapeThemePreservation, "shape-theme-preservation.d // check shape style hasn't been overwritten assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:solidFill", - 0); + 1); assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:solidFill", 1); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits