Merge remote-tracking branch 'remotes/origin/develop' into feature/sse-slicer
This commit is contained in:
commit
f19437168f
|
@ -344,7 +344,7 @@ define([
|
||||||
onApiChangeFontInternal: function(font) {
|
onApiChangeFontInternal: function(font) {
|
||||||
if (this.inFormControl) return;
|
if (this.inFormControl) return;
|
||||||
|
|
||||||
var name = (_.isFunction(font.get_Name) ? font.get_Name() : font.asc_getName());
|
var name = (_.isFunction(font.get_Name) ? font.get_Name() : font.asc_getFontName());
|
||||||
|
|
||||||
if (this.getRawValue() !== name) {
|
if (this.getRawValue() !== name) {
|
||||||
var record = this.store.findWhere({
|
var record = this.store.findWhere({
|
||||||
|
|
|
@ -1572,7 +1572,8 @@ define([
|
||||||
isTableLocked = cellinfo.asc_getLockedTable()===true,
|
isTableLocked = cellinfo.asc_getLockedTable()===true,
|
||||||
isObjLocked = false,
|
isObjLocked = false,
|
||||||
commentsController = this.getApplication().getController('Common.Controllers.Comments'),
|
commentsController = this.getApplication().getController('Common.Controllers.Comments'),
|
||||||
internaleditor = this.permissions.isEditMailMerge || this.permissions.isEditDiagram;
|
internaleditor = this.permissions.isEditMailMerge || this.permissions.isEditDiagram,
|
||||||
|
xfs = cellinfo.asc_getXfs();
|
||||||
|
|
||||||
switch (seltype) {
|
switch (seltype) {
|
||||||
case Asc.c_oAscSelectionType.RangeCells: iscellmenu = true; break;
|
case Asc.c_oAscSelectionType.RangeCells: iscellmenu = true; break;
|
||||||
|
@ -1742,8 +1743,8 @@ define([
|
||||||
isintable = (formatTableInfo !== null),
|
isintable = (formatTableInfo !== null),
|
||||||
ismultiselect = cellinfo.asc_getMultiselect();
|
ismultiselect = cellinfo.asc_getMultiselect();
|
||||||
documentHolder.ssMenu.formatTableName = (isintable) ? formatTableInfo.asc_getTableName() : null;
|
documentHolder.ssMenu.formatTableName = (isintable) ? formatTableInfo.asc_getTableName() : null;
|
||||||
documentHolder.ssMenu.cellColor = cellinfo.asc_getFillColor();
|
documentHolder.ssMenu.cellColor = xfs.asc_getFillColor();
|
||||||
documentHolder.ssMenu.fontColor = cellinfo.asc_getFont().asc_getColor();
|
documentHolder.ssMenu.fontColor = xfs.asc_getFontColor();
|
||||||
|
|
||||||
documentHolder.pmiInsertEntire.setVisible(isrowmenu||iscolmenu);
|
documentHolder.pmiInsertEntire.setVisible(isrowmenu||iscolmenu);
|
||||||
documentHolder.pmiInsertEntire.setCaption((isrowmenu) ? this.textInsertTop : this.textInsertLeft);
|
documentHolder.pmiInsertEntire.setCaption((isrowmenu) ? this.textInsertTop : this.textInsertLeft);
|
||||||
|
@ -1819,8 +1820,8 @@ define([
|
||||||
documentHolder.pmiEntriesList.setVisible(!iscelledit && !inPivot);
|
documentHolder.pmiEntriesList.setVisible(!iscelledit && !inPivot);
|
||||||
|
|
||||||
documentHolder.pmiNumFormat.setVisible(!iscelledit);
|
documentHolder.pmiNumFormat.setVisible(!iscelledit);
|
||||||
documentHolder.pmiAdvancedNumFormat.options.numformatinfo = documentHolder.pmiNumFormat.menu.options.numformatinfo = cellinfo.asc_getNumFormatInfo();
|
documentHolder.pmiAdvancedNumFormat.options.numformatinfo = documentHolder.pmiNumFormat.menu.options.numformatinfo = xfs.asc_getNumFormatInfo();
|
||||||
documentHolder.pmiAdvancedNumFormat.options.numformat = cellinfo.asc_getNumFormat();
|
documentHolder.pmiAdvancedNumFormat.options.numformat = xfs.asc_getNumFormat();
|
||||||
|
|
||||||
_.each(documentHolder.ssMenu.items, function(item) {
|
_.each(documentHolder.ssMenu.items, function(item) {
|
||||||
item.setDisabled(isCellLocked);
|
item.setDisabled(isCellLocked);
|
||||||
|
|
|
@ -1381,7 +1381,7 @@ define([
|
||||||
this.api.asc_setCellFontName(record.name);
|
this.api.asc_setCellFontName(record.name);
|
||||||
Common.component.Analytics.trackEvent('ToolBar', 'Font Name');
|
Common.component.Analytics.trackEvent('ToolBar', 'Font Name');
|
||||||
} else {
|
} else {
|
||||||
this.toolbar.cmbFontName.setValue(this.api.asc_getCellInfo().asc_getFont().asc_getName());
|
this.toolbar.cmbFontName.setValue(this.api.asc_getCellInfo().asc_getXfs().asc_getFontName());
|
||||||
}
|
}
|
||||||
Common.NotificationCenter.trigger('edit:complete', this.toolbar, {restorefocus:true});
|
Common.NotificationCenter.trigger('edit:complete', this.toolbar, {restorefocus:true});
|
||||||
}, this)
|
}, this)
|
||||||
|
@ -1966,36 +1966,36 @@ define([
|
||||||
val;
|
val;
|
||||||
|
|
||||||
/* read font name */
|
/* read font name */
|
||||||
var fontparam = fontobj.asc_getName();
|
var fontparam = fontobj.asc_getFontName();
|
||||||
if (fontparam != toolbar.cmbFontName.getValue()) {
|
if (fontparam != toolbar.cmbFontName.getValue()) {
|
||||||
Common.NotificationCenter.trigger('fonts:change', fontobj);
|
Common.NotificationCenter.trigger('fonts:change', fontobj);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* read font params */
|
/* read font params */
|
||||||
if (!toolbar.mode.isEditMailMerge && !toolbar.mode.isEditDiagram) {
|
if (!toolbar.mode.isEditMailMerge && !toolbar.mode.isEditDiagram) {
|
||||||
val = fontobj.asc_getBold();
|
val = fontobj.asc_getFontBold();
|
||||||
if (this._state.bold !== val) {
|
if (this._state.bold !== val) {
|
||||||
toolbar.btnBold.toggle(val === true, true);
|
toolbar.btnBold.toggle(val === true, true);
|
||||||
this._state.bold = val;
|
this._state.bold = val;
|
||||||
}
|
}
|
||||||
val = fontobj.asc_getItalic();
|
val = fontobj.asc_getFontItalic();
|
||||||
if (this._state.italic !== val) {
|
if (this._state.italic !== val) {
|
||||||
toolbar.btnItalic.toggle(val === true, true);
|
toolbar.btnItalic.toggle(val === true, true);
|
||||||
this._state.italic = val;
|
this._state.italic = val;
|
||||||
}
|
}
|
||||||
val = fontobj.asc_getUnderline();
|
val = fontobj.asc_getFontUnderline();
|
||||||
if (this._state.underline !== val) {
|
if (this._state.underline !== val) {
|
||||||
toolbar.btnUnderline.toggle(val === true, true);
|
toolbar.btnUnderline.toggle(val === true, true);
|
||||||
this._state.underline = val;
|
this._state.underline = val;
|
||||||
}
|
}
|
||||||
val = fontobj.asc_getStrikeout();
|
val = fontobj.asc_getFontStrikeout();
|
||||||
if (this._state.strikeout !== val) {
|
if (this._state.strikeout !== val) {
|
||||||
toolbar.btnStrikeout.toggle(val === true, true);
|
toolbar.btnStrikeout.toggle(val === true, true);
|
||||||
this._state.strikeout = val;
|
this._state.strikeout = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
var subsc = fontobj.asc_getSubscript(),
|
var subsc = fontobj.asc_getFontSubscript(),
|
||||||
supersc = fontobj.asc_getSuperscript();
|
supersc = fontobj.asc_getFontSuperscript();
|
||||||
|
|
||||||
if (this._state.subscript !== subsc || this._state.superscript !== supersc) {
|
if (this._state.subscript !== subsc || this._state.superscript !== supersc) {
|
||||||
var index = (supersc) ? 0 : (subsc ? 1 : -1),
|
var index = (supersc) ? 0 : (subsc ? 1 : -1),
|
||||||
|
@ -2019,7 +2019,7 @@ define([
|
||||||
}
|
}
|
||||||
|
|
||||||
/* read font size */
|
/* read font size */
|
||||||
var str_size = fontobj.asc_getSize();
|
var str_size = fontobj.asc_getFontSize();
|
||||||
if (this._state.fontsize !== str_size) {
|
if (this._state.fontsize !== str_size) {
|
||||||
toolbar.cmbFontSize.setValue((str_size!==undefined) ? str_size : '');
|
toolbar.cmbFontSize.setValue((str_size!==undefined) ? str_size : '');
|
||||||
this._state.fontsize = str_size;
|
this._state.fontsize = str_size;
|
||||||
|
@ -2031,7 +2031,7 @@ define([
|
||||||
fontColorPicker = this.toolbar.mnuTextColorPicker;
|
fontColorPicker = this.toolbar.mnuTextColorPicker;
|
||||||
|
|
||||||
if (!toolbar.btnTextColor.ischanged && !fontColorPicker.isDummy) {
|
if (!toolbar.btnTextColor.ischanged && !fontColorPicker.isDummy) {
|
||||||
color = fontobj.asc_getColor();
|
color = fontobj.asc_getFontColor();
|
||||||
if (color) {
|
if (color) {
|
||||||
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
|
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
|
||||||
clr = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() };
|
clr = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() };
|
||||||
|
@ -2077,23 +2077,23 @@ define([
|
||||||
editOptionsDisabled = this._disableEditOptions(selectionType, coauth_disable),
|
editOptionsDisabled = this._disableEditOptions(selectionType, coauth_disable),
|
||||||
me = this,
|
me = this,
|
||||||
toolbar = this.toolbar,
|
toolbar = this.toolbar,
|
||||||
fontobj = info.asc_getFont(),
|
xfs = info.asc_getXfs(),
|
||||||
val, need_disable = false;
|
val, need_disable = false;
|
||||||
|
|
||||||
/* read font name */
|
/* read font name */
|
||||||
var fontparam = fontobj.asc_getName();
|
var fontparam = xfs.asc_getFontName();
|
||||||
if (fontparam != toolbar.cmbFontName.getValue()) {
|
if (fontparam != toolbar.cmbFontName.getValue()) {
|
||||||
Common.NotificationCenter.trigger('fonts:change', fontobj);
|
Common.NotificationCenter.trigger('fonts:change', xfs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* read font size */
|
/* read font size */
|
||||||
var str_size = fontobj.asc_getSize();
|
var str_size = xfs.asc_getFontSize();
|
||||||
if (this._state.fontsize !== str_size) {
|
if (this._state.fontsize !== str_size) {
|
||||||
toolbar.cmbFontSize.setValue((str_size !== undefined) ? str_size : '');
|
toolbar.cmbFontSize.setValue((str_size !== undefined) ? str_size : '');
|
||||||
this._state.fontsize = str_size;
|
this._state.fontsize = str_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
toolbar.lockToolbar(SSE.enumLock.cantHyperlink, (selectionType == Asc.c_oAscSelectionType.RangeShapeText) && (this.api.asc_canAddShapeHyperlink()===false), { array: [toolbar.btnInsertHyperlink]});
|
toolbar.lockToolbar(SSE.enumLock.cantHyperlink, (selectionType === Asc.c_oAscSelectionType.RangeShapeText) && (this.api.asc_canAddShapeHyperlink()===false), { array: [toolbar.btnInsertHyperlink]});
|
||||||
|
|
||||||
/*
|
/*
|
||||||
need_disable = selectionType != Asc.c_oAscSelectionType.RangeCells && selectionType != Asc.c_oAscSelectionType.RangeCol &&
|
need_disable = selectionType != Asc.c_oAscSelectionType.RangeCells && selectionType != Asc.c_oAscSelectionType.RangeCol &&
|
||||||
|
@ -2107,8 +2107,8 @@ define([
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
need_disable = (selectionType == Asc.c_oAscSelectionType.RangeCells || selectionType == Asc.c_oAscSelectionType.RangeCol ||
|
need_disable = (selectionType === Asc.c_oAscSelectionType.RangeCells || selectionType === Asc.c_oAscSelectionType.RangeCol ||
|
||||||
selectionType == Asc.c_oAscSelectionType.RangeRow || selectionType == Asc.c_oAscSelectionType.RangeMax);
|
selectionType === Asc.c_oAscSelectionType.RangeRow || selectionType === Asc.c_oAscSelectionType.RangeMax);
|
||||||
toolbar.lockToolbar(SSE.enumLock.selRange, need_disable, { array: [toolbar.btnImgAlign, toolbar.btnImgBackward, toolbar.btnImgForward, toolbar.btnImgGroup]});
|
toolbar.lockToolbar(SSE.enumLock.selRange, need_disable, { array: [toolbar.btnImgAlign, toolbar.btnImgBackward, toolbar.btnImgForward, toolbar.btnImgGroup]});
|
||||||
|
|
||||||
var cangroup = this.api.asc_canGroupGraphicsObjects(),
|
var cangroup = this.api.asc_canGroupGraphicsObjects(),
|
||||||
|
@ -2126,29 +2126,29 @@ define([
|
||||||
|
|
||||||
/* read font params */
|
/* read font params */
|
||||||
if (!toolbar.mode.isEditMailMerge && !toolbar.mode.isEditDiagram) {
|
if (!toolbar.mode.isEditMailMerge && !toolbar.mode.isEditDiagram) {
|
||||||
val = fontobj.asc_getBold();
|
val = xfs.asc_getFontBold();
|
||||||
if (this._state.bold !== val) {
|
if (this._state.bold !== val) {
|
||||||
toolbar.btnBold.toggle(val === true, true);
|
toolbar.btnBold.toggle(val === true, true);
|
||||||
this._state.bold = val;
|
this._state.bold = val;
|
||||||
}
|
}
|
||||||
val = fontobj.asc_getItalic();
|
val = xfs.asc_getFontItalic();
|
||||||
if (this._state.italic !== val) {
|
if (this._state.italic !== val) {
|
||||||
toolbar.btnItalic.toggle(val === true, true);
|
toolbar.btnItalic.toggle(val === true, true);
|
||||||
this._state.italic = val;
|
this._state.italic = val;
|
||||||
}
|
}
|
||||||
val = fontobj.asc_getUnderline();
|
val = xfs.asc_getFontUnderline();
|
||||||
if (this._state.underline !== val) {
|
if (this._state.underline !== val) {
|
||||||
toolbar.btnUnderline.toggle(val === true, true);
|
toolbar.btnUnderline.toggle(val === true, true);
|
||||||
this._state.underline = val;
|
this._state.underline = val;
|
||||||
}
|
}
|
||||||
val = fontobj.asc_getStrikeout();
|
val = xfs.asc_getFontStrikeout();
|
||||||
if (this._state.strikeout !== val) {
|
if (this._state.strikeout !== val) {
|
||||||
toolbar.btnStrikeout.toggle(val === true, true);
|
toolbar.btnStrikeout.toggle(val === true, true);
|
||||||
this._state.strikeout = val;
|
this._state.strikeout = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
var subsc = fontobj.asc_getSubscript(),
|
var subsc = xfs.asc_getFontSubscript(),
|
||||||
supersc = fontobj.asc_getSuperscript();
|
supersc = xfs.asc_getFontSuperscript();
|
||||||
|
|
||||||
if (this._state.subscript !== subsc || this._state.superscript !== supersc) {
|
if (this._state.subscript !== subsc || this._state.superscript !== supersc) {
|
||||||
var index = (supersc) ? 0 : (subsc ? 1 : -1),
|
var index = (supersc) ? 0 : (subsc ? 1 : -1),
|
||||||
|
@ -2178,7 +2178,7 @@ define([
|
||||||
paragraphColorPicker = this.toolbar.mnuBackColorPicker;
|
paragraphColorPicker = this.toolbar.mnuBackColorPicker;
|
||||||
|
|
||||||
if (!toolbar.btnTextColor.ischanged && !fontColorPicker.isDummy) {
|
if (!toolbar.btnTextColor.ischanged && !fontColorPicker.isDummy) {
|
||||||
color = fontobj.asc_getColor();
|
color = xfs.asc_getFontColor();
|
||||||
if (color) {
|
if (color) {
|
||||||
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
|
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
|
||||||
clr = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() };
|
clr = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() };
|
||||||
|
@ -2212,7 +2212,7 @@ define([
|
||||||
|
|
||||||
/* read cell background color */
|
/* read cell background color */
|
||||||
if (!toolbar.btnBackColor.ischanged && !paragraphColorPicker.isDummy) {
|
if (!toolbar.btnBackColor.ischanged && !paragraphColorPicker.isDummy) {
|
||||||
color = info.asc_getFillColor();
|
color = xfs.asc_getFillColor();
|
||||||
if (color) {
|
if (color) {
|
||||||
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
|
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
|
||||||
clr = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() };
|
clr = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() };
|
||||||
|
@ -2263,7 +2263,7 @@ define([
|
||||||
formatTableInfo = info.asc_getFormatTableInfo();
|
formatTableInfo = info.asc_getFormatTableInfo();
|
||||||
if (!toolbar.mode.isEditMailMerge) {
|
if (!toolbar.mode.isEditMailMerge) {
|
||||||
/* read cell horizontal align */
|
/* read cell horizontal align */
|
||||||
fontparam = info.asc_getHorAlign();
|
fontparam = xfs.asc_getHorAlign();
|
||||||
if (this._state.pralign !== fontparam) {
|
if (this._state.pralign !== fontparam) {
|
||||||
this._state.pralign = fontparam;
|
this._state.pralign = fontparam;
|
||||||
|
|
||||||
|
@ -2293,7 +2293,7 @@ define([
|
||||||
toolbar.btnTextOrient.menu.items[2].setDisabled(need_disable);
|
toolbar.btnTextOrient.menu.items[2].setDisabled(need_disable);
|
||||||
|
|
||||||
/* read cell vertical align */
|
/* read cell vertical align */
|
||||||
fontparam = info.asc_getVertAlign();
|
fontparam = xfs.asc_getVertAlign();
|
||||||
|
|
||||||
if (this._state.valign !== fontparam) {
|
if (this._state.valign !== fontparam) {
|
||||||
this._state.valign = fontparam;
|
this._state.valign = fontparam;
|
||||||
|
@ -2322,7 +2322,7 @@ define([
|
||||||
|
|
||||||
/* read cell text wrapping */
|
/* read cell text wrapping */
|
||||||
if (!toolbar.btnWrap.isDisabled()) {
|
if (!toolbar.btnWrap.isDisabled()) {
|
||||||
val = info.asc_getWrapText();
|
val = xfs.asc_getWrapText();
|
||||||
if (this._state.wrap !== val) {
|
if (this._state.wrap !== val) {
|
||||||
toolbar.btnWrap.toggle(val===true, true);
|
toolbar.btnWrap.toggle(val===true, true);
|
||||||
this._state.wrap = val;
|
this._state.wrap = val;
|
||||||
|
@ -2376,9 +2376,9 @@ define([
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
val = info.asc_getNumFormatInfo();
|
val = xfs.asc_getNumFormatInfo();
|
||||||
if (val) {
|
if (val) {
|
||||||
this._state.numformat = info.asc_getNumFormat();
|
this._state.numformat = xfs.asc_getNumFormat();
|
||||||
this._state.numformatinfo = val;
|
this._state.numformatinfo = val;
|
||||||
val = val.asc_getType();
|
val = val.asc_getType();
|
||||||
if (this._state.numformattype !== val) {
|
if (this._state.numformattype !== val) {
|
||||||
|
@ -2387,7 +2387,7 @@ define([
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val = info.asc_getAngle();
|
val = xfs.asc_getAngle();
|
||||||
if (this._state.angle !== val) {
|
if (this._state.angle !== val) {
|
||||||
toolbar.btnTextOrient.menu.clearAll();
|
toolbar.btnTextOrient.menu.clearAll();
|
||||||
switch(val) {
|
switch(val) {
|
||||||
|
@ -2501,6 +2501,7 @@ define([
|
||||||
};
|
};
|
||||||
|
|
||||||
var selectionType = info.asc_getSelectionType(),
|
var selectionType = info.asc_getSelectionType(),
|
||||||
|
xfs = info.asc_getXfs(),
|
||||||
coauth_disable = false;
|
coauth_disable = false;
|
||||||
|
|
||||||
if ( _disableEditOptions(selectionType, coauth_disable) ) return;
|
if ( _disableEditOptions(selectionType, coauth_disable) ) return;
|
||||||
|
@ -2508,9 +2509,9 @@ define([
|
||||||
if (selectionType == Asc.c_oAscSelectionType.RangeChart || selectionType == Asc.c_oAscSelectionType.RangeChartText)
|
if (selectionType == Asc.c_oAscSelectionType.RangeChart || selectionType == Asc.c_oAscSelectionType.RangeChartText)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var val = info.asc_getNumFormatInfo();
|
var val = xfs.asc_getNumFormatInfo();
|
||||||
if ( val ) {
|
if ( val ) {
|
||||||
this._state.numformat = info.asc_getNumFormat();
|
this._state.numformat = xfs.asc_getNumFormat();
|
||||||
this._state.numformatinfo = val;
|
this._state.numformatinfo = val;
|
||||||
val = val.asc_getType();
|
val = val.asc_getType();
|
||||||
if (this._state.numformattype !== val) {
|
if (this._state.numformattype !== val) {
|
||||||
|
@ -2803,14 +2804,14 @@ define([
|
||||||
buttons: [{value: 'ok', caption: this.textInsert}, 'close'],
|
buttons: [{value: 'ok', caption: this.textInsert}, 'close'],
|
||||||
handler: function(dlg, result, settings) {
|
handler: function(dlg, result, settings) {
|
||||||
if (result == 'ok') {
|
if (result == 'ok') {
|
||||||
me.api.asc_insertSymbol(settings.font ? settings.font : me.api.asc_getCellInfo().asc_getFont().asc_getName(), settings.code);
|
me.api.asc_insertSymbol(settings.font ? settings.font : me.api.asc_getCellInfo().asc_getXfs().asc_getFontName(), settings.code);
|
||||||
} else
|
} else
|
||||||
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
|
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
win.show();
|
win.show();
|
||||||
win.on('symbol:dblclick', function(cmp, result, settings) {
|
win.on('symbol:dblclick', function(cmp, result, settings) {
|
||||||
me.api.asc_insertSymbol(settings.font ? settings.font : me.api.asc_getCellInfo().asc_getFont().asc_getName(), settings.code);
|
me.api.asc_insertSymbol(settings.font ? settings.font : me.api.asc_getCellInfo().asc_getXfs().asc_getFontName(), settings.code);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -3043,7 +3044,7 @@ define([
|
||||||
|
|
||||||
_getApiTextSize: function() {
|
_getApiTextSize: function() {
|
||||||
var cellInfo = this.api.asc_getCellInfo();
|
var cellInfo = this.api.asc_getCellInfo();
|
||||||
return cellInfo ? cellInfo.asc_getFont().asc_getSize() : 12;
|
return cellInfo ? cellInfo.asc_getXfs().asc_getFontSize() : 12;
|
||||||
},
|
},
|
||||||
|
|
||||||
_setTableFormat: function(fmtname) {
|
_setTableFormat: function(fmtname) {
|
||||||
|
|
|
@ -446,12 +446,13 @@ define([
|
||||||
if (props ) {
|
if (props ) {
|
||||||
this._noApply = true;
|
this._noApply = true;
|
||||||
|
|
||||||
var value = props.asc_getAngle();
|
var xfs = props.asc_getXfs(),
|
||||||
|
value = xfs.asc_getAngle();
|
||||||
if (Math.abs(this._state.CellAngle - value) > 0.1 || (this._state.CellAngle === undefined) && (this._state.CellAngle !== value)) {
|
if (Math.abs(this._state.CellAngle - value) > 0.1 || (this._state.CellAngle === undefined) && (this._state.CellAngle !== value)) {
|
||||||
this.spnAngle.setValue((value !== null) ? value : '', true);
|
this.spnAngle.setValue((value !== null) ? value : '', true);
|
||||||
this._state.CellAngle = value;
|
this._state.CellAngle = value;
|
||||||
}
|
}
|
||||||
this.fill = props.asc_getFill();
|
this.fill = xfs.asc_getFill();
|
||||||
if (this.fill) {
|
if (this.fill) {
|
||||||
this.pattern = this.fill.asc_getPatternFill();
|
this.pattern = this.fill.asc_getPatternFill();
|
||||||
this.gradient = this.fill.asc_getGradientFill();
|
this.gradient = this.fill.asc_getGradientFill();
|
||||||
|
|
|
@ -955,38 +955,38 @@ define([
|
||||||
val;
|
val;
|
||||||
|
|
||||||
/* read font name */
|
/* read font name */
|
||||||
var fontparam = fontobj.asc_getName();
|
var fontparam = fontobj.asc_getFontName();
|
||||||
if (fontparam != this.cmbFonts[idx].getValue()) {
|
if (fontparam != this.cmbFonts[idx].getValue()) {
|
||||||
Common.NotificationCenter.trigger('fonts:change', fontobj);
|
Common.NotificationCenter.trigger('fonts:change', fontobj);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* read font params */
|
/* read font params */
|
||||||
val = fontobj.asc_getBold();
|
val = fontobj.asc_getFontBold();
|
||||||
if (this.btnBold[idx].isActive() !== val)
|
if (this.btnBold[idx].isActive() !== val)
|
||||||
this.btnBold[idx].toggle(val === true, true);
|
this.btnBold[idx].toggle(val === true, true);
|
||||||
|
|
||||||
val = fontobj.asc_getItalic();
|
val = fontobj.asc_getFontItalic();
|
||||||
if (this.btnItalic[idx].isActive() !== val)
|
if (this.btnItalic[idx].isActive() !== val)
|
||||||
this.btnItalic[idx].toggle(val === true, true);
|
this.btnItalic[idx].toggle(val === true, true);
|
||||||
|
|
||||||
val = fontobj.asc_getUnderline();
|
val = fontobj.asc_getFontUnderline();
|
||||||
if (this.btnUnderline[idx].isActive() !== val)
|
if (this.btnUnderline[idx].isActive() !== val)
|
||||||
this.btnUnderline[idx].toggle(val === true, true);
|
this.btnUnderline[idx].toggle(val === true, true);
|
||||||
|
|
||||||
val = fontobj.asc_getStrikeout();
|
val = fontobj.asc_getFontStrikeout();
|
||||||
if (this.btnStrikeout[idx].isActive() !== val)
|
if (this.btnStrikeout[idx].isActive() !== val)
|
||||||
this.btnStrikeout[idx].toggle(val === true, true);
|
this.btnStrikeout[idx].toggle(val === true, true);
|
||||||
|
|
||||||
val = fontobj.asc_getSubscript();
|
val = fontobj.asc_getFontSubscript();
|
||||||
if (this.btnSubscript[idx].isActive() !== val)
|
if (this.btnSubscript[idx].isActive() !== val)
|
||||||
this.btnSubscript[idx].toggle(val === true, true);
|
this.btnSubscript[idx].toggle(val === true, true);
|
||||||
|
|
||||||
val = fontobj.asc_getSuperscript();
|
val = fontobj.asc_getFontSuperscript();
|
||||||
if (this.btnSuperscript[idx].isActive() !== val)
|
if (this.btnSuperscript[idx].isActive() !== val)
|
||||||
this.btnSuperscript[idx].toggle(val === true, true);
|
this.btnSuperscript[idx].toggle(val === true, true);
|
||||||
|
|
||||||
/* read font size */
|
/* read font size */
|
||||||
var str_size = fontobj.asc_getSize();
|
var str_size = fontobj.asc_getFontSize();
|
||||||
if (this.cmbFontSize[idx].getValue() !== str_size)
|
if (this.cmbFontSize[idx].getValue() !== str_size)
|
||||||
this.cmbFontSize[idx].setValue((str_size!==undefined) ? str_size : '');
|
this.cmbFontSize[idx].setValue((str_size!==undefined) ? str_size : '');
|
||||||
|
|
||||||
|
@ -994,7 +994,7 @@ define([
|
||||||
var clr,
|
var clr,
|
||||||
color,
|
color,
|
||||||
fontColorPicker = this.mnuTextColorPicker[idx];
|
fontColorPicker = this.mnuTextColorPicker[idx];
|
||||||
color = fontobj.asc_getColor();
|
color = fontobj.asc_getFontColor();
|
||||||
if (color) {
|
if (color) {
|
||||||
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
|
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
|
||||||
clr = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() };
|
clr = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value() };
|
||||||
|
|
|
@ -311,7 +311,8 @@ define([
|
||||||
|
|
||||||
var iscellmenu, isrowmenu, iscolmenu, isallmenu, ischartmenu, isimagemenu, istextshapemenu, isshapemenu, istextchartmenu;
|
var iscellmenu, isrowmenu, iscolmenu, isallmenu, ischartmenu, isimagemenu, istextshapemenu, isshapemenu, istextchartmenu;
|
||||||
var iscelllocked = cellinfo.asc_getLocked(),
|
var iscelllocked = cellinfo.asc_getLocked(),
|
||||||
seltype = cellinfo.asc_getSelectionType();
|
seltype = cellinfo.asc_getSelectionType(),
|
||||||
|
xfs = cellinfo.asc_getXfs();
|
||||||
|
|
||||||
switch (seltype) {
|
switch (seltype) {
|
||||||
case Asc.c_oAscSelectionType.RangeCells: iscellmenu = true; break;
|
case Asc.c_oAscSelectionType.RangeCells: iscellmenu = true; break;
|
||||||
|
@ -420,7 +421,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
arrItems.push(
|
arrItems.push(
|
||||||
cellinfo.asc_getWrapText() ?
|
xfs.asc_getWrapText() ?
|
||||||
{
|
{
|
||||||
caption: me.menuUnwrap,
|
caption: me.menuUnwrap,
|
||||||
event: 'unwrap'
|
event: 'unwrap'
|
||||||
|
|
|
@ -189,7 +189,7 @@ define([
|
||||||
|
|
||||||
var me = this,
|
var me = this,
|
||||||
palette = me.getView('EditCell').paletteFillColor,
|
palette = me.getView('EditCell').paletteFillColor,
|
||||||
color = me._sdkToThemeColor(me._cellInfo.asc_getFillColor());
|
color = me._sdkToThemeColor(me._cellInfo.asc_getXfs().asc_getFillColor());
|
||||||
|
|
||||||
if (palette) {
|
if (palette) {
|
||||||
palette.select(color);
|
palette.select(color);
|
||||||
|
@ -215,11 +215,12 @@ define([
|
||||||
|
|
||||||
var me = this,
|
var me = this,
|
||||||
$pageTextFormat = $('.page[data-page=edit-text-format]'),
|
$pageTextFormat = $('.page[data-page=edit-text-format]'),
|
||||||
hAlign = me._cellInfo.asc_getHorAlign(),
|
xfs = me._cellInfo.asc_getXfs(),
|
||||||
vAlign = me._cellInfo.asc_getVertAlign(),
|
hAlign = xfs.asc_getHorAlign(),
|
||||||
|
vAlign = xfs.asc_getVertAlign(),
|
||||||
hAlignStr = 'left',
|
hAlignStr = 'left',
|
||||||
vAlignStr = 'bottom',
|
vAlignStr = 'bottom',
|
||||||
isWrapText = me._cellInfo.asc_getWrapText();
|
isWrapText = xfs.asc_getWrapText();
|
||||||
|
|
||||||
if (vAlign == Asc.c_oAscVAlign.Top)
|
if (vAlign == Asc.c_oAscVAlign.Top)
|
||||||
vAlignStr = 'top';
|
vAlignStr = 'top';
|
||||||
|
@ -278,20 +279,20 @@ define([
|
||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
// Init font name
|
// Init font name
|
||||||
var fontName = fontObj.asc_getName() || this.textFonts;
|
var fontName = fontObj.asc_getFontName() || this.textFonts;
|
||||||
this._fontInfo.name = fontName;
|
this._fontInfo.name = fontName;
|
||||||
|
|
||||||
$('#font-fonts .item-title').html(fontName);
|
$('#font-fonts .item-title').html(fontName);
|
||||||
|
|
||||||
|
|
||||||
// Init font style
|
// Init font style
|
||||||
$('#font-bold').toggleClass('active', fontObj.asc_getBold() === true);
|
$('#font-bold').toggleClass('active', fontObj.asc_getFontBold() === true);
|
||||||
$('#font-italic').toggleClass('active', fontObj.asc_getItalic() === true);
|
$('#font-italic').toggleClass('active', fontObj.asc_getFontItalic() === true);
|
||||||
$('#font-underline').toggleClass('active', fontObj.asc_getUnderline() === true);
|
$('#font-underline').toggleClass('active', fontObj.asc_getFontUnderline() === true);
|
||||||
|
|
||||||
|
|
||||||
// Init font size
|
// Init font size
|
||||||
this._fontInfo.size = fontObj.asc_getSize();
|
this._fontInfo.size = fontObj.asc_getFontSize();
|
||||||
var displaySize = this._fontInfo.size;
|
var displaySize = this._fontInfo.size;
|
||||||
|
|
||||||
_.isUndefined(displaySize) ? displaySize = this.textAuto : displaySize = displaySize + ' ' + this.textPt;
|
_.isUndefined(displaySize) ? displaySize = this.textAuto : displaySize = displaySize + ' ' + this.textPt;
|
||||||
|
@ -301,7 +302,7 @@ define([
|
||||||
|
|
||||||
|
|
||||||
// Init font color
|
// Init font color
|
||||||
this._fontInfo.color = fontObj.asc_getColor();
|
this._fontInfo.color = fontObj.asc_getFontColor();
|
||||||
|
|
||||||
var color = this._fontInfo.color,
|
var color = this._fontInfo.color,
|
||||||
clr = me._sdkToThemeColor(color);
|
clr = me._sdkToThemeColor(color);
|
||||||
|
@ -319,14 +320,14 @@ define([
|
||||||
selectionType = cellInfo.asc_getSelectionType(),
|
selectionType = cellInfo.asc_getSelectionType(),
|
||||||
// coAuthDisable = (!this.toolbar.mode.isEditMailMerge && !this.toolbar.mode.isEditDiagram) ? (cellInfo.asc_getLocked()===true || cellInfo.asc_getLockedTable()===true) : false,
|
// coAuthDisable = (!this.toolbar.mode.isEditMailMerge && !this.toolbar.mode.isEditDiagram) ? (cellInfo.asc_getLocked()===true || cellInfo.asc_getLockedTable()===true) : false,
|
||||||
// editOptionsDisabled = this._disableEditOptions(selectionType, coAuthDisable),
|
// editOptionsDisabled = this._disableEditOptions(selectionType, coAuthDisable),
|
||||||
_fontInfo = cellInfo.asc_getFont(),
|
xfs = cellInfo.asc_getXfs(),
|
||||||
val,
|
val,
|
||||||
need_disable = false;
|
need_disable = false;
|
||||||
|
|
||||||
me.initFontSettings(_fontInfo);
|
me.initFontSettings(xfs);
|
||||||
|
|
||||||
// Init fill color
|
// Init fill color
|
||||||
var color = cellInfo.asc_getFillColor(),
|
var color = xfs.asc_getFillColor(),
|
||||||
clr = me._sdkToThemeColor(color);
|
clr = me._sdkToThemeColor(color);
|
||||||
|
|
||||||
$('#fill-color .color-preview').css('background-color', '#' + (_.isObject(clr) ? clr.color : clr));
|
$('#fill-color .color-preview').css('background-color', '#' + (_.isObject(clr) ? clr.color : clr));
|
||||||
|
|
|
@ -498,7 +498,7 @@ define([
|
||||||
// ismultiselect = cellInfo.asc_getMultiselect();
|
// ismultiselect = cellInfo.asc_getMultiselect();
|
||||||
// documentHolder.ssMenu.formatTableName = (isintable) ? formatTableInfo.asc_getTableName() : null;
|
// documentHolder.ssMenu.formatTableName = (isintable) ? formatTableInfo.asc_getTableName() : null;
|
||||||
// documentHolder.ssMenu.cellColor = cellInfo.asc_getFill().asc_getColor();
|
// documentHolder.ssMenu.cellColor = cellInfo.asc_getFill().asc_getColor();
|
||||||
// documentHolder.ssMenu.fontColor = cellInfo.asc_getFont().asc_getColor();
|
// documentHolder.ssMenu.fontColor = cellInfo.asc_getXfs().asc_getFontColor();
|
||||||
//
|
//
|
||||||
// documentHolder.pmiInsertEntire.setVisible(isRow||isCol);
|
// documentHolder.pmiInsertEntire.setVisible(isRow||isCol);
|
||||||
// documentHolder.pmiInsertEntire.setCaption((isRow) ? this.textInsertTop : this.textInsertLeft);
|
// documentHolder.pmiInsertEntire.setCaption((isRow) ? this.textInsertTop : this.textInsertLeft);
|
||||||
|
|
|
@ -129,12 +129,12 @@ define([
|
||||||
|
|
||||||
|
|
||||||
// Init font name
|
// Init font name
|
||||||
var fontName = _fontInfo.asc_getName() || this.textFonts;
|
var fontName = _fontInfo.asc_getFontName() || this.textFonts;
|
||||||
$('#font-fonts .item-title').html(fontName);
|
$('#font-fonts .item-title').html(fontName);
|
||||||
|
|
||||||
|
|
||||||
// Init font size
|
// Init font size
|
||||||
var displaySize = _fontInfo.asc_getSize();
|
var displaySize = _fontInfo.asc_getFontSize();
|
||||||
_.isUndefined(displaySize) ? displaySize = this.textAuto : displaySize = displaySize + ' ' + this.textPt;
|
_.isUndefined(displaySize) ? displaySize = this.textAuto : displaySize = displaySize + ' ' + this.textPt;
|
||||||
|
|
||||||
$('#font-fonts .item-after span:first-child').html(displaySize);
|
$('#font-fonts .item-after span:first-child').html(displaySize);
|
||||||
|
@ -142,13 +142,13 @@ define([
|
||||||
|
|
||||||
|
|
||||||
// Init font style
|
// Init font style
|
||||||
$('#font-bold').toggleClass('active', _fontInfo.asc_getBold() === true);
|
$('#font-bold').toggleClass('active', _fontInfo.asc_getFontBold() === true);
|
||||||
$('#font-italic').toggleClass('active', _fontInfo.asc_getItalic() === true);
|
$('#font-italic').toggleClass('active', _fontInfo.asc_getFontItalic() === true);
|
||||||
$('#font-underline').toggleClass('active', _fontInfo.asc_getUnderline() === true);
|
$('#font-underline').toggleClass('active', _fontInfo.asc_getFontUnderline() === true);
|
||||||
|
|
||||||
|
|
||||||
// Init font color
|
// Init font color
|
||||||
var color = _fontInfo.asc_getColor(),
|
var color = _fontInfo.asc_getFontColor(),
|
||||||
clr = me._sdkToThemeColor(color);
|
clr = me._sdkToThemeColor(color);
|
||||||
|
|
||||||
$('#font-color .color-preview').css('background-color', '#' + (_.isObject(clr) ? clr.color : clr));
|
$('#font-color .color-preview').css('background-color', '#' + (_.isObject(clr) ? clr.color : clr));
|
||||||
|
@ -156,8 +156,8 @@ define([
|
||||||
// Align
|
// Align
|
||||||
$('#edit-text-align-block').css('display', (_textIn == TextType.inShape) ? 'block' : 'none');
|
$('#edit-text-align-block').css('display', (_textIn == TextType.inShape) ? 'block' : 'none');
|
||||||
|
|
||||||
var hAlign = _cellInfo.asc_getHorAlign(),
|
var hAlign = _fontInfo.asc_getHorAlign(),
|
||||||
vAlign = _cellInfo.asc_getVertAlign();
|
vAlign = _fontInfo.asc_getVertAlign();
|
||||||
|
|
||||||
$('#font-left').toggleClass('active', hAlign===AscCommon.align_Left);
|
$('#font-left').toggleClass('active', hAlign===AscCommon.align_Left);
|
||||||
$('#font-center').toggleClass('active', hAlign===AscCommon.align_Center);
|
$('#font-center').toggleClass('active', hAlign===AscCommon.align_Center);
|
||||||
|
@ -322,7 +322,7 @@ define([
|
||||||
}
|
}
|
||||||
|
|
||||||
_cellInfo = info;
|
_cellInfo = info;
|
||||||
_fontInfo = info.asc_getFont();
|
_fontInfo = info.asc_getXfs();
|
||||||
|
|
||||||
var selectType = info.asc_getSelectionType();
|
var selectType = info.asc_getSelectionType();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue