Commit 6d5153e2 authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander.Trofimov

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@48706 954022d7-b5bf-4e40-9824-e11837661b57
parent 2b3703c9
...@@ -236,6 +236,22 @@ var g_oThemeColorsDefaultMods = [ ...@@ -236,6 +236,22 @@ var g_oThemeColorsDefaultMods = [
{lumMod: 50000} {lumMod: 50000}
]; ];
var g_oThemeColorsDefaultMods1 = [
{lumMod: 95000},
{lumMod: 85000},
{lumMod: 75000},
{lumMod: 65000},
{lumMod: 50000}
];
var g_oThemeColorsDefaultMods2 = [
{lumMod: 50000, lumOff: 50000},
{lumMod: 65000, lumOff: 35000},
{lumMod: 75000, lumOff: 25000},
{lumMod: 85000, lumOff: 15000},
{lumMod: 95000, lumOff: 5000}
];
var g_oUserColorScheme = new Array(); var g_oUserColorScheme = new Array();
g_oUserColorScheme[0] = { g_oUserColorScheme[0] = {
dk1: {R: 240, G: 127, B: 9}, dk1: {R: 240, G: 127, B: 9},
......
...@@ -1853,7 +1853,14 @@ function CDrawingDocument() ...@@ -1853,7 +1853,14 @@ function CDrawingDocument()
var _count_mods = g_oThemeColorsDefaultMods.length; var _count_mods = g_oThemeColorsDefaultMods.length;
for (var j = 0; j < _count_mods; ++j) for (var j = 0; j < _count_mods; ++j)
{ {
var _rgba = {R:_color_src.r, G: _color_src.g, B:_color_src.b, A: 255};
var _mods = g_oThemeColorsDefaultMods[j]; var _mods = g_oThemeColorsDefaultMods[j];
if (_rgba.R > 200 && _rgba.G > 200 && _rgba.B > 200)
_mods = g_oThemeColorsDefaultMods1[j];
else if (_rgba.R < 40 && _rgba.G < 40 && _rgba.B < 40)
_mods = g_oThemeColorsDefaultMods2[j];
var dst_mods = new CColorModifiers(); var dst_mods = new CColorModifiers();
var _ind = 0; var _ind = 0;
for (var k in _mods) for (var k in _mods)
...@@ -1864,7 +1871,6 @@ function CDrawingDocument() ...@@ -1864,7 +1871,6 @@ function CDrawingDocument()
_ind++; _ind++;
} }
var _rgba = {R:_color_src.r, G: _color_src.g, B:_color_src.b, A: 255};
dst_mods.Apply(_rgba); dst_mods.Apply(_rgba);
_ret_array[_cur_index] = new CColor(_rgba.R, _rgba.G, _rgba.B); _ret_array[_cur_index] = new CColor(_rgba.R, _rgba.G, _rgba.B);
......
...@@ -329,9 +329,25 @@ function CorrectUniColor(asc_color, unicolor) ...@@ -329,9 +329,25 @@ function CorrectUniColor(asc_color, unicolor)
if (ret.Mods.Mods.length != 0) if (ret.Mods.Mods.length != 0)
ret.Mods.Mods.splice(0, ret.Mods.Mods.length); ret.Mods.Mods.splice(0, ret.Mods.Mods.length);
var __mods = g_oThemeColorsDefaultMods;
if (editor && editor.WordControl && editor.WordControl.m_oDrawingDocument && editor.WordControl.m_oDrawingDocument.GuiControlColorsMap)
{
var _map = editor.WordControl.m_oDrawingDocument.GuiControlColorsMap;
var __r = _map[_id].r;
var __g = _map[_id].g;
var __b = _map[_id].b;
if (__r > 200 && __g > 200 && __b > 200)
__mods = g_oThemeColorsDefaultMods1;
else if (__r < 40 && __g < 40 && __b < 40)
__mods = g_oThemeColorsDefaultMods2;
}
if (1 <= _pos && _pos <= 5) if (1 <= _pos && _pos <= 5)
{ {
var _mods = g_oThemeColorsDefaultMods[_pos - 1]; var _mods = __mods[_pos - 1];
var _ind = 0; var _ind = 0;
for (var k in _mods) for (var k in _mods)
{ {
......
...@@ -4380,7 +4380,14 @@ function CDrawingDocument() ...@@ -4380,7 +4380,14 @@ function CDrawingDocument()
var _count_mods = g_oThemeColorsDefaultMods.length; var _count_mods = g_oThemeColorsDefaultMods.length;
for (var j = 0; j < _count_mods; ++j) for (var j = 0; j < _count_mods; ++j)
{ {
var _rgba = {R:_color_src.r, G: _color_src.g, B:_color_src.b, A: 255};
var _mods = g_oThemeColorsDefaultMods[j]; var _mods = g_oThemeColorsDefaultMods[j];
if (_rgba.R > 200 && _rgba.G > 200 && _rgba.B > 200)
_mods = g_oThemeColorsDefaultMods1[j];
else if (_rgba.R < 40 && _rgba.G < 40 && _rgba.B < 40)
_mods = g_oThemeColorsDefaultMods2[j];
var dst_mods = new CColorModifiers(); var dst_mods = new CColorModifiers();
var _ind = 0; var _ind = 0;
for (var k in _mods) for (var k in _mods)
...@@ -4391,7 +4398,6 @@ function CDrawingDocument() ...@@ -4391,7 +4398,6 @@ function CDrawingDocument()
_ind++; _ind++;
} }
var _rgba = {R:_color_src.r, G: _color_src.g, B:_color_src.b, A: 255};
dst_mods.Apply(_rgba); dst_mods.Apply(_rgba);
_ret_array[_cur_index] = new CColor(_rgba.R, _rgba.G, _rgba.B); _ret_array[_cur_index] = new CColor(_rgba.R, _rgba.G, _rgba.B);
......
...@@ -185,9 +185,25 @@ function CorrectUniColor(asc_color, unicolor) ...@@ -185,9 +185,25 @@ function CorrectUniColor(asc_color, unicolor)
if (ret.Mods.Mods.length != 0) if (ret.Mods.Mods.length != 0)
ret.Mods.Mods.splice(0, ret.Mods.Mods.length); ret.Mods.Mods.splice(0, ret.Mods.Mods.length);
var __mods = g_oThemeColorsDefaultMods;
if (editor && editor.WordControl && editor.WordControl.m_oDrawingDocument && editor.WordControl.m_oDrawingDocument.GuiControlColorsMap)
{
var _map = editor.WordControl.m_oDrawingDocument.GuiControlColorsMap;
var __r = _map[_id].r;
var __g = _map[_id].g;
var __b = _map[_id].b;
if (__r > 200 && __g > 200 && __b > 200)
__mods = g_oThemeColorsDefaultMods1;
else if (__r < 40 && __g < 40 && __b < 40)
__mods = g_oThemeColorsDefaultMods2;
}
if (1 <= _pos && _pos <= 5) if (1 <= _pos && _pos <= 5)
{ {
var _mods = g_oThemeColorsDefaultMods[_pos - 1]; var _mods = __mods[_pos - 1];
var _ind = 0; var _ind = 0;
for (var k in _mods) for (var k in _mods)
{ {
......
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