78 lines
1.8 KiB
Plaintext
78 lines
1.8 KiB
Plaintext
type Formulas = 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: Formulas);override;
|
|
|
|
public
|
|
|
|
// multi property
|
|
property Fs read ReadFs;
|
|
function ReadFs(_index);
|
|
function AddF(): Shapetype;
|
|
function AppendF(): Shapetype;
|
|
|
|
public
|
|
// Children
|
|
|
|
end;
|
|
|
|
function Formulas.Create();overload;
|
|
begin
|
|
{self.}Create(nil, "w", "formulas");
|
|
end;
|
|
|
|
function Formulas.Create(_node: XmlNode);overload;
|
|
begin
|
|
class(OpenXmlElement).Create(_node: XmlNode);
|
|
end;
|
|
|
|
function Formulas.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 Formulas.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
"v:f": array(0, makeweakref(thisFunction(AppendF))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function Formulas.Copy(_obj: Formulas);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
class(OpenXmlElement).Copy(_obj);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function Formulas.ReadFs(_index);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get("v:f", ind);
|
|
end;
|
|
|
|
function Formulas.AddF(): Shapetype;
|
|
begin
|
|
obj := new Shapetype(self, "v", "f");
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function Formulas.AppendF(): Shapetype;
|
|
begin
|
|
obj := new Shapetype(self, "v", "f");
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|