devexpress-richedit
Version:
DevExpress Rich Text Editor is an advanced word-processing tool designed for working with rich text documents.
15 lines (14 loc) • 758 B
JavaScript
import { SectionColumnProperties } from '../../../../../../common/model/section/section-column-properties';
import { Constants } from '@devexpress/utils/lib/constants';
import { LeafElementDestination } from '../destination';
export class ColumnDestination extends LeafElementDestination {
constructor(data, columnInfos) {
super(data);
this.columnInfos = columnInfos;
}
async processElementOpen(reader) {
const width = this.data.readerHelper.getWpSTIntegerValue(reader, 'w', Constants.MIN_SAFE_INTEGER);
if (width > 0)
this.columnInfos.push(new SectionColumnProperties(width, Math.max(0, this.data.readerHelper.getWpSTIntegerValue(reader, 'space', Constants.MIN_SAFE_INTEGER))));
}
}