[SSE] Fix bug 43524
This commit is contained in:
parent
9d648aed38
commit
4da1651f5d
|
@ -401,8 +401,7 @@ define([
|
||||||
|
|
||||||
this.disableControls(this._locked);
|
this.disableControls(this._locked);
|
||||||
|
|
||||||
if (props )
|
if (props ) {
|
||||||
{
|
|
||||||
this._noApply = true;
|
this._noApply = true;
|
||||||
|
|
||||||
var value = props.asc_getAngle();
|
var value = props.asc_getAngle();
|
||||||
|
@ -411,6 +410,7 @@ define([
|
||||||
this._state.CellAngle = value;
|
this._state.CellAngle = value;
|
||||||
}
|
}
|
||||||
this.fill = props.asc_getFill2();
|
this.fill = props.asc_getFill2();
|
||||||
|
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();
|
||||||
if (this.pattern === null && this.gradient === null) {
|
if (this.pattern === null && this.gradient === null) {
|
||||||
|
@ -424,14 +424,30 @@ define([
|
||||||
if (this.pattern.asc_getType() === -1) {
|
if (this.pattern.asc_getType() === -1) {
|
||||||
var color = this.pattern.asc_getFgColor();
|
var color = this.pattern.asc_getFgColor();
|
||||||
if (color.asc_getType() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
|
if (color.asc_getType() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
|
||||||
this.CellColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue() }};
|
this.CellColor = {
|
||||||
|
Value: 1,
|
||||||
|
Color: {
|
||||||
|
color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()),
|
||||||
|
effectValue: color.asc_getValue()
|
||||||
|
}
|
||||||
|
};
|
||||||
} else {
|
} else {
|
||||||
this.CellColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB())};
|
this.CellColor = {
|
||||||
|
Value: 1,
|
||||||
|
Color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB())
|
||||||
|
};
|
||||||
}
|
}
|
||||||
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
|
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_SOLID;
|
||||||
this.FGColor = {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.CellColor.Color)};
|
this.FGColor = {
|
||||||
|
Value: 1,
|
||||||
|
Color: Common.Utils.ThemeColor.colorValue2EffectId(this.CellColor.Color)
|
||||||
|
};
|
||||||
this.BGColor = {Value: 1, Color: 'ffffff'};
|
this.BGColor = {Value: 1, Color: 'ffffff'};
|
||||||
this.GradColors[0] = {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.CellColor.Color), Position: 0};
|
this.GradColors[0] = {
|
||||||
|
Value: 1,
|
||||||
|
Color: Common.Utils.ThemeColor.colorValue2EffectId(this.CellColor.Color),
|
||||||
|
Position: 0
|
||||||
|
};
|
||||||
this.GradColors[1] = {Value: 1, Color: 'ffffff', Position: 1};
|
this.GradColors[1] = {Value: 1, Color: 'ffffff', Position: 1};
|
||||||
} else {
|
} else {
|
||||||
this.PatternFillType = this.pattern.asc_getType();
|
this.PatternFillType = this.pattern.asc_getType();
|
||||||
|
@ -447,9 +463,18 @@ define([
|
||||||
var color = this.pattern.asc_getFgColor();
|
var color = this.pattern.asc_getFgColor();
|
||||||
if (color) {
|
if (color) {
|
||||||
if (color.asc_getType() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
|
if (color.asc_getType() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
|
||||||
this.FGColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue() }};
|
this.FGColor = {
|
||||||
|
Value: 1,
|
||||||
|
Color: {
|
||||||
|
color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()),
|
||||||
|
effectValue: color.asc_getValue()
|
||||||
|
}
|
||||||
|
};
|
||||||
} else {
|
} else {
|
||||||
this.FGColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB())};
|
this.FGColor = {
|
||||||
|
Value: 1,
|
||||||
|
Color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB())
|
||||||
|
};
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
this.FGColor = {Value: 1, Color: {color: '4f81bd', effectId: 24}};
|
this.FGColor = {Value: 1, Color: {color: '4f81bd', effectId: 24}};
|
||||||
|
@ -457,14 +482,30 @@ define([
|
||||||
color = this.pattern.asc_getBgColor();
|
color = this.pattern.asc_getBgColor();
|
||||||
if (color) {
|
if (color) {
|
||||||
if (color.asc_getType() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
|
if (color.asc_getType() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
|
||||||
this.BGColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), effectValue: color.asc_getValue() }};
|
this.BGColor = {
|
||||||
|
Value: 1,
|
||||||
|
Color: {
|
||||||
|
color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()),
|
||||||
|
effectValue: color.asc_getValue()
|
||||||
|
}
|
||||||
|
};
|
||||||
} else {
|
} else {
|
||||||
this.BGColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB())};
|
this.BGColor = {
|
||||||
|
Value: 1,
|
||||||
|
Color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB())
|
||||||
|
};
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
this.BGColor = {Value: 1, Color: 'ffffff'};
|
this.BGColor = {Value: 1, Color: 'ffffff'};
|
||||||
this.CellColor = {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color)};
|
this.CellColor = {
|
||||||
this.GradColors[0] = {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color), Position: 0};
|
Value: 1,
|
||||||
|
Color: Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color)
|
||||||
|
};
|
||||||
|
this.GradColors[0] = {
|
||||||
|
Value: 1,
|
||||||
|
Color: Common.Utils.ThemeColor.colorValue2EffectId(this.FGColor.Color),
|
||||||
|
Position: 0
|
||||||
|
};
|
||||||
this.GradColors[1] = {Value: 1, Color: 'ffffff', Position: 1};
|
this.GradColors[1] = {Value: 1, Color: 'ffffff', Position: 1};
|
||||||
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_PATT;
|
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_PATT;
|
||||||
}
|
}
|
||||||
|
@ -504,18 +545,35 @@ define([
|
||||||
position = color.asc_getPosition(),
|
position = color.asc_getPosition(),
|
||||||
itemColor;
|
itemColor;
|
||||||
if (clr.asc_getType() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
|
if (clr.asc_getType() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
|
||||||
itemColor = {Value: 1, Color: {color: Common.Utils.ThemeColor.getHexColor(clr.asc_getR(), clr.asc_getG(), clr.asc_getB()), effectValue: clr.asc_getValue()}, Position: position};
|
itemColor = {
|
||||||
|
Value: 1,
|
||||||
|
Color: {
|
||||||
|
color: Common.Utils.ThemeColor.getHexColor(clr.asc_getR(), clr.asc_getG(), clr.asc_getB()),
|
||||||
|
effectValue: clr.asc_getValue()
|
||||||
|
},
|
||||||
|
Position: position
|
||||||
|
};
|
||||||
} else {
|
} else {
|
||||||
itemColor = {Value: 1, Color: Common.Utils.ThemeColor.getHexColor(clr.asc_getR(), clr.asc_getG(), clr.asc_getB()), Position: position};
|
itemColor = {
|
||||||
|
Value: 1,
|
||||||
|
Color: Common.Utils.ThemeColor.getHexColor(clr.asc_getR(), clr.asc_getG(), clr.asc_getB()),
|
||||||
|
Position: position
|
||||||
|
};
|
||||||
}
|
}
|
||||||
me.GradColors.push(itemColor);
|
me.GradColors.push(itemColor);
|
||||||
});
|
});
|
||||||
this.GradColors = _.sortBy(this.GradColors, 'Position');
|
this.GradColors = _.sortBy(this.GradColors, 'Position');
|
||||||
|
|
||||||
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
|
this.OriginalFillType = Asc.c_oAscFill.FILL_TYPE_GRAD;
|
||||||
this.FGColor = {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.GradColors[0].Color)};
|
this.FGColor = {
|
||||||
|
Value: 1,
|
||||||
|
Color: Common.Utils.ThemeColor.colorValue2EffectId(this.GradColors[0].Color)
|
||||||
|
};
|
||||||
this.BGColor = {Value: 1, Color: 'ffffff'};
|
this.BGColor = {Value: 1, Color: 'ffffff'};
|
||||||
this.CellColor = {Value: 1, Color: Common.Utils.ThemeColor.colorValue2EffectId(this.GradColors[0].Color)};
|
this.CellColor = {
|
||||||
|
Value: 1,
|
||||||
|
Color: Common.Utils.ThemeColor.colorValue2EffectId(this.GradColors[0].Color)
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._state.FillType !== this.OriginalFillType) {
|
if (this._state.FillType !== this.OriginalFillType) {
|
||||||
|
@ -657,6 +715,7 @@ define([
|
||||||
|
|
||||||
this._noApply = false;
|
this._noApply = false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
UpdateThemeColors: function() {
|
UpdateThemeColors: function() {
|
||||||
|
|
Loading…
Reference in a new issue