OfficeXml/autoclass/docx/MFontFont@DOCX.tsf

100 lines
2.5 KiB
Plaintext

type MFontFont = 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: MFontFont);override;
property Script read ReadXmlAttrScript write WriteXmlAttrScript;
property Typeface read ReadXmlAttrTypeface write WriteXmlAttrTypeface;
function ReadXmlAttrScript();
function WriteXmlAttrScript(_value);
function ReadXmlAttrTypeface();
function WriteXmlAttrTypeface(_value);
public
// Attributes
XmlAttrScript: OpenXmlAttribute;
XmlAttrTypeface: OpenXmlAttribute;
// Children
end;
function MFontFont.Create();overload;
begin
{self.}Create(nil, "a", "defRPr");
end;
function MFontFont.Create(_node: XmlNode);overload;
begin
class(OpenXmlElement).Create(_node: XmlNode);
end;
function MFontFont.Create(_parent: tslobj; _prefix: string; _local_name: string);overload;
begin
class(OpenXmlElement).Create(_parent, _prefix, _local_name);
end;
function MFontFont.Init();override;
begin
{self.}XmlAttrScript := new OpenXmlAttribute(nil, "script", nil);
{self.}XmlAttrTypeface := new OpenXmlAttribute(nil, "typeface", nil);
end;
function MFontFont.InitAttributes();override;
begin
attributes_ := array(
{self.}XmlAttrScript,
{self.}XmlAttrTypeface,
);
end;
function MFontFont.InitChildren();override;
begin
child_elements_ := array(
);
sorted_child_ := array(
"": -1,
);
end;
function MFontFont.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 MFontFont.Copy(_obj: MFontFont);override;
begin
if not ifnil(_obj.XmlAttrScript.Value) then
{self.}XmlAttrScript.Value := _obj.XmlAttrScript.Value;
if not ifnil(_obj.XmlAttrTypeface.Value) then
{self.}XmlAttrTypeface.Value := _obj.XmlAttrTypeface.Value;
end;
function MFontFont.ReadXmlAttrScript();
begin
return {self.}XmlAttrScript.Value;
end;
function MFontFont.WriteXmlAttrScript(_value);
begin
{self.}XmlAttrScript.Value := _value;
end;
function MFontFont.ReadXmlAttrTypeface();
begin
return {self.}XmlAttrTypeface.Value;
end;
function MFontFont.WriteXmlAttrTypeface(_value);
begin
{self.}XmlAttrTypeface.Value := _value;
end;