[Libreoffice-commits] core.git: sc/source
Eike Rathke
erack at redhat.com
Thu Sep 14 15:46:19 UTC 2017
sc/source/core/data/documen4.cxx | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit 0e7593ed856ac49c1d69407b8d0db5b771cc2805
Author: Eike Rathke <erack at redhat.com>
Date: Thu Sep 14 17:45:22 2017 +0200
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
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;
More information about the Libreoffice-commits
mailing list