type Blip = 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: Blip);override; public // attributes property property Embed read ReadXmlAttrEmbed write WriteXmlAttrEmbed; property Cstate read ReadXmlAttrCstate write WriteXmlAttrCstate; function ReadXmlAttrEmbed(); function WriteXmlAttrEmbed(_value); function ReadXmlAttrCstate(); function WriteXmlAttrCstate(_value); public // Attributes XmlAttrEmbed: OpenXmlAttribute; XmlAttrCstate: OpenXmlAttribute; end; function Blip.Create();overload; begin {self.}Create(nil, "a", "blip"); end; function Blip.Create(_node: XmlNode);overload; begin class(OpenXmlElement).Create(_node: XmlNode); end; function Blip.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 Blip.Init();override; begin pre := {self.}Prefix ? {self.}Prefix + ":" : ""; attributes_ := array(); attributes_pf_ := array( "r:embed": makeweakref(thisFunction(WriteXmlAttrEmbed)), "cstate": makeweakref(thisFunction(WriteXmlAttrCstate)), ); sorted_child_ := array( ); container_ := new TSOfficeContainer(sorted_child_); end; function Blip.Copy(_obj: Blip);override; begin tslassigning_backup := tslassigning; tslassigning := 1; class(OpenXmlElement).Copy(_obj); if not ifnil(_obj.Embed) then {self.}Embed := _obj.Embed; if not ifnil(_obj.Cstate) then {self.}Cstate := _obj.Cstate; tslassigning := tslassigning_backup; end; function Blip.ReadXmlAttrEmbed(); begin return {self.}XmlAttrEmbed.Value; end; function Blip.WriteXmlAttrEmbed(_value); begin if ifnil({self.}XmlAttrEmbed) then begin {self.}XmlAttrEmbed := new OpenXmlAttribute("r", "embed", nil); attributes_[length(attributes_)] := {self.}XmlAttrEmbed; end {self.}XmlAttrEmbed.Value := _value; end; function Blip.ReadXmlAttrCstate(); begin return {self.}XmlAttrCstate.Value; end; function Blip.WriteXmlAttrCstate(_value); begin if ifnil({self.}XmlAttrCstate) then begin {self.}XmlAttrCstate := new OpenXmlAttribute("", "cstate", nil); attributes_[length(attributes_)] := {self.}XmlAttrCstate; end {self.}XmlAttrCstate.Value := _value; end;