diff options
author | Eike Rathke <erack@redhat.com> | 2022-09-09 12:54:14 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2022-09-09 15:53:46 +0200 |
commit | 9a6c350d8dff4b5228ec7451006115e387f819f2 (patch) | |
tree | d7e0b04a0150482a0ddf1bd4e4ca6147a8bf9909 /sc/inc | |
parent | d26faae8359ccf2e3475ef9e319c97485b76d08d (diff) |
Resolves: tdf#150312 Move base-cell-address to a valid sheet upon deletion
... and adjust references accordingly. For
ScTokenArray::AdjustReferenceOnDeletedTab() that now also moves
the base of the first deleted sheet not only after, which was a
one-off before.
Change-Id: I4c19e8b8a7318ba03b6a7d0b2dfaae5d05a51a29
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139720
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
Diffstat (limited to 'sc/inc')
-rw-r--r-- | sc/inc/rangeutl.hxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sc/inc/rangeutl.hxx b/sc/inc/rangeutl.hxx index 33f531444280..4524226e43ca 100644 --- a/sc/inc/rangeutl.hxx +++ b/sc/inc/rangeutl.hxx @@ -276,6 +276,15 @@ struct SC_DLLPUBLIC ScRangeUpdater ScRangeUpdater() = delete; static void UpdateInsertTab(ScAddress& rAddr, const sc::RefUpdateInsertTabContext& rCxt); + + /** This is for the base-cell-address of a defined name or conditional + format, not for references. A sheet position on or after the start of + the deleted range is moved towards the beginning by the amount of + deleted sheets, within the deleted range to the front of that or set to + 0 (as there is always at least one sheet in a document) if the position + would result in a negative value, e.g. if position was 0 and (only) + sheet 0 is deleted it would had become -1. + */ static void UpdateDeleteTab(ScAddress& rAddr, const sc::RefUpdateDeleteTabContext& rCxt); }; |