diff options
author | Tünde Tóth <toth.tunde@nisz.hu> | 2023-06-01 15:25:45 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2023-06-23 18:49:12 +0200 |
commit | 31bb86fe8be035cbf71ca2e2d7b5db92c55b6cf3 (patch) | |
tree | 713e63aa174b132e4c88521236246d331ba4ec59 /oox | |
parent | 1102e01bc9ef0fa65121b7d4154efaeede45193c (diff) |
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 <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
(cherry picked from commit 6b3e29536ca770d7c2c42429390785c326d223ae)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153333
Tested-by: Jenkins
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/export/chartexport.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index e3704845407a..26a72e64e490 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" )) |