支持简单的页眉页脚

This commit is contained in:
csh
2024-08-05 11:32:19 +08:00
parent 151eef66b7
commit 1eee1efc3a
7 changed files with 573 additions and 46 deletions
+9 -2
View File
@@ -20,10 +20,10 @@ begin
if ifnil(num_id) then return array("", nil);
ilvl := ppr.NumPr.Ilvl.Val;
pstyle := ppr.PStyle.Val;
num := numbering_adapter_.NumId(num_id);
num := numbering_adapter_.GetNumByNumId(num_id);
if ifnil(num) then return array("", nil);
abstract_id := num.AbstractNumId.Val;
abstract_num := numbering_adapter_.AbstractNumId(abstract_id);
abstract_num := numbering_adapter_.GetAbstractNumByAbstractNumId(abstract_id);
lvls := abstract_num.Lvls();
if ifnil(ilvl) then ilvl := "0";
for k,v in lvls do
@@ -36,6 +36,13 @@ begin
for i:=0 to ilvl_int do
begin
source_str := "%" $ (i + 1);
n := num_hash_[num_id][i];
if i = ilvl_int then
begin
n := num_hash_[num_id][i] + 1;
for j:=i+1 to length(num_hash_[num_id])-1 do
num_hash_[num_id][j] := 0;
end
n := i = ilvl_int ? num_hash_[num_id][i] + 1 : num_hash_[num_id][i];
dest_str := format("%d", n);
lvl_text := replaceStr(lvl_text, source_str, dest_str);
+1 -1
View File
@@ -7,7 +7,7 @@ public
public
Elements: array of tslobj;
SectPr: SectPr;
SectPr: SectPrUnitDecorator;
BaseSize: integer;
end;