Aspose.Words.Examples.CSharp.Loading_Saving.SectionSplitter.VisitParagraphEnd C# (CSharp) Метод

VisitParagraphEnd() публичный Метод

public VisitParagraphEnd ( Paragraph paragraph ) : VisitorAction
paragraph Paragraph
Результат VisitorAction
        public override VisitorAction VisitParagraphEnd(Paragraph paragraph)
        {
            if (IsCompositeAcrossPage(paragraph))
            {
                foreach (Paragraph clonePara in SplitComposite(paragraph))
                {
                    // Remove list numbering from the cloned paragraph but leave the indent the same 
                    // As the paragraph is supposed to be part of the item before.
                    if (paragraph.IsListItem)
                    {
                        double textPosition = clonePara.ListFormat.ListLevel.TextPosition;
                        clonePara.ListFormat.RemoveNumbers();
                        clonePara.ParagraphFormat.LeftIndent = textPosition;
                    }

                    // Reset spacing of split paragraphs as additional spacing is removed.
                    clonePara.ParagraphFormat.SpaceBefore = 0;
                    paragraph.ParagraphFormat.SpaceAfter = 0;
                }
            }

            return VisitorAction.Continue;
        }