summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2020-01-22 23:13:40 +0100
committerMichael Stahl <michael.stahl@cib.de>2020-01-23 11:18:33 +0100
commit84c2b1ab7a8cf5d7f568ef05d4b2b25e783382b6 (patch)
tree0471a64564dd6317c453b64d35651ff7571c59a0 /xmloff
parent1f0ef4a86cf7ff83bba26f141408d9ccb296fb2a (diff)
tdf#130133: fix wrong values for attribute chart:regression-type in ODF 1.2
"polynomial" and "moving-average" Change-Id: I5d07d0315555e8b72ea721a35a2205a8223ed294 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87226 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/chart/PropertyMaps.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/xmloff/source/chart/PropertyMaps.cxx b/xmloff/source/chart/PropertyMaps.cxx
index ecf7f86b870a..68658a2b1b06 100644
--- a/xmloff/source/chart/PropertyMaps.cxx
+++ b/xmloff/source/chart/PropertyMaps.cxx
@@ -466,6 +466,8 @@ void XMLChartExportPropertyMapper::handleSpecialItem(
break;
case XML_SCH_CONTEXT_SPECIAL_REGRESSION_TYPE:
{
+ const SvtSaveOptions::ODFDefaultVersion nCurrentVersion( SvtSaveOptions().GetODFDefaultVersion() );
+
OUString aServiceName;
rProperty.maValue >>= aServiceName;
if (aServiceName == "com.sun.star.chart2.LinearRegressionCurve")
@@ -476,9 +478,9 @@ void XMLChartExportPropertyMapper::handleSpecialItem(
sValueBuffer.append( GetXMLToken( XML_EXPONENTIAL ));
else if (aServiceName == "com.sun.star.chart2.PotentialRegressionCurve")
sValueBuffer.append( GetXMLToken( XML_POWER ));
- else if (aServiceName == "com.sun.star.chart2.PolynomialRegressionCurve")
+ else if (nCurrentVersion > SvtSaveOptions::ODFVER_012 && aServiceName == "com.sun.star.chart2.PolynomialRegressionCurve")
sValueBuffer.append( GetXMLToken( XML_POLYNOMIAL ));
- else if (aServiceName == "com.sun.star.chart2.MovingAverageRegressionCurve")
+ else if (nCurrentVersion > SvtSaveOptions::ODFVER_012 && aServiceName == "com.sun.star.chart2.MovingAverageRegressionCurve")
sValueBuffer.append( GetXMLToken( XML_MOVING_AVERAGE ));
}
break;