OfficeXml/autoclass/docx/BarChart@DOCX.tsf

170 lines
4.9 KiB
Plaintext

type BarChart = 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: BarChart);override;
public
// normal property
property BarDir read ReadXmlChildBarDir;
property Grouping read ReadXmlChildGrouping;
property VaryColors read ReadXmlChildVaryColors;
property GapWidth read ReadXmlChildGapWidth;
function ReadXmlChildBarDir();
function ReadXmlChildGrouping();
function ReadXmlChildVaryColors();
function ReadXmlChildGapWidth();
// multi property
property Sers read ReadSers;
property AxIds read ReadAxIds;
function ReadSers(_index);
function ReadAxIds(_index);
function AddSer(): Ser;
function AddAxId(): PureVal;
function AppendSer(): Ser;
function AppendAxId(): PureVal;
public
// Children
XmlChildBarDir: PureVal;
XmlChildGrouping: PureVal;
XmlChildVaryColors: PureVal;
XmlChildGapWidth: PureVal;
end;
function BarChart.Create();overload;
begin
{self.}Create(nil, "c", "barChart");
end;
function BarChart.Create(_node: XmlNode);overload;
begin
class(OpenXmlElement).Create(_node: XmlNode);
end;
function BarChart.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 BarChart.Init();override;
begin
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
attributes_ := array();
attributes_pf_ := array(
);
sorted_child_ := array(
pre + "barDir": array(0, makeweakref(thisFunction(ReadXmlChildBarDir))),
pre + "grouping": array(1, makeweakref(thisFunction(ReadXmlChildGrouping))),
pre + "varyColors": array(2, makeweakref(thisFunction(ReadXmlChildVaryColors))),
pre + "ser": array(3, makeweakref(thisFunction(AppendSer))),
pre + "gapWidth": array(4, makeweakref(thisFunction(ReadXmlChildGapWidth))),
pre + "axId": array(5, makeweakref(thisFunction(AppendAxId))),
);
container_ := new TSOfficeContainer(sorted_child_);
end;
function BarChart.Copy(_obj: BarChart);override;
begin
tslassigning_backup := tslassigning;
tslassigning := 1;
class(OpenXmlElement).Copy(_obj);
if not ifnil(_obj.XmlChildBarDir) then
{self.}BarDir.Copy(_obj.XmlChildBarDir);
if not ifnil(_obj.XmlChildGrouping) then
{self.}Grouping.Copy(_obj.XmlChildGrouping);
if not ifnil(_obj.XmlChildVaryColors) then
{self.}VaryColors.Copy(_obj.XmlChildVaryColors);
if not ifnil(_obj.XmlChildGapWidth) then
{self.}GapWidth.Copy(_obj.XmlChildGapWidth);
tslassigning := tslassigning_backup;
end;
function BarChart.ReadXmlChildBarDir();
begin
if tslassigning and ifnil({self.}XmlChildBarDir) then
begin
{self.}XmlChildBarDir := new PureVal(self, {self.}Prefix, "barDir");
container_.Set({self.}XmlChildBarDir);
end
return {self.}XmlChildBarDir;
end;
function BarChart.ReadXmlChildGrouping();
begin
if tslassigning and ifnil({self.}XmlChildGrouping) then
begin
{self.}XmlChildGrouping := new PureVal(self, {self.}Prefix, "grouping");
container_.Set({self.}XmlChildGrouping);
end
return {self.}XmlChildGrouping;
end;
function BarChart.ReadXmlChildVaryColors();
begin
if tslassigning and ifnil({self.}XmlChildVaryColors) then
begin
{self.}XmlChildVaryColors := new PureVal(self, {self.}Prefix, "varyColors");
container_.Set({self.}XmlChildVaryColors);
end
return {self.}XmlChildVaryColors;
end;
function BarChart.ReadXmlChildGapWidth();
begin
if tslassigning and ifnil({self.}XmlChildGapWidth) then
begin
{self.}XmlChildGapWidth := new PureVal(self, {self.}Prefix, "gapWidth");
container_.Set({self.}XmlChildGapWidth);
end
return {self.}XmlChildGapWidth;
end;
function BarChart.ReadSers(_index);
begin
ind := ifnil(_index) ? -2 : _index;
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
return container_.Get(pre + "ser", ind);
end;
function BarChart.ReadAxIds(_index);
begin
ind := ifnil(_index) ? -2 : _index;
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
return container_.Get(pre + "axId", ind);
end;
function BarChart.AddSer(): Ser;
begin
obj := new Ser(self, {self.}Prefix, "ser");
container_.Insert(obj);
return obj;
end;
function BarChart.AddAxId(): PureVal;
begin
obj := new PureVal(self, {self.}Prefix, "axId");
container_.Insert(obj);
return obj;
end;
function BarChart.AppendSer(): Ser;
begin
obj := new Ser(self, {self.}Prefix, "ser");
container_.Append(obj);
return obj;
end;
function BarChart.AppendAxId(): PureVal;
begin
obj := new PureVal(self, {self.}Prefix, "axId");
container_.Append(obj);
return obj;
end;