Commit 31266398 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

Читаем закрепленную область по xSplit и ySplit

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@55999 954022d7-b5bf-4e40-9824-e11837661b57
parent 46d0a725
...@@ -6118,11 +6118,15 @@ ...@@ -6118,11 +6118,15 @@
}; };
this.ReadPane = function (type, length, oPane) { this.ReadPane = function (type, length, oPane) {
var res = c_oSerConstants.ReadOk; var res = c_oSerConstants.ReadOk;
if (c_oSer_Pane.State === type) { if (c_oSer_Pane.State === type)
oPane.state = this.stream.GetString2LE(length); oPane.state = this.stream.GetString2LE(length);
} else if (c_oSer_Pane.TopLeftCell === type) { else if (c_oSer_Pane.TopLeftCell === type)
oPane.topLeftCell = this.stream.GetString2LE(length); oPane.topLeftCell = this.stream.GetString2LE(length);
} else else if (c_oSer_Pane.XSplit === type)
oPane.xSplit = this.stream.GetDoubleLE();
else if (c_oSer_Pane.YSplit === type)
oPane.ySplit = this.stream.GetDoubleLE();
else
res = c_oSerConstants.ReadUnknown; res = c_oSerConstants.ReadUnknown;
return res; return res;
}; };
......
...@@ -1031,6 +1031,8 @@ ...@@ -1031,6 +1031,8 @@
this.state = null; this.state = null;
this.topLeftCell = null; this.topLeftCell = null;
this.xSplit = 0;
this.ySplit = 0;
// CellAddress для удобства // CellAddress для удобства
this.topLeftFrozenCell = null; this.topLeftFrozenCell = null;
...@@ -1040,14 +1042,17 @@ ...@@ -1040,14 +1042,17 @@
var res = new asc_CPane(); var res = new asc_CPane();
res.state = this.state; res.state = this.state;
res.topLeftCell = this.topLeftCell; res.topLeftCell = this.topLeftCell;
res.xSplit = this.xSplit;
res.ySplit = this.ySplit;
res.topLeftFrozenCell = this.topLeftFrozenCell ? res.topLeftFrozenCell = this.topLeftFrozenCell ?
new CellAddress(this.topLeftFrozenCell.row, this.topLeftFrozenCell.col) : null; new CellAddress(this.topLeftFrozenCell.row, this.topLeftFrozenCell.col) : null;
return res; return res;
}; };
asc_CPane.prototype.init = function() { asc_CPane.prototype.init = function() {
// ToDo Обрабатываем пока только frozen и frozenSplit // ToDo Обрабатываем пока только frozen и frozenSplit
if (c_oAscPaneState.Frozen === this.state || c_oAscPaneState.FrozenSplit === this.state) { if ((c_oAscPaneState.Frozen === this.state || c_oAscPaneState.FrozenSplit === this.state) &&
this.topLeftFrozenCell = new CellAddress(this.topLeftCell); (0 < this.xSplit || 0 < this.ySplit)) {
this.topLeftFrozenCell = new CellAddress(this.ySplit, this.xSplit, 0);
if (!this.topLeftFrozenCell.isValid()) if (!this.topLeftFrozenCell.isValid())
this.topLeftFrozenCell = null; this.topLeftFrozenCell = 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