Function TParagraph.AppendNewPar(DontCopyStyle:Boolean) : TParagraph
Unit: WPRTEDefs
Class: WPRTEDefs.TParagraph
Parameters
-
DontCopyStyle:Boolean
Returns
The type of the result value is TParagraph.
Description
This function creates a new paragraph and inserts it into the text right after this paragraph. If this paragraph is a table cell the paragraph will be the first child of this paragraph!The code for this function is:
function TParagraph.AppendNewPar(DontCopyStyle: Boolean = FALSE) : TParagraph;
var ThisPar : TParagraph;
begin
Result := TParagraph.Create(FRTFProps, RTFData);
if (paprIsTable in prop) and (ParentPar<>nil) and
(ParentPar.ParagraphType=wpIsTableRow) then
begin
ThisPar := LastChild;
if ThisPar=nil then
begin
ChildPar := Result;
if not DontCopyStyle then Result.Assign(Self,false);
end else
begin
ThisPar.NextPar := Result;
if not DontCopyStyle then Result.Assign(ThisPar,false);
end;
end else
begin
NextPar := Result;
if not DontCopyStyle then Result.Assign(Self,false);
end;
end;