summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-12-01 04:05:46 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-12-04 13:58:33 +0000
commit3e40e71761e710f9226f6c9772143daf29cf454a (patch)
tree1c8a35b52e788899eddeeb416ec3636d536e1362
parentfd1ae18d54f4a57aaa67c0a011fef7e6c20fdbeb (diff)
avoid modifying range name references that are not affected, fdo#86518
Change-Id: I0822fb96ebcb30326bcdd88f3900e6e01c85bcf5 Reviewed-on: https://gerrit.libreoffice.org/13239 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
-rw-r--r--sc/source/core/tool/token.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 74c61a58839d..ebc072e24ca5 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -3236,6 +3236,10 @@ sc::RefUpdateResult ScTokenArray::AdjustReferenceInName(
// column range of the reference is not entirely in the deleted column range.
break;
+ if (aAbs.aStart.Tab() > rCxt.maRange.aEnd.Tab() || aAbs.aEnd.Tab() < rCxt.maRange.aStart.Tab())
+ // wrong tables
+ break;
+
ScRange aDeleted = rCxt.maRange;
aDeleted.aStart.IncRow(rCxt.mnRowDelta);
aDeleted.aEnd.SetRow(aDeleted.aStart.Row()-rCxt.mnRowDelta-1);