private bool CheckForCharStyleCapilizationError(ITextToken tok,
TextTokenSubstring ttsFirstLetter, List<TextTokenSubstring> result)
{
if (m_foundCharacterText)
return false;
m_foundCharacterText = true;
// The first word-forming character of the character style is lowercase.
// Look it up in the capitalized styles dictionary to determine if it should be uppercase.
StyleCapInfo styleCapInfo;
if (m_allCapitalizedStyles.TryGetValue(m_characterStyle, out styleCapInfo) &&
styleCapInfo.m_type == StyleInfo.StyleTypes.character)
{
ttsFirstLetter.InventoryText = m_characterStyle;
ttsFirstLetter.Message = CapitalizationCheck.GetErrorMessage(m_checksDataSource,
styleCapInfo.m_capCheck, m_characterStyle);
result.Add(ttsFirstLetter);
return true;
}
return false;
}