Kaydet (Commit) 4219853f authored tarafından Caolán McNamara's avatar Caolán McNamara

clarify this code a bit

Change-Id: I44066ad4f2e2374e87771de89bdefdbccc816302
Reviewed-on: https://gerrit.libreoffice.org/62095
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 496f1353
...@@ -60,8 +60,8 @@ void VPolarGrid::setIncrements( const std::vector< ExplicitIncrementData >& rInc ...@@ -60,8 +60,8 @@ void VPolarGrid::setIncrements( const std::vector< ExplicitIncrementData >& rInc
void VPolarGrid::getAllTickInfos( sal_Int32 nDimensionIndex, TickInfoArraysType& rAllTickInfos ) const void VPolarGrid::getAllTickInfos( sal_Int32 nDimensionIndex, TickInfoArraysType& rAllTickInfos ) const
{ {
TickFactory aTickFactory( const std::vector<ExplicitScaleData>& rScales = m_pPosHelper->getScales();
m_pPosHelper->getScales()[nDimensionIndex], m_aIncrements[nDimensionIndex] ); TickFactory aTickFactory(rScales[nDimensionIndex], m_aIncrements[nDimensionIndex]);
aTickFactory.getAllTicks( rAllTickInfos ); aTickFactory.getAllTicks( rAllTickInfos );
} }
...@@ -111,7 +111,8 @@ void VPolarGrid::create2DAngleGrid( const Reference< drawing::XShapes >& xLogicT ...@@ -111,7 +111,8 @@ void VPolarGrid::create2DAngleGrid( const Reference< drawing::XShapes >& xLogicT
Reference< drawing::XShapes > xMainTarget( Reference< drawing::XShapes > xMainTarget(
createGroupShape( xLogicTarget, m_aCID ) ); 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 ); Reference< XScaling > xInverseScaling( NULL );
if( rAngleScale.Scaling.is() ) if( rAngleScale.Scaling.is() )
xInverseScaling = rAngleScale.Scaling->getInverseScaling(); xInverseScaling = rAngleScale.Scaling->getInverseScaling();
...@@ -161,8 +162,9 @@ void VPolarGrid::create2DRadiusGrid( const Reference< drawing::XShapes >& xLogic ...@@ -161,8 +162,9 @@ void VPolarGrid::create2DRadiusGrid( const Reference< drawing::XShapes >& xLogic
Reference< drawing::XShapes > xMainTarget( Reference< drawing::XShapes > xMainTarget(
createGroupShape( xLogicTarget, m_aCID ) ); createGroupShape( xLogicTarget, m_aCID ) );
const ExplicitScaleData& rRadiusScale = m_pPosHelper->getScales()[1]; const std::vector<ExplicitScaleData>& rScales = m_pPosHelper->getScales();
const ExplicitScaleData& rAngleScale = m_pPosHelper->getScales()[0]; const ExplicitScaleData& rRadiusScale = rScales[1];
const ExplicitScaleData& rAngleScale = rScales[0];
const ExplicitIncrementData& rAngleIncrement = m_aIncrements[0]; const ExplicitIncrementData& rAngleIncrement = m_aIncrements[0];
Reference< XScaling > xInverseRadiusScaling; Reference< XScaling > xInverseRadiusScaling;
if( rRadiusScale.Scaling.is() ) if( rRadiusScale.Scaling.is() )
......
...@@ -121,8 +121,10 @@ namespace drawinglayer ...@@ -121,8 +121,10 @@ namespace drawinglayer
// take care of global ambient light // take care of global ambient light
aRetval += mpSdrLightingAttribute->getAmbientLight() * rColor; aRetval += mpSdrLightingAttribute->getAmbientLight() * rColor;
const std::vector<Sdr3DLightAttribute>& rLightVector = mpSdrLightingAttribute->getLightVector();
// prepare light access. Is there a light? // prepare light access. Is there a light?
const sal_uInt32 nLightCount(mpSdrLightingAttribute->getLightVector().size()); const sal_uInt32 nLightCount(rLightVector.size());
if(nLightCount && !rNormalInEyeCoordinates.equalZero()) if(nLightCount && !rNormalInEyeCoordinates.equalZero())
{ {
...@@ -132,7 +134,7 @@ namespace drawinglayer ...@@ -132,7 +134,7 @@ namespace drawinglayer
for(sal_uInt32 a(0); a < nLightCount; a++) for(sal_uInt32 a(0); a < nLightCount; a++)
{ {
const Sdr3DLightAttribute& rLight(mpSdrLightingAttribute->getLightVector()[a]); const Sdr3DLightAttribute& rLight(rLightVector[a]);
const double fCosFac(rLight.getDirection().scalar(aEyeNormal)); const double fCosFac(rLight.getDirection().scalar(aEyeNormal));
if(basegfx::fTools::more(fCosFac, 0.0)) if(basegfx::fTools::more(fCosFac, 0.0))
......
...@@ -1235,7 +1235,8 @@ namespace accessibility ...@@ -1235,7 +1235,8 @@ namespace accessibility
bool bIsDirectVal = false; bool bIsDirectVal = false;
for (auto const& rRunAttrib : aRunAttribs) for (auto const& rRunAttrib : aRunAttribs)
{ {
if ((bIsDirectVal = rRes.Name == rRunAttrib.Name)) bIsDirectVal = rRes.Name == rRunAttrib.Name;
if (bIsDirectVal)
break; break;
} }
rRes.Handle = -1; rRes.Handle = -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment