devexpress-richedit 24.1.1-alpha-24085-0102 → 24.1.3
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 +3 -1
- package/bin/webpack.config.js +1 -1
- package/dist/dx.richedit.css +1 -0
- package/dist/dx.richedit.d.ts +17 -10
- package/dist/dx.richedit.js +53229 -51846
- package/dist/dx.richedit.min.js +2 -2
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/lib/client/bars/ribbon.js +2 -1
- package/lib/client/bars/rich-edit-ribbon/ribbon-items-data.js +2 -1
- package/lib/client/client-rich-edit.js +4 -3
- package/lib/client/commands/client-command-manager.js +2 -1
- package/lib/client/commands/commands.js +3 -0
- package/lib/client/commands/download-document-command.d.ts +3 -0
- package/lib/client/commands/download-document-command.js +13 -2
- package/lib/client/commands/export-document-command.js +4 -4
- package/lib/client/commands/mail-merge-command.js +7 -4
- package/lib/client/commands/open-document-command.d.ts +2 -1
- package/lib/client/commands/open-document-command.js +17 -12
- package/lib/client/default-localization.js +2 -1
- package/lib/client/dialogs/finish-and-merge-dialog.js +1 -0
- package/lib/client/document-processor/processor.d.ts +9 -2
- package/lib/client/document-processor/processor.js +18 -6
- package/lib/client/formats/docx/export/data.d.ts +4 -0
- package/lib/client/formats/docx/export/data.js +12 -0
- package/lib/client/formats/docx/export/exporter.d.ts +2 -0
- package/lib/client/formats/docx/export/exporter.js +15 -0
- package/lib/client/formats/docx/export/exporters/base/sections.js +5 -0
- package/lib/client/formats/docx/export/exporters/note-properties.d.ts +18 -0
- package/lib/client/formats/docx/export/exporters/note-properties.js +83 -0
- package/lib/client/formats/docx/export/exporters/settings.d.ts +2 -0
- package/lib/client/formats/docx/export/exporters/settings.js +11 -0
- package/lib/client/formats/docx/export/exporters/sub-document/base-sub-document.d.ts +15 -1
- package/lib/client/formats/docx/export/exporters/sub-document/base-sub-document.js +85 -3
- package/lib/client/formats/docx/export/exporters/sub-document/header-footer-sub-document-exporter.d.ts +2 -2
- package/lib/client/formats/docx/export/exporters/sub-document/header-footer-sub-document-exporter.js +2 -2
- package/lib/client/formats/docx/export/exporters/sub-document/main-sub-document.d.ts +2 -2
- package/lib/client/formats/docx/export/exporters/sub-document/main-sub-document.js +2 -2
- package/lib/client/formats/docx/export/exporters/sub-document/note-sub-document-exporter.d.ts +37 -0
- package/lib/client/formats/docx/export/exporters/sub-document/note-sub-document-exporter.js +71 -0
- package/lib/client/formats/docx/export/exporters/sub-document/text-box-content-exporter.d.ts +2 -2
- package/lib/client/formats/docx/export/exporters/sub-document/text-box-content-exporter.js +2 -2
- package/lib/client/formats/docx/import/destination/notes/endnotes/endnote-properties-destination.d.ts +16 -0
- package/lib/client/formats/docx/import/destination/notes/endnotes/endnote-properties-destination.js +48 -0
- package/lib/client/formats/docx/import/destination/notes/endnotes/endnote-reference-destination.d.ts +5 -0
- package/lib/client/formats/docx/import/destination/notes/endnotes/endnote-reference-destination.js +9 -0
- package/lib/client/formats/docx/import/destination/notes/endnotes/endnotes-destination.d.ts +5 -0
- package/lib/client/formats/docx/import/destination/notes/endnotes/endnotes-destination.js +39 -0
- package/lib/client/formats/docx/import/destination/notes/footnotes/footnote-properties-destination.d.ts +18 -0
- package/lib/client/formats/docx/import/destination/notes/footnotes/footnote-properties-destination.js +49 -0
- package/lib/client/formats/docx/import/destination/notes/footnotes/footnote-reference-destination.d.ts +5 -0
- package/lib/client/formats/docx/import/destination/notes/footnotes/footnote-reference-destination.js +9 -0
- package/lib/client/formats/docx/import/destination/notes/footnotes/footnotes-destination.d.ts +5 -0
- package/lib/client/formats/docx/import/destination/notes/footnotes/footnotes-destination.js +39 -0
- package/lib/client/formats/docx/import/destination/notes/note-destination.d.ts +18 -0
- package/lib/client/formats/docx/import/destination/notes/note-destination.js +45 -0
- package/lib/client/formats/docx/import/destination/notes/note-properties-destination.d.ts +32 -0
- package/lib/client/formats/docx/import/destination/notes/note-properties-destination.js +81 -0
- package/lib/client/formats/docx/import/destination/notes/note-reference-destination.d.ts +8 -0
- package/lib/client/formats/docx/import/destination/notes/note-reference-destination.js +21 -0
- package/lib/client/formats/docx/import/destination/notes/note-self-reference-destination.d.ts +5 -0
- package/lib/client/formats/docx/import/destination/notes/note-self-reference-destination.js +12 -0
- package/lib/client/formats/docx/import/destination/notes/note-separator-destination.d.ts +8 -0
- package/lib/client/formats/docx/import/destination/notes/note-separator-destination.js +20 -0
- package/lib/client/formats/docx/import/destination/paragraph-properties/paragraph-numbering-reference-destination.js +1 -1
- package/lib/client/formats/docx/import/destination/runs/run-destination.js +11 -5
- package/lib/client/formats/docx/import/destination/section/section-destination.js +5 -2
- package/lib/client/formats/docx/import/destination/settings/settings.js +4 -0
- package/lib/client/formats/docx/import/importer.d.ts +2 -0
- package/lib/client/formats/docx/import/importer.js +26 -0
- package/lib/client/formats/docx/import/importers/character-importer.d.ts +3 -0
- package/lib/client/formats/docx/import/importers/character-importer.js +12 -1
- package/lib/client/formats/docx/import/importers/end-notes-importer.d.ts +3 -4
- package/lib/client/formats/docx/import/importers/end-notes-importer.js +8 -3
- package/lib/client/formats/docx/import/importers/foot-notes-importer.d.ts +3 -5
- package/lib/client/formats/docx/import/importers/foot-notes-importer.js +8 -5
- package/lib/client/formats/docx/import/importers/notes-importer.d.ts +8 -0
- package/lib/client/formats/docx/import/importers/notes-importer.js +7 -0
- package/lib/client/formats/docx/translation-table/translation-tables.d.ts +7 -0
- package/lib/client/formats/docx/translation-table/translation-tables.js +27 -0
- package/lib/client/formats/docx/utils/constants.d.ts +2 -0
- package/lib/client/formats/docx/utils/constants.js +2 -0
- package/lib/client/model-api/formats/enum.d.ts +1 -0
- package/lib/client/model-api/formats/enum.js +1 -0
- package/lib/client/model-api/formats/exporter.d.ts +3 -4
- package/lib/client/model-api/formats/exporter.js +9 -6
- package/lib/client/model-api/formats/importer.js +2 -0
- package/lib/client/model-api/sub-document.d.ts +6 -2
- package/lib/client/model-api/sub-document.js +37 -35
- package/lib/client/model-api/table/table-borders.d.ts +1 -1
- package/lib/client/public/commands/enum.d.ts +1 -0
- package/lib/client/public/commands/enum.js +1 -0
- package/lib/client/public/document-processor.d.ts +3 -1
- package/lib/client/public/document-processor.js +2 -2
- package/lib/client/public/ribbon/creator.js +1 -0
- package/lib/client/public/ribbon/item-ids.d.ts +1 -0
- package/lib/client/public/ribbon/item-ids.js +1 -0
- package/lib/client/public/ribbon/items/select-box.d.ts +2 -0
- package/lib/client/public/ribbon/items/select-box.js +7 -0
- package/lib/client/public/rich-edit.d.ts +2 -1
- package/lib/client/public/rich-edit.js +16 -9
- package/lib/client/public/utils.d.ts +4 -0
- package/lib/client/public/utils.js +15 -0
- package/lib/client/ribbon/i-toolbar-item-options.d.ts +1 -0
- package/lib/common/canvas/canvas-manager.js +1 -0
- package/lib/common/canvas/picture-renderer.d.ts +1 -1
- package/lib/common/canvas/renderes/common/document-renderer.d.ts +1 -1
- package/lib/common/canvas/renderes/common/document-renderer.js +6 -2
- package/lib/common/canvas/renderes/view-manager.js +3 -1
- package/lib/common/clipboard-content-inserter.js +2 -1
- package/lib/common/commands/client-command.d.ts +3 -1
- package/lib/common/commands/client-command.js +2 -0
- package/lib/common/commands/document/print-document-on-client-command.js +1 -1
- package/lib/common/commands/text/clipboard-commands.js +7 -5
- package/lib/common/document-format.d.ts +2 -0
- package/lib/common/document-format.js +2 -0
- package/lib/common/formats/document-importer-errors.d.ts +3 -1
- package/lib/common/formats/document-importer-errors.js +2 -0
- package/lib/common/formats/file-name-helper.d.ts +1 -0
- package/lib/common/formats/file-name-helper.js +7 -1
- package/lib/common/formats/html/export/get-html.d.ts +4 -0
- package/lib/common/formats/html/export/get-html.js +12 -0
- package/lib/common/formats/html/export/html-builder.d.ts +16 -0
- package/lib/common/formats/html/export/html-builder.js +102 -0
- package/lib/common/formats/html/export/html-document-exporter.d.ts +13 -0
- package/lib/common/formats/html/export/html-document-exporter.js +29 -0
- package/lib/common/formats/html/export/html-export.d.ts +37 -0
- package/lib/common/{html-export.js → formats/html/export/html-export.js} +226 -289
- package/lib/common/formats/html/import/html-document-importer.d.ts +15 -0
- package/lib/common/formats/html/import/html-document-importer.js +84 -0
- package/lib/common/formats/html/import/html-importer.d.ts +1 -0
- package/lib/common/formats/html/import/html-importer.js +34 -9
- package/lib/common/formats/html/import/insert-html.d.ts +4 -0
- package/lib/common/formats/html/import/insert-html.js +5 -0
- package/lib/common/formats/html/import/utils/paragraph-properties-utils.d.ts +1 -0
- package/lib/common/formats/html/import/utils/paragraph-properties-utils.js +17 -4
- package/lib/common/formats/i-document-exporter.d.ts +14 -0
- package/lib/common/formats/rtf/export/exporter.d.ts +1 -1
- package/lib/common/formats/rtf/export/exporter.js +1 -1
- package/lib/common/formats/rtf/importer-in-subdocument.d.ts +1 -1
- package/lib/common/formats/rtf/importer-in-subdocument.js +1 -1
- package/lib/common/formats/txt/txt-exporter.js +2 -1
- package/lib/common/input-controller.d.ts +2 -1
- package/lib/common/input-controller.js +5 -2
- package/lib/common/interfaces/i-rich-edit-core.d.ts +2 -0
- package/lib/common/layout/main-structures/layout-boxes/layout-anchored-picture-box.d.ts +2 -1
- package/lib/common/layout/main-structures/layout-boxes/layout-anchored-picture-box.js +4 -3
- package/lib/common/layout/main-structures/layout-boxes/layout-picture-box.d.ts +2 -1
- package/lib/common/layout/main-structures/layout-boxes/layout-picture-box.js +5 -4
- package/lib/common/layout/main-structures/layout-page.d.ts +1 -0
- package/lib/common/layout/main-structures/layout-page.js +5 -2
- package/lib/common/layout-formatter/box/generator/box-infos-generator.d.ts +1 -0
- package/lib/common/layout-formatter/box/generator/box-infos-generator.js +12 -2
- package/lib/common/layout-formatter/floating/page-anchored-object-holder.d.ts +5 -3
- package/lib/common/layout-formatter/floating/page-anchored-object-holder.js +7 -4
- package/lib/common/layout-formatter/formatter/base-formatter.js +0 -1
- package/lib/common/layout-formatter/formatter/main-formatter.js +1 -0
- package/lib/common/layout-formatter/managers/formatter-manager.d.ts +6 -2
- package/lib/common/layout-formatter/managers/formatter-manager.js +3 -1
- package/lib/common/layout-formatter/row/size-engine/row-sizes-manager.js +20 -4
- package/lib/common/measurer/measurer.js +2 -1
- package/lib/common/model/chunk.d.ts +1 -0
- package/lib/common/model/chunk.js +27 -2
- package/lib/common/model/document-model.d.ts +4 -0
- package/lib/common/model/document-model.js +4 -1
- package/lib/common/model/enums.d.ts +3 -1
- package/lib/common/model/enums.js +2 -0
- package/lib/common/model/footnotes/footnote.d.ts +46 -0
- package/lib/common/model/footnotes/footnote.js +100 -0
- package/lib/common/model/json/importers/sub-document/json-sub-document-importer.js +3 -3
- package/lib/common/model/json/importers/sub-document/run-importers.d.ts +6 -0
- package/lib/common/model/json/importers/sub-document/run-importers.js +9 -0
- package/lib/common/model/model-checks/position.d.ts +2 -1
- package/lib/common/model/model-checks/position.js +11 -2
- package/lib/common/model/numbering-lists/numbering-helper.d.ts +2 -1
- package/lib/common/model/numbering-lists/numbering-helper.js +3 -0
- package/lib/common/model/paragraph/paragraph-style.d.ts +1 -0
- package/lib/common/model/paragraph/paragraph-style.js +6 -2
- package/lib/common/model/properties-merger/paragraph-properties-merger.js +1 -1
- package/lib/common/model/runs/run-base.d.ts +1 -0
- package/lib/common/model/runs/simple-runs.d.ts +8 -2
- package/lib/common/model/runs/simple-runs.js +12 -6
- package/lib/common/model/section/section-properties.d.ts +3 -0
- package/lib/common/model/special-characters.d.ts +3 -0
- package/lib/common/model/special-characters.js +3 -0
- package/lib/common/model/sub-document-infos.d.ts +18 -0
- package/lib/common/model/sub-document-infos.js +39 -0
- package/lib/common/model/sub-document.d.ts +2 -0
- package/lib/common/model/sub-document.js +18 -16
- package/lib/common/mouse-handler/touch-handler/touch-handler-state-base.d.ts +1 -0
- package/lib/common/mouse-handler/touch-handler/touch-handler-state-base.js +21 -13
- package/lib/common/processor.d.ts +2 -0
- package/lib/common/rich-edit-core.d.ts +6 -2
- package/lib/common/rich-edit-core.js +20 -1
- package/lib/common/selection/selection-intervals-info.js +1 -1
- package/lib/common/ui/ruler/controls/divisions.js +2 -1
- package/lib/common/ui/ruler/controls/indent/first-line.js +4 -3
- package/lib/common/ui/ruler/controls/indent/left.js +5 -4
- package/lib/common/ui/ruler/ruler.js +2 -1
- package/lib/common/utils/_license.d.ts +1 -0
- package/lib/common/utils/_license.js +2 -0
- package/lib/common/utils/size-utils.d.ts +3 -0
- package/lib/common/utils/size-utils.js +17 -4
- package/package.json +4 -4
- package/lib/common/html-export.d.ts +0 -32
@@ -222,7 +222,6 @@ export class BaseFormatter {
|
|
222
222
|
if (row.tableCellInfo)
|
223
223
|
row.indexInColumn = index;
|
224
224
|
});
|
225
|
-
this.layoutPosition.page.anchoredObjectHolder.onColumnEnd(this);
|
226
225
|
const lastRow = createdColumn.getLastRow();
|
227
226
|
lastRow.flags.set(LayoutRowStateFlags.ColumnEnd, true);
|
228
227
|
if (this.manager.innerClientProperties.viewsSettings.isSimpleView) {
|
@@ -157,6 +157,7 @@ export class MainFormatter extends BaseFormatter {
|
|
157
157
|
const layout = this.manager.layout;
|
158
158
|
Log.print(LogSource.LayoutFormatter, "processStatePageEnd", () => `SubDocId: ${this.subDocument.id}, LayPos: ${LogObjToStrLayout.layoutPositionShort(this.layoutPosition)}`);
|
159
159
|
const createdPage = this.layoutPosition.page;
|
160
|
+
createdPage.anchoredObjectHolder.removeOrphanedObjects(this);
|
160
161
|
createdPage.isValid = true;
|
161
162
|
MainFormatter.correctPageOffsets(createdPage);
|
162
163
|
this.state = this.lastRowInfo.row.flags.get(LayoutRowStateFlags.DocumentEnd) ?
|
@@ -26,12 +26,16 @@ import { RestartManager } from './restart-manager';
|
|
26
26
|
export interface ILayoutFormatterManagerHolder {
|
27
27
|
layoutFormatterManager: FormatterManager;
|
28
28
|
}
|
29
|
+
export declare type BrowserUtils = {
|
30
|
+
MacOSPlatform: boolean;
|
31
|
+
};
|
29
32
|
export declare class FormatterManager extends BatchUpdatableObject {
|
30
33
|
private formatterProcessID;
|
31
34
|
private unhideProcessID;
|
32
35
|
private _isDocumentOpened;
|
33
36
|
private onLayoutChangedDispatcher;
|
34
37
|
private formatters;
|
38
|
+
private activeSubDocumentHolder;
|
35
39
|
innerClientProperties: InnerClientProperties;
|
36
40
|
model: DocumentModel;
|
37
41
|
layout: DocumentLayout;
|
@@ -51,11 +55,11 @@ export declare class FormatterManager extends BatchUpdatableObject {
|
|
51
55
|
mainFormatter: MainFormatter;
|
52
56
|
bookmarksSettings: BookmarksSettings;
|
53
57
|
documentProtectionSettings: DocumentProtectionSettings;
|
54
|
-
private activeSubDocumentHolder;
|
55
58
|
floatingRestartInfoHolder: FloatingRestartInfoHolder;
|
59
|
+
browserUtils: BrowserUtils;
|
56
60
|
get activeSubDocument(): SubDocument;
|
57
61
|
get isDocumentOpened(): boolean;
|
58
|
-
constructor(measurer: IMeasurer, innerClientProperties: InnerClientProperties, model: DocumentModel, layout: DocumentLayout, activeSubDocumentHolder: IActiveSubDocumentHolder, bookmarksSettings: BookmarksSettings, documentProtectionSettings: DocumentProtectionSettings, controlHeightProvider: IControlHeightProvider, stringResources: StringResources, layoutChangesListeners: ILayoutChangesListener[]);
|
62
|
+
constructor(measurer: IMeasurer, innerClientProperties: InnerClientProperties, model: DocumentModel, layout: DocumentLayout, activeSubDocumentHolder: IActiveSubDocumentHolder, bookmarksSettings: BookmarksSettings, documentProtectionSettings: DocumentProtectionSettings, controlHeightProvider: IControlHeightProvider, stringResources: StringResources, layoutChangesListeners: ILayoutChangesListener[], browserUtils?: BrowserUtils);
|
59
63
|
dispose(): void;
|
60
64
|
onUpdateUnlocked(_occurredEvents: number): void;
|
61
65
|
getLayoutFormatter(subDocumentId: number): BaseFormatter;
|
@@ -16,8 +16,9 @@ import { LayoutDependentRunCache } from '../formatter/utils/layout-dependent-cac
|
|
16
16
|
import { RemoveRedundantHelper } from '../formatter/utils/remove-redundant-helper';
|
17
17
|
import { LayoutInvalidator } from '../invalidator/layout-invalidator';
|
18
18
|
import { RestartManager } from './restart-manager';
|
19
|
+
import { Browser } from '@devexpress/utils/lib/browser';
|
19
20
|
export class FormatterManager extends BatchUpdatableObject {
|
20
|
-
constructor(measurer, innerClientProperties, model, layout, activeSubDocumentHolder, bookmarksSettings, documentProtectionSettings, controlHeightProvider, stringResources, layoutChangesListeners) {
|
21
|
+
constructor(measurer, innerClientProperties, model, layout, activeSubDocumentHolder, bookmarksSettings, documentProtectionSettings, controlHeightProvider, stringResources, layoutChangesListeners, browserUtils) {
|
21
22
|
super();
|
22
23
|
this.formatterProcessID = null;
|
23
24
|
this.unhideProcessID = null;
|
@@ -46,6 +47,7 @@ export class FormatterManager extends BatchUpdatableObject {
|
|
46
47
|
this.layoutDependentRunCache = new LayoutDependentRunCache(this);
|
47
48
|
this.restartManager = new RestartManager(this);
|
48
49
|
this.anchoredObjectsManager = new AnchoredObjectsManager(this);
|
50
|
+
this.browserUtils = browserUtils !== null && browserUtils !== void 0 ? browserUtils : { MacOSPlatform: Browser.MacOSPlatform };
|
49
51
|
}
|
50
52
|
get activeSubDocument() { return this.activeSubDocumentHolder.activeSubDocument; }
|
51
53
|
get isDocumentOpened() { return this._isDocumentOpened; }
|
@@ -9,6 +9,9 @@ import { ParagraphFirstLineIndent } from '../../../model/paragraph/paragraph-pro
|
|
9
9
|
import { BoxWrap } from '../../box/box-wrap';
|
10
10
|
import { RowFormattingInfo } from './row-formatting-info';
|
11
11
|
import { RowHeightCalculator } from './row-height-calculator';
|
12
|
+
import { RichUtils } from '../../../model/rich-utils';
|
13
|
+
import { NumberingHelper } from '../../../model/numbering-lists/numbering-helper';
|
14
|
+
import { NumberingType } from '../../../model/numbering-lists/numbering-list';
|
12
15
|
export class RowSizesManager {
|
13
16
|
constructor(rowFormatter, outerHorizontalRowContentBounds, minY, rowSpacingBeforeApplier, boundsOfAnchoredOblectsOnThisColumn, isFirstRowInParagraph) {
|
14
17
|
this.rowFormatter = rowFormatter;
|
@@ -24,10 +27,23 @@ export class RowSizesManager {
|
|
24
27
|
this.rowFormattingInfo.calculate();
|
25
28
|
}
|
26
29
|
addNumberingListBoxes() {
|
27
|
-
const paragraph = this.rowFormatter
|
28
|
-
const
|
29
|
-
|
30
|
-
|
30
|
+
const { paragraph, result: { paragraphIndex }, numberingListCountersManager, manager: formatterManager } = this.rowFormatter;
|
31
|
+
const counters = numberingListCountersManager.calculateCounters(paragraphIndex);
|
32
|
+
let markText = paragraph.getNumberingListTextCore(counters);
|
33
|
+
let markProperties = paragraph.getNumerationCharacterProperties();
|
34
|
+
if (formatterManager.browserUtils.MacOSPlatform &&
|
35
|
+
markText === RichUtils.specialCharacters.MSWordBulletMark &&
|
36
|
+
markProperties.fontInfo.name === 'Symbol') {
|
37
|
+
const listTemplate = NumberingHelper.getNumberingListTemplate(formatterManager.model, NumberingType.Bullet);
|
38
|
+
const level = listTemplate.levels[paragraph.getListLevelIndex()];
|
39
|
+
const levelFontInfo = level.getCharacterProperties().fontInfo;
|
40
|
+
markProperties = markProperties.clone();
|
41
|
+
markProperties.fontInfo = levelFontInfo.clone();
|
42
|
+
markProperties.fontInfo.measurer = levelFontInfo.measurer;
|
43
|
+
markText = level.getListLevelProperties().displayFormatString;
|
44
|
+
}
|
45
|
+
this.row.numberingListBox = new LayoutNumberingListBox(markProperties, markProperties.getLayoutColorInfo(formatterManager.model.colorProvider), markText, paragraph.getNumberingListSeparatorChar(), formatterManager.model.cache.mergedCharacterPropertiesCache, paragraph.getListLevel().getListLevelProperties().alignment, formatterManager.model.cache.fontInfoCache);
|
46
|
+
LayoutBox.initializeWithMeasurer([new BoxWrap(this.row.numberingListBox, null)], formatterManager.measurer, formatterManager.innerClientProperties.showHiddenSymbols);
|
31
47
|
const boxes = [this.row.numberingListBox.textBox];
|
32
48
|
const separatorBox = this.row.numberingListBox.separatorBox;
|
33
49
|
if (separatorBox)
|
@@ -19,7 +19,8 @@ export class Measurer {
|
|
19
19
|
this.charPropsCache = charPropsCache;
|
20
20
|
}
|
21
21
|
clearCache() {
|
22
|
-
|
22
|
+
var _a;
|
23
|
+
(_a = this.charPropsCache) === null || _a === void 0 ? void 0 : _a.resetSizes();
|
23
24
|
}
|
24
25
|
measure(measureInfos) {
|
25
26
|
this.htmlParts = [];
|
@@ -11,5 +11,6 @@ export declare class Chunk {
|
|
11
11
|
getRunText(run: RunBase): string;
|
12
12
|
getTextInChunk(offsetAtStartChunk: number, length: number): string;
|
13
13
|
splitRun(runIndex: number, offset: number): void;
|
14
|
+
removeRun(runIndex: number): void;
|
14
15
|
clone(subDocument: SubDocument): Chunk;
|
15
16
|
}
|
@@ -1,4 +1,16 @@
|
|
1
1
|
import { ListUtils } from '@devexpress/utils/lib/utils/list';
|
2
|
+
class UndefinedRunError extends Error {
|
3
|
+
constructor() {
|
4
|
+
super();
|
5
|
+
this.message = 'Undefined run';
|
6
|
+
}
|
7
|
+
}
|
8
|
+
class OutOfOffsetError extends Error {
|
9
|
+
constructor() {
|
10
|
+
super();
|
11
|
+
this.message = 'Offset >= run.length';
|
12
|
+
}
|
13
|
+
}
|
2
14
|
export class Chunk {
|
3
15
|
constructor(startLogPosition, textBuffer, isLast) {
|
4
16
|
this.textBuffer = "";
|
@@ -19,13 +31,26 @@ export class Chunk {
|
|
19
31
|
splitRun(runIndex, offset) {
|
20
32
|
var run = this.textRuns[runIndex];
|
21
33
|
if (!run)
|
22
|
-
throw new
|
34
|
+
throw new UndefinedRunError();
|
23
35
|
if (offset >= run.getLength())
|
24
|
-
throw new
|
36
|
+
throw new OutOfOffsetError();
|
25
37
|
var newRun = run.createSimularity(run.startOffset + offset, run.getLength() - offset, run.paragraph, run.characterStyle, run.maskedCharacterProperties);
|
26
38
|
run.setLength(offset);
|
27
39
|
this.textRuns.splice(runIndex + 1, 0, newRun);
|
28
40
|
}
|
41
|
+
removeRun(runIndex) {
|
42
|
+
const run = this.textRuns[runIndex];
|
43
|
+
if (!run)
|
44
|
+
throw new UndefinedRunError();
|
45
|
+
if (runIndex === this.textRuns.length - 1) {
|
46
|
+
this.textBuffer = this.textBuffer.slice(0, run.startOffset);
|
47
|
+
this.textRuns.pop();
|
48
|
+
}
|
49
|
+
else {
|
50
|
+
this.textBuffer = [this.textBuffer.slice(0, run.startOffset), this.textBuffer.slice(run.startOffset + run.getLength())].join('');
|
51
|
+
this.textRuns = [...this.textRuns.slice(0, runIndex), ...this.textRuns.slice(runIndex + 1)];
|
52
|
+
}
|
53
|
+
}
|
29
54
|
clone(subDocument) {
|
30
55
|
const result = new Chunk(subDocument.positionManager.registerPosition(this.startLogPosition.value), this.textBuffer.slice(0), this.isLast);
|
31
56
|
result.textRuns = ListUtils.map(this.textRuns, r => r.cloneToNewSubDocument(subDocument));
|
@@ -36,6 +36,7 @@ import { DocumentLayout } from '../layout/document-layout';
|
|
36
36
|
import { CacheImageInfo } from './caches/images';
|
37
37
|
import { AnchorInfo } from './floating-objects/anchor-info';
|
38
38
|
import { SubDocumentCollection } from './sub-document-collection';
|
39
|
+
import { NotePosition, NoteSeparators } from './footnotes/footnote';
|
39
40
|
export interface IModelOptions extends ICloneable<IModelOptions> {
|
40
41
|
control: ControlOptions;
|
41
42
|
cultureOpts: IFormattersOptions;
|
@@ -50,6 +51,7 @@ export declare class DocumentModel {
|
|
50
51
|
pageBackColor: number;
|
51
52
|
mirrorMargins: boolean;
|
52
53
|
aspxIsDocumentProtectionEnabled: boolean;
|
54
|
+
documentEndNotePosition: NotePosition;
|
53
55
|
sections: Section[];
|
54
56
|
headers: HeaderSubDocumentInfo[];
|
55
57
|
footers: FooterSubDocumentInfo[];
|
@@ -71,6 +73,8 @@ export declare class DocumentModel {
|
|
71
73
|
numberingLists: NumberingList[];
|
72
74
|
abstractNumberingListsIdProvider: AbstractNumberingListIdProvider;
|
73
75
|
numberingListsIdProvider: NumberingListIdProvider;
|
76
|
+
footNoteSeparators: NoteSeparators;
|
77
|
+
endNoteSeparators: NoteSeparators;
|
74
78
|
get subDocuments(): Record<number, SubDocument>;
|
75
79
|
get options(): ControlOptions;
|
76
80
|
get isDocumentProtectionEnabled(): boolean;
|
@@ -34,10 +34,12 @@ import { FindReplaceHelper, FindReplaceState, SearchDirection } from './find-rep
|
|
34
34
|
import { AnchoredPictureRun } from './runs/anchored-picture-run';
|
35
35
|
import { InlinePictureRun } from './runs/inline-picture-run';
|
36
36
|
import { SubDocumentCollection } from './sub-document-collection';
|
37
|
+
import { NotePosition, NoteSeparators } from './footnotes/footnote';
|
37
38
|
export class DocumentModel {
|
38
39
|
constructor(modelOptions, subDocumentsIdCounter = 1) {
|
39
40
|
this.mirrorMargins = false;
|
40
41
|
this.aspxIsDocumentProtectionEnabled = false;
|
42
|
+
this.documentEndNotePosition = NotePosition.EndOfDocument;
|
41
43
|
this.sections = [];
|
42
44
|
this.headers = [];
|
43
45
|
this.footers = [];
|
@@ -52,6 +54,8 @@ export class DocumentModel {
|
|
52
54
|
this.numberingLists = [];
|
53
55
|
this.abstractNumberingListsIdProvider = new AbstractNumberingListIdProvider(this);
|
54
56
|
this.numberingListsIdProvider = new NumberingListIdProvider(this);
|
57
|
+
this.footNoteSeparators = new NoteSeparators(this);
|
58
|
+
this.endNoteSeparators = new NoteSeparators(this);
|
55
59
|
this.repositoryBorderItem = new BorderInfo();
|
56
60
|
this.compatSettings = [];
|
57
61
|
this.subDocumentsIdCounter = -1;
|
@@ -69,7 +73,6 @@ export class DocumentModel {
|
|
69
73
|
this.compatibilitySettings = new CompatibilitySettings();
|
70
74
|
this.docVariables = new DocumentVariables();
|
71
75
|
}
|
72
|
-
;
|
73
76
|
get subDocuments() {
|
74
77
|
return this.subDocumentsCollection.filteredCollection;
|
75
78
|
}
|
@@ -4,4 +4,6 @@ export var SubDocumentInfoType;
|
|
4
4
|
SubDocumentInfoType[SubDocumentInfoType["Header"] = 1] = "Header";
|
5
5
|
SubDocumentInfoType[SubDocumentInfoType["Footer"] = 2] = "Footer";
|
6
6
|
SubDocumentInfoType[SubDocumentInfoType["TextBox"] = 3] = "TextBox";
|
7
|
+
SubDocumentInfoType[SubDocumentInfoType["FootNote"] = 4] = "FootNote";
|
8
|
+
SubDocumentInfoType[SubDocumentInfoType["EndNote"] = 5] = "EndNote";
|
7
9
|
})(SubDocumentInfoType || (SubDocumentInfoType = {}));
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import { ICloneable, ISupportCopyFrom } from "@devexpress/utils/lib/types";
|
2
|
+
import { NumberingFormat } from "../numbering-lists/list-level-properties";
|
3
|
+
import { DocumentModel } from "../document-model";
|
4
|
+
import { SubDocument } from "../sub-document";
|
5
|
+
export declare enum NotePosition {
|
6
|
+
BottomOfPage = 0,
|
7
|
+
BelowText = 1,
|
8
|
+
EndOfDocument = 2,
|
9
|
+
EndOfSection = 3
|
10
|
+
}
|
11
|
+
export declare enum NoteType {
|
12
|
+
Separator = 0,
|
13
|
+
ContinuationSeparator = 1,
|
14
|
+
ContinuationNotice = 2,
|
15
|
+
Normal = 3
|
16
|
+
}
|
17
|
+
export declare type NoteSeparatorTypes = NoteType.Separator | NoteType.ContinuationSeparator | NoteType.ContinuationNotice;
|
18
|
+
export declare enum NoteNumberingRestartType {
|
19
|
+
Continuous = 0,
|
20
|
+
NewPage = 1,
|
21
|
+
NewSection = 2
|
22
|
+
}
|
23
|
+
export declare class NoteProperties implements ICloneable<NoteProperties>, ISupportCopyFrom<NoteProperties> {
|
24
|
+
static createDefault(): NoteProperties;
|
25
|
+
position: NotePosition;
|
26
|
+
numberingFormat: NumberingFormat;
|
27
|
+
numberingRestartType: NoteNumberingRestartType;
|
28
|
+
startingNumber: number;
|
29
|
+
columnCount: number;
|
30
|
+
copyFrom(obj: NoteProperties): void;
|
31
|
+
clone(): NoteProperties;
|
32
|
+
equals(other: NoteProperties): boolean;
|
33
|
+
}
|
34
|
+
export declare class NoteSeparators {
|
35
|
+
private model;
|
36
|
+
separatorId: number;
|
37
|
+
continuationSeparatorId: number;
|
38
|
+
continuationNoticeId: number;
|
39
|
+
constructor(model: DocumentModel);
|
40
|
+
get separator(): SubDocument;
|
41
|
+
get continuationSeparator(): SubDocument;
|
42
|
+
get continuationNotice(): SubDocument;
|
43
|
+
setSeparator(sudDocId: number, type: NoteSeparatorTypes): void;
|
44
|
+
getSeparator(type: NoteSeparatorTypes): SubDocument | never;
|
45
|
+
getSeparatos(): IterableIterator<SubDocument>;
|
46
|
+
}
|
@@ -0,0 +1,100 @@
|
|
1
|
+
import { NumberingFormat } from "../numbering-lists/list-level-properties";
|
2
|
+
export var NotePosition;
|
3
|
+
(function (NotePosition) {
|
4
|
+
NotePosition[NotePosition["BottomOfPage"] = 0] = "BottomOfPage";
|
5
|
+
NotePosition[NotePosition["BelowText"] = 1] = "BelowText";
|
6
|
+
NotePosition[NotePosition["EndOfDocument"] = 2] = "EndOfDocument";
|
7
|
+
NotePosition[NotePosition["EndOfSection"] = 3] = "EndOfSection";
|
8
|
+
})(NotePosition || (NotePosition = {}));
|
9
|
+
export var NoteType;
|
10
|
+
(function (NoteType) {
|
11
|
+
NoteType[NoteType["Separator"] = 0] = "Separator";
|
12
|
+
NoteType[NoteType["ContinuationSeparator"] = 1] = "ContinuationSeparator";
|
13
|
+
NoteType[NoteType["ContinuationNotice"] = 2] = "ContinuationNotice";
|
14
|
+
NoteType[NoteType["Normal"] = 3] = "Normal";
|
15
|
+
})(NoteType || (NoteType = {}));
|
16
|
+
export var NoteNumberingRestartType;
|
17
|
+
(function (NoteNumberingRestartType) {
|
18
|
+
NoteNumberingRestartType[NoteNumberingRestartType["Continuous"] = 0] = "Continuous";
|
19
|
+
NoteNumberingRestartType[NoteNumberingRestartType["NewPage"] = 1] = "NewPage";
|
20
|
+
NoteNumberingRestartType[NoteNumberingRestartType["NewSection"] = 2] = "NewSection";
|
21
|
+
})(NoteNumberingRestartType || (NoteNumberingRestartType = {}));
|
22
|
+
export class NoteProperties {
|
23
|
+
static createDefault() {
|
24
|
+
const result = new NoteProperties();
|
25
|
+
result.position = NotePosition.BottomOfPage;
|
26
|
+
result.numberingFormat = NumberingFormat.Decimal;
|
27
|
+
result.numberingRestartType = NoteNumberingRestartType.Continuous;
|
28
|
+
result.startingNumber = 1;
|
29
|
+
result.columnCount = 0;
|
30
|
+
return result;
|
31
|
+
}
|
32
|
+
copyFrom(obj) {
|
33
|
+
this.position = obj.position;
|
34
|
+
this.numberingFormat = obj.numberingFormat;
|
35
|
+
this.numberingRestartType = obj.numberingRestartType;
|
36
|
+
this.startingNumber = obj.startingNumber;
|
37
|
+
this.columnCount = obj.columnCount;
|
38
|
+
}
|
39
|
+
clone() {
|
40
|
+
const result = new NoteProperties();
|
41
|
+
result.copyFrom(this);
|
42
|
+
return result;
|
43
|
+
}
|
44
|
+
equals(other) {
|
45
|
+
return this.position === other.position &&
|
46
|
+
this.numberingFormat === other.numberingFormat &&
|
47
|
+
this.numberingRestartType === other.numberingRestartType &&
|
48
|
+
this.startingNumber === other.startingNumber &&
|
49
|
+
this.columnCount === other.columnCount;
|
50
|
+
}
|
51
|
+
}
|
52
|
+
export class NoteSeparators {
|
53
|
+
constructor(model) {
|
54
|
+
this.model = model;
|
55
|
+
}
|
56
|
+
get separator() {
|
57
|
+
return this.model.subDocuments[this.separatorId];
|
58
|
+
}
|
59
|
+
get continuationSeparator() {
|
60
|
+
return this.model.subDocuments[this.continuationSeparatorId];
|
61
|
+
}
|
62
|
+
get continuationNotice() {
|
63
|
+
return this.model.subDocuments[this.continuationNoticeId];
|
64
|
+
}
|
65
|
+
setSeparator(sudDocId, type) {
|
66
|
+
switch (type) {
|
67
|
+
case NoteType.Separator:
|
68
|
+
this.separatorId = sudDocId;
|
69
|
+
break;
|
70
|
+
case NoteType.ContinuationSeparator:
|
71
|
+
this.continuationSeparatorId = sudDocId;
|
72
|
+
break;
|
73
|
+
case NoteType.ContinuationNotice:
|
74
|
+
this.continuationNoticeId = sudDocId;
|
75
|
+
break;
|
76
|
+
default:
|
77
|
+
throw Error("Invalid separator type.");
|
78
|
+
}
|
79
|
+
}
|
80
|
+
getSeparator(type) {
|
81
|
+
switch (type) {
|
82
|
+
case NoteType.Separator:
|
83
|
+
return this.separator;
|
84
|
+
case NoteType.ContinuationSeparator:
|
85
|
+
return this.continuationSeparator;
|
86
|
+
case NoteType.ContinuationNotice:
|
87
|
+
return this.continuationNotice;
|
88
|
+
default:
|
89
|
+
throw Error("Invalid separator type.");
|
90
|
+
}
|
91
|
+
}
|
92
|
+
*getSeparatos() {
|
93
|
+
if (this.separator)
|
94
|
+
yield this.separator;
|
95
|
+
if (this.continuationSeparator)
|
96
|
+
yield this.continuationSeparator;
|
97
|
+
if (this.continuationNotice)
|
98
|
+
yield this.continuationNotice;
|
99
|
+
}
|
100
|
+
}
|
@@ -15,7 +15,7 @@ import { JSONRunBaseProperty } from '../../enums/json-run-enums';
|
|
15
15
|
import { JSONBookmarkProperty, JSONChunkProperty, JSONEnumLoadPieceTable, JSONRangePermissionProperty } from '../../enums/json-sub-document-enums';
|
16
16
|
import { JSONTabConverter } from '../json-tab-converter';
|
17
17
|
import { JSONTableImporter } from '../table/json-table-importer';
|
18
|
-
import { AnchoredPictureRunImporter, AnchoredTextBoxRunImporter, InlinePictureRunImporter, InlineTextBoxRunImporter, SimpleRunImporter, TextRunImporter } from './run-importers';
|
18
|
+
import { AnchoredPictureRunImporter, AnchoredTextBoxRunImporter, InlinePictureRunImporter, InlineTextBoxRunImporter, NoteRunImporter, SimpleRunImporter, TextRunImporter } from './run-importers';
|
19
19
|
export class JSONSubDocumentImporter {
|
20
20
|
static importSubDocument(subDocument, documentProtectionSettings, content, imageCorrespondence) {
|
21
21
|
JSONTableImporter.importTables(subDocument, content[JSONEnumLoadPieceTable.Tables]);
|
@@ -119,8 +119,8 @@ JSONSubDocumentImporter.runTypeToRunImporter = {
|
|
119
119
|
[RunType.InlinePictureRun]: new InlinePictureRunImporter(),
|
120
120
|
[RunType.InlineTextBoxRun]: new InlineTextBoxRunImporter(),
|
121
121
|
[RunType.LayoutDependentRun]: new SimpleRunImporter(LayoutDependentRun),
|
122
|
-
[RunType.FootNoteRun]: new
|
123
|
-
[RunType.EndNoteRun]: new
|
122
|
+
[RunType.FootNoteRun]: new NoteRunImporter(FootNoteRun),
|
123
|
+
[RunType.EndNoteRun]: new NoteRunImporter(EndNoteRun),
|
124
124
|
[RunType.NoteSeparatorRun]: new SimpleRunImporter(NoteSeparatorRun),
|
125
125
|
[RunType.NoteContinuationSeparatorRun]: new SimpleRunImporter(NoteContinuationSeparatorRun),
|
126
126
|
};
|
@@ -5,6 +5,7 @@ import { CharacterStyle } from '../../../character/character-style';
|
|
5
5
|
import { Paragraph } from '../../../paragraph/paragraph';
|
6
6
|
import { RunBase } from '../../../runs/run-base';
|
7
7
|
export declare type SimpleRunConstructor = new (startOffset: number, paragraph: Paragraph, charPropsBundle: MaskedCharacterPropertiesBundle) => RunBase;
|
8
|
+
export declare type NoteRunConstructor = new (startOffset: number, paragraph: Paragraph, charPropsBundle: MaskedCharacterPropertiesBundle, noteDocumentId: number) => RunBase;
|
8
9
|
export declare abstract class BaseRunImporter {
|
9
10
|
private maskedCharacterPropertiesCache;
|
10
11
|
private charStyles;
|
@@ -19,6 +20,11 @@ export declare class SimpleRunImporter extends BaseRunImporter {
|
|
19
20
|
constructor(runConstructor: SimpleRunConstructor);
|
20
21
|
protected makeRun(_jsonRun: any, startOffset: number, paragraph: Paragraph, charPropsBundle: MaskedCharacterPropertiesBundle): RunBase;
|
21
22
|
}
|
23
|
+
export declare class NoteRunImporter extends BaseRunImporter {
|
24
|
+
runConstructor: NoteRunConstructor;
|
25
|
+
constructor(runConstructor: NoteRunConstructor);
|
26
|
+
protected makeRun(_jsonRun: any, startOffset: number, paragraph: Paragraph, charPropsBundle: MaskedCharacterPropertiesBundle): RunBase;
|
27
|
+
}
|
22
28
|
export declare class TextRunImporter extends BaseRunImporter {
|
23
29
|
protected makeRun(jsonRun: any, startOffset: number, paragraph: Paragraph, charPropsBundle: MaskedCharacterPropertiesBundle): RunBase;
|
24
30
|
}
|
@@ -34,6 +34,15 @@ export class SimpleRunImporter extends BaseRunImporter {
|
|
34
34
|
return new this.runConstructor(startOffset, paragraph, charPropsBundle);
|
35
35
|
}
|
36
36
|
}
|
37
|
+
export class NoteRunImporter extends BaseRunImporter {
|
38
|
+
constructor(runConstructor) {
|
39
|
+
super();
|
40
|
+
this.runConstructor = runConstructor;
|
41
|
+
}
|
42
|
+
makeRun(_jsonRun, startOffset, paragraph, charPropsBundle) {
|
43
|
+
return new this.runConstructor(startOffset, paragraph, charPropsBundle, -1);
|
44
|
+
}
|
45
|
+
}
|
37
46
|
export class TextRunImporter extends BaseRunImporter {
|
38
47
|
makeRun(jsonRun, startOffset, paragraph, charPropsBundle) {
|
39
48
|
return new TextRun(startOffset, jsonRun[JSONRunBaseProperty.Length], paragraph, charPropsBundle);
|
@@ -7,7 +7,8 @@ export declare class PositionChecker {
|
|
7
7
|
check(): boolean;
|
8
8
|
compare(poss: Position[], registered: Position[]): boolean;
|
9
9
|
private getNewRegInterval;
|
10
|
-
private
|
10
|
+
private isGreater;
|
11
|
+
private isEqual;
|
11
12
|
private sort;
|
12
13
|
private addSections;
|
13
14
|
private addParagraphs;
|
@@ -27,7 +27,9 @@ export class PositionChecker {
|
|
27
27
|
for (let currPos of poss) {
|
28
28
|
if (prevPos.value != currPos.value)
|
29
29
|
regInterval = this.getNewRegInterval(registered, regInterval);
|
30
|
-
|
30
|
+
while (this.isGreater(currPos, registered, regInterval))
|
31
|
+
regInterval = this.getNewRegInterval(registered, regInterval);
|
32
|
+
if (!this.isEqual(currPos, registered, regInterval))
|
31
33
|
return false;
|
32
34
|
prevPos = currPos;
|
33
35
|
}
|
@@ -43,7 +45,14 @@ export class PositionChecker {
|
|
43
45
|
}
|
44
46
|
return regInterval;
|
45
47
|
}
|
46
|
-
|
48
|
+
isGreater(currPos, registered, regInterval) {
|
49
|
+
for (let i = regInterval.start; i < regInterval.end; i++) {
|
50
|
+
if (registered[i] && currPos.value > registered[i].value)
|
51
|
+
return true;
|
52
|
+
}
|
53
|
+
return false;
|
54
|
+
}
|
55
|
+
isEqual(currPos, registered, regInterval) {
|
47
56
|
for (let i = regInterval.start; i < regInterval.end; i++) {
|
48
57
|
if (currPos === registered[i])
|
49
58
|
return true;
|
@@ -1,13 +1,14 @@
|
|
1
1
|
import { IModelManager } from '../../model-manager';
|
2
2
|
import { DocumentModel } from '../document-model';
|
3
3
|
import { SubDocument } from '../sub-document';
|
4
|
-
import { NumberingType } from './numbering-list';
|
4
|
+
import { AbstractNumberingList, NumberingType } from './numbering-list';
|
5
5
|
export declare class NumberingHelper {
|
6
6
|
static templateCodeStart: number;
|
7
7
|
static templateCodeEnd: number;
|
8
8
|
static generateNewTemplateCode(documentModel: DocumentModel): number;
|
9
9
|
static isNewTemplateCode(documentModel: DocumentModel, templateCode: number): boolean;
|
10
10
|
static getNumberingListTemplateIndex(documentModel: DocumentModel, type: NumberingType): number;
|
11
|
+
static getNumberingListTemplate(documentModel: DocumentModel, type: NumberingType): AbstractNumberingList;
|
11
12
|
static deleteNumberingList(modelManager: IModelManager, subDocument: SubDocument, paragraphIndices: number[]): void;
|
12
13
|
private static resetParagraphLeftIndent;
|
13
14
|
private static deleteNumberingListCore;
|
@@ -26,6 +26,9 @@ export class NumberingHelper {
|
|
26
26
|
}
|
27
27
|
return -1;
|
28
28
|
}
|
29
|
+
static getNumberingListTemplate(documentModel, type) {
|
30
|
+
return documentModel.abstractNumberingListTemplates.find(list => list.getListType() === type);
|
31
|
+
}
|
29
32
|
static deleteNumberingList(modelManager, subDocument, paragraphIndices) {
|
30
33
|
for (let i = paragraphIndices.length - 1; i >= 0; i--) {
|
31
34
|
let paragraphIndex = paragraphIndices[i];
|
@@ -24,6 +24,7 @@ export declare class ParagraphStyle extends StyleBase<ParagraphStyle> implements
|
|
24
24
|
getResultTabs(): TabProperties;
|
25
25
|
getMergedParagraphProperties(): ParagraphProperties;
|
26
26
|
isInOwnList(): boolean;
|
27
|
+
isInList(): boolean;
|
27
28
|
getListLevel(model: DocumentModel): IOverrideListLevel;
|
28
29
|
getNumberingList(model: DocumentModel): NumberingList;
|
29
30
|
getNumberingListIndex(): number;
|
@@ -29,6 +29,9 @@ export class ParagraphStyle extends StyleBase {
|
|
29
29
|
isInOwnList() {
|
30
30
|
return this.numberingListIndex >= 0;
|
31
31
|
}
|
32
|
+
isInList() {
|
33
|
+
return this.getNumberingListIndex() >= 0;
|
34
|
+
}
|
32
35
|
getListLevel(model) {
|
33
36
|
return this.getNumberingList(model).levels[this.getListLevelIndex()];
|
34
37
|
}
|
@@ -42,10 +45,11 @@ export class ParagraphStyle extends StyleBase {
|
|
42
45
|
return this.parent.getNumberingListIndex();
|
43
46
|
}
|
44
47
|
getListLevelIndex() {
|
45
|
-
|
48
|
+
var _a, _b;
|
49
|
+
if (this.listLevelIndex >= 0)
|
46
50
|
return this.listLevelIndex;
|
47
51
|
else
|
48
|
-
return this.parent.getListLevelIndex();
|
52
|
+
return (_b = (_a = this.parent) === null || _a === void 0 ? void 0 : _a.getListLevelIndex()) !== null && _b !== void 0 ? _b : 0;
|
49
53
|
}
|
50
54
|
clone() {
|
51
55
|
const style = new ParagraphStyle(this.styleName, this.localizedName, this.deleted, this.hidden, this.semihidden, this.isDefault, this.maskedCharacterProperties, this.maskedParagraphProperties, this.tabs.clone(), this.autoUpdate, this.numberingListIndex, this.listLevelIndex, this.base64EncodedImage, this.id);
|
@@ -38,7 +38,7 @@ export class ParagraphPropertiesMerger extends PropertiesMergerBase {
|
|
38
38
|
let currentParagraphStyle = paragraphStyle;
|
39
39
|
while (currentParagraphStyle) {
|
40
40
|
this.merge(currentParagraphStyle.maskedParagraphProperties);
|
41
|
-
if (currentParagraphStyle.
|
41
|
+
if (currentParagraphStyle.isInList())
|
42
42
|
this.merge(currentParagraphStyle.getListLevel(model).getParagraphProperties());
|
43
43
|
currentParagraphStyle = currentParagraphStyle.parent;
|
44
44
|
}
|
@@ -23,6 +23,7 @@ export declare abstract class RunBase implements ICharacterPropertiesContainer,
|
|
23
23
|
paragraph: Paragraph;
|
24
24
|
characterStyle: CharacterStyle;
|
25
25
|
maskedCharacterProperties: MaskedCharacterProperties;
|
26
|
+
noteDocumentId: number;
|
26
27
|
private mergedCharacterProperties;
|
27
28
|
constructor(startOffset: number, paragraph: Paragraph, charPropsBundle: MaskedCharacterPropertiesBundle);
|
28
29
|
abstract getLength(): number;
|
@@ -1,7 +1,9 @@
|
|
1
1
|
import { ICloneable } from '@devexpress/utils/lib/types';
|
2
|
+
import { MaskedCharacterPropertiesBundle } from '../../rich-utils/properties-bundle';
|
2
3
|
import { SubDocument } from '../sub-document';
|
3
4
|
import { OneCharRun } from './run-base';
|
4
5
|
import { RunType } from './run-type';
|
6
|
+
import { Paragraph } from '../paragraph/paragraph';
|
5
7
|
export declare class SectionRun extends OneCharRun implements ICloneable<SectionRun> {
|
6
8
|
getType(): RunType;
|
7
9
|
isParagraphOrSectionRun(): boolean;
|
@@ -34,12 +36,15 @@ export declare class LayoutDependentRun extends OneCharRun implements ICloneable
|
|
34
36
|
clone(): LayoutDependentRun;
|
35
37
|
cloneToNewSubDocument(subDocument: SubDocument): LayoutDependentRun;
|
36
38
|
}
|
37
|
-
|
39
|
+
declare abstract class NoteRun extends OneCharRun {
|
40
|
+
constructor(startOffset: number, paragraph: Paragraph, charPropsBundle: MaskedCharacterPropertiesBundle, noteDocumentId?: number);
|
41
|
+
}
|
42
|
+
export declare class FootNoteRun extends NoteRun implements ICloneable<FootNoteRun> {
|
38
43
|
getType(): RunType;
|
39
44
|
clone(): FootNoteRun;
|
40
45
|
cloneToNewSubDocument(subDocument: SubDocument): FootNoteRun;
|
41
46
|
}
|
42
|
-
export declare class EndNoteRun extends
|
47
|
+
export declare class EndNoteRun extends NoteRun implements ICloneable<EndNoteRun> {
|
43
48
|
getType(): RunType;
|
44
49
|
clone(): EndNoteRun;
|
45
50
|
cloneToNewSubDocument(subDocument: SubDocument): EndNoteRun;
|
@@ -54,3 +59,4 @@ export declare class NoteContinuationSeparatorRun extends OneCharRun implements
|
|
54
59
|
clone(): NoteContinuationSeparatorRun;
|
55
60
|
cloneToNewSubDocument(subDocument: SubDocument): NoteContinuationSeparatorRun;
|
56
61
|
}
|
62
|
+
export {};
|