[bug] fix bug 79551

This commit is contained in:
Sergey Luzyanin
2026-02-06 18:05:56 +03:00
parent 798b6c565b
commit ccc19cc539
2 changed files with 29 additions and 13 deletions

View File

@ -447,21 +447,30 @@
this.run = run;
let textPr = run.getCompiledPr();
let shd = this.DrawShd ? textPr.Shd : null;
this.shd = shd;
this.shdColor = shd && !shd.IsNil() ? shd.GetSimpleColor(this.drawState.getTheme(), this.drawState.getColorMap()) : null;
this.shdAlpha = shd && !shd.IsNil() ? shd.GetAlpha(this.drawState.getTheme(), this.drawState.getColorMap(), this.Paragraph.GetLogicDocument()) : 255;
if (!this.shdColor || this.shdColor.IsAuto() || (run.IsMathRun() && run.IsPlaceholder()))
this.shdColor = null;
this.highlight = textPr.HighLight;
let shd = null;
if (this.DrawShd)
{
shd = textPr.Shd;
}
if (textPr.HighlightColor)
{
textPr.HighlightColor.check(this.drawState.getTheme(), this.drawState.getColorMap());
let RGBA = textPr.HighlightColor.RGBA;
this.highlight = new CDocumentColor(RGBA.R, RGBA.G, RGBA.B, false);
shd = new CDocumentShd();
shd.Value = Asc.c_oAscShd.Clear;
shd.ThemeFill = AscFormat.CreateUniFillByUniColor(textPr.HighlightColor);
}
this.shd = shd;
this.shdColor = null;
this.shdAlpha = 255;
if (shd && !shd.IsNil())
{
this.shdColor = shd.GetSimpleColor(this.drawState.getTheme(), this.drawState.getColorMap());
this.shdAlpha = shd.GetAlpha(this.drawState.getTheme(), this.drawState.getColorMap());
if (!this.shdColor || this.shdColor.IsAuto() || (run.IsMathRun() && run.IsPlaceholder()))
this.shdColor = null;
}
this.highlight = textPr.HighLight;
};
/**
*

View File

@ -10089,8 +10089,15 @@ CDocumentShd.prototype.GetSimpleColor = function(oTheme, oColorMap)
return oResultColor;
};
CDocumentShd.prototype.GetAlpha = function(theme, colorMap, logicDocument)
CDocumentShd.prototype.GetAlpha = function(theme, colorMap)
{
let unifill = this.ThemeFill;
if (unifill)
{
unifill.check(theme, colorMap);
let rgba = unifill.getRGBAColor();
return (rgba.A !== undefined && rgba.A !== null) ? rgba.A : 255;
}
return 255;
};
CDocumentShd.prototype.private_GetPctShdColor = function(nPct, strokeColor, fillColor)