OfficeXml/autoclass/docx/Ser@DOCX.tsf

180 lines
5.5 KiB
Plaintext

type Ser = 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: Ser);override;
public
// normal property
property Idx read ReadXmlChildIdx;
property Order read ReadXmlChildOrder;
property Tx read ReadXmlChildTx;
property InvertIfNegative read ReadXmlChildInvertIfNegative;
property DLbls read ReadXmlChildDLbls;
property Cat read ReadXmlChildCat;
property Val read ReadXmlChildVal;
property ExtLst read ReadXmlChildExtLst;
function ReadXmlChildIdx();
function ReadXmlChildOrder();
function ReadXmlChildTx();
function ReadXmlChildInvertIfNegative();
function ReadXmlChildDLbls();
function ReadXmlChildCat();
function ReadXmlChildVal();
function ReadXmlChildExtLst();
public
// Children
XmlChildIdx: PureVal;
XmlChildOrder: PureVal;
XmlChildTx: Tx;
XmlChildInvertIfNegative: PureVal;
XmlChildDLbls: DLbls;
XmlChildCat: Cat;
XmlChildVal: Val;
XmlChildExtLst: ExtLst;
end;
function Ser.Create();overload;
begin
{self.}Create(nil, "c", "ser");
end;
function Ser.Create(_node: XmlNode);overload;
begin
class(OpenXmlElement).Create(_node: XmlNode);
end;
function Ser.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 Ser.Init();override;
begin
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
attributes_ := array();
attributes_pf_ := array(
);
sorted_child_ := array(
pre + "idx": array(0, makeweakref(thisFunction(ReadXmlChildIdx))),
pre + "order": array(1, makeweakref(thisFunction(ReadXmlChildOrder))),
pre + "tx": array(2, makeweakref(thisFunction(ReadXmlChildTx))),
pre + "invertIfNegative": array(3, makeweakref(thisFunction(ReadXmlChildInvertIfNegative))),
pre + "dLbls": array(4, makeweakref(thisFunction(ReadXmlChildDLbls))),
pre + "cat": array(5, makeweakref(thisFunction(ReadXmlChildCat))),
pre + "val": array(6, makeweakref(thisFunction(ReadXmlChildVal))),
pre + "extLst": array(7, makeweakref(thisFunction(ReadXmlChildExtLst))),
);
container_ := new TSOfficeContainer(sorted_child_);
end;
function Ser.Copy(_obj: Ser);override;
begin
tslassigning_backup := tslassigning;
tslassigning := 1;
class(OpenXmlElement).Copy(_obj);
if not ifnil(_obj.XmlChildIdx) then
{self.}Idx.Copy(_obj.XmlChildIdx);
if not ifnil(_obj.XmlChildOrder) then
{self.}Order.Copy(_obj.XmlChildOrder);
if not ifnil(_obj.XmlChildTx) then
{self.}Tx.Copy(_obj.XmlChildTx);
if not ifnil(_obj.XmlChildInvertIfNegative) then
{self.}InvertIfNegative.Copy(_obj.XmlChildInvertIfNegative);
if not ifnil(_obj.XmlChildDLbls) then
{self.}DLbls.Copy(_obj.XmlChildDLbls);
if not ifnil(_obj.XmlChildCat) then
{self.}Cat.Copy(_obj.XmlChildCat);
if not ifnil(_obj.XmlChildVal) then
{self.}Val.Copy(_obj.XmlChildVal);
if not ifnil(_obj.XmlChildExtLst) then
{self.}ExtLst.Copy(_obj.XmlChildExtLst);
tslassigning := tslassigning_backup;
end;
function Ser.ReadXmlChildIdx();
begin
if tslassigning and ifnil({self.}XmlChildIdx) then
begin
{self.}XmlChildIdx := new PureVal(self, {self.}Prefix, "idx");
container_.Set({self.}XmlChildIdx);
end
return {self.}XmlChildIdx;
end;
function Ser.ReadXmlChildOrder();
begin
if tslassigning and ifnil({self.}XmlChildOrder) then
begin
{self.}XmlChildOrder := new PureVal(self, {self.}Prefix, "order");
container_.Set({self.}XmlChildOrder);
end
return {self.}XmlChildOrder;
end;
function Ser.ReadXmlChildTx();
begin
if tslassigning and ifnil({self.}XmlChildTx) then
begin
{self.}XmlChildTx := new Tx(self, {self.}Prefix, "tx");
container_.Set({self.}XmlChildTx);
end
return {self.}XmlChildTx;
end;
function Ser.ReadXmlChildInvertIfNegative();
begin
if tslassigning and ifnil({self.}XmlChildInvertIfNegative) then
begin
{self.}XmlChildInvertIfNegative := new PureVal(self, {self.}Prefix, "invertIfNegative");
container_.Set({self.}XmlChildInvertIfNegative);
end
return {self.}XmlChildInvertIfNegative;
end;
function Ser.ReadXmlChildDLbls();
begin
if tslassigning and ifnil({self.}XmlChildDLbls) then
begin
{self.}XmlChildDLbls := new DLbls(self, {self.}Prefix, "dLbls");
container_.Set({self.}XmlChildDLbls);
end
return {self.}XmlChildDLbls;
end;
function Ser.ReadXmlChildCat();
begin
if tslassigning and ifnil({self.}XmlChildCat) then
begin
{self.}XmlChildCat := new Cat(self, {self.}Prefix, "cat");
container_.Set({self.}XmlChildCat);
end
return {self.}XmlChildCat;
end;
function Ser.ReadXmlChildVal();
begin
if tslassigning and ifnil({self.}XmlChildVal) then
begin
{self.}XmlChildVal := new Val(self, {self.}Prefix, "val");
container_.Set({self.}XmlChildVal);
end
return {self.}XmlChildVal;
end;
function Ser.ReadXmlChildExtLst();
begin
if tslassigning and ifnil({self.}XmlChildExtLst) then
begin
{self.}XmlChildExtLst := new ExtLst(self, {self.}Prefix, "extLst");
container_.Set({self.}XmlChildExtLst);
end
return {self.}XmlChildExtLst;
end;