summaryrefslogtreecommitdiff
path: root/sd/source/ui/view
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 /sd/source/ui/view
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 'sd/source/ui/view')
-rw-r--r--sd/source/ui/view/drtxtob.cxx3
-rw-r--r--sd/source/ui/view/outlnvsh.cxx2
-rw-r--r--sd/source/ui/view/viewshel.cxx3
3 files changed, 3 insertions, 5 deletions
diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx
index a5694b2c5af3..bf4deae1094a 100644
--- a/sd/source/ui/view/drtxtob.cxx
+++ b/sd/source/ui/view/drtxtob.cxx
@@ -224,8 +224,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
}
else
{
- std::unique_ptr<SfxPoolItem> pNewItem(pI->CloneSetWhich(nWhich));
- aAttrSet.Put( *pNewItem );
+ aAttrSet.Put( pI->CloneSetWhich(nWhich) );
}
}
else
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index 7f6e58798ac3..85ab5688c609 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -1268,7 +1268,7 @@ void OutlineViewShell::GetStatusBarState(SfxItemSet& rSet)
nZoomValues &= ~SvxZoomEnableFlags::PAGEWIDTH;
pZoomItem->SetValueSet( nZoomValues );
- rSet.Put( *pZoomItem );
+ rSet.Put( std::move(pZoomItem) );
}
if( SfxItemState::DEFAULT == rSet.GetItemState( SID_ATTR_ZOOMSLIDER ) )
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index 75fcbc469c32..09b321866f2e 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -893,8 +893,7 @@ const SfxPoolItem* ViewShell::GetNumBulletItem(SfxItemSet& aNewAttr, sal_uInt16&
if( pItem == nullptr )
pItem = aNewAttr.GetPool()->GetSecondaryPool()->GetPoolDefaultItem(EE_PARA_NUMBULLET);
- std::unique_ptr<SfxPoolItem> pNewItem(pItem->CloneSetWhich(EE_PARA_NUMBULLET));
- aNewAttr.Put(*pNewItem);
+ aNewAttr.Put(pItem->CloneSetWhich(EE_PARA_NUMBULLET));
if(bTitle && aNewAttr.GetItemState(EE_PARA_NUMBULLET) == SfxItemState::SET )
{