Remove old implementation of first page header

This commit is contained in:
Dolan
2018-06-25 22:13:12 +01:00
parent 2a0b45dc20
commit 84ebf8e6c3
5 changed files with 12 additions and 80 deletions

View File

@ -5,56 +5,6 @@ import { Paragraph } from "./paragraph";
import { Relationships } from "./relationships";
import { Table } from "./table";
export class FirstPageHeaderWrapper {
private readonly header: Header;
private readonly relationships: Relationships;
constructor(private readonly media: Media, referenceId: number) {
this.header = new Header(referenceId);
this.relationships = new Relationships();
}
public addParagraph(paragraph: Paragraph): void {
this.header.addParagraph(paragraph);
}
public createParagraph(text?: string): Paragraph {
const para = new Paragraph(text);
this.addParagraph(para);
return para;
}
public addTable(table: Table): void {
this.header.addTable(table);
}
public createTable(rows: number, cols: number): Table {
return this.header.createTable(rows, cols);
}
public addDrawing(imageData: IMediaData): void {
this.header.addDrawing(imageData);
}
public createImage(image: string): void {
const mediaData = this.media.addMedia(image, this.relationships.RelationshipCount);
this.relationships.createRelationship(
mediaData.referenceId,
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",
`media/${mediaData.fileName}`,
);
this.addDrawing(mediaData);
}
public get Header(): Header {
return this.header;
}
public get Relationships(): Relationships {
return this.relationships;
}
}
export class HeaderWrapper {
private readonly header: Header;
private readonly relationships: Relationships;