summaryrefslogtreecommitdiff
path: root/editeng/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-03-07 14:44:16 +0000
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-03-09 08:30:42 +0000
commit098a25fc9b03fd4c65470d947b1e62ba922d2b23 (patch)
treeac279f29483aef3e79c4e3a802aed4e56d81eab0 /editeng/source
parent89f08aecf58c97cc75eaae1d7b5e8531b04eaccd (diff)
ofz: leak in loading ppts
regression from commit 5e10e6937a8d5117555a4dcc9520aca173d75c95 Date: Sat Jan 18 10:15:10 2014 +0100 EDITENG : Remove usage of DBG_CTOR and DBG_DTOR. Change-Id: Id109f5bb23b1e4a93195548f880973ebc778515f (cherry picked from commit 0cbc0181d52433790bb607176ff01dcffc89ce99) Reviewed-on: https://gerrit.libreoffice.org/34952 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'editeng/source')
-rw-r--r--editeng/source/editeng/editdoc.hxx12
1 files changed, 5 insertions, 7 deletions
diff --git a/editeng/source/editeng/editdoc.hxx b/editeng/source/editeng/editdoc.hxx
index 51b9ac293194..3bdfa017f0fe 100644
--- a/editeng/source/editeng/editdoc.hxx
+++ b/editeng/source/editeng/editdoc.hxx
@@ -379,7 +379,7 @@ struct ExtraPortionInfo
class TextPortion
{
private:
- ExtraPortionInfo* pExtraInfos;
+ std::unique_ptr<ExtraPortionInfo> xExtraInfos;
sal_Int32 nLen;
Size aOutSz;
PortionKind nKind;
@@ -389,8 +389,7 @@ private:
public:
TextPortion( sal_Int32 nL )
- : pExtraInfos( nullptr )
- , nLen( nL )
+ : nLen( nL )
, aOutSz( -1, -1 )
, nKind( PortionKind::TEXT )
, nRightToLeftLevel( 0 )
@@ -399,8 +398,7 @@ public:
}
TextPortion( const TextPortion& r )
- : pExtraInfos( nullptr )
- , nLen( r.nLen )
+ : nLen( r.nLen )
, aOutSz( r.aOutSz )
, nKind( r.nKind )
, nRightToLeftLevel( r.nRightToLeftLevel )
@@ -427,8 +425,8 @@ public:
bool HasValidSize() const { return aOutSz.Width() != (-1); }
- ExtraPortionInfo* GetExtraInfos() const { return pExtraInfos; }
- void SetExtraInfos( ExtraPortionInfo* p ) { delete pExtraInfos; pExtraInfos = p; }
+ ExtraPortionInfo* GetExtraInfos() const { return xExtraInfos.get(); }
+ void SetExtraInfos( ExtraPortionInfo* p ) { xExtraInfos.reset(p); }
};