diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index f0a44ac1b..5f0954591 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -193,7 +193,9 @@ define([ cf_locked: [], selectedCells: 0, wsLock: false, - wsProps: [] + wsProps: [], + is_lockText: false, + is_lockShape: false }; this.binding = {}; @@ -2544,7 +2546,8 @@ define([ // lock formatting controls in cell with FormatCells protection or in shape and Objects protection need_disable = (selectionType === Asc.c_oAscSelectionType.RangeImage || selectionType === Asc.c_oAscSelectionType.RangeChart || selectionType === Asc.c_oAscSelectionType.RangeChartText || selectionType === Asc.c_oAscSelectionType.RangeShape || selectionType === Asc.c_oAscSelectionType.RangeShapeText || selectionType === Asc.c_oAscSelectionType.RangeSlicer); - toolbar.lockToolbar(SSE.enumLock.wsLockFormat, need_disable && !!this._state.wsProps['Objects'] || !need_disable && !!this._state.wsProps['FormatCells']); + toolbar.lockToolbar(SSE.enumLock.wsLockFormat, need_disable && !!this._state.wsProps['Objects'] && !!this._state.is_lockText || !need_disable && !!this._state.wsProps['FormatCells']); + toolbar.lockToolbar(SSE.enumLock.wsLockFormatFill, need_disable && !!this._state.wsProps['Objects'] && !!this._state.is_lockShape || !need_disable && !!this._state.wsProps['FormatCells']); toolbar.lockToolbar(SSE.enumLock['Objects'], !!this._state.wsProps['Objects']); toolbar.lockToolbar(SSE.enumLock['FormatCells'], !!this._state.wsProps['FormatCells']); @@ -3466,7 +3469,9 @@ define([ is_image = seltype == Asc.c_oAscSelectionType.RangeImage, is_slicer = seltype == Asc.c_oAscSelectionType.RangeSlicer, is_mode_2 = is_shape_text || is_shape || is_chart_text || is_chart || is_slicer, - is_objLocked = false; + is_objLocked = false, + is_lockShape = false, + is_lockText = false; if (!(is_mode_2 || is_image) && this._state.selection_type===seltype && this._state.coauthdisable===coauth_disable) return (seltype===Asc.c_oAscSelectionType.RangeImage); @@ -3474,9 +3479,14 @@ define([ var SelectedObjects = this.api.asc_getGraphicObjectProps(); for (var i=0; i