[Libreoffice-commits] core.git: 2 commits - sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Jul 26 06:35:30 UTC 2018
sw/source/filter/ww8/docxexport.cxx | 5 ++---
sw/source/filter/ww8/docxexport.hxx | 2 +-
sw/source/filter/ww8/ww8par.cxx | 3 +--
sw/source/filter/ww8/ww8par.hxx | 2 +-
sw/source/filter/ww8/ww8par5.cxx | 2 +-
5 files changed, 6 insertions(+), 8 deletions(-)
New commits:
commit cb91af4c3b1808e14be5e2476f2b6f645807184f
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Jul 25 16:12:49 2018 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Jul 26 08:35:10 2018 +0200
loplugin:useuniqueptr in SwWW8ImplReader
Change-Id: Id924a16aa9ee2935606bf89d676145d1f68f236e
Reviewed-on: https://gerrit.libreoffice.org/58020
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index faa8d720e04d..cff3375c1999 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -2839,8 +2839,7 @@ void SwWW8ImplReader::PostProcessAttrs()
while (!aIter.IsAtEnd() && nullptr != (pItem = aIter.NextItem()));
}
- delete m_pPostProcessAttrsInfo;
- m_pPostProcessAttrsInfo = nullptr;
+ m_pPostProcessAttrsInfo.reset();
}
}
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index bf342b0b4345..8002dbf37edf 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -1205,7 +1205,7 @@ private:
*/
std::set<sal_uLong> m_aGrafPosSet;
- WW8PostProcessAttrsInfo * m_pPostProcessAttrsInfo;
+ std::unique_ptr<WW8PostProcessAttrsInfo> m_pPostProcessAttrsInfo;
std::shared_ptr<WW8Fib> m_xWwFib;
std::unique_ptr<WW8Fonts> m_xFonts;
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 9173f37edfaf..bd85516ccecc 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -2293,7 +2293,7 @@ eF_ResT SwWW8ImplReader::Read_F_Macro( WW8FieldDesc*, OUString& rStr)
aPaM.Move(fnMoveBackward);
aPaM.Exchange();
- m_pPostProcessAttrsInfo = new WW8PostProcessAttrsInfo(nCp, nCp, aPaM);
+ m_pPostProcessAttrsInfo.reset(new WW8PostProcessAttrsInfo(nCp, nCp, aPaM));
}
else
{
commit c99d883447cc37b017d8c2fce95877177095d301
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Jul 25 13:49:07 2018 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Jul 26 08:35:01 2018 +0200
loplugin:useuniqueptr in DocxExport
Change-Id: I8d98585fa759070a82bf5738d20b018ec9fbabf0
Reviewed-on: https://gerrit.libreoffice.org/58016
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index c3bf421ef793..82125851f571 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -511,7 +511,7 @@ void DocxExport::ExportDocument_Impl()
InitStyles();
// init sections
- m_pSections = new MSWordSections( *this );
+ m_pSections.reset(new MSWordSections( *this ));
// Make sure images are counted from one, even when exporting multiple documents.
oox::drawingml::DrawingML::ResetCounters();
@@ -541,8 +541,7 @@ void DocxExport::ExportDocument_Impl()
m_aLinkedTextboxesHelper.clear(); //final cleanup
delete m_pStyles;
m_pStyles = nullptr;
- delete m_pSections;
- m_pSections = nullptr;
+ m_pSections.reset();
}
void DocxExport::AppendSection( const SwPageDesc *pPageDesc, const SwSectionFormat* pFormat, sal_uLong nLnNum )
diff --git a/sw/source/filter/ww8/docxexport.hxx b/sw/source/filter/ww8/docxexport.hxx
index 12813a33f507..8361f81e2691 100644
--- a/sw/source/filter/ww8/docxexport.hxx
+++ b/sw/source/filter/ww8/docxexport.hxx
@@ -82,7 +82,7 @@ class DocxExport : public MSWordExportBase
std::unique_ptr<DocxAttributeOutput> m_pAttrOutput;
/// Sections/headers/footers
- MSWordSections *m_pSections;
+ std::unique_ptr<MSWordSections> m_pSections;
/// Header counter.
sal_Int32 m_nHeaders;
More information about the Libreoffice-commits
mailing list