summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-02-06 14:56:30 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-02-19 07:12:19 +0100
commite7d2ebe2fdb05ccdc742cc7c3d910880ba73ceef (patch)
treee28299fcbceea1c5255675754cd27d72ebc94910 /svx
parent6e5d8bb2d60c2e44aa1d2bf7810bff09b9ceabb5 (diff)
loplugin:useuniqueptr in SvxLineStyleToolBoxControl
Change-Id: I83e1536a1d45fffbf4fc5ddb611e382568ebf26c Reviewed-on: https://gerrit.libreoffice.org/49934 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/tbxctrls/linectrl.cxx8
1 files changed, 2 insertions, 6 deletions
diff --git a/svx/source/tbxctrls/linectrl.cxx b/svx/source/tbxctrls/linectrl.cxx
index d562abf9b4ca..4360b8155156 100644
--- a/svx/source/tbxctrls/linectrl.cxx
+++ b/svx/source/tbxctrls/linectrl.cxx
@@ -69,8 +69,6 @@ SvxLineStyleToolBoxControl::SvxLineStyleToolBoxControl( sal_uInt16 nSlotId,
SvxLineStyleToolBoxControl::~SvxLineStyleToolBoxControl()
{
- delete pStyleItem;
- delete pDashItem;
}
@@ -95,13 +93,11 @@ void SvxLineStyleToolBoxControl::StateChanged (
{
if( nSID == SID_ATTR_LINE_STYLE )
{
- delete pStyleItem;
- pStyleItem = static_cast<XLineStyleItem*>(pState->Clone());
+ pStyleItem.reset( static_cast<XLineStyleItem*>(pState->Clone()) );
}
else if( nSID == SID_ATTR_LINE_DASH )
{
- delete pDashItem;
- pDashItem = static_cast<XLineDashItem*>(pState->Clone());
+ pDashItem.reset( static_cast<XLineDashItem*>(pState->Clone()) );
}
bUpdate = true;