diff options
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/table1.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx index 8e6f276fe299..1ba2c2c3b96f 100644 --- a/sc/source/core/data/table1.cxx +++ b/sc/source/core/data/table1.cxx @@ -899,8 +899,8 @@ void ScTable::GetDataArea( SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, S if ( !bBottom && rEndRow > 0 && rStartRow < rEndRow ) { SCROW nLastDataRow = GetLastDataRow( rStartCol, rEndCol, rEndRow); - if (nLastDataRow >= 0 && rStartRow <= nLastDataRow && nLastDataRow < rEndRow) - rEndRow = nLastDataRow; + if (nLastDataRow < rEndRow) + rEndRow = std::max( rStartRow, nLastDataRow); } } } |