diff options
Diffstat (limited to 'src/kernel/tqtextengine.cpp')
| -rw-r--r-- | src/kernel/tqtextengine.cpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/src/kernel/tqtextengine.cpp b/src/kernel/tqtextengine.cpp index 067a21740..1cda53f96 100644 --- a/src/kernel/tqtextengine.cpp +++ b/src/kernel/tqtextengine.cpp @@ -86,12 +86,12 @@ struct BidiControl { }; inline BidiControl( bool rtl ) - : cCtx( 0 ), singleLine( FALSE ) { + : cCtx( 0 ), singleLine( false ) { ctx[0].level = (rtl ? 1 : 0); - ctx[0].override = FALSE; + ctx[0].override = false; } - inline void embed( int level, bool override = FALSE ) { + inline void embed( int level, bool override = false ) { if ( ctx[cCtx].level < 61 && cCtx < 61 ) { (void) ++cCtx; ctx[cCtx].level = level; @@ -215,12 +215,12 @@ static void appendItems(TQTextEngine *engine, int &start, int &stop, BidiControl if ( uc == 0xfffcU || uc == 0x2028U ) { item.analysis.bidiLevel = level % 2 ? level-1 : level; item.analysis.script = TQFont::Latin; - item.isObject = TRUE; + item.isObject = true; s = TQFont::NoScript; } else if ((uc >= 9 && uc <=13) || (category >= TQChar::Separator_Space && category <= TQChar::Separator_Paragraph)) { item.analysis.script = TQFont::Latin; - item.isSpace = TRUE; + item.isSpace = true; item.isTab = ( uc == '\t' ); item.analysis.bidiLevel = item.isTab ? control.baseLevel() : level; s = TQFont::NoScript; @@ -236,7 +236,7 @@ static void appendItems(TQTextEngine *engine, int &start, int &stop, BidiControl item.position = i; items.append( item ); script = s; - item.isSpace = item.isTab = item.isObject = FALSE; + item.isSpace = item.isTab = item.isObject = false; } } ++stop; @@ -248,13 +248,13 @@ static void bidiItemize( TQTextEngine *engine, bool rightToLeft, int mode ) { BidiControl control( rightToLeft ); if ( mode & TQTextEngine::SingleLine ) - control.singleLine = TRUE; + control.singleLine = true; int sor = 0; int eor = -1; // ### should get rid of this! - bool first = TRUE; + bool first = true; int length = engine->string.length(); @@ -652,7 +652,7 @@ static void bidiItemize( TQTextEngine *engine, bool rightToLeft, int mode ) status.last = dirCurrent; } - first = FALSE; + first = false; ++current; } @@ -807,9 +807,9 @@ static void calcLineBreaks(const TQString &str, TQCharAttributes *charAttributes if (cls >= TQUnicodeTables::LineBreak_CM) cls = TQUnicodeTables::LineBreak_ID; - charAttributes[0].softBreak = FALSE; + charAttributes[0].softBreak = false; charAttributes[0].whiteSpace = (cls == TQUnicodeTables::LineBreak_SP); - charAttributes[0].charStop = TRUE; + charAttributes[0].charStop = true; bool prevIsHighSurrogate = uc[0].isHighSurrogate(); for (int i = 1; i < len; ++i) @@ -818,9 +818,9 @@ static void calcLineBreaks(const TQString &str, TQCharAttributes *charAttributes if (prevIsHighSurrogate && uc[i].isLowSurrogate()) { prevIsHighSurrogate = false; - charAttributes[i].softBreak = FALSE; - charAttributes[i].whiteSpace = FALSE; - charAttributes[i].charStop = FALSE; + charAttributes[i].softBreak = false; + charAttributes[i].whiteSpace = false; + charAttributes[i].charStop = false; continue; } prevIsHighSurrogate = uc[i].isHighSurrogate(); @@ -829,16 +829,16 @@ static void calcLineBreaks(const TQString &str, TQCharAttributes *charAttributes int category = ::category(uc[i]); if (category == TQChar::Mark_NonSpacing) { - charAttributes[i].softBreak = FALSE; - charAttributes[i].whiteSpace = FALSE; - charAttributes[i].charStop = FALSE; + charAttributes[i].softBreak = false; + charAttributes[i].whiteSpace = false; + charAttributes[i].charStop = false; continue; } if (ncls == TQUnicodeTables::LineBreak_SP) { - charAttributes[i].softBreak = FALSE; - charAttributes[i].whiteSpace = TRUE; - charAttributes[i].charStop = TRUE; + charAttributes[i].softBreak = false; + charAttributes[i].whiteSpace = true; + charAttributes[i].charStop = true; cls = ncls; continue; } @@ -847,9 +847,9 @@ static void calcLineBreaks(const TQString &str, TQCharAttributes *charAttributes { // two complex chars (thai or lao), thai_attributes might override, but here // we do a best guess - charAttributes[i].softBreak = TRUE; - charAttributes[i].whiteSpace = FALSE; - charAttributes[i].charStop = TRUE; + charAttributes[i].softBreak = true; + charAttributes[i].whiteSpace = false; + charAttributes[i].charStop = true; cls = ncls; continue; } @@ -868,8 +868,8 @@ static void calcLineBreaks(const TQString &str, TQCharAttributes *charAttributes softBreak = (brk == Dbk); // tqDebug("char = %c %04x, cls=%d, ncls=%d, brk=%d soft=%d", uc[i].cell(), uc[i].unicode(), cls, ncls, brk, charAttributes[i].softBreak); charAttributes[i].softBreak = softBreak; - charAttributes[i].whiteSpace = FALSE; - charAttributes[i].charStop = TRUE; + charAttributes[i].whiteSpace = false; + charAttributes[i].charStop = true; cls = ncls; } } @@ -885,7 +885,7 @@ static void calcLineBreaks(const TQString &str, TQCharAttributes *charAttributes TQTextEngine::TQTextEngine( const TQString &str, TQFontPrivate *f ) - : string( str ), fnt( f ), direction( TQChar::DirON ), haveCharAttributes( FALSE ), widthOnly( FALSE ) + : string( str ), fnt( f ), direction( TQChar::DirON ), haveCharAttributes( false ), widthOnly( false ) { #ifdef TQ_WS_WIN if ( !resolvedUsp10 ) @@ -996,7 +996,7 @@ const TQCharAttributes *TQTextEngine::attributes() attributes( script, string, from, len, charAttributes ); } - haveCharAttributes = TRUE; + haveCharAttributes = true; return charAttributes; } @@ -1115,15 +1115,15 @@ void TQTextEngine::itemize( int mode ) direction = basicDirection( string ); bidiItemize( this, direction == TQChar::DirR, mode ); } else { - BidiControl control( FALSE ); + BidiControl control( false ); if ( mode & TQTextEngine::SingleLine ) - control.singleLine = TRUE; + control.singleLine = true; int start = 0; int stop = string.length() - 1; appendItems(this, start, stop, control, TQChar::DirL); } if ( (mode & WidthOnly) == WidthOnly ) - widthOnly = TRUE; + widthOnly = true; } glyph_metrics_t TQTextEngine::boundingBox( int from, int len ) const |
