summaryrefslogtreecommitdiff
path: root/sc/source/core/data/column4.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-09-18 12:13:13 -0400
committerAndras Timar <andras.timar@collabora.com>2014-09-23 14:14:30 +0000
commit086ed7e59f5ec74dfdf046c3d5b4f28ede8dd8be (patch)
tree8fb853bd60c3a27f13183c902c6b8218c591a5aa /sc/source/core/data/column4.cxx
parent358fdd8ef44fbddbb24dc603a6c0c6037885f1b0 (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 (cherry picked from commit 0ef6263ed2b31b8f9e431971e6c5e8928996c1c8) Reviewed-on: https://gerrit.libreoffice.org/11519 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'sc/source/core/data/column4.cxx')
-rw-r--r--sc/source/core/data/column4.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx
index d1aacddf4adb..8b46e74831ab 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);