[PDF] For bug 75161

This commit is contained in:
Julia.Radzhabova
2025-10-20 23:22:16 +03:00
parent 92a652f10c
commit e5bc4acca1
2 changed files with 8 additions and 5 deletions

View File

@ -588,6 +588,7 @@ define([
in_smartart = false,
in_smartart_internal = false,
in_annot = false,
in_text_annot = false,
annot_lock = false,
page_deleted = false,
page_rotate_lock = false,
@ -638,8 +639,10 @@ define([
} else if (type === Asc.c_oAscTypeSelectElement.Annot) {
var annotPr = pr.asc_getAnnotProps();
in_annot = true;
if (annotPr && annotPr.asc_getCanEditText && annotPr.asc_getCanEditText())
if (annotPr && annotPr.asc_getCanEditText && annotPr.asc_getCanEditText()) {
in_text_annot = true;
no_text = false;
}
} else if (type == Asc.c_oAscTypeSelectElement.PdfPage) {
page_deleted = pr.asc_getDeleteLock();
page_rotate_lock = pr.asc_getRotateLock();
@ -685,9 +688,9 @@ define([
toolbar.lockToolbar(Common.enumLock.inCheckForm, in_check_form, {array: toolbar.paragraphControls});
}
let cant_align = no_paragraph && !in_text_form;
let cant_align = no_paragraph && !in_text_form && !in_text_annot;
toolbar.lockToolbar(Common.enumLock.cantAlign, cant_align, {array: [toolbar.btnHorizontalAlign]});
!cant_align && toolbar.btnHorizontalAlign.menu.items[3].setDisabled(in_text_form);
!cant_align && toolbar.btnHorizontalAlign.menu.items[3].setDisabled(in_text_form || in_text_annot);
if (this._state.no_object !== no_object ) {
if (this._state.activated) this._state.no_object = no_object;

View File

@ -466,7 +466,7 @@ define([
cls: 'btn-toolbar',
iconCls: 'toolbar__icon btn-align-left',
icls: 'btn-align-left',
lock: [_set.paragraphLock, _set.lostConnect, _set.cantAlign, _set.disableOnStart, _set.inAnnotation],
lock: [_set.paragraphLock, _set.lostConnect, _set.cantAlign, _set.disableOnStart],
menu: new Common.UI.Menu({
items: [
{
@ -695,7 +695,7 @@ define([
icls: 'btn-ltr',
action: 'text-direction',
dirRtl: false,
lock: [_set.paragraphLock, _set.lostConnect, _set.noTextSelected, _set.inCheckForm, _set.disableOnStart, _set.inAnnotation],
lock: [_set.paragraphLock, _set.lostConnect, _set.noTextSelected, _set.inCheckForm, _set.disableOnStart],
menu: new Common.UI.Menu({
items: [
{caption: this.textDirLtr, value: false, iconCls: 'menu__icon btn-ltr'},