[Libreoffice-commits] core.git: sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Jul 20 07:00:49 UTC 2018
sw/source/filter/html/svxcss1.cxx | 12 ++++++------
sw/source/filter/html/svxcss1.hxx | 4 ++--
2 files changed, 8 insertions(+), 8 deletions(-)
New commits:
commit bb718c9e00bb4e3c1ab9dded4434ea58fdac00c6
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Jul 19 13:22:03 2018 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Jul 20 09:00:21 2018 +0200
loplugin:useuniqueptr in SvxCSS1Parser
Change-Id: I586e6047f6723453801958e2d8f69ffbc4c47dcf
Reviewed-on: https://gerrit.libreoffice.org/57756
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
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
More information about the Libreoffice-commits
mailing list