Remove invalid 'w:shdCs' element

This commit is contained in:
Tom Hunkapiller
2021-05-20 03:02:48 +03:00
parent 30912e7aaf
commit 06da596ffb
6 changed files with 6 additions and 67 deletions

View File

@ -200,15 +200,3 @@ export class Shading extends XmlComponent {
}
}
export class ShadowComplexScript extends XmlComponent {
constructor(value: string, fill: string, color: string) {
super("w:shdCs");
this.root.push(
new Attributes({
val: value,
fill: fill,
color: color,
}),
);
}
}

View File

@ -16,7 +16,6 @@ import {
ItalicsComplexScript,
RightToLeft,
Shading,
ShadowComplexScript,
Size,
SizeComplexScript,
SmallCaps,
@ -63,7 +62,6 @@ export interface IRunStylePropertiesOptions {
readonly fill: string;
readonly color: string;
};
readonly shadingComplexScript?: boolean | IRunStylePropertiesOptions["shading"];
readonly shadow?: IRunStylePropertiesOptions["shading"];
readonly emboss?: boolean;
readonly imprint?: boolean;
@ -185,11 +183,6 @@ export class RunProperties extends IgnoreIfEmptyXmlComponent {
if (shading) {
this.push(new Shading(shading.type, shading.fill, shading.color));
}
const shdCs =
options.shadingComplexScript === undefined || options.shadingComplexScript === true ? shading : options.shadingComplexScript;
if (shdCs) {
this.push(new ShadowComplexScript(shdCs.type, shdCs.fill, shdCs.color));
}
}
public push(item: XmlComponent): void {

View File

@ -245,15 +245,6 @@ describe("Run", () => {
{
"w:rPr": [
{ "w:shd": { _attr: { "w:val": "pct10", "w:fill": "00FFFF", "w:color": "FF0000" } } },
{
"w:shdCs": {
_attr: {
"w:val": "pct10",
"w:fill": "00FFFF",
"w:color": "FF0000",
},
},
},
],
},
],