summaryrefslogtreecommitdiff
path: root/linguistic
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2021-04-12 13:07:56 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-04-12 17:45:19 +0200
commitfe23e35ba5705d7f51f69c3f4e7ccd6c5b575a6b (patch)
treebace053173689b600f8b6a75145e07cc2b933743 /linguistic
parent27911b0455d8dcc08a0702372492a6ce00250cb7 (diff)
less copying in SfxItemPropertyMap::getPropertyEntries
we can just expose the map now, and avoid copying all the properties Change-Id: Icb22975508582268dfa96e41eb98ac01e7f51317 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113982 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'linguistic')
-rw-r--r--linguistic/source/lngopt.cxx13
1 files changed, 5 insertions, 8 deletions
diff --git a/linguistic/source/lngopt.cxx b/linguistic/source/lngopt.cxx
index a163b50dcad5..f7d7e4c0bf29 100644
--- a/linguistic/source/lngopt.cxx
+++ b/linguistic/source/lngopt.cxx
@@ -317,15 +317,12 @@ Sequence< PropertyValue > SAL_CALL
{
MutexGuard aGuard( GetLinguMutex() );
- PropertyEntryVector_t aPropEntries = aPropertyMap.getPropertyEntries();
std::vector<PropertyValue> aProps;
- aProps.reserve(aPropertyMap.getSize());
-
- std::transform(aPropEntries.begin(), aPropEntries.end(), std::back_inserter(aProps),
- [this](PropertyEntryVector_t::const_reference rPropEntry) {
- return PropertyValue(rPropEntry.sName, rPropEntry.nWID,
- aConfig.GetProperty(rPropEntry.nWID),
- css::beans::PropertyState_DIRECT_VALUE); });
+ aProps.reserve(aPropertyMap.getPropertyEntries().size());
+ for(auto & rPair : aPropertyMap.getPropertyEntries())
+ aProps.push_back(PropertyValue(OUString(rPair.first), rPair.second.nWID,
+ aConfig.GetProperty(rPair.second.nWID),
+ css::beans::PropertyState_DIRECT_VALUE));
return comphelper::containerToSequence(aProps);
}