summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-write/qcomplextext.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/opie-write/qcomplextext.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-write/qcomplextext.cpp4
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()
will get form XRight
R6 A dual joining character, that has a left join causing char on the left, and no right join causing char on the right
will get form XLeft
R7 Otherwise the character will get form XIsolated
Additionally we have to do the minimal ligature support for lam-alef ligatures:
L1 Transparent characters do not affect ligature behaviour.
L2 Any sequence of Alef(XRight) + Lam(XMedial) will form the ligature Alef.Lam(XLeft)
L3 Any sequence of Alef(XRight) + Lam(XLeft) will form the ligature Alef.Lam(XIsolated)
The two functions defined in this class do shaping in visual and logical order. For logical order just replace right with
previous and left with next in the above rules ;-)
*/
/*
Two small helper functions for arabic shaping. They get the next shape causing character on either
side of the char in question. Implements rule R1.
leftChar() returns true if the char to the left is a left join-causing char
rightChar() returns true if the char to the right is a right join-causing char
*/
static inline const QChar *prevChar( const QString &str, int pos )
{
- //qDebug("leftChar: pos=%d", pos);
+ //odebug << "leftChar: pos=" << pos << "" << oendl;
pos--;
const QChar *ch = str.unicode() + pos;
while( pos > -1 ) {
if( !ch->isMark() )
return ch;
pos--;
ch--;
}
return &QChar::replacement;
}
static inline const QChar *nextChar( const QString &str, int pos)
{
pos++;
int len = str.length();
const QChar *ch = str.unicode() + pos;
while( pos < len ) {
- //qDebug("rightChar: %d isLetter=%d, joining=%d", pos, ch.isLetter(), ch.joining());
+ //odebug << "rightChar: " << pos << " isLetter=" << ch.isLetter() << ", joining=" << ch.joining() << "" << oendl;
if( !ch->isMark() )
return ch;
// assume it's a transparent char, this might not be 100% correct
pos++;
ch++;
}
return &QChar::replacement;
}
static inline bool prevVisualCharJoins( const QString &str, int pos)
{
return ( prevChar( str, pos )->joining() != QChar::OtherJoining );
}
static inline bool nextVisualCharJoins( const QString &str, int pos)
{
QChar::Joining join = nextChar( str, pos )->joining();
return ( join == QChar::Dual || join == QChar::Center );
}