OfficeXml/autoclass/docx/CXY@DOCX.tsf

97 lines
2.4 KiB
Plaintext

type CXY = 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: CXY);override;
public
// attributes property
property Cx read ReadXmlAttrCx write WriteXmlAttrCx;
property Cy read ReadXmlAttrCy write WriteXmlAttrCy;
function ReadXmlAttrCx();
function WriteXmlAttrCx(_value);
function ReadXmlAttrCy();
function WriteXmlAttrCy(_value);
public
// Attributes
XmlAttrCx: OpenXmlAttribute;
XmlAttrCy: OpenXmlAttribute;
end;
function CXY.Create();overload;
begin
{self.}Create(nil, "", "");
end;
function CXY.Create(_node: XmlNode);overload;
begin
class(OpenXmlElement).Create(_node: XmlNode);
end;
function CXY.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 CXY.Init();override;
begin
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
attributes_ := array();
attributes_pf_ := array(
"cx": makeweakref(thisFunction(WriteXmlAttrCx)),
"cy": makeweakref(thisFunction(WriteXmlAttrCy)),
);
sorted_child_ := array(
);
container_ := new TSOfficeContainer(sorted_child_);
end;
function CXY.Copy(_obj: CXY);override;
begin
tslassigning_backup := tslassigning;
tslassigning := 1;
class(OpenXmlElement).Copy(_obj);
if not ifnil(_obj.Cx) then
{self.}Cx := _obj.Cx;
if not ifnil(_obj.Cy) then
{self.}Cy := _obj.Cy;
tslassigning := tslassigning_backup;
end;
function CXY.ReadXmlAttrCx();
begin
return {self.}XmlAttrCx.Value;
end;
function CXY.WriteXmlAttrCx(_value);
begin
if ifnil({self.}XmlAttrCx) then
begin
{self.}XmlAttrCx := new OpenXmlAttribute("", "cx", nil);
attributes_[length(attributes_)] := {self.}XmlAttrCx;
end
{self.}XmlAttrCx.Value := _value;
end;
function CXY.ReadXmlAttrCy();
begin
return {self.}XmlAttrCy.Value;
end;
function CXY.WriteXmlAttrCy(_value);
begin
if ifnil({self.}XmlAttrCy) then
begin
{self.}XmlAttrCy := new OpenXmlAttribute("", "cy", nil);
attributes_[length(attributes_)] := {self.}XmlAttrCy;
end
{self.}XmlAttrCy.Value := _value;
end;