diff options
author | Noel Grandin <noel@peralex.com> | 2021-04-12 13:07:56 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-04-12 17:45:19 +0200 |
commit | fe23e35ba5705d7f51f69c3f4e7ccd6c5b575a6b (patch) | |
tree | bace053173689b600f8b6a75145e07cc2b933743 /svx/source | |
parent | 27911b0455d8dcc08a0702372492a6ce00250cb7 (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 'svx/source')
-rw-r--r-- | svx/source/unodraw/unoshape.cxx | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index de292ef43bb3..e645738d7a3b 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -591,26 +591,25 @@ static void SvxItemPropertySet_ObtainSettingsFromPropertySet(const SvxItemProper return; const SfxItemPropertyMap& rSrc = rPropSet.getPropertyMap(); - PropertyEntryVector_t aSrcPropVector = rSrc.getPropertyEntries(); - for(const auto& rSrcProp : aSrcPropVector) + for(const auto& rSrcProp : rSrc.getPropertyEntries()) { - const sal_uInt16 nWID = rSrcProp.nWID; + const sal_uInt16 nWID = rSrcProp.second.nWID; if(SfxItemPool::IsWhich(nWID) && (nWID < OWN_ATTR_VALUE_START || nWID > OWN_ATTR_VALUE_END) - && rPropSet.GetUsrAnyForID(rSrcProp)) + && rPropSet.GetUsrAnyForID(rSrcProp.second)) rSet.Put(rSet.GetPool()->GetDefaultItem(nWID)); } - for(const auto& rSrcProp : aSrcPropVector) + for(const auto& rSrcProp : rSrc.getPropertyEntries()) { - if(rSrcProp.nWID) + if(rSrcProp.second.nWID) { - uno::Any* pUsrAny = rPropSet.GetUsrAnyForID(rSrcProp); + uno::Any* pUsrAny = rPropSet.GetUsrAnyForID(rSrcProp.second); if(pUsrAny) { // search for equivalent entry in pDst - const SfxItemPropertySimpleEntry* pEntry = pMap->getByName( rSrcProp.sName ); + const SfxItemPropertySimpleEntry* pEntry = pMap->getByName( rSrcProp.first ); if(pEntry) { // entry found @@ -618,7 +617,7 @@ static void SvxItemPropertySet_ObtainSettingsFromPropertySet(const SvxItemProper { // special ID in PropertySet, can only be set // directly at the object - xSet->setPropertyValue( rSrcProp.sName, *pUsrAny); + xSet->setPropertyValue( OUString(rSrcProp.first), *pUsrAny); } else { |