552 lines
14 KiB
Plaintext
552 lines
14 KiB
Plaintext
unit VMLUnitDecorator;
|
|
interface
|
|
uses VML, TSSafeUnitConverter;
|
|
|
|
type ShapetypeUnitDecorator = class(Shapetype)
|
|
public
|
|
function create(_obj: Shapetype);
|
|
function GetObject();
|
|
function Convert();
|
|
private
|
|
object_: Shapetype;
|
|
end;
|
|
|
|
type FormulasUnitDecorator = class(Formulas)
|
|
public
|
|
function create(_obj: Formulas);
|
|
function GetObject();
|
|
function Convert();
|
|
private
|
|
object_: Formulas;
|
|
end;
|
|
|
|
type LockUnitDecorator = class(Lock)
|
|
public
|
|
function create(_obj: Lock);
|
|
function GetObject();
|
|
function Convert();
|
|
private
|
|
object_: Lock;
|
|
end;
|
|
|
|
type FUnitDecorator = class(F)
|
|
public
|
|
function create(_obj: F);
|
|
function GetObject();
|
|
function Convert();
|
|
private
|
|
object_: F;
|
|
end;
|
|
|
|
type StrokeUnitDecorator = class(Stroke)
|
|
public
|
|
function create(_obj: Stroke);
|
|
function GetObject();
|
|
function Convert();
|
|
private
|
|
object_: Stroke;
|
|
end;
|
|
|
|
type PathUnitDecorator = class(Path)
|
|
public
|
|
function create(_obj: Path);
|
|
function GetObject();
|
|
function Convert();
|
|
private
|
|
object_: Path;
|
|
end;
|
|
|
|
type TextpathUnitDecorator = class(Textpath)
|
|
public
|
|
function create(_obj: Textpath);
|
|
function GetObject();
|
|
function Convert();
|
|
private
|
|
object_: Textpath;
|
|
end;
|
|
|
|
type HandlesUnitDecorator = class(Handles)
|
|
public
|
|
function create(_obj: Handles);
|
|
function GetObject();
|
|
function Convert();
|
|
private
|
|
object_: Handles;
|
|
end;
|
|
|
|
type HUnitDecorator = class(H)
|
|
public
|
|
function create(_obj: H);
|
|
function GetObject();
|
|
function Convert();
|
|
private
|
|
object_: H;
|
|
end;
|
|
|
|
type ShapeUnitDecorator = class(Shape)
|
|
public
|
|
function create(_obj: Shape);
|
|
function GetObject();
|
|
function Convert();
|
|
private
|
|
object_: Shape;
|
|
end;
|
|
|
|
type WrapUnitDecorator = class(Wrap)
|
|
public
|
|
function create(_obj: Wrap);
|
|
function GetObject();
|
|
function Convert();
|
|
private
|
|
object_: Wrap;
|
|
end;
|
|
|
|
type FillUnitDecorator = class(Fill)
|
|
public
|
|
function create(_obj: Fill);
|
|
function GetObject();
|
|
function Convert();
|
|
private
|
|
object_: Fill;
|
|
end;
|
|
|
|
type ImagedataUnitDecorator = class(Imagedata)
|
|
public
|
|
function create(_obj: Imagedata);
|
|
function GetObject();
|
|
function Convert();
|
|
private
|
|
object_: Imagedata;
|
|
end;
|
|
|
|
type TextboxUnitDecorator = class(Textbox)
|
|
public
|
|
function create(_obj: Textbox);
|
|
function GetObject();
|
|
function Convert();
|
|
private
|
|
object_: Textbox;
|
|
end;
|
|
|
|
type OLEObjectUnitDecorator = class(OLEObject)
|
|
public
|
|
function create(_obj: OLEObject);
|
|
function GetObject();
|
|
function Convert();
|
|
private
|
|
object_: OLEObject;
|
|
end;
|
|
|
|
implementation
|
|
|
|
function ShapetypeUnitDecorator.create(_obj: Shapetype);
|
|
begin
|
|
class(Shapetype).create();
|
|
object_ := _obj;
|
|
{self.}Convert();
|
|
end;
|
|
|
|
function ShapetypeUnitDecorator.GetObject();
|
|
begin
|
|
return object_;
|
|
end;
|
|
|
|
function ShapetypeUnitDecorator.Convert();
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
if not ifnil(object_.XmlAttrAnchorId) then
|
|
{self.}AnchorId := object_.XmlAttrAnchorId.Value;
|
|
if not ifnil(object_.XmlAttrId) then
|
|
{self.}Id := object_.XmlAttrId.Value;
|
|
if not ifnil(object_.XmlAttrCoordsize) then
|
|
{self.}Coordsize := object_.XmlAttrCoordsize.Value;
|
|
if not ifnil(object_.XmlAttrSpt) then
|
|
{self.}Spt := object_.XmlAttrSpt.Value;
|
|
if not ifnil(object_.XmlAttrAdj) then
|
|
{self.}Adj := object_.XmlAttrAdj.Value;
|
|
if not ifnil(object_.XmlAttrPreferrelative) then
|
|
{self.}Preferrelative := object_.XmlAttrPreferrelative.Value;
|
|
if not ifnil(object_.XmlAttrAttrPath) then
|
|
{self.}AttrPath := object_.XmlAttrAttrPath.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_.XmlChildTextpath) then
|
|
{self.}XmlChildTextpath := new TextpathUnitDecorator(object_.XmlChildTextpath);
|
|
if not ifnil(object_.XmlChildHandles) then
|
|
{self.}XmlChildHandles := new HandlesUnitDecorator(object_.XmlChildHandles);
|
|
if not ifnil(object_.XmlChildLock) then
|
|
{self.}XmlChildLock := new LockUnitDecorator(object_.XmlChildLock);
|
|
tslassigning := tslassigning_backup;
|
|
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;
|
|
elems := object_.Fs();
|
|
for _,elem in elems do
|
|
{self.}AppendChild(new FUnitDecorator(elem));
|
|
tslassigning := tslassigning_backup;
|
|
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;
|
|
if not ifnil(object_.XmlAttrText) then
|
|
{self.}Text := object_.XmlAttrText.Value;
|
|
if not ifnil(object_.XmlAttrShapetype) then
|
|
{self.}Shapetype := object_.XmlAttrShapetype.Value;
|
|
tslassigning := tslassigning_backup;
|
|
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;
|
|
|
|
function StrokeUnitDecorator.create(_obj: Stroke);
|
|
begin
|
|
class(Stroke).create();
|
|
object_ := _obj;
|
|
{self.}Convert();
|
|
end;
|
|
|
|
function StrokeUnitDecorator.GetObject();
|
|
begin
|
|
return object_;
|
|
end;
|
|
|
|
function StrokeUnitDecorator.Convert();
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
if not ifnil(object_.XmlAttrJoinstyle) then
|
|
{self.}Joinstyle := object_.XmlAttrJoinstyle.Value;
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function PathUnitDecorator.create(_obj: Path);
|
|
begin
|
|
class(Path).create();
|
|
object_ := _obj;
|
|
{self.}Convert();
|
|
end;
|
|
|
|
function PathUnitDecorator.GetObject();
|
|
begin
|
|
return object_;
|
|
end;
|
|
|
|
function PathUnitDecorator.Convert();
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
if not ifnil(object_.XmlAttrExtrusionok) then
|
|
{self.}Extrusionok := object_.XmlAttrExtrusionok.Value;
|
|
if not ifnil(object_.XmlAttrTextpathok) then
|
|
{self.}Textpathok := object_.XmlAttrTextpathok.Value;
|
|
if not ifnil(object_.XmlAttrGradientshapeok) then
|
|
{self.}Gradientshapeok := object_.XmlAttrGradientshapeok.Value;
|
|
if not ifnil(object_.XmlAttrConnecttype) then
|
|
{self.}Connecttype := object_.XmlAttrConnecttype.Value;
|
|
if not ifnil(object_.XmlAttrConnectlocs) then
|
|
{self.}Connectlocs := object_.XmlAttrConnectlocs.Value;
|
|
if not ifnil(object_.XmlAttrConnectangles) then
|
|
{self.}Connectangles := object_.XmlAttrConnectangles.Value;
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function TextpathUnitDecorator.create(_obj: Textpath);
|
|
begin
|
|
class(Textpath).create();
|
|
object_ := _obj;
|
|
{self.}Convert();
|
|
end;
|
|
|
|
function TextpathUnitDecorator.GetObject();
|
|
begin
|
|
return object_;
|
|
end;
|
|
|
|
function TextpathUnitDecorator.Convert();
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
if not ifnil(object_.XmlAttr_On) then
|
|
{self.}_On := object_.XmlAttr_On.Value;
|
|
if not ifnil(object_.XmlAttrFitshape) then
|
|
{self.}Fitshape := object_.XmlAttrFitshape.Value;
|
|
if not ifnil(object_.XmlAttrStyle) then
|
|
{self.}Style := object_.XmlAttrStyle.Value;
|
|
if not ifnil(object_.XmlAttrString) then
|
|
{self.}String := object_.XmlAttrString.Value;
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function HandlesUnitDecorator.create(_obj: Handles);
|
|
begin
|
|
class(Handles).create();
|
|
object_ := _obj;
|
|
{self.}Convert();
|
|
end;
|
|
|
|
function HandlesUnitDecorator.GetObject();
|
|
begin
|
|
return object_;
|
|
end;
|
|
|
|
function HandlesUnitDecorator.Convert();
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
if not ifnil(object_.XmlChildH) then
|
|
{self.}XmlChildH := new HUnitDecorator(object_.XmlChildH);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function HUnitDecorator.create(_obj: H);
|
|
begin
|
|
class(H).create();
|
|
object_ := _obj;
|
|
{self.}Convert();
|
|
end;
|
|
|
|
function HUnitDecorator.GetObject();
|
|
begin
|
|
return object_;
|
|
end;
|
|
|
|
function HUnitDecorator.Convert();
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
if not ifnil(object_.XmlAttrPosition) then
|
|
{self.}Position := object_.XmlAttrPosition.Value;
|
|
if not ifnil(object_.XmlAttrXrange) then
|
|
{self.}Xrange := object_.XmlAttrXrange.Value;
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function ShapeUnitDecorator.create(_obj: Shape);
|
|
begin
|
|
class(Shape).create();
|
|
object_ := _obj;
|
|
{self.}Convert();
|
|
end;
|
|
|
|
function ShapeUnitDecorator.GetObject();
|
|
begin
|
|
return object_;
|
|
end;
|
|
|
|
function ShapeUnitDecorator.Convert();
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
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
|
|
{self.}Type := object_.XmlAttrType.Value;
|
|
if not ifnil(object_.XmlAttrGfxdata) then
|
|
{self.}Gfxdata := object_.XmlAttrGfxdata.Value;
|
|
if not ifnil(object_.XmlAttrFilled) then
|
|
{self.}Filled := object_.XmlAttrFilled.Value;
|
|
if not ifnil(object_.XmlAttrAllowincell) then
|
|
{self.}Allowincell := object_.XmlAttrAllowincell.Value;
|
|
if not ifnil(object_.XmlAttrFillcolor) then
|
|
{self.}Fillcolor := object_.XmlAttrFillcolor.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_.XmlChildFill) then
|
|
{self.}XmlChildFill := new FillUnitDecorator(object_.XmlChildFill);
|
|
if not ifnil(object_.XmlChildTextbox) then
|
|
{self.}XmlChildTextbox := new TextboxUnitDecorator(object_.XmlChildTextbox);
|
|
if not ifnil(object_.XmlChildTextpath) then
|
|
{self.}XmlChildTextpath := new TextpathUnitDecorator(object_.XmlChildTextpath);
|
|
if not ifnil(object_.XmlChildImagedata) then
|
|
{self.}XmlChildImagedata := new ImagedataUnitDecorator(object_.XmlChildImagedata);
|
|
if not ifnil(object_.XmlChildWrap) then
|
|
{self.}XmlChildWrap := new WrapUnitDecorator(object_.XmlChildWrap);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function WrapUnitDecorator.create(_obj: Wrap);
|
|
begin
|
|
class(Wrap).create();
|
|
object_ := _obj;
|
|
{self.}Convert();
|
|
end;
|
|
|
|
function WrapUnitDecorator.GetObject();
|
|
begin
|
|
return object_;
|
|
end;
|
|
|
|
function WrapUnitDecorator.Convert();
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
if not ifnil(object_.XmlAttrAnchorx) then
|
|
{self.}Anchorx := object_.XmlAttrAnchorx.Value;
|
|
if not ifnil(object_.XmlAttrAnchory) then
|
|
{self.}Anchory := object_.XmlAttrAnchory.Value;
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function FillUnitDecorator.create(_obj: Fill);
|
|
begin
|
|
class(Fill).create();
|
|
object_ := _obj;
|
|
{self.}Convert();
|
|
end;
|
|
|
|
function FillUnitDecorator.GetObject();
|
|
begin
|
|
return object_;
|
|
end;
|
|
|
|
function FillUnitDecorator.Convert();
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
if not ifnil(object_.XmlAttrOpacity) then
|
|
{self.}Opacity := object_.XmlAttrOpacity.Value;
|
|
tslassigning := tslassigning_backup;
|
|
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;
|
|
|
|
function TextboxUnitDecorator.create(_obj: Textbox);
|
|
begin
|
|
class(Textbox).create();
|
|
object_ := _obj;
|
|
{self.}Convert();
|
|
end;
|
|
|
|
function TextboxUnitDecorator.GetObject();
|
|
begin
|
|
return object_;
|
|
end;
|
|
|
|
function TextboxUnitDecorator.Convert();
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
if not ifnil(object_.XmlChildTxbxContent) then
|
|
{self.}XmlChildTxbxContent := new TxbxContentUnitDecorator(object_.XmlChildTxbxContent);
|
|
tslassigning := tslassigning_backup;
|
|
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;
|
|
|
|
end. |