[Libreoffice-commits] core.git: 2 commits - chart2/source
elixir
prashant3.yishu at gmail.com
Mon Apr 1 12:52:33 PDT 2013
chart2/source/tools/InternalDataProvider.cxx | 23 ++++++++---------------
chart2/source/view/charttypes/VSeriesPlotter.cxx | 6 ++++--
2 files changed, 12 insertions(+), 17 deletions(-)
New commits:
commit 1ed73984639390759d26a2fc0209083d9f984d52
Author: elixir <prashant3.yishu at gmail.com>
Date: Mon Apr 1 20:14:07 2013 +0200
fdo#51656 : Mean value line starts in wrong place in column graph
Change-Id: I2389687e54cec4c0e873bcc120cc21b3c3d11d78
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index 6e114dd..884df9a 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(
commit afa1e9952eab0310ee3c194ebd03e0b0fe941168
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Mon Apr 1 20:14:27 2013 +0200
some little code clean-up
#
Change-Id: Ifbb754ce7ebe34b69a803f88b02a1e31bd21248f
diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx
index 6479040..3a4303b 100644
--- a/chart2/source/tools/InternalDataProvider.cxx
+++ b/chart2/source/tools/InternalDataProvider.cxx
@@ -276,16 +276,14 @@ public:
void operator() ( vector< uno::Any >& rVector )
{
- if( m_nLevel > static_cast< sal_Int32 >(rVector.size()) )
- rVector.resize( m_nLevel );
-
- vector< uno::Any >::iterator aIt( rVector.begin() );
- for( sal_Int32 nN=0; aIt<rVector.end(); aIt++, nN++)
+ if( m_nLevel >= static_cast< sal_Int32 >(rVector.size()) )
{
- if( nN==m_nLevel )
- break;
+ rVector.resize( m_nLevel + 1 );
+ }
+ else
+ {
+ rVector.insert( rVector.begin() + m_nLevel, uno::Any() );
}
- rVector.insert( aIt, uno::Any() );
}
private:
@@ -301,14 +299,9 @@ public:
void operator() ( vector< uno::Any >& rVector )
{
- vector< uno::Any >::iterator aIt( rVector.begin() );
- for( sal_Int32 nN=0; aIt<rVector.end(); aIt++, nN++)
+ if( m_nLevel < static_cast<sal_Int32>(rVector.size()) )
{
- if( nN==m_nLevel )
- {
- rVector.erase( aIt );
- break;
- }
+ rVector.erase(rVector.begin() + m_nLevel);
}
}
More information about the Libreoffice-commits
mailing list