summaryrefslogtreecommitdiff
path: root/svx/source/svdraw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-02-05 11:01:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-02-07 09:46:45 +0100
commitf4b9c35c018ccacd7f8cf71c534863239b0da02c (patch)
tree89b1b19c5ae2ea6aeeaa9d1239a603e9143cbfaf /svx/source/svdraw
parent9b1adb42c97115b3f670f32639dd3f6d80f0d33e (diff)
loplugin:useuniqueptr in SdrUndoObjSetText
Change-Id: Idd1eb8263d679efed0f0be88fb05963fe44f8668 Reviewed-on: https://gerrit.libreoffice.org/49328 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/svdraw')
-rw-r--r--svx/source/svdraw/svdundo.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx
index ba2bff175356..3f607186f87f 100644
--- a/svx/source/svdraw/svdundo.cxx
+++ b/svx/source/svdraw/svdundo.cxx
@@ -1032,15 +1032,15 @@ SdrUndoObjSetText::SdrUndoObjSetText(SdrObject& rNewObj, sal_Int32 nText)
{
SdrText* pText = static_cast< SdrTextObj*>( &rNewObj )->getText(mnText);
if( pText && pText->GetOutlinerParaObject() )
- pOldText = new OutlinerParaObject(*pText->GetOutlinerParaObject());
+ pOldText.reset( new OutlinerParaObject(*pText->GetOutlinerParaObject()) );
bEmptyPresObj = rNewObj.IsEmptyPresObj();
}
SdrUndoObjSetText::~SdrUndoObjSetText()
{
- delete pOldText;
- delete pNewText;
+ pOldText.reset();
+ pNewText.reset();
}
void SdrUndoObjSetText::AfterSetText()
@@ -1049,7 +1049,7 @@ void SdrUndoObjSetText::AfterSetText()
{
SdrText* pText = static_cast< SdrTextObj*>( pObj )->getText(mnText);
if( pText && pText->GetOutlinerParaObject() )
- pNewText = new OutlinerParaObject(*pText->GetOutlinerParaObject());
+ pNewText.reset( new OutlinerParaObject(*pText->GetOutlinerParaObject()) );
bNewTextAvailable=true;
}
}
@@ -1172,7 +1172,7 @@ void SdrUndoObjSetText::SdrRepeat(SdrView& rView)
if( bUndo )
rView.AddUndo(new SdrUndoObjSetText(*pTextObj,0));
- OutlinerParaObject* pText1=pNewText;
+ OutlinerParaObject* pText1=pNewText.get();
if (pText1!=nullptr)
pText1 = new OutlinerParaObject(*pText1);
pTextObj->SetOutlinerParaObject(pText1);