summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-07-10 16:12:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-11 12:50:55 +0200
commit20571c472528c4f98fe3f55700d134915d32a49a (patch)
tree9b350824d845b8aaeb13d087ef74febb454b821b /xmloff
parentb401896a56149aa2871b65a330a6f601a9830ccd (diff)
use more range-for on uno::Sequence
Change-Id: Ifad32425d79be5a22d33d721bdc5fb993f699759 Reviewed-on: https://gerrit.libreoffice.org/39763 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/core/xmlexp.cxx13
-rw-r--r--xmloff/source/draw/ximpcustomshape.cxx17
2 files changed, 10 insertions, 20 deletions
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index c2ae8e7663e3..c331d833a72c 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -635,16 +635,11 @@ void SAL_CALL SvXMLExport::setSourceDocument( const uno::Reference< lang::XCompo
if( xNamespaceMap.is() )
{
Sequence< OUString > aPrefixes( xNamespaceMap->getElementNames() );
-
- OUString* pPrefix = aPrefixes.getArray();
- const sal_Int32 nCount = aPrefixes.getLength();
- sal_Int32 nIndex;
- OUString aURL;
-
- for( nIndex = 0; nIndex < nCount; ++nIndex, ++pPrefix )
+ for( OUString const & prefix : aPrefixes )
{
- if( xNamespaceMap->getByName( *pPrefix ) >>= aURL )
- GetNamespaceMap_().Add( *pPrefix, aURL );
+ OUString aURL;
+ if( xNamespaceMap->getByName( prefix ) >>= aURL )
+ GetNamespaceMap_().Add( prefix, aURL );
}
}
}
diff --git a/xmloff/source/draw/ximpcustomshape.cxx b/xmloff/source/draw/ximpcustomshape.cxx
index 68eba5a5bf62..0a9dc7be5b43 100644
--- a/xmloff/source/draw/ximpcustomshape.cxx
+++ b/xmloff/source/draw/ximpcustomshape.cxx
@@ -1250,14 +1250,11 @@ void XMLEnhancedCustomShapeContext::EndElement()
}
++aPathIter;
}
- std::vector< beans::PropertyValues >::iterator aHandleIter = maHandles.begin();
- std::vector< beans::PropertyValues >::iterator aHandleEnd = maHandles.end();
- while ( aHandleIter != aHandleEnd )
+ for ( css::beans::PropertyValues const & aHandle : maHandles )
{
- beans::PropertyValue* pValues = aHandleIter->getArray();
- for ( i = 0; i < aHandleIter->getLength(); i++ )
+ for ( beans::PropertyValue const & propValue : aHandle )
{
- switch( EASGet( pValues->Name ) )
+ switch( EASGet( propValue.Name ) )
{
case EAS_RangeYMinimum :
case EAS_RangeYMaximum :
@@ -1267,7 +1264,7 @@ void XMLEnhancedCustomShapeContext::EndElement()
case EAS_RadiusRangeMaximum :
{
CheckAndResolveEquationParameter( const_cast<css::drawing::EnhancedCustomShapeParameter &>(*o3tl::doAccess<css::drawing::EnhancedCustomShapeParameter>(
- pValues->Value)), pH.get() );
+ propValue.Value)), pH.get() );
}
break;
@@ -1275,17 +1272,15 @@ void XMLEnhancedCustomShapeContext::EndElement()
case EAS_Polar :
{
CheckAndResolveEquationParameter( const_cast<css::drawing::EnhancedCustomShapeParameter &>((*o3tl::doAccess<css::drawing::EnhancedCustomShapeParameterPair>(
- pValues->Value)).First), pH.get() );
+ propValue.Value)).First), pH.get() );
CheckAndResolveEquationParameter( const_cast<css::drawing::EnhancedCustomShapeParameter &>((*o3tl::doAccess<css::drawing::EnhancedCustomShapeParameterPair>(
- pValues->Value)).Second), pH.get() );
+ propValue.Value)).Second), pH.get() );
}
break;
default:
break;
}
- pValues++;
}
- ++aHandleIter;
}
}