OfficeXml/autoclass/docx/GradFill@DOCX.tsf

110 lines
3.1 KiB
Plaintext

type GradFill = 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: GradFill);override;
public
// attributes property
property RotWithShape read ReadXmlAttrRotWithShape write WriteXmlAttrRotWithShape;
function ReadXmlAttrRotWithShape();
function WriteXmlAttrRotWithShape(_value);
// normal property
property GsLst read ReadXmlChildGsLst;
property Lin read ReadXmlChildLin;
function ReadXmlChildGsLst();
function ReadXmlChildLin();
public
// Attributes
XmlAttrRotWithShape: OpenXmlAttribute;
// Children
XmlChildGsLst: GsLst;
XmlChildLin: Lin;
end;
function GradFill.Create();overload;
begin
{self.}Create(nil, "a", "gradFill");
end;
function GradFill.Create(_node: XmlNode);overload;
begin
class(OpenXmlElement).Create(_node: XmlNode);
end;
function GradFill.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 GradFill.Init();override;
begin
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
attributes_ := array();
attributes_pf_ := array(
"rotWithShape": makeweakref(thisFunction(WriteXmlAttrRotWithShape)),
);
sorted_child_ := array(
pre + "gsLst": array(0, makeweakref(thisFunction(ReadXmlChildGsLst))),
pre + "lin": array(1, makeweakref(thisFunction(ReadXmlChildLin))),
);
container_ := new TSOfficeContainer(sorted_child_);
end;
function GradFill.Copy(_obj: GradFill);override;
begin
tslassigning_backup := tslassigning;
tslassigning := 1;
class(OpenXmlElement).Copy(_obj);
if not ifnil(_obj.RotWithShape) then
{self.}RotWithShape := _obj.RotWithShape;
if not ifnil(_obj.XmlChildGsLst) then
{self.}GsLst.Copy(_obj.XmlChildGsLst);
if not ifnil(_obj.XmlChildLin) then
{self.}Lin.Copy(_obj.XmlChildLin);
tslassigning := tslassigning_backup;
end;
function GradFill.ReadXmlAttrRotWithShape();
begin
return {self.}XmlAttrRotWithShape.Value;
end;
function GradFill.WriteXmlAttrRotWithShape(_value);
begin
if ifnil({self.}XmlAttrRotWithShape) then
begin
{self.}XmlAttrRotWithShape := new OpenXmlAttribute("", "rotWithShape", nil);
attributes_[length(attributes_)] := {self.}XmlAttrRotWithShape;
end
{self.}XmlAttrRotWithShape.Value := _value;
end;
function GradFill.ReadXmlChildGsLst();
begin
if tslassigning and ifnil({self.}XmlChildGsLst) then
begin
{self.}XmlChildGsLst := new GsLst(self, {self.}Prefix, "gsLst");
container_.Set({self.}XmlChildGsLst);
end
return {self.}XmlChildGsLst;
end;
function GradFill.ReadXmlChildLin();
begin
if tslassigning and ifnil({self.}XmlChildLin) then
begin
{self.}XmlChildLin := new Lin(self, {self.}Prefix, "lin");
container_.Set({self.}XmlChildLin);
end
return {self.}XmlChildLin;
end;