summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/ui/miscdlgs/datatableview.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/sc/source/ui/miscdlgs/datatableview.cxx b/sc/source/ui/miscdlgs/datatableview.cxx
index 2541688a6677..3c88ac65b290 100644
--- a/sc/source/ui/miscdlgs/datatableview.cxx
+++ b/sc/source/ui/miscdlgs/datatableview.cxx
@@ -90,7 +90,7 @@ void ScDataTableColView::HideEntries(SCCOLROW nPos, SCCOLROW nEndPos)
ScDataTableRowView::ScDataTableRowView(vcl::Window* pParent, SelectionEngine* pSelectionEngine):
- ScHeaderControl(pParent, pSelectionEngine, 1024, true, nullptr),
+ ScHeaderControl(pParent, pSelectionEngine, 1048576, true, nullptr),
mpDoc(nullptr),
mnRow(0)
{
@@ -218,7 +218,7 @@ SCCOL findColFromPos(sal_uInt16 nPixelPos, const ScDocument* pDoc, SCCOL nStartC
}
SAL_WARN("sc", "Could not find the corresponding column");
- return -1;
+ return MAXCOL;
}
SCROW findRowFromPos(sal_uInt16 nPixelPos, const ScDocument* pDoc, SCROW nStartRow = 0)
@@ -238,7 +238,7 @@ SCROW findRowFromPos(sal_uInt16 nPixelPos, const ScDocument* pDoc, SCROW nStartR
}
SAL_WARN("sc", "Could not find the corresponding row");
- return -1;
+ return MAXROW;
}
}
@@ -321,13 +321,13 @@ IMPL_LINK(ScDataTableView, ScrollHdl, ScrollBar*, pScrollBar, void)
if (pScrollBar == mpVScroll.get())
{
mnFirstVisibleRow = pScrollBar->GetThumbPos();
- pScrollBar->SetRangeMax(mnFirstVisibleRow + 100);
+ pScrollBar->SetRangeMax(std::min( MAXROW,static_cast<SCROW>(mnFirstVisibleRow + 100 )));
mpRowView->SetPos(mnFirstVisibleRow);
}
else
{
mnFirstVisibleCol = pScrollBar->GetThumbPos();
- pScrollBar->SetRangeMax(mnFirstVisibleCol + 50);
+ pScrollBar->SetRangeMax(std::min( MAXCOL,static_cast<SCCOL>(mnFirstVisibleCol + 50 )));
mpColView->SetPos(mnFirstVisibleCol);
}
Invalidate();