summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-08-10 21:43:32 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-08-11 08:17:11 +0200
commitb26f83b1cc184a79caa9e9c0ae15717ef61dde4a (patch)
tree7cb1193a8e75adc41798e96239e1623cb6c27ac0
parentd5bee2ea364427cafc90cd4fa8e63f27c09e10a3 (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>
-rw-r--r--compilerplugins/clang/unusedmethods.results12
-rw-r--r--sc/inc/column.hxx1
-rw-r--r--sc/inc/document.hxx1
-rw-r--r--sc/inc/scmatrix.hxx223
-rw-r--r--sc/inc/table.hxx1
-rw-r--r--sc/inc/token.hxx1
-rw-r--r--sc/source/core/data/column2.cxx26
-rw-r--r--sc/source/core/data/documen8.cxx10
-rw-r--r--sc/source/core/data/table1.cxx9
-rw-r--r--sc/source/core/tool/scmatrix.cxx767
-rw-r--r--sc/source/core/tool/token.cxx3
11 files changed, 6 insertions, 1048 deletions
diff --git a/compilerplugins/clang/unusedmethods.results b/compilerplugins/clang/unusedmethods.results
index 2c4007b5d8af..020cf3c92d0f 100644
--- a/compilerplugins/clang/unusedmethods.results
+++ b/compilerplugins/clang/unusedmethods.results
@@ -542,8 +542,6 @@ include/sfx2/msg.hxx:120
const class std::type_info * SfxType0::Type() const
include/sfx2/sidebar/Context.hxx:55
_Bool sfx2::sidebar::Context::operator==(const class sfx2::sidebar::Context &) const
-include/svl/cryptosign.hxx:90
- _Bool isMSCng()
include/svl/itempool.hxx:167
const type-parameter-?-? * SfxItemPool::GetItem2Default(TypedWhichId<type-parameter-?-?>) const
include/svl/itempool.hxx:196
@@ -564,8 +562,6 @@ include/svx/framelink.hxx:238
_Bool svx::frame::StyleVectorCombination::operator<(const class svx::frame::StyleVectorCombination &) const
include/svx/svdlayer.hxx:72
_Bool SdrLayer::operator==(const class SdrLayer &) const
-include/svx/svdograf.hxx:169
- const class rtl::OUString & SdrGrafObj::GetFilterName() const
include/svx/svdpage.hxx:105
class SdrModel & SdrObjList::getSdrModelFromSdrObjList() const
include/svx/svdpntv.hxx:462
@@ -676,8 +672,6 @@ include/vcl/inputctx.hxx:63
_Bool InputContext::operator!=(const class InputContext &) const
include/vcl/ITiledRenderable.hxx:288
class Pointer vcl::ITiledRenderable::getPointer()
-include/vcl/opengl/OpenGLContext.hxx:97
- void OpenGLContext::UseNoProgram()
include/vcl/opengl/OpenGLHelper.hxx:61
void OpenGLHelper::renderToFile(long,long,const class rtl::OUString &)
include/vcl/opengl/OpenGLHelper.hxx:91
@@ -816,6 +810,8 @@ sc/inc/datamapper.hxx:85
void sc::ExternalDataSource::setURL(const class rtl::OUString &)
sc/inc/datamapper.hxx:86
void sc::ExternalDataSource::setProvider(const class rtl::OUString &)
+sc/inc/document.hxx:2100
+ void ScDocument::SetFormulaResults(const class ScAddress &,const class boost::intrusive_ptr<const class formula::FormulaToken> *,unsigned long)
sc/inc/dpfilteredcache.hxx:143
void ScDPFilteredCache::dump() const
sc/inc/formulacell.hxx:462
@@ -828,6 +824,8 @@ sc/inc/scdll.hxx:36
ScDLL::ScDLL()
sc/inc/scmatrix.hxx:622
class ScFullMatrix & ScFullMatrix::operator+=(const class ScFullMatrix &)
+sc/inc/scmatrix.hxx:654
+ ScVectorRefMatrix::ScVectorRefMatrix(const class formula::DoubleVectorRefToken *,unsigned long,unsigned long)
sc/inc/scmatrix.hxx:843
class ScVectorRefMatrix & ScVectorRefMatrix::operator+=(const class ScVectorRefMatrix &)
sc/inc/stlalgorithm.hxx:61
@@ -836,6 +834,8 @@ sc/inc/stlalgorithm.hxx:62
_Bool sc::AlignedAllocator::operator!=(const AlignedAllocator<T, Alignment> &) const
sc/inc/table.hxx:321
_Bool ScTable::IsColRowTabValid(const short,const int,const short) const
+sc/inc/token.hxx:126
+ ScMatrixRangeToken::ScMatrixRangeToken(const class boost::intrusive_ptr<class ScMatrix> &,const struct ScComplexRefData &)
sc/inc/userlist.hxx:86
class __gnu_debug::_Safe_iterator<class __gnu_cxx::__normal_iterator<const class std::unique_ptr<class ScUserListData, struct std::default_delete<class ScUserListData> > *, class std::__cxx1998::vector<class std::unique_ptr<class ScUserListData, struct std::default_delete<class ScUserListData> >, class std::allocator<class std::unique_ptr<class ScUserListData, struct std::default_delete<class ScUserListData> > > > >, class std::__debug::vector<class std::unique_ptr<class ScUserListData, struct std::default_delete<class ScUserListData> >, class std::allocator<class std::unique_ptr<class ScUserListData, struct std::default_delete<class ScUserListData> > > > > ScUserList::begin() const
sc/qa/unit/helper/qahelper.hxx:164
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& );
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 183a219f1f4a..a5083210810a 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -2939,32 +2939,6 @@ void ScColumn::SetFormulaResults( SCROW nRow, const double* pResults, size_t nLe
}
}
-void ScColumn::SetFormulaResults( SCROW nRow, const formula::FormulaConstTokenRef* pResults, size_t nLen )
-{
- sc::CellStoreType::position_type aPos = maCells.position(nRow);
- sc::CellStoreType::iterator it = aPos.first;
- if (it->type != sc::element_type_formula)
- // This is not a formula block.
- return;
-
- size_t nBlockLen = it->size - aPos.second;
- if (nBlockLen < nLen)
- // Result array is longer than the length of formula cells. Not good.
- return;
-
- sc::formula_block::iterator itCell = sc::formula_block::begin(*it->data);
- std::advance(itCell, aPos.second);
-
- const formula::FormulaConstTokenRef* pResEnd = pResults + nLen;
- for (; pResults != pResEnd; ++pResults, ++itCell)
- {
- ScFormulaCell& rCell = **itCell;
- rCell.SetResultToken(pResults->get());
- rCell.ResetDirty();
- rCell.SetChanged(true);
- }
-}
-
void ScColumn::CalculateInThread( ScInterpreterContext& rContext, SCROW nRow, size_t nLen, unsigned nThisThread, unsigned nThreadsTotal)
{
assert(GetDoc()->IsThreadedGroupCalcInProgress());
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index 69f444bf6112..cb0f654d6592 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -418,16 +418,6 @@ void ScDocument::SetFormulaResults( const ScAddress& rTopPos, const double* pRes
pTab->SetFormulaResults(rTopPos.Col(), rTopPos.Row(), pResults, nLen);
}
-void ScDocument::SetFormulaResults(
- const ScAddress& rTopPos, const formula::FormulaConstTokenRef* pResults, size_t nLen )
-{
- ScTable* pTab = FetchTable(rTopPos.Tab());
- if (!pTab)
- return;
-
- pTab->SetFormulaResults(rTopPos.Col(), rTopPos.Row(), pResults, nLen);
-}
-
const ScDocumentThreadSpecific& ScDocument::CalculateInColumnInThread( ScInterpreterContext& rContext, const ScAddress& rTopPos, size_t nLen, unsigned nThisThread, unsigned nThreadsTotal)
{
ScTable* pTab = FetchTable(rTopPos.Tab());
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index f68e8fff8e66..9b0cec1bcdc2 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -2413,15 +2413,6 @@ void ScTable::SetFormulaResults( SCCOL nCol, SCROW nRow, const double* pResults,
aCol[nCol].SetFormulaResults(nRow, pResults, nLen);
}
-void ScTable::SetFormulaResults(
- SCCOL nCol, SCROW nRow, const formula::FormulaConstTokenRef* pResults, size_t nLen )
-{
- if (!ValidCol(nCol))
- return;
-
- aCol[nCol].SetFormulaResults(nRow, pResults, nLen);
-}
-
void ScTable::CalculateInColumnInThread( ScInterpreterContext& rContext, SCCOL nCol, SCROW nRow, size_t nLen, unsigned nThisThread, unsigned nThreadsTotal)
{
if (!ValidCol(nCol))
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index 0292376cead5..b84e1fa19282 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -3471,777 +3471,10 @@ void ScFullMatrix::Dump() const
}
#endif
-namespace {
-
-/**
- * Input double array consists of segments of NaN's and normal values.
- * Insert only the normal values into the matrix while skipping the NaN's.
- */
-void fillMatrix( ScMatrix& rMat, size_t nCol, const double* pNums, size_t nLen )
-{
- const double* pNum = pNums;
- const double* pNumEnd = pNum + nLen;
- const double* pNumHead = nullptr;
- for (; pNum != pNumEnd; ++pNum)
- {
- if (!rtl::math::isNan(*pNum))
- {
- if (!pNumHead)
- // Store the first non-NaN position.
- pNumHead = pNum;
-
- continue;
- }
-
- if (pNumHead)
- {
- // Flush this non-NaN segment to the matrix.
- rMat.PutDouble(pNumHead, pNum - pNumHead, nCol, pNumHead - pNums);
- pNumHead = nullptr;
- }
- }
-
- if (pNumHead)
- {
- // Flush last non-NaN segment to the matrix.
- rMat.PutDouble(pNumHead, pNum - pNumHead, nCol, pNumHead - pNums);
- }
-}
-
-void flushStrSegment(
- ScMatrix& rMat, size_t nCol, rtl_uString** pHead, rtl_uString** pCur, rtl_uString** pTop )
-{
- size_t nOffset = pHead - pTop;
- std::vector<svl::SharedString> aStrs;
- aStrs.reserve(pCur - pHead);
- for (; pHead != pCur; ++pHead)
- aStrs.emplace_back(*pHead, *pHead);
-
- rMat.PutString(&aStrs[0], aStrs.size(), nCol, nOffset);
-}
-
-void fillMatrix( ScMatrix& rMat, size_t nCol, rtl_uString** pStrs, size_t nLen )
-{
- rtl_uString** p = pStrs;
- rtl_uString** pEnd = p + nLen;
- rtl_uString** pHead = nullptr;
- for (; p != pEnd; ++p)
- {
- if (*p)
- {
- if (!pHead)
- // Store the first non-empty string position.
- pHead = p;
-
- continue;
- }
-
- if (pHead)
- {
- // Flush this non-empty segment to the matrix.
- flushStrSegment(rMat, nCol, pHead, p, pStrs);
- pHead = nullptr;
- }
- }
-
- if (pHead)
- {
- // Flush last non-empty segment to the matrix.
- flushStrSegment(rMat, nCol, pHead, p, pStrs);
- }
-}
-
-void fillMatrix( ScMatrix& rMat, size_t nCol, const double* pNums, rtl_uString** pStrs, size_t nLen )
-{
- if (!pStrs)
- {
- fillMatrix(rMat, nCol, pNums, nLen);
- return;
- }
-
- const double* pNum = pNums;
- const double* pNumHead = nullptr;
- rtl_uString** pStr = pStrs;
- rtl_uString** pStrEnd = pStr + nLen;
- rtl_uString** pStrHead = nullptr;
-
- for (; pStr != pStrEnd; ++pStr, ++pNum)
- {
- if (*pStr)
- {
- // String cell exists.
-
- if (pNumHead)
- {
- // Flush this numeric segment to the matrix.
- rMat.PutDouble(pNumHead, pNum - pNumHead, nCol, pNumHead - pNums);
- pNumHead = nullptr;
- }
-
- if (!pStrHead)
- // Store the first non-empty string position.
- pStrHead = pStr;
-
- continue;
- }
-
- // No string cell. Check the numeric cell value.
-
- if (pStrHead)
- {
- // Flush this non-empty string segment to the matrix.
- flushStrSegment(rMat, nCol, pStrHead, pStr, pStrs);
- pStrHead = nullptr;
- }
-
- if (!rtl::math::isNan(*pNum))
- {
- // Numeric cell exists.
- if (!pNumHead)
- // Store the first non-NaN position.
- pNumHead = pNum;
-
- continue;
- }
-
- // it's a NaN, need to flush the non-NaN segment if it exists
-
- if (pNumHead)
- {
- // Flush this non-NaN segment to the matrix.
- rMat.PutDouble(pNumHead, pNum - pNumHead, nCol, pNumHead - pNums);
- pNumHead = nullptr;
- }
- }
-
- if (pStrHead)
- {
- // Flush the last non-empty segment to the matrix.
- flushStrSegment(rMat, nCol, pStrHead, pStr, pStrs);
- }
- else if (pNumHead)
- {
- // Flush the last numeric segment to the matrix.
- rMat.PutDouble(pNumHead, pNum - pNumHead, nCol, pNumHead - pNums);
- }
-}
-
-} // anonymous namespace
-
-void ScVectorRefMatrix::ensureFullMatrix()
-{
- if (mpFullMatrix)
- return;
-
- const std::vector<formula::VectorRefArray>& rArrays = mpToken->GetArrays();
- size_t nColSize = rArrays.size();
- mpFullMatrix.reset(new ScFullMatrix(nColSize, mnRowSize));
-
- if (mpErrorInterpreter)
- mpFullMatrix->SetErrorInterpreter(mpErrorInterpreter);
-
- size_t nRowSize = mnRowSize;
- size_t nRowEnd = mnRowStart + mnRowSize;
- size_t nDataRowEnd = mpToken->GetArrayLength();
-
- if (mnRowStart >= nDataRowEnd)
- return;
-
- if (nRowEnd > nDataRowEnd)
- {
- // Data array is shorter than the row size of the reference. Truncate
- // it to the data.
- nRowSize -= nRowEnd - nDataRowEnd;
- }
-
- for (size_t nCol = 0; nCol < nColSize; ++nCol)
- {
- const formula::VectorRefArray& rArray = rArrays[nCol];
- if (rArray.mpStringArray)
- {
- if (rArray.mpNumericArray)
- {
- // Mixture of string and numeric values.
- const double* pNums = rArray.mpNumericArray;
- pNums += mnRowStart;
- rtl_uString** pStrs = rArray.mpStringArray;
- pStrs += mnRowStart;
- fillMatrix(*mpFullMatrix, nCol, pNums, pStrs, nRowSize);
- }
- else
- {
- // String cells only.
- rtl_uString** pStrs = rArray.mpStringArray;
- pStrs += mnRowStart;
- fillMatrix(*mpFullMatrix, nCol, pStrs, nRowSize);
- }
- }
- else if (rArray.mpNumericArray)
- {
- // Numeric cells only.
- const double* pNums = rArray.mpNumericArray;
- pNums += mnRowStart;
- fillMatrix(*mpFullMatrix, nCol, pNums, nRowSize);
- }
- }
-}
-
-ScVectorRefMatrix::ScVectorRefMatrix(const formula::DoubleVectorRefToken* pToken, SCSIZE nRowStart, SCSIZE nRowSize)
- : ScMatrix()
- , mpToken(pToken)
- , mpErrorInterpreter(nullptr)
- , mnRowStart(nRowStart)
- , mnRowSize(nRowSize)
-{
-}
-
-ScVectorRefMatrix::~ScVectorRefMatrix()
-{
-}
-
-ScMatrix* ScVectorRefMatrix::Clone() const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- return mpFullMatrix->Clone();
-}
-
-void ScVectorRefMatrix::Resize(SCSIZE nC, SCSIZE nR)
-{
- ensureFullMatrix();
- mpFullMatrix->Resize(nC, nR);
-}
-
-void ScVectorRefMatrix::Resize(SCSIZE nC, SCSIZE nR, double fVal)
-{
- ensureFullMatrix();
- mpFullMatrix->Resize(nC, nR, fVal);
-}
-
-ScMatrix* ScVectorRefMatrix::CloneAndExtend(SCSIZE nNewCols, SCSIZE nNewRows) const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- return mpFullMatrix->CloneAndExtend(nNewCols, nNewRows);
-}
-
-void ScVectorRefMatrix::SetErrorInterpreter(ScInterpreter* p)
-{
- if (mpFullMatrix)
- {
- mpFullMatrix->SetErrorInterpreter(p);
- return;
- }
-
- mpErrorInterpreter = p;
-}
-
-void ScVectorRefMatrix::GetDimensions(SCSIZE& rC, SCSIZE& rR) const
-{
- if (mpFullMatrix)
- {
- mpFullMatrix->GetDimensions(rC, rR);
- return;
- }
-
- rC = mpToken->GetArrays().size();
- rR = mnRowSize;
-}
-
-SCSIZE ScVectorRefMatrix::GetElementCount() const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- return mpFullMatrix->GetElementCount();
-}
-
-bool ScVectorRefMatrix::ValidColRow(SCSIZE nC, SCSIZE nR) const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- return mpFullMatrix->ValidColRow(nC, nR);
-}
-
-bool ScVectorRefMatrix::ValidColRowReplicated(SCSIZE & rC, SCSIZE & rR) const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- return mpFullMatrix->ValidColRowReplicated(rC, rR);
-}
-
-bool ScVectorRefMatrix::ValidColRowOrReplicated(SCSIZE & rC, SCSIZE & rR) const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- return mpFullMatrix->ValidColRowOrReplicated(rC, rR);
-}
-
-void ScVectorRefMatrix::PutDouble(double fVal, SCSIZE nC, SCSIZE nR)
-{
- ensureFullMatrix();
- mpFullMatrix->PutDouble(fVal, nC, nR);
-}
-
-void ScVectorRefMatrix::PutDouble(double fVal, SCSIZE nIndex)
-{
- ensureFullMatrix();
- mpFullMatrix->PutDouble(fVal, nIndex);
-}
-
-void ScVectorRefMatrix::PutDouble(const double* pArray, size_t nLen, SCSIZE nC, SCSIZE nR)
-{
- ensureFullMatrix();
- mpFullMatrix->PutDouble(pArray, nLen, nC, nR);
-}
-
-void ScVectorRefMatrix::PutString(const svl::SharedString& rStr, SCSIZE nC, SCSIZE nR)
-{
- ensureFullMatrix();
- mpFullMatrix->PutString(rStr, nC, nR);
-}
-
-void ScVectorRefMatrix::PutString(const svl::SharedString& rStr, SCSIZE nIndex)
-{
- ensureFullMatrix();
- mpFullMatrix->PutString(rStr, nIndex);
-}
-
-void ScVectorRefMatrix::PutString(const svl::SharedString* pArray, size_t nLen, SCSIZE nC, SCSIZE nR)
-{
- ensureFullMatrix();
- mpFullMatrix->PutString(pArray, nLen, nC, nR);
-}
-
-void ScVectorRefMatrix::PutEmpty(SCSIZE nC, SCSIZE nR)
-{
- ensureFullMatrix();
- mpFullMatrix->PutEmpty(nC, nR);
-}
-
-void ScVectorRefMatrix::PutEmptyPath(SCSIZE nC, SCSIZE nR)
-{
- ensureFullMatrix();
- mpFullMatrix->PutEmptyPath(nC, nR);
-}
-
-void ScVectorRefMatrix::PutError(FormulaError nErrorCode, SCSIZE nC, SCSIZE nR)
-{
- ensureFullMatrix();
- mpFullMatrix->PutError(nErrorCode, nC, nR);
-}
-
-void ScVectorRefMatrix::PutBoolean(bool bVal, SCSIZE nC, SCSIZE nR)
-{
- ensureFullMatrix();
- mpFullMatrix->PutBoolean(bVal, nC, nR);
-}
-
-void ScVectorRefMatrix::FillDouble(double fVal, SCSIZE nC1, SCSIZE nR1, SCSIZE nC2, SCSIZE nR2)
-{
- ensureFullMatrix();
- mpFullMatrix->FillDouble(fVal, nC1, nR1, nC2, nR2);
-}
-
-void ScVectorRefMatrix::PutDoubleVector(const ::std::vector< double > & rVec, SCSIZE nC, SCSIZE nR)
-{
- ensureFullMatrix();
- mpFullMatrix->PutDoubleVector(rVec, nC, nR);
-}
-
-void ScVectorRefMatrix::PutStringVector(const ::std::vector< svl::SharedString > & rVec, SCSIZE nC, SCSIZE nR)
-{
- ensureFullMatrix();
- mpFullMatrix->PutStringVector(rVec, nC, nR);
-}
-
-void ScVectorRefMatrix::PutEmptyVector(SCSIZE nCount, SCSIZE nC, SCSIZE nR)
-{
- ensureFullMatrix();
- mpFullMatrix->PutEmptyVector(nCount, nC, nR);
-}
-
-void ScVectorRefMatrix::PutEmptyResultVector(SCSIZE nCount, SCSIZE nC, SCSIZE nR)
-{
- ensureFullMatrix();
- mpFullMatrix->PutEmptyResultVector(nCount, nC, nR);
-}
-
-void ScVectorRefMatrix::PutEmptyPathVector(SCSIZE nCount, SCSIZE nC, SCSIZE nR)
-{
- ensureFullMatrix();
- mpFullMatrix->PutEmptyPathVector(nCount, nC, nR);
-}
-
-FormulaError ScVectorRefMatrix::GetError(SCSIZE nC, SCSIZE nR) const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- return mpFullMatrix->GetError(nC, nR);
-}
-
-double ScVectorRefMatrix::GetDouble(SCSIZE nC, SCSIZE nR) const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- return mpFullMatrix->GetDouble(nC, nR);
-}
-
-double ScVectorRefMatrix::GetDouble(SCSIZE nIndex) const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- return mpFullMatrix->GetDouble(nIndex);
-}
-
-double ScVectorRefMatrix::GetDoubleWithStringConversion(SCSIZE nC, SCSIZE nR) const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- return mpFullMatrix->GetDoubleWithStringConversion(nC, nR);
-}
-
-svl::SharedString ScVectorRefMatrix::GetString(SCSIZE nC, SCSIZE nR) const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- return mpFullMatrix->GetString(nC, nR);
-}
-
-svl::SharedString ScVectorRefMatrix::GetString(SCSIZE nIndex) const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- return mpFullMatrix->GetString(nIndex);
-}
-
-svl::SharedString ScVectorRefMatrix::GetString(SvNumberFormatter& rFormatter, SCSIZE nC, SCSIZE nR) const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- return mpFullMatrix->GetString(rFormatter, nC, nR);
-}
-
-ScMatrixValue ScVectorRefMatrix::Get(SCSIZE nC, SCSIZE nR) const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- return mpFullMatrix->Get(nC, nR);
-}
-
-bool ScVectorRefMatrix::IsStringOrEmpty(SCSIZE nIndex) const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- return mpFullMatrix->IsStringOrEmpty(nIndex);
-}
-
-bool ScVectorRefMatrix::IsStringOrEmpty(SCSIZE nC, SCSIZE nR) const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- return mpFullMatrix->IsStringOrEmpty(nC, nR);
-}
-
-bool ScVectorRefMatrix::IsEmpty(SCSIZE nC, SCSIZE nR) const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- return mpFullMatrix->IsEmpty(nC, nR);
-}
-
-bool ScVectorRefMatrix::IsEmptyCell(SCSIZE nC, SCSIZE nR) const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- return mpFullMatrix->IsEmptyCell(nC, nR);
-}
-
-bool ScVectorRefMatrix::IsEmptyResult(SCSIZE nC, SCSIZE nR) const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- return mpFullMatrix->IsEmptyResult(nC, nR);
-}
-
-bool ScVectorRefMatrix::IsEmptyPath(SCSIZE nC, SCSIZE nR) const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- return mpFullMatrix->IsEmptyPath(nC, nR);
-}
-
-bool ScVectorRefMatrix::IsValue(SCSIZE nIndex) const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- return mpFullMatrix->IsValue(nIndex);
-}
-
-bool ScVectorRefMatrix::IsValue(SCSIZE nC, SCSIZE nR) const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- return mpFullMatrix->IsValue(nC, nR);
-}
-
-bool ScVectorRefMatrix::IsValueOrEmpty(SCSIZE nC, SCSIZE nR) const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- return mpFullMatrix->IsValueOrEmpty(nC, nR);
-}
-
-bool ScVectorRefMatrix::IsBoolean(SCSIZE nC, SCSIZE nR) const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- return mpFullMatrix->IsBoolean(nC, nR);
-}
-
-bool ScVectorRefMatrix::IsNumeric() const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- return mpFullMatrix->IsNumeric();
-}
-
-void ScVectorRefMatrix::MatTrans(ScMatrix& mRes) const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- mpFullMatrix->MatTrans(mRes);
-}
-
-void ScVectorRefMatrix::MatCopy(ScMatrix& mRes) const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- mpFullMatrix->MatCopy(mRes);
-}
-
-void ScVectorRefMatrix::CompareEqual()
-{
- ensureFullMatrix();
- mpFullMatrix->CompareEqual();
-}
-
-void ScVectorRefMatrix::CompareNotEqual()
-{
- ensureFullMatrix();
- mpFullMatrix->CompareNotEqual();
-}
-
-void ScVectorRefMatrix::CompareLess()
-{
- ensureFullMatrix();
- mpFullMatrix->CompareLess();
-}
-
-void ScVectorRefMatrix::CompareGreater()
-{
- ensureFullMatrix();
- mpFullMatrix->CompareGreater();
-}
-
-void ScVectorRefMatrix::CompareLessEqual()
-{
- ensureFullMatrix();
- mpFullMatrix->CompareLessEqual();
-}
-
-void ScVectorRefMatrix::CompareGreaterEqual()
-{
- ensureFullMatrix();
- mpFullMatrix->CompareGreaterEqual();
-}
-
-double ScVectorRefMatrix::And() const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- return mpFullMatrix->And();
-}
-
-double ScVectorRefMatrix::Or() const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- return mpFullMatrix->Or();
-}
-
-double ScVectorRefMatrix::Xor() const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- return mpFullMatrix->Xor();
-}
-
-ScMatrix::IterateResult ScVectorRefMatrix::Sum(bool bTextAsZero) const
-{
- if (mpFullMatrix)
- return mpFullMatrix->Sum(bTextAsZero);
-
- const std::vector<formula::VectorRefArray>& rArrays = mpToken->GetArrays();
- size_t nDataSize = mnRowSize;
-
- if (mnRowStart >= mpToken->GetArrayLength())
- {
- return ScMatrix::IterateResult(0.0, 0.0, 0);
- }
- else if (nDataSize > mpToken->GetArrayLength() - mnRowStart)
- {
- nDataSize = mpToken->GetArrayLength() - mnRowStart;
- }
-
- double mfFirst = 0.0;
- double mfRest = 0.0;
- for (const formula::VectorRefArray& rArray : rArrays)
- {
- if (rArray.mpStringArray)
- {
- // FIXME operate directly on the array too
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- return mpFullMatrix->Sum(bTextAsZero);
- }
- else if (rArray.mpNumericArray)
- {
- // Numeric cells only.
- const double* p = rArray.mpNumericArray + mnRowStart;
- size_t i = 0;
-
- // Store the first non-zero value in mfFirst (for some reason).
- if (!mfFirst)
- {
- for (i = 0; i < nDataSize; ++i)
- {
- if (!mfFirst)
- mfFirst = p[i];
- else
- break;
- }
- }
- p += i;
- if (i == nDataSize)
- continue;
-
- sc::ArraySumFunctor functor(p, nDataSize-i);
-
- mfRest += functor();
- }
- }
-
- return ScMatrix::IterateResult(mfFirst, mfRest, mpToken->GetArrays().size()*nDataSize);
-}
-
-ScMatrix::IterateResult ScVectorRefMatrix::SumSquare(bool bTextAsZero) const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- return mpFullMatrix->SumSquare(bTextAsZero);
-}
-
-ScMatrix::IterateResult ScVectorRefMatrix::Product(bool bTextAsZero) const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- return mpFullMatrix->Product(bTextAsZero);
-}
-
-size_t ScVectorRefMatrix::Count(bool bCountStrings, bool bCountErrors) const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- return mpFullMatrix->Count(bCountStrings, bCountErrors);
-}
-
-size_t ScVectorRefMatrix::MatchDoubleInColumns(double fValue, size_t nCol1, size_t nCol2) const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- return mpFullMatrix->MatchDoubleInColumns(fValue, nCol1, nCol2);
-}
-
-size_t ScVectorRefMatrix::MatchStringInColumns(const svl::SharedString& rStr, size_t nCol1, size_t nCol2) const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- return mpFullMatrix->MatchStringInColumns(rStr, nCol1, nCol2);
-}
-
-double ScVectorRefMatrix::GetMaxValue(bool bTextAsZero) const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- return mpFullMatrix->GetMaxValue(bTextAsZero);
-}
-
-double ScVectorRefMatrix::GetMinValue(bool bTextAsZero) const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- return mpFullMatrix->GetMinValue(bTextAsZero);
-}
-
-double ScVectorRefMatrix::GetGcd() const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- return mpFullMatrix->GetGcd();
-}
-
-double ScVectorRefMatrix::GetLcm() const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- return mpFullMatrix->GetLcm();
-}
-
-ScMatrixRef ScVectorRefMatrix::CompareMatrix(sc::Compare& rComp, size_t nMatPos, sc::CompareOptions* pOptions) const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- return mpFullMatrix->CompareMatrix(rComp, nMatPos, pOptions);
-}
-
-void ScVectorRefMatrix::GetDoubleArray(std::vector<double>& rVector, bool bEmptyAsZero) const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- mpFullMatrix->GetDoubleArray(rVector, bEmptyAsZero);
-}
-
-void ScVectorRefMatrix::MergeDoubleArray(std::vector<double>& rVector, Op eOp) const
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- mpFullMatrix->MergeDoubleArray(rVector, eOp);
-}
-
-void ScVectorRefMatrix::NotOp(ScMatrix& rMat)
-{
- ensureFullMatrix();
- mpFullMatrix->NotOp(rMat);
-}
-
-void ScVectorRefMatrix::NegOp(ScMatrix& rMat)
-{
- ensureFullMatrix();
- mpFullMatrix->NegOp(rMat);
-}
-
-void ScVectorRefMatrix::AddOp(double fVal, ScMatrix& rMat)
-{
- ensureFullMatrix();
- mpFullMatrix->AddOp(fVal, rMat);
-}
-
-void ScVectorRefMatrix::SubOp(bool bFlag, double fVal, ScMatrix& rMat)
-{
- ensureFullMatrix();
- mpFullMatrix->SubOp(bFlag, fVal, rMat);
-}
-
-void ScVectorRefMatrix::MulOp(double fVal, ScMatrix& rMat)
-{
- ensureFullMatrix();
- mpFullMatrix->MulOp(fVal, rMat);
-}
-
-void ScVectorRefMatrix::DivOp(bool bFlag, double fVal, ScMatrix& rMat)
-{
- ensureFullMatrix();
- mpFullMatrix->DivOp(bFlag, fVal, rMat);
-}
-
-void ScVectorRefMatrix::PowOp(bool bFlag, double fVal, ScMatrix& rMat)
-{
- ensureFullMatrix();
- mpFullMatrix->PowOp(bFlag, fVal, rMat);
-}
-
-std::vector<ScMatrix::IterateResult> ScVectorRefMatrix::Collect(bool bTextAsZero, const std::vector<std::unique_ptr<sc::op::Op>>& aOp)
-{
- ensureFullMatrix();
- return mpFullMatrix->Collect(bTextAsZero, aOp);
-}
-
-void ScVectorRefMatrix::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
-{
- const_cast<ScVectorRefMatrix*>(this)->ensureFullMatrix();
- mpFullMatrix->ExecuteOperation(rStartPos, rEndPos, aDoubleFunc, aBoolFunc, aStringFunc, aEmptyFunc);
-}
-
void ScFullMatrix::MatConcat(SCSIZE nMaxCol, SCSIZE nMaxRow,
const ScMatrixRef& xMat1, const ScMatrixRef& xMat2, SvNumberFormatter& rFormatter, svl::SharedStringPool& rPool)
{
pImpl->MatConcat(nMaxCol, nMaxRow, xMat1, xMat2, rFormatter, rPool);
}
-void ScVectorRefMatrix::MatConcat(SCSIZE nMaxCol, SCSIZE nMaxRow,
- const ScMatrixRef& xMat1, const ScMatrixRef& xMat2, SvNumberFormatter& rFormatter, svl::SharedStringPool& rPool)
-{
- ensureFullMatrix();
- mpFullMatrix->MatConcat(nMaxCol, nMaxRow, xMat1, xMat2, rFormatter, rPool);
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 232c96f5f63e..46e67efac0d4 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -681,9 +681,6 @@ bool ScMatrixToken::operator==( const FormulaToken& r ) const
return FormulaToken::operator==( r ) && pMatrix == r.GetMatrix();
}
-ScMatrixRangeToken::ScMatrixRangeToken( const ScMatrixRef& p, const ScComplexRefData& rRef ) :
- FormulaToken(formula::svMatrix), mpMatrix(p), maRef(rRef) {}
-
ScMatrixRangeToken::ScMatrixRangeToken( const sc::RangeMatrix& rMat ) :
FormulaToken(formula::svMatrix), mpMatrix(rMat.mpMat)
{