summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-12-01 04:05:46 +0100
committerMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-12-01 07:37:06 +0100
commit4e3baa08cbaf1e15ef668d92878d1f6f8eba1303 (patch)
tree2f0ae5f1d35fd3b904f3895925c5a988526e55f6
parentf1cdad3253730c593953b91279d17c8a4590fed9 (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 b0bfb99f88e3..74b30adc954b 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -3060,6 +3060,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);