@syncfusion/ej2-docx-renderer 0.0.0-stage → 35.2.15
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 +2 -2
- package/base.d.ts +4 -0
- package/base.js +4 -0
- package/dist/ej2-docx-renderer.umd.min.js +2 -0
- package/dist/ej2-docx-renderer.umd.min.js.map +1 -0
- package/dist/es6/ej2-docx-renderer.es2015.js +52432 -0
- package/dist/es6/ej2-docx-renderer.es2015.js.map +1 -0
- package/dist/es6/ej2-docx-renderer.es5.js +54425 -0
- package/dist/es6/ej2-docx-renderer.es5.js.map +1 -0
- package/dist/global/ej2-docx-renderer.min.js +2 -0
- package/dist/global/ej2-docx-renderer.min.js.map +1 -0
- package/dist/global/index.d.ts +5 -0
- package/format.d.ts +4 -0
- package/format.js +4 -0
- package/helper.d.ts +4 -0
- package/helper.js +4 -0
- package/index.d.ts +4 -0
- package/index.js +4 -0
- package/license +10 -0
- package/list.d.ts +4 -0
- package/list.js +4 -0
- package/package.json +26 -4
- package/parser.d.ts +4 -0
- package/parser.js +4 -0
- package/src/base/constants.d.ts +2 -0
- package/src/base/constants.js +2 -0
- package/src/base/dictionary.d.ts +52 -0
- package/src/base/dictionary.js +137 -0
- package/src/base/index.d.ts +9 -0
- package/src/base/index.js +9 -0
- package/src/base/keywords.d.ts +422 -0
- package/src/base/keywords.js +422 -0
- package/src/base/types.d.ts +2590 -0
- package/src/base/types.js +1056 -0
- package/src/base/unique-format.d.ts +87 -0
- package/src/base/unique-format.js +858 -0
- package/src/base/unique-formats.d.ts +32 -0
- package/src/base/unique-formats.js +87 -0
- package/src/document-canvas.d.ts +61 -0
- package/src/document-canvas.js +221 -0
- package/src/docx-renderer.d.ts +941 -0
- package/src/docx-renderer.js +2251 -0
- package/src/format/border.d.ts +53 -0
- package/src/format/border.js +600 -0
- package/src/format/borders.d.ts +44 -0
- package/src/format/borders.js +314 -0
- package/src/format/cell-format.d.ts +42 -0
- package/src/format/cell-format.js +309 -0
- package/src/format/character-format.d.ts +152 -0
- package/src/format/character-format.js +1224 -0
- package/src/format/index.d.ts +14 -0
- package/src/format/index.js +14 -0
- package/src/format/list-format.d.ts +32 -0
- package/src/format/list-format.js +238 -0
- package/src/format/paragraph-format.d.ts +103 -0
- package/src/format/paragraph-format.js +854 -0
- package/src/format/row-format.d.ts +119 -0
- package/src/format/row-format.js +545 -0
- package/src/format/section-format.d.ts +89 -0
- package/src/format/section-format.js +689 -0
- package/src/format/shading.d.ts +24 -0
- package/src/format/shading.js +137 -0
- package/src/format/style.d.ts +106 -0
- package/src/format/style.js +286 -0
- package/src/format/table-format.d.ts +51 -0
- package/src/format/table-format.js +395 -0
- package/src/global.js +1 -0
- package/src/helper/document-editor-helper.d.ts +515 -0
- package/src/helper/document-editor-helper.js +1302 -0
- package/src/helper/document-editor-settings.d.ts +293 -0
- package/src/helper/document-editor-settings.js +94 -0
- package/src/helper/index.d.ts +5 -0
- package/src/helper/index.js +5 -0
- package/src/helper/layout-helper-methods.d.ts +539 -0
- package/src/helper/layout-helper-methods.js +1065 -0
- package/src/helper/renderer-hooks.d.ts +74 -0
- package/src/helper/renderer-hooks.js +14 -0
- package/src/helper/revision-helper-methods.d.ts +199 -0
- package/src/helper/revision-helper-methods.js +362 -0
- package/src/index.d.ts +18 -0
- package/src/index.js +18 -0
- package/src/layout-helper.d.ts +190 -0
- package/src/layout-helper.js +1368 -0
- package/src/layout.d.ts +779 -0
- package/src/layout.js +17232 -0
- package/src/list/abstract-list.d.ts +25 -0
- package/src/list/abstract-list.js +67 -0
- package/src/list/index.d.ts +7 -0
- package/src/list/index.js +7 -0
- package/src/list/level-override.d.ts +22 -0
- package/src/list/level-override.js +43 -0
- package/src/list/list-level.d.ts +57 -0
- package/src/list/list-level.js +249 -0
- package/src/list/list.d.ts +30 -0
- package/src/list/list.js +100 -0
- package/src/page.d.ts +4155 -0
- package/src/page.js +11342 -0
- package/src/parser/index.d.ts +1 -0
- package/src/parser/index.js +1 -0
- package/src/parser/sfdt-reader.d.ts +254 -0
- package/src/parser/sfdt-reader.js +4569 -0
- package/src/render.d.ts +226 -0
- package/src/render.js +4222 -0
- package/src/text-helper.d.ts +144 -0
- package/src/text-helper.js +1079 -0
- package/src/text-helpers/index.d.ts +2 -0
- package/src/text-helpers/index.js +2 -0
- package/src/text-helpers/optimized.d.ts +45 -0
- package/src/text-helpers/optimized.js +121 -0
- package/src/text-helpers/regular.d.ts +37 -0
- package/src/text-helpers/regular.js +93 -0
- package/src/themes/font-scheme.d.ts +28 -0
- package/src/themes/font-scheme.js +107 -0
- package/src/themes/index.d.ts +6 -0
- package/src/themes/index.js +6 -0
- package/src/themes/major-minor-font-scheme.d.ts +14 -0
- package/src/themes/major-minor-font-scheme.js +45 -0
- package/src/themes/themes.d.ts +11 -0
- package/src/themes/themes.js +31 -0
- package/src/utility/index.d.ts +1 -0
- package/src/utility/index.js +1 -0
- package/src/utility/path-util.d.ts +133 -0
- package/src/utility/path-util.js +639 -0
- package/text-helpers.d.ts +4 -0
- package/text-helpers.js +4 -0
- package/themes.d.ts +4 -0
- package/themes.js +4 -0
- package/utility.d.ts +4 -0
- package/utility.js +4 -0
|
@@ -0,0 +1,689 @@
|
|
|
1
|
+
import { isNullOrUndefined } from '@syncfusion/ej2-base';
|
|
2
|
+
import { Dictionary } from '../base/dictionary';
|
|
3
|
+
import { WUniqueFormat } from '../base/unique-format';
|
|
4
|
+
import { WUniqueFormats } from '../base/unique-formats';
|
|
5
|
+
/* eslint-disable */
|
|
6
|
+
/**
|
|
7
|
+
* @private
|
|
8
|
+
*/
|
|
9
|
+
var WSectionFormat = /** @class */ (function () {
|
|
10
|
+
function WSectionFormat(node) {
|
|
11
|
+
this.uniqueSectionFormat = undefined;
|
|
12
|
+
this.columns = [];
|
|
13
|
+
this.ownerBase = node;
|
|
14
|
+
this.columns = [];
|
|
15
|
+
this.removedHeaderFooters = [];
|
|
16
|
+
}
|
|
17
|
+
Object.defineProperty(WSectionFormat.prototype, "headerDistance", {
|
|
18
|
+
get: function () {
|
|
19
|
+
return this.getPropertyValue('headerDistance');
|
|
20
|
+
},
|
|
21
|
+
set: function (value) {
|
|
22
|
+
this.setPropertyValue('headerDistance', value);
|
|
23
|
+
},
|
|
24
|
+
enumerable: true,
|
|
25
|
+
configurable: true
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(WSectionFormat.prototype, "footerDistance", {
|
|
28
|
+
get: function () {
|
|
29
|
+
return this.getPropertyValue('footerDistance');
|
|
30
|
+
},
|
|
31
|
+
set: function (value) {
|
|
32
|
+
this.setPropertyValue('footerDistance', value);
|
|
33
|
+
},
|
|
34
|
+
enumerable: true,
|
|
35
|
+
configurable: true
|
|
36
|
+
});
|
|
37
|
+
Object.defineProperty(WSectionFormat.prototype, "differentFirstPage", {
|
|
38
|
+
get: function () {
|
|
39
|
+
return this.getPropertyValue('differentFirstPage');
|
|
40
|
+
},
|
|
41
|
+
set: function (value) {
|
|
42
|
+
this.setPropertyValue('differentFirstPage', value);
|
|
43
|
+
},
|
|
44
|
+
enumerable: true,
|
|
45
|
+
configurable: true
|
|
46
|
+
});
|
|
47
|
+
Object.defineProperty(WSectionFormat.prototype, "differentOddAndEvenPages", {
|
|
48
|
+
get: function () {
|
|
49
|
+
return this.getPropertyValue('differentOddAndEvenPages');
|
|
50
|
+
},
|
|
51
|
+
set: function (value) {
|
|
52
|
+
this.setPropertyValue('differentOddAndEvenPages', value);
|
|
53
|
+
},
|
|
54
|
+
enumerable: true,
|
|
55
|
+
configurable: true
|
|
56
|
+
});
|
|
57
|
+
Object.defineProperty(WSectionFormat.prototype, "pageHeight", {
|
|
58
|
+
get: function () {
|
|
59
|
+
return this.getPropertyValue('pageHeight');
|
|
60
|
+
},
|
|
61
|
+
set: function (value) {
|
|
62
|
+
this.setPropertyValue('pageHeight', value);
|
|
63
|
+
},
|
|
64
|
+
enumerable: true,
|
|
65
|
+
configurable: true
|
|
66
|
+
});
|
|
67
|
+
Object.defineProperty(WSectionFormat.prototype, "rightMargin", {
|
|
68
|
+
get: function () {
|
|
69
|
+
return this.getPropertyValue('rightMargin');
|
|
70
|
+
},
|
|
71
|
+
set: function (value) {
|
|
72
|
+
this.setPropertyValue('rightMargin', value);
|
|
73
|
+
},
|
|
74
|
+
enumerable: true,
|
|
75
|
+
configurable: true
|
|
76
|
+
});
|
|
77
|
+
Object.defineProperty(WSectionFormat.prototype, "pageWidth", {
|
|
78
|
+
get: function () {
|
|
79
|
+
return this.getPropertyValue('pageWidth');
|
|
80
|
+
},
|
|
81
|
+
set: function (value) {
|
|
82
|
+
this.setPropertyValue('pageWidth', value);
|
|
83
|
+
},
|
|
84
|
+
enumerable: true,
|
|
85
|
+
configurable: true
|
|
86
|
+
});
|
|
87
|
+
Object.defineProperty(WSectionFormat.prototype, "leftMargin", {
|
|
88
|
+
get: function () {
|
|
89
|
+
return this.getPropertyValue('leftMargin');
|
|
90
|
+
},
|
|
91
|
+
set: function (value) {
|
|
92
|
+
this.setPropertyValue('leftMargin', value);
|
|
93
|
+
},
|
|
94
|
+
enumerable: true,
|
|
95
|
+
configurable: true
|
|
96
|
+
});
|
|
97
|
+
Object.defineProperty(WSectionFormat.prototype, "bottomMargin", {
|
|
98
|
+
get: function () {
|
|
99
|
+
return this.getPropertyValue('bottomMargin');
|
|
100
|
+
},
|
|
101
|
+
set: function (value) {
|
|
102
|
+
this.setPropertyValue('bottomMargin', value);
|
|
103
|
+
},
|
|
104
|
+
enumerable: true,
|
|
105
|
+
configurable: true
|
|
106
|
+
});
|
|
107
|
+
Object.defineProperty(WSectionFormat.prototype, "topMargin", {
|
|
108
|
+
get: function () {
|
|
109
|
+
return this.getPropertyValue('topMargin');
|
|
110
|
+
},
|
|
111
|
+
set: function (value) {
|
|
112
|
+
this.setPropertyValue('topMargin', value);
|
|
113
|
+
},
|
|
114
|
+
enumerable: true,
|
|
115
|
+
configurable: true
|
|
116
|
+
});
|
|
117
|
+
Object.defineProperty(WSectionFormat.prototype, "bidi", {
|
|
118
|
+
get: function () {
|
|
119
|
+
return this.getPropertyValue('bidi');
|
|
120
|
+
},
|
|
121
|
+
set: function (value) {
|
|
122
|
+
this.setPropertyValue('bidi', value);
|
|
123
|
+
},
|
|
124
|
+
enumerable: true,
|
|
125
|
+
configurable: true
|
|
126
|
+
});
|
|
127
|
+
Object.defineProperty(WSectionFormat.prototype, "restartPageNumbering", {
|
|
128
|
+
get: function () {
|
|
129
|
+
return this.getPropertyValue('restartPageNumbering');
|
|
130
|
+
},
|
|
131
|
+
set: function (value) {
|
|
132
|
+
this.setPropertyValue('restartPageNumbering', value);
|
|
133
|
+
},
|
|
134
|
+
enumerable: true,
|
|
135
|
+
configurable: true
|
|
136
|
+
});
|
|
137
|
+
Object.defineProperty(WSectionFormat.prototype, "pageStartingNumber", {
|
|
138
|
+
get: function () {
|
|
139
|
+
return this.getPropertyValue('pageStartingNumber');
|
|
140
|
+
},
|
|
141
|
+
set: function (value) {
|
|
142
|
+
this.setPropertyValue('pageStartingNumber', value);
|
|
143
|
+
},
|
|
144
|
+
enumerable: true,
|
|
145
|
+
configurable: true
|
|
146
|
+
});
|
|
147
|
+
Object.defineProperty(WSectionFormat.prototype, "endnoteNumberFormat", {
|
|
148
|
+
get: function () {
|
|
149
|
+
return this.getPropertyValue('endnoteNumberFormat');
|
|
150
|
+
},
|
|
151
|
+
set: function (value) {
|
|
152
|
+
this.setPropertyValue('endnoteNumberFormat', value);
|
|
153
|
+
},
|
|
154
|
+
enumerable: true,
|
|
155
|
+
configurable: true
|
|
156
|
+
});
|
|
157
|
+
Object.defineProperty(WSectionFormat.prototype, "restartIndexForEndnotes", {
|
|
158
|
+
get: function () {
|
|
159
|
+
return this.getPropertyValue('restartIndexForEndnotes');
|
|
160
|
+
},
|
|
161
|
+
set: function (value) {
|
|
162
|
+
this.setPropertyValue('restartIndexForEndnotes', value);
|
|
163
|
+
},
|
|
164
|
+
enumerable: true,
|
|
165
|
+
configurable: true
|
|
166
|
+
});
|
|
167
|
+
Object.defineProperty(WSectionFormat.prototype, "restartIndexForFootnotes", {
|
|
168
|
+
get: function () {
|
|
169
|
+
return this.getPropertyValue('restartIndexForFootnotes');
|
|
170
|
+
},
|
|
171
|
+
set: function (value) {
|
|
172
|
+
this.setPropertyValue('restartIndexForFootnotes', value);
|
|
173
|
+
},
|
|
174
|
+
enumerable: true,
|
|
175
|
+
configurable: true
|
|
176
|
+
});
|
|
177
|
+
Object.defineProperty(WSectionFormat.prototype, "footNoteNumberFormat", {
|
|
178
|
+
get: function () {
|
|
179
|
+
return this.getPropertyValue('footNoteNumberFormat');
|
|
180
|
+
},
|
|
181
|
+
set: function (value) {
|
|
182
|
+
this.setPropertyValue('footNoteNumberFormat', value);
|
|
183
|
+
},
|
|
184
|
+
enumerable: true,
|
|
185
|
+
configurable: true
|
|
186
|
+
});
|
|
187
|
+
Object.defineProperty(WSectionFormat.prototype, "initialFootNoteNumber", {
|
|
188
|
+
get: function () {
|
|
189
|
+
return this.getPropertyValue('initialFootNoteNumber');
|
|
190
|
+
},
|
|
191
|
+
set: function (value) {
|
|
192
|
+
this.setPropertyValue('initialFootNoteNumber', value);
|
|
193
|
+
},
|
|
194
|
+
enumerable: true,
|
|
195
|
+
configurable: true
|
|
196
|
+
});
|
|
197
|
+
Object.defineProperty(WSectionFormat.prototype, "initialEndNoteNumber", {
|
|
198
|
+
get: function () {
|
|
199
|
+
return this.getPropertyValue('initialEndNoteNumber');
|
|
200
|
+
},
|
|
201
|
+
set: function (value) {
|
|
202
|
+
this.setPropertyValue('initialEndNoteNumber', value);
|
|
203
|
+
},
|
|
204
|
+
enumerable: true,
|
|
205
|
+
configurable: true
|
|
206
|
+
});
|
|
207
|
+
Object.defineProperty(WSectionFormat.prototype, "pageNumberStyle", {
|
|
208
|
+
get: function () {
|
|
209
|
+
return this.getPropertyValue('pageNumberStyle');
|
|
210
|
+
},
|
|
211
|
+
set: function (value) {
|
|
212
|
+
this.setPropertyValue('pageNumberStyle', value);
|
|
213
|
+
},
|
|
214
|
+
enumerable: true,
|
|
215
|
+
configurable: true
|
|
216
|
+
});
|
|
217
|
+
Object.defineProperty(WSectionFormat.prototype, "numberOfColumns", {
|
|
218
|
+
get: function () {
|
|
219
|
+
return this.getPropertyValue('numberOfColumns');
|
|
220
|
+
},
|
|
221
|
+
set: function (value) {
|
|
222
|
+
this.setPropertyValue('numberOfColumns', value);
|
|
223
|
+
},
|
|
224
|
+
enumerable: true,
|
|
225
|
+
configurable: true
|
|
226
|
+
});
|
|
227
|
+
Object.defineProperty(WSectionFormat.prototype, "equalWidth", {
|
|
228
|
+
get: function () {
|
|
229
|
+
return this.getPropertyValue('equalWidth');
|
|
230
|
+
},
|
|
231
|
+
set: function (value) {
|
|
232
|
+
this.setPropertyValue('equalWidth', value);
|
|
233
|
+
},
|
|
234
|
+
enumerable: true,
|
|
235
|
+
configurable: true
|
|
236
|
+
});
|
|
237
|
+
Object.defineProperty(WSectionFormat.prototype, "lineBetweenColumns", {
|
|
238
|
+
get: function () {
|
|
239
|
+
return this.getPropertyValue('lineBetweenColumns');
|
|
240
|
+
},
|
|
241
|
+
set: function (value) {
|
|
242
|
+
this.setPropertyValue('lineBetweenColumns', value);
|
|
243
|
+
},
|
|
244
|
+
enumerable: true,
|
|
245
|
+
configurable: true
|
|
246
|
+
});
|
|
247
|
+
Object.defineProperty(WSectionFormat.prototype, "breakCode", {
|
|
248
|
+
get: function () {
|
|
249
|
+
return this.getPropertyValue('breakCode');
|
|
250
|
+
},
|
|
251
|
+
set: function (value) {
|
|
252
|
+
this.setPropertyValue('breakCode', value);
|
|
253
|
+
},
|
|
254
|
+
enumerable: true,
|
|
255
|
+
configurable: true
|
|
256
|
+
});
|
|
257
|
+
Object.defineProperty(WSectionFormat.prototype, "firstPageHeader", {
|
|
258
|
+
get: function () {
|
|
259
|
+
return this.getPropertyValue('firstPageHeader');
|
|
260
|
+
},
|
|
261
|
+
set: function (value) {
|
|
262
|
+
this.setPropertyValue('firstPageHeader', value);
|
|
263
|
+
},
|
|
264
|
+
enumerable: true,
|
|
265
|
+
configurable: true
|
|
266
|
+
});
|
|
267
|
+
Object.defineProperty(WSectionFormat.prototype, "firstPageFooter", {
|
|
268
|
+
get: function () {
|
|
269
|
+
return this.getPropertyValue('firstPageFooter');
|
|
270
|
+
},
|
|
271
|
+
set: function (value) {
|
|
272
|
+
this.setPropertyValue('firstPageFooter', value);
|
|
273
|
+
},
|
|
274
|
+
enumerable: true,
|
|
275
|
+
configurable: true
|
|
276
|
+
});
|
|
277
|
+
Object.defineProperty(WSectionFormat.prototype, "oddPageHeader", {
|
|
278
|
+
get: function () {
|
|
279
|
+
return this.getPropertyValue('oddPageHeader');
|
|
280
|
+
},
|
|
281
|
+
set: function (value) {
|
|
282
|
+
this.setPropertyValue('oddPageHeader', value);
|
|
283
|
+
},
|
|
284
|
+
enumerable: true,
|
|
285
|
+
configurable: true
|
|
286
|
+
});
|
|
287
|
+
Object.defineProperty(WSectionFormat.prototype, "oddPageFooter", {
|
|
288
|
+
get: function () {
|
|
289
|
+
return this.getPropertyValue('oddPageFooter');
|
|
290
|
+
},
|
|
291
|
+
set: function (value) {
|
|
292
|
+
this.setPropertyValue('oddPageFooter', value);
|
|
293
|
+
},
|
|
294
|
+
enumerable: true,
|
|
295
|
+
configurable: true
|
|
296
|
+
});
|
|
297
|
+
Object.defineProperty(WSectionFormat.prototype, "evenPageHeader", {
|
|
298
|
+
get: function () {
|
|
299
|
+
return this.getPropertyValue('evenPageHeader');
|
|
300
|
+
},
|
|
301
|
+
set: function (value) {
|
|
302
|
+
this.setPropertyValue('evenPageHeader', value);
|
|
303
|
+
},
|
|
304
|
+
enumerable: true,
|
|
305
|
+
configurable: true
|
|
306
|
+
});
|
|
307
|
+
Object.defineProperty(WSectionFormat.prototype, "evenPageFooter", {
|
|
308
|
+
get: function () {
|
|
309
|
+
return this.getPropertyValue('evenPageFooter');
|
|
310
|
+
},
|
|
311
|
+
set: function (value) {
|
|
312
|
+
this.setPropertyValue('evenPageFooter', value);
|
|
313
|
+
},
|
|
314
|
+
enumerable: true,
|
|
315
|
+
configurable: true
|
|
316
|
+
});
|
|
317
|
+
WSectionFormat.prototype.destroy = function () {
|
|
318
|
+
if (!isNullOrUndefined(this.uniqueSectionFormat)) {
|
|
319
|
+
WSectionFormat.uniqueSectionFormats.remove(this.uniqueSectionFormat);
|
|
320
|
+
}
|
|
321
|
+
this.uniqueSectionFormat = undefined;
|
|
322
|
+
this.ownerBase = undefined;
|
|
323
|
+
this.columns = undefined;
|
|
324
|
+
this.removedHeaderFooters = undefined;
|
|
325
|
+
};
|
|
326
|
+
/**
|
|
327
|
+
* @private
|
|
328
|
+
*/
|
|
329
|
+
WSectionFormat.prototype.hasValue = function (property) {
|
|
330
|
+
if (!isNullOrUndefined(this.uniqueSectionFormat)) {
|
|
331
|
+
var propertyType = WUniqueFormat.getPropertyType(this.uniqueSectionFormat.uniqueFormatType, property);
|
|
332
|
+
return this.uniqueSectionFormat.propertiesHash.containsKey(propertyType);
|
|
333
|
+
}
|
|
334
|
+
return false;
|
|
335
|
+
};
|
|
336
|
+
WSectionFormat.getPropertyDefaultValue = function (property) {
|
|
337
|
+
var value = undefined;
|
|
338
|
+
switch (property) {
|
|
339
|
+
case 'headerDistance':
|
|
340
|
+
value = 36;
|
|
341
|
+
break;
|
|
342
|
+
case 'footerDistance':
|
|
343
|
+
value = 36;
|
|
344
|
+
break;
|
|
345
|
+
case 'differentFirstPage':
|
|
346
|
+
value = false;
|
|
347
|
+
break;
|
|
348
|
+
case 'differentOddAndEvenPages':
|
|
349
|
+
value = false;
|
|
350
|
+
break;
|
|
351
|
+
case 'pageWidth':
|
|
352
|
+
value = 612;
|
|
353
|
+
break;
|
|
354
|
+
case 'pageHeight':
|
|
355
|
+
value = 792;
|
|
356
|
+
break;
|
|
357
|
+
case 'leftMargin':
|
|
358
|
+
value = 72;
|
|
359
|
+
break;
|
|
360
|
+
case 'topMargin':
|
|
361
|
+
value = 72;
|
|
362
|
+
break;
|
|
363
|
+
case 'rightMargin':
|
|
364
|
+
value = 72;
|
|
365
|
+
break;
|
|
366
|
+
case 'bottomMargin':
|
|
367
|
+
value = 72;
|
|
368
|
+
break;
|
|
369
|
+
case 'bidi':
|
|
370
|
+
value = false;
|
|
371
|
+
break;
|
|
372
|
+
case 'restartPageNumbering':
|
|
373
|
+
value = false;
|
|
374
|
+
break;
|
|
375
|
+
case 'pageStartingNumber':
|
|
376
|
+
value = 1;
|
|
377
|
+
break;
|
|
378
|
+
case 'footnotePosition':
|
|
379
|
+
value = 'PrintAtBottomOfPage';
|
|
380
|
+
break;
|
|
381
|
+
case 'endnoteNumberFormat':
|
|
382
|
+
value = 'LowerCaseRoman';
|
|
383
|
+
break;
|
|
384
|
+
case 'endnotePosition':
|
|
385
|
+
value = 'DisplayEndOfDocument';
|
|
386
|
+
break;
|
|
387
|
+
case 'restartIndexForEndnotes':
|
|
388
|
+
value = 'DoNotRestart';
|
|
389
|
+
break;
|
|
390
|
+
case 'restartIndexForFootnotes':
|
|
391
|
+
value = 'DoNotRestart';
|
|
392
|
+
break;
|
|
393
|
+
case 'footNoteNumberFormat':
|
|
394
|
+
value = 'Arabic';
|
|
395
|
+
break;
|
|
396
|
+
case 'initialFootNoteNumber':
|
|
397
|
+
value = 1;
|
|
398
|
+
break;
|
|
399
|
+
case 'initialEndNoteNumber':
|
|
400
|
+
value = 1;
|
|
401
|
+
break;
|
|
402
|
+
case 'pageNumberStyle':
|
|
403
|
+
value = 'Arabic';
|
|
404
|
+
break;
|
|
405
|
+
case 'numberOfColumns':
|
|
406
|
+
value = 1;
|
|
407
|
+
break;
|
|
408
|
+
case 'equalWidth':
|
|
409
|
+
value = true;
|
|
410
|
+
break;
|
|
411
|
+
case 'lineBetweenColumns':
|
|
412
|
+
value = false;
|
|
413
|
+
break;
|
|
414
|
+
case 'breakCode':
|
|
415
|
+
value = 'NewPage';
|
|
416
|
+
break;
|
|
417
|
+
case 'firstPageHeader':
|
|
418
|
+
value = undefined;
|
|
419
|
+
break;
|
|
420
|
+
case 'firstPageFooter':
|
|
421
|
+
value = undefined;
|
|
422
|
+
break;
|
|
423
|
+
case 'oddPageHeader':
|
|
424
|
+
value = undefined;
|
|
425
|
+
break;
|
|
426
|
+
case 'oddPageFooter':
|
|
427
|
+
value = undefined;
|
|
428
|
+
break;
|
|
429
|
+
case 'evenPageHeader':
|
|
430
|
+
value = undefined;
|
|
431
|
+
break;
|
|
432
|
+
case 'evenPageFooter':
|
|
433
|
+
value = undefined;
|
|
434
|
+
break;
|
|
435
|
+
}
|
|
436
|
+
return value;
|
|
437
|
+
};
|
|
438
|
+
WSectionFormat.prototype.getPropertyValue = function (property) {
|
|
439
|
+
var hasValue = this.hasValue(property);
|
|
440
|
+
if (hasValue) {
|
|
441
|
+
var propertyType = WUniqueFormat.getPropertyType(WSectionFormat.uniqueFormatType, property);
|
|
442
|
+
if (!isNullOrUndefined(this.uniqueSectionFormat) && this.uniqueSectionFormat.propertiesHash.containsKey(propertyType)) {
|
|
443
|
+
return this.uniqueSectionFormat.propertiesHash.get(propertyType);
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
return WSectionFormat.getPropertyDefaultValue(property);
|
|
447
|
+
};
|
|
448
|
+
WSectionFormat.prototype.setPropertyValue = function (property, value) {
|
|
449
|
+
if (isNullOrUndefined(value) || value === '') {
|
|
450
|
+
value = WSectionFormat.getPropertyDefaultValue(property);
|
|
451
|
+
}
|
|
452
|
+
if (isNullOrUndefined(this.uniqueSectionFormat)) {
|
|
453
|
+
this.initializeUniqueSectionFormat(property, value);
|
|
454
|
+
}
|
|
455
|
+
else {
|
|
456
|
+
var propertyType = WUniqueFormat.getPropertyType(this.uniqueSectionFormat.uniqueFormatType, property);
|
|
457
|
+
if (this.uniqueSectionFormat.propertiesHash.containsKey(propertyType) &&
|
|
458
|
+
this.uniqueSectionFormat.propertiesHash.get(propertyType) === value) {
|
|
459
|
+
//Do nothing, since no change in property value and return
|
|
460
|
+
return;
|
|
461
|
+
}
|
|
462
|
+
this.uniqueSectionFormat = WSectionFormat.uniqueSectionFormats.updateUniqueFormat(this.uniqueSectionFormat, property, value);
|
|
463
|
+
}
|
|
464
|
+
};
|
|
465
|
+
WSectionFormat.prototype.initializeUniqueSectionFormat = function (property, propValue) {
|
|
466
|
+
var uniqueSectionFormatTemp = new Dictionary();
|
|
467
|
+
this.addUniqueSectionFormat('headerDistance', property, propValue, uniqueSectionFormatTemp);
|
|
468
|
+
this.addUniqueSectionFormat('footerDistance', property, propValue, uniqueSectionFormatTemp);
|
|
469
|
+
this.addUniqueSectionFormat('differentFirstPage', property, propValue, uniqueSectionFormatTemp);
|
|
470
|
+
this.addUniqueSectionFormat('differentOddAndEvenPages', property, propValue, uniqueSectionFormatTemp);
|
|
471
|
+
this.addUniqueSectionFormat('pageWidth', property, propValue, uniqueSectionFormatTemp);
|
|
472
|
+
this.addUniqueSectionFormat('pageHeight', property, propValue, uniqueSectionFormatTemp);
|
|
473
|
+
this.addUniqueSectionFormat('leftMargin', property, propValue, uniqueSectionFormatTemp);
|
|
474
|
+
this.addUniqueSectionFormat('topMargin', property, propValue, uniqueSectionFormatTemp);
|
|
475
|
+
this.addUniqueSectionFormat('rightMargin', property, propValue, uniqueSectionFormatTemp);
|
|
476
|
+
this.addUniqueSectionFormat('bottomMargin', property, propValue, uniqueSectionFormatTemp);
|
|
477
|
+
this.addUniqueSectionFormat('bidi', property, propValue, uniqueSectionFormatTemp);
|
|
478
|
+
this.addUniqueSectionFormat('restartPageNumbering', property, propValue, uniqueSectionFormatTemp);
|
|
479
|
+
this.addUniqueSectionFormat('pageStartingNumber', property, propValue, uniqueSectionFormatTemp);
|
|
480
|
+
this.addUniqueSectionFormat('endnoteNumberFormat', property, propValue, uniqueSectionFormatTemp);
|
|
481
|
+
this.addUniqueSectionFormat('endnotePosition', property, propValue, uniqueSectionFormatTemp);
|
|
482
|
+
this.addUniqueSectionFormat('footNoteNumberFormat', property, propValue, uniqueSectionFormatTemp);
|
|
483
|
+
this.addUniqueSectionFormat('footnotePosition', property, propValue, uniqueSectionFormatTemp);
|
|
484
|
+
this.addUniqueSectionFormat('restartIndexForEndnotes', property, propValue, uniqueSectionFormatTemp);
|
|
485
|
+
this.addUniqueSectionFormat('restartIndexForFootnotes', property, propValue, uniqueSectionFormatTemp);
|
|
486
|
+
this.addUniqueSectionFormat('initialFootNoteNumber', property, propValue, uniqueSectionFormatTemp);
|
|
487
|
+
this.addUniqueSectionFormat('initialEndNoteNumber', property, propValue, uniqueSectionFormatTemp);
|
|
488
|
+
this.addUniqueSectionFormat('pageNumberStyle', property, propValue, uniqueSectionFormatTemp);
|
|
489
|
+
this.addUniqueSectionFormat('numberOfColumns', property, propValue, uniqueSectionFormatTemp);
|
|
490
|
+
this.addUniqueSectionFormat('equalWidth', property, propValue, uniqueSectionFormatTemp);
|
|
491
|
+
this.addUniqueSectionFormat('lineBetweenColumns', property, propValue, uniqueSectionFormatTemp);
|
|
492
|
+
this.addUniqueSectionFormat('breakCode', property, propValue, uniqueSectionFormatTemp);
|
|
493
|
+
this.uniqueSectionFormat = WSectionFormat.uniqueSectionFormats.addUniqueFormat(uniqueSectionFormatTemp, WSectionFormat.uniqueFormatType);
|
|
494
|
+
};
|
|
495
|
+
WSectionFormat.prototype.addUniqueSectionFormat = function (property, modifiedProperty, propValue, uniqueSectionFormatTemp) {
|
|
496
|
+
var propertyType = WUniqueFormat.getPropertyType(WSectionFormat.uniqueFormatType, property);
|
|
497
|
+
if (property === modifiedProperty) {
|
|
498
|
+
uniqueSectionFormatTemp.add(propertyType, propValue);
|
|
499
|
+
}
|
|
500
|
+
else {
|
|
501
|
+
uniqueSectionFormatTemp.add(propertyType, WSectionFormat.getPropertyDefaultValue(property));
|
|
502
|
+
}
|
|
503
|
+
};
|
|
504
|
+
WSectionFormat.prototype.copyFormat = function (format, history) {
|
|
505
|
+
if (history && (history.isUndoing || history.isRedoing)) {
|
|
506
|
+
this.uniqueSectionFormat = format.uniqueSectionFormat;
|
|
507
|
+
this.columns = format.columns;
|
|
508
|
+
this.removedHeaderFooters = format.removedHeaderFooters;
|
|
509
|
+
}
|
|
510
|
+
else {
|
|
511
|
+
if (!isNullOrUndefined(format)) {
|
|
512
|
+
this.removedHeaderFooters = format.removedHeaderFooters;
|
|
513
|
+
if (!isNullOrUndefined(format.uniqueSectionFormat) && format.uniqueSectionFormat.propertiesHash) {
|
|
514
|
+
this.updateUniqueSectionFormat(format);
|
|
515
|
+
this.columns = format.columns;
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
};
|
|
520
|
+
WSectionFormat.prototype.updateUniqueSectionFormat = function (format) {
|
|
521
|
+
var hash = undefined;
|
|
522
|
+
if (this.uniqueSectionFormat) {
|
|
523
|
+
hash = this.uniqueSectionFormat.mergeProperties(format.uniqueSectionFormat);
|
|
524
|
+
if (this.uniqueSectionFormat.referenceCount === 0) {
|
|
525
|
+
WSectionFormat.uniqueSectionFormats.remove(this.uniqueSectionFormat);
|
|
526
|
+
this.uniqueSectionFormat = undefined;
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
this.uniqueSectionFormat = new WUniqueFormat(WSectionFormat.uniqueFormatType);
|
|
530
|
+
if (isNullOrUndefined(hash)) {
|
|
531
|
+
hash = this.uniqueSectionFormat.mergeProperties(format.uniqueSectionFormat);
|
|
532
|
+
}
|
|
533
|
+
this.uniqueSectionFormat = WSectionFormat.uniqueSectionFormats.addUniqueFormat(hash, WSectionFormat.uniqueFormatType);
|
|
534
|
+
};
|
|
535
|
+
WSectionFormat.prototype.cloneFormat = function () {
|
|
536
|
+
var format = new WSectionFormat();
|
|
537
|
+
format.uniqueSectionFormat = this.uniqueSectionFormat;
|
|
538
|
+
format.columns = this.columns;
|
|
539
|
+
return format;
|
|
540
|
+
};
|
|
541
|
+
WSectionFormat.clear = function () {
|
|
542
|
+
this.uniqueSectionFormats.clear();
|
|
543
|
+
};
|
|
544
|
+
WSectionFormat.uniqueSectionFormats = new WUniqueFormats();
|
|
545
|
+
WSectionFormat.uniqueFormatType = 10;
|
|
546
|
+
return WSectionFormat;
|
|
547
|
+
}());
|
|
548
|
+
export { WSectionFormat };
|
|
549
|
+
/**
|
|
550
|
+
* @private
|
|
551
|
+
*/
|
|
552
|
+
var WColumnFormat = /** @class */ (function () {
|
|
553
|
+
function WColumnFormat(node) {
|
|
554
|
+
this.uniqueColumnFormat = undefined;
|
|
555
|
+
this.ownerBase = node;
|
|
556
|
+
}
|
|
557
|
+
WColumnFormat.prototype.destroy = function () {
|
|
558
|
+
if (!isNullOrUndefined(this.uniqueColumnFormat)) {
|
|
559
|
+
WColumnFormat.uniqueColumnFormats.remove(this.uniqueColumnFormat);
|
|
560
|
+
}
|
|
561
|
+
this.uniqueColumnFormat = undefined;
|
|
562
|
+
this.ownerBase = undefined;
|
|
563
|
+
};
|
|
564
|
+
WColumnFormat.prototype.hasValue = function (property) {
|
|
565
|
+
if (!isNullOrUndefined(this.uniqueColumnFormat)) {
|
|
566
|
+
var propertyType = WUniqueFormat.getPropertyType(this.uniqueColumnFormat.uniqueFormatType, property);
|
|
567
|
+
return this.uniqueColumnFormat.propertiesHash.containsKey(propertyType);
|
|
568
|
+
}
|
|
569
|
+
return false;
|
|
570
|
+
};
|
|
571
|
+
Object.defineProperty(WColumnFormat.prototype, "index", {
|
|
572
|
+
get: function () {
|
|
573
|
+
return this.indexIn;
|
|
574
|
+
},
|
|
575
|
+
set: function (value) {
|
|
576
|
+
this.indexIn = value;
|
|
577
|
+
},
|
|
578
|
+
enumerable: true,
|
|
579
|
+
configurable: true
|
|
580
|
+
});
|
|
581
|
+
Object.defineProperty(WColumnFormat.prototype, "width", {
|
|
582
|
+
get: function () {
|
|
583
|
+
return this.getPropertyValue('width');
|
|
584
|
+
},
|
|
585
|
+
set: function (value) {
|
|
586
|
+
this.setPropertyValue('width', value);
|
|
587
|
+
},
|
|
588
|
+
enumerable: true,
|
|
589
|
+
configurable: true
|
|
590
|
+
});
|
|
591
|
+
Object.defineProperty(WColumnFormat.prototype, "space", {
|
|
592
|
+
get: function () {
|
|
593
|
+
return this.getPropertyValue('space');
|
|
594
|
+
},
|
|
595
|
+
set: function (value) {
|
|
596
|
+
this.setPropertyValue('space', value);
|
|
597
|
+
},
|
|
598
|
+
enumerable: true,
|
|
599
|
+
configurable: true
|
|
600
|
+
});
|
|
601
|
+
WColumnFormat.prototype.getPropertyValue = function (property) {
|
|
602
|
+
var hasValue = this.hasValue(property);
|
|
603
|
+
if (hasValue) {
|
|
604
|
+
var propertyType = WUniqueFormat.getPropertyType(WColumnFormat.uniqueFormatType, property);
|
|
605
|
+
if (!isNullOrUndefined(this.uniqueColumnFormat) && this.uniqueColumnFormat.propertiesHash.containsKey(propertyType)) {
|
|
606
|
+
return this.uniqueColumnFormat.propertiesHash.get(propertyType);
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
return WColumnFormat.getPropertyDefaultValue(property);
|
|
610
|
+
};
|
|
611
|
+
WColumnFormat.getPropertyDefaultValue = function (property) {
|
|
612
|
+
var value = undefined;
|
|
613
|
+
switch (property) {
|
|
614
|
+
case 'width':
|
|
615
|
+
value = 36;
|
|
616
|
+
break;
|
|
617
|
+
case 'space':
|
|
618
|
+
value = 0;
|
|
619
|
+
break;
|
|
620
|
+
}
|
|
621
|
+
return value;
|
|
622
|
+
};
|
|
623
|
+
WColumnFormat.prototype.setPropertyValue = function (property, value) {
|
|
624
|
+
if (isNullOrUndefined(value) || value === '') {
|
|
625
|
+
value = WColumnFormat.getPropertyDefaultValue(property);
|
|
626
|
+
}
|
|
627
|
+
if (isNullOrUndefined(this.uniqueColumnFormat)) {
|
|
628
|
+
this.initializeUniqueColumnFormat(property, value);
|
|
629
|
+
}
|
|
630
|
+
else {
|
|
631
|
+
var propertyType = WUniqueFormat.getPropertyType(this.uniqueColumnFormat.uniqueFormatType, property);
|
|
632
|
+
if (this.uniqueColumnFormat.propertiesHash.containsKey(propertyType) &&
|
|
633
|
+
this.uniqueColumnFormat.propertiesHash.get(propertyType) === value) {
|
|
634
|
+
//Do nothing, since no change in property value and return
|
|
635
|
+
return;
|
|
636
|
+
}
|
|
637
|
+
this.uniqueColumnFormat = WColumnFormat.uniqueColumnFormats.updateUniqueFormat(this.uniqueColumnFormat, property, value);
|
|
638
|
+
}
|
|
639
|
+
};
|
|
640
|
+
WColumnFormat.prototype.initializeUniqueColumnFormat = function (property, propValue) {
|
|
641
|
+
var uniqueColumnFormatTemp = new Dictionary();
|
|
642
|
+
this.addUniqueColumnFormat('width', property, propValue, uniqueColumnFormatTemp);
|
|
643
|
+
this.addUniqueColumnFormat('space', property, propValue, uniqueColumnFormatTemp);
|
|
644
|
+
this.uniqueColumnFormat = WColumnFormat.uniqueColumnFormats.addUniqueFormat(uniqueColumnFormatTemp, WColumnFormat.uniqueFormatType);
|
|
645
|
+
};
|
|
646
|
+
WColumnFormat.prototype.addUniqueColumnFormat = function (property, modifiedProperty, propValue, uniqueColumnFormatTemp) {
|
|
647
|
+
var propertyType = WUniqueFormat.getPropertyType(WColumnFormat.uniqueFormatType, property);
|
|
648
|
+
if (property === modifiedProperty) {
|
|
649
|
+
uniqueColumnFormatTemp.add(propertyType, propValue);
|
|
650
|
+
}
|
|
651
|
+
else {
|
|
652
|
+
uniqueColumnFormatTemp.add(propertyType, WColumnFormat.getPropertyDefaultValue(property));
|
|
653
|
+
}
|
|
654
|
+
};
|
|
655
|
+
WColumnFormat.prototype.updateUniqueColumnFormat = function (format) {
|
|
656
|
+
var hash = undefined;
|
|
657
|
+
if (this.uniqueColumnFormat) {
|
|
658
|
+
hash = this.uniqueColumnFormat.mergeProperties(format.uniqueColumnFormat);
|
|
659
|
+
if (this.uniqueColumnFormat.referenceCount === 0) {
|
|
660
|
+
WColumnFormat.uniqueColumnFormats.remove(this.uniqueColumnFormat);
|
|
661
|
+
this.uniqueColumnFormat = undefined;
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
this.uniqueColumnFormat = new WUniqueFormat(WColumnFormat.uniqueFormatType);
|
|
665
|
+
if (isNullOrUndefined(hash)) {
|
|
666
|
+
hash = this.uniqueColumnFormat.mergeProperties(format.uniqueColumnFormat);
|
|
667
|
+
}
|
|
668
|
+
this.uniqueColumnFormat = WColumnFormat.uniqueColumnFormats.addUniqueFormat(hash, WColumnFormat.uniqueFormatType);
|
|
669
|
+
};
|
|
670
|
+
WColumnFormat.prototype.cloneFormat = function () {
|
|
671
|
+
var colFormat = new WColumnFormat(undefined);
|
|
672
|
+
colFormat.width = this.width;
|
|
673
|
+
colFormat.space = this.space;
|
|
674
|
+
return colFormat;
|
|
675
|
+
};
|
|
676
|
+
WColumnFormat.prototype.copyFormat = function (colFormat) {
|
|
677
|
+
if (!isNullOrUndefined(colFormat) && !isNullOrUndefined(colFormat.uniqueColumnFormat)) {
|
|
678
|
+
this.width = colFormat.width;
|
|
679
|
+
this.space = colFormat.space;
|
|
680
|
+
}
|
|
681
|
+
};
|
|
682
|
+
WColumnFormat.clear = function () {
|
|
683
|
+
this.uniqueColumnFormats.clear();
|
|
684
|
+
};
|
|
685
|
+
WColumnFormat.uniqueColumnFormats = new WUniqueFormats();
|
|
686
|
+
WColumnFormat.uniqueFormatType = 11;
|
|
687
|
+
return WColumnFormat;
|
|
688
|
+
}());
|
|
689
|
+
export { WColumnFormat };
|