summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-07-19 13:22:03 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-07-20 09:00:21 +0200
commitbb718c9e00bb4e3c1ab9dded4434ea58fdac00c6 (patch)
tree6d456688eb94223ae4c6fd82c3ee854262b2ac52
parent82a2a8f29e0f4bade59d26a7733f797188f1d57c (diff)
loplugin:useuniqueptr in SvxCSS1Parser
Change-Id: I586e6047f6723453801958e2d8f69ffbc4c47dcf Reviewed-on: https://gerrit.libreoffice.org/57756 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--sw/source/filter/html/svxcss1.cxx12
-rw-r--r--sw/source/filter/html/svxcss1.hxx4
2 files changed, 8 insertions, 8 deletions
diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx
index a46aba97c2cc..c7b832b540e1 100644
--- a/sw/source/filter/html/svxcss1.cxx
+++ b/sw/source/filter/html/svxcss1.cxx
@@ -769,14 +769,14 @@ SvxCSS1Parser::SvxCSS1Parser( SfxItemPool& rPool, const OUString& rBaseURL,
if( pWhichIds && nWhichIds )
BuildWhichTable( aWhichMap, pWhichIds, nWhichIds );
- pSheetItemSet = new SfxItemSet( rPool, &aWhichMap[0] );
- pSheetPropInfo = new SvxCSS1PropertyInfo;
+ pSheetItemSet.reset( new SfxItemSet( rPool, &aWhichMap[0] ) );
+ pSheetPropInfo.reset( new SvxCSS1PropertyInfo );
}
SvxCSS1Parser::~SvxCSS1Parser()
{
- delete pSheetItemSet;
- delete pSheetPropInfo;
+ pSheetItemSet.reset();
+ pSheetPropInfo.reset();
}
void SvxCSS1Parser::InsertId( const OUString& rId,
@@ -841,8 +841,8 @@ SvxCSS1MapEntry* SvxCSS1Parser::GetTag( const OUString& rTag )
bool SvxCSS1Parser::ParseStyleSheet( const OUString& rIn )
{
- pItemSet = pSheetItemSet;
- pPropInfo = pSheetPropInfo;
+ pItemSet = pSheetItemSet.get();
+ pPropInfo = pSheetPropInfo.get();
bool bSuccess = CSS1Parser::ParseStyleSheet( rIn );
diff --git a/sw/source/filter/html/svxcss1.hxx b/sw/source/filter/html/svxcss1.hxx
index 516887c54521..c5b6b68af433 100644
--- a/sw/source/filter/html/svxcss1.hxx
+++ b/sw/source/filter/html/svxcss1.hxx
@@ -192,10 +192,10 @@ class SvxCSS1Parser : public CSS1Parser
OUString sBaseURL;
- SfxItemSet *pSheetItemSet; // item set of Style-Sheet
+ std::unique_ptr<SfxItemSet> pSheetItemSet; // item set of Style-Sheet
SfxItemSet *pItemSet; // current item set
- SvxCSS1PropertyInfo *pSheetPropInfo;
+ std::unique_ptr<SvxCSS1PropertyInfo> pSheetPropInfo;
SvxCSS1PropertyInfo *pPropInfo;
sal_uInt16 nMinFixLineSpace; // minimum spacing for fixed line spacing