182 lines
5.3 KiB
Plaintext
182 lines
5.3 KiB
Plaintext
type OuterShdw = 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: OuterShdw);override;
|
|
|
|
public
|
|
|
|
// attributes property
|
|
property BlurRad read ReadXmlAttrBlurRad write WriteXmlAttrBlurRad;
|
|
property Dist read ReadXmlAttrDist write WriteXmlAttrDist;
|
|
property Dir read ReadXmlAttrDir write WriteXmlAttrDir;
|
|
property Algn read ReadXmlAttrAlgn write WriteXmlAttrAlgn;
|
|
property RotWithShape read ReadXmlAttrRotWithShape write WriteXmlAttrRotWithShape;
|
|
function ReadXmlAttrBlurRad();
|
|
function WriteXmlAttrBlurRad(_value);
|
|
function ReadXmlAttrDist();
|
|
function WriteXmlAttrDist(_value);
|
|
function ReadXmlAttrDir();
|
|
function WriteXmlAttrDir(_value);
|
|
function ReadXmlAttrAlgn();
|
|
function WriteXmlAttrAlgn(_value);
|
|
function ReadXmlAttrRotWithShape();
|
|
function WriteXmlAttrRotWithShape(_value);
|
|
|
|
// normal property
|
|
property SrgbClr read ReadXmlChildSrgbClr;
|
|
function ReadXmlChildSrgbClr();
|
|
|
|
public
|
|
// Attributes
|
|
XmlAttrBlurRad: OpenXmlAttribute;
|
|
XmlAttrDist: OpenXmlAttribute;
|
|
XmlAttrDir: OpenXmlAttribute;
|
|
XmlAttrAlgn: OpenXmlAttribute;
|
|
XmlAttrRotWithShape: OpenXmlAttribute;
|
|
|
|
// Children
|
|
XmlChildSrgbClr: SrgbClr;
|
|
|
|
end;
|
|
|
|
function OuterShdw.Create();overload;
|
|
begin
|
|
{self.}Create(nil, "a", "outerShdw");
|
|
end;
|
|
|
|
function OuterShdw.Create(_node: XmlNode);overload;
|
|
begin
|
|
class(OpenXmlElement).Create(_node: XmlNode);
|
|
end;
|
|
|
|
function OuterShdw.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 OuterShdw.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
"blurRad": makeweakref(thisFunction(WriteXmlAttrBlurRad)),
|
|
"dist": makeweakref(thisFunction(WriteXmlAttrDist)),
|
|
"dir": makeweakref(thisFunction(WriteXmlAttrDir)),
|
|
"algn": makeweakref(thisFunction(WriteXmlAttrAlgn)),
|
|
"rotWithShape": makeweakref(thisFunction(WriteXmlAttrRotWithShape)),
|
|
);
|
|
sorted_child_ := array(
|
|
pre + "srgbClr": array(0, makeweakref(thisFunction(ReadXmlChildSrgbClr))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function OuterShdw.Copy(_obj: OuterShdw);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
class(OpenXmlElement).Copy(_obj);
|
|
if not ifnil(_obj.BlurRad) then
|
|
{self.}BlurRad := _obj.BlurRad;
|
|
if not ifnil(_obj.Dist) then
|
|
{self.}Dist := _obj.Dist;
|
|
if not ifnil(_obj.Dir) then
|
|
{self.}Dir := _obj.Dir;
|
|
if not ifnil(_obj.Algn) then
|
|
{self.}Algn := _obj.Algn;
|
|
if not ifnil(_obj.RotWithShape) then
|
|
{self.}RotWithShape := _obj.RotWithShape;
|
|
if not ifnil(_obj.XmlChildSrgbClr) then
|
|
{self.}SrgbClr.Copy(_obj.XmlChildSrgbClr);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function OuterShdw.ReadXmlAttrBlurRad();
|
|
begin
|
|
return {self.}XmlAttrBlurRad.Value;
|
|
end;
|
|
|
|
function OuterShdw.WriteXmlAttrBlurRad(_value);
|
|
begin
|
|
if ifnil({self.}XmlAttrBlurRad) then
|
|
begin
|
|
{self.}XmlAttrBlurRad := new OpenXmlAttribute("", "blurRad", nil);
|
|
attributes_[length(attributes_)] := {self.}XmlAttrBlurRad;
|
|
end
|
|
{self.}XmlAttrBlurRad.Value := _value;
|
|
end;
|
|
|
|
function OuterShdw.ReadXmlAttrDist();
|
|
begin
|
|
return {self.}XmlAttrDist.Value;
|
|
end;
|
|
|
|
function OuterShdw.WriteXmlAttrDist(_value);
|
|
begin
|
|
if ifnil({self.}XmlAttrDist) then
|
|
begin
|
|
{self.}XmlAttrDist := new OpenXmlAttribute("", "dist", nil);
|
|
attributes_[length(attributes_)] := {self.}XmlAttrDist;
|
|
end
|
|
{self.}XmlAttrDist.Value := _value;
|
|
end;
|
|
|
|
function OuterShdw.ReadXmlAttrDir();
|
|
begin
|
|
return {self.}XmlAttrDir.Value;
|
|
end;
|
|
|
|
function OuterShdw.WriteXmlAttrDir(_value);
|
|
begin
|
|
if ifnil({self.}XmlAttrDir) then
|
|
begin
|
|
{self.}XmlAttrDir := new OpenXmlAttribute("", "dir", nil);
|
|
attributes_[length(attributes_)] := {self.}XmlAttrDir;
|
|
end
|
|
{self.}XmlAttrDir.Value := _value;
|
|
end;
|
|
|
|
function OuterShdw.ReadXmlAttrAlgn();
|
|
begin
|
|
return {self.}XmlAttrAlgn.Value;
|
|
end;
|
|
|
|
function OuterShdw.WriteXmlAttrAlgn(_value);
|
|
begin
|
|
if ifnil({self.}XmlAttrAlgn) then
|
|
begin
|
|
{self.}XmlAttrAlgn := new OpenXmlAttribute("", "algn", nil);
|
|
attributes_[length(attributes_)] := {self.}XmlAttrAlgn;
|
|
end
|
|
{self.}XmlAttrAlgn.Value := _value;
|
|
end;
|
|
|
|
function OuterShdw.ReadXmlAttrRotWithShape();
|
|
begin
|
|
return {self.}XmlAttrRotWithShape.Value;
|
|
end;
|
|
|
|
function OuterShdw.WriteXmlAttrRotWithShape(_value);
|
|
begin
|
|
if ifnil({self.}XmlAttrRotWithShape) then
|
|
begin
|
|
{self.}XmlAttrRotWithShape := new OpenXmlAttribute("", "rotWithShape", nil);
|
|
attributes_[length(attributes_)] := {self.}XmlAttrRotWithShape;
|
|
end
|
|
{self.}XmlAttrRotWithShape.Value := _value;
|
|
end;
|
|
|
|
function OuterShdw.ReadXmlChildSrgbClr();
|
|
begin
|
|
if tslassigning and ifnil({self.}XmlChildSrgbClr) then
|
|
begin
|
|
{self.}XmlChildSrgbClr := new SrgbClr(self, {self.}Prefix, "srgbClr");
|
|
container_.Set({self.}XmlChildSrgbClr);
|
|
end
|
|
return {self.}XmlChildSrgbClr;
|
|
end;
|