This commit is contained in:
csh 2024-12-25 11:08:37 +08:00
parent e687379248
commit 48e4de7b87
31 changed files with 825 additions and 248 deletions

152
README.md
View File

@ -1,6 +1,6 @@
# OfficeXml # OfficeXml
## 说明 ## 概述
将docx、pptx、xlsx等文件中的xml转为tsl对象 将docx、pptx、xlsx等文件中的xml转为tsl对象
@ -27,7 +27,7 @@
上述是一个docx中的段落的xml序列化为tsl过程如下 上述是一个docx中的段落的xml序列化为tsl过程如下
```txt ```go
namespace "DOCX" // 设置命名空间为DOCX namespace "DOCX" // 设置命名空间为DOCX
p := new P(); // 创建一个P对象段落w:p p := new P(); // 创建一个P对象段落w:p
p.Init(node); // 假设node节点是上面的xml指向的Node对象 p.Init(node); // 假设node节点是上面的xml指向的Node对象
@ -36,11 +36,155 @@ p.Deserialize(); // 将node对象的xml序列化到tsl对象
// 序列化完毕后,可直接对应取值 // 序列化完毕后,可直接对应取值
echo p.PPr.Jc.Val; // 输出left echo p.PPr.Jc.Val; // 输出left
// 如果需要修改内容通过Serialize()回写到node
p.PPr.Jc.Val := "center";
// 回写方法1适合修改单个对象
p.PPr.Jc.Serialize();
// 回写方法2大量修改不同的对象
p.Serialize(); // 或p.PPr.Serialize()
// 在获取存在多个节点的对象时比如上述的w:r对象是复数的则需要通过Rs()获取 // 在获取存在多个节点的对象时比如上述的w:r对象是复数的则需要通过Rs()获取
// 直接调用Rs()会获取所有的R对象加上索引会获取第N+1个 // 直接调用Rs()会获取所有的R对象加上索引会获取第N+1个
echo p.Rs(1).T.Text; // 输出:(份) echo p.Rs(1).T.Text; // 输出:(份)
``` ```
## 部署 ## 基类
将此文件夹部署到tsl解释器下的`funcext`即可 `OpenXmlElement.tsf`提供了一些常用的方法,具体可见`tsf`文件
## 部件
### Components
一共有三个部件,分别是`Components@DOCX.tsf``Components@XLSX.tsf``Components@PPTX.tsf`
以`Components@DOCX.tsf`为例使用这个类可以获取到对应的docx文件的xml对象
```go
namespace "DOCX"
component := new Components(); // 创建对象
component.Open("", "xxx.docx"); // 打开文件
document := component.Document; // 获取document.xml生成Document对象
document.Deserialize(); // 将xml对象的数据反序列化到tsl对象中
document.Body.Elements(); // 可以获取document的body下的所有对象列表
// 反序列化后,可进行读写
styles := component.Styles; // 获取styles.xml生成Styles对象
```
document.xml内容如下
```xml
<w:document xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas"
xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex"
xmlns:cx1="http://schemas.microsoft.com/office/drawing/2015/9/8/chartex"
mc:Ignorable="w14 w15 w16se w16cid w16 w16cex w16sdtdh w16du wp14">
<w:body>
<w:p w14:paraId="7B19BB62" w14:textId="33E8D5E1" w:rsidR="00B118EF"
w:rsidRDefault="00B118EF" w:rsidP="00B118EF">
<w:pPr>
<w:tabs>
<w:tab w:val="left" w:pos="5670" />
</w:tabs>
</w:pPr>
<w:r>
<w:rPr>
<w:rFonts w:hint="eastAsia" />
</w:rPr>
<w:t>分栏前</w:t>
</w:r>
</w:p>
<w:sectPr w:rsidR="00B118EF" w:rsidSect="002E4343">
<w:type w:val="continuous" />
<w:pgSz w:w="11906" w:h="16838" w:code="9" />
<w:pgMar w:top="1440" w:right="1797" w:bottom="1440" w:left="1797" w:header="851"
w:footer="992" w:gutter="0" />
<w:cols w:space="720" />
<w:docGrid w:type="linesAndChars" w:linePitch="312" />
</w:sectPr>
</w:body>
</w:document>
```
### 单位装饰器UnitDecorator
每个对象都有一个单位装饰器,能统一转成磅(point)单位(如果有配置属性转换),还能保留原来的接口
装饰器`tsf`统一命名是`原本对象名+UnitDecorator@命名空间`,如`docx`的`SectPr`对象的装饰器是`SectPrUnitDecorator@DOCX`
有下面一段xml其中的`pgSz.w = "11906", pgSz.h = "16838"`都需要转换成point
```xml
<w:sectPr w:rsidR="00B118EF" w:rsidSect="002E4343">
<w:type w:val="continuous" />
<w:pgSz w:w="11906" w:h="16838" w:code="9" />
<w:pgMar w:top="1440" w:right="1797" w:bottom="1440" w:left="1797" w:header="851"
w:footer="992" w:gutter="0" />
<w:cols w:space="720" />
<w:docGrid w:type="linesAndChars" w:linePitch="312" />
</w:sectPr>
```
```go
namespace "DOCX"
component := new Components(); // 创建对象
component.Open("", "xxx.docx"); // 打开文件
document := component.Document; // 获取document.xml生成Document对象
document.Deserialize(); // 将xml对象的数据反序列化到tsl对象中
sect_pr := document.Body.SectPr; // 获取SectPr对象
sect_pr_unit_decorator := new SectPrUnitDecorator(sect_pr); // 装饰器构造需要原本的对象
echo "w = ", sect_pr.PgSz.W; // 输出的是字符串原本的单位是twips
echo "\n";
echo "w = ", sect_pr_unit_decorator.PgSz.W; // 此时输出的是数字类型单位是point
```
### 适配器Adapter
适配器是通过key获取对应的对象比如样式可以通过样式ID获取对应的样式对象
只有部分对象才有适配器(具体可见`autoclass/adapter`),比如`Styles`的适配器是`StylesAdapter@DOCX`
styles.xml部分如下
```xml
<w:styles xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006">
<w:style w:type="character" w:customStyle="1" w:styleId="a4">
<w:name w:val="页眉 字符" />
<w:basedOn w:val="a0" />
<w:link w:val="a3" />
<w:uiPriority w:val="99" />
<w:rsid w:val="00B118EF" />
<w:rPr>
<w:sz w:val="18" />
<w:szCs w:val="18" />
</w:rPr>
</w:style>
<w:style w:type="character" w:customStyle="1" w:styleId="a6">
<w:name w:val="页脚 字符" />
<w:basedOn w:val="a0" />
<w:link w:val="a5" />
<w:uiPriority w:val="99" />
<w:rsid w:val="00B118EF" />
<w:rPr>
<w:sz w:val="18" />
<w:szCs w:val="18" />
</w:rPr>
</w:style>
</w:styles>
```
```go
namespace "DOCX"
component := new Components(); // 创建对象
component.Open("", "xxx.docx"); // 打开文件
document := component.Document; // 获取document.xml生成Document对象
document.Deserialize(); // 将xml对象的数据反序列化到tsl对象中
styles := document.Styles;
// 现在需要通过styleId获取Style对象
styles_adapter := new StylesAdapter(styles);
// 通过StyleId获取Style对象
style := styles_adapter.GetStyleByStyleId("a6");
echo style.Name; // 输出的是"页脚 字符"
```

View File

@ -0,0 +1,39 @@
type InsUnitDecorator = class(Ins)
uses TSSafeUnitConverter;
public
function Create(_obj: Ins);
function GetObject();
function Convert();
private
object_: Ins;
end;
function InsUnitDecorator.Create(_obj: Ins);
begin
class(Ins).Create();
object_ := _obj;
{self.}Convert();
end;
function InsUnitDecorator.GetObject();
begin
return object_;
end;
function InsUnitDecorator.Convert();
begin
tslassigning_backup := tslassigning;
tslassigning := 1;
if not ifnil(object_.XmlAttrId) then
{self.}Id := object_.XmlAttrId.Value;
if not ifnil(object_.XmlAttrAuthor) then
{self.}Author := object_.XmlAttrAuthor.Value;
if not ifnil(object_.XmlAttrDate) then
{self.}Date := object_.XmlAttrDate.Value;
if not ifnil(object_.XmlAttrW16duDateUtc) then
{self.}W16duDateUtc := object_.XmlAttrW16duDateUtc.Value;
elems := object_.Rs();
for _,elem in elems do
{self.}AppendChild(new RUnitDecorator(elem));
tslassigning := tslassigning_backup;
end;

View File

@ -31,7 +31,7 @@ begin
if not ifnil(object_.XmlChildWidowControl) then if not ifnil(object_.XmlChildWidowControl) then
{self.}WidowControl.Copy(object_.XmlChildWidowControl); {self.}WidowControl.Copy(object_.XmlChildWidowControl);
if not ifnil(object_.XmlChildSnapToGrid) then if not ifnil(object_.XmlChildSnapToGrid) then
{self.}XmlChildSnapToGrid := new PureWValUnitDecorator(object_.XmlChildSnapToGrid); {self.}SnapToGrid.Copy(object_.XmlChildSnapToGrid);
if not ifnil(object_.XmlChildPStyle) then if not ifnil(object_.XmlChildPStyle) then
{self.}XmlChildPStyle := new PureWValUnitDecorator(object_.XmlChildPStyle); {self.}XmlChildPStyle := new PureWValUnitDecorator(object_.XmlChildPStyle);
if not ifnil(object_.XmlChildNumPr) then if not ifnil(object_.XmlChildNumPr) then

View File

@ -38,6 +38,8 @@ begin
{self.}WRsidP := object_.XmlAttrWRsidP.Value; {self.}WRsidP := object_.XmlAttrWRsidP.Value;
if not ifnil(object_.XmlChildPPr) then if not ifnil(object_.XmlChildPPr) then
{self.}XmlChildPPr := new PPrUnitDecorator(object_.XmlChildPPr); {self.}XmlChildPPr := new PPrUnitDecorator(object_.XmlChildPPr);
if not ifnil(object_.XmlChildIns) then
{self.}XmlChildIns := new InsUnitDecorator(object_.XmlChildIns);
elems := object_.Rs(); elems := object_.Rs();
for _,elem in elems do for _,elem in elems do
{self.}AppendChild(new RUnitDecorator(elem)); {self.}AppendChild(new RUnitDecorator(elem));

View File

@ -32,6 +32,8 @@ begin
{self.}XmlChildWebHidden := new PureWValUnitDecorator(object_.XmlChildWebHidden); {self.}XmlChildWebHidden := new PureWValUnitDecorator(object_.XmlChildWebHidden);
if not ifnil(object_.XmlChildRStyle) then if not ifnil(object_.XmlChildRStyle) then
{self.}XmlChildRStyle := new PureWValUnitDecorator(object_.XmlChildRStyle); {self.}XmlChildRStyle := new PureWValUnitDecorator(object_.XmlChildRStyle);
if not ifnil(object_.XmlChildIns) then
{self.}XmlChildIns := new InsUnitDecorator(object_.XmlChildIns);
if not ifnil(object_.XmlChildRFonts) then if not ifnil(object_.XmlChildRFonts) then
{self.}XmlChildRFonts := new RFontsUnitDecorator(object_.XmlChildRFonts); {self.}XmlChildRFonts := new RFontsUnitDecorator(object_.XmlChildRFonts);
if not ifnil(object_.XmlChildKern) then if not ifnil(object_.XmlChildKern) then

View File

@ -34,5 +34,7 @@ begin
{self.}CantSplit.Copy(object_.XmlChildCantSplit); {self.}CantSplit.Copy(object_.XmlChildCantSplit);
if not ifnil(object_.XmlChildCnfStyle) then if not ifnil(object_.XmlChildCnfStyle) then
{self.}XmlChildCnfStyle := new CnfStyleUnitDecorator(object_.XmlChildCnfStyle); {self.}XmlChildCnfStyle := new CnfStyleUnitDecorator(object_.XmlChildCnfStyle);
if not ifnil(object_.XmlChildIns) then
{self.}XmlChildIns := new InsUnitDecorator(object_.XmlChildIns);
tslassigning := tslassigning_backup; tslassigning := tslassigning_backup;
end; end;

View File

@ -411,13 +411,16 @@ end;
function Anchor.ReadXmlChildWrapNone(); function Anchor.ReadXmlChildWrapNone();
begin begin
if tslassigning and ifnil({self.}XmlChildWrapNone) then if tslassigning then
begin
if ifnil({self.}XmlChildWrapNone) then
begin begin
{self.}XmlChildWrapNone := new OpenXmlEmpty(self, {self.}Prefix, "wrapNone"); {self.}XmlChildWrapNone := new OpenXmlEmpty(self, {self.}Prefix, "wrapNone");
container_.Set({self.}XmlChildWrapNone); container_.Set({self.}XmlChildWrapNone);
end
return {self.}XmlChildWrapNone; return {self.}XmlChildWrapNone;
end end
return ifnil({self.}XmlChildWrapNone) ? false : {self.}XmlChildWrapNone.BoolValue(); return ifnil({self.}XmlChildWrapNone) ? nil : {self.}XmlChildWrapNone.BoolValue();
end; end;
function Anchor.WriteXmlChildWrapNone(_value); function Anchor.WriteXmlChildWrapNone(_value);

View File

@ -467,13 +467,16 @@ end;
function BodyPr.ReadXmlChildNoAutofit(); function BodyPr.ReadXmlChildNoAutofit();
begin begin
if tslassigning and ifnil({self.}XmlChildNoAutofit) then if tslassigning then
begin
if ifnil({self.}XmlChildNoAutofit) then
begin begin
{self.}XmlChildNoAutofit := new OpenXmlEmpty(self, "a", "noAutofit"); {self.}XmlChildNoAutofit := new OpenXmlEmpty(self, "a", "noAutofit");
container_.Set({self.}XmlChildNoAutofit); container_.Set({self.}XmlChildNoAutofit);
end
return {self.}XmlChildNoAutofit; return {self.}XmlChildNoAutofit;
end end
return ifnil({self.}XmlChildNoAutofit) ? false : {self.}XmlChildNoAutofit.BoolValue(); return ifnil({self.}XmlChildNoAutofit) ? nil : {self.}XmlChildNoAutofit.BoolValue();
end; end;
function BodyPr.WriteXmlChildNoAutofit(_value); function BodyPr.WriteXmlChildNoAutofit(_value);

View File

@ -161,13 +161,16 @@ end;
function ChartSpace.ReadXmlChildLang(); function ChartSpace.ReadXmlChildLang();
begin begin
if tslassigning and ifnil({self.}XmlChildLang) then if tslassigning then
begin
if ifnil({self.}XmlChildLang) then
begin begin
{self.}XmlChildLang := new OpenXmlEmpty(self, {self.}Prefix, "lang"); {self.}XmlChildLang := new OpenXmlEmpty(self, {self.}Prefix, "lang");
container_.Set({self.}XmlChildLang); container_.Set({self.}XmlChildLang);
end
return {self.}XmlChildLang; return {self.}XmlChildLang;
end end
return ifnil({self.}XmlChildLang) ? false : {self.}XmlChildLang.BoolValue(); return ifnil({self.}XmlChildLang) ? nil : {self.}XmlChildLang.BoolValue();
end; end;
function ChartSpace.WriteXmlChildLang(_value); function ChartSpace.WriteXmlChildLang(_value);

View File

@ -111,13 +111,16 @@ end;
function Compat.ReadXmlChildSpaceForUL(); function Compat.ReadXmlChildSpaceForUL();
begin begin
if tslassigning and ifnil({self.}XmlChildSpaceForUL) then if tslassigning then
begin
if ifnil({self.}XmlChildSpaceForUL) then
begin begin
{self.}XmlChildSpaceForUL := new OpenXmlEmpty(self, {self.}Prefix, "spaceForUL"); {self.}XmlChildSpaceForUL := new OpenXmlEmpty(self, {self.}Prefix, "spaceForUL");
container_.Set({self.}XmlChildSpaceForUL); container_.Set({self.}XmlChildSpaceForUL);
end
return {self.}XmlChildSpaceForUL; return {self.}XmlChildSpaceForUL;
end end
return ifnil({self.}XmlChildSpaceForUL) ? false : {self.}XmlChildSpaceForUL.BoolValue(); return ifnil({self.}XmlChildSpaceForUL) ? nil : {self.}XmlChildSpaceForUL.BoolValue();
end; end;
function Compat.WriteXmlChildSpaceForUL(_value); function Compat.WriteXmlChildSpaceForUL(_value);
@ -132,13 +135,16 @@ end;
function Compat.ReadXmlChildBalanceSingleByteDoubleByteWidth(); function Compat.ReadXmlChildBalanceSingleByteDoubleByteWidth();
begin begin
if tslassigning and ifnil({self.}XmlChildBalanceSingleByteDoubleByteWidth) then if tslassigning then
begin
if ifnil({self.}XmlChildBalanceSingleByteDoubleByteWidth) then
begin begin
{self.}XmlChildBalanceSingleByteDoubleByteWidth := new OpenXmlEmpty(self, {self.}Prefix, "balanceSingleByteDoubleByteWidth"); {self.}XmlChildBalanceSingleByteDoubleByteWidth := new OpenXmlEmpty(self, {self.}Prefix, "balanceSingleByteDoubleByteWidth");
container_.Set({self.}XmlChildBalanceSingleByteDoubleByteWidth); container_.Set({self.}XmlChildBalanceSingleByteDoubleByteWidth);
end
return {self.}XmlChildBalanceSingleByteDoubleByteWidth; return {self.}XmlChildBalanceSingleByteDoubleByteWidth;
end end
return ifnil({self.}XmlChildBalanceSingleByteDoubleByteWidth) ? false : {self.}XmlChildBalanceSingleByteDoubleByteWidth.BoolValue(); return ifnil({self.}XmlChildBalanceSingleByteDoubleByteWidth) ? nil : {self.}XmlChildBalanceSingleByteDoubleByteWidth.BoolValue();
end; end;
function Compat.WriteXmlChildBalanceSingleByteDoubleByteWidth(_value); function Compat.WriteXmlChildBalanceSingleByteDoubleByteWidth(_value);
@ -153,13 +159,16 @@ end;
function Compat.ReadXmlChildDoNotLeaveBackslashAlone(); function Compat.ReadXmlChildDoNotLeaveBackslashAlone();
begin begin
if tslassigning and ifnil({self.}XmlChildDoNotLeaveBackslashAlone) then if tslassigning then
begin
if ifnil({self.}XmlChildDoNotLeaveBackslashAlone) then
begin begin
{self.}XmlChildDoNotLeaveBackslashAlone := new OpenXmlEmpty(self, {self.}Prefix, "doNotLeaveBackslashAlone"); {self.}XmlChildDoNotLeaveBackslashAlone := new OpenXmlEmpty(self, {self.}Prefix, "doNotLeaveBackslashAlone");
container_.Set({self.}XmlChildDoNotLeaveBackslashAlone); container_.Set({self.}XmlChildDoNotLeaveBackslashAlone);
end
return {self.}XmlChildDoNotLeaveBackslashAlone; return {self.}XmlChildDoNotLeaveBackslashAlone;
end end
return ifnil({self.}XmlChildDoNotLeaveBackslashAlone) ? false : {self.}XmlChildDoNotLeaveBackslashAlone.BoolValue(); return ifnil({self.}XmlChildDoNotLeaveBackslashAlone) ? nil : {self.}XmlChildDoNotLeaveBackslashAlone.BoolValue();
end; end;
function Compat.WriteXmlChildDoNotLeaveBackslashAlone(_value); function Compat.WriteXmlChildDoNotLeaveBackslashAlone(_value);
@ -174,13 +183,16 @@ end;
function Compat.ReadXmlChildUlTrailSpace(); function Compat.ReadXmlChildUlTrailSpace();
begin begin
if tslassigning and ifnil({self.}XmlChildUlTrailSpace) then if tslassigning then
begin
if ifnil({self.}XmlChildUlTrailSpace) then
begin begin
{self.}XmlChildUlTrailSpace := new OpenXmlEmpty(self, {self.}Prefix, "ulTrailSpace"); {self.}XmlChildUlTrailSpace := new OpenXmlEmpty(self, {self.}Prefix, "ulTrailSpace");
container_.Set({self.}XmlChildUlTrailSpace); container_.Set({self.}XmlChildUlTrailSpace);
end
return {self.}XmlChildUlTrailSpace; return {self.}XmlChildUlTrailSpace;
end end
return ifnil({self.}XmlChildUlTrailSpace) ? false : {self.}XmlChildUlTrailSpace.BoolValue(); return ifnil({self.}XmlChildUlTrailSpace) ? nil : {self.}XmlChildUlTrailSpace.BoolValue();
end; end;
function Compat.WriteXmlChildUlTrailSpace(_value); function Compat.WriteXmlChildUlTrailSpace(_value);
@ -195,13 +207,16 @@ end;
function Compat.ReadXmlChildDoNotExpandShiftReturn(); function Compat.ReadXmlChildDoNotExpandShiftReturn();
begin begin
if tslassigning and ifnil({self.}XmlChildDoNotExpandShiftReturn) then if tslassigning then
begin
if ifnil({self.}XmlChildDoNotExpandShiftReturn) then
begin begin
{self.}XmlChildDoNotExpandShiftReturn := new OpenXmlEmpty(self, {self.}Prefix, "doNotExpandShiftReturn"); {self.}XmlChildDoNotExpandShiftReturn := new OpenXmlEmpty(self, {self.}Prefix, "doNotExpandShiftReturn");
container_.Set({self.}XmlChildDoNotExpandShiftReturn); container_.Set({self.}XmlChildDoNotExpandShiftReturn);
end
return {self.}XmlChildDoNotExpandShiftReturn; return {self.}XmlChildDoNotExpandShiftReturn;
end end
return ifnil({self.}XmlChildDoNotExpandShiftReturn) ? false : {self.}XmlChildDoNotExpandShiftReturn.BoolValue(); return ifnil({self.}XmlChildDoNotExpandShiftReturn) ? nil : {self.}XmlChildDoNotExpandShiftReturn.BoolValue();
end; end;
function Compat.WriteXmlChildDoNotExpandShiftReturn(_value); function Compat.WriteXmlChildDoNotExpandShiftReturn(_value);
@ -216,13 +231,16 @@ end;
function Compat.ReadXmlChildAdjustLineHeightInTable(); function Compat.ReadXmlChildAdjustLineHeightInTable();
begin begin
if tslassigning and ifnil({self.}XmlChildAdjustLineHeightInTable) then if tslassigning then
begin
if ifnil({self.}XmlChildAdjustLineHeightInTable) then
begin begin
{self.}XmlChildAdjustLineHeightInTable := new OpenXmlEmpty(self, {self.}Prefix, "adjustLineHeightInTable"); {self.}XmlChildAdjustLineHeightInTable := new OpenXmlEmpty(self, {self.}Prefix, "adjustLineHeightInTable");
container_.Set({self.}XmlChildAdjustLineHeightInTable); container_.Set({self.}XmlChildAdjustLineHeightInTable);
end
return {self.}XmlChildAdjustLineHeightInTable; return {self.}XmlChildAdjustLineHeightInTable;
end end
return ifnil({self.}XmlChildAdjustLineHeightInTable) ? false : {self.}XmlChildAdjustLineHeightInTable.BoolValue(); return ifnil({self.}XmlChildAdjustLineHeightInTable) ? nil : {self.}XmlChildAdjustLineHeightInTable.BoolValue();
end; end;
function Compat.WriteXmlChildAdjustLineHeightInTable(_value); function Compat.WriteXmlChildAdjustLineHeightInTable(_value);
@ -237,13 +255,16 @@ end;
function Compat.ReadXmlChildUseFELayout(); function Compat.ReadXmlChildUseFELayout();
begin begin
if tslassigning and ifnil({self.}XmlChildUseFELayout) then if tslassigning then
begin
if ifnil({self.}XmlChildUseFELayout) then
begin begin
{self.}XmlChildUseFELayout := new OpenXmlEmpty(self, {self.}Prefix, "useFELayout"); {self.}XmlChildUseFELayout := new OpenXmlEmpty(self, {self.}Prefix, "useFELayout");
container_.Set({self.}XmlChildUseFELayout); container_.Set({self.}XmlChildUseFELayout);
end
return {self.}XmlChildUseFELayout; return {self.}XmlChildUseFELayout;
end end
return ifnil({self.}XmlChildUseFELayout) ? false : {self.}XmlChildUseFELayout.BoolValue(); return ifnil({self.}XmlChildUseFELayout) ? nil : {self.}XmlChildUseFELayout.BoolValue();
end; end;
function Compat.WriteXmlChildUseFELayout(_value); function Compat.WriteXmlChildUseFELayout(_value);
@ -258,13 +279,16 @@ end;
function Compat.ReadXmlChildCompatSetting(); function Compat.ReadXmlChildCompatSetting();
begin begin
if tslassigning and ifnil({self.}XmlChildCompatSetting) then if tslassigning then
begin
if ifnil({self.}XmlChildCompatSetting) then
begin begin
{self.}XmlChildCompatSetting := new OpenXmlEmpty(self, {self.}Prefix, "compatSetting"); {self.}XmlChildCompatSetting := new OpenXmlEmpty(self, {self.}Prefix, "compatSetting");
container_.Set({self.}XmlChildCompatSetting); container_.Set({self.}XmlChildCompatSetting);
end
return {self.}XmlChildCompatSetting; return {self.}XmlChildCompatSetting;
end end
return ifnil({self.}XmlChildCompatSetting) ? false : {self.}XmlChildCompatSetting.BoolValue(); return ifnil({self.}XmlChildCompatSetting) ? nil : {self.}XmlChildCompatSetting.BoolValue();
end; end;
function Compat.WriteXmlChildCompatSetting(_value); function Compat.WriteXmlChildCompatSetting(_value);

169
autoclass/docx/Ins@DOCX.tsf Normal file
View File

@ -0,0 +1,169 @@
type Ins = 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: Ins);override;
public
// attributes property
property Id read ReadXmlAttrId write WriteXmlAttrId;
property Author read ReadXmlAttrAuthor write WriteXmlAttrAuthor;
property Date read ReadXmlAttrDate write WriteXmlAttrDate;
property W16duDateUtc read ReadXmlAttrW16duDateUtc write WriteXmlAttrW16duDateUtc;
function ReadXmlAttrId();
function WriteXmlAttrId(_value);
function ReadXmlAttrAuthor();
function WriteXmlAttrAuthor(_value);
function ReadXmlAttrDate();
function WriteXmlAttrDate(_value);
function ReadXmlAttrW16duDateUtc();
function WriteXmlAttrW16duDateUtc(_value);
// multi property
property Rs read ReadRs;
function ReadRs(_index);
function AddR(): R;
function AppendR(): R;
public
// Attributes
XmlAttrId: OpenXmlAttribute;
XmlAttrAuthor: OpenXmlAttribute;
XmlAttrDate: OpenXmlAttribute;
XmlAttrW16duDateUtc: OpenXmlAttribute;
// Children
end;
function Ins.Create();overload;
begin
{self.}Create(nil, "w", "gridCol");
end;
function Ins.Create(_node: XmlNode);overload;
begin
class(OpenXmlElement).Create(_node: XmlNode);
end;
function Ins.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 Ins.Init();override;
begin
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
attributes_ := array();
attributes_pf_ := array(
pre + "id": makeweakref(thisFunction(WriteXmlAttrId)),
pre + "author": makeweakref(thisFunction(WriteXmlAttrAuthor)),
pre + "date": makeweakref(thisFunction(WriteXmlAttrDate)),
"w16du:dateUtc": makeweakref(thisFunction(WriteXmlAttrW16duDateUtc)),
);
sorted_child_ := array(
pre + "r": array(0, makeweakref(thisFunction(AppendR))),
);
container_ := new TSOfficeContainer(sorted_child_);
end;
function Ins.Copy(_obj: Ins);override;
begin
tslassigning_backup := tslassigning;
tslassigning := 1;
class(OpenXmlElement).Copy(_obj);
if not ifnil(_obj.Id) then
{self.}Id := _obj.Id;
if not ifnil(_obj.Author) then
{self.}Author := _obj.Author;
if not ifnil(_obj.Date) then
{self.}Date := _obj.Date;
if not ifnil(_obj.W16duDateUtc) then
{self.}W16duDateUtc := _obj.W16duDateUtc;
tslassigning := tslassigning_backup;
end;
function Ins.ReadXmlAttrId();
begin
return {self.}XmlAttrId.Value;
end;
function Ins.WriteXmlAttrId(_value);
begin
if ifnil({self.}XmlAttrId) then
begin
{self.}XmlAttrId := new OpenXmlAttribute({self.}Prefix, "id", nil);
attributes_[length(attributes_)] := {self.}XmlAttrId;
end
{self.}XmlAttrId.Value := _value;
end;
function Ins.ReadXmlAttrAuthor();
begin
return {self.}XmlAttrAuthor.Value;
end;
function Ins.WriteXmlAttrAuthor(_value);
begin
if ifnil({self.}XmlAttrAuthor) then
begin
{self.}XmlAttrAuthor := new OpenXmlAttribute({self.}Prefix, "author", nil);
attributes_[length(attributes_)] := {self.}XmlAttrAuthor;
end
{self.}XmlAttrAuthor.Value := _value;
end;
function Ins.ReadXmlAttrDate();
begin
return {self.}XmlAttrDate.Value;
end;
function Ins.WriteXmlAttrDate(_value);
begin
if ifnil({self.}XmlAttrDate) then
begin
{self.}XmlAttrDate := new OpenXmlAttribute({self.}Prefix, "date", nil);
attributes_[length(attributes_)] := {self.}XmlAttrDate;
end
{self.}XmlAttrDate.Value := _value;
end;
function Ins.ReadXmlAttrW16duDateUtc();
begin
return {self.}XmlAttrW16duDateUtc.Value;
end;
function Ins.WriteXmlAttrW16duDateUtc(_value);
begin
if ifnil({self.}XmlAttrW16duDateUtc) then
begin
{self.}XmlAttrW16duDateUtc := new OpenXmlAttribute("w16du", "dateUtc", nil);
attributes_[length(attributes_)] := {self.}XmlAttrW16duDateUtc;
end
{self.}XmlAttrW16duDateUtc.Value := _value;
end;
function Ins.ReadRs(_index);
begin
ind := ifnil(_index) ? -2 : _index;
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
return container_.Get(pre + "r", ind);
end;
function Ins.AddR(): R;
begin
obj := new R(self, {self.}Prefix, "r");
container_.Insert(obj);
return obj;
end;
function Ins.AppendR(): R;
begin
obj := new R(self, {self.}Prefix, "r");
container_.Append(obj);
return obj;
end;

View File

@ -79,13 +79,16 @@ end;
function Legend.ReadXmlChildLayout(); function Legend.ReadXmlChildLayout();
begin begin
if tslassigning and ifnil({self.}XmlChildLayout) then if tslassigning then
begin
if ifnil({self.}XmlChildLayout) then
begin begin
{self.}XmlChildLayout := new OpenXmlEmpty(self, {self.}Prefix, "layout"); {self.}XmlChildLayout := new OpenXmlEmpty(self, {self.}Prefix, "layout");
container_.Set({self.}XmlChildLayout); container_.Set({self.}XmlChildLayout);
end
return {self.}XmlChildLayout; return {self.}XmlChildLayout;
end end
return ifnil({self.}XmlChildLayout) ? false : {self.}XmlChildLayout.BoolValue(); return ifnil({self.}XmlChildLayout) ? nil : {self.}XmlChildLayout.BoolValue();
end; end;
function Legend.WriteXmlChildLayout(_value); function Legend.WriteXmlChildLayout(_value);

View File

@ -121,13 +121,16 @@ end;
function MathPr.ReadXmlChildDispDef(); function MathPr.ReadXmlChildDispDef();
begin begin
if tslassigning and ifnil({self.}XmlChildDispDef) then if tslassigning then
begin
if ifnil({self.}XmlChildDispDef) then
begin begin
{self.}XmlChildDispDef := new OpenXmlEmpty(self, {self.}Prefix, "dispDef"); {self.}XmlChildDispDef := new OpenXmlEmpty(self, {self.}Prefix, "dispDef");
container_.Set({self.}XmlChildDispDef); container_.Set({self.}XmlChildDispDef);
end
return {self.}XmlChildDispDef; return {self.}XmlChildDispDef;
end end
return ifnil({self.}XmlChildDispDef) ? false : {self.}XmlChildDispDef.BoolValue(); return ifnil({self.}XmlChildDispDef) ? nil : {self.}XmlChildDispDef.BoolValue();
end; end;
function MathPr.WriteXmlChildDispDef(_value); function MathPr.WriteXmlChildDispDef(_value);

View File

@ -30,7 +30,9 @@ public
// normal property // normal property
property PPr read ReadXmlChildPPr; property PPr read ReadXmlChildPPr;
property Ins read ReadXmlChildIns;
function ReadXmlChildPPr(); function ReadXmlChildPPr();
function ReadXmlChildIns();
// multi property // multi property
property Rs read ReadRs; property Rs read ReadRs;
@ -73,6 +75,7 @@ public
// Children // Children
XmlChildPPr: PPr; XmlChildPPr: PPr;
XmlChildIns: Ins;
end; end;
@ -106,13 +109,14 @@ begin
); );
sorted_child_ := array( sorted_child_ := array(
pre + "pPr": array(0, makeweakref(thisFunction(ReadXmlChildPPr))), pre + "pPr": array(0, makeweakref(thisFunction(ReadXmlChildPPr))),
pre + "r": array(1, makeweakref(thisFunction(AppendR))), pre + "ins": array(1, makeweakref(thisFunction(ReadXmlChildIns))),
pre + "commentRangeStart": array(2, makeweakref(thisFunction(AppendCommentRangeStart))), pre + "r": array(2, makeweakref(thisFunction(AppendR))),
pre + "commentRangeEnd": array(3, makeweakref(thisFunction(AppendCommentRangeEnd))), pre + "commentRangeStart": array(3, makeweakref(thisFunction(AppendCommentRangeStart))),
pre + "bookmarkStart": array(4, makeweakref(thisFunction(AppendBookmarkStart))), pre + "commentRangeEnd": array(4, makeweakref(thisFunction(AppendCommentRangeEnd))),
pre + "bookmarkEnd": array(5, makeweakref(thisFunction(AppendBookmarkEnd))), pre + "bookmarkStart": array(5, makeweakref(thisFunction(AppendBookmarkStart))),
pre + "hyperlink": array(6, makeweakref(thisFunction(AppendHyperLink))), pre + "bookmarkEnd": array(6, makeweakref(thisFunction(AppendBookmarkEnd))),
pre + "fldSimple": array(7, makeweakref(thisFunction(AppendFldSimple))), pre + "hyperlink": array(7, makeweakref(thisFunction(AppendHyperLink))),
pre + "fldSimple": array(8, makeweakref(thisFunction(AppendFldSimple))),
); );
container_ := new TSOfficeContainer(sorted_child_); container_ := new TSOfficeContainer(sorted_child_);
end; end;
@ -136,6 +140,8 @@ begin
{self.}WRsidP := _obj.WRsidP; {self.}WRsidP := _obj.WRsidP;
if not ifnil(_obj.XmlChildPPr) then if not ifnil(_obj.XmlChildPPr) then
{self.}PPr.Copy(_obj.XmlChildPPr); {self.}PPr.Copy(_obj.XmlChildPPr);
if not ifnil(_obj.XmlChildIns) then
{self.}Ins.Copy(_obj.XmlChildIns);
tslassigning := tslassigning_backup; tslassigning := tslassigning_backup;
end; end;
@ -239,6 +245,16 @@ begin
return {self.}XmlChildPPr; return {self.}XmlChildPPr;
end; end;
function P.ReadXmlChildIns();
begin
if tslassigning and ifnil({self.}XmlChildIns) then
begin
{self.}XmlChildIns := new Ins(self, {self.}Prefix, "ins");
container_.Set({self.}XmlChildIns);
end
return {self.}XmlChildIns;
end;
function P.ReadRs(_index); function P.ReadRs(_index);
begin begin
ind := ifnil(_index) ? -2 : _index; ind := ifnil(_index) ? -2 : _index;

View File

@ -10,12 +10,15 @@ public
// empty property // empty property
property WidowControl read ReadXmlChildWidowControl write WriteXmlChildWidowControl; property WidowControl read ReadXmlChildWidowControl write WriteXmlChildWidowControl;
property SnapToGrid read ReadXmlChildSnapToGrid write WriteXmlChildSnapToGrid;
property KeepNext read ReadXmlChildKeepNext write WriteXmlChildKeepNext; property KeepNext read ReadXmlChildKeepNext write WriteXmlChildKeepNext;
property KeepLines read ReadXmlChildKeepLines write WriteXmlChildKeepLines; property KeepLines read ReadXmlChildKeepLines write WriteXmlChildKeepLines;
property PageBreakBefore read ReadXmlChildPageBreakBefore write WriteXmlChildPageBreakBefore; property PageBreakBefore read ReadXmlChildPageBreakBefore write WriteXmlChildPageBreakBefore;
property ContextualSpacing read ReadXmlChildContextualSpacing write WriteXmlChildContextualSpacing; property ContextualSpacing read ReadXmlChildContextualSpacing write WriteXmlChildContextualSpacing;
function ReadXmlChildWidowControl(); function ReadXmlChildWidowControl();
function WriteXmlChildWidowControl(_value); function WriteXmlChildWidowControl(_value);
function ReadXmlChildSnapToGrid();
function WriteXmlChildSnapToGrid(_value);
function ReadXmlChildKeepNext(); function ReadXmlChildKeepNext();
function WriteXmlChildKeepNext(_value); function WriteXmlChildKeepNext(_value);
function ReadXmlChildKeepLines(); function ReadXmlChildKeepLines();
@ -28,7 +31,6 @@ public
// normal property // normal property
property SectPr read ReadXmlChildSectPr; property SectPr read ReadXmlChildSectPr;
property Tabs read ReadXmlChildTabs; property Tabs read ReadXmlChildTabs;
property SnapToGrid read ReadXmlChildSnapToGrid;
property PStyle read ReadXmlChildPStyle; property PStyle read ReadXmlChildPStyle;
property NumPr read ReadXmlChildNumPr; property NumPr read ReadXmlChildNumPr;
property Jc read ReadXmlChildJc; property Jc read ReadXmlChildJc;
@ -45,7 +47,6 @@ public
property TextboxTightWrap read ReadXmlChildTextboxTightWrap; property TextboxTightWrap read ReadXmlChildTextboxTightWrap;
function ReadXmlChildSectPr(); function ReadXmlChildSectPr();
function ReadXmlChildTabs(); function ReadXmlChildTabs();
function ReadXmlChildSnapToGrid();
function ReadXmlChildPStyle(); function ReadXmlChildPStyle();
function ReadXmlChildNumPr(); function ReadXmlChildNumPr();
function ReadXmlChildJc(); function ReadXmlChildJc();
@ -66,7 +67,7 @@ public
XmlChildSectPr: SectPr; XmlChildSectPr: SectPr;
XmlChildTabs: Tabs; XmlChildTabs: Tabs;
XmlChildWidowControl: OpenXmlEmpty; XmlChildWidowControl: OpenXmlEmpty;
XmlChildSnapToGrid: PureWVal; XmlChildSnapToGrid: OpenXmlEmpty;
XmlChildPStyle: PureWVal; XmlChildPStyle: PureWVal;
XmlChildNumPr: NumPr; XmlChildNumPr: NumPr;
XmlChildJc: PureWVal; XmlChildJc: PureWVal;
@ -149,7 +150,7 @@ begin
if not ifnil(_obj.XmlChildWidowControl) then if not ifnil(_obj.XmlChildWidowControl) then
ifnil({self.}XmlChildWidowControl) ? {self.}WidowControl.Copy(_obj.XmlChildWidowControl) : {self.}XmlChildWidowControl.Copy(_obj.XmlChildWidowControl); ifnil({self.}XmlChildWidowControl) ? {self.}WidowControl.Copy(_obj.XmlChildWidowControl) : {self.}XmlChildWidowControl.Copy(_obj.XmlChildWidowControl);
if not ifnil(_obj.XmlChildSnapToGrid) then if not ifnil(_obj.XmlChildSnapToGrid) then
{self.}SnapToGrid.Copy(_obj.XmlChildSnapToGrid); ifnil({self.}XmlChildSnapToGrid) ? {self.}SnapToGrid.Copy(_obj.XmlChildSnapToGrid) : {self.}XmlChildSnapToGrid.Copy(_obj.XmlChildSnapToGrid);
if not ifnil(_obj.XmlChildPStyle) then if not ifnil(_obj.XmlChildPStyle) then
{self.}PStyle.Copy(_obj.XmlChildPStyle); {self.}PStyle.Copy(_obj.XmlChildPStyle);
if not ifnil(_obj.XmlChildNumPr) then if not ifnil(_obj.XmlChildNumPr) then
@ -191,13 +192,16 @@ end;
function PPr.ReadXmlChildWidowControl(); function PPr.ReadXmlChildWidowControl();
begin begin
if tslassigning and ifnil({self.}XmlChildWidowControl) then if tslassigning then
begin
if ifnil({self.}XmlChildWidowControl) then
begin begin
{self.}XmlChildWidowControl := new OpenXmlEmpty(self, {self.}Prefix, "widowControl"); {self.}XmlChildWidowControl := new OpenXmlEmpty(self, {self.}Prefix, "widowControl");
container_.Set({self.}XmlChildWidowControl); container_.Set({self.}XmlChildWidowControl);
end
return {self.}XmlChildWidowControl; return {self.}XmlChildWidowControl;
end end
return ifnil({self.}XmlChildWidowControl) ? false : {self.}XmlChildWidowControl.BoolValue(); return ifnil({self.}XmlChildWidowControl) ? nil : {self.}XmlChildWidowControl.BoolValue();
end; end;
function PPr.WriteXmlChildWidowControl(_value); function PPr.WriteXmlChildWidowControl(_value);
@ -210,15 +214,42 @@ begin
{self.}XmlChildWidowControl.Value := _value; {self.}XmlChildWidowControl.Value := _value;
end; end;
function PPr.ReadXmlChildSnapToGrid();
begin
if tslassigning then
begin
if ifnil({self.}XmlChildSnapToGrid) then
begin
{self.}XmlChildSnapToGrid := new OpenXmlEmpty(self, {self.}Prefix, "snapToGrid");
container_.Set({self.}XmlChildSnapToGrid);
end
return {self.}XmlChildSnapToGrid;
end
return ifnil({self.}XmlChildSnapToGrid) ? nil : {self.}XmlChildSnapToGrid.BoolValue();
end;
function PPr.WriteXmlChildSnapToGrid(_value);
begin
if ifnil({self.}XmlChildSnapToGrid) then
begin
{self.}XmlChildSnapToGrid := new OpenXmlEmpty(self, {self.}Prefix, "snapToGrid");
container_.Set({self.}XmlChildSnapToGrid);
end
{self.}XmlChildSnapToGrid.Value := _value;
end;
function PPr.ReadXmlChildKeepNext(); function PPr.ReadXmlChildKeepNext();
begin begin
if tslassigning and ifnil({self.}XmlChildKeepNext) then if tslassigning then
begin
if ifnil({self.}XmlChildKeepNext) then
begin begin
{self.}XmlChildKeepNext := new OpenXmlEmpty(self, {self.}Prefix, "keepNext"); {self.}XmlChildKeepNext := new OpenXmlEmpty(self, {self.}Prefix, "keepNext");
container_.Set({self.}XmlChildKeepNext); container_.Set({self.}XmlChildKeepNext);
end
return {self.}XmlChildKeepNext; return {self.}XmlChildKeepNext;
end end
return ifnil({self.}XmlChildKeepNext) ? false : {self.}XmlChildKeepNext.BoolValue(); return ifnil({self.}XmlChildKeepNext) ? nil : {self.}XmlChildKeepNext.BoolValue();
end; end;
function PPr.WriteXmlChildKeepNext(_value); function PPr.WriteXmlChildKeepNext(_value);
@ -233,13 +264,16 @@ end;
function PPr.ReadXmlChildKeepLines(); function PPr.ReadXmlChildKeepLines();
begin begin
if tslassigning and ifnil({self.}XmlChildKeepLines) then if tslassigning then
begin
if ifnil({self.}XmlChildKeepLines) then
begin begin
{self.}XmlChildKeepLines := new OpenXmlEmpty(self, {self.}Prefix, "keepLines"); {self.}XmlChildKeepLines := new OpenXmlEmpty(self, {self.}Prefix, "keepLines");
container_.Set({self.}XmlChildKeepLines); container_.Set({self.}XmlChildKeepLines);
end
return {self.}XmlChildKeepLines; return {self.}XmlChildKeepLines;
end end
return ifnil({self.}XmlChildKeepLines) ? false : {self.}XmlChildKeepLines.BoolValue(); return ifnil({self.}XmlChildKeepLines) ? nil : {self.}XmlChildKeepLines.BoolValue();
end; end;
function PPr.WriteXmlChildKeepLines(_value); function PPr.WriteXmlChildKeepLines(_value);
@ -254,13 +288,16 @@ end;
function PPr.ReadXmlChildPageBreakBefore(); function PPr.ReadXmlChildPageBreakBefore();
begin begin
if tslassigning and ifnil({self.}XmlChildPageBreakBefore) then if tslassigning then
begin
if ifnil({self.}XmlChildPageBreakBefore) then
begin begin
{self.}XmlChildPageBreakBefore := new OpenXmlEmpty(self, {self.}Prefix, "pageBreakBefore"); {self.}XmlChildPageBreakBefore := new OpenXmlEmpty(self, {self.}Prefix, "pageBreakBefore");
container_.Set({self.}XmlChildPageBreakBefore); container_.Set({self.}XmlChildPageBreakBefore);
end
return {self.}XmlChildPageBreakBefore; return {self.}XmlChildPageBreakBefore;
end end
return ifnil({self.}XmlChildPageBreakBefore) ? false : {self.}XmlChildPageBreakBefore.BoolValue(); return ifnil({self.}XmlChildPageBreakBefore) ? nil : {self.}XmlChildPageBreakBefore.BoolValue();
end; end;
function PPr.WriteXmlChildPageBreakBefore(_value); function PPr.WriteXmlChildPageBreakBefore(_value);
@ -275,13 +312,16 @@ end;
function PPr.ReadXmlChildContextualSpacing(); function PPr.ReadXmlChildContextualSpacing();
begin begin
if tslassigning and ifnil({self.}XmlChildContextualSpacing) then if tslassigning then
begin
if ifnil({self.}XmlChildContextualSpacing) then
begin begin
{self.}XmlChildContextualSpacing := new OpenXmlEmpty(self, {self.}Prefix, "contextualSpacing"); {self.}XmlChildContextualSpacing := new OpenXmlEmpty(self, {self.}Prefix, "contextualSpacing");
container_.Set({self.}XmlChildContextualSpacing); container_.Set({self.}XmlChildContextualSpacing);
end
return {self.}XmlChildContextualSpacing; return {self.}XmlChildContextualSpacing;
end end
return ifnil({self.}XmlChildContextualSpacing) ? false : {self.}XmlChildContextualSpacing.BoolValue(); return ifnil({self.}XmlChildContextualSpacing) ? nil : {self.}XmlChildContextualSpacing.BoolValue();
end; end;
function PPr.WriteXmlChildContextualSpacing(_value); function PPr.WriteXmlChildContextualSpacing(_value);
@ -314,16 +354,6 @@ begin
return {self.}XmlChildTabs; return {self.}XmlChildTabs;
end; 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(); function PPr.ReadXmlChildPStyle();
begin begin
if tslassigning and ifnil({self.}XmlChildPStyle) then if tslassigning and ifnil({self.}XmlChildPStyle) then

View File

@ -91,13 +91,16 @@ end;
function PlotArea.ReadXmlChildLayout(); function PlotArea.ReadXmlChildLayout();
begin begin
if tslassigning and ifnil({self.}XmlChildLayout) then if tslassigning then
begin
if ifnil({self.}XmlChildLayout) then
begin begin
{self.}XmlChildLayout := new OpenXmlEmpty(self, {self.}Prefix, "layout"); {self.}XmlChildLayout := new OpenXmlEmpty(self, {self.}Prefix, "layout");
container_.Set({self.}XmlChildLayout); container_.Set({self.}XmlChildLayout);
end
return {self.}XmlChildLayout; return {self.}XmlChildLayout;
end end
return ifnil({self.}XmlChildLayout) ? false : {self.}XmlChildLayout.BoolValue(); return ifnil({self.}XmlChildLayout) ? nil : {self.}XmlChildLayout.BoolValue();
end; end;
function PlotArea.WriteXmlChildLayout(_value); function PlotArea.WriteXmlChildLayout(_value);

View File

@ -85,13 +85,16 @@ end;
function PrstTxWrap.ReadXmlChildAvLst(); function PrstTxWrap.ReadXmlChildAvLst();
begin begin
if tslassigning and ifnil({self.}XmlChildAvLst) then if tslassigning then
begin
if ifnil({self.}XmlChildAvLst) then
begin begin
{self.}XmlChildAvLst := new OpenXmlEmpty(self, "a", "avLst"); {self.}XmlChildAvLst := new OpenXmlEmpty(self, "a", "avLst");
container_.Set({self.}XmlChildAvLst); container_.Set({self.}XmlChildAvLst);
end
return {self.}XmlChildAvLst; return {self.}XmlChildAvLst;
end end
return ifnil({self.}XmlChildAvLst) ? false : {self.}XmlChildAvLst.BoolValue(); return ifnil({self.}XmlChildAvLst) ? nil : {self.}XmlChildAvLst.BoolValue();
end; end;
function PrstTxWrap.WriteXmlChildAvLst(_value); function PrstTxWrap.WriteXmlChildAvLst(_value);

View File

@ -206,13 +206,16 @@ end;
function R.ReadXmlChildSeparator(); function R.ReadXmlChildSeparator();
begin begin
if tslassigning and ifnil({self.}XmlChildSeparator) then if tslassigning then
begin
if ifnil({self.}XmlChildSeparator) then
begin begin
{self.}XmlChildSeparator := new OpenXmlEmpty(self, {self.}Prefix, "separator"); {self.}XmlChildSeparator := new OpenXmlEmpty(self, {self.}Prefix, "separator");
container_.Set({self.}XmlChildSeparator); container_.Set({self.}XmlChildSeparator);
end
return {self.}XmlChildSeparator; return {self.}XmlChildSeparator;
end end
return ifnil({self.}XmlChildSeparator) ? false : {self.}XmlChildSeparator.BoolValue(); return ifnil({self.}XmlChildSeparator) ? nil : {self.}XmlChildSeparator.BoolValue();
end; end;
function R.WriteXmlChildSeparator(_value); function R.WriteXmlChildSeparator(_value);
@ -227,13 +230,16 @@ end;
function R.ReadXmlChildContinuationSeparator(); function R.ReadXmlChildContinuationSeparator();
begin begin
if tslassigning and ifnil({self.}XmlChildContinuationSeparator) then if tslassigning then
begin
if ifnil({self.}XmlChildContinuationSeparator) then
begin begin
{self.}XmlChildContinuationSeparator := new OpenXmlEmpty(self, {self.}Prefix, "continuationSeparator"); {self.}XmlChildContinuationSeparator := new OpenXmlEmpty(self, {self.}Prefix, "continuationSeparator");
container_.Set({self.}XmlChildContinuationSeparator); container_.Set({self.}XmlChildContinuationSeparator);
end
return {self.}XmlChildContinuationSeparator; return {self.}XmlChildContinuationSeparator;
end end
return ifnil({self.}XmlChildContinuationSeparator) ? false : {self.}XmlChildContinuationSeparator.BoolValue(); return ifnil({self.}XmlChildContinuationSeparator) ? nil : {self.}XmlChildContinuationSeparator.BoolValue();
end; end;
function R.WriteXmlChildContinuationSeparator(_value); function R.WriteXmlChildContinuationSeparator(_value);
@ -248,13 +254,16 @@ end;
function R.ReadXmlChildLastRenderedPageBreak(); function R.ReadXmlChildLastRenderedPageBreak();
begin begin
if tslassigning and ifnil({self.}XmlChildLastRenderedPageBreak) then if tslassigning then
begin
if ifnil({self.}XmlChildLastRenderedPageBreak) then
begin begin
{self.}XmlChildLastRenderedPageBreak := new OpenXmlEmpty(self, {self.}Prefix, "lastRenderedPageBreak"); {self.}XmlChildLastRenderedPageBreak := new OpenXmlEmpty(self, {self.}Prefix, "lastRenderedPageBreak");
container_.Set({self.}XmlChildLastRenderedPageBreak); container_.Set({self.}XmlChildLastRenderedPageBreak);
end
return {self.}XmlChildLastRenderedPageBreak; return {self.}XmlChildLastRenderedPageBreak;
end end
return ifnil({self.}XmlChildLastRenderedPageBreak) ? false : {self.}XmlChildLastRenderedPageBreak.BoolValue(); return ifnil({self.}XmlChildLastRenderedPageBreak) ? nil : {self.}XmlChildLastRenderedPageBreak.BoolValue();
end; end;
function R.WriteXmlChildLastRenderedPageBreak(_value); function R.WriteXmlChildLastRenderedPageBreak(_value);
@ -269,13 +278,16 @@ end;
function R.ReadXmlChildFootnoteRef(); function R.ReadXmlChildFootnoteRef();
begin begin
if tslassigning and ifnil({self.}XmlChildFootnoteRef) then if tslassigning then
begin
if ifnil({self.}XmlChildFootnoteRef) then
begin begin
{self.}XmlChildFootnoteRef := new OpenXmlEmpty(self, {self.}Prefix, "footnoteRef"); {self.}XmlChildFootnoteRef := new OpenXmlEmpty(self, {self.}Prefix, "footnoteRef");
container_.Set({self.}XmlChildFootnoteRef); container_.Set({self.}XmlChildFootnoteRef);
end
return {self.}XmlChildFootnoteRef; return {self.}XmlChildFootnoteRef;
end end
return ifnil({self.}XmlChildFootnoteRef) ? false : {self.}XmlChildFootnoteRef.BoolValue(); return ifnil({self.}XmlChildFootnoteRef) ? nil : {self.}XmlChildFootnoteRef.BoolValue();
end; end;
function R.WriteXmlChildFootnoteRef(_value); function R.WriteXmlChildFootnoteRef(_value);

View File

@ -33,6 +33,7 @@ public
property Position read ReadXmlChildPosition; property Position read ReadXmlChildPosition;
property WebHidden read ReadXmlChildWebHidden; property WebHidden read ReadXmlChildWebHidden;
property RStyle read ReadXmlChildRStyle; property RStyle read ReadXmlChildRStyle;
property Ins read ReadXmlChildIns;
property RFonts read ReadXmlChildRFonts; property RFonts read ReadXmlChildRFonts;
property Kern read ReadXmlChildKern; property Kern read ReadXmlChildKern;
property Color read ReadXmlChildColor; property Color read ReadXmlChildColor;
@ -45,6 +46,7 @@ public
function ReadXmlChildPosition(); function ReadXmlChildPosition();
function ReadXmlChildWebHidden(); function ReadXmlChildWebHidden();
function ReadXmlChildRStyle(); function ReadXmlChildRStyle();
function ReadXmlChildIns();
function ReadXmlChildRFonts(); function ReadXmlChildRFonts();
function ReadXmlChildKern(); function ReadXmlChildKern();
function ReadXmlChildColor(); function ReadXmlChildColor();
@ -60,6 +62,7 @@ public
XmlChildPosition: PureVal; XmlChildPosition: PureVal;
XmlChildWebHidden: PureWVal; XmlChildWebHidden: PureWVal;
XmlChildRStyle: PureWVal; XmlChildRStyle: PureWVal;
XmlChildIns: Ins;
XmlChildRFonts: RFonts; XmlChildRFonts: RFonts;
XmlChildKern: PureWVal; XmlChildKern: PureWVal;
XmlChildI: OpenXmlEmpty; XmlChildI: OpenXmlEmpty;
@ -104,20 +107,21 @@ begin
pre + "position": array(1, makeweakref(thisFunction(ReadXmlChildPosition))), pre + "position": array(1, makeweakref(thisFunction(ReadXmlChildPosition))),
pre + "wedHidden": array(2, makeweakref(thisFunction(ReadXmlChildWebHidden))), pre + "wedHidden": array(2, makeweakref(thisFunction(ReadXmlChildWebHidden))),
pre + "rStyle": array(3, makeweakref(thisFunction(ReadXmlChildRStyle))), pre + "rStyle": array(3, makeweakref(thisFunction(ReadXmlChildRStyle))),
pre + "rFonts": array(4, makeweakref(thisFunction(ReadXmlChildRFonts))), pre + "ins": array(4, makeweakref(thisFunction(ReadXmlChildIns))),
pre + "kern": array(5, makeweakref(thisFunction(ReadXmlChildKern))), pre + "rFonts": array(5, makeweakref(thisFunction(ReadXmlChildRFonts))),
pre + "i": array(6, makeweakref(thisFunction(ReadXmlChildI))), pre + "kern": array(6, makeweakref(thisFunction(ReadXmlChildKern))),
pre + "iCs": array(7, makeweakref(thisFunction(ReadXmlChildICs))), pre + "i": array(7, makeweakref(thisFunction(ReadXmlChildI))),
pre + "b": array(8, makeweakref(thisFunction(ReadXmlChildB))), pre + "iCs": array(8, makeweakref(thisFunction(ReadXmlChildICs))),
pre + "bCs": array(9, makeweakref(thisFunction(ReadXmlChildBCs))), pre + "b": array(9, makeweakref(thisFunction(ReadXmlChildB))),
pre + "strike": array(10, makeweakref(thisFunction(ReadXmlChildStrike))), pre + "bCs": array(10, makeweakref(thisFunction(ReadXmlChildBCs))),
pre + "color": array(11, makeweakref(thisFunction(ReadXmlChildColor))), pre + "strike": array(11, makeweakref(thisFunction(ReadXmlChildStrike))),
pre + "sz": array(12, makeweakref(thisFunction(ReadXmlChildSz))), pre + "color": array(12, makeweakref(thisFunction(ReadXmlChildColor))),
pre + "szCs": array(13, makeweakref(thisFunction(ReadXmlChildSzCs))), pre + "sz": array(13, makeweakref(thisFunction(ReadXmlChildSz))),
pre + "u": array(14, makeweakref(thisFunction(ReadXmlChildU))), pre + "szCs": array(14, makeweakref(thisFunction(ReadXmlChildSzCs))),
pre + "lang": array(15, makeweakref(thisFunction(ReadXmlChildLang))), pre + "u": array(15, makeweakref(thisFunction(ReadXmlChildU))),
pre + "vertAlign": array(16, makeweakref(thisFunction(ReadXmlChildVertAlign))), pre + "lang": array(16, makeweakref(thisFunction(ReadXmlChildLang))),
"w14:ligatures": array(17, makeweakref(thisFunction(ReadXmlChildW14Ligatures))), pre + "vertAlign": array(17, makeweakref(thisFunction(ReadXmlChildVertAlign))),
"w14:ligatures": array(18, makeweakref(thisFunction(ReadXmlChildW14Ligatures))),
); );
container_ := new TSOfficeContainer(sorted_child_); container_ := new TSOfficeContainer(sorted_child_);
end; end;
@ -135,6 +139,8 @@ begin
{self.}WebHidden.Copy(_obj.XmlChildWebHidden); {self.}WebHidden.Copy(_obj.XmlChildWebHidden);
if not ifnil(_obj.XmlChildRStyle) then if not ifnil(_obj.XmlChildRStyle) then
{self.}RStyle.Copy(_obj.XmlChildRStyle); {self.}RStyle.Copy(_obj.XmlChildRStyle);
if not ifnil(_obj.XmlChildIns) then
{self.}Ins.Copy(_obj.XmlChildIns);
if not ifnil(_obj.XmlChildRFonts) then if not ifnil(_obj.XmlChildRFonts) then
{self.}RFonts.Copy(_obj.XmlChildRFonts); {self.}RFonts.Copy(_obj.XmlChildRFonts);
if not ifnil(_obj.XmlChildKern) then if not ifnil(_obj.XmlChildKern) then
@ -168,13 +174,16 @@ end;
function RPr.ReadXmlChildI(); function RPr.ReadXmlChildI();
begin begin
if tslassigning and ifnil({self.}XmlChildI) then if tslassigning then
begin
if ifnil({self.}XmlChildI) then
begin begin
{self.}XmlChildI := new OpenXmlEmpty(self, {self.}Prefix, "i"); {self.}XmlChildI := new OpenXmlEmpty(self, {self.}Prefix, "i");
container_.Set({self.}XmlChildI); container_.Set({self.}XmlChildI);
end
return {self.}XmlChildI; return {self.}XmlChildI;
end end
return ifnil({self.}XmlChildI) ? false : {self.}XmlChildI.BoolValue(); return ifnil({self.}XmlChildI) ? nil : {self.}XmlChildI.BoolValue();
end; end;
function RPr.WriteXmlChildI(_value); function RPr.WriteXmlChildI(_value);
@ -189,13 +198,16 @@ end;
function RPr.ReadXmlChildICs(); function RPr.ReadXmlChildICs();
begin begin
if tslassigning and ifnil({self.}XmlChildICs) then if tslassigning then
begin
if ifnil({self.}XmlChildICs) then
begin begin
{self.}XmlChildICs := new OpenXmlEmpty(self, {self.}Prefix, "iCs"); {self.}XmlChildICs := new OpenXmlEmpty(self, {self.}Prefix, "iCs");
container_.Set({self.}XmlChildICs); container_.Set({self.}XmlChildICs);
end
return {self.}XmlChildICs; return {self.}XmlChildICs;
end end
return ifnil({self.}XmlChildICs) ? false : {self.}XmlChildICs.BoolValue(); return ifnil({self.}XmlChildICs) ? nil : {self.}XmlChildICs.BoolValue();
end; end;
function RPr.WriteXmlChildICs(_value); function RPr.WriteXmlChildICs(_value);
@ -210,13 +222,16 @@ end;
function RPr.ReadXmlChildB(); function RPr.ReadXmlChildB();
begin begin
if tslassigning and ifnil({self.}XmlChildB) then if tslassigning then
begin
if ifnil({self.}XmlChildB) then
begin begin
{self.}XmlChildB := new OpenXmlEmpty(self, {self.}Prefix, "b"); {self.}XmlChildB := new OpenXmlEmpty(self, {self.}Prefix, "b");
container_.Set({self.}XmlChildB); container_.Set({self.}XmlChildB);
end
return {self.}XmlChildB; return {self.}XmlChildB;
end end
return ifnil({self.}XmlChildB) ? false : {self.}XmlChildB.BoolValue(); return ifnil({self.}XmlChildB) ? nil : {self.}XmlChildB.BoolValue();
end; end;
function RPr.WriteXmlChildB(_value); function RPr.WriteXmlChildB(_value);
@ -231,13 +246,16 @@ end;
function RPr.ReadXmlChildBCs(); function RPr.ReadXmlChildBCs();
begin begin
if tslassigning and ifnil({self.}XmlChildBCs) then if tslassigning then
begin
if ifnil({self.}XmlChildBCs) then
begin begin
{self.}XmlChildBCs := new OpenXmlEmpty(self, {self.}Prefix, "bCs"); {self.}XmlChildBCs := new OpenXmlEmpty(self, {self.}Prefix, "bCs");
container_.Set({self.}XmlChildBCs); container_.Set({self.}XmlChildBCs);
end
return {self.}XmlChildBCs; return {self.}XmlChildBCs;
end end
return ifnil({self.}XmlChildBCs) ? false : {self.}XmlChildBCs.BoolValue(); return ifnil({self.}XmlChildBCs) ? nil : {self.}XmlChildBCs.BoolValue();
end; end;
function RPr.WriteXmlChildBCs(_value); function RPr.WriteXmlChildBCs(_value);
@ -252,13 +270,16 @@ end;
function RPr.ReadXmlChildStrike(); function RPr.ReadXmlChildStrike();
begin begin
if tslassigning and ifnil({self.}XmlChildStrike) then if tslassigning then
begin
if ifnil({self.}XmlChildStrike) then
begin begin
{self.}XmlChildStrike := new OpenXmlEmpty(self, {self.}Prefix, "strike"); {self.}XmlChildStrike := new OpenXmlEmpty(self, {self.}Prefix, "strike");
container_.Set({self.}XmlChildStrike); container_.Set({self.}XmlChildStrike);
end
return {self.}XmlChildStrike; return {self.}XmlChildStrike;
end end
return ifnil({self.}XmlChildStrike) ? false : {self.}XmlChildStrike.BoolValue(); return ifnil({self.}XmlChildStrike) ? nil : {self.}XmlChildStrike.BoolValue();
end; end;
function RPr.WriteXmlChildStrike(_value); function RPr.WriteXmlChildStrike(_value);
@ -273,13 +294,16 @@ end;
function RPr.ReadXmlChildU(); function RPr.ReadXmlChildU();
begin begin
if tslassigning and ifnil({self.}XmlChildU) then if tslassigning then
begin
if ifnil({self.}XmlChildU) then
begin begin
{self.}XmlChildU := new OpenXmlEmpty(self, {self.}Prefix, "u"); {self.}XmlChildU := new OpenXmlEmpty(self, {self.}Prefix, "u");
container_.Set({self.}XmlChildU); container_.Set({self.}XmlChildU);
end
return {self.}XmlChildU; return {self.}XmlChildU;
end end
return ifnil({self.}XmlChildU) ? false : {self.}XmlChildU.BoolValue(); return ifnil({self.}XmlChildU) ? nil : {self.}XmlChildU.BoolValue();
end; end;
function RPr.WriteXmlChildU(_value); function RPr.WriteXmlChildU(_value);
@ -332,6 +356,16 @@ begin
return {self.}XmlChildRStyle; return {self.}XmlChildRStyle;
end; end;
function RPr.ReadXmlChildIns();
begin
if tslassigning and ifnil({self.}XmlChildIns) then
begin
{self.}XmlChildIns := new Ins(self, {self.}Prefix, "ins");
container_.Set({self.}XmlChildIns);
end
return {self.}XmlChildIns;
end;
function RPr.ReadXmlChildRFonts(); function RPr.ReadXmlChildRFonts();
begin begin
if tslassigning and ifnil({self.}XmlChildRFonts) then if tslassigning and ifnil({self.}XmlChildRFonts) then

View File

@ -74,13 +74,16 @@ end;
function Rich.ReadXmlChildLstStyle(); function Rich.ReadXmlChildLstStyle();
begin begin
if tslassigning and ifnil({self.}XmlChildLstStyle) then if tslassigning then
begin
if ifnil({self.}XmlChildLstStyle) then
begin begin
{self.}XmlChildLstStyle := new OpenXmlEmpty(self, "a", "lstStyle"); {self.}XmlChildLstStyle := new OpenXmlEmpty(self, "a", "lstStyle");
container_.Set({self.}XmlChildLstStyle); container_.Set({self.}XmlChildLstStyle);
end
return {self.}XmlChildLstStyle; return {self.}XmlChildLstStyle;
end end
return ifnil({self.}XmlChildLstStyle) ? false : {self.}XmlChildLstStyle.BoolValue(); return ifnil({self.}XmlChildLstStyle) ? nil : {self.}XmlChildLstStyle.BoolValue();
end; end;
function Rich.WriteXmlChildLstStyle(_value); function Rich.WriteXmlChildLstStyle(_value);

View File

@ -59,13 +59,16 @@ end;
function Scaling.ReadXmlChildOrientation(); function Scaling.ReadXmlChildOrientation();
begin begin
if tslassigning and ifnil({self.}XmlChildOrientation) then if tslassigning then
begin
if ifnil({self.}XmlChildOrientation) then
begin begin
{self.}XmlChildOrientation := new OpenXmlEmpty(self, {self.}Prefix, "orientation"); {self.}XmlChildOrientation := new OpenXmlEmpty(self, {self.}Prefix, "orientation");
container_.Set({self.}XmlChildOrientation); container_.Set({self.}XmlChildOrientation);
end
return {self.}XmlChildOrientation; return {self.}XmlChildOrientation;
end end
return ifnil({self.}XmlChildOrientation) ? false : {self.}XmlChildOrientation.BoolValue(); return ifnil({self.}XmlChildOrientation) ? nil : {self.}XmlChildOrientation.BoolValue();
end; end;
function Scaling.WriteXmlChildOrientation(_value); function Scaling.WriteXmlChildOrientation(_value);

View File

@ -169,13 +169,16 @@ end;
function SectPr.ReadXmlChildTitlePg(); function SectPr.ReadXmlChildTitlePg();
begin begin
if tslassigning and ifnil({self.}XmlChildTitlePg) then if tslassigning then
begin
if ifnil({self.}XmlChildTitlePg) then
begin begin
{self.}XmlChildTitlePg := new OpenXmlEmpty(self, {self.}Prefix, "titlePg"); {self.}XmlChildTitlePg := new OpenXmlEmpty(self, {self.}Prefix, "titlePg");
container_.Set({self.}XmlChildTitlePg); container_.Set({self.}XmlChildTitlePg);
end
return {self.}XmlChildTitlePg; return {self.}XmlChildTitlePg;
end end
return ifnil({self.}XmlChildTitlePg) ? false : {self.}XmlChildTitlePg.BoolValue(); return ifnil({self.}XmlChildTitlePg) ? nil : {self.}XmlChildTitlePg.BoolValue();
end; end;
function SectPr.WriteXmlChildTitlePg(_value); function SectPr.WriteXmlChildTitlePg(_value);

View File

@ -515,13 +515,16 @@ end;
function Settings.ReadXmlChildBordersDoNotSurroundHeader(); function Settings.ReadXmlChildBordersDoNotSurroundHeader();
begin begin
if tslassigning and ifnil({self.}XmlChildBordersDoNotSurroundHeader) then if tslassigning then
begin
if ifnil({self.}XmlChildBordersDoNotSurroundHeader) then
begin begin
{self.}XmlChildBordersDoNotSurroundHeader := new OpenXmlEmpty(self, {self.}Prefix, "bordersDoNotSurroundHeader"); {self.}XmlChildBordersDoNotSurroundHeader := new OpenXmlEmpty(self, {self.}Prefix, "bordersDoNotSurroundHeader");
container_.Set({self.}XmlChildBordersDoNotSurroundHeader); container_.Set({self.}XmlChildBordersDoNotSurroundHeader);
end
return {self.}XmlChildBordersDoNotSurroundHeader; return {self.}XmlChildBordersDoNotSurroundHeader;
end end
return ifnil({self.}XmlChildBordersDoNotSurroundHeader) ? false : {self.}XmlChildBordersDoNotSurroundHeader.BoolValue(); return ifnil({self.}XmlChildBordersDoNotSurroundHeader) ? nil : {self.}XmlChildBordersDoNotSurroundHeader.BoolValue();
end; end;
function Settings.WriteXmlChildBordersDoNotSurroundHeader(_value); function Settings.WriteXmlChildBordersDoNotSurroundHeader(_value);
@ -536,13 +539,16 @@ end;
function Settings.ReadXmlChildBordersDoNotSurroundFooter(); function Settings.ReadXmlChildBordersDoNotSurroundFooter();
begin begin
if tslassigning and ifnil({self.}XmlChildBordersDoNotSurroundFooter) then if tslassigning then
begin
if ifnil({self.}XmlChildBordersDoNotSurroundFooter) then
begin begin
{self.}XmlChildBordersDoNotSurroundFooter := new OpenXmlEmpty(self, {self.}Prefix, "bordersDoNotSurroundFooter"); {self.}XmlChildBordersDoNotSurroundFooter := new OpenXmlEmpty(self, {self.}Prefix, "bordersDoNotSurroundFooter");
container_.Set({self.}XmlChildBordersDoNotSurroundFooter); container_.Set({self.}XmlChildBordersDoNotSurroundFooter);
end
return {self.}XmlChildBordersDoNotSurroundFooter; return {self.}XmlChildBordersDoNotSurroundFooter;
end end
return ifnil({self.}XmlChildBordersDoNotSurroundFooter) ? false : {self.}XmlChildBordersDoNotSurroundFooter.BoolValue(); return ifnil({self.}XmlChildBordersDoNotSurroundFooter) ? nil : {self.}XmlChildBordersDoNotSurroundFooter.BoolValue();
end; end;
function Settings.WriteXmlChildBordersDoNotSurroundFooter(_value); function Settings.WriteXmlChildBordersDoNotSurroundFooter(_value);
@ -557,13 +563,16 @@ end;
function Settings.ReadXmlChildEvenAndOddHeaders(); function Settings.ReadXmlChildEvenAndOddHeaders();
begin begin
if tslassigning and ifnil({self.}XmlChildEvenAndOddHeaders) then if tslassigning then
begin
if ifnil({self.}XmlChildEvenAndOddHeaders) then
begin begin
{self.}XmlChildEvenAndOddHeaders := new OpenXmlEmpty(self, {self.}Prefix, "evenAndOddHeaders"); {self.}XmlChildEvenAndOddHeaders := new OpenXmlEmpty(self, {self.}Prefix, "evenAndOddHeaders");
container_.Set({self.}XmlChildEvenAndOddHeaders); container_.Set({self.}XmlChildEvenAndOddHeaders);
end
return {self.}XmlChildEvenAndOddHeaders; return {self.}XmlChildEvenAndOddHeaders;
end end
return ifnil({self.}XmlChildEvenAndOddHeaders) ? false : {self.}XmlChildEvenAndOddHeaders.BoolValue(); return ifnil({self.}XmlChildEvenAndOddHeaders) ? nil : {self.}XmlChildEvenAndOddHeaders.BoolValue();
end; end;
function Settings.WriteXmlChildEvenAndOddHeaders(_value); function Settings.WriteXmlChildEvenAndOddHeaders(_value);
@ -578,13 +587,16 @@ end;
function Settings.ReadXmlChildDoNotIncludeSubdocsInStats(); function Settings.ReadXmlChildDoNotIncludeSubdocsInStats();
begin begin
if tslassigning and ifnil({self.}XmlChildDoNotIncludeSubdocsInStats) then if tslassigning then
begin
if ifnil({self.}XmlChildDoNotIncludeSubdocsInStats) then
begin begin
{self.}XmlChildDoNotIncludeSubdocsInStats := new OpenXmlEmpty(self, {self.}Prefix, "doNotIncludeSubdocsInStats"); {self.}XmlChildDoNotIncludeSubdocsInStats := new OpenXmlEmpty(self, {self.}Prefix, "doNotIncludeSubdocsInStats");
container_.Set({self.}XmlChildDoNotIncludeSubdocsInStats); container_.Set({self.}XmlChildDoNotIncludeSubdocsInStats);
end
return {self.}XmlChildDoNotIncludeSubdocsInStats; return {self.}XmlChildDoNotIncludeSubdocsInStats;
end end
return ifnil({self.}XmlChildDoNotIncludeSubdocsInStats) ? false : {self.}XmlChildDoNotIncludeSubdocsInStats.BoolValue(); return ifnil({self.}XmlChildDoNotIncludeSubdocsInStats) ? nil : {self.}XmlChildDoNotIncludeSubdocsInStats.BoolValue();
end; end;
function Settings.WriteXmlChildDoNotIncludeSubdocsInStats(_value); function Settings.WriteXmlChildDoNotIncludeSubdocsInStats(_value);
@ -599,13 +611,16 @@ end;
function Settings.ReadXmlChildW15ChartTrackingRefBased(); function Settings.ReadXmlChildW15ChartTrackingRefBased();
begin begin
if tslassigning and ifnil({self.}XmlChildW15ChartTrackingRefBased) then if tslassigning then
begin
if ifnil({self.}XmlChildW15ChartTrackingRefBased) then
begin begin
{self.}XmlChildW15ChartTrackingRefBased := new OpenXmlEmpty(self, "w15", "chartTrackingRefBased"); {self.}XmlChildW15ChartTrackingRefBased := new OpenXmlEmpty(self, "w15", "chartTrackingRefBased");
container_.Set({self.}XmlChildW15ChartTrackingRefBased); container_.Set({self.}XmlChildW15ChartTrackingRefBased);
end
return {self.}XmlChildW15ChartTrackingRefBased; return {self.}XmlChildW15ChartTrackingRefBased;
end end
return ifnil({self.}XmlChildW15ChartTrackingRefBased) ? false : {self.}XmlChildW15ChartTrackingRefBased.BoolValue(); return ifnil({self.}XmlChildW15ChartTrackingRefBased) ? nil : {self.}XmlChildW15ChartTrackingRefBased.BoolValue();
end; end;
function Settings.WriteXmlChildW15ChartTrackingRefBased(_value); function Settings.WriteXmlChildW15ChartTrackingRefBased(_value);

View File

@ -117,13 +117,16 @@ end;
function SpPr.ReadXmlChildNoFill(); function SpPr.ReadXmlChildNoFill();
begin begin
if tslassigning and ifnil({self.}XmlChildNoFill) then if tslassigning then
begin
if ifnil({self.}XmlChildNoFill) then
begin begin
{self.}XmlChildNoFill := new OpenXmlEmpty(self, "a", "noFill"); {self.}XmlChildNoFill := new OpenXmlEmpty(self, "a", "noFill");
container_.Set({self.}XmlChildNoFill); container_.Set({self.}XmlChildNoFill);
end
return {self.}XmlChildNoFill; return {self.}XmlChildNoFill;
end end
return ifnil({self.}XmlChildNoFill) ? false : {self.}XmlChildNoFill.BoolValue(); return ifnil({self.}XmlChildNoFill) ? nil : {self.}XmlChildNoFill.BoolValue();
end; end;
function SpPr.WriteXmlChildNoFill(_value); function SpPr.WriteXmlChildNoFill(_value);

View File

@ -225,13 +225,16 @@ end;
function Style.ReadXmlChildSemiHidden(); function Style.ReadXmlChildSemiHidden();
begin begin
if tslassigning and ifnil({self.}XmlChildSemiHidden) then if tslassigning then
begin
if ifnil({self.}XmlChildSemiHidden) then
begin begin
{self.}XmlChildSemiHidden := new OpenXmlEmpty(self, {self.}Prefix, "semiHidden"); {self.}XmlChildSemiHidden := new OpenXmlEmpty(self, {self.}Prefix, "semiHidden");
container_.Set({self.}XmlChildSemiHidden); container_.Set({self.}XmlChildSemiHidden);
end
return {self.}XmlChildSemiHidden; return {self.}XmlChildSemiHidden;
end end
return ifnil({self.}XmlChildSemiHidden) ? false : {self.}XmlChildSemiHidden.BoolValue(); return ifnil({self.}XmlChildSemiHidden) ? nil : {self.}XmlChildSemiHidden.BoolValue();
end; end;
function Style.WriteXmlChildSemiHidden(_value); function Style.WriteXmlChildSemiHidden(_value);
@ -246,13 +249,16 @@ end;
function Style.ReadXmlChildUnhideWhenUsed(); function Style.ReadXmlChildUnhideWhenUsed();
begin begin
if tslassigning and ifnil({self.}XmlChildUnhideWhenUsed) then if tslassigning then
begin
if ifnil({self.}XmlChildUnhideWhenUsed) then
begin begin
{self.}XmlChildUnhideWhenUsed := new OpenXmlEmpty(self, {self.}Prefix, "unhideWhenUsed"); {self.}XmlChildUnhideWhenUsed := new OpenXmlEmpty(self, {self.}Prefix, "unhideWhenUsed");
container_.Set({self.}XmlChildUnhideWhenUsed); container_.Set({self.}XmlChildUnhideWhenUsed);
end
return {self.}XmlChildUnhideWhenUsed; return {self.}XmlChildUnhideWhenUsed;
end end
return ifnil({self.}XmlChildUnhideWhenUsed) ? false : {self.}XmlChildUnhideWhenUsed.BoolValue(); return ifnil({self.}XmlChildUnhideWhenUsed) ? nil : {self.}XmlChildUnhideWhenUsed.BoolValue();
end; end;
function Style.WriteXmlChildUnhideWhenUsed(_value); function Style.WriteXmlChildUnhideWhenUsed(_value);
@ -267,13 +273,16 @@ end;
function Style.ReadXmlChildQFormat(); function Style.ReadXmlChildQFormat();
begin begin
if tslassigning and ifnil({self.}XmlChildQFormat) then if tslassigning then
begin
if ifnil({self.}XmlChildQFormat) then
begin begin
{self.}XmlChildQFormat := new OpenXmlEmpty(self, {self.}Prefix, "qFormat"); {self.}XmlChildQFormat := new OpenXmlEmpty(self, {self.}Prefix, "qFormat");
container_.Set({self.}XmlChildQFormat); container_.Set({self.}XmlChildQFormat);
end
return {self.}XmlChildQFormat; return {self.}XmlChildQFormat;
end end
return ifnil({self.}XmlChildQFormat) ? false : {self.}XmlChildQFormat.BoolValue(); return ifnil({self.}XmlChildQFormat) ? nil : {self.}XmlChildQFormat.BoolValue();
end; end;
function Style.WriteXmlChildQFormat(_value); function Style.WriteXmlChildQFormat(_value);
@ -288,13 +297,16 @@ end;
function Style.ReadXmlChildRsid(); function Style.ReadXmlChildRsid();
begin begin
if tslassigning and ifnil({self.}XmlChildRsid) then if tslassigning then
begin
if ifnil({self.}XmlChildRsid) then
begin begin
{self.}XmlChildRsid := new OpenXmlEmpty(self, {self.}Prefix, "rsid"); {self.}XmlChildRsid := new OpenXmlEmpty(self, {self.}Prefix, "rsid");
container_.Set({self.}XmlChildRsid); container_.Set({self.}XmlChildRsid);
end
return {self.}XmlChildRsid; return {self.}XmlChildRsid;
end end
return ifnil({self.}XmlChildRsid) ? false : {self.}XmlChildRsid.BoolValue(); return ifnil({self.}XmlChildRsid) ? nil : {self.}XmlChildRsid.BoolValue();
end; end;
function Style.WriteXmlChildRsid(_value); function Style.WriteXmlChildRsid(_value);

View File

@ -98,13 +98,16 @@ end;
function TcPr.ReadXmlChildVMerge(); function TcPr.ReadXmlChildVMerge();
begin begin
if tslassigning and ifnil({self.}XmlChildVMerge) then if tslassigning then
begin
if ifnil({self.}XmlChildVMerge) then
begin begin
{self.}XmlChildVMerge := new OpenXmlEmpty(self, {self.}Prefix, "vMerge"); {self.}XmlChildVMerge := new OpenXmlEmpty(self, {self.}Prefix, "vMerge");
container_.Set({self.}XmlChildVMerge); container_.Set({self.}XmlChildVMerge);
end
return {self.}XmlChildVMerge; return {self.}XmlChildVMerge;
end end
return ifnil({self.}XmlChildVMerge) ? false : {self.}XmlChildVMerge.BoolValue(); return ifnil({self.}XmlChildVMerge) ? nil : {self.}XmlChildVMerge.BoolValue();
end; end;
function TcPr.WriteXmlChildVMerge(_value); function TcPr.WriteXmlChildVMerge(_value);
@ -119,13 +122,16 @@ end;
function TcPr.ReadXmlChildHideMark(); function TcPr.ReadXmlChildHideMark();
begin begin
if tslassigning and ifnil({self.}XmlChildHideMark) then if tslassigning then
begin
if ifnil({self.}XmlChildHideMark) then
begin begin
{self.}XmlChildHideMark := new OpenXmlEmpty(self, {self.}Prefix, "hideMark"); {self.}XmlChildHideMark := new OpenXmlEmpty(self, {self.}Prefix, "hideMark");
container_.Set({self.}XmlChildHideMark); container_.Set({self.}XmlChildHideMark);
end
return {self.}XmlChildHideMark; return {self.}XmlChildHideMark;
end end
return ifnil({self.}XmlChildHideMark) ? false : {self.}XmlChildHideMark.BoolValue(); return ifnil({self.}XmlChildHideMark) ? nil : {self.}XmlChildHideMark.BoolValue();
end; end;
function TcPr.WriteXmlChildHideMark(_value); function TcPr.WriteXmlChildHideMark(_value);

View File

@ -128,13 +128,16 @@ end;
function Theme.ReadXmlChildObjectDefaults(); function Theme.ReadXmlChildObjectDefaults();
begin begin
if tslassigning and ifnil({self.}XmlChildObjectDefaults) then if tslassigning then
begin
if ifnil({self.}XmlChildObjectDefaults) then
begin begin
{self.}XmlChildObjectDefaults := new OpenXmlEmpty(self, {self.}Prefix, "objectDefaults"); {self.}XmlChildObjectDefaults := new OpenXmlEmpty(self, {self.}Prefix, "objectDefaults");
container_.Set({self.}XmlChildObjectDefaults); container_.Set({self.}XmlChildObjectDefaults);
end
return {self.}XmlChildObjectDefaults; return {self.}XmlChildObjectDefaults;
end end
return ifnil({self.}XmlChildObjectDefaults) ? false : {self.}XmlChildObjectDefaults.BoolValue(); return ifnil({self.}XmlChildObjectDefaults) ? nil : {self.}XmlChildObjectDefaults.BoolValue();
end; end;
function Theme.WriteXmlChildObjectDefaults(_value); function Theme.WriteXmlChildObjectDefaults(_value);
@ -149,13 +152,16 @@ end;
function Theme.ReadXmlChildExtraClrSchemeLst(); function Theme.ReadXmlChildExtraClrSchemeLst();
begin begin
if tslassigning and ifnil({self.}XmlChildExtraClrSchemeLst) then if tslassigning then
begin
if ifnil({self.}XmlChildExtraClrSchemeLst) then
begin begin
{self.}XmlChildExtraClrSchemeLst := new OpenXmlEmpty(self, {self.}Prefix, "extraClrSchemeLst"); {self.}XmlChildExtraClrSchemeLst := new OpenXmlEmpty(self, {self.}Prefix, "extraClrSchemeLst");
container_.Set({self.}XmlChildExtraClrSchemeLst); container_.Set({self.}XmlChildExtraClrSchemeLst);
end
return {self.}XmlChildExtraClrSchemeLst; return {self.}XmlChildExtraClrSchemeLst;
end end
return ifnil({self.}XmlChildExtraClrSchemeLst) ? false : {self.}XmlChildExtraClrSchemeLst.BoolValue(); return ifnil({self.}XmlChildExtraClrSchemeLst) ? nil : {self.}XmlChildExtraClrSchemeLst.BoolValue();
end; end;
function Theme.WriteXmlChildExtraClrSchemeLst(_value); function Theme.WriteXmlChildExtraClrSchemeLst(_value);

View File

@ -73,13 +73,16 @@ end;
function Title.ReadXmlChildLayout(); function Title.ReadXmlChildLayout();
begin begin
if tslassigning and ifnil({self.}XmlChildLayout) then if tslassigning then
begin
if ifnil({self.}XmlChildLayout) then
begin begin
{self.}XmlChildLayout := new OpenXmlEmpty(self, {self.}Prefix, "layout"); {self.}XmlChildLayout := new OpenXmlEmpty(self, {self.}Prefix, "layout");
container_.Set({self.}XmlChildLayout); container_.Set({self.}XmlChildLayout);
end
return {self.}XmlChildLayout; return {self.}XmlChildLayout;
end end
return ifnil({self.}XmlChildLayout) ? false : {self.}XmlChildLayout.BoolValue(); return ifnil({self.}XmlChildLayout) ? nil : {self.}XmlChildLayout.BoolValue();
end; end;
function Title.WriteXmlChildLayout(_value); function Title.WriteXmlChildLayout(_value);

View File

@ -18,10 +18,12 @@ public
property TblHeader read ReadXmlChildTblHeader; property TblHeader read ReadXmlChildTblHeader;
property Jc read ReadXmlChildJc; property Jc read ReadXmlChildJc;
property CnfStyle read ReadXmlChildCnfStyle; property CnfStyle read ReadXmlChildCnfStyle;
property Ins read ReadXmlChildIns;
function ReadXmlChildTrHeight(); function ReadXmlChildTrHeight();
function ReadXmlChildTblHeader(); function ReadXmlChildTblHeader();
function ReadXmlChildJc(); function ReadXmlChildJc();
function ReadXmlChildCnfStyle(); function ReadXmlChildCnfStyle();
function ReadXmlChildIns();
public public
// Children // Children
@ -30,6 +32,7 @@ public
XmlChildJc: PureWVal; XmlChildJc: PureWVal;
XmlChildCantSplit: OpenXmlEmpty; XmlChildCantSplit: OpenXmlEmpty;
XmlChildCnfStyle: CnfStyle; XmlChildCnfStyle: CnfStyle;
XmlChildIns: Ins;
end; end;
@ -61,6 +64,7 @@ begin
pre + "jc": array(2, makeweakref(thisFunction(ReadXmlChildJc))), pre + "jc": array(2, makeweakref(thisFunction(ReadXmlChildJc))),
pre + "cantSplit": array(3, makeweakref(thisFunction(ReadXmlChildCantSplit))), pre + "cantSplit": array(3, makeweakref(thisFunction(ReadXmlChildCantSplit))),
pre + "cnfStyle": array(4, makeweakref(thisFunction(ReadXmlChildCnfStyle))), pre + "cnfStyle": array(4, makeweakref(thisFunction(ReadXmlChildCnfStyle))),
pre + "ins": array(5, makeweakref(thisFunction(ReadXmlChildIns))),
); );
container_ := new TSOfficeContainer(sorted_child_); container_ := new TSOfficeContainer(sorted_child_);
end; end;
@ -80,18 +84,23 @@ begin
ifnil({self.}XmlChildCantSplit) ? {self.}CantSplit.Copy(_obj.XmlChildCantSplit) : {self.}XmlChildCantSplit.Copy(_obj.XmlChildCantSplit); ifnil({self.}XmlChildCantSplit) ? {self.}CantSplit.Copy(_obj.XmlChildCantSplit) : {self.}XmlChildCantSplit.Copy(_obj.XmlChildCantSplit);
if not ifnil(_obj.XmlChildCnfStyle) then if not ifnil(_obj.XmlChildCnfStyle) then
{self.}CnfStyle.Copy(_obj.XmlChildCnfStyle); {self.}CnfStyle.Copy(_obj.XmlChildCnfStyle);
if not ifnil(_obj.XmlChildIns) then
{self.}Ins.Copy(_obj.XmlChildIns);
tslassigning := tslassigning_backup; tslassigning := tslassigning_backup;
end; end;
function TrPr.ReadXmlChildCantSplit(); function TrPr.ReadXmlChildCantSplit();
begin begin
if tslassigning and ifnil({self.}XmlChildCantSplit) then if tslassigning then
begin
if ifnil({self.}XmlChildCantSplit) then
begin begin
{self.}XmlChildCantSplit := new OpenXmlEmpty(self, {self.}Prefix, "cantSplit"); {self.}XmlChildCantSplit := new OpenXmlEmpty(self, {self.}Prefix, "cantSplit");
container_.Set({self.}XmlChildCantSplit); container_.Set({self.}XmlChildCantSplit);
end
return {self.}XmlChildCantSplit; return {self.}XmlChildCantSplit;
end end
return ifnil({self.}XmlChildCantSplit) ? false : {self.}XmlChildCantSplit.BoolValue(); return ifnil({self.}XmlChildCantSplit) ? nil : {self.}XmlChildCantSplit.BoolValue();
end; end;
function TrPr.WriteXmlChildCantSplit(_value); function TrPr.WriteXmlChildCantSplit(_value);
@ -143,3 +152,13 @@ begin
end end
return {self.}XmlChildCnfStyle; return {self.}XmlChildCnfStyle;
end; end;
function TrPr.ReadXmlChildIns();
begin
if tslassigning and ifnil({self.}XmlChildIns) then
begin
{self.}XmlChildIns := new Ins(self, {self.}Prefix, "ins");
container_.Set({self.}XmlChildIns);
end
return {self.}XmlChildIns;
end;

View File

@ -74,13 +74,16 @@ end;
function TxPr.ReadXmlChildLstStyle(); function TxPr.ReadXmlChildLstStyle();
begin begin
if tslassigning and ifnil({self.}XmlChildLstStyle) then if tslassigning then
begin
if ifnil({self.}XmlChildLstStyle) then
begin begin
{self.}XmlChildLstStyle := new OpenXmlEmpty(self, "a", "lstStyle"); {self.}XmlChildLstStyle := new OpenXmlEmpty(self, "a", "lstStyle");
container_.Set({self.}XmlChildLstStyle); container_.Set({self.}XmlChildLstStyle);
end
return {self.}XmlChildLstStyle; return {self.}XmlChildLstStyle;
end end
return ifnil({self.}XmlChildLstStyle) ? false : {self.}XmlChildLstStyle.BoolValue(); return ifnil({self.}XmlChildLstStyle) ? nil : {self.}XmlChildLstStyle.BoolValue();
end; end;
function TxPr.WriteXmlChildLstStyle(_value); function TxPr.WriteXmlChildLstStyle(_value);

View File

@ -334,13 +334,16 @@ end;
function WebSettings.ReadXmlChildOptimizeForBrowser(); function WebSettings.ReadXmlChildOptimizeForBrowser();
begin begin
if tslassigning and ifnil({self.}XmlChildOptimizeForBrowser) then if tslassigning then
begin
if ifnil({self.}XmlChildOptimizeForBrowser) then
begin begin
{self.}XmlChildOptimizeForBrowser := new OpenXmlEmpty(self, {self.}Prefix, "optimizeForBrowser"); {self.}XmlChildOptimizeForBrowser := new OpenXmlEmpty(self, {self.}Prefix, "optimizeForBrowser");
container_.Set({self.}XmlChildOptimizeForBrowser); container_.Set({self.}XmlChildOptimizeForBrowser);
end
return {self.}XmlChildOptimizeForBrowser; return {self.}XmlChildOptimizeForBrowser;
end end
return ifnil({self.}XmlChildOptimizeForBrowser) ? false : {self.}XmlChildOptimizeForBrowser.BoolValue(); return ifnil({self.}XmlChildOptimizeForBrowser) ? nil : {self.}XmlChildOptimizeForBrowser.BoolValue();
end; end;
function WebSettings.WriteXmlChildOptimizeForBrowser(_value); function WebSettings.WriteXmlChildOptimizeForBrowser(_value);
@ -355,13 +358,16 @@ end;
function WebSettings.ReadXmlChildAllowPNG(); function WebSettings.ReadXmlChildAllowPNG();
begin begin
if tslassigning and ifnil({self.}XmlChildAllowPNG) then if tslassigning then
begin
if ifnil({self.}XmlChildAllowPNG) then
begin begin
{self.}XmlChildAllowPNG := new OpenXmlEmpty(self, {self.}Prefix, "allowPNG"); {self.}XmlChildAllowPNG := new OpenXmlEmpty(self, {self.}Prefix, "allowPNG");
container_.Set({self.}XmlChildAllowPNG); container_.Set({self.}XmlChildAllowPNG);
end
return {self.}XmlChildAllowPNG; return {self.}XmlChildAllowPNG;
end end
return ifnil({self.}XmlChildAllowPNG) ? false : {self.}XmlChildAllowPNG.BoolValue(); return ifnil({self.}XmlChildAllowPNG) ? nil : {self.}XmlChildAllowPNG.BoolValue();
end; end;
function WebSettings.WriteXmlChildAllowPNG(_value); function WebSettings.WriteXmlChildAllowPNG(_value);