[Libreoffice-commits] core.git: oox/source sw/qa
Regényi Balázs (via logerrit)
logerrit at kemper.freedesktop.org
Fri Sep 18 13:22:56 UTC 2020
oox/source/export/drawingml.cxx | 28 +---------------------------
sw/qa/extras/ooxmlexport/ooxmlexport6.cxx | 2 +-
2 files changed, 2 insertions(+), 28 deletions(-)
New commits:
commit c1376ad6f52d04c1c29e73bc5b312744c74f8bdd
Author: Regényi Balázs <regenyi.balazs at nisz.hu>
AuthorDate: Wed Sep 16 14:48:33 2020 +0200
Commit: László Németh <nemeth at numbertext.org>
CommitDate: Fri Sep 18 15:22:15 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 <nemeth at numbertext.org>
Reviewed-by: László Németh <nemeth at numbertext.org>
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);
More information about the Libreoffice-commits
mailing list