251 lines
7.7 KiB
Plaintext
251 lines
7.7 KiB
Plaintext
type RFonts = 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: RFonts);override;
|
|
|
|
public
|
|
|
|
// attributes property
|
|
property Ascii read ReadXmlAttrAscii write WriteXmlAttrAscii;
|
|
property AsciiTheme read ReadXmlAttrAsciiTheme write WriteXmlAttrAsciiTheme;
|
|
property EastAsia read ReadXmlAttrEastAsia write WriteXmlAttrEastAsia;
|
|
property EastAsiaTheme read ReadXmlAttrEastAsiaTheme write WriteXmlAttrEastAsiaTheme;
|
|
property HAnsi read ReadXmlAttrHAnsi write WriteXmlAttrHAnsi;
|
|
property HAnsiTheme read ReadXmlAttrHAnsiTheme write WriteXmlAttrHAnsiTheme;
|
|
property Hint read ReadXmlAttrHint write WriteXmlAttrHint;
|
|
property Cs read ReadXmlAttrCs write WriteXmlAttrCs;
|
|
property CsTheme read ReadXmlAttrCsTheme write WriteXmlAttrCsTheme;
|
|
function ReadXmlAttrAscii();
|
|
function WriteXmlAttrAscii(_value);
|
|
function ReadXmlAttrAsciiTheme();
|
|
function WriteXmlAttrAsciiTheme(_value);
|
|
function ReadXmlAttrEastAsia();
|
|
function WriteXmlAttrEastAsia(_value);
|
|
function ReadXmlAttrEastAsiaTheme();
|
|
function WriteXmlAttrEastAsiaTheme(_value);
|
|
function ReadXmlAttrHAnsi();
|
|
function WriteXmlAttrHAnsi(_value);
|
|
function ReadXmlAttrHAnsiTheme();
|
|
function WriteXmlAttrHAnsiTheme(_value);
|
|
function ReadXmlAttrHint();
|
|
function WriteXmlAttrHint(_value);
|
|
function ReadXmlAttrCs();
|
|
function WriteXmlAttrCs(_value);
|
|
function ReadXmlAttrCsTheme();
|
|
function WriteXmlAttrCsTheme(_value);
|
|
|
|
public
|
|
// Attributes
|
|
XmlAttrAscii: OpenXmlAttribute;
|
|
XmlAttrAsciiTheme: OpenXmlAttribute;
|
|
XmlAttrEastAsia: OpenXmlAttribute;
|
|
XmlAttrEastAsiaTheme: OpenXmlAttribute;
|
|
XmlAttrHAnsi: OpenXmlAttribute;
|
|
XmlAttrHAnsiTheme: OpenXmlAttribute;
|
|
XmlAttrHint: OpenXmlAttribute;
|
|
XmlAttrCs: OpenXmlAttribute;
|
|
XmlAttrCsTheme: OpenXmlAttribute;
|
|
|
|
|
|
end;
|
|
|
|
function RFonts.Create();overload;
|
|
begin
|
|
{self.}Create(nil, "w", "rFonts");
|
|
end;
|
|
|
|
function RFonts.Create(_node: XmlNode);overload;
|
|
begin
|
|
class(OpenXmlElement).Create(_node: XmlNode);
|
|
end;
|
|
|
|
function RFonts.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 RFonts.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
pre + "ascii": makeweakref(thisFunction(WriteXmlAttrAscii)),
|
|
pre + "asciiTheme": makeweakref(thisFunction(WriteXmlAttrAsciiTheme)),
|
|
pre + "eastAsia": makeweakref(thisFunction(WriteXmlAttrEastAsia)),
|
|
pre + "eastAsiaTheme": makeweakref(thisFunction(WriteXmlAttrEastAsiaTheme)),
|
|
pre + "hAnsi": makeweakref(thisFunction(WriteXmlAttrHAnsi)),
|
|
pre + "hAnsiTheme": makeweakref(thisFunction(WriteXmlAttrHAnsiTheme)),
|
|
pre + "hint": makeweakref(thisFunction(WriteXmlAttrHint)),
|
|
pre + "cs": makeweakref(thisFunction(WriteXmlAttrCs)),
|
|
pre + "cstheme": makeweakref(thisFunction(WriteXmlAttrCsTheme)),
|
|
);
|
|
sorted_child_ := array(
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function RFonts.Copy(_obj: RFonts);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
class(OpenXmlElement).Copy(_obj);
|
|
if not ifnil(_obj.Ascii) then
|
|
{self.}Ascii := _obj.Ascii;
|
|
if not ifnil(_obj.AsciiTheme) then
|
|
{self.}AsciiTheme := _obj.AsciiTheme;
|
|
if not ifnil(_obj.EastAsia) then
|
|
{self.}EastAsia := _obj.EastAsia;
|
|
if not ifnil(_obj.EastAsiaTheme) then
|
|
{self.}EastAsiaTheme := _obj.EastAsiaTheme;
|
|
if not ifnil(_obj.HAnsi) then
|
|
{self.}HAnsi := _obj.HAnsi;
|
|
if not ifnil(_obj.HAnsiTheme) then
|
|
{self.}HAnsiTheme := _obj.HAnsiTheme;
|
|
if not ifnil(_obj.Hint) then
|
|
{self.}Hint := _obj.Hint;
|
|
if not ifnil(_obj.Cs) then
|
|
{self.}Cs := _obj.Cs;
|
|
if not ifnil(_obj.CsTheme) then
|
|
{self.}CsTheme := _obj.CsTheme;
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function RFonts.ReadXmlAttrAscii();
|
|
begin
|
|
return {self.}XmlAttrAscii.Value;
|
|
end;
|
|
|
|
function RFonts.WriteXmlAttrAscii(_value);
|
|
begin
|
|
if ifnil({self.}XmlAttrAscii) then
|
|
begin
|
|
{self.}XmlAttrAscii := new OpenXmlAttribute({self.}Prefix, "ascii", nil);
|
|
attributes_[length(attributes_)] := {self.}XmlAttrAscii;
|
|
end
|
|
{self.}XmlAttrAscii.Value := _value;
|
|
end;
|
|
|
|
function RFonts.ReadXmlAttrAsciiTheme();
|
|
begin
|
|
return {self.}XmlAttrAsciiTheme.Value;
|
|
end;
|
|
|
|
function RFonts.WriteXmlAttrAsciiTheme(_value);
|
|
begin
|
|
if ifnil({self.}XmlAttrAsciiTheme) then
|
|
begin
|
|
{self.}XmlAttrAsciiTheme := new OpenXmlAttribute({self.}Prefix, "asciiTheme", nil);
|
|
attributes_[length(attributes_)] := {self.}XmlAttrAsciiTheme;
|
|
end
|
|
{self.}XmlAttrAsciiTheme.Value := _value;
|
|
end;
|
|
|
|
function RFonts.ReadXmlAttrEastAsia();
|
|
begin
|
|
return {self.}XmlAttrEastAsia.Value;
|
|
end;
|
|
|
|
function RFonts.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;
|
|
|
|
function RFonts.ReadXmlAttrEastAsiaTheme();
|
|
begin
|
|
return {self.}XmlAttrEastAsiaTheme.Value;
|
|
end;
|
|
|
|
function RFonts.WriteXmlAttrEastAsiaTheme(_value);
|
|
begin
|
|
if ifnil({self.}XmlAttrEastAsiaTheme) then
|
|
begin
|
|
{self.}XmlAttrEastAsiaTheme := new OpenXmlAttribute({self.}Prefix, "eastAsiaTheme", nil);
|
|
attributes_[length(attributes_)] := {self.}XmlAttrEastAsiaTheme;
|
|
end
|
|
{self.}XmlAttrEastAsiaTheme.Value := _value;
|
|
end;
|
|
|
|
function RFonts.ReadXmlAttrHAnsi();
|
|
begin
|
|
return {self.}XmlAttrHAnsi.Value;
|
|
end;
|
|
|
|
function RFonts.WriteXmlAttrHAnsi(_value);
|
|
begin
|
|
if ifnil({self.}XmlAttrHAnsi) then
|
|
begin
|
|
{self.}XmlAttrHAnsi := new OpenXmlAttribute({self.}Prefix, "hAnsi", nil);
|
|
attributes_[length(attributes_)] := {self.}XmlAttrHAnsi;
|
|
end
|
|
{self.}XmlAttrHAnsi.Value := _value;
|
|
end;
|
|
|
|
function RFonts.ReadXmlAttrHAnsiTheme();
|
|
begin
|
|
return {self.}XmlAttrHAnsiTheme.Value;
|
|
end;
|
|
|
|
function RFonts.WriteXmlAttrHAnsiTheme(_value);
|
|
begin
|
|
if ifnil({self.}XmlAttrHAnsiTheme) then
|
|
begin
|
|
{self.}XmlAttrHAnsiTheme := new OpenXmlAttribute({self.}Prefix, "hAnsiTheme", nil);
|
|
attributes_[length(attributes_)] := {self.}XmlAttrHAnsiTheme;
|
|
end
|
|
{self.}XmlAttrHAnsiTheme.Value := _value;
|
|
end;
|
|
|
|
function RFonts.ReadXmlAttrHint();
|
|
begin
|
|
return {self.}XmlAttrHint.Value;
|
|
end;
|
|
|
|
function RFonts.WriteXmlAttrHint(_value);
|
|
begin
|
|
if ifnil({self.}XmlAttrHint) then
|
|
begin
|
|
{self.}XmlAttrHint := new OpenXmlAttribute({self.}Prefix, "hint", nil);
|
|
attributes_[length(attributes_)] := {self.}XmlAttrHint;
|
|
end
|
|
{self.}XmlAttrHint.Value := _value;
|
|
end;
|
|
|
|
function RFonts.ReadXmlAttrCs();
|
|
begin
|
|
return {self.}XmlAttrCs.Value;
|
|
end;
|
|
|
|
function RFonts.WriteXmlAttrCs(_value);
|
|
begin
|
|
if ifnil({self.}XmlAttrCs) then
|
|
begin
|
|
{self.}XmlAttrCs := new OpenXmlAttribute({self.}Prefix, "cs", nil);
|
|
attributes_[length(attributes_)] := {self.}XmlAttrCs;
|
|
end
|
|
{self.}XmlAttrCs.Value := _value;
|
|
end;
|
|
|
|
function RFonts.ReadXmlAttrCsTheme();
|
|
begin
|
|
return {self.}XmlAttrCsTheme.Value;
|
|
end;
|
|
|
|
function RFonts.WriteXmlAttrCsTheme(_value);
|
|
begin
|
|
if ifnil({self.}XmlAttrCsTheme) then
|
|
begin
|
|
{self.}XmlAttrCsTheme := new OpenXmlAttribute({self.}Prefix, "cstheme", nil);
|
|
attributes_[length(attributes_)] := {self.}XmlAttrCsTheme;
|
|
end
|
|
{self.}XmlAttrCsTheme.Value := _value;
|
|
end;
|