Commit 4c6efb1d authored by GoshaZotov's avatar GoshaZotov

fix for #32505

[Copy&Paste] Cannot read property 'I' of null при применении Select Data после копирования исходной таблицы, если открыто окно Resize table
parent 5d84250e
......@@ -4720,29 +4720,33 @@ TablePart.prototype.changeRefOnRange = function(range, autoFilters, generateNewT
{
var newTableColumns = [];
var intersectionRanges = this.Ref.intersection(range);
for(var i = range.c1; i <= range.c2; i++)
if(null !== intersectionRanges)
{
var tableColumn;
if(i >= intersectionRanges.c1 && i <= intersectionRanges.c2)
for(var i = range.c1; i <= range.c2; i++)
{
var tableIndex = i - this.Ref.c1;
tableColumn = this.TableColumns[tableIndex];
var tableColumn;
if(i >= intersectionRanges.c1 && i <= intersectionRanges.c2)
{
var tableIndex = i - this.Ref.c1;
tableColumn = this.TableColumns[tableIndex];
}
else
{
tableColumn = new TableColumn();
}
newTableColumns.push(tableColumn);
}
else
for(var j = 0; j < newTableColumns.length; j++)
{
tableColumn = new TableColumn();
if(newTableColumns[j].Name === null)
newTableColumns[j].Name = autoFilters._generateColumnName2(newTableColumns);
}
newTableColumns.push(tableColumn);
}
for(var j = 0; j < newTableColumns.length; j++)
{
if(newTableColumns[j].Name === null)
newTableColumns[j].Name = autoFilters._generateColumnName2(newTableColumns);
this.TableColumns = newTableColumns;
}
this.TableColumns = newTableColumns;
}
this.Ref = Asc.Range(range.c1, range.r1, range.c2, range.r2);
......
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