OfficeXml/autoclass/docx/TrHeight@DOCX.tsf

75 lines
1.9 KiB
Plaintext

type TrHeight = 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: TrHeight);override;
public
// attributes property
property val read ReadXmlAttrval write WriteXmlAttrval;
function ReadXmlAttrval();
function WriteXmlAttrval(_value);
public
// Attributes
XmlAttrval: OpenXmlAttribute;
end;
function TrHeight.Create();overload;
begin
{self.}Create(nil, "w", "trHeight");
end;
function TrHeight.Create(_node: XmlNode);overload;
begin
class(OpenXmlElement).Create(_node: XmlNode);
end;
function TrHeight.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 TrHeight.Init();override;
begin
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
attributes_ := array();
attributes_pf_ := array(
pre + "val": makeweakref(thisFunction(WriteXmlAttrval)),
);
sorted_child_ := array(
);
container_ := new TSOfficeContainer(sorted_child_);
end;
function TrHeight.Copy(_obj: TrHeight);override;
begin
tslassigning_backup := tslassigning;
tslassigning := 1;
class(OpenXmlElement).Copy(_obj);
if not ifnil(_obj.val) then
{self.}val := _obj.val;
tslassigning := tslassigning_backup;
end;
function TrHeight.ReadXmlAttrval();
begin
return {self.}XmlAttrval.Value;
end;
function TrHeight.WriteXmlAttrval(_value);
begin
if ifnil({self.}XmlAttrval) then
begin
{self.}XmlAttrval := new OpenXmlAttribute({self.}Prefix, "val", nil);
attributes_[length(attributes_)] := {self.}XmlAttrval;
end
{self.}XmlAttrval.Value := _value;
end;