Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3156

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/56/3156/1

fdo#51656 Mean value line starts in wrong place

In case of a mean value line, don't shift position.

Change-Id: I056423b3214e8f904202e6e6a3aeaec12122e62d
---
M chart2/source/view/charttypes/VSeriesPlotter.cxx
1 file changed, 4 insertions(+), 2 deletions(-)



diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx 
b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index 6e114dd..b35739d 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -1011,13 +1011,16 @@
             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 );
+            // Don't do scaling if it's a mean value line ( fdo#51656 ).
+            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 @@
             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(

-- 
To view, visit https://gerrit.libreoffice.org/3156
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I056423b3214e8f904202e6e6a3aeaec12122e62d
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Cao Cuong Ngo <cao.cuong.ngo@gmail.com>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.