Commit 52af045b authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

Копирование для таблиц с пересчетом имени

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@53267 954022d7-b5bf-4e40-9824-e11837661b57
parent f22d3a6f
......@@ -2356,7 +2356,7 @@ Woorksheet.prototype.clone=function(sNewId, bFromRedo){
oNewWs.nRowsCount = this.nRowsCount;
oNewWs.nColsCount = this.nColsCount;
for (i = 0; i < this.TableParts.length; ++i)
oNewWs.TableParts.push(this.TableParts[i].clone());
oNewWs.TableParts.push(this.TableParts[i].clone(oNewWs));
if(this.AutoFilter)
oNewWs.AutoFilter = this.AutoFilter.clone();
for(i in this.aCols)
......
......@@ -3928,12 +3928,11 @@ function TablePart() {
this.TableColumns = null;
this.TableStyleInfo = null;
}
TablePart.prototype.clone = function() {
TablePart.prototype.clone = function(ws) {
var i, res = new TablePart();
res.Ref = this.Ref;
res.HeaderRowCount = this.HeaderRowCount;
res.TotalsRowCount = this.TotalsRowCount;
res.DisplayName = this.DisplayName;
if (this.AutoFilter)
res.AutoFilter = this.AutoFilter.clone();
if (this.SortState)
......@@ -3945,8 +3944,13 @@ TablePart.prototype.clone = function() {
}
if (this.TableStyleInfo)
res.TableStyleInfo = this.TableStyleInfo.clone();
res.recalc(ws);
return res;
};
TablePart.prototype.recalc = function(ws) {
this.DisplayName = ws.workbook.oNameGenerator.getNextTableName(ws, this.Ref);
};
/** @constructor */
function AutoFilter() {
this.Ref = null;
......
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