sc/source/core/data/column4.cxx | 7 ++++++- sc/source/core/data/table3.cxx | 7 +++++-- 2 files changed, 11 insertions(+), 3 deletions(-)
New commits: commit 086ed7e59f5ec74dfdf046c3d5b4f28ede8dd8be Author: Kohei Yoshida <kohei.yosh...@collabora.com> Date: Thu Sep 18 12:13:13 2014 -0400 fdo#83764: Ensure that the row position is below MAXROW. When attempting to split formula groups, else multi_type_vector would try to locate a block outside its logical range. Change-Id: I424ede112138de459b5ba3bff5e021c4407ccf3d (cherry picked from commit 0ef6263ed2b31b8f9e431971e6c5e8928996c1c8) Reviewed-on: https://gerrit.libreoffice.org/11519 Reviewed-by: Andras Timar <andras.ti...@collabora.com> Tested-by: Andras Timar <andras.ti...@collabora.com> diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx index d1aacdd..8b46e74 100644 --- a/sc/source/core/data/column4.cxx +++ b/sc/source/core/data/column4.cxx @@ -499,11 +499,16 @@ public: void ScColumn::SplitFormulaGroupByRelativeRef( const ScRange& rBoundRange ) { + if (rBoundRange.aStart.Row() >= MAXROW) + // Nothing to split. + return; + std::vector<SCROW> aBounds; // Cut at row boundaries first. aBounds.push_back(rBoundRange.aStart.Row()); - aBounds.push_back(rBoundRange.aEnd.Row()+1); + if (rBoundRange.aEnd.Row() < MAXROW) + aBounds.push_back(rBoundRange.aEnd.Row()+1); sc::SharedFormulaUtil::splitFormulaCellGroups(maCells, aBounds); RelativeRefBoundChecker aFunc(rBoundRange); diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index c1a81e6..946416d 100644 --- a/sc/source/core/data/table3.cxx +++ b/sc/source/core/data/table3.cxx @@ -771,8 +771,11 @@ void ScTable::SortReorderByColumn( sc::CellStoreType& rCells = aCol[nCol].maCells; sc::CellStoreType::position_type aPos = rCells.position(nRow1); sc::SharedFormulaUtil::joinFormulaCellAbove(aPos); - aPos = rCells.position(aPos.first, nRow2+1); - sc::SharedFormulaUtil::joinFormulaCellAbove(aPos); + if (nRow2 < MAXROW) + { + aPos = rCells.position(aPos.first, nRow2+1); + sc::SharedFormulaUtil::joinFormulaCellAbove(aPos); + } } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits