sc/source/filter/excel/excdoc.cxx | 14 ++++++-------- sc/source/filter/inc/excdoc.hxx | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-)
New commits: commit e70048ebbf672f508968d50b439cc21e5bdf62b5 Author: Jochen Nitschke <j.nitschke+loger...@ok.de> Date: Wed Feb 8 13:35:01 2017 +0100 use std::unique_ptr<> Change-Id: Iaad3a9784d2ad30f2c04f18e9987446238425c6b Reviewed-on: https://gerrit.libreoffice.org/34043 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sc/source/filter/excel/excdoc.cxx b/sc/source/filter/excel/excdoc.cxx index e12f107..c70603d 100644 --- a/sc/source/filter/excel/excdoc.cxx +++ b/sc/source/filter/excel/excdoc.cxx @@ -732,15 +732,13 @@ void ExcTable::WriteXml( XclExpXmlStream& rStrm ) ExcDocument::ExcDocument( const XclExpRoot& rRoot ) : XclExpRoot( rRoot ), - aHeader( rRoot ), - pExpChangeTrack( nullptr ) + aHeader( rRoot ) { } ExcDocument::~ExcDocument() { maTableList.RemoveAllRecords(); // for the following assertion! - delete pExpChangeTrack; } void ExcDocument::ReadDoc() @@ -787,7 +785,7 @@ void ExcDocument::ReadDoc() // change tracking if ( GetDoc().GetChangeTrack() ) - pExpChangeTrack = new XclExpChangeTrack( GetRoot() ); + m_xExpChangeTrack.reset(new XclExpChangeTrack( GetRoot() )); } } @@ -818,8 +816,8 @@ void ExcDocument::Write( SvStream& rSvStrm ) for( size_t nBSheet = 0, nBSheetCount = maBoundsheetList.GetSize(); nBSheet < nBSheetCount; ++nBSheet ) maBoundsheetList.GetRecord( nBSheet )->UpdateStreamPos( aXclStrm ); } - if( pExpChangeTrack ) - pExpChangeTrack->Write(); + if( m_xExpChangeTrack ) + m_xExpChangeTrack->Write(); } void ExcDocument::WriteXml( XclExpXmlStream& rStrm ) @@ -858,8 +856,8 @@ void ExcDocument::WriteXml( XclExpXmlStream& rStrm ) } } - if( pExpChangeTrack ) - pExpChangeTrack->WriteXml( rStrm ); + if( m_xExpChangeTrack ) + m_xExpChangeTrack->WriteXml( rStrm ); XclExpXmlPivotCaches& rCaches = GetXmlPivotTableManager().GetCaches(); if (rCaches.HasCaches()) diff --git a/sc/source/filter/inc/excdoc.hxx b/sc/source/filter/inc/excdoc.hxx index f771666..1faf234 100644 --- a/sc/source/filter/inc/excdoc.hxx +++ b/sc/source/filter/inc/excdoc.hxx @@ -87,7 +87,7 @@ private: ExcTableList maTableList; ExcBoundsheetList maBoundsheetList; - XclExpChangeTrack* pExpChangeTrack; + std::unique_ptr<XclExpChangeTrack> m_xExpChangeTrack; public: explicit ExcDocument( const XclExpRoot& rRoot ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits