summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorTomaž Vajngerl <quikee@gmail.com>2013-06-29 18:38:32 +0200
committerTomaž Vajngerl <quikee@gmail.com>2013-07-03 21:46:44 +0200
commit4c116a7b31328a781197082c826fe910afaaee8b (patch)
treec86040f518c72e0e65356aab6ce819956233a72a /chart2
parentf7964536c865b3c6f6bc9461eb51528282b351bd (diff)
VSeriesPlotter cleanup.
Change-Id: Ie9a2fa2a241826581eb799bafa796c54d558d976
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/view/charttypes/VSeriesPlotter.cxx19
1 files changed, 10 insertions, 9 deletions
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index 8bceb4cc3481..911438130cba 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -963,10 +963,10 @@ void VSeriesPlotter::createErrorBar_Y( const drawing::Position3D& rUnscaledLogic
}
}
-void VSeriesPlotter::createRegressionCurvesShapes( VDataSeries& rVDataSeries
- , const uno::Reference< drawing::XShapes >& xTarget
- , const uno::Reference< drawing::XShapes >& xEquationTarget
- , bool bMaySkipPointsInRegressionCalculation )
+void VSeriesPlotter::createRegressionCurvesShapes( VDataSeries& rVDataSeries,
+ const uno::Reference< drawing::XShapes >& xTarget,
+ const uno::Reference< drawing::XShapes >& xEquationTarget,
+ bool bMaySkipPointsInRegressionCalculation )
{
if(m_nDimension!=2)
return;
@@ -977,6 +977,7 @@ void VSeriesPlotter::createRegressionCurvesShapes( VDataSeries& rVDataSeries
uno::Sequence< uno::Reference< XRegressionCurve > > aCurveList =
xRegressionContainer->getRegressionCurves();
+
for(sal_Int32 nN=0; nN<aCurveList.getLength(); nN++)
{
uno::Reference< beans::XPropertySet > xProperties( aCurveList[nN], uno::UNO_QUERY );
@@ -1039,6 +1040,7 @@ void VSeriesPlotter::createRegressionCurvesShapes( VDataSeries& rVDataSeries
fMinX, fMaxX, nRegressionPointCount, xScalingX, xScalingY, bMaySkipPointsInRegressionCalculation ));
nRegressionPointCount = aCalculatedPoints.getLength();
bool bAverageLine = RegressionCurveHelper::isMeanValueLine( aCurveList[nN] );
+
for(sal_Int32 nP=0; nP<nRegressionPointCount; nP++)
{
double fLogicX = aCalculatedPoints[nP].X;
@@ -1049,9 +1051,9 @@ void VSeriesPlotter::createRegressionCurvesShapes( VDataSeries& rVDataSeries
if(!bAverageLine)
m_pPosHelper->doLogicScaling( &fLogicX, &fLogicY, &fLogicZ );
- if( !::rtl::math::isNan(fLogicX) && !::rtl::math::isInf(fLogicX)
- && !::rtl::math::isNan(fLogicY) && !::rtl::math::isInf(fLogicY)
- && !::rtl::math::isNan(fLogicZ) && !::rtl::math::isInf(fLogicZ) )
+ if(!rtl::math::isNan(fLogicX) && !rtl::math::isInf(fLogicX) &&
+ !rtl::math::isNan(fLogicY) && !rtl::math::isInf(fLogicY) &&
+ !rtl::math::isNan(fLogicZ) && !rtl::math::isInf(fLogicZ) )
{
aRegressionPoly.SequenceX[0][nRealPointCount] = fLogicX;
aRegressionPoly.SequenceY[0][nRealPointCount] = fLogicY;
@@ -1070,9 +1072,8 @@ void VSeriesPlotter::createRegressionCurvesShapes( VDataSeries& rVDataSeries
awt::Point aDefaultPos;
if( aRegressionPoly.SequenceX.getLength() && aRegressionPoly.SequenceX[0].getLength() )
{
- uno::Reference< beans::XPropertySet > xCurveModelProp( aCurveList[nN], uno::UNO_QUERY );
VLineProperties aVLineProperties;
- aVLineProperties.initFromPropertySet( xCurveModelProp );
+ aVLineProperties.initFromPropertySet( xProperties );
//create an extra group shape for each curve for selection handling
uno::Reference< drawing::XShapes > xRegressionGroupShapes =