Commit 34ab7685 authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander.Trofimov

ошибки при автозаполении, если последние столбцы были полностью пустыми.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@56283 954022d7-b5bf-4e40-9824-e11837661b57
parent eba963a0
...@@ -7627,15 +7627,21 @@ function PromoteHelper(bVerical, bReverse, bbox){ ...@@ -7627,15 +7627,21 @@ function PromoteHelper(bVerical, bReverse, bbox){
this.bReverse = bReverse; this.bReverse = bReverse;
this.bbox = bbox; this.bbox = bbox;
this.oDataRow = {}; this.oDataRow = {};
this.nDataRowMaxIndex = -1;
//для get //для get
this.oCurRow = null; this.oCurRow = null;
this.nCurColIndex = null; this.nCurColIndex = null;
this.nRowLength = 0;
this.nColLength = 0; this.nColLength = 0;
if(this.bVerical) if(this.bVerical)
{
this.nRowLength = this.bbox.c2 - this.bbox.c1 + 1;
this.nColLength = this.bbox.r2 - this.bbox.r1 + 1; this.nColLength = this.bbox.r2 - this.bbox.r1 + 1;
}
else else
{
this.nRowLength = this.bbox.r2 - this.bbox.r1 + 1;
this.nColLength = this.bbox.c2 - this.bbox.c1 + 1; this.nColLength = this.bbox.c2 - this.bbox.c1 + 1;
}
} }
PromoteHelper.prototype = { PromoteHelper.prototype = {
add: function(nRow, nCol, nVal, bDelimiter, sPrefix, bDate, oAdditional){ add: function(nRow, nCol, nVal, bDelimiter, sPrefix, bDate, oAdditional){
...@@ -7653,8 +7659,6 @@ PromoteHelper.prototype = { ...@@ -7653,8 +7659,6 @@ PromoteHelper.prototype = {
{ {
row = {}; row = {};
this.oDataRow[nRow] = row; this.oDataRow[nRow] = row;
if(this.nDataRowMaxIndex < nRow)
this.nDataRowMaxIndex = nRow;
} }
row[nCol] = {nCol: nCol, nVal: nVal, bDelimiter: bDelimiter, sPrefix: sPrefix, bDate: bDate, oAdditional: oAdditional, oSequence: null, nCurValue: null}; row[nCol] = {nCol: nCol, nVal: nVal, bDelimiter: bDelimiter, sPrefix: sPrefix, bDate: bDate, oAdditional: oAdditional, oSequence: null, nCurValue: null};
}, },
...@@ -7948,8 +7952,8 @@ PromoteHelper.prototype = { ...@@ -7948,8 +7952,8 @@ PromoteHelper.prototype = {
} }
}, },
setIndex: function(index){ setIndex: function(index){
if(-1 != this.nDataRowMaxIndex && this.nDataRowMaxIndex < index) if(0 != this.nRowLength && index >= this.nRowLength)
index = index % (this.nDataRowMaxIndex + 1); index = index % (this.nRowLength);
this.oCurRow = this.oDataRow[index]; this.oCurRow = this.oDataRow[index];
this.nCurColIndex = 0; this.nCurColIndex = 0;
}, },
......
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