diff options
author | Regényi Balázs <regenyi.balazs@nisz.hu> | 2020-09-16 14:48:33 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-09-18 15:22:15 +0200 |
commit | c1376ad6f52d04c1c29e73bc5b312744c74f8bdd (patch) | |
tree | 7ef509d23e4e3a49bb124a1a61ba7fdafdeae57d | |
parent | 30bb3657ee78b7d3b0a7d26f80bf1ff94b16f51c (diff) |
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 <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
-rw-r--r-- | oox/source/export/drawingml.cxx | 28 | ||||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport6.cxx | 2 |
2 files changed, 2 insertions, 28 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 17352ddb152a..c02cfac613a8 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -441,36 +441,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 eafdf88ea788..e5bc49ddd189 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx @@ -780,7 +780,7 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testShapeThemePreservation, "shape-theme-pre // 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); |