Kaydet (Commit) dca7203a authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in LwpFribPageBreak

Change-Id: Id4d5c4c21a02be578d0cf571c744ec03b19d7d84
Reviewed-on: https://gerrit.libreoffice.org/50724Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst e8985cf0
......@@ -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;
}
......
......@@ -81,7 +81,7 @@ private:
LwpObjectID m_Layout;
bool m_bLastFrib;
LwpMasterPage* m_pMasterPage;
std::unique_ptr<LwpMasterPage> m_pMasterPage;
};
class LwpFribLineBreak: public LwpFrib
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment