[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - sc/source
Marco Cecchetti
marco.cecchetti at collabora.com
Mon Dec 4 11:37:39 UTC 2017
sc/source/ui/view/gridwin4.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 0b8dc9678c65451048613dba22d370bad3b5c2f7
Author: Marco Cecchetti <marco.cecchetti at collabora.com>
Date: Sat Dec 2 17:19:33 2017 +0100
lok: calc: fix: CTRL+RIGHT => crash
Change-Id: I5c127aa4cbdca5e13d2329c1fb68f466464fe432
Reviewed-on: https://gerrit.libreoffice.org/45792
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Tested-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 13b82122d6fd..4283785c4fb7 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -1088,7 +1088,8 @@ namespace {
{
long nTmp = 0; // row/col to render for nPosition
long nLastScrPos = 0, nScrPos = 0;
- while (nScrPos <= nPosition && nTmp < MAXROW)
+ const long nMaxIndex = bRowNotCol ? MAXROW : MAXCOL;
+ while (nScrPos <= nPosition && nTmp < nMaxIndex)
{
long nSize = bRowNotCol ? pDoc->GetRowHeight( nTmp, nTabNo )
: pDoc->GetColWidth( nTmp, nTabNo );
More information about the Libreoffice-commits
mailing list