sc/source/core/data/column2.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
New commits: commit 92a2cb1bc23d9b0e099f34bcd4c2b89d3682ce60 Author: Kohei Yoshida <kohei.yosh...@collabora.com> Date: Fri Mar 7 14:23:46 2014 -0500 fdo#75718: Correctly count the length of trailing empty range. This affects auto fill, apparently. Change-Id: I653918d374122bc9bb938231934c149da79a3306 (cherry picked from commit 01de94471c20a8b9c36d6080638d70e57eac55bf) Reviewed-on: https://gerrit.libreoffice.org/8501 Tested-by: Markus Mohrhard <markus.mohrh...@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx index ae1a722..1c18aff 100644 --- a/sc/source/core/data/column2.cxx +++ b/sc/source/core/data/column2.cxx @@ -1368,13 +1368,13 @@ void ScColumn::GetNotesInRange(SCROW nStartRow, SCROW nEndRow, SCSIZE ScColumn::GetEmptyLinesInBlock( SCROW nStartRow, SCROW nEndRow, ScDirection eDir ) const { - // Given a range of rows, find a top or bottom empty segment. + // Given a range of rows, find a top or bottom empty segment. Skip the start row. switch (eDir) { case DIR_TOP: { // Determine the length of empty head segment. - size_t nLength = nEndRow - nStartRow + 1; + size_t nLength = nEndRow - nStartRow; std::pair<sc::CellStoreType::const_iterator,size_t> aPos = maCells.position(nStartRow); sc::CellStoreType::const_iterator it = aPos.first; if (it->type != sc::element_type_empty) @@ -1388,8 +1388,8 @@ SCSIZE ScColumn::GetEmptyLinesInBlock( SCROW nStartRow, SCROW nEndRow, ScDirecti break; case DIR_BOTTOM: { - // Determine the length empty tail segment. - size_t nLength = nEndRow - nStartRow + 1; + // Determine the length of empty tail segment. + size_t nLength = nEndRow - nStartRow; std::pair<sc::CellStoreType::const_iterator,size_t> aPos = maCells.position(nEndRow); sc::CellStoreType::const_iterator it = aPos.first; if (it->type != sc::element_type_empty) @@ -1397,7 +1397,7 @@ SCSIZE ScColumn::GetEmptyLinesInBlock( SCROW nStartRow, SCROW nEndRow, ScDirecti return 0; // length of this empty block from the tip to the end row position. - size_t nThisLen = aPos.second; + size_t nThisLen = aPos.second + 1; return std::min(nThisLen, nLength); } break; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits