summaryrefslogtreecommitdiff
path: root/sw/source/uibase/shells/frmsh.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-04-30 12:22:14 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-04-30 13:14:32 +0200
commite00c87caa399d37426d839f5264a747c115d0b12 (patch)
tree42418f076529d02e5bbbb405a48c65aacc478ae3 /sw/source/uibase/shells/frmsh.cxx
parent492675180203b3409074923d7993429237611f99 (diff)
loplugin:makeshared in sw
Change-Id: I58d91e75ef96beaab7ec34df519ae3a376dce976 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93201 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase/shells/frmsh.cxx')
-rw-r--r--sw/source/uibase/shells/frmsh.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx
index 61ab59bfc00e..186a6d337801 100644
--- a/sw/source/uibase/shells/frmsh.cxx
+++ b/sw/source/uibase/shells/frmsh.cxx
@@ -1101,7 +1101,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest const & rReq)
if (pPoolBoxItem == &rBoxItem)
bDefault = true;
- std::shared_ptr<SvxBoxItem> aBoxItem(rBoxItem.Clone());
+ std::unique_ptr<SvxBoxItem> aBoxItem(rBoxItem.Clone());
SvxBorderLine aBorderLine;
const SfxPoolItem *pItem = nullptr;
@@ -1114,7 +1114,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest const & rReq)
{
if (pArgs->GetItemState(RES_BOX, true, &pItem) == SfxItemState::SET)
{
- std::shared_ptr<SvxBoxItem> aNewBox(static_cast<SvxBoxItem*>(pItem->Clone()));
+ std::unique_ptr<SvxBoxItem> aNewBox(static_cast<SvxBoxItem*>(pItem->Clone()));
const SvxBorderLine* pBorderLine;
if ((pBorderLine = aBoxItem->GetTop()) != nullptr)
@@ -1142,7 +1142,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest const & rReq)
aNewBox->SetAllDistances(rBoxItem.GetSmallestDistance());
}
- aBoxItem = aNewBox;
+ aBoxItem = std::move(aNewBox);
if( aBoxItem->GetTop() != nullptr )
aBoxItem->SetLine(&aBorderLine, SvxBoxItemLine::TOP);