summaryrefslogtreecommitdiff
path: root/sc/source/core/data/column.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-05-27 14:47:24 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-05-27 14:48:50 -0400
commit054213e86b8f3b1084474b0447cc7ffaf82178c5 (patch)
treeaf0fb97fa71323c1974d44508ef57d9f8a84e518 /sc/source/core/data/column.cxx
parent175519643daa87ba3e65eb4b52df3c8a2f60ac64 (diff)
fdo#78976: Correct way to determine the end position for matrix check.
Change-Id: Ifd6acd85a9bf33742cb62327a3b8a4320f35d0f3
Diffstat (limited to 'sc/source/core/data/column.cxx')
-rw-r--r--sc/source/core/data/column.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 485f5e8d8634..7d6ebb1e2dfc 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -154,7 +154,7 @@ sal_uInt16 ScColumn::GetBlockMatrixEdges( SCROW nRow1, SCROW nRow2, sal_uInt16 n
}
size_t nRowsToRead = nRow2 - nRow + 1;
- size_t nEnd = std::min(it->size, nRowsToRead);
+ size_t nEnd = std::min(it->size, nOffset+nRowsToRead); // last row + 1
sc::formula_block::const_iterator itCell = sc::formula_block::begin(*it->data);
std::advance(itCell, nOffset);
for (size_t i = nOffset; i < nEnd; ++itCell, ++i)