summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-02-24 20:29:39 +0100
committerAndras Timar <andras.timar@collabora.com>2015-03-04 03:11:13 -0800
commite0130d0bf6a8af45605afe8dd805438d9fda5721 (patch)
treeea8e2700183fa54717b28adb0eaf206ba7a7a321
parent70348e2f2380f9deeaa44efa4210bec42b423e3e (diff)
Resolves: tdf#89484 check that sheet reference is within selected sheets
Change-Id: I88f1d0a134ffa3fbb9a5b5abdabbd4774f457e81 (cherry picked from commit 5803c76f318b2a8b655bf83a8257f60cd112ac71) Reviewed-on: https://gerrit.libreoffice.org/14610 Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit 8a0712e79a53c057e4a337c5b8570262dc5a33de)
-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 f7dbbfad28dd..1b550af8d826 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -2680,6 +2680,10 @@ bool expandRangeByEdge( const sc::RefUpdateContext& rCxt, ScRange& rRefRange, co
// Edge-expansion is turned off.
return false;
+ if (!(rSelectedRange.aStart.Tab() <= rRefRange.aStart.Tab() && rRefRange.aEnd.Tab() <= rSelectedRange.aEnd.Tab()))
+ // Sheet references not within selected range.
+ return false;
+
if (rCxt.mnColDelta > 0)
{
// Insert and shift right.