diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2019-06-29 22:24:22 +0300 |
---|---|---|
committer | Arkadiy Illarionov <qarkai@gmail.com> | 2019-06-30 12:40:20 +0200 |
commit | 02872ceafb8adca47cce856d0e44107494ba2e21 (patch) | |
tree | 33a62ca57f6de9507ff1e9ccb7880372fbe91f77 /ucb/source/ucp/ftp/ftpresultsetI.cxx | |
parent | 639698862d16310b60514277d59227eec37eb02a (diff) |
Simplify Sequence iterations in ucb
Use range-based loops or replace with STL functions
Change-Id: I755dec47aeeed879a032eecd50dee585c392ec59
Reviewed-on: https://gerrit.libreoffice.org/74915
Tested-by: Jenkins
Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
Diffstat (limited to 'ucb/source/ucp/ftp/ftpresultsetI.cxx')
-rw-r--r-- | ucb/source/ucp/ftp/ftpresultsetI.cxx | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/ucb/source/ucp/ftp/ftpresultsetI.cxx b/ucb/source/ucp/ftp/ftpresultsetI.cxx index a6163aaa4f2b..6ef79b786e04 100644 --- a/ucb/source/ucp/ftp/ftpresultsetI.cxx +++ b/ucb/source/ucp/ftp/ftpresultsetI.cxx @@ -55,37 +55,37 @@ ResultSetI::ResultSetI(const Reference<XComponentContext>& rxContext, rtl::Reference<ucbhelper::PropertyValueSet> xRow = new ucbhelper::PropertyValueSet(rxContext); - for( int i = 0; i < seqProp.getLength(); ++i) { - const OUString& Name = seqProp[i].Name; + for( const auto& rProp : seqProp) { + const OUString& Name = rProp.Name; if(Name == "ContentType") - xRow->appendString(seqProp[i], + xRow->appendString(rProp, OUString( "application/ftp" )); else if(Name == "Title") - xRow->appendString(seqProp[i],dirvec[n].m_aName); + xRow->appendString(rProp,dirvec[n].m_aName); else if(Name == "IsReadOnly") - xRow->appendBoolean(seqProp[i], + xRow->appendBoolean(rProp, (dirvec[n].m_nMode & INETCOREFTP_FILEMODE_WRITE) == INETCOREFTP_FILEMODE_WRITE); else if(Name == "IsDocument") - xRow->appendBoolean(seqProp[i], + xRow->appendBoolean(rProp, (dirvec[n].m_nMode & INETCOREFTP_FILEMODE_ISDIR) != INETCOREFTP_FILEMODE_ISDIR); else if(Name == "IsFolder") - xRow->appendBoolean(seqProp[i], + xRow->appendBoolean(rProp, ( dirvec[n].m_nMode & INETCOREFTP_FILEMODE_ISDIR) == INETCOREFTP_FILEMODE_ISDIR); else if(Name == "Size") - xRow->appendLong(seqProp[i], + xRow->appendLong(rProp, dirvec[n].m_nSize); else if(Name == "DateCreated") - xRow->appendTimestamp(seqProp[i], + xRow->appendTimestamp(rProp, dirvec[n].m_aDate); else if(Name == "CreatableContentsInfo") xRow->appendObject( - seqProp[i], + rProp, makeAny(FTPContent::queryCreatableContentsInfo_Static())); else - xRow->appendVoid(seqProp[i]); + xRow->appendVoid(rProp); } m_aItems[n].set(xRow.get()); } |