summaryrefslogtreecommitdiffstats
path: root/basic
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-05-15 09:56:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-05-15 14:00:48 +0200
commit898cbb22f07a2c1487700326f134fe54e7a13f4d (patch)
treed5bdd749ca565f74976653c7cac90e1eaecc74d6 /basic
parenttdf#133036 notebookbar customize uses a special combobox id (diff)
downloadcore-898cbb22f07a2c1487700326f134fe54e7a13f4d.tar.gz
core-898cbb22f07a2c1487700326f134fe54e7a13f4d.zip
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic')
-rw-r--r--basic/source/classes/propacc.cxx5
-rw-r--r--basic/source/classes/sbunoobj.cxx8
-rw-r--r--basic/source/uno/dlgcont.cxx8
3 files changed, 10 insertions, 11 deletions
diff --git a/basic/source/classes/propacc.cxx b/basic/source/classes/propacc.cxx
index 1ec508567197..45d13ffbbb1d 100644
--- a/basic/source/classes/propacc.cxx
+++ b/basic/source/classes/propacc.cxx
@@ -143,10 +143,9 @@ void SbPropertyValues::setPropertyValues(const Sequence< PropertyValue >& rPrope
if (!m_aPropVals.empty())
throw IllegalArgumentException();
- const PropertyValue *pPropVals = rPropertyValues.getConstArray();
- for (sal_Int32 n = 0; n < rPropertyValues.getLength(); ++n)
+ for (const PropertyValue& i : rPropertyValues)
{
- m_aPropVals.push_back(pPropVals[n]);
+ m_aPropVals.push_back(i);
}
}
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 1da0bf1b0314..15e8f6b91154 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -3258,18 +3258,18 @@ void VBAConstantHelper::init()
sLeafName = sFullName.copy( indexLastDot + 1);
}
aConstCache.push_back( sLeafName ); // assume constant group names are unique
- Sequence< Reference< XConstantTypeDescription > > aConsts = xConstants->getConstants();
- for (sal_Int32 i = 0; i != aConsts.getLength(); ++i)
+ const Sequence< Reference< XConstantTypeDescription > > aConsts = xConstants->getConstants();
+ for (const auto& ctd : aConsts)
{
// store constant member name
- sFullName = aConsts[i]->getName();
+ sFullName = ctd->getName();
indexLastDot = sFullName.lastIndexOf('.');
sLeafName = sFullName;
if ( indexLastDot > -1 )
{
sLeafName = sFullName.copy( indexLastDot + 1);
}
- aConstHash[ sLeafName.toAsciiLowerCase() ] = aConsts[i]->getConstantValue();
+ aConstHash[ sLeafName.toAsciiLowerCase() ] = ctd->getConstantValue();
}
}
}
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();