@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.
Files changed (129) hide show
  1. package/README.md +2 -2
  2. package/base.d.ts +4 -0
  3. package/base.js +4 -0
  4. package/dist/ej2-docx-renderer.umd.min.js +2 -0
  5. package/dist/ej2-docx-renderer.umd.min.js.map +1 -0
  6. package/dist/es6/ej2-docx-renderer.es2015.js +52432 -0
  7. package/dist/es6/ej2-docx-renderer.es2015.js.map +1 -0
  8. package/dist/es6/ej2-docx-renderer.es5.js +54425 -0
  9. package/dist/es6/ej2-docx-renderer.es5.js.map +1 -0
  10. package/dist/global/ej2-docx-renderer.min.js +2 -0
  11. package/dist/global/ej2-docx-renderer.min.js.map +1 -0
  12. package/dist/global/index.d.ts +5 -0
  13. package/format.d.ts +4 -0
  14. package/format.js +4 -0
  15. package/helper.d.ts +4 -0
  16. package/helper.js +4 -0
  17. package/index.d.ts +4 -0
  18. package/index.js +4 -0
  19. package/license +10 -0
  20. package/list.d.ts +4 -0
  21. package/list.js +4 -0
  22. package/package.json +26 -4
  23. package/parser.d.ts +4 -0
  24. package/parser.js +4 -0
  25. package/src/base/constants.d.ts +2 -0
  26. package/src/base/constants.js +2 -0
  27. package/src/base/dictionary.d.ts +52 -0
  28. package/src/base/dictionary.js +137 -0
  29. package/src/base/index.d.ts +9 -0
  30. package/src/base/index.js +9 -0
  31. package/src/base/keywords.d.ts +422 -0
  32. package/src/base/keywords.js +422 -0
  33. package/src/base/types.d.ts +2590 -0
  34. package/src/base/types.js +1056 -0
  35. package/src/base/unique-format.d.ts +87 -0
  36. package/src/base/unique-format.js +858 -0
  37. package/src/base/unique-formats.d.ts +32 -0
  38. package/src/base/unique-formats.js +87 -0
  39. package/src/document-canvas.d.ts +61 -0
  40. package/src/document-canvas.js +221 -0
  41. package/src/docx-renderer.d.ts +941 -0
  42. package/src/docx-renderer.js +2251 -0
  43. package/src/format/border.d.ts +53 -0
  44. package/src/format/border.js +600 -0
  45. package/src/format/borders.d.ts +44 -0
  46. package/src/format/borders.js +314 -0
  47. package/src/format/cell-format.d.ts +42 -0
  48. package/src/format/cell-format.js +309 -0
  49. package/src/format/character-format.d.ts +152 -0
  50. package/src/format/character-format.js +1224 -0
  51. package/src/format/index.d.ts +14 -0
  52. package/src/format/index.js +14 -0
  53. package/src/format/list-format.d.ts +32 -0
  54. package/src/format/list-format.js +238 -0
  55. package/src/format/paragraph-format.d.ts +103 -0
  56. package/src/format/paragraph-format.js +854 -0
  57. package/src/format/row-format.d.ts +119 -0
  58. package/src/format/row-format.js +545 -0
  59. package/src/format/section-format.d.ts +89 -0
  60. package/src/format/section-format.js +689 -0
  61. package/src/format/shading.d.ts +24 -0
  62. package/src/format/shading.js +137 -0
  63. package/src/format/style.d.ts +106 -0
  64. package/src/format/style.js +286 -0
  65. package/src/format/table-format.d.ts +51 -0
  66. package/src/format/table-format.js +395 -0
  67. package/src/global.js +1 -0
  68. package/src/helper/document-editor-helper.d.ts +515 -0
  69. package/src/helper/document-editor-helper.js +1302 -0
  70. package/src/helper/document-editor-settings.d.ts +293 -0
  71. package/src/helper/document-editor-settings.js +94 -0
  72. package/src/helper/index.d.ts +5 -0
  73. package/src/helper/index.js +5 -0
  74. package/src/helper/layout-helper-methods.d.ts +539 -0
  75. package/src/helper/layout-helper-methods.js +1065 -0
  76. package/src/helper/renderer-hooks.d.ts +74 -0
  77. package/src/helper/renderer-hooks.js +14 -0
  78. package/src/helper/revision-helper-methods.d.ts +199 -0
  79. package/src/helper/revision-helper-methods.js +362 -0
  80. package/src/index.d.ts +18 -0
  81. package/src/index.js +18 -0
  82. package/src/layout-helper.d.ts +190 -0
  83. package/src/layout-helper.js +1368 -0
  84. package/src/layout.d.ts +779 -0
  85. package/src/layout.js +17232 -0
  86. package/src/list/abstract-list.d.ts +25 -0
  87. package/src/list/abstract-list.js +67 -0
  88. package/src/list/index.d.ts +7 -0
  89. package/src/list/index.js +7 -0
  90. package/src/list/level-override.d.ts +22 -0
  91. package/src/list/level-override.js +43 -0
  92. package/src/list/list-level.d.ts +57 -0
  93. package/src/list/list-level.js +249 -0
  94. package/src/list/list.d.ts +30 -0
  95. package/src/list/list.js +100 -0
  96. package/src/page.d.ts +4155 -0
  97. package/src/page.js +11342 -0
  98. package/src/parser/index.d.ts +1 -0
  99. package/src/parser/index.js +1 -0
  100. package/src/parser/sfdt-reader.d.ts +254 -0
  101. package/src/parser/sfdt-reader.js +4569 -0
  102. package/src/render.d.ts +226 -0
  103. package/src/render.js +4222 -0
  104. package/src/text-helper.d.ts +144 -0
  105. package/src/text-helper.js +1079 -0
  106. package/src/text-helpers/index.d.ts +2 -0
  107. package/src/text-helpers/index.js +2 -0
  108. package/src/text-helpers/optimized.d.ts +45 -0
  109. package/src/text-helpers/optimized.js +121 -0
  110. package/src/text-helpers/regular.d.ts +37 -0
  111. package/src/text-helpers/regular.js +93 -0
  112. package/src/themes/font-scheme.d.ts +28 -0
  113. package/src/themes/font-scheme.js +107 -0
  114. package/src/themes/index.d.ts +6 -0
  115. package/src/themes/index.js +6 -0
  116. package/src/themes/major-minor-font-scheme.d.ts +14 -0
  117. package/src/themes/major-minor-font-scheme.js +45 -0
  118. package/src/themes/themes.d.ts +11 -0
  119. package/src/themes/themes.js +31 -0
  120. package/src/utility/index.d.ts +1 -0
  121. package/src/utility/index.js +1 -0
  122. package/src/utility/path-util.d.ts +133 -0
  123. package/src/utility/path-util.js +639 -0
  124. package/text-helpers.d.ts +4 -0
  125. package/text-helpers.js +4 -0
  126. package/themes.d.ts +4 -0
  127. package/themes.js +4 -0
  128. package/utility.d.ts +4 -0
  129. package/utility.js +4 -0
@@ -0,0 +1,858 @@
1
+ /* eslint-disable */
2
+ import { isNullOrUndefined } from '@syncfusion/ej2-base';
3
+ import { Dictionary } from './dictionary';
4
+ /**
5
+ * @private
6
+ */
7
+ var WUniqueFormat = /** @class */ (function () {
8
+ function WUniqueFormat(type) {
9
+ this.referenceCount = 0;
10
+ this.uniqueFormatType = type;
11
+ this.propertiesHash = new Dictionary();
12
+ }
13
+ /**
14
+ * @private
15
+ */
16
+ WUniqueFormat.prototype.isEqual = function (source, property, modifiedValue) {
17
+ var isEqual = false;
18
+ switch (this.uniqueFormatType) {
19
+ case 1:
20
+ isEqual = this.isBorderEqual(source, property, modifiedValue);
21
+ break;
22
+ case 2:
23
+ isEqual = this.isCharacterFormatEqual(source, property, modifiedValue);
24
+ break;
25
+ case 3:
26
+ isEqual = this.isParagraphFormatEqual(source, property, modifiedValue);
27
+ break;
28
+ case 4:
29
+ isEqual = this.isCellFormatEqual(source, property, modifiedValue);
30
+ break;
31
+ case 5:
32
+ isEqual = this.isShadingEqual(source, property, modifiedValue);
33
+ break;
34
+ case 6:
35
+ isEqual = this.isRowFormatEqual(source, property, modifiedValue);
36
+ break;
37
+ case 7:
38
+ isEqual = this.isListFormatEqual(source, property, modifiedValue);
39
+ break;
40
+ case 8:
41
+ isEqual = this.isTableFormatEqual(source, property, modifiedValue);
42
+ break;
43
+ case 9:
44
+ isEqual = this.isListLevelEqual(source, property, modifiedValue);
45
+ break;
46
+ case 10:
47
+ isEqual = this.isSectionFormatEqual(source, property, modifiedValue);
48
+ break;
49
+ case 11:
50
+ isEqual = this.isColumnFormatEqual(source, property, modifiedValue);
51
+ break;
52
+ default:
53
+ break;
54
+ }
55
+ return isEqual;
56
+ };
57
+ WUniqueFormat.prototype.isNotEqual = function (property, source, modifiedProperty, modifiedValue, uniqueFormatType) {
58
+ var targetValue = undefined;
59
+ var propertyType = WUniqueFormat.getPropertyType(uniqueFormatType, property);
60
+ if (this.propertiesHash.containsKey(propertyType)) {
61
+ targetValue = this.propertiesHash.get(propertyType);
62
+ }
63
+ var sourceValue = undefined;
64
+ if (property === modifiedProperty) {
65
+ sourceValue = modifiedValue;
66
+ }
67
+ else if (source.containsKey(propertyType)) {
68
+ sourceValue = source.get(propertyType);
69
+ }
70
+ if (!(targetValue === sourceValue || (!isNullOrUndefined(targetValue) && !isNullOrUndefined(sourceValue) && targetValue === sourceValue))) {
71
+ return true;
72
+ }
73
+ return false;
74
+ };
75
+ /**
76
+ * @private
77
+ */
78
+ WUniqueFormat.getPropertyType = function (uniqueFormatType, property) {
79
+ var type = 0;
80
+ switch (uniqueFormatType) {
81
+ case 1:
82
+ type = this.getBorderPropertyType(property);
83
+ break;
84
+ case 2:
85
+ type = this.getCharacterFormatPropertyType(property);
86
+ break;
87
+ case 3:
88
+ type = this.getParaFormatPropertyType(property);
89
+ break;
90
+ case 4:
91
+ type = this.getCellFormatPropertyType(property);
92
+ break;
93
+ case 5:
94
+ type = this.getShadingPropertyType(property);
95
+ break;
96
+ case 6:
97
+ type = this.getRowFormatType(property);
98
+ break;
99
+ case 7:
100
+ type = this.getListFormatType(property);
101
+ break;
102
+ case 8:
103
+ type = this.getTableFormatType(property);
104
+ break;
105
+ case 9:
106
+ type = this.getListLevelType(property);
107
+ break;
108
+ case 10:
109
+ type = this.getSectionFormatType(property);
110
+ break;
111
+ case 11:
112
+ type = this.getColumnFormatType(property);
113
+ break;
114
+ default:
115
+ break;
116
+ }
117
+ return type;
118
+ };
119
+ WUniqueFormat.getRowFormatType = function (property) {
120
+ switch (property) {
121
+ case 'allowBreakAcrossPages': return 1;
122
+ case 'isHeader': return 2;
123
+ case 'height': return 3;
124
+ case 'heightType': return 4;
125
+ case 'gridBefore': return 5;
126
+ case 'gridBeforeWidth': return 6;
127
+ case 'gridBeforeWidthType': return 7;
128
+ case 'gridAfter': return 8;
129
+ case 'gridAfterWidth': return 9;
130
+ case 'gridAfterWidthType': return 10;
131
+ case 'leftMargin': return 11;
132
+ case 'topMargin': return 12;
133
+ case 'bottomMargin': return 13;
134
+ case 'rightMargin': return 14;
135
+ case 'leftIndent': return 15;
136
+ case 'verticallyMergedCellsLeftMargin': return 16;
137
+ case 'verticallyMergedCellsRightMargin': return 17;
138
+ case 'verticallyMergedCellsTopMargin': return 18;
139
+ case 'verticallyMergedCellsBottomMargin': return 19;
140
+ default: return 0;
141
+ }
142
+ };
143
+ WUniqueFormat.getListFormatType = function (property) {
144
+ switch (property) {
145
+ case 'listId': return 1;
146
+ case 'listLevelNumber': return 2;
147
+ case 'nsid': return 3;
148
+ default: return 0;
149
+ }
150
+ };
151
+ WUniqueFormat.getTableFormatType = function (property) {
152
+ switch (property) {
153
+ case 'leftMargin': return 1;
154
+ case 'rightMargin': return 2;
155
+ case 'topMargin': return 3;
156
+ case 'bottomMargin': return 4;
157
+ case 'cellSpacing': return 5;
158
+ case 'leftIndent': return 6;
159
+ case 'tableAlignment': return 7;
160
+ case 'preferredWidth': return 8;
161
+ case 'preferredWidthType': return 9;
162
+ case 'bidi': return 10;
163
+ case 'allowAutoFit': return 11;
164
+ case 'horizontalPositionAbs': return 12;
165
+ case 'horizontalPosition': return 13;
166
+ default: return 0;
167
+ }
168
+ };
169
+ WUniqueFormat.getListLevelType = function (property) {
170
+ switch (property) {
171
+ case 'listLevelPattern': return 1;
172
+ case 'startAt': return 2;
173
+ case 'followCharacter': return 3;
174
+ case 'numberFormat': return 4;
175
+ case 'restartLevel': return 5;
176
+ case 'isLegalStyleNumbering': return 6;
177
+ case 'paraStyleName': return 7;
178
+ case 'numberAlignment': return 8;
179
+ default: return 0;
180
+ }
181
+ };
182
+ WUniqueFormat.getShadingPropertyType = function (property) {
183
+ switch (property) {
184
+ case 'backgroundColor': return 1;
185
+ case 'foregroundColor': return 2;
186
+ case 'textureStyle': return 3;
187
+ default: return 0;
188
+ }
189
+ };
190
+ WUniqueFormat.getCellFormatPropertyType = function (property) {
191
+ switch (property) {
192
+ case 'leftMargin': return 1;
193
+ case 'rightMargin': return 2;
194
+ case 'topMargin': return 3;
195
+ case 'bottomMargin': return 4;
196
+ case 'columnSpan': return 5;
197
+ case 'rowSpan': return 6;
198
+ case 'verticalAlignment': return 7;
199
+ case 'preferredWidthType': return 8;
200
+ case 'preferredWidth': return 9;
201
+ case 'cellWidth': return 10;
202
+ default: return 0;
203
+ }
204
+ };
205
+ WUniqueFormat.getBorderPropertyType = function (property) {
206
+ switch (property) {
207
+ case 'color': return 1;
208
+ case 'lineStyle': return 2;
209
+ case 'lineWidth': return 3;
210
+ case 'shadow': return 4;
211
+ case 'space': return 5;
212
+ case 'hasNoneStyle': return 6;
213
+ default: return 0;
214
+ }
215
+ };
216
+ WUniqueFormat.getCharacterFormatPropertyType = function (property) {
217
+ switch (property) {
218
+ case 'fontColor': return 1;
219
+ case 'fontFamily': return 2;
220
+ case 'fontSize': return 3;
221
+ case 'bold': return 4;
222
+ case 'italic': return 5;
223
+ case 'underline': return 6;
224
+ case 'strikethrough': return 7;
225
+ case 'baselineAlignment': return 8;
226
+ case 'highlightColor': return 9;
227
+ case 'bidi': return 10;
228
+ case 'bdo': return 11;
229
+ case 'boldBidi': return 12;
230
+ case 'italicBidi': return 13;
231
+ case 'fontFamilyBidi': return 14;
232
+ case 'fontSizeBidi': return 15;
233
+ case 'allCaps': return 16;
234
+ case 'localeIdBidi': return 17;
235
+ case 'complexScript': return 18;
236
+ case 'fontFamilyFarEast': return 19;
237
+ case 'fontFamilyAscii': return 20;
238
+ case 'fontFamilyNonFarEast': return 21;
239
+ case 'localeIdAscii': return 22;
240
+ case 'localeIdFarEast': return 23;
241
+ case 'characterSpacing': return 24;
242
+ case 'scaling': return 25;
243
+ case 'hidden': return 26;
244
+ case 'underlineColor': return 27;
245
+ case 'fontHintType': return 28;
246
+ case 'ligature': return 29;
247
+ case 'specVanish': return 30;
248
+ case 'isKernFont': return 31;
249
+ case 'kern': return 32;
250
+ default: return 0;
251
+ }
252
+ };
253
+ WUniqueFormat.getParaFormatPropertyType = function (property) {
254
+ switch (property) {
255
+ case 'leftIndent': return 1;
256
+ case 'rightIndent': return 2;
257
+ case 'firstLineIndent': return 3;
258
+ case 'textAlignment': return 4;
259
+ case 'beforeSpacing': return 5;
260
+ case 'afterSpacing': return 6;
261
+ case 'lineSpacing': return 7;
262
+ case 'lineSpacingType': return 8;
263
+ case 'outlineLevel': return 9;
264
+ case 'bidi': return 10;
265
+ case 'contextualSpacing': return 11;
266
+ case 'keepWithNext': return 12;
267
+ case 'keepLinesTogether': return 13;
268
+ case 'widowControl': return 14;
269
+ case 'spaceBeforeAuto': return 15;
270
+ case 'spaceAfterAuto': return 16;
271
+ default: return 0;
272
+ }
273
+ };
274
+ WUniqueFormat.getColumnFormatType = function (property) {
275
+ switch (property) {
276
+ case 'width': return 1;
277
+ case 'space': return 2;
278
+ default: return 0;
279
+ }
280
+ };
281
+ WUniqueFormat.getSectionFormatType = function (property) {
282
+ switch (property) {
283
+ case 'headerDistance': return 1;
284
+ case 'footerDistance': return 2;
285
+ case 'differentFirstPage': return 3;
286
+ case 'differentOddAndEvenPages': return 4;
287
+ case 'pageWidth': return 5;
288
+ case 'pageHeight': return 6;
289
+ case 'leftMargin': return 7;
290
+ case 'topMargin': return 8;
291
+ case 'rightMargin': return 9;
292
+ case 'bottomMargin': return 10;
293
+ case 'bidi': return 11;
294
+ case 'restartPageNumbering': return 12;
295
+ case 'pageStartingNumber': return 13;
296
+ case 'endnoteNumberFormat': return 14;
297
+ case 'endnotePosition': return 15;
298
+ case 'footNoteNumberFormat': return 16;
299
+ case 'footnotePosition': return 17;
300
+ case 'restartIndexForEndnotes': return 18;
301
+ case 'restartIndexForFootnotes': return 19;
302
+ case 'initialFootNoteNumber': return 20;
303
+ case 'initialEndNoteNumber': return 21;
304
+ case 'pageNumberStyle': return 22;
305
+ case 'numberOfColumns': return 23;
306
+ case 'equalWidth': return 24;
307
+ case 'lineBetweenColumns': return 25;
308
+ case 'columns': return 26;
309
+ case 'breakCode': return 27;
310
+ default: return 0;
311
+ }
312
+ };
313
+ /**
314
+ * @private
315
+ */
316
+ WUniqueFormat.prototype.isBorderEqual = function (source, modifiedProperty, modifiedValue) {
317
+ if (this.isNotEqual('color', source, modifiedProperty, modifiedValue, 1)) {
318
+ return false;
319
+ }
320
+ if (this.isNotEqual('lineStyle', source, modifiedProperty, modifiedValue, 1)) {
321
+ return false;
322
+ }
323
+ if (this.isNotEqual('lineWidth', source, modifiedProperty, modifiedValue, 1)) {
324
+ return false;
325
+ }
326
+ if (this.isNotEqual('shadow', source, modifiedProperty, modifiedValue, 1)) {
327
+ return false;
328
+ }
329
+ if (this.isNotEqual('space', source, modifiedProperty, modifiedValue, 1)) {
330
+ return false;
331
+ }
332
+ if (this.isNotEqual('hasNoneStyle', source, modifiedProperty, modifiedValue, 1)) {
333
+ return false;
334
+ }
335
+ return true;
336
+ };
337
+ /**
338
+ * @private
339
+ */
340
+ WUniqueFormat.prototype.isCharacterFormatEqual = function (source, modifiedProperty, modifiedValue) {
341
+ if (this.isNotEqual('fontColor', source, modifiedProperty, modifiedValue, 2)) {
342
+ return false;
343
+ }
344
+ if (this.isNotEqual('fontFamily', source, modifiedProperty, modifiedValue, 2)) {
345
+ return false;
346
+ }
347
+ if (this.isNotEqual('fontSize', source, modifiedProperty, modifiedValue, 2)) {
348
+ return false;
349
+ }
350
+ if (this.isNotEqual('bold', source, modifiedProperty, modifiedValue, 2)) {
351
+ return false;
352
+ }
353
+ if (this.isNotEqual('italic', source, modifiedProperty, modifiedValue, 2)) {
354
+ return false;
355
+ }
356
+ if (this.isNotEqual('underline', source, modifiedProperty, modifiedValue, 2)) {
357
+ return false;
358
+ }
359
+ if (this.isNotEqual('strikethrough', source, modifiedProperty, modifiedValue, 2)) {
360
+ return false;
361
+ }
362
+ if (this.isNotEqual('baselineAlignment', source, modifiedProperty, modifiedValue, 2)) {
363
+ return false;
364
+ }
365
+ if (this.isNotEqual('highlightColor', source, modifiedProperty, modifiedValue, 2)) {
366
+ return false;
367
+ }
368
+ if (this.isNotEqual('bidi', source, modifiedProperty, modifiedValue, 2)) {
369
+ return false;
370
+ }
371
+ if (this.isNotEqual('bdo', source, modifiedProperty, modifiedValue, 2)) {
372
+ return false;
373
+ }
374
+ if (this.isNotEqual('fontColor', source, modifiedProperty, modifiedValue, 2)) {
375
+ return false;
376
+ }
377
+ if (this.isNotEqual('fontFamilyBidi', source, modifiedProperty, modifiedValue, 2)) {
378
+ return false;
379
+ }
380
+ if (this.isNotEqual('fontSizeBidi', source, modifiedProperty, modifiedValue, 2)) {
381
+ return false;
382
+ }
383
+ if (this.isNotEqual('boldBidi', source, modifiedProperty, modifiedValue, 2)) {
384
+ return false;
385
+ }
386
+ if (this.isNotEqual('italicBidi', source, modifiedProperty, modifiedValue, 2)) {
387
+ return false;
388
+ }
389
+ if (this.isNotEqual('allCaps', source, modifiedProperty, modifiedValue, 2)) {
390
+ return false;
391
+ }
392
+ if (this.isNotEqual('localeIdBidi', source, modifiedProperty, modifiedValue, 2)) {
393
+ return false;
394
+ }
395
+ if (this.isNotEqual('localeIdAscii', source, modifiedProperty, modifiedValue, 2)) {
396
+ return false;
397
+ }
398
+ if (this.isNotEqual('localeIdFarEast', source, modifiedProperty, modifiedValue, 2)) {
399
+ return false;
400
+ }
401
+ if (this.isNotEqual('complexScript', source, modifiedProperty, modifiedValue, 2)) {
402
+ return false;
403
+ }
404
+ if (this.isNotEqual('hidden', source, modifiedProperty, modifiedValue, 2)) {
405
+ return false;
406
+ }
407
+ if (this.isNotEqual('specVanish', source, modifiedProperty, modifiedValue, 2)) {
408
+ return false;
409
+ }
410
+ if (this.isNotEqual('isKernFont', source, modifiedProperty, modifiedValue, 2)) {
411
+ return false;
412
+ }
413
+ if (this.isNotEqual('kern', source, modifiedProperty, modifiedValue, 2)) {
414
+ return false;
415
+ }
416
+ if (this.isNotEqual('fontFamilyFarEast', source, modifiedProperty, modifiedValue, 2)) {
417
+ return false;
418
+ }
419
+ if (this.isNotEqual('fontFamilyAscii', source, modifiedProperty, modifiedValue, 2)) {
420
+ return false;
421
+ }
422
+ if (this.isNotEqual('fontFamilyNonFarEast', source, modifiedProperty, modifiedValue, 2)) {
423
+ return false;
424
+ }
425
+ if (this.isNotEqual('characterSpacing', source, modifiedProperty, modifiedValue, 2)) {
426
+ return false;
427
+ }
428
+ if (this.isNotEqual('scaling', source, modifiedProperty, modifiedValue, 2)) {
429
+ return false;
430
+ }
431
+ if (this.isNotEqual('underlineColor', source, modifiedProperty, modifiedValue, 2)) {
432
+ return false;
433
+ }
434
+ if (this.isNotEqual('ligature', source, modifiedProperty, modifiedValue, 2)) {
435
+ return false;
436
+ }
437
+ if (this.isNotEqual('fontHintType', source, modifiedProperty, modifiedValue, 2)) {
438
+ return false;
439
+ }
440
+ return true;
441
+ };
442
+ WUniqueFormat.prototype.isParagraphFormatEqual = function (source, modifiedProperty, modifiedValue) {
443
+ if (this.isNotEqual('leftIndent', source, modifiedProperty, modifiedValue, 3)) {
444
+ return false;
445
+ }
446
+ if (this.isNotEqual('rightIndent', source, modifiedProperty, modifiedValue, 3)) {
447
+ return false;
448
+ }
449
+ if (this.isNotEqual('firstLineIndent', source, modifiedProperty, modifiedValue, 3)) {
450
+ return false;
451
+ }
452
+ if (this.isNotEqual('textAlignment', source, modifiedProperty, modifiedValue, 3)) {
453
+ return false;
454
+ }
455
+ if (this.isNotEqual('beforeSpacing', source, modifiedProperty, modifiedValue, 3)) {
456
+ return false;
457
+ }
458
+ if (this.isNotEqual('afterSpacing', source, modifiedProperty, modifiedValue, 3)) {
459
+ return false;
460
+ }
461
+ if (this.isNotEqual('spaceBeforeAuto', source, modifiedProperty, modifiedValue, 3)) {
462
+ return false;
463
+ }
464
+ if (this.isNotEqual('spaceAfterAuto', source, modifiedProperty, modifiedValue, 3)) {
465
+ return false;
466
+ }
467
+ if (this.isNotEqual('lineSpacing', source, modifiedProperty, modifiedValue, 3)) {
468
+ return false;
469
+ }
470
+ if (this.isNotEqual('lineSpacingType', source, modifiedProperty, modifiedValue, 3)) {
471
+ return false;
472
+ }
473
+ if (this.isNotEqual('outlineLevel', source, modifiedProperty, modifiedValue, 3)) {
474
+ return false;
475
+ }
476
+ if (this.isNotEqual('bidi', source, modifiedProperty, modifiedValue, 3)) {
477
+ return false;
478
+ }
479
+ if (this.isNotEqual('contextualSpacing', source, modifiedProperty, modifiedValue, 3)) {
480
+ return false;
481
+ }
482
+ if (this.isNotEqual('keepWithNext', source, modifiedProperty, modifiedValue, 3)) {
483
+ return false;
484
+ }
485
+ if (this.isNotEqual('keepLinesTogether', source, modifiedProperty, modifiedValue, 3)) {
486
+ return false;
487
+ }
488
+ if (this.isNotEqual('widowControl', source, modifiedProperty, modifiedValue, 3)) {
489
+ return false;
490
+ }
491
+ return true;
492
+ };
493
+ /**
494
+ * @private
495
+ */
496
+ WUniqueFormat.prototype.isCellFormatEqual = function (source, modifiedProperty, modifiedValue) {
497
+ if (this.isNotEqual('leftMargin', source, modifiedProperty, modifiedValue, 4)) {
498
+ return false;
499
+ }
500
+ if (this.isNotEqual('rightMargin', source, modifiedProperty, modifiedValue, 4)) {
501
+ return false;
502
+ }
503
+ if (this.isNotEqual('topMargin', source, modifiedProperty, modifiedValue, 4)) {
504
+ return false;
505
+ }
506
+ if (this.isNotEqual('bottomMargin', source, modifiedProperty, modifiedValue, 4)) {
507
+ return false;
508
+ }
509
+ if (this.isNotEqual('columnSpan', source, modifiedProperty, modifiedValue, 4)) {
510
+ return false;
511
+ }
512
+ if (this.isNotEqual('rowSpan', source, modifiedProperty, modifiedValue, 4)) {
513
+ return false;
514
+ }
515
+ if (this.isNotEqual('verticalAlignment', source, modifiedProperty, modifiedValue, 4)) {
516
+ return false;
517
+ }
518
+ if (this.isNotEqual('preferredWidthType', source, modifiedProperty, modifiedValue, 4)) {
519
+ return false;
520
+ }
521
+ if (this.isNotEqual('preferredWidth', source, modifiedProperty, modifiedValue, 4)) {
522
+ return false;
523
+ }
524
+ if (this.isNotEqual('cellWidth', source, modifiedProperty, modifiedValue, 4)) {
525
+ return false;
526
+ }
527
+ if (this.isNotEqual('verticallyMergedCellsKeepWithNext', source, modifiedProperty, modifiedValue, 4)) {
528
+ return false;
529
+ }
530
+ return true;
531
+ };
532
+ /**
533
+ * @private
534
+ */
535
+ WUniqueFormat.prototype.isShadingEqual = function (source, modifiedProperty, modifiedValue) {
536
+ if (this.isNotEqual('backgroundColor', source, modifiedProperty, modifiedValue, 5)) {
537
+ return false;
538
+ }
539
+ if (this.isNotEqual('foregroundColor', source, modifiedProperty, modifiedValue, 5)) {
540
+ return false;
541
+ }
542
+ if (this.isNotEqual('textureStyle', source, modifiedProperty, modifiedValue, 5)) {
543
+ return false;
544
+ }
545
+ return true;
546
+ };
547
+ /**
548
+ * @private
549
+ */
550
+ WUniqueFormat.prototype.isRowFormatEqual = function (source, modifiedProperty, modifiedValue) {
551
+ if (this.isNotEqual('allowBreakAcrossPages', source, modifiedProperty, modifiedValue, 6)) {
552
+ return false;
553
+ }
554
+ if (this.isNotEqual('isHeader', source, modifiedProperty, modifiedValue, 6)) {
555
+ return false;
556
+ }
557
+ if (this.isNotEqual('height', source, modifiedProperty, modifiedValue, 6)) {
558
+ return false;
559
+ }
560
+ if (this.isNotEqual('heightType', source, modifiedProperty, modifiedValue, 6)) {
561
+ return false;
562
+ }
563
+ if (this.isNotEqual('gridBefore', source, modifiedProperty, modifiedValue, 6)) {
564
+ return false;
565
+ }
566
+ if (this.isNotEqual('gridBeforeWidth', source, modifiedProperty, modifiedValue, 6)) {
567
+ return false;
568
+ }
569
+ if (this.isNotEqual('gridBeforeWidthType', source, modifiedProperty, modifiedValue, 6)) {
570
+ return false;
571
+ }
572
+ if (this.isNotEqual('gridAfter', source, modifiedProperty, modifiedValue, 6)) {
573
+ return false;
574
+ }
575
+ if (this.isNotEqual('gridAfterWidth', source, modifiedProperty, modifiedValue, 6)) {
576
+ return false;
577
+ }
578
+ if (this.isNotEqual('gridAfterWidthType', source, modifiedProperty, modifiedValue, 6)) {
579
+ return false;
580
+ }
581
+ if (this.isNotEqual('leftMargin', source, modifiedProperty, modifiedValue, 6)) {
582
+ return false;
583
+ }
584
+ if (this.isNotEqual('topMargin', source, modifiedProperty, modifiedValue, 6)) {
585
+ return false;
586
+ }
587
+ if (this.isNotEqual('bottomMargin', source, modifiedProperty, modifiedValue, 6)) {
588
+ return false;
589
+ }
590
+ if (this.isNotEqual('rightMargin', source, modifiedProperty, modifiedValue, 6)) {
591
+ return false;
592
+ }
593
+ if (this.isNotEqual('leftIndent', source, modifiedProperty, modifiedValue, 6)) {
594
+ return false;
595
+ }
596
+ if (this.isNotEqual('verticallyMergedCellsLeftMargin', source, modifiedProperty, modifiedValue, 6)) {
597
+ return false;
598
+ }
599
+ if (this.isNotEqual('verticallyMergedCellsRightMargin', source, modifiedProperty, modifiedValue, 6)) {
600
+ return false;
601
+ }
602
+ if (this.isNotEqual('verticallyMergedCellsTopMargin', source, modifiedProperty, modifiedValue, 6)) {
603
+ return false;
604
+ }
605
+ if (this.isNotEqual('verticallyMergedCellsBottomMargin', source, modifiedProperty, modifiedValue, 6)) {
606
+ return false;
607
+ }
608
+ return true;
609
+ };
610
+ /**
611
+ * @private
612
+ */
613
+ WUniqueFormat.prototype.isListFormatEqual = function (source, modifiedProperty, modifiedValue) {
614
+ if (this.isNotEqual('listId', source, modifiedProperty, modifiedValue, 7)) {
615
+ return false;
616
+ }
617
+ if (this.isNotEqual('listLevelNumber', source, modifiedProperty, modifiedValue, 7)) {
618
+ return false;
619
+ }
620
+ if (this.isNotEqual('nsid', source, modifiedProperty, modifiedValue, 7)) {
621
+ return false;
622
+ }
623
+ return true;
624
+ };
625
+ /**
626
+ * @private
627
+ */
628
+ WUniqueFormat.prototype.isTableFormatEqual = function (source, modifiedProperty, modifiedValue) {
629
+ if (this.isNotEqual('leftMargin', source, modifiedProperty, modifiedValue, 8)) {
630
+ return false;
631
+ }
632
+ if (this.isNotEqual('rightMargin', source, modifiedProperty, modifiedValue, 8)) {
633
+ return false;
634
+ }
635
+ if (this.isNotEqual('topMargin', source, modifiedProperty, modifiedValue, 8)) {
636
+ return false;
637
+ }
638
+ if (this.isNotEqual('bottomMargin', source, modifiedProperty, modifiedValue, 8)) {
639
+ return false;
640
+ }
641
+ if (this.isNotEqual('cellSpacing', source, modifiedProperty, modifiedValue, 8)) {
642
+ return false;
643
+ }
644
+ if (this.isNotEqual('leftIndent', source, modifiedProperty, modifiedValue, 8)) {
645
+ return false;
646
+ }
647
+ if (this.isNotEqual('tableAlignment', source, modifiedProperty, modifiedValue, 8)) {
648
+ return false;
649
+ }
650
+ if (this.isNotEqual('preferredWidth', source, modifiedProperty, modifiedValue, 8)) {
651
+ return false;
652
+ }
653
+ if (this.isNotEqual('preferredWidthType', source, modifiedProperty, modifiedValue, 8)) {
654
+ return false;
655
+ }
656
+ if (this.isNotEqual('bidi', source, modifiedProperty, modifiedValue, 8)) {
657
+ return false;
658
+ }
659
+ if (this.isNotEqual('allowAutoFit', source, modifiedProperty, modifiedValue, 8)) {
660
+ return false;
661
+ }
662
+ if (this.isNotEqual('horizontalPositionAbs', source, modifiedProperty, modifiedValue, 8)) {
663
+ return false;
664
+ }
665
+ if (this.isNotEqual('horizontalPosition', source, modifiedProperty, modifiedValue, 8)) {
666
+ return false;
667
+ }
668
+ return true;
669
+ };
670
+ /**
671
+ * @private
672
+ */
673
+ WUniqueFormat.prototype.isListLevelEqual = function (source, modifiedProperty, modifiedValue) {
674
+ if (this.isNotEqual('listLevelPattern', source, modifiedProperty, modifiedValue, 9)) {
675
+ return false;
676
+ }
677
+ if (this.isNotEqual('startAt', source, modifiedProperty, modifiedValue, 9)) {
678
+ return false;
679
+ }
680
+ if (this.isNotEqual('followCharacter', source, modifiedProperty, modifiedValue, 9)) {
681
+ return false;
682
+ }
683
+ if (this.isNotEqual('numberFormat', source, modifiedProperty, modifiedValue, 9)) {
684
+ return false;
685
+ }
686
+ if (this.isNotEqual('paraStyleName', source, modifiedProperty, modifiedValue, 9)) {
687
+ return false;
688
+ }
689
+ if (this.isNotEqual('restartLevel', source, modifiedProperty, modifiedValue, 9)) {
690
+ return false;
691
+ }
692
+ if (this.isNotEqual('isLegalStyleNumbering', source, modifiedProperty, modifiedValue, 9)) {
693
+ return false;
694
+ }
695
+ if (this.isNotEqual('numberAlignment', source, modifiedProperty, modifiedValue, 9)) {
696
+ return false;
697
+ }
698
+ return true;
699
+ };
700
+ /**
701
+ * @private
702
+ */
703
+ WUniqueFormat.prototype.isSectionFormatEqual = function (source, modifiedProperty, modifiedValue) {
704
+ if (this.isNotEqual('headerDistance', source, modifiedProperty, modifiedValue, 10)) {
705
+ return false;
706
+ }
707
+ if (this.isNotEqual('footerDistance', source, modifiedProperty, modifiedValue, 10)) {
708
+ return false;
709
+ }
710
+ if (this.isNotEqual('differentFirstPage', source, modifiedProperty, modifiedValue, 10)) {
711
+ return false;
712
+ }
713
+ if (this.isNotEqual('differentOddAndEvenPages', source, modifiedProperty, modifiedValue, 10)) {
714
+ return false;
715
+ }
716
+ if (this.isNotEqual('pageWidth', source, modifiedProperty, modifiedValue, 10)) {
717
+ return false;
718
+ }
719
+ if (this.isNotEqual('pageHeight', source, modifiedProperty, modifiedValue, 10)) {
720
+ return false;
721
+ }
722
+ if (this.isNotEqual('leftMargin', source, modifiedProperty, modifiedValue, 10)) {
723
+ return false;
724
+ }
725
+ if (this.isNotEqual('topMargin', source, modifiedProperty, modifiedValue, 10)) {
726
+ return false;
727
+ }
728
+ if (this.isNotEqual('rightMargin', source, modifiedProperty, modifiedValue, 10)) {
729
+ return false;
730
+ }
731
+ if (this.isNotEqual('bottomMargin', source, modifiedProperty, modifiedValue, 10)) {
732
+ return false;
733
+ }
734
+ if (this.isNotEqual('bidi', source, modifiedProperty, modifiedValue, 10)) {
735
+ return false;
736
+ }
737
+ if (this.isNotEqual('restartPageNumbering', source, modifiedProperty, modifiedValue, 10)) {
738
+ return false;
739
+ }
740
+ if (this.isNotEqual('pageStartingNumber', source, modifiedProperty, modifiedValue, 10)) {
741
+ return false;
742
+ }
743
+ if (this.isNotEqual('endnoteNumberFormat', source, modifiedProperty, modifiedValue, 10)) {
744
+ return false;
745
+ }
746
+ if (this.isNotEqual('endnotePosition', source, modifiedProperty, modifiedValue, 10)) {
747
+ return false;
748
+ }
749
+ if (this.isNotEqual('footNoteNumberFormat', source, modifiedProperty, modifiedValue, 10)) {
750
+ return false;
751
+ }
752
+ if (this.isNotEqual('footnotePosition', source, modifiedProperty, modifiedValue, 10)) {
753
+ return false;
754
+ }
755
+ if (this.isNotEqual('restartIndexForEndnotes', source, modifiedProperty, modifiedValue, 10)) {
756
+ return false;
757
+ }
758
+ if (this.isNotEqual('restartIndexForFootnotes', source, modifiedProperty, modifiedValue, 10)) {
759
+ return false;
760
+ }
761
+ if (this.isNotEqual('initialFootNoteNumber', source, modifiedProperty, modifiedValue, 10)) {
762
+ return false;
763
+ }
764
+ if (this.isNotEqual('initialEndNoteNumber', source, modifiedProperty, modifiedValue, 10)) {
765
+ return false;
766
+ }
767
+ if (this.isNotEqual('pageNumberStyle', source, modifiedProperty, modifiedValue, 10)) {
768
+ return false;
769
+ }
770
+ if (this.isNotEqual('numberOfColumns', source, modifiedProperty, modifiedValue, 10)) {
771
+ return false;
772
+ }
773
+ if (this.isNotEqual('equalWidth', source, modifiedProperty, modifiedValue, 10)) {
774
+ return false;
775
+ }
776
+ if (this.isNotEqual('lineBetweenColumns', source, modifiedProperty, modifiedValue, 10)) {
777
+ return false;
778
+ }
779
+ if (this.isNotEqual('breakCode', source, modifiedProperty, modifiedValue, 10)) {
780
+ return false;
781
+ }
782
+ return true;
783
+ };
784
+ /**
785
+ * @private
786
+ */
787
+ WUniqueFormat.prototype.isColumnFormatEqual = function (source, modifiedProperty, modifiedValue) {
788
+ if (this.isNotEqual('width', source, modifiedProperty, modifiedValue, 11)) {
789
+ return false;
790
+ }
791
+ if (this.isNotEqual('space', source, modifiedProperty, modifiedValue, 11)) {
792
+ return false;
793
+ }
794
+ return true;
795
+ };
796
+ /**
797
+ * @private
798
+ */
799
+ WUniqueFormat.prototype.cloneItems = function (format, property, value, uniqueFormatType) {
800
+ var propertyType = WUniqueFormat.getPropertyType(uniqueFormatType, property);
801
+ var keys = format.propertiesHash.keys;
802
+ for (var i = 0; i < keys.length; i++) {
803
+ if (keys[i] === propertyType) {
804
+ this.propertiesHash.add(propertyType, value);
805
+ }
806
+ else {
807
+ this.propertiesHash.add(keys[i], format.propertiesHash.get(keys[i]));
808
+ }
809
+ }
810
+ if (!format.propertiesHash.containsKey(propertyType)) {
811
+ this.propertiesHash.add(propertyType, value);
812
+ }
813
+ };
814
+ /**
815
+ * @private
816
+ */
817
+ WUniqueFormat.prototype.mergeProperties = function (format) {
818
+ var hash = format.cloneProperties();
819
+ var keys = this.propertiesHash.keys;
820
+ for (var i = 0; i < keys.length; i++) {
821
+ if (!hash.containsKey(keys[i])) {
822
+ hash.add(keys[i], this.propertiesHash.get(keys[i]));
823
+ }
824
+ }
825
+ return hash;
826
+ };
827
+ /**
828
+ * @private
829
+ */
830
+ WUniqueFormat.prototype.cloneProperties = function () {
831
+ var hash = new Dictionary();
832
+ var keys = this.propertiesHash.keys;
833
+ for (var i = 0; i < keys.length; i++) {
834
+ hash.add(keys[i], this.propertiesHash.get(keys[i]));
835
+ }
836
+ return hash;
837
+ };
838
+ // public cloneItemsInternal(format: WUniqueFormat): void {
839
+ // let keys: number[] = format.propertiesHash.getItem();
840
+ // for (let i: number = 0; i < keys.length; i++) {
841
+ // this.propertiesHash.add(keys[i], format.propertiesHash.get(keys[i]));
842
+ // }
843
+ // this.referenceCount = format.referenceCount;
844
+ // }
845
+ /**
846
+ * @private
847
+ */
848
+ WUniqueFormat.prototype.destroy = function () {
849
+ if (!isNullOrUndefined(this.propertiesHash)) {
850
+ this.propertiesHash.destroy();
851
+ }
852
+ this.propertiesHash = undefined;
853
+ this.referenceCount = undefined;
854
+ this.uniqueFormatType = undefined;
855
+ };
856
+ return WUniqueFormat;
857
+ }());
858
+ export { WUniqueFormat };