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

Noel Grandin noel.grandin at collabora.co.uk
Wed Jan 11 13:12:05 UTC 2017


 lotuswordpro/source/filter/lwpbreaksoverride.cxx      |    7 --
 lotuswordpro/source/filter/lwpbreaksoverride.hxx      |    2 
 lotuswordpro/source/filter/lwpcelllayout.cxx          |    4 -
 lotuswordpro/source/filter/lwpcharacterstyle.cxx      |   26 +++++-----
 lotuswordpro/source/filter/lwpcontent.cxx             |    2 
 lotuswordpro/source/filter/lwpdivinfo.cxx             |   26 +++++-----
 lotuswordpro/source/filter/lwpdivopts.cxx             |    4 -
 lotuswordpro/source/filter/lwpdlvlist.cxx             |    6 +-
 lotuswordpro/source/filter/lwpdoc.cxx                 |   34 ++++++-------
 lotuswordpro/source/filter/lwpdocdata.cxx             |   46 +++++++++---------
 lotuswordpro/source/filter/lwpfootnote.cxx            |   18 +++----
 lotuswordpro/source/filter/lwpframelayout.cxx         |   10 +--
 lotuswordpro/source/filter/lwpframelayout.hxx         |    4 -
 lotuswordpro/source/filter/lwpfrib.cxx                |    3 -
 lotuswordpro/source/filter/lwpfrib.hxx                |    4 -
 lotuswordpro/source/filter/lwpholder.cxx              |    8 +--
 lotuswordpro/source/filter/lwplayout.cxx              |    9 +--
 lotuswordpro/source/filter/lwplayout.hxx              |    2 
 lotuswordpro/source/filter/lwplaypiece.cxx            |   30 +++++------
 lotuswordpro/source/filter/lwpmarker.cxx              |   24 ++++-----
 lotuswordpro/source/filter/lwpnotes.cxx               |    6 +-
 lotuswordpro/source/filter/lwpnumericfmt.hxx          |    2 
 lotuswordpro/source/filter/lwpobj.cxx                 |    9 +--
 lotuswordpro/source/filter/lwpobj.hxx                 |    2 
 lotuswordpro/source/filter/lwpoleobject.cxx           |    8 +--
 lotuswordpro/source/filter/lwppagehint.cxx            |   12 ++--
 lotuswordpro/source/filter/lwppagelayout.cxx          |    4 -
 lotuswordpro/source/filter/lwppara.cxx                |   14 ++---
 lotuswordpro/source/filter/lwpparaproperty.cxx        |    1 
 lotuswordpro/source/filter/lwpparaproperty.hxx        |    4 -
 lotuswordpro/source/filter/lwpparastyle.cxx           |   34 ++++++-------
 lotuswordpro/source/filter/lwppiece.hxx               |    2 
 lotuswordpro/source/filter/lwpproplist.cxx            |    4 -
 lotuswordpro/source/filter/lwprowlayout.cxx           |    4 -
 lotuswordpro/source/filter/lwpsection.cxx             |   18 +++----
 lotuswordpro/source/filter/lwpsilverbullet.cxx        |    5 -
 lotuswordpro/source/filter/lwpsilverbullet.hxx        |    2 
 lotuswordpro/source/filter/lwpstory.cxx               |    5 -
 lotuswordpro/source/filter/lwpstory.hxx               |    4 -
 lotuswordpro/source/filter/lwptable.cxx               |   10 +--
 lotuswordpro/source/filter/lwptablelayout.cxx         |    4 -
 lotuswordpro/source/filter/lwptabrack.cxx             |    4 -
 lotuswordpro/source/filter/lwptblcell.cxx             |   26 +++++-----
 lotuswordpro/source/filter/lwptblformula.cxx          |    6 +-
 lotuswordpro/source/filter/lwptoc.cxx                 |   16 +++---
 lotuswordpro/source/filter/lwpverdocument.cxx         |    4 -
 lotuswordpro/source/filter/lwpvpointer.cxx            |    2 
 lotuswordpro/source/filter/tocread.cxx                |   10 +--
 lotuswordpro/source/filter/tocread.hxx                |    5 -
 lotuswordpro/source/filter/xfilter/xfcell.cxx         |    5 -
 lotuswordpro/source/filter/xfilter/xfcell.hxx         |    5 +
 lotuswordpro/source/filter/xfilter/xfcellstyle.cxx    |    4 -
 lotuswordpro/source/filter/xfilter/xfcellstyle.hxx    |    4 +
 lotuswordpro/source/filter/xfilter/xfsaxstream.cxx    |    5 -
 lotuswordpro/source/filter/xfilter/xfsaxstream.hxx    |    3 -
 lotuswordpro/source/filter/xfilter/xfsectionstyle.cxx |    4 -
 lotuswordpro/source/filter/xfilter/xfsectionstyle.hxx |    3 -
 lotuswordpro/source/filter/xfilter/xftablestyle.cxx   |    5 -
 lotuswordpro/source/filter/xfilter/xftablestyle.hxx   |    3 -
 59 files changed, 260 insertions(+), 277 deletions(-)

New commits:
commit 549efd7f82d9da621294d496e43420c95e9bf500
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Wed Jan 11 12:51:11 2017 +0200

    new loplugin: useuniqueptr: lotuswordpro
    
    Change-Id: I1f9569cb5ca05faf12663b3df8508d10a8cd75e6
    Reviewed-on: https://gerrit.libreoffice.org/32957
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/lotuswordpro/source/filter/lwpbreaksoverride.cxx b/lotuswordpro/source/filter/lwpbreaksoverride.cxx
index 69514f9..9d59252 100644
--- a/lotuswordpro/source/filter/lwpbreaksoverride.cxx
+++ b/lotuswordpro/source/filter/lwpbreaksoverride.cxx
@@ -65,21 +65,18 @@
 #include "lwpatomholder.hxx"
 
 LwpBreaksOverride::LwpBreaksOverride()
+    : m_pNextStyle( new LwpAtomHolder )
 {
-    m_pNextStyle = new LwpAtomHolder();
 }
 
 LwpBreaksOverride::LwpBreaksOverride(LwpBreaksOverride const& rOther)
     : LwpOverride(rOther)
-    , m_pNextStyle(nullptr)
+    , m_pNextStyle(::clone(rOther.m_pNextStyle.get()))
 {
-    std::unique_ptr<LwpAtomHolder> pNextStyle(::clone(rOther.m_pNextStyle));
-    m_pNextStyle = pNextStyle.release();
 }
 
 LwpBreaksOverride::~LwpBreaksOverride()
 {
-    delete m_pNextStyle;
 }
 
 LwpBreaksOverride* LwpBreaksOverride::clone() const
diff --git a/lotuswordpro/source/filter/lwpbreaksoverride.hxx b/lotuswordpro/source/filter/lwpbreaksoverride.hxx
index c1808c1..c833762 100644
--- a/lotuswordpro/source/filter/lwpbreaksoverride.hxx
+++ b/lotuswordpro/source/filter/lwpbreaksoverride.hxx
@@ -133,7 +133,7 @@ private:
     LwpBreaksOverride& operator=(const LwpBreaksOverride& rOther) = delete;
 
 private:
-    LwpAtomHolder       *m_pNextStyle;
+    std::unique_ptr<LwpAtomHolder>  m_pNextStyle;
 };
 
 inline bool LwpBreaksOverride::IsPageBreakBefore()
diff --git a/lotuswordpro/source/filter/lwpcelllayout.cxx b/lotuswordpro/source/filter/lwpcelllayout.cxx
index 087566c..6d87c39 100644
--- a/lotuswordpro/source/filter/lwpcelllayout.cxx
+++ b/lotuswordpro/source/filter/lwpcelllayout.cxx
@@ -608,7 +608,7 @@ void LwpCellLayout::RegisterStyle()
  */
 void LwpCellLayout::Read()
 {
-    LwpObjectStream* pStrm = m_pObjStrm;
+    LwpObjectStream* pStrm = m_pObjStrm.get();
 
     LwpMiddleLayout::Read();
 
@@ -866,7 +866,7 @@ void LwpHiddenCellLayout::Read()
 {
     LwpCellLayout::Read();
 
-    cconnectedlayout.ReadIndexed(m_pObjStrm);
+    cconnectedlayout.ReadIndexed(m_pObjStrm.get());
     m_pObjStrm->SkipExtra();
 
 }
diff --git a/lotuswordpro/source/filter/lwpcharacterstyle.cxx b/lotuswordpro/source/filter/lwpcharacterstyle.cxx
index ba4303a3..72ec1a9 100644
--- a/lotuswordpro/source/filter/lwpcharacterstyle.cxx
+++ b/lotuswordpro/source/filter/lwpcharacterstyle.cxx
@@ -119,33 +119,33 @@ void LwpTextStyle::ReadCommon()
     m_nCSFlags = m_pObjStrm->QuickReaduInt16();
     m_nUseCount = m_pObjStrm->QuickReaduInt32();
 
-    m_pDescription->Read(m_pObjStrm);
+    m_pDescription->Read(m_pObjStrm.get());
 
-    m_pLangOverride->Read(m_pObjStrm);
-    m_pTxtAttrOverride->Read(m_pObjStrm);
+    m_pLangOverride->Read(m_pObjStrm.get());
+    m_pTxtAttrOverride->Read(m_pObjStrm.get());
     if (LwpFileHeader::m_nFileRevision < 0x000B)
     {
-        m_pCharacterBorderOverride->Read(m_pObjStrm);
-        m_pAmikakeOverride->Read(m_pObjStrm);
+        m_pCharacterBorderOverride->Read(m_pObjStrm.get());
+        m_pAmikakeOverride->Read(m_pObjStrm.get());
     }
     else
     {
-        m_CharacterBorder.ReadIndexed(m_pObjStrm);
-        m_Amikake.ReadIndexed(m_pObjStrm);
+        m_CharacterBorder.ReadIndexed(m_pObjStrm.get());
+        m_Amikake.ReadIndexed(m_pObjStrm.get());
     }
     sal_uInt16 nCount = 6;
     if (LwpFileHeader::m_nFileRevision > 0x0005)
         nCount = m_pObjStrm->QuickReaduInt16();
 
-    m_FaceStyle.ReadIndexed(m_pObjStrm);
+    m_FaceStyle.ReadIndexed(m_pObjStrm.get());
 
     if (nCount > 1)
     {
-        m_SizeStyle.ReadIndexed(m_pObjStrm);
-        m_AttributeStyle.ReadIndexed(m_pObjStrm);
-        m_FontStyle.ReadIndexed(m_pObjStrm);
-        m_CharacterBorderStyle.ReadIndexed(m_pObjStrm);
-        m_AmikakeStyle.ReadIndexed(m_pObjStrm);
+        m_SizeStyle.ReadIndexed(m_pObjStrm.get());
+        m_AttributeStyle.ReadIndexed(m_pObjStrm.get());
+        m_FontStyle.ReadIndexed(m_pObjStrm.get());
+        m_CharacterBorderStyle.ReadIndexed(m_pObjStrm.get());
+        m_AmikakeStyle.ReadIndexed(m_pObjStrm.get());
     }
 
     if (m_pObjStrm->CheckExtra())
diff --git a/lotuswordpro/source/filter/lwpcontent.cxx b/lotuswordpro/source/filter/lwpcontent.cxx
index dc10225..9e4bbc2 100644
--- a/lotuswordpro/source/filter/lwpcontent.cxx
+++ b/lotuswordpro/source/filter/lwpcontent.cxx
@@ -82,7 +82,7 @@ void LwpContent::Read()
 {
     LwpDLNFVList::Read();
 
-    LwpObjectStream* pStrm = m_pObjStrm;
+    LwpObjectStream* pStrm = m_pObjStrm.get();
 
     m_LayoutsWithMe.Read(pStrm);
     m_nFlags = pStrm->QuickReaduInt16();
diff --git a/lotuswordpro/source/filter/lwpdivinfo.cxx b/lotuswordpro/source/filter/lwpdivinfo.cxx
index d3d50ce..e981395 100644
--- a/lotuswordpro/source/filter/lwpdivinfo.cxx
+++ b/lotuswordpro/source/filter/lwpdivinfo.cxx
@@ -77,18 +77,18 @@ void LwpDivInfo::Read()
 {
 
     SkipFront();
-    m_ParentID.ReadIndexed(m_pObjStrm);
+    m_ParentID.ReadIndexed(m_pObjStrm.get());
     if (LwpFileHeader::m_nFileRevision < 0x0006)
     {
         m_pObjStrm->SkipExtra();
     }
-    m_Name.Read(m_pObjStrm);
+    m_Name.Read(m_pObjStrm.get());
     if (LwpFileHeader::m_nFileRevision < 0x0006)
     {
         m_pObjStrm->SkipExtra();
     }
 
-    m_LayoutID.ReadIndexed(m_pObjStrm);
+    m_LayoutID.ReadIndexed(m_pObjStrm.get());
     m_nFlags = m_pObjStrm->QuickReaduInt16();
     if (LwpFileHeader::m_nFileRevision < 0x0010)  // In 98, graphic links count too
     {
@@ -96,16 +96,16 @@ void LwpDivInfo::Read()
             m_nFlags &= ~DI_KNOWIFANYOLEDDELINKS;
     }
 
-    m_ExternalName.Read(m_pObjStrm);
-    m_ExternalType.Read(m_pObjStrm);
-    m_ClassName.Read(m_pObjStrm);
-    m_InitialLayoutID.ReadIndexed(m_pObjStrm);
+    m_ExternalName.Read(m_pObjStrm.get());
+    m_ExternalType.Read(m_pObjStrm.get());
+    m_ClassName.Read(m_pObjStrm.get());
+    m_InitialLayoutID.ReadIndexed(m_pObjStrm.get());
 
     m_nPageNoStyle = m_pObjStrm->QuickReaduInt16();
-    m_TabColor.Read(m_pObjStrm);
+    m_TabColor.Read(m_pObjStrm.get());
 
     // read filler page stuff
-    m_FillerPageTextID.ReadIndexed(m_pObjStrm);
+    m_FillerPageTextID.ReadIndexed(m_pObjStrm.get());
 
     // read external file object stuff
     sal_uInt16 type = m_pObjStrm->QuickReaduInt16();
@@ -119,20 +119,20 @@ void LwpDivInfo::SkipFront()
 {
     LwpObjectID toSkip;
 
-    toSkip.ReadIndexed(m_pObjStrm); // skip ListNext;
+    toSkip.ReadIndexed(m_pObjStrm.get()); // skip ListNext;
     if (LwpFileHeader::m_nFileRevision < 0x0006)
     {
         m_pObjStrm->SkipExtra();
     }
-    toSkip.ReadIndexed(m_pObjStrm); // skip ListPrevious;
+    toSkip.ReadIndexed(m_pObjStrm.get()); // skip ListPrevious;
     if (LwpFileHeader::m_nFileRevision < 0x0006)
     {
         m_pObjStrm->SkipExtra();
     }
-    toSkip.ReadIndexed(m_pObjStrm); // skip Head;
+    toSkip.ReadIndexed(m_pObjStrm.get()); // skip Head;
     if (LwpFileHeader::m_nFileRevision < 0x0006)
     {
-        toSkip.ReadIndexed(m_pObjStrm); //skip tail
+        toSkip.ReadIndexed(m_pObjStrm.get()); //skip tail
         m_pObjStrm->SkipExtra();
     }
 }
diff --git a/lotuswordpro/source/filter/lwpdivopts.cxx b/lotuswordpro/source/filter/lwpdivopts.cxx
index 463b226..7e0f186 100644
--- a/lotuswordpro/source/filter/lwpdivopts.cxx
+++ b/lotuswordpro/source/filter/lwpdivopts.cxx
@@ -132,9 +132,9 @@ LwpDivisionOptions::~LwpDivisionOptions()
 
 void LwpDivisionOptions::Read()
 {
-    m_HyphOpts.Read(m_pObjStrm);
+    m_HyphOpts.Read(m_pObjStrm.get());
     m_nOptionFlag = m_pObjStrm->QuickReaduInt16();
-    m_Lang.Read(m_pObjStrm);
+    m_Lang.Read(m_pObjStrm.get());
     m_pObjStrm->SkipExtra();
 }
 
diff --git a/lotuswordpro/source/filter/lwpdlvlist.cxx b/lotuswordpro/source/filter/lwpdlvlist.cxx
index d51a327..22781f1 100644
--- a/lotuswordpro/source/filter/lwpdlvlist.cxx
+++ b/lotuswordpro/source/filter/lwpdlvlist.cxx
@@ -70,7 +70,7 @@ LwpDLVList::LwpDLVList(LwpObjectHeader &objHdr, LwpSvStream* pStrm)
  **/
 void LwpDLVList::Read()
 {
-    LwpObjectStream* pObjStrm = m_pObjStrm;
+    LwpObjectStream* pObjStrm = m_pObjStrm.get();
     m_ListNext.ReadIndexed(pObjStrm);
     if( LwpFileHeader::m_nFileRevision < 0x0006 )
         pObjStrm->SkipExtra();
@@ -90,7 +90,7 @@ void LwpDLNFVList::Read()
 {
     LwpDLVList::Read();
 
-    LwpObjectStream* pObjStrm = m_pObjStrm;
+    LwpObjectStream* pObjStrm = m_pObjStrm.get();
 
     m_ChildHead.ReadIndexed(pObjStrm);
     if( LwpFileHeader::m_nFileRevision < 0x0006 || !m_ChildHead.IsNull() )
@@ -128,7 +128,7 @@ void LwpDLNFPVList::Read()
 {
     LwpDLNFVList::Read();
 
-    LwpObjectStream* pObjStrm = m_pObjStrm;
+    LwpObjectStream* pObjStrm = m_pObjStrm.get();
     ReadPropertyList(pObjStrm);
     pObjStrm->SkipExtra();
 }
diff --git a/lotuswordpro/source/filter/lwpdoc.cxx b/lotuswordpro/source/filter/lwpdoc.cxx
index f238f8b9..3113776 100644
--- a/lotuswordpro/source/filter/lwpdoc.cxx
+++ b/lotuswordpro/source/filter/lwpdoc.cxx
@@ -103,43 +103,43 @@ void LwpDocument::Read()
 
     //Skip the SortOption and UIDocument
     {
-        LwpSortOption aDocSort( m_pObjStrm );
-        LwpUIDocument aUIDoc( m_pObjStrm );
+        LwpSortOption aDocSort( m_pObjStrm.get() );
+        LwpUIDocument aUIDoc( m_pObjStrm.get() );
     }
 
-    m_pLnOpts = new LwpLineNumberOptions(m_pObjStrm);
+    m_pLnOpts = new LwpLineNumberOptions(m_pObjStrm.get());
 
     //Skip LwpUserDictFiles
     {
-        LwpUserDictFiles aUsrDicts( m_pObjStrm );
+        LwpUserDictFiles aUsrDicts( m_pObjStrm.get() );
     }
 
     if( !IsChildDoc())
     {
         //Skip LwpPrinterInfo
-        LwpPrinterInfo aPrtInfo( m_pObjStrm );
+        LwpPrinterInfo aPrtInfo( m_pObjStrm.get() );
     }
 
-    m_pFoundry = m_pOwnedFoundry = new LwpFoundry(m_pObjStrm, this);
+    m_pFoundry = m_pOwnedFoundry = new LwpFoundry(m_pObjStrm.get(), this);
 
-    m_DivOpts.ReadIndexed(m_pObjStrm);
+    m_DivOpts.ReadIndexed(m_pObjStrm.get());
 
     if(!IsChildDoc())
     {
-        m_FootnoteOpts.ReadIndexed(m_pObjStrm);
-        m_DocData.ReadIndexed(m_pObjStrm);
+        m_FootnoteOpts.ReadIndexed(m_pObjStrm.get());
+        m_DocData.ReadIndexed(m_pObjStrm.get());
     }
     else
     {
         //Skip the docdata used in old version
         LwpObjectID dummyDocData;
-        dummyDocData.ReadIndexed(m_pObjStrm);
+        dummyDocData.ReadIndexed(m_pObjStrm.get());
     }
-    m_DivInfo.ReadIndexed(m_pObjStrm);
-    m_Epoch.Read(m_pObjStrm);
-    m_WYSIWYGPageHints.ReadIndexed(m_pObjStrm);
-    m_VerDoc.ReadIndexed(m_pObjStrm);
-    m_STXInfo.ReadIndexed(m_pObjStrm);
+    m_DivInfo.ReadIndexed(m_pObjStrm.get());
+    m_Epoch.Read(m_pObjStrm.get());
+    m_WYSIWYGPageHints.ReadIndexed(m_pObjStrm.get());
+    m_VerDoc.ReadIndexed(m_pObjStrm.get());
+    m_STXInfo.ReadIndexed(m_pObjStrm.get());
 }
 
 /**
@@ -147,7 +147,7 @@ void LwpDocument::Read()
  **/
 void LwpDocument::ReadPlug()
 {
-    m_DocSockID.ReadIndexed(m_pObjStrm);
+    m_DocSockID.ReadIndexed(m_pObjStrm.get());
     m_nFlags = m_pObjStrm->QuickReaduInt16();
     m_pObjStrm->SkipExtra();
 }
@@ -782,7 +782,7 @@ LwpDocSock::LwpDocSock(LwpObjectHeader& objHdr, LwpSvStream* pStrm)
 void LwpDocSock::Read()
 {
     LwpDLNFVList::Read();
-    m_Doc.ReadIndexed(m_pObjStrm);
+    m_Doc.ReadIndexed(m_pObjStrm.get());
     m_pObjStrm->SkipExtra();
 }
  /**
diff --git a/lotuswordpro/source/filter/lwpdocdata.cxx b/lotuswordpro/source/filter/lwpdocdata.cxx
index bf3c26d..3155590 100644
--- a/lotuswordpro/source/filter/lwpdocdata.cxx
+++ b/lotuswordpro/source/filter/lwpdocdata.cxx
@@ -76,13 +76,13 @@ void LwpDocData::Read()
     //cOptionFlag
     m_DocOptions.nOptionFlag = m_pObjStrm->QuickReaduInt16();
     //cEncrypt1Password
-    m_DocOptions.encrypt1password.Read(m_pObjStrm);
+    m_DocOptions.encrypt1password.Read(m_pObjStrm.get());
     //cEncrypt2Password
-    m_DocOptions.encrypt2password.Read(m_pObjStrm);
+    m_DocOptions.encrypt2password.Read(m_pObjStrm.get());
     //cCharecterSet
-    m_DocOptions.characterSet.Read(m_pObjStrm);
+    m_DocOptions.characterSet.Read(m_pObjStrm.get());
     //cGrammerSet
-    m_DocOptions.grammerSet.Read(m_pObjStrm);
+    m_DocOptions.grammerSet.Read(m_pObjStrm.get());
     //cShowMarginMarks
     m_DocOptions.nMarginMarks = m_pObjStrm->QuickReaduInt16();
     //cMarginMarksLocation
@@ -93,11 +93,11 @@ void LwpDocData::Read()
 
     //doc info
     //cDescription
-    m_DocInfo.description.Read(m_pObjStrm);
+    m_DocInfo.description.Read(m_pObjStrm.get());
     //cKeyWord
-    m_DocInfo.keywords.Read(m_pObjStrm);
+    m_DocInfo.keywords.Read(m_pObjStrm.get());
     //cCreatedBy
-    m_DocInfo.createdBy.Read(m_pObjStrm);
+    m_DocInfo.createdBy.Read(m_pObjStrm.get());
     //cCreationTime
     m_DocInfo.nCreationTime = m_pObjStrm->QuickReadInt32();
     LtgLocalTime(m_DocInfo.nCreationTime,m_nCreationTime);
@@ -111,7 +111,7 @@ void LwpDocData::Read()
     m_nTotalEditTime.tm_min = m_DocInfo.nTotalEditTime % 60;
     m_nTotalEditTime.tm_sec = 0;
     //cpVerDocInfo
-    m_DocInfo.cpVerDocInfo.ReadIndexed(m_pObjStrm);
+    m_DocInfo.cpVerDocInfo.ReadIndexed(m_pObjStrm.get());
 
     //EditorList
     m_DocInfo.nNumEditedBy = m_pObjStrm->QuickReaduInt16();
@@ -121,10 +121,10 @@ void LwpDocData::Read()
     for ( i = 0; i < m_DocInfo.nNumEditedBy; i++)
     {
         //CDLNList
-        pCDLNList[i].Read(m_pObjStrm);  //cName
+        pCDLNList[i].Read(m_pObjStrm.get());  //cName
         m_pObjStrm->SkipExtra();
         //CEditedBy
-        pEditorList[i].Read(m_pObjStrm);    //cName
+        pEditorList[i].Read(m_pObjStrm.get());    //cName
         m_pObjStrm->SkipExtra();
     }
 
@@ -135,7 +135,7 @@ void LwpDocData::Read()
 
     //doc control
     //cGreeting
-    m_DocControl.cGreeting.Read(m_pObjStrm);
+    m_DocControl.cGreeting.Read(m_pObjStrm.get());
     //cFlags
     m_DocControl.nFlags = m_pObjStrm->QuickReaduInt16();
 
@@ -156,7 +156,7 @@ void LwpDocData::Read()
     //cAutoVersioning
     m_DocControl.nAutoVersioning = m_pObjStrm->QuickReaduInt16();
     //cDocControlOnlyEditor
-    m_DocControl.cDocControlOnlyEditor.Read(m_pObjStrm);
+    m_DocControl.cDocControlOnlyEditor.Read(m_pObjStrm.get());
     //cEditorVerification
     m_DocControl.nEditorVerification = m_pObjStrm->QuickReaduInt16();
 
@@ -171,11 +171,11 @@ void LwpDocData::Read()
     {
         LwpEditorAttr* pEditorAttr = new LwpEditorAttr;
         //cName
-        pEditorAttr->cName.Read(m_pObjStrm);
+        pEditorAttr->cName.Read(m_pObjStrm.get());
         //cInitials
-        pEditorAttr->cInitials.Read(m_pObjStrm);
+        pEditorAttr->cInitials.Read(m_pObjStrm.get());
         //cHiLite
-        pEditorAttr->cHiLiteColor.Read(m_pObjStrm);
+        pEditorAttr->cHiLiteColor.Read(m_pObjStrm.get());
 
         //cID
         pEditorAttr->nID = m_pObjStrm->QuickReaduInt16();
@@ -207,16 +207,16 @@ void LwpDocData::Read()
         //CFontDescriptionOverrideBase--cTightness
         pEditorAttr->cInsFontOver.cFontDescriptionOverrideBase.cTightness = m_pObjStrm->QuickReaduInt16();
         //CFontDescriptionOverrideBase--cColor
-        pEditorAttr->cInsFontOver.cFontDescriptionOverrideBase.cColor.Read(m_pObjStrm);
+        pEditorAttr->cInsFontOver.cFontDescriptionOverrideBase.cColor.Read(m_pObjStrm.get());
 
         //CFontDescriptionOverrideBase--cBackgroundColor
-        pEditorAttr->cInsFontOver.cFontDescriptionOverrideBase.cBackgroundColor.Read(m_pObjStrm);
+        pEditorAttr->cInsFontOver.cFontDescriptionOverrideBase.cBackgroundColor.Read(m_pObjStrm.get());
 
         m_pObjStrm->SkipExtra();
         //cFaceName
-        pEditorAttr->cInsFontOver.cFaceName.Read(m_pObjStrm);
+        pEditorAttr->cInsFontOver.cFaceName.Read(m_pObjStrm.get());
         //cAltFaceName
-        pEditorAttr->cInsFontOver.cAltFaceName.Read(m_pObjStrm);
+        pEditorAttr->cInsFontOver.cAltFaceName.Read(m_pObjStrm.get());
         m_pObjStrm->SkipExtra();
 
         //cDelFontOver
@@ -246,16 +246,16 @@ void LwpDocData::Read()
         //CFontDescriptionOverrideBase--cTightness
         pEditorAttr->cDelFontOver.cFontDescriptionOverrideBase.cTightness = m_pObjStrm->QuickReaduInt16();
         //CFontDescriptionOverrideBase--cColor
-        pEditorAttr->cDelFontOver.cFontDescriptionOverrideBase.cColor.Read(m_pObjStrm);
+        pEditorAttr->cDelFontOver.cFontDescriptionOverrideBase.cColor.Read(m_pObjStrm.get());
 
         //CFontDescriptionOverrideBase--cBackgroundColor
-        pEditorAttr->cDelFontOver.cFontDescriptionOverrideBase.cBackgroundColor.Read(m_pObjStrm);
+        pEditorAttr->cDelFontOver.cFontDescriptionOverrideBase.cBackgroundColor.Read(m_pObjStrm.get());
 
         m_pObjStrm->SkipExtra();
         //cFaceName
-        pEditorAttr->cDelFontOver.cFaceName.Read(m_pObjStrm);
+        pEditorAttr->cDelFontOver.cFaceName.Read(m_pObjStrm.get());
         //cAltFaceName
-        pEditorAttr->cDelFontOver.cAltFaceName.Read(m_pObjStrm);
+        pEditorAttr->cDelFontOver.cAltFaceName.Read(m_pObjStrm.get());
         m_pObjStrm->SkipExtra();
 
         //cAbilities
diff --git a/lotuswordpro/source/filter/lwpfootnote.cxx b/lotuswordpro/source/filter/lwpfootnote.cxx
index ecc5e83..b8ac3fd 100644
--- a/lotuswordpro/source/filter/lwpfootnote.cxx
+++ b/lotuswordpro/source/filter/lwpfootnote.cxx
@@ -157,7 +157,7 @@ void LwpFootnote::Read()
     LwpOrderedObject::Read();
     m_nType = m_pObjStrm->QuickReaduInt16();
     m_nRow = m_pObjStrm->QuickReaduInt16();
-    m_Content.ReadIndexed(m_pObjStrm);
+    m_Content.ReadIndexed(m_pObjStrm.get());
     m_pObjStrm->SkipExtra();
 }
 
@@ -447,14 +447,14 @@ LwpFootnoteOptions::~LwpFootnoteOptions()
 void LwpFootnoteOptions::Read()
 {
     m_nFlag = m_pObjStrm->QuickReaduInt16();
-    m_FootnoteNumbering.Read(m_pObjStrm);
-    m_EndnoteDivisionNumbering.Read(m_pObjStrm);
-    m_EndnoteDivisionGroupNumbering.Read(m_pObjStrm);
-    m_EndnoteDocNumbering.Read(m_pObjStrm);
-    m_FootnoteSeparator.Read(m_pObjStrm);
-    m_FootnoteContinuedSeparator.Read(m_pObjStrm);
-    m_ContinuedOnMessage.Read(m_pObjStrm);
-    m_ContinuedFromMessage.Read(m_pObjStrm);
+    m_FootnoteNumbering.Read(m_pObjStrm.get());
+    m_EndnoteDivisionNumbering.Read(m_pObjStrm.get());
+    m_EndnoteDivisionGroupNumbering.Read(m_pObjStrm.get());
+    m_EndnoteDocNumbering.Read(m_pObjStrm.get());
+    m_FootnoteSeparator.Read(m_pObjStrm.get());
+    m_FootnoteContinuedSeparator.Read(m_pObjStrm.get());
+    m_ContinuedOnMessage.Read(m_pObjStrm.get());
+    m_ContinuedFromMessage.Read(m_pObjStrm.get());
     m_pObjStrm->SkipExtra();
 }
 
diff --git a/lotuswordpro/source/filter/lwpframelayout.cxx b/lotuswordpro/source/filter/lwpframelayout.cxx
index ef95f67..a1cb935 100644
--- a/lotuswordpro/source/filter/lwpframelayout.cxx
+++ b/lotuswordpro/source/filter/lwpframelayout.cxx
@@ -767,7 +767,6 @@ LwpFrameLayout::LwpFrameLayout(LwpObjectHeader &objHdr, LwpSvStream* pStrm)
 
 LwpFrameLayout::~LwpFrameLayout()
 {
-    delete m_pFrame;
 }
 
 /**
@@ -781,7 +780,7 @@ void LwpFrameLayout::Read()
     {
         if(m_pObjStrm->QuickReaduInt16())
         {
-            m_Link.Read(m_pObjStrm);
+            m_Link.Read(m_pObjStrm.get());
         }
     }
     m_pObjStrm->SkipExtra();
@@ -858,7 +857,7 @@ void  LwpFrameLayout::RegisterStyle()
 
     //register frame style
     XFFrameStyle* pFrameStyle = new XFFrameStyle();
-    m_pFrame = new LwpFrame(this);
+    m_pFrame.reset( new LwpFrame(this) );
     m_pFrame->RegisterStyle(pFrameStyle);
 
     //register content style
@@ -1027,7 +1026,6 @@ LwpGroupLayout::LwpGroupLayout(LwpObjectHeader &objHdr, LwpSvStream* pStrm)
 
 LwpGroupLayout::~LwpGroupLayout()
 {
-    delete m_pFrame;
 }
 /**
  * @descr read group layout object
@@ -1049,7 +1047,7 @@ void LwpGroupLayout::RegisterStyle()
 
     //register frame style
     XFFrameStyle* pFrameStyle = new XFFrameStyle();
-    m_pFrame = new LwpFrame(this);
+    m_pFrame.reset( new LwpFrame(this) );
     m_pFrame->RegisterStyle(pFrameStyle);
 
     //register child frame style
@@ -1214,7 +1212,7 @@ void LwpRubyLayout::Read()
     m_nStateFlag = m_pObjStrm->QuickReaduInt16();
     m_nXOffset = m_pObjStrm->QuickReadInt32();
     m_nYOffset = m_pObjStrm->QuickReadInt32();
-    m_objRubyMarker.ReadIndexed(m_pObjStrm);
+    m_objRubyMarker.ReadIndexed(m_pObjStrm.get());
     m_pObjStrm->SkipExtra();
 }
 
diff --git a/lotuswordpro/source/filter/lwpframelayout.hxx b/lotuswordpro/source/filter/lwpframelayout.hxx
index 99b3a21..190c7fb 100644
--- a/lotuswordpro/source/filter/lwpframelayout.hxx
+++ b/lotuswordpro/source/filter/lwpframelayout.hxx
@@ -140,7 +140,7 @@ private:
 
 private:
     LwpFrameLink m_Link;
-    LwpFrame* m_pFrame;
+    std::unique_ptr<LwpFrame> m_pFrame;
 };
 
 /**
@@ -159,7 +159,7 @@ public:
 protected:
     void Read() override;
 private:
-    LwpFrame* m_pFrame;
+    std::unique_ptr<LwpFrame> m_pFrame;
 
 };
 
diff --git a/lotuswordpro/source/filter/lwpfrib.cxx b/lotuswordpro/source/filter/lwpfrib.cxx
index 737985c..3b41993 100644
--- a/lotuswordpro/source/filter/lwpfrib.cxx
+++ b/lotuswordpro/source/filter/lwpfrib.cxx
@@ -99,7 +99,6 @@ LwpFrib::LwpFrib(LwpPara* pPara)
 
 LwpFrib::~LwpFrib()
 {
-    delete m_pModifiers;
 }
 
 LwpFrib* LwpFrib::CreateFrib(LwpPara* pPara, LwpObjectStream* pObjStrm, sal_uInt8 fribtag,sal_uInt8 editID)
@@ -219,7 +218,7 @@ void LwpFrib::SetModifiers(ModifierInfo* pModifiers)
 {
     if (pModifiers)
     {
-        m_pModifiers = pModifiers;
+        m_pModifiers.reset( pModifiers );
         m_ModFlag = true;
         if (pModifiers->RevisionFlag)
         {
diff --git a/lotuswordpro/source/filter/lwpfrib.hxx b/lotuswordpro/source/filter/lwpfrib.hxx
index d4a1078..70258c8 100644
--- a/lotuswordpro/source/filter/lwpfrib.hxx
+++ b/lotuswordpro/source/filter/lwpfrib.hxx
@@ -99,13 +99,13 @@ protected:
     LwpPara* m_pPara;
     LwpFrib* m_pNext;
     sal_uInt8 m_nFribType;
-    ModifierInfo* m_pModifiers;
+    std::unique_ptr<ModifierInfo> m_pModifiers;
     OUString m_StyleName;
 public:
     bool m_ModFlag;
     const OUString& GetStyleName(){return m_StyleName;}
     void SetModifiers(ModifierInfo* pModifiers);
-    ModifierInfo* GetModifiers(){return m_pModifiers;}
+    ModifierInfo* GetModifiers(){return m_pModifiers.get();}
     virtual void RegisterStyle(LwpFoundry* pFoundry);
     bool HasNextFrib();
     void ConvertChars(XFContentContainer* pXFPara,const OUString& text);
diff --git a/lotuswordpro/source/filter/lwpholder.cxx b/lotuswordpro/source/filter/lwpholder.cxx
index 98e7b2d..7e6afc4 100644
--- a/lotuswordpro/source/filter/lwpholder.cxx
+++ b/lotuswordpro/source/filter/lwpholder.cxx
@@ -69,7 +69,7 @@ LwpDLVListHeadHolder::LwpDLVListHeadHolder(LwpObjectHeader& objHdr, LwpSvStream*
 */
 void LwpDLVListHeadHolder::Read()
 {
-    m_DLVHead.ReadIndexed(m_pObjStrm);
+    m_DLVHead.ReadIndexed(m_pObjStrm.get());
     m_pObjStrm->SkipExtra();
 }
 
@@ -81,7 +81,7 @@ LwpDLVListHeadTailHolder::LwpDLVListHeadTailHolder(LwpObjectHeader& objHdr, LwpS
 */
 void LwpDLVListHeadTailHolder::Read()
 {
-    m_HeadTail.Read(m_pObjStrm);
+    m_HeadTail.Read(m_pObjStrm.get());
     //m_pObjStrm->SkipExtra();
 }
 
@@ -95,7 +95,7 @@ void LwpObjectHolder::Read()
 {
     LwpDLVList::Read();
 
-    m_Object.ReadIndexed(m_pObjStrm);
+    m_Object.ReadIndexed(m_pObjStrm.get());
     if( LwpFileHeader::m_nFileRevision < 0x0006 )
         m_pObjStrm->SkipExtra();
 }
@@ -110,7 +110,7 @@ void LwpListList::Read()
 {
     LwpObjectHolder::Read();
 
-    m_HeadTail.Read(m_pObjStrm);
+    m_HeadTail.Read(m_pObjStrm.get());
     m_pObjStrm->SkipExtra();
 }
 
diff --git a/lotuswordpro/source/filter/lwplayout.cxx b/lotuswordpro/source/filter/lwplayout.cxx
index 4a3f84f..75524aa 100644
--- a/lotuswordpro/source/filter/lwplayout.cxx
+++ b/lotuswordpro/source/filter/lwplayout.cxx
@@ -93,7 +93,7 @@ void LwpVirtualLayout::Read()
 {
     LwpDLNFPVList::Read();
 
-    LwpObjectStream* pStrm = m_pObjStrm;
+    LwpObjectStream* pStrm = m_pObjStrm.get();
     m_nAttributes = pStrm->QuickReaduInt32();
     m_nAttributes2 = pStrm->QuickReaduInt32();
     m_nAttributes3 = pStrm->QuickReaduInt32();
@@ -526,7 +526,6 @@ LwpLayoutStyle::LwpLayoutStyle()
 
 LwpLayoutStyle::~LwpLayoutStyle()
 {
-    delete m_pDescription;
 }
 
 void LwpLayoutStyle::Read(LwpObjectStream* pStrm)
@@ -583,7 +582,7 @@ LwpMiddleLayout::~LwpMiddleLayout()
 }
 void LwpMiddleLayout::Read()
 {
-    LwpObjectStream* pStrm = m_pObjStrm;
+    LwpObjectStream* pStrm = m_pObjStrm.get();
 
     LwpVirtualLayout::Read();
 
@@ -1481,7 +1480,7 @@ LwpLayout::~LwpLayout()
 
 void LwpLayout::Read()
 {
-    LwpObjectStream* pStrm = m_pObjStrm;
+    LwpObjectStream* pStrm = m_pObjStrm.get();
 
     LwpMiddleLayout::Read();
     if (LwpFileHeader::m_nFileRevision < 0x000B)
@@ -1960,7 +1959,7 @@ LwpPlacableLayout::~LwpPlacableLayout()
 
 void LwpPlacableLayout::Read()
 {
-    LwpObjectStream* pStrm = m_pObjStrm;
+    LwpObjectStream* pStrm = m_pObjStrm.get();
     LwpLayout::Read();
     if(LwpFileHeader::m_nFileRevision < 0x000B)
     {
diff --git a/lotuswordpro/source/filter/lwplayout.hxx b/lotuswordpro/source/filter/lwplayout.hxx
index 055a0e2..8d2e47d 100644
--- a/lotuswordpro/source/filter/lwplayout.hxx
+++ b/lotuswordpro/source/filter/lwplayout.hxx
@@ -312,7 +312,7 @@ public:
     void Read(LwpObjectStream* pStrm);
 private:
     sal_uInt32      m_nStyleDefinition;
-    LwpAtomHolder*  m_pDescription;
+    std::unique_ptr<LwpAtomHolder>  m_pDescription;
     sal_uInt16      m_nKey;
 };
 
diff --git a/lotuswordpro/source/filter/lwplaypiece.cxx b/lotuswordpro/source/filter/lwplaypiece.cxx
index 3fe5750..507d0be 100644
--- a/lotuswordpro/source/filter/lwplaypiece.cxx
+++ b/lotuswordpro/source/filter/lwplaypiece.cxx
@@ -93,9 +93,9 @@ void LwpLayoutGeometry::Read()
     {
         m_nWidth = m_pObjStrm->QuickReadInt32();
         m_nHeight = m_pObjStrm->QuickReadInt32();
-        m_Origin.Read(m_pObjStrm);
-        m_AbsoluteOrigin.Read(m_pObjStrm);
-        m_ContainerRotor.Read(m_pObjStrm);
+        m_Origin.Read(m_pObjStrm.get());
+        m_AbsoluteOrigin.Read(m_pObjStrm.get());
+        m_ContainerRotor.Read(m_pObjStrm.get());
         m_ContentOrientation = m_pObjStrm->QuickReaduInt8();
         m_pObjStrm->SkipExtra();
     }
@@ -127,7 +127,7 @@ void LwpLayoutScale::Read()
         m_nScaleWidth = m_pObjStrm->QuickReadInt32();
         m_nScaleHeight = m_pObjStrm->QuickReadInt32();
         m_nContentRotation = m_pObjStrm->QuickReaduInt16();
-        m_Offset.Read(m_pObjStrm);
+        m_Offset.Read(m_pObjStrm.get());
 
         m_nPlacement = m_pObjStrm->QuickReaduInt16();
         m_pObjStrm->SkipExtra();
@@ -150,9 +150,9 @@ void LwpLayoutMargins::Read()
 
     if( LwpFileHeader::m_nFileRevision >= 0x000B )
     {
-        m_Margins.Read(m_pObjStrm);
-        m_ExtMargins.Read(m_pObjStrm);
-        m_ExtraMargins.Read(m_pObjStrm);
+        m_Margins.Read(m_pObjStrm.get());
+        m_ExtMargins.Read(m_pObjStrm.get());
+        m_ExtraMargins.Read(m_pObjStrm.get());
         m_pObjStrm->SkipExtra();
     }
 }
@@ -173,7 +173,7 @@ void LwpLayoutBorder::Read()
 
     if( LwpFileHeader::m_nFileRevision >= 0x000B )
     {
-        m_BorderStuff.Read(m_pObjStrm);
+        m_BorderStuff.Read(m_pObjStrm.get());
         m_pObjStrm->SkipExtra();
     }
 }
@@ -194,7 +194,7 @@ void LwpLayoutBackground::Read()
 
     if( LwpFileHeader::m_nFileRevision >= 0x000B )
     {
-        m_BackgroundStuff.Read(m_pObjStrm);
+        m_BackgroundStuff.Read(m_pObjStrm.get());
         m_pObjStrm->SkipExtra();
     }
 }
@@ -239,7 +239,7 @@ void LwpLayoutExternalBorder::Read()
 
     if( LwpFileHeader::m_nFileRevision >= 0x000B )
     {
-        m_ExtranalBorder.Read(m_pObjStrm);
+        m_ExtranalBorder.Read(m_pObjStrm.get());
         m_pObjStrm->SkipExtra();
     }
 }
@@ -287,7 +287,7 @@ void LwpLayoutColumns::Read()
         m_pColumns = new LwpColumnInfo[m_nNumCols];
         for(int i=0; i<m_nNumCols; i++)
         {
-            m_pColumns[i].Read(m_pObjStrm);
+            m_pColumns[i].Read(m_pObjStrm.get());
         }
         m_pObjStrm->SkipExtra();
     }
@@ -327,7 +327,7 @@ void LwpLayoutGutters::Read()
 
     if( LwpFileHeader::m_nFileRevision >= 0x000B )
     {
-        m_BorderBuffer.Read(m_pObjStrm);
+        m_BorderBuffer.Read(m_pObjStrm.get());
         m_pObjStrm->SkipExtra();
     }
 }
@@ -380,7 +380,7 @@ void LwpLayoutJoins::Read()
 
     if( LwpFileHeader::m_nFileRevision >= 0x000B )
     {
-        m_JoinStuff.Read(m_pObjStrm);
+        m_JoinStuff.Read(m_pObjStrm.get());
         m_pObjStrm->SkipExtra();
     }
 }
@@ -401,7 +401,7 @@ void LwpLayoutShadow::Read()
 
     if( LwpFileHeader::m_nFileRevision >= 0x000B )
     {
-        m_Shadow.Read(m_pObjStrm);
+        m_Shadow.Read(m_pObjStrm.get());
         m_pObjStrm->SkipExtra();
     }
 }
@@ -453,7 +453,7 @@ void LwpLayoutRelativity::Read()
     LwpVirtualPiece::Read();
     if(LwpFileHeader::m_nFileRevision >= 0x000B)
     {
-        m_RelGuts.Read(m_pObjStrm);
+        m_RelGuts.Read(m_pObjStrm.get());
         m_pObjStrm->SkipExtra();
     }
 }
diff --git a/lotuswordpro/source/filter/lwpmarker.cxx b/lotuswordpro/source/filter/lwpmarker.cxx
index 3843dad..bfe0b26 100644
--- a/lotuswordpro/source/filter/lwpmarker.cxx
+++ b/lotuswordpro/source/filter/lwpmarker.cxx
@@ -78,9 +78,9 @@ LwpMarker::LwpMarker(LwpObjectHeader &objHdr, LwpSvStream *pStrm)
 void LwpMarker::Read()
 {
     LwpDLNFPVList::Read();
-    m_objContent.ReadIndexed(m_pObjStrm);
-    m_objLayout.ReadIndexed(m_pObjStrm);
-    m_objMarkerList.ReadIndexed(m_pObjStrm);
+    m_objContent.ReadIndexed(m_pObjStrm.get());
+    m_objLayout.ReadIndexed(m_pObjStrm.get());
+    m_objMarkerList.ReadIndexed(m_pObjStrm.get());
     m_nNeedUpdate = m_pObjStrm->QuickReaduInt16();
     m_nFlag = m_pObjStrm->QuickReaduInt16();
     m_nPageNumber = m_pObjStrm->QuickReaduInt16();
@@ -107,7 +107,7 @@ void LwpStoryMarker::Read()
 {
     LwpMarker::Read();
     m_nFlag = m_pObjStrm->QuickReaduInt16();
-    m_Range.Read(m_pObjStrm);
+    m_Range.Read(m_pObjStrm.get());
     m_pObjStrm->SkipExtra();
 }
 
@@ -128,14 +128,14 @@ LwpCHBlkMarker::LwpCHBlkMarker(LwpObjectHeader &objHdr, LwpSvStream *pStrm)
 void LwpCHBlkMarker::Read()
 {
     LwpStoryMarker::Read();
-    m_objPromptStory.ReadIndexed(m_pObjStrm);
-    m_Help.Read(m_pObjStrm);
+    m_objPromptStory.ReadIndexed(m_pObjStrm.get());
+    m_Help.Read(m_pObjStrm.get());
     m_nAction = m_pObjStrm->QuickReaduInt16();
     m_nTab = m_pObjStrm->QuickReaduInt32();
     m_nFlag = m_pObjStrm->QuickReaduInt16();
     if(m_pObjStrm->CheckExtra())
     {
-        m_Mirror.Read(m_pObjStrm);
+        m_Mirror.Read(m_pObjStrm.get());
         m_pObjStrm->SkipExtra();
     }
 }
@@ -328,7 +328,7 @@ LwpBookMark::LwpBookMark(LwpObjectHeader &objHdr, LwpSvStream *pStrm)
 void LwpBookMark::Read()
 {
     LwpDLNFVList::Read();
-    m_objMarker.ReadIndexed(m_pObjStrm);
+    m_objMarker.ReadIndexed(m_pObjStrm.get());
     if (LwpFileHeader::m_nFileRevision < 0x0008)
     {
         if (m_pObjStrm->QuickReadBool())
@@ -365,11 +365,11 @@ LwpFieldMark::LwpFieldMark(LwpObjectHeader &objHdr, LwpSvStream *pStrm)
 void LwpFieldMark::Read()
 {
     LwpStoryMarker::Read();
-    m_Formula.Read(m_pObjStrm);
-    m_objFormulaStory.ReadIndexed(m_pObjStrm);
+    m_Formula.Read(m_pObjStrm.get());
+    m_objFormulaStory.ReadIndexed(m_pObjStrm.get());
     if (LwpFileHeader::m_nFileRevision < 0x000B)
         return;
-    m_objResultContent.ReadIndexed(m_pObjStrm);
+    m_objResultContent.ReadIndexed(m_pObjStrm.get());
     m_nFlag = m_pObjStrm->QuickReaduInt16();
     m_nFieldType = m_pObjStrm->QuickReaduInt16();
     m_pObjStrm->SkipExtra();
@@ -547,7 +547,7 @@ LwpRubyMarker::LwpRubyMarker(LwpObjectHeader &objHdr, LwpSvStream *pStrm):LwpSto
 void LwpRubyMarker::Read()
 {
     LwpStoryMarker::Read();
-    m_objLayout.ReadIndexed(m_pObjStrm);
+    m_objLayout.ReadIndexed(m_pObjStrm.get());
     m_pObjStrm->SkipExtra();
 }
 
diff --git a/lotuswordpro/source/filter/lwpnotes.cxx b/lotuswordpro/source/filter/lwpnotes.cxx
index 09b28ec..87cf414 100644
--- a/lotuswordpro/source/filter/lwpnotes.cxx
+++ b/lotuswordpro/source/filter/lwpnotes.cxx
@@ -146,13 +146,13 @@ void LwpNoteLayout::Read()
     LwpFrameLayout::Read();
 
     m_nTime = m_pObjStrm->QuickReaduInt32();
-    m_UserName.Read(m_pObjStrm);
+    m_UserName.Read(m_pObjStrm.get());
 
     LwpAtomHolder aUserInitials;
-    aUserInitials.Read(m_pObjStrm);
+    aUserInitials.Read(m_pObjStrm.get());
 
     LwpColor aColor;
-    aColor.Read(m_pObjStrm);
+    aColor.Read(m_pObjStrm.get());
 
     // vacant note sequence
     m_pObjStrm->QuickReadInt32();
diff --git a/lotuswordpro/source/filter/lwpnumericfmt.hxx b/lotuswordpro/source/filter/lwpnumericfmt.hxx
index 3b5021f..12a7aae 100644
--- a/lotuswordpro/source/filter/lwpnumericfmt.hxx
+++ b/lotuswordpro/source/filter/lwpnumericfmt.hxx
@@ -300,7 +300,7 @@ class LwpLayoutNumerics : public LwpVirtualPiece
 {
 public:
     LwpLayoutNumerics(LwpObjectHeader& objHdr, LwpSvStream* pStrm)
-    :LwpVirtualPiece(objHdr, pStrm),cNumerics(m_pObjStrm){}
+    :LwpVirtualPiece(objHdr, pStrm),cNumerics(m_pObjStrm.get()){}
     XFStyle* Convert();
     virtual void Read() override;
 
diff --git a/lotuswordpro/source/filter/lwpobj.cxx b/lotuswordpro/source/filter/lwpobj.cxx
index 334c0c1..efca68d 100644
--- a/lotuswordpro/source/filter/lwpobj.cxx
+++ b/lotuswordpro/source/filter/lwpobj.cxx
@@ -64,16 +64,14 @@ LwpObject::LwpObject(LwpObjectHeader objHdr, LwpSvStream* pStrm)
     , m_pStrm(pStrm), m_bRegisteringStyle(false), m_bParsingStyle(false)
     , m_bConvertingContent(false)
 {
-    m_pObjStrm = new LwpObjectStream(pStrm, m_ObjHdr.IsCompressed(),
-            static_cast<sal_uInt16>(m_ObjHdr.GetSize()) );
+    m_pObjStrm.reset( new LwpObjectStream(pStrm, m_ObjHdr.IsCompressed(),
+            static_cast<sal_uInt16>(m_ObjHdr.GetSize()) ) );
 }
 /**
  * @descr   dtor()
 */
 LwpObject::~LwpObject()
 {
-    delete m_pObjStrm;
-
 }
 /**
  * @descr  QuickRead template
@@ -84,8 +82,7 @@ void LwpObject::QuickRead()
     if(m_pObjStrm)
     {
         m_pObjStrm->ReadComplete();
-        delete m_pObjStrm;
-        m_pObjStrm = nullptr;
+        m_pObjStrm.reset();
     }
 }
 /**
diff --git a/lotuswordpro/source/filter/lwpobj.hxx b/lotuswordpro/source/filter/lwpobj.hxx
index 80dfb5e4..8199d61 100644
--- a/lotuswordpro/source/filter/lwpobj.hxx
+++ b/lotuswordpro/source/filter/lwpobj.hxx
@@ -85,7 +85,7 @@ public:
 protected:
     virtual ~LwpObject() override;
     LwpObjectHeader m_ObjHdr;
-    LwpObjectStream* m_pObjStrm;
+    std::unique_ptr<LwpObjectStream> m_pObjStrm;
     LwpFoundry* m_pFoundry;
     LwpSvStream* m_pStrm;
     bool m_bRegisteringStyle;
diff --git a/lotuswordpro/source/filter/lwpoleobject.cxx b/lotuswordpro/source/filter/lwpoleobject.cxx
index 1260420..e5111c5 100644
--- a/lotuswordpro/source/filter/lwpoleobject.cxx
+++ b/lotuswordpro/source/filter/lwpoleobject.cxx
@@ -87,8 +87,8 @@ void LwpGraphicOleObject::Read()
     if (LwpFileHeader::m_nFileRevision >= 0x000b)
     {
         // I'm not sure about the read method
-        m_pNextObj.ReadIndexed(m_pObjStrm);
-        m_pPrevObj.ReadIndexed(m_pObjStrm);
+        m_pNextObj.ReadIndexed(m_pObjStrm.get());
+        m_pPrevObj.ReadIndexed(m_pObjStrm.get());
     }
     m_pObjStrm->SkipExtra();
 
@@ -215,12 +215,12 @@ void LwpOleObject::Read()
             //if (VO_INVALID == m_pObjStrm->QuickReaduInt16())
             //  return;
 
-            ID.Read(m_pObjStrm);
+            ID.Read(m_pObjStrm.get());
             //return m_pObjStrm->Locate(ID);
         }
         else
         {
-            ID.ReadIndexed(m_pObjStrm);
+            ID.ReadIndexed(m_pObjStrm.get());
             //if (ID.IsNull())
             //  return;
 
diff --git a/lotuswordpro/source/filter/lwppagehint.cxx b/lotuswordpro/source/filter/lwppagehint.cxx
index 510bc4e..08a0182 100644
--- a/lotuswordpro/source/filter/lwppagehint.cxx
+++ b/lotuswordpro/source/filter/lwppagehint.cxx
@@ -96,22 +96,22 @@ void LwpPageHint::Read()
 {
     LwpDLVList::Read();
 
-    m_PageLayout.ReadIndexed(m_pObjStrm);
+    m_PageLayout.ReadIndexed(m_pObjStrm.get());
     //m_ContentHints.ReadIndexed(m_pObjStrm);
-    m_ContentHints.Read(m_pObjStrm);
+    m_ContentHints.Read(m_pObjStrm.get());
     m_nLastFootnoteSeen = m_pObjStrm->QuickReaduInt16();
     m_nLastFootnoteProcessed = m_pObjStrm->QuickReaduInt16();
     m_nFlags = m_pObjStrm->QuickReaduInt16();
     m_nPageNumber = m_pObjStrm->QuickReaduInt16();
     m_nNumberStyle = m_pObjStrm->QuickReaduInt16();
-    m_BeforeText.Read(m_pObjStrm);
-    m_AfterText.Read(m_pObjStrm);
+    m_BeforeText.Read(m_pObjStrm.get());
+    m_AfterText.Read(m_pObjStrm.get());
     m_nNumberFlags = m_pObjStrm->QuickReaduInt8();
     m_nRenderedPageNumber = m_pObjStrm->QuickReaduInt16();
-    m_CurrentSection.ReadIndexed(m_pObjStrm);
+    m_CurrentSection.ReadIndexed(m_pObjStrm.get());
     m_nCurrentSectionPage = m_pObjStrm->QuickReaduInt16();
     //m_FootnoteSeen.ReadIndexed(m_pObjStrm);
-    m_FootnoteSeen.Read(m_pObjStrm);
+    m_FootnoteSeen.Read(m_pObjStrm.get());
     m_nLayoutPageNumber = m_pObjStrm->QuickReaduInt16();
 
     m_pObjStrm->SkipExtra();
diff --git a/lotuswordpro/source/filter/lwppagelayout.cxx b/lotuswordpro/source/filter/lwppagelayout.cxx
index ee2868f..2d95ac7 100644
--- a/lotuswordpro/source/filter/lwppagelayout.cxx
+++ b/lotuswordpro/source/filter/lwppagelayout.cxx
@@ -104,14 +104,14 @@ void LwpPageLayout::Read()
     }
 
     m_nPrinterBin = m_pObjStrm->QuickReaduInt16();
-    m_pPrinterBinName->Read(m_pObjStrm);
+    m_pPrinterBinName->Read(m_pObjStrm.get());
 
     if (LwpFileHeader::m_nFileRevision >= 0x000B)
         m_nBdroffset = m_pObjStrm->QuickReadInt32();
 
     if (m_pObjStrm->CheckExtra())
     {
-        m_pPaperName->Read(m_pObjStrm);
+        m_pPaperName->Read(m_pObjStrm.get());
         m_pObjStrm->SkipExtra();
     }
 
diff --git a/lotuswordpro/source/filter/lwppara.cxx b/lotuswordpro/source/filter/lwppara.cxx
index f27b684..d5ad196 100644
--- a/lotuswordpro/source/filter/lwppara.cxx
+++ b/lotuswordpro/source/filter/lwppara.cxx
@@ -195,8 +195,8 @@ void LwpPara::Read()
             if (Notify)
             {
                 LwpForked3NotifyList* pNotifyList = new LwpForked3NotifyList();
-                pNotifyList->GetExtraList().Read(m_pObjStrm);
-                pNotifyList->Read(m_pObjStrm);
+                pNotifyList->GetExtraList().Read(m_pObjStrm.get());
+                pNotifyList->Read(m_pObjStrm.get());
                 delete pNotifyList;
             }
         }
@@ -205,14 +205,14 @@ void LwpPara::Read()
         m_nOrdinal = 0x0001;
 
     m_nFlags = m_pObjStrm->QuickReaduInt16();
-    m_ParaStyle.ReadIndexed(m_pObjStrm);
+    m_ParaStyle.ReadIndexed(m_pObjStrm.get());
 
     if(!Simple)
     {
-        m_Hint.Read(m_pObjStrm);
+        m_Hint.Read(m_pObjStrm.get());
     }
 
-    m_Story.ReadIndexed(m_pObjStrm);
+    m_Story.ReadIndexed(m_pObjStrm.get());
     if(!Simple)
     {
         if(LwpFileHeader::m_nFileRevision<0x000B)
@@ -238,9 +238,9 @@ void LwpPara::Read()
         m_nLevel = 0x0001;
 
     m_Fribs.SetPara(this);// for silver bullet
-    m_Fribs.ReadPara(m_pObjStrm);
+    m_Fribs.ReadPara(m_pObjStrm.get());
 
-    m_pProps = LwpParaProperty::ReadPropertyList(m_pObjStrm,this);
+    m_pProps = LwpParaProperty::ReadPropertyList(m_pObjStrm.get(),this);
 }
 
 void LwpPara::Parse(IXFStream* pOutputStream)
diff --git a/lotuswordpro/source/filter/lwpparaproperty.cxx b/lotuswordpro/source/filter/lwpparaproperty.cxx
index 2ddd714..6f60ce5 100644
--- a/lotuswordpro/source/filter/lwpparaproperty.cxx
+++ b/lotuswordpro/source/filter/lwpparaproperty.cxx
@@ -227,7 +227,6 @@ m_pBullet(new LwpBulletOverride)
 
 LwpParaBulletProperty::~LwpParaBulletProperty()
 {
-    delete m_pBullet;
 }
 
 LwpParaNumberingProperty::LwpParaNumberingProperty(LwpObjectStream * pStrm)
diff --git a/lotuswordpro/source/filter/lwpparaproperty.hxx b/lotuswordpro/source/filter/lwpparaproperty.hxx
index a83ec90..bec5f31 100644
--- a/lotuswordpro/source/filter/lwpparaproperty.hxx
+++ b/lotuswordpro/source/filter/lwpparaproperty.hxx
@@ -209,12 +209,12 @@ public:
     inline LwpBulletOverride* GetLocalParaBullet();
 
 private:
-    LwpBulletOverride* m_pBullet;
+    std::unique_ptr<LwpBulletOverride> m_pBullet;
 };
 
 inline LwpBulletOverride* LwpParaBulletProperty::GetLocalParaBullet()
 {
-    return m_pBullet;
+    return m_pBullet.get();
 }
 
 class LwpParaNumberingProperty : public LwpParaProperty
diff --git a/lotuswordpro/source/filter/lwpparastyle.cxx b/lotuswordpro/source/filter/lwpparastyle.cxx
index ef7ad92..99143b0 100644
--- a/lotuswordpro/source/filter/lwpparastyle.cxx
+++ b/lotuswordpro/source/filter/lwpparastyle.cxx
@@ -108,43 +108,43 @@ void LwpParaStyle::Read()
     {
         // read many overrides
         LwpAlignmentOverride    aAlignOverride;
-        aAlignOverride.Read(m_pObjStrm);
+        aAlignOverride.Read(m_pObjStrm.get());
 
         LwpSpacingOverride  aSpacingOverride;
-        aSpacingOverride.Read(m_pObjStrm);
+        aSpacingOverride.Read(m_pObjStrm.get());
 
         LwpIndentOverride       aIndentOverride;
-        aIndentOverride.Read(m_pObjStrm);
+        aIndentOverride.Read(m_pObjStrm.get());
 
         LwpParaBorderOverride   aPBOverride;
-        aPBOverride.Read(m_pObjStrm);
+        aPBOverride.Read(m_pObjStrm.get());
 
         LwpBreaksOverride   aBreaksOverride;
-        aBreaksOverride.Read(m_pObjStrm);
+        aBreaksOverride.Read(m_pObjStrm.get());
 
         LwpNumberingOverride    aNumberingOverride;
-        aNumberingOverride.Read(m_pObjStrm);
+        aNumberingOverride.Read(m_pObjStrm.get());
 
         LwpTabOverride      aTabOverride;
-        aTabOverride.Read(m_pObjStrm);
+        aTabOverride.Read(m_pObjStrm.get());
 
     }
     else
     {
-        m_AlignmentStyle.ReadIndexed(m_pObjStrm);
-        m_SpacingStyle.ReadIndexed(m_pObjStrm);
-        m_IndentStyle.ReadIndexed(m_pObjStrm);
-        m_BorderStyle.ReadIndexed(m_pObjStrm);
-        m_BreaksStyle.ReadIndexed(m_pObjStrm);
-        m_NumberingStyle.ReadIndexed(m_pObjStrm);
-        m_TabStyle.ReadIndexed(m_pObjStrm);
+        m_AlignmentStyle.ReadIndexed(m_pObjStrm.get());
+        m_SpacingStyle.ReadIndexed(m_pObjStrm.get());
+        m_IndentStyle.ReadIndexed(m_pObjStrm.get());
+        m_BorderStyle.ReadIndexed(m_pObjStrm.get());
+        m_BreaksStyle.ReadIndexed(m_pObjStrm.get());
+        m_NumberingStyle.ReadIndexed(m_pObjStrm.get());
+        m_TabStyle.ReadIndexed(m_pObjStrm.get());
 
-        m_pKinsokuOptsOverride->Read(m_pObjStrm);
-        m_pBulletOverride->Read(m_pObjStrm);
+        m_pKinsokuOptsOverride->Read(m_pObjStrm.get());
+        m_pBulletOverride->Read(m_pObjStrm.get());
 
         if (m_pObjStrm->CheckExtra())
         {
-            m_BackgroundStyle.ReadIndexed(m_pObjStrm);
+            m_BackgroundStyle.ReadIndexed(m_pObjStrm.get());
             m_pObjStrm->SkipExtra();
         }
 
diff --git a/lotuswordpro/source/filter/lwppiece.hxx b/lotuswordpro/source/filter/lwppiece.hxx
index ee172ff..8c24fb4 100644
--- a/lotuswordpro/source/filter/lwppiece.hxx
+++ b/lotuswordpro/source/filter/lwppiece.hxx
@@ -87,7 +87,7 @@ public:
     {
         LwpDLVList::Read();
         if( m_pOverride )
-            m_pOverride->Read(m_pObjStrm);
+            m_pOverride->Read(m_pObjStrm.get());
     }
 
     LwpOverride* GetOverride()
diff --git a/lotuswordpro/source/filter/lwpproplist.cxx b/lotuswordpro/source/filter/lwpproplist.cxx
index 4bf5d8c..2c62f25 100644
--- a/lotuswordpro/source/filter/lwpproplist.cxx
+++ b/lotuswordpro/source/filter/lwpproplist.cxx
@@ -73,8 +73,8 @@ LwpPropListElement* LwpPropListElement::GetNext()
 void LwpPropListElement::Read()
 {
     LwpDLVList::Read();
-    m_Name.Read(m_pObjStrm);
-    m_Value.Read(m_pObjStrm);
+    m_Name.Read(m_pObjStrm.get());
+    m_Value.Read(m_pObjStrm.get());
     m_pObjStrm->SkipExtra();
 }
 
diff --git a/lotuswordpro/source/filter/lwprowlayout.cxx b/lotuswordpro/source/filter/lwprowlayout.cxx
index 1e83779..8d0441b 100644
--- a/lotuswordpro/source/filter/lwprowlayout.cxx
+++ b/lotuswordpro/source/filter/lwprowlayout.cxx
@@ -154,7 +154,7 @@ void LwpRowLayout::RegisterStyle()
 void LwpRowLayout::Read()
 {
     #define MAXUNIT (0x7fffffffL)               // Highest positive UNIT value
-    LwpObjectStream* pStrm = m_pObjStrm;
+    LwpObjectStream* pStrm = m_pObjStrm.get();
 
     LwpVirtualLayout::Read();
 
@@ -475,7 +475,7 @@ void LwpRowHeadingLayout::Read()
 {
     LwpRowLayout::Read();
 
-    cRowLayout.ReadIndexed(m_pObjStrm);
+    cRowLayout.ReadIndexed(m_pObjStrm.get());
     m_pObjStrm->SkipExtra();
 }
 
diff --git a/lotuswordpro/source/filter/lwpsection.cxx b/lotuswordpro/source/filter/lwpsection.cxx
index d61cbe9..ea44aff 100644
--- a/lotuswordpro/source/filter/lwpsection.cxx
+++ b/lotuswordpro/source/filter/lwpsection.cxx
@@ -78,8 +78,8 @@ void LwpOrderedObject::Read()
 {
     LwpDLNFVList::Read();
 
-    m_ListList.ReadIndexed(m_pObjStrm);
-    m_Para.ReadIndexed(m_pObjStrm);
+    m_ListList.ReadIndexed(m_pObjStrm.get());
+    m_Para.ReadIndexed(m_pObjStrm.get());
     m_pObjStrm->SkipExtra();
 }
 
@@ -101,9 +101,9 @@ void LwpSection::Read()
 {
     LwpOrderedObject::Read();
     m_Flags = m_pObjStrm->QuickReaduInt16();
-    m_PageLayout.ReadIndexed(m_pObjStrm);
-    m_Color.Read(m_pObjStrm);
-    m_AtomHolder.Read(m_pObjStrm);
+    m_PageLayout.ReadIndexed(m_pObjStrm.get());
+    m_Color.Read(m_pObjStrm.get());
+    m_AtomHolder.Read(m_pObjStrm.get());
     m_pObjStrm->SkipExtra();
 }
 
@@ -133,10 +133,10 @@ LwpIndexSection::~LwpIndexSection()
 void LwpIndexSection::Read()
 {
     LwpSection::Read();
-    m_TextMarker.Read(m_pObjStrm);
-    m_ParentName.Read(m_pObjStrm);
-    m_DivisionName.Read(m_pObjStrm);
-    m_SectionName.Read(m_pObjStrm);
+    m_TextMarker.Read(m_pObjStrm.get());
+    m_ParentName.Read(m_pObjStrm.get());
+    m_DivisionName.Read(m_pObjStrm.get());
+    m_SectionName.Read(m_pObjStrm.get());
     m_nForm = m_pObjStrm->QuickReaduInt16();
     m_nFlags = m_pObjStrm->QuickReaduInt16();
     m_pObjStrm->SkipExtra();
diff --git a/lotuswordpro/source/filter/lwpsilverbullet.cxx b/lotuswordpro/source/filter/lwpsilverbullet.cxx
index 4973304..4446aed 100644
--- a/lotuswordpro/source/filter/lwpsilverbullet.cxx
+++ b/lotuswordpro/source/filter/lwpsilverbullet.cxx
@@ -78,7 +78,6 @@ LwpSilverBullet::LwpSilverBullet(LwpObjectHeader& objHdr, LwpSvStream* pStrm)
 
 LwpSilverBullet::~LwpSilverBullet()
 {
-    delete m_pAtomHolder;
 }
 
 void LwpSilverBullet::Read()
@@ -86,7 +85,7 @@ void LwpSilverBullet::Read()
     LwpDLNFVList::Read();
 
     m_nFlags = m_pObjStrm->QuickReaduInt16();
-    m_aStory.ReadIndexed(m_pObjStrm);
+    m_aStory.ReadIndexed(m_pObjStrm.get());
 
     sal_uInt16 nNumPos = m_pObjStrm->QuickReaduInt16();
 
@@ -98,7 +97,7 @@ void LwpSilverBullet::Read()
 
     m_nUseCount = m_pObjStrm->QuickReaduInt32();
 
-    m_pAtomHolder->Read(m_pObjStrm);
+    m_pAtomHolder->Read(m_pObjStrm.get());
 }
 
 /**
diff --git a/lotuswordpro/source/filter/lwpsilverbullet.hxx b/lotuswordpro/source/filter/lwpsilverbullet.hxx
index 89ea734..03dc2e5 100644
--- a/lotuswordpro/source/filter/lwpsilverbullet.hxx
+++ b/lotuswordpro/source/filter/lwpsilverbullet.hxx
@@ -132,7 +132,7 @@ private:
     LwpObjectID     m_aStory;
     sal_uInt8       m_pResetPositionFlags[MAXNUMBERPOSITIONS];
     sal_uInt32      m_nUseCount;
-    LwpAtomHolder*  m_pAtomHolder;
+    std::unique_ptr<LwpAtomHolder> m_pAtomHolder;
 
     rtl::Reference<LwpPara> m_xBulletPara;
     OUString m_strStyleName;
diff --git a/lotuswordpro/source/filter/lwpstory.cxx b/lotuswordpro/source/filter/lwpstory.cxx
index 45827b9..3038348 100644
--- a/lotuswordpro/source/filter/lwpstory.cxx
+++ b/lotuswordpro/source/filter/lwpstory.cxx
@@ -81,14 +81,13 @@ LwpStory::LwpStory(LwpObjectHeader &objHdr, LwpSvStream* pStrm)
 
 LwpStory::~LwpStory()
 {
-    delete m_pHyperlinkMgr;
 }
 
 void LwpStory::Read()
 {
     LwpContent::Read();
-    m_ParaList.Read(m_pObjStrm);
-    m_FirstParaStyle.ReadIndexed(m_pObjStrm);
+    m_ParaList.Read(m_pObjStrm.get());
+    m_FirstParaStyle.ReadIndexed(m_pObjStrm.get());
     m_pObjStrm->SkipExtra();
 }
 
diff --git a/lotuswordpro/source/filter/lwpstory.hxx b/lotuswordpro/source/filter/lwpstory.hxx
index a99777b..39a5b22 100644
--- a/lotuswordpro/source/filter/lwpstory.hxx
+++ b/lotuswordpro/source/filter/lwpstory.hxx
@@ -87,7 +87,7 @@ private:
     LwpLayout* m_pTabLayout;    //for register tab style
 
     bool m_bDropcap;
-    LwpHyperlinkMgr* m_pHyperlinkMgr;
+    std::unique_ptr<LwpHyperlinkMgr> m_pHyperlinkMgr;
     OUString m_CurrSectionName;
 
     XFContentContainer* m_pXFContainer;
@@ -112,7 +112,7 @@ public:
     LwpPageLayout* GetCurrentLayout() { return m_pCurrentLayout; }
     inline LwpMiddleLayout* GetTabLayout();//for register tab style
     const OUString& GetSectionName() { return m_CurrSectionName; }
-    LwpHyperlinkMgr* GetHyperlinkMgr() { return m_pHyperlinkMgr; }
+    LwpHyperlinkMgr* GetHyperlinkMgr() { return m_pHyperlinkMgr.get(); }
 
     inline bool IsPMModified() { return m_bPMModified; }
     inline void SetPMModified(bool bPMModified);
diff --git a/lotuswordpro/source/filter/lwptable.cxx b/lotuswordpro/source/filter/lwptable.cxx
index 480fb5a..416c3f2 100644
--- a/lotuswordpro/source/filter/lwptable.cxx
+++ b/lotuswordpro/source/filter/lwptable.cxx
@@ -114,11 +114,11 @@ void LwpTable::Read()
 
     m_nAttributes = m_pObjStrm->QuickReaduInt16();
 
-    m_Layout.ReadIndexed(m_pObjStrm);
+    m_Layout.ReadIndexed(m_pObjStrm.get());
 
-    m_DefaultCellStyle.ReadIndexed(m_pObjStrm);
+    m_DefaultCellStyle.ReadIndexed(m_pObjStrm.get());
     if (LwpFileHeader::m_nFileRevision >= 0x0007)
-        m_CPNotifyList.Read(m_pObjStrm);
+        m_CPNotifyList.Read(m_pObjStrm.get());
 
     m_pObjStrm->SkipExtra();
 }
@@ -171,8 +171,8 @@ LwpParallelColumns::~LwpParallelColumns()
 void LwpParallelColumns::Read()
 {
     LwpTable::Read();
-    cDefaultLeftColumnStyle.ReadIndexed(m_pObjStrm);
-    cDefaultRightColumnStyle.ReadIndexed(m_pObjStrm);
+    cDefaultLeftColumnStyle.ReadIndexed(m_pObjStrm.get());
+    cDefaultRightColumnStyle.ReadIndexed(m_pObjStrm.get());
 
     m_pObjStrm->SkipExtra();
 }
diff --git a/lotuswordpro/source/filter/lwptablelayout.cxx b/lotuswordpro/source/filter/lwptablelayout.cxx
index 0c8cbb2..76f681a 100644
--- a/lotuswordpro/source/filter/lwptablelayout.cxx
+++ b/lotuswordpro/source/filter/lwptablelayout.cxx
@@ -818,7 +818,7 @@ void LwpTableLayout::Read()
     {
         assert(false);
     }
-    m_ColumnLayout.ReadIndexed(m_pObjStrm);
+    m_ColumnLayout.ReadIndexed(m_pObjStrm.get());
 
     m_pObjStrm->SkipExtra();
 }
@@ -1429,7 +1429,7 @@ LwpColumnLayout::~LwpColumnLayout()
 {}
 void LwpColumnLayout::Read()
 {
-    LwpObjectStream* pStrm = m_pObjStrm;
+    LwpObjectStream* pStrm = m_pObjStrm.get();
 
     LwpVirtualLayout::Read();
 
diff --git a/lotuswordpro/source/filter/lwptabrack.cxx b/lotuswordpro/source/filter/lwptabrack.cxx
index 25b3cfa..a3aac9a 100644
--- a/lotuswordpro/source/filter/lwptabrack.cxx
+++ b/lotuswordpro/source/filter/lwptabrack.cxx
@@ -87,14 +87,14 @@ LwpTabRack::LwpTabRack(LwpObjectHeader objHdr, LwpSvStream* pStrm):LwpObject(obj
 
 void LwpTabRack::Read()
 {
-    m_NextID.ReadIndexed(m_pObjStrm);
+    m_NextID.ReadIndexed(m_pObjStrm.get());
 
     m_nNumTabs = m_pObjStrm->QuickReaduInt16();
     if (m_nNumTabs > MaxTabs)
         throw std::range_error("corrupt LwpTabRack");
     for (int i=0; i<m_nNumTabs; ++i)
     {
-        m_aTabs[i].Read(m_pObjStrm);
+        m_aTabs[i].Read(m_pObjStrm.get());
         m_pObjStrm->SkipExtra();
     }
     m_pObjStrm->SkipExtra();
diff --git a/lotuswordpro/source/filter/lwptblcell.cxx b/lotuswordpro/source/filter/lwptblcell.cxx
index 8f031af..d60a20d 100644
--- a/lotuswordpro/source/filter/lwptblcell.cxx
+++ b/lotuswordpro/source/filter/lwptblcell.cxx
@@ -77,17 +77,17 @@ void LwpCellList::Read()
     LwpDLVList::Read();
 
     LwpDLVListHeadTail cChild;
-    cChild.Read(m_pObjStrm);
+    cChild.Read(m_pObjStrm.get());
 
-    cParent.ReadIndexed(m_pObjStrm);
+    cParent.ReadIndexed(m_pObjStrm.get());
 
     if (LwpFileHeader::m_nFileRevision < 0x0006)
         m_pObjStrm->SkipExtra();
 
-    cValue.ReadIndexed(m_pObjStrm);
+    cValue.ReadIndexed(m_pObjStrm.get());
 
     LwpObjectID cDependent;
-    cDependent.ReadIndexed(m_pObjStrm);
+    cDependent.ReadIndexed(m_pObjStrm.get());
 
     cColumn = (sal_uInt8) m_pObjStrm->QuickReaduInt16();        // written as a sal_uInt16
 //  sal_uInt8 cCellFlags = (sal_uInt8) m_pObjStrm->QuickReaduInt16();   // written as a sal_uInt16
@@ -142,8 +142,8 @@ void LwpRowList::Read()
     // CDLFVList read construction
     LwpDLVList::Read();
 
-    cChild.Read(m_pObjStrm);
-    cParent.ReadIndexed(m_pObjStrm);
+    cChild.Read(m_pObjStrm.get());
+    cParent.ReadIndexed(m_pObjStrm.get());
 
     if (LwpFileHeader::m_nFileRevision < 0x0006)
         m_pObjStrm->SkipExtra();
@@ -167,8 +167,8 @@ void LwpTableRange::Read()
 {
     LwpDLVList::Read();
 
-    cqTable.ReadIndexed(m_pObjStrm);
-    cpCellRange.ReadIndexed(m_pObjStrm);
+    cqTable.ReadIndexed(m_pObjStrm.get());
+    cpCellRange.ReadIndexed(m_pObjStrm.get());
     m_pObjStrm->SkipExtra();
 }
 
@@ -184,7 +184,7 @@ LwpCellRange::~LwpCellRange()
 
 void LwpCellRange::Read()
 {
-    cpFolder.ReadIndexed(m_pObjStrm);
+    cpFolder.ReadIndexed(m_pObjStrm.get());
     m_pObjStrm->SkipExtra();
 }
 
@@ -203,13 +203,13 @@ void LwpFolder::Read()
     // CDLFVList read construction
     LwpDLVList::Read();
 
-    cChild.Read(m_pObjStrm);
-    cParent.ReadIndexed(m_pObjStrm);
+    cChild.Read(m_pObjStrm.get());
+    cParent.ReadIndexed(m_pObjStrm.get());
 
     if (LwpFileHeader::m_nFileRevision < 0x0006)
         m_pObjStrm->SkipExtra();
 
-    cqTable.ReadIndexed(m_pObjStrm);
+    cqTable.ReadIndexed(m_pObjStrm.get());
     m_pObjStrm->SkipExtra();
 }
 
@@ -230,7 +230,7 @@ void LwpDependent::Read()
 {
     LwpDLVList::Read();
 
-    cFormulaInfo.ReadIndexed(m_pObjStrm);
+    cFormulaInfo.ReadIndexed(m_pObjStrm.get());
     cReferenceOffset = m_pObjStrm->QuickReaduInt16();
     cFlags = (sal_uInt8)m_pObjStrm->QuickReaduInt16();  // Written as lushort.
 
diff --git a/lotuswordpro/source/filter/lwptblformula.cxx b/lotuswordpro/source/filter/lwptblformula.cxx
index e8ba28d..7732d48 100644
--- a/lotuswordpro/source/filter/lwptblformula.cxx
+++ b/lotuswordpro/source/filter/lwptblformula.cxx
@@ -125,8 +125,8 @@ bool LwpFormulaInfo::ReadCellID()
     LwpColumnSpecifier ColumnSpecifier;
     bool readSucceeded = true;
 
-    RowSpecifier.QuickRead(m_pObjStrm);
-    ColumnSpecifier.QuickRead(m_pObjStrm);
+    RowSpecifier.QuickRead(m_pObjStrm.get());
+    ColumnSpecifier.QuickRead(m_pObjStrm.get());
 
     m_aStack.push_back( new LwpFormulaCellAddr(ColumnSpecifier.ColumnID(cColumn),
                                                 RowSpecifier.RowID(m_nFormulaRow)) );
@@ -324,7 +324,7 @@ void LwpFormulaInfo::Read()
     m_pObjStrm->SeekRel(2);//flags, size in file: sal_uInt16
 
     LwpNotifyListPersistent cNotifyList;
-    cNotifyList.Read(m_pObjStrm);
+    cNotifyList.Read(m_pObjStrm.get());
 
     ReadExpression();
 
diff --git a/lotuswordpro/source/filter/lwptoc.cxx b/lotuswordpro/source/filter/lwptoc.cxx
index 27ab9e3..8714491 100644
--- a/lotuswordpro/source/filter/lwptoc.cxx
+++ b/lotuswordpro/source/filter/lwptoc.cxx
@@ -93,25 +93,25 @@ LwpTocSuperLayout::~LwpTocSuperLayout()
 void LwpTocSuperLayout::Read()
 {
     LwpSuperTableLayout::Read();
-    m_TextMarker.Read(m_pObjStrm);
-    m_ParentName.Read(m_pObjStrm);
-    m_DivisionName.Read(m_pObjStrm);
-    m_SectionName.Read(m_pObjStrm);
+    m_TextMarker.Read(m_pObjStrm.get());
+    m_ParentName.Read(m_pObjStrm.get());
+    m_DivisionName.Read(m_pObjStrm.get());
+    m_SectionName.Read(m_pObjStrm.get());
     m_nFrom = m_pObjStrm->QuickReaduInt16();
 
-    m_SearchItems.Read(m_pObjStrm);
+    m_SearchItems.Read(m_pObjStrm.get());
 
     sal_uInt16 count = m_pObjStrm->QuickReaduInt16();
     if (count > MAX_LEVELS)
         throw std::range_error("corrupt LwpTocSuperLayout");
     for (sal_uInt16 i = 0; i < count; ++i)
-        m_DestName[i].Read(m_pObjStrm);
+        m_DestName[i].Read(m_pObjStrm.get());
 
     count = m_pObjStrm->QuickReaduInt16();
     if (count > MAX_LEVELS)
         throw std::range_error("corrupt LwpTocSuperLayout");
     for (sal_uInt16 i = 0; i < count; ++i)
-        m_DestPGName[i].Read(m_pObjStrm);
+        m_DestPGName[i].Read(m_pObjStrm.get());
 
     count = m_pObjStrm->QuickReaduInt16();
     if (count > MAX_LEVELS)
@@ -468,7 +468,7 @@ void LwpTocLevelData::Read()
     LwpDLVList::Read();
     m_nFlags = m_pObjStrm->QuickReaduInt16();
     m_nLevel = m_pObjStrm->QuickReaduInt16();
-    m_SearchName.Read(m_pObjStrm);
+    m_SearchName.Read(m_pObjStrm.get());
 
     m_pObjStrm->SkipExtra();
 }
diff --git a/lotuswordpro/source/filter/lwpverdocument.cxx b/lotuswordpro/source/filter/lwpverdocument.cxx
index 5092e5c..19bc021 100644
--- a/lotuswordpro/source/filter/lwpverdocument.cxx
+++ b/lotuswordpro/source/filter/lwpverdocument.cxx
@@ -78,12 +78,12 @@ void LwpVerDocument::Read()
 
     if (m_pObjStrm->CheckExtra())
     {
-        LwpLineNumberOptions aLineNumberOptions(m_pObjStrm);
+        LwpLineNumberOptions aLineNumberOptions(m_pObjStrm.get());
 
         if (m_pObjStrm->CheckExtra())
         {
             LwpPropList aPropList;
-            aPropList.Read(m_pObjStrm);
+            aPropList.Read(m_pObjStrm.get());
             m_pObjStrm->SkipExtra();
         }
     }
diff --git a/lotuswordpro/source/filter/lwpvpointer.cxx b/lotuswordpro/source/filter/lwpvpointer.cxx
index 9d1a7dc..9d1fdb2 100644
--- a/lotuswordpro/source/filter/lwpvpointer.cxx
+++ b/lotuswordpro/source/filter/lwpvpointer.cxx
@@ -62,7 +62,7 @@ LwpVersionedPointer::LwpVersionedPointer(LwpObjectHeader& objHdr, LwpSvStream* p
 
 void LwpVersionedPointer::Read()
 {
-    m_PointerID.ReadIndexed(m_pObjStrm);
+    m_PointerID.ReadIndexed(m_pObjStrm.get());
     if( LwpFileHeader::m_nFileRevision < 0x0006 )
         m_pObjStrm->SkipExtra();
 }
diff --git a/lotuswordpro/source/filter/tocread.cxx b/lotuswordpro/source/filter/tocread.cxx
index 192a636..0b0a32e 100644
--- a/lotuswordpro/source/filter/tocread.cxx
+++ b/lotuswordpro/source/filter/tocread.cxx
@@ -80,8 +80,8 @@ CBenTOCReader::ReadLabelAndTOC()
     if ((Err = cpContainer->SeekToPosition(TOCOffset)) != BenErr_OK)
         return Err;
 
-    cpTOC = new BenByte[cTOCSize];
-    if ((Err = cpContainer->ReadKnownSize(cpTOC, cTOCSize)) != BenErr_OK)
+    cpTOC.reset( new BenByte[cTOCSize] );
+    if ((Err = cpContainer->ReadKnownSize(cpTOC.get(), cTOCSize)) != BenErr_OK)
         return Err;
 
     if ((Err = ReadTOC()) != BenErr_OK)
@@ -463,7 +463,7 @@ CBenTOCReader::GetByte(BenByte * pByte)
     if (! CanGetData(1))
         return BenErr_ReadPastEndOfTOC;
 
-    *pByte = UtGetIntelByte(cpTOC + cCurr);
+    *pByte = UtGetIntelByte(cpTOC.get() + cCurr);
     ++cCurr;
     return BenErr_OK;
 }
@@ -474,7 +474,7 @@ CBenTOCReader::GetDWord(BenDWord * pDWord)
     if (! CanGetData(4))
         return BenErr_ReadPastEndOfTOC;
 
-    *pDWord = UtGetIntelDWord(cpTOC + cCurr);
+    *pDWord = UtGetIntelDWord(cpTOC.get() + cCurr);
     cCurr += 4;
     return BenErr_OK;
 }
@@ -503,7 +503,7 @@ CBenTOCReader::GetData(void * pBuffer, unsigned long Amt)
     if (! CanGetData(Amt))
         return BenErr_ReadPastEndOfTOC;
 
-    UtHugeMemcpy(pBuffer, cpTOC + cCurr, Amt);
+    UtHugeMemcpy(pBuffer, cpTOC.get() + cCurr, Amt);
     cCurr += Amt;
     return BenErr_OK;
 }
diff --git a/lotuswordpro/source/filter/tocread.hxx b/lotuswordpro/source/filter/tocread.hxx
index 524ece0..eb86ca7 100644
--- a/lotuswordpro/source/filter/tocread.hxx
+++ b/lotuswordpro/source/filter/tocread.hxx
@@ -63,12 +63,11 @@ class CBenTOCReader
 public: // Methods
     explicit CBenTOCReader(pLtcBenContainer pContainer)
         : cpContainer(pContainer)
-        , cpTOC(nullptr)
         , cBlockSize(0)
         , cCurr(0)
         , cTOCSize(0)
         { }
-    ~CBenTOCReader() { delete[] cpTOC; }
+    ~CBenTOCReader() {}
     BenError ReadLabelAndTOC();
 
 private: // Methods
@@ -85,7 +84,7 @@ private: // Methods
 
 private: // Data
     pLtcBenContainer cpContainer;
-    BenByte*         cpTOC;
+    std::unique_ptr<BenByte[]> cpTOC;
     unsigned long cBlockSize;
     unsigned long cCurr;
     unsigned long cTOCSize;
diff --git a/lotuswordpro/source/filter/xfilter/xfcell.cxx b/lotuswordpro/source/filter/xfilter/xfcell.cxx
index 4eb91d6..cc21b9b7 100644
--- a/lotuswordpro/source/filter/xfilter/xfcell.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfcell.cxx
@@ -77,7 +77,6 @@ XFCell::XFCell()
 
 XFCell::~XFCell()
 {
-    delete m_pSubTable;
 }
 
 void    XFCell::Add(XFContent *pContent)
@@ -87,7 +86,7 @@ void    XFCell::Add(XFContent *pContent)
         Reset();
         m_eValueType = enumXFValueTypeNone;
     }
-    if (m_pSubTable)
+    if (m_pSubTable.is())
     {
         throw std::runtime_error("subtable already set");
     }
@@ -184,7 +183,7 @@ void    XFCell::ToXml(IXFStream *pStrm)
 
     pStrm->StartElement( "table:table-cell" );
 
-    if( m_pSubTable )
+    if( m_pSubTable.is() )
         m_pSubTable->ToXml(pStrm);
     else
     {
diff --git a/lotuswordpro/source/filter/xfilter/xfcell.hxx b/lotuswordpro/source/filter/xfilter/xfcell.hxx
index d8a6e3f..fceef5a 100644
--- a/lotuswordpro/source/filter/xfilter/xfcell.hxx
+++ b/lotuswordpro/source/filter/xfilter/xfcell.hxx
@@ -141,11 +141,12 @@ public:
      */
     virtual void    ToXml(IXFStream *pStrm) override;
 
-    const XFTable*  GetSubTable() const { return m_pSubTable; }
+    const XFTable*  GetSubTable() const { return m_pSubTable.get(); }
 
 private:
     XFRow          *m_pOwnerRow;
-    XFTable        *m_pSubTable;
+    rtl::Reference<XFTable>
+                    m_pSubTable;
     sal_Int32       m_nCol;
     sal_Int32       m_nColSpaned;
     sal_Int32       m_nRepeated;
diff --git a/lotuswordpro/source/filter/xfilter/xfcellstyle.cxx b/lotuswordpro/source/filter/xfilter/xfcellstyle.cxx
index aca72f7..aab7919 100644
--- a/lotuswordpro/source/filter/xfilter/xfcellstyle.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfcellstyle.cxx
@@ -73,7 +73,6 @@ XFCellStyle::XFCellStyle()
 
 XFCellStyle::~XFCellStyle()
 {
-    delete m_pBorders;
 }
 
 void XFCellStyle::SetPadding(double left, double right,double top, double bottom)
@@ -101,8 +100,7 @@ void    XFCellStyle::SetBackImage(XFBGImage *pImage)
 
 void    XFCellStyle::SetBorders(XFBorders *pBorders)
 {
-    delete m_pBorders;
-    m_pBorders = pBorders;
+    m_pBorders.reset( pBorders );
 }
 
 enumXFStyle XFCellStyle::GetStyleFamily()
diff --git a/lotuswordpro/source/filter/xfilter/xfcellstyle.hxx b/lotuswordpro/source/filter/xfilter/xfcellstyle.hxx
index b945a65..0f9ec76 100644
--- a/lotuswordpro/source/filter/xfilter/xfcellstyle.hxx
+++ b/lotuswordpro/source/filter/xfilter/xfcellstyle.hxx
@@ -70,6 +70,8 @@
 #include "xfpadding.hxx"
 #include "xfshadow.hxx"
 
+#include <memory>
+
 class XFBorders;
 class XFFont;
 class XFBorders;
@@ -143,7 +145,7 @@ private:
     XFPadding   m_aPadding;
     rtl::Reference<XFFont> m_pFont;
     XFShadow    m_aShadow;
-    XFBorders   *m_pBorders;
+    std::unique_ptr<XFBorders>  m_pBorders;
     bool    m_bWrapText;
 };
 
diff --git a/lotuswordpro/source/filter/xfilter/xfsaxstream.cxx b/lotuswordpro/source/filter/xfilter/xfsaxstream.cxx
index a7c3565..9932fdb 100644
--- a/lotuswordpro/source/filter/xfilter/xfsaxstream.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfsaxstream.cxx
@@ -80,12 +80,11 @@ using namespace ::com::sun::star::uno;
 XFSaxStream::XFSaxStream(Reference<XDocumentHandler>& xHandler)
 {
     m_aHandler = xHandler;
-    m_pAttrList = new XFSaxAttrList();
+    m_pAttrList.reset(new XFSaxAttrList );
 }
 
 XFSaxStream::~XFSaxStream()
 {
-    delete m_pAttrList;
 }
 
 void        XFSaxStream::StartDocument()
@@ -124,7 +123,7 @@ void        XFSaxStream::Characters(const OUString& oustr)
 
 IXFAttrList*    XFSaxStream::GetAttrList()
 {
-    return m_pAttrList;
+    return m_pAttrList.get();
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/xfilter/xfsaxstream.hxx b/lotuswordpro/source/filter/xfilter/xfsaxstream.hxx
index 6880b7a..c783319 100644
--- a/lotuswordpro/source/filter/xfilter/xfsaxstream.hxx
+++ b/lotuswordpro/source/filter/xfilter/xfsaxstream.hxx
@@ -61,6 +61,7 @@
 #define INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_XFILTER_XFSAXSTREAM_HXX
 
 #include "ixfstream.hxx"
+#include <memory>
 
 #include <cppuhelper/factory.hxx>
 #include <com/sun/star/document/XFilter.hpp>
@@ -116,7 +117,7 @@ public:
 
 public:
     css::uno::Reference<css::xml::sax::XDocumentHandler> m_aHandler;
-    XFSaxAttrList               *m_pAttrList;
+    std::unique_ptr<XFSaxAttrList>                       m_pAttrList;
 };
 
 #endif //XFSAXSTREAM_INC
diff --git a/lotuswordpro/source/filter/xfilter/xfsectionstyle.cxx b/lotuswordpro/source/filter/xfilter/xfsectionstyle.cxx
index 89f968e..43aada9 100644
--- a/lotuswordpro/source/filter/xfilter/xfsectionstyle.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfsectionstyle.cxx
@@ -69,7 +69,6 @@ XFSectionStyle::XFSectionStyle()
 
 XFSectionStyle::~XFSectionStyle()
 {
-    delete m_pColumns;
 }
 
 enumXFStyle XFSectionStyle::GetStyleFamily()
@@ -89,8 +88,7 @@ void XFSectionStyle::SetMarginRight(double right)
 
 void    XFSectionStyle::SetColumns(XFColumns *pColumns)
 {
-    delete m_pColumns;
-    m_pColumns = pColumns;
+    m_pColumns.reset( pColumns );
 }
 
 void XFSectionStyle::ToXml(IXFStream *pStrm)
diff --git a/lotuswordpro/source/filter/xfilter/xfsectionstyle.hxx b/lotuswordpro/source/filter/xfilter/xfsectionstyle.hxx
index af0a88c..fc7025a 100644
--- a/lotuswordpro/source/filter/xfilter/xfsectionstyle.hxx
+++ b/lotuswordpro/source/filter/xfilter/xfsectionstyle.hxx
@@ -64,6 +64,7 @@
 #include "xfstyle.hxx"
 #include "xfbgimage.hxx"
 #include "xfcolor.hxx"
+#include <memory>
 
 class XFColumns;
 /*
@@ -92,7 +93,7 @@ private:
     double      m_fMarginLeft;
     double      m_fMarginRight;
     XFColor     m_aBackColor;
-    XFColumns   *m_pColumns;
+    std::unique_ptr<XFColumns>  m_pColumns;
 };
 
 #endif
diff --git a/lotuswordpro/source/filter/xfilter/xftablestyle.cxx b/lotuswordpro/source/filter/xfilter/xftablestyle.cxx
index 04a8443..0a4ae26 100644
--- a/lotuswordpro/source/filter/xfilter/xftablestyle.cxx
+++ b/lotuswordpro/source/filter/xfilter/xftablestyle.cxx
@@ -68,14 +68,11 @@ XFTableStyle::XFTableStyle()
 
 XFTableStyle::~XFTableStyle()
 {
-    delete m_pBGImage;
 }
 
 void    XFTableStyle::SetBackImage(XFBGImage *pImage)
 {
-    delete m_pBGImage;
-
-    m_pBGImage = pImage;
+    m_pBGImage.reset( pImage );
 }
 
 enumXFStyle XFTableStyle::GetStyleFamily()
diff --git a/lotuswordpro/source/filter/xfilter/xftablestyle.hxx b/lotuswordpro/source/filter/xfilter/xftablestyle.hxx
index 8db8218..dc4788b 100644
--- a/lotuswordpro/source/filter/xfilter/xftablestyle.hxx
+++ b/lotuswordpro/source/filter/xfilter/xftablestyle.hxx
@@ -65,6 +65,7 @@
 #include "xfshadow.hxx"
 #include "xfcolor.hxx"
 #include "xfbreaks.hxx"
+#include <memory>
 
 class XFBGImage;
 class XFTableStyle : public XFStyle
@@ -92,7 +93,7 @@ public:
 private:
     double  m_fWidth;
     XFColor m_aBackColor;
-    XFBGImage   *m_pBGImage;
+    std::unique_ptr<XFBGImage> m_pBGImage;
     XFShadow    m_aShadow;
     XFMargins   m_aMargins;
     XFBreaks    m_aBreaks;


More information about the Libreoffice-commits mailing list