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

View File

@ -38,6 +38,8 @@ begin
{self.}HAnsiTheme := object_.XmlAttrHAnsiTheme.Value; {self.}HAnsiTheme := object_.XmlAttrHAnsiTheme.Value;
if not ifnil(object_.XmlAttrHint) then if not ifnil(object_.XmlAttrHint) then
{self.}Hint := object_.XmlAttrHint.Value; {self.}Hint := object_.XmlAttrHint.Value;
if not ifnil(object_.XmlAttrCs) then
{self.}Cs := object_.XmlAttrCs.Value;
if not ifnil(object_.XmlAttrCsTheme) then if not ifnil(object_.XmlAttrCsTheme) then
{self.}CsTheme := object_.XmlAttrCsTheme.Value; {self.}CsTheme := object_.XmlAttrCsTheme.Value;
tslassigning := tslassigning_backup; tslassigning := tslassigning_backup;

View File

@ -28,6 +28,8 @@ begin
{self.}Type := object_.XmlAttrType.Value; {self.}Type := object_.XmlAttrType.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_.XmlChildRPr) then
{self.}XmlChildRPr := new RPrUnitDecorator(object_.XmlChildRPr);
if not ifnil(object_.XmlChildTblPr) then if not ifnil(object_.XmlChildTblPr) then
{self.}XmlChildTblPr := new TblPrUnitDecorator(object_.XmlChildTblPr); {self.}XmlChildTblPr := new TblPrUnitDecorator(object_.XmlChildTblPr);
if not ifnil(object_.XmlChildTrPr) then if not ifnil(object_.XmlChildTrPr) then

View File

@ -32,6 +32,8 @@ begin
{self.}VMerge.Copy(object_.XmlChildVMerge); {self.}VMerge.Copy(object_.XmlChildVMerge);
if not ifnil(object_.XmlChildVAlign) then if not ifnil(object_.XmlChildVAlign) then
{self.}XmlChildVAlign := new PureWValUnitDecorator(object_.XmlChildVAlign); {self.}XmlChildVAlign := new PureWValUnitDecorator(object_.XmlChildVAlign);
if not ifnil(object_.XmlChildHideMark) then
{self.}HideMark.Copy(object_.XmlChildHideMark);
if not ifnil(object_.XmlChildShd) then if not ifnil(object_.XmlChildShd) then
{self.}XmlChildShd := new ShdUnitDecorator(object_.XmlChildShd); {self.}XmlChildShd := new ShdUnitDecorator(object_.XmlChildShd);
tslassigning := tslassigning_backup; tslassigning := tslassigning_backup;

View File

@ -16,6 +16,7 @@ public
property HAnsi read ReadXmlAttrHAnsi write WriteXmlAttrHAnsi; property HAnsi read ReadXmlAttrHAnsi write WriteXmlAttrHAnsi;
property HAnsiTheme read ReadXmlAttrHAnsiTheme write WriteXmlAttrHAnsiTheme; property HAnsiTheme read ReadXmlAttrHAnsiTheme write WriteXmlAttrHAnsiTheme;
property Hint read ReadXmlAttrHint write WriteXmlAttrHint; property Hint read ReadXmlAttrHint write WriteXmlAttrHint;
property Cs read ReadXmlAttrCs write WriteXmlAttrCs;
property CsTheme read ReadXmlAttrCsTheme write WriteXmlAttrCsTheme; property CsTheme read ReadXmlAttrCsTheme write WriteXmlAttrCsTheme;
function ReadXmlAttrAscii(); function ReadXmlAttrAscii();
function WriteXmlAttrAscii(_value); function WriteXmlAttrAscii(_value);
@ -31,6 +32,8 @@ public
function WriteXmlAttrHAnsiTheme(_value); function WriteXmlAttrHAnsiTheme(_value);
function ReadXmlAttrHint(); function ReadXmlAttrHint();
function WriteXmlAttrHint(_value); function WriteXmlAttrHint(_value);
function ReadXmlAttrCs();
function WriteXmlAttrCs(_value);
function ReadXmlAttrCsTheme(); function ReadXmlAttrCsTheme();
function WriteXmlAttrCsTheme(_value); function WriteXmlAttrCsTheme(_value);
@ -43,6 +46,7 @@ public
XmlAttrHAnsi: OpenXmlAttribute; XmlAttrHAnsi: OpenXmlAttribute;
XmlAttrHAnsiTheme: OpenXmlAttribute; XmlAttrHAnsiTheme: OpenXmlAttribute;
XmlAttrHint: OpenXmlAttribute; XmlAttrHint: OpenXmlAttribute;
XmlAttrCs: OpenXmlAttribute;
XmlAttrCsTheme: OpenXmlAttribute; XmlAttrCsTheme: OpenXmlAttribute;
@ -76,6 +80,7 @@ begin
pre + "hAnsi": makeweakref(thisFunction(WriteXmlAttrHAnsi)), pre + "hAnsi": makeweakref(thisFunction(WriteXmlAttrHAnsi)),
pre + "hAnsiTheme": makeweakref(thisFunction(WriteXmlAttrHAnsiTheme)), pre + "hAnsiTheme": makeweakref(thisFunction(WriteXmlAttrHAnsiTheme)),
pre + "hint": makeweakref(thisFunction(WriteXmlAttrHint)), pre + "hint": makeweakref(thisFunction(WriteXmlAttrHint)),
pre + "cs": makeweakref(thisFunction(WriteXmlAttrCs)),
pre + "cstheme": makeweakref(thisFunction(WriteXmlAttrCsTheme)), pre + "cstheme": makeweakref(thisFunction(WriteXmlAttrCsTheme)),
); );
sorted_child_ := array( sorted_child_ := array(
@ -102,6 +107,8 @@ begin
{self.}HAnsiTheme := _obj.HAnsiTheme; {self.}HAnsiTheme := _obj.HAnsiTheme;
if not ifnil(_obj.Hint) then if not ifnil(_obj.Hint) then
{self.}Hint := _obj.Hint; {self.}Hint := _obj.Hint;
if not ifnil(_obj.Cs) then
{self.}Cs := _obj.Cs;
if not ifnil(_obj.CsTheme) then if not ifnil(_obj.CsTheme) then
{self.}CsTheme := _obj.CsTheme; {self.}CsTheme := _obj.CsTheme;
tslassigning := tslassigning_backup; tslassigning := tslassigning_backup;
@ -212,6 +219,21 @@ begin
{self.}XmlAttrHint.Value := _value; {self.}XmlAttrHint.Value := _value;
end; 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(); function RFonts.ReadXmlAttrCsTheme();
begin begin
return {self.}XmlAttrCsTheme.Value; return {self.}XmlAttrCsTheme.Value;

View File

@ -15,10 +15,12 @@ public
// normal property // normal property
property PPr read ReadXmlChildPPr; property PPr read ReadXmlChildPPr;
property RPr read ReadXmlChildRPr;
property TblPr read ReadXmlChildTblPr; property TblPr read ReadXmlChildTblPr;
property TrPr read ReadXmlChildTrPr; property TrPr read ReadXmlChildTrPr;
property TcPr read ReadXmlChildTcPr; property TcPr read ReadXmlChildTcPr;
function ReadXmlChildPPr(); function ReadXmlChildPPr();
function ReadXmlChildRPr();
function ReadXmlChildTblPr(); function ReadXmlChildTblPr();
function ReadXmlChildTrPr(); function ReadXmlChildTrPr();
function ReadXmlChildTcPr(); function ReadXmlChildTcPr();
@ -29,6 +31,7 @@ public
// Children // Children
XmlChildPPr: PPr; XmlChildPPr: PPr;
XmlChildRPr: RPr;
XmlChildTblPr: TblPr; XmlChildTblPr: TblPr;
XmlChildTrPr: TrPr; XmlChildTrPr: TrPr;
XmlChildTcPr: TcPr; XmlChildTcPr: TcPr;
@ -60,9 +63,10 @@ begin
); );
sorted_child_ := array( sorted_child_ := array(
pre + "pPr": array(0, makeweakref(thisFunction(ReadXmlChildPPr))), pre + "pPr": array(0, makeweakref(thisFunction(ReadXmlChildPPr))),
pre + "tblPr": array(1, makeweakref(thisFunction(ReadXmlChildTblPr))), pre + "rPr": array(1, makeweakref(thisFunction(ReadXmlChildRPr))),
pre + "trPr": array(2, makeweakref(thisFunction(ReadXmlChildTrPr))), pre + "tblPr": array(2, makeweakref(thisFunction(ReadXmlChildTblPr))),
pre + "tcPr": array(3, makeweakref(thisFunction(ReadXmlChildTcPr))), pre + "trPr": array(3, makeweakref(thisFunction(ReadXmlChildTrPr))),
pre + "tcPr": array(4, makeweakref(thisFunction(ReadXmlChildTcPr))),
); );
container_ := new TSOfficeContainer(sorted_child_); container_ := new TSOfficeContainer(sorted_child_);
end; end;
@ -76,6 +80,8 @@ begin
{self.}Type := _obj.Type; {self.}Type := _obj.Type;
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.XmlChildRPr) then
{self.}RPr.Copy(_obj.XmlChildRPr);
if not ifnil(_obj.XmlChildTblPr) then if not ifnil(_obj.XmlChildTblPr) then
{self.}TblPr.Copy(_obj.XmlChildTblPr); {self.}TblPr.Copy(_obj.XmlChildTblPr);
if not ifnil(_obj.XmlChildTrPr) then if not ifnil(_obj.XmlChildTrPr) then
@ -110,6 +116,16 @@ begin
return {self.}XmlChildPPr; return {self.}XmlChildPPr;
end; 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(); function TblStylePr.ReadXmlChildTblPr();
begin begin
if tslassigning and ifnil({self.}XmlChildTblPr) then if tslassigning and ifnil({self.}XmlChildTblPr) then

View File

@ -10,8 +10,11 @@ public
// empty property // empty property
property VMerge read ReadXmlChildVMerge write WriteXmlChildVMerge; property VMerge read ReadXmlChildVMerge write WriteXmlChildVMerge;
property HideMark read ReadXmlChildHideMark write WriteXmlChildHideMark;
function ReadXmlChildVMerge(); function ReadXmlChildVMerge();
function WriteXmlChildVMerge(_value); function WriteXmlChildVMerge(_value);
function ReadXmlChildHideMark();
function WriteXmlChildHideMark(_value);
// normal property // normal property
property TcW read ReadXmlChildTcW; property TcW read ReadXmlChildTcW;
@ -29,6 +32,7 @@ public
XmlChildGridSpan: GridSpan; XmlChildGridSpan: GridSpan;
XmlChildVMerge: OpenXmlEmpty; XmlChildVMerge: OpenXmlEmpty;
XmlChildVAlign: PureWVal; XmlChildVAlign: PureWVal;
XmlChildHideMark: OpenXmlEmpty;
XmlChildShd: Shd; XmlChildShd: Shd;
end; end;
@ -60,7 +64,8 @@ begin
pre + "gridSpan": array(1, makeweakref(thisFunction(ReadXmlChildGridSpan))), pre + "gridSpan": array(1, makeweakref(thisFunction(ReadXmlChildGridSpan))),
pre + "vMerge": array(2, makeweakref(thisFunction(ReadXmlChildVMerge))), pre + "vMerge": array(2, makeweakref(thisFunction(ReadXmlChildVMerge))),
pre + "vAlign": array(3, makeweakref(thisFunction(ReadXmlChildVAlign))), 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_); container_ := new TSOfficeContainer(sorted_child_);
end; end;
@ -78,6 +83,8 @@ begin
ifnil({self.}XmlChildVMerge) ? {self.}VMerge.Copy(_obj.XmlChildVMerge) : {self.}XmlChildVMerge.Copy(_obj.XmlChildVMerge); ifnil({self.}XmlChildVMerge) ? {self.}VMerge.Copy(_obj.XmlChildVMerge) : {self.}XmlChildVMerge.Copy(_obj.XmlChildVMerge);
if not ifnil(_obj.XmlChildVAlign) then if not ifnil(_obj.XmlChildVAlign) then
{self.}VAlign.Copy(_obj.XmlChildVAlign); {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 if not ifnil(_obj.XmlChildShd) then
{self.}Shd.Copy(_obj.XmlChildShd); {self.}Shd.Copy(_obj.XmlChildShd);
tslassigning := tslassigning_backup; tslassigning := tslassigning_backup;
@ -104,6 +111,27 @@ begin
{self.}XmlChildVMerge.Value := _value; {self.}XmlChildVMerge.Value := _value;
end; 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(); function TcPr.ReadXmlChildTcW();
begin begin
if tslassigning and ifnil({self.}XmlChildTcW) then if tslassigning and ifnil({self.}XmlChildTcW) then

View File

@ -108,7 +108,7 @@ end;
function OpenXmlEmpty.ReadXmlAttrVal(); function OpenXmlEmpty.ReadXmlAttrVal();
begin begin
return {self.}XmlAttrVal.Value; return {self.}XmlAttrVal.Value = "0" ? false : {self.}XmlAttrVal.Value = "1" ? true : {self.}XmlAttrVal.Value;
end; end;
function OpenXmlEmpty.WriteXmlAttrVal(_value: any); function OpenXmlEmpty.WriteXmlAttrVal(_value: any);

View File

@ -2,6 +2,7 @@ type TSComponentsBase = class
public public
function Create(); function Create();
function Init();virtual; function Init();virtual;
function InitZip(zip: ZipFile);
function OpenFile(alias: string; file: string; password: string): tableArray; function OpenFile(alias: string; file: string; password: string): tableArray;
function Zip(): ZipFile; function Zip(): ZipFile;
@ -20,6 +21,12 @@ function TSComponentsBase.Create();
begin begin
end; end;
function TSComponentsBase.InitZip(zip: ZipFile);
begin
{self.}Init();
zipfile_ := zip;
end;
function TSComponentsBase.OpenFile(alias: string; file: string; password: string): tableArray; function TSComponentsBase.OpenFile(alias: string; file: string; password: string): tableArray;
begin begin
{self.}Init(); {self.}Init();