summaryrefslogtreecommitdiff
path: root/chart2/source/view/axes
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-06-19 16:03:21 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-20 07:51:22 +0200
commit19f3b88c1ee2ab546a92c28f155f4d65e0c464df (patch)
treef12119740ba1d7245b51e03364a490575a8f830a /chart2/source/view/axes
parent6ee9f2c188290ba8a8bc6d435f645b31a05783ea (diff)
loplugin:oncevar chart2
Change-Id: I2dd0939db440b5357225395e88680dd0b0fdbf43 Reviewed-on: https://gerrit.libreoffice.org/38970 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/view/axes')
-rw-r--r--chart2/source/view/axes/VAxisProperties.cxx5
-rw-r--r--chart2/source/view/axes/VPolarAngleAxis.cxx7
-rw-r--r--chart2/source/view/axes/VPolarGrid.cxx2
3 files changed, 6 insertions, 8 deletions
diff --git a/chart2/source/view/axes/VAxisProperties.cxx b/chart2/source/view/axes/VAxisProperties.cxx
index 35a9855a472f..f791d065a126 100644
--- a/chart2/source/view/axes/VAxisProperties.cxx
+++ b/chart2/source/view/axes/VAxisProperties.cxx
@@ -42,7 +42,7 @@ AxisLabelAlignment::AxisLabelAlignment() :
sal_Int32 lcl_calcTickLengthForDepth(sal_Int32 nDepth,sal_Int32 nTickmarkStyle)
{
- sal_Int32 nWidth = AXIS2D_TICKLENGTH; //@maybefuturetodo this length could be offered by the model
+ sal_Int32 const nWidth = AXIS2D_TICKLENGTH; //@maybefuturetodo this length could be offered by the model
double fPercent = 1.0;
switch(nDepth)
{
@@ -145,9 +145,8 @@ TickmarkProperties AxisProperties::makeTickmarkPropertiesForComplexCategories(
TickmarkProperties AxisProperties::getBiggestTickmarkProperties()
{
TickmarkProperties aTickmarkProperties;
- sal_Int32 nDepth = 0;
sal_Int32 nTickmarkStyle = 3;//inner and outer tickmarks
- aTickmarkProperties.Length = lcl_calcTickLengthForDepth( nDepth,nTickmarkStyle );
+ aTickmarkProperties.Length = lcl_calcTickLengthForDepth( 0/*nDepth*/,nTickmarkStyle );
aTickmarkProperties.RelativePos = static_cast<sal_Int32>( lcl_getTickOffset( aTickmarkProperties.Length, nTickmarkStyle ) );
return aTickmarkProperties;
}
diff --git a/chart2/source/view/axes/VPolarAngleAxis.cxx b/chart2/source/view/axes/VPolarAngleAxis.cxx
index 9186a4643c6b..8d58afb19212 100644
--- a/chart2/source/view/axes/VPolarAngleAxis.cxx
+++ b/chart2/source/view/axes/VPolarAngleAxis.cxx
@@ -53,7 +53,6 @@ bool VPolarAngleAxis::createTextShapes_ForAngleAxis(
, double fLogicRadius
, double fLogicZ )
{
- sal_Int32 nDimensionCount = 2;
AbstractShapeFactory* pShapeFactory = AbstractShapeFactory::getOrCreateShapeFactory(m_xShapeFactory);
FixedNumberFormatter aFixedNumberFormatter(
@@ -116,7 +115,7 @@ bool VPolarAngleAxis::createTextShapes_ForAngleAxis(
double fLogicAngle = pTickInfo->getUnscaledTickValue();
LabelAlignment eLabelAlignment(LABEL_ALIGN_CENTER);
- PolarLabelPositionHelper aPolarLabelPositionHelper(m_pPosHelper.get(), nDimensionCount, xTarget, pShapeFactory);
+ PolarLabelPositionHelper aPolarLabelPositionHelper(m_pPosHelper.get(), 2/*nDimensionCount*/, xTarget, pShapeFactory);
sal_Int32 nScreenValueOffsetInRadiusDirection = m_aAxisLabelProperties.m_aMaximumSpaceForLabels.Height/15;
awt::Point aAnchorScreenPosition2D( aPolarLabelPositionHelper.getLabelScreenPositionAndAlignmentForLogicValues(
eLabelAlignment, fLogicAngle, fLogicRadius, fLogicZ, nScreenValueOffsetInRadiusDirection ));
@@ -177,7 +176,7 @@ void VPolarAngleAxis::createLabels()
AxisLabelProperties aAxisLabelProperties( m_aAxisLabelProperties );
aAxisLabelProperties.bOverlapAllowed = true;
- double fLogicZ = 1.0;//as defined
+ double const fLogicZ = 1.0;//as defined
while( !createTextShapes_ForAngleAxis( m_xTextTarget, aTickIter
, aAxisLabelProperties
, fLogicRadius, fLogicZ
@@ -195,7 +194,7 @@ void VPolarAngleAxis::createShapes()
return;
double fLogicRadius = m_pPosHelper->getOuterLogicRadius();
- double fLogicZ = 1.0;//as defined
+ double const fLogicZ = 1.0;//as defined
//create axis main lines
drawing::PointSequenceSequence aPoints(1);
diff --git a/chart2/source/view/axes/VPolarGrid.cxx b/chart2/source/view/axes/VPolarGrid.cxx
index 856bd3197bd2..54e8f7b357a4 100644
--- a/chart2/source/view/axes/VPolarGrid.cxx
+++ b/chart2/source/view/axes/VPolarGrid.cxx
@@ -201,7 +201,7 @@ void VPolarGrid::create2DRadiusGrid( const Reference< drawing::XShapes >& xLogic
//xxxxx rTickInfo.updateUnscaledValue( xInverseRadiusScaling );
double fLogicRadius = rTickInfo.getUnscaledTickValue();
- double fLogicZ = 1.0;//as defined
+ double const fLogicZ = 1.0;//as defined
drawing::PointSequenceSequence aPoints(1);
VPolarGrid::createLinePointSequence_ForAngleAxis( aPoints, rAngleTickInfos