[Libreoffice-commits] core.git: editeng/source
Caolán McNamara
caolanm at redhat.com
Tue Mar 7 14:45:23 UTC 2017
editeng/source/editeng/editdoc.hxx | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
New commits:
commit 0cbc0181d52433790bb607176ff01dcffc89ce99
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Mar 7 14:44:16 2017 +0000
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
diff --git a/editeng/source/editeng/editdoc.hxx b/editeng/source/editeng/editdoc.hxx
index 98712dd..b99c5e2 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); }
};
More information about the Libreoffice-commits
mailing list