fix: multiple def of header/footer attributes

This commit is contained in:
moritz-tr
2019-07-22 17:36:13 +02:00
parent 9e8d67c4a9
commit ec5a678f05
2 changed files with 55 additions and 52 deletions

View File

@ -10,6 +10,7 @@ export class Footer extends InitializableXmlComponent {
constructor(referenceNumber: number, initContent?: XmlComponent) {
super("w:ftr", initContent);
this.refId = referenceNumber;
if (!initContent) {
this.root.push(
new FooterAttributes({
wpc: "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",
@ -31,6 +32,7 @@ export class Footer extends InitializableXmlComponent {
}),
);
}
}
public get ReferenceId(): number {
return this.refId;

View File

@ -11,7 +11,7 @@ export class Header extends InitializableXmlComponent {
super("w:hdr", initContent);
this.refId = referenceNumber;
if (!initContent) {
this.root.push(
new HeaderAttributes({
wpc: "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",
@ -44,6 +44,7 @@ export class Header extends InitializableXmlComponent {
}),
);
}
}
public get ReferenceId(): number {
return this.refId;