diff options
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/inc/lwpfont.hxx | 2 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwpfont.cxx | 7 |
2 files changed, 2 insertions, 7 deletions
diff --git a/lotuswordpro/inc/lwpfont.hxx b/lotuswordpro/inc/lwpfont.hxx index 6413f6ea887b..bcaec1233876 100644 --- a/lotuswordpro/inc/lwpfont.hxx +++ b/lotuswordpro/inc/lwpfont.hxx @@ -164,7 +164,7 @@ public: OUString GetNameByIndex(sal_uInt16 index); private: sal_uInt16 m_nCount; - LwpFontNameEntry* m_pFontNames; + std::unique_ptr<LwpFontNameEntry[]> m_pFontNames; LwpFontTable m_FontTbl; public: diff --git a/lotuswordpro/source/filter/lwpfont.cxx b/lotuswordpro/source/filter/lwpfont.cxx index 6b4739577083..fda432add2b4 100644 --- a/lotuswordpro/source/filter/lwpfont.cxx +++ b/lotuswordpro/source/filter/lwpfont.cxx @@ -362,11 +362,6 @@ LwpFontNameManager::LwpFontNameManager() LwpFontNameManager::~LwpFontNameManager() { - if(m_pFontNames) - { - delete [] m_pFontNames; - m_pFontNames = nullptr; - } } void LwpFontNameManager::Read(LwpObjectStream *pStrm) @@ -374,7 +369,7 @@ void LwpFontNameManager::Read(LwpObjectStream *pStrm) m_nCount = pStrm->QuickReaduInt16(); if(m_nCount>0) { - m_pFontNames = new LwpFontNameEntry[m_nCount]; + m_pFontNames.reset( new LwpFontNameEntry[m_nCount] ); for(sal_uInt16 i=0; i<m_nCount; i++) { m_pFontNames[i].Read(pStrm); |