devexpress-richedit 24.1.12-build-25107-0103 → 24.1.13-build-25142-0103
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/bin/gulpfile.js +1 -1
- package/bin/index-custom.js +1 -1
- package/bin/localization-builder.js +1 -1
- package/bin/nspell-index.js +1 -1
- package/bin/nspell.webpack.config.js +1 -1
- package/bin/webpack-externals.js +1 -1
- package/bin/webpack.config.js +1 -1
- package/dist/dx.richedit.css +1 -1
- package/dist/dx.richedit.d.ts +1 -1
- package/dist/dx.richedit.js +915 -833
- package/dist/dx.richedit.min.js +2 -2
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/lib/client/client-rich-edit.js +2 -2
- package/lib/client/commands/mail-merge-command.js +2 -1
- package/lib/client/formats/docx/export/data.d.ts +5 -1
- package/lib/client/formats/docx/export/data.js +3 -2
- package/lib/client/formats/docx/export/exporter.d.ts +2 -3
- package/lib/client/formats/docx/export/exporter.js +3 -3
- package/lib/client/formats/docx/export/exporters/base/sections.d.ts +0 -1
- package/lib/client/formats/docx/export/exporters/base/sections.js +2 -10
- package/lib/client/formats/docx/export/exporters/base/table/table.d.ts +1 -1
- package/lib/client/formats/docx/export/exporters/base/table/table.js +4 -4
- package/lib/client/formats/docx/import/destination/paragraph-properties/properties/paragraph-spacing-destination.js +6 -4
- package/lib/client/model-api/formats/exporter.js +2 -2
- package/lib/client/model-api/sub-document.js +1 -1
- package/lib/client/utils/focus-helper.js +22 -5
- package/lib/common/commands/layout/apply-style-command.d.ts +2 -2
- package/lib/common/commands/layout/apply-style-command.js +3 -4
- package/lib/common/commands/toc/set-paragraph-level-command.js +1 -1
- package/lib/common/formats/i-document-exporter.d.ts +3 -0
- package/lib/common/formats/rtf/export/exporter.d.ts +2 -3
- package/lib/common/formats/rtf/export/exporter.js +3 -3
- package/lib/common/formats/rtf/export/exporters/rtf-content-exporter.d.ts +4 -2
- package/lib/common/formats/rtf/export/exporters/rtf-content-exporter.js +13 -9
- package/lib/common/formats/rtf/export/exporters/table/rtf-table-exporter.d.ts +3 -2
- package/lib/common/formats/rtf/export/exporters/table/rtf-table-exporter.js +4 -4
- package/lib/common/formats/rtf/export/exporters/table/states/rtf-nested-table-exporter-state.d.ts +2 -1
- package/lib/common/formats/rtf/export/exporters/table/states/rtf-nested-table-exporter-state.js +2 -2
- package/lib/common/formats/rtf/export/exporters/table/states/rtf-table-exporter-state-base.d.ts +4 -2
- package/lib/common/formats/rtf/export/exporters/table/states/rtf-table-exporter-state-base.js +16 -9
- package/lib/common/formats/rtf/export/exporters/table/states/rtf-table-exporter-state.d.ts +2 -1
- package/lib/common/formats/rtf/export/exporters/table/states/rtf-table-exporter-state.js +2 -2
- package/lib/common/formats/rtf/importer-in-subdocument.d.ts +1 -2
- package/lib/common/formats/rtf/importer-in-subdocument.js +4 -3
- package/lib/common/layout/document-layout.d.ts +3 -0
- package/lib/common/layout/document-layout.js +6 -0
- package/lib/common/layout/main-structures/layout-page-area.d.ts +3 -0
- package/lib/common/layout/main-structures/layout-page-area.js +6 -0
- package/lib/common/layout/main-structures/layout-page.d.ts +3 -0
- package/lib/common/layout/main-structures/layout-page.js +8 -0
- package/lib/common/layout/main-structures/layout-row.js +1 -2
- package/lib/common/layout-formatter/floating/position-calculators/horizontal.d.ts +1 -0
- package/lib/common/layout-formatter/floating/position-calculators/horizontal.js +16 -12
- package/lib/common/layout-formatter/row/size-engine/row-formatting-info.d.ts +4 -1
- package/lib/common/layout-formatter/row/size-engine/row-formatting-info.js +36 -2
- package/lib/common/layout-formatter/row/states.js +0 -2
- package/lib/common/layout-formatter/row/tab-info.js +5 -4
- package/lib/common/layout-formatter/table/info/table-info.d.ts +0 -1
- package/lib/common/layout-formatter/table/info/table-info.js +2 -18
- package/lib/common/layout-formatter/table/size-compressor.js +9 -2
- package/lib/common/layout-formatter/table/table-alignment-applier.js +0 -2
- package/lib/common/model/borders/border-info.js +1 -1
- package/lib/common/model/character/character-properties.d.ts +1 -1
- package/lib/common/model/character/character-properties.js +14 -2
- package/lib/common/model/history/items/character-properties-history-items.d.ts +2 -1
- package/lib/common/model/history/items/character-properties-history-items.js +3 -2
- package/lib/common/model/manipulators/character-properties-manipulator.js +2 -2
- package/lib/common/model/manipulators/i-properties-manipulator.d.ts +1 -1
- package/lib/common/model/paragraph/paragraph-style.d.ts +2 -1
- package/lib/common/model/paragraph/paragraph-style.js +5 -3
- package/lib/common/model/tables/secondary-structures/table-base-structures.d.ts +2 -1
- package/lib/common/model/tables/secondary-structures/table-base-structures.js +1 -0
- package/lib/common/rich-edit-core.js +1 -0
- package/lib/common/ui/ruler/controls/ruler.js +3 -7
- package/package.json +3 -3
package/dist/dx.richedit.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* DevExpress WebRichEdit (dx.richedit.js)
|
3
|
-
* Version: 24.1.
|
3
|
+
* Version: 24.1.13
|
4
4
|
* Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED
|
5
5
|
* License: https://www.devexpress.com/Support/EULAs
|
6
6
|
*/
|
@@ -9438,6 +9438,219 @@ class ShadingInfo {
|
|
9438
9438
|
}
|
9439
9439
|
}
|
9440
9440
|
|
9441
|
+
// EXTERNAL MODULE: ./node_modules/@devexpress/utils/lib/utils/comparers.js
|
9442
|
+
var comparers = __webpack_require__(4170);
|
9443
|
+
;// CONCATENATED MODULE: ./src/common/model/history/base/history-item.ts
|
9444
|
+
|
9445
|
+
class history_item_HistoryItem {
|
9446
|
+
constructor(modelManipulator) {
|
9447
|
+
this.uniqueId = -1;
|
9448
|
+
this.modelManipulator = modelManipulator;
|
9449
|
+
}
|
9450
|
+
canBeMerged() {
|
9451
|
+
return false;
|
9452
|
+
}
|
9453
|
+
changeModified() {
|
9454
|
+
return true;
|
9455
|
+
}
|
9456
|
+
}
|
9457
|
+
class CompositionHistoryItem extends history_item_HistoryItem {
|
9458
|
+
constructor() {
|
9459
|
+
super(null);
|
9460
|
+
this.historyItems = [];
|
9461
|
+
}
|
9462
|
+
canBeMerged() {
|
9463
|
+
return true;
|
9464
|
+
}
|
9465
|
+
changeModified() {
|
9466
|
+
var item;
|
9467
|
+
for (var i = 0; item = this.historyItems[i]; i++) {
|
9468
|
+
if (item.changeModified())
|
9469
|
+
return true;
|
9470
|
+
}
|
9471
|
+
return false;
|
9472
|
+
}
|
9473
|
+
redo() {
|
9474
|
+
var item;
|
9475
|
+
for (var i = 0; item = this.historyItems[i]; i++)
|
9476
|
+
item.redo();
|
9477
|
+
}
|
9478
|
+
undo() {
|
9479
|
+
var item;
|
9480
|
+
for (var i = this.historyItems.length - 1; item = this.historyItems[i]; i--)
|
9481
|
+
item.undo();
|
9482
|
+
}
|
9483
|
+
add(historyItem) {
|
9484
|
+
if (historyItem == null)
|
9485
|
+
throw new Error(errors/* Errors */.D.ValueCannotBeNull);
|
9486
|
+
this.historyItems.push(historyItem);
|
9487
|
+
}
|
9488
|
+
}
|
9489
|
+
|
9490
|
+
;// CONCATENATED MODULE: ./src/common/model/history/base/interval-based-history-item.ts
|
9491
|
+
|
9492
|
+
class interval_based_history_item_IntervalBasedHistoryItem extends history_item_HistoryItem {
|
9493
|
+
constructor(modelManipulator, subDocInterval) {
|
9494
|
+
super(modelManipulator);
|
9495
|
+
this.subDocInterval = subDocInterval;
|
9496
|
+
}
|
9497
|
+
get boundSubDocument() { return this.subDocInterval.subDocument; }
|
9498
|
+
get interval() { return this.subDocInterval.interval; }
|
9499
|
+
}
|
9500
|
+
|
9501
|
+
;// CONCATENATED MODULE: ./src/common/model/history/items/character-properties-history-items.ts
|
9502
|
+
|
9503
|
+
|
9504
|
+
class FontUseValueHistoryItem extends interval_based_history_item_IntervalBasedHistoryItem {
|
9505
|
+
constructor(modelManipulator, subDocInterval, newValue, keepCustomFormatting = false) {
|
9506
|
+
super(modelManipulator, subDocInterval);
|
9507
|
+
this.newValue = newValue;
|
9508
|
+
this.keepCustomFormatting = keepCustomFormatting;
|
9509
|
+
}
|
9510
|
+
redo() {
|
9511
|
+
this.oldState = this.modelManipulator.characterProperties.useValue.setValue(this.boundSubDocument, this.interval, this.newValue, this.keepCustomFormatting);
|
9512
|
+
}
|
9513
|
+
undo() {
|
9514
|
+
this.modelManipulator.characterProperties.useValue.restoreValue(this.boundSubDocument, this.oldState);
|
9515
|
+
}
|
9516
|
+
}
|
9517
|
+
class CharacterPropertiesHistoryItem extends interval_based_history_item_IntervalBasedHistoryItem {
|
9518
|
+
constructor(modelManipulator, subDocInterval, newValue) {
|
9519
|
+
super(modelManipulator, subDocInterval);
|
9520
|
+
this.newValue = newValue;
|
9521
|
+
}
|
9522
|
+
redo() {
|
9523
|
+
this.oldState = this.modelManipulator.characterProperties.setValue(this.boundSubDocument, this.interval, this.newValue);
|
9524
|
+
}
|
9525
|
+
undo() {
|
9526
|
+
this.modelManipulator.characterProperties.restoreValue(this.boundSubDocument, this.oldState);
|
9527
|
+
}
|
9528
|
+
}
|
9529
|
+
class CharacterPropertiesHistoryItemBase extends interval_based_history_item_IntervalBasedHistoryItem {
|
9530
|
+
constructor(modelManipulator, subDocInterval, newValue, newUse) {
|
9531
|
+
super(modelManipulator, subDocInterval);
|
9532
|
+
this.newValue = newValue;
|
9533
|
+
this.newUse = newUse;
|
9534
|
+
}
|
9535
|
+
redo() {
|
9536
|
+
this.oldState = this.getPropertiesManipulator().setValue(this.boundSubDocument, this.interval, this.newValue, this.newUse);
|
9537
|
+
}
|
9538
|
+
undo() {
|
9539
|
+
this.getPropertiesManipulator().restoreValue(this.boundSubDocument, this.oldState);
|
9540
|
+
}
|
9541
|
+
getPropertiesManipulator() {
|
9542
|
+
throw new Error(errors/* Errors */.D.NotImplemented);
|
9543
|
+
}
|
9544
|
+
}
|
9545
|
+
class FontBoldHistoryItem extends CharacterPropertiesHistoryItemBase {
|
9546
|
+
getPropertiesManipulator() {
|
9547
|
+
return this.modelManipulator.characterProperties.fontBold;
|
9548
|
+
}
|
9549
|
+
}
|
9550
|
+
class FontCapsHistoryItem extends CharacterPropertiesHistoryItemBase {
|
9551
|
+
getPropertiesManipulator() {
|
9552
|
+
return this.modelManipulator.characterProperties.fontCaps;
|
9553
|
+
}
|
9554
|
+
}
|
9555
|
+
class FontSmallCapsHistoryItem extends CharacterPropertiesHistoryItemBase {
|
9556
|
+
getPropertiesManipulator() {
|
9557
|
+
return this.modelManipulator.characterProperties.fontSmallCaps;
|
9558
|
+
}
|
9559
|
+
}
|
9560
|
+
class FontUnderlineTypeHistoryItem extends CharacterPropertiesHistoryItemBase {
|
9561
|
+
getPropertiesManipulator() {
|
9562
|
+
return this.modelManipulator.characterProperties.fontUnderlineType;
|
9563
|
+
}
|
9564
|
+
}
|
9565
|
+
class FontTextColorHistoryItem extends CharacterPropertiesHistoryItemBase {
|
9566
|
+
getPropertiesManipulator() {
|
9567
|
+
return this.modelManipulator.characterProperties.textColor;
|
9568
|
+
}
|
9569
|
+
}
|
9570
|
+
class FontShadingInfoHistoryItem extends CharacterPropertiesHistoryItemBase {
|
9571
|
+
getPropertiesManipulator() {
|
9572
|
+
return this.modelManipulator.characterProperties.shadingInfo;
|
9573
|
+
}
|
9574
|
+
}
|
9575
|
+
class FontHiddenHistoryItem extends CharacterPropertiesHistoryItemBase {
|
9576
|
+
getPropertiesManipulator() {
|
9577
|
+
return this.modelManipulator.characterProperties.fontHidden;
|
9578
|
+
}
|
9579
|
+
}
|
9580
|
+
class FontItalicHistoryItem extends CharacterPropertiesHistoryItemBase {
|
9581
|
+
getPropertiesManipulator() {
|
9582
|
+
return this.modelManipulator.characterProperties.fontItalic;
|
9583
|
+
}
|
9584
|
+
}
|
9585
|
+
class FontNameHistoryItem extends CharacterPropertiesHistoryItemBase {
|
9586
|
+
getPropertiesManipulator() {
|
9587
|
+
return this.modelManipulator.characterProperties.fontName;
|
9588
|
+
}
|
9589
|
+
}
|
9590
|
+
class FontScriptHistoryItem extends CharacterPropertiesHistoryItemBase {
|
9591
|
+
getPropertiesManipulator() {
|
9592
|
+
return this.modelManipulator.characterProperties.script;
|
9593
|
+
}
|
9594
|
+
}
|
9595
|
+
class FontSizeHistoryItem extends CharacterPropertiesHistoryItemBase {
|
9596
|
+
getPropertiesManipulator() {
|
9597
|
+
return this.modelManipulator.characterProperties.fontSize;
|
9598
|
+
}
|
9599
|
+
}
|
9600
|
+
class FontStrikeoutTypeHistoryItem extends CharacterPropertiesHistoryItemBase {
|
9601
|
+
getPropertiesManipulator() {
|
9602
|
+
return this.modelManipulator.characterProperties.fontStrikeoutType;
|
9603
|
+
}
|
9604
|
+
}
|
9605
|
+
class FontStrikeoutWordsOnlyHistoryItem extends CharacterPropertiesHistoryItemBase {
|
9606
|
+
getPropertiesManipulator() {
|
9607
|
+
return this.modelManipulator.characterProperties.fontStrikeoutWordsOnly;
|
9608
|
+
}
|
9609
|
+
}
|
9610
|
+
class FontStrikeoutColorHistoryItem extends CharacterPropertiesHistoryItemBase {
|
9611
|
+
getPropertiesManipulator() {
|
9612
|
+
return this.modelManipulator.characterProperties.fontStrikeoutColor;
|
9613
|
+
}
|
9614
|
+
}
|
9615
|
+
class FontUnderlineColorHistoryItem extends CharacterPropertiesHistoryItemBase {
|
9616
|
+
getPropertiesManipulator() {
|
9617
|
+
return this.modelManipulator.characterProperties.fontUnderlineColor;
|
9618
|
+
}
|
9619
|
+
}
|
9620
|
+
class FontHighlightColorHistoryItem extends CharacterPropertiesHistoryItemBase {
|
9621
|
+
getPropertiesManipulator() {
|
9622
|
+
return this.modelManipulator.characterProperties.fontHighlightColor;
|
9623
|
+
}
|
9624
|
+
}
|
9625
|
+
class FontUnderlineWordsOnlyHistoryItem extends CharacterPropertiesHistoryItemBase {
|
9626
|
+
getPropertiesManipulator() {
|
9627
|
+
return this.modelManipulator.characterProperties.fontUnderlineWordsOnly;
|
9628
|
+
}
|
9629
|
+
}
|
9630
|
+
class FontNoProofHistoryItem extends CharacterPropertiesHistoryItemBase {
|
9631
|
+
getPropertiesManipulator() {
|
9632
|
+
return this.modelManipulator.characterProperties.fontNoProof;
|
9633
|
+
}
|
9634
|
+
}
|
9635
|
+
class FontLangInfoHistoryItem extends CharacterPropertiesHistoryItemBase {
|
9636
|
+
getPropertiesManipulator() {
|
9637
|
+
return this.modelManipulator.characterProperties.langInfo;
|
9638
|
+
}
|
9639
|
+
}
|
9640
|
+
class FontCompositeFontInfoHistoryItem extends CharacterPropertiesHistoryItemBase {
|
9641
|
+
getPropertiesManipulator() {
|
9642
|
+
return this.modelManipulator.characterProperties.compositeFontInfo;
|
9643
|
+
}
|
9644
|
+
}
|
9645
|
+
class ResetCharacterPropertiesUseValuesHistoryItem extends (/* unused pure expression or super */ null && (IntervalBasedHistoryItem)) {
|
9646
|
+
redo() {
|
9647
|
+
this.state = this.modelManipulator.characterProperties.useValue.setValue(this.boundSubDocument, this.interval, 0);
|
9648
|
+
}
|
9649
|
+
undo() {
|
9650
|
+
this.modelManipulator.characterProperties.useValue.restoreValue(this.boundSubDocument, this.state);
|
9651
|
+
}
|
9652
|
+
}
|
9653
|
+
|
9441
9654
|
;// CONCATENATED MODULE: ./src/common/model/character/enums.ts
|
9442
9655
|
var CharacterPropertiesMask;
|
9443
9656
|
(function (CharacterPropertiesMask) {
|
@@ -9595,6 +9808,498 @@ class LangInfo {
|
|
9595
9808
|
}
|
9596
9809
|
}
|
9597
9810
|
|
9811
|
+
;// CONCATENATED MODULE: ./src/common/model/character/character-property-descriptor.ts
|
9812
|
+
|
9813
|
+
|
9814
|
+
|
9815
|
+
|
9816
|
+
|
9817
|
+
|
9818
|
+
|
9819
|
+
|
9820
|
+
class CharacterPropertiesAllCapsDescriptor {
|
9821
|
+
constructor() {
|
9822
|
+
this.binaryEquals = comparers.Equals.simpleType;
|
9823
|
+
this.defaultValue = false;
|
9824
|
+
}
|
9825
|
+
setProp(props, newValue) {
|
9826
|
+
props.allCaps = newValue;
|
9827
|
+
}
|
9828
|
+
getProp(props) {
|
9829
|
+
return props.allCaps;
|
9830
|
+
}
|
9831
|
+
maskValue() {
|
9832
|
+
return CharacterPropertiesMask.UseAllCaps;
|
9833
|
+
}
|
9834
|
+
getHistoryItemConstructor() {
|
9835
|
+
return FontCapsHistoryItem;
|
9836
|
+
}
|
9837
|
+
getJSONProperty() {
|
9838
|
+
return JSONCharacterFormattingProperty.AllCaps;
|
9839
|
+
}
|
9840
|
+
}
|
9841
|
+
class CharacterPropertiesSmallCapsDescriptor {
|
9842
|
+
constructor() {
|
9843
|
+
this.binaryEquals = comparers.Equals.simpleType;
|
9844
|
+
this.defaultValue = false;
|
9845
|
+
}
|
9846
|
+
setProp(props, newValue) {
|
9847
|
+
props.smallCaps = newValue;
|
9848
|
+
}
|
9849
|
+
getProp(props) {
|
9850
|
+
return props.smallCaps;
|
9851
|
+
}
|
9852
|
+
maskValue() {
|
9853
|
+
return CharacterPropertiesMask.UseSmallCaps;
|
9854
|
+
}
|
9855
|
+
getHistoryItemConstructor() {
|
9856
|
+
return FontSmallCapsHistoryItem;
|
9857
|
+
}
|
9858
|
+
getJSONProperty() {
|
9859
|
+
return JSONCharacterFormattingProperty.SmallCaps;
|
9860
|
+
}
|
9861
|
+
}
|
9862
|
+
class CharacterPropertiesFontSizeDescriptor {
|
9863
|
+
constructor() {
|
9864
|
+
this.binaryEquals = comparers.Equals.simpleType;
|
9865
|
+
this.defaultValue = 11;
|
9866
|
+
}
|
9867
|
+
setProp(props, newValue) {
|
9868
|
+
props.fontSize = newValue;
|
9869
|
+
}
|
9870
|
+
getProp(props) {
|
9871
|
+
return props.fontSize;
|
9872
|
+
}
|
9873
|
+
maskValue() {
|
9874
|
+
return CharacterPropertiesMask.UseDoubleFontSize;
|
9875
|
+
}
|
9876
|
+
getHistoryItemConstructor() {
|
9877
|
+
return FontSizeHistoryItem;
|
9878
|
+
}
|
9879
|
+
getJSONProperty() {
|
9880
|
+
return JSONCharacterFormattingProperty.Size;
|
9881
|
+
}
|
9882
|
+
}
|
9883
|
+
class CharacterPropertiesFontBoldDescriptor {
|
9884
|
+
constructor() {
|
9885
|
+
this.binaryEquals = comparers.Equals.simpleType;
|
9886
|
+
this.defaultValue = false;
|
9887
|
+
}
|
9888
|
+
setProp(props, newValue) {
|
9889
|
+
props.fontBold = newValue;
|
9890
|
+
}
|
9891
|
+
getProp(props) {
|
9892
|
+
return props.fontBold;
|
9893
|
+
}
|
9894
|
+
maskValue() {
|
9895
|
+
return CharacterPropertiesMask.UseFontBold;
|
9896
|
+
}
|
9897
|
+
getHistoryItemConstructor() {
|
9898
|
+
return FontBoldHistoryItem;
|
9899
|
+
}
|
9900
|
+
getJSONProperty() {
|
9901
|
+
return JSONCharacterFormattingProperty.Bold;
|
9902
|
+
}
|
9903
|
+
}
|
9904
|
+
class CharacterPropertiesFontItalicDescriptor {
|
9905
|
+
constructor() {
|
9906
|
+
this.binaryEquals = comparers.Equals.simpleType;
|
9907
|
+
this.defaultValue = false;
|
9908
|
+
}
|
9909
|
+
setProp(props, newValue) {
|
9910
|
+
props.fontItalic = newValue;
|
9911
|
+
}
|
9912
|
+
getProp(props) {
|
9913
|
+
return props.fontItalic;
|
9914
|
+
}
|
9915
|
+
maskValue() {
|
9916
|
+
return CharacterPropertiesMask.UseFontItalic;
|
9917
|
+
}
|
9918
|
+
getHistoryItemConstructor() {
|
9919
|
+
return FontItalicHistoryItem;
|
9920
|
+
}
|
9921
|
+
getJSONProperty() {
|
9922
|
+
return JSONCharacterFormattingProperty.Italic;
|
9923
|
+
}
|
9924
|
+
}
|
9925
|
+
class CharacterPropertiesFontInfoDescriptor {
|
9926
|
+
constructor() {
|
9927
|
+
this.binaryEquals = comparers.Equals.object;
|
9928
|
+
this.defaultValue = undefined;
|
9929
|
+
}
|
9930
|
+
setProp(props, newValue) {
|
9931
|
+
props.fontInfo = newValue;
|
9932
|
+
}
|
9933
|
+
getProp(props) {
|
9934
|
+
return props.fontInfo;
|
9935
|
+
}
|
9936
|
+
maskValue() {
|
9937
|
+
return CharacterPropertiesMask.UseFontName;
|
9938
|
+
}
|
9939
|
+
getHistoryItemConstructor() {
|
9940
|
+
return FontNameHistoryItem;
|
9941
|
+
}
|
9942
|
+
getJSONProperty() {
|
9943
|
+
return JSONCharacterFormattingProperty.FontName;
|
9944
|
+
}
|
9945
|
+
}
|
9946
|
+
class CharacterPropertiesScriptDescriptor {
|
9947
|
+
constructor() {
|
9948
|
+
this.binaryEquals = comparers.Equals.simpleType;
|
9949
|
+
this.defaultValue = CharacterFormattingScript.Normal;
|
9950
|
+
}
|
9951
|
+
setProp(props, newValue) {
|
9952
|
+
props.script = newValue;
|
9953
|
+
}
|
9954
|
+
getProp(props) {
|
9955
|
+
return props.script;
|
9956
|
+
}
|
9957
|
+
maskValue() {
|
9958
|
+
return CharacterPropertiesMask.UseScript;
|
9959
|
+
}
|
9960
|
+
getHistoryItemConstructor() {
|
9961
|
+
return FontScriptHistoryItem;
|
9962
|
+
}
|
9963
|
+
getJSONProperty() {
|
9964
|
+
return JSONCharacterFormattingProperty.Script;
|
9965
|
+
}
|
9966
|
+
}
|
9967
|
+
class CharacterPropertiesStrikeoutTypeDescriptor {
|
9968
|
+
constructor() {
|
9969
|
+
this.binaryEquals = comparers.Equals.simpleType;
|
9970
|
+
this.defaultValue = StrikeoutType.None;
|
9971
|
+
}
|
9972
|
+
setProp(props, newValue) {
|
9973
|
+
props.fontStrikeoutType = newValue;
|
9974
|
+
}
|
9975
|
+
getProp(props) {
|
9976
|
+
return props.fontStrikeoutType;
|
9977
|
+
}
|
9978
|
+
maskValue() {
|
9979
|
+
return CharacterPropertiesMask.UseFontStrikeoutType;
|
9980
|
+
}
|
9981
|
+
getHistoryItemConstructor() {
|
9982
|
+
return FontStrikeoutTypeHistoryItem;
|
9983
|
+
}
|
9984
|
+
getJSONProperty() {
|
9985
|
+
return JSONCharacterFormattingProperty.StrikeoutType;
|
9986
|
+
}
|
9987
|
+
}
|
9988
|
+
class CharacterPropertiesUnderlineTypeDescriptor {
|
9989
|
+
constructor() {
|
9990
|
+
this.binaryEquals = comparers.Equals.simpleType;
|
9991
|
+
this.defaultValue = UnderlineType.None;
|
9992
|
+
}
|
9993
|
+
setProp(props, newValue) {
|
9994
|
+
props.fontUnderlineType = newValue;
|
9995
|
+
}
|
9996
|
+
getProp(props) {
|
9997
|
+
return props.fontUnderlineType;
|
9998
|
+
}
|
9999
|
+
maskValue() {
|
10000
|
+
return CharacterPropertiesMask.UseFontUnderlineType;
|
10001
|
+
}
|
10002
|
+
getHistoryItemConstructor() {
|
10003
|
+
return FontUnderlineTypeHistoryItem;
|
10004
|
+
}
|
10005
|
+
getJSONProperty() {
|
10006
|
+
return JSONCharacterFormattingProperty.UnderlineType;
|
10007
|
+
}
|
10008
|
+
}
|
10009
|
+
class CharacterPropertiesUnderlineWordsOnlyDescriptor {
|
10010
|
+
constructor() {
|
10011
|
+
this.binaryEquals = comparers.Equals.simpleType;
|
10012
|
+
this.defaultValue = false;
|
10013
|
+
}
|
10014
|
+
setProp(props, newValue) {
|
10015
|
+
props.underlineWordsOnly = newValue;
|
10016
|
+
}
|
10017
|
+
getProp(props) {
|
10018
|
+
return props.underlineWordsOnly;
|
10019
|
+
}
|
10020
|
+
maskValue() {
|
10021
|
+
return CharacterPropertiesMask.UseUnderlineWordsOnly;
|
10022
|
+
}
|
10023
|
+
getHistoryItemConstructor() {
|
10024
|
+
return FontUnderlineWordsOnlyHistoryItem;
|
10025
|
+
}
|
10026
|
+
getJSONProperty() {
|
10027
|
+
return JSONCharacterFormattingProperty.UnderlineWordsOnly;
|
10028
|
+
}
|
10029
|
+
}
|
10030
|
+
class CharacterPropertiesStrikeoutWordsOnlyDescriptor {
|
10031
|
+
constructor() {
|
10032
|
+
this.binaryEquals = comparers.Equals.simpleType;
|
10033
|
+
this.defaultValue = false;
|
10034
|
+
}
|
10035
|
+
setProp(props, newValue) {
|
10036
|
+
props.strikeoutWordsOnly = newValue;
|
10037
|
+
}
|
10038
|
+
getProp(props) {
|
10039
|
+
return props.strikeoutWordsOnly;
|
10040
|
+
}
|
10041
|
+
maskValue() {
|
10042
|
+
return CharacterPropertiesMask.UseStrikeoutWordsOnly;
|
10043
|
+
}
|
10044
|
+
getHistoryItemConstructor() {
|
10045
|
+
return FontStrikeoutWordsOnlyHistoryItem;
|
10046
|
+
}
|
10047
|
+
getJSONProperty() {
|
10048
|
+
return JSONCharacterFormattingProperty.StrikeoutWordsOnly;
|
10049
|
+
}
|
10050
|
+
}
|
10051
|
+
class CharacterPropertiesNoProofDescriptor {
|
10052
|
+
constructor() {
|
10053
|
+
this.binaryEquals = comparers.Equals.simpleType;
|
10054
|
+
this.defaultValue = false;
|
10055
|
+
}
|
10056
|
+
setProp(props, newValue) {
|
10057
|
+
props.noProof = newValue;
|
10058
|
+
}
|
10059
|
+
getProp(props) {
|
10060
|
+
return props.noProof;
|
10061
|
+
}
|
10062
|
+
maskValue() {
|
10063
|
+
return CharacterPropertiesMask.UseNoProof;
|
10064
|
+
}
|
10065
|
+
getHistoryItemConstructor() {
|
10066
|
+
return FontNoProofHistoryItem;
|
10067
|
+
}
|
10068
|
+
getJSONProperty() {
|
10069
|
+
return JSONCharacterFormattingProperty.NoProof;
|
10070
|
+
}
|
10071
|
+
}
|
10072
|
+
class CharacterPropertiesHiddenDescriptor {
|
10073
|
+
constructor() {
|
10074
|
+
this.binaryEquals = comparers.Equals.simpleType;
|
10075
|
+
this.defaultValue = false;
|
10076
|
+
}
|
10077
|
+
setProp(props, newValue) {
|
10078
|
+
props.hidden = newValue;
|
10079
|
+
}
|
10080
|
+
getProp(props) {
|
10081
|
+
return props.hidden;
|
10082
|
+
}
|
10083
|
+
maskValue() {
|
10084
|
+
return CharacterPropertiesMask.UseHidden;
|
10085
|
+
}
|
10086
|
+
getHistoryItemConstructor() {
|
10087
|
+
return FontHiddenHistoryItem;
|
10088
|
+
}
|
10089
|
+
getJSONProperty() {
|
10090
|
+
return JSONCharacterFormattingProperty.Hidden;
|
10091
|
+
}
|
10092
|
+
}
|
10093
|
+
class CharacterPropertiesTextColorDescriptor {
|
10094
|
+
constructor() {
|
10095
|
+
this.binaryEquals = comparers.Equals.object;
|
10096
|
+
this.defaultValue = color_model_info_ColorModelInfo.autoColor;
|
10097
|
+
}
|
10098
|
+
setProp(props, newValue) {
|
10099
|
+
props.textColor = newValue;
|
10100
|
+
}
|
10101
|
+
getProp(props) {
|
10102
|
+
return props.textColor;
|
10103
|
+
}
|
10104
|
+
maskValue() {
|
10105
|
+
return CharacterPropertiesMask.UseForeColorIndex;
|
10106
|
+
}
|
10107
|
+
getHistoryItemConstructor() {
|
10108
|
+
return FontTextColorHistoryItem;
|
10109
|
+
}
|
10110
|
+
getJSONProperty() {
|
10111
|
+
return JSONCharacterFormattingProperty.TextColor;
|
10112
|
+
}
|
10113
|
+
}
|
10114
|
+
class CharacterPropertiesShadingInfoColorDescriptor {
|
10115
|
+
constructor() {
|
10116
|
+
this.binaryEquals = comparers.Equals.object;
|
10117
|
+
this.defaultValue = ShadingInfo.noColor;
|
10118
|
+
}
|
10119
|
+
setProp(props, newValue) {
|
10120
|
+
props.shadingInfo = newValue;
|
10121
|
+
}
|
10122
|
+
getProp(props) {
|
10123
|
+
return props.shadingInfo;
|
10124
|
+
}
|
10125
|
+
maskValue() {
|
10126
|
+
return CharacterPropertiesMask.UseShadingInfoIndex;
|
10127
|
+
}
|
10128
|
+
getHistoryItemConstructor() {
|
10129
|
+
return FontShadingInfoHistoryItem;
|
10130
|
+
}
|
10131
|
+
getJSONProperty() {
|
10132
|
+
return JSONCharacterFormattingProperty.ShadingInfo;
|
10133
|
+
}
|
10134
|
+
}
|
10135
|
+
class CharacterPropertiesStrikeoutColorDescriptor {
|
10136
|
+
constructor() {
|
10137
|
+
this.binaryEquals = comparers.Equals.object;
|
10138
|
+
this.defaultValue = color_model_info_ColorModelInfo.noColor;
|
10139
|
+
}
|
10140
|
+
setProp(props, newValue) {
|
10141
|
+
props.strikeoutColor = newValue;
|
10142
|
+
}
|
10143
|
+
getProp(props) {
|
10144
|
+
return props.strikeoutColor;
|
10145
|
+
}
|
10146
|
+
maskValue() {
|
10147
|
+
return CharacterPropertiesMask.UseStrikeoutColorIndex;
|
10148
|
+
}
|
10149
|
+
getHistoryItemConstructor() {
|
10150
|
+
return FontStrikeoutColorHistoryItem;
|
10151
|
+
}
|
10152
|
+
getJSONProperty() {
|
10153
|
+
return JSONCharacterFormattingProperty.StrikeoutColor;
|
10154
|
+
}
|
10155
|
+
}
|
10156
|
+
class CharacterPropertiesUnderlineColorDescriptor {
|
10157
|
+
constructor() {
|
10158
|
+
this.binaryEquals = comparers.Equals.object;
|
10159
|
+
this.defaultValue = color_model_info_ColorModelInfo.noColor;
|
10160
|
+
}
|
10161
|
+
setProp(props, newValue) {
|
10162
|
+
props.underlineColor = newValue;
|
10163
|
+
}
|
10164
|
+
getProp(props) {
|
10165
|
+
return props.underlineColor;
|
10166
|
+
}
|
10167
|
+
maskValue() {
|
10168
|
+
return CharacterPropertiesMask.UseUnderlineColorIndex;
|
10169
|
+
}
|
10170
|
+
getHistoryItemConstructor() {
|
10171
|
+
return FontUnderlineColorHistoryItem;
|
10172
|
+
}
|
10173
|
+
getJSONProperty() {
|
10174
|
+
return JSONCharacterFormattingProperty.UnderlineColor;
|
10175
|
+
}
|
10176
|
+
}
|
10177
|
+
class CharacterPropertiesHighlightColorDescriptor {
|
10178
|
+
constructor() {
|
10179
|
+
this.binaryEquals = comparers.Equals.object;
|
10180
|
+
this.defaultValue = color_model_info_ColorModelInfo.noColor;
|
10181
|
+
}
|
10182
|
+
setProp(props, newValue) {
|
10183
|
+
props.highlightColor = newValue;
|
10184
|
+
}
|
10185
|
+
getProp(props) {
|
10186
|
+
return props.highlightColor;
|
10187
|
+
}
|
10188
|
+
maskValue() {
|
10189
|
+
return CharacterPropertiesMask.UseHighlightColorIndex;
|
10190
|
+
}
|
10191
|
+
getHistoryItemConstructor() {
|
10192
|
+
return FontHighlightColorHistoryItem;
|
10193
|
+
}
|
10194
|
+
getJSONProperty() {
|
10195
|
+
return JSONCharacterFormattingProperty.HighlightColor;
|
10196
|
+
}
|
10197
|
+
}
|
10198
|
+
class CharacterPropertiesLangInfoDescriptor {
|
10199
|
+
constructor() {
|
10200
|
+
this.binaryEquals = comparers.Equals.object;
|
10201
|
+
this.defaultValue = new LangInfo();
|
10202
|
+
}
|
10203
|
+
setProp(props, newValue) {
|
10204
|
+
props.langInfo = newValue;
|
10205
|
+
}
|
10206
|
+
getProp(props) {
|
10207
|
+
return props.langInfo;
|
10208
|
+
}
|
10209
|
+
maskValue() {
|
10210
|
+
return CharacterPropertiesMask.UseLangInfo;
|
10211
|
+
}
|
10212
|
+
getHistoryItemConstructor() {
|
10213
|
+
return FontLangInfoHistoryItem;
|
10214
|
+
}
|
10215
|
+
getJSONProperty() {
|
10216
|
+
return JSONCharacterFormattingProperty.LangInfo;
|
10217
|
+
}
|
10218
|
+
}
|
10219
|
+
class CharacterPropertiesCompositeFontInfoDescriptor {
|
10220
|
+
constructor() {
|
10221
|
+
this.binaryEquals = comparers.Equals.object;
|
10222
|
+
this.defaultValue = new CompositeFontInfo();
|
10223
|
+
}
|
10224
|
+
setProp(props, newValue) {
|
10225
|
+
props.compositeFontInfo = newValue;
|
10226
|
+
}
|
10227
|
+
getProp(props) {
|
10228
|
+
return props.compositeFontInfo;
|
10229
|
+
}
|
10230
|
+
maskValue() {
|
10231
|
+
return CharacterPropertiesMask.UseCompositeFontInfo;
|
10232
|
+
}
|
10233
|
+
getHistoryItemConstructor() {
|
10234
|
+
return FontCompositeFontInfoHistoryItem;
|
10235
|
+
}
|
10236
|
+
getJSONProperty() {
|
10237
|
+
return JSONCharacterFormattingProperty.CompositeFontInfo;
|
10238
|
+
}
|
10239
|
+
}
|
10240
|
+
class character_property_descriptor_CharacterPropertyDescriptor {
|
10241
|
+
}
|
10242
|
+
character_property_descriptor_CharacterPropertyDescriptor.allCaps = new CharacterPropertiesAllCapsDescriptor();
|
10243
|
+
character_property_descriptor_CharacterPropertyDescriptor.size = new CharacterPropertiesFontSizeDescriptor();
|
10244
|
+
character_property_descriptor_CharacterPropertyDescriptor.bold = new CharacterPropertiesFontBoldDescriptor();
|
10245
|
+
character_property_descriptor_CharacterPropertyDescriptor.italic = new CharacterPropertiesFontItalicDescriptor();
|
10246
|
+
character_property_descriptor_CharacterPropertyDescriptor.fontInfo = new CharacterPropertiesFontInfoDescriptor();
|
10247
|
+
character_property_descriptor_CharacterPropertyDescriptor.script = new CharacterPropertiesScriptDescriptor();
|
10248
|
+
character_property_descriptor_CharacterPropertyDescriptor.strikeoutType = new CharacterPropertiesStrikeoutTypeDescriptor();
|
10249
|
+
character_property_descriptor_CharacterPropertyDescriptor.underlineType = new CharacterPropertiesUnderlineTypeDescriptor();
|
10250
|
+
character_property_descriptor_CharacterPropertyDescriptor.underlineWordsOnly = new CharacterPropertiesUnderlineWordsOnlyDescriptor();
|
10251
|
+
character_property_descriptor_CharacterPropertyDescriptor.strikeoutWordsOnly = new CharacterPropertiesStrikeoutWordsOnlyDescriptor();
|
10252
|
+
character_property_descriptor_CharacterPropertyDescriptor.noProof = new CharacterPropertiesNoProofDescriptor();
|
10253
|
+
character_property_descriptor_CharacterPropertyDescriptor.hidden = new CharacterPropertiesHiddenDescriptor();
|
10254
|
+
character_property_descriptor_CharacterPropertyDescriptor.langInfo = new CharacterPropertiesLangInfoDescriptor();
|
10255
|
+
character_property_descriptor_CharacterPropertyDescriptor.compositeFontInfo = new CharacterPropertiesCompositeFontInfoDescriptor();
|
10256
|
+
character_property_descriptor_CharacterPropertyDescriptor.textColor = new CharacterPropertiesTextColorDescriptor();
|
10257
|
+
character_property_descriptor_CharacterPropertyDescriptor.shadingInfo = new CharacterPropertiesShadingInfoColorDescriptor();
|
10258
|
+
character_property_descriptor_CharacterPropertyDescriptor.highlightColor = new CharacterPropertiesHighlightColorDescriptor();
|
10259
|
+
character_property_descriptor_CharacterPropertyDescriptor.strikeoutColor = new CharacterPropertiesStrikeoutColorDescriptor();
|
10260
|
+
character_property_descriptor_CharacterPropertyDescriptor.underlineColor = new CharacterPropertiesUnderlineColorDescriptor();
|
10261
|
+
character_property_descriptor_CharacterPropertyDescriptor.smallCaps = new CharacterPropertiesSmallCapsDescriptor();
|
10262
|
+
character_property_descriptor_CharacterPropertyDescriptor.ALL_FIELDS = [
|
10263
|
+
character_property_descriptor_CharacterPropertyDescriptor.allCaps,
|
10264
|
+
character_property_descriptor_CharacterPropertyDescriptor.size,
|
10265
|
+
character_property_descriptor_CharacterPropertyDescriptor.bold,
|
10266
|
+
character_property_descriptor_CharacterPropertyDescriptor.italic,
|
10267
|
+
character_property_descriptor_CharacterPropertyDescriptor.fontInfo,
|
10268
|
+
character_property_descriptor_CharacterPropertyDescriptor.script,
|
10269
|
+
character_property_descriptor_CharacterPropertyDescriptor.strikeoutType,
|
10270
|
+
character_property_descriptor_CharacterPropertyDescriptor.underlineType,
|
10271
|
+
character_property_descriptor_CharacterPropertyDescriptor.underlineWordsOnly,
|
10272
|
+
character_property_descriptor_CharacterPropertyDescriptor.strikeoutWordsOnly,
|
10273
|
+
character_property_descriptor_CharacterPropertyDescriptor.noProof,
|
10274
|
+
character_property_descriptor_CharacterPropertyDescriptor.hidden,
|
10275
|
+
character_property_descriptor_CharacterPropertyDescriptor.langInfo,
|
10276
|
+
character_property_descriptor_CharacterPropertyDescriptor.compositeFontInfo,
|
10277
|
+
character_property_descriptor_CharacterPropertyDescriptor.textColor,
|
10278
|
+
character_property_descriptor_CharacterPropertyDescriptor.shadingInfo,
|
10279
|
+
character_property_descriptor_CharacterPropertyDescriptor.highlightColor,
|
10280
|
+
character_property_descriptor_CharacterPropertyDescriptor.strikeoutColor,
|
10281
|
+
character_property_descriptor_CharacterPropertyDescriptor.underlineColor,
|
10282
|
+
character_property_descriptor_CharacterPropertyDescriptor.smallCaps
|
10283
|
+
];
|
10284
|
+
character_property_descriptor_CharacterPropertyDescriptor.whatNeedSetWhenCreateHyperlinkField = [
|
10285
|
+
character_property_descriptor_CharacterPropertyDescriptor.size,
|
10286
|
+
character_property_descriptor_CharacterPropertyDescriptor.bold,
|
10287
|
+
character_property_descriptor_CharacterPropertyDescriptor.italic,
|
10288
|
+
character_property_descriptor_CharacterPropertyDescriptor.fontInfo,
|
10289
|
+
character_property_descriptor_CharacterPropertyDescriptor.script,
|
10290
|
+
character_property_descriptor_CharacterPropertyDescriptor.strikeoutType,
|
10291
|
+
character_property_descriptor_CharacterPropertyDescriptor.allCaps,
|
10292
|
+
character_property_descriptor_CharacterPropertyDescriptor.underlineWordsOnly,
|
10293
|
+
character_property_descriptor_CharacterPropertyDescriptor.strikeoutWordsOnly,
|
10294
|
+
character_property_descriptor_CharacterPropertyDescriptor.noProof,
|
10295
|
+
character_property_descriptor_CharacterPropertyDescriptor.hidden,
|
10296
|
+
character_property_descriptor_CharacterPropertyDescriptor.shadingInfo,
|
10297
|
+
character_property_descriptor_CharacterPropertyDescriptor.strikeoutColor,
|
10298
|
+
character_property_descriptor_CharacterPropertyDescriptor.underlineColor,
|
10299
|
+
character_property_descriptor_CharacterPropertyDescriptor.langInfo,
|
10300
|
+
character_property_descriptor_CharacterPropertyDescriptor.smallCaps
|
10301
|
+
];
|
10302
|
+
|
9598
10303
|
;// CONCATENATED MODULE: ./src/common/model/character/layout-character-properties-color-info.ts
|
9599
10304
|
class LayoutCharacterPropertiesColorInfo {
|
9600
10305
|
constructor(textColor, foregroundColor, strikeoutColor, underlineColor) {
|
@@ -9627,6 +10332,7 @@ class LayoutCharacterPropertiesColorInfo {
|
|
9627
10332
|
|
9628
10333
|
|
9629
10334
|
|
10335
|
+
|
9630
10336
|
class CharacterProperties {
|
9631
10337
|
constructor() {
|
9632
10338
|
this.measurerSizes = Object.create(null);
|
@@ -9761,8 +10467,19 @@ class MaskedCharacterProperties extends CharacterProperties {
|
|
9761
10467
|
this.useValueExt &= ~this.getHighPartUseValue(mask);
|
9762
10468
|
}
|
9763
10469
|
}
|
9764
|
-
setUseValueFull(value) {
|
9765
|
-
|
10470
|
+
setUseValueFull(value, onlyForDefault = false) {
|
10471
|
+
const lowPartUseValue = this.getLowPartUseValue(value);
|
10472
|
+
if (onlyForDefault) {
|
10473
|
+
character_property_descriptor_CharacterPropertyDescriptor.ALL_FIELDS.forEach((desc) => {
|
10474
|
+
const prop = desc.getProp(this);
|
10475
|
+
const mask = desc.maskValue();
|
10476
|
+
if (desc.binaryEquals(prop, desc.defaultValue))
|
10477
|
+
this.setUseValue(mask, !!(mask & lowPartUseValue));
|
10478
|
+
});
|
10479
|
+
}
|
10480
|
+
else {
|
10481
|
+
this.useValue = lowPartUseValue;
|
10482
|
+
}
|
9766
10483
|
this.useValueExt = this.getHighPartUseValue(value);
|
9767
10484
|
}
|
9768
10485
|
getLowPartUseValue(value) {
|
@@ -10176,7 +10893,7 @@ class LayoutBorder extends BorderBase {
|
|
10176
10893
|
|
10177
10894
|
class BorderInfo {
|
10178
10895
|
constructor() {
|
10179
|
-
this.style = BorderLineStyle.
|
10896
|
+
this.style = BorderLineStyle.Nil;
|
10180
10897
|
this.color = ColorModelInfoCache.defaultItem;
|
10181
10898
|
this.width = 0;
|
10182
10899
|
this.offset = 0;
|
@@ -10226,66 +10943,6 @@ class BorderInfo {
|
|
10226
10943
|
}
|
10227
10944
|
}
|
10228
10945
|
|
10229
|
-
// EXTERNAL MODULE: ./node_modules/@devexpress/utils/lib/utils/comparers.js
|
10230
|
-
var comparers = __webpack_require__(4170);
|
10231
|
-
;// CONCATENATED MODULE: ./src/common/model/history/base/history-item.ts
|
10232
|
-
|
10233
|
-
class history_item_HistoryItem {
|
10234
|
-
constructor(modelManipulator) {
|
10235
|
-
this.uniqueId = -1;
|
10236
|
-
this.modelManipulator = modelManipulator;
|
10237
|
-
}
|
10238
|
-
canBeMerged() {
|
10239
|
-
return false;
|
10240
|
-
}
|
10241
|
-
changeModified() {
|
10242
|
-
return true;
|
10243
|
-
}
|
10244
|
-
}
|
10245
|
-
class CompositionHistoryItem extends history_item_HistoryItem {
|
10246
|
-
constructor() {
|
10247
|
-
super(null);
|
10248
|
-
this.historyItems = [];
|
10249
|
-
}
|
10250
|
-
canBeMerged() {
|
10251
|
-
return true;
|
10252
|
-
}
|
10253
|
-
changeModified() {
|
10254
|
-
var item;
|
10255
|
-
for (var i = 0; item = this.historyItems[i]; i++) {
|
10256
|
-
if (item.changeModified())
|
10257
|
-
return true;
|
10258
|
-
}
|
10259
|
-
return false;
|
10260
|
-
}
|
10261
|
-
redo() {
|
10262
|
-
var item;
|
10263
|
-
for (var i = 0; item = this.historyItems[i]; i++)
|
10264
|
-
item.redo();
|
10265
|
-
}
|
10266
|
-
undo() {
|
10267
|
-
var item;
|
10268
|
-
for (var i = this.historyItems.length - 1; item = this.historyItems[i]; i--)
|
10269
|
-
item.undo();
|
10270
|
-
}
|
10271
|
-
add(historyItem) {
|
10272
|
-
if (historyItem == null)
|
10273
|
-
throw new Error(errors/* Errors */.D.ValueCannotBeNull);
|
10274
|
-
this.historyItems.push(historyItem);
|
10275
|
-
}
|
10276
|
-
}
|
10277
|
-
|
10278
|
-
;// CONCATENATED MODULE: ./src/common/model/history/base/interval-based-history-item.ts
|
10279
|
-
|
10280
|
-
class interval_based_history_item_IntervalBasedHistoryItem extends history_item_HistoryItem {
|
10281
|
-
constructor(modelManipulator, subDocInterval) {
|
10282
|
-
super(modelManipulator);
|
10283
|
-
this.subDocInterval = subDocInterval;
|
10284
|
-
}
|
10285
|
-
get boundSubDocument() { return this.subDocInterval.subDocument; }
|
10286
|
-
get interval() { return this.subDocInterval.interval; }
|
10287
|
-
}
|
10288
|
-
|
10289
10946
|
;// CONCATENATED MODULE: ./src/common/model/history/items/paragraph-properties-history-items.ts
|
10290
10947
|
|
10291
10948
|
|
@@ -11455,650 +12112,6 @@ class LineSpacingUnit {
|
|
11455
12112
|
}
|
11456
12113
|
}
|
11457
12114
|
|
11458
|
-
;// CONCATENATED MODULE: ./src/common/model/history/items/character-properties-history-items.ts
|
11459
|
-
|
11460
|
-
|
11461
|
-
class FontUseValueHistoryItem extends interval_based_history_item_IntervalBasedHistoryItem {
|
11462
|
-
constructor(modelManipulator, subDocInterval, newValue) {
|
11463
|
-
super(modelManipulator, subDocInterval);
|
11464
|
-
this.newValue = newValue;
|
11465
|
-
}
|
11466
|
-
redo() {
|
11467
|
-
this.oldState = this.modelManipulator.characterProperties.useValue.setValue(this.boundSubDocument, this.interval, this.newValue);
|
11468
|
-
}
|
11469
|
-
undo() {
|
11470
|
-
this.modelManipulator.characterProperties.useValue.restoreValue(this.boundSubDocument, this.oldState);
|
11471
|
-
}
|
11472
|
-
}
|
11473
|
-
class CharacterPropertiesHistoryItem extends interval_based_history_item_IntervalBasedHistoryItem {
|
11474
|
-
constructor(modelManipulator, subDocInterval, newValue) {
|
11475
|
-
super(modelManipulator, subDocInterval);
|
11476
|
-
this.newValue = newValue;
|
11477
|
-
}
|
11478
|
-
redo() {
|
11479
|
-
this.oldState = this.modelManipulator.characterProperties.setValue(this.boundSubDocument, this.interval, this.newValue);
|
11480
|
-
}
|
11481
|
-
undo() {
|
11482
|
-
this.modelManipulator.characterProperties.restoreValue(this.boundSubDocument, this.oldState);
|
11483
|
-
}
|
11484
|
-
}
|
11485
|
-
class CharacterPropertiesHistoryItemBase extends interval_based_history_item_IntervalBasedHistoryItem {
|
11486
|
-
constructor(modelManipulator, subDocInterval, newValue, newUse) {
|
11487
|
-
super(modelManipulator, subDocInterval);
|
11488
|
-
this.newValue = newValue;
|
11489
|
-
this.newUse = newUse;
|
11490
|
-
}
|
11491
|
-
redo() {
|
11492
|
-
this.oldState = this.getPropertiesManipulator().setValue(this.boundSubDocument, this.interval, this.newValue, this.newUse);
|
11493
|
-
}
|
11494
|
-
undo() {
|
11495
|
-
this.getPropertiesManipulator().restoreValue(this.boundSubDocument, this.oldState);
|
11496
|
-
}
|
11497
|
-
getPropertiesManipulator() {
|
11498
|
-
throw new Error(errors/* Errors */.D.NotImplemented);
|
11499
|
-
}
|
11500
|
-
}
|
11501
|
-
class FontBoldHistoryItem extends CharacterPropertiesHistoryItemBase {
|
11502
|
-
getPropertiesManipulator() {
|
11503
|
-
return this.modelManipulator.characterProperties.fontBold;
|
11504
|
-
}
|
11505
|
-
}
|
11506
|
-
class FontCapsHistoryItem extends CharacterPropertiesHistoryItemBase {
|
11507
|
-
getPropertiesManipulator() {
|
11508
|
-
return this.modelManipulator.characterProperties.fontCaps;
|
11509
|
-
}
|
11510
|
-
}
|
11511
|
-
class FontSmallCapsHistoryItem extends CharacterPropertiesHistoryItemBase {
|
11512
|
-
getPropertiesManipulator() {
|
11513
|
-
return this.modelManipulator.characterProperties.fontSmallCaps;
|
11514
|
-
}
|
11515
|
-
}
|
11516
|
-
class FontUnderlineTypeHistoryItem extends CharacterPropertiesHistoryItemBase {
|
11517
|
-
getPropertiesManipulator() {
|
11518
|
-
return this.modelManipulator.characterProperties.fontUnderlineType;
|
11519
|
-
}
|
11520
|
-
}
|
11521
|
-
class FontTextColorHistoryItem extends CharacterPropertiesHistoryItemBase {
|
11522
|
-
getPropertiesManipulator() {
|
11523
|
-
return this.modelManipulator.characterProperties.textColor;
|
11524
|
-
}
|
11525
|
-
}
|
11526
|
-
class FontShadingInfoHistoryItem extends CharacterPropertiesHistoryItemBase {
|
11527
|
-
getPropertiesManipulator() {
|
11528
|
-
return this.modelManipulator.characterProperties.shadingInfo;
|
11529
|
-
}
|
11530
|
-
}
|
11531
|
-
class FontHiddenHistoryItem extends CharacterPropertiesHistoryItemBase {
|
11532
|
-
getPropertiesManipulator() {
|
11533
|
-
return this.modelManipulator.characterProperties.fontHidden;
|
11534
|
-
}
|
11535
|
-
}
|
11536
|
-
class FontItalicHistoryItem extends CharacterPropertiesHistoryItemBase {
|
11537
|
-
getPropertiesManipulator() {
|
11538
|
-
return this.modelManipulator.characterProperties.fontItalic;
|
11539
|
-
}
|
11540
|
-
}
|
11541
|
-
class FontNameHistoryItem extends CharacterPropertiesHistoryItemBase {
|
11542
|
-
getPropertiesManipulator() {
|
11543
|
-
return this.modelManipulator.characterProperties.fontName;
|
11544
|
-
}
|
11545
|
-
}
|
11546
|
-
class FontScriptHistoryItem extends CharacterPropertiesHistoryItemBase {
|
11547
|
-
getPropertiesManipulator() {
|
11548
|
-
return this.modelManipulator.characterProperties.script;
|
11549
|
-
}
|
11550
|
-
}
|
11551
|
-
class FontSizeHistoryItem extends CharacterPropertiesHistoryItemBase {
|
11552
|
-
getPropertiesManipulator() {
|
11553
|
-
return this.modelManipulator.characterProperties.fontSize;
|
11554
|
-
}
|
11555
|
-
}
|
11556
|
-
class FontStrikeoutTypeHistoryItem extends CharacterPropertiesHistoryItemBase {
|
11557
|
-
getPropertiesManipulator() {
|
11558
|
-
return this.modelManipulator.characterProperties.fontStrikeoutType;
|
11559
|
-
}
|
11560
|
-
}
|
11561
|
-
class FontStrikeoutWordsOnlyHistoryItem extends CharacterPropertiesHistoryItemBase {
|
11562
|
-
getPropertiesManipulator() {
|
11563
|
-
return this.modelManipulator.characterProperties.fontStrikeoutWordsOnly;
|
11564
|
-
}
|
11565
|
-
}
|
11566
|
-
class FontStrikeoutColorHistoryItem extends CharacterPropertiesHistoryItemBase {
|
11567
|
-
getPropertiesManipulator() {
|
11568
|
-
return this.modelManipulator.characterProperties.fontStrikeoutColor;
|
11569
|
-
}
|
11570
|
-
}
|
11571
|
-
class FontUnderlineColorHistoryItem extends CharacterPropertiesHistoryItemBase {
|
11572
|
-
getPropertiesManipulator() {
|
11573
|
-
return this.modelManipulator.characterProperties.fontUnderlineColor;
|
11574
|
-
}
|
11575
|
-
}
|
11576
|
-
class FontHighlightColorHistoryItem extends CharacterPropertiesHistoryItemBase {
|
11577
|
-
getPropertiesManipulator() {
|
11578
|
-
return this.modelManipulator.characterProperties.fontHighlightColor;
|
11579
|
-
}
|
11580
|
-
}
|
11581
|
-
class FontUnderlineWordsOnlyHistoryItem extends CharacterPropertiesHistoryItemBase {
|
11582
|
-
getPropertiesManipulator() {
|
11583
|
-
return this.modelManipulator.characterProperties.fontUnderlineWordsOnly;
|
11584
|
-
}
|
11585
|
-
}
|
11586
|
-
class FontNoProofHistoryItem extends CharacterPropertiesHistoryItemBase {
|
11587
|
-
getPropertiesManipulator() {
|
11588
|
-
return this.modelManipulator.characterProperties.fontNoProof;
|
11589
|
-
}
|
11590
|
-
}
|
11591
|
-
class FontLangInfoHistoryItem extends CharacterPropertiesHistoryItemBase {
|
11592
|
-
getPropertiesManipulator() {
|
11593
|
-
return this.modelManipulator.characterProperties.langInfo;
|
11594
|
-
}
|
11595
|
-
}
|
11596
|
-
class FontCompositeFontInfoHistoryItem extends CharacterPropertiesHistoryItemBase {
|
11597
|
-
getPropertiesManipulator() {
|
11598
|
-
return this.modelManipulator.characterProperties.compositeFontInfo;
|
11599
|
-
}
|
11600
|
-
}
|
11601
|
-
class ResetCharacterPropertiesUseValuesHistoryItem extends (/* unused pure expression or super */ null && (IntervalBasedHistoryItem)) {
|
11602
|
-
redo() {
|
11603
|
-
this.state = this.modelManipulator.characterProperties.useValue.setValue(this.boundSubDocument, this.interval, 0);
|
11604
|
-
}
|
11605
|
-
undo() {
|
11606
|
-
this.modelManipulator.characterProperties.useValue.restoreValue(this.boundSubDocument, this.state);
|
11607
|
-
}
|
11608
|
-
}
|
11609
|
-
|
11610
|
-
;// CONCATENATED MODULE: ./src/common/model/character/character-property-descriptor.ts
|
11611
|
-
|
11612
|
-
|
11613
|
-
|
11614
|
-
|
11615
|
-
|
11616
|
-
|
11617
|
-
|
11618
|
-
|
11619
|
-
class CharacterPropertiesAllCapsDescriptor {
|
11620
|
-
constructor() {
|
11621
|
-
this.binaryEquals = comparers.Equals.simpleType;
|
11622
|
-
this.defaultValue = false;
|
11623
|
-
}
|
11624
|
-
setProp(props, newValue) {
|
11625
|
-
props.allCaps = newValue;
|
11626
|
-
}
|
11627
|
-
getProp(props) {
|
11628
|
-
return props.allCaps;
|
11629
|
-
}
|
11630
|
-
maskValue() {
|
11631
|
-
return CharacterPropertiesMask.UseAllCaps;
|
11632
|
-
}
|
11633
|
-
getHistoryItemConstructor() {
|
11634
|
-
return FontCapsHistoryItem;
|
11635
|
-
}
|
11636
|
-
getJSONProperty() {
|
11637
|
-
return JSONCharacterFormattingProperty.AllCaps;
|
11638
|
-
}
|
11639
|
-
}
|
11640
|
-
class CharacterPropertiesSmallCapsDescriptor {
|
11641
|
-
constructor() {
|
11642
|
-
this.binaryEquals = comparers.Equals.simpleType;
|
11643
|
-
this.defaultValue = false;
|
11644
|
-
}
|
11645
|
-
setProp(props, newValue) {
|
11646
|
-
props.smallCaps = newValue;
|
11647
|
-
}
|
11648
|
-
getProp(props) {
|
11649
|
-
return props.smallCaps;
|
11650
|
-
}
|
11651
|
-
maskValue() {
|
11652
|
-
return CharacterPropertiesMask.UseSmallCaps;
|
11653
|
-
}
|
11654
|
-
getHistoryItemConstructor() {
|
11655
|
-
return FontSmallCapsHistoryItem;
|
11656
|
-
}
|
11657
|
-
getJSONProperty() {
|
11658
|
-
return JSONCharacterFormattingProperty.SmallCaps;
|
11659
|
-
}
|
11660
|
-
}
|
11661
|
-
class CharacterPropertiesFontSizeDescriptor {
|
11662
|
-
constructor() {
|
11663
|
-
this.binaryEquals = comparers.Equals.simpleType;
|
11664
|
-
this.defaultValue = 11;
|
11665
|
-
}
|
11666
|
-
setProp(props, newValue) {
|
11667
|
-
props.fontSize = newValue;
|
11668
|
-
}
|
11669
|
-
getProp(props) {
|
11670
|
-
return props.fontSize;
|
11671
|
-
}
|
11672
|
-
maskValue() {
|
11673
|
-
return CharacterPropertiesMask.UseDoubleFontSize;
|
11674
|
-
}
|
11675
|
-
getHistoryItemConstructor() {
|
11676
|
-
return FontSizeHistoryItem;
|
11677
|
-
}
|
11678
|
-
getJSONProperty() {
|
11679
|
-
return JSONCharacterFormattingProperty.Size;
|
11680
|
-
}
|
11681
|
-
}
|
11682
|
-
class CharacterPropertiesFontBoldDescriptor {
|
11683
|
-
constructor() {
|
11684
|
-
this.binaryEquals = comparers.Equals.simpleType;
|
11685
|
-
this.defaultValue = false;
|
11686
|
-
}
|
11687
|
-
setProp(props, newValue) {
|
11688
|
-
props.fontBold = newValue;
|
11689
|
-
}
|
11690
|
-
getProp(props) {
|
11691
|
-
return props.fontBold;
|
11692
|
-
}
|
11693
|
-
maskValue() {
|
11694
|
-
return CharacterPropertiesMask.UseFontBold;
|
11695
|
-
}
|
11696
|
-
getHistoryItemConstructor() {
|
11697
|
-
return FontBoldHistoryItem;
|
11698
|
-
}
|
11699
|
-
getJSONProperty() {
|
11700
|
-
return JSONCharacterFormattingProperty.Bold;
|
11701
|
-
}
|
11702
|
-
}
|
11703
|
-
class CharacterPropertiesFontItalicDescriptor {
|
11704
|
-
constructor() {
|
11705
|
-
this.binaryEquals = comparers.Equals.simpleType;
|
11706
|
-
this.defaultValue = false;
|
11707
|
-
}
|
11708
|
-
setProp(props, newValue) {
|
11709
|
-
props.fontItalic = newValue;
|
11710
|
-
}
|
11711
|
-
getProp(props) {
|
11712
|
-
return props.fontItalic;
|
11713
|
-
}
|
11714
|
-
maskValue() {
|
11715
|
-
return CharacterPropertiesMask.UseFontItalic;
|
11716
|
-
}
|
11717
|
-
getHistoryItemConstructor() {
|
11718
|
-
return FontItalicHistoryItem;
|
11719
|
-
}
|
11720
|
-
getJSONProperty() {
|
11721
|
-
return JSONCharacterFormattingProperty.Italic;
|
11722
|
-
}
|
11723
|
-
}
|
11724
|
-
class CharacterPropertiesFontInfoDescriptor {
|
11725
|
-
constructor() {
|
11726
|
-
this.binaryEquals = comparers.Equals.object;
|
11727
|
-
this.defaultValue = undefined;
|
11728
|
-
}
|
11729
|
-
setProp(props, newValue) {
|
11730
|
-
props.fontInfo = newValue;
|
11731
|
-
}
|
11732
|
-
getProp(props) {
|
11733
|
-
return props.fontInfo;
|
11734
|
-
}
|
11735
|
-
maskValue() {
|
11736
|
-
return CharacterPropertiesMask.UseFontName;
|
11737
|
-
}
|
11738
|
-
getHistoryItemConstructor() {
|
11739
|
-
return FontNameHistoryItem;
|
11740
|
-
}
|
11741
|
-
getJSONProperty() {
|
11742
|
-
return JSONCharacterFormattingProperty.FontName;
|
11743
|
-
}
|
11744
|
-
}
|
11745
|
-
class CharacterPropertiesScriptDescriptor {
|
11746
|
-
constructor() {
|
11747
|
-
this.binaryEquals = comparers.Equals.simpleType;
|
11748
|
-
this.defaultValue = CharacterFormattingScript.Normal;
|
11749
|
-
}
|
11750
|
-
setProp(props, newValue) {
|
11751
|
-
props.script = newValue;
|
11752
|
-
}
|
11753
|
-
getProp(props) {
|
11754
|
-
return props.script;
|
11755
|
-
}
|
11756
|
-
maskValue() {
|
11757
|
-
return CharacterPropertiesMask.UseScript;
|
11758
|
-
}
|
11759
|
-
getHistoryItemConstructor() {
|
11760
|
-
return FontScriptHistoryItem;
|
11761
|
-
}
|
11762
|
-
getJSONProperty() {
|
11763
|
-
return JSONCharacterFormattingProperty.Script;
|
11764
|
-
}
|
11765
|
-
}
|
11766
|
-
class CharacterPropertiesStrikeoutTypeDescriptor {
|
11767
|
-
constructor() {
|
11768
|
-
this.binaryEquals = comparers.Equals.simpleType;
|
11769
|
-
this.defaultValue = StrikeoutType.None;
|
11770
|
-
}
|
11771
|
-
setProp(props, newValue) {
|
11772
|
-
props.fontStrikeoutType = newValue;
|
11773
|
-
}
|
11774
|
-
getProp(props) {
|
11775
|
-
return props.fontStrikeoutType;
|
11776
|
-
}
|
11777
|
-
maskValue() {
|
11778
|
-
return CharacterPropertiesMask.UseFontStrikeoutType;
|
11779
|
-
}
|
11780
|
-
getHistoryItemConstructor() {
|
11781
|
-
return FontStrikeoutTypeHistoryItem;
|
11782
|
-
}
|
11783
|
-
getJSONProperty() {
|
11784
|
-
return JSONCharacterFormattingProperty.StrikeoutType;
|
11785
|
-
}
|
11786
|
-
}
|
11787
|
-
class CharacterPropertiesUnderlineTypeDescriptor {
|
11788
|
-
constructor() {
|
11789
|
-
this.binaryEquals = comparers.Equals.simpleType;
|
11790
|
-
this.defaultValue = UnderlineType.None;
|
11791
|
-
}
|
11792
|
-
setProp(props, newValue) {
|
11793
|
-
props.fontUnderlineType = newValue;
|
11794
|
-
}
|
11795
|
-
getProp(props) {
|
11796
|
-
return props.fontUnderlineType;
|
11797
|
-
}
|
11798
|
-
maskValue() {
|
11799
|
-
return CharacterPropertiesMask.UseFontUnderlineType;
|
11800
|
-
}
|
11801
|
-
getHistoryItemConstructor() {
|
11802
|
-
return FontUnderlineTypeHistoryItem;
|
11803
|
-
}
|
11804
|
-
getJSONProperty() {
|
11805
|
-
return JSONCharacterFormattingProperty.UnderlineType;
|
11806
|
-
}
|
11807
|
-
}
|
11808
|
-
class CharacterPropertiesUnderlineWordsOnlyDescriptor {
|
11809
|
-
constructor() {
|
11810
|
-
this.binaryEquals = comparers.Equals.simpleType;
|
11811
|
-
this.defaultValue = false;
|
11812
|
-
}
|
11813
|
-
setProp(props, newValue) {
|
11814
|
-
props.underlineWordsOnly = newValue;
|
11815
|
-
}
|
11816
|
-
getProp(props) {
|
11817
|
-
return props.underlineWordsOnly;
|
11818
|
-
}
|
11819
|
-
maskValue() {
|
11820
|
-
return CharacterPropertiesMask.UseUnderlineWordsOnly;
|
11821
|
-
}
|
11822
|
-
getHistoryItemConstructor() {
|
11823
|
-
return FontUnderlineWordsOnlyHistoryItem;
|
11824
|
-
}
|
11825
|
-
getJSONProperty() {
|
11826
|
-
return JSONCharacterFormattingProperty.UnderlineWordsOnly;
|
11827
|
-
}
|
11828
|
-
}
|
11829
|
-
class CharacterPropertiesStrikeoutWordsOnlyDescriptor {
|
11830
|
-
constructor() {
|
11831
|
-
this.binaryEquals = comparers.Equals.simpleType;
|
11832
|
-
this.defaultValue = false;
|
11833
|
-
}
|
11834
|
-
setProp(props, newValue) {
|
11835
|
-
props.strikeoutWordsOnly = newValue;
|
11836
|
-
}
|
11837
|
-
getProp(props) {
|
11838
|
-
return props.strikeoutWordsOnly;
|
11839
|
-
}
|
11840
|
-
maskValue() {
|
11841
|
-
return CharacterPropertiesMask.UseStrikeoutWordsOnly;
|
11842
|
-
}
|
11843
|
-
getHistoryItemConstructor() {
|
11844
|
-
return FontStrikeoutWordsOnlyHistoryItem;
|
11845
|
-
}
|
11846
|
-
getJSONProperty() {
|
11847
|
-
return JSONCharacterFormattingProperty.StrikeoutWordsOnly;
|
11848
|
-
}
|
11849
|
-
}
|
11850
|
-
class CharacterPropertiesNoProofDescriptor {
|
11851
|
-
constructor() {
|
11852
|
-
this.binaryEquals = comparers.Equals.simpleType;
|
11853
|
-
this.defaultValue = false;
|
11854
|
-
}
|
11855
|
-
setProp(props, newValue) {
|
11856
|
-
props.noProof = newValue;
|
11857
|
-
}
|
11858
|
-
getProp(props) {
|
11859
|
-
return props.noProof;
|
11860
|
-
}
|
11861
|
-
maskValue() {
|
11862
|
-
return CharacterPropertiesMask.UseNoProof;
|
11863
|
-
}
|
11864
|
-
getHistoryItemConstructor() {
|
11865
|
-
return FontNoProofHistoryItem;
|
11866
|
-
}
|
11867
|
-
getJSONProperty() {
|
11868
|
-
return JSONCharacterFormattingProperty.NoProof;
|
11869
|
-
}
|
11870
|
-
}
|
11871
|
-
class CharacterPropertiesHiddenDescriptor {
|
11872
|
-
constructor() {
|
11873
|
-
this.binaryEquals = comparers.Equals.simpleType;
|
11874
|
-
this.defaultValue = false;
|
11875
|
-
}
|
11876
|
-
setProp(props, newValue) {
|
11877
|
-
props.hidden = newValue;
|
11878
|
-
}
|
11879
|
-
getProp(props) {
|
11880
|
-
return props.hidden;
|
11881
|
-
}
|
11882
|
-
maskValue() {
|
11883
|
-
return CharacterPropertiesMask.UseHidden;
|
11884
|
-
}
|
11885
|
-
getHistoryItemConstructor() {
|
11886
|
-
return FontHiddenHistoryItem;
|
11887
|
-
}
|
11888
|
-
getJSONProperty() {
|
11889
|
-
return JSONCharacterFormattingProperty.Hidden;
|
11890
|
-
}
|
11891
|
-
}
|
11892
|
-
class CharacterPropertiesTextColorDescriptor {
|
11893
|
-
constructor() {
|
11894
|
-
this.binaryEquals = comparers.Equals.object;
|
11895
|
-
this.defaultValue = color_model_info_ColorModelInfo.autoColor;
|
11896
|
-
}
|
11897
|
-
setProp(props, newValue) {
|
11898
|
-
props.textColor = newValue;
|
11899
|
-
}
|
11900
|
-
getProp(props) {
|
11901
|
-
return props.textColor;
|
11902
|
-
}
|
11903
|
-
maskValue() {
|
11904
|
-
return CharacterPropertiesMask.UseForeColorIndex;
|
11905
|
-
}
|
11906
|
-
getHistoryItemConstructor() {
|
11907
|
-
return FontTextColorHistoryItem;
|
11908
|
-
}
|
11909
|
-
getJSONProperty() {
|
11910
|
-
return JSONCharacterFormattingProperty.TextColor;
|
11911
|
-
}
|
11912
|
-
}
|
11913
|
-
class CharacterPropertiesShadingInfoColorDescriptor {
|
11914
|
-
constructor() {
|
11915
|
-
this.binaryEquals = comparers.Equals.object;
|
11916
|
-
this.defaultValue = ShadingInfo.noColor;
|
11917
|
-
}
|
11918
|
-
setProp(props, newValue) {
|
11919
|
-
props.shadingInfo = newValue;
|
11920
|
-
}
|
11921
|
-
getProp(props) {
|
11922
|
-
return props.shadingInfo;
|
11923
|
-
}
|
11924
|
-
maskValue() {
|
11925
|
-
return CharacterPropertiesMask.UseShadingInfoIndex;
|
11926
|
-
}
|
11927
|
-
getHistoryItemConstructor() {
|
11928
|
-
return FontShadingInfoHistoryItem;
|
11929
|
-
}
|
11930
|
-
getJSONProperty() {
|
11931
|
-
return JSONCharacterFormattingProperty.ShadingInfo;
|
11932
|
-
}
|
11933
|
-
}
|
11934
|
-
class CharacterPropertiesStrikeoutColorDescriptor {
|
11935
|
-
constructor() {
|
11936
|
-
this.binaryEquals = comparers.Equals.object;
|
11937
|
-
this.defaultValue = color_model_info_ColorModelInfo.noColor;
|
11938
|
-
}
|
11939
|
-
setProp(props, newValue) {
|
11940
|
-
props.strikeoutColor = newValue;
|
11941
|
-
}
|
11942
|
-
getProp(props) {
|
11943
|
-
return props.strikeoutColor;
|
11944
|
-
}
|
11945
|
-
maskValue() {
|
11946
|
-
return CharacterPropertiesMask.UseStrikeoutColorIndex;
|
11947
|
-
}
|
11948
|
-
getHistoryItemConstructor() {
|
11949
|
-
return FontStrikeoutColorHistoryItem;
|
11950
|
-
}
|
11951
|
-
getJSONProperty() {
|
11952
|
-
return JSONCharacterFormattingProperty.StrikeoutColor;
|
11953
|
-
}
|
11954
|
-
}
|
11955
|
-
class CharacterPropertiesUnderlineColorDescriptor {
|
11956
|
-
constructor() {
|
11957
|
-
this.binaryEquals = comparers.Equals.object;
|
11958
|
-
this.defaultValue = color_model_info_ColorModelInfo.noColor;
|
11959
|
-
}
|
11960
|
-
setProp(props, newValue) {
|
11961
|
-
props.underlineColor = newValue;
|
11962
|
-
}
|
11963
|
-
getProp(props) {
|
11964
|
-
return props.underlineColor;
|
11965
|
-
}
|
11966
|
-
maskValue() {
|
11967
|
-
return CharacterPropertiesMask.UseUnderlineColorIndex;
|
11968
|
-
}
|
11969
|
-
getHistoryItemConstructor() {
|
11970
|
-
return FontUnderlineColorHistoryItem;
|
11971
|
-
}
|
11972
|
-
getJSONProperty() {
|
11973
|
-
return JSONCharacterFormattingProperty.UnderlineColor;
|
11974
|
-
}
|
11975
|
-
}
|
11976
|
-
class CharacterPropertiesHighlightColorDescriptor {
|
11977
|
-
constructor() {
|
11978
|
-
this.binaryEquals = comparers.Equals.object;
|
11979
|
-
this.defaultValue = color_model_info_ColorModelInfo.noColor;
|
11980
|
-
}
|
11981
|
-
setProp(props, newValue) {
|
11982
|
-
props.highlightColor = newValue;
|
11983
|
-
}
|
11984
|
-
getProp(props) {
|
11985
|
-
return props.highlightColor;
|
11986
|
-
}
|
11987
|
-
maskValue() {
|
11988
|
-
return CharacterPropertiesMask.UseHighlightColorIndex;
|
11989
|
-
}
|
11990
|
-
getHistoryItemConstructor() {
|
11991
|
-
return FontHighlightColorHistoryItem;
|
11992
|
-
}
|
11993
|
-
getJSONProperty() {
|
11994
|
-
return JSONCharacterFormattingProperty.HighlightColor;
|
11995
|
-
}
|
11996
|
-
}
|
11997
|
-
class CharacterPropertiesLangInfoDescriptor {
|
11998
|
-
constructor() {
|
11999
|
-
this.binaryEquals = comparers.Equals.object;
|
12000
|
-
this.defaultValue = new LangInfo();
|
12001
|
-
}
|
12002
|
-
setProp(props, newValue) {
|
12003
|
-
props.langInfo = newValue;
|
12004
|
-
}
|
12005
|
-
getProp(props) {
|
12006
|
-
return props.langInfo;
|
12007
|
-
}
|
12008
|
-
maskValue() {
|
12009
|
-
return CharacterPropertiesMask.UseLangInfo;
|
12010
|
-
}
|
12011
|
-
getHistoryItemConstructor() {
|
12012
|
-
return FontLangInfoHistoryItem;
|
12013
|
-
}
|
12014
|
-
getJSONProperty() {
|
12015
|
-
return JSONCharacterFormattingProperty.LangInfo;
|
12016
|
-
}
|
12017
|
-
}
|
12018
|
-
class CharacterPropertiesCompositeFontInfoDescriptor {
|
12019
|
-
constructor() {
|
12020
|
-
this.binaryEquals = comparers.Equals.object;
|
12021
|
-
this.defaultValue = new CompositeFontInfo();
|
12022
|
-
}
|
12023
|
-
setProp(props, newValue) {
|
12024
|
-
props.compositeFontInfo = newValue;
|
12025
|
-
}
|
12026
|
-
getProp(props) {
|
12027
|
-
return props.compositeFontInfo;
|
12028
|
-
}
|
12029
|
-
maskValue() {
|
12030
|
-
return CharacterPropertiesMask.UseCompositeFontInfo;
|
12031
|
-
}
|
12032
|
-
getHistoryItemConstructor() {
|
12033
|
-
return FontCompositeFontInfoHistoryItem;
|
12034
|
-
}
|
12035
|
-
getJSONProperty() {
|
12036
|
-
return JSONCharacterFormattingProperty.CompositeFontInfo;
|
12037
|
-
}
|
12038
|
-
}
|
12039
|
-
class character_property_descriptor_CharacterPropertyDescriptor {
|
12040
|
-
}
|
12041
|
-
character_property_descriptor_CharacterPropertyDescriptor.allCaps = new CharacterPropertiesAllCapsDescriptor();
|
12042
|
-
character_property_descriptor_CharacterPropertyDescriptor.size = new CharacterPropertiesFontSizeDescriptor();
|
12043
|
-
character_property_descriptor_CharacterPropertyDescriptor.bold = new CharacterPropertiesFontBoldDescriptor();
|
12044
|
-
character_property_descriptor_CharacterPropertyDescriptor.italic = new CharacterPropertiesFontItalicDescriptor();
|
12045
|
-
character_property_descriptor_CharacterPropertyDescriptor.fontInfo = new CharacterPropertiesFontInfoDescriptor();
|
12046
|
-
character_property_descriptor_CharacterPropertyDescriptor.script = new CharacterPropertiesScriptDescriptor();
|
12047
|
-
character_property_descriptor_CharacterPropertyDescriptor.strikeoutType = new CharacterPropertiesStrikeoutTypeDescriptor();
|
12048
|
-
character_property_descriptor_CharacterPropertyDescriptor.underlineType = new CharacterPropertiesUnderlineTypeDescriptor();
|
12049
|
-
character_property_descriptor_CharacterPropertyDescriptor.underlineWordsOnly = new CharacterPropertiesUnderlineWordsOnlyDescriptor();
|
12050
|
-
character_property_descriptor_CharacterPropertyDescriptor.strikeoutWordsOnly = new CharacterPropertiesStrikeoutWordsOnlyDescriptor();
|
12051
|
-
character_property_descriptor_CharacterPropertyDescriptor.noProof = new CharacterPropertiesNoProofDescriptor();
|
12052
|
-
character_property_descriptor_CharacterPropertyDescriptor.hidden = new CharacterPropertiesHiddenDescriptor();
|
12053
|
-
character_property_descriptor_CharacterPropertyDescriptor.langInfo = new CharacterPropertiesLangInfoDescriptor();
|
12054
|
-
character_property_descriptor_CharacterPropertyDescriptor.compositeFontInfo = new CharacterPropertiesCompositeFontInfoDescriptor();
|
12055
|
-
character_property_descriptor_CharacterPropertyDescriptor.textColor = new CharacterPropertiesTextColorDescriptor();
|
12056
|
-
character_property_descriptor_CharacterPropertyDescriptor.shadingInfo = new CharacterPropertiesShadingInfoColorDescriptor();
|
12057
|
-
character_property_descriptor_CharacterPropertyDescriptor.highlightColor = new CharacterPropertiesHighlightColorDescriptor();
|
12058
|
-
character_property_descriptor_CharacterPropertyDescriptor.strikeoutColor = new CharacterPropertiesStrikeoutColorDescriptor();
|
12059
|
-
character_property_descriptor_CharacterPropertyDescriptor.underlineColor = new CharacterPropertiesUnderlineColorDescriptor();
|
12060
|
-
character_property_descriptor_CharacterPropertyDescriptor.smallCaps = new CharacterPropertiesSmallCapsDescriptor();
|
12061
|
-
character_property_descriptor_CharacterPropertyDescriptor.ALL_FIELDS = [
|
12062
|
-
character_property_descriptor_CharacterPropertyDescriptor.allCaps,
|
12063
|
-
character_property_descriptor_CharacterPropertyDescriptor.size,
|
12064
|
-
character_property_descriptor_CharacterPropertyDescriptor.bold,
|
12065
|
-
character_property_descriptor_CharacterPropertyDescriptor.italic,
|
12066
|
-
character_property_descriptor_CharacterPropertyDescriptor.fontInfo,
|
12067
|
-
character_property_descriptor_CharacterPropertyDescriptor.script,
|
12068
|
-
character_property_descriptor_CharacterPropertyDescriptor.strikeoutType,
|
12069
|
-
character_property_descriptor_CharacterPropertyDescriptor.underlineType,
|
12070
|
-
character_property_descriptor_CharacterPropertyDescriptor.underlineWordsOnly,
|
12071
|
-
character_property_descriptor_CharacterPropertyDescriptor.strikeoutWordsOnly,
|
12072
|
-
character_property_descriptor_CharacterPropertyDescriptor.noProof,
|
12073
|
-
character_property_descriptor_CharacterPropertyDescriptor.hidden,
|
12074
|
-
character_property_descriptor_CharacterPropertyDescriptor.langInfo,
|
12075
|
-
character_property_descriptor_CharacterPropertyDescriptor.compositeFontInfo,
|
12076
|
-
character_property_descriptor_CharacterPropertyDescriptor.textColor,
|
12077
|
-
character_property_descriptor_CharacterPropertyDescriptor.shadingInfo,
|
12078
|
-
character_property_descriptor_CharacterPropertyDescriptor.highlightColor,
|
12079
|
-
character_property_descriptor_CharacterPropertyDescriptor.strikeoutColor,
|
12080
|
-
character_property_descriptor_CharacterPropertyDescriptor.underlineColor,
|
12081
|
-
character_property_descriptor_CharacterPropertyDescriptor.smallCaps
|
12082
|
-
];
|
12083
|
-
character_property_descriptor_CharacterPropertyDescriptor.whatNeedSetWhenCreateHyperlinkField = [
|
12084
|
-
character_property_descriptor_CharacterPropertyDescriptor.size,
|
12085
|
-
character_property_descriptor_CharacterPropertyDescriptor.bold,
|
12086
|
-
character_property_descriptor_CharacterPropertyDescriptor.italic,
|
12087
|
-
character_property_descriptor_CharacterPropertyDescriptor.fontInfo,
|
12088
|
-
character_property_descriptor_CharacterPropertyDescriptor.script,
|
12089
|
-
character_property_descriptor_CharacterPropertyDescriptor.strikeoutType,
|
12090
|
-
character_property_descriptor_CharacterPropertyDescriptor.allCaps,
|
12091
|
-
character_property_descriptor_CharacterPropertyDescriptor.underlineWordsOnly,
|
12092
|
-
character_property_descriptor_CharacterPropertyDescriptor.strikeoutWordsOnly,
|
12093
|
-
character_property_descriptor_CharacterPropertyDescriptor.noProof,
|
12094
|
-
character_property_descriptor_CharacterPropertyDescriptor.hidden,
|
12095
|
-
character_property_descriptor_CharacterPropertyDescriptor.shadingInfo,
|
12096
|
-
character_property_descriptor_CharacterPropertyDescriptor.strikeoutColor,
|
12097
|
-
character_property_descriptor_CharacterPropertyDescriptor.underlineColor,
|
12098
|
-
character_property_descriptor_CharacterPropertyDescriptor.langInfo,
|
12099
|
-
character_property_descriptor_CharacterPropertyDescriptor.smallCaps
|
12100
|
-
];
|
12101
|
-
|
12102
12115
|
;// CONCATENATED MODULE: ./src/common/model/borders/table-border-base.ts
|
12103
12116
|
|
12104
12117
|
class TableBordersBase {
|
@@ -12281,6 +12294,7 @@ var ConditionalTableStyleFormatting;
|
|
12281
12294
|
ConditionalTableStyleFormatting[ConditionalTableStyleFormatting["TopLeftCell"] = 4] = "TopLeftCell";
|
12282
12295
|
ConditionalTableStyleFormatting[ConditionalTableStyleFormatting["BottomRightCell"] = 2] = "BottomRightCell";
|
12283
12296
|
ConditionalTableStyleFormatting[ConditionalTableStyleFormatting["BottomLeftCell"] = 1] = "BottomLeftCell";
|
12297
|
+
ConditionalTableStyleFormatting[ConditionalTableStyleFormatting["None"] = 0] = "None";
|
12284
12298
|
})(ConditionalTableStyleFormatting || (ConditionalTableStyleFormatting = {}));
|
12285
12299
|
|
12286
12300
|
;// CONCATENATED MODULE: ./src/common/model/tables/secondary-structures/table-units.ts
|
@@ -19160,8 +19174,6 @@ class TableAlignmentApplier {
|
|
19160
19174
|
offset = 0;
|
19161
19175
|
break;
|
19162
19176
|
}
|
19163
|
-
if (offset <= 0)
|
19164
|
-
return;
|
19165
19177
|
TableAlignmentApplier.moveAllTable(currTableColumnInfo, (rect) => rect.x += offset);
|
19166
19178
|
}
|
19167
19179
|
static applyCellsVerticalAlignment(defaultTableCellProps, grid, currTableColumnInfo, rowInfo) {
|
@@ -19655,15 +19667,16 @@ class TabProperties {
|
|
19655
19667
|
}
|
19656
19668
|
}
|
19657
19669
|
class TabInfo {
|
19658
|
-
constructor(position, alignment, leader, deleted, isDefault) {
|
19670
|
+
constructor(position, alignment, leader, deleted, isDefault, isParagraphIndent = false) {
|
19659
19671
|
this.position = position;
|
19660
19672
|
this.alignment = alignment;
|
19661
19673
|
this.leader = leader;
|
19662
19674
|
this.isDefault = isDefault;
|
19663
19675
|
this.deleted = deleted;
|
19676
|
+
this.isParagraphIndent = isParagraphIndent;
|
19664
19677
|
}
|
19665
19678
|
clone() {
|
19666
|
-
return new TabInfo(this.position, this.alignment, this.leader, this.deleted, this.isDefault);
|
19679
|
+
return new TabInfo(this.position, this.alignment, this.leader, this.deleted, this.isDefault, this.isParagraphIndent);
|
19667
19680
|
}
|
19668
19681
|
equals(obj) {
|
19669
19682
|
if (!obj)
|
@@ -19672,7 +19685,8 @@ class TabInfo {
|
|
19672
19685
|
this.leader == obj.leader &&
|
19673
19686
|
this.position == obj.position &&
|
19674
19687
|
this.deleted == obj.deleted &&
|
19675
|
-
this.isDefault == obj.isDefault
|
19688
|
+
this.isDefault == obj.isDefault &&
|
19689
|
+
this.isParagraphIndent == obj.isParagraphIndent;
|
19676
19690
|
}
|
19677
19691
|
}
|
19678
19692
|
|
@@ -32115,6 +32129,14 @@ class LayoutPage extends rectangle.Rectangle {
|
|
32115
32129
|
this.anchoredObjectHolder = new PageAnchoredObjectHolder(this);
|
32116
32130
|
this.tableAnchoredObjectsHolder = new TableAnchoredObjectsHolder();
|
32117
32131
|
}
|
32132
|
+
get grids() {
|
32133
|
+
const result = new Map();
|
32134
|
+
for (let pageArea of this.mainSubDocumentPageAreas)
|
32135
|
+
pageArea.grids.forEach((grid, table) => result.set(table, grid));
|
32136
|
+
for (let pageArea of Object.values(this.otherPageAreas))
|
32137
|
+
pageArea.grids.forEach((grid, table) => result.set(table, grid));
|
32138
|
+
return result;
|
32139
|
+
}
|
32118
32140
|
setRenderLevelCalculator(anchorObjectsPositionInfo, compatibilityMode) {
|
32119
32141
|
this.renderLevelCalculator = new RenderLevelCalculator();
|
32120
32142
|
this.renderLevelCalculator.calcLevels(this.anchoredObjectHolder, anchorObjectsPositionInfo, compatibilityMode);
|
@@ -40300,7 +40322,7 @@ class CharacterPropertiesUseValueManipulator {
|
|
40300
40322
|
constructor(manipulator) {
|
40301
40323
|
this.manipulator = manipulator;
|
40302
40324
|
}
|
40303
|
-
setValue(subDocument, interval, newValue) {
|
40325
|
+
setValue(subDocument, interval, newValue, keepCustomFormatting = false) {
|
40304
40326
|
var oldState = new HistoryItemIntervalState();
|
40305
40327
|
if (!ControlOptions.isEnabled(subDocument.documentModel.options.characterFormatting))
|
40306
40328
|
return oldState;
|
@@ -40310,7 +40332,7 @@ class CharacterPropertiesUseValueManipulator {
|
|
40310
40332
|
var run = iterator.currentRun;
|
40311
40333
|
oldState.register(new HistoryItemIntervalStateObject(iterator.currentInterval(), run.maskedCharacterProperties.getUseValueFull()));
|
40312
40334
|
var properties = run.maskedCharacterProperties.clone();
|
40313
|
-
properties.setUseValueFull(newValue);
|
40335
|
+
properties.setUseValueFull(newValue, keepCustomFormatting);
|
40314
40336
|
run.setCharacterProperties(properties);
|
40315
40337
|
run.onCharacterPropertiesChanged();
|
40316
40338
|
}
|
@@ -49839,11 +49861,13 @@ class RtfStyleExporter {
|
|
49839
49861
|
|
49840
49862
|
|
49841
49863
|
|
49864
|
+
|
49842
49865
|
class RtfTableExporterStateBase {
|
49843
|
-
constructor(rtfExporter, table, nestingLevel) {
|
49866
|
+
constructor(rtfExporter, table, grid, nestingLevel) {
|
49844
49867
|
this.rtfExporter = rtfExporter;
|
49845
49868
|
this._nestingLevel = nestingLevel;
|
49846
49869
|
this.table = table;
|
49870
|
+
this.grid = grid;
|
49847
49871
|
this.tableRowPropertiesExporter = new RtfTableRowPropertiesExporter(rtfExporter.documentModel, rtfExporter.rtfExportHelper, rtfExporter.rtfBuilder);
|
49848
49872
|
this.tableCellPropertiesExporter = new RtfTableCellPropertiesExporter(rtfExporter.documentModel, rtfExporter.rtfExportHelper, rtfExporter.rtfBuilder);
|
49849
49873
|
this.tablePropertiesExporter = new RtfTablePropertiesExporter(rtfExporter.documentModel, rtfExporter.rtfExportHelper, rtfExporter.rtfBuilder);
|
@@ -49918,7 +49942,7 @@ class RtfTableExporterStateBase {
|
|
49918
49942
|
while (parentCell !== nestedTable.parentCell) {
|
49919
49943
|
nestedTable = nestedTable.parentCell.parentRow.parentTable;
|
49920
49944
|
}
|
49921
|
-
return RtfTableExporter.exportNestedTable(this.rtfExporter, nestedTable, this.nestingLevel + 1);
|
49945
|
+
return RtfTableExporter.exportNestedTable(this.rtfExporter, nestedTable, this.grid, this.nestingLevel + 1);
|
49922
49946
|
}
|
49923
49947
|
exportRowProperties(row, rowIndex) {
|
49924
49948
|
const rowLeft = this.calculateRowLeft(row, row.parentTable.getActualTableIndent(this.documentModel.defaultTableProperties));
|
@@ -49926,20 +49950,25 @@ class RtfTableExporterStateBase {
|
|
49926
49950
|
let cellRightVirtualColInd = row.gridBefore;
|
49927
49951
|
for (const cell of row.cells) {
|
49928
49952
|
cellRightVirtualColInd += cell.columnSpan;
|
49929
|
-
const
|
49953
|
+
const cellWidth = this.getCellWidth(row.gridBefore, cellRightVirtualColInd);
|
49954
|
+
const cellRight = unit_converter/* UnitConverter */.u.pixelsToTwips(rowLeft + cellWidth);
|
49930
49955
|
this.exportCellProperties(cell, cellRight);
|
49931
49956
|
}
|
49932
49957
|
}
|
49933
|
-
getCellWidth(
|
49934
|
-
if (
|
49958
|
+
getCellWidth(leftSideIndex, columnSpan) {
|
49959
|
+
if (leftSideIndex < 0 || columnSpan < 0)
|
49935
49960
|
throw new Error(errors/* Errors */.D.InternalException);
|
49936
|
-
|
49937
|
-
|
49961
|
+
let result = 0;
|
49962
|
+
for (let i = 0; i < columnSpan; i++)
|
49963
|
+
result += Math.max(this.grid.columns.width[i + leftSideIndex], 1);
|
49964
|
+
return result;
|
49938
49965
|
}
|
49939
49966
|
calculateRowLeft(row, indent) {
|
49940
|
-
|
49967
|
+
var _a;
|
49968
|
+
const widthBefore = row.gridBefore > 0 ? this.getCellWidth(0, row.gridBefore) : 0;
|
49941
49969
|
const offset = this.getActualWidth(indent) + widthBefore;
|
49942
|
-
|
49970
|
+
const rowLeftOffset = (_a = this.rowLeftOffset) !== null && _a !== void 0 ? _a : this.calculateRowLeftOffset(row);
|
49971
|
+
return offset - rowLeftOffset;
|
49943
49972
|
}
|
49944
49973
|
calculateRowLeftOffset(row) {
|
49945
49974
|
const borderWidth = row.cells[0].properties.borders.left.width;
|
@@ -50049,8 +50078,8 @@ class RtfTableExporterStateBase {
|
|
50049
50078
|
|
50050
50079
|
|
50051
50080
|
class RtfNestedTableExporterState extends RtfTableExporterStateBase {
|
50052
|
-
constructor(rtfExporter, table, nestingLevel) {
|
50053
|
-
super(rtfExporter, table, nestingLevel);
|
50081
|
+
constructor(rtfExporter, table, grid, nestingLevel) {
|
50082
|
+
super(rtfExporter, table, grid, nestingLevel);
|
50054
50083
|
}
|
50055
50084
|
export() {
|
50056
50085
|
super.exportBase();
|
@@ -50079,8 +50108,8 @@ class RtfNestedTableExporterState extends RtfTableExporterStateBase {
|
|
50079
50108
|
|
50080
50109
|
|
50081
50110
|
class RtfTableExporterState extends RtfTableExporterStateBase {
|
50082
|
-
constructor(rtfExporter, table) {
|
50083
|
-
super(rtfExporter, table, 1);
|
50111
|
+
constructor(rtfExporter, table, grid) {
|
50112
|
+
super(rtfExporter, table, grid, 1);
|
50084
50113
|
}
|
50085
50114
|
export() {
|
50086
50115
|
super.exportBase();
|
@@ -50099,13 +50128,13 @@ class RtfTableExporterState extends RtfTableExporterStateBase {
|
|
50099
50128
|
|
50100
50129
|
|
50101
50130
|
class RtfTableExporter {
|
50102
|
-
static exportTable(rtfContentExporter, table) {
|
50103
|
-
new RtfTableExporterState(rtfContentExporter, table).export();
|
50131
|
+
static exportTable(rtfContentExporter, table, grid) {
|
50132
|
+
new RtfTableExporterState(rtfContentExporter, table, grid).export();
|
50104
50133
|
rtfContentExporter.tableIterator.update(table.getEndPosition());
|
50105
50134
|
return rtfContentExporter.subDocument.getParagraphIndexByPosition(table.getEndPosition() - 1);
|
50106
50135
|
}
|
50107
|
-
static exportNestedTable(rtfContentExporter, table, nestingLevel) {
|
50108
|
-
new RtfNestedTableExporterState(rtfContentExporter, table, nestingLevel).export();
|
50136
|
+
static exportNestedTable(rtfContentExporter, table, grid, nestingLevel) {
|
50137
|
+
new RtfNestedTableExporterState(rtfContentExporter, table, grid, nestingLevel).export();
|
50109
50138
|
rtfContentExporter.tableIterator.update(table.getEndPosition());
|
50110
50139
|
return rtfContentExporter.subDocument.getParagraphIndexByPosition(table.getEndPosition() - 1);
|
50111
50140
|
}
|
@@ -50149,17 +50178,17 @@ class RtfTableExporter {
|
|
50149
50178
|
|
50150
50179
|
|
50151
50180
|
class RtfContentExporter {
|
50152
|
-
constructor(
|
50181
|
+
constructor(exportModelOptions, options, rtfExportHelper) {
|
50153
50182
|
this.shouldFourceUpdateIterators = false;
|
50154
|
-
this.
|
50183
|
+
this.exportModelOptions = exportModelOptions;
|
50155
50184
|
this.subDocument = this.documentModel.mainSubDocument;
|
50156
50185
|
this.pieceTableNumberingListCounters = new PieceTableNumberingListCountersManager();
|
50157
50186
|
this.rtfExportHelper = rtfExportHelper;
|
50158
50187
|
this.options = options;
|
50159
50188
|
this.rtfBuilder = this.createRtfBuilder();
|
50160
|
-
this.paragraphPropertiesExporter = new RtfParagraphPropertiesExporter(documentModel, rtfExportHelper, this.rtfBuilder);
|
50161
|
-
this.characterPropertiesExporter = new RtfCharacterPropertiesExporter(documentModel, rtfExportHelper, this.rtfBuilder, options);
|
50162
|
-
this.sectionPropertiesExporter = new RtfSectionPropertiesExporter(documentModel, rtfExportHelper, this.rtfBuilder);
|
50189
|
+
this.paragraphPropertiesExporter = new RtfParagraphPropertiesExporter(this.documentModel, rtfExportHelper, this.rtfBuilder);
|
50190
|
+
this.characterPropertiesExporter = new RtfCharacterPropertiesExporter(this.documentModel, rtfExportHelper, this.rtfBuilder, options);
|
50191
|
+
this.sectionPropertiesExporter = new RtfSectionPropertiesExporter(this.documentModel, rtfExportHelper, this.rtfBuilder);
|
50163
50192
|
this.runHandlerMap = new MapCreator()
|
50164
50193
|
.add(RunType.TextRun, this.exportTextRun)
|
50165
50194
|
.add(RunType.FieldCodeStartRun, this.fieldCodeStartRunHandler)
|
@@ -50173,6 +50202,7 @@ class RtfContentExporter {
|
|
50173
50202
|
}
|
50174
50203
|
get shouldExportHiddenText() { return true; }
|
50175
50204
|
;
|
50205
|
+
get documentModel() { return this.exportModelOptions.modelManager.modelManipulator.model; }
|
50176
50206
|
createRtfBuilder() {
|
50177
50207
|
return new RtfBuilder();
|
50178
50208
|
}
|
@@ -50371,7 +50401,7 @@ class RtfContentExporter {
|
|
50371
50401
|
value = "00000000";
|
50372
50402
|
}
|
50373
50403
|
else {
|
50374
|
-
const view = new DataView(hash, 0);
|
50404
|
+
const view = new DataView(hash.buffer, 0);
|
50375
50405
|
const hashValue = view.getInt32(0);
|
50376
50406
|
value = this.documentModel.simpleFormattersManager.formatString("{0:x8}", hashValue);
|
50377
50407
|
}
|
@@ -50547,11 +50577,14 @@ class RtfContentExporter {
|
|
50547
50577
|
this.exportSingleParagraph(paragraph);
|
50548
50578
|
return paragraphIndex;
|
50549
50579
|
}
|
50550
|
-
else
|
50551
|
-
|
50580
|
+
else {
|
50581
|
+
const table = tablesInfo[0].table.getTopLevelParent();
|
50582
|
+
const grid = this.exportModelOptions.grids.get(table);
|
50583
|
+
return RtfTableExporter.exportTable(this, table, grid) - this.startSectionParagraphIndex;
|
50584
|
+
}
|
50552
50585
|
}
|
50553
50586
|
exportSingleParagraph(paragraph) {
|
50554
|
-
this.exportParagraphCore(paragraph, 0,
|
50587
|
+
this.exportParagraphCore(paragraph, 0, ConditionalTableStyleFormatting.None, -1);
|
50555
50588
|
this.finishParagraph(paragraph);
|
50556
50589
|
}
|
50557
50590
|
finishParagraph(paragraph) {
|
@@ -51080,11 +51113,11 @@ class RtfExportHelper {
|
|
51080
51113
|
|
51081
51114
|
|
51082
51115
|
class RtfExporter {
|
51083
|
-
constructor(
|
51084
|
-
this.modelManipulator = modelManipulator;
|
51116
|
+
constructor(exportModelOptions, options) {
|
51117
|
+
this.modelManipulator = exportModelOptions.modelManager.modelManipulator;
|
51085
51118
|
this.options = options;
|
51086
51119
|
this.rtfExportHelper = new RtfExportHelper();
|
51087
|
-
this.contentExporter = new RtfContentExporter(
|
51120
|
+
this.contentExporter = new RtfContentExporter(exportModelOptions, options, this.rtfExportHelper);
|
51088
51121
|
this.rtfBuilder = this.contentExporter.createRtfBuilder();
|
51089
51122
|
}
|
51090
51123
|
get documentModel() { return this.modelManipulator.model; }
|
@@ -65204,10 +65237,11 @@ function getAfterInsertReject(callback) {
|
|
65204
65237
|
|
65205
65238
|
|
65206
65239
|
|
65207
|
-
function getRtfFromSubDocumentPublic(
|
65240
|
+
function getRtfFromSubDocumentPublic(processor, subDocument, coreInterval) {
|
65208
65241
|
const rangeCopy = RangeCopy.create(new SubDocumentIntervals(subDocument, [coreInterval]));
|
65209
|
-
const newModelManager = new ClientModelManager(rangeCopy.model, richOptions, new batch_updatable/* EmptyBatchUpdatableObject */.m1());
|
65210
|
-
|
65242
|
+
const newModelManager = new ClientModelManager(rangeCopy.model, processor.modelManager.richOptions, new batch_updatable/* EmptyBatchUpdatableObject */.m1());
|
65243
|
+
const exportModelOptions = processor.getExportModelOptions({ modelManager: newModelManager });
|
65244
|
+
return new RtfExporter(exportModelOptions, new RtfDocumentExporterOptions()).exportAsString();
|
65211
65245
|
}
|
65212
65246
|
function insertRtfInSubDocumentPublic(processor, subDocument, position, rtf, callback) {
|
65213
65247
|
const options = new RtfImporterOptions(() => { });
|
@@ -70460,6 +70494,12 @@ class DocumentLayout {
|
|
70460
70494
|
this.anchorObjectsPositionInfo = anchorObjectsPositionInfo;
|
70461
70495
|
this.setEmptyLayout(ColorHelper.NO_COLOR);
|
70462
70496
|
}
|
70497
|
+
get grids() {
|
70498
|
+
return this.pages.reduce((res, page) => {
|
70499
|
+
page.grids.forEach((grid, table) => res.set(table, grid));
|
70500
|
+
return res;
|
70501
|
+
}, new Map());
|
70502
|
+
}
|
70463
70503
|
setEmptyLayout(pageColor) {
|
70464
70504
|
this.pages = [];
|
70465
70505
|
this.validPageCount = 0;
|
@@ -81456,10 +81496,12 @@ class ParagraphSpacingDestination extends ParagraphFormattingLeafElementDestinat
|
|
81456
81496
|
const spacingBefore = this.data.readerHelper.getWpSTIntegerValue(reader, 'before', constants.Constants.MIN_SAFE_INTEGER);
|
81457
81497
|
if (spacingBefore >= 0)
|
81458
81498
|
this.paragraphProperties.setValue(ParagraphPropertyDescriptor.spacingBefore, spacingBefore);
|
81459
|
-
this.
|
81460
|
-
|
81461
|
-
|
81462
|
-
|
81499
|
+
const beforeAutoSpacing = this.data.readerHelper.getWpSTOnOffValue(reader, 'beforeAutospacing', null);
|
81500
|
+
if (spacingBefore == -1 || beforeAutoSpacing != null)
|
81501
|
+
this.paragraphProperties.setValue(ParagraphPropertyDescriptor.beforeAutoSpacing, spacingBefore == -1 || beforeAutoSpacing);
|
81502
|
+
const afterAutoSpacing = this.data.readerHelper.getWpSTOnOffValue(reader, 'afterAutospacing', null);
|
81503
|
+
if (spacingAfter == -1 || afterAutoSpacing != null)
|
81504
|
+
this.paragraphProperties.setValue(ParagraphPropertyDescriptor.afterAutoSpacing, spacingAfter == -1 || afterAutoSpacing);
|
81463
81505
|
const lineSpacing = this.data.readerHelper.getWpSTIntegerValue(reader, 'line', constants.Constants.MIN_SAFE_INTEGER);
|
81464
81506
|
if (lineSpacing != constants.Constants.MIN_SAFE_INTEGER && lineSpacing > 0) {
|
81465
81507
|
const attribute = new WordProcessingMLValue('lineRule', 'line-rule');
|
@@ -85071,7 +85113,7 @@ class SubDocumentApi {
|
|
85071
85113
|
}
|
85072
85114
|
getRtf(interval) {
|
85073
85115
|
const coreInterval = this._checkInterval(interval);
|
85074
|
-
return getRtfFromSubDocumentPublic(this._processor
|
85116
|
+
return getRtfFromSubDocumentPublic(this._processor, this._subDocument, coreInterval);
|
85075
85117
|
}
|
85076
85118
|
insertContent(position, content, documentFormat, callback) {
|
85077
85119
|
position = ApiParametersChecker.check(position, 1, false, [
|
@@ -88498,21 +88540,13 @@ class SectionExporter extends BaseExporter {
|
|
88498
88540
|
this.exportSectionGeneralSettings(props);
|
88499
88541
|
}
|
88500
88542
|
exportSectionPage(props) {
|
88501
|
-
if (!this.shouldExportSectionPage(props))
|
88502
|
-
return;
|
88503
88543
|
this.writer.writeWpStartElement('pgSz');
|
88504
|
-
|
88505
|
-
|
88506
|
-
if (props.pageSize.height != SectionExporter.defaultProps.pageSize.height)
|
88507
|
-
this.writer.writeWpIntAttr('h', props.pageSize.height);
|
88544
|
+
this.writer.writeWpIntAttr('w', props.pageSize.width);
|
88545
|
+
this.writer.writeWpIntAttr('h', props.pageSize.height);
|
88508
88546
|
if (props.landscape)
|
88509
88547
|
this.writer.writeWpStringAttr('orient', props.landscape ? 'landscape' : 'portrait');
|
88510
88548
|
this.writer.endElement();
|
88511
88549
|
}
|
88512
|
-
shouldExportSectionPage(props) {
|
88513
|
-
return !props.pageSize.equals(SectionExporter.defaultProps.pageSize) ||
|
88514
|
-
props.landscape != SectionExporter.defaultProps.landscape;
|
88515
|
-
}
|
88516
88550
|
exportSectionMargins(props) {
|
88517
88551
|
this.writer.writeWpStartElement('pgMar');
|
88518
88552
|
this.writer.writeWpIntAttr('left', props.marginLeft);
|
@@ -90299,6 +90333,7 @@ class EffectExtent {
|
|
90299
90333
|
|
90300
90334
|
|
90301
90335
|
|
90336
|
+
|
90302
90337
|
class TableExporter extends BaseExporter {
|
90303
90338
|
constructor() {
|
90304
90339
|
super(...arguments);
|
@@ -90328,10 +90363,9 @@ class TableExporter extends BaseExporter {
|
|
90328
90363
|
}
|
90329
90364
|
}
|
90330
90365
|
getTableGrid(table) {
|
90331
|
-
|
90332
|
-
|
90333
|
-
|
90334
|
-
return colGrid;
|
90366
|
+
var _a, _b;
|
90367
|
+
const grid = this.data.grids.get(table);
|
90368
|
+
return ((_b = (_a = grid === null || grid === void 0 ? void 0 : grid.columns) === null || _a === void 0 ? void 0 : _a.width) === null || _b === void 0 ? void 0 : _b.map(unit_converter/* UnitConverter */.u.pixelsToTwips)) || [];
|
90335
90369
|
}
|
90336
90370
|
initNewTables(newIndexes, allowInitNextTable) {
|
90337
90371
|
for (let levelIndex = this.tableIndexes.length; levelIndex < newIndexes.length; levelIndex++) {
|
@@ -90836,11 +90870,12 @@ class IdGenerator {
|
|
90836
90870
|
|
90837
90871
|
|
90838
90872
|
class data_Data {
|
90839
|
-
constructor(
|
90873
|
+
constructor(exportModelOptions, options) {
|
90840
90874
|
this.drawingElementId = 1;
|
90841
90875
|
this.exportSubDocumentsList = [];
|
90842
90876
|
this.relationExporters = [];
|
90843
|
-
this.model = model;
|
90877
|
+
this.model = exportModelOptions.modelManager.model;
|
90878
|
+
this.grids = exportModelOptions.grids;
|
90844
90879
|
this.options = options;
|
90845
90880
|
this.constants = new DocxConstants();
|
90846
90881
|
this.writerStack = new stack/* Stack */.K();
|
@@ -91629,10 +91664,10 @@ class EndNoteExporter extends NoteExporter {
|
|
91629
91664
|
|
91630
91665
|
|
91631
91666
|
class DocxExporter {
|
91632
|
-
constructor(
|
91633
|
-
this.modelManipulator = modelManipulator;
|
91667
|
+
constructor(exportModelOptions, options) {
|
91668
|
+
this.modelManipulator = exportModelOptions.modelManager.modelManipulator;
|
91634
91669
|
this.options = options;
|
91635
|
-
this.data = new data_Data(
|
91670
|
+
this.data = new data_Data(exportModelOptions, options);
|
91636
91671
|
}
|
91637
91672
|
exportToBlob(callback) {
|
91638
91673
|
this.modelManipulator.picture.loader.ensureAllPicturesLoaded(this.options.ensurePictureLoadedTimeout, (_loaded) => {
|
@@ -91739,8 +91774,8 @@ function exportModelToBlob(exportModelOptions, callback) {
|
|
91739
91774
|
function getExporter(exportModelOptions) {
|
91740
91775
|
const { modelManipulator } = exportModelOptions.modelManager;
|
91741
91776
|
switch (exportModelOptions.documentFormat) {
|
91742
|
-
case DocumentFormat.OpenXml: return new DocxExporter(
|
91743
|
-
case DocumentFormat.Rtf: return new RtfExporter(
|
91777
|
+
case DocumentFormat.OpenXml: return new DocxExporter(exportModelOptions, new DocxExportOptions());
|
91778
|
+
case DocumentFormat.Rtf: return new RtfExporter(exportModelOptions, new RtfDocumentExporterOptions());
|
91744
91779
|
case DocumentFormat.PlainText: return new TxtExporter(modelManipulator, new DocumentExporterOptions());
|
91745
91780
|
case DocumentFormat.Html: return new HtmlDocumentExporter(exportModelOptions, new DocumentExporterOptions());
|
91746
91781
|
default:
|
@@ -92251,7 +92286,7 @@ class AnchorObjectHorizontalPositionCalculator extends AnchorObjectPositionCalcu
|
|
92251
92286
|
alignment(type, alignment) {
|
92252
92287
|
switch (type) {
|
92253
92288
|
case AnchorObjectHorizontalPositionType.Character:
|
92254
|
-
return this.getAlignPosition(alignment, 0);
|
92289
|
+
return this.getAnchorXPosition() + this.getAlignPosition(alignment, 0);
|
92255
92290
|
case AnchorObjectHorizontalPositionType.Column:
|
92256
92291
|
return this.isRelativeCell ?
|
92257
92292
|
this.relativeColumnPos() + this.lp.row.tableCellInfo.x +
|
@@ -92300,17 +92335,8 @@ class AnchorObjectHorizontalPositionCalculator extends AnchorObjectPositionCalcu
|
|
92300
92335
|
return this.isRelativeCell ? this.relativeColumnPos() + this.lp.row.tableCellInfo.x : 0;
|
92301
92336
|
case AnchorObjectHorizontalPositionType.Column:
|
92302
92337
|
return this.isRelativeCell ? this.relativeColumnPos() + this.lp.row.tableCellInfo.x + this.leftCellMargin : this.relativeColumnPos();
|
92303
|
-
case AnchorObjectHorizontalPositionType.Character:
|
92304
|
-
|
92305
|
-
const ancBoxAbsPos = this.obj.rowOffset;
|
92306
|
-
const boxIndex = search.SearchUtils.normedInterpolationIndexOf(this.lp.row.boxes, (box) => rowAbsPos + box.rowOffset, ancBoxAbsPos);
|
92307
|
-
const box = this.lp.row.boxes[boxIndex];
|
92308
|
-
if (!box)
|
92309
|
-
return this.lp.getLayoutX(null, DocumentLayoutDetailsLevel.Row);
|
92310
|
-
const symbolCount = Math.max(0, ancBoxAbsPos - rowAbsPos - box.rowOffset);
|
92311
|
-
return this.lp.getLayoutX(null, DocumentLayoutDetailsLevel.Row) + box.x +
|
92312
|
-
box.getCharOffsetXInPixels(this.manager.measurer, symbolCount);
|
92313
|
-
}
|
92338
|
+
case AnchorObjectHorizontalPositionType.Character:
|
92339
|
+
return this.getAnchorXPosition();
|
92314
92340
|
case AnchorObjectHorizontalPositionType.Margin:
|
92315
92341
|
return this.isRelativeCell ? this.relativeColumnPos() + this.lp.row.tableCellInfo.x + this.leftCellMargin :
|
92316
92342
|
this.manager.boundsCalculator.marginLeft;
|
@@ -92327,6 +92353,19 @@ class AnchorObjectHorizontalPositionCalculator extends AnchorObjectPositionCalcu
|
|
92327
92353
|
throw new Error(errors/* Errors */.D.InternalException);
|
92328
92354
|
}
|
92329
92355
|
}
|
92356
|
+
getAnchorXPosition() {
|
92357
|
+
const rowAbsPos = this.lp.getLogPosition(DocumentLayoutDetailsLevel.Row);
|
92358
|
+
const ancBoxAbsPos = this.obj.rowOffset;
|
92359
|
+
let boxIndex = search.SearchUtils.normedInterpolationIndexOf(this.lp.row.boxes, (box) => rowAbsPos + box.rowOffset, ancBoxAbsPos);
|
92360
|
+
if (boxIndex < 0)
|
92361
|
+
boxIndex = 0;
|
92362
|
+
const box = this.lp.row.boxes[boxIndex];
|
92363
|
+
if (!box)
|
92364
|
+
return this.lp.getLayoutX(null, DocumentLayoutDetailsLevel.Row);
|
92365
|
+
const symbolCount = Math.max(0, ancBoxAbsPos - rowAbsPos - box.rowOffset);
|
92366
|
+
return this.lp.getLayoutX(null, DocumentLayoutDetailsLevel.Row) + box.x +
|
92367
|
+
box.getCharOffsetXInPixels(this.manager.measurer, symbolCount);
|
92368
|
+
}
|
92330
92369
|
bookLayout() {
|
92331
92370
|
return this.alignment(this.anchorInfo.horizontalPositionType, AnchorObjectHorizontalPositionCalculator.mapBookLayoutALignmentType[this.anchorInfo.horizontalPositionAlignment]);
|
92332
92371
|
}
|
@@ -92557,6 +92596,12 @@ class LayoutPageArea extends rectangle.Rectangle {
|
|
92557
92596
|
this.columns = [];
|
92558
92597
|
this.subDocument = subDocument;
|
92559
92598
|
}
|
92599
|
+
get grids() {
|
92600
|
+
return this.columns.reduce((res, column) => {
|
92601
|
+
column.tablesInfo.forEach(tableInfo => res.set(tableInfo.logicInfo.grid.table, tableInfo.logicInfo.grid));
|
92602
|
+
return res;
|
92603
|
+
}, new Map());
|
92604
|
+
}
|
92560
92605
|
getEndPosition() {
|
92561
92606
|
return this.pageOffset + utils_list.ListUtils.last(this.columns).getEndPosition();
|
92562
92607
|
}
|
@@ -92577,7 +92622,6 @@ class LayoutPageArea extends rectangle.Rectangle {
|
|
92577
92622
|
|
92578
92623
|
|
92579
92624
|
|
92580
|
-
|
92581
92625
|
var LayoutRowStateFlags;
|
92582
92626
|
(function (LayoutRowStateFlags) {
|
92583
92627
|
LayoutRowStateFlags[LayoutRowStateFlags["NormallyEnd"] = 0] = "NormallyEnd";
|
@@ -92704,7 +92748,7 @@ class layout_row_LayoutRow extends rectangle.Rectangle {
|
|
92704
92748
|
return lastBoxIndexWhatCanStrikeoutAndUnderline;
|
92705
92749
|
}
|
92706
92750
|
containsSpacesOnly() {
|
92707
|
-
return this.boxes.length > 0 && utils_list.ListUtils.allOf(this.boxes, val => val.isWhitespace()
|
92751
|
+
return this.boxes.length > 0 && utils_list.ListUtils.allOf(this.boxes, val => val.isWhitespace());
|
92708
92752
|
}
|
92709
92753
|
}
|
92710
92754
|
class LayoutRowWithIndex extends (/* unused pure expression or super */ null && (layout_row_LayoutRow)) {
|
@@ -94799,10 +94843,10 @@ class RowFormattingInfo {
|
|
94799
94843
|
const ind = utils_list.ListUtils.indexBy(this.intervals, (curr) => curr.start > pos || pos < curr.end, this.currIndex + 1);
|
94800
94844
|
return ind < 0 ? this.intervals.length - 1 : ind;
|
94801
94845
|
}
|
94802
|
-
calculate() {
|
94846
|
+
calculate(outerHorizontalRowContentBounds) {
|
94803
94847
|
this.setIntersectObjects();
|
94804
94848
|
this.busyIntervals = algorithms.IntervalAlgorithms.getMergedIntervals(utils_list.ListUtils.map(this.intersectsObjects, (objBnds) => new fixed.FixedInterval(objBnds.x, objBnds.width)), true);
|
94805
|
-
const freeIntervals =
|
94849
|
+
const freeIntervals = this.calculateFreeIntervals(this.busyIntervals, outerHorizontalRowContentBounds !== null && outerHorizontalRowContentBounds !== void 0 ? outerHorizontalRowContentBounds : this.outerHorizontalRowContentBounds);
|
94806
94850
|
if (freeIntervals.length) {
|
94807
94851
|
this.intervals = utils_list.ListUtils.map(freeIntervals, (curr) => new RowIntervalInfo(curr.start, curr.length));
|
94808
94852
|
return;
|
@@ -94810,6 +94854,40 @@ class RowFormattingInfo {
|
|
94810
94854
|
this.resetMinY(utils_list.ListUtils.min);
|
94811
94855
|
Log.print(LogSource.RowFormatter, "RowFormattingInfo.calculate ", `minY:${this.minY}, height:${this.height}, currIndex: ${this.currIndex} intervals:\n${Log.join("\n", utils_list.ListUtils.map(this.intervals, (curr) => LogObjToStr.fixedInterval(curr)))}`);
|
94812
94856
|
}
|
94857
|
+
calculateFreeIntervals(busyIntervals, outerHorizontalRowContentBounds) {
|
94858
|
+
const intervals = utils_list.ListUtils.reducedMap(busyIntervals, val => algorithms.IntervalAlgorithms.getIntersectionNonNullLength(val, outerHorizontalRowContentBounds));
|
94859
|
+
if (!intervals.length)
|
94860
|
+
return [outerHorizontalRowContentBounds.clone()];
|
94861
|
+
const lastIntervalEnd = utils_list.ListUtils.last(intervals).end;
|
94862
|
+
const result = utils_list.ListUtils.reducedMap(intervals, (curr, i) => fixed.FixedInterval.fromPositions(busyIntervals[i - 1].end, curr.start), 1);
|
94863
|
+
if (outerHorizontalRowContentBounds.start < busyIntervals[0].start)
|
94864
|
+
result.unshift(fixed.FixedInterval.fromPositions(outerHorizontalRowContentBounds.start, busyIntervals[0].start));
|
94865
|
+
if (outerHorizontalRowContentBounds.end > lastIntervalEnd)
|
94866
|
+
result.push(fixed.FixedInterval.fromPositions(lastIntervalEnd, outerHorizontalRowContentBounds.end));
|
94867
|
+
return result;
|
94868
|
+
}
|
94869
|
+
recalculate(outerHorizontalRowContentBounds) {
|
94870
|
+
const currInterval = this.currInterval;
|
94871
|
+
this.calculate(outerHorizontalRowContentBounds);
|
94872
|
+
const pos = currInterval.start + currInterval.busyWidth;
|
94873
|
+
const index = this.findIntervalIndexByPosition(pos);
|
94874
|
+
const interval = this.intervals[index];
|
94875
|
+
if (interval && interval.start < pos) {
|
94876
|
+
const avaliableWidth = interval.length - (pos - interval.start);
|
94877
|
+
interval.avaliableWidth = avaliableWidth;
|
94878
|
+
}
|
94879
|
+
this.currIndex = index;
|
94880
|
+
}
|
94881
|
+
findIntervalIndexByPosition(position) {
|
94882
|
+
let index = 0;
|
94883
|
+
while (index < this.intervals.length) {
|
94884
|
+
const interval = this.intervals[index];
|
94885
|
+
if (interval.start <= position && position < interval.end || position < interval.start)
|
94886
|
+
break;
|
94887
|
+
index++;
|
94888
|
+
}
|
94889
|
+
return index;
|
94890
|
+
}
|
94813
94891
|
canIncrementHeightTo(newHeight) {
|
94814
94892
|
const contentBounds = utils_list.ListUtils.map(this.intervals, (c) => new rectangle.Rectangle(c.start, this.minY, c.busyWidth, newHeight));
|
94815
94893
|
const intersectedObjects = this.calcIntersectObjects(newHeight);
|
@@ -95400,8 +95478,6 @@ class RowBaseFormatterState {
|
|
95400
95478
|
this.rowFormatter.finishRow();
|
95401
95479
|
}
|
95402
95480
|
addAnchorObject() {
|
95403
|
-
if (!this.rowFormatter.wordHolder.pushBoxes())
|
95404
|
-
return;
|
95405
95481
|
this.rowFormatter.addAnchorObject();
|
95406
95482
|
}
|
95407
95483
|
addTextBox() {
|
@@ -95525,7 +95601,7 @@ class RowTabInfo {
|
|
95525
95601
|
const tab = this.tabPositions[ind];
|
95526
95602
|
const oldTabPos = tab ? tab.position : Number.MAX_VALUE;
|
95527
95603
|
if (oldTabPos != pos)
|
95528
|
-
this.tabPositions.splice(pos > oldTabPos ? ind + 1 : ind, 0, new TabInfo(pos, TabAlign.Left, TabLeaderType.None, false, false));
|
95604
|
+
this.tabPositions.splice(pos > oldTabPos ? ind + 1 : ind, 0, new TabInfo(pos, TabAlign.Left, TabLeaderType.None, false, false, true));
|
95529
95605
|
}
|
95530
95606
|
for (let pos of this.tabPositions)
|
95531
95607
|
pos.position += this.paragraphHorizontalBoundsStart;
|
@@ -95579,9 +95655,10 @@ class RowTabInfo {
|
|
95579
95655
|
const lastInterval = utils_list.ListUtils.last(this.rowFormatter.rowSizesManager.rowFormattingInfo.intervals);
|
95580
95656
|
if (tabXPosRelativePage > lastInterval.end) {
|
95581
95657
|
if (lastInterval.end < this.rowFormatter.paragraphHorizontalBounds.end) {
|
95582
|
-
if (this.rowFormatter.manager.model.compatibilitySettings.compatibilityMode < CompatibilityMode.Word2013 && tabPosition
|
95583
|
-
|
95584
|
-
|
95658
|
+
if (this.rowFormatter.manager.model.compatibilitySettings.compatibilityMode < CompatibilityMode.Word2013 && tabPosition && !tabPosition.isParagraphIndent) {
|
95659
|
+
const interval = this.rowFormatter.rowSizesManager.rowFormattingInfo.outerHorizontalRowContentBounds;
|
95660
|
+
interval.length = Number.MAX_SAFE_INTEGER - interval.start;
|
95661
|
+
this.rowFormatter.rowSizesManager.rowFormattingInfo.recalculate(interval);
|
95585
95662
|
this.row.width = Number.MAX_SAFE_INTEGER;
|
95586
95663
|
this.row.flags.set(LayoutRowStateFlags.InfinityWidth, true);
|
95587
95664
|
return this.addTabBox();
|
@@ -97943,25 +98020,9 @@ class table_info_TableInfo {
|
|
97943
98020
|
tableIndent.value = 0;
|
97944
98021
|
}
|
97945
98022
|
const tableIndentInPixels = tableIndent.asNumberNoPercentType(unit_converter/* UnitConverter */.u.twipsToPixels);
|
97946
|
-
this.xPositionStart = xPosition + tableIndentInPixels + (diff.xDiff ? diff.xDiff : -firstCellLeftMargin)
|
97947
|
-
this.getShiftHorizontalPosition(xPosition);
|
98023
|
+
this.xPositionStart = xPosition + tableIndentInPixels + (diff.xDiff ? diff.xDiff : -firstCellLeftMargin);
|
97948
98024
|
this.yPositionStart = yOffset + diff.yDiff;
|
97949
98025
|
}
|
97950
|
-
getShiftHorizontalPosition(xPosition) {
|
97951
|
-
const freeSpaceFromTable = this.columnWidth - this.grid.commonWidth;
|
97952
|
-
if (freeSpaceFromTable >= 0)
|
97953
|
-
return 0;
|
97954
|
-
const tableAlignment = this.table.getActualTableAlignment();
|
97955
|
-
if (tableAlignment == TableRowAlignment.Center) {
|
97956
|
-
let result = freeSpaceFromTable / 2 - xPosition;
|
97957
|
-
if (result < 0 && this.isSimpleView)
|
97958
|
-
result = 0;
|
97959
|
-
return result;
|
97960
|
-
}
|
97961
|
-
else if (tableAlignment == TableRowAlignment.Right)
|
97962
|
-
return freeSpaceFromTable - xPosition;
|
97963
|
-
return 0;
|
97964
|
-
}
|
97965
98026
|
static getEstimatedTableWidth(table, maxWidth) {
|
97966
98027
|
const preferredWidth = table.preferredWidth;
|
97967
98028
|
const minWidth = 3 * table.rows[0].getTotalCellsInRowConsiderGrid();
|
@@ -98044,6 +98105,12 @@ class LayoutTableSizeCompressor {
|
|
98044
98105
|
LayoutTableSizeCompressor.cellCompress(cell, cell.createRectangle());
|
98045
98106
|
}
|
98046
98107
|
static tableCompress(tableInfo, boundsRelativeColumn) {
|
98108
|
+
const intersection = rectangle.Rectangle.getIntersection(tableInfo, boundsRelativeColumn);
|
98109
|
+
const headOffset = intersection.x - tableInfo.x;
|
98110
|
+
if (headOffset > 0) {
|
98111
|
+
tableInfo.verticalBorders.forEach(b => b.xPos -= headOffset);
|
98112
|
+
tableInfo.verticalCursorBorders.forEach(b => b.xPos -= headOffset);
|
98113
|
+
}
|
98047
98114
|
LayoutTableSizeCompressor.compress(tableInfo, boundsRelativeColumn, true, false);
|
98048
98115
|
const boundsRelativeTable = tableInfo.clone().moveRectangle(-tableInfo.x, -tableInfo.y);
|
98049
98116
|
for (let row of tableInfo.tableRows)
|
@@ -98112,8 +98179,9 @@ class LayoutTableSizeCompressor {
|
|
98112
98179
|
}
|
98113
98180
|
border.length = Math.min(border.yPos + border.length, bounds.bottom) - border.yPos;
|
98114
98181
|
if (border.xPos < bounds.x)
|
98115
|
-
|
98116
|
-
|
98182
|
+
border.xPos = bounds.x;
|
98183
|
+
else
|
98184
|
+
border.xPos = bounds.right;
|
98117
98185
|
border.borderInfo.width = 0;
|
98118
98186
|
return false;
|
98119
98187
|
}
|
@@ -113285,13 +113353,9 @@ class RulerControl extends RulerBase {
|
|
113285
113353
|
}
|
113286
113354
|
adjust() {
|
113287
113355
|
const viewWidth = this.controls.canvas.clientWidth;
|
113288
|
-
|
113289
|
-
|
113290
|
-
|
113291
|
-
const paddingLeft = dom.DomUtils.pxToInt(dom.DomUtils.getCurrentStyle(this.controls.canvas).paddingLeft);
|
113292
|
-
const pageAreaBorderWidth = (this.controls.canvas.scrollWidth - paddingLeft - this.pageWidth) / 2;
|
113293
|
-
this.initialMarginLeftElement = paddingLeft + pageAreaBorderWidth - RULLER_NUMBER_CORRECTION;
|
113294
|
-
}
|
113356
|
+
const paddingLeft = dom.DomUtils.pxToInt(dom.DomUtils.getCurrentStyle(this.controls.canvas).paddingLeft);
|
113357
|
+
const minValue = paddingLeft - RULLER_NUMBER_CORRECTION;
|
113358
|
+
this.initialMarginLeftElement = Math.max((viewWidth - this.pageWidth - RULLER_NUMBER_CORRECTION * 2) / 2, minValue);
|
113295
113359
|
this.rootElement.style.left = this.calculateLeftOffset();
|
113296
113360
|
this.setPaddings();
|
113297
113361
|
this.canHandleScroll = this.controls.canvas.scrollWidth > this.controls.canvas.offsetWidth;
|
@@ -115559,6 +115623,7 @@ class RichEditCore {
|
|
115559
115623
|
pictureRenderer: this.viewManager.renderer,
|
115560
115624
|
uiUnitConverter: this.uiUnitConverter,
|
115561
115625
|
lastMaxNumPages: this.layout.lastMaxNumPages,
|
115626
|
+
grids: this.layout.grids,
|
115562
115627
|
pageIndex: this.selection.pageIndex,
|
115563
115628
|
sessionGuid: this.sessionGuid,
|
115564
115629
|
clientGuid: this.clientGuid,
|
@@ -122303,6 +122368,7 @@ function createInnerItems(items) {
|
|
122303
122368
|
}
|
122304
122369
|
|
122305
122370
|
;// CONCATENATED MODULE: ./src/client/utils/focus-helper.ts
|
122371
|
+
var focus_helper_a;
|
122306
122372
|
class FocusHelper {
|
122307
122373
|
static preventFocusOnClick(element) {
|
122308
122374
|
return new FocusBlocker(element);
|
@@ -122315,23 +122381,24 @@ class FocusBlocker {
|
|
122315
122381
|
this.addEventListeners(target);
|
122316
122382
|
}
|
122317
122383
|
addEventListeners(element) {
|
122318
|
-
element.addEventListener("
|
122384
|
+
element.addEventListener("mousedown", this.onPointerDownBinded);
|
122319
122385
|
}
|
122320
122386
|
removeEventListeners(element) {
|
122321
|
-
element.removeEventListener("
|
122387
|
+
element.removeEventListener("mousedown", this.onPointerDownBinded);
|
122322
122388
|
}
|
122323
122389
|
onPointerDown(event) {
|
122324
122390
|
for (const element of event.composedPath()) {
|
122325
|
-
if (!(element instanceof HTMLElement))
|
122326
|
-
continue;
|
122327
122391
|
if (element === this.target) {
|
122328
122392
|
event.preventDefault();
|
122329
122393
|
break;
|
122330
122394
|
}
|
122331
|
-
if (
|
122395
|
+
if (element instanceof Element && this.isFocusableElement(element))
|
122332
122396
|
break;
|
122333
122397
|
}
|
122334
122398
|
}
|
122399
|
+
isFocusableElement(element) {
|
122400
|
+
return element.matches(FocusBlocker.focusableSelector);
|
122401
|
+
}
|
122335
122402
|
dispose() {
|
122336
122403
|
if (this.target) {
|
122337
122404
|
this.removeEventListeners(this.target);
|
@@ -122339,6 +122406,21 @@ class FocusBlocker {
|
|
122339
122406
|
}
|
122340
122407
|
}
|
122341
122408
|
}
|
122409
|
+
focus_helper_a = FocusBlocker;
|
122410
|
+
FocusBlocker.focusableSelectors = [
|
122411
|
+
'a[href]',
|
122412
|
+
'area[href]',
|
122413
|
+
'input',
|
122414
|
+
'select',
|
122415
|
+
'textarea',
|
122416
|
+
'button',
|
122417
|
+
'iframe',
|
122418
|
+
'object',
|
122419
|
+
'embed',
|
122420
|
+
'[tabindex]:not([tabindex="-1"])',
|
122421
|
+
'[contenteditable]:not([contenteditable="false"])'
|
122422
|
+
];
|
122423
|
+
FocusBlocker.focusableSelector = focus_helper_a.focusableSelectors.join(',');
|
122342
122424
|
|
122343
122425
|
;// CONCATENATED MODULE: ./src/client/bars/ribbon.ts
|
122344
122426
|
|
@@ -129396,7 +129478,7 @@ class ApplyStyleCommand extends CommandBase {
|
|
129396
129478
|
paragraphStyle = StylesManager.getPresetParagraphStyleByName(styleName).clone();
|
129397
129479
|
isPresetStyle = true;
|
129398
129480
|
}
|
129399
|
-
this.applyParagraphStyle(subDocumentInterval, paragraphStyle, isPresetStyle, parameter.
|
129481
|
+
this.applyParagraphStyle(subDocumentInterval, paragraphStyle, isPresetStyle, parameter.keepCustomFormatting);
|
129400
129482
|
}
|
129401
129483
|
else if (!StylesManager.isParagraphStyle(parameter.styleName) && state.characterStyleChangeEnabled) {
|
129402
129484
|
const styleName = StylesManager.getStyleNameWithoutPrefix(parameter.styleName);
|
@@ -129431,7 +129513,7 @@ class ApplyStyleCommand extends CommandBase {
|
|
129431
129513
|
this.modelManipulator.style.applyCharacterStyle(subDocumentInterval, characterStyle, false);
|
129432
129514
|
}
|
129433
129515
|
}
|
129434
|
-
applyParagraphStyle(subDocumentInterval, style, isPresetStyle,
|
129516
|
+
applyParagraphStyle(subDocumentInterval, style, isPresetStyle, keepCustomFormatting = false) {
|
129435
129517
|
const count = this.calculateAffectedParagraphCount(subDocumentInterval);
|
129436
129518
|
if (count > 0 && ControlOptions.isEnabled(this.control.modelManager.richOptions.control.paragraphStyle)) {
|
129437
129519
|
const { interval, subDocument } = subDocumentInterval;
|
@@ -129444,8 +129526,7 @@ class ApplyStyleCommand extends CommandBase {
|
|
129444
129526
|
style = isPresetStyle ? modelManipulator.model.stylesManager.addParagraphStyle(style) : style;
|
129445
129527
|
this.history.addAndRedo(new ApplyParagraphStyleHistoryItem(modelManipulator, paragraphSubDocumentInterval, style));
|
129446
129528
|
this.history.addAndRedo(new ParagraphUseValueHistoryItem(modelManipulator, paragraphSubDocumentInterval, 0));
|
129447
|
-
|
129448
|
-
this.history.addAndRedo(new FontUseValueHistoryItem(modelManipulator, paragraphSubDocumentInterval, 0));
|
129529
|
+
this.history.addAndRedo(new FontUseValueHistoryItem(modelManipulator, paragraphSubDocumentInterval, 0, keepCustomFormatting));
|
129449
129530
|
this.history.addAndRedo(new AddParagraphToListHistoryItem(modelManipulator, subDocument, paragraphIndex, NumberingList.NumberingListNotSettedIndex, -1));
|
129450
129531
|
}
|
129451
129532
|
}
|
@@ -135980,7 +136061,7 @@ class SetParagraphLevelCommandBase extends CommandBase {
|
|
135980
136061
|
if (!paragraphStyle)
|
135981
136062
|
paragraphStyle = StylesManager.getPresetParagraphStyleByName(styleName);
|
135982
136063
|
if (paragraphStyle) {
|
135983
|
-
const commandOptions = new CommandSimpleOptions(this.control, { styleName: StylesManager.paragraphPrefix + styleName,
|
136064
|
+
const commandOptions = new CommandSimpleOptions(this.control, { styleName: StylesManager.paragraphPrefix + styleName, keepCustomFormatting: true });
|
135984
136065
|
this.commandManager.getCommand(RichEditClientCommand.ChangeStyle).execute(this.commandManager.isPublicApiCall, commandOptions);
|
135985
136066
|
}
|
135986
136067
|
else {
|
@@ -136904,7 +136985,8 @@ class MailMergeCommand extends CommandBase {
|
|
136904
136985
|
return true;
|
136905
136986
|
}
|
136906
136987
|
executeCore(_state, options) {
|
136907
|
-
const
|
136988
|
+
const exportModelOptions = this.control.getExportModelOptions();
|
136989
|
+
const docxExporter = new DocxExporter(exportModelOptions, new DocxExportOptions());
|
136908
136990
|
docxExporter.exportToBlob((blob) => {
|
136909
136991
|
const docxImporter = new Importer(new ImporterOptions());
|
136910
136992
|
docxImporter.importFromFile(blob, this.control.modelManager.richOptions, (documentModel, formatImagesImporter) => {
|
@@ -141673,7 +141755,7 @@ class ClientRichEdit {
|
|
141673
141755
|
this.contextMenuSettings = settings.contextMenuSettings;
|
141674
141756
|
this.fullScreenHelper = new FullScreenHelper(element);
|
141675
141757
|
if (true)
|
141676
|
-
external_DevExpress_config_default()(JSON.parse(atob('
|
141758
|
+
external_DevExpress_config_default()(JSON.parse(atob('eyJsaWNlbnNlS2V5IjoiZXdvZ0lDSm1iM0p0WVhRaU9pQXhMQW9nSUNKcGJuUmxjbTVoYkZWellXZGxTV1FpT2lBaVREZzBkbWxZYUZOS1MyWnRRams0U0VOTVkxTTRNaUlLZlE9PS53SkN1UVJhY3dIaU9DMEdWZFBPVlNacDJsRThrcTdTbUZTTWpIMXgvamxEMnowbzQvYWFkVm9zK1g2ZzlwSDZaYjdUUXdOdlZvQkduRUNwblB2M0ZaOUV4eWlkK3pybUxITE8yZnIyVzFTOEJOWE1YaE1mSlNPdjJ3aCs5SDBSd2lMejJxUT09In0=')));
|
141677
141759
|
this.prepareElement(element, settings);
|
141678
141760
|
this.initDefaultFontsAndStyles();
|
141679
141761
|
this.initBars(settings.ribbon, settings.fonts);
|