update config

This commit is contained in:
csh
2024-10-12 13:28:48 +08:00
parent 533a202847
commit 27013cd4b0
8 changed files with 84 additions and 5 deletions
+22
View File
@@ -16,6 +16,7 @@ public
property HAnsi read ReadXmlAttrHAnsi write WriteXmlAttrHAnsi;
property HAnsiTheme read ReadXmlAttrHAnsiTheme write WriteXmlAttrHAnsiTheme;
property Hint read ReadXmlAttrHint write WriteXmlAttrHint;
property Cs read ReadXmlAttrCs write WriteXmlAttrCs;
property CsTheme read ReadXmlAttrCsTheme write WriteXmlAttrCsTheme;
function ReadXmlAttrAscii();
function WriteXmlAttrAscii(_value);
@@ -31,6 +32,8 @@ public
function WriteXmlAttrHAnsiTheme(_value);
function ReadXmlAttrHint();
function WriteXmlAttrHint(_value);
function ReadXmlAttrCs();
function WriteXmlAttrCs(_value);
function ReadXmlAttrCsTheme();
function WriteXmlAttrCsTheme(_value);
@@ -43,6 +46,7 @@ public
XmlAttrHAnsi: OpenXmlAttribute;
XmlAttrHAnsiTheme: OpenXmlAttribute;
XmlAttrHint: OpenXmlAttribute;
XmlAttrCs: OpenXmlAttribute;
XmlAttrCsTheme: OpenXmlAttribute;
@@ -76,6 +80,7 @@ begin
pre + "hAnsi": makeweakref(thisFunction(WriteXmlAttrHAnsi)),
pre + "hAnsiTheme": makeweakref(thisFunction(WriteXmlAttrHAnsiTheme)),
pre + "hint": makeweakref(thisFunction(WriteXmlAttrHint)),
pre + "cs": makeweakref(thisFunction(WriteXmlAttrCs)),
pre + "cstheme": makeweakref(thisFunction(WriteXmlAttrCsTheme)),
);
sorted_child_ := array(
@@ -102,6 +107,8 @@ begin
{self.}HAnsiTheme := _obj.HAnsiTheme;
if not ifnil(_obj.Hint) then
{self.}Hint := _obj.Hint;
if not ifnil(_obj.Cs) then
{self.}Cs := _obj.Cs;
if not ifnil(_obj.CsTheme) then
{self.}CsTheme := _obj.CsTheme;
tslassigning := tslassigning_backup;
@@ -212,6 +219,21 @@ begin
{self.}XmlAttrHint.Value := _value;
end;
function RFonts.ReadXmlAttrCs();
begin
return {self.}XmlAttrCs.Value;
end;
function RFonts.WriteXmlAttrCs(_value);
begin
if ifnil({self.}XmlAttrCs) then
begin
{self.}XmlAttrCs := new OpenXmlAttribute({self.}Prefix, "cs", nil);
attributes_[length(attributes_)] := {self.}XmlAttrCs;
end
{self.}XmlAttrCs.Value := _value;
end;
function RFonts.ReadXmlAttrCsTheme();
begin
return {self.}XmlAttrCsTheme.Value;
+19 -3
View File
@@ -15,10 +15,12 @@ public
// normal property
property PPr read ReadXmlChildPPr;
property RPr read ReadXmlChildRPr;
property TblPr read ReadXmlChildTblPr;
property TrPr read ReadXmlChildTrPr;
property TcPr read ReadXmlChildTcPr;
function ReadXmlChildPPr();
function ReadXmlChildRPr();
function ReadXmlChildTblPr();
function ReadXmlChildTrPr();
function ReadXmlChildTcPr();
@@ -29,6 +31,7 @@ public
// Children
XmlChildPPr: PPr;
XmlChildRPr: RPr;
XmlChildTblPr: TblPr;
XmlChildTrPr: TrPr;
XmlChildTcPr: TcPr;
@@ -60,9 +63,10 @@ begin
);
sorted_child_ := array(
pre + "pPr": array(0, makeweakref(thisFunction(ReadXmlChildPPr))),
pre + "tblPr": array(1, makeweakref(thisFunction(ReadXmlChildTblPr))),
pre + "trPr": array(2, makeweakref(thisFunction(ReadXmlChildTrPr))),
pre + "tcPr": array(3, makeweakref(thisFunction(ReadXmlChildTcPr))),
pre + "rPr": array(1, makeweakref(thisFunction(ReadXmlChildRPr))),
pre + "tblPr": array(2, makeweakref(thisFunction(ReadXmlChildTblPr))),
pre + "trPr": array(3, makeweakref(thisFunction(ReadXmlChildTrPr))),
pre + "tcPr": array(4, makeweakref(thisFunction(ReadXmlChildTcPr))),
);
container_ := new TSOfficeContainer(sorted_child_);
end;
@@ -76,6 +80,8 @@ begin
{self.}Type := _obj.Type;
if not ifnil(_obj.XmlChildPPr) then
{self.}PPr.Copy(_obj.XmlChildPPr);
if not ifnil(_obj.XmlChildRPr) then
{self.}RPr.Copy(_obj.XmlChildRPr);
if not ifnil(_obj.XmlChildTblPr) then
{self.}TblPr.Copy(_obj.XmlChildTblPr);
if not ifnil(_obj.XmlChildTrPr) then
@@ -110,6 +116,16 @@ begin
return {self.}XmlChildPPr;
end;
function TblStylePr.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 TblStylePr.ReadXmlChildTblPr();
begin
if tslassigning and ifnil({self.}XmlChildTblPr) then
+29 -1
View File
@@ -10,8 +10,11 @@ public
// empty property
property VMerge read ReadXmlChildVMerge write WriteXmlChildVMerge;
property HideMark read ReadXmlChildHideMark write WriteXmlChildHideMark;
function ReadXmlChildVMerge();
function WriteXmlChildVMerge(_value);
function ReadXmlChildHideMark();
function WriteXmlChildHideMark(_value);
// normal property
property TcW read ReadXmlChildTcW;
@@ -29,6 +32,7 @@ public
XmlChildGridSpan: GridSpan;
XmlChildVMerge: OpenXmlEmpty;
XmlChildVAlign: PureWVal;
XmlChildHideMark: OpenXmlEmpty;
XmlChildShd: Shd;
end;
@@ -60,7 +64,8 @@ begin
pre + "gridSpan": array(1, makeweakref(thisFunction(ReadXmlChildGridSpan))),
pre + "vMerge": array(2, makeweakref(thisFunction(ReadXmlChildVMerge))),
pre + "vAlign": array(3, makeweakref(thisFunction(ReadXmlChildVAlign))),
pre + "shd": array(4, makeweakref(thisFunction(ReadXmlChildShd))),
pre + "hideMark": array(4, makeweakref(thisFunction(ReadXmlChildHideMark))),
pre + "shd": array(5, makeweakref(thisFunction(ReadXmlChildShd))),
);
container_ := new TSOfficeContainer(sorted_child_);
end;
@@ -78,6 +83,8 @@ begin
ifnil({self.}XmlChildVMerge) ? {self.}VMerge.Copy(_obj.XmlChildVMerge) : {self.}XmlChildVMerge.Copy(_obj.XmlChildVMerge);
if not ifnil(_obj.XmlChildVAlign) then
{self.}VAlign.Copy(_obj.XmlChildVAlign);
if not ifnil(_obj.XmlChildHideMark) then
ifnil({self.}XmlChildHideMark) ? {self.}HideMark.Copy(_obj.XmlChildHideMark) : {self.}XmlChildHideMark.Copy(_obj.XmlChildHideMark);
if not ifnil(_obj.XmlChildShd) then
{self.}Shd.Copy(_obj.XmlChildShd);
tslassigning := tslassigning_backup;
@@ -104,6 +111,27 @@ begin
{self.}XmlChildVMerge.Value := _value;
end;
function TcPr.ReadXmlChildHideMark();
begin
if tslassigning and ifnil({self.}XmlChildHideMark) then
begin
{self.}XmlChildHideMark := new OpenXmlEmpty(self, {self.}Prefix, "hideMark");
container_.Set({self.}XmlChildHideMark);
return {self.}XmlChildHideMark;
end
return ifnil({self.}XmlChildHideMark) ? false : {self.}XmlChildHideMark.BoolValue();
end;
function TcPr.WriteXmlChildHideMark(_value);
begin
if ifnil({self.}XmlChildHideMark) then
begin
{self.}XmlChildHideMark := new OpenXmlEmpty(self, {self.}Prefix, "hideMark");
container_.Set({self.}XmlChildHideMark);
end
{self.}XmlChildHideMark.Value := _value;
end;
function TcPr.ReadXmlChildTcW();
begin
if tslassigning and ifnil({self.}XmlChildTcW) then