summaryrefslogtreecommitdiff
path: root/chart2/source/model
diff options
context:
space:
mode:
authorBalazs Varga <balazs.varga991@gmail.com>2020-01-15 16:31:35 +0100
committerLászló Németh <nemeth@numbertext.org>2020-01-30 10:43:02 +0100
commit4223ff2be69f03e571464b0b09ad0d278918631b (patch)
tree7205f05cf9773f53f0ad4433703055794eb3f997 /chart2/source/model
parente265037d6c655675416116b19882c3c29bb7bf40 (diff)
tdf#48436 Chart: add CustomLabelPosition UNO API property
and CUSTOM DataLabelPlacement to support custom data label positions, and its initial implementation: only UI support with OOXML import (tdf#130030), yet. Change-Id: I01d986071d78ae3e2a5f43d5711e9f60b8410c21 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86859 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'chart2/source/model')
-rw-r--r--chart2/source/model/main/DataPointProperties.cxx7
-rw-r--r--chart2/source/model/main/DataPointProperties.hxx3
2 files changed, 9 insertions, 1 deletions
diff --git a/chart2/source/model/main/DataPointProperties.cxx b/chart2/source/model/main/DataPointProperties.cxx
index 1cb709d0559c..114fb4355069 100644
--- a/chart2/source/model/main/DataPointProperties.cxx
+++ b/chart2/source/model/main/DataPointProperties.cxx
@@ -28,6 +28,7 @@
#include <com/sun/star/drawing/LineDash.hpp>
#include <com/sun/star/drawing/BitmapMode.hpp>
#include <com/sun/star/drawing/RectanglePoint.hpp>
+#include <com/sun/star/chart2/RelativePosition.hpp>
#include <com/sun/star/chart2/XDataPointCustomLabelField.hpp>
#include <com/sun/star/chart2/DataPointGeometry3D.hpp>
#include <com/sun/star/chart2/DataPointLabel.hpp>
@@ -410,6 +411,12 @@ void DataPointProperties::AddPropertiesToVector(
cppu::UnoType<uno::Sequence<uno::Reference<chart2::XDataPointCustomLabelField>>>::get(),
beans::PropertyAttribute::BOUND
| beans::PropertyAttribute::MAYBEDEFAULT);
+
+ rOutProperties.emplace_back( "CustomLabelPosition",
+ PROP_DATAPOINT_LABEL_CUSTOM_POS,
+ cppu::UnoType<chart2::RelativePosition>::get(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::MAYBEVOID );
}
void DataPointProperties::AddDefaultsToMap(
diff --git a/chart2/source/model/main/DataPointProperties.hxx b/chart2/source/model/main/DataPointProperties.hxx
index 51f1d81a71b7..d591f13625f3 100644
--- a/chart2/source/model/main/DataPointProperties.hxx
+++ b/chart2/source/model/main/DataPointProperties.hxx
@@ -82,7 +82,8 @@ namespace DataPointProperties
PROP_DATAPOINT_LABEL_BORDER_DASH,
PROP_DATAPOINT_LABEL_BORDER_DASH_NAME,
PROP_DATAPOINT_LABEL_BORDER_TRANS,
- PROP_DATAPOINT_CUSTOM_LABEL_FIELDS
+ PROP_DATAPOINT_CUSTOM_LABEL_FIELDS,
+ PROP_DATAPOINT_LABEL_CUSTOM_POS
// additionally some properties from ::chart::LineProperties
};