summaryrefslogtreecommitdiffstats
path: root/src/kernel/tqsimplerichtext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/tqsimplerichtext.cpp')
-rw-r--r--src/kernel/tqsimplerichtext.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/kernel/tqsimplerichtext.cpp b/src/kernel/tqsimplerichtext.cpp
index c2808b1cd..b78d2ad28 100644
--- a/src/kernel/tqsimplerichtext.cpp
+++ b/src/kernel/tqsimplerichtext.cpp
@@ -72,7 +72,7 @@ void TQSimpleRichTextData::adjustSize(TQPainter *p) {
}
}
cachedWidth = doc->width();
- cachedWidthWithPainter = FALSE;
+ cachedWidthWithPainter = false;
}
/*!
@@ -138,7 +138,7 @@ TQSimpleRichText::TQSimpleRichText( const TQString& text, const TQFont& fnt,
{
d = new TQSimpleRichTextData;
d->cachedWidth = -1;
- d->cachedWidthWithPainter = FALSE;
+ d->cachedWidthWithPainter = false;
d->font = fnt;
d->doc = new TQTextDocument( 0 );
d->doc->setTextFormat( TQt::RichText );
@@ -184,7 +184,7 @@ TQSimpleRichText::TQSimpleRichText( const TQString& text, const TQFont& fnt,
{
d = new TQSimpleRichTextData;
d->cachedWidth = -1;
- d->cachedWidthWithPainter = FALSE;
+ d->cachedWidthWithPainter = false;
d->font = fnt;
d->doc = new TQTextDocument( 0 );
d->doc->setTextFormat( TQt::RichText );
@@ -192,7 +192,7 @@ TQSimpleRichText::TQSimpleRichText( const TQString& text, const TQFont& fnt,
d->doc->setStyleSheet( (TQStyleSheet*)sheet );
d->doc->setDefaultFormat( fnt, TQColor() );
d->doc->flow()->setPageSize( pageBreak );
- d->doc->setPageBreakEnabled( TRUE );
+ d->doc->setPageBreakEnabled( true );
#ifndef TQT_NO_MIME
d->doc->setMimeSourceFactory( (TQMimeSourceFactory*)factory );
#endif
@@ -224,7 +224,7 @@ void TQSimpleRichText::setWidth( int w )
return;
d->doc->formatter()->setAllowBreakInWords( d->doc->isPageBreakEnabled() );
d->cachedWidth = w;
- d->cachedWidthWithPainter = FALSE;
+ d->cachedWidthWithPainter = false;
d->doc->doLayout( 0, w );
}
@@ -248,7 +248,7 @@ void TQSimpleRichText::setWidth( TQPainter *p, int w )
(p->device()->devType() == TQInternal::Printer)) );
p->save();
d->cachedWidth = w;
- d->cachedWidthWithPainter = TRUE;
+ d->cachedWidthWithPainter = true;
d->doc->doLayout( p, w );
p->restore();
}
@@ -382,13 +382,13 @@ TQString TQSimpleRichText::anchorAt( const TQPoint& pos ) const
if ( d->cachedWidth < 0 )
d->adjustSize();
TQTextCursor c( d->doc );
- c.place( pos, d->doc->firstParagraph(), TRUE );
+ c.place( pos, d->doc->firstParagraph(), true );
return c.paragraph()->at( c.index() )->anchorHref();
}
/*!
- Returns TRUE if \a pos is within a text line of the rich text
- object; otherwise returns FALSE.
+ Returns true if \a pos is within a text line of the rich text
+ object; otherwise returns false.
*/
bool TQSimpleRichText::inText( const TQPoint& pos ) const
@@ -396,7 +396,7 @@ bool TQSimpleRichText::inText( const TQPoint& pos ) const
if ( d->cachedWidth < 0 )
d->adjustSize();
if ( pos.y() > d->doc->height() )
- return FALSE;
+ return false;
TQTextCursor c( d->doc );
c.place( pos, d->doc->firstParagraph() );
return c.totalOffsetX() + c.paragraph()->at( c.index() )->x +
@@ -413,7 +413,7 @@ void TQSimpleRichText::setDefaultFont( const TQFont &f )
return;
d->font = f;
d->cachedWidth = -1;
- d->cachedWidthWithPainter = FALSE;
+ d->cachedWidthWithPainter = false;
d->doc->setDefaultFormat( f, TQColor() );
d->doc->setText( d->doc->originalText(), d->doc->context() );
}