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) 852 B
import { MapCreator } from '../../../../../../common/utils/map-creator'; import { StringUtils } from '@devexpress/utils/lib/utils/string'; import { ElementDestination } from '../destination'; import { OfficeThemeElementsDestination } from './office-theme-elements-destination'; export class OfficeThemeDestination extends ElementDestination { static { this.handlerTable = new MapCreator() .add('themeElements', (data) => new OfficeThemeElementsDestination(data)) .get(); } get elementHandlerTable() { return OfficeThemeDestination.handlerTable; } async processElementOpen(reader) { this.name = this.data.readerHelper.readAttribute(reader, 'name'); if (!StringUtils.isNullOrEmpty(this.name)) this.data.documentModel.colorProvider.officeTheme.name = this.name; } }