From 840d81e59269b2485933942622f10cce8bff9218 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 4 Mar 2020 15:00:00 +0300 Subject: [PATCH] [SSE] Bug 44748 --- .../main/app/view/CellSettings.js | 33 +++++++++++-------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/view/CellSettings.js b/apps/spreadsheeteditor/main/app/view/CellSettings.js index d77aafa17..085281497 100644 --- a/apps/spreadsheeteditor/main/app/view/CellSettings.js +++ b/apps/spreadsheeteditor/main/app/view/CellSettings.js @@ -481,24 +481,29 @@ define([ } else if (this.pattern !== null) { if (this.pattern.asc_getType() === -1) { var color = this.pattern.asc_getFgColor(); - if (color.asc_getType() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) { - this.CellColor = { + if (color) { + 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() + } + }; + } else { + this.CellColor = { + Value: 1, + Color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()) + }; + } + this.FGColor = { Value: 1, - Color: { - color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()), - effectValue: color.asc_getValue() - } + Color: Common.Utils.ThemeColor.colorValue2EffectId(this.CellColor.Color) }; } else { - this.CellColor = { - Value: 1, - Color: Common.Utils.ThemeColor.getHexColor(color.asc_getR(), color.asc_getG(), color.asc_getB()) - }; + this.FGColor = this.CellColor = {Value: 1, Color: 'ffffff'}; } - this.FGColor = { - Value: 1, - Color: Common.Utils.ThemeColor.colorValue2EffectId(this.CellColor.Color) - }; + this.BGColor = {Value: 1, Color: 'ffffff'}; this.sldrGradient.setThumbs(2); this.GradColor.colors.length = 0;