diff options
Diffstat (limited to 'chart2/source/tools/ThreeDHelper.cxx')
-rw-r--r-- | chart2/source/tools/ThreeDHelper.cxx | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/chart2/source/tools/ThreeDHelper.cxx b/chart2/source/tools/ThreeDHelper.cxx index b1c086599926..fd45dc44e257 100644 --- a/chart2/source/tools/ThreeDHelper.cxx +++ b/chart2/source/tools/ThreeDHelper.cxx @@ -69,23 +69,23 @@ void lcl_RotateLightSource( const Reference< beans::XPropertySet >& xSceneProper , const OUString& rLightSourceOn , const ::basegfx::B3DHomMatrix& rRotationMatrix ) { - if( xSceneProperties.is() ) + if( !xSceneProperties.is() ) + return; + + bool bLightOn = false; + if( !(xSceneProperties->getPropertyValue( rLightSourceOn ) >>= bLightOn) ) + return; + + if( bLightOn ) { - bool bLightOn = false; - if( xSceneProperties->getPropertyValue( rLightSourceOn ) >>= bLightOn ) + drawing::Direction3D aLight; + if( xSceneProperties->getPropertyValue( rLightSourceDirection ) >>= aLight ) { - if( bLightOn ) - { - drawing::Direction3D aLight; - if( xSceneProperties->getPropertyValue( rLightSourceDirection ) >>= aLight ) - { - ::basegfx::B3DVector aLightVector( BaseGFXHelper::Direction3DToB3DVector( aLight ) ); - aLightVector = rRotationMatrix*aLightVector; + ::basegfx::B3DVector aLightVector( BaseGFXHelper::Direction3DToB3DVector( aLight ) ); + aLightVector = rRotationMatrix*aLightVector; - xSceneProperties->setPropertyValue( rLightSourceDirection - , uno::Any( BaseGFXHelper::B3DVectorToDirection3D( aLightVector ) ) ); - } - } + xSceneProperties->setPropertyValue( rLightSourceDirection + , uno::Any( BaseGFXHelper::B3DVectorToDirection3D( aLightVector ) ) ); } } } |