From e0382c3ad7786910bc9aa81cf581798df0f2508c Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 8 May 2019 08:29:46 +0200 Subject: avoid copying when placing items into SfxItemSet Change-Id: I05c627f590e7794c1ba11b66021dc30aa3285eb0 Reviewed-on: https://gerrit.libreoffice.org/71941 Tested-by: Jenkins Reviewed-by: Noel Grandin --- reportdesign/source/ui/misc/UITools.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'reportdesign') diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx index 395cb6c32452..220e913b2d09 100644 --- a/reportdesign/source/ui/misc/UITools.cxx +++ b/reportdesign/source/ui/misc/UITools.cxx @@ -272,10 +272,9 @@ namespace const SfxPoolItem* pItem = _rItemSet.GetItem(rProp.nWID); if ( pItem ) { - ::std::unique_ptr pClone(pItem->Clone()); + ::std::unique_ptr pClone(pItem->CloneSetWhich(rProp.nWID)); pClone->PutValue(_xShape->getPropertyValue(rProp.sName), rProp.nMemberId); - pClone->SetWhich(rProp.nWID); - _rItemSet.Put(*pClone); + _rItemSet.Put(std::move(pClone)); } } } -- cgit v1.2.3