@docx4j/core-ts 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/NOTICE +12 -0
- package/README.md +126 -0
- package/dist/index.d.mts +7 -0
- package/dist/index.mjs +10 -0
- package/dist/model/content/Body.d.mts +107 -0
- package/dist/model/content/Body.mjs +363 -0
- package/dist/model/content/Font.d.mts +46 -0
- package/dist/model/content/Font.mjs +50 -0
- package/dist/model/content/Paragraph.d.mts +99 -0
- package/dist/model/content/Paragraph.mjs +364 -0
- package/dist/model/content/Range.d.mts +34 -0
- package/dist/model/content/Range.mjs +94 -0
- package/dist/model/content/index.d.mts +7 -0
- package/dist/model/content/index.mjs +9 -0
- package/dist/model/content/search.d.mts +12 -0
- package/dist/model/content/search.mjs +68 -0
- package/dist/model/content/tree.d.mts +40 -0
- package/dist/model/content/tree.mjs +120 -0
- package/dist/model/index.d.mts +1 -0
- package/dist/model/index.mjs +2 -0
- package/dist/opc/ContentTypeManager.d.mts +37 -0
- package/dist/opc/ContentTypeManager.mjs +126 -0
- package/dist/opc/ContentTypes.d.mts +118 -0
- package/dist/opc/ContentTypes.mjs +139 -0
- package/dist/opc/FlatOpcPartStore.d.mts +42 -0
- package/dist/opc/FlatOpcPartStore.mjs +151 -0
- package/dist/opc/Load.d.mts +18 -0
- package/dist/opc/Load.mjs +123 -0
- package/dist/opc/PartName.d.mts +46 -0
- package/dist/opc/PartName.mjs +132 -0
- package/dist/opc/PartStore.d.mts +45 -0
- package/dist/opc/PartStore.mjs +54 -0
- package/dist/opc/Save.d.mts +9 -0
- package/dist/opc/Save.mjs +52 -0
- package/dist/opc/ZipPartStore.d.mts +32 -0
- package/dist/opc/ZipPartStore.mjs +117 -0
- package/dist/opc/exceptions.d.mts +17 -0
- package/dist/opc/exceptions.mjs +22 -0
- package/dist/opc/index.d.mts +12 -0
- package/dist/opc/index.mjs +13 -0
- package/dist/opc/mce/preprocessor.d.mts +15 -0
- package/dist/opc/mce/preprocessor.mjs +74 -0
- package/dist/opc/mce/understood.d.mts +1 -0
- package/dist/opc/mce/understood.mjs +98 -0
- package/dist/packages/OpcPackage.d.mts +62 -0
- package/dist/packages/OpcPackage.mjs +133 -0
- package/dist/packages/PresentationMLPackage.d.mts +12 -0
- package/dist/packages/PresentationMLPackage.mjs +39 -0
- package/dist/packages/SpreadsheetMLPackage.d.mts +12 -0
- package/dist/packages/SpreadsheetMLPackage.mjs +38 -0
- package/dist/packages/WordprocessingMLPackage.d.mts +49 -0
- package/dist/packages/WordprocessingMLPackage.mjs +130 -0
- package/dist/packages/index.d.mts +5 -0
- package/dist/packages/index.mjs +6 -0
- package/dist/packages/registry.d.mts +7 -0
- package/dist/packages/registry.mjs +18 -0
- package/dist/parts/BinaryPart.d.mts +38 -0
- package/dist/parts/BinaryPart.mjs +72 -0
- package/dist/parts/DefaultXmlPart.d.mts +29 -0
- package/dist/parts/DefaultXmlPart.mjs +63 -0
- package/dist/parts/Namespaces.d.mts +99 -0
- package/dist/parts/Namespaces.mjs +99 -0
- package/dist/parts/Part.d.mts +50 -0
- package/dist/parts/Part.mjs +68 -0
- package/dist/parts/PartRegistry.d.mts +20 -0
- package/dist/parts/PartRegistry.mjs +142 -0
- package/dist/parts/Parts.d.mts +13 -0
- package/dist/parts/Parts.mjs +28 -0
- package/dist/parts/RelationshipsPart.d.mts +66 -0
- package/dist/parts/RelationshipsPart.mjs +224 -0
- package/dist/parts/XmlPart.d.mts +46 -0
- package/dist/parts/XmlPart.mjs +87 -0
- package/dist/parts/customXml/index.d.mts +9 -0
- package/dist/parts/customXml/index.mjs +11 -0
- package/dist/parts/dml/index.d.mts +54 -0
- package/dist/parts/dml/index.mjs +83 -0
- package/dist/parts/docProps/index.d.mts +14 -0
- package/dist/parts/docProps/index.mjs +18 -0
- package/dist/parts/index.d.mts +14 -0
- package/dist/parts/index.mjs +15 -0
- package/dist/parts/pml/index.d.mts +53 -0
- package/dist/parts/pml/index.mjs +90 -0
- package/dist/parts/sml/index.d.mts +61 -0
- package/dist/parts/sml/index.mjs +107 -0
- package/dist/parts/wml/defaultStyles.d.mts +1 -0
- package/dist/parts/wml/defaultStyles.mjs +500 -0
- package/dist/parts/wml/index.d.mts +102 -0
- package/dist/parts/wml/index.mjs +213 -0
- package/dist/xml/dom.d.mts +22 -0
- package/dist/xml/dom.mjs +92 -0
- package/package.json +75 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { OpcPackage } from './OpcPackage.mjs';
|
|
2
|
+
import { registerPackageClass } from './registry.mjs';
|
|
3
|
+
import { ContentTypes } from '../opc/ContentTypes.mjs';
|
|
4
|
+
import { Docx4JException } from '../opc/exceptions.mjs';
|
|
5
|
+
import { Namespaces } from '../parts/Namespaces.mjs';
|
|
6
|
+
const MAIN_CONTENT_TYPES = [
|
|
7
|
+
ContentTypes.PRESENTATIONML_MAIN,
|
|
8
|
+
ContentTypes.PRESENTATIONML_TEMPLATE,
|
|
9
|
+
ContentTypes.PRESENTATIONML_MACROENABLED,
|
|
10
|
+
ContentTypes.PRESENTATIONML_TEMPLATE_MACROENABLED,
|
|
11
|
+
ContentTypes.PRESENTATIONML_SLIDESHOW,
|
|
12
|
+
];
|
|
13
|
+
/** A pptx (docx4j PresentationMLPackage). */
|
|
14
|
+
export class PresentationMLPackage extends OpcPackage {
|
|
15
|
+
static async load(source, options) {
|
|
16
|
+
var _a, _b;
|
|
17
|
+
const pkg = await OpcPackage.load(source, options);
|
|
18
|
+
if (!(pkg instanceof PresentationMLPackage)) {
|
|
19
|
+
throw new Docx4JException(`Not a PresentationML package: main part is ${(_b = (_a = pkg.getMainPart()) === null || _a === void 0 ? void 0 : _a.contentType) !== null && _b !== void 0 ? _b : 'missing'}`);
|
|
20
|
+
}
|
|
21
|
+
return pkg;
|
|
22
|
+
}
|
|
23
|
+
setPartShortcut(part, relationshipType) {
|
|
24
|
+
if (relationshipType === Namespaces.DOCUMENT || relationshipType === Namespaces.DOCUMENT_STRICT) {
|
|
25
|
+
this.mainPresentationPart = part;
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
return super.setPartShortcut(part, relationshipType);
|
|
29
|
+
}
|
|
30
|
+
getMainPresentationPart() {
|
|
31
|
+
if (!this.mainPresentationPart)
|
|
32
|
+
throw new Docx4JException('No main presentation part');
|
|
33
|
+
return this.mainPresentationPart;
|
|
34
|
+
}
|
|
35
|
+
get progId() {
|
|
36
|
+
return 'PowerPoint.Show';
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
registerPackageClass(MAIN_CONTENT_TYPES, PresentationMLPackage);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { OpcPackage, type PackageSource } from './OpcPackage.mjs';
|
|
2
|
+
import type { LoadOptions } from '../opc/Load.mjs';
|
|
3
|
+
import type { Part } from '../parts/Part.mjs';
|
|
4
|
+
import type { WorkbookPart } from '../parts/sml/index.mjs';
|
|
5
|
+
/** An xlsx (docx4j SpreadsheetMLPackage). */
|
|
6
|
+
export declare class SpreadsheetMLPackage extends OpcPackage {
|
|
7
|
+
workbookPart: WorkbookPart | undefined;
|
|
8
|
+
static load(source: PackageSource, options?: LoadOptions): Promise<SpreadsheetMLPackage>;
|
|
9
|
+
setPartShortcut(part: Part, relationshipType: string): boolean;
|
|
10
|
+
getWorkbookPart(): WorkbookPart;
|
|
11
|
+
protected get progId(): string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { OpcPackage } from './OpcPackage.mjs';
|
|
2
|
+
import { registerPackageClass } from './registry.mjs';
|
|
3
|
+
import { ContentTypes } from '../opc/ContentTypes.mjs';
|
|
4
|
+
import { Docx4JException } from '../opc/exceptions.mjs';
|
|
5
|
+
import { Namespaces } from '../parts/Namespaces.mjs';
|
|
6
|
+
const MAIN_CONTENT_TYPES = [
|
|
7
|
+
ContentTypes.SPREADSHEETML_WORKBOOK,
|
|
8
|
+
ContentTypes.SPREADSHEETML_WORKBOOK_MACROENABLED,
|
|
9
|
+
ContentTypes.SPREADSHEETML_TEMPLATE,
|
|
10
|
+
ContentTypes.SPREADSHEETML_TEMPLATE_MACROENABLED,
|
|
11
|
+
];
|
|
12
|
+
/** An xlsx (docx4j SpreadsheetMLPackage). */
|
|
13
|
+
export class SpreadsheetMLPackage extends OpcPackage {
|
|
14
|
+
static async load(source, options) {
|
|
15
|
+
var _a, _b;
|
|
16
|
+
const pkg = await OpcPackage.load(source, options);
|
|
17
|
+
if (!(pkg instanceof SpreadsheetMLPackage)) {
|
|
18
|
+
throw new Docx4JException(`Not a SpreadsheetML package: main part is ${(_b = (_a = pkg.getMainPart()) === null || _a === void 0 ? void 0 : _a.contentType) !== null && _b !== void 0 ? _b : 'missing'}`);
|
|
19
|
+
}
|
|
20
|
+
return pkg;
|
|
21
|
+
}
|
|
22
|
+
setPartShortcut(part, relationshipType) {
|
|
23
|
+
if (relationshipType === Namespaces.DOCUMENT || relationshipType === Namespaces.DOCUMENT_STRICT) {
|
|
24
|
+
this.workbookPart = part;
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
return super.setPartShortcut(part, relationshipType);
|
|
28
|
+
}
|
|
29
|
+
getWorkbookPart() {
|
|
30
|
+
if (!this.workbookPart)
|
|
31
|
+
throw new Docx4JException('No workbook part');
|
|
32
|
+
return this.workbookPart;
|
|
33
|
+
}
|
|
34
|
+
get progId() {
|
|
35
|
+
return 'Excel.Sheet';
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
registerPackageClass(MAIN_CONTENT_TYPES, SpreadsheetMLPackage);
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { OpcPackage, type PackageSource } from './OpcPackage.mjs';
|
|
2
|
+
import type { LoadOptions } from '../opc/Load.mjs';
|
|
3
|
+
import type { Part } from '../parts/Part.mjs';
|
|
4
|
+
import { MainDocumentPart } from '../parts/wml/index.mjs';
|
|
5
|
+
import type { Body, Address, Outline, OutlineParagraph, OutlineTable } from '../model/content/Body.mjs';
|
|
6
|
+
import type { Paragraph } from '../model/content/Paragraph.mjs';
|
|
7
|
+
/** The outline of a document: the body's paragraphs and tables, then each header's and footer's (loaded ones only). */
|
|
8
|
+
export interface DocumentOutline extends Outline {
|
|
9
|
+
headers: {
|
|
10
|
+
relId: string;
|
|
11
|
+
partName: string;
|
|
12
|
+
paragraphs: OutlineParagraph[];
|
|
13
|
+
tables: OutlineTable[];
|
|
14
|
+
}[];
|
|
15
|
+
footers: {
|
|
16
|
+
relId: string;
|
|
17
|
+
partName: string;
|
|
18
|
+
paragraphs: OutlineParagraph[];
|
|
19
|
+
tables: OutlineTable[];
|
|
20
|
+
}[];
|
|
21
|
+
}
|
|
22
|
+
/** docx4j PageSizePaper. */
|
|
23
|
+
export type PageSizePaper = 'LETTER' | 'LEGAL' | 'A3' | 'A4' | 'A5' | 'B4JIS';
|
|
24
|
+
export interface CreatePackageOptions {
|
|
25
|
+
pageSize?: PageSizePaper;
|
|
26
|
+
landscape?: boolean;
|
|
27
|
+
}
|
|
28
|
+
/** A docx (docx4j WordprocessingMLPackage). */
|
|
29
|
+
export declare class WordprocessingMLPackage extends OpcPackage {
|
|
30
|
+
mainDocumentPart: MainDocumentPart | undefined;
|
|
31
|
+
static load(source: PackageSource, options?: LoadOptions): Promise<WordprocessingMLPackage>;
|
|
32
|
+
/**
|
|
33
|
+
* A new document with a main document part (one section, the page size and 2.54 cm margins),
|
|
34
|
+
* docx4j's default styles, settings, and core and extended properties (docx4j createPackage).
|
|
35
|
+
*/
|
|
36
|
+
static createPackage(options?: CreatePackageOptions): Promise<WordprocessingMLPackage>;
|
|
37
|
+
setPartShortcut(part: Part, relationshipType: string): boolean;
|
|
38
|
+
/** The main document part; throws if the package has none. */
|
|
39
|
+
getMainDocumentPart(): MainDocumentPart;
|
|
40
|
+
/** Office JS `document.body`: the main document part's body; the part must be unmarshalled (`getBody()` does that). */
|
|
41
|
+
get body(): Body;
|
|
42
|
+
getBody(): Promise<Body>;
|
|
43
|
+
/** The paragraph at an address anywhere in the document: 'body/3', 'header:rId5/0', a paraId, or a text match. */
|
|
44
|
+
paragraphAt(address: Address): Promise<Paragraph | undefined>;
|
|
45
|
+
/** Every paragraph and table with its address, style and text (CR-002 section 3.3). Unmarshals the main part, headers and footers. */
|
|
46
|
+
outline(): Promise<DocumentOutline>;
|
|
47
|
+
private bodies;
|
|
48
|
+
protected get progId(): string;
|
|
49
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { OpcPackage } from './OpcPackage.mjs';
|
|
2
|
+
import { registerPackageClass } from './registry.mjs';
|
|
3
|
+
import { ContentTypes } from '../opc/ContentTypes.mjs';
|
|
4
|
+
import { Docx4JException } from '../opc/exceptions.mjs';
|
|
5
|
+
import { Namespaces } from '../parts/Namespaces.mjs';
|
|
6
|
+
import { MainDocumentPart, StyleDefinitionsPart, DocumentSettingsPart } from '../parts/wml/index.mjs';
|
|
7
|
+
import { DocPropsCorePart, DocPropsExtendedPart } from '../parts/docProps/index.mjs';
|
|
8
|
+
import { DEFAULT_STYLES_XML } from '../parts/wml/defaultStyles.mjs';
|
|
9
|
+
import { HeaderPart, FooterPart } from '../parts/wml/index.mjs';
|
|
10
|
+
const MAIN_CONTENT_TYPES = [
|
|
11
|
+
ContentTypes.WORDPROCESSINGML_DOCUMENT,
|
|
12
|
+
ContentTypes.WORDPROCESSINGML_DOCUMENT_MACROENABLED,
|
|
13
|
+
ContentTypes.WORDPROCESSINGML_TEMPLATE,
|
|
14
|
+
ContentTypes.WORDPROCESSINGML_TEMPLATE_MACROENABLED,
|
|
15
|
+
];
|
|
16
|
+
/** Portrait width and height in twips, and the `w:code`, as docx4j PageDimensions. */
|
|
17
|
+
const PAGE_SIZES = {
|
|
18
|
+
LETTER: [12240, 15840, 1],
|
|
19
|
+
LEGAL: [12240, 20160, 5],
|
|
20
|
+
A3: [16839, 23814, 8],
|
|
21
|
+
A4: [11907, 16839, 9],
|
|
22
|
+
A5: [8391, 11907, 11],
|
|
23
|
+
B4JIS: [14572, 20639, 12],
|
|
24
|
+
};
|
|
25
|
+
/** A docx (docx4j WordprocessingMLPackage). */
|
|
26
|
+
export class WordprocessingMLPackage extends OpcPackage {
|
|
27
|
+
static async load(source, options) {
|
|
28
|
+
var _a, _b;
|
|
29
|
+
const pkg = await OpcPackage.load(source, options);
|
|
30
|
+
if (!(pkg instanceof WordprocessingMLPackage)) {
|
|
31
|
+
throw new Docx4JException(`Not a WordprocessingML package: main part is ${(_b = (_a = pkg.getMainPart()) === null || _a === void 0 ? void 0 : _a.contentType) !== null && _b !== void 0 ? _b : 'missing'}`);
|
|
32
|
+
}
|
|
33
|
+
return pkg;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* A new document with a main document part (one section, the page size and 2.54 cm margins),
|
|
37
|
+
* docx4j's default styles, settings, and core and extended properties (docx4j createPackage).
|
|
38
|
+
*/
|
|
39
|
+
static async createPackage(options = {}) {
|
|
40
|
+
var _a;
|
|
41
|
+
const pkg = new WordprocessingMLPackage();
|
|
42
|
+
const [pw, ph, code] = PAGE_SIZES[(_a = options.pageSize) !== null && _a !== void 0 ? _a : 'A4'];
|
|
43
|
+
const landscape = options.landscape === true;
|
|
44
|
+
const pgSz = { w: landscape ? ph : pw, h: landscape ? pw : ph, code };
|
|
45
|
+
if (landscape)
|
|
46
|
+
pgSz.orient = 'landscape';
|
|
47
|
+
const pgMar = { top: 1440, right: 1440, bottom: 1440, left: 1440, header: 708, footer: 708, gutter: 0 };
|
|
48
|
+
const document = { body: { content: [], sectPr: { pgSz, pgMar } } };
|
|
49
|
+
const main = new MainDocumentPart();
|
|
50
|
+
main.setContents(document);
|
|
51
|
+
pkg.addTargetPart(main);
|
|
52
|
+
const styles = new StyleDefinitionsPart();
|
|
53
|
+
styles.setXml(DEFAULT_STYLES_XML);
|
|
54
|
+
main.addTargetPart(styles);
|
|
55
|
+
const settings = new DocumentSettingsPart();
|
|
56
|
+
settings.setContents({});
|
|
57
|
+
main.addTargetPart(settings);
|
|
58
|
+
const core = new DocPropsCorePart();
|
|
59
|
+
core.setContents({});
|
|
60
|
+
pkg.addTargetPart(core);
|
|
61
|
+
const app = new DocPropsExtendedPart();
|
|
62
|
+
app.setContents({});
|
|
63
|
+
pkg.addTargetPart(app);
|
|
64
|
+
return pkg;
|
|
65
|
+
}
|
|
66
|
+
setPartShortcut(part, relationshipType) {
|
|
67
|
+
if (relationshipType === Namespaces.DOCUMENT || relationshipType === Namespaces.DOCUMENT_STRICT) {
|
|
68
|
+
this.mainDocumentPart = part;
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
return super.setPartShortcut(part, relationshipType);
|
|
72
|
+
}
|
|
73
|
+
/** The main document part; throws if the package has none. */
|
|
74
|
+
getMainDocumentPart() {
|
|
75
|
+
if (!this.mainDocumentPart)
|
|
76
|
+
throw new Docx4JException('No main document part');
|
|
77
|
+
return this.mainDocumentPart;
|
|
78
|
+
}
|
|
79
|
+
/** Office JS `document.body`: the main document part's body; the part must be unmarshalled (`getBody()` does that). */
|
|
80
|
+
get body() {
|
|
81
|
+
return this.getMainDocumentPart().body;
|
|
82
|
+
}
|
|
83
|
+
async getBody() {
|
|
84
|
+
return this.getMainDocumentPart().getBody();
|
|
85
|
+
}
|
|
86
|
+
/** The paragraph at an address anywhere in the document: 'body/3', 'header:rId5/0', a paraId, or a text match. */
|
|
87
|
+
async paragraphAt(address) {
|
|
88
|
+
for (const body of await this.bodies(address)) {
|
|
89
|
+
const p = body.paragraphAt(address);
|
|
90
|
+
if (p)
|
|
91
|
+
return p;
|
|
92
|
+
}
|
|
93
|
+
return undefined;
|
|
94
|
+
}
|
|
95
|
+
/** Every paragraph and table with its address, style and text (CR-002 section 3.3). Unmarshals the main part, headers and footers. */
|
|
96
|
+
async outline() {
|
|
97
|
+
var _a, _b, _c, _d;
|
|
98
|
+
const main = await this.getBody();
|
|
99
|
+
const out = { ...main.outline(), headers: [], footers: [] };
|
|
100
|
+
for (const part of this.getMainDocumentPart().headerParts) {
|
|
101
|
+
const body = await part.getBody();
|
|
102
|
+
out.headers.push({ relId: (_b = (_a = part.sourceRelationship) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : '', partName: part.partName.name, ...body.outline() });
|
|
103
|
+
}
|
|
104
|
+
for (const part of this.getMainDocumentPart().footerParts) {
|
|
105
|
+
const body = await part.getBody();
|
|
106
|
+
out.footers.push({ relId: (_d = (_c = part.sourceRelationship) === null || _c === void 0 ? void 0 : _c.id) !== null && _d !== void 0 ? _d : '', partName: part.partName.name, ...body.outline() });
|
|
107
|
+
}
|
|
108
|
+
return out;
|
|
109
|
+
}
|
|
110
|
+
async bodies(address) {
|
|
111
|
+
const main = this.getMainDocumentPart();
|
|
112
|
+
if (typeof address === 'string' && !address.startsWith('w14:')) {
|
|
113
|
+
const prefix = address.split('/')[0];
|
|
114
|
+
if (prefix === 'body')
|
|
115
|
+
return [await main.getBody()];
|
|
116
|
+
const [kind, relId] = prefix.split(':');
|
|
117
|
+
const parts = kind === 'header' ? main.headerParts : kind === 'footer' ? main.footerParts : [];
|
|
118
|
+
const part = parts.find((p) => { var _a; return ((_a = p.sourceRelationship) === null || _a === void 0 ? void 0 : _a.id) === relId || p.partName.fileName === relId; });
|
|
119
|
+
return part instanceof HeaderPart || part instanceof FooterPart ? [await part.getBody()] : [];
|
|
120
|
+
}
|
|
121
|
+
const all = [await main.getBody()];
|
|
122
|
+
for (const part of [...main.headerParts, ...main.footerParts])
|
|
123
|
+
all.push(await part.getBody());
|
|
124
|
+
return all;
|
|
125
|
+
}
|
|
126
|
+
get progId() {
|
|
127
|
+
return 'Word.Document';
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
registerPackageClass(MAIN_CONTENT_TYPES, WordprocessingMLPackage);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { OpcPackage, type PackageSource } from './OpcPackage.mjs';
|
|
2
|
+
export { WordprocessingMLPackage, type PageSizePaper, type CreatePackageOptions } from './WordprocessingMLPackage.mjs';
|
|
3
|
+
export { PresentationMLPackage } from './PresentationMLPackage.mjs';
|
|
4
|
+
export { SpreadsheetMLPackage } from './SpreadsheetMLPackage.mjs';
|
|
5
|
+
export { registerPackageClass, createPackageForContentType, type PackageConstructor } from './registry.mjs';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Packages: OpcPackage and the three Office kinds. Importing this module registers all four.
|
|
2
|
+
export { OpcPackage } from './OpcPackage.mjs';
|
|
3
|
+
export { WordprocessingMLPackage } from './WordprocessingMLPackage.mjs';
|
|
4
|
+
export { PresentationMLPackage } from './PresentationMLPackage.mjs';
|
|
5
|
+
export { SpreadsheetMLPackage } from './SpreadsheetMLPackage.mjs';
|
|
6
|
+
export { registerPackageClass, createPackageForContentType } from './registry.mjs';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { OpcPackage } from './OpcPackage.mjs';
|
|
2
|
+
export type PackageConstructor = new () => OpcPackage;
|
|
3
|
+
/** Called by each package module on evaluation; keeps `OpcPackage.load` free of subclass imports. */
|
|
4
|
+
export declare function registerPackageClass(mainContentTypes: readonly string[], ctor: PackageConstructor): void;
|
|
5
|
+
export declare function registerGenericPackageClass(ctor: PackageConstructor): void;
|
|
6
|
+
/** The package class for a main part's content type; `OpcPackage` for anything else. */
|
|
7
|
+
export declare function createPackageForContentType(mainPartContentType: string | undefined): OpcPackage;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const byMainContentType = new Map();
|
|
2
|
+
let generic;
|
|
3
|
+
/** Called by each package module on evaluation; keeps `OpcPackage.load` free of subclass imports. */
|
|
4
|
+
export function registerPackageClass(mainContentTypes, ctor) {
|
|
5
|
+
for (const ct of mainContentTypes)
|
|
6
|
+
byMainContentType.set(ct, ctor);
|
|
7
|
+
}
|
|
8
|
+
export function registerGenericPackageClass(ctor) {
|
|
9
|
+
generic = ctor;
|
|
10
|
+
}
|
|
11
|
+
/** The package class for a main part's content type; `OpcPackage` for anything else. */
|
|
12
|
+
export function createPackageForContentType(mainPartContentType) {
|
|
13
|
+
var _a;
|
|
14
|
+
const ctor = (_a = (mainPartContentType !== undefined ? byMainContentType.get(mainPartContentType) : undefined)) !== null && _a !== void 0 ? _a : generic;
|
|
15
|
+
if (!ctor)
|
|
16
|
+
throw new Error('No package class registered');
|
|
17
|
+
return new ctor();
|
|
18
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Part } from './Part.mjs';
|
|
2
|
+
import { PartName } from '../opc/PartName.mjs';
|
|
3
|
+
/** A part whose content is bytes (docx4j BinaryPart): images, fonts, embeddings, anything unknown. */
|
|
4
|
+
export declare class BinaryPart extends Part {
|
|
5
|
+
private bytes;
|
|
6
|
+
constructor(partName: PartName | string, contentType?: string, relationshipType?: string);
|
|
7
|
+
get isLoaded(): boolean;
|
|
8
|
+
get compress(): boolean;
|
|
9
|
+
/** The bytes, loaded from the source container on first call. */
|
|
10
|
+
getBytes(): Promise<Uint8Array>;
|
|
11
|
+
setBytes(bytes: Uint8Array): void;
|
|
12
|
+
}
|
|
13
|
+
/** An image of any kind (docx4j BinaryPartAbstractImage and its Image*Part subclasses); the kind is the content type. */
|
|
14
|
+
export declare class ImagePart extends BinaryPart {
|
|
15
|
+
constructor(partName: PartName | string, contentType: string);
|
|
16
|
+
}
|
|
17
|
+
/** An embedded Office package, e.g. an .xlsx behind a chart (docx4j EmbeddedPackagePart). Stored, not deflated. */
|
|
18
|
+
export declare class EmbeddedPackagePart extends BinaryPart {
|
|
19
|
+
constructor(partName: PartName | string, contentType: string);
|
|
20
|
+
get compress(): boolean;
|
|
21
|
+
}
|
|
22
|
+
/** An OLE object's binary (docx4j OleObjectBinaryPart). */
|
|
23
|
+
export declare class OleObjectBinaryPart extends BinaryPart {
|
|
24
|
+
constructor(partName: PartName | string, contentType?: string);
|
|
25
|
+
}
|
|
26
|
+
/** An obfuscated embedded font (docx4j ObfuscatedFontPart). */
|
|
27
|
+
export declare class ObfuscatedFontPart extends BinaryPart {
|
|
28
|
+
constructor(partName: PartName | string);
|
|
29
|
+
}
|
|
30
|
+
/** A TrueType font part (docx4j TrueTypeFontPart). */
|
|
31
|
+
export declare class TrueTypeFontPart extends BinaryPart {
|
|
32
|
+
constructor(partName: PartName | string);
|
|
33
|
+
}
|
|
34
|
+
/** An altChunk's content, HTML, RTF, plain text or another docx (docx4j AlternativeFormatInputPart). */
|
|
35
|
+
export declare class AlternativeFormatInputPart extends BinaryPart {
|
|
36
|
+
constructor(partName: PartName | string, contentType: string);
|
|
37
|
+
get compress(): boolean;
|
|
38
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { Part } from './Part.mjs';
|
|
2
|
+
import { ContentTypes, isStoredUncompressed } from '../opc/ContentTypes.mjs';
|
|
3
|
+
import { Namespaces } from './Namespaces.mjs';
|
|
4
|
+
import { Docx4JException } from '../opc/exceptions.mjs';
|
|
5
|
+
/** A part whose content is bytes (docx4j BinaryPart): images, fonts, embeddings, anything unknown. */
|
|
6
|
+
export class BinaryPart extends Part {
|
|
7
|
+
constructor(partName, contentType = ContentTypes.OCTET_STREAM, relationshipType = '') {
|
|
8
|
+
super(partName, contentType, relationshipType);
|
|
9
|
+
}
|
|
10
|
+
get isLoaded() {
|
|
11
|
+
return this.bytes !== undefined;
|
|
12
|
+
}
|
|
13
|
+
get compress() {
|
|
14
|
+
return !isStoredUncompressed(this.contentType);
|
|
15
|
+
}
|
|
16
|
+
/** The bytes, loaded from the source container on first call. */
|
|
17
|
+
async getBytes() {
|
|
18
|
+
if (this.bytes === undefined) {
|
|
19
|
+
const loaded = await this.loadSourceBytes();
|
|
20
|
+
if (loaded === undefined)
|
|
21
|
+
throw new Docx4JException(`Part ${this.partName} has no content and no source container`);
|
|
22
|
+
this.bytes = loaded;
|
|
23
|
+
}
|
|
24
|
+
return this.bytes;
|
|
25
|
+
}
|
|
26
|
+
setBytes(bytes) {
|
|
27
|
+
this.bytes = bytes;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
/** An image of any kind (docx4j BinaryPartAbstractImage and its Image*Part subclasses); the kind is the content type. */
|
|
31
|
+
export class ImagePart extends BinaryPart {
|
|
32
|
+
constructor(partName, contentType) {
|
|
33
|
+
super(partName, contentType, Namespaces.IMAGE);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/** An embedded Office package, e.g. an .xlsx behind a chart (docx4j EmbeddedPackagePart). Stored, not deflated. */
|
|
37
|
+
export class EmbeddedPackagePart extends BinaryPart {
|
|
38
|
+
constructor(partName, contentType) {
|
|
39
|
+
super(partName, contentType, Namespaces.EMBEDDED_PKG);
|
|
40
|
+
}
|
|
41
|
+
get compress() {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/** An OLE object's binary (docx4j OleObjectBinaryPart). */
|
|
46
|
+
export class OleObjectBinaryPart extends BinaryPart {
|
|
47
|
+
constructor(partName, contentType = ContentTypes.OFFICEDOCUMENT_OLE_OBJECT) {
|
|
48
|
+
super(partName, contentType, Namespaces.OLE_OBJECT);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
/** An obfuscated embedded font (docx4j ObfuscatedFontPart). */
|
|
52
|
+
export class ObfuscatedFontPart extends BinaryPart {
|
|
53
|
+
constructor(partName) {
|
|
54
|
+
super(partName, ContentTypes.OFFICEDOCUMENT_FONT, Namespaces.FONT);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
/** A TrueType font part (docx4j TrueTypeFontPart). */
|
|
58
|
+
export class TrueTypeFontPart extends BinaryPart {
|
|
59
|
+
constructor(partName) {
|
|
60
|
+
super(partName, ContentTypes.TRUETYPE_FONT, Namespaces.FONT);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
/** An altChunk's content, HTML, RTF, plain text or another docx (docx4j AlternativeFormatInputPart). */
|
|
64
|
+
export class AlternativeFormatInputPart extends BinaryPart {
|
|
65
|
+
constructor(partName, contentType) {
|
|
66
|
+
super(partName, contentType, Namespaces.AF);
|
|
67
|
+
}
|
|
68
|
+
get compress() {
|
|
69
|
+
// docx4j: a WordprocessingML altChunk is a zip already
|
|
70
|
+
return !(this.contentType.includes('wordprocessingml') || this.contentType.includes('ms-word'));
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Part } from './Part.mjs';
|
|
2
|
+
import { PartName } from '../opc/PartName.mjs';
|
|
3
|
+
/**
|
|
4
|
+
* An XML part the object model does not type, held as a DOM (docx4j DefaultXmlPart / XmlPart).
|
|
5
|
+
* The document is parsed on first `getDocument()`; a part whose document was never requested is
|
|
6
|
+
* written back from its source bytes.
|
|
7
|
+
*/
|
|
8
|
+
export declare class DefaultXmlPart extends Part {
|
|
9
|
+
private document;
|
|
10
|
+
private bytes;
|
|
11
|
+
constructor(partName: PartName | string, contentType?: string, relationshipType?: string);
|
|
12
|
+
get isLoaded(): boolean;
|
|
13
|
+
get isParsed(): boolean;
|
|
14
|
+
getDocument(): Promise<Document>;
|
|
15
|
+
setDocument(document: Document): void;
|
|
16
|
+
setXml(xml: string): void;
|
|
17
|
+
getXml(): Promise<string>;
|
|
18
|
+
getBytes(): Promise<Uint8Array>;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* A custom XML data storage part (docx4j CustomXmlDataStoragePart): the customer's own XML,
|
|
22
|
+
* held as a DOM. Its `itemId` comes from the sibling properties part and is the key in
|
|
23
|
+
* `OpcPackage.customXmlDataStorageParts`.
|
|
24
|
+
*/
|
|
25
|
+
export declare class CustomXmlDataStoragePart extends DefaultXmlPart {
|
|
26
|
+
/** The `ds:itemID` of the sibling properties part, lower-cased, once registered. */
|
|
27
|
+
itemId: string | undefined;
|
|
28
|
+
constructor(partName: PartName | string, contentType?: string);
|
|
29
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Part } from './Part.mjs';
|
|
2
|
+
import { ContentTypes } from '../opc/ContentTypes.mjs';
|
|
3
|
+
import { Namespaces } from './Namespaces.mjs';
|
|
4
|
+
import { Docx4JException } from '../opc/exceptions.mjs';
|
|
5
|
+
import { parseXml, serializeXmlPart, encodeText, decodeXmlText } from '../xml/dom.mjs';
|
|
6
|
+
/**
|
|
7
|
+
* An XML part the object model does not type, held as a DOM (docx4j DefaultXmlPart / XmlPart).
|
|
8
|
+
* The document is parsed on first `getDocument()`; a part whose document was never requested is
|
|
9
|
+
* written back from its source bytes.
|
|
10
|
+
*/
|
|
11
|
+
export class DefaultXmlPart extends Part {
|
|
12
|
+
constructor(partName, contentType = ContentTypes.APPLICATION_XML, relationshipType = '') {
|
|
13
|
+
super(partName, contentType, relationshipType);
|
|
14
|
+
}
|
|
15
|
+
get isLoaded() {
|
|
16
|
+
return this.document !== undefined || this.bytes !== undefined;
|
|
17
|
+
}
|
|
18
|
+
get isParsed() {
|
|
19
|
+
return this.document !== undefined;
|
|
20
|
+
}
|
|
21
|
+
async getDocument() {
|
|
22
|
+
var _a;
|
|
23
|
+
if (this.document === undefined) {
|
|
24
|
+
const bytes = (_a = this.bytes) !== null && _a !== void 0 ? _a : (await this.loadSourceBytes());
|
|
25
|
+
if (bytes === undefined)
|
|
26
|
+
throw new Docx4JException(`Part ${this.partName} has no content: set a document or load it from a container`);
|
|
27
|
+
this.document = parseXml(decodeXmlText(bytes));
|
|
28
|
+
this.bytes = undefined;
|
|
29
|
+
}
|
|
30
|
+
return this.document;
|
|
31
|
+
}
|
|
32
|
+
setDocument(document) {
|
|
33
|
+
this.document = document;
|
|
34
|
+
this.bytes = undefined;
|
|
35
|
+
}
|
|
36
|
+
setXml(xml) {
|
|
37
|
+
this.bytes = encodeText(xml);
|
|
38
|
+
this.document = undefined;
|
|
39
|
+
}
|
|
40
|
+
async getXml() {
|
|
41
|
+
return decodeXmlText(await this.getBytes());
|
|
42
|
+
}
|
|
43
|
+
async getBytes() {
|
|
44
|
+
if (this.document !== undefined)
|
|
45
|
+
return encodeText(serializeXmlPart(this.document));
|
|
46
|
+
if (this.bytes !== undefined)
|
|
47
|
+
return this.bytes;
|
|
48
|
+
const loaded = await this.loadSourceBytes();
|
|
49
|
+
if (loaded === undefined)
|
|
50
|
+
throw new Docx4JException(`Part ${this.partName} has no content and no source container`);
|
|
51
|
+
return loaded;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* A custom XML data storage part (docx4j CustomXmlDataStoragePart): the customer's own XML,
|
|
56
|
+
* held as a DOM. Its `itemId` comes from the sibling properties part and is the key in
|
|
57
|
+
* `OpcPackage.customXmlDataStorageParts`.
|
|
58
|
+
*/
|
|
59
|
+
export class CustomXmlDataStoragePart extends DefaultXmlPart {
|
|
60
|
+
constructor(partName, contentType = ContentTypes.OFFICEDOCUMENT_CUSTOMXML_DATASTORAGE) {
|
|
61
|
+
super(partName, contentType, Namespaces.CUSTOM_XML_DATA_STORAGE);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/** Relationship types and namespaces, as docx4j org.docx4j.openpackaging.parts.relationships.Namespaces. */
|
|
2
|
+
export declare const Namespaces: {
|
|
3
|
+
readonly CONTENT_TYPES: "http://schemas.openxmlformats.org/package/2006/content-types";
|
|
4
|
+
readonly RELATIONSHIPS: "http://schemas.openxmlformats.org/package/2006/relationships";
|
|
5
|
+
readonly RELATIONSHIPS_OFFICEDOC: "http://schemas.openxmlformats.org/officeDocument/2006/relationships";
|
|
6
|
+
readonly NS_WORD12: "http://schemas.openxmlformats.org/wordprocessingml/2006/main";
|
|
7
|
+
readonly PKG_XML: "http://schemas.microsoft.com/office/2006/xmlPackage";
|
|
8
|
+
readonly MARKUP_COMPATIBILITY: "http://schemas.openxmlformats.org/markup-compatibility/2006";
|
|
9
|
+
readonly DIGITAL_SIGNATURE: "http://schemas.openxmlformats.org/package/2006/relationships/digital-signature/signature";
|
|
10
|
+
readonly DIGITAL_SIGNATURE_CERTIFICATE: "http://schemas.openxmlformats.org/package/2006/relationships/digital-signature/certificate";
|
|
11
|
+
readonly DIGITAL_SIGNATURE_ORIGIN: "http://schemas.openxmlformats.org/package/2006/relationships/digital-signature/origin";
|
|
12
|
+
readonly PROPERTIES_CORE: "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties";
|
|
13
|
+
readonly PROPERTIES_EXTENDED: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties";
|
|
14
|
+
readonly PROPERTIES_CUSTOM: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties";
|
|
15
|
+
readonly PROPERTIES_COVERPAGE: "http://schemas.microsoft.com/office/2006/coverPageProps";
|
|
16
|
+
readonly IMAGE: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image";
|
|
17
|
+
readonly THUMBNAIL: "http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail";
|
|
18
|
+
readonly METADATA_THUMBNAIL: "http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail";
|
|
19
|
+
readonly DOCUMENT: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument";
|
|
20
|
+
readonly DOCUMENT_STRICT: "http://purl.oclc.org/ooxml/officeDocument/relationships/officeDocument";
|
|
21
|
+
readonly HYPERLINK: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink";
|
|
22
|
+
readonly CUSTOM_XML_DATA_STORAGE: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml";
|
|
23
|
+
readonly CUSTOM_XML_DATA_STORAGE_PROPERTIES: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps";
|
|
24
|
+
readonly WEB_SETTINGS: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings";
|
|
25
|
+
readonly SETTINGS: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings";
|
|
26
|
+
readonly STYLES: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles";
|
|
27
|
+
readonly THEME: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme";
|
|
28
|
+
readonly THEME_OVERRIDE: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/themeOverride";
|
|
29
|
+
readonly FONT_TABLE: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable";
|
|
30
|
+
readonly FONT: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/font";
|
|
31
|
+
readonly HEADER: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header";
|
|
32
|
+
readonly FOOTER: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer";
|
|
33
|
+
readonly GLOSSARY_DOCUMENT: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/glossaryDocument";
|
|
34
|
+
readonly NUMBERING: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering";
|
|
35
|
+
readonly FOOTNOTES: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes";
|
|
36
|
+
readonly ENDNOTES: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes";
|
|
37
|
+
readonly COMMENTS: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments";
|
|
38
|
+
readonly COMMENTS_EXTENDED: "http://schemas.microsoft.com/office/2011/relationships/commentsExtended";
|
|
39
|
+
readonly COMMENTS_IDS: "http://schemas.microsoft.com/office/2016/09/relationships/commentsIds";
|
|
40
|
+
readonly COMMENTS_EXTENSIBLE: "http://schemas.microsoft.com/office/2018/08/relationships/commentsExtensible";
|
|
41
|
+
readonly OFFICE_2011_PEOPLE: "http://schemas.microsoft.com/office/2011/relationships/people";
|
|
42
|
+
readonly AF: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/aFChunk";
|
|
43
|
+
readonly SUBDOCUMENT: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/subDocument";
|
|
44
|
+
readonly ATTACHED_TEMPLATE: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/attachedTemplate";
|
|
45
|
+
readonly VBA_PROJECT: "http://schemas.microsoft.com/office/2006/relationships/vbaProject";
|
|
46
|
+
readonly VBA_DATA_WORD: "http://schemas.microsoft.com/office/2006/relationships/wordVbaData";
|
|
47
|
+
readonly KEYMAP: "http://schemas.microsoft.com/office/2006/relationships/keyMapCustomizations";
|
|
48
|
+
readonly VBA_PROJECT_SIGNATURE: "http://schemas.microsoft.com/office/2006/relationships/vbaProjectSignature";
|
|
49
|
+
readonly OLE_OBJECT: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject";
|
|
50
|
+
readonly EMBEDDED_PKG: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/package";
|
|
51
|
+
readonly ACTIVEX_XML_OBJECT: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/control";
|
|
52
|
+
readonly VML: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing";
|
|
53
|
+
readonly CHART_EX: "http://schemas.microsoft.com/office/2014/relationships/chartEx";
|
|
54
|
+
readonly CHART_COLOR_STYLE: "http://schemas.microsoft.com/office/2011/relationships/chartColorStyle";
|
|
55
|
+
readonly CHART_STYLE: "http://schemas.microsoft.com/office/2011/relationships/chartStyle";
|
|
56
|
+
readonly DRAWINGML_DIAGRAM_DATA: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramData";
|
|
57
|
+
readonly DRAWINGML_DIAGRAM_LAYOUT: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramLayout";
|
|
58
|
+
readonly DRAWINGML_DIAGRAM_COLORS: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramColors";
|
|
59
|
+
readonly DRAWINGML_DIAGRAM_STYLE: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramQuickStyle";
|
|
60
|
+
readonly DRAWINGML_DIAGRAM_LAYOUT_HEADER: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramLayoutHeader";
|
|
61
|
+
readonly DRAWINGML_DIAGRAM_DRAWING: "http://schemas.microsoft.com/office/2007/relationships/diagramDrawing";
|
|
62
|
+
readonly PRESENTATIONML_COMMENTS: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments";
|
|
63
|
+
readonly PRESENTATIONML_COMMENT_AUTHORS: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/commentAuthors";
|
|
64
|
+
readonly PRESENTATIONML_FONT_DATA: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/font";
|
|
65
|
+
readonly PRESENTATIONML_MAIN: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument";
|
|
66
|
+
readonly PRESENTATIONML_SLIDE: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide";
|
|
67
|
+
readonly PRESENTATIONML_SLIDE_MASTER: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster";
|
|
68
|
+
readonly PRESENTATIONML_SLIDE_LAYOUT: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout";
|
|
69
|
+
readonly PRESENTATIONML_TABLE_STYLES: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/tableStyles";
|
|
70
|
+
readonly PRESENTATIONML_PRES_PROPS: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/presProps";
|
|
71
|
+
readonly PRESENTATIONML_VIEW_PROPS: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/viewProps";
|
|
72
|
+
readonly PRESENTATIONML_TAGS: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/tags";
|
|
73
|
+
readonly PRESENTATIONML_NOTES_SLIDE: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesSlide";
|
|
74
|
+
readonly PRESENTATIONML_NOTES_MASTER: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesMaster";
|
|
75
|
+
readonly PRESENTATIONML_HANDOUT_MASTER: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/handoutMaster";
|
|
76
|
+
readonly SPREADSHEETML_WORKBOOK: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument";
|
|
77
|
+
readonly SPREADSHEETML_WORKSHEET: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet";
|
|
78
|
+
readonly SPREADSHEETML_CHARTSHEET: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartsheet";
|
|
79
|
+
readonly SPREADSHEETML_PRINTER_SETTINGS: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/printerSettings";
|
|
80
|
+
readonly SPREADSHEETML_CALC_CHAIN: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/calcChain";
|
|
81
|
+
readonly SPREADSHEETML_SHARED_STRINGS: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings";
|
|
82
|
+
readonly SPREADSHEETML_STYLES: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles";
|
|
83
|
+
readonly SPREADSHEETML_DRAWING: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing";
|
|
84
|
+
readonly SPREADSHEETML_CHART: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart";
|
|
85
|
+
readonly CHART_USER_SHAPES: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartUserShapes";
|
|
86
|
+
readonly SPREADSHEETML_COMMENTS: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments";
|
|
87
|
+
readonly SPREADSHEETML_PIVOT_TABLE: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotTable";
|
|
88
|
+
readonly SPREADSHEETML_QUERY_TABLE: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/queryTable";
|
|
89
|
+
readonly SPREADSHEETML_TABLE: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/table";
|
|
90
|
+
readonly SPREADSHEETML_CONNECTIONS: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/connections";
|
|
91
|
+
readonly SPREADSHEETML_PIVOT_CACHE_DEFINITION: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition";
|
|
92
|
+
readonly SPREADSHEETML_PIVOT_CACHE_RECORDS: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheRecords";
|
|
93
|
+
readonly SPREADSHEETML_EXTERNAL_LINK: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink";
|
|
94
|
+
readonly WEB_EXTENSION_TASKPANES: "http://schemas.microsoft.com/office/webextensions/taskpanes/2010/11";
|
|
95
|
+
readonly WEB_EXTENSION_WEBEXTENSION: "http://schemas.microsoft.com/office/webextensions/webextension/2010/11";
|
|
96
|
+
readonly XML_EVENTS: "http://www.w3.org/2001/xml-events";
|
|
97
|
+
readonly XFORMS: "http://www.w3.org/2002/xforms";
|
|
98
|
+
readonly XML_SCHEMA: "http://www.w3.org/2001/XMLSchema";
|
|
99
|
+
};
|