odoo/o-spreadsheet#1453

Created by BI, Adrien Minne (adrm)

Blocked

label
odoo:master-headers-plugins-ranges-adrm
head
1f3a1520692f4bb397707b927a16130b090533ea
odoo/o-spreadsheet
master #1453 missing r+

[REF] headers: use ranges inside headers plugins

Before, the plugins header_sizes and header_visibility were updating
their data "by hand" when handling commands such as ADD_COLUMNS_ROWS.

This commit introduce a HeaderMap object that handle all the grid changes
automatically using ranges.

There a problem with the command MOVE_RANGES:
- when inserting/deleting cell, we handle this with a CUT that will dispatch
a MOVE_RANGES. This made the ranges of our HeaderMap move when we
didn't wanted them to.

Solve this problem by returning the command that resulted in the changes in
adaptRanges, and ignoring changes that were coming from a MOVE_RANGES.

Notes :

Not sure we really wan adaptRanges to return the command as well as the changed range.
I'm not sure how else to fix the problem. Maybe there is 2 different concept that I bundle in Range, but I'm not too sure what's really different about them. We should brainstorm sometimes.

Odoo task ID : 2889911

review checklist