OfficeXml/autoclass/docx/Ind@DOCX.tsf

229 lines
7.2 KiB
Plaintext

type Ind = 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: Ind);override;
public
// attributes property
property FirstLineChars read ReadXmlAttrFirstLineChars write WriteXmlAttrFirstLineChars;
property FirstLine read ReadXmlAttrFirstLine write WriteXmlAttrFirstLine;
property RightChars read ReadXmlAttrRightChars write WriteXmlAttrRightChars;
property Right read ReadXmlAttrRight write WriteXmlAttrRight;
property LeftChars read ReadXmlAttrLeftChars write WriteXmlAttrLeftChars;
property Left read ReadXmlAttrLeft write WriteXmlAttrLeft;
property Hanging read ReadXmlAttrHanging write WriteXmlAttrHanging;
property HangingChars read ReadXmlAttrHangingChars write WriteXmlAttrHangingChars;
function ReadXmlAttrFirstLineChars();
function WriteXmlAttrFirstLineChars(_value);
function ReadXmlAttrFirstLine();
function WriteXmlAttrFirstLine(_value);
function ReadXmlAttrRightChars();
function WriteXmlAttrRightChars(_value);
function ReadXmlAttrRight();
function WriteXmlAttrRight(_value);
function ReadXmlAttrLeftChars();
function WriteXmlAttrLeftChars(_value);
function ReadXmlAttrLeft();
function WriteXmlAttrLeft(_value);
function ReadXmlAttrHanging();
function WriteXmlAttrHanging(_value);
function ReadXmlAttrHangingChars();
function WriteXmlAttrHangingChars(_value);
public
// Attributes
XmlAttrFirstLineChars: OpenXmlAttribute;
XmlAttrFirstLine: OpenXmlAttribute;
XmlAttrRightChars: OpenXmlAttribute;
XmlAttrRight: OpenXmlAttribute;
XmlAttrLeftChars: OpenXmlAttribute;
XmlAttrLeft: OpenXmlAttribute;
XmlAttrHanging: OpenXmlAttribute;
XmlAttrHangingChars: OpenXmlAttribute;
end;
function Ind.Create();overload;
begin
{self.}Create(nil, "w", "ind");
end;
function Ind.Create(_node: XmlNode);overload;
begin
class(OpenXmlElement).Create(_node: XmlNode);
end;
function Ind.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 Ind.Init();override;
begin
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
attributes_ := array();
attributes_pf_ := array(
pre + "firstLineChars": makeweakref(thisFunction(WriteXmlAttrFirstLineChars)),
pre + "firstLine": makeweakref(thisFunction(WriteXmlAttrFirstLine)),
pre + "rightChars": makeweakref(thisFunction(WriteXmlAttrRightChars)),
pre + "right": makeweakref(thisFunction(WriteXmlAttrRight)),
pre + "leftChars": makeweakref(thisFunction(WriteXmlAttrLeftChars)),
pre + "left": makeweakref(thisFunction(WriteXmlAttrLeft)),
pre + "hainging": makeweakref(thisFunction(WriteXmlAttrHanging)),
pre + "hangingChars": makeweakref(thisFunction(WriteXmlAttrHangingChars)),
);
sorted_child_ := array(
);
container_ := new TSOfficeContainer(sorted_child_);
end;
function Ind.Copy(_obj: Ind);override;
begin
tslassigning_backup := tslassigning;
tslassigning := 1;
class(OpenXmlElement).Copy(_obj);
if not ifnil(_obj.FirstLineChars) then
{self.}FirstLineChars := _obj.FirstLineChars;
if not ifnil(_obj.FirstLine) then
{self.}FirstLine := _obj.FirstLine;
if not ifnil(_obj.RightChars) then
{self.}RightChars := _obj.RightChars;
if not ifnil(_obj.Right) then
{self.}Right := _obj.Right;
if not ifnil(_obj.LeftChars) then
{self.}LeftChars := _obj.LeftChars;
if not ifnil(_obj.Left) then
{self.}Left := _obj.Left;
if not ifnil(_obj.Hanging) then
{self.}Hanging := _obj.Hanging;
if not ifnil(_obj.HangingChars) then
{self.}HangingChars := _obj.HangingChars;
tslassigning := tslassigning_backup;
end;
function Ind.ReadXmlAttrFirstLineChars();
begin
return {self.}XmlAttrFirstLineChars.Value;
end;
function Ind.WriteXmlAttrFirstLineChars(_value);
begin
if ifnil({self.}XmlAttrFirstLineChars) then
begin
{self.}XmlAttrFirstLineChars := new OpenXmlAttribute({self.}Prefix, "firstLineChars", nil);
attributes_[length(attributes_)] := {self.}XmlAttrFirstLineChars;
end
{self.}XmlAttrFirstLineChars.Value := _value;
end;
function Ind.ReadXmlAttrFirstLine();
begin
return {self.}XmlAttrFirstLine.Value;
end;
function Ind.WriteXmlAttrFirstLine(_value);
begin
if ifnil({self.}XmlAttrFirstLine) then
begin
{self.}XmlAttrFirstLine := new OpenXmlAttribute({self.}Prefix, "firstLine", nil);
attributes_[length(attributes_)] := {self.}XmlAttrFirstLine;
end
{self.}XmlAttrFirstLine.Value := _value;
end;
function Ind.ReadXmlAttrRightChars();
begin
return {self.}XmlAttrRightChars.Value;
end;
function Ind.WriteXmlAttrRightChars(_value);
begin
if ifnil({self.}XmlAttrRightChars) then
begin
{self.}XmlAttrRightChars := new OpenXmlAttribute({self.}Prefix, "rightChars", nil);
attributes_[length(attributes_)] := {self.}XmlAttrRightChars;
end
{self.}XmlAttrRightChars.Value := _value;
end;
function Ind.ReadXmlAttrRight();
begin
return {self.}XmlAttrRight.Value;
end;
function Ind.WriteXmlAttrRight(_value);
begin
if ifnil({self.}XmlAttrRight) then
begin
{self.}XmlAttrRight := new OpenXmlAttribute({self.}Prefix, "right", nil);
attributes_[length(attributes_)] := {self.}XmlAttrRight;
end
{self.}XmlAttrRight.Value := _value;
end;
function Ind.ReadXmlAttrLeftChars();
begin
return {self.}XmlAttrLeftChars.Value;
end;
function Ind.WriteXmlAttrLeftChars(_value);
begin
if ifnil({self.}XmlAttrLeftChars) then
begin
{self.}XmlAttrLeftChars := new OpenXmlAttribute({self.}Prefix, "leftChars", nil);
attributes_[length(attributes_)] := {self.}XmlAttrLeftChars;
end
{self.}XmlAttrLeftChars.Value := _value;
end;
function Ind.ReadXmlAttrLeft();
begin
return {self.}XmlAttrLeft.Value;
end;
function Ind.WriteXmlAttrLeft(_value);
begin
if ifnil({self.}XmlAttrLeft) then
begin
{self.}XmlAttrLeft := new OpenXmlAttribute({self.}Prefix, "left", nil);
attributes_[length(attributes_)] := {self.}XmlAttrLeft;
end
{self.}XmlAttrLeft.Value := _value;
end;
function Ind.ReadXmlAttrHanging();
begin
return {self.}XmlAttrHanging.Value;
end;
function Ind.WriteXmlAttrHanging(_value);
begin
if ifnil({self.}XmlAttrHanging) then
begin
{self.}XmlAttrHanging := new OpenXmlAttribute({self.}Prefix, "hainging", nil);
attributes_[length(attributes_)] := {self.}XmlAttrHanging;
end
{self.}XmlAttrHanging.Value := _value;
end;
function Ind.ReadXmlAttrHangingChars();
begin
return {self.}XmlAttrHangingChars.Value;
end;
function Ind.WriteXmlAttrHangingChars(_value);
begin
if ifnil({self.}XmlAttrHangingChars) then
begin
{self.}XmlAttrHangingChars := new OpenXmlAttribute({self.}Prefix, "hangingChars", nil);
attributes_[length(attributes_)] := {self.}XmlAttrHangingChars;
end
{self.}XmlAttrHangingChars.Value := _value;
end;