Commit 33a8d1c6 authored by GoshaZotov's avatar GoshaZotov

fix bug 32954

parent 1232f52a
......@@ -2552,6 +2552,34 @@
History.EndTransaction();
},
checkDeleteAllRowsFormatTable: function(range, emptyRange)
{
var worksheet = this.worksheet;
if(worksheet.TableParts && worksheet.TableParts.length)
{
for(var i = 0; i < worksheet.TableParts.length; i++)
{
var table = worksheet.TableParts[i];
var intersection = range.intersection(table.Ref);
if(intersection.r1 === table.Ref.r1 + 1 && intersection.r2 >= table.Ref.r2)
{
range.r1++;
if(emptyRange)
{
var deleteRange = this.worksheet.getRange3(table.Ref.r1 + 1, range.c1, table.Ref.r1 + 1, range.c2);
deleteRange.cleanText()
}
break;
}
}
}
return range;
},
_clearRange: function(range, isClearText)
{
range.setTableStyle(null);
......
......@@ -10632,6 +10632,7 @@
reinitRanges = true;
History.Create_NewPoint();
History.StartTransaction();
checkRange = t.model.autoFilters.checkDeleteAllRowsFormatTable(checkRange, true);
t.cellCommentator.updateCommentsDependencies(false, val, checkRange);
t.model.autoFilters.isEmptyAutoFilters(arn, c_oAscDeleteOptions.DeleteRows);
t.model.removeRows(checkRange.r1, checkRange.r2);
......@@ -13435,7 +13436,6 @@
}
var deleteCellsAndShiftLeftTop = function (arn, type) {
var range = t.model.getRange3(arn.r1, arn.c1, arn.r2, arn.c2);
var isCheckChangeAutoFilter = t.af_checkInsDelCells(arn, type, "delCell", true);
if (isCheckChangeAutoFilter === false) {
return;
......@@ -13458,9 +13458,13 @@
};
var res;
var range;
if (type === c_oAscInsertOptions.InsertCellsAndShiftRight) {
range = t.model.getRange3(arn.r1, arn.c1, arn.r2, arn.c2);
res = range.deleteCellsShiftLeft(preDeleteAction);
} else {
arn = t.model.autoFilters.checkDeleteAllRowsFormatTable(arn, true);
range = t.model.getRange3(arn.r1, arn.c1, arn.r2, arn.c2);
res = range.deleteCellsShiftUp(preDeleteAction);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment