devexpress-richedit
Version:
DevExpress Rich Text Editor is an advanced word-processing tool designed for working with rich text documents.
12 lines (11 loc) • 619 B
JavaScript
import { Constants } from '@devexpress/utils/lib/constants';
import { LeafElementDestination } from '../destination';
export class SectionPageNumberingDestination extends LeafElementDestination {
async processElementOpen(reader) {
const firstPageNumber = this.data.readerHelper.getWpSTIntegerValue(reader, 'start', Constants.MIN_SAFE_INTEGER);
if (firstPageNumber != Constants.MIN_SAFE_INTEGER) {
this.data.sectionImporter.properties.firstPageNumber = Math.max(0, firstPageNumber);
this.data.sectionImporter.properties.continueNumbering = false;
}
}
}