update
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
type InsUnitDecorator = class(Ins)
|
||||
uses TSSafeUnitConverter;
|
||||
public
|
||||
function Create(_obj: Ins);
|
||||
function GetObject();
|
||||
function Convert();
|
||||
private
|
||||
object_: Ins;
|
||||
end;
|
||||
|
||||
function InsUnitDecorator.Create(_obj: Ins);
|
||||
begin
|
||||
class(Ins).Create();
|
||||
object_ := _obj;
|
||||
{self.}Convert();
|
||||
end;
|
||||
|
||||
function InsUnitDecorator.GetObject();
|
||||
begin
|
||||
return object_;
|
||||
end;
|
||||
|
||||
function InsUnitDecorator.Convert();
|
||||
begin
|
||||
tslassigning_backup := tslassigning;
|
||||
tslassigning := 1;
|
||||
if not ifnil(object_.XmlAttrId) then
|
||||
{self.}Id := object_.XmlAttrId.Value;
|
||||
if not ifnil(object_.XmlAttrAuthor) then
|
||||
{self.}Author := object_.XmlAttrAuthor.Value;
|
||||
if not ifnil(object_.XmlAttrDate) then
|
||||
{self.}Date := object_.XmlAttrDate.Value;
|
||||
if not ifnil(object_.XmlAttrW16duDateUtc) then
|
||||
{self.}W16duDateUtc := object_.XmlAttrW16duDateUtc.Value;
|
||||
elems := object_.Rs();
|
||||
for _,elem in elems do
|
||||
{self.}AppendChild(new RUnitDecorator(elem));
|
||||
tslassigning := tslassigning_backup;
|
||||
end;
|
||||
@@ -31,7 +31,7 @@ begin
|
||||
if not ifnil(object_.XmlChildWidowControl) then
|
||||
{self.}WidowControl.Copy(object_.XmlChildWidowControl);
|
||||
if not ifnil(object_.XmlChildSnapToGrid) then
|
||||
{self.}XmlChildSnapToGrid := new PureWValUnitDecorator(object_.XmlChildSnapToGrid);
|
||||
{self.}SnapToGrid.Copy(object_.XmlChildSnapToGrid);
|
||||
if not ifnil(object_.XmlChildPStyle) then
|
||||
{self.}XmlChildPStyle := new PureWValUnitDecorator(object_.XmlChildPStyle);
|
||||
if not ifnil(object_.XmlChildNumPr) then
|
||||
|
||||
@@ -38,6 +38,8 @@ begin
|
||||
{self.}WRsidP := object_.XmlAttrWRsidP.Value;
|
||||
if not ifnil(object_.XmlChildPPr) then
|
||||
{self.}XmlChildPPr := new PPrUnitDecorator(object_.XmlChildPPr);
|
||||
if not ifnil(object_.XmlChildIns) then
|
||||
{self.}XmlChildIns := new InsUnitDecorator(object_.XmlChildIns);
|
||||
elems := object_.Rs();
|
||||
for _,elem in elems do
|
||||
{self.}AppendChild(new RUnitDecorator(elem));
|
||||
|
||||
@@ -32,6 +32,8 @@ begin
|
||||
{self.}XmlChildWebHidden := new PureWValUnitDecorator(object_.XmlChildWebHidden);
|
||||
if not ifnil(object_.XmlChildRStyle) then
|
||||
{self.}XmlChildRStyle := new PureWValUnitDecorator(object_.XmlChildRStyle);
|
||||
if not ifnil(object_.XmlChildIns) then
|
||||
{self.}XmlChildIns := new InsUnitDecorator(object_.XmlChildIns);
|
||||
if not ifnil(object_.XmlChildRFonts) then
|
||||
{self.}XmlChildRFonts := new RFontsUnitDecorator(object_.XmlChildRFonts);
|
||||
if not ifnil(object_.XmlChildKern) then
|
||||
|
||||
@@ -34,5 +34,7 @@ begin
|
||||
{self.}CantSplit.Copy(object_.XmlChildCantSplit);
|
||||
if not ifnil(object_.XmlChildCnfStyle) then
|
||||
{self.}XmlChildCnfStyle := new CnfStyleUnitDecorator(object_.XmlChildCnfStyle);
|
||||
if not ifnil(object_.XmlChildIns) then
|
||||
{self.}XmlChildIns := new InsUnitDecorator(object_.XmlChildIns);
|
||||
tslassigning := tslassigning_backup;
|
||||
end;
|
||||
Reference in New Issue
Block a user