diff options
author | Eike Rathke <erack@redhat.com> | 2020-02-18 00:23:40 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2020-02-18 13:58:05 +0100 |
commit | 180fef2a54207555c39fb63ead5e66ba3a71a0cf (patch) | |
tree | e512e49b90a465b431aa6a3d0290f1921157e45e /sc | |
parent | f58d42349525be3838cf7568c9840d9e3dacddad (diff) |
Resolves: tdf#130370 Increment sheet-local name only for moved cells
Probably that piece of code is not needed at all anymore since
moving entire sheets and their names is handled differently
nowadays. Needs further investigation.
Change-Id: I2ac115c18354371d0abbfc6cc972d16edcb41021
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88898
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/token.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index 99775f5de4b6..8f9e9a67b002 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -3389,9 +3389,12 @@ sc::RefUpdateResult ScTokenArray::AdjustReferenceOnMove( SCTAB nOldTab = (*pp)->GetSheet(); if (isNameModified(rCxt.maUpdatedNames, nOldTab, **pp)) aRes.mbNameModified = true; - if (rCxt.mnTabDelta && - rCxt.maRange.aStart.Tab() <= nOldTab && nOldTab <= rCxt.maRange.aEnd.Tab()) + if (rCxt.mnTabDelta && aOldRange.In(rOldPos) && + aOldRange.aStart.Tab() <= nOldTab && nOldTab <= aOldRange.aEnd.Tab()) { + /* TODO: this may not be needed at all anymore; + * investigate when we actually hit the + * condition. */ aRes.mbNameModified = true; (*pp)->SetSheet( nOldTab + rCxt.mnTabDelta); } |