summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorGülşah Köse <gulsah.kose@collabora.com>2020-05-04 11:48:51 +0300
committerMiklos Vajna <vmiklos@collabora.com>2020-07-15 12:05:51 +0200
commite6dc487a24a4e65794707276e7ca5f9a2ffba191 (patch)
treec450af3e61010e219481b33a8a4078e1d5175f35 /xmloff
parent9afcab2a2169041f65ae6281aa8992594dda9866 (diff)
tdf#131175 Import data label solid fill and color.
(cherry picked from commit 603df08a1e0211099ce2cf258cfe64a74ed6ded9) Conflicts: oox/source/drawingml/chart/seriesconverter.cxx Change-Id: I8a3ef6e60d4f2a13310bb9a8fc4eb873df3f9b4f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98807 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/chart/PropertyMap.hxx4
-rw-r--r--xmloff/source/chart/PropertyMaps.cxx10
-rw-r--r--xmloff/source/core/xmltoken.cxx2
-rw-r--r--xmloff/source/token/tokens.txt2
4 files changed, 18 insertions, 0 deletions
diff --git a/xmloff/source/chart/PropertyMap.hxx b/xmloff/source/chart/PropertyMap.hxx
index aa132990bc3b..f5fab246c0b5 100644
--- a/xmloff/source/chart/PropertyMap.hxx
+++ b/xmloff/source/chart/PropertyMap.hxx
@@ -53,6 +53,7 @@
#define XML_SCH_TYPE_TICK_MARK_POSITION ( XML_SCH_TYPES_START + 16 )
#define XML_SCH_TYPE_LABEL_BORDER_STYLE ( XML_SCH_TYPES_START + 17 )
#define XML_SCH_TYPE_LABEL_BORDER_OPACITY ( XML_SCH_TYPES_START + 18 )
+#define XML_SCH_TYPE_LABEL_FILL_STYLE ( XML_SCH_TYPES_START + 19 )
// context ids
#define XML_SCH_CONTEXT_USER_SYMBOL ( XML_SCH_CTF_START + 0 )
@@ -151,6 +152,9 @@ const XMLPropertyMapEntry aXMLChartPropMap[] =
MAP_ENTRY_ODF_EXT( "LabelBorderTransparency", LO_EXT, XML_LABEL_STROKE_OPACITY, XML_SCH_TYPE_LABEL_BORDER_OPACITY ),
MAP_ENTRY_ODF_EXT( "LabelBorderWidth", LO_EXT, XML_LABEL_STROKE_WIDTH, XML_TYPE_MEASURE ),
+ MAP_ENTRY_ODF_EXT( "LabelFillColor", LO_EXT, XML_LABEL_FILL_COLOR, XML_TYPE_COLOR ),
+ MAP_ENTRY_ODF_EXT( "LabelFillStyle", LO_EXT, XML_LABEL_FILL, XML_SCH_TYPE_LABEL_FILL_STYLE ),
+
MAP_ENTRY( "ScaleText", CHART, XML_SCALE_TEXT, XML_TYPE_BOOL ),
// spline settings
diff --git a/xmloff/source/chart/PropertyMaps.cxx b/xmloff/source/chart/PropertyMaps.cxx
index 68658a2b1b06..c7adfe787f8a 100644
--- a/xmloff/source/chart/PropertyMaps.cxx
+++ b/xmloff/source/chart/PropertyMaps.cxx
@@ -47,6 +47,7 @@
#include <com/sun/star/awt/Size.hpp>
#include <com/sun/star/drawing/LineStyle.hpp>
+#include <com/sun/star/drawing/FillStyle.hpp>
#include <com/sun/star/chart/ChartAxisMarks.hpp>
#include <com/sun/star/chart/ChartDataCaption.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
@@ -71,6 +72,12 @@ SvXMLEnumMapEntry<drawing::LineStyle> const aLineStyleMap[] =
{ XML_TOKEN_INVALID, drawing::LineStyle(0) }
};
+SvXMLEnumMapEntry<drawing::FillStyle> const aFillStyleMap[] =
+{
+ { XML_NONE, drawing::FillStyle_NONE },
+ { XML_SOLID, drawing::FillStyle_SOLID }
+};
+
}
// the following class implementations are in this file:
@@ -158,6 +165,9 @@ const XMLPropertyHandler* XMLChartPropHdlFactory::GetPropertyHandler( sal_Int32
case XML_SCH_TYPE_LABEL_BORDER_OPACITY:
pHdl = new XMLOpacityPropertyHdl(nullptr);
break;
+ case XML_SCH_TYPE_LABEL_FILL_STYLE:
+ pHdl = new XMLEnumPropertyHdl( aFillStyleMap );
+ break;
default:
;
}
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
index 9ef0203dedf8..5dea024e336f 100644
--- a/xmloff/source/core/xmltoken.cxx
+++ b/xmloff/source/core/xmltoken.cxx
@@ -1095,6 +1095,8 @@ namespace xmloff { namespace token {
TOKEN( "label-arrangement", XML_LABEL_ARRANGEMENT ),
TOKEN( "label-cell-address", XML_LABEL_CELL_ADDRESS ),
TOKEN( "label-cell-range-address", XML_LABEL_CELL_RANGE_ADDRESS ),
+ TOKEN( "label-fill", XML_LABEL_FILL ),
+ TOKEN( "label-fill-color", XML_LABEL_FILL_COLOR ),
TOKEN( "label-range", XML_LABEL_RANGE ),
TOKEN( "label-ranges", XML_LABEL_RANGES ),
TOKEN( "label-string", XML_LABEL_STRING ),
diff --git a/xmloff/source/token/tokens.txt b/xmloff/source/token/tokens.txt
index e0244941123a..8d4fe1b66358 100644
--- a/xmloff/source/token/tokens.txt
+++ b/xmloff/source/token/tokens.txt
@@ -1013,6 +1013,8 @@ label
label-arrangement
label-cell-address
label-cell-range-address
+label-fill
+label-fill-color
label-range
label-ranges
label-string