Fix bug 79705

This commit is contained in:
Eduard Belozertsev
2026-01-30 20:39:44 +07:00
committed by Sergey Luzyanin
parent 9f0cf2de66
commit 201d0aa393
3 changed files with 41 additions and 2 deletions

View File

@ -6458,7 +6458,18 @@ function BinaryPPTYLoader()
}
}
geom.AddPathCommand(0, extrusionOk, (fill == 4) ? "none" : "norm", stroke, w, h);
let fillMode;
switch (fill) {
case Asc.c_oAscPathFillMode.DARKEN: fillMode = "darken"; break;
case Asc.c_oAscPathFillMode.DARKEN_LESS: fillMode = "darkenLess"; break;
case Asc.c_oAscPathFillMode.LIGHTEN: fillMode = "lighten"; break;
case Asc.c_oAscPathFillMode.LIGHTEN_LESS: fillMode = "lightenLess"; break;
case Asc.c_oAscPathFillMode.NONE: fillMode = "none"; break;
case Asc.c_oAscPathFillMode.NORM: fillMode = "norm"; break;
default: fillMode = "norm";
}
geom.AddPathCommand(0, extrusionOk, fillMode, stroke, w, h);
var isKoords = false;
while (s.cur < _e)

View File

@ -4829,7 +4829,17 @@ function CBinaryFileWriter()
this._WriteBool2(0, _path.extrusionOk);
if (_path.fill != null && _path.fill !== undefined)
{
this._WriteLimit1(1, (_path.fill == "none") ? 4 : 5);
let fillValue;
switch (_path.fill) {
case "darken": fillValue = Asc.c_oAscPathFillMode.DARKEN; break;
case "darkenLess": fillValue = Asc.c_oAscPathFillMode.DARKEN_LESS; break;
case "lighten": fillValue = Asc.c_oAscPathFillMode.LIGHTEN; break;
case "lightenLess": fillValue = Asc.c_oAscPathFillMode.LIGHTEN_LESS; break;
case "none": fillValue = Asc.c_oAscPathFillMode.NONE; break;
case "norm": fillValue = Asc.c_oAscPathFillMode.NORM; break;
default: fillValue = Asc.c_oAscPathFillMode.NORM;
}
this._WriteLimit1(1, fillValue);
}
this._WriteInt2(2, _path.pathH);
this._WriteBool2(3, _path.stroke);

View File

@ -1765,6 +1765,14 @@ window.AscCommon.g_cIsBeta = "false";
stackedPer : "stackedPer"
};
const c_oAscPathFillMode = {
DARKEN: 0,
DARKEN_LESS: 1,
LIGHTEN: 2,
LIGHTEN_LESS: 3,
NONE: 4,
NORM: 5
};
var c_oAscFillGradType = {
GRAD_LINEAR : 1,
GRAD_PATH : 2
@ -5344,6 +5352,16 @@ window.AscCommon.g_cIsBeta = "false";
prot['FILL_TYPE_GRAD'] = prot.FILL_TYPE_GRAD;
prot['FILL_TYPE_PATT'] = prot.FILL_TYPE_PATT;
prot['FILL_TYPE_GRP'] = prot.FILL_TYPE_GRP;
window['Asc']['c_oAscPathFillMode'] = window['Asc'].c_oAscPathFillMode = c_oAscPathFillMode;
prot = c_oAscPathFillMode;
prot['DARKEN'] = prot.DARKEN;
prot['DARKEN_LESS'] = prot.DARKEN_LESS;
prot['LIGHTEN'] = prot.LIGHTEN;
prot['LIGHTEN_LESS'] = prot.LIGHTEN_LESS;
prot['NONE'] = prot.NONE;
prot['NORM'] = prot.NORM;
window['Asc']['c_oAscFillGradType'] = window['Asc'].c_oAscFillGradType = c_oAscFillGradType;
prot = c_oAscFillGradType;
prot['GRAD_LINEAR'] = prot.GRAD_LINEAR;