1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_XMLOFF_SOURCE_CHART_PROPERTYMAP_HXX
20 #define INCLUDED_XMLOFF_SOURCE_CHART_PROPERTYMAP_HXX
22 #include <xmloff/maptype.hxx>
23 #include <xmloff/xmlnmspe.hxx>
24 #include <xmloff/xmltoken.hxx>
25 #include <xmloff/xmltypes.hxx>
26 #include <xmloff/contextid.hxx>
27 #include <xmloff/xmlement.hxx>
28 #include <com/sun/star/chart/ChartAxisArrangeOrderType.hpp>
29 #include <com/sun/star/chart/ChartAxisLabelPosition.hpp>
30 #include <com/sun/star/chart/ChartAxisMarkPosition.hpp>
31 #include <com/sun/star/chart/ErrorBarStyle.hpp>
32 #include <com/sun/star/chart/ChartErrorIndicatorType.hpp>
33 #include <com/sun/star/chart/ChartSolidType.hpp>
34 #include <com/sun/star/chart/ChartDataRowSource.hpp>
35 #include <com/sun/star/chart/DataLabelPlacement.hpp>
36 #include <com/sun/star/chart/MissingValueTreatment.hpp>
39 #define XML_SCH_TYPE_AXIS_ARRANGEMENT ( XML_SCH_TYPES_START + 0 )
40 #define XML_SCH_TYPE_ERROR_BAR_STYLE ( XML_SCH_TYPES_START + 1 )
42 #define XML_SCH_TYPE_SOLID_TYPE ( XML_SCH_TYPES_START + 3 )
43 #define XML_SCH_TYPE_ERROR_INDICATOR_UPPER ( XML_SCH_TYPES_START + 4 )
44 #define XML_SCH_TYPE_ERROR_INDICATOR_LOWER ( XML_SCH_TYPES_START + 5 )
45 #define XML_SCH_TYPE_DATAROWSOURCE ( XML_SCH_TYPES_START + 6 )
46 #define XML_SCH_TYPE_TEXT_ORIENTATION ( XML_SCH_TYPES_START + 7 )
47 #define XML_SCH_TYPE_INTERPOLATION ( XML_SCH_TYPES_START + 8 )
48 #define XML_SCH_TYPE_SYMBOL_TYPE ( XML_SCH_TYPES_START + 9 )
49 #define XML_SCH_TYPE_NAMED_SYMBOL ( XML_SCH_TYPES_START + 10 )
50 #define XML_SCH_TYPE_LABEL_PLACEMENT_TYPE ( XML_SCH_TYPES_START + 11 )
51 #define XML_SCH_TYPE_MISSING_VALUE_TREATMENT ( XML_SCH_TYPES_START + 12 )
52 #define XML_SCH_TYPE_AXIS_POSITION ( XML_SCH_TYPES_START + 13 )
53 #define XML_SCH_TYPE_AXIS_POSITION_VALUE ( XML_SCH_TYPES_START + 14 )
54 #define XML_SCH_TYPE_AXIS_LABEL_POSITION ( XML_SCH_TYPES_START + 15 )
55 #define XML_SCH_TYPE_TICK_MARK_POSITION ( XML_SCH_TYPES_START + 16 )
56 #define XML_SCH_TYPE_LABEL_BORDER_STYLE ( XML_SCH_TYPES_START + 17 )
57 #define XML_SCH_TYPE_LABEL_BORDER_OPACITY ( XML_SCH_TYPES_START + 18 )
60 #define XML_SCH_CONTEXT_USER_SYMBOL ( XML_SCH_CTF_START + 0 )
61 #define XML_SCH_CONTEXT_MIN ( XML_SCH_CTF_START + 1 )
62 #define XML_SCH_CONTEXT_MAX ( XML_SCH_CTF_START + 2 )
63 #define XML_SCH_CONTEXT_STEP_MAIN ( XML_SCH_CTF_START + 3 )
64 #define XML_SCH_CONTEXT_STEP_HELP_COUNT ( XML_SCH_CTF_START + 4 )
65 #define XML_SCH_CONTEXT_ORIGIN ( XML_SCH_CTF_START + 5 )
66 #define XML_SCH_CONTEXT_LOGARITHMIC ( XML_SCH_CTF_START + 6 )
67 #define XML_SCH_CONTEXT_STOCK_WITH_VOLUME ( XML_SCH_CTF_START + 7 )
68 #define XML_SCH_CONTEXT_LINES_USED ( XML_SCH_CTF_START + 8 )
70 #define XML_SCH_CONTEXT_SPECIAL_TICKS_MAJ_INNER ( XML_SCH_CTF_START + 10 )
71 #define XML_SCH_CONTEXT_SPECIAL_TICKS_MAJ_OUTER ( XML_SCH_CTF_START + 11 )
72 #define XML_SCH_CONTEXT_SPECIAL_TICKS_MIN_INNER ( XML_SCH_CTF_START + 12 )
73 #define XML_SCH_CONTEXT_SPECIAL_TICKS_MIN_OUTER ( XML_SCH_CTF_START + 13 )
74 #define XML_SCH_CONTEXT_SPECIAL_TEXT_ROTATION ( XML_SCH_CTF_START + 14 )
75 #define XML_SCH_CONTEXT_SPECIAL_DATA_LABEL_NUMBER ( XML_SCH_CTF_START + 15 )
76 #define XML_SCH_CONTEXT_SPECIAL_DATA_LABEL_TEXT ( XML_SCH_CTF_START + 16 )
77 #define XML_SCH_CONTEXT_SPECIAL_DATA_LABEL_SYMBOL ( XML_SCH_CTF_START + 17 )
78 #define XML_SCH_CONTEXT_SPECIAL_NUMBER_FORMAT ( XML_SCH_CTF_START + 18 )
79 #define XML_SCH_CONTEXT_SPECIAL_DATA_ROW_SOURCE ( XML_SCH_CTF_START + 19 )
80 #define XML_SCH_CONTEXT_SPECIAL_SYMBOL_WIDTH ( XML_SCH_CTF_START + 20 )
81 #define XML_SCH_CONTEXT_SPECIAL_SYMBOL_HEIGHT ( XML_SCH_CTF_START + 21 )
82 #define XML_SCH_CONTEXT_SPECIAL_SYMBOL_IMAGE_NAME ( XML_SCH_CTF_START + 22 )
83 #define XML_SCH_CONTEXT_SPECIAL_SYMBOL_IMAGE ( XML_SCH_CTF_START + 23 )
84 #define XML_SCH_CONTEXT_SPECIAL_LABEL_SEPARATOR ( XML_SCH_CTF_START + 24 )
85 #define XML_SCH_CONTEXT_SPECIAL_ERRORBAR_RANGE ( XML_SCH_CTF_START + 25 )
86 #define XML_SCH_CONTEXT_SPECIAL_REGRESSION_TYPE ( XML_SCH_CTF_START + 26 )
88 #define MAP_FULL( ApiName, NameSpace, XMLTokenName, XMLType, ContextId, EarliestODFVersionForExport ) { ApiName, sizeof(ApiName)-1, XML_NAMESPACE_##NameSpace, xmloff::token::XMLTokenName, XMLType|XML_TYPE_PROP_CHART, ContextId, EarliestODFVersionForExport, false }
89 #define MAP_ENTRY( a, ns, nm, t ) { a, sizeof(a)-1, XML_NAMESPACE_##ns, xmloff::token::nm, t|XML_TYPE_PROP_CHART, 0, SvtSaveOptions::ODFVER_010, false }
90 #define MAP_ENTRY_ODF12( a, ns, nm, t ) { a, sizeof(a)-1, XML_NAMESPACE_##ns, xmloff::token::nm, t|XML_TYPE_PROP_CHART, 0, SvtSaveOptions::ODFVER_012, false }
91 #define MAP_ENTRY_ODF_EXT( a, ns, nm, t ) { a, sizeof(a)-1, XML_NAMESPACE_##ns, xmloff::token::nm, t|XML_TYPE_PROP_CHART, 0, SvtSaveOptions::ODFVER_012_EXT_COMPAT, false }
92 #define MAP_ENTRY_ODF_EXT_IMPORT( a, ns, nm, t ) { a, sizeof(a)-1, XML_NAMESPACE_##ns, xmloff::token::nm, t|XML_TYPE_PROP_CHART, 0, SvtSaveOptions::ODFVER_012_EXT_COMPAT, true }
93 #define MAP_CONTEXT( a, ns, nm, t, c ) { a, sizeof(a)-1, XML_NAMESPACE_##ns, xmloff::token::nm, t|XML_TYPE_PROP_CHART, c, SvtSaveOptions::ODFVER_010, false }
94 #define MAP_SPECIAL( a, ns, nm, t, c ) { a, sizeof(a)-1, XML_NAMESPACE_##ns, xmloff::token::nm, t|XML_TYPE_PROP_CHART | MID_FLAG_SPECIAL_ITEM, c, SvtSaveOptions::ODFVER_010, false }
95 #define MAP_SPECIAL_ODF12( a, ns, nm, t, c ) { a, sizeof(a)-1, XML_NAMESPACE_##ns, xmloff::token::nm, t|XML_TYPE_PROP_CHART | MID_FLAG_SPECIAL_ITEM, c, SvtSaveOptions::ODFVER_012, false }
96 #define MAP_ENTRY_END { nullptr,0,0,xmloff::token::XML_TOKEN_INVALID,0,0,SvtSaveOptions::ODFVER_010, false }
98 // PropertyMap for Chart properties drawing- and
99 // textproperties are added later using the chaining
102 // only create maps once!
103 // this define is set in PropertyMaps.cxx
105 #ifdef XML_SCH_CREATE_GLOBAL_MAPS
107 const XMLPropertyMapEntry aXMLChartPropMap
[] =
110 MAP_ENTRY( "UpDown", CHART
, XML_JAPANESE_CANDLE_STICK
, XML_TYPE_BOOL
), // formerly XML_STOCK_UPDOWN_BARS
111 MAP_CONTEXT( "Volume", CHART
, XML_STOCK_WITH_VOLUME
, XML_TYPE_BOOL
, XML_SCH_CONTEXT_STOCK_WITH_VOLUME
),
112 MAP_ENTRY( "Dim3D", CHART
, XML_THREE_DIMENSIONAL
, XML_TYPE_BOOL
),
113 MAP_ENTRY( "Deep", CHART
, XML_DEEP
, XML_TYPE_BOOL
),
114 MAP_ENTRY( "Lines", CHART
, XML_LINES
, XML_TYPE_BOOL
),
115 MAP_ENTRY( "Percent", CHART
, XML_PERCENTAGE
, XML_TYPE_BOOL
),
116 MAP_ENTRY( "SolidType", CHART
, XML_SOLID_TYPE
, XML_SCH_TYPE_SOLID_TYPE
),
117 MAP_ENTRY( "SplineType", CHART
, XML_INTERPOLATION
, XML_SCH_TYPE_INTERPOLATION
),
118 MAP_ENTRY( "Stacked", CHART
, XML_STACKED
, XML_TYPE_BOOL
),
119 // type: "none", "automatic", "named-symbol" or "image"
120 MAP_ENTRY( "SymbolType", CHART
, XML_SYMBOL_TYPE
, XML_SCH_TYPE_SYMBOL_TYPE
| MID_FLAG_MULTI_PROPERTY
),
121 // if type=="named-symbol" => name of symbol (square, diamond, ...)
122 MAP_ENTRY( "SymbolType", CHART
, XML_SYMBOL_NAME
, XML_SCH_TYPE_NAMED_SYMBOL
| MID_FLAG_MULTI_PROPERTY
),
123 // if type=="image" => an xlink:href element with a linked (package) URI
124 MAP_SPECIAL( "SymbolBitmapURL", CHART
, XML_SYMBOL_IMAGE
, XML_TYPE_STRING
| MID_FLAG_ELEMENT_ITEM
, XML_SCH_CONTEXT_SPECIAL_SYMBOL_IMAGE
),
125 MAP_SPECIAL( "SymbolSize", CHART
, XML_SYMBOL_WIDTH
, XML_TYPE_MEASURE
| MID_FLAG_MERGE_PROPERTY
, XML_SCH_CONTEXT_SPECIAL_SYMBOL_WIDTH
),
126 MAP_SPECIAL( "SymbolSize", CHART
, XML_SYMBOL_HEIGHT
, XML_TYPE_MEASURE
| MID_FLAG_MERGE_PROPERTY
, XML_SCH_CONTEXT_SPECIAL_SYMBOL_HEIGHT
),
127 MAP_ENTRY( "Vertical", CHART
, XML_VERTICAL
, XML_TYPE_BOOL
),
128 // #i32368# property should no longer be used as XML-property (in OASIS
129 // format), but is still ex-/imported for compatibility with the OOo file format
130 MAP_CONTEXT( "NumberOfLines", CHART
, XML_LINES_USED
, XML_TYPE_NUMBER
, XML_SCH_CONTEXT_LINES_USED
),
131 MAP_ENTRY( "StackedBarsConnected", CHART
, XML_CONNECT_BARS
, XML_TYPE_BOOL
),
133 MAP_ENTRY_ODF12( "GroupBarsPerAxis", CHART
, XML_GROUP_BARS_PER_AXIS
, XML_TYPE_BOOL
),
134 MAP_ENTRY_ODF12( "IncludeHiddenCells", CHART
, XML_INCLUDE_HIDDEN_CELLS
, XML_TYPE_BOOL
),
135 MAP_ENTRY_ODF12( "AutomaticPosition", CHART
, XML_AUTOMATIC_POSITION
, XML_TYPE_BOOL
),
136 MAP_ENTRY_ODF12( "AutomaticSize", CHART
, XML_AUTOMATIC_SIZE
, XML_TYPE_BOOL
),
137 MAP_ENTRY_ODF12( "StartingAngle", CHART
, XML_ANGLE_OFFSET
, XML_TYPE_NUMBER
),
138 MAP_ENTRY_ODF12( "MissingValueTreatment", CHART
, XML_TREAT_EMPTY_CELLS
, XML_SCH_TYPE_MISSING_VALUE_TREATMENT
),
139 // #72304 Chart data table flags
140 MAP_ENTRY_ODF_EXT( "DataTableHBorder", LO_EXT
, XML_DATA_TABLE_SHOW_HORZ_BORDER
, XML_TYPE_BOOL
),
141 MAP_ENTRY_ODF_EXT( "DataTableVBorder", LO_EXT
, XML_DATA_TABLE_SHOW_VERT_BORDER
, XML_TYPE_BOOL
),
142 MAP_ENTRY_ODF_EXT( "DataTableOutline", LO_EXT
, XML_DATA_TABLE_SHOW_OUTLINE
, XML_TYPE_BOOL
),
143 MAP_ENTRY_ODF_EXT_IMPORT( "DataTableHBorder", CHART
, XML_DATA_TABLE_SHOW_HORZ_BORDER
, XML_TYPE_BOOL
),
144 MAP_ENTRY_ODF_EXT_IMPORT( "DataTableVBorder", CHART
, XML_DATA_TABLE_SHOW_VERT_BORDER
, XML_TYPE_BOOL
),
145 MAP_ENTRY_ODF_EXT_IMPORT( "DataTableOutline", CHART
, XML_DATA_TABLE_SHOW_OUTLINE
, XML_TYPE_BOOL
),
146 // Chart display units flags
147 MAP_ENTRY_ODF_EXT( "DisplayUnits", LO_EXT
, XML_CHART_DUNITS_DISPLAYUNITS
, XML_TYPE_BOOL
),
148 MAP_ENTRY_ODF_EXT( "BuiltInUnit", LO_EXT
, XML_CHART_DUNITS_BUILTINUNIT
, XML_TYPE_STRING
),
149 MAP_ENTRY_ODF_EXT( "ExternalData", LO_EXT
, XML_EXTERNALDATA
, XML_TYPE_STRING
),
151 // OpenGL 3D chart flags
152 MAP_ENTRY_ODF_EXT( "RoundedEdge", LO_EXT
, XML_ROUNDED_EDGE
, XML_TYPE_BOOL
),
154 MAP_ENTRY_ODF_EXT( "LabelBorderColor", LO_EXT
, XML_LABEL_STROKE_COLOR
, XML_TYPE_COLOR
),
155 MAP_ENTRY_ODF_EXT( "LabelBorderStyle", LO_EXT
, XML_LABEL_STROKE
, XML_SCH_TYPE_LABEL_BORDER_STYLE
),
156 MAP_ENTRY_ODF_EXT( "LabelBorderTransparency", LO_EXT
, XML_LABEL_STROKE_OPACITY
, XML_SCH_TYPE_LABEL_BORDER_OPACITY
),
157 MAP_ENTRY_ODF_EXT( "LabelBorderWidth", LO_EXT
, XML_LABEL_STROKE_WIDTH
, XML_TYPE_MEASURE
),
159 MAP_ENTRY( "ScaleText", CHART
, XML_SCALE_TEXT
, XML_TYPE_BOOL
),
162 MAP_ENTRY( "SplineOrder", CHART
, XML_SPLINE_ORDER
, XML_TYPE_NUMBER
),
163 MAP_ENTRY( "SplineResolution", CHART
, XML_SPLINE_RESOLUTION
, XML_TYPE_NUMBER
),
165 // plot-area properties
166 MAP_ENTRY( "DataRowSource", CHART
, XML_SERIES_SOURCE
, XML_SCH_TYPE_DATAROWSOURCE
),
167 MAP_ENTRY_ODF12( "SortByXValues", CHART
, XML_SORT_BY_X_VALUES
, XML_TYPE_BOOL
),
168 MAP_ENTRY_ODF12( "RightAngledAxes", CHART
, XML_RIGHT_ANGLED_AXES
, XML_TYPE_BOOL
),
171 MAP_ENTRY( "DisplayLabels", CHART
, XML_DISPLAY_LABEL
, XML_TYPE_BOOL
),
172 MAP_SPECIAL( "Marks", CHART
, XML_TICK_MARKS_MAJOR_INNER
, XML_TYPE_NUMBER
| MID_FLAG_MERGE_PROPERTY
, XML_SCH_CONTEXT_SPECIAL_TICKS_MAJ_INNER
), // convert one constant
173 MAP_SPECIAL( "Marks", CHART
, XML_TICK_MARKS_MAJOR_OUTER
, XML_TYPE_NUMBER
| MID_FLAG_MERGE_PROPERTY
, XML_SCH_CONTEXT_SPECIAL_TICKS_MAJ_OUTER
), // to two bools
174 MAP_SPECIAL( "HelpMarks", CHART
, XML_TICK_MARKS_MINOR_INNER
, XML_TYPE_NUMBER
| MID_FLAG_MERGE_PROPERTY
, XML_SCH_CONTEXT_SPECIAL_TICKS_MIN_INNER
), // see above
175 MAP_SPECIAL( "HelpMarks", CHART
, XML_TICK_MARKS_MINOR_OUTER
, XML_TYPE_NUMBER
| MID_FLAG_MERGE_PROPERTY
, XML_SCH_CONTEXT_SPECIAL_TICKS_MIN_OUTER
),
176 MAP_CONTEXT( "Logarithmic", CHART
, XML_LOGARITHMIC
, XML_TYPE_BOOL
, XML_SCH_CONTEXT_LOGARITHMIC
),
177 MAP_CONTEXT( "Min", CHART
, XML_MINIMUM
, XML_TYPE_DOUBLE
, XML_SCH_CONTEXT_MIN
),
178 MAP_CONTEXT( "Max", CHART
, XML_MAXIMUM
, XML_TYPE_DOUBLE
, XML_SCH_CONTEXT_MAX
),
179 MAP_CONTEXT( "Origin", CHART
, XML_ORIGIN
, XML_TYPE_DOUBLE
, XML_SCH_CONTEXT_ORIGIN
),
180 MAP_CONTEXT( "StepMain", CHART
, XML_INTERVAL_MAJOR
, XML_TYPE_DOUBLE
, XML_SCH_CONTEXT_STEP_MAIN
),
181 MAP_CONTEXT( "StepHelpCount", CHART
, XML_INTERVAL_MINOR_DIVISOR
, XML_TYPE_NUMBER
, XML_SCH_CONTEXT_STEP_HELP_COUNT
),
182 MAP_ENTRY( "GapWidth", CHART
, XML_GAP_WIDTH
, XML_TYPE_NUMBER
),
183 MAP_ENTRY( "Overlap", CHART
, XML_OVERLAP
, XML_TYPE_NUMBER
),
184 MAP_ENTRY( "TextCanOverlap", CHART
, XML_TEXT_OVERLAP
, XML_TYPE_BOOL
),
185 MAP_ENTRY_ODF12( "ReverseDirection", CHART
, XML_REVERSE_DIRECTION
, XML_TYPE_BOOL
),
186 MAP_ENTRY( "TextBreak", TEXT
, XML_LINE_BREAK
, XML_TYPE_BOOL
),
187 MAP_ENTRY_ODF_EXT( "TryStaggeringFirst", LO_EXT
, XML_TRY_STAGGERING_FIRST
, XML_TYPE_BOOL
),
188 MAP_ENTRY( "ArrangeOrder", CHART
, XML_LABEL_ARRANGEMENT
, XML_SCH_TYPE_AXIS_ARRANGEMENT
),
189 MAP_SPECIAL( "NumberFormat", STYLE
, XML_DATA_STYLE_NAME
, XML_TYPE_NUMBER
, XML_SCH_CONTEXT_SPECIAL_NUMBER_FORMAT
),
190 MAP_ENTRY( "LinkNumberFormatToSource", CHART
, XML_LINK_DATA_STYLE_TO_SOURCE
, XML_TYPE_BOOL
),
191 MAP_ENTRY( "Visible", CHART
, XML_VISIBLE
, XML_TYPE_BOOL
),
193 MAP_FULL( "CrossoverPosition", CHART
, XML_AXIS_POSITION
, XML_SCH_TYPE_AXIS_POSITION
|MID_FLAG_MERGE_ATTRIBUTE
|MID_FLAG_MULTI_PROPERTY
, 0, SvtSaveOptions::ODFVER_012
),
194 MAP_FULL( "CrossoverValue", CHART
, XML_AXIS_POSITION
, XML_SCH_TYPE_AXIS_POSITION_VALUE
|MID_FLAG_MERGE_ATTRIBUTE
|MID_FLAG_MULTI_PROPERTY
, 0, SvtSaveOptions::ODFVER_012
),
195 MAP_FULL( "LabelPosition", CHART
, XML_AXIS_LABEL_POSITION
, XML_SCH_TYPE_AXIS_LABEL_POSITION
, 0, SvtSaveOptions::ODFVER_012
),
196 MAP_FULL( "MarkPosition", CHART
, XML_TICK_MARK_POSITION
, XML_SCH_TYPE_TICK_MARK_POSITION
, 0, SvtSaveOptions::ODFVER_012
),
198 // statistical properties
200 MAP_ENTRY( "MeanValue", CHART
, XML_MEAN_VALUE
, XML_TYPE_BOOL
),
201 MAP_ENTRY( "ErrorMargin", CHART
, XML_ERROR_MARGIN
, XML_TYPE_DOUBLE
),
202 MAP_ENTRY( "PositiveError", CHART
, XML_ERROR_LOWER_LIMIT
, XML_TYPE_DOUBLE
),
203 MAP_ENTRY( "NegativeError", CHART
, XML_ERROR_UPPER_LIMIT
, XML_TYPE_DOUBLE
),
204 MAP_ENTRY( "ShowPositiveError", CHART
, XML_ERROR_UPPER_INDICATOR
, XML_TYPE_BOOL
),
205 MAP_ENTRY( "ShowNegativeError", CHART
, XML_ERROR_LOWER_INDICATOR
, XML_TYPE_BOOL
),
206 MAP_ENTRY( "ErrorBarStyle", CHART
, XML_ERROR_CATEGORY
, XML_SCH_TYPE_ERROR_BAR_STYLE
),
207 MAP_ENTRY( "PercentageError", CHART
, XML_ERROR_PERCENTAGE
, XML_TYPE_DOUBLE
),
209 // regression curve properties
210 MAP_SPECIAL( "RegressionType", CHART
, XML_REGRESSION_TYPE
, XML_TYPE_STRING
, XML_SCH_CONTEXT_SPECIAL_REGRESSION_TYPE
),
212 MAP_ENTRY_ODF_EXT( "CurveName", LO_EXT
, XML_REGRESSION_CURVE_NAME
, XML_TYPE_STRING
),
213 MAP_ENTRY_ODF_EXT( "PolynomialDegree", LO_EXT
, XML_REGRESSION_MAX_DEGREE
, XML_TYPE_NUMBER
),
214 MAP_ENTRY_ODF_EXT( "MovingAveragePeriod", LO_EXT
, XML_REGRESSION_PERIOD
, XML_TYPE_NUMBER
),
215 MAP_ENTRY_ODF_EXT( "MovingAverageType", LO_EXT
, XML_REGRESSION_MOVING_TYPE
, XML_TYPE_STRING
),
216 MAP_ENTRY_ODF_EXT( "ExtrapolateForward", LO_EXT
, XML_REGRESSION_EXTRAPOLATE_FORWARD
, XML_TYPE_DOUBLE
),
217 MAP_ENTRY_ODF_EXT( "ExtrapolateBackward", LO_EXT
, XML_REGRESSION_EXTRAPOLATE_BACKWARD
, XML_TYPE_DOUBLE
),
218 MAP_ENTRY_ODF_EXT( "ForceIntercept", LO_EXT
, XML_REGRESSION_FORCE_INTERCEPT
, XML_TYPE_BOOL
),
219 MAP_ENTRY_ODF_EXT( "InterceptValue", LO_EXT
, XML_REGRESSION_INTERCEPT_VALUE
, XML_TYPE_DOUBLE
),
221 // import mapping for broken files
222 MAP_ENTRY_ODF_EXT_IMPORT( "CurveName", CHART
, XML_REGRESSION_CURVE_NAME
, XML_TYPE_STRING
),
223 MAP_ENTRY_ODF_EXT_IMPORT( "PolynomialDegree", CHART
, XML_REGRESSION_MAX_DEGREE
, XML_TYPE_NUMBER
),
224 MAP_ENTRY_ODF_EXT_IMPORT( "MovingAveragePeriod", CHART
, XML_REGRESSION_PERIOD
, XML_TYPE_NUMBER
),
225 MAP_ENTRY_ODF_EXT_IMPORT( "MovingAverageType", CHART
, XML_REGRESSION_MOVING_TYPE
, XML_TYPE_STRING
),
226 MAP_ENTRY_ODF_EXT_IMPORT( "ExtrapolateForward", CHART
, XML_REGRESSION_EXTRAPOLATE_FORWARD
, XML_TYPE_DOUBLE
),
227 MAP_ENTRY_ODF_EXT_IMPORT( "ExtrapolateBackward", CHART
, XML_REGRESSION_EXTRAPOLATE_BACKWARD
, XML_TYPE_DOUBLE
),
228 MAP_ENTRY_ODF_EXT_IMPORT( "ForceIntercept", CHART
, XML_REGRESSION_FORCE_INTERCEPT
, XML_TYPE_BOOL
),
229 MAP_ENTRY_ODF_EXT_IMPORT( "InterceptValue", CHART
, XML_REGRESSION_INTERCEPT_VALUE
, XML_TYPE_DOUBLE
),
231 MAP_SPECIAL_ODF12( "ErrorBarRangePositive", CHART
, XML_ERROR_UPPER_RANGE
, XML_TYPE_STRING
, XML_SCH_CONTEXT_SPECIAL_ERRORBAR_RANGE
), // export only
232 MAP_SPECIAL_ODF12( "ErrorBarRangeNegative", CHART
, XML_ERROR_LOWER_RANGE
, XML_TYPE_STRING
, XML_SCH_CONTEXT_SPECIAL_ERRORBAR_RANGE
), // export only
234 // errorbars properties (chart2)
235 MAP_ENTRY_ODF_EXT( "Weight", LO_EXT
, XML_ERROR_STANDARD_WEIGHT
, XML_TYPE_DOUBLE
),
236 MAP_ENTRY_ODF_EXT_IMPORT( "Weight", CHART
, XML_ERROR_STANDARD_WEIGHT
, XML_TYPE_DOUBLE
),
238 // series/data-point properties
239 MAP_SPECIAL( "DataCaption", CHART
, XML_DATA_LABEL_NUMBER
, XML_TYPE_NUMBER
| MID_FLAG_MERGE_PROPERTY
, XML_SCH_CONTEXT_SPECIAL_DATA_LABEL_NUMBER
), // convert one constant
240 MAP_SPECIAL( "DataCaption", CHART
, XML_DATA_LABEL_TEXT
, XML_TYPE_NUMBER
| MID_FLAG_MERGE_PROPERTY
, XML_SCH_CONTEXT_SPECIAL_DATA_LABEL_TEXT
), // to 'tristate' and two bools
241 MAP_SPECIAL( "DataCaption", CHART
, XML_DATA_LABEL_SYMBOL
, XML_TYPE_NUMBER
| MID_FLAG_MERGE_PROPERTY
, XML_SCH_CONTEXT_SPECIAL_DATA_LABEL_SYMBOL
),
242 MAP_SPECIAL_ODF12( "LabelSeparator", CHART
, XML_LABEL_SEPARATOR
, XML_TYPE_STRING
| MID_FLAG_ELEMENT_ITEM
, XML_SCH_CONTEXT_SPECIAL_LABEL_SEPARATOR
),
243 MAP_ENTRY_ODF12( "LabelPlacement", CHART
, XML_LABEL_POSITION
, XML_SCH_TYPE_LABEL_PLACEMENT_TYPE
),
244 MAP_ENTRY( "SegmentOffset", CHART
, XML_PIE_OFFSET
, XML_TYPE_NUMBER
),
245 MAP_SPECIAL_ODF12( "PercentageNumberFormat", STYLE
, XML_PERCENTAGE_DATA_STYLE_NAME
, XML_TYPE_NUMBER
, XML_SCH_CONTEXT_SPECIAL_NUMBER_FORMAT
),
247 // text properties for titles
248 MAP_SPECIAL( "TextRotation", STYLE
, XML_ROTATION_ANGLE
, XML_TYPE_NUMBER
, XML_SCH_CONTEXT_SPECIAL_TEXT_ROTATION
), // convert 1/100th degrees to degrees
249 MAP_ENTRY( "StackedText", STYLE
, XML_DIRECTION
, XML_SCH_TYPE_TEXT_ORIENTATION
),
251 // for compatibility to pre 6.0beta documents
252 // MAP_SPECIAL( "SymbolBitmapURL", CHART, XML_SYMBOL_IMAGE_NAME, XML_TYPE_STRING, XML_SCH_CONTEXT_SPECIAL_SYMBOL_IMAGE_NAME ),
254 MAP_ENTRY( "ChartUserDefinedAttributes", TEXT
, XML_XMLNS
, XML_TYPE_ATTRIBUTE_CONTAINER
| MID_FLAG_SPECIAL_ITEM
),
259 // maps for enums to XML attributes
261 const SvXMLEnumMapEntry aXMLChartAxisLabelPositionEnumMap
[] =
263 { ::xmloff::token::XML_NEAR_AXIS
, css::chart::ChartAxisLabelPosition_NEAR_AXIS
},
264 { ::xmloff::token::XML_NEAR_AXIS_OTHER_SIDE
, css::chart::ChartAxisLabelPosition_NEAR_AXIS_OTHER_SIDE
},
265 { ::xmloff::token::XML_OUTSIDE_START
, css::chart::ChartAxisLabelPosition_OUTSIDE_START
},
266 { ::xmloff::token::XML_OUTSIDE_END
, css::chart::ChartAxisLabelPosition_OUTSIDE_END
},
267 { ::xmloff::token::XML_OUTSIDE_MINIMUM
, css::chart::ChartAxisLabelPosition_OUTSIDE_START
},//#i114142#
268 { ::xmloff::token::XML_OUTSIDE_MAXIMUM
, css::chart::ChartAxisLabelPosition_OUTSIDE_END
},//#i114142#
269 { ::xmloff::token::XML_TOKEN_INVALID
, 0 }
272 const SvXMLEnumMapEntry aXMLChartAxisMarkPositionEnumMap
[] =
274 { ::xmloff::token::XML_AT_LABELS
, css::chart::ChartAxisMarkPosition_AT_LABELS
},
275 { ::xmloff::token::XML_AT_AXIS
, css::chart::ChartAxisMarkPosition_AT_AXIS
},
276 { ::xmloff::token::XML_AT_LABELS_AND_AXIS
, css::chart::ChartAxisMarkPosition_AT_LABELS_AND_AXIS
},
277 { ::xmloff::token::XML_TOKEN_INVALID
, 0 }
280 const SvXMLEnumMapEntry aXMLChartAxisArrangementEnumMap
[] =
282 { ::xmloff::token::XML_SIDE_BY_SIDE
, css::chart::ChartAxisArrangeOrderType_SIDE_BY_SIDE
},
283 { ::xmloff::token::XML_STAGGER_EVEN
, css::chart::ChartAxisArrangeOrderType_STAGGER_EVEN
},
284 { ::xmloff::token::XML_STAGGER_ODD
, css::chart::ChartAxisArrangeOrderType_STAGGER_ODD
},
285 { ::xmloff::token::XML_TOKEN_INVALID
, 0 }
288 const SvXMLEnumMapEntry aXMLChartErrorBarStyleEnumMap
[] =
290 { ::xmloff::token::XML_NONE
, css::chart::ErrorBarStyle::NONE
},
291 { ::xmloff::token::XML_VARIANCE
, css::chart::ErrorBarStyle::VARIANCE
},
292 { ::xmloff::token::XML_STANDARD_DEVIATION
, css::chart::ErrorBarStyle::STANDARD_DEVIATION
},
293 { ::xmloff::token::XML_CONSTANT
, css::chart::ErrorBarStyle::ABSOLUTE
},
294 { ::xmloff::token::XML_PERCENTAGE
, css::chart::ErrorBarStyle::RELATIVE
},
295 { ::xmloff::token::XML_ERROR_MARGIN
, css::chart::ErrorBarStyle::ERROR_MARGIN
},
296 { ::xmloff::token::XML_STANDARD_ERROR
, css::chart::ErrorBarStyle::STANDARD_ERROR
},
297 { ::xmloff::token::XML_CELL_RANGE
, css::chart::ErrorBarStyle::FROM_DATA
},
298 { ::xmloff::token::XML_TOKEN_INVALID
, 0 }
301 const SvXMLEnumMapEntry aXMLChartSolidTypeEnumMap
[] =
303 { ::xmloff::token::XML_CUBOID
, css::chart::ChartSolidType::RECTANGULAR_SOLID
},
304 { ::xmloff::token::XML_CYLINDER
, css::chart::ChartSolidType::CYLINDER
},
305 { ::xmloff::token::XML_CONE
, css::chart::ChartSolidType::CONE
},
306 { ::xmloff::token::XML_PYRAMID
, css::chart::ChartSolidType::PYRAMID
},
307 { ::xmloff::token::XML_TOKEN_INVALID
, 0 }
310 const SvXMLEnumMapEntry aXMLChartDataRowSourceTypeEnumMap
[] =
312 { ::xmloff::token::XML_COLUMNS
, css::chart::ChartDataRowSource_COLUMNS
},
313 { ::xmloff::token::XML_ROWS
, css::chart::ChartDataRowSource_ROWS
},
314 { ::xmloff::token::XML_TOKEN_INVALID
, 0 }
317 const SvXMLEnumMapEntry aXMLChartInterpolationTypeEnumMap
[] =
319 // this is neither an enum nor a constants group, but just a
320 // documented long property
321 { ::xmloff::token::XML_NONE
, 0 },
322 { ::xmloff::token::XML_CUBIC_SPLINE
, 1 },
323 { ::xmloff::token::XML_B_SPLINE
, 2 },
324 { ::xmloff::token::XML_STEP_START
, 3 },
325 { ::xmloff::token::XML_STEP_END
, 4 },
326 { ::xmloff::token::XML_STEP_CENTER_X
, 5 },
327 { ::xmloff::token::XML_STEP_CENTER_Y
, 6 },
328 // the GNM values should only be used for reading Gnumeric ods files
329 // they should never be used for writing ods file
330 { ::xmloff::token::XML_GNM_STEP_START
, 3 },
331 { ::xmloff::token::XML_GNM_STEP_END
, 4 },
332 { ::xmloff::token::XML_GNM_STEP_CENTER_X
, 5 },
333 { ::xmloff::token::XML_GNM_STEP_CENTER_Y
, 6 },
334 { ::xmloff::token::XML_TOKEN_INVALID
, 0 }
337 const SvXMLEnumMapEntry aXMLChartDataLabelPlacementEnumMap
[] =
339 { ::xmloff::token::XML_AVOID_OVERLAP
, css::chart::DataLabelPlacement::AVOID_OVERLAP
},
340 { ::xmloff::token::XML_CENTER
, css::chart::DataLabelPlacement::CENTER
},
341 { ::xmloff::token::XML_TOP
, css::chart::DataLabelPlacement::TOP
},
342 { ::xmloff::token::XML_TOP_LEFT
, css::chart::DataLabelPlacement::TOP_LEFT
},
343 { ::xmloff::token::XML_LEFT
, css::chart::DataLabelPlacement::LEFT
},
344 { ::xmloff::token::XML_BOTTOM_LEFT
, css::chart::DataLabelPlacement::BOTTOM_LEFT
},
345 { ::xmloff::token::XML_BOTTOM
, css::chart::DataLabelPlacement::BOTTOM
},
346 { ::xmloff::token::XML_BOTTOM_RIGHT
, css::chart::DataLabelPlacement::BOTTOM_RIGHT
},
347 { ::xmloff::token::XML_RIGHT
, css::chart::DataLabelPlacement::RIGHT
},
348 { ::xmloff::token::XML_TOP_RIGHT
, css::chart::DataLabelPlacement::TOP_RIGHT
},
349 { ::xmloff::token::XML_INSIDE
, css::chart::DataLabelPlacement::INSIDE
},
350 { ::xmloff::token::XML_OUTSIDE
, css::chart::DataLabelPlacement::OUTSIDE
},
351 { ::xmloff::token::XML_NEAR_ORIGIN
, css::chart::DataLabelPlacement::NEAR_ORIGIN
},
352 { ::xmloff::token::XML_TOKEN_INVALID
, 0 }
355 const SvXMLEnumMapEntry aXMLChartMissingValueTreatmentEnumMap
[] =
357 { ::xmloff::token::XML_LEAVE_GAP
, css::chart::MissingValueTreatment::LEAVE_GAP
},
358 { ::xmloff::token::XML_USE_ZERO
, css::chart::MissingValueTreatment::USE_ZERO
},
359 { ::xmloff::token::XML_IGNORE
, css::chart::MissingValueTreatment::CONTINUE
},
360 { ::xmloff::token::XML_TOKEN_INVALID
,0 },
363 #endif // XML_SCH_CREATE_GLOBAL_MAPS
365 #endif // _PROPERTYMAP_HXX_
367 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */