8995 lines
263 KiB
Plaintext
8995 lines
263 KiB
Plaintext
unit SharedML;
|
|
interface
|
|
uses TSSafeUnitConverter, DrawingML, DocxML;
|
|
|
|
type MathPr = class(OpenXmlCompositeElement)
|
|
public
|
|
function create();overload;
|
|
function create(_node: XmlNode);overload;
|
|
function create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
function Init();override;
|
|
function Copy(_obj: MathPr);override;
|
|
function Clone(): MathPr;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
|
|
// simple_type property
|
|
property DispDef read ReadXmlChildDispDef write WriteXmlChildDispDef;
|
|
function ReadXmlChildDispDef(): OpenXmlSimpleType;
|
|
function WriteXmlChildDispDef(_value: nil_or_OpenXmlSimpleType);
|
|
|
|
// normal property
|
|
property MathFont read ReadXmlChildMathFont write WriteXmlChildMathFont;
|
|
property BrkBin read ReadXmlChildBrkBin write WriteXmlChildBrkBin;
|
|
property BrkBinSub read ReadXmlChildBrkBinSub write WriteXmlChildBrkBinSub;
|
|
property SmallFrac read ReadXmlChildSmallFrac write WriteXmlChildSmallFrac;
|
|
property LMargin read ReadXmlChildLMargin write WriteXmlChildLMargin;
|
|
property RMargin read ReadXmlChildRMargin write WriteXmlChildRMargin;
|
|
property DefJc read ReadXmlChildDefJc write WriteXmlChildDefJc;
|
|
property WrapIndent read ReadXmlChildWrapIndent write WriteXmlChildWrapIndent;
|
|
property IntLim read ReadXmlChildIntLim write WriteXmlChildIntLim;
|
|
property NaryLim read ReadXmlChildNaryLim write WriteXmlChildNaryLim;
|
|
function ReadXmlChildMathFont(): PureMVal;
|
|
function WriteXmlChildMathFont(_p1: any; _p2: any);
|
|
function ReadXmlChildBrkBin(): PureMVal;
|
|
function WriteXmlChildBrkBin(_p1: any; _p2: any);
|
|
function ReadXmlChildBrkBinSub(): PureMVal;
|
|
function WriteXmlChildBrkBinSub(_p1: any; _p2: any);
|
|
function ReadXmlChildSmallFrac(): PureMVal;
|
|
function WriteXmlChildSmallFrac(_p1: any; _p2: any);
|
|
function ReadXmlChildLMargin(): PureMVal;
|
|
function WriteXmlChildLMargin(_p1: any; _p2: any);
|
|
function ReadXmlChildRMargin(): PureMVal;
|
|
function WriteXmlChildRMargin(_p1: any; _p2: any);
|
|
function ReadXmlChildDefJc(): PureMVal;
|
|
function WriteXmlChildDefJc(_p1: any; _p2: any);
|
|
function ReadXmlChildWrapIndent(): PureMVal;
|
|
function WriteXmlChildWrapIndent(_p1: any; _p2: any);
|
|
function ReadXmlChildIntLim(): PureMVal;
|
|
function WriteXmlChildIntLim(_p1: any; _p2: any);
|
|
function ReadXmlChildNaryLim(): PureMVal;
|
|
function WriteXmlChildNaryLim(_p1: any; _p2: any);
|
|
|
|
public
|
|
// Children
|
|
XmlChildMathFont: PureMVal;
|
|
XmlChildBrkBin: PureMVal;
|
|
XmlChildBrkBinSub: PureMVal;
|
|
XmlChildSmallFrac: PureMVal;
|
|
XmlChildDispDef: OpenXmlSimpleType;
|
|
XmlChildLMargin: PureMVal;
|
|
XmlChildRMargin: PureMVal;
|
|
XmlChildDefJc: PureMVal;
|
|
XmlChildWrapIndent: PureMVal;
|
|
XmlChildIntLim: PureMVal;
|
|
XmlChildNaryLim: PureMVal;
|
|
end;
|
|
|
|
type OMathPara = class(OpenXmlCompositeElement)
|
|
public
|
|
function create();overload;
|
|
function create(_node: XmlNode);overload;
|
|
function create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
function Init();override;
|
|
function Copy(_obj: OMathPara);override;
|
|
function Clone(): OMathPara;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
|
|
// normal property
|
|
property OMathParaPr read ReadXmlChildOMathParaPr write WriteXmlChildOMathParaPr;
|
|
property OMath read ReadXmlChildOMath write WriteXmlChildOMath;
|
|
function ReadXmlChildOMathParaPr(): OMathParaPr;
|
|
function WriteXmlChildOMathParaPr(_p1: any; _p2: any);
|
|
function ReadXmlChildOMath(): OMath;
|
|
function WriteXmlChildOMath(_p1: any; _p2: any);
|
|
|
|
public
|
|
// Children
|
|
XmlChildOMathParaPr: OMathParaPr;
|
|
XmlChildOMath: OMath;
|
|
end;
|
|
|
|
type OMathParaPr = class(OpenXmlCompositeElement)
|
|
public
|
|
function create();overload;
|
|
function create(_node: XmlNode);overload;
|
|
function create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
function Init();override;
|
|
function Copy(_obj: OMathParaPr);override;
|
|
function Clone(): OMathParaPr;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
|
|
// normal property
|
|
property Jc read ReadXmlChildJc write WriteXmlChildJc;
|
|
function ReadXmlChildJc(): PureMVal;
|
|
function WriteXmlChildJc(_p1: any; _p2: any);
|
|
|
|
public
|
|
// Children
|
|
XmlChildJc: PureMVal;
|
|
end;
|
|
|
|
type PureMVal = class(OpenXmlCompositeElement)
|
|
public
|
|
function create();overload;
|
|
function create(_node: XmlNode);overload;
|
|
function create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
function Init();override;
|
|
function Copy(_obj: PureMVal);override;
|
|
function Clone(): PureMVal;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
// attributes property
|
|
property Val read ReadXmlAttrVal write WriteXmlAttrVal;
|
|
function ReadXmlAttrVal();
|
|
function WriteXmlAttrVal(_value: any);
|
|
|
|
public
|
|
// Attributes
|
|
XmlAttrVal: OpenXmlAttribute;
|
|
|
|
end;
|
|
|
|
type OMath = class(OpenXmlCompositeElement)
|
|
public
|
|
function create();overload;
|
|
function create(_node: XmlNode);overload;
|
|
function create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
function Init();override;
|
|
function Copy(_obj: OMath);override;
|
|
function Clone(): OMath;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
|
|
// multi property
|
|
property Rs read ReadRs write WriteRs;
|
|
property Ds read ReadDs write WriteDs;
|
|
property Fs read ReadFs write WriteFs;
|
|
property Rads read ReadRads write WriteRads;
|
|
property SSubs read ReadSSubs write WriteSSubs;
|
|
property SSups read ReadSSups write WriteSSups;
|
|
property Naries read ReadNaries write WriteNaries;
|
|
property Funcs read ReadFuncs write WriteFuncs;
|
|
function ReadRs(_index: integer);
|
|
function WriteRs(_index: integer; _value: nil_OR_R);
|
|
function ReadDs(_index: integer);
|
|
function WriteDs(_index: integer; _value: nil_OR_D);
|
|
function ReadFs(_index: integer);
|
|
function WriteFs(_index: integer; _value: nil_OR_F);
|
|
function ReadRads(_index: integer);
|
|
function WriteRads(_index: integer; _value: nil_OR_Rad);
|
|
function ReadSSubs(_index: integer);
|
|
function WriteSSubs(_index: integer; _value: nil_OR_SSub);
|
|
function ReadSSups(_index: integer);
|
|
function WriteSSups(_index: integer; _value: nil_OR_SSup);
|
|
function ReadNaries(_index: integer);
|
|
function WriteNaries(_index: integer; _value: nil_OR_Nary);
|
|
function ReadFuncs(_index: integer);
|
|
function WriteFuncs(_index: integer; _value: nil_OR_Func);
|
|
function AddR(): R;
|
|
function AddD(): D;
|
|
function AddF(): F;
|
|
function AddRad(): Rad;
|
|
function AddSSub(): SSub;
|
|
function AddSSup(): SSup;
|
|
function AddNary(): Nary;
|
|
function AddFunc(): Func;
|
|
function AppendR(): R;
|
|
function AppendD(): D;
|
|
function AppendF(): F;
|
|
function AppendRad(): Rad;
|
|
function AppendSSub(): SSub;
|
|
function AppendSSup(): SSup;
|
|
function AppendNary(): Nary;
|
|
function AppendFunc(): Func;
|
|
|
|
public
|
|
// Children
|
|
end;
|
|
|
|
type R = class(OpenXmlCompositeElement)
|
|
public
|
|
function create();overload;
|
|
function create(_node: XmlNode);overload;
|
|
function create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
function Init();override;
|
|
function Copy(_obj: R);override;
|
|
function Clone(): R;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
|
|
// normal property
|
|
property RPr read ReadXmlChildRPr write WriteXmlChildRPr;
|
|
property ARPr read ReadXmlChildARPr write WriteXmlChildARPr;
|
|
property WRPr read ReadXmlChildWRPr write WriteXmlChildWRPr;
|
|
property T read ReadXmlChildT write WriteXmlChildT;
|
|
function ReadXmlChildRPr(_ns: string): RPr;
|
|
function WriteXmlChildRPr(_p1: any; _p2: any);
|
|
function ReadXmlChildARPr(): RPr;
|
|
function WriteXmlChildARPr(_p1: any; _p2: any);
|
|
function ReadXmlChildWRPr(): RPr;
|
|
function WriteXmlChildWRPr(_p1: any; _p2: any);
|
|
function ReadXmlChildT(): T;
|
|
function WriteXmlChildT(_p1: any; _p2: any);
|
|
|
|
public
|
|
// Children
|
|
XmlChildRPr: RPr;
|
|
XmlChildARPr: RPr;
|
|
XmlChildWRPr: RPr;
|
|
XmlChildT: T;
|
|
end;
|
|
|
|
type RPr = class(OpenXmlCompositeElement)
|
|
public
|
|
function create();overload;
|
|
function create(_node: XmlNode);overload;
|
|
function create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
function Init();override;
|
|
function Copy(_obj: RPr);override;
|
|
function Clone(): RPr;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
|
|
// normal property
|
|
property Sty read ReadXmlChildSty write WriteXmlChildSty;
|
|
function ReadXmlChildSty(): PureMVal;
|
|
function WriteXmlChildSty(_p1: any; _p2: any);
|
|
|
|
public
|
|
// Children
|
|
XmlChildSty: PureMVal;
|
|
end;
|
|
|
|
type T = class(OpenXmlTextElement)
|
|
public
|
|
function create();overload;
|
|
function create(_node: XmlNode);overload;
|
|
function create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
function Init();override;
|
|
function Copy(_obj: T);override;
|
|
function Clone(): T;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
// attributes property
|
|
property Space read ReadXmlAttrSpace write WriteXmlAttrSpace;
|
|
function ReadXmlAttrSpace();
|
|
function WriteXmlAttrSpace(_value: any);
|
|
|
|
public
|
|
// Attributes
|
|
XmlAttrSpace: OpenXmlAttribute;
|
|
|
|
end;
|
|
|
|
type D = class(OpenXmlCompositeElement)
|
|
public
|
|
function create();overload;
|
|
function create(_node: XmlNode);overload;
|
|
function create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
function Init();override;
|
|
function Copy(_obj: D);override;
|
|
function Clone(): D;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
|
|
// normal property
|
|
property DPr read ReadXmlChildDPr write WriteXmlChildDPr;
|
|
property E read ReadXmlChildE write WriteXmlChildE;
|
|
function ReadXmlChildDPr(): DPr;
|
|
function WriteXmlChildDPr(_p1: any; _p2: any);
|
|
function ReadXmlChildE(): E;
|
|
function WriteXmlChildE(_p1: any; _p2: any);
|
|
|
|
public
|
|
// Children
|
|
XmlChildDPr: DPr;
|
|
XmlChildE: E;
|
|
end;
|
|
|
|
type DPr = class(OpenXmlCompositeElement)
|
|
public
|
|
function create();overload;
|
|
function create(_node: XmlNode);overload;
|
|
function create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
function Init();override;
|
|
function Copy(_obj: DPr);override;
|
|
function Clone(): DPr;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
|
|
// normal property
|
|
property BegChr read ReadXmlChildBegChr write WriteXmlChildBegChr;
|
|
property EndChr read ReadXmlChildEndChr write WriteXmlChildEndChr;
|
|
property SepChr read ReadXmlChildSepChr write WriteXmlChildSepChr;
|
|
property Shp read ReadXmlChildShp write WriteXmlChildShp;
|
|
property Grow read ReadXmlChildGrow write WriteXmlChildGrow;
|
|
property CtrlPr read ReadXmlChildCtrlPr write WriteXmlChildCtrlPr;
|
|
property RPr read ReadXmlChildRPr write WriteXmlChildRPr;
|
|
function ReadXmlChildBegChr(): PureMVal;
|
|
function WriteXmlChildBegChr(_p1: any; _p2: any);
|
|
function ReadXmlChildEndChr(): PureMVal;
|
|
function WriteXmlChildEndChr(_p1: any; _p2: any);
|
|
function ReadXmlChildSepChr(): PureMVal;
|
|
function WriteXmlChildSepChr(_p1: any; _p2: any);
|
|
function ReadXmlChildShp(): PureMVal;
|
|
function WriteXmlChildShp(_p1: any; _p2: any);
|
|
function ReadXmlChildGrow(): PureMVal;
|
|
function WriteXmlChildGrow(_p1: any; _p2: any);
|
|
function ReadXmlChildCtrlPr(): CtrlPr;
|
|
function WriteXmlChildCtrlPr(_p1: any; _p2: any);
|
|
function ReadXmlChildRPr(): RPr;
|
|
function WriteXmlChildRPr(_p1: any; _p2: any);
|
|
|
|
public
|
|
// Children
|
|
XmlChildBegChr: PureMVal;
|
|
XmlChildEndChr: PureMVal;
|
|
XmlChildSepChr: PureMVal;
|
|
XmlChildShp: PureMVal;
|
|
XmlChildGrow: PureMVal;
|
|
XmlChildCtrlPr: CtrlPr;
|
|
XmlChildRPr: RPr;
|
|
end;
|
|
|
|
type CtrlPr = class(OpenXmlCompositeElement)
|
|
public
|
|
function create();overload;
|
|
function create(_node: XmlNode);overload;
|
|
function create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
function Init();override;
|
|
function Copy(_obj: CtrlPr);override;
|
|
function Clone(): CtrlPr;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
|
|
// normal property
|
|
property RPr read ReadXmlChildRPr write WriteXmlChildRPr;
|
|
property Del read ReadXmlChildDel write WriteXmlChildDel;
|
|
function ReadXmlChildRPr(): RPr;
|
|
function WriteXmlChildRPr(_p1: any; _p2: any);
|
|
function ReadXmlChildDel(): Del;
|
|
function WriteXmlChildDel(_p1: any; _p2: any);
|
|
|
|
public
|
|
// Children
|
|
XmlChildRPr: RPr;
|
|
XmlChildDel: Del;
|
|
end;
|
|
|
|
type SSup = class(OpenXmlCompositeElement)
|
|
public
|
|
function create();overload;
|
|
function create(_node: XmlNode);overload;
|
|
function create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
function Init();override;
|
|
function Copy(_obj: SSup);override;
|
|
function Clone(): SSup;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
|
|
// normal property
|
|
property SSupPr read ReadXmlChildSSupPr write WriteXmlChildSSupPr;
|
|
property E read ReadXmlChildE write WriteXmlChildE;
|
|
property Sup read ReadXmlChildSup write WriteXmlChildSup;
|
|
function ReadXmlChildSSupPr(): SSupPr;
|
|
function WriteXmlChildSSupPr(_p1: any; _p2: any);
|
|
function ReadXmlChildE(): E;
|
|
function WriteXmlChildE(_p1: any; _p2: any);
|
|
function ReadXmlChildSup(): Sup;
|
|
function WriteXmlChildSup(_p1: any; _p2: any);
|
|
|
|
public
|
|
// Children
|
|
XmlChildSSupPr: SSupPr;
|
|
XmlChildE: E;
|
|
XmlChildSup: Sup;
|
|
end;
|
|
|
|
type SSupPr = class(OpenXmlCompositeElement)
|
|
public
|
|
function create();overload;
|
|
function create(_node: XmlNode);overload;
|
|
function create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
function Init();override;
|
|
function Copy(_obj: SSupPr);override;
|
|
function Clone(): SSupPr;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
|
|
// normal property
|
|
property CtrlPr read ReadXmlChildCtrlPr write WriteXmlChildCtrlPr;
|
|
function ReadXmlChildCtrlPr(): CtrlPr;
|
|
function WriteXmlChildCtrlPr(_p1: any; _p2: any);
|
|
|
|
public
|
|
// Children
|
|
XmlChildCtrlPr: CtrlPr;
|
|
end;
|
|
|
|
type F = class(OpenXmlCompositeElement)
|
|
public
|
|
function create();overload;
|
|
function create(_node: XmlNode);overload;
|
|
function create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
function Init();override;
|
|
function Copy(_obj: F);override;
|
|
function Clone(): F;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
|
|
// normal property
|
|
property FPr read ReadXmlChildFPr write WriteXmlChildFPr;
|
|
property Num read ReadXmlChildNum write WriteXmlChildNum;
|
|
property Den read ReadXmlChildDen write WriteXmlChildDen;
|
|
function ReadXmlChildFPr(): FPr;
|
|
function WriteXmlChildFPr(_p1: any; _p2: any);
|
|
function ReadXmlChildNum(): Num;
|
|
function WriteXmlChildNum(_p1: any; _p2: any);
|
|
function ReadXmlChildDen(): Den;
|
|
function WriteXmlChildDen(_p1: any; _p2: any);
|
|
|
|
public
|
|
// Children
|
|
XmlChildFPr: FPr;
|
|
XmlChildNum: Num;
|
|
XmlChildDen: Den;
|
|
end;
|
|
|
|
type FPr = class(OpenXmlCompositeElement)
|
|
public
|
|
function create();overload;
|
|
function create(_node: XmlNode);overload;
|
|
function create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
function Init();override;
|
|
function Copy(_obj: FPr);override;
|
|
function Clone(): FPr;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
|
|
// normal property
|
|
property Type read ReadXmlChildType write WriteXmlChildType;
|
|
property CtrlPr read ReadXmlChildCtrlPr write WriteXmlChildCtrlPr;
|
|
function ReadXmlChildType(): PureMVal;
|
|
function WriteXmlChildType(_p1: any; _p2: any);
|
|
function ReadXmlChildCtrlPr(): CtrlPr;
|
|
function WriteXmlChildCtrlPr(_p1: any; _p2: any);
|
|
|
|
public
|
|
// Children
|
|
XmlChildType: PureMVal;
|
|
XmlChildCtrlPr: CtrlPr;
|
|
end;
|
|
|
|
type Rad = class(OpenXmlCompositeElement)
|
|
public
|
|
function create();overload;
|
|
function create(_node: XmlNode);overload;
|
|
function create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
function Init();override;
|
|
function Copy(_obj: Rad);override;
|
|
function Clone(): Rad;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
|
|
// normal property
|
|
property RadPr read ReadXmlChildRadPr write WriteXmlChildRadPr;
|
|
property Deg read ReadXmlChildDeg write WriteXmlChildDeg;
|
|
property E read ReadXmlChildE write WriteXmlChildE;
|
|
function ReadXmlChildRadPr(): RadPr;
|
|
function WriteXmlChildRadPr(_p1: any; _p2: any);
|
|
function ReadXmlChildDeg(): Deg;
|
|
function WriteXmlChildDeg(_p1: any; _p2: any);
|
|
function ReadXmlChildE(): E;
|
|
function WriteXmlChildE(_p1: any; _p2: any);
|
|
|
|
public
|
|
// Children
|
|
XmlChildRadPr: RadPr;
|
|
XmlChildDeg: Deg;
|
|
XmlChildE: E;
|
|
end;
|
|
|
|
type RadPr = class(OpenXmlCompositeElement)
|
|
public
|
|
function create();overload;
|
|
function create(_node: XmlNode);overload;
|
|
function create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
function Init();override;
|
|
function Copy(_obj: RadPr);override;
|
|
function Clone(): RadPr;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
|
|
// normal property
|
|
property DegHide read ReadXmlChildDegHide write WriteXmlChildDegHide;
|
|
property CtrlPr read ReadXmlChildCtrlPr write WriteXmlChildCtrlPr;
|
|
function ReadXmlChildDegHide(): PureMVal;
|
|
function WriteXmlChildDegHide(_p1: any; _p2: any);
|
|
function ReadXmlChildCtrlPr(): CtrlPr;
|
|
function WriteXmlChildCtrlPr(_p1: any; _p2: any);
|
|
|
|
public
|
|
// Children
|
|
XmlChildDegHide: PureMVal;
|
|
XmlChildCtrlPr: CtrlPr;
|
|
end;
|
|
|
|
type SSub = class(OpenXmlCompositeElement)
|
|
public
|
|
function create();overload;
|
|
function create(_node: XmlNode);overload;
|
|
function create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
function Init();override;
|
|
function Copy(_obj: SSub);override;
|
|
function Clone(): SSub;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
|
|
// normal property
|
|
property SSubPr read ReadXmlChildSSubPr write WriteXmlChildSSubPr;
|
|
property E read ReadXmlChildE write WriteXmlChildE;
|
|
property Sub read ReadXmlChildSub write WriteXmlChildSub;
|
|
function ReadXmlChildSSubPr(): SSubPr;
|
|
function WriteXmlChildSSubPr(_p1: any; _p2: any);
|
|
function ReadXmlChildE(): E;
|
|
function WriteXmlChildE(_p1: any; _p2: any);
|
|
function ReadXmlChildSub(): Sub;
|
|
function WriteXmlChildSub(_p1: any; _p2: any);
|
|
|
|
public
|
|
// Children
|
|
XmlChildSSubPr: SSubPr;
|
|
XmlChildE: E;
|
|
XmlChildSub: Sub;
|
|
end;
|
|
|
|
type SSubPr = class(OpenXmlCompositeElement)
|
|
public
|
|
function create();overload;
|
|
function create(_node: XmlNode);overload;
|
|
function create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
function Init();override;
|
|
function Copy(_obj: SSubPr);override;
|
|
function Clone(): SSubPr;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
|
|
// normal property
|
|
property CtrlPr read ReadXmlChildCtrlPr write WriteXmlChildCtrlPr;
|
|
function ReadXmlChildCtrlPr(): CtrlPr;
|
|
function WriteXmlChildCtrlPr(_p1: any; _p2: any);
|
|
|
|
public
|
|
// Children
|
|
XmlChildCtrlPr: CtrlPr;
|
|
end;
|
|
|
|
type Nary = class(OpenXmlCompositeElement)
|
|
public
|
|
function create();overload;
|
|
function create(_node: XmlNode);overload;
|
|
function create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
function Init();override;
|
|
function Copy(_obj: Nary);override;
|
|
function Clone(): Nary;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
|
|
// normal property
|
|
property NaryPr read ReadXmlChildNaryPr write WriteXmlChildNaryPr;
|
|
property Sub read ReadXmlChildSub write WriteXmlChildSub;
|
|
property Sup read ReadXmlChildSup write WriteXmlChildSup;
|
|
property E read ReadXmlChildE write WriteXmlChildE;
|
|
function ReadXmlChildNaryPr(): NaryPr;
|
|
function WriteXmlChildNaryPr(_p1: any; _p2: any);
|
|
function ReadXmlChildSub(): Sub;
|
|
function WriteXmlChildSub(_p1: any; _p2: any);
|
|
function ReadXmlChildSup(): Sup;
|
|
function WriteXmlChildSup(_p1: any; _p2: any);
|
|
function ReadXmlChildE(): E;
|
|
function WriteXmlChildE(_p1: any; _p2: any);
|
|
|
|
public
|
|
// Children
|
|
XmlChildNaryPr: NaryPr;
|
|
XmlChildSub: Sub;
|
|
XmlChildSup: Sup;
|
|
XmlChildE: E;
|
|
end;
|
|
|
|
type NaryPr = class(OpenXmlCompositeElement)
|
|
public
|
|
function create();overload;
|
|
function create(_node: XmlNode);overload;
|
|
function create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
function Init();override;
|
|
function Copy(_obj: NaryPr);override;
|
|
function Clone(): NaryPr;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
|
|
// normal property
|
|
property Chr read ReadXmlChildChr write WriteXmlChildChr;
|
|
property Grow read ReadXmlChildGrow write WriteXmlChildGrow;
|
|
property SubHide read ReadXmlChildSubHide write WriteXmlChildSubHide;
|
|
property SupHide read ReadXmlChildSupHide write WriteXmlChildSupHide;
|
|
property LimLoc read ReadXmlChildLimLoc write WriteXmlChildLimLoc;
|
|
property CtrlPr read ReadXmlChildCtrlPr write WriteXmlChildCtrlPr;
|
|
function ReadXmlChildChr(): PureMVal;
|
|
function WriteXmlChildChr(_p1: any; _p2: any);
|
|
function ReadXmlChildGrow(): PureMVal;
|
|
function WriteXmlChildGrow(_p1: any; _p2: any);
|
|
function ReadXmlChildSubHide(): PureMVal;
|
|
function WriteXmlChildSubHide(_p1: any; _p2: any);
|
|
function ReadXmlChildSupHide(): PureMVal;
|
|
function WriteXmlChildSupHide(_p1: any; _p2: any);
|
|
function ReadXmlChildLimLoc(): PureMVal;
|
|
function WriteXmlChildLimLoc(_p1: any; _p2: any);
|
|
function ReadXmlChildCtrlPr(): CtrlPr;
|
|
function WriteXmlChildCtrlPr(_p1: any; _p2: any);
|
|
|
|
public
|
|
// Children
|
|
XmlChildChr: PureMVal;
|
|
XmlChildGrow: PureMVal;
|
|
XmlChildSubHide: PureMVal;
|
|
XmlChildSupHide: PureMVal;
|
|
XmlChildLimLoc: PureMVal;
|
|
XmlChildCtrlPr: CtrlPr;
|
|
end;
|
|
|
|
type Func = class(OpenXmlCompositeElement)
|
|
public
|
|
function create();overload;
|
|
function create(_node: XmlNode);overload;
|
|
function create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
function Init();override;
|
|
function Copy(_obj: Func);override;
|
|
function Clone(): Func;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
|
|
// normal property
|
|
property FuncPr read ReadXmlChildFuncPr write WriteXmlChildFuncPr;
|
|
property FName read ReadXmlChildFName write WriteXmlChildFName;
|
|
property E read ReadXmlChildE write WriteXmlChildE;
|
|
function ReadXmlChildFuncPr(): FuncPr;
|
|
function WriteXmlChildFuncPr(_p1: any; _p2: any);
|
|
function ReadXmlChildFName(): FName;
|
|
function WriteXmlChildFName(_p1: any; _p2: any);
|
|
function ReadXmlChildE(): E;
|
|
function WriteXmlChildE(_p1: any; _p2: any);
|
|
|
|
public
|
|
// Children
|
|
XmlChildFuncPr: FuncPr;
|
|
XmlChildFName: FName;
|
|
XmlChildE: E;
|
|
end;
|
|
|
|
type FName = class(OpenXmlCompositeElement)
|
|
public
|
|
function create();overload;
|
|
function create(_node: XmlNode);overload;
|
|
function create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
function Init();override;
|
|
function Copy(_obj: FName);override;
|
|
function Clone(): FName;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
|
|
// multi property
|
|
property Rs read ReadRs write WriteRs;
|
|
function ReadRs(_index: integer);
|
|
function WriteRs(_index: integer; _value: nil_OR_R);
|
|
function AddR(): R;
|
|
function AppendR(): R;
|
|
|
|
public
|
|
// Children
|
|
end;
|
|
|
|
type FuncPr = class(OpenXmlCompositeElement)
|
|
public
|
|
function create();overload;
|
|
function create(_node: XmlNode);overload;
|
|
function create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
function Init();override;
|
|
function Copy(_obj: FuncPr);override;
|
|
function Clone(): FuncPr;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
|
|
// normal property
|
|
property CtrlPr read ReadXmlChildCtrlPr write WriteXmlChildCtrlPr;
|
|
function ReadXmlChildCtrlPr(): CtrlPr;
|
|
function WriteXmlChildCtrlPr(_p1: any; _p2: any);
|
|
|
|
public
|
|
// Children
|
|
XmlChildCtrlPr: CtrlPr;
|
|
end;
|
|
|
|
type CoreProperties = class(OpenXmlCompositeElement)
|
|
public
|
|
function create();overload;
|
|
function create(_node: XmlNode);overload;
|
|
function create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
function Init();override;
|
|
function Copy(_obj: CoreProperties);override;
|
|
function Clone(): CoreProperties;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
|
|
// pcdata property
|
|
property Title read ReadXmlChildTitle write WriteXmlChildTitle;
|
|
property Subject read ReadXmlChildSubject write WriteXmlChildSubject;
|
|
property Creator read ReadXmlChildCreator write WriteXmlChildCreator;
|
|
property Keywords read ReadXmlChildKeywords write WriteXmlChildKeywords;
|
|
property Description read ReadXmlChildDescription write WriteXmlChildDescription;
|
|
property LastModifiedBy read ReadXmlChildLastModifiedBy write WriteXmlChildLastModifiedBy;
|
|
property Revision read ReadXmlChildRevision write WriteXmlChildRevision;
|
|
property LastPrinted read ReadXmlChildLastPrinted write WriteXmlChildLastPrinted;
|
|
property Created read ReadXmlChildCreated write WriteXmlChildCreated;
|
|
property Modified read ReadXmlChildModified write WriteXmlChildModified;
|
|
function ReadXmlChildTitle();
|
|
function WriteXmlChildTitle(_value: nil_or_OpenXmlTextElement);
|
|
function ReadXmlChildSubject();
|
|
function WriteXmlChildSubject(_value: nil_or_OpenXmlTextElement);
|
|
function ReadXmlChildCreator();
|
|
function WriteXmlChildCreator(_value: nil_or_OpenXmlTextElement);
|
|
function ReadXmlChildKeywords();
|
|
function WriteXmlChildKeywords(_value: nil_or_OpenXmlTextElement);
|
|
function ReadXmlChildDescription();
|
|
function WriteXmlChildDescription(_value: nil_or_OpenXmlTextElement);
|
|
function ReadXmlChildLastModifiedBy();
|
|
function WriteXmlChildLastModifiedBy(_value: nil_or_OpenXmlTextElement);
|
|
function ReadXmlChildRevision();
|
|
function WriteXmlChildRevision(_value: nil_or_OpenXmlTextElement);
|
|
function ReadXmlChildLastPrinted();
|
|
function WriteXmlChildLastPrinted(_value: nil_or_OpenXmlTextElement);
|
|
function ReadXmlChildCreated();
|
|
function WriteXmlChildCreated(_value: nil_or_Created);
|
|
function ReadXmlChildModified();
|
|
function WriteXmlChildModified(_value: nil_or_Modified);
|
|
|
|
public
|
|
// Children
|
|
XmlChildTitle: OpenXmlTextElement;
|
|
XmlChildSubject: OpenXmlTextElement;
|
|
XmlChildCreator: OpenXmlTextElement;
|
|
XmlChildKeywords: OpenXmlTextElement;
|
|
XmlChildDescription: OpenXmlTextElement;
|
|
XmlChildLastModifiedBy: OpenXmlTextElement;
|
|
XmlChildRevision: OpenXmlTextElement;
|
|
XmlChildLastPrinted: OpenXmlTextElement;
|
|
XmlChildCreated: Created;
|
|
XmlChildModified: Modified;
|
|
end;
|
|
|
|
type Created = class(OpenXmlTextElement)
|
|
public
|
|
function create();overload;
|
|
function create(_node: XmlNode);overload;
|
|
function create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
function Init();override;
|
|
function Copy(_obj: Created);override;
|
|
function Clone(): Created;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
// attributes property
|
|
property Type read ReadXmlAttrType write WriteXmlAttrType;
|
|
function ReadXmlAttrType();
|
|
function WriteXmlAttrType(_value: any);
|
|
|
|
public
|
|
// Attributes
|
|
XmlAttrType: OpenXmlAttribute;
|
|
|
|
end;
|
|
|
|
type Modified = class(OpenXmlTextElement)
|
|
public
|
|
function create();overload;
|
|
function create(_node: XmlNode);overload;
|
|
function create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
function Init();override;
|
|
function Copy(_obj: Modified);override;
|
|
function Clone(): Modified;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
// attributes property
|
|
property Type read ReadXmlAttrType write WriteXmlAttrType;
|
|
function ReadXmlAttrType();
|
|
function WriteXmlAttrType(_value: any);
|
|
|
|
public
|
|
// Attributes
|
|
XmlAttrType: OpenXmlAttribute;
|
|
|
|
end;
|
|
|
|
type Relationships = class(OpenXmlCompositeElement)
|
|
public
|
|
function create();overload;
|
|
function create(_node: XmlNode);overload;
|
|
function create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
function Init();override;
|
|
function Copy(_obj: Relationships);override;
|
|
function Clone(): Relationships;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
|
|
// multi property
|
|
property Relationships read ReadRelationships write WriteRelationships;
|
|
function ReadRelationships(_index: integer);
|
|
function WriteRelationships(_index: integer; _value: nil_OR_Relationship);
|
|
function AddRelationship(): Relationship;
|
|
function AppendRelationship(): Relationship;
|
|
|
|
public
|
|
// Children
|
|
end;
|
|
|
|
type Relationship = class(OpenXmlCompositeElement)
|
|
public
|
|
function create();overload;
|
|
function create(_node: XmlNode);overload;
|
|
function create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
function Init();override;
|
|
function Copy(_obj: Relationship);override;
|
|
function Clone(): Relationship;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
// attributes property
|
|
property Id read ReadXmlAttrId write WriteXmlAttrId;
|
|
property Type read ReadXmlAttrType write WriteXmlAttrType;
|
|
property Target read ReadXmlAttrTarget write WriteXmlAttrTarget;
|
|
function ReadXmlAttrId();
|
|
function WriteXmlAttrId(_value: any);
|
|
function ReadXmlAttrType();
|
|
function WriteXmlAttrType(_value: any);
|
|
function ReadXmlAttrTarget();
|
|
function WriteXmlAttrTarget(_value: any);
|
|
|
|
public
|
|
// Attributes
|
|
XmlAttrId: OpenXmlAttribute;
|
|
XmlAttrType: OpenXmlAttribute;
|
|
XmlAttrTarget: OpenXmlAttribute;
|
|
|
|
end;
|
|
|
|
type Types = class(OpenXmlCompositeElement)
|
|
public
|
|
function create();overload;
|
|
function create(_node: XmlNode);overload;
|
|
function create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
function Init();override;
|
|
function Copy(_obj: Types);override;
|
|
function Clone(): Types;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
|
|
// multi property
|
|
property Defaults read ReadDefaults write WriteDefaults;
|
|
property Overrides read ReadOverrides write WriteOverrides;
|
|
function ReadDefaults(_index: integer);
|
|
function WriteDefaults(_index: integer; _value: nil_OR_Default);
|
|
function ReadOverrides(_index: integer);
|
|
function WriteOverrides(_index: integer; _value: nil_OR__Override);
|
|
function AddDefault(): Default;
|
|
function AddOverride(): _Override;
|
|
function AppendDefault(): Default;
|
|
function AppendOverride(): _Override;
|
|
|
|
public
|
|
// Children
|
|
end;
|
|
|
|
type Default = class(OpenXmlCompositeElement)
|
|
public
|
|
function create();overload;
|
|
function create(_node: XmlNode);overload;
|
|
function create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
function Init();override;
|
|
function Copy(_obj: Default);override;
|
|
function Clone(): Default;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
// attributes property
|
|
property Extension read ReadXmlAttrExtension write WriteXmlAttrExtension;
|
|
property ContentType read ReadXmlAttrContentType write WriteXmlAttrContentType;
|
|
function ReadXmlAttrExtension();
|
|
function WriteXmlAttrExtension(_value: any);
|
|
function ReadXmlAttrContentType();
|
|
function WriteXmlAttrContentType(_value: any);
|
|
|
|
public
|
|
// Attributes
|
|
XmlAttrExtension: OpenXmlAttribute;
|
|
XmlAttrContentType: OpenXmlAttribute;
|
|
|
|
end;
|
|
|
|
type _Override = class(OpenXmlCompositeElement)
|
|
public
|
|
function create();overload;
|
|
function create(_node: XmlNode);overload;
|
|
function create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
function Init();override;
|
|
function Copy(_obj: _Override);override;
|
|
function Clone(): _Override;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
// attributes property
|
|
property PartName read ReadXmlAttrPartName write WriteXmlAttrPartName;
|
|
property ContentType read ReadXmlAttrContentType write WriteXmlAttrContentType;
|
|
function ReadXmlAttrPartName();
|
|
function WriteXmlAttrPartName(_value: any);
|
|
function ReadXmlAttrContentType();
|
|
function WriteXmlAttrContentType(_value: any);
|
|
|
|
public
|
|
// Attributes
|
|
XmlAttrPartName: OpenXmlAttribute;
|
|
XmlAttrContentType: OpenXmlAttribute;
|
|
|
|
end;
|
|
|
|
type Num = class(OpenXmlCompositeElement)
|
|
public
|
|
function create();overload;
|
|
function create(_node: XmlNode);overload;
|
|
function create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
function Init();override;
|
|
function Copy(_obj: Num);override;
|
|
function Clone(): Num;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
|
|
// normal property
|
|
property CtrlPr read ReadXmlChildCtrlPr write WriteXmlChildCtrlPr;
|
|
function ReadXmlChildCtrlPr(): CtrlPr;
|
|
function WriteXmlChildCtrlPr(_p1: any; _p2: any);
|
|
|
|
// multi property
|
|
property Rs read ReadRs write WriteRs;
|
|
property Ds read ReadDs write WriteDs;
|
|
property Fs read ReadFs write WriteFs;
|
|
property Rads read ReadRads write WriteRads;
|
|
property SSubs read ReadSSubs write WriteSSubs;
|
|
property SSups read ReadSSups write WriteSSups;
|
|
property Naries read ReadNaries write WriteNaries;
|
|
property Funcs read ReadFuncs write WriteFuncs;
|
|
function ReadRs(_index: integer);
|
|
function WriteRs(_index: integer; _value: nil_OR_R);
|
|
function ReadDs(_index: integer);
|
|
function WriteDs(_index: integer; _value: nil_OR_D);
|
|
function ReadFs(_index: integer);
|
|
function WriteFs(_index: integer; _value: nil_OR_F);
|
|
function ReadRads(_index: integer);
|
|
function WriteRads(_index: integer; _value: nil_OR_Rad);
|
|
function ReadSSubs(_index: integer);
|
|
function WriteSSubs(_index: integer; _value: nil_OR_SSub);
|
|
function ReadSSups(_index: integer);
|
|
function WriteSSups(_index: integer; _value: nil_OR_SSup);
|
|
function ReadNaries(_index: integer);
|
|
function WriteNaries(_index: integer; _value: nil_OR_Nary);
|
|
function ReadFuncs(_index: integer);
|
|
function WriteFuncs(_index: integer; _value: nil_OR_Func);
|
|
function AddR(): R;
|
|
function AddD(): D;
|
|
function AddF(): F;
|
|
function AddRad(): Rad;
|
|
function AddSSub(): SSub;
|
|
function AddSSup(): SSup;
|
|
function AddNary(): Nary;
|
|
function AddFunc(): Func;
|
|
function AppendR(): R;
|
|
function AppendD(): D;
|
|
function AppendF(): F;
|
|
function AppendRad(): Rad;
|
|
function AppendSSub(): SSub;
|
|
function AppendSSup(): SSup;
|
|
function AppendNary(): Nary;
|
|
function AppendFunc(): Func;
|
|
|
|
public
|
|
// Children
|
|
XmlChildCtrlPr: CtrlPr;
|
|
end;
|
|
|
|
type Deg = class(OpenXmlCompositeElement)
|
|
public
|
|
function create();overload;
|
|
function create(_node: XmlNode);overload;
|
|
function create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
function Init();override;
|
|
function Copy(_obj: Deg);override;
|
|
function Clone(): Deg;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
|
|
// normal property
|
|
property CtrlPr read ReadXmlChildCtrlPr write WriteXmlChildCtrlPr;
|
|
function ReadXmlChildCtrlPr(): CtrlPr;
|
|
function WriteXmlChildCtrlPr(_p1: any; _p2: any);
|
|
|
|
// multi property
|
|
property Rs read ReadRs write WriteRs;
|
|
property Ds read ReadDs write WriteDs;
|
|
property Fs read ReadFs write WriteFs;
|
|
property Rads read ReadRads write WriteRads;
|
|
property SSubs read ReadSSubs write WriteSSubs;
|
|
property SSups read ReadSSups write WriteSSups;
|
|
property Naries read ReadNaries write WriteNaries;
|
|
property Funcs read ReadFuncs write WriteFuncs;
|
|
function ReadRs(_index: integer);
|
|
function WriteRs(_index: integer; _value: nil_OR_R);
|
|
function ReadDs(_index: integer);
|
|
function WriteDs(_index: integer; _value: nil_OR_D);
|
|
function ReadFs(_index: integer);
|
|
function WriteFs(_index: integer; _value: nil_OR_F);
|
|
function ReadRads(_index: integer);
|
|
function WriteRads(_index: integer; _value: nil_OR_Rad);
|
|
function ReadSSubs(_index: integer);
|
|
function WriteSSubs(_index: integer; _value: nil_OR_SSub);
|
|
function ReadSSups(_index: integer);
|
|
function WriteSSups(_index: integer; _value: nil_OR_SSup);
|
|
function ReadNaries(_index: integer);
|
|
function WriteNaries(_index: integer; _value: nil_OR_Nary);
|
|
function ReadFuncs(_index: integer);
|
|
function WriteFuncs(_index: integer; _value: nil_OR_Func);
|
|
function AddR(): R;
|
|
function AddD(): D;
|
|
function AddF(): F;
|
|
function AddRad(): Rad;
|
|
function AddSSub(): SSub;
|
|
function AddSSup(): SSup;
|
|
function AddNary(): Nary;
|
|
function AddFunc(): Func;
|
|
function AppendR(): R;
|
|
function AppendD(): D;
|
|
function AppendF(): F;
|
|
function AppendRad(): Rad;
|
|
function AppendSSub(): SSub;
|
|
function AppendSSup(): SSup;
|
|
function AppendNary(): Nary;
|
|
function AppendFunc(): Func;
|
|
|
|
public
|
|
// Children
|
|
XmlChildCtrlPr: CtrlPr;
|
|
end;
|
|
|
|
type E = class(OpenXmlCompositeElement)
|
|
public
|
|
function create();overload;
|
|
function create(_node: XmlNode);overload;
|
|
function create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
function Init();override;
|
|
function Copy(_obj: E);override;
|
|
function Clone(): E;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
|
|
// normal property
|
|
property CtrlPr read ReadXmlChildCtrlPr write WriteXmlChildCtrlPr;
|
|
function ReadXmlChildCtrlPr(): CtrlPr;
|
|
function WriteXmlChildCtrlPr(_p1: any; _p2: any);
|
|
|
|
// multi property
|
|
property Rs read ReadRs write WriteRs;
|
|
property Ds read ReadDs write WriteDs;
|
|
property Fs read ReadFs write WriteFs;
|
|
property Rads read ReadRads write WriteRads;
|
|
property SSubs read ReadSSubs write WriteSSubs;
|
|
property SSups read ReadSSups write WriteSSups;
|
|
property Naries read ReadNaries write WriteNaries;
|
|
property Funcs read ReadFuncs write WriteFuncs;
|
|
function ReadRs(_index: integer);
|
|
function WriteRs(_index: integer; _value: nil_OR_R);
|
|
function ReadDs(_index: integer);
|
|
function WriteDs(_index: integer; _value: nil_OR_D);
|
|
function ReadFs(_index: integer);
|
|
function WriteFs(_index: integer; _value: nil_OR_F);
|
|
function ReadRads(_index: integer);
|
|
function WriteRads(_index: integer; _value: nil_OR_Rad);
|
|
function ReadSSubs(_index: integer);
|
|
function WriteSSubs(_index: integer; _value: nil_OR_SSub);
|
|
function ReadSSups(_index: integer);
|
|
function WriteSSups(_index: integer; _value: nil_OR_SSup);
|
|
function ReadNaries(_index: integer);
|
|
function WriteNaries(_index: integer; _value: nil_OR_Nary);
|
|
function ReadFuncs(_index: integer);
|
|
function WriteFuncs(_index: integer; _value: nil_OR_Func);
|
|
function AddR(): R;
|
|
function AddD(): D;
|
|
function AddF(): F;
|
|
function AddRad(): Rad;
|
|
function AddSSub(): SSub;
|
|
function AddSSup(): SSup;
|
|
function AddNary(): Nary;
|
|
function AddFunc(): Func;
|
|
function AppendR(): R;
|
|
function AppendD(): D;
|
|
function AppendF(): F;
|
|
function AppendRad(): Rad;
|
|
function AppendSSub(): SSub;
|
|
function AppendSSup(): SSup;
|
|
function AppendNary(): Nary;
|
|
function AppendFunc(): Func;
|
|
|
|
public
|
|
// Children
|
|
XmlChildCtrlPr: CtrlPr;
|
|
end;
|
|
|
|
type Sup = class(OpenXmlCompositeElement)
|
|
public
|
|
function create();overload;
|
|
function create(_node: XmlNode);overload;
|
|
function create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
function Init();override;
|
|
function Copy(_obj: Sup);override;
|
|
function Clone(): Sup;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
|
|
// normal property
|
|
property CtrlPr read ReadXmlChildCtrlPr write WriteXmlChildCtrlPr;
|
|
function ReadXmlChildCtrlPr(): CtrlPr;
|
|
function WriteXmlChildCtrlPr(_p1: any; _p2: any);
|
|
|
|
// multi property
|
|
property Rs read ReadRs write WriteRs;
|
|
property Ds read ReadDs write WriteDs;
|
|
property Fs read ReadFs write WriteFs;
|
|
property Rads read ReadRads write WriteRads;
|
|
property SSubs read ReadSSubs write WriteSSubs;
|
|
property SSups read ReadSSups write WriteSSups;
|
|
property Naries read ReadNaries write WriteNaries;
|
|
property Funcs read ReadFuncs write WriteFuncs;
|
|
function ReadRs(_index: integer);
|
|
function WriteRs(_index: integer; _value: nil_OR_R);
|
|
function ReadDs(_index: integer);
|
|
function WriteDs(_index: integer; _value: nil_OR_D);
|
|
function ReadFs(_index: integer);
|
|
function WriteFs(_index: integer; _value: nil_OR_F);
|
|
function ReadRads(_index: integer);
|
|
function WriteRads(_index: integer; _value: nil_OR_Rad);
|
|
function ReadSSubs(_index: integer);
|
|
function WriteSSubs(_index: integer; _value: nil_OR_SSub);
|
|
function ReadSSups(_index: integer);
|
|
function WriteSSups(_index: integer; _value: nil_OR_SSup);
|
|
function ReadNaries(_index: integer);
|
|
function WriteNaries(_index: integer; _value: nil_OR_Nary);
|
|
function ReadFuncs(_index: integer);
|
|
function WriteFuncs(_index: integer; _value: nil_OR_Func);
|
|
function AddR(): R;
|
|
function AddD(): D;
|
|
function AddF(): F;
|
|
function AddRad(): Rad;
|
|
function AddSSub(): SSub;
|
|
function AddSSup(): SSup;
|
|
function AddNary(): Nary;
|
|
function AddFunc(): Func;
|
|
function AppendR(): R;
|
|
function AppendD(): D;
|
|
function AppendF(): F;
|
|
function AppendRad(): Rad;
|
|
function AppendSSub(): SSub;
|
|
function AppendSSup(): SSup;
|
|
function AppendNary(): Nary;
|
|
function AppendFunc(): Func;
|
|
|
|
public
|
|
// Children
|
|
XmlChildCtrlPr: CtrlPr;
|
|
end;
|
|
|
|
type Den = class(OpenXmlCompositeElement)
|
|
public
|
|
function create();overload;
|
|
function create(_node: XmlNode);overload;
|
|
function create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
function Init();override;
|
|
function Copy(_obj: Den);override;
|
|
function Clone(): Den;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
|
|
// normal property
|
|
property CtrlPr read ReadXmlChildCtrlPr write WriteXmlChildCtrlPr;
|
|
function ReadXmlChildCtrlPr(): CtrlPr;
|
|
function WriteXmlChildCtrlPr(_p1: any; _p2: any);
|
|
|
|
// multi property
|
|
property Rs read ReadRs write WriteRs;
|
|
property Ds read ReadDs write WriteDs;
|
|
property Fs read ReadFs write WriteFs;
|
|
property Rads read ReadRads write WriteRads;
|
|
property SSubs read ReadSSubs write WriteSSubs;
|
|
property SSups read ReadSSups write WriteSSups;
|
|
property Naries read ReadNaries write WriteNaries;
|
|
property Funcs read ReadFuncs write WriteFuncs;
|
|
function ReadRs(_index: integer);
|
|
function WriteRs(_index: integer; _value: nil_OR_R);
|
|
function ReadDs(_index: integer);
|
|
function WriteDs(_index: integer; _value: nil_OR_D);
|
|
function ReadFs(_index: integer);
|
|
function WriteFs(_index: integer; _value: nil_OR_F);
|
|
function ReadRads(_index: integer);
|
|
function WriteRads(_index: integer; _value: nil_OR_Rad);
|
|
function ReadSSubs(_index: integer);
|
|
function WriteSSubs(_index: integer; _value: nil_OR_SSub);
|
|
function ReadSSups(_index: integer);
|
|
function WriteSSups(_index: integer; _value: nil_OR_SSup);
|
|
function ReadNaries(_index: integer);
|
|
function WriteNaries(_index: integer; _value: nil_OR_Nary);
|
|
function ReadFuncs(_index: integer);
|
|
function WriteFuncs(_index: integer; _value: nil_OR_Func);
|
|
function AddR(): R;
|
|
function AddD(): D;
|
|
function AddF(): F;
|
|
function AddRad(): Rad;
|
|
function AddSSub(): SSub;
|
|
function AddSSup(): SSup;
|
|
function AddNary(): Nary;
|
|
function AddFunc(): Func;
|
|
function AppendR(): R;
|
|
function AppendD(): D;
|
|
function AppendF(): F;
|
|
function AppendRad(): Rad;
|
|
function AppendSSub(): SSub;
|
|
function AppendSSup(): SSup;
|
|
function AppendNary(): Nary;
|
|
function AppendFunc(): Func;
|
|
|
|
public
|
|
// Children
|
|
XmlChildCtrlPr: CtrlPr;
|
|
end;
|
|
|
|
type Sub = class(OpenXmlCompositeElement)
|
|
public
|
|
function create();overload;
|
|
function create(_node: XmlNode);overload;
|
|
function create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
function Init();override;
|
|
function Copy(_obj: Sub);override;
|
|
function Clone(): Sub;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
|
|
// normal property
|
|
property CtrlPr read ReadXmlChildCtrlPr write WriteXmlChildCtrlPr;
|
|
function ReadXmlChildCtrlPr(): CtrlPr;
|
|
function WriteXmlChildCtrlPr(_p1: any; _p2: any);
|
|
|
|
// multi property
|
|
property Rs read ReadRs write WriteRs;
|
|
property Ds read ReadDs write WriteDs;
|
|
property Fs read ReadFs write WriteFs;
|
|
property Rads read ReadRads write WriteRads;
|
|
property SSubs read ReadSSubs write WriteSSubs;
|
|
property SSups read ReadSSups write WriteSSups;
|
|
property Naries read ReadNaries write WriteNaries;
|
|
property Funcs read ReadFuncs write WriteFuncs;
|
|
function ReadRs(_index: integer);
|
|
function WriteRs(_index: integer; _value: nil_OR_R);
|
|
function ReadDs(_index: integer);
|
|
function WriteDs(_index: integer; _value: nil_OR_D);
|
|
function ReadFs(_index: integer);
|
|
function WriteFs(_index: integer; _value: nil_OR_F);
|
|
function ReadRads(_index: integer);
|
|
function WriteRads(_index: integer; _value: nil_OR_Rad);
|
|
function ReadSSubs(_index: integer);
|
|
function WriteSSubs(_index: integer; _value: nil_OR_SSub);
|
|
function ReadSSups(_index: integer);
|
|
function WriteSSups(_index: integer; _value: nil_OR_SSup);
|
|
function ReadNaries(_index: integer);
|
|
function WriteNaries(_index: integer; _value: nil_OR_Nary);
|
|
function ReadFuncs(_index: integer);
|
|
function WriteFuncs(_index: integer; _value: nil_OR_Func);
|
|
function AddR(): R;
|
|
function AddD(): D;
|
|
function AddF(): F;
|
|
function AddRad(): Rad;
|
|
function AddSSub(): SSub;
|
|
function AddSSup(): SSup;
|
|
function AddNary(): Nary;
|
|
function AddFunc(): Func;
|
|
function AppendR(): R;
|
|
function AppendD(): D;
|
|
function AppendF(): F;
|
|
function AppendRad(): Rad;
|
|
function AppendSSub(): SSub;
|
|
function AppendSSup(): SSup;
|
|
function AppendNary(): Nary;
|
|
function AppendFunc(): Func;
|
|
|
|
public
|
|
// Children
|
|
XmlChildCtrlPr: CtrlPr;
|
|
end;
|
|
|
|
implementation
|
|
|
|
function MathPr.create();overload;
|
|
begin
|
|
{self.}create(nil, "m", "mathPr");
|
|
end;
|
|
|
|
function MathPr.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function MathPr.create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
begin
|
|
setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200);
|
|
inherited create(_parent, _prefix, _local_name);
|
|
end;
|
|
|
|
function MathPr.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
pre + "mathFont": array(0, makeweakref(thisFunction(ReadXmlChildMathFont))),
|
|
pre + "brkBin": array(1, makeweakref(thisFunction(ReadXmlChildBrkBin))),
|
|
pre + "brkBinSub": array(2, makeweakref(thisFunction(ReadXmlChildBrkBinSub))),
|
|
pre + "smallFrac": array(3, makeweakref(thisFunction(ReadXmlChildSmallFrac))),
|
|
pre + "dispDef": array(4, makeweakref(thisFunction(ReadXmlChildDispDef))),
|
|
pre + "lMargin": array(5, makeweakref(thisFunction(ReadXmlChildLMargin))),
|
|
pre + "rMargin": array(6, makeweakref(thisFunction(ReadXmlChildRMargin))),
|
|
pre + "defJc": array(7, makeweakref(thisFunction(ReadXmlChildDefJc))),
|
|
pre + "wrapIndent": array(8, makeweakref(thisFunction(ReadXmlChildWrapIndent))),
|
|
pre + "intLim": array(9, makeweakref(thisFunction(ReadXmlChildIntLim))),
|
|
pre + "naryLim": array(10, makeweakref(thisFunction(ReadXmlChildNaryLim))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function MathPr.Copy(_obj: MathPr);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.XmlChildMathFont) then
|
|
{self.}MathFont.Copy(_obj.XmlChildMathFont);
|
|
if not ifnil(_obj.XmlChildBrkBin) then
|
|
{self.}BrkBin.Copy(_obj.XmlChildBrkBin);
|
|
if not ifnil(_obj.XmlChildBrkBinSub) then
|
|
{self.}BrkBinSub.Copy(_obj.XmlChildBrkBinSub);
|
|
if not ifnil(_obj.XmlChildSmallFrac) then
|
|
{self.}SmallFrac.Copy(_obj.XmlChildSmallFrac);
|
|
if not ifnil(_obj.XmlChildDispDef) then
|
|
ifnil({self.}XmlChildDispDef) ? {self.}DispDef.Copy(_obj.XmlChildDispDef) : {self.}XmlChildDispDef.Copy(_obj.XmlChildDispDef);
|
|
if not ifnil(_obj.XmlChildLMargin) then
|
|
{self.}LMargin.Copy(_obj.XmlChildLMargin);
|
|
if not ifnil(_obj.XmlChildRMargin) then
|
|
{self.}RMargin.Copy(_obj.XmlChildRMargin);
|
|
if not ifnil(_obj.XmlChildDefJc) then
|
|
{self.}DefJc.Copy(_obj.XmlChildDefJc);
|
|
if not ifnil(_obj.XmlChildWrapIndent) then
|
|
{self.}WrapIndent.Copy(_obj.XmlChildWrapIndent);
|
|
if not ifnil(_obj.XmlChildIntLim) then
|
|
{self.}IntLim.Copy(_obj.XmlChildIntLim);
|
|
if not ifnil(_obj.XmlChildNaryLim) then
|
|
{self.}NaryLim.Copy(_obj.XmlChildNaryLim);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function MathPr.Clone(): MathPr;override;
|
|
begin
|
|
obj := new MathPr(nil, {self.}Prefix, {self.}LocalName);
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
elements := {self.}Elements();
|
|
for _,element in elements do
|
|
begin
|
|
case element.ElementName of
|
|
pre + "mathFont": obj.MathFont := element.Clone();
|
|
pre + "brkBin": obj.BrkBin := element.Clone();
|
|
pre + "brkBinSub": obj.BrkBinSub := element.Clone();
|
|
pre + "smallFrac": obj.SmallFrac := element.Clone();
|
|
pre + "dispDef": obj.DispDef := element.Clone();
|
|
pre + "lMargin": obj.LMargin := element.Clone();
|
|
pre + "rMargin": obj.RMargin := element.Clone();
|
|
pre + "defJc": obj.DefJc := element.Clone();
|
|
pre + "wrapIndent": obj.WrapIndent := element.Clone();
|
|
pre + "intLim": obj.IntLim := element.Clone();
|
|
pre + "naryLim": obj.NaryLim := element.Clone();
|
|
else obj.AppendChild(element.Clone());
|
|
end
|
|
end
|
|
return obj;
|
|
end;
|
|
|
|
function MathPr.ConvertToPoint();override;
|
|
begin
|
|
if not ifnil({self.}XmlChildMathFont) then
|
|
{self.}XmlChildMathFont.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildBrkBin) then
|
|
{self.}XmlChildBrkBin.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildBrkBinSub) then
|
|
{self.}XmlChildBrkBinSub.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildSmallFrac) then
|
|
{self.}XmlChildSmallFrac.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildLMargin) then
|
|
{self.}XmlChildLMargin.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildRMargin) then
|
|
{self.}XmlChildRMargin.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildDefJc) then
|
|
{self.}XmlChildDefJc.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildWrapIndent) then
|
|
{self.}XmlChildWrapIndent.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildIntLim) then
|
|
{self.}XmlChildIntLim.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildNaryLim) then
|
|
{self.}XmlChildNaryLim.ConvertToPoint();
|
|
end;
|
|
|
|
function MathPr.ReadXmlChildDispDef();
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildDispDef) or {self.}XmlChildDispDef.Removed) then
|
|
begin
|
|
{self.}XmlChildDispDef := new OpenXmlSimpleType(self, {self.}Prefix, "dispDef");
|
|
container_.Set({self.}XmlChildDispDef);
|
|
end
|
|
return {self.}XmlChildDispDef and not {self.}XmlChildDispDef.Removed ? {self.}XmlChildDispDef : fallback_.DispDef;
|
|
end;
|
|
|
|
function MathPr.WriteXmlChildDispDef(_value: nil_or_OpenXmlSimpleType);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
if ifObj({self.}XmlChildDispDef) then
|
|
{self.}RemoveChild({self.}XmlChildDispDef);
|
|
end
|
|
else if _value is class(OpenXmlSimpleType) then
|
|
begin
|
|
_value.Parent := self;
|
|
{self.}XmlChildDispDef := _value;
|
|
container_.Set({self.}XmlChildDispDef);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: DispDef expects nil or OpenXmlSimpleType";
|
|
end
|
|
end;
|
|
|
|
function MathPr.ReadXmlChildMathFont(): PureMVal;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildMathFont) or {self.}XmlChildMathFont.Removed) then
|
|
begin
|
|
{self.}XmlChildMathFont := new PureMVal(self, {self.}Prefix, "mathFont");
|
|
container_.Set({self.}XmlChildMathFont);
|
|
end
|
|
return {self.}XmlChildMathFont and not {self.}XmlChildMathFont.Removed ? {self.}XmlChildMathFont : fallback_.MathFont;
|
|
end;
|
|
|
|
function MathPr.WriteXmlChildMathFont(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildMathFont) then
|
|
{self.}RemoveChild({self.}XmlChildMathFont);
|
|
end
|
|
else if v is class(PureMVal) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildMathFont := v;
|
|
container_.Set({self.}XmlChildMathFont);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: MathFont expects PureMVal or nil";
|
|
end
|
|
end;
|
|
|
|
function MathPr.ReadXmlChildBrkBin(): PureMVal;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildBrkBin) or {self.}XmlChildBrkBin.Removed) then
|
|
begin
|
|
{self.}XmlChildBrkBin := new PureMVal(self, {self.}Prefix, "brkBin");
|
|
container_.Set({self.}XmlChildBrkBin);
|
|
end
|
|
return {self.}XmlChildBrkBin and not {self.}XmlChildBrkBin.Removed ? {self.}XmlChildBrkBin : fallback_.BrkBin;
|
|
end;
|
|
|
|
function MathPr.WriteXmlChildBrkBin(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildBrkBin) then
|
|
{self.}RemoveChild({self.}XmlChildBrkBin);
|
|
end
|
|
else if v is class(PureMVal) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildBrkBin := v;
|
|
container_.Set({self.}XmlChildBrkBin);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: BrkBin expects PureMVal or nil";
|
|
end
|
|
end;
|
|
|
|
function MathPr.ReadXmlChildBrkBinSub(): PureMVal;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildBrkBinSub) or {self.}XmlChildBrkBinSub.Removed) then
|
|
begin
|
|
{self.}XmlChildBrkBinSub := new PureMVal(self, {self.}Prefix, "brkBinSub");
|
|
container_.Set({self.}XmlChildBrkBinSub);
|
|
end
|
|
return {self.}XmlChildBrkBinSub and not {self.}XmlChildBrkBinSub.Removed ? {self.}XmlChildBrkBinSub : fallback_.BrkBinSub;
|
|
end;
|
|
|
|
function MathPr.WriteXmlChildBrkBinSub(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildBrkBinSub) then
|
|
{self.}RemoveChild({self.}XmlChildBrkBinSub);
|
|
end
|
|
else if v is class(PureMVal) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildBrkBinSub := v;
|
|
container_.Set({self.}XmlChildBrkBinSub);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: BrkBinSub expects PureMVal or nil";
|
|
end
|
|
end;
|
|
|
|
function MathPr.ReadXmlChildSmallFrac(): PureMVal;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildSmallFrac) or {self.}XmlChildSmallFrac.Removed) then
|
|
begin
|
|
{self.}XmlChildSmallFrac := new PureMVal(self, {self.}Prefix, "smallFrac");
|
|
container_.Set({self.}XmlChildSmallFrac);
|
|
end
|
|
return {self.}XmlChildSmallFrac and not {self.}XmlChildSmallFrac.Removed ? {self.}XmlChildSmallFrac : fallback_.SmallFrac;
|
|
end;
|
|
|
|
function MathPr.WriteXmlChildSmallFrac(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildSmallFrac) then
|
|
{self.}RemoveChild({self.}XmlChildSmallFrac);
|
|
end
|
|
else if v is class(PureMVal) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildSmallFrac := v;
|
|
container_.Set({self.}XmlChildSmallFrac);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: SmallFrac expects PureMVal or nil";
|
|
end
|
|
end;
|
|
|
|
function MathPr.ReadXmlChildLMargin(): PureMVal;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildLMargin) or {self.}XmlChildLMargin.Removed) then
|
|
begin
|
|
{self.}XmlChildLMargin := new PureMVal(self, {self.}Prefix, "lMargin");
|
|
container_.Set({self.}XmlChildLMargin);
|
|
end
|
|
return {self.}XmlChildLMargin and not {self.}XmlChildLMargin.Removed ? {self.}XmlChildLMargin : fallback_.LMargin;
|
|
end;
|
|
|
|
function MathPr.WriteXmlChildLMargin(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildLMargin) then
|
|
{self.}RemoveChild({self.}XmlChildLMargin);
|
|
end
|
|
else if v is class(PureMVal) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildLMargin := v;
|
|
container_.Set({self.}XmlChildLMargin);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: LMargin expects PureMVal or nil";
|
|
end
|
|
end;
|
|
|
|
function MathPr.ReadXmlChildRMargin(): PureMVal;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildRMargin) or {self.}XmlChildRMargin.Removed) then
|
|
begin
|
|
{self.}XmlChildRMargin := new PureMVal(self, {self.}Prefix, "rMargin");
|
|
container_.Set({self.}XmlChildRMargin);
|
|
end
|
|
return {self.}XmlChildRMargin and not {self.}XmlChildRMargin.Removed ? {self.}XmlChildRMargin : fallback_.RMargin;
|
|
end;
|
|
|
|
function MathPr.WriteXmlChildRMargin(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildRMargin) then
|
|
{self.}RemoveChild({self.}XmlChildRMargin);
|
|
end
|
|
else if v is class(PureMVal) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildRMargin := v;
|
|
container_.Set({self.}XmlChildRMargin);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: RMargin expects PureMVal or nil";
|
|
end
|
|
end;
|
|
|
|
function MathPr.ReadXmlChildDefJc(): PureMVal;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildDefJc) or {self.}XmlChildDefJc.Removed) then
|
|
begin
|
|
{self.}XmlChildDefJc := new PureMVal(self, {self.}Prefix, "defJc");
|
|
container_.Set({self.}XmlChildDefJc);
|
|
end
|
|
return {self.}XmlChildDefJc and not {self.}XmlChildDefJc.Removed ? {self.}XmlChildDefJc : fallback_.DefJc;
|
|
end;
|
|
|
|
function MathPr.WriteXmlChildDefJc(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildDefJc) then
|
|
{self.}RemoveChild({self.}XmlChildDefJc);
|
|
end
|
|
else if v is class(PureMVal) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildDefJc := v;
|
|
container_.Set({self.}XmlChildDefJc);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: DefJc expects PureMVal or nil";
|
|
end
|
|
end;
|
|
|
|
function MathPr.ReadXmlChildWrapIndent(): PureMVal;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildWrapIndent) or {self.}XmlChildWrapIndent.Removed) then
|
|
begin
|
|
{self.}XmlChildWrapIndent := new PureMVal(self, {self.}Prefix, "wrapIndent");
|
|
container_.Set({self.}XmlChildWrapIndent);
|
|
end
|
|
return {self.}XmlChildWrapIndent and not {self.}XmlChildWrapIndent.Removed ? {self.}XmlChildWrapIndent : fallback_.WrapIndent;
|
|
end;
|
|
|
|
function MathPr.WriteXmlChildWrapIndent(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildWrapIndent) then
|
|
{self.}RemoveChild({self.}XmlChildWrapIndent);
|
|
end
|
|
else if v is class(PureMVal) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildWrapIndent := v;
|
|
container_.Set({self.}XmlChildWrapIndent);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: WrapIndent expects PureMVal or nil";
|
|
end
|
|
end;
|
|
|
|
function MathPr.ReadXmlChildIntLim(): PureMVal;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildIntLim) or {self.}XmlChildIntLim.Removed) then
|
|
begin
|
|
{self.}XmlChildIntLim := new PureMVal(self, {self.}Prefix, "intLim");
|
|
container_.Set({self.}XmlChildIntLim);
|
|
end
|
|
return {self.}XmlChildIntLim and not {self.}XmlChildIntLim.Removed ? {self.}XmlChildIntLim : fallback_.IntLim;
|
|
end;
|
|
|
|
function MathPr.WriteXmlChildIntLim(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildIntLim) then
|
|
{self.}RemoveChild({self.}XmlChildIntLim);
|
|
end
|
|
else if v is class(PureMVal) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildIntLim := v;
|
|
container_.Set({self.}XmlChildIntLim);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: IntLim expects PureMVal or nil";
|
|
end
|
|
end;
|
|
|
|
function MathPr.ReadXmlChildNaryLim(): PureMVal;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildNaryLim) or {self.}XmlChildNaryLim.Removed) then
|
|
begin
|
|
{self.}XmlChildNaryLim := new PureMVal(self, {self.}Prefix, "naryLim");
|
|
container_.Set({self.}XmlChildNaryLim);
|
|
end
|
|
return {self.}XmlChildNaryLim and not {self.}XmlChildNaryLim.Removed ? {self.}XmlChildNaryLim : fallback_.NaryLim;
|
|
end;
|
|
|
|
function MathPr.WriteXmlChildNaryLim(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildNaryLim) then
|
|
{self.}RemoveChild({self.}XmlChildNaryLim);
|
|
end
|
|
else if v is class(PureMVal) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildNaryLim := v;
|
|
container_.Set({self.}XmlChildNaryLim);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: NaryLim expects PureMVal or nil";
|
|
end
|
|
end;
|
|
|
|
function OMathPara.create();overload;
|
|
begin
|
|
{self.}create(nil, "m", "oMathPara");
|
|
end;
|
|
|
|
function OMathPara.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function OMathPara.create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
begin
|
|
setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200);
|
|
inherited create(_parent, _prefix, _local_name);
|
|
end;
|
|
|
|
function OMathPara.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
pre + "oMathParaPr": array(0, makeweakref(thisFunction(ReadXmlChildOMathParaPr))),
|
|
pre + "oMath": array(1, makeweakref(thisFunction(ReadXmlChildOMath))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function OMathPara.Copy(_obj: OMathPara);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.XmlChildOMathParaPr) then
|
|
{self.}OMathParaPr.Copy(_obj.XmlChildOMathParaPr);
|
|
if not ifnil(_obj.XmlChildOMath) then
|
|
{self.}OMath.Copy(_obj.XmlChildOMath);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function OMathPara.Clone(): OMathPara;override;
|
|
begin
|
|
obj := new OMathPara(nil, {self.}Prefix, {self.}LocalName);
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
elements := {self.}Elements();
|
|
for _,element in elements do
|
|
begin
|
|
case element.ElementName of
|
|
pre + "oMathParaPr": obj.OMathParaPr := element.Clone();
|
|
pre + "oMath": obj.OMath := element.Clone();
|
|
else obj.AppendChild(element.Clone());
|
|
end
|
|
end
|
|
return obj;
|
|
end;
|
|
|
|
function OMathPara.ConvertToPoint();override;
|
|
begin
|
|
if not ifnil({self.}XmlChildOMathParaPr) then
|
|
{self.}XmlChildOMathParaPr.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildOMath) then
|
|
{self.}XmlChildOMath.ConvertToPoint();
|
|
end;
|
|
|
|
function OMathPara.ReadXmlChildOMathParaPr(): OMathParaPr;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildOMathParaPr) or {self.}XmlChildOMathParaPr.Removed) then
|
|
begin
|
|
{self.}XmlChildOMathParaPr := new OMathParaPr(self, {self.}Prefix, "oMathParaPr");
|
|
container_.Set({self.}XmlChildOMathParaPr);
|
|
end
|
|
return {self.}XmlChildOMathParaPr and not {self.}XmlChildOMathParaPr.Removed ? {self.}XmlChildOMathParaPr : fallback_.OMathParaPr;
|
|
end;
|
|
|
|
function OMathPara.WriteXmlChildOMathParaPr(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildOMathParaPr) then
|
|
{self.}RemoveChild({self.}XmlChildOMathParaPr);
|
|
end
|
|
else if v is class(OMathParaPr) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildOMathParaPr := v;
|
|
container_.Set({self.}XmlChildOMathParaPr);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: OMathParaPr expects OMathParaPr or nil";
|
|
end
|
|
end;
|
|
|
|
function OMathPara.ReadXmlChildOMath(): OMath;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildOMath) or {self.}XmlChildOMath.Removed) then
|
|
begin
|
|
{self.}XmlChildOMath := new OMath(self, {self.}Prefix, "oMath");
|
|
container_.Set({self.}XmlChildOMath);
|
|
end
|
|
return {self.}XmlChildOMath and not {self.}XmlChildOMath.Removed ? {self.}XmlChildOMath : fallback_.OMath;
|
|
end;
|
|
|
|
function OMathPara.WriteXmlChildOMath(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildOMath) then
|
|
{self.}RemoveChild({self.}XmlChildOMath);
|
|
end
|
|
else if v is class(OMath) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildOMath := v;
|
|
container_.Set({self.}XmlChildOMath);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: OMath expects OMath or nil";
|
|
end
|
|
end;
|
|
|
|
function OMathParaPr.create();overload;
|
|
begin
|
|
{self.}create(nil, "m", "oMathParaPr");
|
|
end;
|
|
|
|
function OMathParaPr.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function OMathParaPr.create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
begin
|
|
setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200);
|
|
inherited create(_parent, _prefix, _local_name);
|
|
end;
|
|
|
|
function OMathParaPr.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
pre + "jc": array(0, makeweakref(thisFunction(ReadXmlChildJc))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function OMathParaPr.Copy(_obj: OMathParaPr);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.XmlChildJc) then
|
|
{self.}Jc.Copy(_obj.XmlChildJc);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function OMathParaPr.Clone(): OMathParaPr;override;
|
|
begin
|
|
obj := new OMathParaPr(nil, {self.}Prefix, {self.}LocalName);
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
elements := {self.}Elements();
|
|
for _,element in elements do
|
|
begin
|
|
case element.ElementName of
|
|
pre + "jc": obj.Jc := element.Clone();
|
|
else obj.AppendChild(element.Clone());
|
|
end
|
|
end
|
|
return obj;
|
|
end;
|
|
|
|
function OMathParaPr.ConvertToPoint();override;
|
|
begin
|
|
if not ifnil({self.}XmlChildJc) then
|
|
{self.}XmlChildJc.ConvertToPoint();
|
|
end;
|
|
|
|
function OMathParaPr.ReadXmlChildJc(): PureMVal;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildJc) or {self.}XmlChildJc.Removed) then
|
|
begin
|
|
{self.}XmlChildJc := new PureMVal(self, {self.}Prefix, "jc");
|
|
container_.Set({self.}XmlChildJc);
|
|
end
|
|
return {self.}XmlChildJc and not {self.}XmlChildJc.Removed ? {self.}XmlChildJc : fallback_.Jc;
|
|
end;
|
|
|
|
function OMathParaPr.WriteXmlChildJc(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildJc) then
|
|
{self.}RemoveChild({self.}XmlChildJc);
|
|
end
|
|
else if v is class(PureMVal) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildJc := v;
|
|
container_.Set({self.}XmlChildJc);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Jc expects PureMVal or nil";
|
|
end
|
|
end;
|
|
|
|
function PureMVal.create();overload;
|
|
begin
|
|
{self.}create(nil, "m", "");
|
|
end;
|
|
|
|
function PureMVal.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function PureMVal.create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
begin
|
|
setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200);
|
|
inherited create(_parent, _prefix, _local_name);
|
|
end;
|
|
|
|
function PureMVal.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
pre + "val": makeweakref(thisFunction(WriteXmlAttrVal)),
|
|
);
|
|
sorted_child_ := array(
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function PureMVal.Copy(_obj: PureMVal);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.Val) then
|
|
{self.}Val := _obj.Val;
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function PureMVal.Clone(): PureMVal;override;
|
|
begin
|
|
obj := new PureMVal(nil, {self.}Prefix, {self.}LocalName);
|
|
if not ifnil({self.}Val) then
|
|
obj.Val := {self.}Val;
|
|
return obj;
|
|
end;
|
|
|
|
function PureMVal.ConvertToPoint();override;
|
|
begin
|
|
|
|
end;
|
|
|
|
function PureMVal.ReadXmlAttrVal();
|
|
begin
|
|
return ifnil({self.}XmlAttrVal.Value) ? fallback_.XmlAttrVal.Value : {self.}XmlAttrVal.Value;
|
|
end;
|
|
|
|
function PureMVal.WriteXmlAttrVal(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrVal) then
|
|
begin
|
|
{self.}XmlAttrVal := new OpenXmlAttribute({self.}Prefix, "val", nil);
|
|
attributes_[{self.}Prefix ? {self.}Prefix + ":" + "val" : "val"] := {self.}XmlAttrVal;
|
|
end
|
|
{self.}XmlAttrVal.Value := _value;
|
|
end;
|
|
|
|
function OMath.create();overload;
|
|
begin
|
|
{self.}create(nil, "m", "oMath");
|
|
end;
|
|
|
|
function OMath.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function OMath.create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
begin
|
|
setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200);
|
|
inherited create(_parent, _prefix, _local_name);
|
|
end;
|
|
|
|
function OMath.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
pre + "r": array(0, makeweakref(thisFunction(AppendR))),
|
|
pre + "d": array(1, makeweakref(thisFunction(AppendD))),
|
|
pre + "f": array(2, makeweakref(thisFunction(AppendF))),
|
|
pre + "rad": array(3, makeweakref(thisFunction(AppendRad))),
|
|
pre + "sSub": array(4, makeweakref(thisFunction(AppendSSub))),
|
|
pre + "sSup": array(5, makeweakref(thisFunction(AppendSSup))),
|
|
pre + "nary": array(6, makeweakref(thisFunction(AppendNary))),
|
|
pre + "func": array(7, makeweakref(thisFunction(AppendFunc))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function OMath.Copy(_obj: OMath);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function OMath.Clone(): OMath;override;
|
|
begin
|
|
obj := new OMath(nil, {self.}Prefix, {self.}LocalName);
|
|
elements := {self.}Elements();
|
|
for _,element in elements do
|
|
obj.AppendChild(element.Clone());
|
|
return obj;
|
|
end;
|
|
|
|
function OMath.ConvertToPoint();override;
|
|
begin
|
|
elems := {self.}Rs();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}Ds();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}Fs();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}Rads();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}SSubs();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}SSups();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}Naries();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}Funcs();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
end;
|
|
|
|
function OMath.ReadRs(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "r", ind);
|
|
end;
|
|
|
|
function OMath.WriteRs(_index: integer; _value: nil_OR_R);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadRs(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "r", ind, _value) then
|
|
raise format("Index out of range: Rs[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Rs expects nil or R";
|
|
end
|
|
end;
|
|
|
|
function OMath.ReadDs(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "d", ind);
|
|
end;
|
|
|
|
function OMath.WriteDs(_index: integer; _value: nil_OR_D);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadDs(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "d", ind, _value) then
|
|
raise format("Index out of range: Ds[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Ds expects nil or D";
|
|
end
|
|
end;
|
|
|
|
function OMath.ReadFs(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "f", ind);
|
|
end;
|
|
|
|
function OMath.WriteFs(_index: integer; _value: nil_OR_F);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadFs(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "f", ind, _value) then
|
|
raise format("Index out of range: Fs[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Fs expects nil or F";
|
|
end
|
|
end;
|
|
|
|
function OMath.ReadRads(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "rad", ind);
|
|
end;
|
|
|
|
function OMath.WriteRads(_index: integer; _value: nil_OR_Rad);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadRads(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "rad", ind, _value) then
|
|
raise format("Index out of range: Rads[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Rads expects nil or Rad";
|
|
end
|
|
end;
|
|
|
|
function OMath.ReadSSubs(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "sSub", ind);
|
|
end;
|
|
|
|
function OMath.WriteSSubs(_index: integer; _value: nil_OR_SSub);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadSSubs(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "sSub", ind, _value) then
|
|
raise format("Index out of range: SSubs[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: SSubs expects nil or SSub";
|
|
end
|
|
end;
|
|
|
|
function OMath.ReadSSups(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "sSup", ind);
|
|
end;
|
|
|
|
function OMath.WriteSSups(_index: integer; _value: nil_OR_SSup);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadSSups(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "sSup", ind, _value) then
|
|
raise format("Index out of range: SSups[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: SSups expects nil or SSup";
|
|
end
|
|
end;
|
|
|
|
function OMath.ReadNaries(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "nary", ind);
|
|
end;
|
|
|
|
function OMath.WriteNaries(_index: integer; _value: nil_OR_Nary);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadNaries(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "nary", ind, _value) then
|
|
raise format("Index out of range: Naries[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Naries expects nil or Nary";
|
|
end
|
|
end;
|
|
|
|
function OMath.ReadFuncs(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "func", ind);
|
|
end;
|
|
|
|
function OMath.WriteFuncs(_index: integer; _value: nil_OR_Func);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadFuncs(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "func", ind, _value) then
|
|
raise format("Index out of range: Funcs[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Funcs expects nil or Func";
|
|
end
|
|
end;
|
|
|
|
function OMath.AddR(): R;
|
|
begin
|
|
obj := new R(self, {self.}Prefix, "r");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function OMath.AddD(): D;
|
|
begin
|
|
obj := new D(self, {self.}Prefix, "d");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function OMath.AddF(): F;
|
|
begin
|
|
obj := new F(self, {self.}Prefix, "f");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function OMath.AddRad(): Rad;
|
|
begin
|
|
obj := new Rad(self, {self.}Prefix, "rad");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function OMath.AddSSub(): SSub;
|
|
begin
|
|
obj := new SSub(self, {self.}Prefix, "sSub");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function OMath.AddSSup(): SSup;
|
|
begin
|
|
obj := new SSup(self, {self.}Prefix, "sSup");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function OMath.AddNary(): Nary;
|
|
begin
|
|
obj := new Nary(self, {self.}Prefix, "nary");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function OMath.AddFunc(): Func;
|
|
begin
|
|
obj := new Func(self, {self.}Prefix, "func");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function OMath.AppendR(): R;
|
|
begin
|
|
obj := new R(self, {self.}Prefix, "r");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function OMath.AppendD(): D;
|
|
begin
|
|
obj := new D(self, {self.}Prefix, "d");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function OMath.AppendF(): F;
|
|
begin
|
|
obj := new F(self, {self.}Prefix, "f");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function OMath.AppendRad(): Rad;
|
|
begin
|
|
obj := new Rad(self, {self.}Prefix, "rad");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function OMath.AppendSSub(): SSub;
|
|
begin
|
|
obj := new SSub(self, {self.}Prefix, "sSub");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function OMath.AppendSSup(): SSup;
|
|
begin
|
|
obj := new SSup(self, {self.}Prefix, "sSup");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function OMath.AppendNary(): Nary;
|
|
begin
|
|
obj := new Nary(self, {self.}Prefix, "nary");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function OMath.AppendFunc(): Func;
|
|
begin
|
|
obj := new Func(self, {self.}Prefix, "func");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function R.create();overload;
|
|
begin
|
|
{self.}create(nil, "m", "r");
|
|
end;
|
|
|
|
function R.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function R.create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
begin
|
|
setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200);
|
|
inherited create(_parent, _prefix, _local_name);
|
|
end;
|
|
|
|
function R.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
pre + "rPr": array(0, makeweakref(thisFunction(ReadXmlChildRPr))),
|
|
"a:rPr": array(1, makeweakref(thisFunction(ReadXmlChildARPr))),
|
|
"w:rPr": array(2, makeweakref(thisFunction(ReadXmlChildWRPr))),
|
|
pre + "t": array(3, makeweakref(thisFunction(ReadXmlChildT))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function R.Copy(_obj: R);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.XmlChildRPr) then
|
|
{self.}RPr.Copy(_obj.XmlChildRPr);
|
|
if not ifnil(_obj.XmlChildARPr) then
|
|
{self.}ARPr.Copy(_obj.XmlChildARPr);
|
|
if not ifnil(_obj.XmlChildWRPr) then
|
|
{self.}WRPr.Copy(_obj.XmlChildWRPr);
|
|
if not ifnil(_obj.XmlChildT) then
|
|
{self.}T.Copy(_obj.XmlChildT);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function R.Clone(): R;override;
|
|
begin
|
|
obj := new R(nil, {self.}Prefix, {self.}LocalName);
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
elements := {self.}Elements();
|
|
for _,element in elements do
|
|
begin
|
|
case element.ElementName of
|
|
pre + "rPr": obj.RPr := element.Clone();
|
|
"a:rPr": obj.ARPr := element.Clone();
|
|
"w:rPr": obj.WRPr := element.Clone();
|
|
pre + "t": obj.T := element.Clone();
|
|
else obj.AppendChild(element.Clone());
|
|
end
|
|
end
|
|
return obj;
|
|
end;
|
|
|
|
function R.ConvertToPoint();override;
|
|
begin
|
|
if not ifnil({self.}XmlChildRPr) then
|
|
{self.}XmlChildRPr.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildARPr) then
|
|
{self.}XmlChildARPr.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildWRPr) then
|
|
{self.}XmlChildWRPr.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildT) then
|
|
{self.}XmlChildT.ConvertToPoint();
|
|
end;
|
|
|
|
function R.ReadXmlChildRPr(_ns: string): RPr;
|
|
begin
|
|
if _ns = "a" then
|
|
return {self.}ReadXmlChildARPr();
|
|
if _ns = "w" then
|
|
return {self.}ReadXmlChildWRPr();
|
|
if tslassigning and (ifnil({self.}XmlChildRPr) or {self.}XmlChildRPr.Removed) then
|
|
begin
|
|
{self.}XmlChildRPr := new RPr(self, {self.}Prefix, "rPr");
|
|
container_.Set({self.}XmlChildRPr);
|
|
end
|
|
return {self.}XmlChildRPr and not {self.}XmlChildRPr.Removed ? {self.}XmlChildRPr : fallback_.RPr;
|
|
end;
|
|
|
|
function R.WriteXmlChildRPr(_p1: any; _p2: any);
|
|
begin
|
|
if realparamcount = 2 then
|
|
begin
|
|
if _p1 = "a" then
|
|
return {self.}WriteXmlChildARPr(_p2);
|
|
if _p1 = "w" then
|
|
return {self.}WriteXmlChildWRPr(_p2);
|
|
end
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildRPr) then
|
|
{self.}RemoveChild({self.}XmlChildRPr);
|
|
end
|
|
else if v is class(RPr) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildRPr := v;
|
|
container_.Set({self.}XmlChildRPr);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: RPr expects RPr or nil";
|
|
end
|
|
end;
|
|
|
|
function R.ReadXmlChildARPr(): RPr;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildARPr) or {self.}XmlChildARPr.Removed) then
|
|
begin
|
|
{self.}XmlChildARPr := new DrawingML.RPr(self, "a", "rPr");
|
|
container_.Set({self.}XmlChildARPr);
|
|
end
|
|
return {self.}XmlChildARPr and not {self.}XmlChildARPr.Removed ? {self.}XmlChildARPr : fallback_.ARPr;
|
|
end;
|
|
|
|
function R.WriteXmlChildARPr(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildARPr) then
|
|
{self.}RemoveChild({self.}XmlChildARPr);
|
|
end
|
|
else if v is class(RPr) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildARPr := v;
|
|
container_.Set({self.}XmlChildARPr);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: RPr expects RPr or nil";
|
|
end
|
|
end;
|
|
|
|
function R.ReadXmlChildWRPr(): RPr;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildWRPr) or {self.}XmlChildWRPr.Removed) then
|
|
begin
|
|
{self.}XmlChildWRPr := new DocxML.RPr(self, "w", "rPr");
|
|
container_.Set({self.}XmlChildWRPr);
|
|
end
|
|
return {self.}XmlChildWRPr and not {self.}XmlChildWRPr.Removed ? {self.}XmlChildWRPr : fallback_.WRPr;
|
|
end;
|
|
|
|
function R.WriteXmlChildWRPr(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildWRPr) then
|
|
{self.}RemoveChild({self.}XmlChildWRPr);
|
|
end
|
|
else if v is class(RPr) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildWRPr := v;
|
|
container_.Set({self.}XmlChildWRPr);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: RPr expects RPr or nil";
|
|
end
|
|
end;
|
|
|
|
function R.ReadXmlChildT(): T;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildT) or {self.}XmlChildT.Removed) then
|
|
begin
|
|
{self.}XmlChildT := new T(self, {self.}Prefix, "t");
|
|
container_.Set({self.}XmlChildT);
|
|
end
|
|
return {self.}XmlChildT and not {self.}XmlChildT.Removed ? {self.}XmlChildT : fallback_.T;
|
|
end;
|
|
|
|
function R.WriteXmlChildT(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildT) then
|
|
{self.}RemoveChild({self.}XmlChildT);
|
|
end
|
|
else if v is class(T) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildT := v;
|
|
container_.Set({self.}XmlChildT);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: T expects T or nil";
|
|
end
|
|
end;
|
|
|
|
function RPr.create();overload;
|
|
begin
|
|
{self.}create(nil, "m", "rPr");
|
|
end;
|
|
|
|
function RPr.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function RPr.create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
begin
|
|
setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200);
|
|
inherited create(_parent, _prefix, _local_name);
|
|
end;
|
|
|
|
function RPr.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
pre + "sty": array(0, makeweakref(thisFunction(ReadXmlChildSty))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function RPr.Copy(_obj: RPr);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.XmlChildSty) then
|
|
{self.}Sty.Copy(_obj.XmlChildSty);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function RPr.Clone(): RPr;override;
|
|
begin
|
|
obj := new RPr(nil, {self.}Prefix, {self.}LocalName);
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
elements := {self.}Elements();
|
|
for _,element in elements do
|
|
begin
|
|
case element.ElementName of
|
|
pre + "sty": obj.Sty := element.Clone();
|
|
else obj.AppendChild(element.Clone());
|
|
end
|
|
end
|
|
return obj;
|
|
end;
|
|
|
|
function RPr.ConvertToPoint();override;
|
|
begin
|
|
if not ifnil({self.}XmlChildSty) then
|
|
{self.}XmlChildSty.ConvertToPoint();
|
|
end;
|
|
|
|
function RPr.ReadXmlChildSty(): PureMVal;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildSty) or {self.}XmlChildSty.Removed) then
|
|
begin
|
|
{self.}XmlChildSty := new PureMVal(self, {self.}Prefix, "sty");
|
|
container_.Set({self.}XmlChildSty);
|
|
end
|
|
return {self.}XmlChildSty and not {self.}XmlChildSty.Removed ? {self.}XmlChildSty : fallback_.Sty;
|
|
end;
|
|
|
|
function RPr.WriteXmlChildSty(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildSty) then
|
|
{self.}RemoveChild({self.}XmlChildSty);
|
|
end
|
|
else if v is class(PureMVal) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildSty := v;
|
|
container_.Set({self.}XmlChildSty);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Sty expects PureMVal or nil";
|
|
end
|
|
end;
|
|
|
|
function T.create();overload;
|
|
begin
|
|
{self.}create(nil, "w", "t");
|
|
end;
|
|
|
|
function T.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function T.create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
begin
|
|
setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200);
|
|
inherited create(_parent, _prefix, _local_name);
|
|
end;
|
|
|
|
function T.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
"xml:space": makeweakref(thisFunction(WriteXmlAttrSpace)),
|
|
);
|
|
end;
|
|
|
|
function T.Copy(_obj: T);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.Space) then
|
|
{self.}Space := _obj.Space;
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function T.Clone(): T;override;
|
|
begin
|
|
obj := new T(nil, {self.}Prefix, {self.}LocalName);
|
|
if not ifnil({self.}Text) then
|
|
obj.Text := {self.}Text;
|
|
if not ifnil({self.}Space) then
|
|
obj.Space := {self.}Space;
|
|
return obj;
|
|
end;
|
|
|
|
function T.ConvertToPoint();override;
|
|
begin
|
|
|
|
end;
|
|
|
|
function T.ReadXmlAttrSpace();
|
|
begin
|
|
return ifnil({self.}XmlAttrSpace.Value) ? fallback_.XmlAttrSpace.Value : {self.}XmlAttrSpace.Value;
|
|
end;
|
|
|
|
function T.WriteXmlAttrSpace(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrSpace) then
|
|
begin
|
|
{self.}XmlAttrSpace := new OpenXmlAttribute("xml", "space", nil);
|
|
attributes_["xml:space"] := {self.}XmlAttrSpace;
|
|
end
|
|
{self.}XmlAttrSpace.Value := _value;
|
|
end;
|
|
|
|
function D.create();overload;
|
|
begin
|
|
{self.}create(nil, "m", "d");
|
|
end;
|
|
|
|
function D.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function D.create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
begin
|
|
setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200);
|
|
inherited create(_parent, _prefix, _local_name);
|
|
end;
|
|
|
|
function D.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
pre + "dPr": array(0, makeweakref(thisFunction(ReadXmlChildDPr))),
|
|
pre + "e": array(1, makeweakref(thisFunction(ReadXmlChildE))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function D.Copy(_obj: D);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.XmlChildDPr) then
|
|
{self.}DPr.Copy(_obj.XmlChildDPr);
|
|
if not ifnil(_obj.XmlChildE) then
|
|
{self.}E.Copy(_obj.XmlChildE);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function D.Clone(): D;override;
|
|
begin
|
|
obj := new D(nil, {self.}Prefix, {self.}LocalName);
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
elements := {self.}Elements();
|
|
for _,element in elements do
|
|
begin
|
|
case element.ElementName of
|
|
pre + "dPr": obj.DPr := element.Clone();
|
|
pre + "e": obj.E := element.Clone();
|
|
else obj.AppendChild(element.Clone());
|
|
end
|
|
end
|
|
return obj;
|
|
end;
|
|
|
|
function D.ConvertToPoint();override;
|
|
begin
|
|
if not ifnil({self.}XmlChildDPr) then
|
|
{self.}XmlChildDPr.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildE) then
|
|
{self.}XmlChildE.ConvertToPoint();
|
|
end;
|
|
|
|
function D.ReadXmlChildDPr(): DPr;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildDPr) or {self.}XmlChildDPr.Removed) then
|
|
begin
|
|
{self.}XmlChildDPr := new DPr(self, {self.}Prefix, "dPr");
|
|
container_.Set({self.}XmlChildDPr);
|
|
end
|
|
return {self.}XmlChildDPr and not {self.}XmlChildDPr.Removed ? {self.}XmlChildDPr : fallback_.DPr;
|
|
end;
|
|
|
|
function D.WriteXmlChildDPr(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildDPr) then
|
|
{self.}RemoveChild({self.}XmlChildDPr);
|
|
end
|
|
else if v is class(DPr) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildDPr := v;
|
|
container_.Set({self.}XmlChildDPr);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: DPr expects DPr or nil";
|
|
end
|
|
end;
|
|
|
|
function D.ReadXmlChildE(): E;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildE) or {self.}XmlChildE.Removed) then
|
|
begin
|
|
{self.}XmlChildE := new E(self, {self.}Prefix, "e");
|
|
container_.Set({self.}XmlChildE);
|
|
end
|
|
return {self.}XmlChildE and not {self.}XmlChildE.Removed ? {self.}XmlChildE : fallback_.E;
|
|
end;
|
|
|
|
function D.WriteXmlChildE(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildE) then
|
|
{self.}RemoveChild({self.}XmlChildE);
|
|
end
|
|
else if v is class(E) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildE := v;
|
|
container_.Set({self.}XmlChildE);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: E expects E or nil";
|
|
end
|
|
end;
|
|
|
|
function DPr.create();overload;
|
|
begin
|
|
{self.}create(nil, "m", "dPr");
|
|
end;
|
|
|
|
function DPr.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function DPr.create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
begin
|
|
setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200);
|
|
inherited create(_parent, _prefix, _local_name);
|
|
end;
|
|
|
|
function DPr.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
pre + "begChr": array(0, makeweakref(thisFunction(ReadXmlChildBegChr))),
|
|
pre + "endChr": array(1, makeweakref(thisFunction(ReadXmlChildEndChr))),
|
|
pre + "sepChr": array(2, makeweakref(thisFunction(ReadXmlChildSepChr))),
|
|
pre + "shp": array(3, makeweakref(thisFunction(ReadXmlChildShp))),
|
|
pre + "grow": array(4, makeweakref(thisFunction(ReadXmlChildGrow))),
|
|
pre + "ctrlPr": array(5, makeweakref(thisFunction(ReadXmlChildCtrlPr))),
|
|
"w:rPr": array(6, makeweakref(thisFunction(ReadXmlChildRPr))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function DPr.Copy(_obj: DPr);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.XmlChildBegChr) then
|
|
{self.}BegChr.Copy(_obj.XmlChildBegChr);
|
|
if not ifnil(_obj.XmlChildEndChr) then
|
|
{self.}EndChr.Copy(_obj.XmlChildEndChr);
|
|
if not ifnil(_obj.XmlChildSepChr) then
|
|
{self.}SepChr.Copy(_obj.XmlChildSepChr);
|
|
if not ifnil(_obj.XmlChildShp) then
|
|
{self.}Shp.Copy(_obj.XmlChildShp);
|
|
if not ifnil(_obj.XmlChildGrow) then
|
|
{self.}Grow.Copy(_obj.XmlChildGrow);
|
|
if not ifnil(_obj.XmlChildCtrlPr) then
|
|
{self.}CtrlPr.Copy(_obj.XmlChildCtrlPr);
|
|
if not ifnil(_obj.XmlChildRPr) then
|
|
{self.}RPr.Copy(_obj.XmlChildRPr);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function DPr.Clone(): DPr;override;
|
|
begin
|
|
obj := new DPr(nil, {self.}Prefix, {self.}LocalName);
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
elements := {self.}Elements();
|
|
for _,element in elements do
|
|
begin
|
|
case element.ElementName of
|
|
pre + "begChr": obj.BegChr := element.Clone();
|
|
pre + "endChr": obj.EndChr := element.Clone();
|
|
pre + "sepChr": obj.SepChr := element.Clone();
|
|
pre + "shp": obj.Shp := element.Clone();
|
|
pre + "grow": obj.Grow := element.Clone();
|
|
pre + "ctrlPr": obj.CtrlPr := element.Clone();
|
|
"w:rPr": obj.RPr := element.Clone();
|
|
else obj.AppendChild(element.Clone());
|
|
end
|
|
end
|
|
return obj;
|
|
end;
|
|
|
|
function DPr.ConvertToPoint();override;
|
|
begin
|
|
if not ifnil({self.}XmlChildBegChr) then
|
|
{self.}XmlChildBegChr.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildEndChr) then
|
|
{self.}XmlChildEndChr.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildSepChr) then
|
|
{self.}XmlChildSepChr.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildShp) then
|
|
{self.}XmlChildShp.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildGrow) then
|
|
{self.}XmlChildGrow.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildCtrlPr) then
|
|
{self.}XmlChildCtrlPr.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildRPr) then
|
|
{self.}XmlChildRPr.ConvertToPoint();
|
|
end;
|
|
|
|
function DPr.ReadXmlChildBegChr(): PureMVal;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildBegChr) or {self.}XmlChildBegChr.Removed) then
|
|
begin
|
|
{self.}XmlChildBegChr := new PureMVal(self, {self.}Prefix, "begChr");
|
|
container_.Set({self.}XmlChildBegChr);
|
|
end
|
|
return {self.}XmlChildBegChr and not {self.}XmlChildBegChr.Removed ? {self.}XmlChildBegChr : fallback_.BegChr;
|
|
end;
|
|
|
|
function DPr.WriteXmlChildBegChr(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildBegChr) then
|
|
{self.}RemoveChild({self.}XmlChildBegChr);
|
|
end
|
|
else if v is class(PureMVal) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildBegChr := v;
|
|
container_.Set({self.}XmlChildBegChr);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: BegChr expects PureMVal or nil";
|
|
end
|
|
end;
|
|
|
|
function DPr.ReadXmlChildEndChr(): PureMVal;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildEndChr) or {self.}XmlChildEndChr.Removed) then
|
|
begin
|
|
{self.}XmlChildEndChr := new PureMVal(self, {self.}Prefix, "endChr");
|
|
container_.Set({self.}XmlChildEndChr);
|
|
end
|
|
return {self.}XmlChildEndChr and not {self.}XmlChildEndChr.Removed ? {self.}XmlChildEndChr : fallback_.EndChr;
|
|
end;
|
|
|
|
function DPr.WriteXmlChildEndChr(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildEndChr) then
|
|
{self.}RemoveChild({self.}XmlChildEndChr);
|
|
end
|
|
else if v is class(PureMVal) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildEndChr := v;
|
|
container_.Set({self.}XmlChildEndChr);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: EndChr expects PureMVal or nil";
|
|
end
|
|
end;
|
|
|
|
function DPr.ReadXmlChildSepChr(): PureMVal;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildSepChr) or {self.}XmlChildSepChr.Removed) then
|
|
begin
|
|
{self.}XmlChildSepChr := new PureMVal(self, {self.}Prefix, "sepChr");
|
|
container_.Set({self.}XmlChildSepChr);
|
|
end
|
|
return {self.}XmlChildSepChr and not {self.}XmlChildSepChr.Removed ? {self.}XmlChildSepChr : fallback_.SepChr;
|
|
end;
|
|
|
|
function DPr.WriteXmlChildSepChr(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildSepChr) then
|
|
{self.}RemoveChild({self.}XmlChildSepChr);
|
|
end
|
|
else if v is class(PureMVal) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildSepChr := v;
|
|
container_.Set({self.}XmlChildSepChr);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: SepChr expects PureMVal or nil";
|
|
end
|
|
end;
|
|
|
|
function DPr.ReadXmlChildShp(): PureMVal;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildShp) or {self.}XmlChildShp.Removed) then
|
|
begin
|
|
{self.}XmlChildShp := new PureMVal(self, {self.}Prefix, "shp");
|
|
container_.Set({self.}XmlChildShp);
|
|
end
|
|
return {self.}XmlChildShp and not {self.}XmlChildShp.Removed ? {self.}XmlChildShp : fallback_.Shp;
|
|
end;
|
|
|
|
function DPr.WriteXmlChildShp(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildShp) then
|
|
{self.}RemoveChild({self.}XmlChildShp);
|
|
end
|
|
else if v is class(PureMVal) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildShp := v;
|
|
container_.Set({self.}XmlChildShp);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Shp expects PureMVal or nil";
|
|
end
|
|
end;
|
|
|
|
function DPr.ReadXmlChildGrow(): PureMVal;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildGrow) or {self.}XmlChildGrow.Removed) then
|
|
begin
|
|
{self.}XmlChildGrow := new PureMVal(self, {self.}Prefix, "grow");
|
|
container_.Set({self.}XmlChildGrow);
|
|
end
|
|
return {self.}XmlChildGrow and not {self.}XmlChildGrow.Removed ? {self.}XmlChildGrow : fallback_.Grow;
|
|
end;
|
|
|
|
function DPr.WriteXmlChildGrow(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildGrow) then
|
|
{self.}RemoveChild({self.}XmlChildGrow);
|
|
end
|
|
else if v is class(PureMVal) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildGrow := v;
|
|
container_.Set({self.}XmlChildGrow);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Grow expects PureMVal or nil";
|
|
end
|
|
end;
|
|
|
|
function DPr.ReadXmlChildCtrlPr(): CtrlPr;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildCtrlPr) or {self.}XmlChildCtrlPr.Removed) then
|
|
begin
|
|
{self.}XmlChildCtrlPr := new CtrlPr(self, {self.}Prefix, "ctrlPr");
|
|
container_.Set({self.}XmlChildCtrlPr);
|
|
end
|
|
return {self.}XmlChildCtrlPr and not {self.}XmlChildCtrlPr.Removed ? {self.}XmlChildCtrlPr : fallback_.CtrlPr;
|
|
end;
|
|
|
|
function DPr.WriteXmlChildCtrlPr(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildCtrlPr) then
|
|
{self.}RemoveChild({self.}XmlChildCtrlPr);
|
|
end
|
|
else if v is class(CtrlPr) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildCtrlPr := v;
|
|
container_.Set({self.}XmlChildCtrlPr);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: CtrlPr expects CtrlPr or nil";
|
|
end
|
|
end;
|
|
|
|
function DPr.ReadXmlChildRPr(): RPr;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildRPr) or {self.}XmlChildRPr.Removed) then
|
|
begin
|
|
{self.}XmlChildRPr := new DocxML.RPr(self, "w", "rPr");
|
|
container_.Set({self.}XmlChildRPr);
|
|
end
|
|
return {self.}XmlChildRPr and not {self.}XmlChildRPr.Removed ? {self.}XmlChildRPr : fallback_.RPr;
|
|
end;
|
|
|
|
function DPr.WriteXmlChildRPr(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildRPr) then
|
|
{self.}RemoveChild({self.}XmlChildRPr);
|
|
end
|
|
else if v is class(RPr) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildRPr := v;
|
|
container_.Set({self.}XmlChildRPr);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: RPr expects RPr or nil";
|
|
end
|
|
end;
|
|
|
|
function CtrlPr.create();overload;
|
|
begin
|
|
{self.}create(nil, "m", "ctrlPr");
|
|
end;
|
|
|
|
function CtrlPr.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function CtrlPr.create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
begin
|
|
setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200);
|
|
inherited create(_parent, _prefix, _local_name);
|
|
end;
|
|
|
|
function CtrlPr.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
pre + "rPr": array(0, makeweakref(thisFunction(ReadXmlChildRPr))),
|
|
pre + "del": array(1, makeweakref(thisFunction(ReadXmlChildDel))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function CtrlPr.Copy(_obj: CtrlPr);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.XmlChildRPr) then
|
|
{self.}RPr.Copy(_obj.XmlChildRPr);
|
|
if not ifnil(_obj.XmlChildDel) then
|
|
{self.}Del.Copy(_obj.XmlChildDel);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function CtrlPr.Clone(): CtrlPr;override;
|
|
begin
|
|
obj := new CtrlPr(nil, {self.}Prefix, {self.}LocalName);
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
elements := {self.}Elements();
|
|
for _,element in elements do
|
|
begin
|
|
case element.ElementName of
|
|
pre + "rPr": obj.RPr := element.Clone();
|
|
pre + "del": obj.Del := element.Clone();
|
|
else obj.AppendChild(element.Clone());
|
|
end
|
|
end
|
|
return obj;
|
|
end;
|
|
|
|
function CtrlPr.ConvertToPoint();override;
|
|
begin
|
|
if not ifnil({self.}XmlChildRPr) then
|
|
{self.}XmlChildRPr.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildDel) then
|
|
{self.}XmlChildDel.ConvertToPoint();
|
|
end;
|
|
|
|
function CtrlPr.ReadXmlChildRPr(): RPr;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildRPr) or {self.}XmlChildRPr.Removed) then
|
|
begin
|
|
{self.}XmlChildRPr := new DrawingML.RPr(self, {self.}Prefix, "rPr");
|
|
container_.Set({self.}XmlChildRPr);
|
|
end
|
|
return {self.}XmlChildRPr and not {self.}XmlChildRPr.Removed ? {self.}XmlChildRPr : fallback_.RPr;
|
|
end;
|
|
|
|
function CtrlPr.WriteXmlChildRPr(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildRPr) then
|
|
{self.}RemoveChild({self.}XmlChildRPr);
|
|
end
|
|
else if v is class(RPr) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildRPr := v;
|
|
container_.Set({self.}XmlChildRPr);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: RPr expects RPr or nil";
|
|
end
|
|
end;
|
|
|
|
function CtrlPr.ReadXmlChildDel(): Del;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildDel) or {self.}XmlChildDel.Removed) then
|
|
begin
|
|
{self.}XmlChildDel := new Del(self, {self.}Prefix, "del");
|
|
container_.Set({self.}XmlChildDel);
|
|
end
|
|
return {self.}XmlChildDel and not {self.}XmlChildDel.Removed ? {self.}XmlChildDel : fallback_.Del;
|
|
end;
|
|
|
|
function CtrlPr.WriteXmlChildDel(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildDel) then
|
|
{self.}RemoveChild({self.}XmlChildDel);
|
|
end
|
|
else if v is class(Del) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildDel := v;
|
|
container_.Set({self.}XmlChildDel);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Del expects Del or nil";
|
|
end
|
|
end;
|
|
|
|
function SSup.create();overload;
|
|
begin
|
|
{self.}create(nil, "m", "sSup");
|
|
end;
|
|
|
|
function SSup.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function SSup.create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
begin
|
|
setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200);
|
|
inherited create(_parent, _prefix, _local_name);
|
|
end;
|
|
|
|
function SSup.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
pre + "sSupPr": array(0, makeweakref(thisFunction(ReadXmlChildSSupPr))),
|
|
pre + "e": array(1, makeweakref(thisFunction(ReadXmlChildE))),
|
|
pre + "sup": array(2, makeweakref(thisFunction(ReadXmlChildSup))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function SSup.Copy(_obj: SSup);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.XmlChildSSupPr) then
|
|
{self.}SSupPr.Copy(_obj.XmlChildSSupPr);
|
|
if not ifnil(_obj.XmlChildE) then
|
|
{self.}E.Copy(_obj.XmlChildE);
|
|
if not ifnil(_obj.XmlChildSup) then
|
|
{self.}Sup.Copy(_obj.XmlChildSup);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function SSup.Clone(): SSup;override;
|
|
begin
|
|
obj := new SSup(nil, {self.}Prefix, {self.}LocalName);
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
elements := {self.}Elements();
|
|
for _,element in elements do
|
|
begin
|
|
case element.ElementName of
|
|
pre + "sSupPr": obj.SSupPr := element.Clone();
|
|
pre + "e": obj.E := element.Clone();
|
|
pre + "sup": obj.Sup := element.Clone();
|
|
else obj.AppendChild(element.Clone());
|
|
end
|
|
end
|
|
return obj;
|
|
end;
|
|
|
|
function SSup.ConvertToPoint();override;
|
|
begin
|
|
if not ifnil({self.}XmlChildSSupPr) then
|
|
{self.}XmlChildSSupPr.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildE) then
|
|
{self.}XmlChildE.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildSup) then
|
|
{self.}XmlChildSup.ConvertToPoint();
|
|
end;
|
|
|
|
function SSup.ReadXmlChildSSupPr(): SSupPr;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildSSupPr) or {self.}XmlChildSSupPr.Removed) then
|
|
begin
|
|
{self.}XmlChildSSupPr := new SSupPr(self, {self.}Prefix, "sSupPr");
|
|
container_.Set({self.}XmlChildSSupPr);
|
|
end
|
|
return {self.}XmlChildSSupPr and not {self.}XmlChildSSupPr.Removed ? {self.}XmlChildSSupPr : fallback_.SSupPr;
|
|
end;
|
|
|
|
function SSup.WriteXmlChildSSupPr(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildSSupPr) then
|
|
{self.}RemoveChild({self.}XmlChildSSupPr);
|
|
end
|
|
else if v is class(SSupPr) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildSSupPr := v;
|
|
container_.Set({self.}XmlChildSSupPr);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: SSupPr expects SSupPr or nil";
|
|
end
|
|
end;
|
|
|
|
function SSup.ReadXmlChildE(): E;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildE) or {self.}XmlChildE.Removed) then
|
|
begin
|
|
{self.}XmlChildE := new E(self, {self.}Prefix, "e");
|
|
container_.Set({self.}XmlChildE);
|
|
end
|
|
return {self.}XmlChildE and not {self.}XmlChildE.Removed ? {self.}XmlChildE : fallback_.E;
|
|
end;
|
|
|
|
function SSup.WriteXmlChildE(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildE) then
|
|
{self.}RemoveChild({self.}XmlChildE);
|
|
end
|
|
else if v is class(E) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildE := v;
|
|
container_.Set({self.}XmlChildE);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: E expects E or nil";
|
|
end
|
|
end;
|
|
|
|
function SSup.ReadXmlChildSup(): Sup;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildSup) or {self.}XmlChildSup.Removed) then
|
|
begin
|
|
{self.}XmlChildSup := new Sup(self, {self.}Prefix, "sup");
|
|
container_.Set({self.}XmlChildSup);
|
|
end
|
|
return {self.}XmlChildSup and not {self.}XmlChildSup.Removed ? {self.}XmlChildSup : fallback_.Sup;
|
|
end;
|
|
|
|
function SSup.WriteXmlChildSup(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildSup) then
|
|
{self.}RemoveChild({self.}XmlChildSup);
|
|
end
|
|
else if v is class(Sup) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildSup := v;
|
|
container_.Set({self.}XmlChildSup);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Sup expects Sup or nil";
|
|
end
|
|
end;
|
|
|
|
function SSupPr.create();overload;
|
|
begin
|
|
{self.}create(nil, "m", "sSupPr");
|
|
end;
|
|
|
|
function SSupPr.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function SSupPr.create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
begin
|
|
setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200);
|
|
inherited create(_parent, _prefix, _local_name);
|
|
end;
|
|
|
|
function SSupPr.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
pre + "ctrlPr": array(0, makeweakref(thisFunction(ReadXmlChildCtrlPr))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function SSupPr.Copy(_obj: SSupPr);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.XmlChildCtrlPr) then
|
|
{self.}CtrlPr.Copy(_obj.XmlChildCtrlPr);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function SSupPr.Clone(): SSupPr;override;
|
|
begin
|
|
obj := new SSupPr(nil, {self.}Prefix, {self.}LocalName);
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
elements := {self.}Elements();
|
|
for _,element in elements do
|
|
begin
|
|
case element.ElementName of
|
|
pre + "ctrlPr": obj.CtrlPr := element.Clone();
|
|
else obj.AppendChild(element.Clone());
|
|
end
|
|
end
|
|
return obj;
|
|
end;
|
|
|
|
function SSupPr.ConvertToPoint();override;
|
|
begin
|
|
if not ifnil({self.}XmlChildCtrlPr) then
|
|
{self.}XmlChildCtrlPr.ConvertToPoint();
|
|
end;
|
|
|
|
function SSupPr.ReadXmlChildCtrlPr(): CtrlPr;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildCtrlPr) or {self.}XmlChildCtrlPr.Removed) then
|
|
begin
|
|
{self.}XmlChildCtrlPr := new CtrlPr(self, {self.}Prefix, "ctrlPr");
|
|
container_.Set({self.}XmlChildCtrlPr);
|
|
end
|
|
return {self.}XmlChildCtrlPr and not {self.}XmlChildCtrlPr.Removed ? {self.}XmlChildCtrlPr : fallback_.CtrlPr;
|
|
end;
|
|
|
|
function SSupPr.WriteXmlChildCtrlPr(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildCtrlPr) then
|
|
{self.}RemoveChild({self.}XmlChildCtrlPr);
|
|
end
|
|
else if v is class(CtrlPr) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildCtrlPr := v;
|
|
container_.Set({self.}XmlChildCtrlPr);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: CtrlPr expects CtrlPr or nil";
|
|
end
|
|
end;
|
|
|
|
function F.create();overload;
|
|
begin
|
|
{self.}create(nil, "m", "f");
|
|
end;
|
|
|
|
function F.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function F.create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
begin
|
|
setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200);
|
|
inherited create(_parent, _prefix, _local_name);
|
|
end;
|
|
|
|
function F.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
pre + "fPr": array(0, makeweakref(thisFunction(ReadXmlChildFPr))),
|
|
pre + "num": array(1, makeweakref(thisFunction(ReadXmlChildNum))),
|
|
pre + "den": array(2, makeweakref(thisFunction(ReadXmlChildDen))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function F.Copy(_obj: F);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.XmlChildFPr) then
|
|
{self.}FPr.Copy(_obj.XmlChildFPr);
|
|
if not ifnil(_obj.XmlChildNum) then
|
|
{self.}Num.Copy(_obj.XmlChildNum);
|
|
if not ifnil(_obj.XmlChildDen) then
|
|
{self.}Den.Copy(_obj.XmlChildDen);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function F.Clone(): F;override;
|
|
begin
|
|
obj := new F(nil, {self.}Prefix, {self.}LocalName);
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
elements := {self.}Elements();
|
|
for _,element in elements do
|
|
begin
|
|
case element.ElementName of
|
|
pre + "fPr": obj.FPr := element.Clone();
|
|
pre + "num": obj.Num := element.Clone();
|
|
pre + "den": obj.Den := element.Clone();
|
|
else obj.AppendChild(element.Clone());
|
|
end
|
|
end
|
|
return obj;
|
|
end;
|
|
|
|
function F.ConvertToPoint();override;
|
|
begin
|
|
if not ifnil({self.}XmlChildFPr) then
|
|
{self.}XmlChildFPr.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildNum) then
|
|
{self.}XmlChildNum.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildDen) then
|
|
{self.}XmlChildDen.ConvertToPoint();
|
|
end;
|
|
|
|
function F.ReadXmlChildFPr(): FPr;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildFPr) or {self.}XmlChildFPr.Removed) then
|
|
begin
|
|
{self.}XmlChildFPr := new FPr(self, {self.}Prefix, "fPr");
|
|
container_.Set({self.}XmlChildFPr);
|
|
end
|
|
return {self.}XmlChildFPr and not {self.}XmlChildFPr.Removed ? {self.}XmlChildFPr : fallback_.FPr;
|
|
end;
|
|
|
|
function F.WriteXmlChildFPr(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildFPr) then
|
|
{self.}RemoveChild({self.}XmlChildFPr);
|
|
end
|
|
else if v is class(FPr) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildFPr := v;
|
|
container_.Set({self.}XmlChildFPr);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: FPr expects FPr or nil";
|
|
end
|
|
end;
|
|
|
|
function F.ReadXmlChildNum(): Num;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildNum) or {self.}XmlChildNum.Removed) then
|
|
begin
|
|
{self.}XmlChildNum := new Num(self, {self.}Prefix, "num");
|
|
container_.Set({self.}XmlChildNum);
|
|
end
|
|
return {self.}XmlChildNum and not {self.}XmlChildNum.Removed ? {self.}XmlChildNum : fallback_.Num;
|
|
end;
|
|
|
|
function F.WriteXmlChildNum(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildNum) then
|
|
{self.}RemoveChild({self.}XmlChildNum);
|
|
end
|
|
else if v is class(Num) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildNum := v;
|
|
container_.Set({self.}XmlChildNum);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Num expects Num or nil";
|
|
end
|
|
end;
|
|
|
|
function F.ReadXmlChildDen(): Den;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildDen) or {self.}XmlChildDen.Removed) then
|
|
begin
|
|
{self.}XmlChildDen := new Den(self, {self.}Prefix, "den");
|
|
container_.Set({self.}XmlChildDen);
|
|
end
|
|
return {self.}XmlChildDen and not {self.}XmlChildDen.Removed ? {self.}XmlChildDen : fallback_.Den;
|
|
end;
|
|
|
|
function F.WriteXmlChildDen(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildDen) then
|
|
{self.}RemoveChild({self.}XmlChildDen);
|
|
end
|
|
else if v is class(Den) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildDen := v;
|
|
container_.Set({self.}XmlChildDen);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Den expects Den or nil";
|
|
end
|
|
end;
|
|
|
|
function FPr.create();overload;
|
|
begin
|
|
{self.}create(nil, "m", "fPr");
|
|
end;
|
|
|
|
function FPr.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function FPr.create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
begin
|
|
setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200);
|
|
inherited create(_parent, _prefix, _local_name);
|
|
end;
|
|
|
|
function FPr.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
pre + "type": array(0, makeweakref(thisFunction(ReadXmlChildType))),
|
|
pre + "ctrlPr": array(1, makeweakref(thisFunction(ReadXmlChildCtrlPr))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function FPr.Copy(_obj: FPr);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.XmlChildType) then
|
|
{self.}Type.Copy(_obj.XmlChildType);
|
|
if not ifnil(_obj.XmlChildCtrlPr) then
|
|
{self.}CtrlPr.Copy(_obj.XmlChildCtrlPr);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function FPr.Clone(): FPr;override;
|
|
begin
|
|
obj := new FPr(nil, {self.}Prefix, {self.}LocalName);
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
elements := {self.}Elements();
|
|
for _,element in elements do
|
|
begin
|
|
case element.ElementName of
|
|
pre + "type": obj.Type := element.Clone();
|
|
pre + "ctrlPr": obj.CtrlPr := element.Clone();
|
|
else obj.AppendChild(element.Clone());
|
|
end
|
|
end
|
|
return obj;
|
|
end;
|
|
|
|
function FPr.ConvertToPoint();override;
|
|
begin
|
|
if not ifnil({self.}XmlChildType) then
|
|
{self.}XmlChildType.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildCtrlPr) then
|
|
{self.}XmlChildCtrlPr.ConvertToPoint();
|
|
end;
|
|
|
|
function FPr.ReadXmlChildType(): PureMVal;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildType) or {self.}XmlChildType.Removed) then
|
|
begin
|
|
{self.}XmlChildType := new PureMVal(self, {self.}Prefix, "type");
|
|
container_.Set({self.}XmlChildType);
|
|
end
|
|
return {self.}XmlChildType and not {self.}XmlChildType.Removed ? {self.}XmlChildType : fallback_.Type;
|
|
end;
|
|
|
|
function FPr.WriteXmlChildType(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildType) then
|
|
{self.}RemoveChild({self.}XmlChildType);
|
|
end
|
|
else if v is class(PureMVal) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildType := v;
|
|
container_.Set({self.}XmlChildType);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Type expects PureMVal or nil";
|
|
end
|
|
end;
|
|
|
|
function FPr.ReadXmlChildCtrlPr(): CtrlPr;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildCtrlPr) or {self.}XmlChildCtrlPr.Removed) then
|
|
begin
|
|
{self.}XmlChildCtrlPr := new CtrlPr(self, {self.}Prefix, "ctrlPr");
|
|
container_.Set({self.}XmlChildCtrlPr);
|
|
end
|
|
return {self.}XmlChildCtrlPr and not {self.}XmlChildCtrlPr.Removed ? {self.}XmlChildCtrlPr : fallback_.CtrlPr;
|
|
end;
|
|
|
|
function FPr.WriteXmlChildCtrlPr(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildCtrlPr) then
|
|
{self.}RemoveChild({self.}XmlChildCtrlPr);
|
|
end
|
|
else if v is class(CtrlPr) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildCtrlPr := v;
|
|
container_.Set({self.}XmlChildCtrlPr);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: CtrlPr expects CtrlPr or nil";
|
|
end
|
|
end;
|
|
|
|
function Rad.create();overload;
|
|
begin
|
|
{self.}create(nil, "m", "rad");
|
|
end;
|
|
|
|
function Rad.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function Rad.create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
begin
|
|
setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200);
|
|
inherited create(_parent, _prefix, _local_name);
|
|
end;
|
|
|
|
function Rad.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
pre + "radPr": array(0, makeweakref(thisFunction(ReadXmlChildRadPr))),
|
|
pre + "deg": array(1, makeweakref(thisFunction(ReadXmlChildDeg))),
|
|
pre + "e": array(2, makeweakref(thisFunction(ReadXmlChildE))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function Rad.Copy(_obj: Rad);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.XmlChildRadPr) then
|
|
{self.}RadPr.Copy(_obj.XmlChildRadPr);
|
|
if not ifnil(_obj.XmlChildDeg) then
|
|
{self.}Deg.Copy(_obj.XmlChildDeg);
|
|
if not ifnil(_obj.XmlChildE) then
|
|
{self.}E.Copy(_obj.XmlChildE);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function Rad.Clone(): Rad;override;
|
|
begin
|
|
obj := new Rad(nil, {self.}Prefix, {self.}LocalName);
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
elements := {self.}Elements();
|
|
for _,element in elements do
|
|
begin
|
|
case element.ElementName of
|
|
pre + "radPr": obj.RadPr := element.Clone();
|
|
pre + "deg": obj.Deg := element.Clone();
|
|
pre + "e": obj.E := element.Clone();
|
|
else obj.AppendChild(element.Clone());
|
|
end
|
|
end
|
|
return obj;
|
|
end;
|
|
|
|
function Rad.ConvertToPoint();override;
|
|
begin
|
|
if not ifnil({self.}XmlChildRadPr) then
|
|
{self.}XmlChildRadPr.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildDeg) then
|
|
{self.}XmlChildDeg.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildE) then
|
|
{self.}XmlChildE.ConvertToPoint();
|
|
end;
|
|
|
|
function Rad.ReadXmlChildRadPr(): RadPr;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildRadPr) or {self.}XmlChildRadPr.Removed) then
|
|
begin
|
|
{self.}XmlChildRadPr := new RadPr(self, {self.}Prefix, "radPr");
|
|
container_.Set({self.}XmlChildRadPr);
|
|
end
|
|
return {self.}XmlChildRadPr and not {self.}XmlChildRadPr.Removed ? {self.}XmlChildRadPr : fallback_.RadPr;
|
|
end;
|
|
|
|
function Rad.WriteXmlChildRadPr(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildRadPr) then
|
|
{self.}RemoveChild({self.}XmlChildRadPr);
|
|
end
|
|
else if v is class(RadPr) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildRadPr := v;
|
|
container_.Set({self.}XmlChildRadPr);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: RadPr expects RadPr or nil";
|
|
end
|
|
end;
|
|
|
|
function Rad.ReadXmlChildDeg(): Deg;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildDeg) or {self.}XmlChildDeg.Removed) then
|
|
begin
|
|
{self.}XmlChildDeg := new Deg(self, {self.}Prefix, "deg");
|
|
container_.Set({self.}XmlChildDeg);
|
|
end
|
|
return {self.}XmlChildDeg and not {self.}XmlChildDeg.Removed ? {self.}XmlChildDeg : fallback_.Deg;
|
|
end;
|
|
|
|
function Rad.WriteXmlChildDeg(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildDeg) then
|
|
{self.}RemoveChild({self.}XmlChildDeg);
|
|
end
|
|
else if v is class(Deg) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildDeg := v;
|
|
container_.Set({self.}XmlChildDeg);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Deg expects Deg or nil";
|
|
end
|
|
end;
|
|
|
|
function Rad.ReadXmlChildE(): E;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildE) or {self.}XmlChildE.Removed) then
|
|
begin
|
|
{self.}XmlChildE := new E(self, {self.}Prefix, "e");
|
|
container_.Set({self.}XmlChildE);
|
|
end
|
|
return {self.}XmlChildE and not {self.}XmlChildE.Removed ? {self.}XmlChildE : fallback_.E;
|
|
end;
|
|
|
|
function Rad.WriteXmlChildE(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildE) then
|
|
{self.}RemoveChild({self.}XmlChildE);
|
|
end
|
|
else if v is class(E) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildE := v;
|
|
container_.Set({self.}XmlChildE);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: E expects E or nil";
|
|
end
|
|
end;
|
|
|
|
function RadPr.create();overload;
|
|
begin
|
|
{self.}create(nil, "m", "radPr");
|
|
end;
|
|
|
|
function RadPr.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function RadPr.create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
begin
|
|
setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200);
|
|
inherited create(_parent, _prefix, _local_name);
|
|
end;
|
|
|
|
function RadPr.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
pre + "degHide": array(0, makeweakref(thisFunction(ReadXmlChildDegHide))),
|
|
pre + "ctrlPr": array(1, makeweakref(thisFunction(ReadXmlChildCtrlPr))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function RadPr.Copy(_obj: RadPr);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.XmlChildDegHide) then
|
|
{self.}DegHide.Copy(_obj.XmlChildDegHide);
|
|
if not ifnil(_obj.XmlChildCtrlPr) then
|
|
{self.}CtrlPr.Copy(_obj.XmlChildCtrlPr);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function RadPr.Clone(): RadPr;override;
|
|
begin
|
|
obj := new RadPr(nil, {self.}Prefix, {self.}LocalName);
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
elements := {self.}Elements();
|
|
for _,element in elements do
|
|
begin
|
|
case element.ElementName of
|
|
pre + "degHide": obj.DegHide := element.Clone();
|
|
pre + "ctrlPr": obj.CtrlPr := element.Clone();
|
|
else obj.AppendChild(element.Clone());
|
|
end
|
|
end
|
|
return obj;
|
|
end;
|
|
|
|
function RadPr.ConvertToPoint();override;
|
|
begin
|
|
if not ifnil({self.}XmlChildDegHide) then
|
|
{self.}XmlChildDegHide.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildCtrlPr) then
|
|
{self.}XmlChildCtrlPr.ConvertToPoint();
|
|
end;
|
|
|
|
function RadPr.ReadXmlChildDegHide(): PureMVal;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildDegHide) or {self.}XmlChildDegHide.Removed) then
|
|
begin
|
|
{self.}XmlChildDegHide := new PureMVal(self, {self.}Prefix, "degHide");
|
|
container_.Set({self.}XmlChildDegHide);
|
|
end
|
|
return {self.}XmlChildDegHide and not {self.}XmlChildDegHide.Removed ? {self.}XmlChildDegHide : fallback_.DegHide;
|
|
end;
|
|
|
|
function RadPr.WriteXmlChildDegHide(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildDegHide) then
|
|
{self.}RemoveChild({self.}XmlChildDegHide);
|
|
end
|
|
else if v is class(PureMVal) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildDegHide := v;
|
|
container_.Set({self.}XmlChildDegHide);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: DegHide expects PureMVal or nil";
|
|
end
|
|
end;
|
|
|
|
function RadPr.ReadXmlChildCtrlPr(): CtrlPr;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildCtrlPr) or {self.}XmlChildCtrlPr.Removed) then
|
|
begin
|
|
{self.}XmlChildCtrlPr := new CtrlPr(self, {self.}Prefix, "ctrlPr");
|
|
container_.Set({self.}XmlChildCtrlPr);
|
|
end
|
|
return {self.}XmlChildCtrlPr and not {self.}XmlChildCtrlPr.Removed ? {self.}XmlChildCtrlPr : fallback_.CtrlPr;
|
|
end;
|
|
|
|
function RadPr.WriteXmlChildCtrlPr(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildCtrlPr) then
|
|
{self.}RemoveChild({self.}XmlChildCtrlPr);
|
|
end
|
|
else if v is class(CtrlPr) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildCtrlPr := v;
|
|
container_.Set({self.}XmlChildCtrlPr);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: CtrlPr expects CtrlPr or nil";
|
|
end
|
|
end;
|
|
|
|
function SSub.create();overload;
|
|
begin
|
|
{self.}create(nil, "m", "sSub");
|
|
end;
|
|
|
|
function SSub.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function SSub.create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
begin
|
|
setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200);
|
|
inherited create(_parent, _prefix, _local_name);
|
|
end;
|
|
|
|
function SSub.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
pre + "sSubPr": array(0, makeweakref(thisFunction(ReadXmlChildSSubPr))),
|
|
pre + "e": array(1, makeweakref(thisFunction(ReadXmlChildE))),
|
|
pre + "sub": array(2, makeweakref(thisFunction(ReadXmlChildSub))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function SSub.Copy(_obj: SSub);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.XmlChildSSubPr) then
|
|
{self.}SSubPr.Copy(_obj.XmlChildSSubPr);
|
|
if not ifnil(_obj.XmlChildE) then
|
|
{self.}E.Copy(_obj.XmlChildE);
|
|
if not ifnil(_obj.XmlChildSub) then
|
|
{self.}Sub.Copy(_obj.XmlChildSub);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function SSub.Clone(): SSub;override;
|
|
begin
|
|
obj := new SSub(nil, {self.}Prefix, {self.}LocalName);
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
elements := {self.}Elements();
|
|
for _,element in elements do
|
|
begin
|
|
case element.ElementName of
|
|
pre + "sSubPr": obj.SSubPr := element.Clone();
|
|
pre + "e": obj.E := element.Clone();
|
|
pre + "sub": obj.Sub := element.Clone();
|
|
else obj.AppendChild(element.Clone());
|
|
end
|
|
end
|
|
return obj;
|
|
end;
|
|
|
|
function SSub.ConvertToPoint();override;
|
|
begin
|
|
if not ifnil({self.}XmlChildSSubPr) then
|
|
{self.}XmlChildSSubPr.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildE) then
|
|
{self.}XmlChildE.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildSub) then
|
|
{self.}XmlChildSub.ConvertToPoint();
|
|
end;
|
|
|
|
function SSub.ReadXmlChildSSubPr(): SSubPr;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildSSubPr) or {self.}XmlChildSSubPr.Removed) then
|
|
begin
|
|
{self.}XmlChildSSubPr := new SSubPr(self, {self.}Prefix, "sSubPr");
|
|
container_.Set({self.}XmlChildSSubPr);
|
|
end
|
|
return {self.}XmlChildSSubPr and not {self.}XmlChildSSubPr.Removed ? {self.}XmlChildSSubPr : fallback_.SSubPr;
|
|
end;
|
|
|
|
function SSub.WriteXmlChildSSubPr(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildSSubPr) then
|
|
{self.}RemoveChild({self.}XmlChildSSubPr);
|
|
end
|
|
else if v is class(SSubPr) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildSSubPr := v;
|
|
container_.Set({self.}XmlChildSSubPr);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: SSubPr expects SSubPr or nil";
|
|
end
|
|
end;
|
|
|
|
function SSub.ReadXmlChildE(): E;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildE) or {self.}XmlChildE.Removed) then
|
|
begin
|
|
{self.}XmlChildE := new E(self, {self.}Prefix, "e");
|
|
container_.Set({self.}XmlChildE);
|
|
end
|
|
return {self.}XmlChildE and not {self.}XmlChildE.Removed ? {self.}XmlChildE : fallback_.E;
|
|
end;
|
|
|
|
function SSub.WriteXmlChildE(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildE) then
|
|
{self.}RemoveChild({self.}XmlChildE);
|
|
end
|
|
else if v is class(E) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildE := v;
|
|
container_.Set({self.}XmlChildE);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: E expects E or nil";
|
|
end
|
|
end;
|
|
|
|
function SSub.ReadXmlChildSub(): Sub;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildSub) or {self.}XmlChildSub.Removed) then
|
|
begin
|
|
{self.}XmlChildSub := new Sub(self, {self.}Prefix, "sub");
|
|
container_.Set({self.}XmlChildSub);
|
|
end
|
|
return {self.}XmlChildSub and not {self.}XmlChildSub.Removed ? {self.}XmlChildSub : fallback_.Sub;
|
|
end;
|
|
|
|
function SSub.WriteXmlChildSub(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildSub) then
|
|
{self.}RemoveChild({self.}XmlChildSub);
|
|
end
|
|
else if v is class(Sub) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildSub := v;
|
|
container_.Set({self.}XmlChildSub);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Sub expects Sub or nil";
|
|
end
|
|
end;
|
|
|
|
function SSubPr.create();overload;
|
|
begin
|
|
{self.}create(nil, "m", "sSubPr");
|
|
end;
|
|
|
|
function SSubPr.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function SSubPr.create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
begin
|
|
setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200);
|
|
inherited create(_parent, _prefix, _local_name);
|
|
end;
|
|
|
|
function SSubPr.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
pre + "ctrlPr": array(0, makeweakref(thisFunction(ReadXmlChildCtrlPr))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function SSubPr.Copy(_obj: SSubPr);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.XmlChildCtrlPr) then
|
|
{self.}CtrlPr.Copy(_obj.XmlChildCtrlPr);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function SSubPr.Clone(): SSubPr;override;
|
|
begin
|
|
obj := new SSubPr(nil, {self.}Prefix, {self.}LocalName);
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
elements := {self.}Elements();
|
|
for _,element in elements do
|
|
begin
|
|
case element.ElementName of
|
|
pre + "ctrlPr": obj.CtrlPr := element.Clone();
|
|
else obj.AppendChild(element.Clone());
|
|
end
|
|
end
|
|
return obj;
|
|
end;
|
|
|
|
function SSubPr.ConvertToPoint();override;
|
|
begin
|
|
if not ifnil({self.}XmlChildCtrlPr) then
|
|
{self.}XmlChildCtrlPr.ConvertToPoint();
|
|
end;
|
|
|
|
function SSubPr.ReadXmlChildCtrlPr(): CtrlPr;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildCtrlPr) or {self.}XmlChildCtrlPr.Removed) then
|
|
begin
|
|
{self.}XmlChildCtrlPr := new CtrlPr(self, {self.}Prefix, "ctrlPr");
|
|
container_.Set({self.}XmlChildCtrlPr);
|
|
end
|
|
return {self.}XmlChildCtrlPr and not {self.}XmlChildCtrlPr.Removed ? {self.}XmlChildCtrlPr : fallback_.CtrlPr;
|
|
end;
|
|
|
|
function SSubPr.WriteXmlChildCtrlPr(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildCtrlPr) then
|
|
{self.}RemoveChild({self.}XmlChildCtrlPr);
|
|
end
|
|
else if v is class(CtrlPr) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildCtrlPr := v;
|
|
container_.Set({self.}XmlChildCtrlPr);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: CtrlPr expects CtrlPr or nil";
|
|
end
|
|
end;
|
|
|
|
function Nary.create();overload;
|
|
begin
|
|
{self.}create(nil, "m", "nary");
|
|
end;
|
|
|
|
function Nary.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function Nary.create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
begin
|
|
setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200);
|
|
inherited create(_parent, _prefix, _local_name);
|
|
end;
|
|
|
|
function Nary.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
pre + "naryPr": array(0, makeweakref(thisFunction(ReadXmlChildNaryPr))),
|
|
pre + "sub": array(1, makeweakref(thisFunction(ReadXmlChildSub))),
|
|
pre + "sup": array(2, makeweakref(thisFunction(ReadXmlChildSup))),
|
|
pre + "e": array(3, makeweakref(thisFunction(ReadXmlChildE))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function Nary.Copy(_obj: Nary);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.XmlChildNaryPr) then
|
|
{self.}NaryPr.Copy(_obj.XmlChildNaryPr);
|
|
if not ifnil(_obj.XmlChildSub) then
|
|
{self.}Sub.Copy(_obj.XmlChildSub);
|
|
if not ifnil(_obj.XmlChildSup) then
|
|
{self.}Sup.Copy(_obj.XmlChildSup);
|
|
if not ifnil(_obj.XmlChildE) then
|
|
{self.}E.Copy(_obj.XmlChildE);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function Nary.Clone(): Nary;override;
|
|
begin
|
|
obj := new Nary(nil, {self.}Prefix, {self.}LocalName);
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
elements := {self.}Elements();
|
|
for _,element in elements do
|
|
begin
|
|
case element.ElementName of
|
|
pre + "naryPr": obj.NaryPr := element.Clone();
|
|
pre + "sub": obj.Sub := element.Clone();
|
|
pre + "sup": obj.Sup := element.Clone();
|
|
pre + "e": obj.E := element.Clone();
|
|
else obj.AppendChild(element.Clone());
|
|
end
|
|
end
|
|
return obj;
|
|
end;
|
|
|
|
function Nary.ConvertToPoint();override;
|
|
begin
|
|
if not ifnil({self.}XmlChildNaryPr) then
|
|
{self.}XmlChildNaryPr.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildSub) then
|
|
{self.}XmlChildSub.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildSup) then
|
|
{self.}XmlChildSup.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildE) then
|
|
{self.}XmlChildE.ConvertToPoint();
|
|
end;
|
|
|
|
function Nary.ReadXmlChildNaryPr(): NaryPr;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildNaryPr) or {self.}XmlChildNaryPr.Removed) then
|
|
begin
|
|
{self.}XmlChildNaryPr := new NaryPr(self, {self.}Prefix, "naryPr");
|
|
container_.Set({self.}XmlChildNaryPr);
|
|
end
|
|
return {self.}XmlChildNaryPr and not {self.}XmlChildNaryPr.Removed ? {self.}XmlChildNaryPr : fallback_.NaryPr;
|
|
end;
|
|
|
|
function Nary.WriteXmlChildNaryPr(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildNaryPr) then
|
|
{self.}RemoveChild({self.}XmlChildNaryPr);
|
|
end
|
|
else if v is class(NaryPr) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildNaryPr := v;
|
|
container_.Set({self.}XmlChildNaryPr);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: NaryPr expects NaryPr or nil";
|
|
end
|
|
end;
|
|
|
|
function Nary.ReadXmlChildSub(): Sub;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildSub) or {self.}XmlChildSub.Removed) then
|
|
begin
|
|
{self.}XmlChildSub := new Sub(self, {self.}Prefix, "sub");
|
|
container_.Set({self.}XmlChildSub);
|
|
end
|
|
return {self.}XmlChildSub and not {self.}XmlChildSub.Removed ? {self.}XmlChildSub : fallback_.Sub;
|
|
end;
|
|
|
|
function Nary.WriteXmlChildSub(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildSub) then
|
|
{self.}RemoveChild({self.}XmlChildSub);
|
|
end
|
|
else if v is class(Sub) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildSub := v;
|
|
container_.Set({self.}XmlChildSub);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Sub expects Sub or nil";
|
|
end
|
|
end;
|
|
|
|
function Nary.ReadXmlChildSup(): Sup;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildSup) or {self.}XmlChildSup.Removed) then
|
|
begin
|
|
{self.}XmlChildSup := new Sup(self, {self.}Prefix, "sup");
|
|
container_.Set({self.}XmlChildSup);
|
|
end
|
|
return {self.}XmlChildSup and not {self.}XmlChildSup.Removed ? {self.}XmlChildSup : fallback_.Sup;
|
|
end;
|
|
|
|
function Nary.WriteXmlChildSup(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildSup) then
|
|
{self.}RemoveChild({self.}XmlChildSup);
|
|
end
|
|
else if v is class(Sup) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildSup := v;
|
|
container_.Set({self.}XmlChildSup);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Sup expects Sup or nil";
|
|
end
|
|
end;
|
|
|
|
function Nary.ReadXmlChildE(): E;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildE) or {self.}XmlChildE.Removed) then
|
|
begin
|
|
{self.}XmlChildE := new E(self, {self.}Prefix, "e");
|
|
container_.Set({self.}XmlChildE);
|
|
end
|
|
return {self.}XmlChildE and not {self.}XmlChildE.Removed ? {self.}XmlChildE : fallback_.E;
|
|
end;
|
|
|
|
function Nary.WriteXmlChildE(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildE) then
|
|
{self.}RemoveChild({self.}XmlChildE);
|
|
end
|
|
else if v is class(E) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildE := v;
|
|
container_.Set({self.}XmlChildE);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: E expects E or nil";
|
|
end
|
|
end;
|
|
|
|
function NaryPr.create();overload;
|
|
begin
|
|
{self.}create(nil, "m", "naryPr");
|
|
end;
|
|
|
|
function NaryPr.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function NaryPr.create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
begin
|
|
setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200);
|
|
inherited create(_parent, _prefix, _local_name);
|
|
end;
|
|
|
|
function NaryPr.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
pre + "chr": array(0, makeweakref(thisFunction(ReadXmlChildChr))),
|
|
pre + "grow": array(1, makeweakref(thisFunction(ReadXmlChildGrow))),
|
|
pre + "subHide": array(2, makeweakref(thisFunction(ReadXmlChildSubHide))),
|
|
pre + "supHide": array(3, makeweakref(thisFunction(ReadXmlChildSupHide))),
|
|
pre + "limLoc": array(4, makeweakref(thisFunction(ReadXmlChildLimLoc))),
|
|
pre + "ctrlPr": array(5, makeweakref(thisFunction(ReadXmlChildCtrlPr))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function NaryPr.Copy(_obj: NaryPr);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.XmlChildChr) then
|
|
{self.}Chr.Copy(_obj.XmlChildChr);
|
|
if not ifnil(_obj.XmlChildGrow) then
|
|
{self.}Grow.Copy(_obj.XmlChildGrow);
|
|
if not ifnil(_obj.XmlChildSubHide) then
|
|
{self.}SubHide.Copy(_obj.XmlChildSubHide);
|
|
if not ifnil(_obj.XmlChildSupHide) then
|
|
{self.}SupHide.Copy(_obj.XmlChildSupHide);
|
|
if not ifnil(_obj.XmlChildLimLoc) then
|
|
{self.}LimLoc.Copy(_obj.XmlChildLimLoc);
|
|
if not ifnil(_obj.XmlChildCtrlPr) then
|
|
{self.}CtrlPr.Copy(_obj.XmlChildCtrlPr);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function NaryPr.Clone(): NaryPr;override;
|
|
begin
|
|
obj := new NaryPr(nil, {self.}Prefix, {self.}LocalName);
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
elements := {self.}Elements();
|
|
for _,element in elements do
|
|
begin
|
|
case element.ElementName of
|
|
pre + "chr": obj.Chr := element.Clone();
|
|
pre + "grow": obj.Grow := element.Clone();
|
|
pre + "subHide": obj.SubHide := element.Clone();
|
|
pre + "supHide": obj.SupHide := element.Clone();
|
|
pre + "limLoc": obj.LimLoc := element.Clone();
|
|
pre + "ctrlPr": obj.CtrlPr := element.Clone();
|
|
else obj.AppendChild(element.Clone());
|
|
end
|
|
end
|
|
return obj;
|
|
end;
|
|
|
|
function NaryPr.ConvertToPoint();override;
|
|
begin
|
|
if not ifnil({self.}XmlChildChr) then
|
|
{self.}XmlChildChr.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildGrow) then
|
|
{self.}XmlChildGrow.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildSubHide) then
|
|
{self.}XmlChildSubHide.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildSupHide) then
|
|
{self.}XmlChildSupHide.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildLimLoc) then
|
|
{self.}XmlChildLimLoc.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildCtrlPr) then
|
|
{self.}XmlChildCtrlPr.ConvertToPoint();
|
|
end;
|
|
|
|
function NaryPr.ReadXmlChildChr(): PureMVal;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildChr) or {self.}XmlChildChr.Removed) then
|
|
begin
|
|
{self.}XmlChildChr := new PureMVal(self, {self.}Prefix, "chr");
|
|
container_.Set({self.}XmlChildChr);
|
|
end
|
|
return {self.}XmlChildChr and not {self.}XmlChildChr.Removed ? {self.}XmlChildChr : fallback_.Chr;
|
|
end;
|
|
|
|
function NaryPr.WriteXmlChildChr(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildChr) then
|
|
{self.}RemoveChild({self.}XmlChildChr);
|
|
end
|
|
else if v is class(PureMVal) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildChr := v;
|
|
container_.Set({self.}XmlChildChr);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Chr expects PureMVal or nil";
|
|
end
|
|
end;
|
|
|
|
function NaryPr.ReadXmlChildGrow(): PureMVal;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildGrow) or {self.}XmlChildGrow.Removed) then
|
|
begin
|
|
{self.}XmlChildGrow := new PureMVal(self, {self.}Prefix, "grow");
|
|
container_.Set({self.}XmlChildGrow);
|
|
end
|
|
return {self.}XmlChildGrow and not {self.}XmlChildGrow.Removed ? {self.}XmlChildGrow : fallback_.Grow;
|
|
end;
|
|
|
|
function NaryPr.WriteXmlChildGrow(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildGrow) then
|
|
{self.}RemoveChild({self.}XmlChildGrow);
|
|
end
|
|
else if v is class(PureMVal) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildGrow := v;
|
|
container_.Set({self.}XmlChildGrow);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Grow expects PureMVal or nil";
|
|
end
|
|
end;
|
|
|
|
function NaryPr.ReadXmlChildSubHide(): PureMVal;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildSubHide) or {self.}XmlChildSubHide.Removed) then
|
|
begin
|
|
{self.}XmlChildSubHide := new PureMVal(self, {self.}Prefix, "subHide");
|
|
container_.Set({self.}XmlChildSubHide);
|
|
end
|
|
return {self.}XmlChildSubHide and not {self.}XmlChildSubHide.Removed ? {self.}XmlChildSubHide : fallback_.SubHide;
|
|
end;
|
|
|
|
function NaryPr.WriteXmlChildSubHide(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildSubHide) then
|
|
{self.}RemoveChild({self.}XmlChildSubHide);
|
|
end
|
|
else if v is class(PureMVal) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildSubHide := v;
|
|
container_.Set({self.}XmlChildSubHide);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: SubHide expects PureMVal or nil";
|
|
end
|
|
end;
|
|
|
|
function NaryPr.ReadXmlChildSupHide(): PureMVal;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildSupHide) or {self.}XmlChildSupHide.Removed) then
|
|
begin
|
|
{self.}XmlChildSupHide := new PureMVal(self, {self.}Prefix, "supHide");
|
|
container_.Set({self.}XmlChildSupHide);
|
|
end
|
|
return {self.}XmlChildSupHide and not {self.}XmlChildSupHide.Removed ? {self.}XmlChildSupHide : fallback_.SupHide;
|
|
end;
|
|
|
|
function NaryPr.WriteXmlChildSupHide(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildSupHide) then
|
|
{self.}RemoveChild({self.}XmlChildSupHide);
|
|
end
|
|
else if v is class(PureMVal) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildSupHide := v;
|
|
container_.Set({self.}XmlChildSupHide);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: SupHide expects PureMVal or nil";
|
|
end
|
|
end;
|
|
|
|
function NaryPr.ReadXmlChildLimLoc(): PureMVal;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildLimLoc) or {self.}XmlChildLimLoc.Removed) then
|
|
begin
|
|
{self.}XmlChildLimLoc := new PureMVal(self, {self.}Prefix, "limLoc");
|
|
container_.Set({self.}XmlChildLimLoc);
|
|
end
|
|
return {self.}XmlChildLimLoc and not {self.}XmlChildLimLoc.Removed ? {self.}XmlChildLimLoc : fallback_.LimLoc;
|
|
end;
|
|
|
|
function NaryPr.WriteXmlChildLimLoc(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildLimLoc) then
|
|
{self.}RemoveChild({self.}XmlChildLimLoc);
|
|
end
|
|
else if v is class(PureMVal) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildLimLoc := v;
|
|
container_.Set({self.}XmlChildLimLoc);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: LimLoc expects PureMVal or nil";
|
|
end
|
|
end;
|
|
|
|
function NaryPr.ReadXmlChildCtrlPr(): CtrlPr;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildCtrlPr) or {self.}XmlChildCtrlPr.Removed) then
|
|
begin
|
|
{self.}XmlChildCtrlPr := new CtrlPr(self, {self.}Prefix, "ctrlPr");
|
|
container_.Set({self.}XmlChildCtrlPr);
|
|
end
|
|
return {self.}XmlChildCtrlPr and not {self.}XmlChildCtrlPr.Removed ? {self.}XmlChildCtrlPr : fallback_.CtrlPr;
|
|
end;
|
|
|
|
function NaryPr.WriteXmlChildCtrlPr(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildCtrlPr) then
|
|
{self.}RemoveChild({self.}XmlChildCtrlPr);
|
|
end
|
|
else if v is class(CtrlPr) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildCtrlPr := v;
|
|
container_.Set({self.}XmlChildCtrlPr);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: CtrlPr expects CtrlPr or nil";
|
|
end
|
|
end;
|
|
|
|
function Func.create();overload;
|
|
begin
|
|
{self.}create(nil, "m", "func");
|
|
end;
|
|
|
|
function Func.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function Func.create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
begin
|
|
setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200);
|
|
inherited create(_parent, _prefix, _local_name);
|
|
end;
|
|
|
|
function Func.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
pre + "funcPr": array(0, makeweakref(thisFunction(ReadXmlChildFuncPr))),
|
|
pre + "fName": array(1, makeweakref(thisFunction(ReadXmlChildFName))),
|
|
pre + "e": array(2, makeweakref(thisFunction(ReadXmlChildE))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function Func.Copy(_obj: Func);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.XmlChildFuncPr) then
|
|
{self.}FuncPr.Copy(_obj.XmlChildFuncPr);
|
|
if not ifnil(_obj.XmlChildFName) then
|
|
{self.}FName.Copy(_obj.XmlChildFName);
|
|
if not ifnil(_obj.XmlChildE) then
|
|
{self.}E.Copy(_obj.XmlChildE);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function Func.Clone(): Func;override;
|
|
begin
|
|
obj := new Func(nil, {self.}Prefix, {self.}LocalName);
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
elements := {self.}Elements();
|
|
for _,element in elements do
|
|
begin
|
|
case element.ElementName of
|
|
pre + "funcPr": obj.FuncPr := element.Clone();
|
|
pre + "fName": obj.FName := element.Clone();
|
|
pre + "e": obj.E := element.Clone();
|
|
else obj.AppendChild(element.Clone());
|
|
end
|
|
end
|
|
return obj;
|
|
end;
|
|
|
|
function Func.ConvertToPoint();override;
|
|
begin
|
|
if not ifnil({self.}XmlChildFuncPr) then
|
|
{self.}XmlChildFuncPr.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildFName) then
|
|
{self.}XmlChildFName.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildE) then
|
|
{self.}XmlChildE.ConvertToPoint();
|
|
end;
|
|
|
|
function Func.ReadXmlChildFuncPr(): FuncPr;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildFuncPr) or {self.}XmlChildFuncPr.Removed) then
|
|
begin
|
|
{self.}XmlChildFuncPr := new FuncPr(self, {self.}Prefix, "funcPr");
|
|
container_.Set({self.}XmlChildFuncPr);
|
|
end
|
|
return {self.}XmlChildFuncPr and not {self.}XmlChildFuncPr.Removed ? {self.}XmlChildFuncPr : fallback_.FuncPr;
|
|
end;
|
|
|
|
function Func.WriteXmlChildFuncPr(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildFuncPr) then
|
|
{self.}RemoveChild({self.}XmlChildFuncPr);
|
|
end
|
|
else if v is class(FuncPr) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildFuncPr := v;
|
|
container_.Set({self.}XmlChildFuncPr);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: FuncPr expects FuncPr or nil";
|
|
end
|
|
end;
|
|
|
|
function Func.ReadXmlChildFName(): FName;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildFName) or {self.}XmlChildFName.Removed) then
|
|
begin
|
|
{self.}XmlChildFName := new FName(self, {self.}Prefix, "fName");
|
|
container_.Set({self.}XmlChildFName);
|
|
end
|
|
return {self.}XmlChildFName and not {self.}XmlChildFName.Removed ? {self.}XmlChildFName : fallback_.FName;
|
|
end;
|
|
|
|
function Func.WriteXmlChildFName(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildFName) then
|
|
{self.}RemoveChild({self.}XmlChildFName);
|
|
end
|
|
else if v is class(FName) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildFName := v;
|
|
container_.Set({self.}XmlChildFName);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: FName expects FName or nil";
|
|
end
|
|
end;
|
|
|
|
function Func.ReadXmlChildE(): E;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildE) or {self.}XmlChildE.Removed) then
|
|
begin
|
|
{self.}XmlChildE := new E(self, {self.}Prefix, "e");
|
|
container_.Set({self.}XmlChildE);
|
|
end
|
|
return {self.}XmlChildE and not {self.}XmlChildE.Removed ? {self.}XmlChildE : fallback_.E;
|
|
end;
|
|
|
|
function Func.WriteXmlChildE(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildE) then
|
|
{self.}RemoveChild({self.}XmlChildE);
|
|
end
|
|
else if v is class(E) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildE := v;
|
|
container_.Set({self.}XmlChildE);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: E expects E or nil";
|
|
end
|
|
end;
|
|
|
|
function FName.create();overload;
|
|
begin
|
|
{self.}create(nil, "m", "fname");
|
|
end;
|
|
|
|
function FName.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function FName.create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
begin
|
|
setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200);
|
|
inherited create(_parent, _prefix, _local_name);
|
|
end;
|
|
|
|
function FName.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
pre + "r": array(0, makeweakref(thisFunction(AppendR))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function FName.Copy(_obj: FName);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function FName.Clone(): FName;override;
|
|
begin
|
|
obj := new FName(nil, {self.}Prefix, {self.}LocalName);
|
|
elements := {self.}Elements();
|
|
for _,element in elements do
|
|
obj.AppendChild(element.Clone());
|
|
return obj;
|
|
end;
|
|
|
|
function FName.ConvertToPoint();override;
|
|
begin
|
|
elems := {self.}Rs();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
end;
|
|
|
|
function FName.ReadRs(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "r", ind);
|
|
end;
|
|
|
|
function FName.WriteRs(_index: integer; _value: nil_OR_R);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadRs(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "r", ind, _value) then
|
|
raise format("Index out of range: Rs[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Rs expects nil or R";
|
|
end
|
|
end;
|
|
|
|
function FName.AddR(): R;
|
|
begin
|
|
obj := new R(self, {self.}Prefix, "r");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function FName.AppendR(): R;
|
|
begin
|
|
obj := new R(self, {self.}Prefix, "r");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function FuncPr.create();overload;
|
|
begin
|
|
{self.}create(nil, "m", "funcPr");
|
|
end;
|
|
|
|
function FuncPr.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function FuncPr.create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
begin
|
|
setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200);
|
|
inherited create(_parent, _prefix, _local_name);
|
|
end;
|
|
|
|
function FuncPr.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
pre + "ctrlPr": array(0, makeweakref(thisFunction(ReadXmlChildCtrlPr))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function FuncPr.Copy(_obj: FuncPr);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.XmlChildCtrlPr) then
|
|
{self.}CtrlPr.Copy(_obj.XmlChildCtrlPr);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function FuncPr.Clone(): FuncPr;override;
|
|
begin
|
|
obj := new FuncPr(nil, {self.}Prefix, {self.}LocalName);
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
elements := {self.}Elements();
|
|
for _,element in elements do
|
|
begin
|
|
case element.ElementName of
|
|
pre + "ctrlPr": obj.CtrlPr := element.Clone();
|
|
else obj.AppendChild(element.Clone());
|
|
end
|
|
end
|
|
return obj;
|
|
end;
|
|
|
|
function FuncPr.ConvertToPoint();override;
|
|
begin
|
|
if not ifnil({self.}XmlChildCtrlPr) then
|
|
{self.}XmlChildCtrlPr.ConvertToPoint();
|
|
end;
|
|
|
|
function FuncPr.ReadXmlChildCtrlPr(): CtrlPr;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildCtrlPr) or {self.}XmlChildCtrlPr.Removed) then
|
|
begin
|
|
{self.}XmlChildCtrlPr := new CtrlPr(self, {self.}Prefix, "ctrlPr");
|
|
container_.Set({self.}XmlChildCtrlPr);
|
|
end
|
|
return {self.}XmlChildCtrlPr and not {self.}XmlChildCtrlPr.Removed ? {self.}XmlChildCtrlPr : fallback_.CtrlPr;
|
|
end;
|
|
|
|
function FuncPr.WriteXmlChildCtrlPr(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildCtrlPr) then
|
|
{self.}RemoveChild({self.}XmlChildCtrlPr);
|
|
end
|
|
else if v is class(CtrlPr) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildCtrlPr := v;
|
|
container_.Set({self.}XmlChildCtrlPr);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: CtrlPr expects CtrlPr or nil";
|
|
end
|
|
end;
|
|
|
|
function CoreProperties.create();overload;
|
|
begin
|
|
{self.}create(nil, "cp", "coreProperties");
|
|
end;
|
|
|
|
function CoreProperties.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function CoreProperties.create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
begin
|
|
setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200);
|
|
inherited create(_parent, _prefix, _local_name);
|
|
end;
|
|
|
|
function CoreProperties.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
"dc:title": array(0, makeweakref(thisFunction(ReadXmlChildTitle))),
|
|
"dc:subject": array(1, makeweakref(thisFunction(ReadXmlChildSubject))),
|
|
"dc:creator": array(2, makeweakref(thisFunction(ReadXmlChildCreator))),
|
|
"cp:keywords": array(3, makeweakref(thisFunction(ReadXmlChildKeywords))),
|
|
"cp:description": array(4, makeweakref(thisFunction(ReadXmlChildDescription))),
|
|
"cp:lastModifiedBy": array(5, makeweakref(thisFunction(ReadXmlChildLastModifiedBy))),
|
|
"cp:revision": array(6, makeweakref(thisFunction(ReadXmlChildRevision))),
|
|
"cp:lastPrinted": array(7, makeweakref(thisFunction(ReadXmlChildLastPrinted))),
|
|
"dcterms:created": array(8, makeweakref(thisFunction(ReadXmlChildCreated))),
|
|
"dcterms:modified": array(9, makeweakref(thisFunction(ReadXmlChildModified))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function CoreProperties.Copy(_obj: CoreProperties);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.XmlChildTitle) then
|
|
{self.}Title.Copy(_obj.XmlChildTitle);
|
|
if not ifnil(_obj.XmlChildSubject) then
|
|
{self.}Subject.Copy(_obj.XmlChildSubject);
|
|
if not ifnil(_obj.XmlChildCreator) then
|
|
{self.}Creator.Copy(_obj.XmlChildCreator);
|
|
if not ifnil(_obj.XmlChildKeywords) then
|
|
{self.}Keywords.Copy(_obj.XmlChildKeywords);
|
|
if not ifnil(_obj.XmlChildDescription) then
|
|
{self.}Description.Copy(_obj.XmlChildDescription);
|
|
if not ifnil(_obj.XmlChildLastModifiedBy) then
|
|
{self.}LastModifiedBy.Copy(_obj.XmlChildLastModifiedBy);
|
|
if not ifnil(_obj.XmlChildRevision) then
|
|
{self.}Revision.Copy(_obj.XmlChildRevision);
|
|
if not ifnil(_obj.XmlChildLastPrinted) then
|
|
{self.}LastPrinted.Copy(_obj.XmlChildLastPrinted);
|
|
if not ifnil(_obj.XmlChildCreated) then
|
|
{self.}Created.Copy(_obj.XmlChildCreated);
|
|
if not ifnil(_obj.XmlChildModified) then
|
|
{self.}Modified.Copy(_obj.XmlChildModified);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function CoreProperties.Clone(): CoreProperties;override;
|
|
begin
|
|
obj := new CoreProperties(nil, {self.}Prefix, {self.}LocalName);
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
elements := {self.}Elements();
|
|
for _,element in elements do
|
|
begin
|
|
case element.ElementName of
|
|
"dc:title": obj.Title := element.Clone();
|
|
"dc:subject": obj.Subject := element.Clone();
|
|
"dc:creator": obj.Creator := element.Clone();
|
|
"cp:keywords": obj.Keywords := element.Clone();
|
|
"cp:description": obj.Description := element.Clone();
|
|
"cp:lastModifiedBy": obj.LastModifiedBy := element.Clone();
|
|
"cp:revision": obj.Revision := element.Clone();
|
|
"cp:lastPrinted": obj.LastPrinted := element.Clone();
|
|
"dcterms:created": obj.Created := element.Clone();
|
|
"dcterms:modified": obj.Modified := element.Clone();
|
|
else obj.AppendChild(element.Clone());
|
|
end
|
|
end
|
|
return obj;
|
|
end;
|
|
|
|
function CoreProperties.ConvertToPoint();override;
|
|
begin
|
|
if not ifnil({self.}XmlChildCreated) then
|
|
{self.}XmlChildCreated.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildModified) then
|
|
{self.}XmlChildModified.ConvertToPoint();
|
|
end;
|
|
|
|
function CoreProperties.ReadXmlChildTitle();
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildTitle) or {self.}XmlChildTitle.Removed) then
|
|
begin
|
|
{self.}XmlChildTitle := new OpenXmlTextElement(self, "dc", "title");
|
|
container_.Set({self.}XmlChildTitle);
|
|
end
|
|
return {self.}XmlChildTitle and not {self.}XmlChildTitle.Removed ? {self.}XmlChildTitle : fallback_.Title;
|
|
end;
|
|
|
|
function CoreProperties.WriteXmlChildTitle(_value: nil_or_OpenXmlTextElement);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
if ifObj({self.}XmlChildTitle) then
|
|
{self.}RemoveChild({self.}XmlChildTitle);
|
|
end
|
|
else if _value is class(OpenXmlTextElement) then
|
|
begin
|
|
_value.Parent := self;
|
|
{self.}XmlChildTitle := _value;
|
|
container_.Set({self.}XmlChildTitle);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Title expects nil or OpenXmlTextElement";
|
|
end
|
|
end;
|
|
|
|
function CoreProperties.ReadXmlChildSubject();
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildSubject) or {self.}XmlChildSubject.Removed) then
|
|
begin
|
|
{self.}XmlChildSubject := new OpenXmlTextElement(self, "dc", "subject");
|
|
container_.Set({self.}XmlChildSubject);
|
|
end
|
|
return {self.}XmlChildSubject and not {self.}XmlChildSubject.Removed ? {self.}XmlChildSubject : fallback_.Subject;
|
|
end;
|
|
|
|
function CoreProperties.WriteXmlChildSubject(_value: nil_or_OpenXmlTextElement);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
if ifObj({self.}XmlChildSubject) then
|
|
{self.}RemoveChild({self.}XmlChildSubject);
|
|
end
|
|
else if _value is class(OpenXmlTextElement) then
|
|
begin
|
|
_value.Parent := self;
|
|
{self.}XmlChildSubject := _value;
|
|
container_.Set({self.}XmlChildSubject);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Subject expects nil or OpenXmlTextElement";
|
|
end
|
|
end;
|
|
|
|
function CoreProperties.ReadXmlChildCreator();
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildCreator) or {self.}XmlChildCreator.Removed) then
|
|
begin
|
|
{self.}XmlChildCreator := new OpenXmlTextElement(self, "dc", "creator");
|
|
container_.Set({self.}XmlChildCreator);
|
|
end
|
|
return {self.}XmlChildCreator and not {self.}XmlChildCreator.Removed ? {self.}XmlChildCreator : fallback_.Creator;
|
|
end;
|
|
|
|
function CoreProperties.WriteXmlChildCreator(_value: nil_or_OpenXmlTextElement);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
if ifObj({self.}XmlChildCreator) then
|
|
{self.}RemoveChild({self.}XmlChildCreator);
|
|
end
|
|
else if _value is class(OpenXmlTextElement) then
|
|
begin
|
|
_value.Parent := self;
|
|
{self.}XmlChildCreator := _value;
|
|
container_.Set({self.}XmlChildCreator);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Creator expects nil or OpenXmlTextElement";
|
|
end
|
|
end;
|
|
|
|
function CoreProperties.ReadXmlChildKeywords();
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildKeywords) or {self.}XmlChildKeywords.Removed) then
|
|
begin
|
|
{self.}XmlChildKeywords := new OpenXmlTextElement(self, "cp", "keywords");
|
|
container_.Set({self.}XmlChildKeywords);
|
|
end
|
|
return {self.}XmlChildKeywords and not {self.}XmlChildKeywords.Removed ? {self.}XmlChildKeywords : fallback_.Keywords;
|
|
end;
|
|
|
|
function CoreProperties.WriteXmlChildKeywords(_value: nil_or_OpenXmlTextElement);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
if ifObj({self.}XmlChildKeywords) then
|
|
{self.}RemoveChild({self.}XmlChildKeywords);
|
|
end
|
|
else if _value is class(OpenXmlTextElement) then
|
|
begin
|
|
_value.Parent := self;
|
|
{self.}XmlChildKeywords := _value;
|
|
container_.Set({self.}XmlChildKeywords);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Keywords expects nil or OpenXmlTextElement";
|
|
end
|
|
end;
|
|
|
|
function CoreProperties.ReadXmlChildDescription();
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildDescription) or {self.}XmlChildDescription.Removed) then
|
|
begin
|
|
{self.}XmlChildDescription := new OpenXmlTextElement(self, "cp", "description");
|
|
container_.Set({self.}XmlChildDescription);
|
|
end
|
|
return {self.}XmlChildDescription and not {self.}XmlChildDescription.Removed ? {self.}XmlChildDescription : fallback_.Description;
|
|
end;
|
|
|
|
function CoreProperties.WriteXmlChildDescription(_value: nil_or_OpenXmlTextElement);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
if ifObj({self.}XmlChildDescription) then
|
|
{self.}RemoveChild({self.}XmlChildDescription);
|
|
end
|
|
else if _value is class(OpenXmlTextElement) then
|
|
begin
|
|
_value.Parent := self;
|
|
{self.}XmlChildDescription := _value;
|
|
container_.Set({self.}XmlChildDescription);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Description expects nil or OpenXmlTextElement";
|
|
end
|
|
end;
|
|
|
|
function CoreProperties.ReadXmlChildLastModifiedBy();
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildLastModifiedBy) or {self.}XmlChildLastModifiedBy.Removed) then
|
|
begin
|
|
{self.}XmlChildLastModifiedBy := new OpenXmlTextElement(self, "cp", "lastModifiedBy");
|
|
container_.Set({self.}XmlChildLastModifiedBy);
|
|
end
|
|
return {self.}XmlChildLastModifiedBy and not {self.}XmlChildLastModifiedBy.Removed ? {self.}XmlChildLastModifiedBy : fallback_.LastModifiedBy;
|
|
end;
|
|
|
|
function CoreProperties.WriteXmlChildLastModifiedBy(_value: nil_or_OpenXmlTextElement);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
if ifObj({self.}XmlChildLastModifiedBy) then
|
|
{self.}RemoveChild({self.}XmlChildLastModifiedBy);
|
|
end
|
|
else if _value is class(OpenXmlTextElement) then
|
|
begin
|
|
_value.Parent := self;
|
|
{self.}XmlChildLastModifiedBy := _value;
|
|
container_.Set({self.}XmlChildLastModifiedBy);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: LastModifiedBy expects nil or OpenXmlTextElement";
|
|
end
|
|
end;
|
|
|
|
function CoreProperties.ReadXmlChildRevision();
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildRevision) or {self.}XmlChildRevision.Removed) then
|
|
begin
|
|
{self.}XmlChildRevision := new OpenXmlTextElement(self, "cp", "revision");
|
|
container_.Set({self.}XmlChildRevision);
|
|
end
|
|
return {self.}XmlChildRevision and not {self.}XmlChildRevision.Removed ? {self.}XmlChildRevision : fallback_.Revision;
|
|
end;
|
|
|
|
function CoreProperties.WriteXmlChildRevision(_value: nil_or_OpenXmlTextElement);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
if ifObj({self.}XmlChildRevision) then
|
|
{self.}RemoveChild({self.}XmlChildRevision);
|
|
end
|
|
else if _value is class(OpenXmlTextElement) then
|
|
begin
|
|
_value.Parent := self;
|
|
{self.}XmlChildRevision := _value;
|
|
container_.Set({self.}XmlChildRevision);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Revision expects nil or OpenXmlTextElement";
|
|
end
|
|
end;
|
|
|
|
function CoreProperties.ReadXmlChildLastPrinted();
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildLastPrinted) or {self.}XmlChildLastPrinted.Removed) then
|
|
begin
|
|
{self.}XmlChildLastPrinted := new OpenXmlTextElement(self, "cp", "lastPrinted");
|
|
container_.Set({self.}XmlChildLastPrinted);
|
|
end
|
|
return {self.}XmlChildLastPrinted and not {self.}XmlChildLastPrinted.Removed ? {self.}XmlChildLastPrinted : fallback_.LastPrinted;
|
|
end;
|
|
|
|
function CoreProperties.WriteXmlChildLastPrinted(_value: nil_or_OpenXmlTextElement);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
if ifObj({self.}XmlChildLastPrinted) then
|
|
{self.}RemoveChild({self.}XmlChildLastPrinted);
|
|
end
|
|
else if _value is class(OpenXmlTextElement) then
|
|
begin
|
|
_value.Parent := self;
|
|
{self.}XmlChildLastPrinted := _value;
|
|
container_.Set({self.}XmlChildLastPrinted);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: LastPrinted expects nil or OpenXmlTextElement";
|
|
end
|
|
end;
|
|
|
|
function CoreProperties.ReadXmlChildCreated();
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildCreated) or {self.}XmlChildCreated.Removed) then
|
|
begin
|
|
{self.}XmlChildCreated := new Created(self, "dcterms", "created");
|
|
container_.Set({self.}XmlChildCreated);
|
|
end
|
|
return {self.}XmlChildCreated and not {self.}XmlChildCreated.Removed ? {self.}XmlChildCreated : fallback_.Created;
|
|
end;
|
|
|
|
function CoreProperties.WriteXmlChildCreated(_value: nil_or_OpenXmlTextElement);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
if ifObj({self.}XmlChildCreated) then
|
|
{self.}RemoveChild({self.}XmlChildCreated);
|
|
end
|
|
else if _value is class(OpenXmlTextElement) then
|
|
begin
|
|
_value.Parent := self;
|
|
{self.}XmlChildCreated := _value;
|
|
container_.Set({self.}XmlChildCreated);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Created expects nil or OpenXmlTextElement";
|
|
end
|
|
end;
|
|
|
|
function CoreProperties.ReadXmlChildModified();
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildModified) or {self.}XmlChildModified.Removed) then
|
|
begin
|
|
{self.}XmlChildModified := new Modified(self, "dcterms", "modified");
|
|
container_.Set({self.}XmlChildModified);
|
|
end
|
|
return {self.}XmlChildModified and not {self.}XmlChildModified.Removed ? {self.}XmlChildModified : fallback_.Modified;
|
|
end;
|
|
|
|
function CoreProperties.WriteXmlChildModified(_value: nil_or_OpenXmlTextElement);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
if ifObj({self.}XmlChildModified) then
|
|
{self.}RemoveChild({self.}XmlChildModified);
|
|
end
|
|
else if _value is class(OpenXmlTextElement) then
|
|
begin
|
|
_value.Parent := self;
|
|
{self.}XmlChildModified := _value;
|
|
container_.Set({self.}XmlChildModified);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Modified expects nil or OpenXmlTextElement";
|
|
end
|
|
end;
|
|
|
|
function Created.create();overload;
|
|
begin
|
|
{self.}create(nil, "dcterms", "created");
|
|
end;
|
|
|
|
function Created.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function Created.create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
begin
|
|
setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200);
|
|
inherited create(_parent, _prefix, _local_name);
|
|
end;
|
|
|
|
function Created.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
"xsi:type": makeweakref(thisFunction(WriteXmlAttrType)),
|
|
);
|
|
end;
|
|
|
|
function Created.Copy(_obj: Created);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.Type) then
|
|
{self.}Type := _obj.Type;
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function Created.Clone(): Created;override;
|
|
begin
|
|
obj := new Created(nil, {self.}Prefix, {self.}LocalName);
|
|
if not ifnil({self.}Text) then
|
|
obj.Text := {self.}Text;
|
|
if not ifnil({self.}Type) then
|
|
obj.Type := {self.}Type;
|
|
return obj;
|
|
end;
|
|
|
|
function Created.ConvertToPoint();override;
|
|
begin
|
|
|
|
end;
|
|
|
|
function Created.ReadXmlAttrType();
|
|
begin
|
|
return ifnil({self.}XmlAttrType.Value) ? fallback_.XmlAttrType.Value : {self.}XmlAttrType.Value;
|
|
end;
|
|
|
|
function Created.WriteXmlAttrType(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrType) then
|
|
begin
|
|
{self.}XmlAttrType := new OpenXmlAttribute("xsi", "type", nil);
|
|
attributes_["xsi:type"] := {self.}XmlAttrType;
|
|
end
|
|
{self.}XmlAttrType.Value := _value;
|
|
end;
|
|
|
|
function Modified.create();overload;
|
|
begin
|
|
{self.}create(nil, "dcterms", "modified");
|
|
end;
|
|
|
|
function Modified.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function Modified.create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
begin
|
|
setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200);
|
|
inherited create(_parent, _prefix, _local_name);
|
|
end;
|
|
|
|
function Modified.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
"xsi:type": makeweakref(thisFunction(WriteXmlAttrType)),
|
|
);
|
|
end;
|
|
|
|
function Modified.Copy(_obj: Modified);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.Type) then
|
|
{self.}Type := _obj.Type;
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function Modified.Clone(): Modified;override;
|
|
begin
|
|
obj := new Modified(nil, {self.}Prefix, {self.}LocalName);
|
|
if not ifnil({self.}Text) then
|
|
obj.Text := {self.}Text;
|
|
if not ifnil({self.}Type) then
|
|
obj.Type := {self.}Type;
|
|
return obj;
|
|
end;
|
|
|
|
function Modified.ConvertToPoint();override;
|
|
begin
|
|
|
|
end;
|
|
|
|
function Modified.ReadXmlAttrType();
|
|
begin
|
|
return ifnil({self.}XmlAttrType.Value) ? fallback_.XmlAttrType.Value : {self.}XmlAttrType.Value;
|
|
end;
|
|
|
|
function Modified.WriteXmlAttrType(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrType) then
|
|
begin
|
|
{self.}XmlAttrType := new OpenXmlAttribute("xsi", "type", nil);
|
|
attributes_["xsi:type"] := {self.}XmlAttrType;
|
|
end
|
|
{self.}XmlAttrType.Value := _value;
|
|
end;
|
|
|
|
function Relationships.create();overload;
|
|
begin
|
|
{self.}create(nil, "", "Relationships");
|
|
end;
|
|
|
|
function Relationships.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function Relationships.create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
begin
|
|
setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200);
|
|
inherited create(_parent, _prefix, _local_name);
|
|
end;
|
|
|
|
function Relationships.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
"Relationship": array(0, makeweakref(thisFunction(AppendRelationship))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function Relationships.Copy(_obj: Relationships);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function Relationships.Clone(): Relationships;override;
|
|
begin
|
|
obj := new Relationships(nil, {self.}Prefix, {self.}LocalName);
|
|
elements := {self.}Elements();
|
|
for _,element in elements do
|
|
obj.AppendChild(element.Clone());
|
|
return obj;
|
|
end;
|
|
|
|
function Relationships.ConvertToPoint();override;
|
|
begin
|
|
elems := {self.}Relationships();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
end;
|
|
|
|
function Relationships.ReadRelationships(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get("Relationship", ind);
|
|
end;
|
|
|
|
function Relationships.WriteRelationships(_index: integer; _value: nil_OR_Relationship);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadRelationships(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "Relationship", ind, _value) then
|
|
raise format("Index out of range: Relationships[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Relationships expects nil or Relationship";
|
|
end
|
|
end;
|
|
|
|
function Relationships.AddRelationship(): Relationship;
|
|
begin
|
|
obj := new Relationship(self, "", "Relationship");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Relationships.AppendRelationship(): Relationship;
|
|
begin
|
|
obj := new Relationship(self, "", "Relationship");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Relationship.create();overload;
|
|
begin
|
|
{self.}create(nil, "", "Relationship");
|
|
end;
|
|
|
|
function Relationship.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function Relationship.create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
begin
|
|
setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200);
|
|
inherited create(_parent, _prefix, _local_name);
|
|
end;
|
|
|
|
function Relationship.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
"Id": makeweakref(thisFunction(WriteXmlAttrId)),
|
|
"Type": makeweakref(thisFunction(WriteXmlAttrType)),
|
|
"Target": makeweakref(thisFunction(WriteXmlAttrTarget)),
|
|
);
|
|
sorted_child_ := array(
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function Relationship.Copy(_obj: Relationship);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.Id) then
|
|
{self.}Id := _obj.Id;
|
|
if not ifnil(_obj.Type) then
|
|
{self.}Type := _obj.Type;
|
|
if not ifnil(_obj.Target) then
|
|
{self.}Target := _obj.Target;
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function Relationship.Clone(): Relationship;override;
|
|
begin
|
|
obj := new Relationship(nil, {self.}Prefix, {self.}LocalName);
|
|
if not ifnil({self.}Id) then
|
|
obj.Id := {self.}Id;
|
|
if not ifnil({self.}Type) then
|
|
obj.Type := {self.}Type;
|
|
if not ifnil({self.}Target) then
|
|
obj.Target := {self.}Target;
|
|
return obj;
|
|
end;
|
|
|
|
function Relationship.ConvertToPoint();override;
|
|
begin
|
|
|
|
end;
|
|
|
|
function Relationship.ReadXmlAttrId();
|
|
begin
|
|
return ifnil({self.}XmlAttrId.Value) ? fallback_.XmlAttrId.Value : {self.}XmlAttrId.Value;
|
|
end;
|
|
|
|
function Relationship.WriteXmlAttrId(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrId) then
|
|
begin
|
|
{self.}XmlAttrId := new OpenXmlAttribute("", "Id", nil);
|
|
attributes_["Id"] := {self.}XmlAttrId;
|
|
end
|
|
{self.}XmlAttrId.Value := _value;
|
|
end;
|
|
|
|
function Relationship.ReadXmlAttrType();
|
|
begin
|
|
return ifnil({self.}XmlAttrType.Value) ? fallback_.XmlAttrType.Value : {self.}XmlAttrType.Value;
|
|
end;
|
|
|
|
function Relationship.WriteXmlAttrType(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrType) then
|
|
begin
|
|
{self.}XmlAttrType := new OpenXmlAttribute("", "Type", nil);
|
|
attributes_["Type"] := {self.}XmlAttrType;
|
|
end
|
|
{self.}XmlAttrType.Value := _value;
|
|
end;
|
|
|
|
function Relationship.ReadXmlAttrTarget();
|
|
begin
|
|
return ifnil({self.}XmlAttrTarget.Value) ? fallback_.XmlAttrTarget.Value : {self.}XmlAttrTarget.Value;
|
|
end;
|
|
|
|
function Relationship.WriteXmlAttrTarget(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrTarget) then
|
|
begin
|
|
{self.}XmlAttrTarget := new OpenXmlAttribute("", "Target", nil);
|
|
attributes_["Target"] := {self.}XmlAttrTarget;
|
|
end
|
|
{self.}XmlAttrTarget.Value := _value;
|
|
end;
|
|
|
|
function Types.create();overload;
|
|
begin
|
|
{self.}create(nil, "", "Types");
|
|
end;
|
|
|
|
function Types.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function Types.create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
begin
|
|
setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200);
|
|
inherited create(_parent, _prefix, _local_name);
|
|
end;
|
|
|
|
function Types.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
"Default": array(0, makeweakref(thisFunction(AppendDefault))),
|
|
"Override": array(1, makeweakref(thisFunction(AppendOverride))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function Types.Copy(_obj: Types);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function Types.Clone(): Types;override;
|
|
begin
|
|
obj := new Types(nil, {self.}Prefix, {self.}LocalName);
|
|
elements := {self.}Elements();
|
|
for _,element in elements do
|
|
obj.AppendChild(element.Clone());
|
|
return obj;
|
|
end;
|
|
|
|
function Types.ConvertToPoint();override;
|
|
begin
|
|
elems := {self.}Defaults();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}Overrides();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
end;
|
|
|
|
function Types.ReadDefaults(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get("Default", ind);
|
|
end;
|
|
|
|
function Types.WriteDefaults(_index: integer; _value: nil_OR_Default);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadDefaults(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "Default", ind, _value) then
|
|
raise format("Index out of range: Defaults[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Defaults expects nil or Default";
|
|
end
|
|
end;
|
|
|
|
function Types.ReadOverrides(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get("Override", ind);
|
|
end;
|
|
|
|
function Types.WriteOverrides(_index: integer; _value: nil_OR__Override);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadOverrides(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "Override", ind, _value) then
|
|
raise format("Index out of range: Overrides[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Overrides expects nil or _Override";
|
|
end
|
|
end;
|
|
|
|
function Types.AddDefault(): Default;
|
|
begin
|
|
obj := new Default(self, "", "Default");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Types.AddOverride(): _Override;
|
|
begin
|
|
obj := new _Override(self, "", "Override");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Types.AppendDefault(): Default;
|
|
begin
|
|
obj := new Default(self, "", "Default");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Types.AppendOverride(): _Override;
|
|
begin
|
|
obj := new _Override(self, "", "Override");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Default.create();overload;
|
|
begin
|
|
{self.}create(nil, "", "Default");
|
|
end;
|
|
|
|
function Default.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function Default.create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
begin
|
|
setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200);
|
|
inherited create(_parent, _prefix, _local_name);
|
|
end;
|
|
|
|
function Default.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
"Extension": makeweakref(thisFunction(WriteXmlAttrExtension)),
|
|
"ContentType": makeweakref(thisFunction(WriteXmlAttrContentType)),
|
|
);
|
|
sorted_child_ := array(
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function Default.Copy(_obj: Default);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.Extension) then
|
|
{self.}Extension := _obj.Extension;
|
|
if not ifnil(_obj.ContentType) then
|
|
{self.}ContentType := _obj.ContentType;
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function Default.Clone(): Default;override;
|
|
begin
|
|
obj := new Default(nil, {self.}Prefix, {self.}LocalName);
|
|
if not ifnil({self.}Extension) then
|
|
obj.Extension := {self.}Extension;
|
|
if not ifnil({self.}ContentType) then
|
|
obj.ContentType := {self.}ContentType;
|
|
return obj;
|
|
end;
|
|
|
|
function Default.ConvertToPoint();override;
|
|
begin
|
|
|
|
end;
|
|
|
|
function Default.ReadXmlAttrExtension();
|
|
begin
|
|
return ifnil({self.}XmlAttrExtension.Value) ? fallback_.XmlAttrExtension.Value : {self.}XmlAttrExtension.Value;
|
|
end;
|
|
|
|
function Default.WriteXmlAttrExtension(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrExtension) then
|
|
begin
|
|
{self.}XmlAttrExtension := new OpenXmlAttribute("", "Extension", nil);
|
|
attributes_["Extension"] := {self.}XmlAttrExtension;
|
|
end
|
|
{self.}XmlAttrExtension.Value := _value;
|
|
end;
|
|
|
|
function Default.ReadXmlAttrContentType();
|
|
begin
|
|
return ifnil({self.}XmlAttrContentType.Value) ? fallback_.XmlAttrContentType.Value : {self.}XmlAttrContentType.Value;
|
|
end;
|
|
|
|
function Default.WriteXmlAttrContentType(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrContentType) then
|
|
begin
|
|
{self.}XmlAttrContentType := new OpenXmlAttribute("", "ContentType", nil);
|
|
attributes_["ContentType"] := {self.}XmlAttrContentType;
|
|
end
|
|
{self.}XmlAttrContentType.Value := _value;
|
|
end;
|
|
|
|
function _Override.create();overload;
|
|
begin
|
|
{self.}create(nil, "", "Override");
|
|
end;
|
|
|
|
function _Override.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function _Override.create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
begin
|
|
setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200);
|
|
inherited create(_parent, _prefix, _local_name);
|
|
end;
|
|
|
|
function _Override.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
"PartName": makeweakref(thisFunction(WriteXmlAttrPartName)),
|
|
"ContentType": makeweakref(thisFunction(WriteXmlAttrContentType)),
|
|
);
|
|
sorted_child_ := array(
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function _Override.Copy(_obj: _Override);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.PartName) then
|
|
{self.}PartName := _obj.PartName;
|
|
if not ifnil(_obj.ContentType) then
|
|
{self.}ContentType := _obj.ContentType;
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function _Override.Clone(): _Override;override;
|
|
begin
|
|
obj := new _Override(nil, {self.}Prefix, {self.}LocalName);
|
|
if not ifnil({self.}PartName) then
|
|
obj.PartName := {self.}PartName;
|
|
if not ifnil({self.}ContentType) then
|
|
obj.ContentType := {self.}ContentType;
|
|
return obj;
|
|
end;
|
|
|
|
function _Override.ConvertToPoint();override;
|
|
begin
|
|
|
|
end;
|
|
|
|
function _Override.ReadXmlAttrPartName();
|
|
begin
|
|
return ifnil({self.}XmlAttrPartName.Value) ? fallback_.XmlAttrPartName.Value : {self.}XmlAttrPartName.Value;
|
|
end;
|
|
|
|
function _Override.WriteXmlAttrPartName(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrPartName) then
|
|
begin
|
|
{self.}XmlAttrPartName := new OpenXmlAttribute("", "PartName", nil);
|
|
attributes_["PartName"] := {self.}XmlAttrPartName;
|
|
end
|
|
{self.}XmlAttrPartName.Value := _value;
|
|
end;
|
|
|
|
function _Override.ReadXmlAttrContentType();
|
|
begin
|
|
return ifnil({self.}XmlAttrContentType.Value) ? fallback_.XmlAttrContentType.Value : {self.}XmlAttrContentType.Value;
|
|
end;
|
|
|
|
function _Override.WriteXmlAttrContentType(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrContentType) then
|
|
begin
|
|
{self.}XmlAttrContentType := new OpenXmlAttribute("", "ContentType", nil);
|
|
attributes_["ContentType"] := {self.}XmlAttrContentType;
|
|
end
|
|
{self.}XmlAttrContentType.Value := _value;
|
|
end;
|
|
|
|
function Num.create();overload;
|
|
begin
|
|
{self.}create(nil, "m", "num");
|
|
end;
|
|
|
|
function Num.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function Num.create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
begin
|
|
setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200);
|
|
inherited create(_parent, _prefix, _local_name);
|
|
end;
|
|
|
|
function Num.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
pre + "ctrlPr": array(0, makeweakref(thisFunction(ReadXmlChildCtrlPr))),
|
|
pre + "r": array(1, makeweakref(thisFunction(AppendR))),
|
|
pre + "d": array(2, makeweakref(thisFunction(AppendD))),
|
|
pre + "f": array(3, makeweakref(thisFunction(AppendF))),
|
|
pre + "rad": array(4, makeweakref(thisFunction(AppendRad))),
|
|
pre + "sSub": array(5, makeweakref(thisFunction(AppendSSub))),
|
|
pre + "sSup": array(6, makeweakref(thisFunction(AppendSSup))),
|
|
pre + "nary": array(7, makeweakref(thisFunction(AppendNary))),
|
|
pre + "func": array(8, makeweakref(thisFunction(AppendFunc))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function Num.Copy(_obj: Num);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.XmlChildCtrlPr) then
|
|
{self.}CtrlPr.Copy(_obj.XmlChildCtrlPr);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function Num.Clone(): Num;override;
|
|
begin
|
|
obj := new Num(nil, {self.}Prefix, {self.}LocalName);
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
elements := {self.}Elements();
|
|
for _,element in elements do
|
|
begin
|
|
case element.ElementName of
|
|
pre + "ctrlPr": obj.CtrlPr := element.Clone();
|
|
else obj.AppendChild(element.Clone());
|
|
end
|
|
end
|
|
return obj;
|
|
end;
|
|
|
|
function Num.ConvertToPoint();override;
|
|
begin
|
|
if not ifnil({self.}XmlChildCtrlPr) then
|
|
{self.}XmlChildCtrlPr.ConvertToPoint();
|
|
elems := {self.}Rs();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}Ds();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}Fs();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}Rads();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}SSubs();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}SSups();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}Naries();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}Funcs();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
end;
|
|
|
|
function Num.ReadXmlChildCtrlPr(): CtrlPr;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildCtrlPr) or {self.}XmlChildCtrlPr.Removed) then
|
|
begin
|
|
{self.}XmlChildCtrlPr := new CtrlPr(self, {self.}Prefix, "ctrlPr");
|
|
container_.Set({self.}XmlChildCtrlPr);
|
|
end
|
|
return {self.}XmlChildCtrlPr and not {self.}XmlChildCtrlPr.Removed ? {self.}XmlChildCtrlPr : fallback_.CtrlPr;
|
|
end;
|
|
|
|
function Num.WriteXmlChildCtrlPr(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildCtrlPr) then
|
|
{self.}RemoveChild({self.}XmlChildCtrlPr);
|
|
end
|
|
else if v is class(CtrlPr) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildCtrlPr := v;
|
|
container_.Set({self.}XmlChildCtrlPr);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: CtrlPr expects CtrlPr or nil";
|
|
end
|
|
end;
|
|
|
|
function Num.ReadRs(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "r", ind);
|
|
end;
|
|
|
|
function Num.WriteRs(_index: integer; _value: nil_OR_R);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadRs(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "r", ind, _value) then
|
|
raise format("Index out of range: Rs[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Rs expects nil or R";
|
|
end
|
|
end;
|
|
|
|
function Num.ReadDs(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "d", ind);
|
|
end;
|
|
|
|
function Num.WriteDs(_index: integer; _value: nil_OR_D);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadDs(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "d", ind, _value) then
|
|
raise format("Index out of range: Ds[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Ds expects nil or D";
|
|
end
|
|
end;
|
|
|
|
function Num.ReadFs(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "f", ind);
|
|
end;
|
|
|
|
function Num.WriteFs(_index: integer; _value: nil_OR_F);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadFs(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "f", ind, _value) then
|
|
raise format("Index out of range: Fs[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Fs expects nil or F";
|
|
end
|
|
end;
|
|
|
|
function Num.ReadRads(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "rad", ind);
|
|
end;
|
|
|
|
function Num.WriteRads(_index: integer; _value: nil_OR_Rad);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadRads(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "rad", ind, _value) then
|
|
raise format("Index out of range: Rads[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Rads expects nil or Rad";
|
|
end
|
|
end;
|
|
|
|
function Num.ReadSSubs(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "sSub", ind);
|
|
end;
|
|
|
|
function Num.WriteSSubs(_index: integer; _value: nil_OR_SSub);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadSSubs(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "sSub", ind, _value) then
|
|
raise format("Index out of range: SSubs[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: SSubs expects nil or SSub";
|
|
end
|
|
end;
|
|
|
|
function Num.ReadSSups(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "sSup", ind);
|
|
end;
|
|
|
|
function Num.WriteSSups(_index: integer; _value: nil_OR_SSup);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadSSups(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "sSup", ind, _value) then
|
|
raise format("Index out of range: SSups[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: SSups expects nil or SSup";
|
|
end
|
|
end;
|
|
|
|
function Num.ReadNaries(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "nary", ind);
|
|
end;
|
|
|
|
function Num.WriteNaries(_index: integer; _value: nil_OR_Nary);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadNaries(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "nary", ind, _value) then
|
|
raise format("Index out of range: Naries[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Naries expects nil or Nary";
|
|
end
|
|
end;
|
|
|
|
function Num.ReadFuncs(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "func", ind);
|
|
end;
|
|
|
|
function Num.WriteFuncs(_index: integer; _value: nil_OR_Func);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadFuncs(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "func", ind, _value) then
|
|
raise format("Index out of range: Funcs[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Funcs expects nil or Func";
|
|
end
|
|
end;
|
|
|
|
function Num.AddR(): R;
|
|
begin
|
|
obj := new R(self, {self.}Prefix, "r");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Num.AddD(): D;
|
|
begin
|
|
obj := new D(self, {self.}Prefix, "d");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Num.AddF(): F;
|
|
begin
|
|
obj := new F(self, {self.}Prefix, "f");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Num.AddRad(): Rad;
|
|
begin
|
|
obj := new Rad(self, {self.}Prefix, "rad");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Num.AddSSub(): SSub;
|
|
begin
|
|
obj := new SSub(self, {self.}Prefix, "sSub");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Num.AddSSup(): SSup;
|
|
begin
|
|
obj := new SSup(self, {self.}Prefix, "sSup");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Num.AddNary(): Nary;
|
|
begin
|
|
obj := new Nary(self, {self.}Prefix, "nary");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Num.AddFunc(): Func;
|
|
begin
|
|
obj := new Func(self, {self.}Prefix, "func");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Num.AppendR(): R;
|
|
begin
|
|
obj := new R(self, {self.}Prefix, "r");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Num.AppendD(): D;
|
|
begin
|
|
obj := new D(self, {self.}Prefix, "d");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Num.AppendF(): F;
|
|
begin
|
|
obj := new F(self, {self.}Prefix, "f");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Num.AppendRad(): Rad;
|
|
begin
|
|
obj := new Rad(self, {self.}Prefix, "rad");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Num.AppendSSub(): SSub;
|
|
begin
|
|
obj := new SSub(self, {self.}Prefix, "sSub");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Num.AppendSSup(): SSup;
|
|
begin
|
|
obj := new SSup(self, {self.}Prefix, "sSup");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Num.AppendNary(): Nary;
|
|
begin
|
|
obj := new Nary(self, {self.}Prefix, "nary");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Num.AppendFunc(): Func;
|
|
begin
|
|
obj := new Func(self, {self.}Prefix, "func");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Deg.create();overload;
|
|
begin
|
|
{self.}create(nil, "m", "deg");
|
|
end;
|
|
|
|
function Deg.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function Deg.create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
begin
|
|
setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200);
|
|
inherited create(_parent, _prefix, _local_name);
|
|
end;
|
|
|
|
function Deg.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
pre + "ctrlPr": array(0, makeweakref(thisFunction(ReadXmlChildCtrlPr))),
|
|
pre + "r": array(1, makeweakref(thisFunction(AppendR))),
|
|
pre + "d": array(2, makeweakref(thisFunction(AppendD))),
|
|
pre + "f": array(3, makeweakref(thisFunction(AppendF))),
|
|
pre + "rad": array(4, makeweakref(thisFunction(AppendRad))),
|
|
pre + "sSub": array(5, makeweakref(thisFunction(AppendSSub))),
|
|
pre + "sSup": array(6, makeweakref(thisFunction(AppendSSup))),
|
|
pre + "nary": array(7, makeweakref(thisFunction(AppendNary))),
|
|
pre + "func": array(8, makeweakref(thisFunction(AppendFunc))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function Deg.Copy(_obj: Deg);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.XmlChildCtrlPr) then
|
|
{self.}CtrlPr.Copy(_obj.XmlChildCtrlPr);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function Deg.Clone(): Deg;override;
|
|
begin
|
|
obj := new Deg(nil, {self.}Prefix, {self.}LocalName);
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
elements := {self.}Elements();
|
|
for _,element in elements do
|
|
begin
|
|
case element.ElementName of
|
|
pre + "ctrlPr": obj.CtrlPr := element.Clone();
|
|
else obj.AppendChild(element.Clone());
|
|
end
|
|
end
|
|
return obj;
|
|
end;
|
|
|
|
function Deg.ConvertToPoint();override;
|
|
begin
|
|
if not ifnil({self.}XmlChildCtrlPr) then
|
|
{self.}XmlChildCtrlPr.ConvertToPoint();
|
|
elems := {self.}Rs();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}Ds();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}Fs();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}Rads();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}SSubs();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}SSups();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}Naries();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}Funcs();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
end;
|
|
|
|
function Deg.ReadXmlChildCtrlPr(): CtrlPr;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildCtrlPr) or {self.}XmlChildCtrlPr.Removed) then
|
|
begin
|
|
{self.}XmlChildCtrlPr := new CtrlPr(self, {self.}Prefix, "ctrlPr");
|
|
container_.Set({self.}XmlChildCtrlPr);
|
|
end
|
|
return {self.}XmlChildCtrlPr and not {self.}XmlChildCtrlPr.Removed ? {self.}XmlChildCtrlPr : fallback_.CtrlPr;
|
|
end;
|
|
|
|
function Deg.WriteXmlChildCtrlPr(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildCtrlPr) then
|
|
{self.}RemoveChild({self.}XmlChildCtrlPr);
|
|
end
|
|
else if v is class(CtrlPr) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildCtrlPr := v;
|
|
container_.Set({self.}XmlChildCtrlPr);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: CtrlPr expects CtrlPr or nil";
|
|
end
|
|
end;
|
|
|
|
function Deg.ReadRs(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "r", ind);
|
|
end;
|
|
|
|
function Deg.WriteRs(_index: integer; _value: nil_OR_R);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadRs(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "r", ind, _value) then
|
|
raise format("Index out of range: Rs[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Rs expects nil or R";
|
|
end
|
|
end;
|
|
|
|
function Deg.ReadDs(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "d", ind);
|
|
end;
|
|
|
|
function Deg.WriteDs(_index: integer; _value: nil_OR_D);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadDs(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "d", ind, _value) then
|
|
raise format("Index out of range: Ds[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Ds expects nil or D";
|
|
end
|
|
end;
|
|
|
|
function Deg.ReadFs(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "f", ind);
|
|
end;
|
|
|
|
function Deg.WriteFs(_index: integer; _value: nil_OR_F);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadFs(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "f", ind, _value) then
|
|
raise format("Index out of range: Fs[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Fs expects nil or F";
|
|
end
|
|
end;
|
|
|
|
function Deg.ReadRads(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "rad", ind);
|
|
end;
|
|
|
|
function Deg.WriteRads(_index: integer; _value: nil_OR_Rad);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadRads(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "rad", ind, _value) then
|
|
raise format("Index out of range: Rads[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Rads expects nil or Rad";
|
|
end
|
|
end;
|
|
|
|
function Deg.ReadSSubs(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "sSub", ind);
|
|
end;
|
|
|
|
function Deg.WriteSSubs(_index: integer; _value: nil_OR_SSub);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadSSubs(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "sSub", ind, _value) then
|
|
raise format("Index out of range: SSubs[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: SSubs expects nil or SSub";
|
|
end
|
|
end;
|
|
|
|
function Deg.ReadSSups(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "sSup", ind);
|
|
end;
|
|
|
|
function Deg.WriteSSups(_index: integer; _value: nil_OR_SSup);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadSSups(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "sSup", ind, _value) then
|
|
raise format("Index out of range: SSups[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: SSups expects nil or SSup";
|
|
end
|
|
end;
|
|
|
|
function Deg.ReadNaries(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "nary", ind);
|
|
end;
|
|
|
|
function Deg.WriteNaries(_index: integer; _value: nil_OR_Nary);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadNaries(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "nary", ind, _value) then
|
|
raise format("Index out of range: Naries[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Naries expects nil or Nary";
|
|
end
|
|
end;
|
|
|
|
function Deg.ReadFuncs(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "func", ind);
|
|
end;
|
|
|
|
function Deg.WriteFuncs(_index: integer; _value: nil_OR_Func);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadFuncs(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "func", ind, _value) then
|
|
raise format("Index out of range: Funcs[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Funcs expects nil or Func";
|
|
end
|
|
end;
|
|
|
|
function Deg.AddR(): R;
|
|
begin
|
|
obj := new R(self, {self.}Prefix, "r");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Deg.AddD(): D;
|
|
begin
|
|
obj := new D(self, {self.}Prefix, "d");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Deg.AddF(): F;
|
|
begin
|
|
obj := new F(self, {self.}Prefix, "f");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Deg.AddRad(): Rad;
|
|
begin
|
|
obj := new Rad(self, {self.}Prefix, "rad");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Deg.AddSSub(): SSub;
|
|
begin
|
|
obj := new SSub(self, {self.}Prefix, "sSub");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Deg.AddSSup(): SSup;
|
|
begin
|
|
obj := new SSup(self, {self.}Prefix, "sSup");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Deg.AddNary(): Nary;
|
|
begin
|
|
obj := new Nary(self, {self.}Prefix, "nary");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Deg.AddFunc(): Func;
|
|
begin
|
|
obj := new Func(self, {self.}Prefix, "func");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Deg.AppendR(): R;
|
|
begin
|
|
obj := new R(self, {self.}Prefix, "r");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Deg.AppendD(): D;
|
|
begin
|
|
obj := new D(self, {self.}Prefix, "d");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Deg.AppendF(): F;
|
|
begin
|
|
obj := new F(self, {self.}Prefix, "f");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Deg.AppendRad(): Rad;
|
|
begin
|
|
obj := new Rad(self, {self.}Prefix, "rad");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Deg.AppendSSub(): SSub;
|
|
begin
|
|
obj := new SSub(self, {self.}Prefix, "sSub");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Deg.AppendSSup(): SSup;
|
|
begin
|
|
obj := new SSup(self, {self.}Prefix, "sSup");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Deg.AppendNary(): Nary;
|
|
begin
|
|
obj := new Nary(self, {self.}Prefix, "nary");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Deg.AppendFunc(): Func;
|
|
begin
|
|
obj := new Func(self, {self.}Prefix, "func");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function E.create();overload;
|
|
begin
|
|
{self.}create(nil, "m", "e");
|
|
end;
|
|
|
|
function E.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function E.create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
begin
|
|
setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200);
|
|
inherited create(_parent, _prefix, _local_name);
|
|
end;
|
|
|
|
function E.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
pre + "ctrlPr": array(0, makeweakref(thisFunction(ReadXmlChildCtrlPr))),
|
|
pre + "r": array(1, makeweakref(thisFunction(AppendR))),
|
|
pre + "d": array(2, makeweakref(thisFunction(AppendD))),
|
|
pre + "f": array(3, makeweakref(thisFunction(AppendF))),
|
|
pre + "rad": array(4, makeweakref(thisFunction(AppendRad))),
|
|
pre + "sSub": array(5, makeweakref(thisFunction(AppendSSub))),
|
|
pre + "sSup": array(6, makeweakref(thisFunction(AppendSSup))),
|
|
pre + "nary": array(7, makeweakref(thisFunction(AppendNary))),
|
|
pre + "func": array(8, makeweakref(thisFunction(AppendFunc))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function E.Copy(_obj: E);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.XmlChildCtrlPr) then
|
|
{self.}CtrlPr.Copy(_obj.XmlChildCtrlPr);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function E.Clone(): E;override;
|
|
begin
|
|
obj := new E(nil, {self.}Prefix, {self.}LocalName);
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
elements := {self.}Elements();
|
|
for _,element in elements do
|
|
begin
|
|
case element.ElementName of
|
|
pre + "ctrlPr": obj.CtrlPr := element.Clone();
|
|
else obj.AppendChild(element.Clone());
|
|
end
|
|
end
|
|
return obj;
|
|
end;
|
|
|
|
function E.ConvertToPoint();override;
|
|
begin
|
|
if not ifnil({self.}XmlChildCtrlPr) then
|
|
{self.}XmlChildCtrlPr.ConvertToPoint();
|
|
elems := {self.}Rs();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}Ds();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}Fs();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}Rads();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}SSubs();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}SSups();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}Naries();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}Funcs();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
end;
|
|
|
|
function E.ReadXmlChildCtrlPr(): CtrlPr;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildCtrlPr) or {self.}XmlChildCtrlPr.Removed) then
|
|
begin
|
|
{self.}XmlChildCtrlPr := new CtrlPr(self, {self.}Prefix, "ctrlPr");
|
|
container_.Set({self.}XmlChildCtrlPr);
|
|
end
|
|
return {self.}XmlChildCtrlPr and not {self.}XmlChildCtrlPr.Removed ? {self.}XmlChildCtrlPr : fallback_.CtrlPr;
|
|
end;
|
|
|
|
function E.WriteXmlChildCtrlPr(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildCtrlPr) then
|
|
{self.}RemoveChild({self.}XmlChildCtrlPr);
|
|
end
|
|
else if v is class(CtrlPr) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildCtrlPr := v;
|
|
container_.Set({self.}XmlChildCtrlPr);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: CtrlPr expects CtrlPr or nil";
|
|
end
|
|
end;
|
|
|
|
function E.ReadRs(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "r", ind);
|
|
end;
|
|
|
|
function E.WriteRs(_index: integer; _value: nil_OR_R);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadRs(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "r", ind, _value) then
|
|
raise format("Index out of range: Rs[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Rs expects nil or R";
|
|
end
|
|
end;
|
|
|
|
function E.ReadDs(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "d", ind);
|
|
end;
|
|
|
|
function E.WriteDs(_index: integer; _value: nil_OR_D);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadDs(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "d", ind, _value) then
|
|
raise format("Index out of range: Ds[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Ds expects nil or D";
|
|
end
|
|
end;
|
|
|
|
function E.ReadFs(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "f", ind);
|
|
end;
|
|
|
|
function E.WriteFs(_index: integer; _value: nil_OR_F);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadFs(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "f", ind, _value) then
|
|
raise format("Index out of range: Fs[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Fs expects nil or F";
|
|
end
|
|
end;
|
|
|
|
function E.ReadRads(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "rad", ind);
|
|
end;
|
|
|
|
function E.WriteRads(_index: integer; _value: nil_OR_Rad);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadRads(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "rad", ind, _value) then
|
|
raise format("Index out of range: Rads[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Rads expects nil or Rad";
|
|
end
|
|
end;
|
|
|
|
function E.ReadSSubs(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "sSub", ind);
|
|
end;
|
|
|
|
function E.WriteSSubs(_index: integer; _value: nil_OR_SSub);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadSSubs(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "sSub", ind, _value) then
|
|
raise format("Index out of range: SSubs[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: SSubs expects nil or SSub";
|
|
end
|
|
end;
|
|
|
|
function E.ReadSSups(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "sSup", ind);
|
|
end;
|
|
|
|
function E.WriteSSups(_index: integer; _value: nil_OR_SSup);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadSSups(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "sSup", ind, _value) then
|
|
raise format("Index out of range: SSups[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: SSups expects nil or SSup";
|
|
end
|
|
end;
|
|
|
|
function E.ReadNaries(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "nary", ind);
|
|
end;
|
|
|
|
function E.WriteNaries(_index: integer; _value: nil_OR_Nary);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadNaries(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "nary", ind, _value) then
|
|
raise format("Index out of range: Naries[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Naries expects nil or Nary";
|
|
end
|
|
end;
|
|
|
|
function E.ReadFuncs(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "func", ind);
|
|
end;
|
|
|
|
function E.WriteFuncs(_index: integer; _value: nil_OR_Func);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadFuncs(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "func", ind, _value) then
|
|
raise format("Index out of range: Funcs[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Funcs expects nil or Func";
|
|
end
|
|
end;
|
|
|
|
function E.AddR(): R;
|
|
begin
|
|
obj := new R(self, {self.}Prefix, "r");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function E.AddD(): D;
|
|
begin
|
|
obj := new D(self, {self.}Prefix, "d");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function E.AddF(): F;
|
|
begin
|
|
obj := new F(self, {self.}Prefix, "f");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function E.AddRad(): Rad;
|
|
begin
|
|
obj := new Rad(self, {self.}Prefix, "rad");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function E.AddSSub(): SSub;
|
|
begin
|
|
obj := new SSub(self, {self.}Prefix, "sSub");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function E.AddSSup(): SSup;
|
|
begin
|
|
obj := new SSup(self, {self.}Prefix, "sSup");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function E.AddNary(): Nary;
|
|
begin
|
|
obj := new Nary(self, {self.}Prefix, "nary");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function E.AddFunc(): Func;
|
|
begin
|
|
obj := new Func(self, {self.}Prefix, "func");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function E.AppendR(): R;
|
|
begin
|
|
obj := new R(self, {self.}Prefix, "r");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function E.AppendD(): D;
|
|
begin
|
|
obj := new D(self, {self.}Prefix, "d");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function E.AppendF(): F;
|
|
begin
|
|
obj := new F(self, {self.}Prefix, "f");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function E.AppendRad(): Rad;
|
|
begin
|
|
obj := new Rad(self, {self.}Prefix, "rad");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function E.AppendSSub(): SSub;
|
|
begin
|
|
obj := new SSub(self, {self.}Prefix, "sSub");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function E.AppendSSup(): SSup;
|
|
begin
|
|
obj := new SSup(self, {self.}Prefix, "sSup");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function E.AppendNary(): Nary;
|
|
begin
|
|
obj := new Nary(self, {self.}Prefix, "nary");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function E.AppendFunc(): Func;
|
|
begin
|
|
obj := new Func(self, {self.}Prefix, "func");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Sup.create();overload;
|
|
begin
|
|
{self.}create(nil, "m", "sup");
|
|
end;
|
|
|
|
function Sup.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function Sup.create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
begin
|
|
setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200);
|
|
inherited create(_parent, _prefix, _local_name);
|
|
end;
|
|
|
|
function Sup.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
pre + "ctrlPr": array(0, makeweakref(thisFunction(ReadXmlChildCtrlPr))),
|
|
pre + "r": array(1, makeweakref(thisFunction(AppendR))),
|
|
pre + "d": array(2, makeweakref(thisFunction(AppendD))),
|
|
pre + "f": array(3, makeweakref(thisFunction(AppendF))),
|
|
pre + "rad": array(4, makeweakref(thisFunction(AppendRad))),
|
|
pre + "sSub": array(5, makeweakref(thisFunction(AppendSSub))),
|
|
pre + "sSup": array(6, makeweakref(thisFunction(AppendSSup))),
|
|
pre + "nary": array(7, makeweakref(thisFunction(AppendNary))),
|
|
pre + "func": array(8, makeweakref(thisFunction(AppendFunc))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function Sup.Copy(_obj: Sup);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.XmlChildCtrlPr) then
|
|
{self.}CtrlPr.Copy(_obj.XmlChildCtrlPr);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function Sup.Clone(): Sup;override;
|
|
begin
|
|
obj := new Sup(nil, {self.}Prefix, {self.}LocalName);
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
elements := {self.}Elements();
|
|
for _,element in elements do
|
|
begin
|
|
case element.ElementName of
|
|
pre + "ctrlPr": obj.CtrlPr := element.Clone();
|
|
else obj.AppendChild(element.Clone());
|
|
end
|
|
end
|
|
return obj;
|
|
end;
|
|
|
|
function Sup.ConvertToPoint();override;
|
|
begin
|
|
if not ifnil({self.}XmlChildCtrlPr) then
|
|
{self.}XmlChildCtrlPr.ConvertToPoint();
|
|
elems := {self.}Rs();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}Ds();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}Fs();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}Rads();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}SSubs();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}SSups();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}Naries();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}Funcs();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
end;
|
|
|
|
function Sup.ReadXmlChildCtrlPr(): CtrlPr;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildCtrlPr) or {self.}XmlChildCtrlPr.Removed) then
|
|
begin
|
|
{self.}XmlChildCtrlPr := new CtrlPr(self, {self.}Prefix, "ctrlPr");
|
|
container_.Set({self.}XmlChildCtrlPr);
|
|
end
|
|
return {self.}XmlChildCtrlPr and not {self.}XmlChildCtrlPr.Removed ? {self.}XmlChildCtrlPr : fallback_.CtrlPr;
|
|
end;
|
|
|
|
function Sup.WriteXmlChildCtrlPr(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildCtrlPr) then
|
|
{self.}RemoveChild({self.}XmlChildCtrlPr);
|
|
end
|
|
else if v is class(CtrlPr) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildCtrlPr := v;
|
|
container_.Set({self.}XmlChildCtrlPr);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: CtrlPr expects CtrlPr or nil";
|
|
end
|
|
end;
|
|
|
|
function Sup.ReadRs(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "r", ind);
|
|
end;
|
|
|
|
function Sup.WriteRs(_index: integer; _value: nil_OR_R);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadRs(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "r", ind, _value) then
|
|
raise format("Index out of range: Rs[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Rs expects nil or R";
|
|
end
|
|
end;
|
|
|
|
function Sup.ReadDs(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "d", ind);
|
|
end;
|
|
|
|
function Sup.WriteDs(_index: integer; _value: nil_OR_D);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadDs(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "d", ind, _value) then
|
|
raise format("Index out of range: Ds[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Ds expects nil or D";
|
|
end
|
|
end;
|
|
|
|
function Sup.ReadFs(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "f", ind);
|
|
end;
|
|
|
|
function Sup.WriteFs(_index: integer; _value: nil_OR_F);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadFs(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "f", ind, _value) then
|
|
raise format("Index out of range: Fs[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Fs expects nil or F";
|
|
end
|
|
end;
|
|
|
|
function Sup.ReadRads(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "rad", ind);
|
|
end;
|
|
|
|
function Sup.WriteRads(_index: integer; _value: nil_OR_Rad);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadRads(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "rad", ind, _value) then
|
|
raise format("Index out of range: Rads[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Rads expects nil or Rad";
|
|
end
|
|
end;
|
|
|
|
function Sup.ReadSSubs(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "sSub", ind);
|
|
end;
|
|
|
|
function Sup.WriteSSubs(_index: integer; _value: nil_OR_SSub);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadSSubs(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "sSub", ind, _value) then
|
|
raise format("Index out of range: SSubs[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: SSubs expects nil or SSub";
|
|
end
|
|
end;
|
|
|
|
function Sup.ReadSSups(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "sSup", ind);
|
|
end;
|
|
|
|
function Sup.WriteSSups(_index: integer; _value: nil_OR_SSup);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadSSups(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "sSup", ind, _value) then
|
|
raise format("Index out of range: SSups[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: SSups expects nil or SSup";
|
|
end
|
|
end;
|
|
|
|
function Sup.ReadNaries(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "nary", ind);
|
|
end;
|
|
|
|
function Sup.WriteNaries(_index: integer; _value: nil_OR_Nary);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadNaries(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "nary", ind, _value) then
|
|
raise format("Index out of range: Naries[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Naries expects nil or Nary";
|
|
end
|
|
end;
|
|
|
|
function Sup.ReadFuncs(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "func", ind);
|
|
end;
|
|
|
|
function Sup.WriteFuncs(_index: integer; _value: nil_OR_Func);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadFuncs(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "func", ind, _value) then
|
|
raise format("Index out of range: Funcs[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Funcs expects nil or Func";
|
|
end
|
|
end;
|
|
|
|
function Sup.AddR(): R;
|
|
begin
|
|
obj := new R(self, {self.}Prefix, "r");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Sup.AddD(): D;
|
|
begin
|
|
obj := new D(self, {self.}Prefix, "d");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Sup.AddF(): F;
|
|
begin
|
|
obj := new F(self, {self.}Prefix, "f");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Sup.AddRad(): Rad;
|
|
begin
|
|
obj := new Rad(self, {self.}Prefix, "rad");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Sup.AddSSub(): SSub;
|
|
begin
|
|
obj := new SSub(self, {self.}Prefix, "sSub");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Sup.AddSSup(): SSup;
|
|
begin
|
|
obj := new SSup(self, {self.}Prefix, "sSup");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Sup.AddNary(): Nary;
|
|
begin
|
|
obj := new Nary(self, {self.}Prefix, "nary");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Sup.AddFunc(): Func;
|
|
begin
|
|
obj := new Func(self, {self.}Prefix, "func");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Sup.AppendR(): R;
|
|
begin
|
|
obj := new R(self, {self.}Prefix, "r");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Sup.AppendD(): D;
|
|
begin
|
|
obj := new D(self, {self.}Prefix, "d");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Sup.AppendF(): F;
|
|
begin
|
|
obj := new F(self, {self.}Prefix, "f");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Sup.AppendRad(): Rad;
|
|
begin
|
|
obj := new Rad(self, {self.}Prefix, "rad");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Sup.AppendSSub(): SSub;
|
|
begin
|
|
obj := new SSub(self, {self.}Prefix, "sSub");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Sup.AppendSSup(): SSup;
|
|
begin
|
|
obj := new SSup(self, {self.}Prefix, "sSup");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Sup.AppendNary(): Nary;
|
|
begin
|
|
obj := new Nary(self, {self.}Prefix, "nary");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Sup.AppendFunc(): Func;
|
|
begin
|
|
obj := new Func(self, {self.}Prefix, "func");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Den.create();overload;
|
|
begin
|
|
{self.}create(nil, "m", "den");
|
|
end;
|
|
|
|
function Den.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function Den.create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
begin
|
|
setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200);
|
|
inherited create(_parent, _prefix, _local_name);
|
|
end;
|
|
|
|
function Den.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
pre + "ctrlPr": array(0, makeweakref(thisFunction(ReadXmlChildCtrlPr))),
|
|
pre + "r": array(1, makeweakref(thisFunction(AppendR))),
|
|
pre + "d": array(2, makeweakref(thisFunction(AppendD))),
|
|
pre + "f": array(3, makeweakref(thisFunction(AppendF))),
|
|
pre + "rad": array(4, makeweakref(thisFunction(AppendRad))),
|
|
pre + "sSub": array(5, makeweakref(thisFunction(AppendSSub))),
|
|
pre + "sSup": array(6, makeweakref(thisFunction(AppendSSup))),
|
|
pre + "nary": array(7, makeweakref(thisFunction(AppendNary))),
|
|
pre + "func": array(8, makeweakref(thisFunction(AppendFunc))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function Den.Copy(_obj: Den);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.XmlChildCtrlPr) then
|
|
{self.}CtrlPr.Copy(_obj.XmlChildCtrlPr);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function Den.Clone(): Den;override;
|
|
begin
|
|
obj := new Den(nil, {self.}Prefix, {self.}LocalName);
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
elements := {self.}Elements();
|
|
for _,element in elements do
|
|
begin
|
|
case element.ElementName of
|
|
pre + "ctrlPr": obj.CtrlPr := element.Clone();
|
|
else obj.AppendChild(element.Clone());
|
|
end
|
|
end
|
|
return obj;
|
|
end;
|
|
|
|
function Den.ConvertToPoint();override;
|
|
begin
|
|
if not ifnil({self.}XmlChildCtrlPr) then
|
|
{self.}XmlChildCtrlPr.ConvertToPoint();
|
|
elems := {self.}Rs();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}Ds();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}Fs();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}Rads();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}SSubs();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}SSups();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}Naries();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}Funcs();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
end;
|
|
|
|
function Den.ReadXmlChildCtrlPr(): CtrlPr;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildCtrlPr) or {self.}XmlChildCtrlPr.Removed) then
|
|
begin
|
|
{self.}XmlChildCtrlPr := new CtrlPr(self, {self.}Prefix, "ctrlPr");
|
|
container_.Set({self.}XmlChildCtrlPr);
|
|
end
|
|
return {self.}XmlChildCtrlPr and not {self.}XmlChildCtrlPr.Removed ? {self.}XmlChildCtrlPr : fallback_.CtrlPr;
|
|
end;
|
|
|
|
function Den.WriteXmlChildCtrlPr(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildCtrlPr) then
|
|
{self.}RemoveChild({self.}XmlChildCtrlPr);
|
|
end
|
|
else if v is class(CtrlPr) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildCtrlPr := v;
|
|
container_.Set({self.}XmlChildCtrlPr);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: CtrlPr expects CtrlPr or nil";
|
|
end
|
|
end;
|
|
|
|
function Den.ReadRs(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "r", ind);
|
|
end;
|
|
|
|
function Den.WriteRs(_index: integer; _value: nil_OR_R);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadRs(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "r", ind, _value) then
|
|
raise format("Index out of range: Rs[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Rs expects nil or R";
|
|
end
|
|
end;
|
|
|
|
function Den.ReadDs(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "d", ind);
|
|
end;
|
|
|
|
function Den.WriteDs(_index: integer; _value: nil_OR_D);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadDs(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "d", ind, _value) then
|
|
raise format("Index out of range: Ds[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Ds expects nil or D";
|
|
end
|
|
end;
|
|
|
|
function Den.ReadFs(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "f", ind);
|
|
end;
|
|
|
|
function Den.WriteFs(_index: integer; _value: nil_OR_F);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadFs(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "f", ind, _value) then
|
|
raise format("Index out of range: Fs[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Fs expects nil or F";
|
|
end
|
|
end;
|
|
|
|
function Den.ReadRads(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "rad", ind);
|
|
end;
|
|
|
|
function Den.WriteRads(_index: integer; _value: nil_OR_Rad);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadRads(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "rad", ind, _value) then
|
|
raise format("Index out of range: Rads[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Rads expects nil or Rad";
|
|
end
|
|
end;
|
|
|
|
function Den.ReadSSubs(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "sSub", ind);
|
|
end;
|
|
|
|
function Den.WriteSSubs(_index: integer; _value: nil_OR_SSub);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadSSubs(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "sSub", ind, _value) then
|
|
raise format("Index out of range: SSubs[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: SSubs expects nil or SSub";
|
|
end
|
|
end;
|
|
|
|
function Den.ReadSSups(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "sSup", ind);
|
|
end;
|
|
|
|
function Den.WriteSSups(_index: integer; _value: nil_OR_SSup);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadSSups(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "sSup", ind, _value) then
|
|
raise format("Index out of range: SSups[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: SSups expects nil or SSup";
|
|
end
|
|
end;
|
|
|
|
function Den.ReadNaries(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "nary", ind);
|
|
end;
|
|
|
|
function Den.WriteNaries(_index: integer; _value: nil_OR_Nary);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadNaries(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "nary", ind, _value) then
|
|
raise format("Index out of range: Naries[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Naries expects nil or Nary";
|
|
end
|
|
end;
|
|
|
|
function Den.ReadFuncs(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "func", ind);
|
|
end;
|
|
|
|
function Den.WriteFuncs(_index: integer; _value: nil_OR_Func);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadFuncs(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "func", ind, _value) then
|
|
raise format("Index out of range: Funcs[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Funcs expects nil or Func";
|
|
end
|
|
end;
|
|
|
|
function Den.AddR(): R;
|
|
begin
|
|
obj := new R(self, {self.}Prefix, "r");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Den.AddD(): D;
|
|
begin
|
|
obj := new D(self, {self.}Prefix, "d");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Den.AddF(): F;
|
|
begin
|
|
obj := new F(self, {self.}Prefix, "f");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Den.AddRad(): Rad;
|
|
begin
|
|
obj := new Rad(self, {self.}Prefix, "rad");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Den.AddSSub(): SSub;
|
|
begin
|
|
obj := new SSub(self, {self.}Prefix, "sSub");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Den.AddSSup(): SSup;
|
|
begin
|
|
obj := new SSup(self, {self.}Prefix, "sSup");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Den.AddNary(): Nary;
|
|
begin
|
|
obj := new Nary(self, {self.}Prefix, "nary");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Den.AddFunc(): Func;
|
|
begin
|
|
obj := new Func(self, {self.}Prefix, "func");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Den.AppendR(): R;
|
|
begin
|
|
obj := new R(self, {self.}Prefix, "r");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Den.AppendD(): D;
|
|
begin
|
|
obj := new D(self, {self.}Prefix, "d");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Den.AppendF(): F;
|
|
begin
|
|
obj := new F(self, {self.}Prefix, "f");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Den.AppendRad(): Rad;
|
|
begin
|
|
obj := new Rad(self, {self.}Prefix, "rad");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Den.AppendSSub(): SSub;
|
|
begin
|
|
obj := new SSub(self, {self.}Prefix, "sSub");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Den.AppendSSup(): SSup;
|
|
begin
|
|
obj := new SSup(self, {self.}Prefix, "sSup");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Den.AppendNary(): Nary;
|
|
begin
|
|
obj := new Nary(self, {self.}Prefix, "nary");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Den.AppendFunc(): Func;
|
|
begin
|
|
obj := new Func(self, {self.}Prefix, "func");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Sub.create();overload;
|
|
begin
|
|
{self.}create(nil, "m", "sub");
|
|
end;
|
|
|
|
function Sub.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function Sub.create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
begin
|
|
setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200);
|
|
inherited create(_parent, _prefix, _local_name);
|
|
end;
|
|
|
|
function Sub.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
pre + "ctrlPr": array(0, makeweakref(thisFunction(ReadXmlChildCtrlPr))),
|
|
pre + "r": array(1, makeweakref(thisFunction(AppendR))),
|
|
pre + "d": array(2, makeweakref(thisFunction(AppendD))),
|
|
pre + "f": array(3, makeweakref(thisFunction(AppendF))),
|
|
pre + "rad": array(4, makeweakref(thisFunction(AppendRad))),
|
|
pre + "sSub": array(5, makeweakref(thisFunction(AppendSSub))),
|
|
pre + "sSup": array(6, makeweakref(thisFunction(AppendSSup))),
|
|
pre + "nary": array(7, makeweakref(thisFunction(AppendNary))),
|
|
pre + "func": array(8, makeweakref(thisFunction(AppendFunc))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function Sub.Copy(_obj: Sub);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.XmlChildCtrlPr) then
|
|
{self.}CtrlPr.Copy(_obj.XmlChildCtrlPr);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function Sub.Clone(): Sub;override;
|
|
begin
|
|
obj := new Sub(nil, {self.}Prefix, {self.}LocalName);
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
elements := {self.}Elements();
|
|
for _,element in elements do
|
|
begin
|
|
case element.ElementName of
|
|
pre + "ctrlPr": obj.CtrlPr := element.Clone();
|
|
else obj.AppendChild(element.Clone());
|
|
end
|
|
end
|
|
return obj;
|
|
end;
|
|
|
|
function Sub.ConvertToPoint();override;
|
|
begin
|
|
if not ifnil({self.}XmlChildCtrlPr) then
|
|
{self.}XmlChildCtrlPr.ConvertToPoint();
|
|
elems := {self.}Rs();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}Ds();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}Fs();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}Rads();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}SSubs();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}SSups();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}Naries();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
elems := {self.}Funcs();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
end;
|
|
|
|
function Sub.ReadXmlChildCtrlPr(): CtrlPr;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildCtrlPr) or {self.}XmlChildCtrlPr.Removed) then
|
|
begin
|
|
{self.}XmlChildCtrlPr := new CtrlPr(self, {self.}Prefix, "ctrlPr");
|
|
container_.Set({self.}XmlChildCtrlPr);
|
|
end
|
|
return {self.}XmlChildCtrlPr and not {self.}XmlChildCtrlPr.Removed ? {self.}XmlChildCtrlPr : fallback_.CtrlPr;
|
|
end;
|
|
|
|
function Sub.WriteXmlChildCtrlPr(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildCtrlPr) then
|
|
{self.}RemoveChild({self.}XmlChildCtrlPr);
|
|
end
|
|
else if v is class(CtrlPr) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildCtrlPr := v;
|
|
container_.Set({self.}XmlChildCtrlPr);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: CtrlPr expects CtrlPr or nil";
|
|
end
|
|
end;
|
|
|
|
function Sub.ReadRs(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "r", ind);
|
|
end;
|
|
|
|
function Sub.WriteRs(_index: integer; _value: nil_OR_R);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadRs(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "r", ind, _value) then
|
|
raise format("Index out of range: Rs[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Rs expects nil or R";
|
|
end
|
|
end;
|
|
|
|
function Sub.ReadDs(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "d", ind);
|
|
end;
|
|
|
|
function Sub.WriteDs(_index: integer; _value: nil_OR_D);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadDs(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "d", ind, _value) then
|
|
raise format("Index out of range: Ds[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Ds expects nil or D";
|
|
end
|
|
end;
|
|
|
|
function Sub.ReadFs(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "f", ind);
|
|
end;
|
|
|
|
function Sub.WriteFs(_index: integer; _value: nil_OR_F);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadFs(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "f", ind, _value) then
|
|
raise format("Index out of range: Fs[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Fs expects nil or F";
|
|
end
|
|
end;
|
|
|
|
function Sub.ReadRads(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "rad", ind);
|
|
end;
|
|
|
|
function Sub.WriteRads(_index: integer; _value: nil_OR_Rad);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadRads(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "rad", ind, _value) then
|
|
raise format("Index out of range: Rads[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Rads expects nil or Rad";
|
|
end
|
|
end;
|
|
|
|
function Sub.ReadSSubs(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "sSub", ind);
|
|
end;
|
|
|
|
function Sub.WriteSSubs(_index: integer; _value: nil_OR_SSub);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadSSubs(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "sSub", ind, _value) then
|
|
raise format("Index out of range: SSubs[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: SSubs expects nil or SSub";
|
|
end
|
|
end;
|
|
|
|
function Sub.ReadSSups(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "sSup", ind);
|
|
end;
|
|
|
|
function Sub.WriteSSups(_index: integer; _value: nil_OR_SSup);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadSSups(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "sSup", ind, _value) then
|
|
raise format("Index out of range: SSups[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: SSups expects nil or SSup";
|
|
end
|
|
end;
|
|
|
|
function Sub.ReadNaries(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "nary", ind);
|
|
end;
|
|
|
|
function Sub.WriteNaries(_index: integer; _value: nil_OR_Nary);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadNaries(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "nary", ind, _value) then
|
|
raise format("Index out of range: Naries[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Naries expects nil or Nary";
|
|
end
|
|
end;
|
|
|
|
function Sub.ReadFuncs(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "func", ind);
|
|
end;
|
|
|
|
function Sub.WriteFuncs(_index: integer; _value: nil_OR_Func);
|
|
begin
|
|
if ifnil(_value) then
|
|
begin
|
|
obj := {self.}ReadFuncs(_index);
|
|
{self.}RemoveChild(obj);
|
|
end
|
|
else if ifInt(_index) or ifInt64(_index) then
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
if not container_.Set(pre + "func", ind, _value) then
|
|
raise format("Index out of range: Funcs[%d] is invalid or out of bounds", _index);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Funcs expects nil or Func";
|
|
end
|
|
end;
|
|
|
|
function Sub.AddR(): R;
|
|
begin
|
|
obj := new R(self, {self.}Prefix, "r");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Sub.AddD(): D;
|
|
begin
|
|
obj := new D(self, {self.}Prefix, "d");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Sub.AddF(): F;
|
|
begin
|
|
obj := new F(self, {self.}Prefix, "f");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Sub.AddRad(): Rad;
|
|
begin
|
|
obj := new Rad(self, {self.}Prefix, "rad");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Sub.AddSSub(): SSub;
|
|
begin
|
|
obj := new SSub(self, {self.}Prefix, "sSub");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Sub.AddSSup(): SSup;
|
|
begin
|
|
obj := new SSup(self, {self.}Prefix, "sSup");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Sub.AddNary(): Nary;
|
|
begin
|
|
obj := new Nary(self, {self.}Prefix, "nary");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Sub.AddFunc(): Func;
|
|
begin
|
|
obj := new Func(self, {self.}Prefix, "func");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Sub.AppendR(): R;
|
|
begin
|
|
obj := new R(self, {self.}Prefix, "r");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Sub.AppendD(): D;
|
|
begin
|
|
obj := new D(self, {self.}Prefix, "d");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Sub.AppendF(): F;
|
|
begin
|
|
obj := new F(self, {self.}Prefix, "f");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Sub.AppendRad(): Rad;
|
|
begin
|
|
obj := new Rad(self, {self.}Prefix, "rad");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Sub.AppendSSub(): SSub;
|
|
begin
|
|
obj := new SSub(self, {self.}Prefix, "sSub");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Sub.AppendSSup(): SSup;
|
|
begin
|
|
obj := new SSup(self, {self.}Prefix, "sSup");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Sub.AppendNary(): Nary;
|
|
begin
|
|
obj := new Nary(self, {self.}Prefix, "nary");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Sub.AppendFunc(): Func;
|
|
begin
|
|
obj := new Func(self, {self.}Prefix, "func");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
end. |