Merge pull request 'fix/bug-55709' (#865) from fix/bug-55709 into develop

This commit is contained in:
Julia Radzhabova
2025-12-05 12:32:49 +00:00
12 changed files with 393 additions and 134 deletions

View File

@ -2365,6 +2365,13 @@ define([], function () {
dh.tableCellsVAlign = function(menu, item, e) {
if (this.api) {
if (item.options.halign != null) {
var type = item.options.halign;
this.api.put_PrAlign(type);
return;
}
var properties = new Asc.CTableProp();
properties.put_CellsVAlign(item.options.valign);
this.api.tblApply(properties);
@ -2679,6 +2686,13 @@ define([], function () {
dh.paragraphVAlign = function(menu, item, e) {
var me = this;
if (me.api) {
if (item.options.halign != null) {
var type = item.options.halign;
me.api.put_PrAlign(type);
return;
}
var properties = new Asc.asc_CImgProperty();
properties.put_VerticalTextAlign(item.options.valign);
me.api.ImgApply(properties);

View File

@ -1069,15 +1069,14 @@ define([], function () {
});
me.menuTableCellAlign = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-top',
caption : me.cellAlignText,
caption : me.AlignText,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items : [
me.menuTableCellTop = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-top',
caption : me.textShapeAlignTop,
caption : me.AlignTop,
toggleGroup : 'popuptablecellalign',
checkmark : false,
checkable : true,
@ -1086,7 +1085,7 @@ define([], function () {
}),
me.menuTableCellCenter = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-middle',
caption : me.textShapeAlignMiddle,
caption : me.AlignMiddle,
toggleGroup : 'popuptablecellalign',
checkmark : false,
checkable : true,
@ -1095,12 +1094,49 @@ define([], function () {
}),
me.menuTableCellBottom = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-bottom',
caption : me.textShapeAlignBottom,
caption : me.AlignBottom,
toggleGroup : 'popuptablecellalign',
checkmark : false,
checkable : true,
checked : false,
valign : Asc.c_oAscVertAlignJc.Bottom
}),
{ caption: '--' },
me.menuTableCellLeft = new Common.UI.MenuItem({
iconCls : 'menu__icon btn-align-left',
caption : me.AlignLeft,
toggleGroup : 'popuptablecellhalign',
checkmark : false,
checkable : true,
checked : false,
halign : 1
}),
me.menuTableCellHCenter = new Common.UI.MenuItem({
iconCls : 'menu__icon btn-align-center',
caption : me.AlignCenter,
toggleGroup : 'popuptablecellhalign',
checkmark : false,
checkable : true,
checked : false,
halign : 2
}),
me.menuTableCellRight = new Common.UI.MenuItem({
iconCls : 'menu__icon btn-align-right',
caption : me.AlignRight,
toggleGroup : 'popuptablecellhalign',
checkmark : false,
checkable : true,
checked : false,
halign : 0
}),
me.menuTableCellJust = new Common.UI.MenuItem({
iconCls : 'menu__icon btn-align-just',
caption : me.AlignJust,
toggleGroup : 'popuptablecellhalign',
checkmark : false,
checkable : true,
checked : false,
halign : 3
})
]
})
@ -1548,25 +1584,17 @@ define([], function () {
}
var align = value.tableProps.value.get_CellsVAlign();
var cls = '';
switch (align) {
case Asc.c_oAscVertAlignJc.Top:
cls = 'menu__icon btn-align-top';
break;
case Asc.c_oAscVertAlignJc.Center:
cls = 'menu__icon btn-align-middle';
break;
case Asc.c_oAscVertAlignJc.Bottom:
cls = 'menu__icon btn-align-bottom';
break;
}
me.menuTableCellAlign.setIconCls(cls);
var halign = value.paraProps.value.get_Jc();
me.menuTableCellTop.setChecked(align == Asc.c_oAscVertAlignJc.Top);
me.menuTableCellCenter.setChecked(align == Asc.c_oAscVertAlignJc.Center);
me.menuTableCellBottom.setChecked(align == Asc.c_oAscVertAlignJc.Bottom);
me.menuTableCellLeft.setChecked(halign == 1);
me.menuTableCellHCenter.setChecked(halign == 2);
me.menuTableCellRight.setChecked(halign == 0);
me.menuTableCellJust.setChecked(halign == 3);
var dir = value.tableProps.value.get_CellsTextDirection();
cls = '';
var cls = '';
switch (dir) {
case Asc.c_oAscCellTextDirection.LRTB:
cls = 'menu__icon btn-text-orient-hor';
@ -1831,15 +1859,14 @@ define([], function () {
});
me.menuParagraphVAlign = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-top',
caption : me.vertAlignText,
caption : me.AlignText,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items : [
me.menuParagraphTop = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-top',
caption : me.textShapeAlignTop,
caption : me.AlignTop,
checkmark : false,
checkable : true,
checked : false,
@ -1848,7 +1875,7 @@ define([], function () {
}),
me.menuParagraphCenter = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-middle',
caption : me.textShapeAlignMiddle,
caption : me.AlignMiddle,
checkmark : false,
checkable : true,
checked : false,
@ -1857,12 +1884,49 @@ define([], function () {
}),
me.menuParagraphBottom = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-bottom',
caption : me.textShapeAlignBottom,
caption : me.AlignBottom,
checkmark : false,
checkable : true,
checked : false,
toggleGroup : 'popupparagraphvalign',
valign : Asc.c_oAscVAlign.Bottom
}),
{ caption: '--' },
me.menuParagraphLeft = new Common.UI.MenuItem({
iconCls : 'menu__icon btn-align-left',
caption : me.AlignLeft,
checkmark : false,
checkable : true,
checked : false,
toggleGroup : 'popupparagraphhalign',
halign : 1
}),
me.menuParagraphHCenter = new Common.UI.MenuItem({
iconCls : 'menu__icon btn-align-center',
caption : me.AlignCenter,
checkmark : false,
checkable : true,
checked : false,
toggleGroup : 'popupparagraphhalign',
halign : 2
}),
me.menuParagraphRight = new Common.UI.MenuItem({
iconCls : 'menu__icon btn-align-right',
caption : me.AlignRight,
checkmark : false,
checkable : true,
checked : false,
toggleGroup : 'popupparagraphhalign',
halign : 0
}),
me.menuParagraphJust = new Common.UI.MenuItem({
iconCls : 'menu__icon btn-align-just',
caption : me.AlignJust,
checkmark : false,
checkable : true,
checked : false,
toggleGroup : 'popupparagraphhalign',
halign : 3
})
]
})
@ -2179,25 +2243,18 @@ define([], function () {
me.menuParagraphDirection.setVisible(isInShape && !isInChart && !isEquation && !(is_form && control_props.get_FormPr().get_Fixed())); // после того, как заголовок можно будет растягивать по вертикали, вернуть "|| isInChart" !!
if ( isInShape || isInChart ) {
var align = value.imgProps.value.get_VerticalTextAlign();
var cls = '';
switch (align) {
case Asc.c_oAscVAlign.Top:
cls = 'menu__icon btn-align-top';
break;
case Asc.c_oAscVAlign.Center:
cls = 'menu__icon btn-align-middle';
break;
case Asc.c_oAscVAlign.Bottom:
cls = 'menu__icon btn-align-bottom';
break;
}
me.menuParagraphVAlign.setIconCls(cls);
var halign = value.paraProps.value.get_Jc();
me.menuParagraphTop.setChecked(align == Asc.c_oAscVAlign.Top);
me.menuParagraphCenter.setChecked(align == Asc.c_oAscVAlign.Center);
me.menuParagraphBottom.setChecked(align == Asc.c_oAscVAlign.Bottom);
me.menuParagraphBottom.setChecked(align == Asc.c_oAscVAlign.Bottom);
me.menuParagraphLeft.setChecked(halign == 1);
me.menuParagraphHCenter.setChecked(halign == 2);
me.menuParagraphRight.setChecked(halign == 0);
me.menuParagraphJust.setChecked(halign == 3);
var dir = value.imgProps.value.get_Vert();
cls = '';
var cls = '';
switch (dir) {
case Asc.c_oAscVertDrawingText.normal:
cls = 'menu__icon btn-text-orient-hor';

View File

@ -2293,6 +2293,7 @@
"DE.Views.DocumentHolder.breakBeforeText": "Page break before",
"DE.Views.DocumentHolder.btnChart": "Add, remove or change chart elements such as the title, legend, gridlines, and data labels",
"DE.Views.DocumentHolder.bulletsText": "Bullets and numbering",
"DE.Views.DocumentHolder.AlignText": "Text alignment",
"DE.Views.DocumentHolder.cellAlignText": "Cell vertical alignment",
"DE.Views.DocumentHolder.cellText": "Cell",
"DE.Views.DocumentHolder.centerText": "Center",
@ -2453,6 +2454,13 @@
"DE.Views.DocumentHolder.textSeparateList": "Separate list",
"DE.Views.DocumentHolder.textSettings": "Settings",
"DE.Views.DocumentHolder.textSeveral": "Several rows/columns",
"DE.Views.DocumentHolder.AlignJust": "Justify",
"DE.Views.DocumentHolder.AlignBottom": "Bottom",
"DE.Views.DocumentHolder.AlignCenter": "Center",
"DE.Views.DocumentHolder.AlignLeft": "Left",
"DE.Views.DocumentHolder.AlignMiddle": "Middle",
"DE.Views.DocumentHolder.AlignRight": "Right",
"DE.Views.DocumentHolder.AlignTop": "Top",
"DE.Views.DocumentHolder.textShapeAlignBottom": "Align bottom",
"DE.Views.DocumentHolder.textShapeAlignCenter": "Align center",
"DE.Views.DocumentHolder.textShapeAlignLeft": "Align left",

View File

@ -2053,6 +2053,13 @@ define([], function () {
dh.tableCellsVAlign = function(menu, item, e) {
if (this.api) {
if (item.options.halign != null) {
var type = item.options.halign;
this.api.put_PrAlign(type);
return;
}
var properties = new Asc.CTableProp();
properties.put_CellsVAlign(item.value);
this.api.tblApply(properties);
@ -2373,6 +2380,13 @@ define([], function () {
dh.onParagraphVAlign = function (menu, item) {
var me = this;
if (me.api) {
if (item.options.halign != null) {
var type = item.options.halign;
me.api.put_PrAlign(type);
return;
}
var properties = new Asc.asc_CShapeProperty();
properties.put_VerticalTextAlign(item.value);

View File

@ -173,15 +173,14 @@ define([], function () {
});
me.menuTableCellAlign = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-top',
caption : me.cellAlignText,
caption : me.AlignText,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items: [
me.menuTableCellTop = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-top',
caption : me.textShapeAlignTop,
caption : me.AlignTop,
checkable : true,
checkmark : false,
toggleGroup : 'popuptablecellalign',
@ -189,7 +188,7 @@ define([], function () {
}),
me.menuTableCellCenter = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-middle',
caption : me.textShapeAlignMiddle,
caption : me.AlignMiddle,
checkable : true,
checkmark : false,
toggleGroup : 'popuptablecellalign',
@ -197,11 +196,44 @@ define([], function () {
}),
me.menuTableCellBottom = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-bottom',
caption : me.textShapeAlignBottom,
caption : me.AlignBottom,
checkable : true,
checkmark : false,
toggleGroup : 'popuptablecellalign',
value : Asc.c_oAscVertAlignJc.Bottom
}),
{ caption: '--' },
me.menuTableCellLeft = new Common.UI.MenuItem({
iconCls : 'menu__icon btn-align-left',
caption : me.AlignLeft,
checkable : true,
checkmark : false,
toggleGroup : 'popuptablecellhalign',
halign : 1
}),
me.menuTableCellHCenter = new Common.UI.MenuItem({
iconCls : 'menu__icon btn-align-center',
caption : me.AlignCenter,
checkable : true,
checkmark : false,
toggleGroup : 'popuptablecellhalign',
halign : 2
}),
me.menuTableCellRight = new Common.UI.MenuItem({
iconCls : 'menu__icon btn-align-right',
caption : me.AlignRight,
checkable : true,
checkmark : false,
toggleGroup : 'popuptablecellhalign',
halign : 0
}),
me.menuTableCellJust = new Common.UI.MenuItem({
iconCls : 'menu__icon btn-align-just',
caption : me.AlignJust,
checkable : true,
checkmark : false,
toggleGroup : 'popuptablecellhalign',
halign : 3
})
]
})
@ -388,22 +420,14 @@ define([], function () {
}
var align = value.tableProps.value.get_CellsVAlign();
var cls = '';
switch (align) {
case Asc.c_oAscVertAlignJc.Top:
cls = 'menu__icon btn-align-top';
break;
case Asc.c_oAscVertAlignJc.Center:
cls = 'menu__icon btn-align-middle';
break;
case Asc.c_oAscVertAlignJc.Bottom:
cls = 'menu__icon btn-align-bottom';
break;
}
me.menuTableCellAlign.setIconCls(cls);
var halign = value.paraProps.value.get_Jc();
me.menuTableCellTop.setChecked(align == Asc.c_oAscVertAlignJc.Top);
me.menuTableCellCenter.setChecked(align == Asc.c_oAscVertAlignJc.Center);
me.menuTableCellBottom.setChecked(align == Asc.c_oAscVertAlignJc.Bottom);
me.menuTableCellLeft.setChecked(halign == 1);
me.menuTableCellHCenter.setChecked(halign == 2);
me.menuTableCellRight.setChecked(halign == 0);
me.menuTableCellJust.setChecked(halign == 3);
if (me.api) {
me.mnuTableMerge.setDisabled(value.tableProps.locked || !me.api.CheckBeforeMergeCells());
@ -1358,15 +1382,14 @@ define([], function () {
});
me.menuParagraphVAlign = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-top',
caption : me.vertAlignText,
caption : me.AlignText,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items: [
me.menuParagraphTop = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-top',
caption : me.textShapeAlignTop,
caption : me.AlignTop,
checkable : true,
checkmark : false,
toggleGroup : 'popupparagraphvalign',
@ -1374,7 +1397,7 @@ define([], function () {
}),
me.menuParagraphCenter = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-middle',
caption : me.textShapeAlignMiddle,
caption : me.AlignMiddle,
checkable : true,
checkmark : false,
toggleGroup : 'popupparagraphvalign',
@ -1382,11 +1405,44 @@ define([], function () {
}),
me.menuParagraphBottom = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-bottom',
caption : me.textShapeAlignBottom,
caption : me.AlignBottom,
checkable : true,
checkmark : false,
toggleGroup : 'popupparagraphvalign',
value : Asc.c_oAscVAlign.Bottom
}),
{ caption: '--' },
me.menuParagraphLeft = new Common.UI.MenuItem({
iconCls : 'menu__icon btn-align-left',
caption : me.AlignLeft,
checkable : true,
checkmark : false,
toggleGroup : 'popupparagraphhalign',
halign : 1
}),
me.menuParagraphHCenter = new Common.UI.MenuItem({
iconCls : 'menu__icon btn-align-center',
caption : me.AlignCenter,
checkable : true,
checkmark : false,
toggleGroup : 'popupparagraphhalign',
halign : 2
}),
me.menuParagraphRight = new Common.UI.MenuItem({
iconCls : 'menu__icon btn-align-right',
caption : me.AlignRight,
checkable : true,
checkmark : false,
toggleGroup : 'popupparagraphhalign',
halign : 0
}),
me.menuParagraphJust = new Common.UI.MenuItem({
iconCls : 'menu__icon btn-align-just',
caption : me.AlignJust,
checkable : true,
checkmark : false,
toggleGroup : 'popupparagraphhalign',
halign : 3
})
]
})
@ -1479,25 +1535,17 @@ define([], function () {
me.menuParagraphDirection.setVisible(isInShape && !isInChart && !isEquation); // после того, как заголовок можно будет растягивать по вертикали, вернуть "|| isInChart" !!
if (isInShape || isInChart) {
var align = value.shapeProps.value.get_VerticalTextAlign();
var cls = '';
switch (align) {
case Asc.c_oAscVAlign.Top:
cls = 'menu__icon btn-align-top';
break;
case Asc.c_oAscVAlign.Center:
cls = 'menu__icon btn-align-middle';
break;
case Asc.c_oAscVAlign.Bottom:
cls = 'menu__icon btn-align-bottom';
break;
}
me.menuParagraphVAlign.setIconCls(cls);
var halign = value.paraProps.value.get_Jc();
me.menuParagraphTop.setChecked(align == Asc.c_oAscVAlign.Top);
me.menuParagraphCenter.setChecked(align == Asc.c_oAscVAlign.Center);
me.menuParagraphBottom.setChecked(align == Asc.c_oAscVAlign.Bottom);
me.menuParagraphLeft.setChecked(halign == 1);
me.menuParagraphHCenter.setChecked(halign == 2);
me.menuParagraphRight.setChecked(halign == 0);
me.menuParagraphJust.setChecked(halign == 3);
var dir = value.shapeProps.value.get_Vert();
cls = '';
var cls = '';
switch (dir) {
case Asc.c_oAscVertDrawingText.normal:
cls = 'menu__icon btn-text-orient-hor';

View File

@ -1779,6 +1779,7 @@
"PDFE.Views.DocumentHolder.allProfText": "All - Professional",
"PDFE.Views.DocumentHolder.belowText": "Below",
"PDFE.Views.DocumentHolder.btnChart": "Add, remove or change chart elements such as the title, legend, gridlines, and data labels",
"PDFE.Views.DocumentHolder.AlignText": "Text alignment",
"PDFE.Views.DocumentHolder.cellAlignText": "Cell vertical alignment",
"PDFE.Views.DocumentHolder.cellText": "Cell",
"PDFE.Views.DocumentHolder.centerText": "Center",
@ -1885,6 +1886,13 @@
"PDFE.Views.DocumentHolder.textRotate270": "Rotate 90° Counterclockwise",
"PDFE.Views.DocumentHolder.textRotate90": "Rotate 90° Clockwise",
"PDFE.Views.DocumentHolder.textSaveAsPicture": "Save as picture",
"PDFE.Views.DocumentHolder.AlignJust": "Justify",
"PDFE.Views.DocumentHolder.AlignBottom": "Bottom",
"PDFE.Views.DocumentHolder.AlignCenter": "Center",
"PDFE.Views.DocumentHolder.AlignLeft": "Left",
"PDFE.Views.DocumentHolder.AlignMiddle": "Middle",
"PDFE.Views.DocumentHolder.AlignRight": "Right",
"PDFE.Views.DocumentHolder.AlignTop": "Top",
"PDFE.Views.DocumentHolder.textShapeAlignBottom": "Align Bottom",
"PDFE.Views.DocumentHolder.textShapeAlignCenter": "Align center",
"PDFE.Views.DocumentHolder.textShapeAlignLeft": "Align left",

View File

@ -2031,6 +2031,13 @@ define([], function () {
dh.tableCellsVAlign = function(menu, item, e) {
if (this.api) {
if (item.options.halign != null) {
var type = item.options.halign;
this.api.put_PrAlign(type);
return;
}
var properties = new Asc.CTableProp();
properties.put_CellsVAlign(item.value);
this.api.tblApply(properties);
@ -2370,6 +2377,13 @@ define([], function () {
dh.onParagraphVAlign = function (menu, item) {
var me = this;
if (me.api) {
if (item.options.halign != null) {
var type = item.options.halign;
me.api.put_PrAlign(type);
return;
}
var properties = new Asc.asc_CShapeProperty();
properties.put_VerticalTextAlign(item.value);

View File

@ -564,15 +564,14 @@ define([], function () {
});
me.menuTableCellAlign = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-top',
caption : me.cellAlignText,
caption : me.AlignText,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items: [
me.menuTableCellTop = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-top',
caption : me.textShapeAlignTop,
caption : me.AlignTop,
checkable : true,
checkmark : false,
toggleGroup : 'popuptablecellalign',
@ -580,7 +579,7 @@ define([], function () {
}),
me.menuTableCellCenter = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-middle',
caption : me.textShapeAlignMiddle,
caption : me.AlignMiddle,
checkable : true,
checkmark : false,
toggleGroup : 'popuptablecellalign',
@ -588,11 +587,44 @@ define([], function () {
}),
me.menuTableCellBottom = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-bottom',
caption : me.textShapeAlignBottom,
caption : me.AlignBottom,
checkable : true,
checkmark : false,
toggleGroup : 'popuptablecellalign',
value : Asc.c_oAscVertAlignJc.Bottom
}),
{ caption: '--' },
me.menuTableCellLeft = new Common.UI.MenuItem({
iconCls : 'menu__icon btn-align-left',
caption : me.AlignLeft,
checkable : true,
checkmark : false,
toggleGroup : 'popuptablecellhalign',
halign : 1
}),
me.menuTableCellHCenter = new Common.UI.MenuItem({
iconCls : 'menu__icon btn-align-center',
caption : me.AlignCenter,
checkable : true,
checkmark : false,
toggleGroup : 'popuptablecellhalign',
halign : 2
}),
me.menuTableCellRight = new Common.UI.MenuItem({
iconCls : 'menu__icon btn-align-right',
caption : me.AlignRight,
checkable : true,
checkmark : false,
toggleGroup : 'popuptablecellhalign',
halign : 0
}),
me.menuTableCellJust = new Common.UI.MenuItem({
iconCls : 'menu__icon btn-align-just',
caption : me.AlignJust,
checkable : true,
checkmark : false,
toggleGroup : 'popuptablecellhalign',
halign : 3
})
]
})
@ -1503,15 +1535,14 @@ define([], function () {
});
me.menuParagraphVAlign = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-top',
caption : me.vertAlignText,
caption : me.AlignText,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign: 'tl-tr',
items: [
me.menuParagraphTop = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-top',
caption : me.textShapeAlignTop,
caption : me.AlignTop,
checkable : true,
checkmark : false,
toggleGroup : 'popupparagraphvalign',
@ -1519,7 +1550,7 @@ define([], function () {
}),
me.menuParagraphCenter = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-middle',
caption : me.textShapeAlignMiddle,
caption : me.AlignMiddle,
checkable : true,
checkmark : false,
toggleGroup : 'popupparagraphvalign',
@ -1527,11 +1558,44 @@ define([], function () {
}),
me.menuParagraphBottom = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-bottom',
caption : me.textShapeAlignBottom,
caption : me.AlignBottom,
checkable : true,
checkmark : false,
toggleGroup : 'popupparagraphvalign',
value : Asc.c_oAscVAlign.Bottom
}),
{ caption: '--' },
me.menuParagraphLeft = new Common.UI.MenuItem({
iconCls : 'menu__icon btn-align-left',
caption : me.AlignLeft,
checkable : true,
checkmark : false,
toggleGroup : 'popupparagraphhalign',
halign : 1
}),
me.menuParagraphHCenter = new Common.UI.MenuItem({
iconCls : 'menu__icon btn-align-center',
caption : me.AlignCenter,
checkable : true,
checkmark : false,
toggleGroup : 'popupparagraphhalign',
halign : 2
}),
me.menuParagraphRight = new Common.UI.MenuItem({
iconCls : 'menu__icon btn-align-right',
caption : me.AlignRight,
checkable : true,
checkmark : false,
toggleGroup : 'popupparagraphhalign',
halign : 0
}),
me.menuParagraphJust = new Common.UI.MenuItem({
iconCls : 'menu__icon btn-align-just',
caption : me.AlignJust,
checkable : true,
checkmark : false,
toggleGroup : 'popupparagraphhalign',
halign : 3
})
]
})
@ -1793,25 +1857,17 @@ define([], function () {
me.menuParagraphDirection.setVisible(isInShape && !isInChart && !isEquation); // после того, как заголовок можно будет растягивать по вертикали, вернуть "|| isInChart" !!
if (isInShape || isInChart) {
var align = value.shapeProps.value.get_VerticalTextAlign();
var cls = '';
switch (align) {
case Asc.c_oAscVAlign.Top:
cls = 'menu__icon btn-align-top';
break;
case Asc.c_oAscVAlign.Center:
cls = 'menu__icon btn-align-middle';
break;
case Asc.c_oAscVAlign.Bottom:
cls = 'menu__icon btn-align-bottom';
break;
}
me.menuParagraphVAlign.setIconCls(cls);
var halign = value.paraProps.value.get_Jc();
me.menuParagraphTop.setChecked(align == Asc.c_oAscVAlign.Top);
me.menuParagraphCenter.setChecked(align == Asc.c_oAscVAlign.Center);
me.menuParagraphBottom.setChecked(align == Asc.c_oAscVAlign.Bottom);
me.menuParagraphLeft.setChecked(halign == 1);
me.menuParagraphHCenter.setChecked(halign == 2);
me.menuParagraphRight.setChecked(halign == 0);
me.menuParagraphJust.setChecked(halign == 3);
var dir = value.shapeProps.value.get_Vert();
cls = '';
var cls = '';
switch (dir) {
case Asc.c_oAscVertDrawingText.normal:
cls = 'menu__icon btn-text-orient-hor';
@ -1965,25 +2021,17 @@ define([], function () {
var disabled = (value.slideProps!==undefined && value.slideProps.locked);
var align = value.tableProps.value.get_CellsVAlign();
var cls = '';
switch (align) {
case Asc.c_oAscVertAlignJc.Top:
cls = 'menu__icon btn-align-top';
break;
case Asc.c_oAscVertAlignJc.Center:
cls = 'menu__icon btn-align-middle';
break;
case Asc.c_oAscVertAlignJc.Bottom:
cls = 'menu__icon btn-align-bottom';
break;
}
me.menuTableCellAlign.setIconCls(cls);
var halign = value.paraProps.value.get_Jc();
me.menuTableCellTop.setChecked(align == Asc.c_oAscVertAlignJc.Top);
me.menuTableCellCenter.setChecked(align == Asc.c_oAscVertAlignJc.Center);
me.menuTableCellBottom.setChecked(align == Asc.c_oAscVertAlignJc.Bottom);
me.menuTableCellLeft.setChecked(halign == 1);
me.menuTableCellHCenter.setChecked(halign == 2);
me.menuTableCellRight.setChecked(halign == 0);
me.menuTableCellJust.setChecked(halign == 3);
var dir = value.tableProps.value.get_CellsTextDirection();
cls = '';
var cls = '';
switch (dir) {
case Asc.c_oAscCellTextDirection.LRTB:
cls = 'menu__icon btn-text-orient-hor';

View File

@ -2284,6 +2284,7 @@
"PE.Views.DocumentHolder.allProfText": "All - Professional",
"PE.Views.DocumentHolder.belowText": "Below",
"PE.Views.DocumentHolder.btnChart": "Add, remove or change chart elements such as the title, legend, gridlines, and data labels",
"PE.Views.DocumentHolder.AlignText": "Text alignment",
"PE.Views.DocumentHolder.cellAlignText": "Cell vertical alignment",
"PE.Views.DocumentHolder.cellText": "Cell",
"PE.Views.DocumentHolder.centerText": "Center",
@ -2408,6 +2409,13 @@
"PE.Views.DocumentHolder.textRotate90": "Rotate 90° Clockwise",
"PE.Views.DocumentHolder.textRulers": "Rulers",
"PE.Views.DocumentHolder.textSaveAsPicture": "Save as picture",
"PE.Views.DocumentHolder.AlignJust": "Justify",
"PE.Views.DocumentHolder.AlignBottom": "Bottom",
"PE.Views.DocumentHolder.AlignCenter": "Center",
"PE.Views.DocumentHolder.AlignLeft": "Left",
"PE.Views.DocumentHolder.AlignMiddle": "Middle",
"PE.Views.DocumentHolder.AlignRight": "Right",
"PE.Views.DocumentHolder.AlignTop": "Top",
"PE.Views.DocumentHolder.textShapeAlignBottom": "Align Bottom",
"PE.Views.DocumentHolder.textShapeAlignCenter": "Align center",
"PE.Views.DocumentHolder.textShapeAlignLeft": "Align left",

View File

@ -1118,6 +1118,13 @@ define([], function () {
dh.onParagraphVAlign = function(menu, item) {
if (this.api) {
if (item.options.halign != null) {
var type = item.options.halign;
this.api.asc_setCellAlign(type);
return;
}
var properties = new Asc.asc_CImgProperty();
properties.asc_putVerticalTextAlign(item.value);
@ -2395,24 +2402,12 @@ define([], function () {
isObjLocked = isObjLocked || value.asc_getLocked();
isSmartArt = shapeProps ? shapeProps.asc_getFromSmartArt() : false;
isSmartArtInternal = shapeProps ? shapeProps.asc_getFromSmartArtInternal() : false;
var cls = '';
switch (align) {
case Asc.c_oAscVAlign.Top:
cls = 'menu__icon btn-align-top';
break;
case Asc.c_oAscVAlign.Center:
cls = 'menu__icon btn-align-middle';
break;
case Asc.c_oAscVAlign.Bottom:
cls = 'menu__icon btn-align-bottom';
break;
}
documentHolder.menuParagraphVAlign.setIconCls(cls);
documentHolder.menuParagraphTop.setChecked(align == Asc.c_oAscVAlign.Top);
documentHolder.menuParagraphCenter.setChecked(align == Asc.c_oAscVAlign.Center);
documentHolder.menuParagraphBottom.setChecked(align == Asc.c_oAscVAlign.Bottom);
cls = '';
var cls = '';
switch (direct) {
case Asc.c_oAscVertDrawingText.normal:
cls = 'menu__icon btn-text-orient-hor';
@ -2484,6 +2479,11 @@ define([], function () {
} else if (elType == Asc.c_oAscTypeSelectElement.Paragraph) {
documentHolder.pmiTextAdvanced.textInfo = selectedObjects[i].asc_getObjectValue();
isObjLocked = isObjLocked || documentHolder.pmiTextAdvanced.textInfo.asc_getLocked();
var halign = selectedObjects[i].asc_getObjectValue().get_Jc();
documentHolder.menuParagraphLeft.setChecked(halign == 1);
documentHolder.menuParagraphHCenter.setChecked(halign == 2);
documentHolder.menuParagraphRight.setChecked(halign == 0);
documentHolder.menuParagraphJust.setChecked(halign == 3);
} else if (elType == Asc.c_oAscTypeSelectElement.Math) {
this._currentMathObj = selectedObjects[i].asc_getObjectValue();
isEquation = true;

View File

@ -1612,15 +1612,14 @@ define([], function () {
});
this.menuParagraphVAlign = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-top',
caption : this.vertAlignText,
caption : this.AlignText,
menu : new Common.UI.Menu({
cls: 'shifted-right',
menuAlign : 'tl-tr',
items: [
me.menuParagraphTop = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-top',
caption : me.topCellText,
caption : me.AlignTop,
checkable : true,
checkmark : false,
toggleGroup : 'popupparagraphvalign',
@ -1628,7 +1627,7 @@ define([], function () {
}),
me.menuParagraphCenter = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-middle',
caption : me.centerCellText,
caption : me.AlignMiddle,
checkable : true,
checkmark : false,
toggleGroup : 'popupparagraphvalign',
@ -1636,11 +1635,44 @@ define([], function () {
}),
this.menuParagraphBottom = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-align-bottom',
caption : me.bottomCellText,
caption : me.AlignBottom,
checkable : true,
checkmark : false,
toggleGroup : 'popupparagraphvalign',
value : Asc.c_oAscVAlign.Bottom
}),
{ caption: '--' },
me.menuParagraphLeft = new Common.UI.MenuItem({
iconCls : 'menu__icon btn-align-left',
caption : me.AlignLeft,
checkable : true,
checkmark : false,
toggleGroup : 'popupparagraphhalign',
halign : 1
}),
me.menuParagraphHCenter = new Common.UI.MenuItem({
iconCls : 'menu__icon btn-align-center',
caption : me.AlignCenter,
checkable : true,
checkmark : false,
toggleGroup : 'popupparagraphhalign',
halign : 2
}),
me.menuParagraphRight = new Common.UI.MenuItem({
iconCls : 'menu__icon btn-align-right',
caption : me.AlignRight,
checkable : true,
checkmark : false,
toggleGroup : 'popupparagraphhalign',
halign : 0
}),
me.menuParagraphJust = new Common.UI.MenuItem({
iconCls : 'menu__icon btn-align-just',
caption : me.AlignJust,
checkable : true,
checkmark : false,
toggleGroup : 'popupparagraphhalign',
halign : 3
})
]
})

View File

@ -2999,6 +2999,13 @@
"SSE.Views.DocumentHolder.textRotate90": "Rotate 90° Clockwise",
"SSE.Views.DocumentHolder.textSaveAsPicture": "Save as picture",
"SSE.Views.DocumentHolder.textSeries": "Series",
"SSE.Views.DocumentHolder.AlignJust": "Justify",
"SSE.Views.DocumentHolder.AlignBottom": "Bottom",
"SSE.Views.DocumentHolder.AlignCenter": "Center",
"SSE.Views.DocumentHolder.AlignLeft": "Left",
"SSE.Views.DocumentHolder.AlignMiddle": "Middle",
"SSE.Views.DocumentHolder.AlignRight": "Right",
"SSE.Views.DocumentHolder.AlignTop": "Top",
"SSE.Views.DocumentHolder.textShapeAlignBottom": "Align bottom",
"SSE.Views.DocumentHolder.textShapeAlignCenter": "Align center",
"SSE.Views.DocumentHolder.textShapeAlignLeft": "Align left",
@ -3143,7 +3150,8 @@
"SSE.Views.DocumentHolder.txtValueFilter": "Value filters",
"SSE.Views.DocumentHolder.txtWidth": "Width",
"SSE.Views.DocumentHolder.unicodeText": "Unicode",
"SSE.Views.DocumentHolder.vertAlignText": "Vertical alignment",
"SSE.Views.DocumentHolder.AlignText": "Text alignment",
"SSE.Views.DocumentHolder.vertAlignText": "Cell vertical alignment",
"SSE.Views.FieldSettingsDialog.strLayout": "Layout",
"SSE.Views.FieldSettingsDialog.strSubtotals": "Subtotals",
"SSE.Views.FieldSettingsDialog.textNumFormat": "Number format",