OfficeXml/autoclass/docx/FldChar@DOCX.tsf

119 lines
3.4 KiB
Plaintext

type FldChar = 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: FldChar);override;
public
// attributes property
property FldCharType read ReadXmlAttrFldCharType write WriteXmlAttrFldCharType;
property FldLock read ReadXmlAttrFldLock write WriteXmlAttrFldLock;
property Dirty read ReadXmlAttrDirty write WriteXmlAttrDirty;
function ReadXmlAttrFldCharType();
function WriteXmlAttrFldCharType(_value);
function ReadXmlAttrFldLock();
function WriteXmlAttrFldLock(_value);
function ReadXmlAttrDirty();
function WriteXmlAttrDirty(_value);
public
// Attributes
XmlAttrFldCharType: OpenXmlAttribute;
XmlAttrFldLock: OpenXmlAttribute;
XmlAttrDirty: OpenXmlAttribute;
end;
function FldChar.Create();overload;
begin
{self.}Create(nil, "w", "fldChar");
end;
function FldChar.Create(_node: XmlNode);overload;
begin
class(OpenXmlElement).Create(_node: XmlNode);
end;
function FldChar.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 FldChar.Init();override;
begin
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
attributes_ := array();
attributes_pf_ := array(
pre + "fldCharType": makeweakref(thisFunction(WriteXmlAttrFldCharType)),
pre + "fldLock": makeweakref(thisFunction(WriteXmlAttrFldLock)),
pre + "dirty": makeweakref(thisFunction(WriteXmlAttrDirty)),
);
sorted_child_ := array(
);
container_ := new TSOfficeContainer(sorted_child_);
end;
function FldChar.Copy(_obj: FldChar);override;
begin
tslassigning_backup := tslassigning;
tslassigning := 1;
class(OpenXmlElement).Copy(_obj);
if not ifnil(_obj.FldCharType) then
{self.}FldCharType := _obj.FldCharType;
if not ifnil(_obj.FldLock) then
{self.}FldLock := _obj.FldLock;
if not ifnil(_obj.Dirty) then
{self.}Dirty := _obj.Dirty;
tslassigning := tslassigning_backup;
end;
function FldChar.ReadXmlAttrFldCharType();
begin
return {self.}XmlAttrFldCharType.Value;
end;
function FldChar.WriteXmlAttrFldCharType(_value);
begin
if ifnil({self.}XmlAttrFldCharType) then
begin
{self.}XmlAttrFldCharType := new OpenXmlAttribute({self.}Prefix, "fldCharType", nil);
attributes_[length(attributes_)] := {self.}XmlAttrFldCharType;
end
{self.}XmlAttrFldCharType.Value := _value;
end;
function FldChar.ReadXmlAttrFldLock();
begin
return {self.}XmlAttrFldLock.Value;
end;
function FldChar.WriteXmlAttrFldLock(_value);
begin
if ifnil({self.}XmlAttrFldLock) then
begin
{self.}XmlAttrFldLock := new OpenXmlAttribute({self.}Prefix, "fldLock", nil);
attributes_[length(attributes_)] := {self.}XmlAttrFldLock;
end
{self.}XmlAttrFldLock.Value := _value;
end;
function FldChar.ReadXmlAttrDirty();
begin
return {self.}XmlAttrDirty.Value;
end;
function FldChar.WriteXmlAttrDirty(_value);
begin
if ifnil({self.}XmlAttrDirty) then
begin
{self.}XmlAttrDirty := new OpenXmlAttribute({self.}Prefix, "dirty", nil);
attributes_[length(attributes_)] := {self.}XmlAttrDirty;
end
{self.}XmlAttrDirty.Value := _value;
end;