diff options
Diffstat (limited to 'lib/kotext/KoComplexText.cpp')
-rw-r--r-- | lib/kotext/KoComplexText.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/lib/kotext/KoComplexText.cpp b/lib/kotext/KoComplexText.cpp index 96ff88e1..475f439d 100644 --- a/lib/kotext/KoComplexText.cpp +++ b/lib/kotext/KoComplexText.cpp @@ -72,7 +72,7 @@ static int shapeBufSize = 0; Arabic shaping obeys a number of rules according to the joining classes (see Unicode book, section on arabic). - Each tqunicode char has a joining class (right, dual (left&right), center (joincausing) or transparent). + Each unicode char has a joining class (right, dual (left&right), center (joincausing) or transparent). transparent joining is not encoded in TQChar::joining(), but applies to all combining marks and format marks. Right join-causing: dual + center @@ -113,7 +113,7 @@ static inline const TQChar *prevChar( const TQString &str, int pos ) { //kdDebug() << "leftChar: pos=" << pos << endl; pos--; - const TQChar *ch = str.tqunicode() + pos; + const TQChar *ch = str.unicode() + pos; while( pos > -1 ) { if( !ch->isMark() ) return ch; @@ -127,7 +127,7 @@ static inline const TQChar *nextChar( const TQString &str, int pos) { pos++; int len = str.length(); - const TQChar *ch = str.tqunicode() + pos; + const TQChar *ch = str.unicode() + pos; while( pos < len ) { //kdDebug() << "rightChar: " << pos << " isLetter=" << ch.isLetter() << ", joining=" << ch.joining() << endl; if( !ch->isMark() ) @@ -155,7 +155,7 @@ KoComplexText::Shape KoComplexText::glyphVariant( const TQString &str, int pos) { // ignores L1 - L3, done in the codec TQChar::Joining joining = str[pos].joining(); - //kdDebug() << "checking " << str[pos].tqunicode() << ", joining=" << joining << endl; + //kdDebug() << "checking " << str[pos].unicode() << ", joining=" << joining << endl; switch ( joining ) { case TQChar::OtherJoining: case TQChar::Center: @@ -200,7 +200,7 @@ KoComplexText::Shape KoComplexText::glyphVariantLogical( const TQString &str, in { // ignores L1 - L3, ligatures are job of the codec TQChar::Joining joining = str[pos].joining(); - //kdDebug() << "checking " << str[pos].tqunicode() << ", joining=" << joining << endl; + //kdDebug() << "checking " << str[pos].unicode() << ", joining=" << joining << endl; switch ( joining ) { case TQChar::OtherJoining: case TQChar::Center: @@ -229,7 +229,7 @@ KoComplexText::Shape KoComplexText::glyphVariantLogical( const TQString &str, in // ------------------------------------------------------------- -// The tqunicode to tqunicode shaping codec. +// The unicode to unicode shaping codec. // does only presentation forms B at the moment, but that should be enough for // simple display static const ushort arabicUnicodeMapping[256][2] = { @@ -561,13 +561,13 @@ TQString KoComplexText::shapedString(const TQString& uc, int from, int len, TQPa // we have to ignore NSMs at the beginning and add at the end. int num = uc.length() - from - len; - const TQChar *ch = uc.tqunicode() + from + len; + const TQChar *ch = uc.unicode() + from + len; while ( num > 0 && ch->combiningClass() != 0 ) { ch++; num--; len++; } - ch = uc.tqunicode() + from; + ch = uc.unicode() + from; while ( len > 0 && ch->combiningClass() != 0 ) { ch++; len--; @@ -602,7 +602,7 @@ TQString KoComplexText::shapedString(const TQString& uc, int from, int len, TQPa if ( dir == TQPainter::RTL ) pos = from + len - 1 - i; int shape = glyphVariantLogical( uc, pos ); - //kdDebug() << "mapping U+" << ch->tqunicode() << " to shape " << shape << " glyph=0x" << arabicUnicodeMapping[ch->cell()][shape] << endl; + //kdDebug() << "mapping U+" << ch->unicode() << " to shape " << shape << " glyph=0x" << arabicUnicodeMapping[ch->cell()][shape] << endl; // take care of lam-alef ligatures (lam right of alef) ushort map; switch ( c ) { @@ -627,7 +627,7 @@ TQString KoComplexText::shapedString(const TQString& uc, int from, int len, TQPa case 0x23: // alef with hamza above case 0x25: // alef with hamza below case 0x27: // alef - if ( prevChar( uc, pos )->tqunicode() == 0x0644 ) { + if ( prevChar( uc, pos )->unicode() == 0x0644 ) { // have a lam alef ligature //kdDebug() << " alef of lam-alef ligature" << endl; goto skip; @@ -689,12 +689,12 @@ TQString KoComplexText::shapedString(const TQString& uc, int from, int len, TQPa TQChar KoComplexText::shapedCharacter( const TQString &str, int pos, const TQFontMetrics *fm ) { - const TQChar *ch = str.tqunicode() + pos; + const TQChar *ch = str.unicode() + pos; if ( ch->row() != 0x06 ) return *ch; else { int shape = glyphVariantLogical( str, pos ); - //kdDebug() << "mapping U+" << ch->tqunicode() << " to shape " << shape << " glyph=0x" << arabicUnicodeMapping[ch->cell()][shape] << endl; + //kdDebug() << "mapping U+" << ch->unicode() << " to shape " << shape << " glyph=0x" << arabicUnicodeMapping[ch->cell()][shape] << endl; // lam aleph ligatures switch ( ch->cell() ) { case 0x44: { // lam @@ -716,7 +716,7 @@ TQChar KoComplexText::shapedCharacter( const TQString &str, int pos, const TQFon case 0x23: // alef with hamza above case 0x25: // alef with hamza below case 0x27: // alef - if ( prevChar( str, pos )->tqunicode() == 0x0644 ) + if ( prevChar( str, pos )->unicode() == 0x0644 ) // have a lam alef ligature return TQChar(0); default: @@ -842,7 +842,7 @@ TQPointArray KoComplexText::positionMarks( TQFontPrivate *f, const TQString &str default: break; } - //kdDebug() << "char=" << mark.tqunicode() << " combiningClass = " << cmb << " offset=" << p.x() << "/" << p.y() << endl; + //kdDebug() << "char=" << mark.unicode() << " combiningClass = " << cmb << " offset=" << p.x() << "/" << p.y() << endl; markRect.moveBy( p.x(), p.y() ); p += TQPoint( -baseOffset, 0 ); attachmentRect |= markRect; @@ -864,7 +864,7 @@ static TQChar::Direction basicDirection(const TQString &str, int start = 0) { int len = str.length(); int pos = start > len ? len -1 : start; - const TQChar *uc = str.tqunicode() + pos; + const TQChar *uc = str.unicode() + pos; while( pos < len ) { switch( uc->direction() ) { @@ -1406,8 +1406,8 @@ TQString KoComplexText::bidiReorderString( const TQString &str, TQChar::Directio int len = str.length(); TQString visual; visual.setUnicode( 0, len ); - TQChar *vch = (TQChar *)visual.tqunicode(); - const TQChar *ch = str.tqunicode(); + TQChar *vch = (TQChar *)visual.unicode(); + const TQChar *ch = str.unicode(); while( lineStart < len ) { lineEnd = lineStart; while( *ch != '\n' && lineEnd < len ) { |