完善对页眉页脚的支持
This commit is contained in:
@@ -85,13 +85,15 @@ begin
|
||||
begin
|
||||
empty_flag := false;
|
||||
{self.}SetRPr(element.RPr, ppr_unit_decorator_);
|
||||
if element.FldChar.FldCharType = "separate" then
|
||||
if element.FldChar.FldCharType = "begin" then
|
||||
continue;
|
||||
else if element.FldChar.FldCharType = "separate" then
|
||||
fld := true;
|
||||
else if element.FldChar.FldCharType = "end" then
|
||||
fld := false;
|
||||
else if element.InstrText.Text = "PAGE \\* Arabic \\* MERGEFORMAT" then
|
||||
else if ifString(element.InstrText.Text) and trim(element.InstrText.Text) = "PAGE \\* Arabic \\* MERGEFORMAT" then
|
||||
page_number := true;
|
||||
else if element.InstrText.Text = " NUMPAGES " then
|
||||
else if ifString(element.InstrText.Text) and trim(element.InstrText.Text) = "NUMPAGES" then
|
||||
numpages := true;
|
||||
else if fld and page_number then
|
||||
begin
|
||||
@@ -112,6 +114,16 @@ begin
|
||||
else if ifObj(element.AlternateContent.XmlNode) then {self.}RAlternateContentToRange(element);
|
||||
else if not fld then {self.}RToTextRange(element, bookmark_name);
|
||||
end
|
||||
else if element.LocalName = "fldSimple" then
|
||||
begin
|
||||
if ifString(element.Instr) and trim(element.Instr) = "NUMPAGES \\* Arabic \\* MERGEFORMAT" then
|
||||
begin
|
||||
rpr := new RPrUnitDecorator(element.Rs(0).RPr);
|
||||
numpages_index := length(range_array_);
|
||||
placeholder_array_ := array(numpages_index, rpr);
|
||||
numpages := false;
|
||||
end
|
||||
end
|
||||
else if element.LocalName = "hyperlink" then
|
||||
begin
|
||||
empty_flag := false;
|
||||
|
||||
Reference in New Issue
Block a user