summaryrefslogtreecommitdiff
path: root/lotuswordpro/source/filter/lwpfribsection.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-04-03 11:36:57 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-04-03 12:38:46 +0200
commit86e54f2d757fe300ba634cdcbf0ee8a589dbc2ae (patch)
tree691ebc93098a0421dcf7f93fc07df3a06b6a879c /lotuswordpro/source/filter/lwpfribsection.cxx
parent222dc6ef01ae56f9c77d225f96a99a93f841e809 (diff)
loplugin:useuniqueptr in XFStyleContainer
Change-Id: I0a9765ab4107a534f211e3531f7948516f1a0c02 Reviewed-on: https://gerrit.libreoffice.org/52297 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'lotuswordpro/source/filter/lwpfribsection.cxx')
-rw-r--r--lotuswordpro/source/filter/lwpfribsection.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/lotuswordpro/source/filter/lwpfribsection.cxx b/lotuswordpro/source/filter/lwpfribsection.cxx
index 153e5cf373ee..95bd07ca1644 100644
--- a/lotuswordpro/source/filter/lwpfribsection.cxx
+++ b/lotuswordpro/source/filter/lwpfribsection.cxx
@@ -302,11 +302,11 @@ void LwpMasterPage::RegisterMasterPage(LwpFrib* pFrib)
m_pPara->RegisterTabStyle(xOverStyle.get());
XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
- m_StyleName = pXFStyleManager->AddStyle(xOverStyle.release()).m_pStyle->GetStyleName();
+ m_StyleName = pXFStyleManager->AddStyle(std::move(xOverStyle)).m_pStyle->GetStyleName();
//register section style here
if(m_bNewSection)
{
- XFSectionStyle* pSectStyle= new XFSectionStyle();
+ std::unique_ptr<XFSectionStyle> pSectStyle(new XFSectionStyle());
//set margin
pStory = dynamic_cast<LwpStory*>(m_pPara->GetStoryID().obj().get());
LwpPageLayout* pCurrentLayout = pStory ? pStory->GetCurrentLayout() : nullptr;
@@ -327,7 +327,7 @@ void LwpMasterPage::RegisterMasterPage(LwpFrib* pFrib)
pSectStyle->SetColumns(pColumns);
}
//}
- m_SectionStyleName = pXFStyleManager->AddStyle(pSectStyle).m_pStyle->GetStyleName();
+ m_SectionStyleName = pXFStyleManager->AddStyle(std::move(pSectStyle)).m_pStyle->GetStyleName();
}
}
@@ -433,12 +433,12 @@ void LwpMasterPage::RegisterFillerPageStyle()
{
if(m_pLayout->HasFillerPageText(m_pPara->GetFoundry()))
{
- XFParaStyle* pPagebreakStyle = new XFParaStyle;
+ std::unique_ptr<XFParaStyle> pPagebreakStyle(new XFParaStyle);
*pPagebreakStyle = *(m_pPara->GetXFParaStyle());
pPagebreakStyle->SetStyleName("");
pPagebreakStyle->SetBreaks(enumXFBreakAftPage);
XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
- m_FillerPageStyleName= pXFStyleManager->AddStyle(pPagebreakStyle).m_pStyle->GetStyleName();
+ m_FillerPageStyleName= pXFStyleManager->AddStyle(std::move(pPagebreakStyle)).m_pStyle->GetStyleName();
}
}
}