Method AfterParagraph
AfterParagraph(WordDocument, Paragraph, DocumentPosition, TypingCorrectionOptions?)
The correction when Enter ends a paragraph: the word it ends is corrected as a space would, and a paragraph of
only --- or === becomes an empty one with a single or double bottom border.
public static DocumentEdit AfterParagraph(this WordDocument document, Paragraph paragraph, DocumentPosition caret, TypingCorrectionOptions? options = null)
Parameters
documentWordDocumentThe document.
paragraphParagraphThe paragraph Enter ended (the one before the caret's).
caretDocumentPositionWhere the caret is (the start of the new paragraph): the edit's ends.
optionsTypingCorrectionOptionsThe corrections to make; null for all.
Returns
- DocumentEdit
The edit, empty when nothing is corrected.
Exceptions
- ArgumentNullException
An argument is null.
- ArgumentException
The paragraph or the caret is not in the document.
AfterParagraph(WordDocument, Paragraph, DocumentPosition, TypingCorrectionOptions?, IList<TypingCorrection>?)
The correction when Enter ends a paragraph, as AfterParagraph(WordDocument, Paragraph, DocumentPosition, TypingCorrectionOptions?),
adding what each correction did to made.
public static DocumentEdit AfterParagraph(this WordDocument document, Paragraph paragraph, DocumentPosition caret, TypingCorrectionOptions? options, IList<TypingCorrection>? made)
Parameters
documentWordDocumentThe document.
paragraphParagraphThe paragraph Enter ended.
caretDocumentPositionWhere the caret is: the edit's ends.
optionsTypingCorrectionOptionsThe corrections to make; null for all.
madeIList<TypingCorrection>Where the corrections made are added; null for none.
Returns
- DocumentEdit
The edit, empty when nothing is corrected.
Exceptions
- ArgumentNullException
An argument is null.
- ArgumentException
The paragraph or the caret is not in the document.