type SpPr = class(OpenXmlElement) 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: SpPr);override; public // attributes property property BwMode read ReadXmlAttrBwMode write WriteXmlAttrBwMode; function ReadXmlAttrBwMode(); function WriteXmlAttrBwMode(_value); // empty property property NoFill read ReadXmlChildNoFill write WriteXmlChildNoFill; function ReadXmlChildNoFill(); function WriteXmlChildNoFill(_value); // normal property property Xfrm read ReadXmlChildXfrm; property PrstGeom read ReadXmlChildPrstGeom; property SolidFill read ReadXmlChildSolidFill; property Ln read ReadXmlChildLn; property EffectLst read ReadXmlChildEffectLst; function ReadXmlChildXfrm(); function ReadXmlChildPrstGeom(); function ReadXmlChildSolidFill(); function ReadXmlChildLn(); function ReadXmlChildEffectLst(); public // Attributes XmlAttrBwMode: OpenXmlAttribute; // Children XmlChildXfrm: Xfrm; XmlChildPrstGeom: PrstGeom; XmlChildNoFill: OpenXmlEmpty; XmlChildSolidFill: SolidFill; XmlChildLn: Ln; XmlChildEffectLst: EffectLst; end; function SpPr.Create();overload; begin {self.}Create(nil, "pic", "spPr"); end; function SpPr.Create(_node: XmlNode);overload; begin class(OpenXmlElement).Create(_node: XmlNode); end; function SpPr.Create(_parent: tslobj; _prefix: string; _local_name: string);overload; begin setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200); class(OpenXmlElement).Create(_parent, _prefix, _local_name); end; function SpPr.Init();override; begin pre := {self.}Prefix ? {self.}Prefix + ":" : ""; attributes_ := array(); attributes_pf_ := array( "bwMode": makeweakref(thisFunction(WriteXmlAttrBwMode)), ); sorted_child_ := array( "a:xfrm": array(0, makeweakref(thisFunction(ReadXmlChildXfrm))), "a:prstGeom": array(1, makeweakref(thisFunction(ReadXmlChildPrstGeom))), "a:noFill": array(2, makeweakref(thisFunction(ReadXmlChildNoFill))), "a:solidFill": array(3, makeweakref(thisFunction(ReadXmlChildSolidFill))), "a:ln": array(4, makeweakref(thisFunction(ReadXmlChildLn))), "a:effectLst": array(5, makeweakref(thisFunction(ReadXmlChildEffectLst))), ); container_ := new TSOfficeContainer(sorted_child_); end; function SpPr.Copy(_obj: SpPr);override; begin tslassigning_backup := tslassigning; tslassigning := 1; class(OpenXmlElement).Copy(_obj); if not ifnil(_obj.BwMode) then {self.}BwMode := _obj.BwMode; if not ifnil(_obj.XmlChildXfrm) then {self.}Xfrm.Copy(_obj.XmlChildXfrm); if not ifnil(_obj.XmlChildPrstGeom) then {self.}PrstGeom.Copy(_obj.XmlChildPrstGeom); if not ifnil(_obj.XmlChildNoFill) then ifnil({self.}XmlChildNoFill) ? {self.}NoFill.Copy(_obj.XmlChildNoFill) : {self.}XmlChildNoFill.Copy(_obj.XmlChildNoFill); if not ifnil(_obj.XmlChildSolidFill) then {self.}SolidFill.Copy(_obj.XmlChildSolidFill); if not ifnil(_obj.XmlChildLn) then {self.}Ln.Copy(_obj.XmlChildLn); if not ifnil(_obj.XmlChildEffectLst) then {self.}EffectLst.Copy(_obj.XmlChildEffectLst); tslassigning := tslassigning_backup; end; function SpPr.ReadXmlAttrBwMode(); begin return {self.}XmlAttrBwMode.Value; end; function SpPr.WriteXmlAttrBwMode(_value); begin if ifnil({self.}XmlAttrBwMode) then begin {self.}XmlAttrBwMode := new OpenXmlAttribute("", "bwMode", nil); attributes_[length(attributes_)] := {self.}XmlAttrBwMode; end {self.}XmlAttrBwMode.Value := _value; end; function SpPr.ReadXmlChildNoFill(); begin if tslassigning and ifnil({self.}XmlChildNoFill) then begin {self.}XmlChildNoFill := new OpenXmlEmpty(self, "a", "noFill"); container_.Set({self.}XmlChildNoFill); return {self.}XmlChildNoFill; end return ifnil({self.}XmlChildNoFill) ? false : {self.}XmlChildNoFill.BoolValue(); end; function SpPr.WriteXmlChildNoFill(_value); begin if ifnil({self.}XmlChildNoFill) then begin {self.}XmlChildNoFill := new OpenXmlEmpty(self, "a", "noFill"); container_.Set({self.}XmlChildNoFill); end {self.}XmlChildNoFill.Value := _value; end; function SpPr.ReadXmlChildXfrm(); begin if tslassigning and ifnil({self.}XmlChildXfrm) then begin {self.}XmlChildXfrm := new Xfrm(self, "a", "xfrm"); container_.Set({self.}XmlChildXfrm); end return {self.}XmlChildXfrm; end; function SpPr.ReadXmlChildPrstGeom(); begin if tslassigning and ifnil({self.}XmlChildPrstGeom) then begin {self.}XmlChildPrstGeom := new PrstGeom(self, "a", "prstGeom"); container_.Set({self.}XmlChildPrstGeom); end return {self.}XmlChildPrstGeom; end; function SpPr.ReadXmlChildSolidFill(); begin if tslassigning and ifnil({self.}XmlChildSolidFill) then begin {self.}XmlChildSolidFill := new SolidFill(self, "a", "solidFill"); container_.Set({self.}XmlChildSolidFill); end return {self.}XmlChildSolidFill; end; function SpPr.ReadXmlChildLn(); begin if tslassigning and ifnil({self.}XmlChildLn) then begin {self.}XmlChildLn := new Ln(self, "a", "ln"); container_.Set({self.}XmlChildLn); end return {self.}XmlChildLn; end; function SpPr.ReadXmlChildEffectLst(); begin if tslassigning and ifnil({self.}XmlChildEffectLst) then begin {self.}XmlChildEffectLst := new EffectLst(self, "a", "effectLst"); container_.Set({self.}XmlChildEffectLst); end return {self.}XmlChildEffectLst; end;