From f5e35603ef21c6cfe52cece5abbfc93eee409d97 Mon Sep 17 00:00:00 2001 From: Tom Hunkapiller Date: Thu, 20 May 2021 03:42:10 +0300 Subject: [PATCH] remove invalid w:mirrorMargins attribute from w:pgMar --- src/file/document/body/body.spec.ts | 1 - .../page-margin/page-margin-attributes.ts | 2 -- .../body/section-properties/page-margin/page-margin.ts | 3 +-- .../body/section-properties/section-properties.spec.ts | 6 ------ .../document/body/section-properties/section-properties.ts | 3 +-- src/file/file.spec.ts | 1 - 6 files changed, 2 insertions(+), 14 deletions(-) diff --git a/src/file/document/body/body.spec.ts b/src/file/document/body/body.spec.ts index b0b6836cef..bae759266c 100644 --- a/src/file/document/body/body.spec.ts +++ b/src/file/document/body/body.spec.ts @@ -39,7 +39,6 @@ describe("Body", () => { "w:header": 708, "w:footer": 708, "w:gutter": 0, - "w:mirrorMargins": false, }, }, }, diff --git a/src/file/document/body/section-properties/page-margin/page-margin-attributes.ts b/src/file/document/body/section-properties/page-margin/page-margin-attributes.ts index 73677ab4aa..7d7df6565c 100644 --- a/src/file/document/body/section-properties/page-margin/page-margin-attributes.ts +++ b/src/file/document/body/section-properties/page-margin/page-margin-attributes.ts @@ -8,7 +8,6 @@ export interface IPageMarginAttributes { readonly header?: number; readonly footer?: number; readonly gutter?: number; - readonly mirror?: boolean; } export class PageMarginAttributes extends XmlAttributeComponent { @@ -20,6 +19,5 @@ export class PageMarginAttributes extends XmlAttributeComponent { header: 708, footer: 708, gutter: 0, - mirror: false, }, pageNumbers: { start: 10, @@ -74,7 +73,6 @@ describe("SectionProperties", () => { "w:left": 1440, "w:header": 708, "w:gutter": 0, - "w:mirrorMargins": false, }, }, }); @@ -102,7 +100,6 @@ describe("SectionProperties", () => { "w:left": 1440, "w:header": 708, "w:gutter": 0, - "w:mirrorMargins": false, }, }, }); @@ -132,7 +129,6 @@ describe("SectionProperties", () => { "w:left": 1440, "w:header": 708, "w:gutter": 0, - "w:mirrorMargins": false, }, }, }); @@ -160,7 +156,6 @@ describe("SectionProperties", () => { "w:left": 1440, "w:header": 708, "w:gutter": 0, - "w:mirrorMargins": false, }, }, }); @@ -189,7 +184,6 @@ describe("SectionProperties", () => { "w:left": 1440, "w:header": 708, "w:gutter": 0, - "w:mirrorMargins": false, }, }, }); diff --git a/src/file/document/body/section-properties/section-properties.ts b/src/file/document/body/section-properties/section-properties.ts index 9000ef96c8..095928d022 100644 --- a/src/file/document/body/section-properties/section-properties.ts +++ b/src/file/document/body/section-properties/section-properties.ts @@ -63,7 +63,6 @@ export class SectionProperties extends XmlComponent { header = 708, footer = 708, gutter = 0, - mirror = false, } = {}, pageNumbers: { start: pageNumberStart = undefined, @@ -97,7 +96,7 @@ export class SectionProperties extends XmlComponent { } 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) { this.root.push( diff --git a/src/file/file.spec.ts b/src/file/file.spec.ts index 5636b83716..a3cd9fbf65 100644 --- a/src/file/file.spec.ts +++ b/src/file/file.spec.ts @@ -129,7 +129,6 @@ describe("File", () => { "w:gutter": 0, "w:header": 708, "w:left": 1440, - "w:mirrorMargins": false, "w:right": 1440, "w:top": 1440, },