Commit 56992df3 authored by Dmitry.Shahtanov's avatar Dmitry.Shahtanov Committed by Alexander.Trofimov

пересчет по кнопке.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@53725 954022d7-b5bf-4e40-9824-e11837661b57
parent ef2da5bd
...@@ -2888,9 +2888,8 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -2888,9 +2888,8 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
return getFormulasInfo(); return getFormulasInfo();
}, },
asc_recalc : function(){ asc_recalc : function(isRecalcWB){
this.wbModel.recalcWB(); this.wbModel.recalcWB(isRecalcWB);
// this.wb.getWorksheet().changeWorksheet("update");
}, },
asc_setFontRenderingMode: function (mode) { asc_setFontRenderingMode: function (mode) {
......
...@@ -150,6 +150,24 @@ DependencyGraph.prototype = { ...@@ -150,6 +150,24 @@ DependencyGraph.prototype = {
} }
} }
return arr; return arr;
},
getNodeBySheetIdAll:function ( sheetId ) {
var arr = [];
var nodesSheetCell = this.nodesCell[sheetId];
if ( nodesSheetCell ) {
var aNodes = nodesSheetCell.getAll();
for ( var i = 0, length = aNodes.length; i < length; i++ ) {
arr.push( aNodes[i].data );
}
}
var nodesSheetArea = this.nodesArea[sheetId];
if ( nodesSheetArea ) {
var aNodes = nodesSheetArea.getAll();
for ( var i = 0, length = aNodes.length; i < length; i++ ) {
arr.push( aNodes[i].data );
}
}
return arr;
}, },
deleteNode : function(node){ deleteNode : function(node){
if ( node.isArea ) { if ( node.isArea ) {
...@@ -1449,24 +1467,21 @@ Workbook.prototype.generateFontMap2=function(){ ...@@ -1449,24 +1467,21 @@ Workbook.prototype.generateFontMap2=function(){
aRes.push(new CFont(i, 0, "", 0)); aRes.push(new CFont(i, 0, "", 0));
return aRes; return aRes;
}; };
Workbook.prototype.recalcWB = function(is3D){ Workbook.prototype.recalcWB = function(isRecalcWB){
//todo //todo
var dep1, thas = this, sr, sr1, sr2; if ( this.dependencyFormulas.getNodesLength() > 0 ) {
if( this.dependencyFormulas.getNodesLength() > 0){ var aNodes = isRecalcWB ? this.dependencyFormulas.getAll() : this.dependencyFormulas.getNodeBySheetIdAll(this.getWorksheet(this.getActive()).getId());
var aNodes = this.dependencyFormulas.getAll();
var nR = this.needRecalc; var nR = this.needRecalc;
for(var i in aNodes) for ( var i in aNodes ) {
{
var node = aNodes[i]; var node = aNodes[i];
if(!node.isArea) if ( !node.isArea ) {
{ nR.nodes[node.nodeId] = [node.sheetId, node.cellId];
nR[node.nodeId] = [node.sheetId, node.cellId];
nR.length++; nR.length++;
} }
} }
sortDependency(this); sortDependency( this );
}
} }
}
Workbook.prototype.isDefinedNamesExists = function(name, sheetId){ Workbook.prototype.isDefinedNamesExists = function(name, sheetId){
if(null != sheetId) if(null != sheetId)
{ {
......
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