oox/source/export/chartexport.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit bb1e68c72e2c95855bde54cd9eb592d0bd3dc4c6 Author: Tünde Tóth <toth.tu...@nisz.hu> AuthorDate: Thu Jun 1 15:25:45 2023 +0200 Commit: László Németh <nem...@numbertext.org> CommitDate: Tue Jun 20 14:49:30 2023 +0200 tdf#145651 Chart OOXML export: fix write error in exportSolidFill Don't export the background color, if the FillColor property is empty. Steps to reproduce: 1. E.g. in Impress, insert a chart (Insert > Chart...). 2. In chart editing mode, select the legend, use the "sidebar > Area > Fill" and change from "none" to "color". Notice how the default blue that is used does not correspond to the colour in the colour picker right underneath. 3. Save as > OOXML format. Change-Id: I33a060d8fc6c49708029008393e2e22e3d5335b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152951 Tested-by: László Németh <nem...@numbertext.org> Reviewed-by: László Németh <nem...@numbertext.org> (cherry picked from commit 5a4f32ebc037964b7d00a468bc7761e078baeecc) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153332 Tested-by: Jenkins diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 29f25b82b944..f0a301f79136 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -1889,9 +1889,9 @@ void ChartExport::exportSolidFill(const Reference< XPropertySet >& xPropSet) // Similar to DrawingML::WriteSolidFill, but gradient access via name // and currently no InteropGrabBag // get fill color - if (!GetProperty( xPropSet, "FillColor" )) + sal_uInt32 nFillColor = 0; + if (!GetProperty(xPropSet, "FillColor") || !(mAny >>= nFillColor)) return; - sal_uInt32 nFillColor = mAny.get<sal_uInt32>(); sal_Int32 nAlpha = MAX_PERCENT; if (GetProperty( xPropSet, "FillTransparence" ))