summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-01-15 09:08:33 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-01-15 09:09:03 +0000
commitd1a8f99048ac4c7a84be38eb1d71aa90572e395a (patch)
tree9cfd4bb508482138dfe528aa49bc9a95345f6ddf
parenta3073d346be17da7b35e2511871511af710add24 (diff)
ofz#5305 Direct-leak
Change-Id: Id2c66d30a24a8888d719c579d3211cf41050d87e
-rw-r--r--lotuswordpro/source/filter/lwpfribsection.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/lotuswordpro/source/filter/lwpfribsection.cxx b/lotuswordpro/source/filter/lwpfribsection.cxx
index 7c64bb2e0068..5d0211adf7ff 100644
--- a/lotuswordpro/source/filter/lwpfribsection.cxx
+++ b/lotuswordpro/source/filter/lwpfribsection.cxx
@@ -259,9 +259,9 @@ void LwpMasterPage::RegisterMasterPage(LwpFrib* pFrib)
m_bNewSection = false;
//sal_Bool bSectionColumns = sal_False;
- XFParaStyle* pOverStyle = new XFParaStyle;
- *pOverStyle = *(m_pPara->GetXFParaStyle());
- pOverStyle->SetStyleName("");
+ std::unique_ptr<XFParaStyle> xOverStyle(new XFParaStyle);
+ *xOverStyle = *(m_pPara->GetXFParaStyle());
+ xOverStyle->SetStyleName("");
LwpLayout::UseWhenType eUserType = m_pLayout->GetUseWhenType();
switch(eUserType)
@@ -289,7 +289,7 @@ void LwpMasterPage::RegisterMasterPage(LwpFrib* pFrib)
m_pLayout = pStory->GetCurrentLayout();
m_bNewSection = IsNeedSection();
//bSectionColumns = m_bNewSection;
- pOverStyle->SetMasterPage( m_pLayout->GetStyleName());
+ xOverStyle->SetMasterPage(m_pLayout->GetStyleName());
RegisterFillerPageStyle();
}
break;
@@ -304,10 +304,10 @@ void LwpMasterPage::RegisterMasterPage(LwpFrib* pFrib)
return;
pStory->SetTabLayout(m_pLayout);
- m_pPara->RegisterTabStyle(pOverStyle);
+ m_pPara->RegisterTabStyle(xOverStyle.get());
XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
- m_StyleName = pXFStyleManager->AddStyle(pOverStyle).m_pStyle->GetStyleName();
+ m_StyleName = pXFStyleManager->AddStyle(xOverStyle.release()).m_pStyle->GetStyleName();
//register section style here
if(m_bNewSection)
{