}
bool BidirectionalSupport::GetMirroredText( Character* text,
+ CharacterDirection* directions,
Length numberOfCharacters )
{
return GetImplementation( *this ).GetMirroredText( text,
+ directions,
numberOfCharacters );
}
* @brief Replaces any character which could be mirrored.
*
* @param[in,out] text The text.
+ * @param[in] directions The direction of each paragraph.
* @param[in] numberOfCharacters The number of characters.
*
* @return @e true if a character has been replaced.
*/
bool GetMirroredText( Character* text,
+ CharacterDirection* directions,
Length numberOfCharacters );
/**
}
bool GetMirroredText( Character* text,
+ CharacterDirection* directions,
Length numberOfCharacters ) const
{
bool updated = false;
// Retrieve the mirrored character.
FriBidiChar mirroredCharacter = character;
- const bool mirrored = fribidi_get_mirror_char( character, &mirroredCharacter );
+ bool mirrored = false;
+ if( *( directions + index ) )
+ {
+ mirrored = fribidi_get_mirror_char( character, &mirroredCharacter );
+ }
updated = updated || mirrored;
// Update the character inside the text.
}
bool BidirectionalSupport::GetMirroredText( Character* text,
+ CharacterDirection* directions,
Length numberOfCharacters )
{
CreatePlugin();
- return mPlugin->GetMirroredText( text, numberOfCharacters );
+ return mPlugin->GetMirroredText( text, directions, numberOfCharacters );
}
bool BidirectionalSupport::GetParagraphDirection( BidiInfoIndex bidiInfoIndex ) const