diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-10 21:43:32 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-11 08:17:11 +0200 |
commit | b26f83b1cc184a79caa9e9c0ae15717ef61dde4a (patch) | |
tree | 7cb1193a8e75adc41798e96239e1623cb6c27ac0 /sc/inc | |
parent | d5bee2ea364427cafc90cd4fa8e63f27c09e10a3 (diff) |
loplugin:unusedmethods
mostly this seems to be fallout from
commit 089a4f245325a5be5cd5951d85305d791b4d9cb6
Date: Mon Aug 6 14:55:04 2018 +0200
remove Calc's software interpreter
Change-Id: Ib48696e724969a28a7d41155ba1573fd9cd58be6
Reviewed-on: https://gerrit.libreoffice.org/58869
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/inc')
-rw-r--r-- | sc/inc/column.hxx | 1 | ||||
-rw-r--r-- | sc/inc/document.hxx | 1 | ||||
-rw-r--r-- | sc/inc/scmatrix.hxx | 223 | ||||
-rw-r--r-- | sc/inc/table.hxx | 1 | ||||
-rw-r--r-- | sc/inc/token.hxx | 1 |
5 files changed, 0 insertions, 227 deletions
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index 93d5384dfcc0..bae7372fd915 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -578,7 +578,6 @@ public: formula::VectorRefArray FetchVectorRefArray( SCROW nRow1, SCROW nRow2 ); bool HandleRefArrayForParallelism( SCROW nRow1, SCROW nRow2, const ScFormulaCellGroupRef& mxGroup ); void SetFormulaResults( SCROW nRow, const double* pResults, size_t nLen ); - void SetFormulaResults( SCROW nRow, const formula::FormulaConstTokenRef* pResults, size_t nLen ); void CalculateInThread( ScInterpreterContext& rContext, SCROW nRow, size_t nLen, unsigned nThisThread, unsigned nThreadsTotal ); void HandleStuffAfterParallelCalculation( SCROW nRow, size_t nLen ); diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 7d34bd38a6a4..ae159ac51495 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -2097,7 +2097,6 @@ public: * @param nLen length of numeric results. */ void SC_DLLPUBLIC SetFormulaResults( const ScAddress& rTopPos, const double* pResults, size_t nLen ); - void SC_DLLPUBLIC SetFormulaResults( const ScAddress& rTopPos, const formula::FormulaConstTokenRef* pResults, size_t nLen ); const ScDocumentThreadSpecific& CalculateInColumnInThread( ScInterpreterContext& rContext, const ScAddress& rTopPos, size_t nLen, unsigned nThisThread, unsigned nThreadsTotal); void HandleStuffAfterParallelCalculation( const ScAddress& rTopPos, size_t nLen ); diff --git a/sc/inc/scmatrix.hxx b/sc/inc/scmatrix.hxx index 2dbd3490cfb9..b681fc2d0c23 100644 --- a/sc/inc/scmatrix.hxx +++ b/sc/inc/scmatrix.hxx @@ -629,229 +629,6 @@ public: #endif }; -class SC_DLLPUBLIC ScVectorRefMatrix : public ScMatrix -{ - const formula::DoubleVectorRefToken* mpToken; - ScInterpreter* mpErrorInterpreter; - - /// For the operations that are not fully implemented, create a ScFullMatrix, and operate on it. - std::unique_ptr<ScFullMatrix> mpFullMatrix; - - SCSIZE mnRowStart; - SCSIZE mnRowSize; - - ScVectorRefMatrix( const ScVectorRefMatrix& ) = delete; - ScVectorRefMatrix& operator=( const ScVectorRefMatrix&) = delete; - - /// For the operations that are not fully implemented, create a ScFullMatrix, and operate on it. - /// - /// Note: This is potentially an expensive operation. - /// TODO: Implement as much as possible directly using the DoubleVectorRefToken. - void ensureFullMatrix(); - -public: - - ScVectorRefMatrix(const formula::DoubleVectorRefToken* pToken, SCSIZE nRowStart, SCSIZE nRowSize); - - virtual ~ScVectorRefMatrix() override; - - /** Clone the matrix. */ - virtual ScMatrix* Clone() const override; - - /** - * Resize the matrix to specified new dimension. - */ - virtual void Resize(SCSIZE nC, SCSIZE nR) override; - - virtual void Resize(SCSIZE nC, SCSIZE nR, double fVal) override; - - /** Clone the matrix and extend it to the new size. nNewCols and nNewRows - MUST be at least of the size of the original matrix. */ - virtual ScMatrix* CloneAndExtend(SCSIZE nNewCols, SCSIZE nNewRows) const override; - - virtual void SetErrorInterpreter(ScInterpreter* p) override; - virtual void GetDimensions(SCSIZE& rC, SCSIZE& rR) const override; - virtual SCSIZE GetElementCount() const override; - virtual bool ValidColRow( SCSIZE nC, SCSIZE nR) const override; - - /** For a row vector or column vector, if the position does not point into - the vector but is a valid column or row offset it is adapted such that - it points to an element to be replicated, same column row 0 for a row - vector, same row column 0 for a column vector. Else, for a 2D matrix, - returns false. - */ - virtual bool ValidColRowReplicated(SCSIZE & rC, SCSIZE & rR) const override; - - /** Checks if the matrix position is within the matrix. If it is not, for a - row vector or column vector the position is adapted such that it points - to an element to be replicated, same column row 0 for a row vector, - same row column 0 for a column vector. Else, for a 2D matrix and - position not within matrix, returns false. - */ - virtual bool ValidColRowOrReplicated(SCSIZE & rC, SCSIZE & rR) const override; - - virtual void PutDouble(double fVal, SCSIZE nC, SCSIZE nR) override; - virtual void PutDouble(double fVal, SCSIZE nIndex) override; - virtual void PutDouble(const double* pArray, size_t nLen, SCSIZE nC, SCSIZE nR) override; - - virtual void PutString(const svl::SharedString& rStr, SCSIZE nC, SCSIZE nR) override; - virtual void PutString(const svl::SharedString& rStr, SCSIZE nIndex) override; - virtual void PutString(const svl::SharedString* pArray, size_t nLen, SCSIZE nC, SCSIZE nR) override; - - virtual void PutEmpty(SCSIZE nC, SCSIZE nR) override; - - /// Jump sal_False without path - virtual void PutEmptyPath(SCSIZE nC, SCSIZE nR) override; - virtual void PutError(FormulaError nErrorCode, SCSIZE nC, SCSIZE nR ) override; - virtual void PutBoolean(bool bVal, SCSIZE nC, SCSIZE nR) override; - - virtual void FillDouble(double fVal, SCSIZE nC1, SCSIZE nR1, SCSIZE nC2, SCSIZE nR2) override; - - /** Put a column vector of doubles, starting at row nR, must fit into dimensions. */ - virtual void PutDoubleVector(const ::std::vector< double > & rVec, SCSIZE nC, SCSIZE nR) override; - - /** Put a column vector of strings, starting at row nR, must fit into dimensions. */ - virtual void PutStringVector(const ::std::vector< svl::SharedString > & rVec, SCSIZE nC, SCSIZE nR) override; - - /** Put a column vector of empties, starting at row nR, must fit into dimensions. */ - virtual void PutEmptyVector(SCSIZE nCount, SCSIZE nC, SCSIZE nR) override; - - /** Put a column vector of empty results, starting at row nR, must fit into dimensions. */ - virtual void PutEmptyResultVector(SCSIZE nCount, SCSIZE nC, SCSIZE nR) override; - - /** Put a column vector of empty paths, starting at row nR, must fit into dimensions. */ - virtual void PutEmptyPathVector(SCSIZE nCount, SCSIZE nC, SCSIZE nR) override; - - /** May be used before obtaining the double value of an element to avoid - passing its NAN around. - @ATTENTION: MUST NOT be used if the element is a string! - Use GetErrorIfNotString() instead if not sure. - @returns 0 if no error, else one of err... constants */ - virtual FormulaError GetError(SCSIZE nC, SCSIZE nR) const override; - - /// @return 0.0 if empty or empty path, else value or DoubleError. - virtual double GetDouble(SCSIZE nC, SCSIZE nR) const override; - /// @return 0.0 if empty or empty path, else value or DoubleError. - virtual double GetDouble(SCSIZE nIndex) const override; - /// @return value or DoubleError or string converted to value. - virtual double GetDoubleWithStringConversion( SCSIZE nC, SCSIZE nR ) const override; - - /// @return empty string if empty or empty path, else string content. - virtual svl::SharedString GetString(SCSIZE nC, SCSIZE nR) const override; - /// @return empty string if empty or empty path, else string content. - virtual svl::SharedString GetString(SCSIZE nIndex) const override; - - /** @returns the matrix element's string if one is present, otherwise the - numerical value formatted as string, or in case of an error the error - string is returned; an empty string for empty, a "FALSE" string for - empty path. */ - virtual svl::SharedString GetString(SvNumberFormatter& rFormatter, SCSIZE nC, SCSIZE nR) const override; - - /// @ATTENTION: If bString the ScMatrixValue->pS may still be NULL to indicate - /// an empty string! - virtual ScMatrixValue Get(SCSIZE nC, SCSIZE nR) const override; - - /** @return <TRUE/> if string or any empty, empty cell, empty result, empty - path, in fact non-value. */ - virtual bool IsStringOrEmpty(SCSIZE nIndex) const override; - - /** @return <TRUE/> if string or any empty, empty cell, empty result, empty - path, in fact non-value. */ - virtual bool IsStringOrEmpty(SCSIZE nC, SCSIZE nR) const override; - - /// @return <TRUE/> if empty or empty cell or empty result, not empty path. - virtual bool IsEmpty(SCSIZE nC, SCSIZE nR) const override; - - /// @return <TRUE/> if empty cell, not empty or empty result or empty path. - virtual bool IsEmptyCell(SCSIZE nC, SCSIZE nR) const override; - - /// @return <TRUE/> if empty result, not empty or empty cell or empty path. - virtual bool IsEmptyResult(SCSIZE nC, SCSIZE nR) const override; - - /// @return <TRUE/> if empty path, not empty or empty cell or empty result. - virtual bool IsEmptyPath(SCSIZE nC, SCSIZE nR) const override; - - /// @return <TRUE/> if value or boolean. - virtual bool IsValue(SCSIZE nIndex) const override; - - /// @return <TRUE/> if value or boolean. - virtual bool IsValue(SCSIZE nC, SCSIZE nR) const override; - - /// @return <TRUE/> if value or boolean or empty or empty path. - virtual bool IsValueOrEmpty(SCSIZE nC, SCSIZE nR) const override; - - /// @return <TRUE/> if boolean. - virtual bool IsBoolean(SCSIZE nC, SCSIZE nR) const override; - - /// @return <TRUE/> if entire matrix is numeric, including booleans, with no strings or empties - virtual bool IsNumeric() const override; - - virtual void MatTrans(ScMatrix& mRes) const override; - virtual void MatCopy (ScMatrix& mRes) const override; - - // Convert ScInterpreter::CompareMat values (-1,0,1) to boolean values - virtual void CompareEqual() override; - virtual void CompareNotEqual() override; - virtual void CompareLess() override; - virtual void CompareGreater() override; - virtual void CompareLessEqual() override; - virtual void CompareGreaterEqual() override; - - virtual double And() const override; // logical AND of all matrix values, or NAN - virtual double Or() const override; // logical OR of all matrix values, or NAN - virtual double Xor() const override; // logical XOR of all matrix values, or NAN - - virtual IterateResult Sum(bool bTextAsZero) const override; - virtual IterateResult SumSquare(bool bTextAsZero) const override; - virtual IterateResult Product(bool bTextAsZero) const override; - virtual size_t Count(bool bCountStrings, bool bCountErrors) const override; - virtual size_t MatchDoubleInColumns(double fValue, size_t nCol1, size_t nCol2) const override; - virtual size_t MatchStringInColumns(const svl::SharedString& rStr, size_t nCol1, size_t nCol2) const override; - - virtual double GetMaxValue(bool bTextAsZero) const override; - virtual double GetMinValue(bool bTextAsZero) const override; - virtual double GetGcd() const override; - virtual double GetLcm() const override; - - virtual ScMatrixRef CompareMatrix(sc::Compare& rComp, size_t nMatPos, sc::CompareOptions* pOptions) const override; - - /** - * Convert the content of matrix into a linear array of numeric values. - * String elements are mapped to NaN's and empty elements are mapped to - * either NaN or zero values. - * - * @param bEmptyAsZero if true empty elements are mapped to zero values, - * otherwise they become NaN values. - */ - virtual void GetDoubleArray(std::vector<double>& rVector, bool bEmptyAsZero = true) const override; - virtual void MergeDoubleArray(std::vector<double>& rVector, Op eOp) const override; - - virtual void NotOp(ScMatrix& rMat) override; - virtual void NegOp(ScMatrix& rMat) override; - virtual void AddOp(double fVal, ScMatrix& rMat) override; - virtual void SubOp(bool bFlag, double fVal, ScMatrix& rMat) override; - virtual void MulOp(double fVal, ScMatrix& rMat) override; - virtual void DivOp(bool bFlag, double fVal, ScMatrix& rMat) override; - virtual void PowOp(bool bFlag, double fVal, ScMatrix& rMat) override; - - virtual std::vector<ScMatrix::IterateResult> Collect(bool bTextAsZero, const std::vector<std::unique_ptr<sc::op::Op>>& aOp) override; - - virtual void ExecuteOperation(const std::pair<size_t, size_t>& rStartPos, const std::pair<size_t, size_t>& rEndPos, - DoubleOpFunction aDoubleFunc, BoolOpFunction aBoolFunc, StringOpFunction aStringFunc, - EmptyOpFunction aEmptyFunc) const override; - - ScVectorRefMatrix& operator+=(const ScVectorRefMatrix& r); - - virtual void MatConcat(SCSIZE nMaxCol, SCSIZE nMaxRow, const ScMatrixRef& xMat1, const ScMatrixRef& xMat2, - SvNumberFormatter& rFormatter, svl::SharedStringPool& rPool) override; - -#if DEBUG_MATRIX - virtual void Dump() const override - { - } -#endif -}; - inline void intrusive_ptr_add_ref(const ScMatrix* p) { p->IncRef(); diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index 97f1f44fc08f..5c22144c8e09 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -1005,7 +1005,6 @@ public: void InterpretDirtyCells( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ); void SetFormulaResults( SCCOL nCol, SCROW nRow, const double* pResults, size_t nLen ); - void SetFormulaResults( SCCOL nCol, SCROW nRow, const formula::FormulaConstTokenRef* pResults, size_t nLen ); void CalculateInColumnInThread( ScInterpreterContext& rContext, SCCOL nCol, SCROW nRow, size_t nLen, unsigned nThisThread, unsigned nThreadsTotal); void HandleStuffAfterParallelCalculation( SCCOL nCol, SCROW nRow, size_t nLen); diff --git a/sc/inc/token.hxx b/sc/inc/token.hxx index 2e747b2d82ad..2da16066e49e 100644 --- a/sc/inc/token.hxx +++ b/sc/inc/token.hxx @@ -123,7 +123,6 @@ class ScMatrixRangeToken : public formula::FormulaToken ScMatrixRef mpMatrix; ScComplexRefData maRef; public: - ScMatrixRangeToken( const ScMatrixRef& p, const ScComplexRefData& rRef ); ScMatrixRangeToken( const sc::RangeMatrix& rMat ); ScMatrixRangeToken( const ScMatrixRangeToken& ); |