84 lines
2.2 KiB
Plaintext
84 lines
2.2 KiB
Plaintext
type Xfrm = 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: Xfrm);override;
|
|
|
|
public
|
|
|
|
// normal property
|
|
property Off read ReadXmlChildOff;
|
|
property Ext read ReadXmlChildExt;
|
|
function ReadXmlChildOff();
|
|
function ReadXmlChildExt();
|
|
|
|
public
|
|
// Children
|
|
XmlChildOff: XY;
|
|
XmlChildExt: CXY;
|
|
|
|
end;
|
|
|
|
function Xfrm.Create();overload;
|
|
begin
|
|
{self.}Create(nil, "a", "xfrm");
|
|
end;
|
|
|
|
function Xfrm.Create(_node: XmlNode);overload;
|
|
begin
|
|
class(OpenXmlElement).Create(_node: XmlNode);
|
|
end;
|
|
|
|
function Xfrm.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 Xfrm.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
pre + "off": array(0, makeweakref(thisFunction(ReadXmlChildOff))),
|
|
pre + "ext": array(1, makeweakref(thisFunction(ReadXmlChildExt))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function Xfrm.Copy(_obj: Xfrm);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
class(OpenXmlElement).Copy(_obj);
|
|
if not ifnil(_obj.XmlChildOff) then
|
|
{self.}Off.Copy(_obj.XmlChildOff);
|
|
if not ifnil(_obj.XmlChildExt) then
|
|
{self.}Ext.Copy(_obj.XmlChildExt);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function Xfrm.ReadXmlChildOff();
|
|
begin
|
|
if tslassigning and ifnil({self.}XmlChildOff) then
|
|
begin
|
|
{self.}XmlChildOff := new XY(self, {self.}Prefix, "off");
|
|
container_.Set({self.}XmlChildOff);
|
|
end
|
|
return {self.}XmlChildOff;
|
|
end;
|
|
|
|
function Xfrm.ReadXmlChildExt();
|
|
begin
|
|
if tslassigning and ifnil({self.}XmlChildExt) then
|
|
begin
|
|
{self.}XmlChildExt := new CXY(self, {self.}Prefix, "ext");
|
|
container_.Set({self.}XmlChildExt);
|
|
end
|
|
return {self.}XmlChildExt;
|
|
end;
|