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

В cRef, cArea, cRef3D, cArea3D перестало инициализироваться поле node.в...

В cRef, cArea, cRef3D, cArea3D перестало инициализироваться поле node.в методах setRefError, shiftCells, stretchArea перешел на _cells.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57762 954022d7-b5bf-4e40-9824-e11837661b57
parent 3f309390
...@@ -3630,14 +3630,14 @@ parserFormula.prototype = { ...@@ -3630,14 +3630,14 @@ parserFormula.prototype = {
}, },
setRefError: function (node) { setRefError: function (node) {
//когда выставляется setRefError node не сдвигаются, поэтому node.cellId совпадает с elem._cells
for (var i = 0; i < this.outStack.length; i++) { for (var i = 0; i < this.outStack.length; i++) {
var elem = this.outStack[i]; var elem = this.outStack[i];
if (elem instanceof cRef || elem instanceof cArea || elem instanceof cRef3D) { if (elem instanceof cRef || elem instanceof cArea || elem instanceof cRef3D) {
if (node.sheetId == elem.ws.getId() && node.cellId == elem.node.cellId) if (node.sheetId == elem.ws.getId() && node.cellId == elem._cells)
this.outStack[i] = new cError(cErrorType.bad_reference); this.outStack[i] = new cError(cErrorType.bad_reference);
} }
else if (elem instanceof cArea3D) { else if (elem instanceof cArea3D) {
//когда выставляется setRefError node не сдвигаются, поэтому node.cellId совпадает с elem._cells
if (elem.wsFrom == elem.wsTo && node.sheetId == elem.wsFrom && node.cellId == elem._cells) if (elem.wsFrom == elem.wsTo && node.sheetId == elem.wsFrom && node.cellId == elem._cells)
this.outStack[i] = new cError(cErrorType.bad_reference); this.outStack[i] = new cError(cErrorType.bad_reference);
} }
...@@ -3649,22 +3649,22 @@ parserFormula.prototype = { ...@@ -3649,22 +3649,22 @@ parserFormula.prototype = {
cellId - какую ячейку сдвигаем cellId - какую ячейку сдвигаем
*/ */
shiftCells: function (node, from, to) { shiftCells: function (node, from, to) {
//node.cellId содержит уже сдвинутое значение
var sFromName = from.getName(); var sFromName = from.getName();
for (var i = 0; i < this.outStack.length; i++) { for (var i = 0; i < this.outStack.length; i++) {
var elem = this.outStack[i]; var elem = this.outStack[i];
if (elem instanceof cRef || elem instanceof cArea) { if (elem instanceof cRef || elem instanceof cArea) {
if (node.sheetId == elem.ws.getId() && node.cellId == elem.node.cellId) { if (node.sheetId == elem.ws.getId() && sFromName == elem._cells) {
elem.value = elem._cells = node.cellId; elem.value = elem._cells = node.cellId;
elem.range = node.getBBox().clone(); elem.range = node.getBBox().clone();
} }
} }
else if (elem instanceof cRef3D) { else if (elem instanceof cRef3D) {
if (node.sheetId == elem.ws.getId() && node.cellId == elem.node.cellId) { if (node.sheetId == elem.ws.getId() && sFromName == elem._cells) {
elem.value = elem._cells = node.cellId; elem.value = elem._cells = node.cellId;
} }
} }
else if (elem instanceof cArea3D) { else if (elem instanceof cArea3D) {
//node.cellId содержит уже сдвинутое значение
if (elem.wsFrom == elem.wsTo && node.sheetId == elem.wsFrom && sFromName == elem._cells) { if (elem.wsFrom == elem.wsTo && node.sheetId == elem.wsFrom && sFromName == elem._cells) {
elem.value = elem._cells = node.cellId; elem.value = elem._cells = node.cellId;
} }
...@@ -3673,11 +3673,12 @@ parserFormula.prototype = { ...@@ -3673,11 +3673,12 @@ parserFormula.prototype = {
}, },
stretchArea: function (node, from, to) { stretchArea: function (node, from, to) {
//node.cellId содержит уже сдвинутое значение
var sFromName = from.getName(); var sFromName = from.getName();
for (var i = 0; i < this.outStack.length; i++) { for (var i = 0; i < this.outStack.length; i++) {
var elem = this.outStack[i]; var elem = this.outStack[i];
if (elem instanceof cArea) { if (elem instanceof cArea) {
if (node.sheetId == elem.ws.getId() && node.cellId == elem.node.cellId) { if (node.sheetId == elem.ws.getId() && sFromName == elem._cells) {
elem.value = elem._cells = node.cellId; elem.value = elem._cells = node.cellId;
elem.range = node.getBBox().clone(); elem.range = node.getBBox().clone();
} }
......
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