84 lines
2.5 KiB
Plaintext
84 lines
2.5 KiB
Plaintext
type DocDefaults = 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: DocDefaults);override;
|
|
|
|
public
|
|
|
|
// normal property
|
|
property RPrDefault read ReadXmlChildRPrDefault;
|
|
property PPrDefault read ReadXmlChildPPrDefault;
|
|
function ReadXmlChildRPrDefault();
|
|
function ReadXmlChildPPrDefault();
|
|
|
|
public
|
|
// Children
|
|
XmlChildRPrDefault: RPrDefault;
|
|
XmlChildPPrDefault: PPrDefault;
|
|
|
|
end;
|
|
|
|
function DocDefaults.Create();overload;
|
|
begin
|
|
{self.}Create(nil, "w", "docDefaults");
|
|
end;
|
|
|
|
function DocDefaults.Create(_node: XmlNode);overload;
|
|
begin
|
|
class(OpenXmlElement).Create(_node: XmlNode);
|
|
end;
|
|
|
|
function DocDefaults.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 DocDefaults.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
pre + "rPrDefault": array(0, makeweakref(thisFunction(ReadXmlChildRPrDefault))),
|
|
pre + "pPrDefault": array(1, makeweakref(thisFunction(ReadXmlChildPPrDefault))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function DocDefaults.Copy(_obj: DocDefaults);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
class(OpenXmlElement).Copy(_obj);
|
|
if not ifnil(_obj.XmlChildRPrDefault) then
|
|
{self.}RPrDefault.Copy(_obj.XmlChildRPrDefault);
|
|
if not ifnil(_obj.XmlChildPPrDefault) then
|
|
{self.}PPrDefault.Copy(_obj.XmlChildPPrDefault);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function DocDefaults.ReadXmlChildRPrDefault();
|
|
begin
|
|
if tslassigning and ifnil({self.}XmlChildRPrDefault) then
|
|
begin
|
|
{self.}XmlChildRPrDefault := new RPrDefault(self, {self.}Prefix, "rPrDefault");
|
|
container_.Set({self.}XmlChildRPrDefault);
|
|
end
|
|
return {self.}XmlChildRPrDefault;
|
|
end;
|
|
|
|
function DocDefaults.ReadXmlChildPPrDefault();
|
|
begin
|
|
if tslassigning and ifnil({self.}XmlChildPPrDefault) then
|
|
begin
|
|
{self.}XmlChildPPrDefault := new PPrDefault(self, {self.}Prefix, "pPrDefault");
|
|
container_.Set({self.}XmlChildPPrDefault);
|
|
end
|
|
return {self.}XmlChildPPrDefault;
|
|
end;
|