nScript = m_xBreak->getScriptType(rText, nPos);
sal_Int32 nChgPos = 0; if (i18n::ScriptType::WEAK == nScript && nPos >= 0 && nPos + 1 < rText.getLength())
{ // A weak character followed by a mark may be meant to combine with // the mark, so prefer the following character's script switch (u_charType(rText[nPos + 1]))
{ case U_NON_SPACING_MARK: case U_ENCLOSING_MARK: case U_COMBINING_SPACING_MARK:
nScript = m_xBreak->getScriptType(rText, nPos+1); break;
}
} if( i18n::ScriptType::WEAK == nScript && nPos )
{
nChgPos = m_xBreak->beginOfScript(rText, nPos, nScript); if( 0 < nChgPos )
nScript = m_xBreak->getScriptType(rText, nChgPos-1);
}
sal_Int32 nCurPos = std::max(static_cast<sal_Int32>(0), nStart); while (nCurPos < nEnd)
{ // fdo#49208 cheat and assume that nothing can combine with a space // to form a single grapheme if (rText[nCurPos] == ' ')
{
++nCurPos;
} else
{
sal_Int32 nCount2 = 1;
nCurPos = m_xBreak->nextCharacters(rText, nCurPos, lang::Locale(),
i18n::CharacterIteratorMode::SKIPCELL, nCount2, nCount2);
}
++nGraphemeCount;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.