diff options
author | Gülşah Köse <gulsah.kose@collabora.com> | 2020-09-18 13:20:30 +0300 |
---|---|---|
committer | Gülşah Köse <gulsah.kose@collabora.com> | 2020-09-18 18:55:17 +0200 |
commit | a11bb74d4f464e9639ddb5b8d87dc4770663fea8 (patch) | |
tree | 28a7c499e0faf3806c2626b80e0310c712ac0b92 /oox | |
parent | 5cd04405c6b2d1ee46294ce0696d89d2edc97d16 (diff) |
tdf#136247 OOXML export data label background color.
Change-Id: Ie3e00e8195239e6570bfe76c2451bae11c209145
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102999
Tested-by: Jenkins
Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/export/chartexport.cxx | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 12b3aba485ab..4d830f37c6ba 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -3407,27 +3407,46 @@ void writeLabelProperties( const FSHelperPtr& pFS, ChartExport* pChartExport, Sequence<Reference<chart2::XDataPointCustomLabelField>> aCustomLabelFields; sal_Int32 nLabelBorderWidth = 0; sal_Int32 nLabelBorderColor = 0x00FFFFFF; + sal_Int32 nLabelFillColor = -1; xPropSet->getPropertyValue("Label") >>= aLabel; xPropSet->getPropertyValue("CustomLabelFields") >>= aCustomLabelFields; xPropSet->getPropertyValue("LabelBorderWidth") >>= nLabelBorderWidth; xPropSet->getPropertyValue("LabelBorderColor") >>= nLabelBorderColor; + xPropSet->getPropertyValue("LabelFillColor") >>= nLabelFillColor; - if (nLabelBorderWidth > 0) + if (nLabelBorderWidth > 0 || nLabelFillColor != -1) { pFS->startElement(FSNS(XML_c, XML_spPr)); - pFS->startElement(FSNS(XML_a, XML_ln), XML_w, - OString::number(convertHmmToEmu(nLabelBorderWidth))); - if (nLabelBorderColor != -1) + + if (nLabelFillColor != -1) { pFS->startElement(FSNS(XML_a, XML_solidFill)); - OString aStr = OString::number(nLabelBorderColor, 16).toAsciiUpperCase(); + OString aStr = OString::number(nLabelFillColor, 16).toAsciiUpperCase(); pFS->singleElement(FSNS(XML_a, XML_srgbClr), XML_val, aStr); pFS->endElement(FSNS(XML_a, XML_solidFill)); } - pFS->endElement(FSNS(XML_a, XML_ln)); + + if (nLabelBorderWidth > 0) + { + pFS->startElement(FSNS(XML_a, XML_ln), XML_w, + OString::number(convertHmmToEmu(nLabelBorderWidth))); + + if (nLabelBorderColor != -1) + { + pFS->startElement(FSNS(XML_a, XML_solidFill)); + + OString aStr = OString::number(nLabelBorderColor, 16).toAsciiUpperCase(); + pFS->singleElement(FSNS(XML_a, XML_srgbClr), XML_val, aStr); + + pFS->endElement(FSNS(XML_a, XML_solidFill)); + } + + pFS->endElement(FSNS(XML_a, XML_ln)); + } + pFS->endElement(FSNS(XML_c, XML_spPr)); } |