summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-05-27 14:47:24 -0400
committerAndras Timar <andras.timar@collabora.com>2014-06-02 19:01:55 +0200
commit0c1cd81957ef4aa2436cca0d7a87d964703ec7b5 (patch)
tree8d216060b70b5257c93dbc6f2358b5d4682c4443 /sc
parentc295ea7001feb2a8978c1871b424b73ac9210bc8 (diff)
fdo#78976: Correct way to determine the end position for matrix check.
Change-Id: Ifd6acd85a9bf33742cb62327a3b8a4320f35d0f3 (cherry picked from commit 054213e86b8f3b1084474b0447cc7ffaf82178c5) Reviewed-on: https://gerrit.libreoffice.org/9512 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc')
-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 9835a6dc21af..5e5cf430f0b2 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -152,7 +152,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)