summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorTamas Bunth <tamas.bunth@collabora.co.uk>2020-01-01 15:31:40 +0100
committerAndras Timar <andras.timar@collabora.com>2020-01-06 14:47:56 +0100
commite360137531d2686815a95596bba121db1e6738ff (patch)
tree8fc8ccfd5032389ad4fa32d1f3ff13a19ee516e6 /chart2
parentab142e036dfdaa05fa990d998e3380aa54c4d9a8 (diff)
tdf#125444 Percentage as custom chart label
Support importing ooxml charts with a field of type "PERCENTAGE" as custom label. Change-Id: Ie8931f77e3b6199d98635422d11d776e675f6e5c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86067 Tested-by: Jenkins Reviewed-by: Tamás Bunth <btomi96@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86118 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/view/charttypes/VSeriesPlotter.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index 7a45aa8b2d13..923555fad41f 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -543,6 +543,11 @@ uno::Reference< drawing::XShape > VSeriesPlotter::createDataLabel( const uno::Re
aTextList[i] = DataSeriesHelper::getDataSeriesLabel( xSeries, aRole );
break;
}
+ case DataPointCustomLabelFieldType_PERCENTAGE:
+ {
+ aTextList[i] = getLabelTextForValue( rDataSeries, nPointIndex, fValue, true );
+ break;
+ }
case DataPointCustomLabelFieldType_CELLREF:
{
// TODO: for now doesn't show placeholder