80 lines
2.4 KiB
Plaintext
80 lines
2.4 KiB
Plaintext
type Scaling = 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: Scaling);override;
|
|
|
|
public
|
|
|
|
// empty property
|
|
property Orientation read ReadXmlChildOrientation write WriteXmlChildOrientation;
|
|
function ReadXmlChildOrientation();
|
|
function WriteXmlChildOrientation(_value);
|
|
|
|
public
|
|
// Children
|
|
XmlChildOrientation: OpenXmlEmpty;
|
|
|
|
end;
|
|
|
|
function Scaling.Create();overload;
|
|
begin
|
|
{self.}Create(nil, "c", "scaling");
|
|
end;
|
|
|
|
function Scaling.Create(_node: XmlNode);overload;
|
|
begin
|
|
class(OpenXmlElement).Create(_node: XmlNode);
|
|
end;
|
|
|
|
function Scaling.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 Scaling.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
pre + "orientation": array(0, makeweakref(thisFunction(ReadXmlChildOrientation))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function Scaling.Copy(_obj: Scaling);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
class(OpenXmlElement).Copy(_obj);
|
|
if not ifnil(_obj.XmlChildOrientation) then
|
|
ifnil({self.}XmlChildOrientation) ? {self.}Orientation.Copy(_obj.XmlChildOrientation) : {self.}XmlChildOrientation.Copy(_obj.XmlChildOrientation);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function Scaling.ReadXmlChildOrientation();
|
|
begin
|
|
if tslassigning and ifnil({self.}XmlChildOrientation) then
|
|
begin
|
|
{self.}XmlChildOrientation := new OpenXmlEmpty(self, {self.}Prefix, "orientation");
|
|
container_.Set({self.}XmlChildOrientation);
|
|
return {self.}XmlChildOrientation;
|
|
end
|
|
return ifnil({self.}XmlChildOrientation) ? false : {self.}XmlChildOrientation.BoolValue();
|
|
end;
|
|
|
|
function Scaling.WriteXmlChildOrientation(_value);
|
|
begin
|
|
if ifnil({self.}XmlChildOrientation) then
|
|
begin
|
|
{self.}XmlChildOrientation := new OpenXmlEmpty(self, {self.}Prefix, "orientation");
|
|
container_.Set({self.}XmlChildOrientation);
|
|
end
|
|
{self.}XmlChildOrientation.Value := _value;
|
|
end;
|