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-07 10:43:59 +0100
commit39716e0624bdfbab51d1ab342cfd102e5200cdb5 (patch)
treebbac51d033355cbd8e5fb479302a6e66f976d5bb /chart2
parent8a542bd308a02083c26cc5be633b49b050ac3e92 (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/+/86115 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 350254c14764..6a3b142a0ce9 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -531,6 +531,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