summaryrefslogtreecommitdiff
path: root/sot/source/sdstor/ucbstorage.cxx
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2019-07-20 20:03:15 +0300
committerArkadiy Illarionov <qarkai@gmail.com>2019-07-22 18:42:35 +0200
commit6ffdc88e79904882e319bdd0b901e7491abae0b3 (patch)
tree5cb0257a03987f962668655af536a05ad72f8882 /sot/source/sdstor/ucbstorage.cxx
parent803a6ccb774ff6dc67ca697459d6679e4bc9604f (diff)
Simplify Sequence iterations in shell..svgio
Use range-based loops, STL and comphelper functions Change-Id: I612d36abcc09a91c60f7212de6747a1a1bdcfc69 Reviewed-on: https://gerrit.libreoffice.org/76056 Tested-by: Jenkins Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
Diffstat (limited to 'sot/source/sdstor/ucbstorage.cxx')
-rw-r--r--sot/source/sdstor/ucbstorage.cxx12
1 files changed, 4 insertions, 8 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",