summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-03-29 14:45:12 +0200
committerAndras Timar <andras.timar@collabora.com>2023-05-13 20:01:52 +0200
commite448279da92f18993c6477c785622bd75bd7d47c (patch)
tree99c129bc69ce6552b053a52d8c7af43ef967bc82 /chart2
parent231a099f8ddd2e2c9babf47142a935f26ba5d39c (diff)
fix bug in WrappedRegressionCurvesProperty::setValueToSeries
ever since commit 1cd3e2038010cb37bda82d38dd058b793b7eec26 Author: Tomaž Vajngerl <quikee@gmail.com> Date: Sat Jun 29 18:43:16 2013 +0200 Multiple trendline removing and changing type support. Change-Id: Ibd24d0831932f25e60c05a00450d611e15875102 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149691 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 2714b18cbaefb13131ae63396297cd57b564a3af) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149698 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
index 2de01cc8b966..a50ac7527c76 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
@@ -840,9 +840,10 @@ css::chart::ChartRegressionCurveType WrappedRegressionCurvesProperty::getValueFr
void WrappedRegressionCurvesProperty::setValueToSeries( const Reference< beans::XPropertySet >& xSeriesPropertySet, const css::chart::ChartRegressionCurveType& aNewValue ) const
{
uno::Reference< chart2::XRegressionCurveContainer > xRegressionCurveContainer( xSeriesPropertySet, uno::UNO_QUERY );
- uno::Reference< chart2::XRegressionCurve > xRegressionCurve( xSeriesPropertySet, uno::UNO_QUERY );
-
- if( xRegressionCurveContainer.is() && xRegressionCurve.is() )
+ if (!xRegressionCurveContainer)
+ return;
+ rtl::Reference< ::chart::RegressionCurveModel> xRegressionCurve = RegressionCurveHelper::getFirstCurveNotMeanValueLine( xRegressionCurveContainer );
+ if( xRegressionCurve.is() )
{
SvxChartRegress eNewRegressionType = lcl_getRegressionType( aNewValue );