1. 单位装饰器支持INT转换

2. 升级配置项
This commit is contained in:
csh
2024-08-14 13:45:00 +08:00
parent fedb1cd28a
commit 7936d19b98
13 changed files with 264 additions and 32 deletions
@@ -0,0 +1,26 @@
type GridSpanUnitDecorator = class(GridSpan)
uses TSSafeUnitConverter;
public
function Create(_obj: GridSpan);
function GetObject();
function Convert();
private
object_: GridSpan;
end;
function GridSpanUnitDecorator.Create(_obj: GridSpan);
begin
class(GridSpan).Create();
object_ := _obj;
{self.}Convert();
end;
function GridSpanUnitDecorator.GetObject();
begin
return object_;
end;
function GridSpanUnitDecorator.Convert();
begin
{self.}XmlAttrVal.Value := TSSafeUnitConverter.ToInt(object_.XmlAttrVal.Value);
end;
@@ -22,5 +22,5 @@ end;
function PgNumTypeUnitDecorator.Convert();
begin
{self.}XmlAttrStart.Value := object_.XmlAttrStart.Value;
{self.}XmlAttrStart.Value := TSSafeUnitConverter.ToInt(object_.XmlAttrStart.Value);
end;
@@ -41,5 +41,4 @@ begin
{self.}TblPr := new TblPrUnitDecorator(object_.TblPr);
{self.}TrPr := new TrPrUnitDecorator(object_.TrPr);
{self.}TcPr := new TcPrUnitDecorator(object_.TcPr);
{self.}TblStylePr := new TblStylePrUnitDecorator(object_.TblStylePr);
end;
@@ -22,6 +22,8 @@ end;
function TblPrUnitDecorator.Convert();
begin
{self.}TblStyleRowBandSize := new PureWValUnitDecorator(object_.TblStyleRowBandSize);
{self.}TblStyleColBandSize := new PureWValUnitDecorator(object_.TblStyleColBandSize);
{self.}Jc := new PureWValUnitDecorator(object_.Jc);
{self.}TblStyle := new PureWValUnitDecorator(object_.TblStyle);
{self.}TblW := new TblWUnitDecorator(object_.TblW);
@@ -22,6 +22,7 @@ end;
function TblStylePrUnitDecorator.Convert();
begin
{self.}XmlAttrType.Value := object_.XmlAttrType.Value;
{self.}PPr := new PPrUnitDecorator(object_.PPr);
{self.}TblPr := new TblPrUnitDecorator(object_.TblPr);
{self.}TrPr := new TrPrUnitDecorator(object_.TrPr);
@@ -23,8 +23,8 @@ end;
function TcPrUnitDecorator.Convert();
begin
{self.}TcW := new TblWUnitDecorator(object_.TcW);
{self.}GridSpan := new PureWValUnitDecorator(object_.GridSpan);
{self.}VMerge := new PureWValUnitDecorator(object_.VMerge);
{self.}GridSpan := new GridSpanUnitDecorator(object_.GridSpan);
if not ifnil(object_.XmlChildVMerge.Value) then {self.}XmlChildVMerge.Value := object_.XmlChildVMerge.Value;
{self.}VAlign := new PureWValUnitDecorator(object_.VAlign);
{self.}Shd := new ShdUnitDecorator(object_.Shd);
end;