[DE] Fix Bug 43918

This commit is contained in:
Julia Radzhabova 2019-12-20 16:23:44 +03:00
parent e7cec07aad
commit 3bc5600976
3 changed files with 21 additions and 8 deletions

View file

@ -140,10 +140,14 @@ define([
item.setDisabled(notflow);
});
disable.align = islocked || wrapping == Asc.c_oAscWrapStyle2.Inline;
disable.group = islocked || wrapping == Asc.c_oAscWrapStyle2.Inline;
disable.arrange = wrapping == Asc.c_oAscWrapStyle2.Inline;
disable.wrapping = islocked || props.get_FromGroup() || (notflow && !me.api.CanChangeWrapPolygon());
var control_props = me.api.asc_IsContentControl() ? this.api.asc_GetContentControlProperties() : null,
lock_type = (control_props) ? control_props.get_Lock() : Asc.c_oAscSdtLockType.Unlocked,
content_locked = lock_type==Asc.c_oAscSdtLockType.SdtContentLocked || lock_type==Asc.c_oAscSdtLockType.ContentLocked;
disable.align = islocked || wrapping == Asc.c_oAscWrapStyle2.Inline || content_locked;
disable.group = islocked || wrapping == Asc.c_oAscWrapStyle2.Inline || content_locked;
disable.arrange = wrapping == Asc.c_oAscWrapStyle2.Inline || content_locked;
disable.wrapping = islocked || props.get_FromGroup() || (notflow && !me.api.CanChangeWrapPolygon()) || content_locked;
if ( !disable.group ) {
if (me.api.CanGroup() || me.api.CanUnGroup()) {

View file

@ -126,6 +126,7 @@ define([
var isChart = false;
for (i=0; i<SelectedObjects.length; i++)
{
var content_locked = false;
var eltype = SelectedObjects[i].get_ObjectType(),
settingsType = this.getDocumentSettingsType(eltype);
if (eltype === Asc.c_oAscTypeSelectElement.Math)
@ -136,6 +137,10 @@ define([
var value = SelectedObjects[i].get_ObjectValue();
if (settingsType == Common.Utils.documentSettingsType.Image) {
var control_props = this.api.asc_IsContentControl() ? this.api.asc_GetContentControlProperties() : null,
lock_type = (control_props) ? control_props.get_Lock() : Asc.c_oAscSdtLockType.Unlocked;
content_locked = lock_type==Asc.c_oAscSdtLockType.SdtContentLocked || lock_type==Asc.c_oAscSdtLockType.ContentLocked;
if (value.get_ChartProperties() !== null) {
isChart = true;
settingsType = Common.Utils.documentSettingsType.Chart;
@ -145,7 +150,7 @@ define([
if (value.get_ShapeProperties().asc_getTextArtProperties()) {
this._settings[Common.Utils.documentSettingsType.TextArt].props = value;
this._settings[Common.Utils.documentSettingsType.TextArt].hidden = 0;
this._settings[Common.Utils.documentSettingsType.TextArt].locked = value.get_Locked();
this._settings[Common.Utils.documentSettingsType.TextArt].locked = value.get_Locked() || content_locked;
}
}
} else if (settingsType == Common.Utils.documentSettingsType.Paragraph) {
@ -154,7 +159,7 @@ define([
}
this._settings[settingsType].props = value;
this._settings[settingsType].hidden = 0;
this._settings[settingsType].locked = value.get_Locked();
this._settings[settingsType].locked = value.get_Locked() || content_locked;
if (!this._settings[Common.Utils.documentSettingsType.MailMerge].locked) // lock MailMerge-InsertField, если хотя бы один объект locked
this._settings[Common.Utils.documentSettingsType.MailMerge].locked = value.get_Locked();
if (!this._settings[Common.Utils.documentSettingsType.Signature].locked) // lock Signature, если хотя бы один объект locked

View file

@ -2541,7 +2541,11 @@ define([
me.menuOriginalSize.setVisible(value.imgProps.isOnlyImg || !value.imgProps.isChart && !value.imgProps.isShape);
var islocked = value.imgProps.locked || (value.headerProps!==undefined && value.headerProps.locked);
var control_props = me.api.asc_IsContentControl() ? me.api.asc_GetContentControlProperties() : null,
lock_type = (control_props) ? control_props.get_Lock() : Asc.c_oAscSdtLockType.Unlocked,
content_locked = lock_type==Asc.c_oAscSdtLockType.SdtContentLocked || lock_type==Asc.c_oAscSdtLockType.ContentLocked;
var islocked = value.imgProps.locked || (value.headerProps!==undefined && value.headerProps.locked) || content_locked;
var pluginGuid = value.imgProps.value.asc_getPluginGuid();
menuImgReplace.setVisible(value.imgProps.isOnlyImg && (pluginGuid===null || pluginGuid===undefined));
if (menuImgReplace.isVisible())
@ -2569,7 +2573,7 @@ define([
menuImageAlign.menu.items[7].setDisabled(objcount==2 && (!alignto || alignto==3));
menuImageAlign.menu.items[8].setDisabled(objcount==2 && (!alignto || alignto==3));
}
menuImageArrange.setDisabled( wrapping == Asc.c_oAscWrapStyle2.Inline );
menuImageArrange.setDisabled( wrapping == Asc.c_oAscWrapStyle2.Inline || content_locked);
if (me.api) {
mnuUnGroup.setDisabled(islocked || !me.api.CanUnGroup());