use std::unique_ptr<>
Change-Id: Iaad3a9784d2ad30f2c04f18e9987446238425c6b Reviewed-on: https://gerrit.libreoffice.org/34043 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
parent
1955e5361c
commit
e70048ebbf
@ -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())
|
||||
|
@ -87,7 +87,7 @@ private:
|
||||
ExcTableList maTableList;
|
||||
ExcBoundsheetList maBoundsheetList;
|
||||
|
||||
XclExpChangeTrack* pExpChangeTrack;
|
||||
std::unique_ptr<XclExpChangeTrack> m_xExpChangeTrack;
|
||||
|
||||
public:
|
||||
explicit ExcDocument( const XclExpRoot& rRoot );
|
||||
|
Loading…
x
Reference in New Issue
Block a user