OfficeXml/autoclass/docx/Zoom@DOCX.tsf

82 lines
1.9 KiB
Plaintext

type Zoom = 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 InitAttributes();override;
function InitChildren();override;
function InitNode(_node: XmlNode);override;
function Copy(_obj: Zoom);override;
property Percent read ReadXmlAttrPercent write WriteXmlAttrPercent;
function ReadXmlAttrPercent();
function WriteXmlAttrPercent(_value);
public
// Attributes
XmlAttrPercent: OpenXmlAttribute;
// Children
end;
function Zoom.Create();overload;
begin
{self.}Create(nil, "w", "zoom");
end;
function Zoom.Create(_node: XmlNode);overload;
begin
class(OpenXmlElement).Create(_node: XmlNode);
end;
function Zoom.Create(_parent: tslobj; _prefix: string; _local_name: string);overload;
begin
class(OpenXmlElement).Create(_parent, _prefix, _local_name);
end;
function Zoom.Init();override;
begin
{self.}XmlAttrPercent := new OpenXmlAttribute({self.}Prefix, "percent", nil);
end;
function Zoom.InitAttributes();override;
begin
attributes_ := array(
{self.}XmlAttrPercent,
);
end;
function Zoom.InitChildren();override;
begin
child_elements_ := array(
);
sorted_child_ := array(
"": -1,
);
end;
function Zoom.InitNode(_node: XmlNode);override;
begin
if ifObj({self.}XmlNode) then
for k,v in child_elements_ do v.InitNode(nil);
{self.}XmlNode := ifObj(_node) ? _node : nil;
end;
function Zoom.Copy(_obj: Zoom);override;
begin
if not ifnil(_obj.XmlAttrPercent.Value) then
{self.}XmlAttrPercent.Value := _obj.XmlAttrPercent.Value;
end;
function Zoom.ReadXmlAttrPercent();
begin
return {self.}XmlAttrPercent.Value;
end;
function Zoom.WriteXmlAttrPercent(_value);
begin
{self.}XmlAttrPercent.Value := _value;
end;