summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2018-08-24 11:13:00 +0200
committerEike Rathke <erack@redhat.com>2018-08-24 14:52:47 +0200
commit1d0d5734ffaf6f56699c5315b6427ac832af6a13 (patch)
tree095badaaca82c2dd92af0d95376e7f811203a232 /sc
parent8114f976b897c4717368146a49d5404ef970c77a (diff)
Eliminate unnecessary per element copy of matrix' first col/row
Change-Id: I12e282bc9e999db674e02218160b6ac199aedc48 Reviewed-on: https://gerrit.libreoffice.org/59548 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/interpr1.cxx22
1 files changed, 2 insertions, 20 deletions
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index bfc26230ec35..0e49f38507e5 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -6820,26 +6820,8 @@ void ScInterpreter::ScLookup()
}
else
{
- if (bVertical)
- {
- ScMatrixRef pTempMat = GetNewMat(1, nR);
- for (SCSIZE i = 0; i < nR; ++i)
- if (pDataMat->IsValue(0, i))
- pTempMat->PutDouble(pDataMat->GetDouble(0, i), 0, i);
- else
- pTempMat->PutString(pDataMat->GetString(0, i), 0, i);
- pDataMat2 = pTempMat;
- }
- else
- {
- ScMatrixRef pTempMat = GetNewMat(nC, 1);
- for (SCSIZE i = 0; i < nC; ++i)
- if (pDataMat->IsValue(i, 0))
- pTempMat->PutDouble(pDataMat->GetDouble(i, 0), i, 0);
- else
- pTempMat->PutString(pDataMat->GetString(i, 0), i, 0);
- pDataMat2 = pTempMat;
- }
+ // Just use as is with the VectorMatrixAccessor.
+ pDataMat2 = pDataMat;
}
// Do not propagate errors from matrix while searching.