diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2018-03-17 11:59:25 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2018-03-17 18:30:39 +0100 |
commit | c6994fb815624d31bc2570bdcdc5991fd1195792 (patch) | |
tree | 3a6238330ab8c88ed452526629007c5df1051276 /formula/source | |
parent | a57bda77c3094558e8dae6ecec761ee4b98e5af3 (diff) |
Use for-range loops in embeddedobj, embedserv and formula
Change-Id: I56e1bace8ab8312524e681d3865a1a89d523812d
Reviewed-on: https://gerrit.libreoffice.org/51459
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'formula/source')
-rw-r--r-- | formula/source/core/api/FormulaCompiler.cxx | 6 | ||||
-rw-r--r-- | formula/source/ui/dlg/funcpage.cxx | 10 |
2 files changed, 6 insertions, 10 deletions
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index 537f8f74f074..d16e08068b94 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -577,11 +577,11 @@ uno::Sequence< sheet::FormulaOpCodeMapEntry > FormulaCompiler::OpCodeMap::create // If AddIn functions are present in this mapping, use them, and only those. if (hasExternals()) { - for (ExternalHashMap::const_iterator it( maExternalHashMap.begin());it != maExternalHashMap.end(); ++it) + for (auto const& elem : maExternalHashMap) { FormulaOpCodeMapEntry aEntry; - aEntry.Name = (*it).first; - aEntry.Token.Data <<= (*it).second; + aEntry.Name = elem.first; + aEntry.Token.Data <<= elem.second; aEntry.Token.OpCode = ocExternal; aVec.push_back( aEntry); } diff --git a/formula/source/ui/dlg/funcpage.cxx b/formula/source/ui/dlg/funcpage.cxx index 5cbcdf608b6a..6e1ff81e426c 100644 --- a/formula/source/ui/dlg/funcpage.cxx +++ b/formula/source/ui/dlg/funcpage.cxx @@ -144,16 +144,12 @@ void FuncPage::UpdateFunctionList(const OUString& aStr) } else // LRU-List { - ::std::vector< TFunctionDesc >::iterator aIter = aLRUList.begin(); - ::std::vector< TFunctionDesc >::iterator aEnd = aLRUList.end(); - - for ( ; aIter != aEnd; ++aIter ) + for (auto const& elem : aLRUList) { - const IFunctionDescription* pDesc = *aIter; - if (pDesc) // may be null if a function is no longer available + if (elem) // may be null if a function is no longer available { m_pLbFunction->SetEntryData( - m_pLbFunction->InsertEntry( pDesc->getFunctionName() ), const_cast<IFunctionDescription *>(pDesc) ); + m_pLbFunction->InsertEntry( elem->getFunctionName() ), const_cast<IFunctionDescription *>(elem) ); } } } |