remove invalid w:mirrorMargins attribute from w:pgMar

This commit is contained in:
Tom Hunkapiller
2021-05-20 03:42:10 +03:00
parent 06da596ffb
commit f5e35603ef
6 changed files with 2 additions and 14 deletions

View File

@ -39,7 +39,6 @@ describe("Body", () => {
"w:header": 708, "w:header": 708,
"w:footer": 708, "w:footer": 708,
"w:gutter": 0, "w:gutter": 0,
"w:mirrorMargins": false,
}, },
}, },
}, },

View File

@ -8,7 +8,6 @@ export interface IPageMarginAttributes {
readonly header?: number; readonly header?: number;
readonly footer?: number; readonly footer?: number;
readonly gutter?: number; readonly gutter?: number;
readonly mirror?: boolean;
} }
export class PageMarginAttributes extends XmlAttributeComponent<IPageMarginAttributes> { export class PageMarginAttributes extends XmlAttributeComponent<IPageMarginAttributes> {
@ -20,6 +19,5 @@ export class PageMarginAttributes extends XmlAttributeComponent<IPageMarginAttri
header: "w:header", header: "w:header",
footer: "w:footer", footer: "w:footer",
gutter: "w:gutter", gutter: "w:gutter",
mirror: "w:mirrorMargins",
}; };
} }

View File

@ -2,7 +2,7 @@ import { XmlComponent } from "file/xml-components";
import { PageMarginAttributes } from "./page-margin-attributes"; import { PageMarginAttributes } from "./page-margin-attributes";
export class PageMargin extends XmlComponent { export class PageMargin extends XmlComponent {
constructor(top: number, right: number, bottom: number, left: number, header: number, footer: number, gutter: number, mirror: boolean) { constructor(top: number, right: number, bottom: number, left: number, header: number, footer: number, gutter: number) {
super("w:pgMar"); super("w:pgMar");
this.root.push( this.root.push(
new PageMarginAttributes({ new PageMarginAttributes({
@ -13,7 +13,6 @@ export class PageMargin extends XmlComponent {
header: header, header: header,
footer: footer, footer: footer,
gutter: gutter, gutter: gutter,
mirror: mirror,
}), }),
); );
} }

View File

@ -32,7 +32,6 @@ describe("SectionProperties", () => {
header: 708, header: 708,
footer: 708, footer: 708,
gutter: 0, gutter: 0,
mirror: false,
}, },
pageNumbers: { pageNumbers: {
start: 10, start: 10,
@ -74,7 +73,6 @@ describe("SectionProperties", () => {
"w:left": 1440, "w:left": 1440,
"w:header": 708, "w:header": 708,
"w:gutter": 0, "w:gutter": 0,
"w:mirrorMargins": false,
}, },
}, },
}); });
@ -102,7 +100,6 @@ describe("SectionProperties", () => {
"w:left": 1440, "w:left": 1440,
"w:header": 708, "w:header": 708,
"w:gutter": 0, "w:gutter": 0,
"w:mirrorMargins": false,
}, },
}, },
}); });
@ -132,7 +129,6 @@ describe("SectionProperties", () => {
"w:left": 1440, "w:left": 1440,
"w:header": 708, "w:header": 708,
"w:gutter": 0, "w:gutter": 0,
"w:mirrorMargins": false,
}, },
}, },
}); });
@ -160,7 +156,6 @@ describe("SectionProperties", () => {
"w:left": 1440, "w:left": 1440,
"w:header": 708, "w:header": 708,
"w:gutter": 0, "w:gutter": 0,
"w:mirrorMargins": false,
}, },
}, },
}); });
@ -189,7 +184,6 @@ describe("SectionProperties", () => {
"w:left": 1440, "w:left": 1440,
"w:header": 708, "w:header": 708,
"w:gutter": 0, "w:gutter": 0,
"w:mirrorMargins": false,
}, },
}, },
}); });

View File

@ -63,7 +63,6 @@ export class SectionProperties extends XmlComponent {
header = 708, header = 708,
footer = 708, footer = 708,
gutter = 0, gutter = 0,
mirror = false,
} = {}, } = {},
pageNumbers: { pageNumbers: {
start: pageNumberStart = undefined, start: pageNumberStart = undefined,
@ -97,7 +96,7 @@ export class SectionProperties extends XmlComponent {
} }
this.root.push(new PageSize(width, height, orientation)); this.root.push(new PageSize(width, height, orientation));
this.root.push(new PageMargin(top, right, bottom, left, header, footer, gutter, mirror)); this.root.push(new PageMargin(top, right, bottom, left, header, footer, gutter));
if (pageBorders || pageBorderTop || pageBorderRight || pageBorderBottom || pageBorderLeft) { if (pageBorders || pageBorderTop || pageBorderRight || pageBorderBottom || pageBorderLeft) {
this.root.push( this.root.push(

View File

@ -129,7 +129,6 @@ describe("File", () => {
"w:gutter": 0, "w:gutter": 0,
"w:header": 708, "w:header": 708,
"w:left": 1440, "w:left": 1440,
"w:mirrorMargins": false,
"w:right": 1440, "w:right": 1440,
"w:top": 1440, "w:top": 1440,
}, },