2713 lines
83 KiB
Plaintext
2713 lines
83 KiB
Plaintext
unit VML;
|
|
interface
|
|
uses TSSafeUnitConverter, DocxML;
|
|
|
|
type Shapetype = 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: Shapetype);override;
|
|
function Clone(): Shapetype;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
// attributes property
|
|
property AnchorId read ReadXmlAttrAnchorId write WriteXmlAttrAnchorId;
|
|
property Id read ReadXmlAttrId write WriteXmlAttrId;
|
|
property Coordsize read ReadXmlAttrCoordsize write WriteXmlAttrCoordsize;
|
|
property Spt read ReadXmlAttrSpt write WriteXmlAttrSpt;
|
|
property Adj read ReadXmlAttrAdj write WriteXmlAttrAdj;
|
|
property Preferrelative read ReadXmlAttrPreferrelative write WriteXmlAttrPreferrelative;
|
|
property AttrPath read ReadXmlAttrAttrPath write WriteXmlAttrAttrPath;
|
|
property Filled read ReadXmlAttrFilled write WriteXmlAttrFilled;
|
|
property Stroked read ReadXmlAttrStroked write WriteXmlAttrStroked;
|
|
function ReadXmlAttrAnchorId();
|
|
function WriteXmlAttrAnchorId(_value: any);
|
|
function ReadXmlAttrId();
|
|
function WriteXmlAttrId(_value: any);
|
|
function ReadXmlAttrCoordsize();
|
|
function WriteXmlAttrCoordsize(_value: any);
|
|
function ReadXmlAttrSpt();
|
|
function WriteXmlAttrSpt(_value: any);
|
|
function ReadXmlAttrAdj();
|
|
function WriteXmlAttrAdj(_value: any);
|
|
function ReadXmlAttrPreferrelative();
|
|
function WriteXmlAttrPreferrelative(_value: any);
|
|
function ReadXmlAttrAttrPath();
|
|
function WriteXmlAttrAttrPath(_value: any);
|
|
function ReadXmlAttrFilled();
|
|
function WriteXmlAttrFilled(_value: any);
|
|
function ReadXmlAttrStroked();
|
|
function WriteXmlAttrStroked(_value: any);
|
|
|
|
// normal property
|
|
property Stroke read ReadXmlChildStroke write WriteXmlChildStroke;
|
|
property Formulas read ReadXmlChildFormulas write WriteXmlChildFormulas;
|
|
property Path read ReadXmlChildPath write WriteXmlChildPath;
|
|
property Textpath read ReadXmlChildTextpath write WriteXmlChildTextpath;
|
|
property Handles read ReadXmlChildHandles write WriteXmlChildHandles;
|
|
property Lock read ReadXmlChildLock write WriteXmlChildLock;
|
|
function ReadXmlChildStroke(): Stroke;
|
|
function WriteXmlChildStroke(_p1: any; _p2: any);
|
|
function ReadXmlChildFormulas(): formulas;
|
|
function WriteXmlChildFormulas(_p1: any; _p2: any);
|
|
function ReadXmlChildPath(): Path;
|
|
function WriteXmlChildPath(_p1: any; _p2: any);
|
|
function ReadXmlChildTextpath(): Textpath;
|
|
function WriteXmlChildTextpath(_p1: any; _p2: any);
|
|
function ReadXmlChildHandles(): Handles;
|
|
function WriteXmlChildHandles(_p1: any; _p2: any);
|
|
function ReadXmlChildLock(): Lock;
|
|
function WriteXmlChildLock(_p1: any; _p2: any);
|
|
|
|
public
|
|
// Attributes
|
|
XmlAttrAnchorId: OpenXmlAttribute;
|
|
XmlAttrId: OpenXmlAttribute;
|
|
XmlAttrCoordsize: OpenXmlAttribute;
|
|
XmlAttrSpt: OpenXmlAttribute;
|
|
XmlAttrAdj: OpenXmlAttribute;
|
|
XmlAttrPreferrelative: OpenXmlAttribute;
|
|
XmlAttrAttrPath: OpenXmlAttribute;
|
|
XmlAttrFilled: OpenXmlAttribute;
|
|
XmlAttrStroked: OpenXmlAttribute;
|
|
|
|
// Children
|
|
XmlChildStroke: Stroke;
|
|
XmlChildFormulas: formulas;
|
|
XmlChildPath: Path;
|
|
XmlChildTextpath: Textpath;
|
|
XmlChildHandles: Handles;
|
|
XmlChildLock: Lock;
|
|
end;
|
|
|
|
type Formulas = 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: Formulas);override;
|
|
function Clone(): Formulas;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
|
|
// multi property
|
|
property Fs read ReadFs write WriteFs;
|
|
function ReadFs(_index: integer);
|
|
function WriteFs(_index: integer; _value: nil__F);
|
|
function AddF(): F;
|
|
function AppendF(): F;
|
|
|
|
public
|
|
// Children
|
|
end;
|
|
|
|
type Lock = 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: Lock);override;
|
|
function Clone(): Lock;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
// attributes property
|
|
property Ext read ReadXmlAttrExt write WriteXmlAttrExt;
|
|
property Aspectration read ReadXmlAttrAspectration write WriteXmlAttrAspectration;
|
|
property Text read ReadXmlAttrText write WriteXmlAttrText;
|
|
property Shapetype read ReadXmlAttrShapetype write WriteXmlAttrShapetype;
|
|
function ReadXmlAttrExt();
|
|
function WriteXmlAttrExt(_value: any);
|
|
function ReadXmlAttrAspectration();
|
|
function WriteXmlAttrAspectration(_value: any);
|
|
function ReadXmlAttrText();
|
|
function WriteXmlAttrText(_value: any);
|
|
function ReadXmlAttrShapetype();
|
|
function WriteXmlAttrShapetype(_value: any);
|
|
|
|
public
|
|
// Attributes
|
|
XmlAttrExt: OpenXmlAttribute;
|
|
XmlAttrAspectration: OpenXmlAttribute;
|
|
XmlAttrText: OpenXmlAttribute;
|
|
XmlAttrShapetype: OpenXmlAttribute;
|
|
|
|
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
|
|
// attributes property
|
|
property Eqn read ReadXmlAttrEqn write WriteXmlAttrEqn;
|
|
function ReadXmlAttrEqn();
|
|
function WriteXmlAttrEqn(_value: any);
|
|
|
|
public
|
|
// Attributes
|
|
XmlAttrEqn: OpenXmlAttribute;
|
|
|
|
end;
|
|
|
|
type Stroke = 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: Stroke);override;
|
|
function Clone(): Stroke;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
// attributes property
|
|
property Joinstyle read ReadXmlAttrJoinstyle write WriteXmlAttrJoinstyle;
|
|
function ReadXmlAttrJoinstyle();
|
|
function WriteXmlAttrJoinstyle(_value: any);
|
|
|
|
public
|
|
// Attributes
|
|
XmlAttrJoinstyle: OpenXmlAttribute;
|
|
|
|
end;
|
|
|
|
type Path = 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: Path);override;
|
|
function Clone(): Path;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
// attributes property
|
|
property Extrusionok read ReadXmlAttrExtrusionok write WriteXmlAttrExtrusionok;
|
|
property Textpathok read ReadXmlAttrTextpathok write WriteXmlAttrTextpathok;
|
|
property Gradientshapeok read ReadXmlAttrGradientshapeok write WriteXmlAttrGradientshapeok;
|
|
property Connecttype read ReadXmlAttrConnecttype write WriteXmlAttrConnecttype;
|
|
property Connectlocs read ReadXmlAttrConnectlocs write WriteXmlAttrConnectlocs;
|
|
property Connectangles read ReadXmlAttrConnectangles write WriteXmlAttrConnectangles;
|
|
function ReadXmlAttrExtrusionok();
|
|
function WriteXmlAttrExtrusionok(_value: any);
|
|
function ReadXmlAttrTextpathok();
|
|
function WriteXmlAttrTextpathok(_value: any);
|
|
function ReadXmlAttrGradientshapeok();
|
|
function WriteXmlAttrGradientshapeok(_value: any);
|
|
function ReadXmlAttrConnecttype();
|
|
function WriteXmlAttrConnecttype(_value: any);
|
|
function ReadXmlAttrConnectlocs();
|
|
function WriteXmlAttrConnectlocs(_value: any);
|
|
function ReadXmlAttrConnectangles();
|
|
function WriteXmlAttrConnectangles(_value: any);
|
|
|
|
public
|
|
// Attributes
|
|
XmlAttrExtrusionok: OpenXmlAttribute;
|
|
XmlAttrTextpathok: OpenXmlAttribute;
|
|
XmlAttrGradientshapeok: OpenXmlAttribute;
|
|
XmlAttrConnecttype: OpenXmlAttribute;
|
|
XmlAttrConnectlocs: OpenXmlAttribute;
|
|
XmlAttrConnectangles: OpenXmlAttribute;
|
|
|
|
end;
|
|
|
|
type Textpath = 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: Textpath);override;
|
|
function Clone(): Textpath;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
// attributes property
|
|
property _On read ReadXmlAttr_On write WriteXmlAttr_On;
|
|
property Fitshape read ReadXmlAttrFitshape write WriteXmlAttrFitshape;
|
|
property Style read ReadXmlAttrStyle write WriteXmlAttrStyle;
|
|
property String read ReadXmlAttrString write WriteXmlAttrString;
|
|
function ReadXmlAttr_On();
|
|
function WriteXmlAttr_On(_value: any);
|
|
function ReadXmlAttrFitshape();
|
|
function WriteXmlAttrFitshape(_value: any);
|
|
function ReadXmlAttrStyle();
|
|
function WriteXmlAttrStyle(_value: any);
|
|
function ReadXmlAttrString();
|
|
function WriteXmlAttrString(_value: any);
|
|
|
|
public
|
|
// Attributes
|
|
XmlAttr_On: OpenXmlAttribute;
|
|
XmlAttrFitshape: OpenXmlAttribute;
|
|
XmlAttrStyle: OpenXmlAttribute;
|
|
XmlAttrString: OpenXmlAttribute;
|
|
|
|
end;
|
|
|
|
type Handles = 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: Handles);override;
|
|
function Clone(): Handles;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
|
|
// normal property
|
|
property H read ReadXmlChildH write WriteXmlChildH;
|
|
function ReadXmlChildH(): H;
|
|
function WriteXmlChildH(_p1: any; _p2: any);
|
|
|
|
public
|
|
// Children
|
|
XmlChildH: H;
|
|
end;
|
|
|
|
type H = 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: H);override;
|
|
function Clone(): H;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
// attributes property
|
|
property Position read ReadXmlAttrPosition write WriteXmlAttrPosition;
|
|
property Xrange read ReadXmlAttrXrange write WriteXmlAttrXrange;
|
|
function ReadXmlAttrPosition();
|
|
function WriteXmlAttrPosition(_value: any);
|
|
function ReadXmlAttrXrange();
|
|
function WriteXmlAttrXrange(_value: any);
|
|
|
|
public
|
|
// Attributes
|
|
XmlAttrPosition: OpenXmlAttribute;
|
|
XmlAttrXrange: OpenXmlAttribute;
|
|
|
|
end;
|
|
|
|
type Shape = 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: Shape);override;
|
|
function Clone(): Shape;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
// attributes property
|
|
property Id read ReadXmlAttrId write WriteXmlAttrId;
|
|
property Style read ReadXmlAttrStyle write WriteXmlAttrStyle;
|
|
property Spid read ReadXmlAttrSpid write WriteXmlAttrSpid;
|
|
property Type read ReadXmlAttrType write WriteXmlAttrType;
|
|
property Gfxdata read ReadXmlAttrGfxdata write WriteXmlAttrGfxdata;
|
|
property Filled read ReadXmlAttrFilled write WriteXmlAttrFilled;
|
|
property Allowincell read ReadXmlAttrAllowincell write WriteXmlAttrAllowincell;
|
|
property Fillcolor read ReadXmlAttrFillcolor write WriteXmlAttrFillcolor;
|
|
property Stroked read ReadXmlAttrStroked write WriteXmlAttrStroked;
|
|
property Ole read ReadXmlAttrOle write WriteXmlAttrOle;
|
|
function ReadXmlAttrId();
|
|
function WriteXmlAttrId(_value: any);
|
|
function ReadXmlAttrStyle();
|
|
function WriteXmlAttrStyle(_value: any);
|
|
function ReadXmlAttrSpid();
|
|
function WriteXmlAttrSpid(_value: any);
|
|
function ReadXmlAttrType();
|
|
function WriteXmlAttrType(_value: any);
|
|
function ReadXmlAttrGfxdata();
|
|
function WriteXmlAttrGfxdata(_value: any);
|
|
function ReadXmlAttrFilled();
|
|
function WriteXmlAttrFilled(_value: any);
|
|
function ReadXmlAttrAllowincell();
|
|
function WriteXmlAttrAllowincell(_value: any);
|
|
function ReadXmlAttrFillcolor();
|
|
function WriteXmlAttrFillcolor(_value: any);
|
|
function ReadXmlAttrStroked();
|
|
function WriteXmlAttrStroked(_value: any);
|
|
function ReadXmlAttrOle();
|
|
function WriteXmlAttrOle(_value: any);
|
|
|
|
// normal property
|
|
property Fill read ReadXmlChildFill write WriteXmlChildFill;
|
|
property Textbox read ReadXmlChildTextbox write WriteXmlChildTextbox;
|
|
property Textpath read ReadXmlChildTextpath write WriteXmlChildTextpath;
|
|
property Imagedata read ReadXmlChildImagedata write WriteXmlChildImagedata;
|
|
property Wrap read ReadXmlChildWrap write WriteXmlChildWrap;
|
|
function ReadXmlChildFill(): Fill;
|
|
function WriteXmlChildFill(_p1: any; _p2: any);
|
|
function ReadXmlChildTextbox(): Textbox;
|
|
function WriteXmlChildTextbox(_p1: any; _p2: any);
|
|
function ReadXmlChildTextpath(): Textpath;
|
|
function WriteXmlChildTextpath(_p1: any; _p2: any);
|
|
function ReadXmlChildImagedata(): Imagedata;
|
|
function WriteXmlChildImagedata(_p1: any; _p2: any);
|
|
function ReadXmlChildWrap(): Wrap;
|
|
function WriteXmlChildWrap(_p1: any; _p2: any);
|
|
|
|
public
|
|
// Attributes
|
|
XmlAttrId: OpenXmlAttribute;
|
|
XmlAttrStyle: OpenXmlAttribute;
|
|
XmlAttrSpid: OpenXmlAttribute;
|
|
XmlAttrType: OpenXmlAttribute;
|
|
XmlAttrGfxdata: OpenXmlAttribute;
|
|
XmlAttrFilled: OpenXmlAttribute;
|
|
XmlAttrAllowincell: OpenXmlAttribute;
|
|
XmlAttrFillcolor: OpenXmlAttribute;
|
|
XmlAttrStroked: OpenXmlAttribute;
|
|
XmlAttrOle: OpenXmlAttribute;
|
|
|
|
// Children
|
|
XmlChildFill: Fill;
|
|
XmlChildTextbox: Textbox;
|
|
XmlChildTextpath: Textpath;
|
|
XmlChildImagedata: Imagedata;
|
|
XmlChildWrap: Wrap;
|
|
end;
|
|
|
|
type Wrap = 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: Wrap);override;
|
|
function Clone(): Wrap;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
// attributes property
|
|
property Anchorx read ReadXmlAttrAnchorx write WriteXmlAttrAnchorx;
|
|
property Anchory read ReadXmlAttrAnchory write WriteXmlAttrAnchory;
|
|
function ReadXmlAttrAnchorx();
|
|
function WriteXmlAttrAnchorx(_value: any);
|
|
function ReadXmlAttrAnchory();
|
|
function WriteXmlAttrAnchory(_value: any);
|
|
|
|
public
|
|
// Attributes
|
|
XmlAttrAnchorx: OpenXmlAttribute;
|
|
XmlAttrAnchory: OpenXmlAttribute;
|
|
|
|
end;
|
|
|
|
type Fill = 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: Fill);override;
|
|
function Clone(): Fill;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
// attributes property
|
|
property Opacity read ReadXmlAttrOpacity write WriteXmlAttrOpacity;
|
|
function ReadXmlAttrOpacity();
|
|
function WriteXmlAttrOpacity(_value: any);
|
|
|
|
public
|
|
// Attributes
|
|
XmlAttrOpacity: OpenXmlAttribute;
|
|
|
|
end;
|
|
|
|
type Imagedata = 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: Imagedata);override;
|
|
function Clone(): Imagedata;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
// attributes property
|
|
property Id read ReadXmlAttrId write WriteXmlAttrId;
|
|
property Title read ReadXmlAttrTitle write WriteXmlAttrTitle;
|
|
function ReadXmlAttrId();
|
|
function WriteXmlAttrId(_value: any);
|
|
function ReadXmlAttrTitle();
|
|
function WriteXmlAttrTitle(_value: any);
|
|
|
|
public
|
|
// Attributes
|
|
XmlAttrId: OpenXmlAttribute;
|
|
XmlAttrTitle: OpenXmlAttribute;
|
|
|
|
end;
|
|
|
|
type Textbox = 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: Textbox);override;
|
|
function Clone(): Textbox;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
|
|
// normal property
|
|
property TxbxContent read ReadXmlChildTxbxContent write WriteXmlChildTxbxContent;
|
|
function ReadXmlChildTxbxContent(): TxbxContent;
|
|
function WriteXmlChildTxbxContent(_p1: any; _p2: any);
|
|
|
|
public
|
|
// Children
|
|
XmlChildTxbxContent: TxbxContent;
|
|
end;
|
|
|
|
type OLEObject = 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: OLEObject);override;
|
|
function Clone(): OLEObject;override;
|
|
function ConvertToPoint();override;
|
|
|
|
public
|
|
// attributes property
|
|
property Type read ReadXmlAttrType write WriteXmlAttrType;
|
|
property ProgID read ReadXmlAttrProgID write WriteXmlAttrProgID;
|
|
property ShapeID read ReadXmlAttrShapeID write WriteXmlAttrShapeID;
|
|
property DrawAspect read ReadXmlAttrDrawAspect write WriteXmlAttrDrawAspect;
|
|
property ObjectID read ReadXmlAttrObjectID write WriteXmlAttrObjectID;
|
|
property Id read ReadXmlAttrId write WriteXmlAttrId;
|
|
function ReadXmlAttrType();
|
|
function WriteXmlAttrType(_value: any);
|
|
function ReadXmlAttrProgID();
|
|
function WriteXmlAttrProgID(_value: any);
|
|
function ReadXmlAttrShapeID();
|
|
function WriteXmlAttrShapeID(_value: any);
|
|
function ReadXmlAttrDrawAspect();
|
|
function WriteXmlAttrDrawAspect(_value: any);
|
|
function ReadXmlAttrObjectID();
|
|
function WriteXmlAttrObjectID(_value: any);
|
|
function ReadXmlAttrId();
|
|
function WriteXmlAttrId(_value: any);
|
|
|
|
public
|
|
// Attributes
|
|
XmlAttrType: OpenXmlAttribute;
|
|
XmlAttrProgID: OpenXmlAttribute;
|
|
XmlAttrShapeID: OpenXmlAttribute;
|
|
XmlAttrDrawAspect: OpenXmlAttribute;
|
|
XmlAttrObjectID: OpenXmlAttribute;
|
|
XmlAttrId: OpenXmlAttribute;
|
|
|
|
end;
|
|
|
|
implementation
|
|
|
|
function Shapetype.create();overload;
|
|
begin
|
|
{self.}create(nil, "v", "shapetype");
|
|
end;
|
|
|
|
function Shapetype.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function Shapetype.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 Shapetype.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
"w14:anchorId": makeweakref(thisFunction(WriteXmlAttrAnchorId)),
|
|
"id": makeweakref(thisFunction(WriteXmlAttrId)),
|
|
"coordsize": makeweakref(thisFunction(WriteXmlAttrCoordsize)),
|
|
"o:spt": makeweakref(thisFunction(WriteXmlAttrSpt)),
|
|
"adj": makeweakref(thisFunction(WriteXmlAttrAdj)),
|
|
"preferrelative": makeweakref(thisFunction(WriteXmlAttrPreferrelative)),
|
|
"path": makeweakref(thisFunction(WriteXmlAttrAttrPath)),
|
|
"filled": makeweakref(thisFunction(WriteXmlAttrFilled)),
|
|
"stroked": makeweakref(thisFunction(WriteXmlAttrStroked)),
|
|
);
|
|
sorted_child_ := array(
|
|
pre + "stroke": array(0, makeweakref(thisFunction(ReadXmlChildStroke))),
|
|
pre + "formulas": array(1, makeweakref(thisFunction(ReadXmlChildFormulas))),
|
|
pre + "path": array(2, makeweakref(thisFunction(ReadXmlChildPath))),
|
|
pre + "textpath": array(3, makeweakref(thisFunction(ReadXmlChildTextpath))),
|
|
pre + "handles": array(4, makeweakref(thisFunction(ReadXmlChildHandles))),
|
|
"o:lock": array(5, makeweakref(thisFunction(ReadXmlChildLock))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function Shapetype.Copy(_obj: Shapetype);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.AnchorId) then
|
|
{self.}AnchorId := _obj.AnchorId;
|
|
if not ifnil(_obj.Id) then
|
|
{self.}Id := _obj.Id;
|
|
if not ifnil(_obj.Coordsize) then
|
|
{self.}Coordsize := _obj.Coordsize;
|
|
if not ifnil(_obj.Spt) then
|
|
{self.}Spt := _obj.Spt;
|
|
if not ifnil(_obj.Adj) then
|
|
{self.}Adj := _obj.Adj;
|
|
if not ifnil(_obj.Preferrelative) then
|
|
{self.}Preferrelative := _obj.Preferrelative;
|
|
if not ifnil(_obj.AttrPath) then
|
|
{self.}AttrPath := _obj.AttrPath;
|
|
if not ifnil(_obj.Filled) then
|
|
{self.}Filled := _obj.Filled;
|
|
if not ifnil(_obj.Stroked) then
|
|
{self.}Stroked := _obj.Stroked;
|
|
if not ifnil(_obj.XmlChildStroke) then
|
|
{self.}Stroke.Copy(_obj.XmlChildStroke);
|
|
if not ifnil(_obj.XmlChildFormulas) then
|
|
{self.}Formulas.Copy(_obj.XmlChildFormulas);
|
|
if not ifnil(_obj.XmlChildPath) then
|
|
{self.}Path.Copy(_obj.XmlChildPath);
|
|
if not ifnil(_obj.XmlChildTextpath) then
|
|
{self.}Textpath.Copy(_obj.XmlChildTextpath);
|
|
if not ifnil(_obj.XmlChildHandles) then
|
|
{self.}Handles.Copy(_obj.XmlChildHandles);
|
|
if not ifnil(_obj.XmlChildLock) then
|
|
{self.}Lock.Copy(_obj.XmlChildLock);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function Shapetype.Clone(): Shapetype;override;
|
|
begin
|
|
obj := new Shapetype(nil, {self.}Prefix, {self.}LocalName);
|
|
if not ifnil({self.}AnchorId) then
|
|
obj.AnchorId := {self.}AnchorId;
|
|
if not ifnil({self.}Id) then
|
|
obj.Id := {self.}Id;
|
|
if not ifnil({self.}Coordsize) then
|
|
obj.Coordsize := {self.}Coordsize;
|
|
if not ifnil({self.}Spt) then
|
|
obj.Spt := {self.}Spt;
|
|
if not ifnil({self.}Adj) then
|
|
obj.Adj := {self.}Adj;
|
|
if not ifnil({self.}Preferrelative) then
|
|
obj.Preferrelative := {self.}Preferrelative;
|
|
if not ifnil({self.}AttrPath) then
|
|
obj.AttrPath := {self.}AttrPath;
|
|
if not ifnil({self.}Filled) then
|
|
obj.Filled := {self.}Filled;
|
|
if not ifnil({self.}Stroked) then
|
|
obj.Stroked := {self.}Stroked;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
elements := {self.}Elements();
|
|
for _,element in elements do
|
|
begin
|
|
case element.ElementName of
|
|
pre + "stroke": obj.Stroke := element.Clone();
|
|
pre + "formulas": obj.Formulas := element.Clone();
|
|
pre + "path": obj.Path := element.Clone();
|
|
pre + "textpath": obj.Textpath := element.Clone();
|
|
pre + "handles": obj.Handles := element.Clone();
|
|
"o:lock": obj.Lock := element.Clone();
|
|
else obj.AppendChild(element.Clone());
|
|
end
|
|
end
|
|
return obj;
|
|
end;
|
|
|
|
function Shapetype.ConvertToPoint();override;
|
|
begin
|
|
if not ifnil({self.}XmlChildStroke) then
|
|
{self.}XmlChildStroke.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildFormulas) then
|
|
{self.}XmlChildFormulas.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildPath) then
|
|
{self.}XmlChildPath.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildTextpath) then
|
|
{self.}XmlChildTextpath.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildHandles) then
|
|
{self.}XmlChildHandles.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildLock) then
|
|
{self.}XmlChildLock.ConvertToPoint();
|
|
end;
|
|
|
|
function Shapetype.ReadXmlAttrAnchorId();
|
|
begin
|
|
return ifnil({self.}XmlAttrAnchorId.Value) ? fallback_.XmlAttrAnchorId.Value : {self.}XmlAttrAnchorId.Value;
|
|
end;
|
|
|
|
function Shapetype.WriteXmlAttrAnchorId(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrAnchorId) then
|
|
begin
|
|
{self.}XmlAttrAnchorId := new OpenXmlAttribute("w14", "anchorId", nil);
|
|
attributes_["w14:anchorId"] := {self.}XmlAttrAnchorId;
|
|
end
|
|
{self.}XmlAttrAnchorId.Value := _value;
|
|
end;
|
|
|
|
function Shapetype.ReadXmlAttrId();
|
|
begin
|
|
return ifnil({self.}XmlAttrId.Value) ? fallback_.XmlAttrId.Value : {self.}XmlAttrId.Value;
|
|
end;
|
|
|
|
function Shapetype.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 Shapetype.ReadXmlAttrCoordsize();
|
|
begin
|
|
return ifnil({self.}XmlAttrCoordsize.Value) ? fallback_.XmlAttrCoordsize.Value : {self.}XmlAttrCoordsize.Value;
|
|
end;
|
|
|
|
function Shapetype.WriteXmlAttrCoordsize(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrCoordsize) then
|
|
begin
|
|
{self.}XmlAttrCoordsize := new OpenXmlAttribute("", "coordsize", nil);
|
|
attributes_["coordsize"] := {self.}XmlAttrCoordsize;
|
|
end
|
|
{self.}XmlAttrCoordsize.Value := _value;
|
|
end;
|
|
|
|
function Shapetype.ReadXmlAttrSpt();
|
|
begin
|
|
return ifnil({self.}XmlAttrSpt.Value) ? fallback_.XmlAttrSpt.Value : {self.}XmlAttrSpt.Value;
|
|
end;
|
|
|
|
function Shapetype.WriteXmlAttrSpt(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrSpt) then
|
|
begin
|
|
{self.}XmlAttrSpt := new OpenXmlAttribute("o", "spt", nil);
|
|
attributes_["o:spt"] := {self.}XmlAttrSpt;
|
|
end
|
|
{self.}XmlAttrSpt.Value := _value;
|
|
end;
|
|
|
|
function Shapetype.ReadXmlAttrAdj();
|
|
begin
|
|
return ifnil({self.}XmlAttrAdj.Value) ? fallback_.XmlAttrAdj.Value : {self.}XmlAttrAdj.Value;
|
|
end;
|
|
|
|
function Shapetype.WriteXmlAttrAdj(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrAdj) then
|
|
begin
|
|
{self.}XmlAttrAdj := new OpenXmlAttribute("", "adj", nil);
|
|
attributes_["adj"] := {self.}XmlAttrAdj;
|
|
end
|
|
{self.}XmlAttrAdj.Value := _value;
|
|
end;
|
|
|
|
function Shapetype.ReadXmlAttrPreferrelative();
|
|
begin
|
|
return ifnil({self.}XmlAttrPreferrelative.Value) ? fallback_.XmlAttrPreferrelative.Value : {self.}XmlAttrPreferrelative.Value;
|
|
end;
|
|
|
|
function Shapetype.WriteXmlAttrPreferrelative(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrPreferrelative) then
|
|
begin
|
|
{self.}XmlAttrPreferrelative := new OpenXmlAttribute("", "preferrelative", nil);
|
|
attributes_["preferrelative"] := {self.}XmlAttrPreferrelative;
|
|
end
|
|
{self.}XmlAttrPreferrelative.Value := _value;
|
|
end;
|
|
|
|
function Shapetype.ReadXmlAttrAttrPath();
|
|
begin
|
|
return ifnil({self.}XmlAttrAttrPath.Value) ? fallback_.XmlAttrAttrPath.Value : {self.}XmlAttrAttrPath.Value;
|
|
end;
|
|
|
|
function Shapetype.WriteXmlAttrAttrPath(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrAttrPath) then
|
|
begin
|
|
{self.}XmlAttrAttrPath := new OpenXmlAttribute("", "path", nil);
|
|
attributes_["path"] := {self.}XmlAttrAttrPath;
|
|
end
|
|
{self.}XmlAttrAttrPath.Value := _value;
|
|
end;
|
|
|
|
function Shapetype.ReadXmlAttrFilled();
|
|
begin
|
|
return ifnil({self.}XmlAttrFilled.Value) ? fallback_.XmlAttrFilled.Value : {self.}XmlAttrFilled.Value;
|
|
end;
|
|
|
|
function Shapetype.WriteXmlAttrFilled(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrFilled) then
|
|
begin
|
|
{self.}XmlAttrFilled := new OpenXmlAttribute("", "filled", nil);
|
|
attributes_["filled"] := {self.}XmlAttrFilled;
|
|
end
|
|
{self.}XmlAttrFilled.Value := _value;
|
|
end;
|
|
|
|
function Shapetype.ReadXmlAttrStroked();
|
|
begin
|
|
return ifnil({self.}XmlAttrStroked.Value) ? fallback_.XmlAttrStroked.Value : {self.}XmlAttrStroked.Value;
|
|
end;
|
|
|
|
function Shapetype.WriteXmlAttrStroked(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrStroked) then
|
|
begin
|
|
{self.}XmlAttrStroked := new OpenXmlAttribute("", "stroked", nil);
|
|
attributes_["stroked"] := {self.}XmlAttrStroked;
|
|
end
|
|
{self.}XmlAttrStroked.Value := _value;
|
|
end;
|
|
|
|
function Shapetype.ReadXmlChildStroke(): Stroke;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildStroke) or {self.}XmlChildStroke.Removed) then
|
|
begin
|
|
{self.}XmlChildStroke := new Stroke(self, {self.}Prefix, "stroke");
|
|
container_.Set({self.}XmlChildStroke);
|
|
end
|
|
return {self.}XmlChildStroke and not {self.}XmlChildStroke.Removed ? {self.}XmlChildStroke : fallback_.Stroke;
|
|
end;
|
|
|
|
function Shapetype.WriteXmlChildStroke(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildStroke) then
|
|
{self.}RemoveChild({self.}XmlChildStroke);
|
|
end
|
|
else if v is class(Stroke) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildStroke := v;
|
|
container_.Set({self.}XmlChildStroke);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Stroke expects Stroke or nil";
|
|
end
|
|
end;
|
|
|
|
function Shapetype.ReadXmlChildFormulas(): formulas;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildFormulas) or {self.}XmlChildFormulas.Removed) then
|
|
begin
|
|
{self.}XmlChildFormulas := new formulas(self, {self.}Prefix, "formulas");
|
|
container_.Set({self.}XmlChildFormulas);
|
|
end
|
|
return {self.}XmlChildFormulas and not {self.}XmlChildFormulas.Removed ? {self.}XmlChildFormulas : fallback_.Formulas;
|
|
end;
|
|
|
|
function Shapetype.WriteXmlChildFormulas(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildFormulas) then
|
|
{self.}RemoveChild({self.}XmlChildFormulas);
|
|
end
|
|
else if v is class(formulas) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildFormulas := v;
|
|
container_.Set({self.}XmlChildFormulas);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Formulas expects formulas or nil";
|
|
end
|
|
end;
|
|
|
|
function Shapetype.ReadXmlChildPath(): Path;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildPath) or {self.}XmlChildPath.Removed) then
|
|
begin
|
|
{self.}XmlChildPath := new Path(self, {self.}Prefix, "path");
|
|
container_.Set({self.}XmlChildPath);
|
|
end
|
|
return {self.}XmlChildPath and not {self.}XmlChildPath.Removed ? {self.}XmlChildPath : fallback_.Path;
|
|
end;
|
|
|
|
function Shapetype.WriteXmlChildPath(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildPath) then
|
|
{self.}RemoveChild({self.}XmlChildPath);
|
|
end
|
|
else if v is class(Path) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildPath := v;
|
|
container_.Set({self.}XmlChildPath);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Path expects Path or nil";
|
|
end
|
|
end;
|
|
|
|
function Shapetype.ReadXmlChildTextpath(): Textpath;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildTextpath) or {self.}XmlChildTextpath.Removed) then
|
|
begin
|
|
{self.}XmlChildTextpath := new Textpath(self, {self.}Prefix, "textpath");
|
|
container_.Set({self.}XmlChildTextpath);
|
|
end
|
|
return {self.}XmlChildTextpath and not {self.}XmlChildTextpath.Removed ? {self.}XmlChildTextpath : fallback_.Textpath;
|
|
end;
|
|
|
|
function Shapetype.WriteXmlChildTextpath(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildTextpath) then
|
|
{self.}RemoveChild({self.}XmlChildTextpath);
|
|
end
|
|
else if v is class(Textpath) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildTextpath := v;
|
|
container_.Set({self.}XmlChildTextpath);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Textpath expects Textpath or nil";
|
|
end
|
|
end;
|
|
|
|
function Shapetype.ReadXmlChildHandles(): Handles;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildHandles) or {self.}XmlChildHandles.Removed) then
|
|
begin
|
|
{self.}XmlChildHandles := new Handles(self, {self.}Prefix, "handles");
|
|
container_.Set({self.}XmlChildHandles);
|
|
end
|
|
return {self.}XmlChildHandles and not {self.}XmlChildHandles.Removed ? {self.}XmlChildHandles : fallback_.Handles;
|
|
end;
|
|
|
|
function Shapetype.WriteXmlChildHandles(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildHandles) then
|
|
{self.}RemoveChild({self.}XmlChildHandles);
|
|
end
|
|
else if v is class(Handles) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildHandles := v;
|
|
container_.Set({self.}XmlChildHandles);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Handles expects Handles or nil";
|
|
end
|
|
end;
|
|
|
|
function Shapetype.ReadXmlChildLock(): Lock;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildLock) or {self.}XmlChildLock.Removed) then
|
|
begin
|
|
{self.}XmlChildLock := new Lock(self, "o", "lock");
|
|
container_.Set({self.}XmlChildLock);
|
|
end
|
|
return {self.}XmlChildLock and not {self.}XmlChildLock.Removed ? {self.}XmlChildLock : fallback_.Lock;
|
|
end;
|
|
|
|
function Shapetype.WriteXmlChildLock(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildLock) then
|
|
{self.}RemoveChild({self.}XmlChildLock);
|
|
end
|
|
else if v is class(Lock) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildLock := v;
|
|
container_.Set({self.}XmlChildLock);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Lock expects Lock or nil";
|
|
end
|
|
end;
|
|
|
|
function Formulas.create();overload;
|
|
begin
|
|
{self.}create(nil, "v", "formulas");
|
|
end;
|
|
|
|
function Formulas.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function Formulas.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 Formulas.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
"v:f": array(0, makeweakref(thisFunction(AppendF))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function Formulas.Copy(_obj: Formulas);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function Formulas.Clone(): Formulas;override;
|
|
begin
|
|
obj := new Formulas(nil, {self.}Prefix, {self.}LocalName);
|
|
elements := {self.}Elements();
|
|
for _,element in elements do
|
|
obj.AppendChild(element.Clone());
|
|
return obj;
|
|
end;
|
|
|
|
function Formulas.ConvertToPoint();override;
|
|
begin
|
|
elems := {self.}Fs();
|
|
for _,elem in elems do
|
|
elem.ConvertToPoint();
|
|
end;
|
|
|
|
function Formulas.ReadFs(_index: integer);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get("v:f", ind);
|
|
end;
|
|
|
|
function Formulas.WriteFs(_index: integer; _value: nil__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 Formulas.AddF(): F;
|
|
begin
|
|
obj := new F(self, "v", "f");
|
|
obj.Enable := true;
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Formulas.AppendF(): F;
|
|
begin
|
|
obj := new F(self, "v", "f");
|
|
obj.Enable := true;
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Lock.create();overload;
|
|
begin
|
|
{self.}create(nil, "o", "lock");
|
|
end;
|
|
|
|
function Lock.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function Lock.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 Lock.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
"v:ext": makeweakref(thisFunction(WriteXmlAttrExt)),
|
|
"aspectration": makeweakref(thisFunction(WriteXmlAttrAspectration)),
|
|
"text": makeweakref(thisFunction(WriteXmlAttrText)),
|
|
"shapetype": makeweakref(thisFunction(WriteXmlAttrShapetype)),
|
|
);
|
|
sorted_child_ := array(
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function Lock.Copy(_obj: Lock);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.Ext) then
|
|
{self.}Ext := _obj.Ext;
|
|
if not ifnil(_obj.Aspectration) then
|
|
{self.}Aspectration := _obj.Aspectration;
|
|
if not ifnil(_obj.Text) then
|
|
{self.}Text := _obj.Text;
|
|
if not ifnil(_obj.Shapetype) then
|
|
{self.}Shapetype := _obj.Shapetype;
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function Lock.Clone(): Lock;override;
|
|
begin
|
|
obj := new Lock(nil, {self.}Prefix, {self.}LocalName);
|
|
if not ifnil({self.}Ext) then
|
|
obj.Ext := {self.}Ext;
|
|
if not ifnil({self.}Aspectration) then
|
|
obj.Aspectration := {self.}Aspectration;
|
|
if not ifnil({self.}Text) then
|
|
obj.Text := {self.}Text;
|
|
if not ifnil({self.}Shapetype) then
|
|
obj.Shapetype := {self.}Shapetype;
|
|
return obj;
|
|
end;
|
|
|
|
function Lock.ConvertToPoint();override;
|
|
begin
|
|
|
|
end;
|
|
|
|
function Lock.ReadXmlAttrExt();
|
|
begin
|
|
return ifnil({self.}XmlAttrExt.Value) ? fallback_.XmlAttrExt.Value : {self.}XmlAttrExt.Value;
|
|
end;
|
|
|
|
function Lock.WriteXmlAttrExt(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrExt) then
|
|
begin
|
|
{self.}XmlAttrExt := new OpenXmlAttribute("v", "ext", nil);
|
|
attributes_["v:ext"] := {self.}XmlAttrExt;
|
|
end
|
|
{self.}XmlAttrExt.Value := _value;
|
|
end;
|
|
|
|
function Lock.ReadXmlAttrAspectration();
|
|
begin
|
|
return ifnil({self.}XmlAttrAspectration.Value) ? fallback_.XmlAttrAspectration.Value : {self.}XmlAttrAspectration.Value;
|
|
end;
|
|
|
|
function Lock.WriteXmlAttrAspectration(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrAspectration) then
|
|
begin
|
|
{self.}XmlAttrAspectration := new OpenXmlAttribute("", "aspectration", nil);
|
|
attributes_["aspectration"] := {self.}XmlAttrAspectration;
|
|
end
|
|
{self.}XmlAttrAspectration.Value := _value;
|
|
end;
|
|
|
|
function Lock.ReadXmlAttrText();
|
|
begin
|
|
return ifnil({self.}XmlAttrText.Value) ? fallback_.XmlAttrText.Value : {self.}XmlAttrText.Value;
|
|
end;
|
|
|
|
function Lock.WriteXmlAttrText(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrText) then
|
|
begin
|
|
{self.}XmlAttrText := new OpenXmlAttribute("", "text", nil);
|
|
attributes_["text"] := {self.}XmlAttrText;
|
|
end
|
|
{self.}XmlAttrText.Value := _value;
|
|
end;
|
|
|
|
function Lock.ReadXmlAttrShapetype();
|
|
begin
|
|
return ifnil({self.}XmlAttrShapetype.Value) ? fallback_.XmlAttrShapetype.Value : {self.}XmlAttrShapetype.Value;
|
|
end;
|
|
|
|
function Lock.WriteXmlAttrShapetype(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrShapetype) then
|
|
begin
|
|
{self.}XmlAttrShapetype := new OpenXmlAttribute("", "shapetype", nil);
|
|
attributes_["shapetype"] := {self.}XmlAttrShapetype;
|
|
end
|
|
{self.}XmlAttrShapetype.Value := _value;
|
|
end;
|
|
|
|
function F.create();overload;
|
|
begin
|
|
{self.}create(nil, "v", "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(
|
|
"eqn": makeweakref(thisFunction(WriteXmlAttrEqn)),
|
|
);
|
|
sorted_child_ := array(
|
|
);
|
|
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.Eqn) then
|
|
{self.}Eqn := _obj.Eqn;
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function F.Clone(): F;override;
|
|
begin
|
|
obj := new F(nil, {self.}Prefix, {self.}LocalName);
|
|
if not ifnil({self.}Eqn) then
|
|
obj.Eqn := {self.}Eqn;
|
|
return obj;
|
|
end;
|
|
|
|
function F.ConvertToPoint();override;
|
|
begin
|
|
|
|
end;
|
|
|
|
function F.ReadXmlAttrEqn();
|
|
begin
|
|
return ifnil({self.}XmlAttrEqn.Value) ? fallback_.XmlAttrEqn.Value : {self.}XmlAttrEqn.Value;
|
|
end;
|
|
|
|
function F.WriteXmlAttrEqn(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrEqn) then
|
|
begin
|
|
{self.}XmlAttrEqn := new OpenXmlAttribute("", "eqn", nil);
|
|
attributes_["eqn"] := {self.}XmlAttrEqn;
|
|
end
|
|
{self.}XmlAttrEqn.Value := _value;
|
|
end;
|
|
|
|
function Stroke.create();overload;
|
|
begin
|
|
{self.}create(nil, "v", "stroke");
|
|
end;
|
|
|
|
function Stroke.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function Stroke.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 Stroke.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
"joinstyle": makeweakref(thisFunction(WriteXmlAttrJoinstyle)),
|
|
);
|
|
sorted_child_ := array(
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function Stroke.Copy(_obj: Stroke);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.Joinstyle) then
|
|
{self.}Joinstyle := _obj.Joinstyle;
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function Stroke.Clone(): Stroke;override;
|
|
begin
|
|
obj := new Stroke(nil, {self.}Prefix, {self.}LocalName);
|
|
if not ifnil({self.}Joinstyle) then
|
|
obj.Joinstyle := {self.}Joinstyle;
|
|
return obj;
|
|
end;
|
|
|
|
function Stroke.ConvertToPoint();override;
|
|
begin
|
|
|
|
end;
|
|
|
|
function Stroke.ReadXmlAttrJoinstyle();
|
|
begin
|
|
return ifnil({self.}XmlAttrJoinstyle.Value) ? fallback_.XmlAttrJoinstyle.Value : {self.}XmlAttrJoinstyle.Value;
|
|
end;
|
|
|
|
function Stroke.WriteXmlAttrJoinstyle(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrJoinstyle) then
|
|
begin
|
|
{self.}XmlAttrJoinstyle := new OpenXmlAttribute("", "joinstyle", nil);
|
|
attributes_["joinstyle"] := {self.}XmlAttrJoinstyle;
|
|
end
|
|
{self.}XmlAttrJoinstyle.Value := _value;
|
|
end;
|
|
|
|
function Path.create();overload;
|
|
begin
|
|
{self.}create(nil, "v", "path");
|
|
end;
|
|
|
|
function Path.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function Path.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 Path.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
"o:extrusionok": makeweakref(thisFunction(WriteXmlAttrExtrusionok)),
|
|
"textpathok": makeweakref(thisFunction(WriteXmlAttrTextpathok)),
|
|
"gradientshapeok": makeweakref(thisFunction(WriteXmlAttrGradientshapeok)),
|
|
"o:connecttype": makeweakref(thisFunction(WriteXmlAttrConnecttype)),
|
|
"o:connectlocs": makeweakref(thisFunction(WriteXmlAttrConnectlocs)),
|
|
"o:connectangles": makeweakref(thisFunction(WriteXmlAttrConnectangles)),
|
|
);
|
|
sorted_child_ := array(
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function Path.Copy(_obj: Path);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.Extrusionok) then
|
|
{self.}Extrusionok := _obj.Extrusionok;
|
|
if not ifnil(_obj.Textpathok) then
|
|
{self.}Textpathok := _obj.Textpathok;
|
|
if not ifnil(_obj.Gradientshapeok) then
|
|
{self.}Gradientshapeok := _obj.Gradientshapeok;
|
|
if not ifnil(_obj.Connecttype) then
|
|
{self.}Connecttype := _obj.Connecttype;
|
|
if not ifnil(_obj.Connectlocs) then
|
|
{self.}Connectlocs := _obj.Connectlocs;
|
|
if not ifnil(_obj.Connectangles) then
|
|
{self.}Connectangles := _obj.Connectangles;
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function Path.Clone(): Path;override;
|
|
begin
|
|
obj := new Path(nil, {self.}Prefix, {self.}LocalName);
|
|
if not ifnil({self.}Extrusionok) then
|
|
obj.Extrusionok := {self.}Extrusionok;
|
|
if not ifnil({self.}Textpathok) then
|
|
obj.Textpathok := {self.}Textpathok;
|
|
if not ifnil({self.}Gradientshapeok) then
|
|
obj.Gradientshapeok := {self.}Gradientshapeok;
|
|
if not ifnil({self.}Connecttype) then
|
|
obj.Connecttype := {self.}Connecttype;
|
|
if not ifnil({self.}Connectlocs) then
|
|
obj.Connectlocs := {self.}Connectlocs;
|
|
if not ifnil({self.}Connectangles) then
|
|
obj.Connectangles := {self.}Connectangles;
|
|
return obj;
|
|
end;
|
|
|
|
function Path.ConvertToPoint();override;
|
|
begin
|
|
|
|
end;
|
|
|
|
function Path.ReadXmlAttrExtrusionok();
|
|
begin
|
|
return ifnil({self.}XmlAttrExtrusionok.Value) ? fallback_.XmlAttrExtrusionok.Value : {self.}XmlAttrExtrusionok.Value;
|
|
end;
|
|
|
|
function Path.WriteXmlAttrExtrusionok(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrExtrusionok) then
|
|
begin
|
|
{self.}XmlAttrExtrusionok := new OpenXmlAttribute("o", "extrusionok", nil);
|
|
attributes_["o:extrusionok"] := {self.}XmlAttrExtrusionok;
|
|
end
|
|
{self.}XmlAttrExtrusionok.Value := _value;
|
|
end;
|
|
|
|
function Path.ReadXmlAttrTextpathok();
|
|
begin
|
|
return ifnil({self.}XmlAttrTextpathok.Value) ? fallback_.XmlAttrTextpathok.Value : {self.}XmlAttrTextpathok.Value;
|
|
end;
|
|
|
|
function Path.WriteXmlAttrTextpathok(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrTextpathok) then
|
|
begin
|
|
{self.}XmlAttrTextpathok := new OpenXmlAttribute("", "textpathok", nil);
|
|
attributes_["textpathok"] := {self.}XmlAttrTextpathok;
|
|
end
|
|
{self.}XmlAttrTextpathok.Value := _value;
|
|
end;
|
|
|
|
function Path.ReadXmlAttrGradientshapeok();
|
|
begin
|
|
return ifnil({self.}XmlAttrGradientshapeok.Value) ? fallback_.XmlAttrGradientshapeok.Value : {self.}XmlAttrGradientshapeok.Value;
|
|
end;
|
|
|
|
function Path.WriteXmlAttrGradientshapeok(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrGradientshapeok) then
|
|
begin
|
|
{self.}XmlAttrGradientshapeok := new OpenXmlAttribute("", "gradientshapeok", nil);
|
|
attributes_["gradientshapeok"] := {self.}XmlAttrGradientshapeok;
|
|
end
|
|
{self.}XmlAttrGradientshapeok.Value := _value;
|
|
end;
|
|
|
|
function Path.ReadXmlAttrConnecttype();
|
|
begin
|
|
return ifnil({self.}XmlAttrConnecttype.Value) ? fallback_.XmlAttrConnecttype.Value : {self.}XmlAttrConnecttype.Value;
|
|
end;
|
|
|
|
function Path.WriteXmlAttrConnecttype(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrConnecttype) then
|
|
begin
|
|
{self.}XmlAttrConnecttype := new OpenXmlAttribute("o", "connecttype", nil);
|
|
attributes_["o:connecttype"] := {self.}XmlAttrConnecttype;
|
|
end
|
|
{self.}XmlAttrConnecttype.Value := _value;
|
|
end;
|
|
|
|
function Path.ReadXmlAttrConnectlocs();
|
|
begin
|
|
return ifnil({self.}XmlAttrConnectlocs.Value) ? fallback_.XmlAttrConnectlocs.Value : {self.}XmlAttrConnectlocs.Value;
|
|
end;
|
|
|
|
function Path.WriteXmlAttrConnectlocs(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrConnectlocs) then
|
|
begin
|
|
{self.}XmlAttrConnectlocs := new OpenXmlAttribute("o", "connectlocs", nil);
|
|
attributes_["o:connectlocs"] := {self.}XmlAttrConnectlocs;
|
|
end
|
|
{self.}XmlAttrConnectlocs.Value := _value;
|
|
end;
|
|
|
|
function Path.ReadXmlAttrConnectangles();
|
|
begin
|
|
return ifnil({self.}XmlAttrConnectangles.Value) ? fallback_.XmlAttrConnectangles.Value : {self.}XmlAttrConnectangles.Value;
|
|
end;
|
|
|
|
function Path.WriteXmlAttrConnectangles(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrConnectangles) then
|
|
begin
|
|
{self.}XmlAttrConnectangles := new OpenXmlAttribute("o", "connectangles", nil);
|
|
attributes_["o:connectangles"] := {self.}XmlAttrConnectangles;
|
|
end
|
|
{self.}XmlAttrConnectangles.Value := _value;
|
|
end;
|
|
|
|
function Textpath.create();overload;
|
|
begin
|
|
{self.}create(nil, "v", "textpath");
|
|
end;
|
|
|
|
function Textpath.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function Textpath.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 Textpath.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
"on": makeweakref(thisFunction(WriteXmlAttr_On)),
|
|
"fitshape": makeweakref(thisFunction(WriteXmlAttrFitshape)),
|
|
"style": makeweakref(thisFunction(WriteXmlAttrStyle)),
|
|
"string": makeweakref(thisFunction(WriteXmlAttrString)),
|
|
);
|
|
sorted_child_ := array(
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function Textpath.Copy(_obj: Textpath);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj._On) then
|
|
{self.}_On := _obj._On;
|
|
if not ifnil(_obj.Fitshape) then
|
|
{self.}Fitshape := _obj.Fitshape;
|
|
if not ifnil(_obj.Style) then
|
|
{self.}Style := _obj.Style;
|
|
if not ifnil(_obj.String) then
|
|
{self.}String := _obj.String;
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function Textpath.Clone(): Textpath;override;
|
|
begin
|
|
obj := new Textpath(nil, {self.}Prefix, {self.}LocalName);
|
|
if not ifnil({self.}_On) then
|
|
obj._On := {self.}_On;
|
|
if not ifnil({self.}Fitshape) then
|
|
obj.Fitshape := {self.}Fitshape;
|
|
if not ifnil({self.}Style) then
|
|
obj.Style := {self.}Style;
|
|
if not ifnil({self.}String) then
|
|
obj.String := {self.}String;
|
|
return obj;
|
|
end;
|
|
|
|
function Textpath.ConvertToPoint();override;
|
|
begin
|
|
|
|
end;
|
|
|
|
function Textpath.ReadXmlAttr_On();
|
|
begin
|
|
return ifnil({self.}XmlAttr_On.Value) ? fallback_.XmlAttr_On.Value : {self.}XmlAttr_On.Value;
|
|
end;
|
|
|
|
function Textpath.WriteXmlAttr_On(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttr_On) then
|
|
begin
|
|
{self.}XmlAttr_On := new OpenXmlAttribute("", "on", nil);
|
|
attributes_["on"] := {self.}XmlAttr_On;
|
|
end
|
|
{self.}XmlAttr_On.Value := _value;
|
|
end;
|
|
|
|
function Textpath.ReadXmlAttrFitshape();
|
|
begin
|
|
return ifnil({self.}XmlAttrFitshape.Value) ? fallback_.XmlAttrFitshape.Value : {self.}XmlAttrFitshape.Value;
|
|
end;
|
|
|
|
function Textpath.WriteXmlAttrFitshape(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrFitshape) then
|
|
begin
|
|
{self.}XmlAttrFitshape := new OpenXmlAttribute("", "fitshape", nil);
|
|
attributes_["fitshape"] := {self.}XmlAttrFitshape;
|
|
end
|
|
{self.}XmlAttrFitshape.Value := _value;
|
|
end;
|
|
|
|
function Textpath.ReadXmlAttrStyle();
|
|
begin
|
|
return ifnil({self.}XmlAttrStyle.Value) ? fallback_.XmlAttrStyle.Value : {self.}XmlAttrStyle.Value;
|
|
end;
|
|
|
|
function Textpath.WriteXmlAttrStyle(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrStyle) then
|
|
begin
|
|
{self.}XmlAttrStyle := new OpenXmlAttribute("", "style", nil);
|
|
attributes_["style"] := {self.}XmlAttrStyle;
|
|
end
|
|
{self.}XmlAttrStyle.Value := _value;
|
|
end;
|
|
|
|
function Textpath.ReadXmlAttrString();
|
|
begin
|
|
return ifnil({self.}XmlAttrString.Value) ? fallback_.XmlAttrString.Value : {self.}XmlAttrString.Value;
|
|
end;
|
|
|
|
function Textpath.WriteXmlAttrString(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrString) then
|
|
begin
|
|
{self.}XmlAttrString := new OpenXmlAttribute("", "string", nil);
|
|
attributes_["string"] := {self.}XmlAttrString;
|
|
end
|
|
{self.}XmlAttrString.Value := _value;
|
|
end;
|
|
|
|
function Handles.create();overload;
|
|
begin
|
|
{self.}create(nil, "v", "handles");
|
|
end;
|
|
|
|
function Handles.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function Handles.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 Handles.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
pre + "h": array(0, makeweakref(thisFunction(ReadXmlChildH))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function Handles.Copy(_obj: Handles);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.XmlChildH) then
|
|
{self.}H.Copy(_obj.XmlChildH);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function Handles.Clone(): Handles;override;
|
|
begin
|
|
obj := new Handles(nil, {self.}Prefix, {self.}LocalName);
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
elements := {self.}Elements();
|
|
for _,element in elements do
|
|
begin
|
|
case element.ElementName of
|
|
pre + "h": obj.H := element.Clone();
|
|
else obj.AppendChild(element.Clone());
|
|
end
|
|
end
|
|
return obj;
|
|
end;
|
|
|
|
function Handles.ConvertToPoint();override;
|
|
begin
|
|
if not ifnil({self.}XmlChildH) then
|
|
{self.}XmlChildH.ConvertToPoint();
|
|
end;
|
|
|
|
function Handles.ReadXmlChildH(): H;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildH) or {self.}XmlChildH.Removed) then
|
|
begin
|
|
{self.}XmlChildH := new H(self, {self.}Prefix, "h");
|
|
container_.Set({self.}XmlChildH);
|
|
end
|
|
return {self.}XmlChildH and not {self.}XmlChildH.Removed ? {self.}XmlChildH : fallback_.H;
|
|
end;
|
|
|
|
function Handles.WriteXmlChildH(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildH) then
|
|
{self.}RemoveChild({self.}XmlChildH);
|
|
end
|
|
else if v is class(H) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildH := v;
|
|
container_.Set({self.}XmlChildH);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: H expects H or nil";
|
|
end
|
|
end;
|
|
|
|
function H.create();overload;
|
|
begin
|
|
{self.}create(nil, "v", "h");
|
|
end;
|
|
|
|
function H.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function H.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 H.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
"position": makeweakref(thisFunction(WriteXmlAttrPosition)),
|
|
"xrange": makeweakref(thisFunction(WriteXmlAttrXrange)),
|
|
);
|
|
sorted_child_ := array(
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function H.Copy(_obj: H);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.Position) then
|
|
{self.}Position := _obj.Position;
|
|
if not ifnil(_obj.Xrange) then
|
|
{self.}Xrange := _obj.Xrange;
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function H.Clone(): H;override;
|
|
begin
|
|
obj := new H(nil, {self.}Prefix, {self.}LocalName);
|
|
if not ifnil({self.}Position) then
|
|
obj.Position := {self.}Position;
|
|
if not ifnil({self.}Xrange) then
|
|
obj.Xrange := {self.}Xrange;
|
|
return obj;
|
|
end;
|
|
|
|
function H.ConvertToPoint();override;
|
|
begin
|
|
|
|
end;
|
|
|
|
function H.ReadXmlAttrPosition();
|
|
begin
|
|
return ifnil({self.}XmlAttrPosition.Value) ? fallback_.XmlAttrPosition.Value : {self.}XmlAttrPosition.Value;
|
|
end;
|
|
|
|
function H.WriteXmlAttrPosition(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrPosition) then
|
|
begin
|
|
{self.}XmlAttrPosition := new OpenXmlAttribute("", "position", nil);
|
|
attributes_["position"] := {self.}XmlAttrPosition;
|
|
end
|
|
{self.}XmlAttrPosition.Value := _value;
|
|
end;
|
|
|
|
function H.ReadXmlAttrXrange();
|
|
begin
|
|
return ifnil({self.}XmlAttrXrange.Value) ? fallback_.XmlAttrXrange.Value : {self.}XmlAttrXrange.Value;
|
|
end;
|
|
|
|
function H.WriteXmlAttrXrange(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrXrange) then
|
|
begin
|
|
{self.}XmlAttrXrange := new OpenXmlAttribute("", "xrange", nil);
|
|
attributes_["xrange"] := {self.}XmlAttrXrange;
|
|
end
|
|
{self.}XmlAttrXrange.Value := _value;
|
|
end;
|
|
|
|
function Shape.create();overload;
|
|
begin
|
|
{self.}create(nil, "v", "shape");
|
|
end;
|
|
|
|
function Shape.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function Shape.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 Shape.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
"id": makeweakref(thisFunction(WriteXmlAttrId)),
|
|
"style": makeweakref(thisFunction(WriteXmlAttrStyle)),
|
|
"o:spid": makeweakref(thisFunction(WriteXmlAttrSpid)),
|
|
"type": makeweakref(thisFunction(WriteXmlAttrType)),
|
|
"o:gfxdata": makeweakref(thisFunction(WriteXmlAttrGfxdata)),
|
|
"filled": makeweakref(thisFunction(WriteXmlAttrFilled)),
|
|
"o:allowincell": makeweakref(thisFunction(WriteXmlAttrAllowincell)),
|
|
"fillcolor": makeweakref(thisFunction(WriteXmlAttrFillcolor)),
|
|
"stroked": makeweakref(thisFunction(WriteXmlAttrStroked)),
|
|
"o:ole": makeweakref(thisFunction(WriteXmlAttrOle)),
|
|
);
|
|
sorted_child_ := array(
|
|
pre + "fill": array(0, makeweakref(thisFunction(ReadXmlChildFill))),
|
|
pre + "textbox": array(1, makeweakref(thisFunction(ReadXmlChildTextbox))),
|
|
pre + "textpath": array(2, makeweakref(thisFunction(ReadXmlChildTextpath))),
|
|
pre + "imagedata": array(3, makeweakref(thisFunction(ReadXmlChildImagedata))),
|
|
"w10:wrap": array(4, makeweakref(thisFunction(ReadXmlChildWrap))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function Shape.Copy(_obj: Shape);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.Id) then
|
|
{self.}Id := _obj.Id;
|
|
if not ifnil(_obj.Style) then
|
|
{self.}Style := _obj.Style;
|
|
if not ifnil(_obj.Spid) then
|
|
{self.}Spid := _obj.Spid;
|
|
if not ifnil(_obj.Type) then
|
|
{self.}Type := _obj.Type;
|
|
if not ifnil(_obj.Gfxdata) then
|
|
{self.}Gfxdata := _obj.Gfxdata;
|
|
if not ifnil(_obj.Filled) then
|
|
{self.}Filled := _obj.Filled;
|
|
if not ifnil(_obj.Allowincell) then
|
|
{self.}Allowincell := _obj.Allowincell;
|
|
if not ifnil(_obj.Fillcolor) then
|
|
{self.}Fillcolor := _obj.Fillcolor;
|
|
if not ifnil(_obj.Stroked) then
|
|
{self.}Stroked := _obj.Stroked;
|
|
if not ifnil(_obj.Ole) then
|
|
{self.}Ole := _obj.Ole;
|
|
if not ifnil(_obj.XmlChildFill) then
|
|
{self.}Fill.Copy(_obj.XmlChildFill);
|
|
if not ifnil(_obj.XmlChildTextbox) then
|
|
{self.}Textbox.Copy(_obj.XmlChildTextbox);
|
|
if not ifnil(_obj.XmlChildTextpath) then
|
|
{self.}Textpath.Copy(_obj.XmlChildTextpath);
|
|
if not ifnil(_obj.XmlChildImagedata) then
|
|
{self.}Imagedata.Copy(_obj.XmlChildImagedata);
|
|
if not ifnil(_obj.XmlChildWrap) then
|
|
{self.}Wrap.Copy(_obj.XmlChildWrap);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function Shape.Clone(): Shape;override;
|
|
begin
|
|
obj := new Shape(nil, {self.}Prefix, {self.}LocalName);
|
|
if not ifnil({self.}Id) then
|
|
obj.Id := {self.}Id;
|
|
if not ifnil({self.}Style) then
|
|
obj.Style := {self.}Style;
|
|
if not ifnil({self.}Spid) then
|
|
obj.Spid := {self.}Spid;
|
|
if not ifnil({self.}Type) then
|
|
obj.Type := {self.}Type;
|
|
if not ifnil({self.}Gfxdata) then
|
|
obj.Gfxdata := {self.}Gfxdata;
|
|
if not ifnil({self.}Filled) then
|
|
obj.Filled := {self.}Filled;
|
|
if not ifnil({self.}Allowincell) then
|
|
obj.Allowincell := {self.}Allowincell;
|
|
if not ifnil({self.}Fillcolor) then
|
|
obj.Fillcolor := {self.}Fillcolor;
|
|
if not ifnil({self.}Stroked) then
|
|
obj.Stroked := {self.}Stroked;
|
|
if not ifnil({self.}Ole) then
|
|
obj.Ole := {self.}Ole;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
elements := {self.}Elements();
|
|
for _,element in elements do
|
|
begin
|
|
case element.ElementName of
|
|
pre + "fill": obj.Fill := element.Clone();
|
|
pre + "textbox": obj.Textbox := element.Clone();
|
|
pre + "textpath": obj.Textpath := element.Clone();
|
|
pre + "imagedata": obj.Imagedata := element.Clone();
|
|
"w10:wrap": obj.Wrap := element.Clone();
|
|
else obj.AppendChild(element.Clone());
|
|
end
|
|
end
|
|
return obj;
|
|
end;
|
|
|
|
function Shape.ConvertToPoint();override;
|
|
begin
|
|
if not ifnil({self.}XmlChildFill) then
|
|
{self.}XmlChildFill.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildTextbox) then
|
|
{self.}XmlChildTextbox.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildTextpath) then
|
|
{self.}XmlChildTextpath.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildImagedata) then
|
|
{self.}XmlChildImagedata.ConvertToPoint();
|
|
if not ifnil({self.}XmlChildWrap) then
|
|
{self.}XmlChildWrap.ConvertToPoint();
|
|
end;
|
|
|
|
function Shape.ReadXmlAttrId();
|
|
begin
|
|
return ifnil({self.}XmlAttrId.Value) ? fallback_.XmlAttrId.Value : {self.}XmlAttrId.Value;
|
|
end;
|
|
|
|
function Shape.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 Shape.ReadXmlAttrStyle();
|
|
begin
|
|
return ifnil({self.}XmlAttrStyle.Value) ? fallback_.XmlAttrStyle.Value : {self.}XmlAttrStyle.Value;
|
|
end;
|
|
|
|
function Shape.WriteXmlAttrStyle(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrStyle) then
|
|
begin
|
|
{self.}XmlAttrStyle := new OpenXmlAttribute("", "style", nil);
|
|
attributes_["style"] := {self.}XmlAttrStyle;
|
|
end
|
|
{self.}XmlAttrStyle.Value := _value;
|
|
end;
|
|
|
|
function Shape.ReadXmlAttrSpid();
|
|
begin
|
|
return ifnil({self.}XmlAttrSpid.Value) ? fallback_.XmlAttrSpid.Value : {self.}XmlAttrSpid.Value;
|
|
end;
|
|
|
|
function Shape.WriteXmlAttrSpid(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrSpid) then
|
|
begin
|
|
{self.}XmlAttrSpid := new OpenXmlAttribute("o", "spid", nil);
|
|
attributes_["o:spid"] := {self.}XmlAttrSpid;
|
|
end
|
|
{self.}XmlAttrSpid.Value := _value;
|
|
end;
|
|
|
|
function Shape.ReadXmlAttrType();
|
|
begin
|
|
return ifnil({self.}XmlAttrType.Value) ? fallback_.XmlAttrType.Value : {self.}XmlAttrType.Value;
|
|
end;
|
|
|
|
function Shape.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 Shape.ReadXmlAttrGfxdata();
|
|
begin
|
|
return ifnil({self.}XmlAttrGfxdata.Value) ? fallback_.XmlAttrGfxdata.Value : {self.}XmlAttrGfxdata.Value;
|
|
end;
|
|
|
|
function Shape.WriteXmlAttrGfxdata(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrGfxdata) then
|
|
begin
|
|
{self.}XmlAttrGfxdata := new OpenXmlAttribute("o", "gfxdata", nil);
|
|
attributes_["o:gfxdata"] := {self.}XmlAttrGfxdata;
|
|
end
|
|
{self.}XmlAttrGfxdata.Value := _value;
|
|
end;
|
|
|
|
function Shape.ReadXmlAttrFilled();
|
|
begin
|
|
return ifnil({self.}XmlAttrFilled.Value) ? fallback_.XmlAttrFilled.Value : {self.}XmlAttrFilled.Value;
|
|
end;
|
|
|
|
function Shape.WriteXmlAttrFilled(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrFilled) then
|
|
begin
|
|
{self.}XmlAttrFilled := new OpenXmlAttribute("", "filled", nil);
|
|
attributes_["filled"] := {self.}XmlAttrFilled;
|
|
end
|
|
{self.}XmlAttrFilled.Value := _value;
|
|
end;
|
|
|
|
function Shape.ReadXmlAttrAllowincell();
|
|
begin
|
|
return ifnil({self.}XmlAttrAllowincell.Value) ? fallback_.XmlAttrAllowincell.Value : {self.}XmlAttrAllowincell.Value;
|
|
end;
|
|
|
|
function Shape.WriteXmlAttrAllowincell(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrAllowincell) then
|
|
begin
|
|
{self.}XmlAttrAllowincell := new OpenXmlAttribute("o", "allowincell", nil);
|
|
attributes_["o:allowincell"] := {self.}XmlAttrAllowincell;
|
|
end
|
|
{self.}XmlAttrAllowincell.Value := _value;
|
|
end;
|
|
|
|
function Shape.ReadXmlAttrFillcolor();
|
|
begin
|
|
return ifnil({self.}XmlAttrFillcolor.Value) ? fallback_.XmlAttrFillcolor.Value : {self.}XmlAttrFillcolor.Value;
|
|
end;
|
|
|
|
function Shape.WriteXmlAttrFillcolor(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrFillcolor) then
|
|
begin
|
|
{self.}XmlAttrFillcolor := new OpenXmlAttribute("", "fillcolor", nil);
|
|
attributes_["fillcolor"] := {self.}XmlAttrFillcolor;
|
|
end
|
|
{self.}XmlAttrFillcolor.Value := _value;
|
|
end;
|
|
|
|
function Shape.ReadXmlAttrStroked();
|
|
begin
|
|
return ifnil({self.}XmlAttrStroked.Value) ? fallback_.XmlAttrStroked.Value : {self.}XmlAttrStroked.Value;
|
|
end;
|
|
|
|
function Shape.WriteXmlAttrStroked(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrStroked) then
|
|
begin
|
|
{self.}XmlAttrStroked := new OpenXmlAttribute("", "stroked", nil);
|
|
attributes_["stroked"] := {self.}XmlAttrStroked;
|
|
end
|
|
{self.}XmlAttrStroked.Value := _value;
|
|
end;
|
|
|
|
function Shape.ReadXmlAttrOle();
|
|
begin
|
|
return ifnil({self.}XmlAttrOle.Value) ? fallback_.XmlAttrOle.Value : {self.}XmlAttrOle.Value;
|
|
end;
|
|
|
|
function Shape.WriteXmlAttrOle(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrOle) then
|
|
begin
|
|
{self.}XmlAttrOle := new OpenXmlAttribute("o", "ole", nil);
|
|
attributes_["o:ole"] := {self.}XmlAttrOle;
|
|
end
|
|
{self.}XmlAttrOle.Value := _value;
|
|
end;
|
|
|
|
function Shape.ReadXmlChildFill(): Fill;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildFill) or {self.}XmlChildFill.Removed) then
|
|
begin
|
|
{self.}XmlChildFill := new Fill(self, {self.}Prefix, "fill");
|
|
container_.Set({self.}XmlChildFill);
|
|
end
|
|
return {self.}XmlChildFill and not {self.}XmlChildFill.Removed ? {self.}XmlChildFill : fallback_.Fill;
|
|
end;
|
|
|
|
function Shape.WriteXmlChildFill(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildFill) then
|
|
{self.}RemoveChild({self.}XmlChildFill);
|
|
end
|
|
else if v is class(Fill) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildFill := v;
|
|
container_.Set({self.}XmlChildFill);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Fill expects Fill or nil";
|
|
end
|
|
end;
|
|
|
|
function Shape.ReadXmlChildTextbox(): Textbox;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildTextbox) or {self.}XmlChildTextbox.Removed) then
|
|
begin
|
|
{self.}XmlChildTextbox := new Textbox(self, {self.}Prefix, "textbox");
|
|
container_.Set({self.}XmlChildTextbox);
|
|
end
|
|
return {self.}XmlChildTextbox and not {self.}XmlChildTextbox.Removed ? {self.}XmlChildTextbox : fallback_.Textbox;
|
|
end;
|
|
|
|
function Shape.WriteXmlChildTextbox(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildTextbox) then
|
|
{self.}RemoveChild({self.}XmlChildTextbox);
|
|
end
|
|
else if v is class(Textbox) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildTextbox := v;
|
|
container_.Set({self.}XmlChildTextbox);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Textbox expects Textbox or nil";
|
|
end
|
|
end;
|
|
|
|
function Shape.ReadXmlChildTextpath(): Textpath;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildTextpath) or {self.}XmlChildTextpath.Removed) then
|
|
begin
|
|
{self.}XmlChildTextpath := new Textpath(self, {self.}Prefix, "textpath");
|
|
container_.Set({self.}XmlChildTextpath);
|
|
end
|
|
return {self.}XmlChildTextpath and not {self.}XmlChildTextpath.Removed ? {self.}XmlChildTextpath : fallback_.Textpath;
|
|
end;
|
|
|
|
function Shape.WriteXmlChildTextpath(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildTextpath) then
|
|
{self.}RemoveChild({self.}XmlChildTextpath);
|
|
end
|
|
else if v is class(Textpath) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildTextpath := v;
|
|
container_.Set({self.}XmlChildTextpath);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Textpath expects Textpath or nil";
|
|
end
|
|
end;
|
|
|
|
function Shape.ReadXmlChildImagedata(): Imagedata;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildImagedata) or {self.}XmlChildImagedata.Removed) then
|
|
begin
|
|
{self.}XmlChildImagedata := new Imagedata(self, {self.}Prefix, "imagedata");
|
|
container_.Set({self.}XmlChildImagedata);
|
|
end
|
|
return {self.}XmlChildImagedata and not {self.}XmlChildImagedata.Removed ? {self.}XmlChildImagedata : fallback_.Imagedata;
|
|
end;
|
|
|
|
function Shape.WriteXmlChildImagedata(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildImagedata) then
|
|
{self.}RemoveChild({self.}XmlChildImagedata);
|
|
end
|
|
else if v is class(Imagedata) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildImagedata := v;
|
|
container_.Set({self.}XmlChildImagedata);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Imagedata expects Imagedata or nil";
|
|
end
|
|
end;
|
|
|
|
function Shape.ReadXmlChildWrap(): Wrap;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildWrap) or {self.}XmlChildWrap.Removed) then
|
|
begin
|
|
{self.}XmlChildWrap := new Wrap(self, "w10", "wrap");
|
|
container_.Set({self.}XmlChildWrap);
|
|
end
|
|
return {self.}XmlChildWrap and not {self.}XmlChildWrap.Removed ? {self.}XmlChildWrap : fallback_.Wrap;
|
|
end;
|
|
|
|
function Shape.WriteXmlChildWrap(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildWrap) then
|
|
{self.}RemoveChild({self.}XmlChildWrap);
|
|
end
|
|
else if v is class(Wrap) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildWrap := v;
|
|
container_.Set({self.}XmlChildWrap);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: Wrap expects Wrap or nil";
|
|
end
|
|
end;
|
|
|
|
function Wrap.create();overload;
|
|
begin
|
|
{self.}create(nil, "w10", "wrap");
|
|
end;
|
|
|
|
function Wrap.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function Wrap.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 Wrap.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
"anchorx": makeweakref(thisFunction(WriteXmlAttrAnchorx)),
|
|
"anchory": makeweakref(thisFunction(WriteXmlAttrAnchory)),
|
|
);
|
|
sorted_child_ := array(
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function Wrap.Copy(_obj: Wrap);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.Anchorx) then
|
|
{self.}Anchorx := _obj.Anchorx;
|
|
if not ifnil(_obj.Anchory) then
|
|
{self.}Anchory := _obj.Anchory;
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function Wrap.Clone(): Wrap;override;
|
|
begin
|
|
obj := new Wrap(nil, {self.}Prefix, {self.}LocalName);
|
|
if not ifnil({self.}Anchorx) then
|
|
obj.Anchorx := {self.}Anchorx;
|
|
if not ifnil({self.}Anchory) then
|
|
obj.Anchory := {self.}Anchory;
|
|
return obj;
|
|
end;
|
|
|
|
function Wrap.ConvertToPoint();override;
|
|
begin
|
|
|
|
end;
|
|
|
|
function Wrap.ReadXmlAttrAnchorx();
|
|
begin
|
|
return ifnil({self.}XmlAttrAnchorx.Value) ? fallback_.XmlAttrAnchorx.Value : {self.}XmlAttrAnchorx.Value;
|
|
end;
|
|
|
|
function Wrap.WriteXmlAttrAnchorx(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrAnchorx) then
|
|
begin
|
|
{self.}XmlAttrAnchorx := new OpenXmlAttribute("", "anchorx", nil);
|
|
attributes_["anchorx"] := {self.}XmlAttrAnchorx;
|
|
end
|
|
{self.}XmlAttrAnchorx.Value := _value;
|
|
end;
|
|
|
|
function Wrap.ReadXmlAttrAnchory();
|
|
begin
|
|
return ifnil({self.}XmlAttrAnchory.Value) ? fallback_.XmlAttrAnchory.Value : {self.}XmlAttrAnchory.Value;
|
|
end;
|
|
|
|
function Wrap.WriteXmlAttrAnchory(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrAnchory) then
|
|
begin
|
|
{self.}XmlAttrAnchory := new OpenXmlAttribute("", "anchory", nil);
|
|
attributes_["anchory"] := {self.}XmlAttrAnchory;
|
|
end
|
|
{self.}XmlAttrAnchory.Value := _value;
|
|
end;
|
|
|
|
function Fill.create();overload;
|
|
begin
|
|
{self.}create(nil, "v", "fill");
|
|
end;
|
|
|
|
function Fill.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function Fill.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 Fill.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
"opacity": makeweakref(thisFunction(WriteXmlAttrOpacity)),
|
|
);
|
|
sorted_child_ := array(
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function Fill.Copy(_obj: Fill);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.Opacity) then
|
|
{self.}Opacity := _obj.Opacity;
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function Fill.Clone(): Fill;override;
|
|
begin
|
|
obj := new Fill(nil, {self.}Prefix, {self.}LocalName);
|
|
if not ifnil({self.}Opacity) then
|
|
obj.Opacity := {self.}Opacity;
|
|
return obj;
|
|
end;
|
|
|
|
function Fill.ConvertToPoint();override;
|
|
begin
|
|
|
|
end;
|
|
|
|
function Fill.ReadXmlAttrOpacity();
|
|
begin
|
|
return ifnil({self.}XmlAttrOpacity.Value) ? fallback_.XmlAttrOpacity.Value : {self.}XmlAttrOpacity.Value;
|
|
end;
|
|
|
|
function Fill.WriteXmlAttrOpacity(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrOpacity) then
|
|
begin
|
|
{self.}XmlAttrOpacity := new OpenXmlAttribute("", "opacity", nil);
|
|
attributes_["opacity"] := {self.}XmlAttrOpacity;
|
|
end
|
|
{self.}XmlAttrOpacity.Value := _value;
|
|
end;
|
|
|
|
function Imagedata.create();overload;
|
|
begin
|
|
{self.}create(nil, "v", "imagedata");
|
|
end;
|
|
|
|
function Imagedata.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function Imagedata.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 Imagedata.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
"r:id": makeweakref(thisFunction(WriteXmlAttrId)),
|
|
"o:title": makeweakref(thisFunction(WriteXmlAttrTitle)),
|
|
);
|
|
sorted_child_ := array(
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function Imagedata.Copy(_obj: Imagedata);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.Id) then
|
|
{self.}Id := _obj.Id;
|
|
if not ifnil(_obj.Title) then
|
|
{self.}Title := _obj.Title;
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function Imagedata.Clone(): Imagedata;override;
|
|
begin
|
|
obj := new Imagedata(nil, {self.}Prefix, {self.}LocalName);
|
|
if not ifnil({self.}Id) then
|
|
obj.Id := {self.}Id;
|
|
if not ifnil({self.}Title) then
|
|
obj.Title := {self.}Title;
|
|
return obj;
|
|
end;
|
|
|
|
function Imagedata.ConvertToPoint();override;
|
|
begin
|
|
|
|
end;
|
|
|
|
function Imagedata.ReadXmlAttrId();
|
|
begin
|
|
return ifnil({self.}XmlAttrId.Value) ? fallback_.XmlAttrId.Value : {self.}XmlAttrId.Value;
|
|
end;
|
|
|
|
function Imagedata.WriteXmlAttrId(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrId) then
|
|
begin
|
|
{self.}XmlAttrId := new OpenXmlAttribute("r", "id", nil);
|
|
attributes_["r:id"] := {self.}XmlAttrId;
|
|
end
|
|
{self.}XmlAttrId.Value := _value;
|
|
end;
|
|
|
|
function Imagedata.ReadXmlAttrTitle();
|
|
begin
|
|
return ifnil({self.}XmlAttrTitle.Value) ? fallback_.XmlAttrTitle.Value : {self.}XmlAttrTitle.Value;
|
|
end;
|
|
|
|
function Imagedata.WriteXmlAttrTitle(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrTitle) then
|
|
begin
|
|
{self.}XmlAttrTitle := new OpenXmlAttribute("o", "title", nil);
|
|
attributes_["o:title"] := {self.}XmlAttrTitle;
|
|
end
|
|
{self.}XmlAttrTitle.Value := _value;
|
|
end;
|
|
|
|
function Textbox.create();overload;
|
|
begin
|
|
{self.}create(nil, "v", "textbox");
|
|
end;
|
|
|
|
function Textbox.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function Textbox.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 Textbox.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
"w:txbxContent": array(0, makeweakref(thisFunction(ReadXmlChildTxbxContent))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function Textbox.Copy(_obj: Textbox);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.XmlChildTxbxContent) then
|
|
{self.}TxbxContent.Copy(_obj.XmlChildTxbxContent);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function Textbox.Clone(): Textbox;override;
|
|
begin
|
|
obj := new Textbox(nil, {self.}Prefix, {self.}LocalName);
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
elements := {self.}Elements();
|
|
for _,element in elements do
|
|
begin
|
|
case element.ElementName of
|
|
"w:txbxContent": obj.TxbxContent := element.Clone();
|
|
else obj.AppendChild(element.Clone());
|
|
end
|
|
end
|
|
return obj;
|
|
end;
|
|
|
|
function Textbox.ConvertToPoint();override;
|
|
begin
|
|
if not ifnil({self.}XmlChildTxbxContent) then
|
|
{self.}XmlChildTxbxContent.ConvertToPoint();
|
|
end;
|
|
|
|
function Textbox.ReadXmlChildTxbxContent(): TxbxContent;
|
|
begin
|
|
if tslassigning and (ifnil({self.}XmlChildTxbxContent) or {self.}XmlChildTxbxContent.Removed) then
|
|
begin
|
|
{self.}XmlChildTxbxContent := new DocxML.TxbxContent(self, "w", "txbxContent");
|
|
container_.Set({self.}XmlChildTxbxContent);
|
|
end
|
|
return {self.}XmlChildTxbxContent and not {self.}XmlChildTxbxContent.Removed ? {self.}XmlChildTxbxContent : fallback_.TxbxContent;
|
|
end;
|
|
|
|
function Textbox.WriteXmlChildTxbxContent(_p1: any; _p2: any);
|
|
begin
|
|
v := realparamcount = 1 ? _p1 : _p2;
|
|
if ifnil(v) then
|
|
begin
|
|
if ifObj({self.}XmlChildTxbxContent) then
|
|
{self.}RemoveChild({self.}XmlChildTxbxContent);
|
|
end
|
|
else if v is class(TxbxContent) then
|
|
begin
|
|
v.Parent := self;
|
|
{self.}XmlChildTxbxContent := v;
|
|
container_.Set({self.}XmlChildTxbxContent);
|
|
end
|
|
else begin
|
|
raise "Invalid assignment: TxbxContent expects TxbxContent or nil";
|
|
end
|
|
end;
|
|
|
|
function OLEObject.create();overload;
|
|
begin
|
|
{self.}create(nil, "o", "OLEObject");
|
|
end;
|
|
|
|
function OLEObject.create(_node: XmlNode);overload;
|
|
begin
|
|
inherited create(_node);
|
|
end;
|
|
|
|
function OLEObject.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 OLEObject.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
pre + "Type": makeweakref(thisFunction(WriteXmlAttrType)),
|
|
pre + "ProgID": makeweakref(thisFunction(WriteXmlAttrProgID)),
|
|
pre + "ShapeID": makeweakref(thisFunction(WriteXmlAttrShapeID)),
|
|
pre + "DrawAspect": makeweakref(thisFunction(WriteXmlAttrDrawAspect)),
|
|
pre + "DrawAspect": makeweakref(thisFunction(WriteXmlAttrObjectID)),
|
|
"r:id": makeweakref(thisFunction(WriteXmlAttrId)),
|
|
);
|
|
sorted_child_ := array(
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function OLEObject.Copy(_obj: OLEObject);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
inherited Copy(_obj);
|
|
if not ifnil(_obj.Type) then
|
|
{self.}Type := _obj.Type;
|
|
if not ifnil(_obj.ProgID) then
|
|
{self.}ProgID := _obj.ProgID;
|
|
if not ifnil(_obj.ShapeID) then
|
|
{self.}ShapeID := _obj.ShapeID;
|
|
if not ifnil(_obj.DrawAspect) then
|
|
{self.}DrawAspect := _obj.DrawAspect;
|
|
if not ifnil(_obj.ObjectID) then
|
|
{self.}ObjectID := _obj.ObjectID;
|
|
if not ifnil(_obj.Id) then
|
|
{self.}Id := _obj.Id;
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function OLEObject.Clone(): OLEObject;override;
|
|
begin
|
|
obj := new OLEObject(nil, {self.}Prefix, {self.}LocalName);
|
|
if not ifnil({self.}Type) then
|
|
obj.Type := {self.}Type;
|
|
if not ifnil({self.}ProgID) then
|
|
obj.ProgID := {self.}ProgID;
|
|
if not ifnil({self.}ShapeID) then
|
|
obj.ShapeID := {self.}ShapeID;
|
|
if not ifnil({self.}DrawAspect) then
|
|
obj.DrawAspect := {self.}DrawAspect;
|
|
if not ifnil({self.}ObjectID) then
|
|
obj.ObjectID := {self.}ObjectID;
|
|
if not ifnil({self.}Id) then
|
|
obj.Id := {self.}Id;
|
|
return obj;
|
|
end;
|
|
|
|
function OLEObject.ConvertToPoint();override;
|
|
begin
|
|
|
|
end;
|
|
|
|
function OLEObject.ReadXmlAttrType();
|
|
begin
|
|
return ifnil({self.}XmlAttrType.Value) ? fallback_.XmlAttrType.Value : {self.}XmlAttrType.Value;
|
|
end;
|
|
|
|
function OLEObject.WriteXmlAttrType(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrType) then
|
|
begin
|
|
{self.}XmlAttrType := new OpenXmlAttribute({self.}Prefix, "Type", nil);
|
|
attributes_[{self.}Prefix ? {self.}Prefix + ":" + "Type" : "Type"] := {self.}XmlAttrType;
|
|
end
|
|
{self.}XmlAttrType.Value := _value;
|
|
end;
|
|
|
|
function OLEObject.ReadXmlAttrProgID();
|
|
begin
|
|
return ifnil({self.}XmlAttrProgID.Value) ? fallback_.XmlAttrProgID.Value : {self.}XmlAttrProgID.Value;
|
|
end;
|
|
|
|
function OLEObject.WriteXmlAttrProgID(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrProgID) then
|
|
begin
|
|
{self.}XmlAttrProgID := new OpenXmlAttribute({self.}Prefix, "ProgID", nil);
|
|
attributes_[{self.}Prefix ? {self.}Prefix + ":" + "ProgID" : "ProgID"] := {self.}XmlAttrProgID;
|
|
end
|
|
{self.}XmlAttrProgID.Value := _value;
|
|
end;
|
|
|
|
function OLEObject.ReadXmlAttrShapeID();
|
|
begin
|
|
return ifnil({self.}XmlAttrShapeID.Value) ? fallback_.XmlAttrShapeID.Value : {self.}XmlAttrShapeID.Value;
|
|
end;
|
|
|
|
function OLEObject.WriteXmlAttrShapeID(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrShapeID) then
|
|
begin
|
|
{self.}XmlAttrShapeID := new OpenXmlAttribute({self.}Prefix, "ShapeID", nil);
|
|
attributes_[{self.}Prefix ? {self.}Prefix + ":" + "ShapeID" : "ShapeID"] := {self.}XmlAttrShapeID;
|
|
end
|
|
{self.}XmlAttrShapeID.Value := _value;
|
|
end;
|
|
|
|
function OLEObject.ReadXmlAttrDrawAspect();
|
|
begin
|
|
return ifnil({self.}XmlAttrDrawAspect.Value) ? fallback_.XmlAttrDrawAspect.Value : {self.}XmlAttrDrawAspect.Value;
|
|
end;
|
|
|
|
function OLEObject.WriteXmlAttrDrawAspect(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrDrawAspect) then
|
|
begin
|
|
{self.}XmlAttrDrawAspect := new OpenXmlAttribute({self.}Prefix, "DrawAspect", nil);
|
|
attributes_[{self.}Prefix ? {self.}Prefix + ":" + "DrawAspect" : "DrawAspect"] := {self.}XmlAttrDrawAspect;
|
|
end
|
|
{self.}XmlAttrDrawAspect.Value := _value;
|
|
end;
|
|
|
|
function OLEObject.ReadXmlAttrObjectID();
|
|
begin
|
|
return ifnil({self.}XmlAttrObjectID.Value) ? fallback_.XmlAttrObjectID.Value : {self.}XmlAttrObjectID.Value;
|
|
end;
|
|
|
|
function OLEObject.WriteXmlAttrObjectID(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrObjectID) then
|
|
begin
|
|
{self.}XmlAttrObjectID := new OpenXmlAttribute({self.}Prefix, "DrawAspect", nil);
|
|
attributes_[{self.}Prefix ? {self.}Prefix + ":" + "DrawAspect" : "DrawAspect"] := {self.}XmlAttrObjectID;
|
|
end
|
|
{self.}XmlAttrObjectID.Value := _value;
|
|
end;
|
|
|
|
function OLEObject.ReadXmlAttrId();
|
|
begin
|
|
return ifnil({self.}XmlAttrId.Value) ? fallback_.XmlAttrId.Value : {self.}XmlAttrId.Value;
|
|
end;
|
|
|
|
function OLEObject.WriteXmlAttrId(_value: any);
|
|
begin
|
|
if ifnil({self.}XmlAttrId) then
|
|
begin
|
|
{self.}XmlAttrId := new OpenXmlAttribute("r", "id", nil);
|
|
attributes_["r:id"] := {self.}XmlAttrId;
|
|
end
|
|
{self.}XmlAttrId.Value := _value;
|
|
end;
|
|
|
|
end. |