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

Fixed bug 30689 - [NamedRanges][CoEdit]Не появляется предупреждение при...

Fixed bug 30689 - [NamedRanges][CoEdit]Не появляется предупреждение при нажатии Delete в менеджере имен (http://bugzserver/show_bug.cgi?id=30689)
Fixed bug 30683 - [NamedRanges][CoEdit] Не блокируется возможность добавления форматированной таблицы вторым пользователем после добавления диапазона первым (http://bugzserver/show_bug.cgi?id=30683)

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@65584 954022d7-b5bf-4e40-9824-e11837661b57
parent e4b91dd6
......@@ -2060,7 +2060,8 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
};
spreadsheet_api.prototype._onUpdateDefinedNames = function(lockElem) {
if( lockElem.Element["subType"] == c_oAscLockTypeElemSubType.DefinedNames ){
// if( lockElem.Element["subType"] == c_oAscLockTypeElemSubType.DefinedNames ){
if( lockElem.Element["sheetId"] == -1 && lockElem.Element["rangeOrObjectId"] != -1 ){
var dN = this.wbModel.dependencyFormulas.defNameList[lockElem.Element["rangeOrObjectId"]];
if (dN) {
dN.isLock = lockElem["UserId"];
......
......@@ -1989,18 +1989,18 @@
return;
var ws = this.getWorksheet(),
t = this,
selectNameChange = function(){
t._onSelectionNameChanged(ws.getSelectionName(/*bRangeText*/false));
};
t = this;
var editDefinedNamesCallback = function (res) {
if (res) {
t.model.editDefinesNames(oldName, newName);
t.handlers.trigger("asc_onEditDefName", oldName, newName);
t.handlers.trigger("asc_onRefreshDefNameList");
selectNameChange();
}
else{
t.handlers.trigger("asc_onError",c_oAscError.ID.LockCreateDefName,c_oAscError.Level.NoCritical);
}
t._onSelectionNameChanged(ws.getSelectionName(/*bRangeText*/false));
};
var defNameId;
if( oldName ){
......@@ -2008,7 +2008,6 @@
}
ws._isLockedDefNames(editDefinedNamesCallback, defNameId);
ws._isLockedAll();
};
......@@ -2026,8 +2025,11 @@
if (res) {
t.handlers.trigger("asc_onDelDefName", t.model.delDefinesNames(oldName));
t.handlers.trigger("asc_onRefreshDefNameList");
t._onSelectionNameChanged(ws.getSelectionName(/*bRangeText*/false));
}
else{
t.handlers.trigger("asc_onError",c_oAscError.ID.LockCreateDefName,c_oAscError.Level.NoCritical);
}
t._onSelectionNameChanged(ws.getSelectionName(/*bRangeText*/false));
};
var defNameId = t.model.getDefinedName(oldName).nodeId;
......
......@@ -9051,7 +9051,7 @@
return;
}
var sheetId = this.model.getId();
var lockInfo = this.collaborativeEditing.getLockInfo(c_oAscLockTypeElem.Object, c_oAscLockTypeElemSubType.DefinedNames, -1, defNameId);
var lockInfo = this.collaborativeEditing.getLockInfo(c_oAscLockTypeElem.Object, null/*c_oAscLockTypeElemSubType.DefinedNames*/, -1, defNameId);
if (false === this.collaborativeEditing.getCollaborativeEditing()) {
// Пользователь редактирует один: не ждем ответа, а сразу продолжаем редактирование
......@@ -10702,6 +10702,11 @@
if (this.collaborativeEditing.getGlobalLock())
return;
if(!this.handlers.trigger("getLockDefNameManagerStatus")){
this.handlers.trigger("onErrorEvent",c_oAscError.ID.LockCreateDefName,c_oAscError.Level.NoCritical);
return;
}
var t = this;
var ar = t.activeRange.clone(true);
......
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