diff options
author | Tünde Tóth <toth.tunde@nisz.hu> | 2023-06-01 15:25:45 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2023-06-20 14:49:30 +0200 |
commit | bb1e68c72e2c95855bde54cd9eb592d0bd3dc4c6 (patch) | |
tree | f9cd10f6282e41c16db4a0ebcbb39ddac5524f5d /oox | |
parent | adac862ec1019aff267bc4f2c1a955999a835241 (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 5a4f32ebc037964b7d00a468bc7761e078baeecc)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153332
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 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" )) |