v1.4.4
This commit is contained in:
parent
81b806c93c
commit
79ba3254a0
Binary file not shown.
|
|
@ -1,4 +1,4 @@
|
||||||
// Version 1.4.3
|
// Version 1.4.4
|
||||||
|
|
||||||
Function TOfficeObj(n);
|
Function TOfficeObj(n);
|
||||||
Begin
|
Begin
|
||||||
|
|
@ -13008,10 +13008,15 @@ Type TDocumentBody = Class(DocObject)
|
||||||
End;
|
End;
|
||||||
if not ifObj(node) then
|
if not ifObj(node) then
|
||||||
return false;
|
return false;
|
||||||
|
reset_position := false;
|
||||||
|
if node = TOfficeApi().GetCurrentPosition() then
|
||||||
|
reset_position := true;
|
||||||
next := node.NextElement('w:p');
|
next := node.NextElement('w:p');
|
||||||
node_.DeleteChild(node);
|
node_.DeleteChild(node);
|
||||||
if not ifObj(next) then
|
if not ifObj(next) then
|
||||||
_setLastParagraph();
|
_setLastParagraph();
|
||||||
|
if reset_position then
|
||||||
|
TOfficeApi().Set('CurrentPosition', lastParagraph_);
|
||||||
return true;
|
return true;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// Version 1.4.3
|
// Version 1.4.4
|
||||||
|
|
||||||
Type TSDocxFile = Class
|
Type TSDocxFile = Class
|
||||||
///Version: V1.0 2022-09-20
|
///Version: V1.0 2022-09-20
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// Version 1.4.3
|
// Version 1.4.4
|
||||||
|
|
||||||
Type TSExcelFile = Class
|
Type TSExcelFile = Class
|
||||||
///Version: V1.0 2022-08-08
|
///Version: V1.0 2022-08-08
|
||||||
|
|
|
||||||
|
|
@ -426,7 +426,6 @@ Type TDocxNumberCopy = class
|
||||||
old_number_obj_ := nil;
|
old_number_obj_ := nil;
|
||||||
new_number_obj_ := nil;
|
new_number_obj_ := nil;
|
||||||
end
|
end
|
||||||
number_id_map_ := array();
|
|
||||||
id_map_ := array();
|
id_map_ := array();
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
@ -434,9 +433,12 @@ Type TDocxNumberCopy = class
|
||||||
Begin
|
Begin
|
||||||
if ifObj(old_number_obj_) and ifObj(new_number_obj_) then
|
if ifObj(old_number_obj_) and ifObj(new_number_obj_) then
|
||||||
begin
|
begin
|
||||||
if (obj := new_number_obj_.NumberStyle(number)) then
|
if (obj := new_number_obj_.NumberStyle(number)) and not id_map_[number] then
|
||||||
begin
|
begin
|
||||||
return old_number_obj_.CopyNumber(obj);
|
println("id = {}", number);
|
||||||
|
number_obj := old_number_obj_.CopyNumber(obj);
|
||||||
|
id_map_[number] := number_obj;
|
||||||
|
return number_obj;
|
||||||
end
|
end
|
||||||
end;
|
end;
|
||||||
End;
|
End;
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ Type TDocxStyles = Class
|
||||||
///返回:TDocxStyle对象
|
///返回:TDocxStyle对象
|
||||||
Function GetStyle(name);
|
Function GetStyle(name);
|
||||||
Begin
|
Begin
|
||||||
return nameMap_[ lowercase(name) ];
|
return nameMap_[ class(TSXml).CurCodePageToUtf8(lowercase(name)) ];
|
||||||
End;
|
End;
|
||||||
|
|
||||||
///返回指定StyleId名称的TDocxStyle
|
///返回指定StyleId名称的TDocxStyle
|
||||||
|
|
|
||||||
|
|
@ -165,7 +165,11 @@ Type TNumbering = Class
|
||||||
Begin
|
Begin
|
||||||
if ifObj(o) then Begin
|
if ifObj(o) then Begin
|
||||||
o.abstractNumId := maxAbstractNumId_++;
|
o.abstractNumId := maxAbstractNumId_++;
|
||||||
if flag then marshal := o.node_.Marshal()[0];
|
if flag then
|
||||||
|
begin
|
||||||
|
o.node_.SetAttribute('w:abstractNumId', o.abstractNumId);
|
||||||
|
marshal := o.node_.Marshal()[0];
|
||||||
|
end
|
||||||
else marshal := o.Marshal();
|
else marshal := o.Marshal();
|
||||||
if ifObj(lastAbstractNumStyle_) then
|
if ifObj(lastAbstractNumStyle_) then
|
||||||
node := numberingXml_.FirstChildElement('w:numbering').InsertAfterChild(lastAbstractNumStyle_, marshal);
|
node := numberingXml_.FirstChildElement('w:numbering').InsertAfterChild(lastAbstractNumStyle_, marshal);
|
||||||
|
|
|
||||||
|
|
@ -160,8 +160,9 @@ Type TTableContent = class
|
||||||
if ifObj(style) then
|
if ifObj(style) then
|
||||||
numStr := style.GetText(r[i]['ilvl'], r[i]['numArr']);
|
numStr := style.GetText(r[i]['ilvl'], r[i]['numArr']);
|
||||||
End
|
End
|
||||||
if numStr <> '' then r1.T := numStr + ' ' + r[i]['Text'];
|
if numStr <> '' then run_t := numStr + ' ' + r[i]['Text'];
|
||||||
else r1.T := r[i]['Text'];
|
else run_t := r[i]['Text'];
|
||||||
|
r1.SetText(run_t);
|
||||||
|
|
||||||
r2 := h.AddRun();
|
r2 := h.AddRun();
|
||||||
r2.rPr.noProof := true;
|
r2.rPr.noProof := true;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue