Commit d35367d9 authored by GoshaZotov's avatar GoshaZotov

removed duplicate code

parent 1c6663ac
...@@ -5009,32 +5009,6 @@ TablePart.prototype.getRangeWithoutHeaderFooter = function() ...@@ -5009,32 +5009,6 @@ TablePart.prototype.getRangeWithoutHeaderFooter = function()
return Asc.Range(this.Ref.c1, startRow, this.Ref.c2, endRow); return Asc.Range(this.Ref.c1, startRow, this.Ref.c2, endRow);
}; };
TablePart.prototype.getRangeTableColumnByName = function(columnName, bWithoutHeaderTotal)
{
var res = null;
for(var i = 0; i < this.TableColumns.length; i++)
{
if(columnName === this.TableColumns[i].Name)
{
var startRow = this.Ref.r1;
var endRow = this.Ref.r2;
var col = this.Ref.c1 + i;
if(bWithoutHeaderTotal)
{
startRow = this.HeaderRowCount === null ? this.Ref.r1 + 1 : this.Ref.r1;
endRow = this.TotalsRowCount ? this.Ref.r2 - 1 : this.Ref.r2;
}
res = Asc.Range(col, startRow, col, endRow);
break;
}
}
return res;
};
/** @constructor */ /** @constructor */
function AutoFilter() { function AutoFilter() {
this.Ref = null; this.Ref = null;
......
...@@ -4234,7 +4234,7 @@ ...@@ -4234,7 +4234,7 @@
var arrFormat = []; var arrFormat = [];
var res = null; var res = null;
var tableRange = table.getRangeTableColumnByName(columnName, true); var tableRange = table.getTableRangeForFormula({param: AscCommon.FormulaTablePartInfo.columns, startCol: columnName, endCol: columnName});
if(null !== tableRange) if(null !== tableRange)
{ {
for(var i = tableRange.r1; i <= tableRange.r2; i++) for(var i = tableRange.r1; i <= tableRange.r2; i++)
......
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