OfficeXml/autoclass/docx/Shd@DOCX.tsf

154 lines
4.1 KiB
Plaintext

type Shd = 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: Shd);override;
property Val read ReadXmlAttrVal write WriteXmlAttrVal;
property Color read ReadXmlAttrColor write WriteXmlAttrColor;
property Fill read ReadXmlAttrFill write WriteXmlAttrFill;
property ThemeFill read ReadXmlAttrThemeFill write WriteXmlAttrThemeFill;
property ThemeFillTint read ReadXmlAttrThemeFillTint write WriteXmlAttrThemeFillTint;
function ReadXmlAttrVal();
function WriteXmlAttrVal(_value);
function ReadXmlAttrColor();
function WriteXmlAttrColor(_value);
function ReadXmlAttrFill();
function WriteXmlAttrFill(_value);
function ReadXmlAttrThemeFill();
function WriteXmlAttrThemeFill(_value);
function ReadXmlAttrThemeFillTint();
function WriteXmlAttrThemeFillTint(_value);
public
// Attributes
XmlAttrVal: OpenXmlAttribute;
XmlAttrColor: OpenXmlAttribute;
XmlAttrFill: OpenXmlAttribute;
XmlAttrThemeFill: OpenXmlAttribute;
XmlAttrThemeFillTint: OpenXmlAttribute;
// Children
end;
function Shd.Create();overload;
begin
{self.}Create(nil, "w", "shd");
end;
function Shd.Create(_node: XmlNode);overload;
begin
class(OpenXmlElement).Create(_node: XmlNode);
end;
function Shd.Create(_parent: tslobj; _prefix: string; _local_name: string);overload;
begin
class(OpenXmlElement).Create(_parent, _prefix, _local_name);
end;
function Shd.Init();override;
begin
{self.}XmlAttrVal := new OpenXmlAttribute("w", "val", nil);
{self.}XmlAttrColor := new OpenXmlAttribute("w", "color", nil);
{self.}XmlAttrFill := new OpenXmlAttribute("w", "fill", nil);
{self.}XmlAttrThemeFill := new OpenXmlAttribute("w", "themeFill", nil);
{self.}XmlAttrThemeFillTint := new OpenXmlAttribute("w", "themeFillTint", nil);
end;
function Shd.InitAttributes();override;
begin
attributes_ := array(
{self.}XmlAttrVal,
{self.}XmlAttrColor,
{self.}XmlAttrFill,
{self.}XmlAttrThemeFill,
{self.}XmlAttrThemeFillTint,
);
end;
function Shd.InitChildren();override;
begin
child_elements_ := array(
);
sorted_child_ := array(
"": -1,
);
end;
function Shd.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 Shd.Copy(_obj: Shd);override;
begin
if not ifnil(_obj.XmlAttrVal.Value) then
{self.}XmlAttrVal.Value := _obj.XmlAttrVal.Value;
if not ifnil(_obj.XmlAttrColor.Value) then
{self.}XmlAttrColor.Value := _obj.XmlAttrColor.Value;
if not ifnil(_obj.XmlAttrFill.Value) then
{self.}XmlAttrFill.Value := _obj.XmlAttrFill.Value;
if not ifnil(_obj.XmlAttrThemeFill.Value) then
{self.}XmlAttrThemeFill.Value := _obj.XmlAttrThemeFill.Value;
if not ifnil(_obj.XmlAttrThemeFillTint.Value) then
{self.}XmlAttrThemeFillTint.Value := _obj.XmlAttrThemeFillTint.Value;
end;
function Shd.ReadXmlAttrVal();
begin
return {self.}XmlAttrVal.Value;
end;
function Shd.WriteXmlAttrVal(_value);
begin
{self.}XmlAttrVal.Value := _value;
end;
function Shd.ReadXmlAttrColor();
begin
return {self.}XmlAttrColor.Value;
end;
function Shd.WriteXmlAttrColor(_value);
begin
{self.}XmlAttrColor.Value := _value;
end;
function Shd.ReadXmlAttrFill();
begin
return {self.}XmlAttrFill.Value;
end;
function Shd.WriteXmlAttrFill(_value);
begin
{self.}XmlAttrFill.Value := _value;
end;
function Shd.ReadXmlAttrThemeFill();
begin
return {self.}XmlAttrThemeFill.Value;
end;
function Shd.WriteXmlAttrThemeFill(_value);
begin
{self.}XmlAttrThemeFill.Value := _value;
end;
function Shd.ReadXmlAttrThemeFillTint();
begin
return {self.}XmlAttrThemeFillTint.Value;
end;
function Shd.WriteXmlAttrThemeFillTint(_value);
begin
{self.}XmlAttrThemeFillTint.Value := _value;
end;