116 lines
3.4 KiB
Plaintext
116 lines
3.4 KiB
Plaintext
type WpsStyle = 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: WpsStyle);override;
|
|
|
|
public
|
|
|
|
// normal property
|
|
property LnRef read ReadXmlChildLnRef;
|
|
property FillRef read ReadXmlChildFillRef;
|
|
property EffectRef read ReadXmlChildEffectRef;
|
|
property FontRef read ReadXmlChildFontRef;
|
|
function ReadXmlChildLnRef();
|
|
function ReadXmlChildFillRef();
|
|
function ReadXmlChildEffectRef();
|
|
function ReadXmlChildFontRef();
|
|
|
|
public
|
|
// Children
|
|
XmlChildLnRef: XRef;
|
|
XmlChildFillRef: XRef;
|
|
XmlChildEffectRef: XRef;
|
|
XmlChildFontRef: XRef;
|
|
|
|
end;
|
|
|
|
function WpsStyle.Create();overload;
|
|
begin
|
|
{self.}Create(nil, "wps", "style");
|
|
end;
|
|
|
|
function WpsStyle.Create(_node: XmlNode);overload;
|
|
begin
|
|
class(OpenXmlElement).Create(_node: XmlNode);
|
|
end;
|
|
|
|
function WpsStyle.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 WpsStyle.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
"a:lnRef": array(0, makeweakref(thisFunction(ReadXmlChildLnRef))),
|
|
"a:fillRef": array(1, makeweakref(thisFunction(ReadXmlChildFillRef))),
|
|
"a:effectRef": array(2, makeweakref(thisFunction(ReadXmlChildEffectRef))),
|
|
"a:fontRef": array(3, makeweakref(thisFunction(ReadXmlChildFontRef))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function WpsStyle.Copy(_obj: WpsStyle);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
class(OpenXmlElement).Copy(_obj);
|
|
if not ifnil(_obj.XmlChildLnRef) then
|
|
{self.}LnRef.Copy(_obj.XmlChildLnRef);
|
|
if not ifnil(_obj.XmlChildFillRef) then
|
|
{self.}FillRef.Copy(_obj.XmlChildFillRef);
|
|
if not ifnil(_obj.XmlChildEffectRef) then
|
|
{self.}EffectRef.Copy(_obj.XmlChildEffectRef);
|
|
if not ifnil(_obj.XmlChildFontRef) then
|
|
{self.}FontRef.Copy(_obj.XmlChildFontRef);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function WpsStyle.ReadXmlChildLnRef();
|
|
begin
|
|
if tslassigning and ifnil({self.}XmlChildLnRef) then
|
|
begin
|
|
{self.}XmlChildLnRef := new XRef(self, "a", "lnRef");
|
|
container_.Set({self.}XmlChildLnRef);
|
|
end
|
|
return {self.}XmlChildLnRef;
|
|
end;
|
|
|
|
function WpsStyle.ReadXmlChildFillRef();
|
|
begin
|
|
if tslassigning and ifnil({self.}XmlChildFillRef) then
|
|
begin
|
|
{self.}XmlChildFillRef := new XRef(self, "a", "fillRef");
|
|
container_.Set({self.}XmlChildFillRef);
|
|
end
|
|
return {self.}XmlChildFillRef;
|
|
end;
|
|
|
|
function WpsStyle.ReadXmlChildEffectRef();
|
|
begin
|
|
if tslassigning and ifnil({self.}XmlChildEffectRef) then
|
|
begin
|
|
{self.}XmlChildEffectRef := new XRef(self, "a", "effectRef");
|
|
container_.Set({self.}XmlChildEffectRef);
|
|
end
|
|
return {self.}XmlChildEffectRef;
|
|
end;
|
|
|
|
function WpsStyle.ReadXmlChildFontRef();
|
|
begin
|
|
if tslassigning and ifnil({self.}XmlChildFontRef) then
|
|
begin
|
|
{self.}XmlChildFontRef := new XRef(self, "a", "fontRef");
|
|
container_.Set({self.}XmlChildFontRef);
|
|
end
|
|
return {self.}XmlChildFontRef;
|
|
end;
|