diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-05-20 13:45:07 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-05-21 08:48:26 +0200 |
commit | 89340fcb6509afd1bffea7b6060d5ff5a444b3f1 (patch) | |
tree | d5ae1feaeed8b67afb89b71e642b6306dd4ebc37 /fpicker | |
parent | f94aae5cbab5b826ea8821e9ed3b456d65c03c70 (diff) |
use for-range on Sequence in f*
Change-Id: I820255001c1b96d1f4b76a203f3c0f76fa09fe66
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94567
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'fpicker')
-rw-r--r-- | fpicker/source/office/OfficeControlAccess.cxx | 4 | ||||
-rw-r--r-- | fpicker/source/office/fpinteraction.cxx | 11 |
2 files changed, 7 insertions, 8 deletions
diff --git a/fpicker/source/office/OfficeControlAccess.cxx b/fpicker/source/office/OfficeControlAccess.cxx index e8f4e3929d79..47796ec4e58e 100644 --- a/fpicker/source/office/OfficeControlAccess.cxx +++ b/fpicker/source/office/OfficeControlAccess.cxx @@ -509,8 +509,8 @@ namespace svt if ( aTemplateList.hasElements() ) { - for ( long i=0; i < aTemplateList.getLength(); i++ ) - pListbox->append_text( aTemplateList[i] ); + for ( const OUString& s : std::as_const(aTemplateList) ) + pListbox->append_text( s ); } } break; diff --git a/fpicker/source/office/fpinteraction.cxx b/fpicker/source/office/fpinteraction.cxx index eaaecaf305be..16ea3368ae08 100644 --- a/fpicker/source/office/fpinteraction.cxx +++ b/fpicker/source/office/fpinteraction.cxx @@ -63,17 +63,16 @@ namespace svt Reference< XInteractionRetry > xRetry; const Sequence< Reference< XInteractionContinuation > > lConts = _rxRequest->getContinuations(); - const Reference< XInteractionContinuation >* pConts = lConts.getConstArray(); - for (sal_Int32 i=0; i<lConts.getLength(); ++i) + for (const Reference< XInteractionContinuation >& rCont : lConts) { if (!xAbort.is()) - xAbort.set(pConts[i], UNO_QUERY); + xAbort.set(rCont, UNO_QUERY); if (!xApprove.is()) - xApprove.set(pConts[i], UNO_QUERY); + xApprove.set(rCont, UNO_QUERY); if (!xDisapprove.is()) - xDisapprove.set(pConts[i], UNO_QUERY); + xDisapprove.set(rCont, UNO_QUERY); if (!xRetry.is()) - xRetry.set(pConts[i], UNO_QUERY); + xRetry.set(rCont, UNO_QUERY); } // safe the original request for later analyzing! |