- const CharacterDirection* const modelCharacterDirections = mCharacterDirections.Begin();
-
- Length bidirectionalParagraphIndex = 0u;
- bool isRightToLeftParagraph = false;
- for( CharacterIndex index = startIndex; index < numberOfCharactersPlus; ++index )
- {
- if( bidirectionalParagraph &&
- ( bidirectionalParagraph->characterRun.characterIndex == index ) )
- {
- isRightToLeftParagraph = *( modelCharacterDirections + index );
- }
-
- if( 0u == index )
- {
- if( isRightToLeftParagraph )
- {
- *( modelVisualToLogicalCursorMap + index ) = numberOfCharacters;
- }
- else // else logical position is zero.
- {
- *( modelVisualToLogicalCursorMap + index ) = 0u;
- }
- }
- else if( numberOfCharacters == index )