UNPKG

devexpress-richedit

Version:

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

21 lines (20 loc) 1.27 kB
import { MapCreator } from '../../../../../../../common/utils/map-creator'; import { ElementDestination } from '../../destination'; import { OfficeThemeFontCollectionSchemeDestination } from './office-theme-font-collection-scheme-destination'; export class OfficeThemeFontSchemeDestination extends ElementDestination { static { this.handlerTable = new MapCreator() .add('majorFont', (data) => new OfficeThemeFontCollectionSchemeDestination(data, OfficeThemeFontSchemeDestination.getThis(data).majorFont)) .add('minorFont', (data) => new OfficeThemeFontCollectionSchemeDestination(data, OfficeThemeFontSchemeDestination.getThis(data).minorFont)) .get(); } static getThis(data) { return data.destinationStack.getThis(); } get elementHandlerTable() { return OfficeThemeFontSchemeDestination.handlerTable; } get majorFont() { return this.data.documentModel.colorProvider.officeTheme.fontScheme.majorFont; } get minorFont() { return this.data.documentModel.colorProvider.officeTheme.fontScheme.minorFont; } async processElementOpen(reader) { this.data.documentModel.colorProvider.officeTheme.fontScheme.name = this.data.readerHelper.readAttribute(reader, 'name'); } }