diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-03-07 14:44:16 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-03-07 14:44:16 +0000 |
commit | 0cbc0181d52433790bb607176ff01dcffc89ce99 (patch) | |
tree | cffac2ec158add6d49c4ae5a62474a427313e242 /editeng | |
parent | c97a37de3c63000ff7e58469e4beff8307167ca0 (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
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/editdoc.hxx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/editeng/source/editeng/editdoc.hxx b/editeng/source/editeng/editdoc.hxx index 98712ddf7a74..b99c5e2a3bef 100644 --- a/editeng/source/editeng/editdoc.hxx +++ b/editeng/source/editeng/editdoc.hxx @@ -386,7 +386,7 @@ struct ExtraPortionInfo class TextPortion { private: - ExtraPortionInfo* pExtraInfos; + std::unique_ptr<ExtraPortionInfo> xExtraInfos; sal_Int32 nLen; Size aOutSz; PortionKind nKind; @@ -396,8 +396,7 @@ private: public: TextPortion( sal_Int32 nL ) - : pExtraInfos( nullptr ) - , nLen( nL ) + : nLen( nL ) , aOutSz( -1, -1 ) , nKind( PortionKind::TEXT ) , nRightToLeftLevel( 0 ) @@ -406,8 +405,7 @@ public: } TextPortion( const TextPortion& r ) - : pExtraInfos( nullptr ) - , nLen( r.nLen ) + : nLen( r.nLen ) , aOutSz( r.aOutSz ) , nKind( r.nKind ) , nRightToLeftLevel( r.nRightToLeftLevel ) @@ -434,8 +432,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); } }; |