[Libreoffice-commits] core.git: sc/source
Noel Grandin
noel.grandin at collabora.co.uk
Thu Jul 12 08:38:16 UTC 2018
sc/source/filter/inc/XclImpChangeTrack.hxx | 4 ++--
sc/source/filter/xcl97/XclImpChangeTrack.cxx | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 7d710ee08fbaecd376a8b731965e805ad0f4c59a
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Wed Jul 11 12:29:58 2018 +0200
loplugin:useuniqueptr in XclImpChangeTrack
Change-Id: I360720b5c0402982e58416f9c902388034e5ecee
Reviewed-on: https://gerrit.libreoffice.org/57301
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sc/source/filter/inc/XclImpChangeTrack.hxx b/sc/source/filter/inc/XclImpChangeTrack.hxx
index 9f374472e76c..1305f2064fee 100644
--- a/sc/source/filter/inc/XclImpChangeTrack.hxx
+++ b/sc/source/filter/inc/XclImpChangeTrack.hxx
@@ -55,8 +55,8 @@ private:
OUString sOldUsername;
std::unique_ptr<ScChangeTrack> pChangeTrack;
- tools::SvRef<SotStorageStream> xInStrm; // input stream
- XclImpStream* pStrm; // stream import class
+ tools::SvRef<SotStorageStream> xInStrm; // input stream
+ std::unique_ptr<XclImpStream> pStrm; // stream import class
sal_uInt16 nTabIdCount;
bool bGlobExit; // global exit loop
diff --git a/sc/source/filter/xcl97/XclImpChangeTrack.cxx b/sc/source/filter/xcl97/XclImpChangeTrack.cxx
index 8a943ce5aa79..c7dc9dbb1a8b 100644
--- a/sc/source/filter/xcl97/XclImpChangeTrack.cxx
+++ b/sc/source/filter/xcl97/XclImpChangeTrack.cxx
@@ -56,7 +56,7 @@ XclImpChangeTrack::XclImpChangeTrack( const XclImpRoot& rRoot, const XclImpStrea
if( (xInStrm->GetErrorCode() == ERRCODE_NONE) && (nStreamLen != STREAM_SEEK_TO_END) )
{
xInStrm->Seek( STREAM_SEEK_TO_BEGIN );
- pStrm = new XclImpStream( *xInStrm, GetRoot() );
+ pStrm.reset( new XclImpStream( *xInStrm, GetRoot() ) );
pStrm->CopyDecrypterFrom( rBookStrm );
pChangeTrack.reset(new ScChangeTrack( &GetDocRef() ));
@@ -71,7 +71,7 @@ XclImpChangeTrack::XclImpChangeTrack( const XclImpRoot& rRoot, const XclImpStrea
XclImpChangeTrack::~XclImpChangeTrack()
{
pChangeTrack.reset();
- delete pStrm;
+ pStrm.reset();
}
void XclImpChangeTrack::DoAcceptRejectAction( ScChangeAction* pAction )
More information about the Libreoffice-commits
mailing list