OfficeXml/autoclass/docx/PPr@DOCX.tsf

390 lines
14 KiB
Plaintext

type PPr = 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: PPr);override;
public
// empty property
property WidowControl read ReadXmlChildWidowControl write WriteXmlChildWidowControl;
property KeepNext read ReadXmlChildKeepNext write WriteXmlChildKeepNext;
property KeepLines read ReadXmlChildKeepLines write WriteXmlChildKeepLines;
property ContextualSpacing read ReadXmlChildContextualSpacing write WriteXmlChildContextualSpacing;
function ReadXmlChildWidowControl();
function WriteXmlChildWidowControl(_value);
function ReadXmlChildKeepNext();
function WriteXmlChildKeepNext(_value);
function ReadXmlChildKeepLines();
function WriteXmlChildKeepLines(_value);
function ReadXmlChildContextualSpacing();
function WriteXmlChildContextualSpacing(_value);
// normal property
property SectPr read ReadXmlChildSectPr;
property Tabs read ReadXmlChildTabs;
property SnapToGrid read ReadXmlChildSnapToGrid;
property PStyle read ReadXmlChildPStyle;
property NumPr read ReadXmlChildNumPr;
property Jc read ReadXmlChildJc;
property Ind read ReadXmlChildInd;
property AdjustRightInd read ReadXmlChildAdjustRightInd;
property Spacing read ReadXmlChildSpacing;
property OutlineLvl read ReadXmlChildOutlineLvl;
property AutoSpaceDE read ReadXmlChildAutoSpaceDE;
property AutoSpaceDN read ReadXmlChildAutoSpaceDN;
property RPr read ReadXmlChildRPr;
property PBdr read ReadXmlChildPBdr;
function ReadXmlChildSectPr();
function ReadXmlChildTabs();
function ReadXmlChildSnapToGrid();
function ReadXmlChildPStyle();
function ReadXmlChildNumPr();
function ReadXmlChildJc();
function ReadXmlChildInd();
function ReadXmlChildAdjustRightInd();
function ReadXmlChildSpacing();
function ReadXmlChildOutlineLvl();
function ReadXmlChildAutoSpaceDE();
function ReadXmlChildAutoSpaceDN();
function ReadXmlChildRPr();
function ReadXmlChildPBdr();
public
// Children
XmlChildSectPr: SectPr;
XmlChildTabs: Tabs;
XmlChildWidowControl: OpenXmlEmpty;
XmlChildSnapToGrid: PureWVal;
XmlChildPStyle: PureWVal;
XmlChildNumPr: NumPr;
XmlChildJc: PureWVal;
XmlChildInd: Ind;
XmlChildKeepNext: OpenXmlEmpty;
XmlChildKeepLines: OpenXmlEmpty;
XmlChildAdjustRightInd: PureWVal;
XmlChildSpacing: Spacing;
XmlChildOutlineLvl: PureWVal;
XmlChildAutoSpaceDE: PureWVal;
XmlChildAutoSpaceDN: PureWVal;
XmlChildRPr: RPr;
XmlChildPBdr: PBdr;
XmlChildContextualSpacing: OpenXmlEmpty;
end;
function PPr.Create();overload;
begin
{self.}Create(nil, "w", "pPr");
end;
function PPr.Create(_node: XmlNode);overload;
begin
class(OpenXmlElement).Create(_node: XmlNode);
end;
function PPr.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 PPr.Init();override;
begin
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
attributes_ := array();
attributes_pf_ := array(
);
sorted_child_ := array(
pre + "sectPr": array(0, makeweakref(thisFunction(ReadXmlChildSectPr))),
pre + "tabs": array(1, makeweakref(thisFunction(ReadXmlChildTabs))),
pre + "widowControl": array(2, makeweakref(thisFunction(ReadXmlChildWidowControl))),
pre + "snapToGrid": array(3, makeweakref(thisFunction(ReadXmlChildSnapToGrid))),
pre + "pStyle": array(4, makeweakref(thisFunction(ReadXmlChildPStyle))),
pre + "numPr": array(5, makeweakref(thisFunction(ReadXmlChildNumPr))),
pre + "jc": array(6, makeweakref(thisFunction(ReadXmlChildJc))),
pre + "ind": array(7, makeweakref(thisFunction(ReadXmlChildInd))),
pre + "keepNext": array(8, makeweakref(thisFunction(ReadXmlChildKeepNext))),
pre + "keepLines": array(9, makeweakref(thisFunction(ReadXmlChildKeepLines))),
pre + "adjustRightInd": array(10, makeweakref(thisFunction(ReadXmlChildAdjustRightInd))),
pre + "spacing": array(11, makeweakref(thisFunction(ReadXmlChildSpacing))),
pre + "outlineLvl": array(12, makeweakref(thisFunction(ReadXmlChildOutlineLvl))),
pre + "autoSpaceDE": array(13, makeweakref(thisFunction(ReadXmlChildAutoSpaceDE))),
pre + "autoSpaceDN": array(14, makeweakref(thisFunction(ReadXmlChildAutoSpaceDN))),
pre + "rPr": array(15, makeweakref(thisFunction(ReadXmlChildRPr))),
pre + "pBdr": array(16, makeweakref(thisFunction(ReadXmlChildPBdr))),
pre + "contextualSpacing": array(17, makeweakref(thisFunction(ReadXmlChildContextualSpacing))),
);
container_ := new TSOfficeContainer(sorted_child_);
end;
function PPr.Copy(_obj: PPr);override;
begin
tslassigning_backup := tslassigning;
tslassigning := 1;
class(OpenXmlElement).Copy(_obj);
if not ifnil(_obj.XmlChildSectPr) then
{self.}SectPr.Copy(_obj.XmlChildSectPr);
if not ifnil(_obj.XmlChildTabs) then
{self.}Tabs.Copy(_obj.XmlChildTabs);
if not ifnil(_obj.XmlChildWidowControl) then
ifnil({self.}XmlChildWidowControl) ? {self.}WidowControl.Copy(_obj.XmlChildWidowControl) : {self.}XmlChildWidowControl.Copy(_obj.XmlChildWidowControl);
if not ifnil(_obj.XmlChildSnapToGrid) then
{self.}SnapToGrid.Copy(_obj.XmlChildSnapToGrid);
if not ifnil(_obj.XmlChildPStyle) then
{self.}PStyle.Copy(_obj.XmlChildPStyle);
if not ifnil(_obj.XmlChildNumPr) then
{self.}NumPr.Copy(_obj.XmlChildNumPr);
if not ifnil(_obj.XmlChildJc) then
{self.}Jc.Copy(_obj.XmlChildJc);
if not ifnil(_obj.XmlChildInd) then
{self.}Ind.Copy(_obj.XmlChildInd);
if not ifnil(_obj.XmlChildKeepNext) then
ifnil({self.}XmlChildKeepNext) ? {self.}KeepNext.Copy(_obj.XmlChildKeepNext) : {self.}XmlChildKeepNext.Copy(_obj.XmlChildKeepNext);
if not ifnil(_obj.XmlChildKeepLines) then
ifnil({self.}XmlChildKeepLines) ? {self.}KeepLines.Copy(_obj.XmlChildKeepLines) : {self.}XmlChildKeepLines.Copy(_obj.XmlChildKeepLines);
if not ifnil(_obj.XmlChildAdjustRightInd) then
{self.}AdjustRightInd.Copy(_obj.XmlChildAdjustRightInd);
if not ifnil(_obj.XmlChildSpacing) then
{self.}Spacing.Copy(_obj.XmlChildSpacing);
if not ifnil(_obj.XmlChildOutlineLvl) then
{self.}OutlineLvl.Copy(_obj.XmlChildOutlineLvl);
if not ifnil(_obj.XmlChildAutoSpaceDE) then
{self.}AutoSpaceDE.Copy(_obj.XmlChildAutoSpaceDE);
if not ifnil(_obj.XmlChildAutoSpaceDN) then
{self.}AutoSpaceDN.Copy(_obj.XmlChildAutoSpaceDN);
if not ifnil(_obj.XmlChildRPr) then
{self.}RPr.Copy(_obj.XmlChildRPr);
if not ifnil(_obj.XmlChildPBdr) then
{self.}PBdr.Copy(_obj.XmlChildPBdr);
if not ifnil(_obj.XmlChildContextualSpacing) then
ifnil({self.}XmlChildContextualSpacing) ? {self.}ContextualSpacing.Copy(_obj.XmlChildContextualSpacing) : {self.}XmlChildContextualSpacing.Copy(_obj.XmlChildContextualSpacing);
tslassigning := tslassigning_backup;
end;
function PPr.ReadXmlChildWidowControl();
begin
if tslassigning and ifnil({self.}XmlChildWidowControl) then
begin
{self.}XmlChildWidowControl := new OpenXmlEmpty(self, {self.}Prefix, "widowControl");
container_.Set({self.}XmlChildWidowControl);
return {self.}XmlChildWidowControl;
end
return ifnil({self.}XmlChildWidowControl) ? false : {self.}XmlChildWidowControl.BoolValue();
end;
function PPr.WriteXmlChildWidowControl(_value);
begin
if ifnil({self.}XmlChildWidowControl) then
begin
{self.}XmlChildWidowControl := new OpenXmlEmpty(self, {self.}Prefix, "widowControl");
container_.Set({self.}XmlChildWidowControl);
end
{self.}XmlChildWidowControl.Value := _value;
end;
function PPr.ReadXmlChildKeepNext();
begin
if tslassigning and ifnil({self.}XmlChildKeepNext) then
begin
{self.}XmlChildKeepNext := new OpenXmlEmpty(self, {self.}Prefix, "keepNext");
container_.Set({self.}XmlChildKeepNext);
return {self.}XmlChildKeepNext;
end
return ifnil({self.}XmlChildKeepNext) ? false : {self.}XmlChildKeepNext.BoolValue();
end;
function PPr.WriteXmlChildKeepNext(_value);
begin
if ifnil({self.}XmlChildKeepNext) then
begin
{self.}XmlChildKeepNext := new OpenXmlEmpty(self, {self.}Prefix, "keepNext");
container_.Set({self.}XmlChildKeepNext);
end
{self.}XmlChildKeepNext.Value := _value;
end;
function PPr.ReadXmlChildKeepLines();
begin
if tslassigning and ifnil({self.}XmlChildKeepLines) then
begin
{self.}XmlChildKeepLines := new OpenXmlEmpty(self, {self.}Prefix, "keepLines");
container_.Set({self.}XmlChildKeepLines);
return {self.}XmlChildKeepLines;
end
return ifnil({self.}XmlChildKeepLines) ? false : {self.}XmlChildKeepLines.BoolValue();
end;
function PPr.WriteXmlChildKeepLines(_value);
begin
if ifnil({self.}XmlChildKeepLines) then
begin
{self.}XmlChildKeepLines := new OpenXmlEmpty(self, {self.}Prefix, "keepLines");
container_.Set({self.}XmlChildKeepLines);
end
{self.}XmlChildKeepLines.Value := _value;
end;
function PPr.ReadXmlChildContextualSpacing();
begin
if tslassigning and ifnil({self.}XmlChildContextualSpacing) then
begin
{self.}XmlChildContextualSpacing := new OpenXmlEmpty(self, {self.}Prefix, "contextualSpacing");
container_.Set({self.}XmlChildContextualSpacing);
return {self.}XmlChildContextualSpacing;
end
return ifnil({self.}XmlChildContextualSpacing) ? false : {self.}XmlChildContextualSpacing.BoolValue();
end;
function PPr.WriteXmlChildContextualSpacing(_value);
begin
if ifnil({self.}XmlChildContextualSpacing) then
begin
{self.}XmlChildContextualSpacing := new OpenXmlEmpty(self, {self.}Prefix, "contextualSpacing");
container_.Set({self.}XmlChildContextualSpacing);
end
{self.}XmlChildContextualSpacing.Value := _value;
end;
function PPr.ReadXmlChildSectPr();
begin
if tslassigning and ifnil({self.}XmlChildSectPr) then
begin
{self.}XmlChildSectPr := new SectPr(self, {self.}Prefix, "sectPr");
container_.Set({self.}XmlChildSectPr);
end
return {self.}XmlChildSectPr;
end;
function PPr.ReadXmlChildTabs();
begin
if tslassigning and ifnil({self.}XmlChildTabs) then
begin
{self.}XmlChildTabs := new Tabs(self, {self.}Prefix, "tabs");
container_.Set({self.}XmlChildTabs);
end
return {self.}XmlChildTabs;
end;
function PPr.ReadXmlChildSnapToGrid();
begin
if tslassigning and ifnil({self.}XmlChildSnapToGrid) then
begin
{self.}XmlChildSnapToGrid := new PureWVal(self, {self.}Prefix, "snapToGrid");
container_.Set({self.}XmlChildSnapToGrid);
end
return {self.}XmlChildSnapToGrid;
end;
function PPr.ReadXmlChildPStyle();
begin
if tslassigning and ifnil({self.}XmlChildPStyle) then
begin
{self.}XmlChildPStyle := new PureWVal(self, {self.}Prefix, "pStyle");
container_.Set({self.}XmlChildPStyle);
end
return {self.}XmlChildPStyle;
end;
function PPr.ReadXmlChildNumPr();
begin
if tslassigning and ifnil({self.}XmlChildNumPr) then
begin
{self.}XmlChildNumPr := new NumPr(self, {self.}Prefix, "numPr");
container_.Set({self.}XmlChildNumPr);
end
return {self.}XmlChildNumPr;
end;
function PPr.ReadXmlChildJc();
begin
if tslassigning and ifnil({self.}XmlChildJc) then
begin
{self.}XmlChildJc := new PureWVal(self, {self.}Prefix, "jc");
container_.Set({self.}XmlChildJc);
end
return {self.}XmlChildJc;
end;
function PPr.ReadXmlChildInd();
begin
if tslassigning and ifnil({self.}XmlChildInd) then
begin
{self.}XmlChildInd := new Ind(self, {self.}Prefix, "ind");
container_.Set({self.}XmlChildInd);
end
return {self.}XmlChildInd;
end;
function PPr.ReadXmlChildAdjustRightInd();
begin
if tslassigning and ifnil({self.}XmlChildAdjustRightInd) then
begin
{self.}XmlChildAdjustRightInd := new PureWVal(self, {self.}Prefix, "adjustRightInd");
container_.Set({self.}XmlChildAdjustRightInd);
end
return {self.}XmlChildAdjustRightInd;
end;
function PPr.ReadXmlChildSpacing();
begin
if tslassigning and ifnil({self.}XmlChildSpacing) then
begin
{self.}XmlChildSpacing := new Spacing(self, {self.}Prefix, "spacing");
container_.Set({self.}XmlChildSpacing);
end
return {self.}XmlChildSpacing;
end;
function PPr.ReadXmlChildOutlineLvl();
begin
if tslassigning and ifnil({self.}XmlChildOutlineLvl) then
begin
{self.}XmlChildOutlineLvl := new PureWVal(self, {self.}Prefix, "outlineLvl");
container_.Set({self.}XmlChildOutlineLvl);
end
return {self.}XmlChildOutlineLvl;
end;
function PPr.ReadXmlChildAutoSpaceDE();
begin
if tslassigning and ifnil({self.}XmlChildAutoSpaceDE) then
begin
{self.}XmlChildAutoSpaceDE := new PureWVal(self, {self.}Prefix, "autoSpaceDE");
container_.Set({self.}XmlChildAutoSpaceDE);
end
return {self.}XmlChildAutoSpaceDE;
end;
function PPr.ReadXmlChildAutoSpaceDN();
begin
if tslassigning and ifnil({self.}XmlChildAutoSpaceDN) then
begin
{self.}XmlChildAutoSpaceDN := new PureWVal(self, {self.}Prefix, "autoSpaceDN");
container_.Set({self.}XmlChildAutoSpaceDN);
end
return {self.}XmlChildAutoSpaceDN;
end;
function PPr.ReadXmlChildRPr();
begin
if tslassigning and ifnil({self.}XmlChildRPr) then
begin
{self.}XmlChildRPr := new RPr(self, {self.}Prefix, "rPr");
container_.Set({self.}XmlChildRPr);
end
return {self.}XmlChildRPr;
end;
function PPr.ReadXmlChildPBdr();
begin
if tslassigning and ifnil({self.}XmlChildPBdr) then
begin
{self.}XmlChildPBdr := new PBdr(self, {self.}Prefix, "pBdr");
container_.Set({self.}XmlChildPBdr);
end
return {self.}XmlChildPBdr;
end;