From fcb542471b3f8e10e48aa999f96f12fcd0337b35 Mon Sep 17 00:00:00 2001 From: bre7 Date: Tue, 18 Sep 2018 21:03:20 -0300 Subject: [PATCH 1/3] Added mirror margins options --- .../section-properties/page-margin/page-margin-attributes.ts | 2 ++ .../body/section-properties/page-margin/page-margin.ts | 3 ++- .../document/body/section-properties/section-properties.ts | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) 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 a9d1ae46ee..e486ae5c72 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,6 +8,7 @@ export interface IPageMarginAttributes { header?: number; footer?: number; gutter?: number; + mirror?: boolean; } export class PageMarginAttributes extends XmlAttributeComponent { @@ -19,5 +20,6 @@ export class PageMarginAttributes extends XmlAttributeComponent Date: Tue, 18 Sep 2018 21:03:50 -0300 Subject: [PATCH 2/3] Ignore Yarn lock & IntelliJ ide --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 4f8777b466..31ad548219 100644 --- a/.gitignore +++ b/.gitignore @@ -48,8 +48,12 @@ docs/.nojekyll !.vscode/extensions.json .history +# IntelliJ +.idea + # Lock files package-lock.json +yarn.lock # Documents My Document.docx From 50569224c3ac159b425cd7cdf9342c84560ce8f8 Mon Sep 17 00:00:00 2001 From: bre7 Date: Tue, 18 Sep 2018 23:50:10 -0300 Subject: [PATCH 3/3] Fixed tests (included mirrorMargins attr) --- .../body/section-properties/section-properties.spec.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/file/document/body/section-properties/section-properties.spec.ts b/src/file/document/body/section-properties/section-properties.spec.ts index e80facb635..9a8645e5b0 100644 --- a/src/file/document/body/section-properties/section-properties.spec.ts +++ b/src/file/document/body/section-properties/section-properties.spec.ts @@ -17,6 +17,7 @@ describe("SectionProperties", () => { header: 708, footer: 708, gutter: 0, + mirror: false, space: 708, linePitch: 360, headerId: 100, @@ -40,6 +41,7 @@ describe("SectionProperties", () => { "w:left": 1440, "w:header": 708, "w:gutter": 0, + "w:mirrorMargins": false, }, }, ], @@ -69,6 +71,7 @@ describe("SectionProperties", () => { "w:left": 1440, "w:header": 708, "w:gutter": 0, + "w:mirrorMargins": false, }, }, ], @@ -99,6 +102,7 @@ describe("SectionProperties", () => { "w:left": 1440, "w:header": 708, "w:gutter": 0, + "w:mirrorMargins": false, }, }, ], @@ -124,6 +128,7 @@ describe("SectionProperties", () => { "w:left": 1440, "w:header": 708, "w:gutter": 0, + "w:mirrorMargins": false, }, }, ], @@ -150,6 +155,7 @@ describe("SectionProperties", () => { "w:left": 1440, "w:header": 708, "w:gutter": 0, + "w:mirrorMargins": false, }, }, ],