summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-09-14 13:53:30 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-09-18 10:53:45 +0200
commit9c3cf7a3f738b407b74909220ac68e7382f414e1 (patch)
tree3179f022cca0682b51e62de6cb4d69cb72751375 /sw
parentca35cd1136f30fa862ac24c6b3cf1c181450c3fa (diff)
loplugin:useuniqueptr in SwTextPainter::PaintMultiPortion
Change-Id: I7d3db85eb59ba44b529941ac166201d12c6fdf84 Reviewed-on: https://gerrit.libreoffice.org/60601 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/text/pormulti.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx
index 578d7643c0e1..22c6442285aa 100644
--- a/sw/source/core/text/pormulti.cxx
+++ b/sw/source/core/text/pormulti.cxx
@@ -1550,18 +1550,18 @@ void SwTextPainter::PaintMultiPortion( const SwRect &rPaint,
SwSpaceManipulator aManip( GetInfo(), rMulti );
- SwFontSave *pFontSave;
- SwFont* pTmpFnt;
+ std::unique_ptr<SwFontSave> pFontSave;
+ std::unique_ptr<SwFont> pTmpFnt;
if( rMulti.IsDouble() )
{
- pTmpFnt = new SwFont( *GetInfo().GetFont() );
+ pTmpFnt.reset(new SwFont( *GetInfo().GetFont() ));
if( rMulti.IsDouble() )
{
SetPropFont( 50 );
pTmpFnt->SetProportion( GetPropFont() );
}
- pFontSave = new SwFontSave( GetInfo(), pTmpFnt, this );
+ pFontSave.reset(new SwFontSave( GetInfo(), pTmpFnt.get(), this ));
}
else
{
@@ -1821,8 +1821,8 @@ void SwTextPainter::PaintMultiPortion( const SwRect &rPaint,
// Restore the saved values
GetInfo().X( nOldX );
GetInfo().SetLen( nOldLen );
- delete pFontSave;
- delete pTmpFnt;
+ pFontSave.reset();
+ pTmpFnt.reset();
SetPropFont( 0 );
}