diff options
author | Noel Grandin <noel@peralex.com> | 2015-11-06 09:23:33 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-11-09 08:34:40 +0000 |
commit | 6c80a8fe89fadf9a2c7260a09c037a09462f53d1 (patch) | |
tree | d36da9ee2a5fdc579d2a57ff6ba02deaddfa785a /chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx | |
parent | e1fc599eb764186e5d511ace9785463eebbc7028 (diff) |
new loplugin: oncevar
Change-Id: If57390510dde4d166be3141b9f658a7453755d3f
Reviewed-on: https://gerrit.libreoffice.org/19815
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx')
-rw-r--r-- | chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx index a4796a815175..80255fb15264 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx @@ -133,16 +133,13 @@ namespace ::chart::LightSource aResult; if( 0 <= nIndex && nIndex < 8 ) { - OUString aColorPropertyPrefix("D3DSceneLightColor"); - OUString aDirectionPropertyPrefix("D3DSceneLightDirection"); - OUString aEnabledPropertyPrefix("D3DSceneLightOn"); OUString aIndex( OUString::number( nIndex + 1 )); try { - xSceneProperties->getPropertyValue( aColorPropertyPrefix + aIndex ) >>= aResult.nDiffuseColor; - xSceneProperties->getPropertyValue( aDirectionPropertyPrefix + aIndex ) >>= aResult.aDirection; - xSceneProperties->getPropertyValue( aEnabledPropertyPrefix + aIndex ) >>= aResult.bIsEnabled; + xSceneProperties->getPropertyValue( "D3DSceneLightColor" + aIndex ) >>= aResult.nDiffuseColor; + xSceneProperties->getPropertyValue( "D3DSceneLightDirection" + aIndex ) >>= aResult.aDirection; + xSceneProperties->getPropertyValue( "D3DSceneLightOn" + aIndex ) >>= aResult.bIsEnabled; } catch( const uno::Exception & ex ) { @@ -161,18 +158,15 @@ namespace { if( 0 <= nIndex && nIndex < 8 ) { - OUString aColorPropertyPrefix("D3DSceneLightColor"); - OUString aDirectionPropertyPrefix("D3DSceneLightDirection"); - OUString aEnabledPropertyPrefix("D3DSceneLightOn"); OUString aIndex( OUString::number( nIndex + 1 )); try { - xSceneProperties->setPropertyValue( aColorPropertyPrefix + aIndex, + xSceneProperties->setPropertyValue( "D3DSceneLightColor" + aIndex, uno::makeAny( rLightSource.nDiffuseColor )); - xSceneProperties->setPropertyValue( aDirectionPropertyPrefix + aIndex, + xSceneProperties->setPropertyValue( "D3DSceneLightDirection" + aIndex, uno::makeAny( rLightSource.aDirection )); - xSceneProperties->setPropertyValue( aEnabledPropertyPrefix + aIndex, + xSceneProperties->setPropertyValue( "D3DSceneLightOn" + aIndex, uno::makeAny( rLightSource.bIsEnabled )); } catch( const uno::Exception & ex ) |