summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorYogesh <er.yogeshdesai@gmail.com>2016-01-21 16:24:40 +0530
committerEike Rathke <erack@redhat.com>2016-01-25 14:20:16 +0000
commit509a189bf70370fbd09f3bb962f8b4e9eacbc6d1 (patch)
tree29c06eddb786f6a0a3f31f0defba873893eb3399 /sc
parentc54e48d2bb7bf4aaf7a4ea933ba5a330df54453a (diff)
tdf#96910 : Calc crashes while using "Insert Column Left" for large Documents
Change-Id: I6e813b7525a3d9b1db131db9f08fc20f7320345f Reviewed-on: https://gerrit.libreoffice.org/21661 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit 208883398dcf9af6b88611097d1f75d5fbc9afad) Reviewed-on: https://gerrit.libreoffice.org/21791 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/sharedformula.cxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/sc/source/core/tool/sharedformula.cxx b/sc/source/core/tool/sharedformula.cxx
index 43b98725da68..62e031cca01c 100644
--- a/sc/source/core/tool/sharedformula.cxx
+++ b/sc/source/core/tool/sharedformula.cxx
@@ -119,11 +119,13 @@ void SharedFormulaUtil::splitFormulaCellGroups(CellStoreType& rCells, std::vecto
for (++it; it != itEnd; ++it)
{
nRow = *it;
- aPos = rCells.position(aPos.first, nRow);
- if (aPos.first == rCells.end())
- return;
-
- splitFormulaCellGroup(aPos, nullptr);
+ if (ValidRow(nRow))
+ {
+ aPos = rCells.position(aPos.first, nRow);
+ if (aPos.first == rCells.end())
+ return;
+ splitFormulaCellGroup(aPos, nullptr);
+ }
}
}