summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-06-02 09:13:02 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-06-02 10:45:44 +0200
commite6de84d46c2a41fc4ae53e2744d432e50c4a4ac1 (patch)
tree6be38c21e699cf240ff4b5eb3dd38e251dda96b5 /svx
parent1577c0dc30ed3c9db361fb989e41a3e9d6c45dfa (diff)
std::move SfxPoolItem into SfxItemSet where possible
found with the help of a temporary loplugin (which i have put into the store/ folder) Change-Id: Ide40d09bef6993ace50039a8fd0439b7e29c09a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135288 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/sdr/properties/attributeproperties.cxx5
-rw-r--r--svx/source/svdraw/svdmodel.cxx5
-rw-r--r--svx/source/unodraw/UnoNameItemTable.cxx4
3 files changed, 4 insertions, 10 deletions
diff --git a/svx/source/sdr/properties/attributeproperties.cxx b/svx/source/sdr/properties/attributeproperties.cxx
index a6bcaf40da65..7f141b8f65b7 100644
--- a/svx/source/sdr/properties/attributeproperties.cxx
+++ b/svx/source/sdr/properties/attributeproperties.cxx
@@ -339,10 +339,7 @@ namespace sdr::properties
if(pResultItem)
{
// force ItemSet
- mxItemSet->Put(*pResultItem);
-
- // delete item if it was a generated one
- pResultItem.reset();
+ mxItemSet->Put(std::move(pResultItem));
}
else
{
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index f5218c997ca6..acf05bd94d21 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -1668,10 +1668,7 @@ void SdrModel::MigrateItemSet( const SfxItemSet* pSourceSet, SfxItemSet* pDestSe
// set item
if( pResultItem )
- {
- pDestSet->Put(*pResultItem);
- pResultItem.reset();
- }
+ pDestSet->Put(std::move(pResultItem));
else
pDestSet->Put(*pPoolItem);
}
diff --git a/svx/source/unodraw/UnoNameItemTable.cxx b/svx/source/unodraw/UnoNameItemTable.cxx
index 71569ae7ab51..67b1dcc7d59c 100644
--- a/svx/source/unodraw/UnoNameItemTable.cxx
+++ b/svx/source/unodraw/UnoNameItemTable.cxx
@@ -107,7 +107,7 @@ void SvxUnoNameItemTable::ImplInsertByName( const OUString& aName, const uno::An
xNewItem->SetName(aName);
xNewItem->PutValue(aElement, mnMemberId);
xNewItem->SetWhich(mnWhich);
- maItemSetVector.back()->Put(*xNewItem);
+ maItemSetVector.back()->Put(std::move(xNewItem));
}
// XNameContainer
@@ -172,7 +172,7 @@ void SAL_CALL SvxUnoNameItemTable::replaceByName( const OUString& aApiName, cons
xNewItem->SetName(aName);
if (!xNewItem->PutValue(aElement, mnMemberId) || !isValid(xNewItem.get()))
throw lang::IllegalArgumentException();
- (*aIter)->Put(*xNewItem);
+ (*aIter)->Put(std::move(xNewItem));
return;
}