@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,216 @@
|
|
|
1
|
+
import type * as wml from '@docx4j/generated-objects-ts/modules/org_docx4j_wml';
|
|
2
|
+
import { NumberingDefinitions } from '../listnumbering/definitions.mjs';
|
|
3
|
+
/** The parts the resolver reads. Structural, so this module imports no part class. */
|
|
4
|
+
export interface ResolverSource {
|
|
5
|
+
/** The styles part's `w:styles`, or undefined when the package has none. */
|
|
6
|
+
styles?: wml.Styles;
|
|
7
|
+
/** The numbering part's `w:numbering`, or undefined. */
|
|
8
|
+
numbering?: wml.Numbering;
|
|
9
|
+
}
|
|
10
|
+
/** As much of an `XmlPart<T>` as the resolver uses. */
|
|
11
|
+
interface ReadablePart<T> {
|
|
12
|
+
readContents(): Promise<T>;
|
|
13
|
+
readonly isUnmarshalled: boolean;
|
|
14
|
+
readonly contents: T;
|
|
15
|
+
}
|
|
16
|
+
/** What `create` accepts: a WordprocessingMLPackage, or the trees on their own. */
|
|
17
|
+
interface PackageLike {
|
|
18
|
+
getMainDocumentPart(): {
|
|
19
|
+
styleDefinitionsPart?: ReadablePart<wml.Styles>;
|
|
20
|
+
numberingDefinitionsPart?: ReadablePart<wml.Numbering>;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
/** 108 twips (0.08in): the left and right cell margin of Word's built-in Normal Table. */
|
|
24
|
+
export declare const WORD_DEFAULT_CELL_MARGIN_TWIPS = 108;
|
|
25
|
+
/**
|
|
26
|
+
* The outline level (1-9) of a built-in heading style, from its `w:name` ("heading 1" ...
|
|
27
|
+
* "heading 9"), or -1. Word identifies built-in styles by name, so this holds in every locale;
|
|
28
|
+
* {@link PropertyResolver.getLvlFromHeadingStyle} keys on the English style id.
|
|
29
|
+
*/
|
|
30
|
+
export declare function headingLevelByName(style: wml.Style | undefined): number;
|
|
31
|
+
export declare class PropertyResolver {
|
|
32
|
+
private readonly provider;
|
|
33
|
+
/** Set when the styles tree the resolver holds is not the styles part's own. */
|
|
34
|
+
private readonly stylesArePrivate;
|
|
35
|
+
private documentDefaultPPr;
|
|
36
|
+
private documentDefaultRPr;
|
|
37
|
+
/** All styles in the styles part, keyed by style id (docx4j's `liveStyles`). */
|
|
38
|
+
private readonly liveStyles;
|
|
39
|
+
/** How many styles the part held when `liveStyles` was last scanned; a miss rescans only when that has changed. */
|
|
40
|
+
private scannedStyleCount;
|
|
41
|
+
/** A style's `w:basedOn` chain merged root-first, WITHOUT the document defaults, per style id. */
|
|
42
|
+
private readonly chainPPrCache;
|
|
43
|
+
private readonly chainRPrCache;
|
|
44
|
+
/** The document defaults with the chain applied over them: what the style overloads return. */
|
|
45
|
+
private readonly effectivePPrByStyle;
|
|
46
|
+
private readonly effectiveRPrByStyle;
|
|
47
|
+
/** Missing styles are logged once each per resolver. */
|
|
48
|
+
private readonly missingLogged;
|
|
49
|
+
private numberingDefinitions;
|
|
50
|
+
defaultParagraphStyleId: string | undefined;
|
|
51
|
+
private defaultCharacterStyleId;
|
|
52
|
+
private defaultTableStyleId;
|
|
53
|
+
private source;
|
|
54
|
+
private constructor();
|
|
55
|
+
/**
|
|
56
|
+
* Builds a resolver over a package's styles and numbering parts (docx4j's constructor,
|
|
57
|
+
* which can do this synchronously because JAXB is).
|
|
58
|
+
*
|
|
59
|
+
* The parts are read with `readContents()`, which does **not** mark them unmarshalled, so a
|
|
60
|
+
* document whose styles nobody has edited still saves byte for byte. Once something else
|
|
61
|
+
* unmarshals the part - the comment styles, a caller's `getContents()` - `refresh()` picks
|
|
62
|
+
* up that live tree instead of the private copy.
|
|
63
|
+
*/
|
|
64
|
+
static create(pkg: PackageLike | ResolverSource): Promise<PropertyResolver>;
|
|
65
|
+
/** Builds a resolver over object trees directly (a test, or parts already in hand). */
|
|
66
|
+
static fromSource(source: ResolverSource): PropertyResolver;
|
|
67
|
+
private init;
|
|
68
|
+
/** (Re)read the styles part into `liveStyles`. A style with no id is skipped. */
|
|
69
|
+
private scanStyles;
|
|
70
|
+
/**
|
|
71
|
+
* The style with this id, rescanning the styles part on a miss - and only when the list's
|
|
72
|
+
* size has changed - so that a style *added* to the part after this resolver was built is
|
|
73
|
+
* still found. A style *modified* or *removed* needs {@link refresh}.
|
|
74
|
+
*/
|
|
75
|
+
private getLiveStyle;
|
|
76
|
+
private logMissing;
|
|
77
|
+
/**
|
|
78
|
+
* Discard cached state and re-read the styles part. A style merely *added* is picked up
|
|
79
|
+
* automatically; call this when a style has been modified or removed, or the styles part's
|
|
80
|
+
* contents replaced. The content API calls it where it creates a style.
|
|
81
|
+
*/
|
|
82
|
+
refresh(): void;
|
|
83
|
+
getDocumentDefaultPPr(): wml.PPr;
|
|
84
|
+
getDocumentDefaultRPr(): wml.RPr;
|
|
85
|
+
/** The style id of the `w:default="1"` paragraph style, or undefined when the part declares none. */
|
|
86
|
+
getDefaultParagraphStyleId(): string | undefined;
|
|
87
|
+
/** The default paragraph style's effective `w:pPr`, as `getEffectivePPr(styleId)` gives it. */
|
|
88
|
+
getResolvedDefaultParagraphStyle(): wml.PPr;
|
|
89
|
+
/** The style with this id, or undefined (docx4j `getStyle`). */
|
|
90
|
+
getStyle(styleId: string | undefined): wml.Style | undefined;
|
|
91
|
+
/**
|
|
92
|
+
* The list definitions of the numbering part this resolver read (CR-001 Phase B step 3), or
|
|
93
|
+
* undefined where the package has none. The resolver builds them because the paragraph merge
|
|
94
|
+
* folds a numbering level's `w:ind` into every layer (`NumberingDefinitionsPart.getInd`);
|
|
95
|
+
* `NumberingDefinitionsPart.definitions` hands out this same object, so the counting and the
|
|
96
|
+
* indents read one set of definitions.
|
|
97
|
+
*/
|
|
98
|
+
getNumberingDefinitions(): NumberingDefinitions | undefined;
|
|
99
|
+
/**
|
|
100
|
+
* The style and the styles it is based on, root first (the base of the chain at index 0, the
|
|
101
|
+
* style itself last); empty for an unknown id. A cycle, or a chain deeper than 32, ends the
|
|
102
|
+
* walk where it is detected (and throws `CyclicStylesException` when
|
|
103
|
+
* `throwOnCyclicStyles(true)` is set).
|
|
104
|
+
*/
|
|
105
|
+
ancestry(styleId: string | undefined): wml.Style[];
|
|
106
|
+
/**
|
|
107
|
+
* A paragraph style's `w:basedOn` chain merged root-first, WITHOUT the document defaults:
|
|
108
|
+
* what the style contributes on its own. A live, cached object: copy before changing.
|
|
109
|
+
*/
|
|
110
|
+
getChainPPr(styleId: string | undefined): wml.PPr;
|
|
111
|
+
/**
|
|
112
|
+
* A style's `w:basedOn` chain merged root-first, WITHOUT the document defaults: for a
|
|
113
|
+
* character style, what it contributes over the paragraph's run properties. A live, cached
|
|
114
|
+
* object: copy before changing.
|
|
115
|
+
*/
|
|
116
|
+
getChainRPr(styleId: string | undefined): wml.RPr;
|
|
117
|
+
/**
|
|
118
|
+
* A style's own `w:pPr` as a layer of its chain. The built-in heading styles have a fixed
|
|
119
|
+
* outline level, which Word takes from the style's built-in NAME ("heading 1" ...
|
|
120
|
+
* "heading 9", the same in every locale; the style id is localised: "Überschrift1",
|
|
121
|
+
* "Titre1"), whatever `w:outlineLvl` the style declares: where they differ the layer is a
|
|
122
|
+
* copy with the level from the name, and the styles part is not touched.
|
|
123
|
+
*/
|
|
124
|
+
private headingLayer;
|
|
125
|
+
private applyPPrLayer;
|
|
126
|
+
/** The paragraph's style: its `w:pStyle` where that names a style that exists, else the default paragraph style. */
|
|
127
|
+
private paragraphStyleOf;
|
|
128
|
+
/** `styleId` if it names a style that exists, else the default paragraph style's id (logged once). */
|
|
129
|
+
private existingParagraphStyle;
|
|
130
|
+
/**
|
|
131
|
+
* The paragraph properties which actually apply, given a paragraph's own `w:pPr`: the
|
|
132
|
+
* document defaults, the paragraph style's chain, then the direct formatting. Run properties
|
|
133
|
+
* are not resolved here; the paragraph mark's `w:rPr` is carried as `pPr/rPr` but is not a
|
|
134
|
+
* run's formatting ({@link getEffectiveParagraphMarkRPr}).
|
|
135
|
+
*
|
|
136
|
+
* What is returned is a live object when the paragraph states no direct formatting: copy it
|
|
137
|
+
* before changing it.
|
|
138
|
+
*/
|
|
139
|
+
getEffectivePPr(pPr: wml.PPr | undefined): wml.PPr;
|
|
140
|
+
/**
|
|
141
|
+
* The paragraph properties a style resolves to (document defaults included). A style id
|
|
142
|
+
* naming no style resolves as the default paragraph style does.
|
|
143
|
+
*/
|
|
144
|
+
getEffectivePPr(styleId: string | undefined): wml.PPr;
|
|
145
|
+
private effectivePPrOfStyle;
|
|
146
|
+
/**
|
|
147
|
+
* The run properties which apply to a run, given its own `w:rPr` and the `w:pPr` of the
|
|
148
|
+
* paragraph it is in: document defaults, the paragraph style's run properties, the run's
|
|
149
|
+
* character style, then its direct formatting. A new object each call.
|
|
150
|
+
*
|
|
151
|
+
* The paragraph mark's `w:rPr` is never applied to a run; for the mark itself see
|
|
152
|
+
* {@link getEffectiveParagraphMarkRPr}.
|
|
153
|
+
*/
|
|
154
|
+
getEffectiveRPr(rPr: wml.RPr | undefined, pPr?: wml.PPr | undefined): wml.RPr;
|
|
155
|
+
/**
|
|
156
|
+
* The run properties a style resolves to on its own: document defaults, then its `w:basedOn`
|
|
157
|
+
* chain. For a paragraph style, the run properties of its paragraphs; for a character style,
|
|
158
|
+
* what it contributes with nothing under it. Undefined when no such style exists.
|
|
159
|
+
*/
|
|
160
|
+
getEffectiveRPr(styleId: string): wml.RPr | undefined;
|
|
161
|
+
private effectiveRPrOfStyle;
|
|
162
|
+
/**
|
|
163
|
+
* The character style's chain, then the direct formatting.
|
|
164
|
+
*
|
|
165
|
+
* The character style is a **level** of the style hierarchy over the paragraph's, so its
|
|
166
|
+
* toggle properties are XORed with what is beneath rather than overriding it (ECMA-376-1
|
|
167
|
+
* §17.7.3). The direct formatting after it is not a level: an explicit value there is used
|
|
168
|
+
* as it stands.
|
|
169
|
+
*/
|
|
170
|
+
private applyCharacterStyleAndDirect;
|
|
171
|
+
/**
|
|
172
|
+
* The run properties of the paragraph mark: document defaults, the paragraph style's run
|
|
173
|
+
* properties, then the `w:pPr`'s own `w:rPr`. What sizes an empty paragraph, and what a list
|
|
174
|
+
* label starts from.
|
|
175
|
+
*/
|
|
176
|
+
getEffectiveParagraphMarkRPr(pPr: wml.PPr | undefined): wml.RPr;
|
|
177
|
+
/** Whether the run states any formatting of its own (docx4j's deprecated `hasDirectRPrFormatting`). */
|
|
178
|
+
hasDirectRPrFormatting(rPr: wml.RPr | undefined): boolean;
|
|
179
|
+
/**
|
|
180
|
+
* The table style which applies, merged root-first down its `w:basedOn` chain, then the
|
|
181
|
+
* table's own `w:tblPr` over it.
|
|
182
|
+
*
|
|
183
|
+
* Word's built-in "Normal Table" (`w:tblInd` 0; cell margins 108 twips left and right, 0 top
|
|
184
|
+
* and bottom) underlies a table naming no style and a table whose chain reaches the
|
|
185
|
+
* document's default table style - and it is the built-in that applies, not the document's
|
|
186
|
+
* definition of that style (measured, CR-015 probe styles-table-default). So the default
|
|
187
|
+
* style's own layer is skipped in favour of the built-in, and a chain that does not reach it
|
|
188
|
+
* starts from nothing.
|
|
189
|
+
*
|
|
190
|
+
* A new `Style` each call, with a non-null `w:tblPr`.
|
|
191
|
+
*/
|
|
192
|
+
getEffectiveTableStyle(tblPr: wml.CTTblPrBase | undefined): wml.Style;
|
|
193
|
+
/**
|
|
194
|
+
* Whether a table's style chain reaches the document's default table style - the flag
|
|
195
|
+
* {@link getEffectiveTableStyle} decides Word's built-in Normal Table by (a table naming no
|
|
196
|
+
* style counts as reaching it).
|
|
197
|
+
*/
|
|
198
|
+
reachesDefaultTableStyle(tblPr: wml.CTTblPrBase | undefined): boolean;
|
|
199
|
+
/** Word's built-in Normal Table, as a style: what it applies whatever the document's own definition says. */
|
|
200
|
+
private builtInTableNormal;
|
|
201
|
+
/**
|
|
202
|
+
* The level of a heading style from its **id** ("Heading2" -> 2), or -1. docx4j keeps this
|
|
203
|
+
* because callers pass a style id; {@link headingLevelByName} is the rule Word applies, and
|
|
204
|
+
* is what resolution uses.
|
|
205
|
+
*/
|
|
206
|
+
getLvlFromHeadingStyle(styleId: string): number;
|
|
207
|
+
/**
|
|
208
|
+
* Make a style available for use in the document, adding it to the styles part - and,
|
|
209
|
+
* recursively, whatever it is `w:basedOn` and whatever it is linked to. Given a style id,
|
|
210
|
+
* the style must be one this package knows (there is no KnownStyles.xml here yet; a style id
|
|
211
|
+
* that is not already live and not supplied as an object returns false).
|
|
212
|
+
*/
|
|
213
|
+
activateStyle(style: wml.Style | string): boolean;
|
|
214
|
+
private activate;
|
|
215
|
+
}
|
|
216
|
+
export {};
|