141 lines
3.9 KiB
Plaintext
141 lines
3.9 KiB
Plaintext
type ThemeFamily = 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: ThemeFamily);override;
|
|
|
|
public
|
|
|
|
// attributes property
|
|
property XmlnsThm15 read ReadXmlAttrXmlnsThm15 write WriteXmlAttrXmlnsThm15;
|
|
property Name read ReadXmlAttrName write WriteXmlAttrName;
|
|
property Id read ReadXmlAttrId write WriteXmlAttrId;
|
|
property Vid read ReadXmlAttrVid write WriteXmlAttrVid;
|
|
function ReadXmlAttrXmlnsThm15();
|
|
function WriteXmlAttrXmlnsThm15(_value);
|
|
function ReadXmlAttrName();
|
|
function WriteXmlAttrName(_value);
|
|
function ReadXmlAttrId();
|
|
function WriteXmlAttrId(_value);
|
|
function ReadXmlAttrVid();
|
|
function WriteXmlAttrVid(_value);
|
|
|
|
public
|
|
// Attributes
|
|
XmlAttrXmlnsThm15: OpenXmlAttribute;
|
|
XmlAttrName: OpenXmlAttribute;
|
|
XmlAttrId: OpenXmlAttribute;
|
|
XmlAttrVid: OpenXmlAttribute;
|
|
|
|
|
|
end;
|
|
|
|
function ThemeFamily.Create();overload;
|
|
begin
|
|
{self.}Create(nil, "thm15", "themeFamily");
|
|
end;
|
|
|
|
function ThemeFamily.Create(_node: XmlNode);overload;
|
|
begin
|
|
class(OpenXmlElement).Create(_node: XmlNode);
|
|
end;
|
|
|
|
function ThemeFamily.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 ThemeFamily.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
"xmlns:thm15": makeweakref(thisFunction(WriteXmlAttrXmlnsThm15)),
|
|
"name": makeweakref(thisFunction(WriteXmlAttrName)),
|
|
"Id": makeweakref(thisFunction(WriteXmlAttrId)),
|
|
"vid": makeweakref(thisFunction(WriteXmlAttrVid)),
|
|
);
|
|
sorted_child_ := array(
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function ThemeFamily.Copy(_obj: ThemeFamily);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
class(OpenXmlElement).Copy(_obj);
|
|
if not ifnil(_obj.XmlnsThm15) then
|
|
{self.}XmlnsThm15 := _obj.XmlnsThm15;
|
|
if not ifnil(_obj.Name) then
|
|
{self.}Name := _obj.Name;
|
|
if not ifnil(_obj.Id) then
|
|
{self.}Id := _obj.Id;
|
|
if not ifnil(_obj.Vid) then
|
|
{self.}Vid := _obj.Vid;
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function ThemeFamily.ReadXmlAttrXmlnsThm15();
|
|
begin
|
|
return {self.}XmlAttrXmlnsThm15.Value;
|
|
end;
|
|
|
|
function ThemeFamily.WriteXmlAttrXmlnsThm15(_value);
|
|
begin
|
|
if ifnil({self.}XmlAttrXmlnsThm15) then
|
|
begin
|
|
{self.}XmlAttrXmlnsThm15 := new OpenXmlAttribute("xmlns", "thm15", nil);
|
|
attributes_[length(attributes_)] := {self.}XmlAttrXmlnsThm15;
|
|
end
|
|
{self.}XmlAttrXmlnsThm15.Value := _value;
|
|
end;
|
|
|
|
function ThemeFamily.ReadXmlAttrName();
|
|
begin
|
|
return {self.}XmlAttrName.Value;
|
|
end;
|
|
|
|
function ThemeFamily.WriteXmlAttrName(_value);
|
|
begin
|
|
if ifnil({self.}XmlAttrName) then
|
|
begin
|
|
{self.}XmlAttrName := new OpenXmlAttribute("", "name", nil);
|
|
attributes_[length(attributes_)] := {self.}XmlAttrName;
|
|
end
|
|
{self.}XmlAttrName.Value := _value;
|
|
end;
|
|
|
|
function ThemeFamily.ReadXmlAttrId();
|
|
begin
|
|
return {self.}XmlAttrId.Value;
|
|
end;
|
|
|
|
function ThemeFamily.WriteXmlAttrId(_value);
|
|
begin
|
|
if ifnil({self.}XmlAttrId) then
|
|
begin
|
|
{self.}XmlAttrId := new OpenXmlAttribute("", "Id", nil);
|
|
attributes_[length(attributes_)] := {self.}XmlAttrId;
|
|
end
|
|
{self.}XmlAttrId.Value := _value;
|
|
end;
|
|
|
|
function ThemeFamily.ReadXmlAttrVid();
|
|
begin
|
|
return {self.}XmlAttrVid.Value;
|
|
end;
|
|
|
|
function ThemeFamily.WriteXmlAttrVid(_value);
|
|
begin
|
|
if ifnil({self.}XmlAttrVid) then
|
|
begin
|
|
{self.}XmlAttrVid := new OpenXmlAttribute("", "vid", nil);
|
|
attributes_[length(attributes_)] := {self.}XmlAttrVid;
|
|
end
|
|
{self.}XmlAttrVid.Value := _value;
|
|
end;
|