summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-12-01 04:05:46 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-12-01 08:01:30 +0100
commit9eb40f6ab2cd7798a9e9b61cfd6e5b65517123ac (patch)
treeb4f4bb706a3f679934c1408a7d8eaec4202ebe0b
parentd00f00e4fee008f5cd56826b065f4a438ddb0b6e (diff)
avoid modifying range name references that are not affected, fdo#86518
Change-Id: I0822fb96ebcb30326bcdd88f3900e6e01c85bcf5
-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);