summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/core/data/table5.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/core/data/table5.cxx b/sc/source/core/data/table5.cxx
index dc59989d1644..c1ef2c796fd6 100644
--- a/sc/source/core/data/table5.cxx
+++ b/sc/source/core/data/table5.cxx
@@ -764,8 +764,8 @@ SCCOLROW ScTable::LastHiddenColRow(SCCOLROW nPos, bool bCol) const
{
for (SCCOL i = nCol+1; i <= MAXCOL; ++i)
{
- if (!ColHidden(nCol))
- return nCol - 1;
+ if (!ColHidden(i))
+ return i - 1;
}
}
}