From 89340fcb6509afd1bffea7b6060d5ff5a444b3f1 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 20 May 2020 13:45:07 +0200 Subject: 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 --- fpicker/source/office/OfficeControlAccess.cxx | 4 ++-- fpicker/source/office/fpinteraction.cxx | 11 +++++------ 2 files changed, 7 insertions(+), 8 deletions(-) (limited to 'fpicker/source') 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& 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! -- cgit