Commit ef3f2226 authored by Alexander.Trofimov's avatar Alexander.Trofimov

Правка для цветов в условном форматировании при открытии

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@47244 954022d7-b5bf-4e40-9824-e11837661b57
parent e16f7f79
......@@ -155,10 +155,16 @@
},
calculateColor: function (indexColor) {
var ret = new CAscColor();
ret.r = (this.c1.r + ((FT_Common.IntToUInt(this.c2.r - this.c1.r) * indexColor) >> this.base_shift)) & 0xFFFF;
ret.g = (this.c1.g + ((FT_Common.IntToUInt(this.c2.g - this.c1.g) * indexColor) >> this.base_shift)) & 0xFFFF;
ret.b = (this.c1.b + ((FT_Common.IntToUInt(this.c2.b - this.c1.b) * indexColor) >> this.base_shift)) & 0xFFFF;
ret.a = (this.c1.a + ((FT_Common.IntToUInt(this.c2.a - this.c1.a) * indexColor) >> this.base_shift)) & 0xFFFF;
var r1 = this.c1.getR();
var g1 = this.c1.getG();
var b1 = this.c1.getB();
var r2 = this.c2.getR();
var g2 = this.c2.getG();
var b2 = this.c2.getB();
ret.r = (r1 + ((FT_Common.IntToUInt(r2 - r1) * indexColor) >> this.base_shift)) & 0xFFFF;
ret.g = (g1 + ((FT_Common.IntToUInt(g2 - g1) * indexColor) >> this.base_shift)) & 0xFFFF;
ret.b = (b1 + ((FT_Common.IntToUInt(b2 - b1) * indexColor) >> this.base_shift)) & 0xFFFF;
return ret;
}
};
......
......@@ -5562,7 +5562,10 @@ function Binary_WorksheetTableReader(stream, wb, aSharedStrings, aCellXfs, Dxfs,
res = this.bcr.Read2Spreadsheet(length, function(t,l){
return oThis.bcr.ReadColorSpreadsheet(t,l, oObject);
});
oColorScale.aColors.push(oObject);
if(null != oObject.theme)
oColorScale.aColors.push(g_oColorManager.getThemeColor(oObject.theme, oObject.tint));
else if(null != oObject.rgb)
oColorScale.aColors.push(new RgbColor(0x00ffffff & oObject.rgb));
} else
res = c_oSerConstants.ReadUnknown;
return res;
......@@ -5578,10 +5581,14 @@ function Binary_WorksheetTableReader(stream, wb, aSharedStrings, aCellXfs, Dxfs,
else if (c_oSer_ConditionalFormattingDataBar.ShowValue === type)
oDataBar.ShowValue = this.stream.GetBool();
else if (c_oSer_ConditionalFormattingDataBar.Color === type) {
oDataBar.Color = new OpenColor();
oObject = new OpenColor();
res = this.bcr.Read2Spreadsheet(length, function(t,l){
return oThis.bcr.ReadColorSpreadsheet(t,l, oDataBar.Color);
return oThis.bcr.ReadColorSpreadsheet(t,l, oObject);
});
if(null != oObject.theme)
oDataBar.Color = g_oColorManager.getThemeColor(oObject.theme, oObject.tint);
else if(null != oObject.rgb)
oDataBar.Color = new RgbColor(0x00ffffff & oObject.rgb);
} else if (c_oSer_ConditionalFormattingDataBar.CFVO === type) {
oObject = new Asc.CConditionalFormatValueObject();
res = this.bcr.Read1(length, function (t, l) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment