diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2018-02-24 16:27:42 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2018-02-24 17:28:43 +0100 |
commit | 3ceb01afc3e5f47930e24fb0b21e6e85b86f660e (patch) | |
tree | b0f28ccf328460ae5f189d6855f55f9815dce39a /basic/source/classes/sbunoobj.cxx | |
parent | 85643ad3b66ee057a6d620d6284a2b1b19de8dc8 (diff) |
Use for range loops in basegfx and basic
Change-Id: I5b2086c245695aeb30630150b3c5ccf61fbd6a56
Reviewed-on: https://gerrit.libreoffice.org/50280
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'basic/source/classes/sbunoobj.cxx')
-rw-r--r-- | basic/source/classes/sbunoobj.cxx | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 034ee01d0bba..ac4b8d4b3ea9 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -3257,11 +3257,10 @@ VBAConstantHelper::isVBAConstantType( const OUString& rName ) { init(); bool bConstant = false; - VBAConstantsVector::const_iterator it = aConstCache.begin(); - for( ; it != aConstCache.end(); ++it ) + for (auto const& elem : aConstCache) { - if( rName.equalsIgnoreAsciiCase( *it ) ) + if( rName.equalsIgnoreAsciiCase(elem) ) { bConstant = true; break; @@ -4471,10 +4470,9 @@ void disposeComVariablesForBasic( StarBASIC const * pBasic ) } ComponentRefVector& rv = pItem->m_vComImplementsObjects; - ComponentRefVector::iterator itCRV; - for( itCRV = rv.begin() ; itCRV != rv.end() ; ++itCRV ) + for (auto const& elem : rv) { - Reference< XComponent > xComponent( (*itCRV).get(), UNO_QUERY ); + Reference< XComponent > xComponent( elem.get(), UNO_QUERY ); if (xComponent.is()) xComponent->dispose(); } @@ -4639,8 +4637,8 @@ SbUnoStructRefObject::SbUnoStructRefObject( const OUString& aName_, const Struct SbUnoStructRefObject::~SbUnoStructRefObject() { - for ( StructFieldInfo::iterator it = maFields.begin(), it_end = maFields.end(); it != it_end; ++it ) - delete it->second; + for (auto const& field : maFields) + delete field.second; } void SbUnoStructRefObject::initMemberCache() @@ -4736,15 +4734,15 @@ void SbUnoStructRefObject::implCreateAll() if (!mbMemberCacheInit) initMemberCache(); - for ( StructFieldInfo::iterator it = maFields.begin(), it_end = maFields.end(); it != it_end; ++it ) + for (auto const& field : maFields) { - const OUString& rName = it->first; + const OUString& rName = field.first; SbxDataType eSbxType; - eSbxType = unoToSbxType( it->second->getTypeClass() ); + eSbxType = unoToSbxType( field.second->getTypeClass() ); SbxDataType eRealSbxType = eSbxType; Property aProp; aProp.Name = rName; - aProp.Type = css::uno::Type( it->second->getTypeClass(), it->second->getTypeName() ); + aProp.Type = css::uno::Type( field.second->getTypeClass(), field.second->getTypeName() ); SbUnoProperty* pProp = new SbUnoProperty( rName, eSbxType, eRealSbxType, aProp, 0, false, ( aProp.Type.getTypeClass() == css::uno::TypeClass_STRUCT) ); SbxVariableRef xVarRef = pProp; QuickInsert( xVarRef.get() ); |