summaryrefslogtreecommitdiff
path: root/oox/source/drawingml/customshapeproperties.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'oox/source/drawingml/customshapeproperties.cxx')
-rw-r--r--oox/source/drawingml/customshapeproperties.cxx26
1 files changed, 11 insertions, 15 deletions
diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx
index 048fb4610709..14c7a777811f 100644
--- a/oox/source/drawingml/customshapeproperties.cxx
+++ b/oox/source/drawingml/customshapeproperties.cxx
@@ -154,20 +154,18 @@ void CustomShapeProperties::pushToPropSet(
aPropSet.setProperty( PROP_CustomShapeGeometry, aSeq );
const OUString sCustomShapeGeometry("CustomShapeGeometry");
+ const OUString sAdjustmentValues("AdjustmentValues");
uno::Any aGeoPropSet = xPropSet->getPropertyValue( sCustomShapeGeometry );
uno::Sequence< beans::PropertyValue > aGeoPropSeq;
- sal_Int32 i, nCount = 0;
if (aGeoPropSet >>= aGeoPropSeq)
{
- nCount = aGeoPropSeq.getLength();
- for ( i = 0; i < nCount; i++ )
+ for ( const auto& rGeoProp : std::as_const(aGeoPropSeq) )
{
- const OUString sAdjustmentValues("AdjustmentValues");
- if ( aGeoPropSeq[ i ].Name == sAdjustmentValues )
+ if ( rGeoProp.Name == sAdjustmentValues )
{
OUString presetTextWarp;
- if ( aGeoPropSeq[ i ].Value >>= presetTextWarp )
+ if ( rGeoProp.Value >>= presetTextWarp )
{
aPropertyMap.setProperty( PROP_PresetTextWarp, presetTextWarp );
}
@@ -180,14 +178,12 @@ void CustomShapeProperties::pushToPropSet(
const OUString sType = "Type";
if ( aGeoPropSet >>= aGeoPropSeq )
{
- nCount = aGeoPropSeq.getLength();
- for ( i = 0; i < nCount; i++ )
+ for ( auto& rGeoProp : aGeoPropSeq )
{
- const OUString sAdjustmentValues("AdjustmentValues");
- if ( aGeoPropSeq[ i ].Name == sAdjustmentValues )
+ if ( rGeoProp.Name == sAdjustmentValues )
{
uno::Sequence< css::drawing::EnhancedCustomShapeAdjustmentValue > aAdjustmentSeq;
- if ( aGeoPropSeq[ i ].Value >>= aAdjustmentSeq )
+ if ( rGeoProp.Value >>= aAdjustmentSeq )
{
int nIndex=0;
for (auto const& adjustmentGuide : maAdjustmentGuideList)
@@ -211,16 +207,16 @@ void CustomShapeProperties::pushToPropSet(
aAdjustmentSeq[ nIndex++ ] = aAdjustmentVal;
}
}
- aGeoPropSeq[ i ].Value <<= aAdjustmentSeq;
+ rGeoProp.Value <<= aAdjustmentSeq;
xPropSet->setPropertyValue( sCustomShapeGeometry, Any( aGeoPropSeq ) );
}
}
- else if ( aGeoPropSeq[ i ].Name == sType )
+ else if ( rGeoProp.Name == sType )
{
if ( sConnectorShapeType.getLength() > 0 )
- aGeoPropSeq[ i ].Value <<= sConnectorShapeType;
+ rGeoProp.Value <<= sConnectorShapeType;
else
- aGeoPropSeq[ i ].Value <<= OUString( "ooxml-CustomShape" );
+ rGeoProp.Value <<= OUString( "ooxml-CustomShape" );
}
}
}