summaryrefslogtreecommitdiff
path: root/sc/source/core/data/markarr.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core/data/markarr.cxx')
-rw-r--r--sc/source/core/data/markarr.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/core/data/markarr.cxx b/sc/source/core/data/markarr.cxx
index 83aca1a37d2f..242eabf881db 100644
--- a/sc/source/core/data/markarr.cxx
+++ b/sc/source/core/data/markarr.cxx
@@ -110,7 +110,7 @@ bool ScMarkArray::GetMark( SCROW nRow ) const
void ScMarkArray::SetMarkArea( SCROW nStartRow, SCROW nEndRow, bool bMarked )
{
- if (ValidRow(nStartRow) && ValidRow(nEndRow))
+ if (ValidRow(nStartRow, mnMaxRow) && ValidRow(nEndRow, mnMaxRow))
{
if ((nStartRow == 0) && (nEndRow == mnMaxRow))
{
@@ -357,7 +357,7 @@ SCROW ScMarkArray::GetNextMarked( SCROW nRow, bool bUp ) const
const_cast<ScMarkArray*>(this)->Reset(); // create pData for further processing
SCROW nRet = nRow;
- if (ValidRow(nRow))
+ if (ValidRow(nRow, mnMaxRow))
{
SCSIZE nIndex;
Search(nRow, nIndex);