Commit 3b5e3b8
committed
[FIX] CF: Avoid getter crash on invalid sheet
The Evaluated CF getters would crash when provided an invalid sheet id.
Providing an inexisting or invalid col/row would not throw though.
This becomes an issue since #7634 because during the excel export, we
fetch the style of all the cells of *all the sheets* in the data and
some of them are "ghost" sheets that are injected only in the export data.
As such, they are not part of the plugins lifecycle.
This revision fixes the getters for CF so that they don't throw on
invalid sheets for 2 reasons:
- coherence: bad xc does not throw but a bad sheet id does
- other style-related getters do not throw
closes #8229
Task: 0
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>1 parent 5aa16da commit 3b5e3b8
File tree
2 files changed
+25
-4
lines changed- packages/o-spreadsheet-engine/src/plugins/ui_core_views
- tests/conditional_formatting
2 files changed
+25
-4
lines changedLines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
Lines changed: 22 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
9 | 14 | | |
10 | 15 | | |
11 | 16 | | |
| |||
2703 | 2708 | | |
2704 | 2709 | | |
2705 | 2710 | | |
| 2711 | + | |
| 2712 | + | |
| 2713 | + | |
| 2714 | + | |
| 2715 | + | |
| 2716 | + | |
| 2717 | + | |
| 2718 | + | |
| 2719 | + | |
| 2720 | + | |
| 2721 | + | |
| 2722 | + | |
| 2723 | + | |
| 2724 | + | |
| 2725 | + | |
| 2726 | + | |
2706 | 2727 | | |
0 commit comments