diff options
Diffstat (limited to 'oox/source/helper/propertymap.cxx')
-rw-r--r-- | oox/source/helper/propertymap.cxx | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/oox/source/helper/propertymap.cxx b/oox/source/helper/propertymap.cxx index 6b5635d8023e..8e7d3c505f98 100644 --- a/oox/source/helper/propertymap.cxx +++ b/oox/source/helper/propertymap.cxx @@ -239,17 +239,14 @@ void PropertyMap::assignAll( const PropertyMap& rPropMap ) Sequence< PropertyValue > PropertyMap::makePropertyValueSequence() const { Sequence< PropertyValue > aSeq( static_cast< sal_Int32 >( maProperties.size() ) ); - if( !maProperties.empty() ) + PropertyValue* pValues = aSeq.getArray(); + for (auto const& prop : maProperties) { - PropertyValue* pValues = aSeq.getArray(); - for (auto const& prop : maProperties) - { - OSL_ENSURE( (0 <= prop.first) && (prop.first < PROP_COUNT), "PropertyMap::makePropertyValueSequence - invalid property identifier" ); - pValues->Name = (*mpPropNames)[ prop.first ]; - pValues->Value = prop.second; - pValues->State = PropertyState_DIRECT_VALUE; - ++pValues; - } + OSL_ENSURE( (0 <= prop.first) && (prop.first < PROP_COUNT), "PropertyMap::makePropertyValueSequence - invalid property identifier" ); + pValues->Name = (*mpPropNames)[ prop.first ]; + pValues->Value = prop.second; + pValues->State = PropertyState_DIRECT_VALUE; + ++pValues; } return aSeq; } |