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 ) :
|
ExcDocument::ExcDocument( const XclExpRoot& rRoot ) :
|
||||||
XclExpRoot( rRoot ),
|
XclExpRoot( rRoot ),
|
||||||
aHeader( rRoot ),
|
aHeader( rRoot )
|
||||||
pExpChangeTrack( nullptr )
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
ExcDocument::~ExcDocument()
|
ExcDocument::~ExcDocument()
|
||||||
{
|
{
|
||||||
maTableList.RemoveAllRecords(); // for the following assertion!
|
maTableList.RemoveAllRecords(); // for the following assertion!
|
||||||
delete pExpChangeTrack;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExcDocument::ReadDoc()
|
void ExcDocument::ReadDoc()
|
||||||
@ -787,7 +785,7 @@ void ExcDocument::ReadDoc()
|
|||||||
|
|
||||||
// change tracking
|
// change tracking
|
||||||
if ( GetDoc().GetChangeTrack() )
|
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 )
|
for( size_t nBSheet = 0, nBSheetCount = maBoundsheetList.GetSize(); nBSheet < nBSheetCount; ++nBSheet )
|
||||||
maBoundsheetList.GetRecord( nBSheet )->UpdateStreamPos( aXclStrm );
|
maBoundsheetList.GetRecord( nBSheet )->UpdateStreamPos( aXclStrm );
|
||||||
}
|
}
|
||||||
if( pExpChangeTrack )
|
if( m_xExpChangeTrack )
|
||||||
pExpChangeTrack->Write();
|
m_xExpChangeTrack->Write();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExcDocument::WriteXml( XclExpXmlStream& rStrm )
|
void ExcDocument::WriteXml( XclExpXmlStream& rStrm )
|
||||||
@ -858,8 +856,8 @@ void ExcDocument::WriteXml( XclExpXmlStream& rStrm )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( pExpChangeTrack )
|
if( m_xExpChangeTrack )
|
||||||
pExpChangeTrack->WriteXml( rStrm );
|
m_xExpChangeTrack->WriteXml( rStrm );
|
||||||
|
|
||||||
XclExpXmlPivotCaches& rCaches = GetXmlPivotTableManager().GetCaches();
|
XclExpXmlPivotCaches& rCaches = GetXmlPivotTableManager().GetCaches();
|
||||||
if (rCaches.HasCaches())
|
if (rCaches.HasCaches())
|
||||||
|
@ -87,7 +87,7 @@ private:
|
|||||||
ExcTableList maTableList;
|
ExcTableList maTableList;
|
||||||
ExcBoundsheetList maBoundsheetList;
|
ExcBoundsheetList maBoundsheetList;
|
||||||
|
|
||||||
XclExpChangeTrack* pExpChangeTrack;
|
std::unique_ptr<XclExpChangeTrack> m_xExpChangeTrack;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ExcDocument( const XclExpRoot& rRoot );
|
explicit ExcDocument( const XclExpRoot& rRoot );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user