Kaydet (Commit) 054213e8 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

fdo#78976: Correct way to determine the end position for matrix check.

Change-Id: Ifd6acd85a9bf33742cb62327a3b8a4320f35d0f3
üst 17551964
...@@ -154,7 +154,7 @@ sal_uInt16 ScColumn::GetBlockMatrixEdges( SCROW nRow1, SCROW nRow2, sal_uInt16 n ...@@ -154,7 +154,7 @@ sal_uInt16 ScColumn::GetBlockMatrixEdges( SCROW nRow1, SCROW nRow2, sal_uInt16 n
} }
size_t nRowsToRead = nRow2 - nRow + 1; 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); sc::formula_block::const_iterator itCell = sc::formula_block::begin(*it->data);
std::advance(itCell, nOffset); std::advance(itCell, nOffset);
for (size_t i = nOffset; i < nEnd; ++itCell, ++i) for (size_t i = nOffset; i < nEnd; ++itCell, ++i)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment