summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
Diffstat (limited to 'sc')
-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 77f7cc2f8583..a2721a254a45 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -3059,6 +3059,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);