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 /sc | |
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 'sc')
-rw-r--r-- | sc/source/ui/view/viewfunc.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx index e772f906303f..048e663d81ad 100644 --- a/sc/source/ui/view/viewfunc.cxx +++ b/sc/source/ui/view/viewfunc.cxx @@ -1247,20 +1247,19 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr, bool bCursor css::uno::Sequence< css::beans::PropertyValue > aProperties; sal_Int32 nCount = 0; const SfxItemPropertyMap& rMap = ScCellObj::GetCellPropertyMap(); - PropertyEntryVector_t aPropVector = rMap.getPropertyEntries(); for ( sal_uInt16 nWhich = ATTR_PATTERN_START; nWhich <= ATTR_PATTERN_END; ++nWhich ) { const SfxPoolItem* pItem = nullptr; if ( rNewSet.GetItemState( nWhich, true, &pItem ) == SfxItemState::SET && pItem ) { - for ( const auto& rProp : aPropVector) + for ( const auto& rProp : rMap.getPropertyEntries()) { - if ( rProp.nWID == nWhich ) + if ( rProp.second.nWID == nWhich ) { css::uno::Any aVal; - pItem->QueryValue( aVal, rProp.nMemberId ); + pItem->QueryValue( aVal, rProp.second.nMemberId ); aProperties.realloc( nCount + 1 ); - aProperties[ nCount ].Name = rProp.sName; + aProperties[ nCount ].Name = rProp.first; aProperties[ nCount ].Value = aVal; ++nCount; } |