diff options
author | Gülşah Köse <gulsah.kose@collabora.com> | 2020-05-08 13:27:54 +0300 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-07-15 12:13:57 +0200 |
commit | 8913626938ba731214ed01cc067f8e10fb6a8bd8 (patch) | |
tree | 0b81d15967ac766128c470e359e53cd594e3b65f /chart2 | |
parent | e6dc487a24a4e65794707276e7ca5f9a2ffba191 (diff) |
Related: tdf#131175 OOXML chart: import data label fill pattern
(cherry picked from commit 6f752061d5153da50d6f536d506358c8f512a397)
Conflicts:
oox/source/drawingml/chart/seriesconverter.cxx
Change-Id: I2db64489c86e4381167eb13af4ab5118113960d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98808
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/inc/unonames.hxx | 2 | ||||
-rw-r--r-- | chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx | 15 | ||||
-rw-r--r-- | chart2/source/model/main/DataPointProperties.cxx | 12 | ||||
-rw-r--r-- | chart2/source/model/main/DataPointProperties.hxx | 2 | ||||
-rw-r--r-- | chart2/source/view/main/PropertyMapper.cxx | 4 |
5 files changed, 33 insertions, 2 deletions
diff --git a/chart2/inc/unonames.hxx b/chart2/inc/unonames.hxx index 9bbbf9a27171..b4044c2d689a 100644 --- a/chart2/inc/unonames.hxx +++ b/chart2/inc/unonames.hxx @@ -29,6 +29,8 @@ #define CHART_UNONAME_LABEL_BORDER_DASHNAME "LabelBorderDashName" #define CHART_UNONAME_LABEL_BORDER_TRANS "LabelBorderTransparency" #define CHART_UNONAME_LABEL_FILL_STYLE "LabelFillStyle" +#define CHART_UNONAME_LABEL_FILL_BACKGROUND "LabelFillBackground" +#define CHART_UNONAME_LABEL_FILL_HATCH_NAME "LabelFillHatchName" #define CHART_UNONAME_LABEL_FILL_COLOR "LabelFillColor" #define CHART_UNONAME_CUSTOM_LABEL_FIELDS "CustomLabelFields" diff --git a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx index bebd947acbc5..229e6832a11c 100644 --- a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx @@ -48,6 +48,7 @@ #include <com/sun/star/drawing/LineJoint.hpp> #include <com/sun/star/drawing/LineStyle.hpp> #include <com/sun/star/drawing/FillStyle.hpp> +#include <com/sun/star/drawing/Hatch.hpp> #include <com/sun/star/lang/WrappedTargetRuntimeException.hpp> #include <comphelper/sequence.hxx> #include <cppuhelper/exc_hlp.hxx> @@ -84,7 +85,9 @@ enum PROP_SERIES_DATAPOINT_LABEL_BORDER_COLOR, PROP_SERIES_DATAPOINT_LABEL_BORDER_TRANS, PROP_SERIES_DATAPOINT_LABEL_FILL_STYLE, - PROP_SERIES_DATAPOINT_LABEL_FILL_COLOR + PROP_SERIES_DATAPOINT_LABEL_FILL_COLOR, + PROP_SERIES_DATAPOINT_LABEL_FILL_BACKGROUND, + PROP_SERIES_DATAPOINT_LABEL_FILL_HATCH_NAME }; void lcl_AddPropertiesToVector_PointProperties( @@ -170,6 +173,16 @@ void lcl_AddPropertiesToVector_PointProperties( | beans::PropertyAttribute::MAYBEVOID | beans::PropertyAttribute::MAYBEDEFAULT ); + rOutProperties.emplace_back( CHART_UNONAME_LABEL_FILL_BACKGROUND, + PROP_SERIES_DATAPOINT_LABEL_FILL_BACKGROUND, + cppu::UnoType<sal_Bool>::get(), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT ); + rOutProperties.emplace_back( CHART_UNONAME_LABEL_FILL_HATCH_NAME, + PROP_SERIES_DATAPOINT_LABEL_FILL_HATCH_NAME, + cppu::UnoType<OUString>::get(), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT ); rOutProperties.emplace_back( CHART_UNONAME_LABEL_BORDER_WIDTH, PROP_SERIES_DATAPOINT_LABEL_BORDER_WIDTH, cppu::UnoType<sal_Int32>::get(), diff --git a/chart2/source/model/main/DataPointProperties.cxx b/chart2/source/model/main/DataPointProperties.cxx index cc9ed237f44b..ccc9c98ffa89 100644 --- a/chart2/source/model/main/DataPointProperties.cxx +++ b/chart2/source/model/main/DataPointProperties.cxx @@ -395,6 +395,16 @@ void DataPointProperties::AddPropertiesToVector( beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEVOID | beans::PropertyAttribute::MAYBEDEFAULT ); + rOutProperties.emplace_back( CHART_UNONAME_LABEL_FILL_BACKGROUND, + PROP_DATAPOINT_LABEL_FILL_BACKGROUND, + cppu::UnoType<sal_Bool>::get(), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT ); + rOutProperties.emplace_back( CHART_UNONAME_LABEL_FILL_HATCH_NAME, + PROP_DATAPOINT_LABEL_FILL_HATCH_NAME, + cppu::UnoType<OUString>::get(), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT ); rOutProperties.emplace_back( CHART_UNONAME_LABEL_BORDER_WIDTH, PROP_DATAPOINT_LABEL_BORDER_WIDTH, cppu::UnoType<sal_Int32>::get(), @@ -499,6 +509,8 @@ void DataPointProperties::AddDefaultsToMap( PropertyHelper::setEmptyPropertyValueDefault(rOutMap, PROP_DATAPOINT_LABEL_BORDER_COLOR); PropertyHelper::setEmptyPropertyValueDefault(rOutMap, PROP_DATAPOINT_LABEL_FILL_STYLE); PropertyHelper::setEmptyPropertyValueDefault(rOutMap, PROP_DATAPOINT_LABEL_FILL_COLOR); + PropertyHelper::setEmptyPropertyValueDefault(rOutMap, PROP_DATAPOINT_LABEL_FILL_BACKGROUND); + PropertyHelper::setEmptyPropertyValueDefault(rOutMap, PROP_DATAPOINT_LABEL_FILL_HATCH_NAME); PropertyHelper::setPropertyValueDefault<sal_Int32>(rOutMap, PROP_DATAPOINT_LABEL_BORDER_WIDTH, 0); PropertyHelper::setPropertyValueDefault(rOutMap, PROP_DATAPOINT_LABEL_BORDER_DASH, drawing::LineDash()); PropertyHelper::setEmptyPropertyValueDefault(rOutMap, PROP_DATAPOINT_LABEL_BORDER_DASH_NAME); diff --git a/chart2/source/model/main/DataPointProperties.hxx b/chart2/source/model/main/DataPointProperties.hxx index 5214b7bcaf9c..75b396c597c8 100644 --- a/chart2/source/model/main/DataPointProperties.hxx +++ b/chart2/source/model/main/DataPointProperties.hxx @@ -37,6 +37,8 @@ namespace DataPointProperties { PROP_DATAPOINT_LABEL_FILL_STYLE, PROP_DATAPOINT_LABEL_FILL_COLOR, + PROP_DATAPOINT_LABEL_FILL_BACKGROUND, + PROP_DATAPOINT_LABEL_FILL_HATCH_NAME, // common PROP_DATAPOINT_COLOR = FAST_PROPERTY_ID_START_DATA_POINT, diff --git a/chart2/source/view/main/PropertyMapper.cxx b/chart2/source/view/main/PropertyMapper.cxx index 8a949c123fa9..45275ed13b2e 100644 --- a/chart2/source/view/main/PropertyMapper.cxx +++ b/chart2/source/view/main/PropertyMapper.cxx @@ -342,7 +342,9 @@ namespace { {"LineColor", CHART_UNONAME_LABEL_BORDER_COLOR}, {"LineTransparence", CHART_UNONAME_LABEL_BORDER_TRANS}, {"FillStyle", CHART_UNONAME_LABEL_FILL_STYLE}, - {"FillColor", CHART_UNONAME_LABEL_FILL_COLOR} + {"FillColor", CHART_UNONAME_LABEL_FILL_COLOR}, + {"FillBackground", CHART_UNONAME_LABEL_FILL_BACKGROUND}, + {"FillHatchName", CHART_UNONAME_LABEL_FILL_HATCH_NAME} }); // fix the spelling! return map; |