[SSE] AscCommonExcel->Asc (Bug 50163)
This commit is contained in:
parent
5c8114626a
commit
51e4936ae7
|
@ -767,11 +767,11 @@ define([ 'text!spreadsheeteditor/main/app/template/FormatRulesEditDlg.template',
|
||||||
if (index>=len) return;
|
if (index>=len) return;
|
||||||
var values = [];
|
var values = [];
|
||||||
for (var i = 0; i < preset.length; i++) {
|
for (var i = 0; i < preset.length; i++) {
|
||||||
var formatValueObject = new AscCommonExcel.CConditionalFormatValueObject();
|
var formatValueObject = new Asc.CConditionalFormatValueObject();
|
||||||
formatValueObject.asc_setType(preset[i][0]);
|
formatValueObject.asc_setType(preset[i][0]);
|
||||||
formatValueObject.asc_setVal(preset[i][1]);
|
formatValueObject.asc_setVal(preset[i][1]);
|
||||||
if (preset[i][2]) {
|
if (preset[i][2]) {
|
||||||
// formatValueObject.asc_setFormula(new AscCommonExcel.CFormulaCF());
|
// formatValueObject.asc_setFormula(new Asc.CFormulaCF());
|
||||||
// formatValueObject.asc_getFormula().asc_setText(preset[1][i][2]);
|
// formatValueObject.asc_getFormula().asc_setText(preset[1][i][2]);
|
||||||
}
|
}
|
||||||
values.push(formatValueObject);
|
values.push(formatValueObject);
|
||||||
|
@ -1251,7 +1251,7 @@ define([ 'text!spreadsheeteditor/main/app/template/FormatRulesEditDlg.template',
|
||||||
this.cmbPercent.setValue(isPercent ? 1 : 0);
|
this.cmbPercent.setValue(isPercent ? 1 : 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var xfs = this.xfsFormat ? this.xfsFormat : (new AscCommonExcel.CellXfs());
|
var xfs = this.xfsFormat ? this.xfsFormat : (new Asc.CellXfs());
|
||||||
this.fillXfsFormatInfo(xfs);
|
this.fillXfsFormatInfo(xfs);
|
||||||
this.previewFormat();
|
this.previewFormat();
|
||||||
},
|
},
|
||||||
|
@ -1315,7 +1315,7 @@ define([ 'text!spreadsheeteditor/main/app/template/FormatRulesEditDlg.template',
|
||||||
var rec = this.ruleStore.findWhere({index: this.cmbCategory.getValue()});
|
var rec = this.ruleStore.findWhere({index: this.cmbCategory.getValue()});
|
||||||
|
|
||||||
if (rec) {
|
if (rec) {
|
||||||
props = this._originalProps || new AscCommonExcel.CConditionalFormattingRule();
|
props = this._originalProps || new Asc.CConditionalFormattingRule();
|
||||||
var type = rec.get('type');
|
var type = rec.get('type');
|
||||||
props.asc_setType(type);
|
props.asc_setType(type);
|
||||||
if (type == Asc.c_oAscCFType.containsText || type == Asc.c_oAscCFType.containsBlanks || type == Asc.c_oAscCFType.duplicateValues ||
|
if (type == Asc.c_oAscCFType.containsText || type == Asc.c_oAscCFType.containsBlanks || type == Asc.c_oAscCFType.duplicateValues ||
|
||||||
|
@ -1358,12 +1358,12 @@ define([ 'text!spreadsheeteditor/main/app/template/FormatRulesEditDlg.template',
|
||||||
props.asc_setValue1(this.txtRange1.getValue());
|
props.asc_setValue1(this.txtRange1.getValue());
|
||||||
break;
|
break;
|
||||||
case Asc.c_oAscCFType.colorScale:
|
case Asc.c_oAscCFType.colorScale:
|
||||||
var scaleProps = new AscCommonExcel.CColorScale();
|
var scaleProps = new Asc.CColorScale();
|
||||||
var scalesCount = rec.get('num');
|
var scalesCount = rec.get('num');
|
||||||
var arr = (scalesCount==2) ? [this.scaleControls[0], this.scaleControls[2]] : this.scaleControls;
|
var arr = (scalesCount==2) ? [this.scaleControls[0], this.scaleControls[2]] : this.scaleControls;
|
||||||
var colors = [], scales = [];
|
var colors = [], scales = [];
|
||||||
for (var i=0; i<scalesCount; i++) {
|
for (var i=0; i<scalesCount; i++) {
|
||||||
var scale = new AscCommonExcel.CConditionalFormatValueObject();
|
var scale = new Asc.CConditionalFormatValueObject();
|
||||||
var controls = arr[i];
|
var controls = arr[i];
|
||||||
scale.asc_setType(controls.combo.getValue());
|
scale.asc_setType(controls.combo.getValue());
|
||||||
scale.asc_setVal(controls.range.getValue());
|
scale.asc_setVal(controls.range.getValue());
|
||||||
|
@ -1375,11 +1375,11 @@ define([ 'text!spreadsheeteditor/main/app/template/FormatRulesEditDlg.template',
|
||||||
props.asc_setColorScaleOrDataBarOrIconSetRule(scaleProps);
|
props.asc_setColorScaleOrDataBarOrIconSetRule(scaleProps);
|
||||||
break;
|
break;
|
||||||
case Asc.c_oAscCFType.dataBar:
|
case Asc.c_oAscCFType.dataBar:
|
||||||
var barProps = new AscCommonExcel.CDataBar();
|
var barProps = new Asc.CDataBar();
|
||||||
var arr = this.barControls;
|
var arr = this.barControls;
|
||||||
var bars = [];
|
var bars = [];
|
||||||
for (var i=0; i<arr.length; i++) {
|
for (var i=0; i<arr.length; i++) {
|
||||||
var bar = new AscCommonExcel.CConditionalFormatValueObject();
|
var bar = new Asc.CConditionalFormatValueObject();
|
||||||
var controls = arr[i],
|
var controls = arr[i],
|
||||||
bartype = controls.combo.getValue();
|
bartype = controls.combo.getValue();
|
||||||
bar.asc_setType(bartype);
|
bar.asc_setType(bartype);
|
||||||
|
@ -1411,7 +1411,7 @@ define([ 'text!spreadsheeteditor/main/app/template/FormatRulesEditDlg.template',
|
||||||
props.asc_setColorScaleOrDataBarOrIconSetRule(barProps);
|
props.asc_setColorScaleOrDataBarOrIconSetRule(barProps);
|
||||||
break;
|
break;
|
||||||
case Asc.c_oAscCFType.iconSet:
|
case Asc.c_oAscCFType.iconSet:
|
||||||
var iconsProps = new AscCommonExcel.CIconSet();
|
var iconsProps = new Asc.CIconSet();
|
||||||
iconsProps.asc_setShowValue(this.chIconShow.getValue()!=='checked');
|
iconsProps.asc_setShowValue(this.chIconShow.getValue()!=='checked');
|
||||||
iconsProps.asc_setReverse(!!this.iconsProps.isReverse);
|
iconsProps.asc_setReverse(!!this.iconsProps.isReverse);
|
||||||
iconsProps.asc_setIconSet(this.iconsProps.iconsSet);
|
iconsProps.asc_setIconSet(this.iconsProps.iconsSet);
|
||||||
|
@ -1422,7 +1422,7 @@ define([ 'text!spreadsheeteditor/main/app/template/FormatRulesEditDlg.template',
|
||||||
values = [];
|
values = [];
|
||||||
for (var i=0; i<len; i++) {
|
for (var i=0; i<len; i++) {
|
||||||
var controls = arr[i],
|
var controls = arr[i],
|
||||||
value = new AscCommonExcel.CConditionalFormatValueObject();
|
value = new Asc.CConditionalFormatValueObject();
|
||||||
value.asc_setType(controls.cmbType.getValue());
|
value.asc_setType(controls.cmbType.getValue());
|
||||||
value.asc_setVal(controls.value.getValue());
|
value.asc_setVal(controls.value.getValue());
|
||||||
value.asc_setGte(controls.cmbOperator.getValue());
|
value.asc_setGte(controls.cmbOperator.getValue());
|
||||||
|
@ -1433,7 +1433,7 @@ define([ 'text!spreadsheeteditor/main/app/template/FormatRulesEditDlg.template',
|
||||||
var items = this.collectionPresets.at(k).get('icons');
|
var items = this.collectionPresets.at(k).get('icons');
|
||||||
for (var j=0; j<items.length; j++) {
|
for (var j=0; j<items.length; j++) {
|
||||||
if (icon==items[j]) {
|
if (icon==items[j]) {
|
||||||
icon = new AscCommonExcel.CConditionalFormatIconSet();
|
icon = new Asc.CConditionalFormatIconSet();
|
||||||
icon.asc_setIconSet(k);
|
icon.asc_setIconSet(k);
|
||||||
icon.asc_setIconId(j);
|
icon.asc_setIconId(j);
|
||||||
this.iconsProps.isReverse ? icons.unshift(icon) : icons.push(icon);
|
this.iconsProps.isReverse ? icons.unshift(icon) : icons.push(icon);
|
||||||
|
@ -1469,7 +1469,7 @@ define([ 'text!spreadsheeteditor/main/app/template/FormatRulesEditDlg.template',
|
||||||
|
|
||||||
if (rec) {
|
if (rec) {
|
||||||
var type = rec.get('type');
|
var type = rec.get('type');
|
||||||
this._changedProps = new AscCommonExcel.CConditionalFormattingRule();
|
this._changedProps = new Asc.CConditionalFormattingRule();
|
||||||
this._changedProps.asc_setType(type);
|
this._changedProps.asc_setType(type);
|
||||||
if (type == Asc.c_oAscCFType.containsText || type == Asc.c_oAscCFType.containsBlanks || type == Asc.c_oAscCFType.duplicateValues ||
|
if (type == Asc.c_oAscCFType.containsText || type == Asc.c_oAscCFType.containsBlanks || type == Asc.c_oAscCFType.duplicateValues ||
|
||||||
type == Asc.c_oAscCFType.timePeriod || type == Asc.c_oAscCFType.aboveAverage ||
|
type == Asc.c_oAscCFType.timePeriod || type == Asc.c_oAscCFType.aboveAverage ||
|
||||||
|
@ -1480,19 +1480,19 @@ define([ 'text!spreadsheeteditor/main/app/template/FormatRulesEditDlg.template',
|
||||||
var arr = (scalesCount==2) ? [this.scaleControls[0], this.scaleControls[2]] : this.scaleControls;
|
var arr = (scalesCount==2) ? [this.scaleControls[0], this.scaleControls[2]] : this.scaleControls;
|
||||||
var colors = [], scales = [];
|
var colors = [], scales = [];
|
||||||
for (var i=0; i<arr.length; i++) {
|
for (var i=0; i<arr.length; i++) {
|
||||||
var scale = new AscCommonExcel.CConditionalFormatValueObject();
|
var scale = new Asc.CConditionalFormatValueObject();
|
||||||
var controls = arr[i];
|
var controls = arr[i];
|
||||||
scale.asc_setType(controls.combo.getValue());
|
scale.asc_setType(controls.combo.getValue());
|
||||||
scale.asc_setVal(controls.range.getValue());
|
scale.asc_setVal(controls.range.getValue());
|
||||||
scales.push(scale);
|
scales.push(scale);
|
||||||
colors.push(Common.Utils.ThemeColor.getRgbColor(controls.colorPicker.currentColor));
|
colors.push(Common.Utils.ThemeColor.getRgbColor(controls.colorPicker.currentColor));
|
||||||
}
|
}
|
||||||
this.scaleProps = new AscCommonExcel.CColorScale();
|
this.scaleProps = new Asc.CColorScale();
|
||||||
this.scaleProps.asc_setColors(colors);
|
this.scaleProps.asc_setColors(colors);
|
||||||
this.scaleProps.asc_setCFVOs(scales);
|
this.scaleProps.asc_setCFVOs(scales);
|
||||||
this._changedProps.asc_setColorScaleOrDataBarOrIconSetRule(this.scaleProps);
|
this._changedProps.asc_setColorScaleOrDataBarOrIconSetRule(this.scaleProps);
|
||||||
} else if (type == Asc.c_oAscCFType.dataBar) {
|
} else if (type == Asc.c_oAscCFType.dataBar) {
|
||||||
this.barProps = new AscCommonExcel.CDataBar();
|
this.barProps = new Asc.CDataBar();
|
||||||
this.barProps.asc_setGradient(this.cmbFill.getValue());
|
this.barProps.asc_setGradient(this.cmbFill.getValue());
|
||||||
this.barProps.asc_setColor(Common.Utils.ThemeColor.getRgbColor(this.btnPosFill.colorPicker.currentColor));
|
this.barProps.asc_setColor(Common.Utils.ThemeColor.getRgbColor(this.btnPosFill.colorPicker.currentColor));
|
||||||
var hasBorder = !this.cmbBorder.getValue();
|
var hasBorder = !this.cmbBorder.getValue();
|
||||||
|
@ -1581,7 +1581,7 @@ define([ 'text!spreadsheeteditor/main/app/template/FormatRulesEditDlg.template',
|
||||||
},
|
},
|
||||||
|
|
||||||
onFormatsSelect: function(menu, item) {
|
onFormatsSelect: function(menu, item) {
|
||||||
var xfs = new AscCommonExcel.CellXfs();
|
var xfs = new Asc.CellXfs();
|
||||||
var settings = item.options.presetSettings;
|
var settings = item.options.presetSettings;
|
||||||
settings && settings.fontColor && xfs.asc_setFontColor(Common.Utils.ThemeColor.getRgbColor(settings.fontColor));
|
settings && settings.fontColor && xfs.asc_setFontColor(Common.Utils.ThemeColor.getRgbColor(settings.fontColor));
|
||||||
settings && settings.fillColor && xfs.asc_setFillColor(Common.Utils.ThemeColor.getRgbColor(settings.fillColor));
|
settings && settings.fillColor && xfs.asc_setFillColor(Common.Utils.ThemeColor.getRgbColor(settings.fillColor));
|
||||||
|
@ -1604,29 +1604,29 @@ define([ 'text!spreadsheeteditor/main/app/template/FormatRulesEditDlg.template',
|
||||||
clearFormat: function() {
|
clearFormat: function() {
|
||||||
this.xfsFormat = null;
|
this.xfsFormat = null;
|
||||||
this._changedProps && this._changedProps.asc_setDxf(null);
|
this._changedProps && this._changedProps.asc_setDxf(null);
|
||||||
this.fillXfsFormatInfo(new AscCommonExcel.CellXfs());
|
this.fillXfsFormatInfo(new Asc.CellXfs());
|
||||||
this.previewFormat();
|
this.previewFormat();
|
||||||
},
|
},
|
||||||
|
|
||||||
onBoldClick: function() {
|
onBoldClick: function() {
|
||||||
!this.xfsFormat && (this.xfsFormat = new AscCommonExcel.CellXfs());
|
!this.xfsFormat && (this.xfsFormat = new Asc.CellXfs());
|
||||||
this.xfsFormat.asc_setFontBold(this.btnBold.isActive());
|
this.xfsFormat.asc_setFontBold(this.btnBold.isActive());
|
||||||
this.previewFormat();
|
this.previewFormat();
|
||||||
},
|
},
|
||||||
|
|
||||||
onItalicClick: function() {
|
onItalicClick: function() {
|
||||||
!this.xfsFormat && (this.xfsFormat = new AscCommonExcel.CellXfs());
|
!this.xfsFormat && (this.xfsFormat = new Asc.CellXfs());
|
||||||
this.xfsFormat.asc_setFontItalic(this.btnItalic.isActive());
|
this.xfsFormat.asc_setFontItalic(this.btnItalic.isActive());
|
||||||
this.previewFormat();
|
this.previewFormat();
|
||||||
},
|
},
|
||||||
|
|
||||||
onUnderlineClick: function() {
|
onUnderlineClick: function() {
|
||||||
!this.xfsFormat && (this.xfsFormat = new AscCommonExcel.CellXfs());
|
!this.xfsFormat && (this.xfsFormat = new Asc.CellXfs());
|
||||||
this.xfsFormat.asc_setFontUnderline(this.btnUnderline.isActive());
|
this.xfsFormat.asc_setFontUnderline(this.btnUnderline.isActive());
|
||||||
this.previewFormat();
|
this.previewFormat();
|
||||||
},
|
},
|
||||||
onStrikeoutClick: function() {
|
onStrikeoutClick: function() {
|
||||||
!this.xfsFormat && (this.xfsFormat = new AscCommonExcel.CellXfs());
|
!this.xfsFormat && (this.xfsFormat = new Asc.CellXfs());
|
||||||
this.xfsFormat.asc_setFontStrikeout(this.btnStrikeout.isActive());
|
this.xfsFormat.asc_setFontStrikeout(this.btnStrikeout.isActive());
|
||||||
this.previewFormat();
|
this.previewFormat();
|
||||||
},
|
},
|
||||||
|
@ -1691,7 +1691,7 @@ define([ 'text!spreadsheeteditor/main/app/template/FormatRulesEditDlg.template',
|
||||||
} else if (item.options.borderId != 'none') {
|
} else if (item.options.borderId != 'none') {
|
||||||
new_borders[item.options.borderId] = new Asc.asc_CBorder(bordersWidth, bordersColor);
|
new_borders[item.options.borderId] = new Asc.asc_CBorder(bordersWidth, bordersColor);
|
||||||
}
|
}
|
||||||
!this.xfsFormat && (this.xfsFormat = new AscCommonExcel.CellXfs());
|
!this.xfsFormat && (this.xfsFormat = new Asc.CellXfs());
|
||||||
this.xfsFormat.asc_setBorder(new_borders);
|
this.xfsFormat.asc_setBorder(new_borders);
|
||||||
this.previewFormat();
|
this.previewFormat();
|
||||||
}
|
}
|
||||||
|
@ -1703,7 +1703,7 @@ define([ 'text!spreadsheeteditor/main/app/template/FormatRulesEditDlg.template',
|
||||||
$('.btn-color-value-line', this.btnTextColor.cmpEl).css('background-color', '#' + clr);
|
$('.btn-color-value-line', this.btnTextColor.cmpEl).css('background-color', '#' + clr);
|
||||||
picker.currentColor = color;
|
picker.currentColor = color;
|
||||||
|
|
||||||
!this.xfsFormat && (this.xfsFormat = new AscCommonExcel.CellXfs());
|
!this.xfsFormat && (this.xfsFormat = new Asc.CellXfs());
|
||||||
this.xfsFormat.asc_setFontColor(Common.Utils.ThemeColor.getRgbColor(this.mnuTextColorPicker.currentColor));
|
this.xfsFormat.asc_setFontColor(Common.Utils.ThemeColor.getRgbColor(this.mnuTextColorPicker.currentColor));
|
||||||
this.previewFormat();
|
this.previewFormat();
|
||||||
},
|
},
|
||||||
|
@ -1718,7 +1718,7 @@ define([ 'text!spreadsheeteditor/main/app/template/FormatRulesEditDlg.template',
|
||||||
$('.btn-color-value-line', this.btnFillColor.cmpEl).css('background-color', clr=='transparent' ? 'transparent' : '#' + clr);
|
$('.btn-color-value-line', this.btnFillColor.cmpEl).css('background-color', clr=='transparent' ? 'transparent' : '#' + clr);
|
||||||
picker.currentColor = color;
|
picker.currentColor = color;
|
||||||
|
|
||||||
!this.xfsFormat && (this.xfsFormat = new AscCommonExcel.CellXfs());
|
!this.xfsFormat && (this.xfsFormat = new Asc.CellXfs());
|
||||||
this.xfsFormat.asc_setFillColor(this.mnuFillColorPicker.currentColor == 'transparent' ? null : Common.Utils.ThemeColor.getRgbColor(this.mnuFillColorPicker.currentColor));
|
this.xfsFormat.asc_setFillColor(this.mnuFillColorPicker.currentColor == 'transparent' ? null : Common.Utils.ThemeColor.getRgbColor(this.mnuFillColorPicker.currentColor));
|
||||||
this.previewFormat();
|
this.previewFormat();
|
||||||
},
|
},
|
||||||
|
@ -1728,7 +1728,7 @@ define([ 'text!spreadsheeteditor/main/app/template/FormatRulesEditDlg.template',
|
||||||
},
|
},
|
||||||
|
|
||||||
onNumberFormatSelect: function(combo, record) {
|
onNumberFormatSelect: function(combo, record) {
|
||||||
!this.xfsFormat && (this.xfsFormat = new AscCommonExcel.CellXfs());
|
!this.xfsFormat && (this.xfsFormat = new Asc.CellXfs());
|
||||||
this.xfsFormat.asc_setNumFormatInfo(record.format);
|
this.xfsFormat.asc_setNumFormatInfo(record.format);
|
||||||
this.previewFormat();
|
this.previewFormat();
|
||||||
},
|
},
|
||||||
|
|
|
@ -646,7 +646,7 @@ define([
|
||||||
this.cmbFonts[1].fillFonts(this.fontStore);
|
this.cmbFonts[1].fillFonts(this.fontStore);
|
||||||
this.updateThemeColors();
|
this.updateThemeColors();
|
||||||
|
|
||||||
this.HFObject = new AscCommonExcel.CHeaderFooterEditor(['header-left-img', 'header-center-img', 'header-right-img', 'footer-left-img', 'footer-center-img', 'footer-right-img'], 205);
|
this.HFObject = new Asc.CHeaderFooterEditor(['header-left-img', 'header-center-img', 'header-right-img', 'footer-left-img', 'footer-center-img', 'footer-right-img'], 205);
|
||||||
this._setDefaults(this.props);
|
this._setDefaults(this.props);
|
||||||
this.editorCanvas = this.$window.find('#ce-canvas-menu');
|
this.editorCanvas = this.$window.find('#ce-canvas-menu');
|
||||||
var me = this;
|
var me = this;
|
||||||
|
|
Loading…
Reference in a new issue