summaryrefslogtreecommitdiff
path: root/sc/source/core/data/table3.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-09-18 12:13:13 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-09-18 13:38:28 -0400
commit0ef6263ed2b31b8f9e431971e6c5e8928996c1c8 (patch)
tree5bdbe48de006c829b918ca16eed5a4a0d07d5f1a /sc/source/core/data/table3.cxx
parentd07549bc4cc74c71e2c85a4472fd605682faf494 (diff)
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
Diffstat (limited to 'sc/source/core/data/table3.cxx')
-rw-r--r--sc/source/core/data/table3.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index b901b1e31a20..7d5d79f2eac7 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -781,8 +781,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);
+ }
}
}