diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-10-30 11:24:41 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-10-30 11:58:48 +0100 |
commit | 6f45913394a931f2053c7b1cba52bdfd79a3093b (patch) | |
tree | ee20b3107f4d6dcee01bc8226b5491093d0a9f39 /svx/source/customshapes | |
parent | c7660cc543903c26c30d22e70e42deab9573c94d (diff) |
loplugin:constantparam in svx
Change-Id: Ifaad1083b1561b2bd908e798e06fbff8bbabbe60
Reviewed-on: https://gerrit.libreoffice.org/44048
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/customshapes')
-rw-r--r-- | svx/source/customshapes/EnhancedCustomShape3d.cxx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx b/svx/source/customshapes/EnhancedCustomShape3d.cxx index 09ca5d7d46c7..6d65bcc0ff63 100644 --- a/svx/source/customshapes/EnhancedCustomShape3d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx @@ -122,14 +122,12 @@ void GetExtrusionDepth( const SdrCustomShapeGeometryItem& rItem, const double* p } } -double GetDouble( const SdrCustomShapeGeometryItem& rItem, const OUString& rPropertyName, double fDefault, const double* pMap ) +double GetDouble( const SdrCustomShapeGeometryItem& rItem, const OUString& rPropertyName, double fDefault ) { double fRetValue = fDefault; const Any* pAny = rItem.GetPropertyValueByName( "Extrusion", rPropertyName ); if ( pAny ) *pAny >>= fRetValue; - if ( pMap ) - fRetValue *= *pMap; return fRetValue; } @@ -652,14 +650,14 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con // light - double fAmbientIntensity = GetDouble( rGeometryItem, "Brightness", 22178.0 / 655.36, nullptr ) / 100.0; + double fAmbientIntensity = GetDouble( rGeometryItem, "Brightness", 22178.0 / 655.36 ) / 100.0; drawing::Direction3D aFirstLightDirectionDefault( 50000, 0, 10000 ); drawing::Direction3D aFirstLightDirection( GetDirection3D( rGeometryItem, "FirstLightDirection", aFirstLightDirectionDefault ) ); if ( aFirstLightDirection.DirectionZ == 0.0 ) aFirstLightDirection.DirectionZ = 1.0; - double fLightIntensity = GetDouble( rGeometryItem, "FirstLightLevel", 43712.0 / 655.36, nullptr ) / 100.0; + double fLightIntensity = GetDouble( rGeometryItem, "FirstLightLevel", 43712.0 / 655.36 ) / 100.0; /* sal_Bool bFirstLightHarsh = */ GetBool( rGeometryItem, "FirstLightHarsh", false ); @@ -668,7 +666,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con if ( aSecondLightDirection.DirectionZ == 0.0 ) aSecondLightDirection.DirectionZ = -1; - double fLight2Intensity = GetDouble( rGeometryItem, "SecondLightLevel", 43712.0 / 655.36, nullptr ) / 100.0; + double fLight2Intensity = GetDouble( rGeometryItem, "SecondLightLevel", 43712.0 / 655.36 ) / 100.0; /* sal_Bool bLight2Harsh = */ GetBool( rGeometryItem, "SecondLightHarsh", false ); /* sal_Bool bLightFace = */ GetBool( rGeometryItem, "LightFace", false ); @@ -702,7 +700,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con pScene->GetProperties().SetObjectItem( makeSvx3DLightcolor3Item( aAmbientSpot3Color ) ); pScene->GetProperties().SetObjectItem( makeSvx3DLightDirection3Item( aSpotLight3 ) ); - double fSpecular = GetDouble( rGeometryItem, "Specularity", 0, nullptr ) / 100; + double fSpecular = GetDouble( rGeometryItem, "Specularity", 0 ) / 100; bool bMetal = GetBool( rGeometryItem, "Metal", false ); Color aSpecularCol( 225,225,225 ); |