Fix bidi reordering of RTL text with embedded images
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Tue, 16 Aug 2011 08:52:29 +0000 (10:52 +0200)
committerQt by Nokia <qt-info@nokia.com>
Thu, 18 Aug 2011 15:59:18 +0000 (17:59 +0200)
According to the UBA, the object replacement character should be
considered ON. There's no reason to special case its directionality, as
the bidi algorithm will already have given it an implicit
directionality.

Task-number: QTBUG-20910
Reviewed-by: Lars
(cherry picked from commit 2657bfa7c4de9f114331d1714a306b3999ae30d8)

Change-Id: I1c8e45d67ef44b1b6f96edb2f5074331b5422eb7
Reviewed-on: http://codereview.qt.nokia.com/2999
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
src/gui/text/qtextengine.cpp

index e327ac1..f7b7aa2 100644 (file)
@@ -1534,8 +1534,6 @@ void QTextEngine::itemize() const
     while (uc < e) {
         switch (*uc) {
         case QChar::ObjectReplacementCharacter:
-            if (analysis->bidiLevel % 2)
-                --analysis->bidiLevel;
             analysis->script = QUnicodeTables::Common;
             analysis->flags = QScriptAnalysis::Object;
             break;