mirror of
https://github.com/ONLYOFFICE/sdkjs.git
synced 2026-02-10 18:15:19 +08:00
[ve] Add more checks for theme values
This commit is contained in:
@ -156,20 +156,22 @@ AscFormat.CTheme.prototype.getFillStyle = function (idx, unicolor, isConnectorSh
|
||||
let fmtScheme = (isConnectorShape && this.themeElements.themeExt) ?
|
||||
this.themeElements.themeExt.fmtConnectorScheme :
|
||||
this.themeElements.fmtScheme;
|
||||
if (idx >= 1 && idx <= 999) {
|
||||
if (fmtScheme.fillStyleLst[idx - 1]) {
|
||||
ret = fmtScheme.fillStyleLst[idx - 1].createDuplicate();
|
||||
if (ret) {
|
||||
ret.checkPhColor(unicolor, false);
|
||||
return ret;
|
||||
if (fmtScheme) {
|
||||
if (idx >= 1 && idx <= 999) {
|
||||
if (fmtScheme.fillStyleLst[idx - 1]) {
|
||||
ret = fmtScheme.fillStyleLst[idx - 1].createDuplicate();
|
||||
if (ret) {
|
||||
ret.checkPhColor(unicolor, false);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (idx >= 1001) {
|
||||
if (fmtScheme.bgFillStyleLst[idx - 1001]) {
|
||||
ret = fmtScheme.bgFillStyleLst[idx - 1001].createDuplicate();
|
||||
if (ret) {
|
||||
ret.checkPhColor(unicolor, false);
|
||||
return ret;
|
||||
} else if (idx >= 1001) {
|
||||
if (fmtScheme.bgFillStyleLst[idx - 1001]) {
|
||||
ret = fmtScheme.bgFillStyleLst[idx - 1001].createDuplicate();
|
||||
if (ret) {
|
||||
ret.checkPhColor(unicolor, false);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -446,7 +446,8 @@
|
||||
result = getMedifiersResult && getMedifiersResult.fontPropsObject.color;
|
||||
} else if (cellName === "FillForegnd" || cellName === "FillBkgnd") {
|
||||
//leave result because it is fill
|
||||
if (getMedifiersResult.fill.type === Asc.c_oAscFill.FILL_TYPE_PATT) {
|
||||
if (getMedifiersResult && getMedifiersResult.fill &&
|
||||
getMedifiersResult.fill.type === Asc.c_oAscFill.FILL_TYPE_PATT) {
|
||||
let uniColor;
|
||||
if (cellName === "FillForegnd") {
|
||||
uniColor = getMedifiersResult.fill.fgClr;
|
||||
|
||||
Reference in New Issue
Block a user