import { OnOffElement, XmlComponent } from "file/xml-components"; import { CompatibilitySetting } from "./compatibility-setting/compatibility-setting"; // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // export interface ICompatibilityOptions { readonly doNotExpandShiftReturn?: boolean; readonly version?: number; } export class Compatibility extends XmlComponent { constructor(options: ICompatibilityOptions) { super("w:compat"); // Don't justify lines ending in soft line break setting if (options.doNotExpandShiftReturn !== undefined) { this.root.push(new OnOffElement("w:doNotExpandShiftReturn", options.doNotExpandShiftReturn)); } if (options.version) { this.root.push(new CompatibilitySetting(options.version)); } } }