Commit 408c1857 authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander.Trofimov

Поправлены цвета тем

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@47364 954022d7-b5bf-4e40-9824-e11837661b57
parent 0d130a18
......@@ -195,9 +195,9 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
for (var i = 0; i < _count; ++i)
{
for(var j = 0, length = g_oThemeColorTint.length; j < length; ++j)
for(var j = 0, length = g_oThemeColorTint[i].length; j < length; ++j)
{
var tint = g_oThemeColorTint[j];
var tint = g_oThemeColorTint[i][j];
var color = g_oColorManager.getThemeColor(i, tint);
_ret_array[_cur_index] = new CColor(color.getR(), color.getG(), color.getB());
_cur_index++;
......
......@@ -120,15 +120,19 @@ function colorObjToAscColor(color) {
if(null != color.tint)
tintExcel = color.tint;
var tintPresentation = 0;
for(var i = 0 , length = g_oThemeColorTint.length; i < length; ++i)
var oThemeColorTint = g_oThemeColorTint[color.theme];
if(null != oThemeColorTint)
{
var cur = g_oThemeColorTint[i];
//0.005 установлено экспериментально
if(Math.abs(cur - tintExcel) < 0.005)
for(var i = 0 , length = oThemeColorTint.length; i < length; ++i)
{
bTheme = true;
tintPresentation = i;
break;
var cur = oThemeColorTint[i];
//0.005 установлено экспериментально
if(Math.abs(cur - tintExcel) < 0.005)
{
bTheme = true;
tintPresentation = i;
break;
}
}
}
if(bTheme)
......
......@@ -14,7 +14,16 @@ var g_nColorTextDefault = 1;
var g_nColorHyperlink = 10;
var g_nColorHyperlinkVisited = 11;
var g_oThemeColorTint = [0, 0.79998168889431442, 0.59999389629810485, 0.39997558519241921, -0.249977111117893, -0.499984740745262];
var g_oThemeColorTint = [[0, -4.9989318521683403E-2, -0.14999847407452621, -0.249977111117893, -0.34998626667073579, -0.499984740745262],
[0, 0.499984740745262, 0.34998626667073579, 0.249977111117893, 0.14999847407452621, 4.9989318521683403E-2],
[0, -9.9978637043366805E-2, -0.249977111117893, -0.499984740745262, -0.749992370372631, -0.89999084444715716],
[0, 0.79998168889431442, 0.59999389629810485, 0.39997558519241921, -0.249977111117893, -0.499984740745262],
[0, 0.79998168889431442, 0.59999389629810485, 0.39997558519241921, -0.249977111117893, -0.499984740745262],
[0, 0.79998168889431442, 0.59999389629810485, 0.39997558519241921, -0.249977111117893, -0.499984740745262],
[0, 0.79998168889431442, 0.59999389629810485, 0.39997558519241921, -0.249977111117893, -0.499984740745262],
[0, 0.79998168889431442, 0.59999389629810485, 0.39997558519241921, -0.249977111117893, -0.499984740745262],
[0, 0.79998168889431442, 0.59999389629810485, 0.39997558519241921, -0.249977111117893, -0.499984740745262],
[0, 0.79998168889431442, 0.59999389629810485, 0.39997558519241921, -0.249977111117893, -0.499984740745262]];
var map_themeExcel_to_themePresentation = {
0: 12,
1: 8,
......@@ -224,7 +233,7 @@ function CorrectAscColor(asc_color)
var _index = parseInt(asc_color.get_value());
var _id = (_index / 6) >> 0;
var _pos = _index - _id * 6
var tint = g_oThemeColorTint[_pos];
var tint = g_oThemeColorTint[_id][_pos];
ret = g_oColorManager.getThemeColor(_id, tint);
break;
}
......
......@@ -373,9 +373,15 @@ CColorModifiers.prototype =
{
if (HSL.S == 0)
{
RGB.R = HSL.L;
RGB.G = HSL.L;
RGB.B = HSL.L;
var R = (255 * (HSL.L / 240.0)) >> 0;
if (R < 0)
R = 0;
if (R > 255)
R = 255;
RGB.R = R;
RGB.G = R;
RGB.B = R;
}
else
{
......
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