[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - xmloff/source

Markus Mohrhard markus.mohrhard at collabora.co.uk
Tue Mar 11 00:51:32 PDT 2014


 xmloff/source/chart/PropertyMap.hxx |   27 +++++++++++++++++++--------
 1 file changed, 19 insertions(+), 8 deletions(-)

New commits:
commit d7cc3e7d8a093cfe300f52c0fe51aecd80a34fff
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Mon Mar 10 19:15:45 2014 +0100

    fix odf validation errors around new chart regression curves
    
    Change-Id: If67207abb204b5aca8365737088437b12ac6eaf1
    Reviewed-on: https://gerrit.libreoffice.org/8523
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
    Tested-by: Tomaž Vajngerl <quikee at gmail.com>

diff --git a/xmloff/source/chart/PropertyMap.hxx b/xmloff/source/chart/PropertyMap.hxx
index 9d1f6fd..8e1a3ff 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 }
@@ -185,14 +186,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


More information about the Libreoffice-commits mailing list