OfficeXml/autoclass/docx/ThemeFontLang@DOCX.tsf

97 lines
2.7 KiB
Plaintext

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