From 6293d898c16bafeb703129ed0d33857934ab1dfb Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Thu, 13 Mar 2014 10:22:25 -0400 Subject: fdo#75642: Check the high position block correctly. Change-Id: I25deabf69e78c6e0354e8a528ab88891a30f9aec (cherry picked from commit c078d5fef98ba77751b7a9593691d88dfc1c9ba1) Reviewed-on: https://gerrit.libreoffice.org/8573 Tested-by: Markus Mohrhard Reviewed-by: Markus Mohrhard --- sc/source/core/data/dociter.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx index 5758c52a845d..1461472611fd 100644 --- a/sc/source/core/data/dociter.cxx +++ b/sc/source/core/data/dociter.cxx @@ -1554,7 +1554,9 @@ public: // Move to the last position of the previous block. decBlock(aHiPos); - if (aHiPos.first == mrCells.begin()) + // Check the row postion of the end of the previous block, and make sure it's valid. + SCROW nBlockEndRow = aHiPos.first->position + aHiPos.first->size - 1; + if (nBlockEndRow < nStartRow) { mbValid = false; return; -- cgit v1.2.3