@docx4j/core-ts 0.1.0 → 0.1.1
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/README.md +410 -10
- package/dist/model/content/Body.d.mts +109 -4
- package/dist/model/content/Body.mjs +300 -29
- package/dist/model/content/Comment.d.mts +78 -0
- package/dist/model/content/Comment.mjs +429 -0
- package/dist/model/content/ContentControl.d.mts +173 -0
- package/dist/model/content/ContentControl.mjs +638 -0
- package/dist/model/content/Font.d.mts +48 -8
- package/dist/model/content/Font.mjs +55 -13
- package/dist/model/content/InlinePicture.d.mts +103 -0
- package/dist/model/content/InlinePicture.mjs +361 -0
- package/dist/model/content/List.d.mts +253 -0
- package/dist/model/content/List.mjs +778 -0
- package/dist/model/content/Paragraph.d.mts +213 -16
- package/dist/model/content/Paragraph.mjs +611 -57
- package/dist/model/content/Range.d.mts +48 -4
- package/dist/model/content/Range.mjs +161 -4
- package/dist/model/content/Table.d.mts +130 -0
- package/dist/model/content/Table.mjs +429 -0
- package/dist/model/content/TrackedChange.d.mts +96 -0
- package/dist/model/content/TrackedChange.mjs +352 -0
- package/dist/model/content/comments.d.mts +122 -0
- package/dist/model/content/comments.mjs +248 -0
- package/dist/model/content/index.d.mts +13 -3
- package/dist/model/content/index.mjs +15 -3
- package/dist/model/content/ooxml.d.mts +17 -0
- package/dist/model/content/ooxml.mjs +214 -0
- package/dist/model/content/styles.d.mts +21 -0
- package/dist/model/content/styles.mjs +86 -0
- package/dist/model/content/tracking.d.mts +104 -0
- package/dist/model/content/tracking.mjs +313 -0
- package/dist/model/content/tree.d.mts +56 -9
- package/dist/model/content/tree.mjs +104 -31
- package/dist/model/customxml/CustomXmlPart.d.mts +158 -0
- package/dist/model/customxml/CustomXmlPart.mjs +415 -0
- package/dist/model/customxml/CustomXmlPartCollection.d.mts +68 -0
- package/dist/model/customxml/CustomXmlPartCollection.mjs +183 -0
- package/dist/model/customxml/XmlMapping.d.mts +46 -0
- package/dist/model/customxml/XmlMapping.mjs +98 -0
- package/dist/model/customxml/bindings.d.mts +41 -0
- package/dist/model/customxml/bindings.mjs +230 -0
- package/dist/model/customxml/index.d.mts +7 -0
- package/dist/model/customxml/index.mjs +9 -0
- package/dist/model/customxml/insert.d.mts +20 -0
- package/dist/model/customxml/insert.mjs +22 -0
- package/dist/model/customxml/kinds.d.mts +103 -0
- package/dist/model/customxml/kinds.mjs +267 -0
- package/dist/model/customxml/xpath.d.mts +52 -0
- package/dist/model/customxml/xpath.mjs +205 -0
- package/dist/model/fonts/CJKToEnglish.d.mts +2 -0
- package/dist/model/fonts/CJKToEnglish.mjs +16 -0
- package/dist/model/fonts/FontFallback.d.mts +58 -0
- package/dist/model/fonts/FontFallback.mjs +219 -0
- package/dist/model/fonts/IdentityPlusMapper.d.mts +7 -0
- package/dist/model/fonts/IdentityPlusMapper.mjs +19 -0
- package/dist/model/fonts/LanguageTagToScriptMapping.d.mts +7 -0
- package/dist/model/fonts/LanguageTagToScriptMapping.mjs +67 -0
- package/dist/model/fonts/Mapper.d.mts +190 -0
- package/dist/model/fonts/Mapper.mjs +481 -0
- package/dist/model/fonts/PhysicalFont.d.mts +34 -0
- package/dist/model/fonts/PhysicalFont.mjs +62 -0
- package/dist/model/fonts/RunFontSelector.d.mts +194 -0
- package/dist/model/fonts/RunFontSelector.mjs +441 -0
- package/dist/model/fonts/ThemeFonts.d.mts +17 -0
- package/dist/model/fonts/ThemeFonts.mjs +76 -0
- package/dist/model/fonts/defaultTheme.d.mts +37 -0
- package/dist/model/fonts/defaultTheme.mjs +57 -0
- package/dist/model/fonts/families.generated.d.mts +11 -0
- package/dist/model/fonts/families.generated.mjs +17 -0
- package/dist/model/fonts/fontsInUse.d.mts +39 -0
- package/dist/model/fonts/fontsInUse.mjs +183 -0
- package/dist/model/fonts/index.d.mts +14 -0
- package/dist/model/fonts/index.mjs +29 -0
- package/dist/model/fonts/lookup.d.mts +5 -0
- package/dist/model/fonts/lookup.mjs +12 -0
- package/dist/model/fonts/registry.d.mts +31 -0
- package/dist/model/fonts/registry.mjs +103 -0
- package/dist/model/fonts/scripts.d.mts +2 -0
- package/dist/model/fonts/scripts.mjs +78 -0
- package/dist/model/fonts/substitutions.generated.d.mts +30 -0
- package/dist/model/fonts/substitutions.generated.mjs +12 -0
- package/dist/model/fonts/themes.generated.d.mts +6 -0
- package/dist/model/fonts/themes.generated.mjs +11 -0
- package/dist/model/index.d.mts +5 -0
- package/dist/model/index.mjs +13 -1
- package/dist/model/listnumbering/Emulator.d.mts +187 -0
- package/dist/model/listnumbering/Emulator.mjs +332 -0
- package/dist/model/listnumbering/definitions.d.mts +251 -0
- package/dist/model/listnumbering/definitions.mjs +571 -0
- package/dist/model/listnumbering/formats.d.mts +25 -0
- package/dist/model/listnumbering/formats.mjs +320 -0
- package/dist/model/listnumbering/index.d.mts +4 -0
- package/dist/model/listnumbering/index.mjs +15 -0
- package/dist/model/listnumbering/state.d.mts +97 -0
- package/dist/model/listnumbering/state.mjs +179 -0
- package/dist/model/properties/PropertyResolver.d.mts +216 -0
- package/dist/model/properties/PropertyResolver.mjs +524 -0
- package/dist/model/properties/catalogue.d.mts +179 -0
- package/dist/model/properties/catalogue.mjs +860 -0
- package/dist/model/properties/index.d.mts +4 -0
- package/dist/model/properties/index.mjs +9 -0
- package/dist/model/properties/log.d.mts +7 -0
- package/dist/model/properties/log.mjs +25 -0
- package/dist/model/properties/styleUtil.d.mts +112 -0
- package/dist/model/properties/styleUtil.mjs +359 -0
- package/dist/node/index.d.mts +1 -0
- package/dist/node/index.mjs +12 -0
- package/dist/office-js/document.d.mts +111 -0
- package/dist/office-js/document.mjs +267 -0
- package/dist/office-js/enums.d.mts +187 -0
- package/dist/office-js/enums.mjs +176 -0
- package/dist/office-js/errors.d.mts +29 -0
- package/dist/office-js/errors.mjs +39 -0
- package/dist/office-js/extras.d.mts +5 -0
- package/dist/office-js/extras.mjs +29 -0
- package/dist/office-js/fragment.d.mts +10 -0
- package/dist/office-js/fragment.mjs +23 -0
- package/dist/office-js/index.d.mts +183 -0
- package/dist/office-js/index.mjs +54 -0
- package/dist/office-js/proxy.d.mts +72 -0
- package/dist/office-js/proxy.mjs +279 -0
- package/dist/office-js/run.d.mts +32 -0
- package/dist/office-js/run.mjs +66 -0
- package/dist/office-js/supported.d.mts +7 -0
- package/dist/office-js/supported.generated.d.mts +1 -0
- package/dist/office-js/supported.generated.mjs +235 -0
- package/dist/office-js/supported.mjs +53 -0
- package/dist/office-js/toApiScript.d.mts +25 -0
- package/dist/office-js/toApiScript.mjs +394 -0
- package/dist/opc/ContentTypes.d.mts +1 -0
- package/dist/opc/ContentTypes.mjs +1 -0
- package/dist/opc/DirectoryPartStore.d.mts +47 -0
- package/dist/opc/DirectoryPartStore.mjs +123 -0
- package/dist/opc/exceptions.d.mts +30 -0
- package/dist/opc/exceptions.mjs +38 -0
- package/dist/opc/index.d.mts +1 -1
- package/dist/opc/index.mjs +1 -1
- package/dist/packages/OpcPackage.d.mts +19 -1
- package/dist/packages/OpcPackage.mjs +29 -0
- package/dist/packages/PresentationMLPackage.d.mts +71 -1
- package/dist/packages/PresentationMLPackage.mjs +179 -0
- package/dist/packages/SpreadsheetMLPackage.d.mts +30 -1
- package/dist/packages/SpreadsheetMLPackage.mjs +78 -0
- package/dist/packages/WordprocessingMLPackage.d.mts +124 -2
- package/dist/packages/WordprocessingMLPackage.mjs +309 -2
- package/dist/packages/index.d.mts +1 -1
- package/dist/packages/index.mjs +1 -1
- package/dist/parts/DefaultXmlPart.d.mts +18 -0
- package/dist/parts/DefaultXmlPart.mjs +34 -5
- package/dist/parts/PartRegistry.mjs +1 -0
- package/dist/parts/XmlPart.d.mts +33 -0
- package/dist/parts/XmlPart.mjs +105 -2
- package/dist/parts/pml/defaults.d.mts +6 -0
- package/dist/parts/pml/defaults.mjs +53 -0
- package/dist/parts/pml/index.d.mts +66 -3
- package/dist/parts/pml/index.mjs +206 -7
- package/dist/parts/pml/placeholders.d.mts +71 -0
- package/dist/parts/pml/placeholders.mjs +141 -0
- package/dist/parts/sml/index.d.mts +19 -1
- package/dist/parts/sml/index.mjs +60 -1
- package/dist/parts/wml/comments.d.mts +1 -0
- package/dist/parts/wml/comments.mjs +179 -0
- package/dist/parts/wml/defaultNumbering.d.mts +1 -0
- package/dist/parts/wml/defaultNumbering.mjs +216 -0
- package/dist/parts/wml/index.d.mts +121 -0
- package/dist/parts/wml/index.mjs +291 -0
- package/dist/xml/dom.mjs +1 -2
- package/package.json +25 -4
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { createShape, createShapeNvSpPr, createNvPr, createCTPlaceholder, } from '@docx4j/generated-objects-ts/factory/org_pptx4j_pml';
|
|
2
|
+
import { createCTNonVisualDrawingProps, createCTNonVisualDrawingShapeProps, createCTShapeLocking, createCTShapeProperties, createCTTextBody, createCTTextBodyProperties, createCTTextListStyle, createCTTextParagraph, createCTRegularTextRun, createCTTextCharacterProperties, createCTTransform2D, createCTPoint2D, createCTPositiveSize2D, } from '@docx4j/generated-objects-ts/factory/org_docx4j_dml';
|
|
3
|
+
/**
|
|
4
|
+
* Where the title and body placeholders sit, as fractions of the slide: PowerPoint's own
|
|
5
|
+
* Title and Content layout at 4:3 (title 685800, 457200, 7772400 x 1143000; body 685800,
|
|
6
|
+
* 1600200, 7772400 x 4525963 of 9144000 x 6858000), so any slide size is laid out the same way.
|
|
7
|
+
*/
|
|
8
|
+
export function placeholderGeometry(sldSz) {
|
|
9
|
+
var _a, _b;
|
|
10
|
+
const w = (_a = sldSz === null || sldSz === void 0 ? void 0 : sldSz.cx) !== null && _a !== void 0 ? _a : 9144000;
|
|
11
|
+
const h = (_b = sldSz === null || sldSz === void 0 ? void 0 : sldSz.cy) !== null && _b !== void 0 ? _b : 6858000;
|
|
12
|
+
const at = (fx, fy, fcx, fcy) => ({ x: Math.round(w * fx), y: Math.round(h * fy), cx: Math.round(w * fcx), cy: Math.round(h * fcy) });
|
|
13
|
+
return { title: at(0.075, 0.0667, 0.85, 0.1667), body: at(0.075, 0.2333, 0.85, 0.66) };
|
|
14
|
+
}
|
|
15
|
+
/** `a:p/a:r/a:t` paragraphs for a placeholder's `p:txBody`; one empty paragraph when there is no text. */
|
|
16
|
+
function paragraphsOf(lines) {
|
|
17
|
+
if (lines.length === 0)
|
|
18
|
+
return [createCTTextParagraph({ endParaRPr: createCTTextCharacterProperties({ lang: 'en-US' }) })];
|
|
19
|
+
return lines.map((text, i) => createCTTextParagraph({
|
|
20
|
+
egTextRun: [createCTRegularTextRun({ rPr: createCTTextCharacterProperties({ lang: 'en-US' }), t: text })],
|
|
21
|
+
...(i === lines.length - 1 ? { endParaRPr: createCTTextCharacterProperties({ lang: 'en-US' }) } : {}),
|
|
22
|
+
}));
|
|
23
|
+
}
|
|
24
|
+
/** The body text as paragraphs: a string is split on newlines, as Office JS's `insertText` does. */
|
|
25
|
+
export function bodyLines(body) {
|
|
26
|
+
if (body === undefined)
|
|
27
|
+
return [];
|
|
28
|
+
const lines = Array.isArray(body) ? body.slice() : body.split('\n');
|
|
29
|
+
while (lines.length > 0 && lines[lines.length - 1] === '')
|
|
30
|
+
lines.pop();
|
|
31
|
+
return lines;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* One placeholder shape (docx4j's `SAMPLE_SHAPE` in `PresentationMLPackage`, and the layout
|
|
35
|
+
* markup of its `SlidePlaceholder` sample): `p:sp` with `a:spLocks noGrp`, the `p:ph`, an
|
|
36
|
+
* optional `a:xfrm` and a `p:txBody` of the lines given.
|
|
37
|
+
*/
|
|
38
|
+
export function placeholderShape(options) {
|
|
39
|
+
var _a;
|
|
40
|
+
const ph = createCTPlaceholder({
|
|
41
|
+
...(options.type === undefined ? {} : { type: options.type }),
|
|
42
|
+
...(options.idx === undefined ? {} : { idx: options.idx }),
|
|
43
|
+
});
|
|
44
|
+
const spPr = createCTShapeProperties(options.xfrm === undefined ? {} : {
|
|
45
|
+
xfrm: createCTTransform2D({
|
|
46
|
+
off: createCTPoint2D({ x: options.xfrm.x, y: options.xfrm.y }),
|
|
47
|
+
ext: createCTPositiveSize2D({ cx: options.xfrm.cx, cy: options.xfrm.cy }),
|
|
48
|
+
}),
|
|
49
|
+
});
|
|
50
|
+
return createShape({
|
|
51
|
+
nvSpPr: createShapeNvSpPr({
|
|
52
|
+
cNvPr: createCTNonVisualDrawingProps({ id: options.id, name: options.name }),
|
|
53
|
+
cNvSpPr: createCTNonVisualDrawingShapeProps({ spLocks: createCTShapeLocking({ noGrp: true }) }),
|
|
54
|
+
nvPr: createNvPr({ ph }),
|
|
55
|
+
}),
|
|
56
|
+
spPr,
|
|
57
|
+
txBody: createCTTextBody({
|
|
58
|
+
bodyPr: createCTTextBodyProperties(),
|
|
59
|
+
lstStyle: createCTTextListStyle(),
|
|
60
|
+
p: paragraphsOf((_a = options.lines) !== null && _a !== void 0 ? _a : []),
|
|
61
|
+
}),
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* The title (`p:ph type="title"`) and body (`p:ph idx="1"`) shapes a created **slide** carries,
|
|
66
|
+
* with no geometry of their own: each inherits the layout's, which is what a placeholder is for.
|
|
67
|
+
*/
|
|
68
|
+
export function slidePlaceholders(text = {}) {
|
|
69
|
+
return [
|
|
70
|
+
placeholderShape({ id: 2, name: 'Title 1', type: 'title', ...(text.title === undefined ? {} : { lines: [text.title] }) }),
|
|
71
|
+
placeholderShape({ id: 3, name: 'Content Placeholder 2', idx: 1, lines: bodyLines(text.body) }),
|
|
72
|
+
];
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* The same pair for the **layout**, with the geometry the slides inherit and PowerPoint's own
|
|
76
|
+
* prompt text. Without these the slide's placeholders would have nothing to inherit from and
|
|
77
|
+
* PowerPoint would draw them at the origin with no size.
|
|
78
|
+
*/
|
|
79
|
+
export function layoutPlaceholders(sldSz) {
|
|
80
|
+
const geometry = placeholderGeometry(sldSz);
|
|
81
|
+
return [
|
|
82
|
+
placeholderShape({ id: 2, name: 'Title 1', type: 'title', xfrm: geometry.title, lines: ['Click to edit Master title style'] }),
|
|
83
|
+
placeholderShape({ id: 3, name: 'Content Placeholder 2', idx: 1, xfrm: geometry.body, lines: ['Click to edit Master text styles'] }),
|
|
84
|
+
];
|
|
85
|
+
}
|
|
86
|
+
/** The placeholder shapes of a slide, layout or master, in shape-tree order. */
|
|
87
|
+
export function placeholdersOf(cSld) {
|
|
88
|
+
var _a, _b, _c, _d;
|
|
89
|
+
const out = [];
|
|
90
|
+
for (const item of (_b = (_a = cSld === null || cSld === void 0 ? void 0 : cSld.spTree) === null || _a === void 0 ? void 0 : _a.spOrGrpSpOrGraphicFrame) !== null && _b !== void 0 ? _b : []) {
|
|
91
|
+
const shape = item;
|
|
92
|
+
const ph = (_d = (_c = shape === null || shape === void 0 ? void 0 : shape.nvSpPr) === null || _c === void 0 ? void 0 : _c.nvPr) === null || _d === void 0 ? void 0 : _d.ph;
|
|
93
|
+
if (shape.TYPE_NAME === 'org_pptx4j_pml.Shape' && ph)
|
|
94
|
+
out.push({ shape, ph });
|
|
95
|
+
}
|
|
96
|
+
return out;
|
|
97
|
+
}
|
|
98
|
+
/** Date, footer and slide-number placeholders: a layout's, which a new slide does not repeat
|
|
99
|
+
* (docx4j's `SlidePlaceholder` sample deletes exactly these three when it derives a slide). */
|
|
100
|
+
const NOT_ON_A_NEW_SLIDE = new Set(['dt', 'ftr', 'sldNum']);
|
|
101
|
+
/**
|
|
102
|
+
* The placeholders a new slide on this layout carries: one shape per placeholder the layout
|
|
103
|
+
* defines (bar the date, footer and slide-number ones), with the layout's `type` and `idx` so
|
|
104
|
+
* that each inherits that layout shape's position and text style, and with the text given in the
|
|
105
|
+
* first title and the first body one. A layout that defines none - docx4j's own - gets the
|
|
106
|
+
* default title and body pair.
|
|
107
|
+
*/
|
|
108
|
+
export function slidePlaceholdersFor(layout, text = {}) {
|
|
109
|
+
const usable = placeholdersOf(layout).filter(({ ph }) => ph.type === undefined || !NOT_ON_A_NEW_SLIDE.has(ph.type));
|
|
110
|
+
if (usable.length === 0)
|
|
111
|
+
return slidePlaceholders(text);
|
|
112
|
+
let id = 2;
|
|
113
|
+
let titleTaken = false;
|
|
114
|
+
let bodyTaken = false;
|
|
115
|
+
return usable.map(({ shape, ph }) => {
|
|
116
|
+
const isTitle = ph.type === 'title' || ph.type === 'ctrTitle';
|
|
117
|
+
let lines = [];
|
|
118
|
+
if (isTitle && !titleTaken) {
|
|
119
|
+
titleTaken = true;
|
|
120
|
+
lines = text.title === undefined ? [] : [text.title];
|
|
121
|
+
}
|
|
122
|
+
else if (!isTitle && !bodyTaken) {
|
|
123
|
+
bodyTaken = true;
|
|
124
|
+
lines = bodyLines(text.body);
|
|
125
|
+
}
|
|
126
|
+
return placeholderShape({
|
|
127
|
+
id: id++,
|
|
128
|
+
name: shape.nvSpPr.cNvPr.name || (isTitle ? 'Title 1' : 'Content Placeholder 2'),
|
|
129
|
+
...(ph.type === undefined ? {} : { type: ph.type }),
|
|
130
|
+
...(ph.idx === undefined ? {} : { idx: ph.idx }),
|
|
131
|
+
lines,
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
/** Puts shapes into a slide's or layout's shape tree (docx4j `cSld.getSpTree().getSpOrGrpSpOrGraphicFrame().add(...)`). */
|
|
136
|
+
export function addShapes(spTree, shapes) {
|
|
137
|
+
var _a;
|
|
138
|
+
const into = ((_a = spTree.spOrGrpSpOrGraphicFrame) !== null && _a !== void 0 ? _a : (spTree.spOrGrpSpOrGraphicFrame = []));
|
|
139
|
+
for (const shape of shapes)
|
|
140
|
+
into.push(shape);
|
|
141
|
+
}
|
|
@@ -11,11 +11,29 @@ export declare class WorkbookPart extends XmlPart<sml.Workbook> {
|
|
|
11
11
|
calcChainPart: CalcChainPart | undefined;
|
|
12
12
|
constructor(partName?: PartName | string, contentType?: string);
|
|
13
13
|
setPartShortcut(part: Part, relationshipType: string): boolean;
|
|
14
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* The worksheets, in `sheets` order (the order Excel shows the tabs in) once the workbook is
|
|
16
|
+
* unmarshalled; before that, in relationship order.
|
|
17
|
+
*/
|
|
15
18
|
get worksheetParts(): WorksheetPart[];
|
|
19
|
+
/** The worksheets in `sheets` order, unmarshalling the workbook first. */
|
|
20
|
+
getWorksheetParts(): Promise<WorksheetPart[]>;
|
|
21
|
+
/** The worksheet at an index of `sheets` (docx4j `WorkbookPart.getWorksheet(int)`). */
|
|
22
|
+
getWorksheet(index: number): WorksheetPart;
|
|
23
|
+
/** docx4j `WorkbookPart.isDate1904()`. */
|
|
24
|
+
get isDate1904(): boolean;
|
|
16
25
|
}
|
|
17
26
|
export declare class WorksheetPart extends XmlPart<sml.Worksheet> {
|
|
27
|
+
/** The sheet's drawing part (docx4j's `Drawing`), set from the `drawing` relationship. */
|
|
28
|
+
drawingPart: Part | undefined;
|
|
29
|
+
/** The sheet's legacy comments part. */
|
|
30
|
+
commentsPart: SpreadsheetCommentsPart | undefined;
|
|
18
31
|
constructor(partName: PartName | string);
|
|
32
|
+
setPartShortcut(part: Part, relationshipType: string): boolean;
|
|
33
|
+
/** The sheet's table parts (`xl/tables/tableN.xml`), in relationship order. */
|
|
34
|
+
get tableParts(): TablePart[];
|
|
35
|
+
/** The workbook this sheet belongs to, through its source relationship. */
|
|
36
|
+
get workbookPart(): WorkbookPart | undefined;
|
|
19
37
|
}
|
|
20
38
|
export declare class ChartsheetPart extends XmlPart<sml.CTChartsheet> {
|
|
21
39
|
constructor(partName: PartName | string);
|
package/dist/parts/sml/index.mjs
CHANGED
|
@@ -2,6 +2,7 @@ import { XmlPart } from '../XmlPart.mjs';
|
|
|
2
2
|
import { BinaryPart } from '../BinaryPart.mjs';
|
|
3
3
|
import { ContentTypes } from '../../opc/ContentTypes.mjs';
|
|
4
4
|
import { Namespaces } from '../Namespaces.mjs';
|
|
5
|
+
import { Xlsx4jException } from '../../opc/exceptions.mjs';
|
|
5
6
|
const S = 'http://schemas.openxmlformats.org/spreadsheetml/2006/main';
|
|
6
7
|
export class WorkbookPart extends XmlPart {
|
|
7
8
|
constructor(partName = '/xl/workbook.xml', contentType = ContentTypes.SPREADSHEETML_WORKBOOK) {
|
|
@@ -24,18 +25,76 @@ export class WorkbookPart extends XmlPart {
|
|
|
24
25
|
default: return false;
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* The worksheets, in `sheets` order (the order Excel shows the tabs in) once the workbook is
|
|
30
|
+
* unmarshalled; before that, in relationship order.
|
|
31
|
+
*/
|
|
28
32
|
get worksheetParts() {
|
|
33
|
+
var _a;
|
|
29
34
|
const rp = this.relationshipsPart;
|
|
30
35
|
if (!rp)
|
|
31
36
|
return [];
|
|
37
|
+
if (this.isUnmarshalled) {
|
|
38
|
+
const sheets = (_a = this.contents.sheets) === null || _a === void 0 ? void 0 : _a.sheet;
|
|
39
|
+
if (sheets) {
|
|
40
|
+
const out = [];
|
|
41
|
+
for (const sheet of sheets) {
|
|
42
|
+
const part = rp.getPart(sheet.id);
|
|
43
|
+
if (part instanceof WorksheetPart)
|
|
44
|
+
out.push(part);
|
|
45
|
+
}
|
|
46
|
+
return out;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
32
49
|
return rp.getRelationshipsByType(Namespaces.SPREADSHEETML_WORKSHEET).map((r) => rp.getPart(r)).filter((p) => p instanceof WorksheetPart);
|
|
33
50
|
}
|
|
51
|
+
/** The worksheets in `sheets` order, unmarshalling the workbook first. */
|
|
52
|
+
async getWorksheetParts() {
|
|
53
|
+
await this.getContents();
|
|
54
|
+
return this.worksheetParts;
|
|
55
|
+
}
|
|
56
|
+
/** The worksheet at an index of `sheets` (docx4j `WorkbookPart.getWorksheet(int)`). */
|
|
57
|
+
getWorksheet(index) {
|
|
58
|
+
const sheets = this.worksheetParts;
|
|
59
|
+
const sheet = sheets[index];
|
|
60
|
+
if (!sheet)
|
|
61
|
+
throw new Xlsx4jException(`No sheet at index ${index}. (There are ${sheets.length} sheets) `);
|
|
62
|
+
return sheet;
|
|
63
|
+
}
|
|
64
|
+
/** docx4j `WorkbookPart.isDate1904()`. */
|
|
65
|
+
get isDate1904() {
|
|
66
|
+
var _a;
|
|
67
|
+
return ((_a = this.contents.workbookPr) === null || _a === void 0 ? void 0 : _a.date1904) === true;
|
|
68
|
+
}
|
|
34
69
|
}
|
|
35
70
|
export class WorksheetPart extends XmlPart {
|
|
36
71
|
constructor(partName) {
|
|
37
72
|
super(partName, ContentTypes.SPREADSHEETML_WORKSHEET, Namespaces.SPREADSHEETML_WORKSHEET, { namespaceURI: S, localPart: 'worksheet' });
|
|
38
73
|
}
|
|
74
|
+
setPartShortcut(part, relationshipType) {
|
|
75
|
+
switch (relationshipType) {
|
|
76
|
+
case Namespaces.SPREADSHEETML_DRAWING:
|
|
77
|
+
this.drawingPart = part;
|
|
78
|
+
return true;
|
|
79
|
+
case Namespaces.SPREADSHEETML_COMMENTS:
|
|
80
|
+
this.commentsPart = part;
|
|
81
|
+
return true;
|
|
82
|
+
default: return false;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
/** The sheet's table parts (`xl/tables/tableN.xml`), in relationship order. */
|
|
86
|
+
get tableParts() {
|
|
87
|
+
const rp = this.relationshipsPart;
|
|
88
|
+
if (!rp)
|
|
89
|
+
return [];
|
|
90
|
+
return rp.getRelationshipsByType(Namespaces.SPREADSHEETML_TABLE).map((r) => rp.getPart(r)).filter((p) => p instanceof TablePart);
|
|
91
|
+
}
|
|
92
|
+
/** The workbook this sheet belongs to, through its source relationship. */
|
|
93
|
+
get workbookPart() {
|
|
94
|
+
var _a;
|
|
95
|
+
const owner = (_a = this.owningRelationshipPart) === null || _a === void 0 ? void 0 : _a.sourceP;
|
|
96
|
+
return owner instanceof WorkbookPart ? owner : undefined;
|
|
97
|
+
}
|
|
39
98
|
}
|
|
40
99
|
export class ChartsheetPart extends XmlPart {
|
|
41
100
|
constructor(partName) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../../model/content/Comment.mjs';
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import * as wmlFactory from '@docx4j/generated-objects-ts/factory/org_docx4j_wml';
|
|
2
|
+
import * as w15Factory from '@docx4j/generated-objects-ts/factory/org_docx4j_w15';
|
|
3
|
+
import * as w16cidFactory from '@docx4j/generated-objects-ts/factory/org_docx4j_w16cid';
|
|
4
|
+
import { linkParents } from '@docx4j/generated-objects-ts/builders/wml';
|
|
5
|
+
import { Docx4JException } from '../../opc/exceptions.mjs';
|
|
6
|
+
import { MainDocumentPart, CommentsPart, CommentsExtendedPart, CommentsIdsPart, PeoplePart } from './index.mjs';
|
|
7
|
+
import { COMMENT_REFERENCE_STYLE, COMMENT_TEXT_STYLE, setCommentPartsAccess, dateToCalendar, } from '../../model/content/comments.mjs';
|
|
8
|
+
// Loaded for its side effect: the Comment views register themselves with the content API.
|
|
9
|
+
import '../../model/content/Comment.mjs';
|
|
10
|
+
/** The comment parts of one document. */
|
|
11
|
+
class DocumentCommentParts {
|
|
12
|
+
constructor(main, commentsPart, comments, author) {
|
|
13
|
+
this.main = main;
|
|
14
|
+
this.commentsPart = commentsPart;
|
|
15
|
+
this.comments = comments;
|
|
16
|
+
this.author = author;
|
|
17
|
+
this.loadedAll = false;
|
|
18
|
+
}
|
|
19
|
+
ensureCommentsEx() {
|
|
20
|
+
if (this.commentsEx)
|
|
21
|
+
return this.commentsEx;
|
|
22
|
+
const existing = this.main.commentsExtendedPart;
|
|
23
|
+
if (existing) {
|
|
24
|
+
if (!existing.isUnmarshalled)
|
|
25
|
+
throw new Docx4JException(`${existing.partName} is not unmarshalled; call getComments() first`);
|
|
26
|
+
this.commentsEx = existing.contents;
|
|
27
|
+
return this.commentsEx;
|
|
28
|
+
}
|
|
29
|
+
const part = new CommentsExtendedPart();
|
|
30
|
+
part.setContents(w15Factory.createCTCommentsEx({ commentEx: [] }));
|
|
31
|
+
this.main.addTargetPart(part);
|
|
32
|
+
this.commentsEx = part.contents;
|
|
33
|
+
return this.commentsEx;
|
|
34
|
+
}
|
|
35
|
+
async ensureAll() {
|
|
36
|
+
var _a, _b, _c;
|
|
37
|
+
if (this.loadedAll)
|
|
38
|
+
return this;
|
|
39
|
+
this.ensureCommentsEx();
|
|
40
|
+
(_a = this.people) !== null && _a !== void 0 ? _a : (this.people = await ensurePeople(this.main));
|
|
41
|
+
(_b = this.commentsIds) !== null && _b !== void 0 ? _b : (this.commentsIds = await ensureCommentsIds(this.main));
|
|
42
|
+
(_c = this.extensible) !== null && _c !== void 0 ? _c : (this.extensible = await loadExtensible(this.main));
|
|
43
|
+
this.loadedAll = true;
|
|
44
|
+
return this;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
/** The document part a body's comments belong to: the body's own part, else the package's main part. */
|
|
48
|
+
function mainPartOf(body) {
|
|
49
|
+
if (body.part instanceof MainDocumentPart)
|
|
50
|
+
return body.part;
|
|
51
|
+
const pkg = body.package_;
|
|
52
|
+
if (pkg === null || pkg === void 0 ? void 0 : pkg.mainDocumentPart)
|
|
53
|
+
return pkg.mainDocumentPart;
|
|
54
|
+
throw new Docx4JException('Comments need a main document part; this body has none');
|
|
55
|
+
}
|
|
56
|
+
/** `WordprocessingMLPackage.author`, read without importing the package (no runtime cycle). */
|
|
57
|
+
function authorOf(body) {
|
|
58
|
+
var _a;
|
|
59
|
+
const pkg = body.package_;
|
|
60
|
+
return (_a = pkg === null || pkg === void 0 ? void 0 : pkg.author) !== null && _a !== void 0 ? _a : { name: 'docx4j' };
|
|
61
|
+
}
|
|
62
|
+
async function partsFor(main, commentsPart, author) {
|
|
63
|
+
const parts = new DocumentCommentParts(main, commentsPart, await commentsPart.getContents(), author);
|
|
64
|
+
// The two side parts a view reads: the threads and done flags, and the authors' emails.
|
|
65
|
+
if (main.commentsExtendedPart)
|
|
66
|
+
parts.commentsEx = await main.commentsExtendedPart.getContents();
|
|
67
|
+
if (main.peoplePart)
|
|
68
|
+
parts.people = await main.peoplePart.getContents();
|
|
69
|
+
return parts;
|
|
70
|
+
}
|
|
71
|
+
async function ensurePeople(main) {
|
|
72
|
+
if (main.peoplePart)
|
|
73
|
+
return main.peoplePart.getContents();
|
|
74
|
+
const part = new PeoplePart();
|
|
75
|
+
part.setContents(w15Factory.createCTPeople({ person: [] }));
|
|
76
|
+
main.addTargetPart(part);
|
|
77
|
+
return part.contents;
|
|
78
|
+
}
|
|
79
|
+
async function ensureCommentsIds(main) {
|
|
80
|
+
if (main.commentsIdsPart)
|
|
81
|
+
return main.commentsIdsPart.getContents();
|
|
82
|
+
const part = new CommentsIdsPart();
|
|
83
|
+
part.setContents(w16cidFactory.createCTCommentsIds({ commentId: [] }));
|
|
84
|
+
main.addTargetPart(part);
|
|
85
|
+
return part.contents;
|
|
86
|
+
}
|
|
87
|
+
/** The w16cex part, typed (objects 0.1.3), when the document has one; none is created. */
|
|
88
|
+
async function loadExtensible(main) {
|
|
89
|
+
var _a;
|
|
90
|
+
const part = main.commentsExtensiblePart;
|
|
91
|
+
if (!part)
|
|
92
|
+
return undefined;
|
|
93
|
+
const contents = await part.getContents();
|
|
94
|
+
const entries = ((_a = contents.commentExtensible) !== null && _a !== void 0 ? _a : (contents.commentExtensible = []));
|
|
95
|
+
const indexOf = (durableId) => entries.findIndex((e) => { var _a; return ((_a = e.durableId) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === durableId.toLowerCase(); });
|
|
96
|
+
return {
|
|
97
|
+
set(durableId, dateUtc) {
|
|
98
|
+
const i = indexOf(durableId);
|
|
99
|
+
if (i >= 0)
|
|
100
|
+
entries[i].dateUtc = dateToCalendar(dateUtc);
|
|
101
|
+
else
|
|
102
|
+
entries.push({ durableId, dateUtc: dateToCalendar(dateUtc) });
|
|
103
|
+
},
|
|
104
|
+
remove(durableId) {
|
|
105
|
+
const i = indexOf(durableId);
|
|
106
|
+
if (i >= 0)
|
|
107
|
+
entries.splice(i, 1);
|
|
108
|
+
},
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Word's `CommentText` and `CommentReference` styles, added when the styles part lacks them.
|
|
113
|
+
* The part is only unmarshalled when its XML does not already name both styles, so a document
|
|
114
|
+
* that has them keeps its styles part byte for byte.
|
|
115
|
+
*/
|
|
116
|
+
async function ensureCommentStyles(main) {
|
|
117
|
+
var _a;
|
|
118
|
+
const part = main.styleDefinitionsPart;
|
|
119
|
+
if (!part)
|
|
120
|
+
return;
|
|
121
|
+
if (!part.isUnmarshalled) {
|
|
122
|
+
const xml = await part.getXml();
|
|
123
|
+
if (xml.includes(`w:styleId="${COMMENT_TEXT_STYLE}"`) && xml.includes(`w:styleId="${COMMENT_REFERENCE_STYLE}"`))
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
const styles = await part.getContents();
|
|
127
|
+
const list = ((_a = styles.style) !== null && _a !== void 0 ? _a : (styles.style = []));
|
|
128
|
+
// the styles part is about to change: the property resolver caches resolved styles
|
|
129
|
+
const pkg = main.package;
|
|
130
|
+
const add = (style) => {
|
|
131
|
+
var _a;
|
|
132
|
+
list.push(style);
|
|
133
|
+
linkParents(style, styles);
|
|
134
|
+
(_a = pkg === null || pkg === void 0 ? void 0 : pkg.refreshPropertyResolver) === null || _a === void 0 ? void 0 : _a.call(pkg);
|
|
135
|
+
};
|
|
136
|
+
if (!list.some((s) => s.styleId === COMMENT_TEXT_STYLE)) {
|
|
137
|
+
add(wmlFactory.createStyle({
|
|
138
|
+
type: 'paragraph', styleId: COMMENT_TEXT_STYLE,
|
|
139
|
+
name: wmlFactory.createStyleName({ val: 'annotation text' }),
|
|
140
|
+
basedOn: wmlFactory.createStyleBasedOn({ val: 'Normal' }),
|
|
141
|
+
uiPriority: wmlFactory.createStyleUiPriority({ val: 99 }),
|
|
142
|
+
semiHidden: wmlFactory.createBooleanDefaultTrue(),
|
|
143
|
+
unhideWhenUsed: wmlFactory.createBooleanDefaultTrue(),
|
|
144
|
+
rPr: wmlFactory.createRPr({ sz: wmlFactory.createHpsMeasure({ val: 20 }), szCs: wmlFactory.createHpsMeasure({ val: 20 }) }),
|
|
145
|
+
}));
|
|
146
|
+
}
|
|
147
|
+
if (!list.some((s) => s.styleId === COMMENT_REFERENCE_STYLE)) {
|
|
148
|
+
add(wmlFactory.createStyle({
|
|
149
|
+
type: 'character', styleId: COMMENT_REFERENCE_STYLE,
|
|
150
|
+
name: wmlFactory.createStyleName({ val: 'annotation reference' }),
|
|
151
|
+
basedOn: wmlFactory.createStyleBasedOn({ val: 'DefaultParagraphFont' }),
|
|
152
|
+
uiPriority: wmlFactory.createStyleUiPriority({ val: 99 }),
|
|
153
|
+
semiHidden: wmlFactory.createBooleanDefaultTrue(),
|
|
154
|
+
unhideWhenUsed: wmlFactory.createBooleanDefaultTrue(),
|
|
155
|
+
rPr: wmlFactory.createRPr({ sz: wmlFactory.createHpsMeasure({ val: 16 }), szCs: wmlFactory.createHpsMeasure({ val: 16 }) }),
|
|
156
|
+
}));
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
setCommentPartsAccess({
|
|
160
|
+
async load(body) {
|
|
161
|
+
const main = mainPartOf(body);
|
|
162
|
+
if (!main.commentsPart)
|
|
163
|
+
return undefined;
|
|
164
|
+
return partsFor(main, main.commentsPart, authorOf(body));
|
|
165
|
+
},
|
|
166
|
+
async create(body) {
|
|
167
|
+
const main = mainPartOf(body);
|
|
168
|
+
let commentsPart = main.commentsPart;
|
|
169
|
+
if (!commentsPart) {
|
|
170
|
+
commentsPart = new CommentsPart();
|
|
171
|
+
commentsPart.setContents(wmlFactory.createComments({ comment: [] }));
|
|
172
|
+
main.addTargetPart(commentsPart);
|
|
173
|
+
}
|
|
174
|
+
await ensureCommentStyles(main);
|
|
175
|
+
const parts = await partsFor(main, commentsPart, authorOf(body));
|
|
176
|
+
await parts.ensureAll();
|
|
177
|
+
return parts;
|
|
178
|
+
},
|
|
179
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DEFAULT_NUMBERING_XML = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<w:numbering xmlns:ve=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" xmlns:o=\"urn:schemas-microsoft-com:office:office\" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" xmlns:m=\"http://schemas.openxmlformats.org/officeDocument/2006/math\" xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:wp=\"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing\" xmlns:w10=\"urn:schemas-microsoft-com:office:word\" xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\" xmlns:wne=\"http://schemas.microsoft.com/office/word/2006/wordml\">\n <w:abstractNum w:abstractNumId=\"0\">\n <w:nsid w:val=\"16892FB7\"/>\n <w:multiLevelType w:val=\"hybridMultilevel\"/>\n <w:tmpl w:val=\"5A4EB96A\"/>\n <w:lvl w:ilvl=\"0\" w:tplc=\"0C090001\">\n <w:start w:val=\"1\"/>\n <w:numFmt w:val=\"bullet\"/>\n <w:lvlText w:val=\"\uF0B7\"/>\n <w:lvlJc w:val=\"left\"/>\n <w:pPr>\n <w:ind w:left=\"720\" w:hanging=\"360\"/>\n </w:pPr>\n <w:rPr>\n <w:rFonts w:ascii=\"Symbol\" w:hAnsi=\"Symbol\" w:hint=\"default\"/>\n </w:rPr>\n </w:lvl>\n <w:lvl w:ilvl=\"1\" w:tplc=\"0C090003\" w:tentative=\"1\">\n <w:start w:val=\"1\"/>\n <w:numFmt w:val=\"bullet\"/>\n <w:lvlText w:val=\"o\"/>\n <w:lvlJc w:val=\"left\"/>\n <w:pPr>\n <w:ind w:left=\"1440\" w:hanging=\"360\"/>\n </w:pPr>\n <w:rPr>\n <w:rFonts w:ascii=\"Courier New\" w:hAnsi=\"Courier New\" w:cs=\"Courier New\" w:hint=\"default\"/>\n </w:rPr>\n </w:lvl>\n <w:lvl w:ilvl=\"2\" w:tplc=\"0C090005\" w:tentative=\"1\">\n <w:start w:val=\"1\"/>\n <w:numFmt w:val=\"bullet\"/>\n <w:lvlText w:val=\"\uF0A7\"/>\n <w:lvlJc w:val=\"left\"/>\n <w:pPr>\n <w:ind w:left=\"2160\" w:hanging=\"360\"/>\n </w:pPr>\n <w:rPr>\n <w:rFonts w:ascii=\"Wingdings\" w:hAnsi=\"Wingdings\" w:hint=\"default\"/>\n </w:rPr>\n </w:lvl>\n <w:lvl w:ilvl=\"3\" w:tplc=\"0C090001\" w:tentative=\"1\">\n <w:start w:val=\"1\"/>\n <w:numFmt w:val=\"bullet\"/>\n <w:lvlText w:val=\"\uF0B7\"/>\n <w:lvlJc w:val=\"left\"/>\n <w:pPr>\n <w:ind w:left=\"2880\" w:hanging=\"360\"/>\n </w:pPr>\n <w:rPr>\n <w:rFonts w:ascii=\"Symbol\" w:hAnsi=\"Symbol\" w:hint=\"default\"/>\n </w:rPr>\n </w:lvl>\n <w:lvl w:ilvl=\"4\" w:tplc=\"0C090003\" w:tentative=\"1\">\n <w:start w:val=\"1\"/>\n <w:numFmt w:val=\"bullet\"/>\n <w:lvlText w:val=\"o\"/>\n <w:lvlJc w:val=\"left\"/>\n <w:pPr>\n <w:ind w:left=\"3600\" w:hanging=\"360\"/>\n </w:pPr>\n <w:rPr>\n <w:rFonts w:ascii=\"Courier New\" w:hAnsi=\"Courier New\" w:cs=\"Courier New\" w:hint=\"default\"/>\n </w:rPr>\n </w:lvl>\n <w:lvl w:ilvl=\"5\" w:tplc=\"0C090005\" w:tentative=\"1\">\n <w:start w:val=\"1\"/>\n <w:numFmt w:val=\"bullet\"/>\n <w:lvlText w:val=\"\uF0A7\"/>\n <w:lvlJc w:val=\"left\"/>\n <w:pPr>\n <w:ind w:left=\"4320\" w:hanging=\"360\"/>\n </w:pPr>\n <w:rPr>\n <w:rFonts w:ascii=\"Wingdings\" w:hAnsi=\"Wingdings\" w:hint=\"default\"/>\n </w:rPr>\n </w:lvl>\n <w:lvl w:ilvl=\"6\" w:tplc=\"0C090001\" w:tentative=\"1\">\n <w:start w:val=\"1\"/>\n <w:numFmt w:val=\"bullet\"/>\n <w:lvlText w:val=\"\uF0B7\"/>\n <w:lvlJc w:val=\"left\"/>\n <w:pPr>\n <w:ind w:left=\"5040\" w:hanging=\"360\"/>\n </w:pPr>\n <w:rPr>\n <w:rFonts w:ascii=\"Symbol\" w:hAnsi=\"Symbol\" w:hint=\"default\"/>\n </w:rPr>\n </w:lvl>\n <w:lvl w:ilvl=\"7\" w:tplc=\"0C090003\" w:tentative=\"1\">\n <w:start w:val=\"1\"/>\n <w:numFmt w:val=\"bullet\"/>\n <w:lvlText w:val=\"o\"/>\n <w:lvlJc w:val=\"left\"/>\n <w:pPr>\n <w:ind w:left=\"5760\" w:hanging=\"360\"/>\n </w:pPr>\n <w:rPr>\n <w:rFonts w:ascii=\"Courier New\" w:hAnsi=\"Courier New\" w:cs=\"Courier New\" w:hint=\"default\"/>\n </w:rPr>\n </w:lvl>\n <w:lvl w:ilvl=\"8\" w:tplc=\"0C090005\" w:tentative=\"1\">\n <w:start w:val=\"1\"/>\n <w:numFmt w:val=\"bullet\"/>\n <w:lvlText w:val=\"\uF0A7\"/>\n <w:lvlJc w:val=\"left\"/>\n <w:pPr>\n <w:ind w:left=\"6480\" w:hanging=\"360\"/>\n </w:pPr>\n <w:rPr>\n <w:rFonts w:ascii=\"Wingdings\" w:hAnsi=\"Wingdings\" w:hint=\"default\"/>\n </w:rPr>\n </w:lvl>\n </w:abstractNum>\n <w:abstractNum w:abstractNumId=\"1\">\n <w:nsid w:val=\"7E706046\"/>\n <w:multiLevelType w:val=\"hybridMultilevel\"/>\n <w:tmpl w:val=\"336E8F2C\"/>\n <w:lvl w:ilvl=\"0\" w:tplc=\"0C09000F\">\n <w:start w:val=\"1\"/>\n <w:numFmt w:val=\"decimal\"/>\n <w:lvlText w:val=\"%1.\"/>\n <w:lvlJc w:val=\"left\"/>\n <w:pPr>\n <w:ind w:left=\"720\" w:hanging=\"360\"/>\n </w:pPr>\n </w:lvl>\n <w:lvl w:ilvl=\"1\" w:tplc=\"0C090019\" w:tentative=\"1\">\n <w:start w:val=\"1\"/>\n <w:numFmt w:val=\"lowerLetter\"/>\n <w:lvlText w:val=\"%2.\"/>\n <w:lvlJc w:val=\"left\"/>\n <w:pPr>\n <w:ind w:left=\"1440\" w:hanging=\"360\"/>\n </w:pPr>\n </w:lvl>\n <w:lvl w:ilvl=\"2\" w:tplc=\"0C09001B\" w:tentative=\"1\">\n <w:start w:val=\"1\"/>\n <w:numFmt w:val=\"lowerRoman\"/>\n <w:lvlText w:val=\"%3.\"/>\n <w:lvlJc w:val=\"right\"/>\n <w:pPr>\n <w:ind w:left=\"2160\" w:hanging=\"180\"/>\n </w:pPr>\n </w:lvl>\n <w:lvl w:ilvl=\"3\" w:tplc=\"0C09000F\" w:tentative=\"1\">\n <w:start w:val=\"1\"/>\n <w:numFmt w:val=\"decimal\"/>\n <w:lvlText w:val=\"%4.\"/>\n <w:lvlJc w:val=\"left\"/>\n <w:pPr>\n <w:ind w:left=\"2880\" w:hanging=\"360\"/>\n </w:pPr>\n </w:lvl>\n <w:lvl w:ilvl=\"4\" w:tplc=\"0C090019\" w:tentative=\"1\">\n <w:start w:val=\"1\"/>\n <w:numFmt w:val=\"lowerLetter\"/>\n <w:lvlText w:val=\"%5.\"/>\n <w:lvlJc w:val=\"left\"/>\n <w:pPr>\n <w:ind w:left=\"3600\" w:hanging=\"360\"/>\n </w:pPr>\n </w:lvl>\n <w:lvl w:ilvl=\"5\" w:tplc=\"0C09001B\" w:tentative=\"1\">\n <w:start w:val=\"1\"/>\n <w:numFmt w:val=\"lowerRoman\"/>\n <w:lvlText w:val=\"%6.\"/>\n <w:lvlJc w:val=\"right\"/>\n <w:pPr>\n <w:ind w:left=\"4320\" w:hanging=\"180\"/>\n </w:pPr>\n </w:lvl>\n <w:lvl w:ilvl=\"6\" w:tplc=\"0C09000F\" w:tentative=\"1\">\n <w:start w:val=\"1\"/>\n <w:numFmt w:val=\"decimal\"/>\n <w:lvlText w:val=\"%7.\"/>\n <w:lvlJc w:val=\"left\"/>\n <w:pPr>\n <w:ind w:left=\"5040\" w:hanging=\"360\"/>\n </w:pPr>\n </w:lvl>\n <w:lvl w:ilvl=\"7\" w:tplc=\"0C090019\" w:tentative=\"1\">\n <w:start w:val=\"1\"/>\n <w:numFmt w:val=\"lowerLetter\"/>\n <w:lvlText w:val=\"%8.\"/>\n <w:lvlJc w:val=\"left\"/>\n <w:pPr>\n <w:ind w:left=\"5760\" w:hanging=\"360\"/>\n </w:pPr>\n </w:lvl>\n <w:lvl w:ilvl=\"8\" w:tplc=\"0C09001B\" w:tentative=\"1\">\n <w:start w:val=\"1\"/>\n <w:numFmt w:val=\"lowerRoman\"/>\n <w:lvlText w:val=\"%9.\"/>\n <w:lvlJc w:val=\"right\"/>\n <w:pPr>\n <w:ind w:left=\"6480\" w:hanging=\"180\"/>\n </w:pPr>\n </w:lvl>\n </w:abstractNum>\n <w:num w:numId=\"1\">\n <w:abstractNumId w:val=\"1\"/>\n </w:num>\n <w:num w:numId=\"2\">\n <w:abstractNumId w:val=\"0\"/>\n </w:num>\n</w:numbering>";
|