fix leak
Change-Id: I1c1e861c5608ccd2071baf683f5456c3012a47f6
diff --git a/lotuswordpro/source/filter/lwppara.cxx b/lotuswordpro/source/filter/lwppara.cxx
index 82192ec..17f0c04 100644
--- a/lotuswordpro/source/filter/lwppara.cxx
+++ b/lotuswordpro/source/filter/lwppara.cxx
@@ -123,17 +123,11 @@ LwpPara::LwpPara(LwpObjectHeader& objHdr, LwpSvStream* pStrm)
LwpPara::~LwpPara()
{
if (m_pBreaks)
{
delete m_pBreaks;
m_pBreaks = nullptr;
}
/* if (m_pParaNumbering)
{
delete m_pParaNumbering;
m_pParaNumbering = NULL;
}*/
if (m_pBullOver)
{
@@ -240,7 +234,7 @@ void LwpPara::Read()
m_Fribs.SetPara(this);// for silver bullet
m_Fribs.ReadPara(m_pObjStrm.get());
m_pProps = LwpParaProperty::ReadPropertyList(m_pObjStrm.get(),this);
ReadPropertyList(m_pObjStrm.get());
}
void LwpPara::Parse(IXFStream* pOutputStream)
diff --git a/lotuswordpro/source/filter/lwppara.hxx b/lotuswordpro/source/filter/lwppara.hxx
index 7fc270af..d96b50f 100644
--- a/lotuswordpro/source/filter/lwppara.hxx
+++ b/lotuswordpro/source/filter/lwppara.hxx
@@ -276,6 +276,8 @@ private:
void AddBreakAfter(XFContentContainer* pCont);
void AddBreakBefore(XFContentContainer* pCont);
XFSection* CreateXFSection();
void ReadPropertyList(LwpObjectStream* pFile);
};
inline LwpSilverBullet* LwpPara::GetSilverBullet()
diff --git a/lotuswordpro/source/filter/lwpparaproperty.cxx b/lotuswordpro/source/filter/lwpparaproperty.cxx
index 6f60ce5..297a1f0 100644
--- a/lotuswordpro/source/filter/lwpparaproperty.cxx
+++ b/lotuswordpro/source/filter/lwpparaproperty.cxx
@@ -62,9 +62,8 @@
#include "lwpobjtags.hxx"
#include "lwppara.hxx"
LwpParaProperty* LwpParaProperty::ReadPropertyList(LwpObjectStream* pFile,rtl::Reference<LwpObject> const & Whole)
void LwpPara::ReadPropertyList(LwpObjectStream* pFile)
{
LwpParaProperty* Prop= nullptr;
LwpParaProperty* NewProp= nullptr;
for(;;)
@@ -112,7 +111,7 @@ LwpParaProperty* LwpParaProperty::ReadPropertyList(LwpObjectStream* pFile,rtl::R
case TAG_PARA_BULLET:
NewProp = new LwpParaBulletProperty(pFile);
static_cast<LwpPara*>(Whole.get())->SetBulletFlag(true);
SetBulletFlag(true);
break;
case TAG_PARA_NUMBERING:
@@ -131,11 +130,10 @@ LwpParaProperty* LwpParaProperty::ReadPropertyList(LwpObjectStream* pFile,rtl::R
// Stick it at the beginning of the list
if (NewProp)
{
NewProp->insert(Prop, nullptr);
Prop = NewProp;
NewProp->insert(m_pProps, nullptr);
m_pProps = NewProp;
}
}
return Prop;
}
LwpParaAlignProperty::LwpParaAlignProperty(LwpObjectStream* pFile)
diff --git a/lotuswordpro/source/filter/lwpparaproperty.hxx b/lotuswordpro/source/filter/lwpparaproperty.hxx
index a9c7fe7..5b4cdd2 100644
--- a/lotuswordpro/source/filter/lwpparaproperty.hxx
+++ b/lotuswordpro/source/filter/lwpparaproperty.hxx
@@ -89,9 +89,6 @@ public:
LwpParaProperty(){}
virtual sal_uInt32 GetType() = 0;
inline LwpParaProperty* GetNext();
static LwpParaProperty* ReadPropertyList(LwpObjectStream* pFile,rtl::Reference<LwpObject> const & Whole);
};
inline LwpParaProperty* LwpParaProperty::GetNext()