diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-25 14:20:43 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-26 08:38:08 +0200 |
commit | c9c97b4eb050dae10cbecebb815eae84cff7dde0 (patch) | |
tree | 195ca229bab1fc43e0fe64fd5a4443acf12abb93 /sw | |
parent | 8ceb8e9d9bf352d5a79894ecb04326284b642810 (diff) |
loplugin:useuniqueptr in SwWW8ImplReader
Change-Id: I81473abfd71f816495fe562dd57f987df03c11ab
Reviewed-on: https://gerrit.libreoffice.org/58019
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par.hxx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index cff3375c1999..8492427b7315 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -5285,7 +5285,7 @@ ErrCode SwWW8ImplReader::CoreLoad(WW8Glossary const *pGloss) m_xSBase.reset(); m_xWDop.reset(); m_xFonts.reset(); - delete m_pAtnNames; + m_pAtnNames.reset(); m_xSprmParser.reset(); m_xProgress.reset(); @@ -6018,7 +6018,7 @@ const OUString* SwWW8ImplReader::GetAnnotationAuthor(sal_uInt16 nIdx) if (!m_pAtnNames && m_xWwFib->m_lcbGrpStAtnOwners) { // Determine authors: can be found in the TableStream - m_pAtnNames = new std::vector<OUString>; + m_pAtnNames.reset(new std::vector<OUString>); SvStream& rStrm = *m_pTableStream; long nOldPos = rStrm.Tell(); diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index 8002dbf37edf..0841fbd3d9db 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -1248,7 +1248,7 @@ private: std::unique_ptr<SwMSDffManager> m_xMSDffManager; - std::vector<OUString>* m_pAtnNames; + std::unique_ptr<std::vector<OUString>> m_pAtnNames; std::unique_ptr<WW8SmartTagData> m_pSmartTagData; |