/// ------------------------------------------------------------------------------------
/// <summary>
/// Creates a checking error if paragraph style requires an initial uppercase letter,
/// but the tssFirstLetter is lowercase.
/// </summary>
/// <param name="tok">The Scripture token.</param>
/// <param name="ttsFirstLetter">The token substring of the first word-forming character
/// in the given token.</param>
/// <param name="result">The error results.</param>
/// <returns><c>true</c> if an error was added to the list of results; otherwise
/// <c>false</c></returns>
/// ------------------------------------------------------------------------------------
private bool CheckForParaCapitalizationError(ITextToken tok,
TextTokenSubstring ttsFirstLetter, List <TextTokenSubstring> result)
{
if (m_foundParagraphText)
{
return(false);
}
m_foundParagraphText = true;
// The first character of the paragraph is lowercase.
// Look it up in the capitalized styles dictionary to determine if it should be uppercase.
StyleCapInfo styleCapInfo;
if (m_allCapitalizedStyles.TryGetValue(m_paragraphStyle, out styleCapInfo))
{
ttsFirstLetter.InventoryText = m_paragraphStyle;
ttsFirstLetter.Message = CapitalizationCheck.GetErrorMessage(m_checksDataSource,
styleCapInfo.m_capCheck, m_paragraphStyle);
result.Add(ttsFirstLetter);
return(true);
}
return(false);
}