diff options
-rw-r--r-- | sc/source/core/inc/jumpmatrix.hxx | 4 | ||||
-rw-r--r-- | sc/source/core/tool/jumpmatrix.cxx | 9 |
2 files changed, 6 insertions, 7 deletions
diff --git a/sc/source/core/inc/jumpmatrix.hxx b/sc/source/core/inc/jumpmatrix.hxx index 4ef4f87b282a..94b8dc1737aa 100644 --- a/sc/source/core/inc/jumpmatrix.hxx +++ b/sc/source/core/inc/jumpmatrix.hxx @@ -45,7 +45,7 @@ struct ScJumpMatrixEntry nNext = nNextP; nStop = nStopP; } - void GetJump( double& rBool, short& rStart, short& rNext, short& rStop ) + void GetJump( double& rBool, short& rStart, short& rNext, short& rStop ) const { rBool = fBool; rStart = nStart; @@ -56,7 +56,7 @@ struct ScJumpMatrixEntry class ScJumpMatrix { - ScJumpMatrixEntry* pJump; // the jumps + std::vector<ScJumpMatrixEntry> mvJump; // the jumps ScMatrixRef pMat; // the results ScTokenVec* pParams; // parameter stack SCSIZE nCols; diff --git a/sc/source/core/tool/jumpmatrix.cxx b/sc/source/core/tool/jumpmatrix.cxx index 0961e78ff49d..760f89735db6 100644 --- a/sc/source/core/tool/jumpmatrix.cxx +++ b/sc/source/core/tool/jumpmatrix.cxx @@ -28,7 +28,7 @@ const SCSIZE kBufferThreshold = 128; } ScJumpMatrix::ScJumpMatrix(SCSIZE nColsP, SCSIZE nRowsP) - : pJump(new ScJumpMatrixEntry[nColsP * nRowsP]) + : mvJump(nColsP * nRowsP) , pMat(new ScFullMatrix(nColsP, nRowsP)) , pParams(nullptr) , nCols(nColsP) @@ -62,7 +62,6 @@ ScJumpMatrix::~ScJumpMatrix() } delete pParams; } - delete[] pJump; } void ScJumpMatrix::GetDimensions(SCSIZE& rCols, SCSIZE& rRows) const @@ -74,7 +73,7 @@ void ScJumpMatrix::GetDimensions(SCSIZE& rCols, SCSIZE& rRows) const void ScJumpMatrix::SetJump(SCSIZE nCol, SCSIZE nRow, double fBool, short nStart, short nNext) { - pJump[(sal_uLong)nCol * nRows + nRow].SetJump(fBool, nStart, nNext, SHRT_MAX); + mvJump[(sal_uLong)nCol * nRows + nRow].SetJump(fBool, nStart, nNext, SHRT_MAX); } void ScJumpMatrix::GetJump( @@ -93,7 +92,7 @@ void ScJumpMatrix::GetJump( nCol = 0; nRow = 0; } - pJump[(sal_uLong)nCol * nRows + nRow]. + mvJump[(sal_uLong)nCol * nRows + nRow]. GetJump(rBool, rStart, rNext, rStop); } @@ -102,7 +101,7 @@ void ScJumpMatrix::SetAllJumps(double fBool, short nStart, short nNext, short nS sal_uLong n = (sal_uLong)nCols * nRows; for (sal_uLong j = 0; j < n; ++j) { - pJump[j].SetJump(fBool, nStart, + mvJump[j].SetJump(fBool, nStart, nNext, nStop); } } |