diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-05-08 08:29:46 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-05-09 08:47:50 +0200 |
commit | e0382c3ad7786910bc9aa81cf581798df0f2508c (patch) | |
tree | 6acb0196add99896ced2aa1a76ff5b432bc45401 /reportdesign | |
parent | 38a684f72988f29e1c07bf9fa5a83e275e80e24c (diff) |
avoid copying when placing items into SfxItemSet
Change-Id: I05c627f590e7794c1ba11b66021dc30aa3285eb0
Reviewed-on: https://gerrit.libreoffice.org/71941
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'reportdesign')
-rw-r--r-- | reportdesign/source/ui/misc/UITools.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
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<SfxPoolItem> pClone(pItem->Clone()); + ::std::unique_ptr<SfxPoolItem> 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)); } } } |