2018-05-06 03:19:36 +01:00
|
|
|
import { DocumentAttributes } from "../document/document-attributes";
|
2019-10-04 02:37:22 +01:00
|
|
|
import { IStylesOptions } from "./styles";
|
2018-03-28 14:54:07 +02:00
|
|
|
|
2019-10-04 01:20:41 +01:00
|
|
|
import { DocumentDefaults } from "./defaults";
|
2017-03-09 09:45:01 +01:00
|
|
|
import {
|
2018-06-28 03:01:25 +01:00
|
|
|
FootnoteReferenceStyle,
|
|
|
|
FootnoteText,
|
|
|
|
FootnoteTextChar,
|
2018-01-23 01:33:12 +00:00
|
|
|
Heading1Style,
|
|
|
|
Heading2Style,
|
|
|
|
Heading3Style,
|
|
|
|
Heading4Style,
|
|
|
|
Heading5Style,
|
|
|
|
Heading6Style,
|
2018-05-06 22:23:04 -05:00
|
|
|
HyperlinkStyle,
|
2018-01-23 01:33:12 +00:00
|
|
|
ListParagraph,
|
|
|
|
TitleStyle,
|
2017-03-09 09:45:01 +01:00
|
|
|
} from "./style";
|
2016-05-09 03:44:16 +01:00
|
|
|
|
|
|
|
export class DefaultStylesFactory {
|
2019-10-04 02:37:22 +01:00
|
|
|
public newInstance(): IStylesOptions {
|
2018-03-28 14:54:07 +02:00
|
|
|
const documentAttributes = new DocumentAttributes({
|
|
|
|
mc: "http://schemas.openxmlformats.org/markup-compatibility/2006",
|
|
|
|
r: "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
|
|
|
|
w: "http://schemas.openxmlformats.org/wordprocessingml/2006/main",
|
|
|
|
w14: "http://schemas.microsoft.com/office/word/2010/wordml",
|
|
|
|
w15: "http://schemas.microsoft.com/office/word/2012/wordml",
|
|
|
|
Ignorable: "w14 w15",
|
|
|
|
});
|
2019-10-04 02:37:22 +01:00
|
|
|
return {
|
2019-10-04 01:20:41 +01:00
|
|
|
initialStyles: documentAttributes,
|
|
|
|
importedStyles: [
|
|
|
|
new DocumentDefaults(),
|
|
|
|
new TitleStyle({
|
|
|
|
run: {
|
|
|
|
size: 56,
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
new Heading1Style({
|
|
|
|
run: {
|
|
|
|
color: "2E74B5",
|
|
|
|
size: 32,
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
new Heading2Style({
|
|
|
|
run: {
|
|
|
|
color: "2E74B5",
|
|
|
|
size: 26,
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
new Heading3Style({
|
|
|
|
run: {
|
|
|
|
color: "1F4D78",
|
|
|
|
size: 24,
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
new Heading4Style({
|
|
|
|
run: {
|
|
|
|
color: "2E74B5",
|
|
|
|
italics: true,
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
new Heading5Style({
|
|
|
|
run: {
|
|
|
|
color: "2E74B5",
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
new Heading6Style({
|
|
|
|
run: {
|
|
|
|
color: "1F4D78",
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
new ListParagraph({}),
|
|
|
|
new HyperlinkStyle({}),
|
|
|
|
new FootnoteReferenceStyle({}),
|
|
|
|
new FootnoteText({}),
|
|
|
|
new FootnoteTextChar({}),
|
|
|
|
],
|
2019-10-04 02:37:22 +01:00
|
|
|
};
|
2016-05-09 03:44:16 +01:00
|
|
|
}
|
2017-03-10 08:52:47 +01:00
|
|
|
}
|