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
Parameter | Type |
---|---|
snapshot | Partial <IDocumentData > |
Returns
Overrides
DocumentDataModelSimple.constructor
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_disposed | protected | boolean | false | DocumentDataModelSimple._disposed | packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:96 |
_name$ | readonly | BehaviorSubject <string > | undefined | DocumentDataModelSimple._name$ | packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:55 |
change$ | public | BehaviorSubject <number > | undefined | - | packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:231 |
footerModelMap | public | Map <string , DocumentDataModel > | undefined | - | packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:230 |
headerModelMap | public | Map <string , DocumentDataModel > | undefined | - | packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:228 |
name$ | public | Observable <string > | undefined | DocumentDataModelSimple.name$ | packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:56 |
snapshot | protected | IDocumentData | undefined | DocumentDataModelSimple.snapshot | packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/document-data-model.ts:58 |
type | public | UNIVER_DOC | UniverInstanceType.UNIVER_DOC | DocumentDataModelSimple.type | packages/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
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
Parameter | Type |
---|---|
actions | JSONOp |
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
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
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
Parameter | Type |
---|---|
segmentId ? | string |
Returns
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
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
Parameter | Type |
---|---|
snapshot | Partial <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
Parameter | Type |
---|---|
drawings | IDrawings |
drawingsOrder | string [] |
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
Parameter | Type |
---|---|
name | string |
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
Parameter | Type |
---|---|
rev | number |
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
Parameter | Type | Default value |
---|---|---|
zoomRatio | number | 1 |
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
Parameter | Type | Default value |
---|---|---|
startOffset | number | undefined |
endOffset | number | undefined |
type | SliceBodyType | SliceBodyType.copy |
Returns
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
Parameter | Type |
---|---|
data | IPaddingData |
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
Parameter | Type |
---|---|
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
Parameter | Type |
---|---|
unitId | string |
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
Parameter | Type |
---|---|
config | IDocumentRenderConfig |
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
Parameter | Type |
---|---|
config | IDocumentStyle |
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
Parameter | Type |
---|---|
id | string |
config | IDrawingUpdateConfig |
Returns
void
Inherited from
DocumentDataModelSimple.updateDrawing