@@ -25036,6 +25036,9 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
25036
25036
}
25037
25037
function convertChartData(chartData) {
25038
25038
var _a;
25039
+ if (chartData.dataSets.length === 0) {
25040
+ return undefined;
25041
+ }
25039
25042
const labelRange = (_a = chartData.dataSets[0].label) === null || _a === void 0 ? void 0 : _a.replace(/\$/g, "");
25040
25043
let dataSets = chartData.dataSets.map((data) => data.range.replace(/\$/g, ""));
25041
25044
// For doughnut charts, in chartJS first dataset = outer dataset, in excel first dataset = inner dataset
@@ -27507,10 +27510,34 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
27507
27510
const elements = [...cmd.elements].sort((a, b) => b - a);
27508
27511
for (const group of groupConsecutive(elements)) {
27509
27512
if (cmd.dimension === "COL") {
27510
- this.shiftBordersHorizontally(cmd.sheetId, group[group.length - 1] + 1, -group.length);
27513
+ if (group[0] >= this.getters.getNumberCols(cmd.sheetId)) {
27514
+ for (let row = 0; row < this.getters.getNumberRows(cmd.sheetId); row++) {
27515
+ this.history.update("borders", cmd.sheetId, group[0] + 1, row, "vertical", undefined);
27516
+ }
27517
+ }
27518
+ if (group[group.length - 1] === 0) {
27519
+ for (let row = 0; row < this.getters.getNumberRows(cmd.sheetId); row++) {
27520
+ this.history.update("borders", cmd.sheetId, 0, row, "vertical", undefined);
27521
+ }
27522
+ }
27523
+ const zone = this.getters.getColsZone(cmd.sheetId, group[group.length - 1] + 1, group[0]);
27524
+ this.clearInsideBorders(cmd.sheetId, [zone]);
27525
+ this.shiftBordersHorizontally(cmd.sheetId, group[0] + 1, -group.length);
27511
27526
}
27512
27527
else {
27513
- this.shiftBordersVertically(cmd.sheetId, group[group.length - 1] + 1, -group.length);
27528
+ if (group[0] >= this.getters.getNumberRows(cmd.sheetId)) {
27529
+ for (let col = 0; col < this.getters.getNumberCols(cmd.sheetId); col++) {
27530
+ this.history.update("borders", cmd.sheetId, col, group[0] + 1, "horizontal", undefined);
27531
+ }
27532
+ }
27533
+ if (group[group.length - 1] === 0) {
27534
+ for (let col = 0; col < this.getters.getNumberCols(cmd.sheetId); col++) {
27535
+ this.history.update("borders", cmd.sheetId, col, 0, "horizontal", undefined);
27536
+ }
27537
+ }
27538
+ const zone = this.getters.getRowsZone(cmd.sheetId, group[group.length - 1] + 1, group[0]);
27539
+ this.clearInsideBorders(cmd.sheetId, [zone]);
27540
+ this.shiftBordersVertically(cmd.sheetId, group[0] + 1, -group.length);
27514
27541
}
27515
27542
}
27516
27543
break;
@@ -27805,6 +27832,18 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
27805
27832
}
27806
27833
}
27807
27834
}
27835
+ /**
27836
+ * Remove the borders inside of a zone
27837
+ */
27838
+ clearInsideBorders(sheetId, zones) {
27839
+ for (let zone of zones) {
27840
+ for (let row = zone.top; row <= zone.bottom; row++) {
27841
+ for (let col = zone.left; col <= zone.right; col++) {
27842
+ this.history.update("borders", sheetId, col, row, undefined);
27843
+ }
27844
+ }
27845
+ }
27846
+ }
27808
27847
/**
27809
27848
* Add a border to the existing one to a cell
27810
27849
*/
@@ -43483,9 +43522,9 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
43483
43522
Object.defineProperty(exports, '__esModule', { value: true });
43484
43523
43485
43524
43486
- __info__.version = '16.0.56 ';
43487
- __info__.date = '2024-12-19T07:51:49.368Z ';
43488
- __info__.hash = '9d0e335 ';
43525
+ __info__.version = '16.0.57 ';
43526
+ __info__.date = '2025-01-14T11:48:39.776Z ';
43527
+ __info__.hash = '5c7bf6e ';
43489
43528
43490
43529
43491
43530
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
0 commit comments