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";
return getFormulasInfo();
},
asc_recalc : function(){
this.wbModel.recalcWB();
// this.wb.getWorksheet().changeWorksheet("update");
asc_recalc : function(isRecalcWB){
this.wbModel.recalcWB(isRecalcWB);
},
asc_setFontRenderingMode: function (mode) {
......
......@@ -150,6 +150,24 @@ DependencyGraph.prototype = {
}
}
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){
if ( node.isArea ) {
......@@ -1449,24 +1467,21 @@ Workbook.prototype.generateFontMap2=function(){
aRes.push(new CFont(i, 0, "", 0));
return aRes;
};
Workbook.prototype.recalcWB = function(is3D){
Workbook.prototype.recalcWB = function(isRecalcWB){
//todo
var dep1, thas = this, sr, sr1, sr2;
if( this.dependencyFormulas.getNodesLength() > 0){
var aNodes = this.dependencyFormulas.getAll();
if ( this.dependencyFormulas.getNodesLength() > 0 ) {
var aNodes = isRecalcWB ? this.dependencyFormulas.getAll() : this.dependencyFormulas.getNodeBySheetIdAll(this.getWorksheet(this.getActive()).getId());
var nR = this.needRecalc;
for(var i in aNodes)
{
for ( var i in aNodes ) {
var node = aNodes[i];
if(!node.isArea)
{
nR[node.nodeId] = [node.sheetId, node.cellId];
if ( !node.isArea ) {
nR.nodes[node.nodeId] = [node.sheetId, node.cellId];
nR.length++;
}
}
sortDependency(this);
}
sortDependency( this );
}
}
Workbook.prototype.isDefinedNamesExists = function(name, 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