summaryrefslogtreecommitdiff
path: root/basic/source/basmgr
diff options
context:
space:
mode:
Diffstat (limited to 'basic/source/basmgr')
-rw-r--r--basic/source/basmgr/basmgr.cxx14
1 files changed, 6 insertions, 8 deletions
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index 8318466c88f1..08e13d857eae 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -551,20 +551,18 @@ void BasicManager::SetLibraryContainerInfo( const LibraryContainerInfo& rInfo )
xLibContainer->addContainerListener( xLibContainerListener );
uno::Sequence< OUString > aScriptLibNames = xScriptCont->getElementNames();
- const OUString* pScriptLibName = aScriptLibNames.getConstArray();
- sal_Int32 i, nNameCount = aScriptLibNames.getLength();
- if( nNameCount )
+ if( aScriptLibNames.hasElements() )
{
- for( i = 0 ; i < nNameCount ; ++i, ++pScriptLibName )
+ for(const auto& rScriptLibName : aScriptLibNames)
{
- uno::Any aLibAny = xScriptCont->getByName( *pScriptLibName );
+ uno::Any aLibAny = xScriptCont->getByName( rScriptLibName );
- if ( *pScriptLibName == "Standard" || *pScriptLibName == "VBAProject")
- xScriptCont->loadLibrary( *pScriptLibName );
+ if ( rScriptLibName == "Standard" || rScriptLibName == "VBAProject")
+ xScriptCont->loadLibrary( rScriptLibName );
BasMgrContainerListenerImpl::insertLibraryImpl
- ( xScriptCont, this, aLibAny, *pScriptLibName );
+ ( xScriptCont, this, aLibAny, rScriptLibName );
}
}
else