diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2008-07-02 11:04:24 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2008-07-02 11:04:24 +0000 |
commit | 1de23a27adbc967676d2cd5f7b92bd70cc923086 (patch) | |
tree | 380bd1696a722579dc3d3fa25b6c386de78873fe /chart2/source/view | |
parent | 5447d8bd8c0a52d6a2997bc1c33054c7e3493089 (diff) |
INTEGRATION: CWS chart27 (1.30.28); FILE MERGED
2008/06/10 08:24:43 iha 1.30.28.2: RESYNC: (1.30-1.31); FILE MERGED
2008/06/09 13:38:43 iha 1.30.28.1: #i72331 Wrong error indicator placement for standard deviation
Diffstat (limited to 'chart2/source/view')
-rw-r--r-- | chart2/source/view/main/VDataSeries.cxx | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/chart2/source/view/main/VDataSeries.cxx b/chart2/source/view/main/VDataSeries.cxx index 63b1a529b701..f713f79212a9 100644 --- a/chart2/source/view/main/VDataSeries.cxx +++ b/chart2/source/view/main/VDataSeries.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: VDataSeries.cxx,v $ - * $Revision: 1.31 $ + * $Revision: 1.32 $ * * This file is part of OpenOffice.org. * @@ -37,6 +37,8 @@ #include "LabelPositionHelper.hxx" #include "ChartTypeHelper.hxx" #include "ContainerHelper.hxx" +#include "MeanValueRegressionCurveCalculator.hxx" + #include <com/sun/star/chart2/Symbol.hpp> //#include "CommonConverters.hxx" @@ -225,6 +227,8 @@ VDataSeries::VDataSeries( const uno::Reference< XDataSeries >& xDataSeries ) , m_aValues_Y_First() , m_aValues_Y_Last() + , m_fYMeanValue(1.0) + , m_aAttributedDataPointIndexList() , m_eStackingDirection(StackingDirection_NO_STACKING) @@ -252,6 +256,8 @@ VDataSeries::VDataSeries( const uno::Reference< XDataSeries >& xDataSeries ) , m_apSymbolProperties_InvisibleSymbolForSelection(NULL) , m_nCurrentAttributedPoint(-1) { + ::rtl::math::setNan( & m_fYMeanValue ); + uno::Reference<data::XDataSource> xDataSource = uno::Reference<data::XDataSource>( xDataSeries, uno::UNO_QUERY ); @@ -668,6 +674,19 @@ uno::Sequence< double > VDataSeries::getAllY() const return m_aValues_Y.Doubles; } +double VDataSeries::getYMeanValue() const +{ + if( ::rtl::math::isNan( m_fYMeanValue ) ) + { + uno::Reference< XRegressionCurveCalculator > xCalculator( new MeanValueRegressionCurveCalculator() ); + uno::Sequence< double > aXValuesDummy; + xCalculator->recalculateRegression( aXValuesDummy, getAllY() ); + double fXDummy = 1.0; + m_fYMeanValue = xCalculator->getCurveValue( fXDummy ); + } + return m_fYMeanValue; +} + ::std::auto_ptr< Symbol > getSymbolPropertiesFromPropertySet( const uno::Reference< beans::XPropertySet >& xProp ) { |