summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/filter/excel/excimp8.cxx4
-rw-r--r--sc/source/filter/excel/impop.cxx9
-rw-r--r--sc/source/filter/excel/read.cxx2
-rw-r--r--sc/source/filter/inc/imp_op.hxx4
4 files changed, 10 insertions, 9 deletions
diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx
index 0acb857079bf..739a636c36a1 100644
--- a/sc/source/filter/excel/excimp8.cxx
+++ b/sc/source/filter/excel/excimp8.cxx
@@ -188,8 +188,8 @@ ImportExcel8::ImportExcel8( XclImpRootData& rImpData, SvStream& rStrm ) :
ImportExcel( rImpData, rStrm )
{
// replace BIFF2-BIFF5 formula importer with BIFF8 formula importer
- delete pFormConv;
- pFormConv = pExcRoot->pFmlaConverter = new ExcelToSc8( GetRoot() );
+ pFormConv.reset(new ExcelToSc8( GetRoot() ));
+ pExcRoot->pFmlaConverter = pFormConv.get();
}
ImportExcel8::~ImportExcel8()
diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx
index f1bf316f6640..d206b5d278f3 100644
--- a/sc/source/filter/excel/impop.cxx
+++ b/sc/source/filter/excel/impop.cxx
@@ -129,10 +129,11 @@ ImportExcel::ImportExcel( XclImpRootData& rImpData, SvStream& rStrm ):
pExcRoot->pShrfmlaBuff.reset( new SharedFormulaBuffer( pExcRoot ) ); //&aShrfrmlaBuff;
pExcRoot->pExtNameBuff.reset( new ExtNameBuff ( *this ) );
- pOutlineListBuffer = new XclImpOutlineListBuffer;
+ pOutlineListBuffer.reset(new XclImpOutlineListBuffer);
// ab Biff8
- pFormConv = pExcRoot->pFmlaConverter = new ExcelToSc( GetRoot() );
+ pFormConv.reset(new ExcelToSc( GetRoot() ));
+ pExcRoot->pFmlaConverter = pFormConv.get();
bTabTruncated = false;
@@ -154,9 +155,9 @@ ImportExcel::~ImportExcel()
{
GetDoc().SetSrcCharSet( GetTextEncoding() );
- delete pOutlineListBuffer;
+ pOutlineListBuffer.reset();
- delete pFormConv;
+ pFormConv.reset();
}
void ImportExcel::SetLastFormula( SCCOL nCol, SCROW nRow, double fVal, sal_uInt16 nXF, ScFormulaCell* pCell )
diff --git a/sc/source/filter/excel/read.cxx b/sc/source/filter/excel/read.cxx
index 903b6fca70fc..2da672b01fde 100644
--- a/sc/source/filter/excel/read.cxx
+++ b/sc/source/filter/excel/read.cxx
@@ -1074,7 +1074,7 @@ ErrCode ImportExcel8::Read()
case EXC_ID_SUPBOOK: rLinkMgr.ReadSupbook( maStrm ); break;
case EXC_ID_XCT: rLinkMgr.ReadXct( maStrm ); break;
case EXC_ID_CRN: rLinkMgr.ReadCrn( maStrm ); break;
- case EXC_ID_EXTERNNAME: rLinkMgr.ReadExternname( maStrm, pFormConv ); break;
+ case EXC_ID_EXTERNNAME: rLinkMgr.ReadExternname( maStrm, pFormConv.get() ); break;
case EXC_ID_MSODRAWINGGROUP:rObjMgr.ReadMsoDrawingGroup( maStrm ); break;
diff --git a/sc/source/filter/inc/imp_op.hxx b/sc/source/filter/inc/imp_op.hxx
index 2d4bdf0e678f..9ac4abd7992a 100644
--- a/sc/source/filter/inc/imp_op.hxx
+++ b/sc/source/filter/inc/imp_op.hxx
@@ -97,14 +97,14 @@ protected:
ScfUInt32Vec maSheetOffsets;
ScRange maScOleSize; /// Visible range if embedded.
- ExcelToSc* pFormConv; // formula-converter
+ std::unique_ptr<ExcelToSc> pFormConv; // formula-converter
XclImpOutlineBuffer* pColOutlineBuff;
XclImpOutlineBuffer* pRowOutlineBuff;
XclImpColRowSettings* pColRowBuff; // Col/Row settings 1 table
typedef std::vector< std::unique_ptr<XclImpOutlineDataBuffer> > XclImpOutlineListBuffer;
- XclImpOutlineListBuffer* pOutlineListBuffer;
+ std::unique_ptr<XclImpOutlineListBuffer> pOutlineListBuffer;
LastFormulaMapType maLastFormulaCells; // Keep track of last formula cells in each column.
LastFormula* mpLastFormula;