diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-06-02 09:13:02 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-06-02 10:45:44 +0200 |
commit | e6de84d46c2a41fc4ae53e2744d432e50c4a4ac1 (patch) | |
tree | 6be38c21e699cf240ff4b5eb3dd38e251dda96b5 /cui/source/tabpages/align.cxx | |
parent | 1577c0dc30ed3c9db361fb989e41a3e9d6c45dfa (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 'cui/source/tabpages/align.cxx')
-rw-r--r-- | cui/source/tabpages/align.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx index 12e93ae65c43..8d2425e7ef68 100644 --- a/cui/source/tabpages/align.cxx +++ b/cui/source/tabpages/align.cxx @@ -223,7 +223,7 @@ bool AlignmentTabPage::FillItemSet( SfxItemSet* rSet ) assert(pIndentItem); std::unique_ptr<SfxUInt16Item> pNewIndentItem(pIndentItem->Clone()); pNewIndentItem->SetValue(m_xEdIndent->get_value(FieldUnit::TWIP)); - rSet->Put(*pNewIndentItem); + rSet->Put(std::move(pNewIndentItem)); bChanged = true; } else if (SfxItemState::DEFAULT == rOldSet.GetItemState(nWhich, false)) @@ -266,7 +266,7 @@ bool AlignmentTabPage::FillItemSet( SfxItemSet* rSet ) assert(pAngleItem); std::unique_ptr<SdrAngleItem> pNewAngleItem(pAngleItem->Clone()); pNewAngleItem->SetValue(m_xCtrlDial->GetRotation()); - rSet->Put(*pNewAngleItem); + rSet->Put(std::move(pNewAngleItem)); bChanged = true; } else if (SfxItemState::DEFAULT == rOldSet.GetItemState(nWhich, false)) @@ -303,7 +303,7 @@ bool AlignmentTabPage::FillItemSet( SfxItemSet* rSet ) assert(pStackItem); std::unique_ptr<SfxBoolItem> pNewStackItem(pStackItem->Clone()); pNewStackItem->SetValue(m_xCbStacked->get_active()); - rSet->Put(*pNewStackItem); + rSet->Put(std::move(pNewStackItem)); bChanged = true; } else if (SfxItemState::DEFAULT == rOldSet.GetItemState(nWhich, false)) @@ -326,7 +326,7 @@ bool AlignmentTabPage::FillItemSet( SfxItemSet* rSet ) assert(pWrapItem); std::unique_ptr<SfxBoolItem> pNewWrapItem(pWrapItem->Clone()); pNewWrapItem->SetValue(m_xBtnWrap->get_active()); - rSet->Put(*pNewWrapItem); + rSet->Put(std::move(pNewWrapItem)); bChanged = true; } else if (SfxItemState::DEFAULT == rOldSet.GetItemState(nWhich, false)) @@ -340,7 +340,7 @@ bool AlignmentTabPage::FillItemSet( SfxItemSet* rSet ) assert(pHyphItem); std::unique_ptr<SfxBoolItem> pNewHyphItem(pHyphItem->Clone()); pNewHyphItem->SetValue(m_xBtnHyphen->get_active()); - rSet->Put(*pNewHyphItem); + rSet->Put(std::move(pNewHyphItem)); bChanged = true; } else if (SfxItemState::DEFAULT == rOldSet.GetItemState(nWhich, false)) @@ -354,7 +354,7 @@ bool AlignmentTabPage::FillItemSet( SfxItemSet* rSet ) assert(pShrinkItem); std::unique_ptr<SfxBoolItem> pNewShrinkItem(pShrinkItem->Clone()); pNewShrinkItem->SetValue(m_xBtnShrink->get_active()); - rSet->Put(*pNewShrinkItem); + rSet->Put(std::move(pNewShrinkItem)); bChanged = true; } else if (SfxItemState::DEFAULT == rOldSet.GetItemState(nWhich, false)) |