summaryrefslogtreecommitdiff
path: root/sc/source/core/tool/scmatrix.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-09 11:12:52 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-09 14:16:36 +0200
commit664db0d945fbb23e115eeea8377e3a4e88541da1 (patch)
tree7105b54a8a7b5d2eca45fee1b3ff7f326e99e81a /sc/source/core/tool/scmatrix.cxx
parentc11ee0f7b0e4e7bf4d1e2e5bb4309f24b917ce79 (diff)
loplugin:unusedmethods
Change-Id: Icd7a0f9909f36363b307b4fe7ee920183881afbb Reviewed-on: https://gerrit.libreoffice.org/61576 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/core/tool/scmatrix.cxx')
-rw-r--r--sc/source/core/tool/scmatrix.cxx62
1 files changed, 0 insertions, 62 deletions
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index 4442c815a0fe..c029cac75ace 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -319,7 +319,6 @@ public:
void GetDoubleArray( std::vector<double>& rArray, bool bEmptyAsZero ) const;
void MergeDoubleArray( std::vector<double>& rArray, ScMatrix::Op eOp ) const;
- void AddValues( const ScMatrixImpl& rMat );
template<typename T>
void ApplyOperation(T aOp, ScMatrixImpl& rMat);
@@ -2201,61 +2200,6 @@ void ScMatrixImpl::MergeDoubleArray( std::vector<double>& rArray, ScMatrix::Op e
}
}
-void ScMatrixImpl::AddValues( const ScMatrixImpl& rMat )
-{
- const MatrixImplType& rOther = rMat.maMat;
- MatrixImplType::size_pair_type aSize = maMat.size();
- if (aSize != rOther.size())
- // Geometry must match.
- return;
-
- // For now, we only add two matricies if and only if 1) the receiving
- // matrix consists only of one numeric block, and 2) the other matrix
- // consists of either one numeric block or one boolean block. In the
- // future, we may want to be more flexible support matricies that consist
- // of multiple blocks.
-
- MatrixImplType::position_type aPos1 = maMat.position(0, 0);
- MatrixImplType::const_position_type aPos2 = rOther.position(0, 0);
- if (MatrixImplType::to_mtm_type(aPos1.first->type) != mdds::mtm::element_numeric)
- return;
-
- if (aPos1.first->size != aPos2.first->size)
- return;
-
- if (aPos1.first->size != aSize.row * aSize.column)
- return;
-
- MatrixImplType::numeric_block_type::iterator it =
- MatrixImplType::numeric_block_type::begin(*aPos1.first->data);
- MatrixImplType::numeric_block_type::iterator itEnd =
- MatrixImplType::numeric_block_type::end(*aPos1.first->data);
-
- switch (MatrixImplType::to_mtm_type(aPos2.first->type))
- {
- case mdds::mtm::element_boolean:
- {
- MatrixImplType::boolean_block_type::iterator it2 =
- MatrixImplType::boolean_block_type::begin(*aPos2.first->data);
-
- for (; it != itEnd; ++it, ++it2)
- *it += *it2;
- }
- break;
- case mdds::mtm::element_numeric:
- {
- MatrixImplType::numeric_block_type::iterator it2 =
- MatrixImplType::numeric_block_type::begin(*aPos2.first->data);
-
- for (; it != itEnd; ++it, ++it2)
- *it += *it2;
- }
- break;
- default:
- ;
- }
-}
-
namespace Op {
template<typename T>
@@ -3529,12 +3473,6 @@ std::vector<ScMatrix::IterateResult> ScMatrix::Collect(const std::vector<std::un
return pImpl->ApplyCollectOperation(aOp);
}
-ScMatrix& ScMatrix::operator+= ( const ScMatrix& r )
-{
- pImpl->AddValues(*r.pImpl);
- return *this;
-}
-
#if DEBUG_MATRIX
void ScMatrix::Dump() const
{