diff options
author | Eike Rathke <erack@redhat.com> | 2017-09-14 17:45:22 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-09-14 17:45:56 +0200 |
commit | 0e7593ed856ac49c1d69407b8d0db5b771cc2805 (patch) | |
tree | 096dbbfdf873e82e71c94600970b63ea3ebaa450 | |
parent | 08db0b561e965a4b748b8fc91622ce6b558f5017 (diff) |
InsertMatrixFormula,InsertTableOp: assert valid cols/rows
We don't check and return without operation for these, so the caller is
responsible for handling bad prerequisites.
Change-Id: I47bf5dc171c2362bf7096022058a51460c6e50e0
-rw-r--r-- | sc/source/core/data/documen4.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx index ae608b3c2e94..d1eebdbe3cfe 100644 --- a/sc/source/core/data/documen4.cxx +++ b/sc/source/core/data/documen4.cxx @@ -271,6 +271,7 @@ void ScDocument::InsertMatrixFormula(SCCOL nCol1, SCROW nRow1, SAL_WARN("sc", "ScDocument::InsertMatrixFormula: No table marked"); return; } + assert( ValidColRow( nCol1, nRow1) && ValidColRow( nCol2, nRow2)); SCTAB nTab1 = *rMark.begin(); @@ -353,6 +354,7 @@ void ScDocument::InsertTableOp(const ScTabOpParam& rParam, // multiple (repeate { PutInOrder(nCol1, nCol2); PutInOrder(nRow1, nRow2); + assert( ValidColRow( nCol1, nRow1) && ValidColRow( nCol2, nRow2)); SCTAB i, nTab1; SCCOL j; SCROW k; |