OfficeXml/autoclass/docx/NumFmt@DOCX.tsf

100 lines
2.6 KiB
Plaintext

type NumFmt = 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 InitAttributes();override;
function InitChildren();override;
function InitNode(_node: XmlNode);override;
function Copy(_obj: NumFmt);override;
property FormatCode read ReadXmlAttrFormatCode write WriteXmlAttrFormatCode;
property SourceLinked read ReadXmlAttrSourceLinked write WriteXmlAttrSourceLinked;
function ReadXmlAttrFormatCode();
function WriteXmlAttrFormatCode(_value);
function ReadXmlAttrSourceLinked();
function WriteXmlAttrSourceLinked(_value);
public
// Attributes
XmlAttrFormatCode: OpenXmlAttribute;
XmlAttrSourceLinked: OpenXmlAttribute;
// Children
end;
function NumFmt.Create();overload;
begin
{self.}Create(nil, "c", "numFmt");
end;
function NumFmt.Create(_node: XmlNode);overload;
begin
class(OpenXmlElement).Create(_node: XmlNode);
end;
function NumFmt.Create(_parent: tslobj; _prefix: string; _local_name: string);overload;
begin
class(OpenXmlElement).Create(_parent, _prefix, _local_name);
end;
function NumFmt.Init();override;
begin
{self.}XmlAttrFormatCode := new OpenXmlAttribute(nil, "formatCode", nil);
{self.}XmlAttrSourceLinked := new OpenXmlAttribute(nil, "sourceLinked", nil);
end;
function NumFmt.InitAttributes();override;
begin
attributes_ := array(
{self.}XmlAttrFormatCode,
{self.}XmlAttrSourceLinked,
);
end;
function NumFmt.InitChildren();override;
begin
child_elements_ := array(
);
sorted_child_ := array(
"": -1,
);
end;
function NumFmt.InitNode(_node: XmlNode);override;
begin
if ifObj({self.}XmlNode) then
for k,v in child_elements_ do v.InitNode(nil);
{self.}XmlNode := ifObj(_node) ? _node : nil;
end;
function NumFmt.Copy(_obj: NumFmt);override;
begin
if not ifnil(_obj.XmlAttrFormatCode.Value) then
{self.}XmlAttrFormatCode.Value := _obj.XmlAttrFormatCode.Value;
if not ifnil(_obj.XmlAttrSourceLinked.Value) then
{self.}XmlAttrSourceLinked.Value := _obj.XmlAttrSourceLinked.Value;
end;
function NumFmt.ReadXmlAttrFormatCode();
begin
return {self.}XmlAttrFormatCode.Value;
end;
function NumFmt.WriteXmlAttrFormatCode(_value);
begin
{self.}XmlAttrFormatCode.Value := _value;
end;
function NumFmt.ReadXmlAttrSourceLinked();
begin
return {self.}XmlAttrSourceLinked.Value;
end;
function NumFmt.WriteXmlAttrSourceLinked(_value);
begin
{self.}XmlAttrSourceLinked.Value := _value;
end;