summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2016-11-17 22:13:19 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-11-21 17:27:44 +0000
commit5e397250c0ab2c092091c6dfe30d906a17fdca9e (patch)
tree2ab69be925ffcf7967ebc8108292a3d22f1d0bfa
parent775b75a696deb0ea1cc758aee8250663ddfc1d3a (diff)
Resolves: tdf#103994 AdjustReferenceOnMove: handle external references
Change-Id: I8b104b0c843dd268d8760a2a73cdd3e672e6efd6 (cherry picked from commit 4665be3af48587505bb7f49a53e8422945ec49eb) Reviewed-on: https://gerrit.libreoffice.org/30941 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r--sc/source/core/tool/token.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 28fdcad17801..9ce7673821ee 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -3216,6 +3216,20 @@ sc::RefUpdateResult ScTokenArray::AdjustReferenceOnMove(
rRef.Ref1.SetFlag3D(true);
}
break;
+ case svExternalSingleRef:
+ {
+ ScSingleRefData& rRef = *p->GetSingleRef();
+ ScAddress aAbs = rRef.toAbs(rOldPos);
+ rRef.SetAddress(aAbs, rNewPos);
+ }
+ break;
+ case svExternalDoubleRef:
+ {
+ ScComplexRefData& rRef = *p->GetDoubleRef();
+ ScRange aAbs = rRef.toAbs(rOldPos);
+ rRef.SetRange(aAbs, rNewPos);
+ }
+ break;
default:
;
}