summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-01-29 11:00:54 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-02-05 07:52:11 +0100
commitcf4ee7b872a67fa91bbbaa18a8effde71d6523c9 (patch)
tree311fb095d32731b7ee6e494e1355e536a7f0cd13 /editeng
parentd69d9cdc40d7a2f3d80688ab519fcf4c932b8f7b (diff)
loplugin:useuniqueptr in SvxRTFParser
Change-Id: I0d01e8612ff4e8eb1eb53a817c8fb586b61aa5bb Reviewed-on: https://gerrit.libreoffice.org/49150 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/rtf/svxrtf.cxx15
1 files changed, 4 insertions, 11 deletions
diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx
index b9d6dd33a887..297320a5658e 100644
--- a/editeng/source/rtf/svxrtf.cxx
+++ b/editeng/source/rtf/svxrtf.cxx
@@ -73,8 +73,8 @@ SvxRTFParser::SvxRTFParser( SfxItemPool& rPool, SvStream& rIn )
, bIsLeftToRightDef( true)
, bIsInReadStyleTab( false)
{
- pDfltFont = new vcl::Font;
- pDfltColor = new Color;
+ pDfltFont.reset( new vcl::Font );
+ pDfltColor.reset( new Color );
}
SvxRTFParser::~SvxRTFParser()
@@ -83,18 +83,11 @@ SvxRTFParser::~SvxRTFParser()
ClearColorTbl();
if( !aAttrStack.empty() )
ClearAttrStack();
-
- delete pRTFDefaults;
-
- delete pInsPos;
- delete pDfltFont;
- delete pDfltColor;
}
void SvxRTFParser::SetInsPos( const EditPosition& rNew )
{
- delete pInsPos;
- pInsPos = rNew.Clone();
+ pInsPos.reset( rNew.Clone() );
}
SvParserState SvxRTFParser::CallParser()
@@ -914,7 +907,7 @@ const SfxItemSet& SvxRTFParser::GetRTFDefaults()
{
if( !pRTFDefaults )
{
- pRTFDefaults = new SfxItemSet( *pAttrPool, &aWhichMap[0] );
+ pRTFDefaults.reset( new SfxItemSet( *pAttrPool, &aWhichMap[0] ) );
sal_uInt16 nId;
if( 0 != ( nId = aPardMap.nScriptSpace ))
{