修复内存泄漏;对空段落项目符号容错处理
This commit is contained in:
parent
51dc8596be
commit
66ec96e167
|
|
@ -21,6 +21,7 @@ begin
|
||||||
ilvl := ppr.NumPr.Ilvl.Val;
|
ilvl := ppr.NumPr.Ilvl.Val;
|
||||||
pstyle := ppr.PStyle.Val;
|
pstyle := ppr.PStyle.Val;
|
||||||
num := numbering_adapter_.NumId(num_id);
|
num := numbering_adapter_.NumId(num_id);
|
||||||
|
if ifnil(num) then return array("", nil);
|
||||||
abstract_id := num.AbstractNumId.Val;
|
abstract_id := num.AbstractNumId.Val;
|
||||||
abstract_num := numbering_adapter_.AbstractNumId(abstract_id);
|
abstract_num := numbering_adapter_.AbstractNumId(abstract_id);
|
||||||
lvls := abstract_num.Lvls();
|
lvls := abstract_num.Lvls();
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
type TSSectWare = class
|
type TSSectWare = class
|
||||||
public
|
public
|
||||||
function Create();
|
function Create();
|
||||||
|
function Destroy();
|
||||||
function Do();
|
function Do();
|
||||||
|
function AddElement(element: tslobj);
|
||||||
|
|
||||||
public
|
public
|
||||||
Elements: array of tslobj;
|
Elements: array of tslobj;
|
||||||
|
|
@ -25,3 +27,8 @@ begin
|
||||||
// println("Top = {}, Right = {}, Bottom = {}, Left = {}, Header = {}, Footer = {}\n",
|
// 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);
|
// 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;
|
end;
|
||||||
|
|
||||||
|
function TSSectWare.AddElement(element: tslobj);
|
||||||
|
begin
|
||||||
|
Elements[length(Elements)] := element;
|
||||||
|
end;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue