summaryrefslogtreecommitdiff
path: root/lotuswordpro
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-03-01 10:34:23 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-03-05 07:31:45 +0100
commitdca7203aaba8e3ded03850d53b5d58280fdf5fb6 (patch)
tree19055f64d03b95ebe2c16f39781f4a8da41bdf67 /lotuswordpro
parente8985cf0e01e1ed78c397455a5fcdaf0b2be035c (diff)
loplugin:useuniqueptr in LwpFribPageBreak
Change-Id: Id4d5c4c21a02be578d0cf571c744ec03b19d7d84 Reviewed-on: https://gerrit.libreoffice.org/50724 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'lotuswordpro')
-rw-r--r--lotuswordpro/source/filter/lwpfribbreaks.cxx7
-rw-r--r--lotuswordpro/source/filter/lwpfribbreaks.hxx2
2 files changed, 2 insertions, 7 deletions
diff --git a/lotuswordpro/source/filter/lwpfribbreaks.cxx b/lotuswordpro/source/filter/lwpfribbreaks.cxx
index ee3f90c35129..540bf2f78fa0 100644
--- a/lotuswordpro/source/filter/lwpfribbreaks.cxx
+++ b/lotuswordpro/source/filter/lwpfribbreaks.cxx
@@ -106,11 +106,6 @@ LwpFribPageBreak::LwpFribPageBreak( LwpPara* pPara )
LwpFribPageBreak::~LwpFribPageBreak()
{
- if(m_pMasterPage)
- {
- delete m_pMasterPage;
- m_pMasterPage = nullptr;
- }
}
void LwpFribPageBreak::Read(LwpObjectStream * pObjStrm, sal_uInt16 /*len*/)
@@ -126,7 +121,7 @@ void LwpFribPageBreak::RegisterBreakStyle(LwpPara* pPara)
LwpPageLayout* pLayout = dynamic_cast<LwpPageLayout*>(m_Layout.obj().get());
if(pLayout)
{
- m_pMasterPage = new LwpMasterPage(pPara, pLayout);
+ m_pMasterPage.reset( new LwpMasterPage(pPara, pLayout) );
m_pMasterPage->RegisterMasterPage(this);
return;
}
diff --git a/lotuswordpro/source/filter/lwpfribbreaks.hxx b/lotuswordpro/source/filter/lwpfribbreaks.hxx
index bb4f42e01859..2c061041dcd8 100644
--- a/lotuswordpro/source/filter/lwpfribbreaks.hxx
+++ b/lotuswordpro/source/filter/lwpfribbreaks.hxx
@@ -81,7 +81,7 @@ private:
LwpObjectID m_Layout;
bool m_bLastFrib;
- LwpMasterPage* m_pMasterPage;
+ std::unique_ptr<LwpMasterPage> m_pMasterPage;
};
class LwpFribLineBreak: public LwpFrib