Commit feb835f9 authored by Alexander.Trofimov's avatar Alexander.Trofimov

update code formatting Workbook.js

parent 6ae175a7
...@@ -3057,20 +3057,20 @@ Workbook.prototype.getTableNameColumnByIndex = function(tableName, columnIndex){ ...@@ -3057,20 +3057,20 @@ Workbook.prototype.getTableNameColumnByIndex = function(tableName, columnIndex){
} }
return res; return res;
}; };
Workbook.prototype.updateSparklineCache = function(sheet, ranges) { Workbook.prototype.updateSparklineCache = function (sheet, ranges) {
for (var i = 0; i < this.aWorksheets.length; ++i) { for (var i = 0; i < this.aWorksheets.length; ++i) {
this.aWorksheets[i].updateSparklineCache(sheet, ranges); this.aWorksheets[i].updateSparklineCache(sheet, ranges);
} }
}; };
Workbook.prototype.lockDraw = function() { Workbook.prototype.lockDraw = function () {
++this.lockCounter; ++this.lockCounter;
}; };
Workbook.prototype.unLockDraw = function() { Workbook.prototype.unLockDraw = function () {
if (0 < this.lockCounter) { if (0 < this.lockCounter) {
--this.lockCounter; --this.lockCounter;
} }
}; };
Workbook.prototype.buildRecalc = function(notrec, bForce) { Workbook.prototype.buildRecalc = function (notrec, bForce) {
var ws; var ws;
if (this.lockCounter > 0 && !bForce) { if (this.lockCounter > 0 && !bForce) {
return; return;
...@@ -3100,8 +3100,8 @@ Workbook.prototype.buildRecalc = function(notrec, bForce) { ...@@ -3100,8 +3100,8 @@ Workbook.prototype.buildRecalc = function(notrec, bForce) {
if (!notrec) { if (!notrec) {
this.sortDependency(); this.sortDependency();
} }
}; };
Workbook.prototype.sortDependency = function(setCellFormat) { Workbook.prototype.sortDependency = function (setCellFormat) {
this.buildRecalc(true); this.buildRecalc(true);
var i; var i;
...@@ -3109,9 +3109,10 @@ Workbook.prototype.sortDependency = function(setCellFormat) { ...@@ -3109,9 +3109,10 @@ Workbook.prototype.sortDependency = function(setCellFormat) {
if (nR && (nR.length > 0)) { if (nR && (nR.length > 0)) {
var oCleanCellCacheArea = {}; var oCleanCellCacheArea = {};
var oNodeDependence = this.dependencyFormulas.getNodeDependence(nR.nodes); var oNodeDependence = this.dependencyFormulas.getNodeDependence(nR.nodes);
for (i in oNodeDependence.oMasterNodes) for (i in oNodeDependence.oMasterNodes) {
this._sortDependency(oNodeDependence.oMasterNodes[i], oNodeDependence, oNodeDependence.oMasterAreaNodes, false, this._sortDependency(oNodeDependence.oMasterNodes[i], oNodeDependence, oNodeDependence.oMasterAreaNodes, false,
oCleanCellCacheArea, setCellFormat); oCleanCellCacheArea, setCellFormat);
}
//те AreaNodes //те AreaNodes
var oCurMasterAreaNodes = oNodeDependence.oMasterAreaNodes; var oCurMasterAreaNodes = oNodeDependence.oMasterAreaNodes;
while (true) { while (true) {
...@@ -3133,15 +3134,17 @@ Workbook.prototype.sortDependency = function(setCellFormat) { ...@@ -3133,15 +3134,17 @@ Workbook.prototype.sortDependency = function(setCellFormat) {
break; break;
} }
} }
for (i in oCleanCellCacheArea) for (i in oCleanCellCacheArea) {
this.handlers.trigger("cleanCellCache", i, oCleanCellCacheArea[i], AscCommonExcel.c_oAscCanChangeColWidth.none); this.handlers.trigger("cleanCellCache", i, oCleanCellCacheArea[i], AscCommonExcel.c_oAscCanChangeColWidth.none);
}
AscCommonExcel.g_oVLOOKUPCache.clean(); AscCommonExcel.g_oVLOOKUPCache.clean();
AscCommonExcel.g_oHLOOKUPCache.clean(); AscCommonExcel.g_oHLOOKUPCache.clean();
} }
this.needRecalc = {nodes: {}, length: 0}; this.needRecalc = {nodes: {}, length: 0};
}; };
Workbook.prototype._sortDependency = function(node, oNodeDependence, oNewMasterAreaNodes, bBad, oCleanCellCacheArea, setCellFormat) { Workbook.prototype._sortDependency =
function (node, oNodeDependence, oNewMasterAreaNodes, bBad, oCleanCellCacheArea, setCellFormat) {
if (node) { if (node) {
var oWeightMapElem = oNodeDependence.oWeightMap[node.nodeId]; var oWeightMapElem = oNodeDependence.oWeightMap[node.nodeId];
if (oWeightMapElem) { if (oWeightMapElem) {
...@@ -3187,14 +3190,15 @@ Workbook.prototype._sortDependency = function(node, oNodeDependence, oNewMasterA ...@@ -3187,14 +3190,15 @@ Workbook.prototype._sortDependency = function(node, oNodeDependence, oNewMasterA
oWeightMapElem.gray = true; oWeightMapElem.gray = true;
var oSlaveNodes = node.getSlaveEdges(); var oSlaveNodes = node.getSlaveEdges();
if (oSlaveNodes) { if (oSlaveNodes) {
for (var i in oSlaveNodes) for (var i in oSlaveNodes) {
this._sortDependency(oSlaveNodes[i], oNodeDependence, oNewMasterAreaNodes, bBad, oCleanCellCacheArea); this._sortDependency(oSlaveNodes[i], oNodeDependence, oNewMasterAreaNodes, bBad, oCleanCellCacheArea);
} }
}
oWeightMapElem.gray = false; oWeightMapElem.gray = false;
} }
} }
} }
}; };
//------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------
/** /**
* @constructor * @constructor
......
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