summaryrefslogtreecommitdiffstats
path: root/lotuswordpro/source/filter/lwptoc.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'lotuswordpro/source/filter/lwptoc.cxx')
-rw-r--r--lotuswordpro/source/filter/lwptoc.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/lotuswordpro/source/filter/lwptoc.cxx b/lotuswordpro/source/filter/lwptoc.cxx
index 3f2add0b96a2..037ecd72ef1f 100644
--- a/lotuswordpro/source/filter/lwptoc.cxx
+++ b/lotuswordpro/source/filter/lwptoc.cxx
@@ -132,11 +132,11 @@ void LwpTocSuperLayout::RegisterStyle()
// Get font info of default text style and set into tab style
const LwpObjectID *pDefaultTextStyle = m_pFoundry ? m_pFoundry->GetDefaultTextStyle() : nullptr;
XFParaStyle* pBaseStyle = pDefaultTextStyle ? dynamic_cast<XFParaStyle*>(m_pFoundry->GetStyleManager()->GetStyle(*pDefaultTextStyle)) : nullptr;
- XFTextStyle*pTextStyle = new XFTextStyle;
+ std::unique_ptr<XFTextStyle> pTextStyle(new XFTextStyle);
if (pBaseStyle)
pTextStyle->SetFont(pBaseStyle->GetFont()); // who delete this font?????
XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
- m_TabStyleName = pXFStyleManager->AddStyle(pTextStyle).m_pStyle->GetStyleName();
+ m_TabStyleName = pXFStyleManager->AddStyle(std::move(pTextStyle)).m_pStyle->GetStyleName();
}
/**