97 lines
2.6 KiB
Plaintext
97 lines
2.6 KiB
Plaintext
type Latin = 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: Latin);override;
|
|
|
|
public
|
|
|
|
// attributes property
|
|
property Typeface read ReadXmlAttrTypeface write WriteXmlAttrTypeface;
|
|
property Panose read ReadXmlAttrPanose write WriteXmlAttrPanose;
|
|
function ReadXmlAttrTypeface();
|
|
function WriteXmlAttrTypeface(_value);
|
|
function ReadXmlAttrPanose();
|
|
function WriteXmlAttrPanose(_value);
|
|
|
|
public
|
|
// Attributes
|
|
XmlAttrTypeface: OpenXmlAttribute;
|
|
XmlAttrPanose: OpenXmlAttribute;
|
|
|
|
|
|
end;
|
|
|
|
function Latin.Create();overload;
|
|
begin
|
|
{self.}Create(nil, "a", "latin");
|
|
end;
|
|
|
|
function Latin.Create(_node: XmlNode);overload;
|
|
begin
|
|
class(OpenXmlElement).Create(_node: XmlNode);
|
|
end;
|
|
|
|
function Latin.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 Latin.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
"typeface": makeweakref(thisFunction(WriteXmlAttrTypeface)),
|
|
"panose": makeweakref(thisFunction(WriteXmlAttrPanose)),
|
|
);
|
|
sorted_child_ := array(
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function Latin.Copy(_obj: Latin);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
class(OpenXmlElement).Copy(_obj);
|
|
if not ifnil(_obj.Typeface) then
|
|
{self.}Typeface := _obj.Typeface;
|
|
if not ifnil(_obj.Panose) then
|
|
{self.}Panose := _obj.Panose;
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function Latin.ReadXmlAttrTypeface();
|
|
begin
|
|
return {self.}XmlAttrTypeface.Value;
|
|
end;
|
|
|
|
function Latin.WriteXmlAttrTypeface(_value);
|
|
begin
|
|
if ifnil({self.}XmlAttrTypeface) then
|
|
begin
|
|
{self.}XmlAttrTypeface := new OpenXmlAttribute("", "typeface", nil);
|
|
attributes_[length(attributes_)] := {self.}XmlAttrTypeface;
|
|
end
|
|
{self.}XmlAttrTypeface.Value := _value;
|
|
end;
|
|
|
|
function Latin.ReadXmlAttrPanose();
|
|
begin
|
|
return {self.}XmlAttrPanose.Value;
|
|
end;
|
|
|
|
function Latin.WriteXmlAttrPanose(_value);
|
|
begin
|
|
if ifnil({self.}XmlAttrPanose) then
|
|
begin
|
|
{self.}XmlAttrPanose := new OpenXmlAttribute("", "panose", nil);
|
|
attributes_[length(attributes_)] := {self.}XmlAttrPanose;
|
|
end
|
|
{self.}XmlAttrPanose.Value := _value;
|
|
end;
|