Commit 057a2881 authored by Igor.Zotov's avatar Igor.Zotov Committed by Alexander.Trofimov

при работе с а/ф перевожу Ref в Range

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@56558 954022d7-b5bf-4e40-9824-e11837661b57
parent 81aa3d06
......@@ -961,13 +961,7 @@
//get range for copy/paste
if(this.isCopyPaste)
{
var parseRef = aTables[i].Ref.split(":");
if(parseRef[0] && parseRef[1])
{
var startRange = new CellAddress(parseRef[0]);
var endRange = new CellAddress(parseRef[1]);
rangeTable = Asc.Range(startRange.col - 1, startRange.row - 1, endRange.col - 1, endRange.row - 1);
}
var rangeTable = aTables[i].Ref;
}
if(!this.isCopyPaste || (this.isCopyPaste && rangeTable && this.isCopyPaste.containsRange(rangeTable)))
this.bs.WriteItem(c_oSer_TablePart.Table, function(){oThis.WriteTable(aTables[i]);});
......@@ -980,7 +974,7 @@
if(null != table.Ref)
{
this.memory.WriteByte(c_oSer_TablePart.Ref);
this.memory.WriteString2(table.Ref);
this.memory.WriteString2(table.Ref.getName());
}
//HeaderRowCount
if(null != table.HeaderRowCount)
......@@ -1013,8 +1007,8 @@
//Ref
if(null != autofilter.Ref)
{
this.memory.WriteByte(c_oSer_AutoFilter.Ref);
this.memory.WriteString2(autofilter.Ref);
this.memory.WriteByte(c_oSer_AutoFilter.Ref);
this.memory.WriteString2(autofilter.Ref.getName());
}
//FilterColumns
if(null != autofilter.FilterColumns)
......@@ -3555,7 +3549,7 @@
var res = c_oSerConstants.ReadOk;
var oThis = this;
if ( c_oSer_TablePart.Ref == type )
oTable.Ref = this.stream.GetString2LE(length);
oTable.Ref = Asc.g_oRangeCache.getAscRange(this.stream.GetString2LE(length));
else if ( c_oSer_TablePart.HeaderRowCount == type )
oTable.HeaderRowCount = this.stream.GetULongLE();
else if ( c_oSer_TablePart.TotalsRowCount == type )
......@@ -3599,7 +3593,7 @@
var res = c_oSerConstants.ReadOk;
var oThis = this;
if ( c_oSer_AutoFilter.Ref == type )
oAutoFilter.Ref = this.stream.GetString2LE(length);
oAutoFilter.Ref = Asc.g_oRangeCache.getAscRange(this.stream.GetString2LE(length));
else if ( c_oSer_AutoFilter.FilterColumns == type )
{
oAutoFilter.FilterColumns = [];
......
......@@ -4392,7 +4392,7 @@ function TablePart() {
}
TablePart.prototype.clone = function(ws) {
var i, res = new TablePart();
res.Ref = this.Ref;
res.Ref = this.Ref ? this.Ref.clone() : null;
res.HeaderRowCount = this.HeaderRowCount;
res.TotalsRowCount = this.TotalsRowCount;
if (this.AutoFilter)
......@@ -4429,8 +4429,8 @@ function AutoFilter() {
}
AutoFilter.prototype.clone = function() {
var i, res = new AutoFilter();
res.Ref = this.Ref;
res.refTable = this.refTable;
res.Ref = this.Ref ? this.Ref.clone() : null;
res.refTable = this.refTable ? this.refTable.clone() : null;
if (this.FilterColumns) {
res.FilterColumns = [];
for (i = 0; i < this.FilterColumns.length; ++i)
......
This diff is collapsed.
......@@ -8061,7 +8061,7 @@
var diffCol;
for(var aF = 0; aF < aFilters.length; aF++)
{
tablePartRange = t.autoFilters._refToRange(aFilters[aF].Ref);
tablePartRange = aFilters[aF].Ref;
diffRow = tablePartRange.r1 - refInsertBinary.r1;
diffCol = tablePartRange.c1 - refInsertBinary.c1;
range = t.model.getRange3(diffRow + selectionRange.r1, diffCol + selectionRange.c1, diffRow + selectionRange.r1 + (tablePartRange.r2 - tablePartRange.r1), diffCol + selectionRange.c1 + (tablePartRange.c2 - tablePartRange.c1));
......
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