From 603df08a1e0211099ce2cf258cfe64a74ed6ded9 Mon Sep 17 00:00:00 2001 From: Gülşah Köse Date: Mon, 4 May 2020 11:48:51 +0300 Subject: tdf#131175 Import data label solid fill and color. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I8a3ef6e60d4f2a13310bb9a8fc4eb873df3f9b4f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93407 Tested-by: Jenkins Reviewed-by: Gülşah Köse --- xmloff/source/chart/PropertyMap.hxx | 4 ++++ xmloff/source/chart/PropertyMaps.cxx | 10 ++++++++++ xmloff/source/core/xmltoken.cxx | 2 ++ xmloff/source/token/tokens.txt | 2 ++ 4 files changed, 18 insertions(+) (limited to 'xmloff') diff --git a/xmloff/source/chart/PropertyMap.hxx b/xmloff/source/chart/PropertyMap.hxx index 0b8d52c93bce..ef3b3d0a6616 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 #include +#include #include #include #include @@ -71,6 +72,12 @@ SvXMLEnumMapEntry const aLineStyleMap[] = { XML_TOKEN_INVALID, drawing::LineStyle(0) } }; +SvXMLEnumMapEntry 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 253818ccf2df..2888d9f814de 100644 --- a/xmloff/source/core/xmltoken.cxx +++ b/xmloff/source/core/xmltoken.cxx @@ -1097,6 +1097,8 @@ namespace xmloff::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 fd3806a7f0f2..103e7eae1091 100644 --- a/xmloff/source/token/tokens.txt +++ b/xmloff/source/token/tokens.txt @@ -1010,6 +1010,8 @@ label label-arrangement label-cell-address label-cell-range-address +label-fill +label-fill-color label-range label-ranges label-string -- cgit