[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - editeng/source
Caolán McNamara
caolanm at redhat.com
Thu Mar 9 08:32:12 UTC 2017
editeng/source/editeng/editdoc.hxx | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
New commits:
commit 098a25fc9b03fd4c65470d947b1e62ba922d2b23
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
(cherry picked from commit 0cbc0181d52433790bb607176ff01dcffc89ce99)
Reviewed-on: https://gerrit.libreoffice.org/34952
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/editeng/source/editeng/editdoc.hxx b/editeng/source/editeng/editdoc.hxx
index 51b9ac2..3bdfa01 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); }
};
More information about the Libreoffice-commits
mailing list