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>
diff --git a/xmloff/source/chart/PropertyMaps.cxx b/xmloff/source/chart/PropertyMaps.cxx
index ecf7f86..68658a2 100644
--- a/xmloff/source/chart/PropertyMaps.cxx
+++ b/xmloff/source/chart/PropertyMaps.cxx
@@ -466,6 +466,8 @@
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 @@
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;