svl/source/items/itempool.cxx | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-)
New commits: commit 2c7358f5d2618c3f13b94752808d7073bf80cde5 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Fri Sep 6 07:26:53 2024 +0200 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Fri Sep 6 09:36:43 2024 +0200 Deduplicate some code Change-Id: Ic095e3665c98752493d1b47aa6962e87a3d1e319 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172903 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx index 8471e2050d19..ea9166c37618 100644 --- a/svl/source/items/itempool.cxx +++ b/svl/source/items/itempool.cxx @@ -898,15 +898,7 @@ void SfxItemPool::GetItemSurrogatesForItem(ItemSurrogates& rTarget, SfxItemType void SfxItemPool::GetItemSurrogatesForItem(ItemSurrogates& rTarget, const SfxPoolItem& rItem) const { assert(rItem.isNameOrIndex() && "ITEM: only Items derived from NameOrIndex supported for this mechanism (!)"); - rTarget.clear(); - const registeredNameOrIndex& rRegistered(GetMasterPool()->maRegisteredNameOrIndex); - registeredNameOrIndex::const_iterator aHit(rRegistered.find(rItem.ItemType())); - if (aHit != rRegistered.end()) - { - rTarget.reserve(aHit->second.size()); - for (const auto& entry : aHit->second) - rTarget.push_back(entry.first); - } + GetItemSurrogatesForItem(rTarget, rItem.ItemType()); } void SfxItemPool::GetItemSurrogates(ItemSurrogates& rTarget, sal_uInt16 nWhich) const