summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2017-11-17 18:34:02 +0100
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-11-18 07:50:35 +0100
commitc197573d5e89156eeca1e1cdf481d9437237e31a (patch)
treee9aea71a1312e1a240e011a95c592fe057276152 /extensions
parent7db6878a9d3e534583f9c22709f0eee96eff849f (diff)
Replace list by vector in framectr (extensions)
+ use for range loop Change-Id: I7bd95df8a75979bf342e3a8920fab016593e1b18 Reviewed-on: https://gerrit.libreoffice.org/44891 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/bibliography/framectr.cxx17
1 files changed, 7 insertions, 10 deletions
diff --git a/extensions/source/bibliography/framectr.cxx b/extensions/source/bibliography/framectr.cxx
index 6fc72513f34f..ff842f87b64e 100644
--- a/extensions/source/bibliography/framectr.cxx
+++ b/extensions/source/bibliography/framectr.cxx
@@ -295,7 +295,7 @@ uno::Sequence< frame::DispatchInformation > SAL_CALL BibFrameController_Impl::ge
const CmdToInfoCache& rCmdCache = GetCommandToInfoCache();
frame::DispatchInformation aDispatchInfo;
- std::list< frame::DispatchInformation > aDispatchInfoList;
+ std::vector< frame::DispatchInformation > aDispatchInfoVector;
if (( nCommandGroup == frame::CommandGroup::EDIT ) ||
( nCommandGroup == frame::CommandGroup::DOCUMENT ) ||
@@ -303,24 +303,21 @@ uno::Sequence< frame::DispatchInformation > SAL_CALL BibFrameController_Impl::ge
( nCommandGroup == frame::CommandGroup::VIEW ))
{
bool bGroupFound = false;
- CmdToInfoCache::const_iterator pIter = rCmdCache.begin();
- while ( pIter != rCmdCache.end() )
+ for (auto const& item : rCmdCache)
{
- if ( pIter->second.nGroupId == nCommandGroup )
+ if ( item.second.nGroupId == nCommandGroup )
{
bGroupFound = true;
- aDispatchInfo.Command = pIter->first;
- aDispatchInfo.GroupId = pIter->second.nGroupId;
- aDispatchInfoList.push_back( aDispatchInfo );
+ aDispatchInfo.Command = item.first;
+ aDispatchInfo.GroupId = item.second.nGroupId;
+ aDispatchInfoVector.push_back( aDispatchInfo );
}
else if ( bGroupFound )
break;
-
- ++pIter;
}
}
- return comphelper::containerToSequence( aDispatchInfoList );
+ return comphelper::containerToSequence( aDispatchInfoVector );
}
bool canInsertRecords(const Reference< beans::XPropertySet>& _rxCursorSet)