remove invalid w:mirrorMargins attribute from w:pgMar
This commit is contained in:
@ -39,7 +39,6 @@ describe("Body", () => {
|
||||
"w:header": 708,
|
||||
"w:footer": 708,
|
||||
"w:gutter": 0,
|
||||
"w:mirrorMargins": false,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -8,7 +8,6 @@ export interface IPageMarginAttributes {
|
||||
readonly header?: number;
|
||||
readonly footer?: number;
|
||||
readonly gutter?: number;
|
||||
readonly mirror?: boolean;
|
||||
}
|
||||
|
||||
export class PageMarginAttributes extends XmlAttributeComponent<IPageMarginAttributes> {
|
||||
@ -20,6 +19,5 @@ export class PageMarginAttributes extends XmlAttributeComponent<IPageMarginAttri
|
||||
header: "w:header",
|
||||
footer: "w:footer",
|
||||
gutter: "w:gutter",
|
||||
mirror: "w:mirrorMargins",
|
||||
};
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ import { XmlComponent } from "file/xml-components";
|
||||
import { PageMarginAttributes } from "./page-margin-attributes";
|
||||
|
||||
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");
|
||||
this.root.push(
|
||||
new PageMarginAttributes({
|
||||
@ -13,7 +13,6 @@ export class PageMargin extends XmlComponent {
|
||||
header: header,
|
||||
footer: footer,
|
||||
gutter: gutter,
|
||||
mirror: mirror,
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
@ -32,7 +32,6 @@ describe("SectionProperties", () => {
|
||||
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,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
@ -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(
|
||||
|
@ -129,7 +129,6 @@ describe("File", () => {
|
||||
"w:gutter": 0,
|
||||
"w:header": 708,
|
||||
"w:left": 1440,
|
||||
"w:mirrorMargins": false,
|
||||
"w:right": 1440,
|
||||
"w:top": 1440,
|
||||
},
|
||||
|
Reference in New Issue
Block a user