84 lines
2.2 KiB
Plaintext
84 lines
2.2 KiB
Plaintext
type PBdr = 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: PBdr);override;
|
|
|
|
public
|
|
|
|
// normal property
|
|
property Top read ReadXmlChildTop;
|
|
property Bottom read ReadXmlChildBottom;
|
|
function ReadXmlChildTop();
|
|
function ReadXmlChildBottom();
|
|
|
|
public
|
|
// Children
|
|
XmlChildTop: PBorder;
|
|
XmlChildBottom: PBorder;
|
|
|
|
end;
|
|
|
|
function PBdr.Create();overload;
|
|
begin
|
|
{self.}Create(nil, "w", "pBdr");
|
|
end;
|
|
|
|
function PBdr.Create(_node: XmlNode);overload;
|
|
begin
|
|
class(OpenXmlElement).Create(_node: XmlNode);
|
|
end;
|
|
|
|
function PBdr.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 PBdr.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
pre + "top": array(0, makeweakref(thisFunction(ReadXmlChildTop))),
|
|
pre + "bottom": array(1, makeweakref(thisFunction(ReadXmlChildBottom))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function PBdr.Copy(_obj: PBdr);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
class(OpenXmlElement).Copy(_obj);
|
|
if not ifnil(_obj.XmlChildTop) then
|
|
{self.}Top.Copy(_obj.XmlChildTop);
|
|
if not ifnil(_obj.XmlChildBottom) then
|
|
{self.}Bottom.Copy(_obj.XmlChildBottom);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function PBdr.ReadXmlChildTop();
|
|
begin
|
|
if tslassigning and ifnil({self.}XmlChildTop) then
|
|
begin
|
|
{self.}XmlChildTop := new PBorder(self, {self.}Prefix, "top");
|
|
container_.Set({self.}XmlChildTop);
|
|
end
|
|
return {self.}XmlChildTop;
|
|
end;
|
|
|
|
function PBdr.ReadXmlChildBottom();
|
|
begin
|
|
if tslassigning and ifnil({self.}XmlChildBottom) then
|
|
begin
|
|
{self.}XmlChildBottom := new PBorder(self, {self.}Prefix, "bottom");
|
|
container_.Set({self.}XmlChildBottom);
|
|
end
|
|
return {self.}XmlChildBottom;
|
|
end;
|