update autoclass

This commit is contained in:
csh
2024-09-20 14:42:26 +08:00
parent e954a69083
commit 533a202847
45 changed files with 1269 additions and 51 deletions
@@ -0,0 +1,30 @@
type FUnitDecorator = class(F)
uses TSSafeUnitConverter;
public
function Create(_obj: F);
function GetObject();
function Convert();
private
object_: F;
end;
function FUnitDecorator.Create(_obj: F);
begin
class(F).Create();
object_ := _obj;
{self.}Convert();
end;
function FUnitDecorator.GetObject();
begin
return object_;
end;
function FUnitDecorator.Convert();
begin
tslassigning_backup := tslassigning;
tslassigning := 1;
if not ifnil(object_.XmlAttrEqn) then
{self.}Eqn := object_.XmlAttrEqn.Value;
tslassigning := tslassigning_backup;
end;
@@ -0,0 +1,30 @@
type FootnoteReferenceUnitDecorator = class(FootnoteReference)
uses TSSafeUnitConverter;
public
function Create(_obj: FootnoteReference);
function GetObject();
function Convert();
private
object_: FootnoteReference;
end;
function FootnoteReferenceUnitDecorator.Create(_obj: FootnoteReference);
begin
class(FootnoteReference).Create();
object_ := _obj;
{self.}Convert();
end;
function FootnoteReferenceUnitDecorator.GetObject();
begin
return object_;
end;
function FootnoteReferenceUnitDecorator.Convert();
begin
tslassigning_backup := tslassigning;
tslassigning := 1;
if not ifnil(object_.XmlAttrId) then
{self.}Id := object_.XmlAttrId.Value;
tslassigning := tslassigning_backup;
end;
@@ -0,0 +1,28 @@
type FormulasUnitDecorator = class(Formulas)
uses TSSafeUnitConverter;
public
function Create(_obj: Formulas);
function GetObject();
function Convert();
private
object_: Formulas;
end;
function FormulasUnitDecorator.Create(_obj: Formulas);
begin
class(Formulas).Create();
object_ := _obj;
{self.}Convert();
end;
function FormulasUnitDecorator.GetObject();
begin
return object_;
end;
function FormulasUnitDecorator.Convert();
begin
tslassigning_backup := tslassigning;
tslassigning := 1;
tslassigning := tslassigning_backup;
end;
@@ -0,0 +1,32 @@
type ImagedataUnitDecorator = class(Imagedata)
uses TSSafeUnitConverter;
public
function Create(_obj: Imagedata);
function GetObject();
function Convert();
private
object_: Imagedata;
end;
function ImagedataUnitDecorator.Create(_obj: Imagedata);
begin
class(Imagedata).Create();
object_ := _obj;
{self.}Convert();
end;
function ImagedataUnitDecorator.GetObject();
begin
return object_;
end;
function ImagedataUnitDecorator.Convert();
begin
tslassigning_backup := tslassigning;
tslassigning := 1;
if not ifnil(object_.XmlAttrId) then
{self.}Id := object_.XmlAttrId.Value;
if not ifnil(object_.XmlAttrTitle) then
{self.}Title := object_.XmlAttrTitle.Value;
tslassigning := tslassigning_backup;
end;
@@ -0,0 +1,32 @@
type LockUnitDecorator = class(Lock)
uses TSSafeUnitConverter;
public
function Create(_obj: Lock);
function GetObject();
function Convert();
private
object_: Lock;
end;
function LockUnitDecorator.Create(_obj: Lock);
begin
class(Lock).Create();
object_ := _obj;
{self.}Convert();
end;
function LockUnitDecorator.GetObject();
begin
return object_;
end;
function LockUnitDecorator.Convert();
begin
tslassigning_backup := tslassigning;
tslassigning := 1;
if not ifnil(object_.XmlAttrExt) then
{self.}Ext := object_.XmlAttrExt.Value;
if not ifnil(object_.XmlAttrAspectration) then
{self.}Aspectration := object_.XmlAttrAspectration.Value;
tslassigning := tslassigning_backup;
end;
@@ -0,0 +1,40 @@
type OLEObjectUnitDecorator = class(OLEObject)
uses TSSafeUnitConverter;
public
function Create(_obj: OLEObject);
function GetObject();
function Convert();
private
object_: OLEObject;
end;
function OLEObjectUnitDecorator.Create(_obj: OLEObject);
begin
class(OLEObject).Create();
object_ := _obj;
{self.}Convert();
end;
function OLEObjectUnitDecorator.GetObject();
begin
return object_;
end;
function OLEObjectUnitDecorator.Convert();
begin
tslassigning_backup := tslassigning;
tslassigning := 1;
if not ifnil(object_.XmlAttrType) then
{self.}Type := object_.XmlAttrType.Value;
if not ifnil(object_.XmlAttrProgID) then
{self.}ProgID := object_.XmlAttrProgID.Value;
if not ifnil(object_.XmlAttrShapeID) then
{self.}ShapeID := object_.XmlAttrShapeID.Value;
if not ifnil(object_.XmlAttrDrawAspect) then
{self.}DrawAspect := object_.XmlAttrDrawAspect.Value;
if not ifnil(object_.XmlAttrObjectID) then
{self.}ObjectID := object_.XmlAttrObjectID.Value;
if not ifnil(object_.XmlAttrId) then
{self.}Id := object_.XmlAttrId.Value;
tslassigning := tslassigning_backup;
end;
@@ -0,0 +1,40 @@
type ObjectUnitDecorator = class(Object)
uses TSSafeUnitConverter;
public
function Create(_obj: Object);
function GetObject();
function Convert();
private
object_: Object;
end;
function ObjectUnitDecorator.Create(_obj: Object);
begin
class(Object).Create();
object_ := _obj;
{self.}Convert();
end;
function ObjectUnitDecorator.GetObject();
begin
return object_;
end;
function ObjectUnitDecorator.Convert();
begin
tslassigning_backup := tslassigning;
tslassigning := 1;
if not ifnil(object_.XmlAttrDxaOrig) then
{self.}DxaOrig := TSSafeUnitConverter.TwipsToPoints(object_.XmlAttrDxaOrig.Value);
if not ifnil(object_.XmlAttrDyaOrig) then
{self.}DyaOrig := TSSafeUnitConverter.TwipsToPoints(object_.XmlAttrDyaOrig.Value);
if not ifnil(object_.XmlAttrAnchorId) then
{self.}AnchorId := object_.XmlAttrAnchorId.Value;
if not ifnil(object_.XmlChildShapetype) then
{self.}XmlChildShapetype := new ShapetypeUnitDecorator(object_.XmlChildShapetype);
if not ifnil(object_.XmlChildShape) then
{self.}XmlChildShape := new ShapeUnitDecorator(object_.XmlChildShape);
if not ifnil(object_.XmlChildOLEObject) then
{self.}XmlChildOLEObject := new OLEObjectUnitDecorator(object_.XmlChildOLEObject);
tslassigning := tslassigning_backup;
end;
@@ -24,6 +24,8 @@ function PathUnitDecorator.Convert();
begin
tslassigning_backup := tslassigning;
tslassigning := 1;
if not ifnil(object_.XmlAttrExtrusionok) then
{self.}Extrusionok := object_.XmlAttrExtrusionok.Value;
if not ifnil(object_.XmlAttrGradientshapeok) then
{self.}Gradientshapeok := object_.XmlAttrGradientshapeok.Value;
if not ifnil(object_.XmlAttrConnecttype) then
@@ -52,5 +52,7 @@ begin
{self.}XmlChildT := new TUnitDecorator(object_.XmlChildT);
if not ifnil(object_.XmlChildFootnoteReference) then
{self.}XmlChildFootnoteReference := new FootnoteReferenceUnitDecorator(object_.XmlChildFootnoteReference);
if not ifnil(object_.XmlChildObject) then
{self.}XmlChildObject := new ObjectUnitDecorator(object_.XmlChildObject);
tslassigning := tslassigning_backup;
end;
@@ -26,6 +26,8 @@ begin
tslassigning := 1;
if not ifnil(object_.XmlAttrId) then
{self.}Id := object_.XmlAttrId.Value;
if not ifnil(object_.XmlAttrStyle) then
{self.}Style := object_.XmlAttrStyle.Value;
if not ifnil(object_.XmlAttrSpid) then
{self.}Spid := object_.XmlAttrSpid.Value;
if not ifnil(object_.XmlAttrType) then
@@ -36,7 +38,11 @@ begin
{self.}Filled := object_.XmlAttrFilled.Value;
if not ifnil(object_.XmlAttrStroked) then
{self.}Stroked := object_.XmlAttrStroked.Value;
if not ifnil(object_.XmlAttrOle) then
{self.}Ole := object_.XmlAttrOle.Value;
if not ifnil(object_.XmlChildTextbox) then
{self.}XmlChildTextbox := new TextboxUnitDecorator(object_.XmlChildTextbox);
if not ifnil(object_.XmlChildImagedata) then
{self.}XmlChildImagedata := new ImagedataUnitDecorator(object_.XmlChildImagedata);
tslassigning := tslassigning_backup;
end;
@@ -32,11 +32,21 @@ begin
{self.}Coordsize := object_.XmlAttrCoordsize.Value;
if not ifnil(object_.XmlAttrSpt) then
{self.}Spt := object_.XmlAttrSpt.Value;
if not ifnil(object_.XmlAttrPreferrelative) then
{self.}Preferrelative := object_.XmlAttrPreferrelative.Value;
if not ifnil(object_.XmlAttrPath) then
{self.}Path := object_.XmlAttrPath.Value;
if not ifnil(object_.XmlAttrFilled) then
{self.}Filled := object_.XmlAttrFilled.Value;
if not ifnil(object_.XmlAttrStroked) then
{self.}Stroked := object_.XmlAttrStroked.Value;
if not ifnil(object_.XmlChildStroke) then
{self.}XmlChildStroke := new StrokeUnitDecorator(object_.XmlChildStroke);
if not ifnil(object_.XmlChildFormulas) then
{self.}XmlChildFormulas := new formulasUnitDecorator(object_.XmlChildFormulas);
if not ifnil(object_.XmlChildPath) then
{self.}XmlChildPath := new PathUnitDecorator(object_.XmlChildPath);
if not ifnil(object_.XmlChildLock) then
{self.}XmlChildLock := new LockUnitDecorator(object_.XmlChildLock);
tslassigning := tslassigning_backup;
end;