summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
Diffstat (limited to 'sot')
-rw-r--r--sot/source/sdstor/ucbstorage.cxx12
-rw-r--r--sot/source/unoolestorage/xolesimplestorage.cxx8
2 files changed, 8 insertions, 12 deletions
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index a4c754610229..591a22805946 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -1813,14 +1813,12 @@ sal_Int32 UCBStorage_Impl::GetObjectCount()
static OUString Find_Impl( const Sequence < Sequence < PropertyValue > >& rSequence, const OUString& rPath )
{
bool bFound = false;
- for ( sal_Int32 nSeqs=0; nSeqs<rSequence.getLength(); nSeqs++ )
+ for ( const Sequence < PropertyValue >& rMyProps : rSequence )
{
- const Sequence < PropertyValue >& rMyProps = rSequence[nSeqs];
OUString aType;
- for ( sal_Int32 nProps=0; nProps<rMyProps.getLength(); nProps++ )
+ for ( const PropertyValue& rAny : rMyProps )
{
- const PropertyValue& rAny = rMyProps[nProps];
if ( rAny.Name == "FullPath" )
{
OUString aTmp;
@@ -1944,14 +1942,12 @@ bool UCBStorage_Impl::Insert( ::ucbhelper::Content *pContent )
try
{
Sequence< ContentInfo > aInfo = pContent->queryCreatableContentsInfo();
- sal_Int32 nCount = aInfo.getLength();
- if ( nCount == 0 )
+ if ( !aInfo.hasElements() )
return false;
- for ( sal_Int32 i = 0; i < nCount; ++i )
+ for ( const ContentInfo & rCurr : aInfo )
{
// Simply look for the first KIND_FOLDER...
- const ContentInfo & rCurr = aInfo[i];
if ( rCurr.Attributes & ContentInfoAttribute::KIND_FOLDER )
{
// Make sure the only required bootstrap property is "Title",
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& )