summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/viewutil.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-05-08 08:29:46 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-05-09 08:47:50 +0200
commite0382c3ad7786910bc9aa81cf581798df0f2508c (patch)
tree6acb0196add99896ced2aa1a76ff5b432bc45401 /sc/source/ui/view/viewutil.cxx
parent38a684f72988f29e1c07bf9fa5a83e275e80e24c (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 'sc/source/ui/view/viewutil.cxx')
-rw-r--r--sc/source/ui/view/viewutil.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx
index 1cfa805b985c..9eb5ea31ee44 100644
--- a/sc/source/ui/view/viewutil.cxx
+++ b/sc/source/ui/view/viewutil.cxx
@@ -64,8 +64,7 @@ void ScViewUtil::PutItemScript( SfxItemSet& rShellSet, const SfxItemSet& rCoreSe
const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScript );
if (pI)
{
- std::unique_ptr<SfxPoolItem> pNewItem(pI->CloneSetWhich(nWhichId));
- rShellSet.Put( *pNewItem );
+ rShellSet.Put( pI->CloneSetWhich(nWhichId) );
}
else
rShellSet.InvalidateItem( nWhichId );