File bsc1176550.diff of Package libreoffice
From 16a59732072853f72189622f63083515ce903530 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?G=C3=BCl=C5=9Fah=20K=C3=B6se?= <gulsah.kose@collabora.com>
Date: Fri, 18 Sep 2020 15:45:17 +0300
Subject: [PATCH 3/3] bsc1176550.diff
Change-Id: I3d282f7c048874854dc414b1bac6f81e6cf8c91d
---
include/oox/export/chartexport.hxx | 2 +-
oox/source/export/chartexport.cxx | 35 +++++++++++++++++++++++-------
2 files changed, 28 insertions(+), 9 deletions(-)
diff --git a/include/oox/export/chartexport.hxx b/include/oox/export/chartexport.hxx
index ac22a18b8957..88e118fe7e60 100644
--- a/include/oox/export/chartexport.hxx
+++ b/include/oox/export/chartexport.hxx
@@ -179,7 +179,6 @@ private:
void exportSeriesValues(
const css::uno::Reference< css::chart2::data::XDataSequence >& xValueSeq, sal_Int32 nValueType = XML_val );
void exportShapeProps( const css::uno::Reference< css::beans::XPropertySet >& xPropSet );
- void exportTextProps(const css::uno::Reference< css::beans::XPropertySet >& xPropSet);
void exportDataPoints(
const css::uno::Reference< css::beans::XPropertySet >& xSeriesProperties,
sal_Int32 nSeriesLength, sal_Int32 eChartType );
@@ -224,6 +223,7 @@ public:
const css::uno::Reference< css::frame::XModel >& getModel() const { return mxChartModel; }
void WriteChartObj( const css::uno::Reference< css::drawing::XShape >& xShape, sal_Int32 nID, sal_Int32 nChartCount );
+ void exportTextProps(const css::uno::Reference< css::beans::XPropertySet >& xPropSet);
void ExportContent();
void InitRangeSegmentationProperties(
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 623a03b8ac97..a95087dbcb89 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -3189,30 +3189,51 @@ 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));
}
+ pChartExport->exportTextProps(xPropSet);
+
if (aCustomLabelFields.hasElements())
writeCustomLabel(pFS, pChartExport, aCustomLabelFields);
@@ -3363,12 +3384,10 @@ void ChartExport::exportDataLabels(
}
// Individual label property that overwrites the baseline.
- exportTextProps( xLabelPropSet );
writeLabelProperties(pFS, this, xLabelPropSet, aParam);
pFS->endElement(FSNS(XML_c, XML_dLbl));
}
- exportTextProps( xPropSet );
// Baseline label properties for all labels.
writeLabelProperties(pFS, this, xPropSet, aParam);
--
2.26.2