summaryrefslogtreecommitdiff
path: root/sc/source/core/tool/scmatrix.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core/tool/scmatrix.cxx')
-rw-r--r--sc/source/core/tool/scmatrix.cxx12
1 files changed, 11 insertions, 1 deletions
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index 90fea67c8a65..7c66db7194fa 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -3261,7 +3261,14 @@ void fillMatrix( ScMatrix& rMat, size_t nCol, const double* pNums, rtl_uString**
continue;
}
- // Empty cell. No action required.
+ // 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)
@@ -3287,6 +3294,9 @@ void ScVectorRefMatrix::ensureFullMatrix()
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();