@univerjscoreclassesDocumentdatamodel

@univerjs/core v0.5.4


Class: DocumentDataModel

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:225

Extends

  • DocumentDataModelSimple

Constructors

new DocumentDataModel()

new DocumentDataModel(snapshot): DocumentDataModel

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:233

Parameters

ParameterType
snapshotPartial<IDocumentData>

Returns

DocumentDataModel

Overrides

DocumentDataModelSimple.constructor

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseDocumentDataModelSimple._disposedpackages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:96
_name$readonlyBehaviorSubject<string>undefinedDocumentDataModelSimple._name$packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:55
change$publicBehaviorSubject<number>undefined-packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:231
footerModelMappublicMap<string, DocumentDataModel>undefined-packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:230
headerModelMappublicMap<string, DocumentDataModel>undefined-packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:228
name$publicObservable<string>undefinedDocumentDataModelSimple.name$packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:56
snapshotprotectedIDocumentDataundefinedDocumentDataModelSimple.snapshotpackages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:58
typepublicUNIVER_DOCUniverInstanceType.UNIVER_DOCDocumentDataModelSimple.typepackages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:49

Accessors

documentStyle

Get Signature

get documentStyle(): IDocumentStyle

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:88

Returns

IDocumentStyle

Inherited from

DocumentDataModelSimple.documentStyle

drawings

Get Signature

get drawings(): undefined | IDrawings

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:84

Returns

undefined | IDrawings

Inherited from

DocumentDataModelSimple.drawings

lists

Get Signature

get lists(): undefined | ILists

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:92

Returns

undefined | ILists

Inherited from

DocumentDataModelSimple.lists

zoomRatio

Get Signature

get zoomRatio(): number

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:96

Returns

number

Inherited from

DocumentDataModelSimple.zoomRatio

Methods

apply()

apply(actions): undefined | IDocumentData

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:306

Parameters

ParameterType
actionsJSONOp

Returns

undefined | IDocumentData


dispose()

dispose(): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:244

Returns

void

Overrides

DocumentDataModelSimple.dispose

disposeWithMe()

disposeWithMe(disposable): IDisposable

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:99

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

DocumentDataModelSimple.disposeWithMe

ensureNotDisposed()

protected ensureNotDisposed(): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:103

Returns

void

Inherited from

DocumentDataModelSimple.ensureNotDisposed

getBody()

getBody(): undefined | IDocumentBody

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:105

Returns

undefined | IDocumentBody

Inherited from

DocumentDataModelSimple.getBody

getBulletPresetList()

getBulletPresetList(): Record<string, IListData>

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:113

Returns

Record<string, IListData>

Inherited from

DocumentDataModelSimple.getBulletPresetList

getCustomDecorations()

getCustomDecorations(): undefined | ICustomDecoration[]

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:269

Returns

undefined | ICustomDecoration[]


getCustomRanges()

getCustomRanges(): undefined | ICustomRange[]

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:265

Returns

undefined | ICustomRange[]


getDrawings()

getDrawings(): undefined | IDrawings

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:257

Returns

undefined | IDrawings


getDrawingsOrder()

getDrawingsOrder(): undefined | string[]

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:261

Returns

undefined | string[]


getRev()

getRev(): number

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:67

Get revision of the unit’s snapshot. Note that revision should start from 1.

Returns

number

Inherited from

DocumentDataModelSimple.getRev

getSelfOrHeaderFooterModel()

getSelfOrHeaderFooterModel(segmentId?): DocumentDataModel

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:288

Parameters

ParameterType
segmentId?string

Returns

DocumentDataModel


getSettings()

getSettings(): undefined | IDocumentSettings

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:273

Returns

undefined | IDocumentSettings


getSnapshot()

getSnapshot(): IDocumentData

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:109

Returns

IDocumentData

Inherited from

DocumentDataModelSimple.getSnapshot

getUnitId()

getUnitId(): string

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:302

Returns

string

Overrides

DocumentDataModelSimple.getUnitId

incrementRev()

incrementRev(): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:71

Increment the current revision.

Returns

void

Inherited from

DocumentDataModelSimple.incrementRev

reset()

reset(snapshot): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:278

Parameters

ParameterType
snapshotPartial<IDocumentData>

Returns

void


resetDrawing()

resetDrawing(drawings, drawingsOrder): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:100

Parameters

ParameterType
drawingsIDrawings
drawingsOrderstring[]

Returns

void

Inherited from

DocumentDataModelSimple.resetDrawing

setName()

setName(name): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:79

Parameters

ParameterType
namestring

Returns

void

Inherited from

DocumentDataModelSimple.setName

setRev()

setRev(rev): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:75

Set revision of the current snapshot.

Parameters

ParameterType
revnumber

Returns

void

Inherited from

DocumentDataModelSimple.setRev

setZoomRatio()

setZoomRatio(zoomRatio): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:214

Parameters

ParameterTypeDefault value
zoomRationumber1

Returns

void

Inherited from

DocumentDataModelSimple.setZoomRatio

sliceBody()

sliceBody(
   startOffset, 
   endOffset, 
type): Nullable<IDocumentBody>

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:324

Parameters

ParameterTypeDefault value
startOffsetnumberundefined
endOffsetnumberundefined
typeSliceBodyTypeSliceBodyType.copy

Returns

Nullable<IDocumentBody>


updateDocumentDataMargin()

updateDocumentDataMargin(data): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:151

Parameters

ParameterType
dataIPaddingData

Returns

void

Inherited from

DocumentDataModelSimple.updateDocumentDataMargin

updateDocumentDataPageSize()

updateDocumentDataPageSize(width?, height?): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:172

Parameters

ParameterType
width?number
height?number

Returns

void

Inherited from

DocumentDataModelSimple.updateDocumentDataPageSize

updateDocumentId()

updateDocumentId(unitId): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:354

Parameters

ParameterType
unitIdstring

Returns

void

Overrides

DocumentDataModelSimple.updateDocumentId

updateDocumentRenderConfig()

updateDocumentRenderConfig(config): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:127

Parameters

ParameterType
configIDocumentRenderConfig

Returns

void

Inherited from

DocumentDataModelSimple.updateDocumentRenderConfig

updateDocumentStyle()

updateDocumentStyle(config): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:140

Parameters

ParameterType
configIDocumentStyle

Returns

void

Inherited from

DocumentDataModelSimple.updateDocumentStyle

updateDrawing()

updateDrawing(id, config): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:196

Parameters

ParameterType
idstring
configIDrawingUpdateConfig

Returns

void

Inherited from

DocumentDataModelSimple.updateDrawing