summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-06-03 14:42:07 +0200
committerStephan Bergmann <sbergman@redhat.com>2020-06-04 07:37:06 +0200
commit935928002ba87f89400c10124d50ca046cdba0b4 (patch)
tree1951938c8d0dae285393a607a6fe7bf2371d90f3 /filter
parent6096d67aa67b0eb3da5e9ad9ae1eaa04baa5102c (diff)
Upcoming loplugin:elidestringvar: filter
Change-Id: Ic88f3ca8dffa416966734370ef01f8814eacdd05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95433 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/msfilter/escherex.cxx161
-rw-r--r--filter/source/msfilter/msdffimp.cxx199
-rw-r--r--filter/source/svg/svgfontexport.cxx4
3 files changed, 120 insertions, 244 deletions
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index 443d533ecadb..d851e9f6723d 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -464,9 +464,8 @@ void EscherPropertyContainer::CreateGradientProperties(
pGradient = o3tl::doAccess<awt::Gradient>(aAny);
uno::Any aAnyTemp;
- const OUString aPropName( "FillStyle" );
if ( EscherPropertyValueHelper::GetPropertyValue(
- aAnyTemp, rXPropSet, aPropName ) )
+ aAnyTemp, rXPropSet, "FillStyle" ) )
{
drawing::FillStyle eFS;
if ( ! ( aAnyTemp >>= eFS ) )
@@ -2589,8 +2588,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
}
SdrObjCustomShape& rSdrObjCustomShape(static_cast< SdrObjCustomShape& >(*GetSdrObjectFromXShape(rXShape)));
- const OUString sCustomShapeGeometry( "CustomShapeGeometry" );
- uno::Any aGeoPropSet = aXPropSet->getPropertyValue( sCustomShapeGeometry );
+ uno::Any aGeoPropSet = aXPropSet->getPropertyValue( "CustomShapeGeometry" );
uno::Sequence< beans::PropertyValue > aGeoPropSeq;
if ( !(aGeoPropSet >>= aGeoPropSeq) )
return;
@@ -2677,28 +2675,6 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
for ( r = 0; r < nrCount; r++ )
{
const beans::PropertyValue& rrProp = aExtrusionPropSeq[ r ];
- const OUString sExtrusionBrightness ( "Brightness" );
- const OUString sExtrusionDepth ( "Depth" );
- const OUString sExtrusionDiffusion ( "Diffusion" );
- const OUString sExtrusionNumberOfLineSegments ( "NumberOfLineSegments" );
- const OUString sExtrusionLightFace ( "LightFace" );
- const OUString sExtrusionFirstLightHarsh ( "FirstLightHarsh" );
- const OUString sExtrusionSecondLightHarsh ( "SecondLightHarsh" );
- const OUString sExtrusionFirstLightLevel ( "FirstLightLevel" );
- const OUString sExtrusionSecondLightLevel ( "SecondLightLevel" );
- const OUString sExtrusionFirstLightDirection ( "FirstLightDirection" );
- const OUString sExtrusionSecondLightDirection ( "SecondLightDirection" );
- const OUString sExtrusionMetal ( "Metal" );
- const OUString sExtrusionShadeMode ( "ShadeMode" );
- const OUString sExtrusionRotateAngle ( "RotateAngle" );
- const OUString sExtrusionRotationCenter ( "RotationCenter" );
- const OUString sExtrusionShininess ( "Shininess" );
- const OUString sExtrusionSkew ( "Skew" );
- const OUString sExtrusionSpecularity ( "Specularity" );
- const OUString sExtrusionProjectionMode ( "ProjectionMode" );
- const OUString sExtrusionViewPoint ( "ViewPoint" );
- const OUString sExtrusionOrigin ( "Origin" );
- const OUString sExtrusionColor ( "Color" );
if ( rrProp.Name == sExtrusion )
{
@@ -2712,13 +2688,13 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
nLightFaceFlags &=~8;
}
}
- else if ( rrProp.Name == sExtrusionBrightness )
+ else if ( rrProp.Name == "Brightness" )
{
double fExtrusionBrightness = 0;
if ( rrProp.Value >>= fExtrusionBrightness )
AddOpt( DFF_Prop_c3DAmbientIntensity, static_cast<sal_Int32>( fExtrusionBrightness * 655.36 ) );
}
- else if ( rrProp.Name == sExtrusionDepth )
+ else if ( rrProp.Name == "Depth" )
{
double fDepth = 0;
double fFraction = 0;
@@ -2738,19 +2714,19 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
}
}
}
- else if ( rrProp.Name == sExtrusionDiffusion )
+ else if ( rrProp.Name == "Diffusion" )
{
double fExtrusionDiffusion = 0;
if ( rrProp.Value >>= fExtrusionDiffusion )
AddOpt( DFF_Prop_c3DDiffuseAmt, static_cast<sal_Int32>( fExtrusionDiffusion * 655.36 ) );
}
- else if ( rrProp.Name == sExtrusionNumberOfLineSegments )
+ else if ( rrProp.Name == "NumberOfLineSegments" )
{
sal_Int32 nExtrusionNumberOfLineSegments = 0;
if ( rrProp.Value >>= nExtrusionNumberOfLineSegments )
AddOpt( DFF_Prop_c3DTolerance, nExtrusionNumberOfLineSegments );
}
- else if ( rrProp.Name == sExtrusionLightFace )
+ else if ( rrProp.Name == "LightFace" )
{
bool bExtrusionLightFace;
if ( rrProp.Value >>= bExtrusionLightFace )
@@ -2762,7 +2738,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
nLightFaceFlags &=~1;
}
}
- else if ( rrProp.Name == sExtrusionFirstLightHarsh )
+ else if ( rrProp.Name == "FirstLightHarsh" )
{
bool bExtrusionFirstLightHarsh;
if ( rrProp.Value >>= bExtrusionFirstLightHarsh )
@@ -2774,7 +2750,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
nFillHarshFlags &=~2;
}
}
- else if ( rrProp.Name == sExtrusionSecondLightHarsh )
+ else if ( rrProp.Name == "SecondLightHarsh" )
{
bool bExtrusionSecondLightHarsh;
if ( rrProp.Value >>= bExtrusionSecondLightHarsh )
@@ -2786,19 +2762,19 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
nFillHarshFlags &=~1;
}
}
- else if ( rrProp.Name == sExtrusionFirstLightLevel )
+ else if ( rrProp.Name == "FirstLightLevel" )
{
double fExtrusionFirstLightLevel = 0;
if ( rrProp.Value >>= fExtrusionFirstLightLevel )
AddOpt( DFF_Prop_c3DKeyIntensity, static_cast<sal_Int32>( fExtrusionFirstLightLevel * 655.36 ) );
}
- else if ( rrProp.Name == sExtrusionSecondLightLevel )
+ else if ( rrProp.Name == "SecondLightLevel" )
{
double fExtrusionSecondLightLevel = 0;
if ( rrProp.Value >>= fExtrusionSecondLightLevel )
AddOpt( DFF_Prop_c3DFillIntensity, static_cast<sal_Int32>( fExtrusionSecondLightLevel * 655.36 ) );
}
- else if ( rrProp.Name == sExtrusionFirstLightDirection )
+ else if ( rrProp.Name == "FirstLightDirection" )
{
drawing::Direction3D aExtrusionFirstLightDirection;
if ( rrProp.Value >>= aExtrusionFirstLightDirection )
@@ -2808,7 +2784,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
AddOpt( DFF_Prop_c3DKeyZ, static_cast<sal_Int32>(aExtrusionFirstLightDirection.DirectionZ) );
}
}
- else if ( rrProp.Name == sExtrusionSecondLightDirection )
+ else if ( rrProp.Name == "SecondLightDirection" )
{
drawing::Direction3D aExtrusionSecondLightPosition;
if ( rrProp.Value >>= aExtrusionSecondLightPosition )
@@ -2818,7 +2794,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
AddOpt( DFF_Prop_c3DFillZ, static_cast<sal_Int32>(aExtrusionSecondLightPosition.DirectionZ) );
}
}
- else if ( rrProp.Name == sExtrusionMetal )
+ else if ( rrProp.Name == "Metal" )
{
bool bExtrusionMetal;
if ( rrProp.Value >>= bExtrusionMetal )
@@ -2830,7 +2806,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
nLightFaceFlags &=~4;
}
}
- else if ( rrProp.Name == sExtrusionShadeMode )
+ else if ( rrProp.Name == "ShadeMode" )
{
drawing::ShadeMode eExtrusionShadeMode;
if ( rrProp.Value >>= eExtrusionShadeMode )
@@ -2853,7 +2829,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
AddOpt( DFF_Prop_c3DRenderMode, nRenderMode );
}
}
- else if ( rrProp.Name == sExtrusionRotateAngle )
+ else if ( rrProp.Name == "RotateAngle" )
{
double fExtrusionAngleX = 0;
double fExtrusionAngleY = 0;
@@ -2866,7 +2842,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
AddOpt( DFF_Prop_c3DYRotationAngle, static_cast<sal_Int32>(fExtrusionAngleY) );
}
}
- else if ( rrProp.Name == sExtrusionRotationCenter )
+ else if ( rrProp.Name == "RotationCenter" )
{
drawing::Direction3D aExtrusionRotationCenter;
if ( rrProp.Value >>= aExtrusionRotationCenter )
@@ -2877,13 +2853,13 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
nFillHarshFlags &=~8; // don't use AutoRotationCenter;
}
}
- else if ( rrProp.Name == sExtrusionShininess )
+ else if ( rrProp.Name == "Shininess" )
{
double fExtrusionShininess = 0;
if ( rrProp.Value >>= fExtrusionShininess )
AddOpt( DFF_Prop_c3DShininess, static_cast<sal_Int32>( fExtrusionShininess * 655.36 ) );
}
- else if ( rrProp.Name == sExtrusionSkew )
+ else if ( rrProp.Name == "Skew" )
{
double fSkewAmount = 0;
double fSkewAngle = 0;
@@ -2894,13 +2870,13 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
AddOpt( DFF_Prop_c3DSkewAngle, static_cast<sal_Int32>( fSkewAngle * 65536 ) );
}
}
- else if ( rrProp.Name == sExtrusionSpecularity )
+ else if ( rrProp.Name == "Specularity" )
{
double fExtrusionSpecularity = 0;
if ( rrProp.Value >>= fExtrusionSpecularity )
AddOpt( DFF_Prop_c3DSpecularAmt, static_cast<sal_Int32>( fExtrusionSpecularity * 1333 ) );
}
- else if ( rrProp.Name == sExtrusionProjectionMode )
+ else if ( rrProp.Name == "ProjectionMode" )
{
drawing::ProjectionMode eExtrusionProjectionMode;
if ( rrProp.Value >>= eExtrusionProjectionMode )
@@ -2912,7 +2888,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
nFillHarshFlags &=~4;
}
}
- else if ( rrProp.Name == sExtrusionViewPoint )
+ else if ( rrProp.Name == "ViewPoint" )
{
drawing::Position3D aExtrusionViewPoint;
if ( rrProp.Value >>= aExtrusionViewPoint )
@@ -2925,7 +2901,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
AddOpt( DFF_Prop_c3DZViewpoint, static_cast<sal_Int32>(aExtrusionViewPoint.PositionZ) );
}
}
- else if ( rrProp.Name == sExtrusionOrigin )
+ else if ( rrProp.Name == "Origin" )
{
double fExtrusionOriginX = 0;
double fExtrusionOriginY = 0;
@@ -2936,7 +2912,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
AddOpt( DFF_Prop_c3DOriginY, static_cast<sal_Int32>( fExtrusionOriginY * 65536 ) );
}
}
- else if ( rrProp.Name == sExtrusionColor )
+ else if ( rrProp.Name == "Color" )
{
bool bExtrusionColor;
if ( rrProp.Value >>= bExtrusionColor )
@@ -3016,18 +2992,8 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
for ( r = 0; r < nrCount; r++ )
{
const beans::PropertyValue& rrProp = aPathPropSeq[ r ];
- const OUString sPathExtrusionAllowed ( "ExtrusionAllowed" );
- const OUString sPathConcentricGradientFillAllowed ( "ConcentricGradientFillAllowed" );
- const OUString sPathTextPathAllowed ( "TextPathAllowed" );
- const OUString sPathCoordinates ( "Coordinates" );
- const OUString sPathGluePoints ( "GluePoints" );
- const OUString sPathGluePointType ( "GluePointType" );
- const OUString sPathSegments ( "Segments" );
- const OUString sPathStretchX ( "StretchX" );
- const OUString sPathStretchY ( "StretchY" );
- const OUString sPathTextFrames ( "TextFrames" );
-
- if ( rrProp.Name == sPathExtrusionAllowed )
+
+ if ( rrProp.Name == "ExtrusionAllowed" )
{
bool bExtrusionAllowed;
if ( rrProp.Value >>= bExtrusionAllowed )
@@ -3039,7 +3005,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
nPathFlags &=~16;
}
}
- else if ( rrProp.Name == sPathConcentricGradientFillAllowed )
+ else if ( rrProp.Name == "ConcentricGradientFillAllowed" )
{
bool bConcentricGradientFillAllowed;
if ( rrProp.Value >>= bConcentricGradientFillAllowed )
@@ -3051,7 +3017,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
nPathFlags &=~2;
}
}
- else if ( rrProp.Name == sPathTextPathAllowed )
+ else if ( rrProp.Name == "TextPathAllowed" )
{
bool bTextPathAllowed;
if ( rrProp.Value >>= bTextPathAllowed )
@@ -3063,7 +3029,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
nPathFlags &=~4;
}
}
- else if ( rrProp.Name == sPathCoordinates )
+ else if ( rrProp.Name == "Coordinates" )
{
if ( !bIsDefaultObject )
{
@@ -3071,7 +3037,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
bPathCoordinatesProp = true;
}
}
- else if ( rrProp.Name == sPathGluePoints )
+ else if ( rrProp.Name == "GluePoints" )
{
if ( !bIsDefaultObject )
{
@@ -3105,13 +3071,13 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
}
}
}
- else if ( rrProp.Name == sPathGluePointType )
+ else if ( rrProp.Name == "GluePointType" )
{
sal_Int16 nGluePointType = sal_Int16();
if ( rrProp.Value >>= nGluePointType )
AddOpt( DFF_Prop_connectorType, static_cast<sal_uInt16>(nGluePointType) );
}
- else if ( rrProp.Name == sPathSegments )
+ else if ( rrProp.Name == "Segments" )
{
if ( !bIsDefaultObject )
{
@@ -3231,7 +3197,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
}
}
}
- else if ( rrProp.Name == sPathStretchX )
+ else if ( rrProp.Name == "StretchX" )
{
if ( !bIsDefaultObject )
{
@@ -3240,7 +3206,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
AddOpt( DFF_Prop_stretchPointX, nStretchX );
}
}
- else if ( rrProp.Name == sPathStretchY )
+ else if ( rrProp.Name == "StretchY" )
{
if ( !bIsDefaultObject )
{
@@ -3249,7 +3215,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
AddOpt( DFF_Prop_stretchPointY, nStretchY );
}
}
- else if ( rrProp.Name == sPathTextFrames )
+ else if ( rrProp.Name == "TextFrames" )
{
if ( !bIsDefaultObject )
{
@@ -3306,9 +3272,6 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
for ( r = 0; r < nrCount; r++ )
{
const beans::PropertyValue& rrProp = aTextPathPropSeq[ r ];
- const OUString sTextPathMode ( "TextPathMode" );
- const OUString sTextPathScaleX ( "ScaleX" );
- const OUString sSameLetterHeights ( "SameLetterHeights" );
if ( rrProp.Name == sTextPath )
{
@@ -3329,7 +3292,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
nTextPathFlags &=~0x4000;
}
}
- else if ( rrProp.Name == sTextPathMode )
+ else if ( rrProp.Name == "TextPathMode" )
{
drawing::EnhancedCustomShapeTextPathMode eTextPathMode;
if ( rrProp.Value >>= eTextPathMode )
@@ -3342,7 +3305,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
nTextPathFlags |= 0x500;
}
}
- else if ( rrProp.Name == sTextPathScaleX )
+ else if ( rrProp.Name == "ScaleX" )
{
bool bTextPathScaleX;
if ( rrProp.Value >>= bTextPathScaleX )
@@ -3354,7 +3317,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
nTextPathFlags &=~0x40;
}
}
- else if ( rrProp.Name == sSameLetterHeights )
+ else if ( rrProp.Name == "SameLetterHeights" )
{
bool bSameLetterHeights;
if ( rrProp.Value >>= bSameLetterHeights )
@@ -3380,8 +3343,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
// FontWork Font
OUString aFontName;
- const OUString sCharFontName( "CharFontName" );
- uno::Any aAny = aXPropSet->getPropertyValue( sCharFontName );
+ uno::Any aAny = aXPropSet->getPropertyValue( "CharFontName" );
aAny >>= aFontName;
if ( aFontName.isEmpty() )
aFontName = "Arial Black";
@@ -3530,19 +3492,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
const uno::Sequence< beans::PropertyValue >& rPropSeq = aHandlesPropSeq[ k ];
for ( const beans::PropertyValue& rPropVal: rPropSeq )
{
- const OUString sPosition ( "Position" );
- const OUString sMirroredX ( "MirroredX" );
- const OUString sMirroredY ( "MirroredY" );
- const OUString sSwitched ( "Switched" );
- const OUString sPolar ( "Polar" );
- const OUString sRadiusRangeMinimum ( "RadiusRangeMinimum" );
- const OUString sRadiusRangeMaximum ( "RadiusRangeMaximum" );
- const OUString sRangeXMinimum ( "RangeXMinimum" );
- const OUString sRangeXMaximum ( "RangeXMaximum" );
- const OUString sRangeYMinimum ( "RangeYMinimum" );
- const OUString sRangeYMaximum ( "RangeYMaximum" );
-
- if ( rPropVal.Name == sPosition )
+ if ( rPropVal.Name == "Position" )
{
drawing::EnhancedCustomShapeParameterPair aPosition;
if ( rPropVal.Value >>= aPosition )
@@ -3551,7 +3501,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
GetValueForEnhancedCustomShapeHandleParameter( nYPosition, aPosition.Second );
}
}
- else if ( rPropVal.Name == sMirroredX )
+ else if ( rPropVal.Name == "MirroredX" )
{
bool bMirroredX;
if ( rPropVal.Value >>= bMirroredX )
@@ -3560,7 +3510,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
nFlags |= 1;
}
}
- else if ( rPropVal.Name == sMirroredY )
+ else if ( rPropVal.Name == "MirroredY" )
{
bool bMirroredY;
if ( rPropVal.Value >>= bMirroredY )
@@ -3569,7 +3519,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
nFlags |= 2;
}
}
- else if ( rPropVal.Name == sSwitched )
+ else if ( rPropVal.Name == "Switched" )
{
bool bSwitched;
if ( rPropVal.Value >>= bSwitched )
@@ -3578,7 +3528,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
nFlags |= 4;
}
}
- else if ( rPropVal.Name == sPolar )
+ else if ( rPropVal.Name == "Polar" )
{
drawing::EnhancedCustomShapeParameterPair aPolar;
if ( rPropVal.Value >>= aPolar )
@@ -3590,7 +3540,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
nFlags |= 8;
}
}
- else if ( rPropVal.Name == sRadiusRangeMinimum )
+ else if ( rPropVal.Name == "RadiusRangeMinimum" )
{
nYRangeMin = sal_Int32(0xff4c0000); // the range of angles seems to be a not
nYRangeMax = sal_Int32(0x00b40000); // used feature, so we are defaulting this
@@ -3603,7 +3553,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
nFlags |= 0x2000;
}
}
- else if ( rPropVal.Name == sRadiusRangeMaximum )
+ else if ( rPropVal.Name == "RadiusRangeMaximum" )
{
nYRangeMin = sal_Int32(0xff4c0000); // the range of angles seems to be a not
nYRangeMax = sal_Int32(0x00b40000); // used feature, so we are defaulting this
@@ -3616,7 +3566,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
nFlags |= 0x2000;
}
}
- else if ( rPropVal.Name == sRangeXMinimum )
+ else if ( rPropVal.Name == "RangeXMinimum" )
{
drawing::EnhancedCustomShapeParameter aXRangeMinimum;
if ( rPropVal.Value >>= aXRangeMinimum )
@@ -3626,7 +3576,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
nFlags |= 0x20;
}
}
- else if ( rPropVal.Name == sRangeXMaximum )
+ else if ( rPropVal.Name == "RangeXMaximum" )
{
drawing::EnhancedCustomShapeParameter aXRangeMaximum;
if ( rPropVal.Value >>= aXRangeMaximum )
@@ -3636,7 +3586,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
nFlags |= 0x20;
}
}
- else if ( rPropVal.Name == sRangeYMinimum )
+ else if ( rPropVal.Name == "RangeYMinimum" )
{
drawing::EnhancedCustomShapeParameter aYRangeMinimum;
if ( rPropVal.Value >>= aYRangeMinimum )
@@ -3646,7 +3596,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
nFlags |= 0x20;
}
}
- else if ( rPropVal.Name == sRangeYMaximum )
+ else if ( rPropVal.Name == "RangeYMaximum" )
{
drawing::EnhancedCustomShapeParameter aYRangeMaximum;
if ( rPropVal.Value >>= aYRangeMaximum )
@@ -3744,8 +3694,7 @@ MSO_SPT EscherPropertyContainer::GetCustomShapeType( const uno::Reference< drawi
{
try
{
- const OUString sCustomShapeGeometry( "CustomShapeGeometry" );
- uno::Any aGeoPropSet = aXPropSet->getPropertyValue( sCustomShapeGeometry );
+ uno::Any aGeoPropSet = aXPropSet->getPropertyValue( "CustomShapeGeometry" );
uno::Sequence< beans::PropertyValue > aGeoPropSeq;
if ( aGeoPropSet >>= aGeoPropSeq )
{
@@ -4577,17 +4526,13 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( bool bFirst )
const SdrCustomShapeGeometryItem& rGeometryItem =
rSdrObjCustomShape.GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY );
- const OUString sPath( "Path" );
- const OUString sType( "Type" );
- const OUString sGluePointType( "GluePointType" );
-
OUString sShapeType;
- const uno::Any* pType = rGeometryItem.GetPropertyValueByName( sType );
+ const uno::Any* pType = rGeometryItem.GetPropertyValueByName( "Type" );
if ( pType )
*pType >>= sShapeType;
MSO_SPT eSpType = EnhancedCustomShapeTypeNames::Get( sShapeType );
- uno::Any* pGluePointType = const_cast<SdrCustomShapeGeometryItem&>(rGeometryItem).GetPropertyValueByName( sPath, sGluePointType );
+ uno::Any* pGluePointType = const_cast<SdrCustomShapeGeometryItem&>(rGeometryItem).GetPropertyValueByName( "Path", "GluePointType" );
sal_Int16 nGluePointType = sal_Int16();
if ( !( pGluePointType &&
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 3899b89a1dbd..e15ad6d209c8 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -602,16 +602,14 @@ void SvxMSDffManager::SolveSolver( const SvxMSDffSolverContainer& rSolver )
const SfxPoolItem& aCustomShape = static_cast<SdrObjCustomShape*>(pO)->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY );
SdrCustomShapeGeometryItem aGeometryItem( static_cast<const SdrCustomShapeGeometryItem&>(aCustomShape) );
const OUString sPath( "Path" );
- const OUString sGluePointType( "GluePointType" );
sal_Int16 nGluePointType = EnhancedCustomShapeGluePointType::SEGMENTS;
- css::uno::Any* pAny = aGeometryItem.GetPropertyValueByName( sPath, sGluePointType );
+ css::uno::Any* pAny = aGeometryItem.GetPropertyValueByName( sPath, "GluePointType" );
if ( pAny )
*pAny >>= nGluePointType;
else
{
- const OUString sType( "Type" );
OUString sShapeType;
- pAny = aGeometryItem.GetPropertyValueByName( sType );
+ pAny = aGeometryItem.GetPropertyValueByName( "Type" );
if ( pAny )
*pAny >>= sShapeType;
MSO_SPT eSpType = EnhancedCustomShapeTypeNames::Get( sShapeType );
@@ -657,12 +655,9 @@ void SvxMSDffManager::SolveSolver( const SvxMSDffSolverContainer& rSolver )
}
else if ( nGluePointType == EnhancedCustomShapeGluePointType::SEGMENTS )
{
- const OUString sSegments( "Segments" );
- const OUString sCoordinates( "Coordinates" );
-
sal_uInt32 nPt = nC;
css::uno::Sequence< css::drawing::EnhancedCustomShapeSegment > aSegments;
- pAny = aGeometryItem.GetPropertyValueByName( sPath, sSegments );
+ pAny = aGeometryItem.GetPropertyValueByName( sPath, "Segments" );
if ( pAny && (*pAny >>= aSegments) )
{
nPt = 0;
@@ -716,7 +711,7 @@ void SvxMSDffManager::SolveSolver( const SvxMSDffSolverContainer& rSolver )
}
}
}
- pAny = aGeometryItem.GetPropertyValueByName( sPath, sCoordinates );
+ pAny = aGeometryItem.GetPropertyValueByName( sPath, "Coordinates" );
if ( pAny )
{
css::uno::Sequence< css::drawing::EnhancedCustomShapeParameterPair > aCoordinates;
@@ -1601,8 +1596,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
// "Type" property, including the predefined CustomShape type name
- const OUString sType( "Type" );
- aProp.Name = sType;
+ aProp.Name = "Type";
aProp.Value <<= EnhancedCustomShapeTypeNames::Get( rObjData.eShapeType );
aPropVec.push_back( aProp );
@@ -1615,12 +1609,11 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
if ( IsProperty( DFF_Prop_geoLeft ) || IsProperty( DFF_Prop_geoTop ) || IsProperty( DFF_Prop_geoRight ) || IsProperty( DFF_Prop_geoBottom ) )
{
css::awt::Rectangle aViewBox;
- const OUString sViewBox( "ViewBox" );
aViewBox.X = GetPropertyValue( DFF_Prop_geoLeft, 0 );
aViewBox.Y = GetPropertyValue( DFF_Prop_geoTop, 0 );
aViewBox.Width = nCoordWidth = o3tl::saturating_sub<sal_Int32>(GetPropertyValue(DFF_Prop_geoRight, 21600), aViewBox.X);
aViewBox.Height = nCoordHeight = o3tl::saturating_sub<sal_Int32>(GetPropertyValue(DFF_Prop_geoBottom, 21600), aViewBox.Y);
- aProp.Name = sViewBox;
+ aProp.Name = "ViewBox";
aProp.Value <<= aViewBox;
aPropVec.push_back( aProp );
}
@@ -1654,8 +1647,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
if ( nTextRotateAngle )
{
double fTextRotateAngle = nTextRotateAngle;
- const OUString sTextRotateAngle( "TextRotateAngle" );
- aProp.Name = sTextRotateAngle;
+ aProp.Name = "TextRotateAngle";
aProp.Value <<= fTextRotateAngle;
aPropVec.push_back( aProp );
}
@@ -1669,25 +1661,22 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
PropVec aExtrusionPropVec;
// "Extrusion"
- const OUString sExtrusionOn( "Extrusion" );
- aProp.Name = sExtrusionOn;
+ aProp.Name = "Extrusion";
aProp.Value <<= bExtrusionOn;
aExtrusionPropVec.push_back( aProp );
// "Brightness"
if ( IsProperty( DFF_Prop_c3DAmbientIntensity ) )
{
- const OUString sExtrusionBrightness( "Brightness" );
double fBrightness = static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DAmbientIntensity, 0 ));
fBrightness /= 655.36;
- aProp.Name = sExtrusionBrightness;
+ aProp.Name = "Brightness";
aProp.Value <<= fBrightness;
aExtrusionPropVec.push_back( aProp );
}
// "Depth" in 1/100mm
if ( IsProperty( DFF_Prop_c3DExtrudeBackward ) || IsProperty( DFF_Prop_c3DExtrudeForward ) )
{
- const OUString sDepth( "Depth" );
double fBackDepth = static_cast<double>(static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DExtrudeBackward, 1270 * 360 ))) / 360.0;
double fForeDepth = static_cast<double>(static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DExtrudeForward, 0 ))) / 360.0;
double fDepth = fBackDepth + fForeDepth;
@@ -1697,63 +1686,56 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
aDepthParaPair.First.Type = EnhancedCustomShapeParameterType::NORMAL;
aDepthParaPair.Second.Value <<= fFraction;
aDepthParaPair.Second.Type = EnhancedCustomShapeParameterType::NORMAL;
- aProp.Name = sDepth;
+ aProp.Name = "Depth";
aProp.Value <<= aDepthParaPair;
aExtrusionPropVec.push_back( aProp );
}
// "Diffusion"
if ( IsProperty( DFF_Prop_c3DDiffuseAmt ) )
{
- const OUString sExtrusionDiffusion( "Diffusion" );
double fDiffusion = static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DDiffuseAmt, 0 ));
fDiffusion /= 655.36;
- aProp.Name = sExtrusionDiffusion;
+ aProp.Name = "Diffusion";
aProp.Value <<= fDiffusion;
aExtrusionPropVec.push_back( aProp );
}
// "NumberOfLineSegments"
if ( IsProperty( DFF_Prop_c3DTolerance ) )
{
- const OUString sExtrusionNumberOfLineSegments( "NumberOfLineSegments" );
- aProp.Name = sExtrusionNumberOfLineSegments;
+ aProp.Name = "NumberOfLineSegments";
aProp.Value <<= static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DTolerance, 0 ));
aExtrusionPropVec.push_back( aProp );
}
// "LightFace"
- const OUString sExtrusionLightFace( "LightFace" );
bool bExtrusionLightFace = ( GetPropertyValue( DFF_Prop_fc3DLightFace, 0 ) & 1 ) != 0;
- aProp.Name = sExtrusionLightFace;
+ aProp.Name = "LightFace";
aProp.Value <<= bExtrusionLightFace;
aExtrusionPropVec.push_back( aProp );
// "FirstLightHarsh"
- const OUString sExtrusionFirstLightHarsh( "FirstLightHarsh" );
bool bExtrusionFirstLightHarsh = ( GetPropertyValue( DFF_Prop_fc3DFillHarsh, 0 ) & 2 ) != 0;
- aProp.Name = sExtrusionFirstLightHarsh;
+ aProp.Name = "FirstLightHarsh";
aProp.Value <<= bExtrusionFirstLightHarsh;
aExtrusionPropVec.push_back( aProp );
// "SecondLightHarsh"
- const OUString sExtrusionSecondLightHarsh( "SecondLightHarsh" );
bool bExtrusionSecondLightHarsh = ( GetPropertyValue( DFF_Prop_fc3DFillHarsh, 0 ) & 1 ) != 0;
- aProp.Name = sExtrusionSecondLightHarsh;
+ aProp.Name = "SecondLightHarsh";
aProp.Value <<= bExtrusionSecondLightHarsh;
aExtrusionPropVec.push_back( aProp );
// "FirstLightLevel"
if ( IsProperty( DFF_Prop_c3DKeyIntensity ) )
{
- const OUString sExtrusionFirstLightLevel( "FirstLightLevel" );
double fFirstLightLevel = static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DKeyIntensity, 0 ));
fFirstLightLevel /= 655.36;
- aProp.Name = sExtrusionFirstLightLevel;
+ aProp.Name = "FirstLightLevel";
aProp.Value <<= fFirstLightLevel;
aExtrusionPropVec.push_back( aProp );
}
// "SecondLightLevel"
if ( IsProperty( DFF_Prop_c3DFillIntensity ) )
{
- const OUString sExtrusionSecondLightLevel( "SecondLightLevel" );
double fSecondLightLevel = static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DFillIntensity, 0 ));
fSecondLightLevel /= 655.36;
- aProp.Name = sExtrusionSecondLightLevel;
+ aProp.Name = "SecondLightLevel";
aProp.Value <<= fSecondLightLevel;
aExtrusionPropVec.push_back( aProp );
}
@@ -1764,8 +1746,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
double fLightY = static_cast<double>(static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DKeyY, 0 )));
double fLightZ = static_cast<double>(static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DKeyZ, 10000 )));
css::drawing::Direction3D aExtrusionFirstLightDirection( fLightX, fLightY, fLightZ );
- const OUString sExtrusionFirstLightDirection( "FirstLightDirection" );
- aProp.Name = sExtrusionFirstLightDirection;
+ aProp.Name = "FirstLightDirection";
aProp.Value <<= aExtrusionFirstLightDirection;
aExtrusionPropVec.push_back( aProp );
}
@@ -1776,35 +1757,31 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
double fLight2Y = static_cast<double>(static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DFillY, 0 )));
double fLight2Z = static_cast<double>(static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DFillZ, 10000 )));
css::drawing::Direction3D aExtrusionSecondLightDirection( fLight2X, fLight2Y, fLight2Z );
- const OUString sExtrusionSecondLightDirection( "SecondLightDirection" );
- aProp.Name = sExtrusionSecondLightDirection;
+ aProp.Name = "SecondLightDirection";
aProp.Value <<= aExtrusionSecondLightDirection;
aExtrusionPropVec.push_back( aProp );
}
// "Metal"
- const OUString sExtrusionMetal( "Metal" );
bool bExtrusionMetal = ( GetPropertyValue( DFF_Prop_fc3DLightFace, 0 ) & 4 ) != 0;
- aProp.Name = sExtrusionMetal;
+ aProp.Name = "Metal";
aProp.Value <<= bExtrusionMetal;
aExtrusionPropVec.push_back( aProp );
// "ShadeMode"
if ( IsProperty( DFF_Prop_c3DRenderMode ) )
{
- const OUString sExtrusionShadeMode( "ShadeMode" );
sal_uInt32 nExtrusionRenderMode = GetPropertyValue( DFF_Prop_c3DRenderMode, 0 );
css::drawing::ShadeMode eExtrusionShadeMode( css::drawing::ShadeMode_FLAT );
if ( nExtrusionRenderMode == mso_Wireframe )
eExtrusionShadeMode = css::drawing::ShadeMode_DRAFT;
- aProp.Name = sExtrusionShadeMode;
+ aProp.Name = "ShadeMode";
aProp.Value <<= eExtrusionShadeMode;
aExtrusionPropVec.push_back( aProp );
}
// "RotateAngle" in Grad
if ( IsProperty( DFF_Prop_c3DXRotationAngle ) || IsProperty( DFF_Prop_c3DYRotationAngle ) )
{
- const OUString sExtrusionAngle( "RotateAngle" );
double fAngleX = static_cast<double>(static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DXRotationAngle, 0 ))) / 65536.0;
double fAngleY = static_cast<double>(static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DYRotationAngle, 0 ))) / 65536.0;
EnhancedCustomShapeParameterPair aRotateAnglePair;
@@ -1812,7 +1789,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
aRotateAnglePair.First.Type = EnhancedCustomShapeParameterType::NORMAL;
aRotateAnglePair.Second.Value <<= fAngleY;
aRotateAnglePair.Second.Type = EnhancedCustomShapeParameterType::NORMAL;
- aProp.Name = sExtrusionAngle;
+ aProp.Name = "RotateAngle";
aProp.Value <<= aRotateAnglePair;
aExtrusionPropVec.push_back( aProp );
}
@@ -1828,8 +1805,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
static_cast<double>(static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DRotationCenterY, 0 ))) / 360.0,
static_cast<double>(static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DRotationCenterZ, 0 ))) / 360.0 );
- const OUString sExtrusionRotationCenter( "RotationCenter" );
- aProp.Name = sExtrusionRotationCenter;
+ aProp.Name = "RotationCenter";
aProp.Value <<= aRotationCenter;
aExtrusionPropVec.push_back( aProp );
}
@@ -1837,17 +1813,15 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
// "Shininess"
if ( IsProperty( DFF_Prop_c3DShininess ) )
{
- const OUString sExtrusionShininess( "Shininess" );
double fShininess = static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DShininess, 0 ));
fShininess /= 655.36;
- aProp.Name = sExtrusionShininess;
+ aProp.Name = "Shininess";
aProp.Value <<= fShininess;
aExtrusionPropVec.push_back( aProp );
}
// "Skew"
if ( IsProperty( DFF_Prop_c3DSkewAmount ) || IsProperty( DFF_Prop_c3DSkewAngle ) )
{
- const OUString sExtrusionSkew( "Skew" );
double fSkewAmount = static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DSkewAmount, 50 ));
double fSkewAngle = static_cast<double>(static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DSkewAngle, sal::static_int_cast< sal_uInt32 >(-135 * 65536) ))) / 65536.0;
@@ -1856,24 +1830,22 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
aSkewPair.First.Type = EnhancedCustomShapeParameterType::NORMAL;
aSkewPair.Second.Value <<= fSkewAngle;
aSkewPair.Second.Type = EnhancedCustomShapeParameterType::NORMAL;
- aProp.Name = sExtrusionSkew;
+ aProp.Name = "Skew";
aProp.Value <<= aSkewPair;
aExtrusionPropVec.push_back( aProp );
}
// "Specularity"
if ( IsProperty( DFF_Prop_c3DSpecularAmt ) )
{
- const OUString sExtrusionSpecularity( "Specularity" );
double fSpecularity = static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DSpecularAmt, 0 ));
fSpecularity /= 1333;
- aProp.Name = sExtrusionSpecularity;
+ aProp.Name = "Specularity";
aProp.Value <<= fSpecularity;
aExtrusionPropVec.push_back( aProp );
}
// "ProjectionMode"
- const OUString sExtrusionProjectionMode( "ProjectionMode" );
ProjectionMode eProjectionMode = (GetPropertyValue( DFF_Prop_fc3DFillHarsh, 0 ) & 4) ? ProjectionMode_PARALLEL : ProjectionMode_PERSPECTIVE;
- aProp.Name = sExtrusionProjectionMode;
+ aProp.Name = "ProjectionMode";
aProp.Value <<= eProjectionMode;
aExtrusionPropVec.push_back( aProp );
@@ -1884,15 +1856,13 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
double fViewY = static_cast<double>(static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DYViewpoint, sal_uInt32(-1250000) )))/ 360.0;
double fViewZ = static_cast<double>(static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DZViewpoint, 9000000 ))) / 360.0;
css::drawing::Position3D aExtrusionViewPoint( fViewX, fViewY, fViewZ );
- const OUString sExtrusionViewPoint( "ViewPoint" );
- aProp.Name = sExtrusionViewPoint;
+ aProp.Name = "ViewPoint";
aProp.Value <<= aExtrusionViewPoint;
aExtrusionPropVec.push_back( aProp );
}
// "Origin"
if ( IsProperty( DFF_Prop_c3DOriginX ) || IsProperty( DFF_Prop_c3DOriginY ) )
{
- const OUString sExtrusionOrigin( "Origin" );
double fOriginX = static_cast<double>(static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DOriginX, 32768 )));
double fOriginY = static_cast<double>(static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_c3DOriginY, sal_uInt32(-32768) )));
fOriginX /= 65536;
@@ -1902,14 +1872,13 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
aOriginPair.First.Type = EnhancedCustomShapeParameterType::NORMAL;
aOriginPair.Second.Value <<= fOriginY;
aOriginPair.Second.Type = EnhancedCustomShapeParameterType::NORMAL;
- aProp.Name = sExtrusionOrigin;
+ aProp.Name = "Origin";
aProp.Value <<= aOriginPair;
aExtrusionPropVec.push_back( aProp );
}
// "ExtrusionColor"
- const OUString sExtrusionColor( "Color" );
bool bExtrusionColor = IsProperty( DFF_Prop_c3DExtrusionColor ); // ( GetPropertyValue( DFF_Prop_fc3DLightFace ) & 2 ) != 0;
- aProp.Name = sExtrusionColor;
+ aProp.Name = "Color";
aProp.Value <<= bExtrusionColor;
aExtrusionPropVec.push_back( aProp );
if ( IsProperty( DFF_Prop_c3DExtrusionColor ) )
@@ -1945,8 +1914,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
aEquations[ i ] = EnhancedCustomShape2d::GetEquation( nFlags, nP1, nP2, nP3 );
}
// pushing the whole Equations element
- const OUString sEquations( "Equations" );
- aProp.Name = sEquations;
+ aProp.Name = "Equations";
aProp.Value <<= aEquations;
aPropVec.push_back( aProp );
}
@@ -1996,29 +1964,25 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
EnhancedCustomShapeParameterPair aPosition;
EnhancedCustomShape2d::SetEnhancedCustomShapeHandleParameter( aPosition.First, nPositionX, true, true );
EnhancedCustomShape2d::SetEnhancedCustomShapeHandleParameter( aPosition.Second, nPositionY, true, false );
- const OUString sHandlePosition( "Position" );
- aProp.Name = sHandlePosition;
+ aProp.Name = "Position";
aProp.Value <<= aPosition;
aHandlePropVec.push_back( aProp );
if ( nFlags & SvxMSDffHandleFlags::MIRRORED_X )
{
- const OUString sHandleMirroredX( "MirroredX" );
- aProp.Name = sHandleMirroredX;
+ aProp.Name = "MirroredX";
aProp.Value <<= true;
aHandlePropVec.push_back( aProp );
}
if ( nFlags & SvxMSDffHandleFlags::MIRRORED_Y )
{
- const OUString sHandleMirroredY( "MirroredY" );
- aProp.Name = sHandleMirroredY;
+ aProp.Name = "MirroredY";
aProp.Value <<= true;
aHandlePropVec.push_back( aProp );
}
if ( nFlags & SvxMSDffHandleFlags::SWITCHED )
{
- const OUString sHandleSwitched( "Switched" );
- aProp.Name = sHandleSwitched;
+ aProp.Name = "Switched";
aProp.Value <<= true;
aHandlePropVec.push_back( aProp );
}
@@ -2033,8 +1997,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
EnhancedCustomShapeParameterPair aPolar;
EnhancedCustomShape2d::SetEnhancedCustomShapeHandleParameter( aPolar.First, nCenterX, bool( nFlags & SvxMSDffHandleFlags::CENTER_X_IS_SPECIAL ), true );
EnhancedCustomShape2d::SetEnhancedCustomShapeHandleParameter( aPolar.Second, nCenterY, bool( nFlags & SvxMSDffHandleFlags::CENTER_Y_IS_SPECIAL ), false );
- const OUString sHandlePolar( "Polar" );
- aProp.Name = sHandlePolar;
+ aProp.Name = "Polar";
aProp.Value <<= aPolar;
aHandlePropVec.push_back( aProp );
}
@@ -2047,8 +2010,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
EnhancedCustomShapeParameterPair aMap;
EnhancedCustomShape2d::SetEnhancedCustomShapeHandleParameter( aMap.First, nCenterX, bool( nFlags & SvxMSDffHandleFlags::CENTER_X_IS_SPECIAL ), true );
EnhancedCustomShape2d::SetEnhancedCustomShapeHandleParameter( aMap.Second, nCenterY, bool( nFlags & SvxMSDffHandleFlags::CENTER_Y_IS_SPECIAL ), false );
- const OUString sHandleMap( "Map" );
- aProp.Name = sHandleMap;
+ aProp.Name = "Map";
aProp.Value <<= aMap;
aHandlePropVec.push_back( aProp );
}
@@ -2061,8 +2023,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
EnhancedCustomShapeParameter aRangeXMinimum;
EnhancedCustomShape2d::SetEnhancedCustomShapeHandleParameter( aRangeXMinimum, nRangeXMin,
bool( nFlags & SvxMSDffHandleFlags::RANGE_X_MIN_IS_SPECIAL ), true );
- const OUString sHandleRangeXMinimum( "RangeXMinimum" );
- aProp.Name = sHandleRangeXMinimum;
+ aProp.Name = "RangeXMinimum";
aProp.Value <<= aRangeXMinimum;
aHandlePropVec.push_back( aProp );
}
@@ -2073,8 +2034,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
EnhancedCustomShapeParameter aRangeXMaximum;
EnhancedCustomShape2d::SetEnhancedCustomShapeHandleParameter( aRangeXMaximum, nRangeXMax,
bool( nFlags & SvxMSDffHandleFlags::RANGE_X_MAX_IS_SPECIAL ), false );
- const OUString sHandleRangeXMaximum( "RangeXMaximum" );
- aProp.Name = sHandleRangeXMaximum;
+ aProp.Name = "RangeXMaximum";
aProp.Value <<= aRangeXMaximum;
aHandlePropVec.push_back( aProp );
}
@@ -2085,8 +2045,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
EnhancedCustomShapeParameter aRangeYMinimum;
EnhancedCustomShape2d::SetEnhancedCustomShapeHandleParameter( aRangeYMinimum, nRangeYMin,
bool( nFlags & SvxMSDffHandleFlags::RANGE_Y_MIN_IS_SPECIAL ), true );
- const OUString sHandleRangeYMinimum( "RangeYMinimum" );
- aProp.Name = sHandleRangeYMinimum;
+ aProp.Name = "RangeYMinimum";
aProp.Value <<= aRangeYMinimum;
aHandlePropVec.push_back( aProp );
}
@@ -2097,8 +2056,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
EnhancedCustomShapeParameter aRangeYMaximum;
EnhancedCustomShape2d::SetEnhancedCustomShapeHandleParameter( aRangeYMaximum, nRangeYMax,
bool( nFlags & SvxMSDffHandleFlags::RANGE_Y_MAX_IS_SPECIAL ), false );
- const OUString sHandleRangeYMaximum( "RangeYMaximum" );
- aProp.Name = sHandleRangeYMaximum;
+ aProp.Name = "RangeYMaximum";
aProp.Value <<= aRangeYMaximum;
aHandlePropVec.push_back( aProp );
}
@@ -2112,8 +2070,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
EnhancedCustomShapeParameter aRadiusRangeMinimum;
EnhancedCustomShape2d::SetEnhancedCustomShapeHandleParameter( aRadiusRangeMinimum, nRangeXMin,
bool( nFlags & SvxMSDffHandleFlags::RANGE_X_MIN_IS_SPECIAL ), true );
- const OUString sHandleRadiusRangeMinimum( "RadiusRangeMinimum" );
- aProp.Name = sHandleRadiusRangeMinimum;
+ aProp.Name = "RadiusRangeMinimum";
aProp.Value <<= aRadiusRangeMinimum;
aHandlePropVec.push_back( aProp );
}
@@ -2124,8 +2081,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
EnhancedCustomShapeParameter aRadiusRangeMaximum;
EnhancedCustomShape2d::SetEnhancedCustomShapeHandleParameter( aRadiusRangeMaximum, nRangeXMax,
bool( nFlags & SvxMSDffHandleFlags::RANGE_X_MAX_IS_SPECIAL ), false );
- const OUString sHandleRadiusRangeMaximum( "RadiusRangeMaximum" );
- aProp.Name = sHandleRadiusRangeMaximum;
+ aProp.Name = "RadiusRangeMaximum";
aProp.Value <<= aRadiusRangeMaximum;
aHandlePropVec.push_back( aProp );
}
@@ -2167,27 +2123,24 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
// "Path/ExtrusionAllowed"
if ( IsHardAttribute( DFF_Prop_f3DOK ) )
{
- const OUString sExtrusionAllowed( "ExtrusionAllowed" );
bool bExtrusionAllowed = ( GetPropertyValue( DFF_Prop_fFillOK, 0 ) & 16 ) != 0;
- aProp.Name = sExtrusionAllowed;
+ aProp.Name = "ExtrusionAllowed";
aProp.Value <<= bExtrusionAllowed;
aPathPropVec.push_back( aProp );
}
// "Path/ConcentricGradientFillAllowed"
if ( IsHardAttribute( DFF_Prop_fFillShadeShapeOK ) )
{
- const OUString sConcentricGradientFillAllowed( "ConcentricGradientFillAllowed" );
bool bConcentricGradientFillAllowed = ( GetPropertyValue( DFF_Prop_fFillOK, 0 ) & 2 ) != 0;
- aProp.Name = sConcentricGradientFillAllowed;
+ aProp.Name = "ConcentricGradientFillAllowed";
aProp.Value <<= bConcentricGradientFillAllowed;
aPathPropVec.push_back( aProp );
}
// "Path/TextPathAllowed"
if ( IsHardAttribute( DFF_Prop_fGtextOK ) || ( GetPropertyValue( DFF_Prop_gtextFStrikethrough, 0 ) & 0x4000 ) )
{
- const OUString sTextPathAllowed( "TextPathAllowed" );
bool bTextPathAllowed = ( GetPropertyValue( DFF_Prop_fFillOK, 0 ) & 4 ) != 0;
- aProp.Name = sTextPathAllowed;
+ aProp.Name = "TextPathAllowed";
aProp.Value <<= bTextPathAllowed;
aPathPropVec.push_back( aProp );
}
@@ -2247,8 +2200,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( aCoordinates[ i ].Second, nY );
}
}
- const OUString sCoordinates( "Coordinates" );
- aProp.Name = sCoordinates;
+ aProp.Name = "Coordinates";
aProp.Value <<= aCoordinates;
aPathPropVec.push_back( aProp );
}
@@ -2378,26 +2330,23 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
aSegments[ i ].Count = nCnt;
}
}
- const OUString sSegments( "Segments" );
- aProp.Name = sSegments;
+ aProp.Name = "Segments";
aProp.Value <<= aSegments;
aPathPropVec.push_back( aProp );
}
// Path/StretchX
if ( IsProperty( DFF_Prop_stretchPointX ) )
{
- const OUString sStretchX( "StretchX" );
sal_Int32 nStretchX = GetPropertyValue( DFF_Prop_stretchPointX, 0 );
- aProp.Name = sStretchX;
+ aProp.Name = "StretchX";
aProp.Value <<= nStretchX;
aPathPropVec.push_back( aProp );
}
// Path/StretchX
if ( IsProperty( DFF_Prop_stretchPointY ) )
{
- const OUString sStretchY( "StretchY" );
sal_Int32 nStretchY = GetPropertyValue( DFF_Prop_stretchPointY, 0 );
- aProp.Name = sStretchY;
+ aProp.Name = "StretchY";
aProp.Value <<= nStretchY;
aPathPropVec.push_back( aProp );
}
@@ -2435,8 +2384,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( aTextFrames[ i ].BottomRight.First, nRight );
EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( aTextFrames[ i ].BottomRight.Second, nBottom);
}
- const OUString sTextFrames( "TextFrames" );
- aProp.Name = sTextFrames;
+ aProp.Name = "TextFrames";
aProp.Value <<= aTextFrames;
aPathPropVec.push_back( aProp );
}
@@ -2485,16 +2433,14 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( aGluePoints[ i ].Second, nY );
}
}
- const OUString sGluePoints( "GluePoints" );
- aProp.Name = sGluePoints;
+ aProp.Name = "GluePoints";
aProp.Value <<= aGluePoints;
aPathPropVec.push_back( aProp );
}
if ( IsProperty( DFF_Prop_connectorType ) )
{
sal_Int16 nGluePointType = static_cast<sal_uInt16>(GetPropertyValue( DFF_Prop_connectorType, 0 ));
- const OUString sGluePointType( "GluePointType" );
- aProp.Name = sGluePointType;
+ aProp.Name = "GluePointType";
aProp.Value <<= nGluePointType;
aPathPropVec.push_back( aProp );
}
@@ -2515,13 +2461,11 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
PropVec aTextPathPropVec;
// TextPath
- const OUString sTextPathOn( "TextPath" );
- aProp.Name = sTextPathOn;
+ aProp.Name = "TextPath";
aProp.Value <<= bTextPathOn;
aTextPathPropVec.push_back( aProp );
// TextPathMode
- const OUString sTextPathMode( "TextPathMode" );
bool bTextPathFitPath = ( GetPropertyValue( DFF_Prop_gtextFStrikethrough, 0 ) & 0x100 ) != 0;
bool bTextPathFitShape;
@@ -2546,20 +2490,18 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
eTextPathMode = EnhancedCustomShapeTextPathMode_SHAPE;
else if ( bTextPathFitPath )
eTextPathMode = EnhancedCustomShapeTextPathMode_PATH;
- aProp.Name = sTextPathMode;
+ aProp.Name = "TextPathMode";
aProp.Value <<= eTextPathMode;
aTextPathPropVec.push_back( aProp );
// ScaleX
- const OUString sTextPathScaleX( "ScaleX" );
bool bTextPathScaleX = ( GetPropertyValue( DFF_Prop_gtextFStrikethrough, 0 ) & 0x40 ) != 0;
- aProp.Name = sTextPathScaleX;
+ aProp.Name = "ScaleX";
aProp.Value <<= bTextPathScaleX;
aTextPathPropVec.push_back( aProp );
// SameLetterHeights
- const OUString sSameLetterHeight( "SameLetterHeights" );
bool bSameLetterHeight = ( GetPropertyValue( DFF_Prop_gtextFStrikethrough, 0 ) & 0x80 ) != 0;
- aProp.Name = sSameLetterHeight;
+ aProp.Name = "SameLetterHeights";
aProp.Value <<= bSameLetterHeight;
aTextPathPropVec.push_back( aProp );
@@ -2600,8 +2542,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
aAdjustmentSeq[ nAdjustmentValues ].State = ePropertyState;
i--;
}
- const OUString sAdjustmentValues( "AdjustmentValues" );
- aProp.Name = sAdjustmentValues;
+ aProp.Name = "AdjustmentValues";
aProp.Value <<= aAdjustmentSeq;
aPropVec.push_back( aProp );
}
@@ -2768,13 +2709,11 @@ void DffPropertyReader::CheckAndCorrectExcelTextRotation( SvStream& rIn, SfxItem
OFOPXML_STORAGE_FORMAT_STRING, xInputStream, xContext, true ) );
if ( xStorage.is() )
{
- const OUString sDRS( "drs" );
css::uno::Reference< css::embed::XStorage >
- xStorageDRS( xStorage->openStorageElement( sDRS, css::embed::ElementModes::SEEKABLEREAD ) );
+ xStorageDRS( xStorage->openStorageElement( "drs", css::embed::ElementModes::SEEKABLEREAD ) );
if ( xStorageDRS.is() )
{
- const OUString sShapeXML( "shapexml.xml" );
- css::uno::Reference< css::io::XStream > xShapeXMLStream( xStorageDRS->openStreamElement( sShapeXML, css::embed::ElementModes::SEEKABLEREAD ) );
+ css::uno::Reference< css::io::XStream > xShapeXMLStream( xStorageDRS->openStreamElement( "shapexml.xml", css::embed::ElementModes::SEEKABLEREAD ) );
if ( xShapeXMLStream.is() )
{
css::uno::Reference< css::io::XInputStream > xShapeXMLInputStream( xShapeXMLStream->getInputStream() );
@@ -4570,12 +4509,8 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
if ( aObjData.eShapeType == mso_sptArc )
{
const OUString sAdjustmentValues( "AdjustmentValues" );
- const OUString sCoordinates( "Coordinates" );
- const OUString sHandles( "Handles" );
- const OUString sEquations( "Equations" );
const OUString sViewBox( "ViewBox" );
const OUString sPath( "Path" );
- const OUString sTextFrames( "TextFrames" );
SdrCustomShapeGeometryItem aGeometryItem( static_cast<SdrObjCustomShape*>(pRet)->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
PropertyValue aPropVal;
@@ -4612,7 +4547,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
// RB(21600,43200) in this coordinate system.
basegfx::B2DRectangle aEllipseRect_MS(-21600.0, 0.0, 21600.0, 43200.0);
css::uno::Sequence< css::drawing::EnhancedCustomShapeParameterPair> seqCoordinates;
- pAny = aGeometryItem.GetPropertyValueByName( sPath, sCoordinates );
+ pAny = aGeometryItem.GetPropertyValueByName( sPath, "Coordinates" );
if (pAny && (*pAny >>= seqCoordinates) && (seqCoordinates.getLength() >= 2))
{
auto const nL
@@ -4736,7 +4671,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( aTextFrame[ 0 ].BottomRight.First, nRight );
EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( aTextFrame[ 0 ].BottomRight.Second,nBottom );
PropertyValue aProp;
- aProp.Name = sTextFrames;
+ aProp.Name = "TextFrames";
aProp.Value <<= aTextFrame;
aGeometryItem.SetPropertyValue( sPath, aProp );
@@ -4762,8 +4697,8 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
// clearing items, so MergeDefaultAttributes will set the corresponding
// defaults from EnhancedCustomShapeGeometry
- aGeometryItem.ClearPropertyValue( sHandles );
- aGeometryItem.ClearPropertyValue( sEquations );
+ aGeometryItem.ClearPropertyValue( "Handles" );
+ aGeometryItem.ClearPropertyValue( "Equations" );
aGeometryItem.ClearPropertyValue( sPath );
static_cast<SdrObjCustomShape*>(pRet)->SetMergedItem( aGeometryItem );
@@ -4771,10 +4706,8 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
// now setting a new name, so the above correction is only done once when importing from ms
SdrCustomShapeGeometryItem aGeoName( static_cast<SdrObjCustomShape*>(pRet)->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
- const OUString sType( "Type" );
- const OUString sName( "mso-spt100" );
- aPropVal.Name = sType;
- aPropVal.Value <<= sName;
+ aPropVal.Name = "Type";
+ aPropVal.Value <<= OUString( "mso-spt100" );
aGeoName.SetPropertyValue( aPropVal );
static_cast<SdrObjCustomShape*>(pRet)->SetMergedItem( aGeoName );
}
diff --git a/filter/source/svg/svgfontexport.cxx b/filter/source/svg/svgfontexport.cxx
index bab7cf823b64..a8c88dc8b307 100644
--- a/filter/source/svg/svgfontexport.cxx
+++ b/filter/source/svg/svgfontexport.cxx
@@ -181,11 +181,9 @@ void SVGFontExport::implEmbedFont( const vcl::Font& rFont )
if( rGlyphSet.empty() )
return;
- const OUString aEmbeddedFontStr( "EmbeddedFont_" );
-
{
SvXMLElementExport aExp( mrExport, XML_NAMESPACE_NONE, "defs", true, true );
- OUString aCurIdStr( aEmbeddedFontStr );
+ OUString aCurIdStr( "EmbeddedFont_" );
OUString aUnitsPerEM( OUString::number( nFontEM ) );
ScopedVclPtrInstance< VirtualDevice > pVDev;
vcl::Font aFont( rFont );