C# Класс ExoMerge.Aspose.Common.QuoteCharacters

A class that manages the use of a reference field in place of quote characters.
This behavior may be needed if injecting quote characters into a document during the merge process has unindended side-effects, e.g. corrupting IF fields.
Показать файл Открыть проект

Открытые методы

Метод Описание
ConvertToFieldReferences ( Document document, Node node, Node &nodes ) : bool

Convert quotes in the given node to instead use the quote field reference.

EnsureQuoteField ( Document document ) : void

Ensure that the quote field is present at the start of the given document.

IsQuoteField ( FieldStart start ) : bool

Determines if the given field start is the quote reference field.

IsQuoteField ( FieldStart start, FieldEnd &end ) : bool

Determines if the given field start is the quote reference field and returns its field end if so.

TryReplaceFancyQuotes ( string text, string &newText ) : bool

Attempts to replace balanced fancy quotes with standard quotes.

Приватные методы

Метод Описание
ConvertToFieldReferences ( Document document, Node node ) : bool

Convert quotes in the given node to instead use the quote field reference.

ConvertToFieldReferences ( Document document, Run run, Node &nodes ) : bool

Convert quotes in the given node to instead use the quote field reference.

GetReferenceFieldContainer ( Document document ) : CompositeNode

Gets the container for the quote field: the first paragraph in the document.

HasQuotes ( string text, int startIndex, int &indexOfStandardQuote, int &indexOfFancyQuote ) : bool

Attempts to find the next indices of the standard, fancy left, and fancy right quote characters in the given string.

HasQuotes ( string text, int startIndex, int &indexOfStandardQuote, int &indexOfFancyLeftQuote, int &indexOfFancyRightQuote ) : bool

Attempts to find the next indices of the standard, fancy left, and fancy right quote characters in the given string.

SafeSubstring ( string str, int startIndex, int length ) : string

Enhances the built-in substring method by account for out-of-bounds conditions.

Описание методов

ConvertToFieldReferences() публичный статический Метод

Convert quotes in the given node to instead use the quote field reference.
public static ConvertToFieldReferences ( Document document, Node node, Node &nodes ) : bool
document Document
node Node
nodes Node
Результат bool

EnsureQuoteField() публичный статический Метод

Ensure that the quote field is present at the start of the given document.
public static EnsureQuoteField ( Document document ) : void
document Document
Результат void

IsQuoteField() публичный статический Метод

Determines if the given field start is the quote reference field.
public static IsQuoteField ( FieldStart start ) : bool
start FieldStart
Результат bool

IsQuoteField() публичный статический Метод

Determines if the given field start is the quote reference field and returns its field end if so.
public static IsQuoteField ( FieldStart start, FieldEnd &end ) : bool
start FieldStart
end FieldEnd
Результат bool

TryReplaceFancyQuotes() публичный статический Метод

Attempts to replace balanced fancy quotes with standard quotes.
public static TryReplaceFancyQuotes ( string text, string &newText ) : bool
text string
newText string
Результат bool