OfficeXml/autoclass/docx/MathPr@DOCX.tsf

242 lines
8.1 KiB
Plaintext

type MathPr = 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: MathPr);override;
public
// empty property
property DispDef read ReadXmlChildDispDef write WriteXmlChildDispDef;
function ReadXmlChildDispDef();
function WriteXmlChildDispDef(_value);
// normal property
property MathFont read ReadXmlChildMathFont;
property BrkBin read ReadXmlChildBrkBin;
property BrkBinSub read ReadXmlChildBrkBinSub;
property SmallFrac read ReadXmlChildSmallFrac;
property LMargin read ReadXmlChildLMargin;
property RMargin read ReadXmlChildRMargin;
property DefJc read ReadXmlChildDefJc;
property WrapIndent read ReadXmlChildWrapIndent;
property IntLim read ReadXmlChildIntLim;
property NaryLim read ReadXmlChildNaryLim;
function ReadXmlChildMathFont();
function ReadXmlChildBrkBin();
function ReadXmlChildBrkBinSub();
function ReadXmlChildSmallFrac();
function ReadXmlChildLMargin();
function ReadXmlChildRMargin();
function ReadXmlChildDefJc();
function ReadXmlChildWrapIndent();
function ReadXmlChildIntLim();
function ReadXmlChildNaryLim();
public
// Children
XmlChildMathFont: PureWVal;
XmlChildBrkBin: PureWVal;
XmlChildBrkBinSub: PureWVal;
XmlChildSmallFrac: PureWVal;
XmlChildDispDef: OpenXmlEmpty;
XmlChildLMargin: PureWVal;
XmlChildRMargin: PureWVal;
XmlChildDefJc: PureWVal;
XmlChildWrapIndent: PureWVal;
XmlChildIntLim: PureWVal;
XmlChildNaryLim: PureWVal;
end;
function MathPr.Create();overload;
begin
{self.}Create(nil, "m", "mathPr");
end;
function MathPr.Create(_node: XmlNode);overload;
begin
class(OpenXmlElement).Create(_node: XmlNode);
end;
function MathPr.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 MathPr.Init();override;
begin
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
attributes_ := array();
attributes_pf_ := array(
);
sorted_child_ := array(
pre + "mathFont": array(0, makeweakref(thisFunction(ReadXmlChildMathFont))),
pre + "brkBin": array(1, makeweakref(thisFunction(ReadXmlChildBrkBin))),
pre + "brkBinSub": array(2, makeweakref(thisFunction(ReadXmlChildBrkBinSub))),
pre + "smallFrac": array(3, makeweakref(thisFunction(ReadXmlChildSmallFrac))),
pre + "dispDef": array(4, makeweakref(thisFunction(ReadXmlChildDispDef))),
pre + "lMargin": array(5, makeweakref(thisFunction(ReadXmlChildLMargin))),
pre + "rMargin": array(6, makeweakref(thisFunction(ReadXmlChildRMargin))),
pre + "defJc": array(7, makeweakref(thisFunction(ReadXmlChildDefJc))),
pre + "wrapIndent": array(8, makeweakref(thisFunction(ReadXmlChildWrapIndent))),
pre + "intLim": array(9, makeweakref(thisFunction(ReadXmlChildIntLim))),
pre + "naryLim": array(10, makeweakref(thisFunction(ReadXmlChildNaryLim))),
);
container_ := new TSOfficeContainer(sorted_child_);
end;
function MathPr.Copy(_obj: MathPr);override;
begin
tslassigning_backup := tslassigning;
tslassigning := 1;
class(OpenXmlElement).Copy(_obj);
if not ifnil(_obj.XmlChildMathFont) then
{self.}MathFont.Copy(_obj.XmlChildMathFont);
if not ifnil(_obj.XmlChildBrkBin) then
{self.}BrkBin.Copy(_obj.XmlChildBrkBin);
if not ifnil(_obj.XmlChildBrkBinSub) then
{self.}BrkBinSub.Copy(_obj.XmlChildBrkBinSub);
if not ifnil(_obj.XmlChildSmallFrac) then
{self.}SmallFrac.Copy(_obj.XmlChildSmallFrac);
if not ifnil(_obj.XmlChildDispDef) then
ifnil({self.}XmlChildDispDef) ? {self.}DispDef.Copy(_obj.XmlChildDispDef) : {self.}XmlChildDispDef.Copy(_obj.XmlChildDispDef);
if not ifnil(_obj.XmlChildLMargin) then
{self.}LMargin.Copy(_obj.XmlChildLMargin);
if not ifnil(_obj.XmlChildRMargin) then
{self.}RMargin.Copy(_obj.XmlChildRMargin);
if not ifnil(_obj.XmlChildDefJc) then
{self.}DefJc.Copy(_obj.XmlChildDefJc);
if not ifnil(_obj.XmlChildWrapIndent) then
{self.}WrapIndent.Copy(_obj.XmlChildWrapIndent);
if not ifnil(_obj.XmlChildIntLim) then
{self.}IntLim.Copy(_obj.XmlChildIntLim);
if not ifnil(_obj.XmlChildNaryLim) then
{self.}NaryLim.Copy(_obj.XmlChildNaryLim);
tslassigning := tslassigning_backup;
end;
function MathPr.ReadXmlChildDispDef();
begin
if tslassigning and ifnil({self.}XmlChildDispDef) then
begin
{self.}XmlChildDispDef := new OpenXmlEmpty(self, {self.}Prefix, "dispDef");
container_.Set({self.}XmlChildDispDef);
return {self.}XmlChildDispDef;
end
return ifnil({self.}XmlChildDispDef) ? false : {self.}XmlChildDispDef.BoolValue();
end;
function MathPr.WriteXmlChildDispDef(_value);
begin
if ifnil({self.}XmlChildDispDef) then
begin
{self.}XmlChildDispDef := new OpenXmlEmpty(self, {self.}Prefix, "dispDef");
container_.Set({self.}XmlChildDispDef);
end
{self.}XmlChildDispDef.Value := _value;
end;
function MathPr.ReadXmlChildMathFont();
begin
if tslassigning and ifnil({self.}XmlChildMathFont) then
begin
{self.}XmlChildMathFont := new PureWVal(self, {self.}Prefix, "mathFont");
container_.Set({self.}XmlChildMathFont);
end
return {self.}XmlChildMathFont;
end;
function MathPr.ReadXmlChildBrkBin();
begin
if tslassigning and ifnil({self.}XmlChildBrkBin) then
begin
{self.}XmlChildBrkBin := new PureWVal(self, {self.}Prefix, "brkBin");
container_.Set({self.}XmlChildBrkBin);
end
return {self.}XmlChildBrkBin;
end;
function MathPr.ReadXmlChildBrkBinSub();
begin
if tslassigning and ifnil({self.}XmlChildBrkBinSub) then
begin
{self.}XmlChildBrkBinSub := new PureWVal(self, {self.}Prefix, "brkBinSub");
container_.Set({self.}XmlChildBrkBinSub);
end
return {self.}XmlChildBrkBinSub;
end;
function MathPr.ReadXmlChildSmallFrac();
begin
if tslassigning and ifnil({self.}XmlChildSmallFrac) then
begin
{self.}XmlChildSmallFrac := new PureWVal(self, {self.}Prefix, "smallFrac");
container_.Set({self.}XmlChildSmallFrac);
end
return {self.}XmlChildSmallFrac;
end;
function MathPr.ReadXmlChildLMargin();
begin
if tslassigning and ifnil({self.}XmlChildLMargin) then
begin
{self.}XmlChildLMargin := new PureWVal(self, {self.}Prefix, "lMargin");
container_.Set({self.}XmlChildLMargin);
end
return {self.}XmlChildLMargin;
end;
function MathPr.ReadXmlChildRMargin();
begin
if tslassigning and ifnil({self.}XmlChildRMargin) then
begin
{self.}XmlChildRMargin := new PureWVal(self, {self.}Prefix, "rMargin");
container_.Set({self.}XmlChildRMargin);
end
return {self.}XmlChildRMargin;
end;
function MathPr.ReadXmlChildDefJc();
begin
if tslassigning and ifnil({self.}XmlChildDefJc) then
begin
{self.}XmlChildDefJc := new PureWVal(self, {self.}Prefix, "defJc");
container_.Set({self.}XmlChildDefJc);
end
return {self.}XmlChildDefJc;
end;
function MathPr.ReadXmlChildWrapIndent();
begin
if tslassigning and ifnil({self.}XmlChildWrapIndent) then
begin
{self.}XmlChildWrapIndent := new PureWVal(self, {self.}Prefix, "wrapIndent");
container_.Set({self.}XmlChildWrapIndent);
end
return {self.}XmlChildWrapIndent;
end;
function MathPr.ReadXmlChildIntLim();
begin
if tslassigning and ifnil({self.}XmlChildIntLim) then
begin
{self.}XmlChildIntLim := new PureWVal(self, {self.}Prefix, "intLim");
container_.Set({self.}XmlChildIntLim);
end
return {self.}XmlChildIntLim;
end;
function MathPr.ReadXmlChildNaryLim();
begin
if tslassigning and ifnil({self.}XmlChildNaryLim) then
begin
{self.}XmlChildNaryLim := new PureWVal(self, {self.}Prefix, "naryLim");
container_.Set({self.}XmlChildNaryLim);
end
return {self.}XmlChildNaryLim;
end;