summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-10-20 19:18:31 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-10-21 16:48:51 +0200
commit4219853f7344987cc8ebdf20860038222a1883dc (patch)
treed9049a286c44bf200ae6e77ff31a6deacb218c6a /drawinglayer
parent496f13538220da6f9040e3f372ee1291afd19a91 (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 'drawinglayer')
-rw-r--r--drawinglayer/source/attribute/sdrlightingattribute3d.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/drawinglayer/source/attribute/sdrlightingattribute3d.cxx b/drawinglayer/source/attribute/sdrlightingattribute3d.cxx
index 8ead71e47b6e..07b53405bf46 100644
--- a/drawinglayer/source/attribute/sdrlightingattribute3d.cxx
+++ b/drawinglayer/source/attribute/sdrlightingattribute3d.cxx
@@ -121,8 +121,10 @@ namespace drawinglayer
// take care of global ambient light
aRetval += mpSdrLightingAttribute->getAmbientLight() * rColor;
+ const std::vector<Sdr3DLightAttribute>& rLightVector = mpSdrLightingAttribute->getLightVector();
+
// prepare light access. Is there a light?
- const sal_uInt32 nLightCount(mpSdrLightingAttribute->getLightVector().size());
+ const sal_uInt32 nLightCount(rLightVector.size());
if(nLightCount && !rNormalInEyeCoordinates.equalZero())
{
@@ -132,7 +134,7 @@ namespace drawinglayer
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));
if(basegfx::fTools::more(fCosFac, 0.0))