[Libreoffice-commits] core.git: sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Jul 20 07:01:04 UTC 2018
sw/source/filter/html/swhtml.cxx | 10 +++++-----
sw/source/filter/html/swhtml.hxx | 6 +++---
2 files changed, 8 insertions(+), 8 deletions(-)
New commits:
commit af3a976ab355b8e67f91a6223427bf967fdaefff
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Jul 19 13:33:27 2018 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Jul 20 09:00:36 2018 +0200
loplugin:useuniqueptr in SwHTMLParser
Change-Id: Id8a9bc8b0190e1c469ea5cec71d465c9025ac5d0
Reviewed-on: https://gerrit.libreoffice.org/57757
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index e6368cf07c40..f8543d6f601c 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -354,7 +354,7 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCursor, SvStream& rIn,
m_bOldIsHTMLMode = m_xDoc->getIDocumentSettingAccess().get(DocumentSettingId::HTML_MODE);
m_xDoc->getIDocumentSettingAccess().set(DocumentSettingId::HTML_MODE, true);
- m_pCSS1Parser = new SwCSS1Parser( m_xDoc.get(), m_aFontHeights, m_sBaseURL, IsNewDoc() );
+ m_pCSS1Parser.reset( new SwCSS1Parser( m_xDoc.get(), m_aFontHeights, m_sBaseURL, IsNewDoc() ) );
m_pCSS1Parser->SetIgnoreFontFamily( rHtmlOptions.IsIgnoreFontFamily() );
if( bReadUTF8 )
@@ -473,13 +473,13 @@ SwHTMLParser::~SwHTMLParser()
m_aSetAttrTab.clear();
}
- delete m_pCSS1Parser;
- delete m_pNumRuleInfo;
+ m_pCSS1Parser.reset();
+ m_pNumRuleInfo.reset();
DeleteFormImpl();
DeleteFootEndNoteImpl();
OSL_ENSURE(!m_xTable.get(), "It exists still a open table");
- delete m_pImageMaps;
+ m_pImageMaps.reset();
OSL_ENSURE( !m_pPendStack,
"SwHTMLParser::~SwHTMLParser: Here should not be Pending-Stack anymore" );
@@ -2033,7 +2033,7 @@ void SwHTMLParser::NextToken( HtmlTokenId nToken )
if( ParseMapOptions( m_pImageMap) )
{
if (!m_pImageMaps)
- m_pImageMaps = new ImageMaps;
+ m_pImageMaps.reset( new ImageMaps );
m_pImageMaps->push_back(std::unique_ptr<ImageMap>(m_pImageMap));
}
else
diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx
index e6d927c96768..c8d5d32c3ccc 100644
--- a/sw/source/filter/html/swhtml.hxx
+++ b/sw/source/filter/html/swhtml.hxx
@@ -370,8 +370,8 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient
std::unique_ptr<SwApplet_Impl> m_pAppletImpl; // current applet
- SwCSS1Parser *m_pCSS1Parser; // Style-Sheet-Parser
- SwHTMLNumRuleInfo *m_pNumRuleInfo;
+ std::unique_ptr<SwCSS1Parser> m_pCSS1Parser; // Style-Sheet-Parser
+ std::unique_ptr<SwHTMLNumRuleInfo> m_pNumRuleInfo;
SwPendingStack *m_pPendStack;
rtl::Reference<SwDoc> m_xDoc;
@@ -385,7 +385,7 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient
SdrObject *m_pMarquee; // current marquee
std::unique_ptr<SwField> m_xField; // current field
ImageMap *m_pImageMap; // current image map
- ImageMaps *m_pImageMaps; ///< all Image-Maps that have been read
+ std::unique_ptr<ImageMaps> m_pImageMaps; ///< all Image-Maps that have been read
std::unique_ptr<SwHTMLFootEndNote_Impl> m_pFootEndNoteImpl;
Size m_aHTMLPageSize; // page size of HTML template
More information about the Libreoffice-commits
mailing list