diff options
Diffstat (limited to 'chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx')
-rw-r--r-- | chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx index bc83ba60df87..e5278bb5da49 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx @@ -21,6 +21,7 @@ #include "WrappedSeriesOrDiagramProperty.hxx" #include <FastPropertyIdRanges.hxx> #include <RegressionCurveHelper.hxx> +#include <RegressionCurveModel.hxx> #include <ErrorBar.hxx> #include <StatisticsHelper.hxx> #include <unonames.hxx> @@ -31,7 +32,6 @@ #include <com/sun/star/chart/ErrorBarStyle.hpp> #include <com/sun/star/chart/ChartErrorIndicatorType.hpp> #include <com/sun/star/chart/ChartRegressionCurveType.hpp> -#include <com/sun/star/chart2/XChartDocument.hpp> #include <com/sun/star/chart2/data/XRangeXMLConversion.hpp> #include <com/sun/star/chart2/XRegressionCurveContainer.hpp> #include <utility> @@ -144,8 +144,7 @@ void lcl_ConvertRangeFromXML( lcl_getDataProviderFromContact( spChart2ModelContact ), uno::UNO_QUERY ); if( xConverter.is()) { - OUString aResult = xConverter->convertRangeFromXML( rInOutRange ); - rInOutRange = aResult; + rInOutRange = xConverter->convertRangeFromXML( rInOutRange ); } } } @@ -160,8 +159,7 @@ void lcl_ConvertRangeToXML( lcl_getDataProviderFromContact( spChart2ModelContact ), uno::UNO_QUERY ); if( xConverter.is()) { - OUString aResult = xConverter->convertRangeToXML( rInOutRange ); - rInOutRange = aResult; + rInOutRange = xConverter->convertRangeToXML( rInOutRange ); } } } @@ -840,9 +838,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 ); @@ -906,7 +905,7 @@ Reference< beans::XPropertySet > WrappedStatisticPropertySetProperty::getValueFr { case PROPERTY_SET_TYPE_REGRESSION: if( xRegCnt.is() ) - xResult.set( RegressionCurveHelper::getFirstCurveNotMeanValueLine( xRegCnt ), uno::UNO_QUERY ); + xResult = RegressionCurveHelper::getFirstCurveNotMeanValueLine( xRegCnt ); break; case PROPERTY_SET_TYPE_ERROR_BAR: if( xSeriesPropertySet.is()) @@ -914,7 +913,7 @@ Reference< beans::XPropertySet > WrappedStatisticPropertySetProperty::getValueFr break; case PROPERTY_SET_TYPE_MEAN_VALUE: if( xRegCnt.is() ) - xResult.set( RegressionCurveHelper::getMeanValueLine( xRegCnt ), uno::UNO_QUERY ); + xResult = RegressionCurveHelper::getMeanValueLine( xRegCnt ); break; } |