summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorelixir <prashant3.yishu@gmail.com>2013-04-01 20:14:07 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-04-01 20:48:52 +0200
commit1ed73984639390759d26a2fc0209083d9f984d52 (patch)
tree10fc0ce8077d6c886c9323feba8c9a410b228077 /chart2
parentafa1e9952eab0310ee3c194ebd03e0b0fe941168 (diff)
fdo#51656 : Mean value line starts in wrong place in column graph
Change-Id: I2389687e54cec4c0e873bcc120cc21b3c3d11d78
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/view/charttypes/VSeriesPlotter.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index 6e114ddae0a5..884df9a6dcd5 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -1011,13 +1011,16 @@ void VSeriesPlotter::createRegressionCurvesShapes( VDataSeries& rVDataSeries
xRegressionCurveCalculator->getCurveValues(
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;
double fLogicY = aCalculatedPoints[nP].Y;
double fLogicZ = 0.0;//dummy
- m_pPosHelper->doLogicScaling( &fLogicX, &fLogicY, &fLogicZ );
+ // fdo#51656: don't scale mean value lines
+ 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)
@@ -1045,7 +1048,6 @@ void VSeriesPlotter::createRegressionCurvesShapes( VDataSeries& rVDataSeries
aVLineProperties.initFromPropertySet( xCurveModelProp );
//create an extra group shape for each curve for selection handling
- bool bAverageLine = RegressionCurveHelper::isMeanValueLine( aCurveList[nN] );
uno::Reference< drawing::XShapes > xRegressionGroupShapes =
createGroupShape( xTarget, rVDataSeries.getDataCurveCID( nN, bAverageLine ) );
uno::Reference< drawing::XShape > xShape = m_pShapeFactory->createLine2D(