@univerjs/core v0.4.2 • Docs
Class: DocumentDataModel
Extends
DocumentDataModelSimple
Constructors
new DocumentDataModel()
new DocumentDataModel(snapshot): DocumentDataModel
Parameters
Parameter | Type |
---|---|
snapshot | Partial <IDocumentData > |
Returns
Overrides
DocumentDataModelSimple.constructor
Defined in
submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:232 (opens in a new tab)
Properties
Accessors
documentStyle
get documentStyle(): IDocumentStyle
Returns
Inherited from
DocumentDataModelSimple.documentStyle
Defined in
submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:88 (opens in a new tab)
drawings
get drawings(): undefined | IDrawings
Returns
undefined
| IDrawings
Inherited from
DocumentDataModelSimple.drawings
Defined in
submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:84 (opens in a new tab)
lists
get lists(): undefined | ILists
Returns
undefined
| ILists
Inherited from
DocumentDataModelSimple.lists
Defined in
submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:92 (opens in a new tab)
zoomRatio
get zoomRatio(): number
Returns
number
Inherited from
DocumentDataModelSimple.zoomRatio
Defined in
submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:96 (opens in a new tab)
Methods
apply()
apply(actions): undefined | IDocumentData
Parameters
Parameter | Type |
---|---|
actions | JSONOp |
Returns
undefined
| IDocumentData
Defined in
submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:304 (opens in a new tab)
dispose()
dispose(): void
Returns
void
Overrides
DocumentDataModelSimple.dispose
Defined in
submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:243 (opens in a new tab)
disposeWithMe()
disposeWithMe(disposable): IDisposable
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
DocumentDataModelSimple.disposeWithMe
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:96 (opens in a new tab)
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
DocumentDataModelSimple.ensureNotDisposed
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:100 (opens in a new tab)
getBody()
getBody(): undefined | IDocumentBody
Returns
undefined
| IDocumentBody
Inherited from
DocumentDataModelSimple.getBody
Defined in
submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:105 (opens in a new tab)
getBulletPresetList()
getBulletPresetList(): Record<string, IListData>
Returns
Record
<string
, IListData
>
Inherited from
DocumentDataModelSimple.getBulletPresetList
Defined in
submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:113 (opens in a new tab)
getCustomDecorations()
getCustomDecorations(): undefined | ICustomDecoration[]
Returns
undefined
| ICustomDecoration
[]
Defined in
submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:268 (opens in a new tab)
getCustomRanges()
getCustomRanges(): undefined | ICustomRange<Record<string, any>>[]
Returns
undefined
| ICustomRange
<Record
<string
, any
>>[]
Defined in
submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:264 (opens in a new tab)
getDrawings()
getDrawings(): undefined | IDrawings
Returns
undefined
| IDrawings
Defined in
submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:256 (opens in a new tab)
getDrawingsOrder()
getDrawingsOrder(): undefined | string[]
Returns
undefined
| string
[]
Defined in
submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:260 (opens in a new tab)
getRev()
getRev(): number
Get revision of the unit's snapshot. Note that revision should start from 1.
Returns
number
Inherited from
DocumentDataModelSimple.getRev
Defined in
submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:67 (opens in a new tab)
getSelfOrHeaderFooterModel()
getSelfOrHeaderFooterModel(segmentId?): DocumentDataModel
Parameters
Parameter | Type |
---|---|
segmentId ? | string |
Returns
Defined in
submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:286 (opens in a new tab)
getSettings()
getSettings(): undefined | IDocumentSettings
Returns
undefined
| IDocumentSettings
Defined in
submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:272 (opens in a new tab)
getSnapshot()
getSnapshot(): IDocumentData
Returns
Inherited from
DocumentDataModelSimple.getSnapshot
Defined in
submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:109 (opens in a new tab)
getUnitId()
getUnitId(): string
Returns
string
Overrides
DocumentDataModelSimple.getUnitId
Defined in
submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:300 (opens in a new tab)
incrementRev()
incrementRev(): void
Increment the current revision.
Returns
void
Inherited from
DocumentDataModelSimple.incrementRev
Defined in
submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:71 (opens in a new tab)
reset()
reset(snapshot): void
Parameters
Parameter | Type |
---|---|
snapshot | Partial <IDocumentData > |
Returns
void
Defined in
submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:277 (opens in a new tab)
resetDrawing()
resetDrawing(drawings, drawingsOrder): void
Parameters
Parameter | Type |
---|---|
drawings | IDrawings |
drawingsOrder | string [] |
Returns
void
Inherited from
DocumentDataModelSimple.resetDrawing
Defined in
submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:100 (opens in a new tab)
setName()
setName(name): void
Parameters
Parameter | Type |
---|---|
name | string |
Returns
void
Inherited from
DocumentDataModelSimple.setName
Defined in
submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:79 (opens in a new tab)
setRev()
setRev(rev): void
Set revision of the current snapshot.
Parameters
Parameter | Type |
---|---|
rev | number |
Returns
void
Inherited from
DocumentDataModelSimple.setRev
Defined in
submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:75 (opens in a new tab)
setZoomRatio()
setZoomRatio(zoomRatio): void
Parameters
Parameter | Type | Default value |
---|---|---|
zoomRatio | number | 1 |
Returns
void
Inherited from
DocumentDataModelSimple.setZoomRatio
Defined in
submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:214 (opens in a new tab)
sliceBody()
sliceBody(
startOffset,
endOffset,
type): Nullable<IDocumentBody>
Parameters
Parameter | Type | Default value |
---|---|---|
startOffset | number | undefined |
endOffset | number | undefined |
type | SliceBodyType | SliceBodyType.copy |
Returns
Defined in
submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:321 (opens in a new tab)
updateDocumentDataMargin()
updateDocumentDataMargin(data): void
Parameters
Parameter | Type |
---|---|
data | IPaddingData |
Returns
void
Inherited from
DocumentDataModelSimple.updateDocumentDataMargin
Defined in
submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:151 (opens in a new tab)
updateDocumentDataPageSize()
updateDocumentDataPageSize(width?, height?): void
Parameters
Parameter | Type |
---|---|
width ? | number |
height ? | number |
Returns
void
Inherited from
DocumentDataModelSimple.updateDocumentDataPageSize
Defined in
submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:172 (opens in a new tab)
updateDocumentId()
updateDocumentId(unitId): void
Parameters
Parameter | Type |
---|---|
unitId | string |
Returns
void
Overrides
DocumentDataModelSimple.updateDocumentId
Defined in
submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:351 (opens in a new tab)
updateDocumentRenderConfig()
updateDocumentRenderConfig(config): void
Parameters
Parameter | Type |
---|---|
config | IDocumentRenderConfig |
Returns
void
Inherited from
DocumentDataModelSimple.updateDocumentRenderConfig
Defined in
submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:127 (opens in a new tab)
updateDocumentStyle()
updateDocumentStyle(config): void
Parameters
Parameter | Type |
---|---|
config | IDocumentStyle |
Returns
void
Inherited from
DocumentDataModelSimple.updateDocumentStyle
Defined in
submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:140 (opens in a new tab)
updateDrawing()
updateDrawing(id, config): void
Parameters
Parameter | Type |
---|---|
id | string |
config | IDrawingUpdateConfig |
Returns
void
Inherited from
DocumentDataModelSimple.updateDrawing
Defined in
submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:196 (opens in a new tab)