diff options
-rw-r--r-- | lotuswordpro/source/filter/lwpfribsection.cxx | 9 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwpfribsection.hxx | 2 |
2 files changed, 3 insertions, 8 deletions
diff --git a/lotuswordpro/source/filter/lwpfribsection.cxx b/lotuswordpro/source/filter/lwpfribsection.cxx index 5d0211adf7ff..153e5cf373ee 100644 --- a/lotuswordpro/source/filter/lwpfribsection.cxx +++ b/lotuswordpro/source/filter/lwpfribsection.cxx @@ -70,18 +70,13 @@ #include <lwpglobalmgr.hxx> LwpFribSection::LwpFribSection(LwpPara *pPara) - : LwpFrib(pPara),m_pMasterPage(nullptr) + : LwpFrib(pPara) { } LwpFribSection::~LwpFribSection() { - if(m_pMasterPage) - { - delete m_pMasterPage; - m_pMasterPage = nullptr; - } } /** @@ -111,7 +106,7 @@ void LwpFribSection::RegisterSectionStyle() LwpPageLayout* pLayout = GetPageLayout(); if(pLayout) { - m_pMasterPage = new LwpMasterPage(m_pPara, pLayout); + m_pMasterPage.reset( new LwpMasterPage(m_pPara, pLayout) ); m_pMasterPage->RegisterMasterPage(this); } } diff --git a/lotuswordpro/source/filter/lwpfribsection.hxx b/lotuswordpro/source/filter/lwpfribsection.hxx index ce4ac2531e88..58e8c91a3e5f 100644 --- a/lotuswordpro/source/filter/lwpfribsection.hxx +++ b/lotuswordpro/source/filter/lwpfribsection.hxx @@ -118,7 +118,7 @@ private: private: LwpObjectID m_Section; - LwpMasterPage* m_pMasterPage; + std::unique_ptr<LwpMasterPage> m_pMasterPage; }; #endif |