[Libreoffice-commits] core.git: xmloff/source
Julien Nabet (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jan 23 10:19:08 UTC 2020
xmloff/source/chart/PropertyMaps.cxx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit 84c2b1ab7a8cf5d7f568ef05d4b2b25e783382b6
Author: Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Wed Jan 22 23:13:40 2020 +0100
Commit: Michael Stahl <michael.stahl at cib.de>
CommitDate: Thu Jan 23 11:18:33 2020 +0100
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 at cib.de>
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;
More information about the Libreoffice-commits
mailing list