summaryrefslogtreecommitdiff
path: root/svx/source/customshapes/EnhancedCustomShape3d.cxx
diff options
context:
space:
mode:
authorChr. Rossmanith <ChrRossmanith@gmx.de>2013-01-24 21:49:28 +0100
committerChr. Rossmanith <ChrRossmanith@gmx.de>2013-01-24 22:26:40 +0100
commite2e99d0b11319333ece9827187ef4098fad47f3e (patch)
tree90afdb7d1ca571d4adc72096a8aec4fed3ea15d7 /svx/source/customshapes/EnhancedCustomShape3d.cxx
parent088af31770f6f5b6106988d544d57800c0946911 (diff)
Remove RTL_CONSTASCII_USTRINGPARAM in svx
replace equals() with == Change-Id: Ic1aed52398beb2132d8c6824335b865ceb4255b3
Diffstat (limited to 'svx/source/customshapes/EnhancedCustomShape3d.cxx')
-rw-r--r--svx/source/customshapes/EnhancedCustomShape3d.cxx42
1 files changed, 21 insertions, 21 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx b/svx/source/customshapes/EnhancedCustomShape3d.cxx
index 664d1d96ac6f..aaff743b5220 100644
--- a/svx/source/customshapes/EnhancedCustomShape3d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx
@@ -60,7 +60,7 @@ const char aExtrusion[] = "Extrusion";
void GetOrigin( SdrCustomShapeGeometryItem& rItem, double& rOriginX, double& rOriginY )
{
::com::sun::star::drawing::EnhancedCustomShapeParameterPair aOriginParaPair;
- const rtl::OUString sOrigin( RTL_CONSTASCII_USTRINGPARAM ( "Origin" ) );
+ const rtl::OUString sOrigin( "Origin" );
Any* pAny = rItem.GetPropertyValueByName( rtl::OUString(aExtrusion), sOrigin );
if ( ! ( pAny && ( *pAny >>= aOriginParaPair ) && ( aOriginParaPair.First.Value >>= rOriginX ) && ( aOriginParaPair.Second.Value >>= rOriginY ) ) )
{
@@ -72,7 +72,7 @@ void GetOrigin( SdrCustomShapeGeometryItem& rItem, double& rOriginX, double& rOr
void GetRotateAngle( SdrCustomShapeGeometryItem& rItem, double& rAngleX, double& rAngleY )
{
::com::sun::star::drawing::EnhancedCustomShapeParameterPair aRotateAngleParaPair;
- const rtl::OUString sRotateAngle( RTL_CONSTASCII_USTRINGPARAM ( "RotateAngle" ) );
+ const rtl::OUString sRotateAngle( "RotateAngle" );
Any* pAny = rItem.GetPropertyValueByName( rtl::OUString(aExtrusion), sRotateAngle );
if ( ! ( pAny && ( *pAny >>= aRotateAngleParaPair ) && ( aRotateAngleParaPair.First.Value >>= rAngleX ) && ( aRotateAngleParaPair.Second.Value >>= rAngleY ) ) )
{
@@ -86,7 +86,7 @@ void GetRotateAngle( SdrCustomShapeGeometryItem& rItem, double& rAngleX, double&
void GetSkew( SdrCustomShapeGeometryItem& rItem, double& rSkewAmount, double& rSkewAngle )
{
::com::sun::star::drawing::EnhancedCustomShapeParameterPair aSkewParaPair;
- const rtl::OUString sSkew( RTL_CONSTASCII_USTRINGPARAM ( "Skew" ) );
+ const rtl::OUString sSkew( "Skew" );
Any* pAny = rItem.GetPropertyValueByName( rtl::OUString(aExtrusion), sSkew );
if ( ! ( pAny && ( *pAny >>= aSkewParaPair ) && ( aSkewParaPair.First.Value >>= rSkewAmount ) && ( aSkewParaPair.Second.Value >>= rSkewAngle ) ) )
{
@@ -100,7 +100,7 @@ void GetExtrusionDepth( SdrCustomShapeGeometryItem& rItem, const double* pMap, d
{
::com::sun::star::drawing::EnhancedCustomShapeParameterPair aDepthParaPair;
double fDepth = 0, fFraction = 0;
- const rtl::OUString sDepth( RTL_CONSTASCII_USTRINGPARAM ( "Depth" ) );
+ const rtl::OUString sDepth( "Depth" );
Any* pAny = rItem.GetPropertyValueByName( rtl::OUString(aExtrusion), sDepth );
if ( pAny && ( *pAny >>= aDepthParaPair ) && ( aDepthParaPair.First.Value >>= fDepth ) && ( aDepthParaPair.Second.Value >>= fFraction ) )
{
@@ -134,7 +134,7 @@ double GetDouble( SdrCustomShapeGeometryItem& rItem, const rtl::OUString& rPrope
drawing::ShadeMode GetShadeMode( SdrCustomShapeGeometryItem& rItem, const drawing::ShadeMode eDefault )
{
drawing::ShadeMode eRet( eDefault );
- const rtl::OUString sShadeMode( RTL_CONSTASCII_USTRINGPARAM ( "ShadeMode" ) );
+ const rtl::OUString sShadeMode( "ShadeMode" );
Any* pAny = rItem.GetPropertyValueByName( rtl::OUString(aExtrusion), sShadeMode );
if ( pAny )
*pAny >>= eRet;
@@ -199,7 +199,7 @@ EnhancedCustomShape3d::Transformation2D::Transformation2D( const SdrObject* pCus
, pMap( pM )
{
SdrCustomShapeGeometryItem& rGeometryItem = (SdrCustomShapeGeometryItem&)pCustomShape->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY );
- const rtl::OUString sProjectionMode( RTL_CONSTASCII_USTRINGPARAM ( "ProjectionMode" ) );
+ const rtl::OUString sProjectionMode( "ProjectionMode" );
Any* pAny = rGeometryItem.GetPropertyValueByName( rtl::OUString(aExtrusion), sProjectionMode );
if ( pAny )
*pAny >>= eProjectionMode;
@@ -213,7 +213,7 @@ EnhancedCustomShape3d::Transformation2D::Transformation2D( const SdrObject* pCus
fOriginX = fOriginX * pCustomShape->GetLogicRect().GetWidth();
fOriginY = fOriginY * pCustomShape->GetLogicRect().GetHeight();
- const rtl::OUString sViewPoint( RTL_CONSTASCII_USTRINGPARAM ( "ViewPoint" ) );
+ const rtl::OUString sViewPoint( "ViewPoint" );
drawing::Position3D aViewPointDefault( 3472, -3472, 25000 );
drawing::Position3D aViewPoint( GetPosition3D( rGeometryItem, sViewPoint, aViewPointDefault, pMap ) );
fViewPoint.setX(aViewPoint.PositionX);
@@ -330,7 +330,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
fDepth = 1.0;
drawing::ProjectionMode eProjectionMode( drawing::ProjectionMode_PARALLEL );
- const rtl::OUString sProjectionMode( RTL_CONSTASCII_USTRINGPARAM ( "ProjectionMode" ) );
+ const rtl::OUString sProjectionMode( "ProjectionMode" );
Any* pAny = rGeometryItem.GetPropertyValueByName( aExtrusion, sProjectionMode );
if ( pAny )
*pAny >>= eProjectionMode;
@@ -346,7 +346,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
sal_Bool bUseTwoFillStyles( sal_False );
drawing::ShadeMode eShadeMode( GetShadeMode( rGeometryItem, drawing::ShadeMode_FLAT ) );
- const rtl::OUString aExtrusionColor( RTL_CONSTASCII_USTRINGPARAM ( "Color" ) );
+ const rtl::OUString aExtrusionColor( "Color" );
sal_Bool bUseExtrusionColor = GetBool( rGeometryItem, aExtrusionColor, sal_False );
XFillStyle eFillStyle( ITEMVALUE( aSet, XATTR_FILLSTYLE, XFillStyleItem ) );
@@ -560,7 +560,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
{
aNewTransform.translate( -fOriginX, fOriginY, 0.0 );
// now set correct camera position
- const rtl::OUString sViewPoint( RTL_CONSTASCII_USTRINGPARAM ( "ViewPoint" ) );
+ const rtl::OUString sViewPoint( "ViewPoint" );
drawing::Position3D aViewPointDefault( 3472, -3472, 25000 );
drawing::Position3D aViewPoint( GetPosition3D( rGeometryItem, sViewPoint, aViewPointDefault, pMap ) );
double fViewPointX = aViewPoint.PositionX;
@@ -578,33 +578,33 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
// light //
///////////
- const rtl::OUString sBrightness( RTL_CONSTASCII_USTRINGPARAM ( "Brightness" ) );
+ const rtl::OUString sBrightness( "Brightness" );
double fAmbientIntensity = GetDouble( rGeometryItem, sBrightness, 22178.0 / 655.36, NULL ) / 100.0;
- const rtl::OUString sFirstLightDirection( RTL_CONSTASCII_USTRINGPARAM ( "FirstLightDirection" ) );
+ const rtl::OUString sFirstLightDirection( "FirstLightDirection" );
drawing::Direction3D aFirstLightDirectionDefault( 50000, 0, 10000 );
drawing::Direction3D aFirstLightDirection( GetDirection3D( rGeometryItem, sFirstLightDirection, aFirstLightDirectionDefault ) );
if ( aFirstLightDirection.DirectionZ == 0.0 )
aFirstLightDirection.DirectionZ = 1.0;
- const rtl::OUString sFirstLightLevel( RTL_CONSTASCII_USTRINGPARAM ( "FirstLightLevel" ) );
+ const rtl::OUString sFirstLightLevel( "FirstLightLevel" );
double fLightIntensity = GetDouble( rGeometryItem, sFirstLightLevel, 43712.0 / 655.36, NULL ) / 100.0;
- const rtl::OUString sFirstLightHarsh( RTL_CONSTASCII_USTRINGPARAM ( "FirstLightHarsh" ) );
+ const rtl::OUString sFirstLightHarsh( "FirstLightHarsh" );
/* sal_Bool bFirstLightHarsh = */ GetBool( rGeometryItem, sFirstLightHarsh, sal_False );
- const rtl::OUString sSecondLightDirection( RTL_CONSTASCII_USTRINGPARAM ( "SecondLightDirection" ) );
+ const rtl::OUString sSecondLightDirection( "SecondLightDirection" );
drawing::Direction3D aSecondLightDirectionDefault( -50000, 0, 10000 );
drawing::Direction3D aSecondLightDirection( GetDirection3D( rGeometryItem, sSecondLightDirection, aSecondLightDirectionDefault ) );
if ( aSecondLightDirection.DirectionZ == 0.0 )
aSecondLightDirection.DirectionZ = -1;
- const rtl::OUString sSecondLightLevel( RTL_CONSTASCII_USTRINGPARAM ( "SecondLightLevel" ) );
+ const rtl::OUString sSecondLightLevel( "SecondLightLevel" );
double fLight2Intensity = GetDouble( rGeometryItem, sSecondLightLevel, 43712.0 / 655.36, NULL ) / 100.0;
- const rtl::OUString sSecondLightHarsh( RTL_CONSTASCII_USTRINGPARAM ( "SecondLightHarsh" ) );
- const rtl::OUString sLightFace( RTL_CONSTASCII_USTRINGPARAM ( "LightFace" ) );
+ const rtl::OUString sSecondLightHarsh( "SecondLightHarsh" );
+ const rtl::OUString sLightFace( "LightFace" );
/* sal_Bool bLight2Harsh = */ GetBool( rGeometryItem, sSecondLightHarsh, sal_False );
/* sal_Bool bLightFace = */ GetBool( rGeometryItem, sLightFace, sal_False );
@@ -637,8 +637,8 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
pScene->GetProperties().SetObjectItem( Svx3DLightcolor3Item( aAmbientSpot3Color ) );
pScene->GetProperties().SetObjectItem( Svx3DLightDirection3Item( aSpotLight3 ) );
- const rtl::OUString sSpecularity( RTL_CONSTASCII_USTRINGPARAM ( "Specularity" ) );
- const rtl::OUString sMetal( RTL_CONSTASCII_USTRINGPARAM ( "Metal" ) );
+ const rtl::OUString sSpecularity( "Specularity" );
+ const rtl::OUString sMetal( "Metal" );
double fSpecular = GetDouble( rGeometryItem, sSpecularity, 0, NULL ) / 100;
sal_Bool bMetal = GetBool( rGeometryItem, sMetal, sal_False );
@@ -695,7 +695,7 @@ Rectangle EnhancedCustomShape3d::CalculateNewSnapRect( const SdrObject* pCustomS
aBoundVolume.append(basegfx::B3DPoint(aPolygon[ (sal_uInt16)i ].X() - aCenter.X(), aPolygon[ (sal_uInt16)i ].Y() - aCenter.Y(), fExtrusionBackward));
}
- const rtl::OUString sRotationCenter( RTL_CONSTASCII_USTRINGPARAM ( "RotationCenter" ) );
+ const rtl::OUString sRotationCenter( "RotationCenter" );
drawing::Direction3D aRotationCenterDefault( 0, 0, 0 ); // default seems to be wrong, a fractional size of shape has to be used!!
drawing::Direction3D aRotationCenter( GetDirection3D( rGeometryItem, sRotationCenter, aRotationCenterDefault ) );