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

для бага 30394

fix: Bug 30469 - [NamedRanges][Undo]Ошибка в консоли при переименовании листа с форматированной таблицей после отмены его удаления (http://bugzserver/show_bug.cgi?id=30469)

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@64948 954022d7-b5bf-4e40-9824-e11837661b57
parent f68fe67b
......@@ -2895,6 +2895,15 @@ UndoRedoWorkbook.prototype = {
newName= Data.oldName;
}
else{
if(this.wb.bCollaborativeChanges){
var name = Data.newName.Name, lsID = this.wb.getWorksheet(Data.newName.LocalSheetId);
lsID === null || lsID === undefined ? null : lsID = this.wb.getWorksheet(Data.newName.LocalSheetId).getId();
if( this.wb.isDefinedNamesExists(name,lsID) ){
var oConflictDefName = this.wb.getDefinesNames(name,lsID);
if(null != oConflictDefName)
oConflictDefName.renameDefNameToCollaborate(this.wb.getUniqueDefinedNameFrom(oConflictDefName, true));
}
}
oldName = Data.oldName;
newName = Data.newName;
}
......
......@@ -929,15 +929,18 @@ DependencyGraph.prototype = {
var nodesList = this.defNameList, retRes = {}, defN, seUndoRedo = [], nSE, wsIndex, ws = this.wb.getWorksheetById(sheetId ), wsName = ws.getName();
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;
defN = nodesList[id];
if ( defN.isTable && defN.Ref ){
var a = defN.Ref.split("!")[0];
if( a.localeCompare(parserHelp.getEscapeSheetName(wsName)) == 0 ){
History.Add( g_oUndoRedoWorkbook, historyitem_Workbook_DefinedNamesDelete, null, null, new UndoRedoData_DefinedNames( defN.Name, defN.Ref, undefined, defN.isTable ) );
defN.Ref = null;
}
continue;
}
if ( !nodesList[id].isTable && nodesList[id].parsedRef && nodesList[id].parsedRef.removeSheet( sheetId ) ) {
if ( !defN.isTable && defN.parsedRef && defN.parsedRef.removeSheet( sheetId ) ) {
seUndoRedo = [];
defN = nodesList[id];
nSE = defN.getSlaveEdges();
for ( var nseID in nSE ) {
seUndoRedo.push( nseID );
......@@ -2273,10 +2276,7 @@ Workbook.prototype.removeWorksheet=function(nIndex, outputParams){
}() : null;
}
// History.Add( g_oUndoRedoWorkbook, historyitem_Workbook_DefinedNamesDelete, null, null, new UndoRedoData_DefinedNames( nodesList[id].Name, nodesList[id].Ref, nodesList[id].Scope, seUndoRedo ) );
}
// History.Add( g_oUndoRedoWorkbook, historyitem_Workbook_DefinedNamesDelete, null, null, new UndoRedoData_DefinedNames( defName.Name, defName.Ref, defName.Scope, null/*seUndoRedo*/ ) );
// sortDependency( this );
}
var wsActive = this.getActiveWs();
......
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