summaryrefslogtreecommitdiff
path: root/sot/source/unoolestorage/xolesimplestorage.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sot/source/unoolestorage/xolesimplestorage.cxx')
-rw-r--r--sot/source/unoolestorage/xolesimplestorage.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sot/source/unoolestorage/xolesimplestorage.cxx b/sot/source/unoolestorage/xolesimplestorage.cxx
index 80f2d0605c10..09de314226ab 100644
--- a/sot/source/unoolestorage/xolesimplestorage.cxx
+++ b/sot/source/unoolestorage/xolesimplestorage.cxx
@@ -237,15 +237,15 @@ void OLESimpleStorage::InsertNameAccessToStorage_Impl( BaseStorage* pStorage, co
try
{
uno::Sequence< OUString > aElements = xNameAccess->getElementNames();
- for ( sal_Int32 nInd = 0; nInd < aElements.getLength(); nInd++ )
+ for ( const auto& rElement : aElements )
{
uno::Reference< io::XInputStream > xInputStream;
uno::Reference< container::XNameAccess > xSubNameAccess;
- uno::Any aAny = xNameAccess->getByName( aElements[nInd] );
+ uno::Any aAny = xNameAccess->getByName( rElement );
if ( aAny >>= xInputStream )
- InsertInputStreamToStorage_Impl( pNewStorage.get(), aElements[nInd], xInputStream );
+ InsertInputStreamToStorage_Impl( pNewStorage.get(), rElement, xInputStream );
else if ( aAny >>= xSubNameAccess )
- InsertNameAccessToStorage_Impl( pNewStorage.get(), aElements[nInd], xSubNameAccess );
+ InsertNameAccessToStorage_Impl( pNewStorage.get(), rElement, xSubNameAccess );
}
}
catch( uno::Exception& )