summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lotuswordpro/source/filter/lwpdrawobj.cxx8
-rw-r--r--lotuswordpro/source/filter/lwpdrawobj.hxx2
2 files changed, 2 insertions, 8 deletions
diff --git a/lotuswordpro/source/filter/lwpdrawobj.cxx b/lotuswordpro/source/filter/lwpdrawobj.cxx
index b1711065217d..60a7b9a5a306 100644
--- a/lotuswordpro/source/filter/lwpdrawobj.cxx
+++ b/lotuswordpro/source/filter/lwpdrawobj.cxx
@@ -565,17 +565,11 @@ XFFrame* LwpDrawPolyLine::CreateStandardDrawObj(const OUString& rStyleName)
LwpDrawPolygon::LwpDrawPolygon(SvStream * pStream, DrawingOffsetAndScale* pTransData)
: LwpDrawObj(pStream, pTransData)
, m_nNumPoints(0)
- , m_pVector(nullptr)
{
}
LwpDrawPolygon::~LwpDrawPolygon()
{
- if (m_pVector)
- {
- delete [] m_pVector;
- m_pVector = nullptr;
- }
}
/**
@@ -589,7 +583,7 @@ void LwpDrawPolygon::Read()
if (m_nNumPoints > m_pStream->remainingSize() / 4)
throw BadRead();
- m_pVector = new SdwPoint[m_nNumPoints];
+ m_pVector.reset( new SdwPoint[m_nNumPoints] );
for (sal_uInt16 nC = 0; nC < m_nNumPoints; nC++)
{
diff --git a/lotuswordpro/source/filter/lwpdrawobj.hxx b/lotuswordpro/source/filter/lwpdrawobj.hxx
index 647a715eb30e..01b946653b8b 100644
--- a/lotuswordpro/source/filter/lwpdrawobj.hxx
+++ b/lotuswordpro/source/filter/lwpdrawobj.hxx
@@ -208,7 +208,7 @@ class LwpDrawPolygon : public LwpDrawObj
{
private:
sal_uInt16 m_nNumPoints;
- SdwPoint* m_pVector;
+ std::unique_ptr<SdwPoint[]> m_pVector;
public:
LwpDrawPolygon(SvStream * pStream, DrawingOffsetAndScale* pTransData);