Commit 84743a5d authored by Dmitry.Shahtanov's avatar Dmitry.Shahtanov Committed by Alexander.Trofimov

fix:

Bug 30414 - [NamedRanges][Undo]Ошибка в консоли при добавлении листа с диапазоном, область действия которого на одном листе, после отмены удаления листа (http://bugzserver/show_bug.cgi?id=30414)
Bug 30413 - [NamedRanges][CoEdit]Ошибка в консоли при обращении к диапазону одним пользователем и одновременном удалении его другим (http://bugzserver/show_bug.cgi?id=30413)

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@64826 954022d7-b5bf-4e40-9824-e11837661b57
parent 6a927ec6
......@@ -814,7 +814,6 @@ DependencyGraph.prototype = {
return this.nodesId;
},
/*Defined Names section*/
getDefNameNode:function ( node ) {
var ret = this.defNameList[node];
......@@ -890,40 +889,20 @@ DependencyGraph.prototype = {
defNameSheetsList[dfv.nodeId] = dfv;
}
else if( null == oRes.Ref && null != defRef ){
oRes.Ref = defRef;
oRes.isTable = undefined;
oRes.parsedRef = new parserFormula(oRes.Ref, "", oRes.wb.getWorksheet(0));
oRes.parsedRef.parse();
// oRes.sheetId = sheetId;
}
// if ( oRes.isArea ) {
// var nodesSheetArea = this.nodesArea[node.sheetId];
// if ( null == nodesSheetArea ) {
// nodesSheetArea = new RangeDataManager(function(data, from, to){_this._changeNode(data, from, to);});
// this.nodesArea[oRes.sheetId] = nodesSheetArea;
// }
// nodesSheetArea.add( oBBoxNode, node );
// }
// else {
// var nodesSheetCell = this.nodesCell[node.sheetId];
// if ( null == nodesSheetCell ) {
// nodesSheetCell = new CellArea(function(data, from, to){_this._changeNode(data, from, to);});
// this.nodesCell[node.sheetId] = nodesSheetCell;
// }
// nodesSheetCell.add( oBBoxNode.r1, oBBoxNode.c1, node );
// }
/*поставить зависимость между ячейками и текущим ИД*/
if ( bUndo ) {
oRes.Ref = defRef;
}
if( !oRes.isTable ){
if( !oRes.isTable && oRes.Ref != undefined && oRes.Ref != null ){
oRes.parsedRef = new parserFormula(oRes.Ref, "", oRes.wb.getWorksheet(0));
oRes.parsedRef.parse();
oRes.parsedRef.buildDependencies(null,oRes);
......@@ -957,9 +936,9 @@ DependencyGraph.prototype = {
for ( var id in nodesList ) {
if ( nodesList[id].isTable && nodesList[id].Ref ){
var a = nodesList[id].Ref.split("!")[0];
if( a.localeCompare(parserHelp.getEscapeSheetName(wsName)) == 0 )
nodesList[id].Ref = null;
var a = nodesList[id].Ref.split("!")[0];
if( a.localeCompare(parserHelp.getEscapeSheetName(wsName)) == 0 )
nodesList[id].Ref = null;
continue;
}
if ( !nodesList[id].isTable && nodesList[id].parsedRef && nodesList[id].parsedRef.removeSheet( sheetId ) ) {
......@@ -976,25 +955,17 @@ DependencyGraph.prototype = {
new UndoRedoData_DefinedNames( defN.Name, defN.Ref, wsIndex ? wsIndex.getIndex() : undefined, defN.isTable, seUndoRedo ) );
if ( defN.sheetId == sheetId ) {
defN.Ref = null;
defN.parsedRef = null;
retRes[id] = defN;
}
else {
defN.Ref = defN.parsedRef.Formula = defN.parsedRef.assemble( true );
retRes[id] = defN;
}
}
}
return retRes;
},
changeDefName:function ( oldDefName, newDefName ) {
......@@ -1008,10 +979,8 @@ DependencyGraph.prototype = {
sheetNodeList = this.defNameSheets[sheetId || "WB"];
nodeId = getDefNameVertexId( sheetId || "WB", name );
//sheetNodeList[nodeId] = null;
sheetNodeList ? delete sheetNodeList[nodeId] : null;
//this.defNameList[nodeId] = null;
delete this.defNameList[nodeId];
if(!oldN){
......@@ -1049,9 +1018,7 @@ DependencyGraph.prototype = {
for( var id in oldS ){
defNamNode = oldS[id].clone();
defNamNode.changeScope(newSheetId);
defNamNode.changeRefToNewSheet(oldWS.getName(),newWS.getName());
obj[defNamNode.nodeId] = defNamNode;
this.defNameList[defNamNode.nodeId] = defNamNode;
}
......@@ -1762,17 +1729,6 @@ function buildRecalc(_wb,notrec, bForce){
sortDependency(_wb)
}
function rebuildDefNameDependency(wb,dn){
var ws, dni;
// if( lc > 1 && !bForce) return;
for( var id in dn ){
dni = dn[id];
dni[0]
dni[1]
ws = wb.getWorksheetById(id);
}
}
function sortDependency( wb, setCellFormat ) {
if ( wb.isNeedCacheClean ){
buildRecalc(wb, true);
......@@ -2152,6 +2108,9 @@ Workbook.prototype._insertWorksheetFormula=function(index){
{
for( var id in se ){
var slave = se[id];
if(slave.isDefinedName){
continue;
}
var cell = slave.returnCell();
if( cell && cell.formulaParsed && cell.formulaParsed.is3D )
{
......
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