summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-03-10 19:15:45 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-03-10 19:46:04 +0100
commit4c7116413af091a30f5fa60c63d29bc694730518 (patch)
tree4e55b9843589a1bfec5560215b2fce05545c9491
parentca8ca8c28742879220f3ff88ae0d71c8d69b11cd (diff)
fix odf validation errors around new chart regression curves
Change-Id: If67207abb204b5aca8365737088437b12ac6eaf1
-rw-r--r--xmloff/source/chart/PropertyMap.hxx27
1 files changed, 19 insertions, 8 deletions
diff --git a/xmloff/source/chart/PropertyMap.hxx b/xmloff/source/chart/PropertyMap.hxx
index 8bd4b2455495..8add811a0d2a 100644
--- a/xmloff/source/chart/PropertyMap.hxx
+++ b/xmloff/source/chart/PropertyMap.hxx
@@ -87,6 +87,7 @@
#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 }
#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 }
#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 }
+#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 }
#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 }
#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 }
#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 }
@@ -194,14 +195,24 @@ const XMLPropertyMapEntry aXMLChartPropMap[] =
// regression curve properties
MAP_SPECIAL( "RegressionType", CHART, XML_REGRESSION_TYPE, XML_TYPE_STRING, XML_SCH_CONTEXT_SPECIAL_REGRESSION_TYPE ),
- MAP_ENTRY_ODF_EXT( "CurveName", CHART, XML_REGRESSION_CURVE_NAME, XML_TYPE_STRING ),
- MAP_ENTRY_ODF_EXT( "PolynomialDegree", CHART, XML_REGRESSION_MAX_DEGREE, XML_TYPE_NUMBER ),
- MAP_ENTRY_ODF_EXT( "MovingAveragePeriod", CHART, XML_REGRESSION_PERIOD, XML_TYPE_NUMBER ),
- MAP_ENTRY_ODF_EXT( "MovingAverageType", CHART, XML_REGRESSION_MOVING_TYPE, XML_TYPE_STRING ),
- MAP_ENTRY_ODF_EXT( "ExtrapolateForward", CHART, XML_REGRESSION_EXTRAPOLATE_FORWARD, XML_TYPE_DOUBLE ),
- MAP_ENTRY_ODF_EXT( "ExtrapolateBackward", CHART, XML_REGRESSION_EXTRAPOLATE_BACKWARD, XML_TYPE_DOUBLE ),
- MAP_ENTRY_ODF_EXT( "ForceIntercept", CHART, XML_REGRESSION_FORCE_INTERCEPT, XML_TYPE_BOOL ),
- MAP_ENTRY_ODF_EXT( "InterceptValue", CHART, XML_REGRESSION_INTERCEPT_VALUE, XML_TYPE_DOUBLE ),
+ MAP_ENTRY_ODF_EXT( "CurveName", LO_EXT, XML_REGRESSION_CURVE_NAME, XML_TYPE_STRING ),
+ MAP_ENTRY_ODF_EXT( "PolynomialDegree", LO_EXT, XML_REGRESSION_MAX_DEGREE, XML_TYPE_NUMBER ),
+ MAP_ENTRY_ODF_EXT( "MovingAveragePeriod", LO_EXT, XML_REGRESSION_PERIOD, XML_TYPE_NUMBER ),
+ MAP_ENTRY_ODF_EXT( "MovingAverageType", LO_EXT, XML_REGRESSION_MOVING_TYPE, XML_TYPE_STRING ),
+ MAP_ENTRY_ODF_EXT( "ExtrapolateForward", LO_EXT, XML_REGRESSION_EXTRAPOLATE_FORWARD, XML_TYPE_DOUBLE ),
+ MAP_ENTRY_ODF_EXT( "ExtrapolateBackward", LO_EXT, XML_REGRESSION_EXTRAPOLATE_BACKWARD, XML_TYPE_DOUBLE ),
+ MAP_ENTRY_ODF_EXT( "ForceIntercept", LO_EXT, XML_REGRESSION_FORCE_INTERCEPT, XML_TYPE_BOOL ),
+ MAP_ENTRY_ODF_EXT( "InterceptValue", LO_EXT, XML_REGRESSION_INTERCEPT_VALUE, XML_TYPE_DOUBLE ),
+
+ // import mapping for broken files
+ MAP_ENTRY_ODF_EXT_IMPORT( "CurveName", CHART, XML_REGRESSION_CURVE_NAME, XML_TYPE_STRING ),
+ MAP_ENTRY_ODF_EXT_IMPORT( "PolynomialDegree", CHART, XML_REGRESSION_MAX_DEGREE, XML_TYPE_NUMBER ),
+ MAP_ENTRY_ODF_EXT_IMPORT( "MovingAveragePeriod", CHART, XML_REGRESSION_PERIOD, XML_TYPE_NUMBER ),
+ MAP_ENTRY_ODF_EXT_IMPORT( "MovingAverageType", CHART, XML_REGRESSION_MOVING_TYPE, XML_TYPE_STRING ),
+ MAP_ENTRY_ODF_EXT_IMPORT( "ExtrapolateForward", CHART, XML_REGRESSION_EXTRAPOLATE_FORWARD, XML_TYPE_DOUBLE ),
+ MAP_ENTRY_ODF_EXT_IMPORT( "ExtrapolateBackward", CHART, XML_REGRESSION_EXTRAPOLATE_BACKWARD, XML_TYPE_DOUBLE ),
+ MAP_ENTRY_ODF_EXT_IMPORT( "ForceIntercept", CHART, XML_REGRESSION_FORCE_INTERCEPT, XML_TYPE_BOOL ),
+ MAP_ENTRY_ODF_EXT_IMPORT( "InterceptValue", CHART, XML_REGRESSION_INTERCEPT_VALUE, XML_TYPE_DOUBLE ),
MAP_SPECIAL_ODF12( "ErrorBarRangePositive", CHART, XML_ERROR_UPPER_RANGE, XML_TYPE_STRING, XML_SCH_CONTEXT_SPECIAL_ERRORBAR_RANGE ), // export only
MAP_SPECIAL_ODF12( "ErrorBarRangeNegative", CHART, XML_ERROR_LOWER_RANGE, XML_TYPE_STRING, XML_SCH_CONTEXT_SPECIAL_ERRORBAR_RANGE ), // export only