diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2018-01-04 22:15:32 +0100 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2018-01-29 23:49:42 +0100 |
commit | 790f9abeb1a1167ad5ab84c5fb855b36669c125b (patch) | |
tree | dea7c957b67be7518d2092614b82f18148817265 /offapi | |
parent | a1f933ee2b9e23a505d937035821e9571cf4119c (diff) |
tdf#114821 import complex data labels in bar chart
* import static text & fields:
VALUE, SERIESNAME, COLUMNNAME
* text is formatted
* DataPointCustomLabelField with field type
(DataPointCustomLabelFieldType) was introduced.
* text can have many portions & multiple lines
* unit tests for import data labels with formatting
Not implemented: CELLREF field support which needs
importing some additional data from extLst
Shows custom text as a label for data points.
Change-Id: Iba8fd508eb16356b05586b93d7b8da32240d2b91
Reviewed-on: https://gerrit.libreoffice.org/48243
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'offapi')
-rw-r--r-- | offapi/UnoApi_offapi.mk | 3 | ||||
-rw-r--r-- | offapi/com/sun/star/chart2/DataPointCustomLabelField.idl | 26 | ||||
-rw-r--r-- | offapi/com/sun/star/chart2/DataPointCustomLabelFieldType.idl | 33 | ||||
-rw-r--r-- | offapi/com/sun/star/chart2/DataPointProperties.idl | 8 | ||||
-rw-r--r-- | offapi/com/sun/star/chart2/XDataPointCustomLabelField.idl | 43 |
5 files changed, 113 insertions, 0 deletions
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk index 5b7012ee7006..2a0b21c0960e 100644 --- a/offapi/UnoApi_offapi.mk +++ b/offapi/UnoApi_offapi.mk @@ -69,6 +69,8 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,com/sun/star/awt/tree,\ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,com/sun/star/chart2,\ CartesianCoordinateSystem2d \ CartesianCoordinateSystem3d \ + DataPointCustomLabelField \ + DataPointCustomLabelFieldType \ ExponentialRegressionCurve \ ExponentialScaling \ FormattedString \ @@ -2024,6 +2026,7 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,com/sun/star/chart2,\ XCoordinateSystemContainer \ XDataInterpreter \ XDataProviderAccess \ + XDataPointCustomLabelField \ XDataSeries \ XDataSeriesContainer \ XDefaultSizeTransmitter \ diff --git a/offapi/com/sun/star/chart2/DataPointCustomLabelField.idl b/offapi/com/sun/star/chart2/DataPointCustomLabelField.idl new file mode 100644 index 000000000000..cebe1c3273f3 --- /dev/null +++ b/offapi/com/sun/star/chart2/DataPointCustomLabelField.idl @@ -0,0 +1,26 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef com_sun_star_chart2_DataPointCustomLabelField_idl +#define com_sun_star_chart2_DataPointCustomLabelField_idl + +#include <com/sun/star/chart2/XDataPointCustomLabelField.idl> + +module com { module sun { module star { module chart2 { + +/** + @since LibreOffice 6.1 +*/ +service DataPointCustomLabelField : XDataPointCustomLabelField; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
\ No newline at end of file diff --git a/offapi/com/sun/star/chart2/DataPointCustomLabelFieldType.idl b/offapi/com/sun/star/chart2/DataPointCustomLabelFieldType.idl new file mode 100644 index 000000000000..0b7f925342a6 --- /dev/null +++ b/offapi/com/sun/star/chart2/DataPointCustomLabelFieldType.idl @@ -0,0 +1,33 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef com_sun_star_chart2_DataPointCustomLabelFieldType_idl +#define com_sun_star_chart2_DataPointCustomLabelFieldType_idl + +module com { module sun { module star { module chart2 { + +/** The Field type enumeration for custom data point labels. + + @since LibreOffice 6.1 + */ +enum DataPointCustomLabelFieldType +{ + TEXT, + VALUE, + SERIESNAME, + CATEGORYNAME, + CELLREF, + NEWLINE +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
\ No newline at end of file diff --git a/offapi/com/sun/star/chart2/DataPointProperties.idl b/offapi/com/sun/star/chart2/DataPointProperties.idl index 31bd0a42696c..df5cf071ee90 100644 --- a/offapi/com/sun/star/chart2/DataPointProperties.idl +++ b/offapi/com/sun/star/chart2/DataPointProperties.idl @@ -31,6 +31,7 @@ #include <com/sun/star/drawing/RectanglePoint.idl> #include <com/sun/star/chart2/DataPointLabel.idl> #include <com/sun/star/chart2/Symbol.idl> +#include <com/sun/star/chart2/XFormattedString2.idl> module com { @@ -258,6 +259,13 @@ service DataPointProperties [property] DataPointLabel Label; + /** specifies a text with possible fields that is used as a data point label, + if set then Label property is ignored + + @since LibreOffice 6.1 + */ + [optional, property] sequence<XDataPointCustomLabelField> CustomLabelFields; + /** specifies a string that is used to separate the parts of a data label (caption) */ [optional, property] string LabelSeparator; diff --git a/offapi/com/sun/star/chart2/XDataPointCustomLabelField.idl b/offapi/com/sun/star/chart2/XDataPointCustomLabelField.idl new file mode 100644 index 000000000000..a6a1b0151c94 --- /dev/null +++ b/offapi/com/sun/star/chart2/XDataPointCustomLabelField.idl @@ -0,0 +1,43 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ +#ifndef com_sun_star_chart2_DataPointCustomLabelField_idl +#define com_sun_star_chart2_DataPointCustomLabelField_idl + +#include <com/sun/star/chart2/XFormattedString2.idl> +#include <com/sun/star/chart2/DataPointCustomLabelFieldType.idl> + +module com { module sun { module star { module chart2 { + +/** + Provides interface for DataPointCustomLabelField service. + + @since LibreOffice 6.1 +*/ +interface XDataPointCustomLabelField : XFormattedString2 +{ + DataPointCustomLabelFieldType getFieldType(); + + void setFieldType( [in] DataPointCustomLabelFieldType fieldType ); + + string getGuid(); + + void setGuid( [in] string guid ); + +}; + + + +} ; // chart2 +} ; // com +} ; // sun +} ; // star + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ |