diff options
author | Eike Rathke <erack@redhat.com> | 2015-05-04 20:55:40 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2015-05-04 20:56:40 +0200 |
commit | c4ed1eb3ab4480092b21d95edebc10ea010b67e8 (patch) | |
tree | 207630ffaf903a9cbc0630d34141c0bdb1c99a1a /sc | |
parent | 46fa99f61aff88f1697959a9d3c41a5c3c3c05e9 (diff) |
assert(nStartRow <= nEndRow)
Zero or negative count is unhealthy..
Change-Id: I4cce6c896e73e8e964518cbe4a29eb03ed481251
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/table1.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx index 2d45dab8f9de..e2beed55274d 100644 --- a/sc/source/core/data/table1.cxx +++ b/sc/source/core/data/table1.cxx @@ -84,6 +84,8 @@ void GetOptimalHeightsInColumn( sc::RowHeightContext& rCxt, ScColumn* pCol, SCROW nStartRow, SCROW nEndRow, ScProgress* pProgress, sal_uInt32 nProgressStart ) { + assert(nStartRow <= nEndRow); + SCSIZE nCount = static_cast<SCSIZE>(nEndRow-nStartRow+1); // first, one time over the whole range @@ -460,6 +462,8 @@ bool ScTable::SetOptimalHeight( sc::RowHeightContext& rCxt, SCROW nStartRow, SCROW nEndRow, ScProgress* pOuterProgress, sal_uLong nProgressStart ) { + assert(nStartRow <= nEndRow); + OSL_ENSURE( rCxt.getExtraHeight() == 0 || rCxt.isForceAutoSize(), "automatic OptimalHeight with Extra" ); |