- if( currentDirection != previousDirection )
- {
- if( !groupOfWords.empty() )
- {
- convertedText.push_back( groupOfWords );
- groupOfWords.clear();
- }
- }
-
- groupOfWords.push_back( styledText );
-
- previousDirection = currentDirection;
- }
-
- if( !groupOfWords.empty() )
- {
- convertedText.push_back( groupOfWords );