summaryrefslogtreecommitdiffstats
path: root/lotuswordpro
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-02-28 09:00:55 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-02-28 09:01:21 +0000
commita0bdcc5578e77b1122f533c62550d5e5f9290f1b (patch)
tree0a3ebd3f0199f86d0796fb684b8c240fa9c5d62d /lotuswordpro
parentremove DestroyVirtObj member (diff)
downloadcore-a0bdcc5578e77b1122f533c62550d5e5f9290f1b.tar.gz
core-a0bdcc5578e77b1122f533c62550d5e5f9290f1b.zip
fix leak
Change-Id: I1c1e861c5608ccd2071baf683f5456c3012a47f6
Diffstat (limited to 'lotuswordpro')
-rw-r--r--lotuswordpro/source/filter/lwppara.cxx8
-rw-r--r--lotuswordpro/source/filter/lwppara.hxx2
-rw-r--r--lotuswordpro/source/filter/lwpparaproperty.cxx10
-rw-r--r--lotuswordpro/source/filter/lwpparaproperty.hxx3
4 files changed, 7 insertions, 16 deletions
diff --git a/lotuswordpro/source/filter/lwppara.cxx b/lotuswordpro/source/filter/lwppara.cxx
index 82192ec7073e..17f0c04f6792 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 7fc270afd1dd..d96b50f37023 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 6f60ce5e0777..297a1f09d2be 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 a9c7fe72d8c8..5b4cdd2ec233 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()