Skip to content

Commit

Permalink
[se] Fix bug 68869 (#4679)
Browse files Browse the repository at this point in the history
* [se] Fix bug 68869
  • Loading branch information
GoshaZotov committed Jun 26, 2024
1 parent d7b777a commit e4fe04f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 22 deletions.
6 changes: 4 additions & 2 deletions cell/model/WorkbookElems.js
Original file line number Diff line number Diff line change
Expand Up @@ -9031,12 +9031,14 @@ function RangeDataManagerElem(bbox, data)
if (handleSelectionRange.c1 === this.Ref.c1 && handleSelectionRange.c2 === this.Ref.c2) {
//all row
//Table1[@]
return this.DisplayName + "[" + AscCommon.cStrucTableReservedWords.at + "]";

//return this.DisplayName + "[" + AscCommon.cStrucTableReservedWords.at + "]";
} else {
//part of row
//Table1[@[Column2]:[Column3]]
//Table1[@Column1]
return this.DisplayName + "[" + AscCommon.cStrucTableReservedWords.at + getColumnNameRange(startCol, endCol) + "]";

//return this.DisplayName + "[" + AscCommon.cStrucTableReservedWords.at + getColumnNameRange(startCol, endCol) + "]";
}
}
}
Expand Down
41 changes: 21 additions & 20 deletions tests/cell/spreadsheet-calculation/SheetStructureTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -2610,28 +2610,29 @@ $(function () {

assert.strictEqual(sTableData, tableName + "[[#Headers],[#Data],[Column1]:[Column2]]", "check headers + data + column1:column2 selection table");

//todo temporary commented. need prepare formula parser by @ columns
//@
//Table5[@]
activeCell = new AscCommon.CellBase(101, 4);
handleSelectionRange = new Asc.Range(0, 101, 2, 101);
sTableData = table.getSelectionString(activeCell, handleSelectionRange);

assert.strictEqual(sTableData, tableName + "[@]", "check intersection all row");

//Table5[@[Column1]:[Column2]]
activeCell = new AscCommon.CellBase(101, 4);
handleSelectionRange = new Asc.Range(0, 101, 1, 101);
sTableData = table.getSelectionString(activeCell, handleSelectionRange);

assert.strictEqual(sTableData, tableName + "[@[Column1]:[Column2]]", "check intersection column1:column2 row");


//Table5[@Column1]
activeCell = new AscCommon.CellBase(101, 4);
handleSelectionRange = new Asc.Range(0, 101, 0, 101);
sTableData = table.getSelectionString(activeCell, handleSelectionRange);

assert.strictEqual(sTableData, tableName + "[@Column1]", "check intersection column1 row");
// activeCell = new AscCommon.CellBase(101, 4);
// handleSelectionRange = new Asc.Range(0, 101, 2, 101);
// sTableData = table.getSelectionString(activeCell, handleSelectionRange);
//
// assert.strictEqual(sTableData, tableName + "[@]", "check intersection all row");
//
// //Table5[@[Column1]:[Column2]]
// activeCell = new AscCommon.CellBase(101, 4);
// handleSelectionRange = new Asc.Range(0, 101, 1, 101);
// sTableData = table.getSelectionString(activeCell, handleSelectionRange);
//
// assert.strictEqual(sTableData, tableName + "[@[Column1]:[Column2]]", "check intersection column1:column2 row");
//
//
// //Table5[@Column1]
// activeCell = new AscCommon.CellBase(101, 4);
// handleSelectionRange = new Asc.Range(0, 101, 0, 101);
// sTableData = table.getSelectionString(activeCell, handleSelectionRange);
//
// assert.strictEqual(sTableData, tableName + "[@Column1]", "check intersection column1 row");

//Table5[#Headers]
activeCell = new AscCommon.CellBase(99, 4);
Expand Down

0 comments on commit e4fe04f

Please sign in to comment.