diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-05-20 08:48:56 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-05-20 21:31:13 +0200 |
commit | b33ff1a083d95388997cf301d8a1538a41c08255 (patch) | |
tree | 35c773fc0be7c6e4c4b479c9594fb1e8843ef183 /embeddedobj/source/general | |
parent | fb149c68db909e6ec17520e277583ed759a0d49a (diff) |
use for-range on Sequence in e*
Change-Id: I77dc12356ee45b1dee9acaf8a73dea81588822d3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94554
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'embeddedobj/source/general')
-rw-r--r-- | embeddedobj/source/general/docholder.cxx | 6 | ||||
-rw-r--r-- | embeddedobj/source/general/xcreator.cxx | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/embeddedobj/source/general/docholder.cxx b/embeddedobj/source/general/docholder.cxx index cfc7afcf81a9..90a04d85e125 100644 --- a/embeddedobj/source/general/docholder.cxx +++ b/embeddedobj/source/general/docholder.cxx @@ -564,10 +564,10 @@ void DocumentHolder::FindConnectPoints( uno::Sequence< beans::PropertyValue > aProps; xMenu->getByIndex( nInd ) >>= aProps; OUString aCommand; - for ( sal_Int32 nSeqInd = 0; nSeqInd < aProps.getLength(); nSeqInd++ ) - if ( aProps[nSeqInd].Name == "CommandURL" ) + for ( beans::PropertyValue const & prop : std::as_const(aProps) ) + if ( prop.Name == "CommandURL" ) { - aProps[nSeqInd].Value >>= aCommand; + prop.Value >>= aCommand; break; } diff --git a/embeddedobj/source/general/xcreator.cxx b/embeddedobj/source/general/xcreator.cxx index f3df8d50de9f..0cdc67bebbd7 100644 --- a/embeddedobj/source/general/xcreator.cxx +++ b/embeddedobj/source/general/xcreator.cxx @@ -362,9 +362,9 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta // check if there is URL, URL must exist OUString aURL; - for ( sal_Int32 nInd = 0; nInd < aTempMedDescr.getLength(); nInd++ ) - if ( aTempMedDescr[nInd].Name == "URL" ) - aTempMedDescr[nInd].Value >>= aURL; + for ( beans::PropertyValue const & prop : std::as_const(aTempMedDescr) ) + if ( prop.Name == "URL" ) + prop.Value >>= aURL; if ( aURL.isEmpty() ) throw lang::IllegalArgumentException( "No URL for the link is provided!", |