UNPKG

devexpress-richedit

Version:

DevExpress Rich Text Editor is an advanced word-processing tool designed for working with rich text documents.

18 lines (17 loc) 917 B
import { TableHeightUnitType } from '../../../../../../common/model/tables/secondary-structures/table-units'; import { Constants } from '@devexpress/utils/lib/constants'; import { TranslationTables } from '../../../translation-table/translation-tables'; import { LeafElementDestination } from '../destination'; export class HeightUnitDestination extends LeafElementDestination { constructor(data, heightUnit) { super(data); this.heightUnit = heightUnit; } async processElementOpen(reader) { const unitType = this.data.readerHelper.getWpEnumValue(reader, 'hRule', TranslationTables.heightUnitTypeTable.importMap, TableHeightUnitType.Minimum); this.heightUnit.type = unitType; const value = this.data.readerHelper.getWpSTIntegerValue(reader, 'val'); if (value != Constants.MIN_SAFE_INTEGER) this.heightUnit.value = value; } }