Diffstat (limited to 'noncore/apps/opie-write/qcomplextext.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-write/qcomplextext.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/apps/opie-write/qcomplextext.cpp b/noncore/apps/opie-write/qcomplextext.cpp index 473f184..00a91c5 100644 --- a/noncore/apps/opie-write/qcomplextext.cpp +++ b/noncore/apps/opie-write/qcomplextext.cpp | |||
@@ -85,62 +85,62 @@ QBidiContext::~QBidiContext() | |||
85 | will get form XRight | 85 | will get form XRight |
86 | R6 A dual joining character, that has a left join causing char on the left, and no right join causing char on the right | 86 | R6 A dual joining character, that has a left join causing char on the left, and no right join causing char on the right |
87 | will get form XLeft | 87 | will get form XLeft |
88 | R7 Otherwise the character will get form XIsolated | 88 | R7 Otherwise the character will get form XIsolated |
89 | 89 | ||
90 | Additionally we have to do the minimal ligature support for lam-alef ligatures: | 90 | Additionally we have to do the minimal ligature support for lam-alef ligatures: |
91 | 91 | ||
92 | L1 Transparent characters do not affect ligature behaviour. | 92 | L1 Transparent characters do not affect ligature behaviour. |
93 | L2 Any sequence of Alef(XRight) + Lam(XMedial) will form the ligature Alef.Lam(XLeft) | 93 | L2 Any sequence of Alef(XRight) + Lam(XMedial) will form the ligature Alef.Lam(XLeft) |
94 | L3 Any sequence of Alef(XRight) + Lam(XLeft) will form the ligature Alef.Lam(XIsolated) | 94 | L3 Any sequence of Alef(XRight) + Lam(XLeft) will form the ligature Alef.Lam(XIsolated) |
95 | 95 | ||
96 | The two functions defined in this class do shaping in visual and logical order. For logical order just replace right with | 96 | The two functions defined in this class do shaping in visual and logical order. For logical order just replace right with |
97 | previous and left with next in the above rules ;-) | 97 | previous and left with next in the above rules ;-) |
98 | */ | 98 | */ |
99 | 99 | ||
100 | /* | 100 | /* |
101 | Two small helper functions for arabic shaping. They get the next shape causing character on either | 101 | Two small helper functions for arabic shaping. They get the next shape causing character on either |
102 | side of the char in question. Implements rule R1. | 102 | side of the char in question. Implements rule R1. |
103 | 103 | ||
104 | leftChar() returns true if the char to the left is a left join-causing char | 104 | leftChar() returns true if the char to the left is a left join-causing char |
105 | rightChar() returns true if the char to the right is a right join-causing char | 105 | rightChar() returns true if the char to the right is a right join-causing char |
106 | */ | 106 | */ |
107 | static inline const QChar *prevChar( const QString &str, int pos ) | 107 | static inline const QChar *prevChar( const QString &str, int pos ) |
108 | { | 108 | { |
109 | //qDebug("leftChar: pos=%d", pos); | 109 | //odebug << "leftChar: pos=" << pos << "" << oendl; |
110 | pos--; | 110 | pos--; |
111 | const QChar *ch = str.unicode() + pos; | 111 | const QChar *ch = str.unicode() + pos; |
112 | while( pos > -1 ) { | 112 | while( pos > -1 ) { |
113 | if( !ch->isMark() ) | 113 | if( !ch->isMark() ) |
114 | return ch; | 114 | return ch; |
115 | pos--; | 115 | pos--; |
116 | ch--; | 116 | ch--; |
117 | } | 117 | } |
118 | return &QChar::replacement; | 118 | return &QChar::replacement; |
119 | } | 119 | } |
120 | 120 | ||
121 | static inline const QChar *nextChar( const QString &str, int pos) | 121 | static inline const QChar *nextChar( const QString &str, int pos) |
122 | { | 122 | { |
123 | pos++; | 123 | pos++; |
124 | int len = str.length(); | 124 | int len = str.length(); |
125 | const QChar *ch = str.unicode() + pos; | 125 | const QChar *ch = str.unicode() + pos; |
126 | while( pos < len ) { | 126 | while( pos < len ) { |
127 | //qDebug("rightChar: %d isLetter=%d, joining=%d", pos, ch.isLetter(), ch.joining()); | 127 | //odebug << "rightChar: " << pos << " isLetter=" << ch.isLetter() << ", joining=" << ch.joining() << "" << oendl; |
128 | if( !ch->isMark() ) | 128 | if( !ch->isMark() ) |
129 | return ch; | 129 | return ch; |
130 | // assume it's a transparent char, this might not be 100% correct | 130 | // assume it's a transparent char, this might not be 100% correct |
131 | pos++; | 131 | pos++; |
132 | ch++; | 132 | ch++; |
133 | } | 133 | } |
134 | return &QChar::replacement; | 134 | return &QChar::replacement; |
135 | } | 135 | } |
136 | 136 | ||
137 | static inline bool prevVisualCharJoins( const QString &str, int pos) | 137 | static inline bool prevVisualCharJoins( const QString &str, int pos) |
138 | { | 138 | { |
139 | return ( prevChar( str, pos )->joining() != QChar::OtherJoining ); | 139 | return ( prevChar( str, pos )->joining() != QChar::OtherJoining ); |
140 | } | 140 | } |
141 | 141 | ||
142 | static inline bool nextVisualCharJoins( const QString &str, int pos) | 142 | static inline bool nextVisualCharJoins( const QString &str, int pos) |
143 | { | 143 | { |
144 | QChar::Joining join = nextChar( str, pos )->joining(); | 144 | QChar::Joining join = nextChar( str, pos )->joining(); |
145 | return ( join == QChar::Dual || join == QChar::Center ); | 145 | return ( join == QChar::Dual || join == QChar::Center ); |
146 | } | 146 | } |