84 lines
2.3 KiB
Plaintext
84 lines
2.3 KiB
Plaintext
type BlipFill = 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: BlipFill);override;
|
|
|
|
public
|
|
|
|
// normal property
|
|
property Blip read ReadXmlChildBlip;
|
|
property Stretch read ReadXmlChildStretch;
|
|
function ReadXmlChildBlip();
|
|
function ReadXmlChildStretch();
|
|
|
|
public
|
|
// Children
|
|
XmlChildBlip: Blip;
|
|
XmlChildStretch: Stretch;
|
|
|
|
end;
|
|
|
|
function BlipFill.Create();overload;
|
|
begin
|
|
{self.}Create(nil, "pic", "blipFill");
|
|
end;
|
|
|
|
function BlipFill.Create(_node: XmlNode);overload;
|
|
begin
|
|
class(OpenXmlElement).Create(_node: XmlNode);
|
|
end;
|
|
|
|
function BlipFill.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 BlipFill.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
"a:blip": array(0, makeweakref(thisFunction(ReadXmlChildBlip))),
|
|
"a:stretch": array(1, makeweakref(thisFunction(ReadXmlChildStretch))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function BlipFill.Copy(_obj: BlipFill);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
class(OpenXmlElement).Copy(_obj);
|
|
if not ifnil(_obj.XmlChildBlip) then
|
|
{self.}Blip.Copy(_obj.XmlChildBlip);
|
|
if not ifnil(_obj.XmlChildStretch) then
|
|
{self.}Stretch.Copy(_obj.XmlChildStretch);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function BlipFill.ReadXmlChildBlip();
|
|
begin
|
|
if tslassigning and ifnil({self.}XmlChildBlip) then
|
|
begin
|
|
{self.}XmlChildBlip := new Blip(self, "a", "blip");
|
|
container_.Set({self.}XmlChildBlip);
|
|
end
|
|
return {self.}XmlChildBlip;
|
|
end;
|
|
|
|
function BlipFill.ReadXmlChildStretch();
|
|
begin
|
|
if tslassigning and ifnil({self.}XmlChildStretch) then
|
|
begin
|
|
{self.}XmlChildStretch := new Stretch(self, "a", "stretch");
|
|
container_.Set({self.}XmlChildStretch);
|
|
end
|
|
return {self.}XmlChildStretch;
|
|
end;
|