update DOCX
This commit is contained in:
parent
27013cd4b0
commit
797101d1f3
|
|
@ -0,0 +1,36 @@
|
|||
type TabsAdapter = class
|
||||
public
|
||||
function Create(_obj: Tabs);
|
||||
function Init();
|
||||
|
||||
function GetTabByVal(_key: string);
|
||||
function SetTabByVal(_key: string; _value: tslobj);
|
||||
|
||||
private
|
||||
object_: Tabs;
|
||||
tab_hash_: tableArray;
|
||||
end;
|
||||
|
||||
function TabsAdapter.Create(_obj: Tabs);
|
||||
begin
|
||||
object_ := _obj;
|
||||
tab_hash_ := array();
|
||||
{self.}Init();
|
||||
end;
|
||||
|
||||
function TabsAdapter.Init();
|
||||
begin
|
||||
elements := object_.Tabs();
|
||||
for k,v in elements do
|
||||
tab_hash_[v.Val] := v;
|
||||
end;
|
||||
|
||||
function TabsAdapter.GetTabByVal(_key: string);
|
||||
begin
|
||||
return tab_hash_[_key];
|
||||
end;
|
||||
|
||||
function TabsAdapter.SetTabByVal(_key: string; _value: tslobj);
|
||||
begin
|
||||
tab_hash_[_key] := _value;
|
||||
end;
|
||||
|
|
@ -40,6 +40,8 @@ begin
|
|||
{self.}BehindDoc := object_.XmlAttrBehindDoc.Value;
|
||||
if not ifnil(object_.XmlAttrLocked) then
|
||||
{self.}Locked := object_.XmlAttrLocked.Value;
|
||||
if not ifnil(object_.XmlAttrHidden) then
|
||||
{self.}Hidden := object_.XmlAttrHidden.Value;
|
||||
if not ifnil(object_.XmlAttrLayoutInCell) then
|
||||
{self.}LayoutInCell := object_.XmlAttrLayoutInCell.Value;
|
||||
if not ifnil(object_.XmlAttrAllowOverlap) then
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ begin
|
|||
tslassigning := 1;
|
||||
if not ifnil(object_.XmlAttrFldCharType) then
|
||||
{self.}FldCharType := object_.XmlAttrFldCharType.Value;
|
||||
if not ifnil(object_.XmlAttrFldLock) then
|
||||
{self.}FldLock := object_.XmlAttrFldLock.Value;
|
||||
if not ifnil(object_.XmlAttrDirty) then
|
||||
{self.}Dirty := object_.XmlAttrDirty.Value;
|
||||
tslassigning := tslassigning_backup;
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ begin
|
|||
tslassigning := 1;
|
||||
if not ifnil(object_.XmlChildNoProof) then
|
||||
{self.}XmlChildNoProof := new PureValUnitDecorator(object_.XmlChildNoProof);
|
||||
if not ifnil(object_.XmlChildPosition) then
|
||||
{self.}XmlChildPosition := new PureValUnitDecorator(object_.XmlChildPosition);
|
||||
if not ifnil(object_.XmlChildWebHidden) then
|
||||
{self.}XmlChildWebHidden := new PureWValUnitDecorator(object_.XmlChildWebHidden);
|
||||
if not ifnil(object_.XmlChildRStyle) then
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ public
|
|||
property RelativeHeight read ReadXmlAttrRelativeHeight write WriteXmlAttrRelativeHeight;
|
||||
property BehindDoc read ReadXmlAttrBehindDoc write WriteXmlAttrBehindDoc;
|
||||
property Locked read ReadXmlAttrLocked write WriteXmlAttrLocked;
|
||||
property Hidden read ReadXmlAttrHidden write WriteXmlAttrHidden;
|
||||
property LayoutInCell read ReadXmlAttrLayoutInCell write WriteXmlAttrLayoutInCell;
|
||||
property AllowOverlap read ReadXmlAttrAllowOverlap write WriteXmlAttrAllowOverlap;
|
||||
property AnchorId read ReadXmlAttrAnchorId write WriteXmlAttrAnchorId;
|
||||
|
|
@ -37,6 +38,8 @@ public
|
|||
function WriteXmlAttrBehindDoc(_value);
|
||||
function ReadXmlAttrLocked();
|
||||
function WriteXmlAttrLocked(_value);
|
||||
function ReadXmlAttrHidden();
|
||||
function WriteXmlAttrHidden(_value);
|
||||
function ReadXmlAttrLayoutInCell();
|
||||
function WriteXmlAttrLayoutInCell(_value);
|
||||
function ReadXmlAttrAllowOverlap();
|
||||
|
|
@ -83,6 +86,7 @@ public
|
|||
XmlAttrRelativeHeight: OpenXmlAttribute;
|
||||
XmlAttrBehindDoc: OpenXmlAttribute;
|
||||
XmlAttrLocked: OpenXmlAttribute;
|
||||
XmlAttrHidden: OpenXmlAttribute;
|
||||
XmlAttrLayoutInCell: OpenXmlAttribute;
|
||||
XmlAttrAllowOverlap: OpenXmlAttribute;
|
||||
XmlAttrAnchorId: OpenXmlAttribute;
|
||||
|
|
@ -132,6 +136,7 @@ begin
|
|||
"relativeHeight": makeweakref(thisFunction(WriteXmlAttrRelativeHeight)),
|
||||
"behindDoc": makeweakref(thisFunction(WriteXmlAttrBehindDoc)),
|
||||
"locked": makeweakref(thisFunction(WriteXmlAttrLocked)),
|
||||
"hidden": makeweakref(thisFunction(WriteXmlAttrHidden)),
|
||||
"layoutInCell": makeweakref(thisFunction(WriteXmlAttrLayoutInCell)),
|
||||
"allowOverlap": makeweakref(thisFunction(WriteXmlAttrAllowOverlap)),
|
||||
"wp14:anchorId": makeweakref(thisFunction(WriteXmlAttrAnchorId)),
|
||||
|
|
@ -174,6 +179,8 @@ begin
|
|||
{self.}BehindDoc := _obj.BehindDoc;
|
||||
if not ifnil(_obj.Locked) then
|
||||
{self.}Locked := _obj.Locked;
|
||||
if not ifnil(_obj.Hidden) then
|
||||
{self.}Hidden := _obj.Hidden;
|
||||
if not ifnil(_obj.LayoutInCell) then
|
||||
{self.}LayoutInCell := _obj.LayoutInCell;
|
||||
if not ifnil(_obj.AllowOverlap) then
|
||||
|
|
@ -327,6 +334,21 @@ begin
|
|||
{self.}XmlAttrLocked.Value := _value;
|
||||
end;
|
||||
|
||||
function Anchor.ReadXmlAttrHidden();
|
||||
begin
|
||||
return {self.}XmlAttrHidden.Value;
|
||||
end;
|
||||
|
||||
function Anchor.WriteXmlAttrHidden(_value);
|
||||
begin
|
||||
if ifnil({self.}XmlAttrHidden) then
|
||||
begin
|
||||
{self.}XmlAttrHidden := new OpenXmlAttribute("", "hidden", nil);
|
||||
attributes_[length(attributes_)] := {self.}XmlAttrHidden;
|
||||
end
|
||||
{self.}XmlAttrHidden.Value := _value;
|
||||
end;
|
||||
|
||||
function Anchor.ReadXmlAttrLayoutInCell();
|
||||
begin
|
||||
return {self.}XmlAttrLayoutInCell.Value;
|
||||
|
|
|
|||
|
|
@ -10,15 +10,19 @@ public
|
|||
|
||||
// attributes property
|
||||
property FldCharType read ReadXmlAttrFldCharType write WriteXmlAttrFldCharType;
|
||||
property FldLock read ReadXmlAttrFldLock write WriteXmlAttrFldLock;
|
||||
property Dirty read ReadXmlAttrDirty write WriteXmlAttrDirty;
|
||||
function ReadXmlAttrFldCharType();
|
||||
function WriteXmlAttrFldCharType(_value);
|
||||
function ReadXmlAttrFldLock();
|
||||
function WriteXmlAttrFldLock(_value);
|
||||
function ReadXmlAttrDirty();
|
||||
function WriteXmlAttrDirty(_value);
|
||||
|
||||
public
|
||||
// Attributes
|
||||
XmlAttrFldCharType: OpenXmlAttribute;
|
||||
XmlAttrFldLock: OpenXmlAttribute;
|
||||
XmlAttrDirty: OpenXmlAttribute;
|
||||
|
||||
|
||||
|
|
@ -46,6 +50,7 @@ begin
|
|||
attributes_ := array();
|
||||
attributes_pf_ := array(
|
||||
pre + "fldCharType": makeweakref(thisFunction(WriteXmlAttrFldCharType)),
|
||||
pre + "fldLock": makeweakref(thisFunction(WriteXmlAttrFldLock)),
|
||||
pre + "dirty": makeweakref(thisFunction(WriteXmlAttrDirty)),
|
||||
);
|
||||
sorted_child_ := array(
|
||||
|
|
@ -60,6 +65,8 @@ begin
|
|||
class(OpenXmlElement).Copy(_obj);
|
||||
if not ifnil(_obj.FldCharType) then
|
||||
{self.}FldCharType := _obj.FldCharType;
|
||||
if not ifnil(_obj.FldLock) then
|
||||
{self.}FldLock := _obj.FldLock;
|
||||
if not ifnil(_obj.Dirty) then
|
||||
{self.}Dirty := _obj.Dirty;
|
||||
tslassigning := tslassigning_backup;
|
||||
|
|
@ -80,6 +87,21 @@ begin
|
|||
{self.}XmlAttrFldCharType.Value := _value;
|
||||
end;
|
||||
|
||||
function FldChar.ReadXmlAttrFldLock();
|
||||
begin
|
||||
return {self.}XmlAttrFldLock.Value;
|
||||
end;
|
||||
|
||||
function FldChar.WriteXmlAttrFldLock(_value);
|
||||
begin
|
||||
if ifnil({self.}XmlAttrFldLock) then
|
||||
begin
|
||||
{self.}XmlAttrFldLock := new OpenXmlAttribute({self.}Prefix, "fldLock", nil);
|
||||
attributes_[length(attributes_)] := {self.}XmlAttrFldLock;
|
||||
end
|
||||
{self.}XmlAttrFldLock.Value := _value;
|
||||
end;
|
||||
|
||||
function FldChar.ReadXmlAttrDirty();
|
||||
begin
|
||||
return {self.}XmlAttrDirty.Value;
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ public
|
|||
|
||||
// normal property
|
||||
property NoProof read ReadXmlChildNoProof;
|
||||
property Position read ReadXmlChildPosition;
|
||||
property WebHidden read ReadXmlChildWebHidden;
|
||||
property RStyle read ReadXmlChildRStyle;
|
||||
property RFonts read ReadXmlChildRFonts;
|
||||
|
|
@ -40,6 +41,7 @@ public
|
|||
property Lang read ReadXmlChildLang;
|
||||
property W14Ligatures read ReadXmlChildW14Ligatures;
|
||||
function ReadXmlChildNoProof();
|
||||
function ReadXmlChildPosition();
|
||||
function ReadXmlChildWebHidden();
|
||||
function ReadXmlChildRStyle();
|
||||
function ReadXmlChildRFonts();
|
||||
|
|
@ -53,6 +55,7 @@ public
|
|||
public
|
||||
// Children
|
||||
XmlChildNoProof: PureVal;
|
||||
XmlChildPosition: PureVal;
|
||||
XmlChildWebHidden: PureWVal;
|
||||
XmlChildRStyle: PureWVal;
|
||||
XmlChildRFonts: RFonts;
|
||||
|
|
@ -95,21 +98,22 @@ begin
|
|||
);
|
||||
sorted_child_ := array(
|
||||
pre + "noProof": array(0, makeweakref(thisFunction(ReadXmlChildNoProof))),
|
||||
pre + "wedHidden": array(1, makeweakref(thisFunction(ReadXmlChildWebHidden))),
|
||||
pre + "rStyle": array(2, makeweakref(thisFunction(ReadXmlChildRStyle))),
|
||||
pre + "rFonts": array(3, makeweakref(thisFunction(ReadXmlChildRFonts))),
|
||||
pre + "kern": array(4, makeweakref(thisFunction(ReadXmlChildKern))),
|
||||
pre + "i": array(5, makeweakref(thisFunction(ReadXmlChildI))),
|
||||
pre + "iCs": array(6, makeweakref(thisFunction(ReadXmlChildICs))),
|
||||
pre + "b": array(7, makeweakref(thisFunction(ReadXmlChildB))),
|
||||
pre + "bCs": array(8, makeweakref(thisFunction(ReadXmlChildBCs))),
|
||||
pre + "strike": array(9, makeweakref(thisFunction(ReadXmlChildStrike))),
|
||||
pre + "color": array(10, makeweakref(thisFunction(ReadXmlChildColor))),
|
||||
pre + "sz": array(11, makeweakref(thisFunction(ReadXmlChildSz))),
|
||||
pre + "szCs": array(12, makeweakref(thisFunction(ReadXmlChildSzCs))),
|
||||
pre + "u": array(13, makeweakref(thisFunction(ReadXmlChildU))),
|
||||
pre + "lang": array(14, makeweakref(thisFunction(ReadXmlChildLang))),
|
||||
"w14:ligatures": array(15, makeweakref(thisFunction(ReadXmlChildW14Ligatures))),
|
||||
pre + "position": array(1, makeweakref(thisFunction(ReadXmlChildPosition))),
|
||||
pre + "wedHidden": array(2, makeweakref(thisFunction(ReadXmlChildWebHidden))),
|
||||
pre + "rStyle": array(3, makeweakref(thisFunction(ReadXmlChildRStyle))),
|
||||
pre + "rFonts": array(4, makeweakref(thisFunction(ReadXmlChildRFonts))),
|
||||
pre + "kern": array(5, makeweakref(thisFunction(ReadXmlChildKern))),
|
||||
pre + "i": array(6, makeweakref(thisFunction(ReadXmlChildI))),
|
||||
pre + "iCs": array(7, makeweakref(thisFunction(ReadXmlChildICs))),
|
||||
pre + "b": array(8, makeweakref(thisFunction(ReadXmlChildB))),
|
||||
pre + "bCs": array(9, makeweakref(thisFunction(ReadXmlChildBCs))),
|
||||
pre + "strike": array(10, makeweakref(thisFunction(ReadXmlChildStrike))),
|
||||
pre + "color": array(11, makeweakref(thisFunction(ReadXmlChildColor))),
|
||||
pre + "sz": array(12, makeweakref(thisFunction(ReadXmlChildSz))),
|
||||
pre + "szCs": array(13, makeweakref(thisFunction(ReadXmlChildSzCs))),
|
||||
pre + "u": array(14, makeweakref(thisFunction(ReadXmlChildU))),
|
||||
pre + "lang": array(15, makeweakref(thisFunction(ReadXmlChildLang))),
|
||||
"w14:ligatures": array(16, makeweakref(thisFunction(ReadXmlChildW14Ligatures))),
|
||||
);
|
||||
container_ := new TSOfficeContainer(sorted_child_);
|
||||
end;
|
||||
|
|
@ -121,6 +125,8 @@ begin
|
|||
class(OpenXmlElement).Copy(_obj);
|
||||
if not ifnil(_obj.XmlChildNoProof) then
|
||||
{self.}NoProof.Copy(_obj.XmlChildNoProof);
|
||||
if not ifnil(_obj.XmlChildPosition) then
|
||||
{self.}Position.Copy(_obj.XmlChildPosition);
|
||||
if not ifnil(_obj.XmlChildWebHidden) then
|
||||
{self.}WebHidden.Copy(_obj.XmlChildWebHidden);
|
||||
if not ifnil(_obj.XmlChildRStyle) then
|
||||
|
|
@ -290,6 +296,16 @@ begin
|
|||
return {self.}XmlChildNoProof;
|
||||
end;
|
||||
|
||||
function RPr.ReadXmlChildPosition();
|
||||
begin
|
||||
if tslassigning and ifnil({self.}XmlChildPosition) then
|
||||
begin
|
||||
{self.}XmlChildPosition := new PureVal(self, {self.}Prefix, "position");
|
||||
container_.Set({self.}XmlChildPosition);
|
||||
end
|
||||
return {self.}XmlChildPosition;
|
||||
end;
|
||||
|
||||
function RPr.ReadXmlChildWebHidden();
|
||||
begin
|
||||
if tslassigning and ifnil({self.}XmlChildWebHidden) then
|
||||
|
|
|
|||
Loading…
Reference in New Issue