Commit 2c94cbbb authored by Sergey Luzyanin's avatar Sergey Luzyanin

Merge branch 'develop' of https://github.com/ONLYOFFICE/sdkjs into develop

parents 69e415be 42ce0c39
...@@ -1167,24 +1167,22 @@ DependencyGraph.prototype = { ...@@ -1167,24 +1167,22 @@ DependencyGraph.prototype = {
getNextTableName:function ( ws, Ref, tableName ) { getNextTableName:function ( ws, Ref, tableName ) {
this.nTableNameMaxIndex++; this.nTableNameMaxIndex++;
var sNewName = this.sTableNamePattern + this.nTableNameMaxIndex,
name = getDefNameVertexId( null, sNewName );
while ( this.defNameList[name] ) {
this.nTableNameMaxIndex++;
sNewName = this.sTableNamePattern + this.nTableNameMaxIndex;
name = getDefNameVertexId( null, sNewName );
}
if(tableName) if(tableName){
{
sNewName = tableName; sNewName = tableName;
} }
else if(ws.workbook.oApi.collaborativeEditing.getCollaborativeEditing()) else{
{ var collaborativeIndexUser = "";
var indexUser = ws.workbook.oApi.CoAuthoringApi.get_indexUser(); if(ws.workbook.oApi.collaborativeEditing.getCollaborativeEditing())
if(null !== indexUser)
{ {
sNewName += "_" + indexUser; collaborativeIndexUser = "_" + ws.workbook.oApi.CoAuthoringApi.get_indexUser();
}
var sNewName = this.sTableNamePattern + this.nTableNameMaxIndex + collaborativeIndexUser,
name = getDefNameVertexId( null, sNewName );
while ( this.defNameList[name] ) {
this.nTableNameMaxIndex++;
sNewName = this.sTableNamePattern + this.nTableNameMaxIndex + collaborativeIndexUser;
name = getDefNameVertexId( null, sNewName );
} }
} }
......
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