diff options
author | Michaël Lefèvre <lefevre00@yahoo.fr> | 2015-03-12 20:57:33 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-03-12 22:28:38 +0000 |
commit | c3cd1005568469dc2514627c76378c2f84da2b0d (patch) | |
tree | 5457b8cda8b2afeea297e551ce45b3bb80985e98 /chart2/source/view/axes | |
parent | 6d15c85759d25807cf88561ac3d05cae5f15a169 (diff) |
CppCheck cleanlyness : reduce variable's scope
Change-Id: I5bd18b1a93f7197121eb42f6b82d2d8d87e7671f
Reviewed-on: https://gerrit.libreoffice.org/14843
Tested-by: Michael Stahl <mstahl@redhat.com>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'chart2/source/view/axes')
-rw-r--r-- | chart2/source/view/axes/VCartesianAxis.cxx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx index 957b9af5dc26..4f9be0c43b82 100644 --- a/chart2/source/view/axes/VCartesianAxis.cxx +++ b/chart2/source/view/axes/VCartesianAxis.cxx @@ -697,10 +697,6 @@ bool VCartesianAxis::createTextShapes( if( m_bUseTextLabels && !m_aAxisProperties.m_bComplexCategories ) pCategories = &m_aTextLabels; - const TickInfo* pPreviousVisibleTickInfo = NULL; - const TickInfo* pPREPreviousVisibleTickInfo = NULL; - const TickInfo* pLastVisibleNeighbourTickInfo = NULL; - bool bLimitedHeight = fabs(aTextToTickDistance.getX()) > fabs(aTextToTickDistance.getY()); //prepare properties for multipropertyset-interface of shape @@ -715,6 +711,9 @@ bool VCartesianAxis::createTextShapes( uno::Any* pLimitedSpaceAny = PropertyMapper::getValuePointerForLimitedSpace(aPropValues,aPropNames,bLimitedHeight); + const TickInfo* pPreviousVisibleTickInfo = NULL; + const TickInfo* pPREPreviousVisibleTickInfo = NULL; + const TickInfo* pLastVisibleNeighbourTickInfo = NULL; sal_Int32 nTick = 0; for( TickInfo* pTickInfo = rTickIter.firstInfo() ; pTickInfo @@ -895,9 +894,6 @@ bool VCartesianAxis::createTextShapesSimple( if( m_bUseTextLabels && !m_aAxisProperties.m_bComplexCategories ) pCategories = &m_aTextLabels; - const TickInfo* pPreviousVisibleTickInfo = NULL; - const TickInfo* pLastVisibleNeighbourTickInfo = NULL; - bool bLimitedHeight = fabs(aTextToTickDistance.getX()) > fabs(aTextToTickDistance.getY()); //prepare properties for multipropertyset-interface of shape @@ -912,6 +908,8 @@ bool VCartesianAxis::createTextShapesSimple( uno::Any* pLimitedSpaceAny = PropertyMapper::getValuePointerForLimitedSpace(aPropValues,aPropNames,bLimitedHeight); + const TickInfo* pPreviousVisibleTickInfo = NULL; + const TickInfo* pLastVisibleNeighbourTickInfo = NULL; sal_Int32 nTick = 0; for( TickInfo* pTickInfo = rTickIter.firstInfo() ; pTickInfo |