diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-10-20 19:18:31 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-10-21 16:48:51 +0200 |
commit | 4219853f7344987cc8ebdf20860038222a1883dc (patch) | |
tree | d9049a286c44bf200ae6e77ff31a6deacb218c6a /chart2 | |
parent | 496f13538220da6f9040e3f372ee1291afd19a91 (diff) |
clarify this code a bit
Change-Id: I44066ad4f2e2374e87771de89bdefdbccc816302
Reviewed-on: https://gerrit.libreoffice.org/62095
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/view/axes/VPolarGrid.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/chart2/source/view/axes/VPolarGrid.cxx b/chart2/source/view/axes/VPolarGrid.cxx index f2b1e2687a4c..232c72b8c19e 100644 --- a/chart2/source/view/axes/VPolarGrid.cxx +++ b/chart2/source/view/axes/VPolarGrid.cxx @@ -60,8 +60,8 @@ void VPolarGrid::setIncrements( const std::vector< ExplicitIncrementData >& rInc void VPolarGrid::getAllTickInfos( sal_Int32 nDimensionIndex, TickInfoArraysType& rAllTickInfos ) const { - TickFactory aTickFactory( - m_pPosHelper->getScales()[nDimensionIndex], m_aIncrements[nDimensionIndex] ); + const std::vector<ExplicitScaleData>& rScales = m_pPosHelper->getScales(); + TickFactory aTickFactory(rScales[nDimensionIndex], m_aIncrements[nDimensionIndex]); aTickFactory.getAllTicks( rAllTickInfos ); } @@ -111,7 +111,8 @@ void VPolarGrid::create2DAngleGrid( const Reference< drawing::XShapes >& xLogicT Reference< drawing::XShapes > xMainTarget( createGroupShape( xLogicTarget, m_aCID ) ); - const ExplicitScaleData& rAngleScale = m_pPosHelper->getScales()[0]; + const std::vector<ExplicitScaleData>& rScales = m_pPosHelper->getScales(); + const ExplicitScaleData& rAngleScale = rScales[0]; Reference< XScaling > xInverseScaling( NULL ); if( rAngleScale.Scaling.is() ) xInverseScaling = rAngleScale.Scaling->getInverseScaling(); @@ -161,8 +162,9 @@ void VPolarGrid::create2DRadiusGrid( const Reference< drawing::XShapes >& xLogic Reference< drawing::XShapes > xMainTarget( createGroupShape( xLogicTarget, m_aCID ) ); - const ExplicitScaleData& rRadiusScale = m_pPosHelper->getScales()[1]; - const ExplicitScaleData& rAngleScale = m_pPosHelper->getScales()[0]; + const std::vector<ExplicitScaleData>& rScales = m_pPosHelper->getScales(); + const ExplicitScaleData& rRadiusScale = rScales[1]; + const ExplicitScaleData& rAngleScale = rScales[0]; const ExplicitIncrementData& rAngleIncrement = m_aIncrements[0]; Reference< XScaling > xInverseRadiusScaling; if( rRadiusScale.Scaling.is() ) |