From 898cbb22f07a2c1487700326f134fe54e7a13f4d Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 15 May 2020 09:56:35 +0200 Subject: use for-range on Sequence in basctl..canvas Change-Id: Idad3d8fbe785c7b1b8b287a3227372adb2757de8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94260 Tested-by: Jenkins Reviewed-by: Noel Grandin --- basic/source/uno/dlgcont.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'basic/source/uno/dlgcont.cxx') diff --git a/basic/source/uno/dlgcont.cxx b/basic/source/uno/dlgcont.cxx index c07fa682c909..eee4e8300339 100644 --- a/basic/source/uno/dlgcont.cxx +++ b/basic/source/uno/dlgcont.cxx @@ -213,12 +213,12 @@ void SfxDialogLibraryContainer::storeLibrariesToStorage( const uno::Reference< e // we need to export out any embedded image object(s) // associated with any Dialogs. First, we need to actually gather any such urls // for each dialog in this container - Sequence< OUString > sLibraries = getElementNames(); - for ( sal_Int32 i=0; i < sLibraries.getLength(); ++i ) + const Sequence< OUString > sLibraries = getElementNames(); + for ( const OUString& rName : sLibraries ) { - loadLibrary( sLibraries[ i ] ); + loadLibrary( rName ); Reference< XNameContainer > xLib; - getByName( sLibraries[ i ] ) >>= xLib; + getByName( rName ) >>= xLib; if ( xLib.is() ) { Sequence< OUString > sDialogs = xLib->getElementNames(); -- cgit