104 lines
2.8 KiB
Plaintext
104 lines
2.8 KiB
Plaintext
type FillStyleLst = 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: FillStyleLst);override;
|
|
|
|
public
|
|
|
|
// multi property
|
|
property SolidFills read ReadSolidFills;
|
|
property GradFills read ReadGradFills;
|
|
function ReadSolidFills(_index);
|
|
function ReadGradFills(_index);
|
|
function AddSolidFill(): SolidFill;
|
|
function AddGradFill(): GradFill;
|
|
function AppendSolidFill(): SolidFill;
|
|
function AppendGradFill(): GradFill;
|
|
|
|
public
|
|
// Children
|
|
|
|
end;
|
|
|
|
function FillStyleLst.Create();overload;
|
|
begin
|
|
{self.}Create(nil, "a", "fillStyleLst");
|
|
end;
|
|
|
|
function FillStyleLst.Create(_node: XmlNode);overload;
|
|
begin
|
|
class(OpenXmlElement).Create(_node: XmlNode);
|
|
end;
|
|
|
|
function FillStyleLst.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 FillStyleLst.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
pre + "solidFill": array(0, makeweakref(thisFunction(AppendSolidFill))),
|
|
pre + "gradFill": array(1, makeweakref(thisFunction(AppendGradFill))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function FillStyleLst.Copy(_obj: FillStyleLst);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
class(OpenXmlElement).Copy(_obj);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function FillStyleLst.ReadSolidFills(_index);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "solidFill", ind);
|
|
end;
|
|
|
|
function FillStyleLst.ReadGradFills(_index);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "gradFill", ind);
|
|
end;
|
|
|
|
function FillStyleLst.AddSolidFill(): SolidFill;
|
|
begin
|
|
obj := new SolidFill(self, {self.}Prefix, "solidFill");
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function FillStyleLst.AddGradFill(): GradFill;
|
|
begin
|
|
obj := new GradFill(self, {self.}Prefix, "gradFill");
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function FillStyleLst.AppendSolidFill(): SolidFill;
|
|
begin
|
|
obj := new SolidFill(self, {self.}Prefix, "solidFill");
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function FillStyleLst.AppendGradFill(): GradFill;
|
|
begin
|
|
obj := new GradFill(self, {self.}Prefix, "gradFill");
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|