summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-07-26 14:44:38 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-07-26 18:36:42 -0400
commitaaa18a45c6f5e4f2b5fb1ee2deee510ea3353053 (patch)
tree6942aee54e0aed5f9d85af23cee7afeeab4b10b1 /xmloff
parent2d5f5b00dc0a7777fab2be89a4b2b12fed95efde (diff)
bnc#885825: Handle ODF import and export of data label border properties.
(cherry picked from commit 6c2c974dd3f0b21a23bc3bc5560487d28bbe0fad) Conflicts: include/xmloff/xmltoken.hxx xmloff/source/chart/PropertyMap.hxx xmloff/source/core/xmltoken.cxx Change-Id: Ic8c7bc873768008537cd52a3fd4b11031b403139
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/chart/PropertyMap.hxx8
-rw-r--r--xmloff/source/chart/PropertyMaps.cxx21
-rw-r--r--xmloff/source/core/xmltoken.cxx4
3 files changed, 33 insertions, 0 deletions
diff --git a/xmloff/source/chart/PropertyMap.hxx b/xmloff/source/chart/PropertyMap.hxx
index 9f5d509c6730..f4e5a9f4bbe9 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 )
@@ -134,6 +136,12 @@ const XMLPropertyMapEntry aXMLChartPropMap[] =
MAP_ENTRY_ODF12( "AutomaticSize", CHART, XML_AUTOMATIC_SIZE, XML_TYPE_BOOL ),
MAP_ENTRY_ODF12( "StartingAngle", CHART, XML_ANGLE_OFFSET, XML_TYPE_NUMBER ),
MAP_ENTRY_ODF12( "MissingValueTreatment", CHART, XML_TREAT_EMPTY_CELLS, XML_SCH_TYPE_MISSING_VALUE_TREATMENT ),
+
+ 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 f92bbbc9f9ba..b7113d291c43 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>
@@ -67,6 +68,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
@@ -155,6 +168,14 @@ const XMLPropertyHandler* XMLChartPropHdlFactory::GetPropertyHandler( sal_Int32
pHdl = new XMLEnumPropertyHdl( aXMLChartMissingValueTreatmentEnumMap,
::getCppuType((const sal_Int32*)0) );
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 d9d646eeb41a..555f24b88688 100644
--- a/xmloff/source/core/xmltoken.cxx
+++ b/xmloff/source/core/xmltoken.cxx
@@ -1068,6 +1068,10 @@ namespace xmloff { namespace token {
TOKEN( "label-cell-range-address", XML_LABEL_CELL_RANGE_ADDRESS ),
TOKEN( "label-range", XML_LABEL_RANGE ),
TOKEN( "label-ranges", XML_LABEL_RANGES ),
+ 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 ),