o-spreadsheet icon indicating copy to clipboard operation
o-spreadsheet copied to clipboard

[REF] clipboard: remove usage of `MOVE_RANGES`

Open hokolomopo opened this issue 10 months ago • 1 comments

Description

This commit changes the clipboard to display a new command MOVE_REFERENCE instead of MOVE_RANGES. The new command only moves the ranges that are references to cells (in formulas in chart) instead of modifying all the existing ranges.

There is two main reasons:

  • the handling of MOVE_RANGE is bugged in most plugins when it moves a range from a sheet to another. Fixing the command could lead to broken spreadsheets, so for now we prefer to remove it.

  • cut/paste was in a strange state where some operations were done twice. For example a filter table was moved once when handling MOVE_RANGES and then moved again when the cut/paste of the table was actually done. It's better to handle everything inside the clipboard.

Task: : 3899595

review checklist

  • [ ] feature is organized in plugin, or UI components
  • [ ] support of duplicate sheet (deep copy)
  • [ ] in model/core: ranges are Range object, and can be adapted (adaptRanges)
  • [ ] in model/UI: ranges are strings (to show the user)
  • [ ] undo-able commands (uses this.history.update)
  • [ ] multiuser-able commands (has inverse commands and transformations where needed)
  • [ ] new/updated/removed commands are documented
  • [ ] exportable in excel
  • [ ] translations (_t("qmsdf %s", abc))
  • [ ] unit tested
  • [ ] clean commented code
  • [ ] track breaking changes
  • [ ] doc is rebuild (npm run doc)
  • [ ] status is correct in Odoo

hokolomopo avatar Apr 30 '24 08:04 hokolomopo