diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-07-26 14:44:38 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-07-26 16:26:09 -0400 |
commit | 6c2c974dd3f0b21a23bc3bc5560487d28bbe0fad (patch) | |
tree | 1a5673e70074e751518011c0810fbad6a4ca8f77 /xmloff | |
parent | 48f31a924280a418046f0c816f8a7d20b672dac6 (diff) |
bnc#885825: Handle ODF import and export of data label border properties.
Change-Id: Ic8c7bc873768008537cd52a3fd4b11031b403139
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/chart/PropertyMap.hxx | 7 | ||||
-rw-r--r-- | xmloff/source/chart/PropertyMaps.cxx | 21 | ||||
-rw-r--r-- | xmloff/source/core/xmltoken.cxx | 4 |
3 files changed, 32 insertions, 0 deletions
diff --git a/xmloff/source/chart/PropertyMap.hxx b/xmloff/source/chart/PropertyMap.hxx index c6b63e57ede2..a876c2b51c7a 100644 --- a/xmloff/source/chart/PropertyMap.hxx +++ b/xmloff/source/chart/PropertyMap.hxx @@ -53,6 +53,8 @@ #define XML_SCH_TYPE_AXIS_POSITION_VALUE ( XML_SCH_TYPES_START + 14 ) #define XML_SCH_TYPE_AXIS_LABEL_POSITION ( XML_SCH_TYPES_START + 15 ) #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 ) // context ids #define XML_SCH_CONTEXT_USER_SYMBOL ( XML_SCH_CTF_START + 0 ) @@ -146,6 +148,11 @@ const XMLPropertyMapEntry aXMLChartPropMap[] = // OpenGL 3D chart flags MAP_ENTRY_ODF_EXT( "RoundedEdge", LO_EXT, XML_ROUNDED_EDGE, XML_TYPE_BOOL), + MAP_ENTRY_ODF_EXT( "LabelBorderColor", LO_EXT, XML_LABEL_STROKE_COLOR, XML_TYPE_COLOR ), + MAP_ENTRY_ODF_EXT( "LabelBorderStyle", LO_EXT, XML_LABEL_STROKE, XML_SCH_TYPE_LABEL_BORDER_STYLE ), + 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( "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 cedcc8dfe752..aea50b0310e9 100644 --- a/xmloff/source/chart/PropertyMaps.cxx +++ b/xmloff/source/chart/PropertyMaps.cxx @@ -34,6 +34,7 @@ #include "XMLTextOrientationHdl.hxx" #include "XMLSymbolTypePropertyHdl.hxx" #include "XMLAxisPositionPropertyHdl.hxx" +#include "../draw/propimp0.hxx" #include <xmloff/EnumPropertyHdl.hxx> #include <xmloff/XMLConstantsPropertyHandler.hxx> @@ -66,6 +67,18 @@ using namespace com::sun::star; using namespace ::xmloff::token; +namespace { + +SvXMLEnumMapEntry const aLineStyleMap[] = +{ + { XML_NONE, drawing::LineStyle_NONE }, + { XML_SOLID, drawing::LineStyle_SOLID }, + { XML_DASH, drawing::LineStyle_DASH }, + { XML_TOKEN_INVALID, 0 } +}; + +} + // the following class implementations are in this file: // * XMLChartPropHdlFactory @@ -154,6 +167,14 @@ const XMLPropertyHandler* XMLChartPropHdlFactory::GetPropertyHandler( sal_Int32 pHdl = new XMLEnumPropertyHdl( aXMLChartMissingValueTreatmentEnumMap, ::cppu::UnoType<sal_Int32>::get() ); break; + case XML_SCH_TYPE_LABEL_BORDER_STYLE: + pHdl = new XMLEnumPropertyHdl(aLineStyleMap, cppu::UnoType<drawing::LineStyle>::get()); + break; + case XML_SCH_TYPE_LABEL_BORDER_OPACITY: + pHdl = new XMLOpacityPropertyHdl(NULL); + break; + default: + ; } if( pHdl ) PutHdlCache( nType, pHdl ); diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx index 09027cdac1e7..6c4c09840b99 100644 --- a/xmloff/source/core/xmltoken.cxx +++ b/xmloff/source/core/xmltoken.cxx @@ -1072,6 +1072,10 @@ namespace xmloff { namespace token { TOKEN( "label-range", XML_LABEL_RANGE ), TOKEN( "label-ranges", XML_LABEL_RANGES ), TOKEN( "label-string", XML_LABEL_STRING ), + TOKEN( "label-stroke", XML_LABEL_STROKE ), + TOKEN( "label-stroke-color", XML_LABEL_STROKE_COLOR ), + TOKEN( "label-stroke-opacity", XML_LABEL_STROKE_OPACITY ), + TOKEN( "label-stroke-width", XML_LABEL_STROKE_WIDTH ), TOKEN( "lambda", XML_LAMBDA ), TOKEN( "landscape", XML_LANDSCAPE ), TOKEN( "language", XML_LANGUAGE ), |