summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-12-01 04:05:46 +0100
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2014-12-10 15:02:54 +0000
commit906fdfa21fc8741b27657ec0c497485b0cb5ff1f (patch)
tree477436aaab07635076137d7edf82d37d6cf2b883
parent71f4f4b36f41fbd59fd122de0ce29361f20ee37f (diff)
avoid modifying range name references that are not affected, fdo#86518
Change-Id: I0822fb96ebcb30326bcdd88f3900e6e01c85bcf5 Reviewed-on: https://gerrit.libreoffice.org/13299 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.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);