update autounit

This commit is contained in:
csh 2025-03-05 11:33:33 +08:00
parent a816a6f835
commit 87c3aa75f7
2 changed files with 45 additions and 14 deletions

View File

@ -1387,6 +1387,12 @@ public
function ReadXmlChildObject(): Object;
function ReadXmlChildFootnoteReference(): FootnoteReference;
// multi property
property Rs read ReadRs;
function ReadRs(_index);
function AddR(): R;
function AppendR(): R;
public
// Attributes
XmlAttrWRsidRPr: OpenXmlAttribute;
@ -9258,20 +9264,21 @@ begin
"w:history": makeweakref(thisFunction(WriteXmlAttrHistory)),
);
sorted_child_ := array(
pre + "rPr": array(0, makeweakref(thisFunction(ReadXmlChildRPr))),
pre + "br": array(1, makeweakref(thisFunction(ReadXmlChildBr))),
pre + "fldChar": array(2, makeweakref(thisFunction(ReadXmlChildFldChar))),
pre + "instrText": array(3, makeweakref(thisFunction(ReadXmlChildInstrText))),
pre + "separator": array(4, makeweakref(thisFunction(ReadXmlChildSeparator))),
pre + "continuationSeparator": array(5, makeweakref(thisFunction(ReadXmlChildContinuationSeparator))),
pre + "lastRenderedPageBreak": array(6, makeweakref(thisFunction(ReadXmlChildLastRenderedPageBreak))),
"mc:AlternateContent": array(7, makeweakref(thisFunction(ReadXmlChildAlternateContent))),
pre + "drawing": array(8, makeweakref(thisFunction(ReadXmlChildDrawing))),
pre + "pict": array(9, makeweakref(thisFunction(ReadXmlChildPict))),
pre + "t": array(10, makeweakref(thisFunction(ReadXmlChildT))),
pre + "object": array(11, makeweakref(thisFunction(ReadXmlChildObject))),
pre + "footnoteReference": array(12, makeweakref(thisFunction(ReadXmlChildFootnoteReference))),
pre + "footnoteRef": array(13, makeweakref(thisFunction(ReadXmlChildFootnoteRef))),
pre + "r": array(0, makeweakref(thisFunction(AppendR))),
pre + "rPr": array(1, makeweakref(thisFunction(ReadXmlChildRPr))),
pre + "br": array(2, makeweakref(thisFunction(ReadXmlChildBr))),
pre + "fldChar": array(3, makeweakref(thisFunction(ReadXmlChildFldChar))),
pre + "instrText": array(4, makeweakref(thisFunction(ReadXmlChildInstrText))),
pre + "separator": array(5, makeweakref(thisFunction(ReadXmlChildSeparator))),
pre + "continuationSeparator": array(6, makeweakref(thisFunction(ReadXmlChildContinuationSeparator))),
pre + "lastRenderedPageBreak": array(7, makeweakref(thisFunction(ReadXmlChildLastRenderedPageBreak))),
"mc:AlternateContent": array(8, makeweakref(thisFunction(ReadXmlChildAlternateContent))),
pre + "drawing": array(9, makeweakref(thisFunction(ReadXmlChildDrawing))),
pre + "pict": array(10, makeweakref(thisFunction(ReadXmlChildPict))),
pre + "t": array(11, makeweakref(thisFunction(ReadXmlChildT))),
pre + "object": array(12, makeweakref(thisFunction(ReadXmlChildObject))),
pre + "footnoteReference": array(13, makeweakref(thisFunction(ReadXmlChildFootnoteReference))),
pre + "footnoteRef": array(14, makeweakref(thisFunction(ReadXmlChildFootnoteRef))),
);
container_ := new TSOfficeContainer(sorted_child_);
end;
@ -9559,6 +9566,27 @@ begin
return {self.}XmlChildFootnoteReference;
end;
function R.ReadRs(_index);
begin
ind := ifnil(_index) ? -2 : _index;
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
return container_.Get(pre + "r", ind);
end;
function R.AddR(): R;
begin
obj := new R(self, {self.}Prefix, "r");
container_.Insert(obj);
return obj;
end;
function R.AppendR(): R;
begin
obj := new R(self, {self.}Prefix, "r");
container_.Append(obj);
return obj;
end;
function Object.Create();overload;
begin
{self.}Create(nil, "w", "object");

View File

@ -2139,6 +2139,9 @@ begin
{self.}Anchor := object_.XmlAttrAnchor.Value;
if not ifnil(object_.XmlAttrHistory) then
{self.}History := object_.XmlAttrHistory.Value;
elems := object_.Rs();
for _,elem in elems do
{self.}AppendChild(new RUnitDecorator(elem));
if not ifnil(object_.XmlChildRPr) then
{self.}XmlChildRPr := new RPrUnitDecorator(object_.XmlChildRPr);
if not ifnil(object_.XmlChildBr) then