修复内存泄漏;对空段落项目符号容错处理

This commit is contained in:
csh 2024-07-08 15:24:55 +08:00
parent 51dc8596be
commit 66ec96e167
2 changed files with 8 additions and 0 deletions

View File

@ -21,6 +21,7 @@ begin
ilvl := ppr.NumPr.Ilvl.Val;
pstyle := ppr.PStyle.Val;
num := numbering_adapter_.NumId(num_id);
if ifnil(num) then return array("", nil);
abstract_id := num.AbstractNumId.Val;
abstract_num := numbering_adapter_.AbstractNumId(abstract_id);
lvls := abstract_num.Lvls();

View File

@ -1,7 +1,9 @@
type TSSectWare = class
public
function Create();
function Destroy();
function Do();
function AddElement(element: tslobj);
public
Elements: array of tslobj;
@ -25,3 +27,8 @@ begin
// println("Top = {}, Right = {}, Bottom = {}, Left = {}, Header = {}, Footer = {}\n",
// self.SectPr.PgMar.Top, self.SectPr.PgMar.Right, self.SectPr.PgMar.Bottom, self.SectPr.PgMar.Left, self.SectPr.PgMar.Header, self.SectPr.PgMar.Footer);
end;
function TSSectWare.AddElement(element: tslobj);
begin
Elements[length(Elements)] := element;
end;