[Libreoffice-commits] core.git: lotuswordpro/source

Caolán McNamara caolanm at redhat.com
Mon Jan 15 09:13:55 UTC 2018


 lotuswordpro/source/filter/lwpfribsection.cxx |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit d1a8f99048ac4c7a84be38eb1d71aa90572e395a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jan 15 09:08:33 2018 +0000

    ofz#5305 Direct-leak
    
    Change-Id: Id2c66d30a24a8888d719c579d3211cf41050d87e

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)
     {


More information about the Libreoffice-commits mailing list