diff options
Diffstat (limited to 'lib')
35 files changed, 353 insertions, 353 deletions
diff --git a/lib/kformula/symbolaction.cpp b/lib/kformula/symbolaction.cpp index 71e60ceef..bedaf264e 100644 --- a/lib/kformula/symbolaction.cpp +++ b/lib/kformula/symbolaction.cpp @@ -104,7 +104,7 @@ void SymbolComboItem::paint( TQPainter *p ) SymbolAction::SymbolAction( TQObject* parent, const char* name ) : TDESelectAction( parent, name ) { - setEditable( FALSE ); + setEditable( false ); } SymbolAction::SymbolAction( const TQString& text, const TDEShortcut& cut, @@ -112,7 +112,7 @@ SymbolAction::SymbolAction( const TQString& text, const TDEShortcut& cut, TQObject* parent, const char* name ) : TDESelectAction( text, cut, receiver, slot, parent, name ) { - setEditable( FALSE ); + setEditable( false ); } int SymbolAction::plug( TQWidget* w, int index ) diff --git a/lib/kofficecore/KoDocument.cpp b/lib/kofficecore/KoDocument.cpp index 147b2ed1c..4cf569f68 100644 --- a/lib/kofficecore/KoDocument.cpp +++ b/lib/kofficecore/KoDocument.cpp @@ -230,7 +230,7 @@ KoDocument::KoDocument( TQWidget * parentWidget, const char *widgetName, TQObjec s_documentList->append(this); d = new Private; - m_bEmpty = TRUE; + m_bEmpty = true; connect( &d->m_autoSaveTimer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( slotAutoSave() ) ); setAutoSave( s_defaultAutoSave ); d->m_bSingleViewMode = singleViewMode; @@ -825,7 +825,7 @@ void KoDocument::paintChild( KoDocumentChild *child, TQPainter &painter, KoView manager->activeWidget() == (TQWidget *)view ) ) { // painter.setClipRegion( rgn ); - painter.setClipping( FALSE ); + painter.setClipping( false ); painter.setPen( black ); painter.fillRect( -5, -5, w + 10, 5, white ); @@ -855,7 +855,7 @@ void KoDocument::paintChild( KoDocumentChild *child, TQPainter &painter, KoView painter.fillRect( w, h / 2 - 3, 5, 5, color ); } - painter.setClipping( TRUE ); + painter.setClipping( true ); } } } @@ -891,7 +891,7 @@ bool KoDocument::saveChildren( KoStore* _store ) { //kdDebug(30003) << "KoDocument::saveChildren internal url: /" << i << endl; if ( !childDoc->saveToStore( _store, TQString::number( i++ ) ) ) - return FALSE; + return false; if (!isExporting ()) childDoc->setModified( false ); @@ -1968,7 +1968,7 @@ void KoDocument::setModified( bool mod ) KParts::ReadWritePart::setModified( mod ); if ( mod ) { - m_bEmpty = FALSE; + m_bEmpty = false; } else { // When saving this document, all non-external child documents get saved too. TQPtrListIterator<KoDocumentChild> it = children(); @@ -2278,15 +2278,15 @@ void KoDocument::setupXmlReader( TQXmlSimpleReader& reader, bool namespaceProces { if ( namespaceProcessing ) { - reader.setFeature( "http://xml.org/sax/features/namespaces", TRUE ); - reader.setFeature( "http://xml.org/sax/features/namespace-prefixes", FALSE ); + reader.setFeature( "http://xml.org/sax/features/namespaces", true ); + reader.setFeature( "http://xml.org/sax/features/namespace-prefixes", false ); } else { - reader.setFeature( "http://xml.org/sax/features/namespaces", FALSE ); - reader.setFeature( "http://xml.org/sax/features/namespace-prefixes", TRUE ); + reader.setFeature( "http://xml.org/sax/features/namespaces", false ); + reader.setFeature( "http://xml.org/sax/features/namespace-prefixes", true ); } - reader.setFeature( "http://trolltech.com/xml/features/report-whitespace-only-CharData", TRUE ); + reader.setFeature( "http://trolltech.com/xml/features/report-whitespace-only-CharData", true ); } diff --git a/lib/kofficecore/KoDocumentChild.cpp b/lib/kofficecore/KoDocumentChild.cpp index 90a992801..f68378166 100644 --- a/lib/kofficecore/KoDocumentChild.cpp +++ b/lib/kofficecore/KoDocumentChild.cpp @@ -158,7 +158,7 @@ bool KoDocumentChild::load( const TQDomElement& element, bool uppercase ) return false; } - bool brect = FALSE; + bool brect = false; TQDomNode n = element.firstChild(); for( ; !n.isNull(); n = n.nextSibling() ) { diff --git a/lib/kofficecore/KoDocumentIface.h b/lib/kofficecore/KoDocumentIface.h index 546859ce3..46b2b42c7 100644 --- a/lib/kofficecore/KoDocumentIface.h +++ b/lib/kofficecore/KoDocumentIface.h @@ -64,12 +64,12 @@ k_dcop: void openURL( TQString url ); /** - * @return TRUE is the document is still loading + * @return true is the document is still loading */ bool isLoading(); /** - * @return TRUE is the document has been modified + * @return true is the document has been modified */ bool isModified(); diff --git a/lib/kofficecore/KoMainWindow.h b/lib/kofficecore/KoMainWindow.h index 9befc71e8..06269db12 100644 --- a/lib/kofficecore/KoMainWindow.h +++ b/lib/kofficecore/KoMainWindow.h @@ -106,7 +106,7 @@ public: void showToolbar( const char * tbName, bool shown ); /** - * @return TRUE if the toolbar @p tbName is visible + * @return true if the toolbar @p tbName is visible */ bool toolbarIsVisible(const char *tbName); @@ -130,7 +130,7 @@ public: * Load the desired document and show it. * @param url the URL to open * - * @return TRUE on success. + * @return true on success. */ virtual bool openDocument( const KURL & url ); @@ -309,11 +309,11 @@ protected: // protected methods are mostly for koshell, it's the only one derivi /** * Saves the document, asking for a filename if necessary. * - * @param saveas if set to TRUE the user is always prompted for a filename + * @param saveas if set to true the user is always prompted for a filename * - * @param silent if set to TRUE rootDocument()->setTitleModified will not be called. + * @param silent if set to true rootDocument()->setTitleModified will not be called. * - * @return TRUE on success, false on error or cancel + * @return true on success, false on error or cancel * (don't display anything in this case, the error dialog box is also implemented here * but restore the original URL in slotFileSaveAs) */ diff --git a/lib/kofficecore/KoPicture.h b/lib/kofficecore/KoPicture.h index 63dd9c596..83481d333 100644 --- a/lib/kofficecore/KoPicture.h +++ b/lib/kofficecore/KoPicture.h @@ -194,7 +194,7 @@ public: TQImage generateImage(const TQSize& size); /** - * @return TRUE if the alpha channel processing has been enabled + * @return true if the alpha channel processing has been enabled */ bool hasAlphaBuffer() const; diff --git a/lib/kofficecore/KoQueryTrader.h b/lib/kofficecore/KoQueryTrader.h index 511bd9188..a9841fe64 100644 --- a/lib/kofficecore/KoQueryTrader.h +++ b/lib/kofficecore/KoQueryTrader.h @@ -46,7 +46,7 @@ public: KService::Ptr service() const { return m_service; } /** - * @return TRUE if the service pointer is null + * @return true if the service pointer is null */ bool isEmpty() const { return m_service == 0L; } @@ -61,7 +61,7 @@ public: TQStringList mimeTypes() const { return m_service->serviceTypes(); } /** - * @return TRUE if the document can handle the requested mimetype. + * @return true if the document can handle the requested mimetype. */ bool supportsMimeType( const TQString & _mimetype ) const { return mimeTypes().contains( _mimetype ); } @@ -149,13 +149,13 @@ public: TQString available; /** - * @return TRUE if the filter can import the requested mimetype. + * @return true if the filter can import the requested mimetype. */ bool imports( const TQString& _mimetype ) const { return ( import.contains( _mimetype ) ); } /** - * @return TRUE if the filter can export the requested mimetype. + * @return true if the filter can export the requested mimetype. */ bool exports( const TQString& _m ) const { return ( export_.contains( _m ) ); } diff --git a/lib/kofficecore/KoView.cpp b/lib/kofficecore/KoView.cpp index cca65063d..773a8fda3 100644 --- a/lib/kofficecore/KoView.cpp +++ b/lib/kofficecore/KoView.cpp @@ -563,7 +563,7 @@ void KoView::slotChildActivated( bool a ) // #### HACK // We want to delete as many views as possible and this // trick is used to go upwards in the view-tree. - emit activated( FALSE ); + emit activated( false ); } void KoView::slotChildChanged( KoDocumentChild *child ) @@ -658,12 +658,12 @@ bool KoView::isInOperation() const void KoView::beginOperation() { d->m_inOperation = true; - canvas()->setUpdatesEnabled(FALSE); + canvas()->setUpdatesEnabled(false); } void KoView::endOperation() { - canvas()->setUpdatesEnabled(TRUE); + canvas()->setUpdatesEnabled(true); d->m_inOperation = false; // canvas()->update(); diff --git a/lib/kofficecore/KoView.h b/lib/kofficecore/KoView.h index 49615973b..b6f5334dd 100644 --- a/lib/kofficecore/KoView.h +++ b/lib/kofficecore/KoView.h @@ -237,7 +237,7 @@ public: virtual void paintEverything( TQPainter &painter, const TQRect &rect, bool transparent = false ); /** - * @return TRUE if the document @p doc is represented in this view by + * @return true if the document @p doc is represented in this view by * some KoViewChild. * * This is just a convenience function for @ref #child. diff --git a/lib/kofficecore/tests/kodomtest.cpp b/lib/kofficecore/tests/kodomtest.cpp index f4f197a38..ef9c60793 100644 --- a/lib/kofficecore/tests/kodomtest.cpp +++ b/lib/kofficecore/tests/kodomtest.cpp @@ -119,8 +119,8 @@ int main( int argc, char** argv ) { "</o:document-content>\n"; TQDomDocument doc; //TQXmlSimpleReader reader; - //reader.setFeature( "http://xml.org/sax/features/namespaces", TRUE ); - //reader.setFeature( "http://xml.org/sax/features/namespace-prefixes", FALSE ); + //reader.setFeature( "http://xml.org/sax/features/namespaces", true ); + //reader.setFeature( "http://xml.org/sax/features/namespace-prefixes", false ); bool ok = doc.setContent( xml, true /* namespace processing */ ); assert( ok ); diff --git a/lib/kofficeui/KoPartSelectDia.cpp b/lib/kofficeui/KoPartSelectDia.cpp index 8119ade35..6b124182a 100644 --- a/lib/kofficeui/KoPartSelectDia.cpp +++ b/lib/kofficeui/KoPartSelectDia.cpp @@ -30,13 +30,13 @@ ****************************************************/ KoPartSelectDia::KoPartSelectDia( TQWidget* parent, const char* name ) : - KDialogBase( parent, name, TRUE, i18n("Insert Object"), KDialogBase::Ok | KDialogBase::Cancel ) + KDialogBase( parent, name, true, i18n("Insert Object"), KDialogBase::Ok | KDialogBase::Cancel ) { listview = new TQListView( this ); listview->addColumn( i18n( "Object" ) ); listview->addColumn( i18n( "Comment" ) ); - listview->setAllColumnsShowFocus( TRUE ); - listview->setShowSortIndicator( TRUE ); + listview->setAllColumnsShowFocus( true ); + listview->setShowSortIndicator( true ); setMainWidget( listview ); connect( listview, TQ_SIGNAL( doubleClicked( TQListViewItem * ) ), this, TQ_SLOT( slotOk() ) ); diff --git a/lib/kofficeui/KoTemplateChooseDia.cpp b/lib/kofficeui/KoTemplateChooseDia.cpp index fa9b52cd6..a33087f3d 100644 --- a/lib/kofficeui/KoTemplateChooseDia.cpp +++ b/lib/kofficeui/KoTemplateChooseDia.cpp @@ -366,7 +366,7 @@ void KoTemplateChooseDia::setupFileDialog(TQWidget * widgetbase, TQGridLayout * } delete l; - d->m_filedialog->setSizeGripEnabled ( FALSE ); + d->m_filedialog->setSizeGripEnabled ( false ); TQStringList mimeFilter = KoFilterManager::mimeFilter( d->m_format, KoFilterManager::Import ); TQStringList::Iterator mimeFilterIt = mimeFilter.at( 1 ); @@ -810,7 +810,7 @@ void KoTCDRecentFilesIconView::showToolTip( TQIconViewItem* item ) toolTip->move(toolTip->x(), screen.bottom()-toolTip->y()-toolTip->height()+toolTip->y()); } toolTip->setFont( TQToolTip::font() ); - toolTip->setPalette( TQToolTip::palette(), TRUE ); + toolTip->setPalette( TQToolTip::palette(), true ); toolTip->show(); } diff --git a/lib/kotext/KoAutoFormat.cpp b/lib/kotext/KoAutoFormat.cpp index 414d848e0..9b45d3719 100644 --- a/lib/kotext/KoAutoFormat.cpp +++ b/lib/kotext/KoAutoFormat.cpp @@ -456,7 +456,7 @@ void KoAutoFormat::readAutoCorrectConfig() for(uint i = 0; i < nl.count() ; i++) { //bug in qmap we overwrite = false doesn't work //so we can't add multiple "othernb" - m_superScriptEntries.insert( nl.item(i).toElement().attribute("find"), KoAutoFormatEntry(nl.item(i).toElement().attribute("super")),FALSE ); + m_superScriptEntries.insert( nl.item(i).toElement().attribute("find"), KoAutoFormatEntry(nl.item(i).toElement().attribute("super")),false ); } } diff --git a/lib/kotext/KoChangeCaseDia.cpp b/lib/kotext/KoChangeCaseDia.cpp index 6bffac9b7..db2be128c 100644 --- a/lib/kotext/KoChangeCaseDia.cpp +++ b/lib/kotext/KoChangeCaseDia.cpp @@ -35,7 +35,7 @@ KoChangeCaseDia::KoChangeCaseDia( TQWidget *parent, const char *name ) TQVBox *page = makeVBoxMainWidget(); TQButtonGroup *grp = new TQButtonGroup( 1, TQt::Horizontal, i18n( "Case" ),page ); - grp->setRadioButtonExclusive( TRUE ); + grp->setRadioButtonExclusive( true ); grp->layout(); m_upperCase=new TQRadioButton( i18n("&Uppercase"), grp ); m_lowerCase=new TQRadioButton( i18n("&Lowercase"), grp ); @@ -47,7 +47,7 @@ KoChangeCaseDia::KoChangeCaseDia( TQWidget *parent, const char *name ) TQWhatsThis::add( m_sentenceCase, i18n("Convert first letter of a sentence to uppercase.")); m_upperCase->setChecked(true); - grp->setRadioButtonExclusive( TRUE ); + grp->setRadioButtonExclusive( true ); } diff --git a/lib/kotext/KoComplexText.cpp b/lib/kotext/KoComplexText.cpp index 475f439da..e63ac40c5 100644 --- a/lib/kotext/KoComplexText.cpp +++ b/lib/kotext/KoComplexText.cpp @@ -897,7 +897,7 @@ TQPtrList<KoTextRun> *KoComplexText::bidiReorderLine( KoBidiControl *control, co //printf("doing BiDi reordering from %d to %d!\n", start, last); TQPtrList<KoTextRun> *runs = new TQPtrList<KoTextRun>; - runs->setAutoDelete(TRUE); + runs->setAutoDelete(true); KoBidiContext *context = control->context; if ( !context ) { @@ -982,7 +982,7 @@ TQPtrList<KoTextRun> *KoComplexText::bidiReorderLine( KoBidiControl *control, co if(level < 61) { runs->append( new KoTextRun(sor, eor, context, dir) ); ++eor; sor = eor; dir = TQChar::DirON; status.eor = TQChar::DirON; - context = new KoBidiContext(level, TQChar::DirR, context, TRUE); + context = new KoBidiContext(level, TQChar::DirR, context, true); dir = TQChar::DirR; status.last = TQChar::DirR; status.lastStrong = TQChar::DirR; @@ -999,7 +999,7 @@ TQPtrList<KoTextRun> *KoComplexText::bidiReorderLine( KoBidiControl *control, co if(level < 61) { runs->append( new KoTextRun(sor, eor, context, dir) ); ++eor; sor = eor; dir = TQChar::DirON; status.eor = TQChar::DirON; - context = new KoBidiContext(level, TQChar::DirL, context, TRUE); + context = new KoBidiContext(level, TQChar::DirL, context, true); dir = TQChar::DirL; status.last = TQChar::DirL; status.lastStrong = TQChar::DirL; diff --git a/lib/kotext/KoComplexText.h b/lib/kotext/KoComplexText.h index 8a22d152b..2a2867b96 100644 --- a/lib/kotext/KoComplexText.h +++ b/lib/kotext/KoComplexText.h @@ -75,7 +75,7 @@ struct TQ_EXPORT KoBidiStatus { struct TQ_EXPORT KoBidiContext : public TQShared { // ### ref and deref parent? - KoBidiContext( uchar level, TQChar::Direction embedding, KoBidiContext *parent = 0, bool override = FALSE ); + KoBidiContext( uchar level, TQChar::Direction embedding, KoBidiContext *parent = 0, bool override = false ); ~KoBidiContext(); unsigned char level; diff --git a/lib/kotext/KoCustomVariablesDia.cpp b/lib/kotext/KoCustomVariablesDia.cpp index 41c2f5df7..ff18a1d41 100644 --- a/lib/kotext/KoCustomVariablesDia.cpp +++ b/lib/kotext/KoCustomVariablesDia.cpp @@ -38,14 +38,14 @@ ******************************************************************/ KoVariableNameDia::KoVariableNameDia( TQWidget *parent ) - : KDialogBase( parent, "", TRUE,i18n( "Entry Name" ),Ok|Cancel ) + : KDialogBase( parent, "", true,i18n( "Entry Name" ),Ok|Cancel ) { init(); } KoVariableNameDia::KoVariableNameDia( TQWidget *parent, const TQPtrList<KoVariable>& vars ) - : KDialogBase( parent, "", TRUE, i18n( "Variable Name" ), Ok|Cancel ) + : KDialogBase( parent, "", true, i18n( "Variable Name" ), Ok|Cancel ) { init(); @@ -68,7 +68,7 @@ void KoVariableNameDia::init() TQLabel *l = new TQLabel( i18n( "Name:" ), row1 ); l->setFixedSize( l->sizeHint() ); - names = new TQComboBox( TRUE, row1 ); + names = new TQComboBox( true, row1 ); names->setFocus(); connect( names, TQ_SIGNAL( textChanged ( const TQString & )), @@ -161,7 +161,7 @@ int KoCustomVariablesListItem::width( const TQFontMetrics & fm, const TQListView KoCustomVariablesList::KoCustomVariablesList( TQWidget *parent ) : TDEListView( parent ) { - header()->setMovingEnabled( FALSE ); + header()->setMovingEnabled( false ); addColumn( i18n( "Variable" ) ); addColumn( i18n( "Value" ) ); connect( header(), TQ_SIGNAL( sizeChange( int, int, int ) ), @@ -205,7 +205,7 @@ void KoCustomVariablesList::updateItems() ******************************************************************/ KoCustomVariablesDia::KoCustomVariablesDia( TQWidget *parent, const TQPtrList<KoVariable> &variables ) - : KDialogBase( parent, "", TRUE,i18n( "Variable Value Editor" ), Ok|Cancel ) + : KDialogBase( parent, "", true,i18n( "Variable Value Editor" ), Ok|Cancel ) { back = makeVBoxMainWidget(); @@ -249,7 +249,7 @@ void KoCustomVariablesDia::slotOk() ******************************************************************/ KoCustomVarDialog::KoCustomVarDialog( TQWidget *parent ) - : KDialogBase( parent, "", TRUE,i18n( "Add Variable" ), Ok|Cancel ) + : KDialogBase( parent, "", true,i18n( "Add Variable" ), Ok|Cancel ) { init(); m_name->setFocus(); @@ -269,7 +269,7 @@ KoCustomVarDialog::KoCustomVarDialog( TQWidget *parent ) } // edit existing variable KoCustomVarDialog::KoCustomVarDialog( TQWidget *parent, KoCustomVariable *var ) - : KDialogBase( parent, "", TRUE,i18n( "Edit Variable" ), Ok|Cancel ) + : KDialogBase( parent, "", true,i18n( "Edit Variable" ), Ok|Cancel ) { m_var = var; init(); diff --git a/lib/kotext/KoParagDia.cpp b/lib/kotext/KoParagDia.cpp index c9ed078bd..f9b6dc49c 100644 --- a/lib/kotext/KoParagDia.cpp +++ b/lib/kotext/KoParagDia.cpp @@ -462,7 +462,7 @@ int KoSpinBox::mapTextToValue( bool * ok ) int ret; TQString txt = text(); - *ok = TRUE; + *ok = true; switch(m_Etype) { case NUM: @@ -487,7 +487,7 @@ int KoSpinBox::mapTextToValue( bool * ok ) } if (ret == -1) - *ok = FALSE; + *ok = false; return ret; } @@ -1849,7 +1849,7 @@ KoParagTabulatorsWidget::KoParagTabulatorsWidget( KoUnit::Unit unit, double fram TextLabel2->setAlignment( AlignRight ); fillingGrid->addWidget( TextLabel2, 0, 0 ); - cFilling = new TQComboBox( FALSE, gTabLeader); + cFilling = new TQComboBox( false, gTabLeader); cFilling->insertItem( i18n( "Blank" ) ); cFilling->insertItem( "_ _ _ _ _ _"); // DOT cFilling->insertItem( "_________"); // SOLID diff --git a/lib/kotext/KoRichText.cpp b/lib/kotext/KoRichText.cpp index b6787b25e..cd45006ad 100644 --- a/lib/kotext/KoRichText.cpp +++ b/lib/kotext/KoRichText.cpp @@ -60,7 +60,7 @@ void KoTextDocCommandHistory::addCommand( KoTextDocCommand *cmd ) { if ( current < (int)history.count() - 1 ) { TQPtrList<KoTextDocCommand> commands; - commands.setAutoDelete( FALSE ); + commands.setAutoDelete( false ); for( int i = 0; i <= current; ++i ) { commands.insert( i, history.at( 0 ) ); @@ -70,7 +70,7 @@ void KoTextDocCommandHistory::addCommand( KoTextDocCommand *cmd ) commands.append( cmd ); history.clear(); history = commands; - history.setAutoDelete( TRUE ); + history.setAutoDelete( true ); } else { history.append( cmd ); } @@ -187,7 +187,7 @@ KoTextCursor *KoTextDocDeleteCommand::unexecute( KoTextCursor *c ) cursor.setParag( s ); cursor.setIndex( index ); TQString str = KoTextString::toString( text ); - cursor.insert( str, TRUE, &text ); + cursor.insert( str, true, &text ); cursor.setParag( s ); cursor.setIndex( index ); if ( c ) { @@ -200,7 +200,7 @@ KoTextCursor *KoTextDocDeleteCommand::unexecute( KoTextCursor *c ) s = cursor.parag(); while ( s ) { s->format(); - s->setChanged( TRUE ); + s->setChanged( true ); if ( c && s == c->parag() ) break; s = s->next(); @@ -377,7 +377,7 @@ void KoTextCursor::insert( const TQString &str, bool checkNewLine, TQMemArray<Ko { string->invalidate( idx ); tmpIndex = -1; - bool justInsert = TRUE; + bool justInsert = true; TQString s( str ); #if defined(TQ_WS_WIN) if ( checkNewLine ) @@ -391,27 +391,27 @@ void KoTextCursor::insert( const TQString &str, bool checkNewLine, TQMemArray<Ko for ( int i = 0; i < (int)s.length(); ++i ) { if ( formatting->at( i ).format() ) { formatting->at( i ).format()->addRef(); - string->string()->setFormat( idx + i, formatting->at( i ).format(), TRUE ); + string->string()->setFormat( idx + i, formatting->at( i ).format(), true ); } } } idx += s.length(); } else { - TQStringList lst = TQStringList::split( '\n', s, TRUE ); + TQStringList lst = TQStringList::split( '\n', s, true ); TQStringList::Iterator it = lst.begin(); //int y = string->rect().y() + string->rect().height(); int lastIndex = 0; KoTextFormat *lastFormat = 0; for ( ; it != lst.end(); ) { if ( it != lst.begin() ) { - splitAndInsertEmptyParag( FALSE, TRUE ); + splitAndInsertEmptyParag( false, true ); //string->setEndState( -1 ); #if 0 // no! - string->prev()->format( -1, FALSE ); + string->prev()->format( -1, false ); #endif if ( lastFormat && formatting && string->prev() ) { lastFormat->addRef(); - string->prev()->string()->setFormat( string->prev()->length() - 1, lastFormat, TRUE ); + string->prev()->string()->setFormat( string->prev()->length() - 1, lastFormat, true ); } } lastFormat = 0; @@ -427,7 +427,7 @@ void KoTextCursor::insert( const TQString &str, bool checkNewLine, TQMemArray<Ko for ( int i = 0; i < len; ++i ) { if ( formatting->at( i + lastIndex ).format() ) { formatting->at( i + lastIndex ).format()->addRef(); - string->string()->setFormat( i + idx, formatting->at( i + lastIndex ).format(), TRUE ); + string->string()->setFormat( i + idx, formatting->at( i + lastIndex ).format(), true ); } } if ( it != lst.end() ) @@ -439,7 +439,7 @@ void KoTextCursor::insert( const TQString &str, bool checkNewLine, TQMemArray<Ko idx += s.length(); } #if 0 //// useless and wrong. We'll format things and move them down correctly in KoTextObject::insert(). - string->format( -1, FALSE ); + string->format( -1, false ); int dy = string->rect().y() + string->rect().height() - y; #endif KoTextParag *p = string; @@ -455,7 +455,7 @@ void KoTextCursor::insert( const TQString &str, bool checkNewLine, TQMemArray<Ko #if 0 //// useless and slow int h = string->rect().height(); - string->format( -1, TRUE ); + string->format( -1, true ); #endif fixCursorPosition(); } @@ -499,9 +499,9 @@ bool KoTextCursor::place( const TQPoint &p, KoTextParag *s, bool link, int *cust } if ( !s ) - return FALSE; + return false; - setParag( s, FALSE ); + setParag( s, false ); int y = s->rect().y(); int lines = s->lines(); KoTextStringChar *chr = 0; @@ -514,7 +514,7 @@ bool KoTextCursor::place( const TQPoint &p, KoTextParag *s, bool link, int *cust cy = s->lineY( i ); //ch = s->lineHeight( i ); if ( !chr ) - return FALSE; + return false; if ( i < lines - 1 && pos.y() >= y + cy && pos.y() <= y + s->lineY( i+1 ) ) break; } @@ -545,7 +545,7 @@ bool KoTextCursor::place( const TQPoint &p, KoTextParag *s, bool link, int *cust cpos += cw; int d = cpos - pos.x(); bool dm = d < 0 ? !chr->rightToLeft : chr->rightToLeft; - if ( (TQABS( d ) < dist || (dist == d && dm == TRUE )) && string->string()->validCursorPosition( i ) ) { + if ( (TQABS( d ) < dist || (dist == d && dm == true )) && string->string()->validCursorPosition( i ) ) { dist = TQABS( d ); if ( !link || pos.x() >= x + chr->x ) { curpos = i; @@ -553,9 +553,9 @@ bool KoTextCursor::place( const TQPoint &p, KoTextParag *s, bool link, int *cust } i++; } - setIndex( curpos, FALSE ); + setIndex( curpos, false ); - return TRUE; + return true; } void KoTextCursor::gotoRight() @@ -781,7 +781,7 @@ void KoTextCursor::gotoPreviousWord() gotoPreviousLetter(); tmpIndex = -1; KoTextString *s = string->string(); - bool allowSame = FALSE; + bool allowSame = false; if ( idx == ( (int)s->length()-1 ) ) return; for ( int i = idx; i >= 0; --i ) { @@ -794,7 +794,7 @@ void KoTextCursor::gotoPreviousWord() } if ( !allowSame && !( s->at( i ).c.isSpace() || s->at( i ).c == '\t' || s->at( i ).c == '.' || s->at( i ).c == ',' || s->at( i ).c == ':' || s->at( i ).c == ';' ) ) - allowSame = TRUE; + allowSame = true; } idx = 0; } @@ -803,7 +803,7 @@ void KoTextCursor::gotoNextWord() { tmpIndex = -1; KoTextString *s = string->string(); - bool allowSame = FALSE; + bool allowSame = false; for ( int i = idx; i < (int)s->length(); ++i ) { if ( ! ( s->at( i ).c.isSpace() || s->at( i ).c == '\t' || s->at( i ).c == '.' || s->at( i ).c == ',' || s->at( i ).c == ':' || s->at( i ).c == ';' ) ) { @@ -814,7 +814,7 @@ void KoTextCursor::gotoNextWord() } if ( !allowSame && ( s->at( i ).c.isSpace() || s->at( i ).c == '\t' || s->at( i ).c == '.' || s->at( i ).c == ',' || s->at( i ).c == ':' || s->at( i ).c == ';' ) ) - allowSame = TRUE; + allowSame = true; } if ( idx < ((int)s->length()-1) ) { @@ -860,7 +860,7 @@ void KoTextCursor::splitAndInsertEmptyParag( bool ind, bool updateIds ) KoTextParag *n = string->next(); KoTextParag *s = doc->createParag( doc, string, n, updateIds ); if ( f ) - s->setFormat( 0, 1, f, TRUE ); + s->setFormat( 0, 1, f, true ); s->copyParagData( string ); #if 0 if ( ind ) { @@ -878,7 +878,7 @@ void KoTextCursor::splitAndInsertEmptyParag( bool ind, bool updateIds ) KoTextParag *p = string->prev(); KoTextParag *s = doc->createParag( doc, p, string, updateIds ); if ( f ) - s->setFormat( 0, 1, f, TRUE ); + s->setFormat( 0, 1, f, true ); s->copyParagData( string ); if ( ind ) { //s->indent(); @@ -892,10 +892,10 @@ void KoTextCursor::splitAndInsertEmptyParag( bool ind, bool updateIds ) KoTextParag *s = doc->createParag( doc, string, n, updateIds ); s->copyParagData( string ); s->remove( 0, 1 ); - s->append( str, TRUE ); + s->append( str, true ); for ( uint i = 0; i < str.length(); ++i ) { KoTextStringChar* tsc = string->at( idx + i ); - s->setFormat( i, 1, tsc->format(), TRUE ); + s->setFormat( i, 1, tsc->format(), true ); if ( tsc->isCustom() ) { KoTextCustomItem * item = tsc->customItem(); s->at( i )->setCustomItem( item ); @@ -932,17 +932,17 @@ bool KoTextCursor::removePreviousChar() idx--; // shouldn't be needed, just to make sure. fixCursorPosition(); - string->format( -1, TRUE ); + string->format( -1, true ); //else if ( string->document() && string->document()->parent() ) - // string->document()->nextDoubleBuffered = TRUE; - return FALSE; + // string->document()->nextDoubleBuffered = true; + return false; } else if ( string->prev() ) { string = string->prev(); string->join( string->next() ); string->invalidateCounters(); - return TRUE; + return true; } - return FALSE; + return false; } bool KoTextCursor::remove() @@ -951,10 +951,10 @@ bool KoTextCursor::remove() if ( !atParagEnd() ) { int next = string->string()->nextCursorPosition( idx ); string->remove( idx, next-idx ); - string->format( -1, TRUE ); + string->format( -1, true ); //else if ( doc && doc->parent() ) - // doc->nextDoubleBuffered = TRUE; - return FALSE; + // doc->nextDoubleBuffered = true; + return false; } else if ( string->next() ) { if ( string->length() == 1 ) { string->next()->setPrev( string->prev() ); @@ -971,17 +971,17 @@ bool KoTextCursor::remove() while ( s ) { s->id = s->p ? s->p->id + 1 : 0; //s->state = -1; - //s->needPreProcess = TRUE; - s->changed = TRUE; + //s->needPreProcess = true; + s->changed = true; s = s->n; } string->format(); } else { string->join( string->next() ); } - return TRUE; + return true; } - return FALSE; + return false; } void KoTextCursor::killLine() @@ -989,9 +989,9 @@ void KoTextCursor::killLine() if ( atParagEnd() ) return; string->remove( idx, string->length() - idx - 1 ); - string->format( -1, TRUE ); + string->format( -1, true ); //else if ( doc && doc->parent() ) - //doc->nextDoubleBuffered = TRUE; + //doc->nextDoubleBuffered = true; } #if 0 @@ -1069,10 +1069,10 @@ void KoTextCursor::fixCursorPosition() KoTextString::KoTextString() { - bidiDirty = TRUE; + bidiDirty = true; bNeedsSpellCheck = true; - bidi = FALSE; - rightToLeft = FALSE; + bidi = false; + rightToLeft = false; dir = TQChar::DirON; } @@ -1117,7 +1117,7 @@ void KoTextString::insert( int index, const TQString &s, KoTextFormat *f ) #endif ch.setFormat( f ); } - bidiDirty = TRUE; + bidiDirty = true; bNeedsSpellCheck = true; } @@ -1145,7 +1145,7 @@ void KoTextString::insert( int index, KoTextStringChar *c ) ch.d.format = 0; ch.type = KoTextStringChar::Regular; ch.setFormat( c->format() ); - bidiDirty = TRUE; + bidiDirty = true; bNeedsSpellCheck = true; } @@ -1168,7 +1168,7 @@ void KoTextString::truncate( int index ) } } data.truncate( index ); - bidiDirty = TRUE; + bidiDirty = true; bNeedsSpellCheck = true; } @@ -1189,7 +1189,7 @@ void KoTextString::remove( int index, int len ) memmove( data.data() + index, data.data() + index + len, sizeof( KoTextStringChar ) * ( data.size() - index - len ) ); data.resize( data.size() - len, TQGArray::SpeedOptim ); - bidiDirty = TRUE; + bidiDirty = true; bNeedsSpellCheck = true; } @@ -1232,10 +1232,10 @@ void KoTextString::setFormat( int index, KoTextFormat *f, bool useCollection, bo void KoTextString::checkBidi() const { KoTextString *that = (KoTextString *)this; - that->bidiDirty = FALSE; + that->bidiDirty = false; int length = data.size(); if ( !length ) { - that->bidi = FALSE; + that->bidi = false; that->rightToLeft = dir == TQChar::DirR; return; } @@ -1251,7 +1251,7 @@ void KoTextString::checkBidi() const TQScriptItem *item = &textEngine.items[textEngine.items.size()-1]; unsigned char bidiLevel = item->analysis.bidiLevel; if ( bidiLevel ) - that->bidi = TRUE; + that->bidi = true; int pos = length-1; while ( ch >= start ) { if ( item->position > pos ) { @@ -1260,7 +1260,7 @@ void KoTextString::checkBidi() const Q_ASSERT( item < &textEngine.items[textEngine.items.size()] ); bidiLevel = item->analysis.bidiLevel; if ( bidiLevel ) - that->bidi = TRUE; + that->bidi = true; } ch->softBreak = ca->softBreak; ch->whiteSpace = ca->whiteSpace; @@ -1274,10 +1274,10 @@ void KoTextString::checkBidi() const } if ( dir == TQChar::DirR ) { - that->bidi = TRUE; - that->rightToLeft = TRUE; + that->bidi = true; + that->rightToLeft = true; } else if ( dir == TQChar::DirL ) { - that->rightToLeft = FALSE; + that->rightToLeft = false; } else { that->rightToLeft = (textEngine.direction == TQChar::DirR); } @@ -1476,7 +1476,7 @@ int KoTextStringChar::descent() const // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ KoTextFormatterBase::KoTextFormatterBase() - : wrapColumn( -1 ), //wrapEnabled( TRUE ), + : wrapColumn( -1 ), //wrapEnabled( true ), m_bViewFormattingChars( false ), biw( true /*default in kotext*/ ) { @@ -1533,7 +1533,7 @@ KoTextParagLineStart *KoTextFormatterBase::bidiReorderLine( KoTextParag * /*para } } int toAdd = 0; - bool first = TRUE; + bool first = true; KoTextRun *r = runs->first(); int xmax = -0xffffff; while ( r ) { @@ -1548,13 +1548,13 @@ KoTextParagLineStart *KoTextFormatterBase::bidiReorderLine( KoTextParag * /*para space -= s; numSpaces--; } else if ( first ) { - first = FALSE; + first = false; if ( c->c == ' ' ) x -= c->format()->width( ' ' ); } c->x = x + toAdd; - c->rightToLeft = TRUE; - c->startOfRun = FALSE; + c->rightToLeft = true; + c->startOfRun = false; int ww = 0; if ( c->c.unicode() >= 32 || c->c == '\t' || c->c == '\n' || c->isCustom() ) { ww = c->width; @@ -1575,13 +1575,13 @@ KoTextParagLineStart *KoTextFormatterBase::bidiReorderLine( KoTextParag * /*para space -= s; numSpaces--; } else if ( first ) { - first = FALSE; + first = false; if ( c->c == ' ' ) x -= c->format()->width( ' ' ); } c->x = x + toAdd; - c->rightToLeft = FALSE; - c->startOfRun = FALSE; + c->rightToLeft = false; + c->startOfRun = false; int ww = 0; if ( c->c.unicode() >= 32 || c->c == '\t' || c->isCustom() ) { ww = c->width; @@ -1594,7 +1594,7 @@ KoTextParagLineStart *KoTextFormatterBase::bidiReorderLine( KoTextParag * /*para pos++; } } - text->at( r->start + start ).startOfRun = TRUE; + text->at( r->start + start ).startOfRun = true; r = runs->next(); } @@ -1617,7 +1617,7 @@ bool KoTextFormatterBase::isStretchable( KoTextString *string, int pos ) const bool KoTextFormatterBase::isBreakable( KoTextString *string, int pos ) const { //if (string->at(pos).nobreak) - // return FALSE; + // return false; return (pos < string->length()-1 && string->at(pos+1).softBreak); } @@ -1662,12 +1662,12 @@ int KoTextFormatterBase::formatVertically( KoTextDocument* doc, KoTextParag* par int delta = c->customItem()->height - h; ls->h += delta; if ( delta ) - parag->setMovedDown( TRUE ); + parag->setMovedDown( true ); } else { int shift = doc->flow()->adjustFlow( parag->rect().y() + ls->y, ls->w, ls->h ); ls->y += shift; if ( shift ) - parag->setMovedDown( TRUE ); + parag->setMovedDown( true ); } h = ls->y + ls->h; } @@ -1696,8 +1696,8 @@ KoTextCustomItem::~KoTextCustomItem() KoTextFlow::KoTextFlow() { w = 0; - leftItems.setAutoDelete( FALSE ); - rightItems.setAutoDelete( FALSE ); + leftItems.setAutoDelete( false ); + rightItems.setAutoDelete( false ); } KoTextFlow::~KoTextFlow() diff --git a/lib/kotext/KoRichText.h b/lib/kotext/KoRichText.h index c6ebceeb3..ac9297ed5 100644 --- a/lib/kotext/KoRichText.h +++ b/lib/kotext/KoRichText.h @@ -116,7 +116,7 @@ public: bool isCustom() const { return type == Custom; } KoTextFormat *format() const; KoTextCustomItem *customItem() const; - void setFormat( KoTextFormat *f,bool setFormatAgain=TRUE ); + void setFormat( KoTextFormat *f,bool setFormatAgain=true ); void setCustomItem( KoTextCustomItem *i ); void loseCustomItem(); struct CustomData @@ -171,13 +171,13 @@ public: void remove( int index, int len ); void clear(); - void setFormat( int index, KoTextFormat *f, bool useCollection, bool setFormatAgain = FALSE ); + void setFormat( int index, KoTextFormat *f, bool useCollection, bool setFormatAgain = false ); void setBidi( bool b ) { bidi = b; } bool isBidi() const; bool isRightToLeft() const; TQChar::Direction direction() const; - void setDirection( TQChar::Direction d ) { dir = d; bidiDirty = TRUE; } + void setDirection( TQChar::Direction d ) { dir = d; bidiDirty = true; } /** Set dirty flag for background spell-checking */ void setNeedsSpellCheck( bool b ) { bNeedsSpellCheck = b; } @@ -245,7 +245,7 @@ public: KoTextParag *parag() const; int index() const; - void setParag( KoTextParag *s, bool restore = TRUE ); + void setParag( KoTextParag *s, bool restore = true ); void gotoLeft(); void gotoRight(); @@ -265,7 +265,7 @@ public: void gotoWordRight(); void insert( const TQString &s, bool checkNewLine, TQMemArray<KoTextStringChar> *formatting = 0 ); - void splitAndInsertEmptyParag( bool ind = TRUE, bool updateIds = TRUE ); + void splitAndInsertEmptyParag( bool ind = true, bool updateIds = true ); bool remove(); bool removePreviousChar(); void killLine(); @@ -274,7 +274,7 @@ public: bool atParagStart() const; bool atParagEnd() const; - void setIndex( int i, bool restore = TRUE ); + void setIndex( int i, bool restore = true ); //void checkIndex(); @@ -323,7 +323,7 @@ template class TQPtrList<KoTextDocCommand>; class KoTextDocCommandHistory { public: - KoTextDocCommandHistory( int s ) : current( -1 ), steps( s ) { history.setAutoDelete( TRUE ); } + KoTextDocCommandHistory( int s ) : current( -1 ), steps( s ) { history.setAutoDelete( true ); } virtual ~KoTextDocCommandHistory() { clear(); } void clear() { history.clear(); current = -1; } @@ -396,7 +396,7 @@ public: void draw(TQPainter* p, int x, int y, int cx, int cy, int cw, int ch, const TQColorGroup& cg, bool selected ); TQString richText() const; - bool ownLine() const { return TRUE; } + bool ownLine() const { return true; } private: int tmpheight; @@ -547,15 +547,15 @@ public: void draw( TQPainter* p, int x, int y, int cx, int cy, int cw, int ch, const TQColorGroup& cg, bool selected ); - bool noErase() const { return TRUE; } - bool ownLine() const { return TRUE; } + bool noErase() const { return true; } + bool ownLine() const { return true; } Placement placement() const { return place; } - bool isNested() const { return TRUE; } + bool isNested() const { return true; } void resize( int nwidth ); virtual void invalidate(); /// ## TQString anchorAt( TQPainter* p, int x, int y ); - virtual bool enter( KoTextCursor *c, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy, bool atEnd = FALSE ); + virtual bool enter( KoTextCursor *c, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy, bool atEnd = false ); virtual bool enterAt( KoTextCursor *c, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy, const TQPoint &pos ); virtual bool next( KoTextCursor *c, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy ); virtual bool prev( KoTextCursor *c, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy ); diff --git a/lib/kotext/KoSearchDia.cpp b/lib/kotext/KoSearchDia.cpp index 554a68058..dcc26eeda 100644 --- a/lib/kotext/KoSearchDia.cpp +++ b/lib/kotext/KoSearchDia.cpp @@ -604,25 +604,25 @@ KoFormatDia::KoFormatDia( TQWidget* parent, const TQString & _caption, KoSearchC TQButtonGroup *grpBold = new TQButtonGroup( 1, TQt::Vertical, page ); - grpBold->setRadioButtonExclusive( TRUE ); + grpBold->setRadioButtonExclusive( true ); grpBold->layout(); m_boldYes=new TQRadioButton( i18n("Yes"), grpBold ); m_boldNo=new TQRadioButton( i18n("No"), grpBold ); TQButtonGroup *grpItalic = new TQButtonGroup( 1, TQt::Vertical, page ); - grpItalic->setRadioButtonExclusive( TRUE ); + grpItalic->setRadioButtonExclusive( true ); grpItalic->layout(); m_italicYes=new TQRadioButton( i18n("Yes"), grpItalic ); m_italicNo=new TQRadioButton( i18n("No"), grpItalic ); TQButtonGroup *grpShadow = new TQButtonGroup( 1, TQt::Vertical, page ); - grpShadow->setRadioButtonExclusive( TRUE ); + grpShadow->setRadioButtonExclusive( true ); grpShadow->layout(); m_shadowYes=new TQRadioButton( i18n("Yes"), grpShadow ); m_shadowNo=new TQRadioButton( i18n("No"), grpShadow ); TQButtonGroup *grpWordByWord = new TQButtonGroup( 1, TQt::Vertical, page ); - grpWordByWord->setRadioButtonExclusive( TRUE ); + grpWordByWord->setRadioButtonExclusive( true ); grpWordByWord->layout(); m_wordByWordYes=new TQRadioButton( i18n("Yes"), grpWordByWord ); m_wordByWordNo=new TQRadioButton( i18n("No"), grpWordByWord ); diff --git a/lib/kotext/KoStyleManager.cpp b/lib/kotext/KoStyleManager.cpp index f00fe0f1e..f5d90be11 100644 --- a/lib/kotext/KoStyleManager.cpp +++ b/lib/kotext/KoStyleManager.cpp @@ -197,7 +197,7 @@ void KoStyleManager::addGeneralTab( int flags ) { tabLayout->addWidget( nameLabel, 0, 0 ); - m_styleCombo = new TQComboBox( FALSE, tab, "styleCombo" ); + m_styleCombo = new TQComboBox( false, tab, "styleCombo" ); tabLayout->addWidget( m_styleCombo, 1, 1 ); @@ -207,7 +207,7 @@ void KoStyleManager::addGeneralTab( int flags ) { tabLayout->addWidget( nextStyleLabel, 1, 0 ); - m_inheritCombo = new TQComboBox( FALSE, tab, "inheritCombo" ); + m_inheritCombo = new TQComboBox( false, tab, "inheritCombo" ); tabLayout->addWidget( m_inheritCombo, 2, 1 ); TQLabel *inheritStyleLabel = new TQLabel( tab ); diff --git a/lib/kotext/KoTextCustomItem.cpp b/lib/kotext/KoTextCustomItem.cpp index 4b567e0be..ff83414fa 100644 --- a/lib/kotext/KoTextCustomItem.cpp +++ b/lib/kotext/KoTextCustomItem.cpp @@ -31,28 +31,28 @@ bool KoTextCustomItem::enter( KoTextCursor *, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy, bool atEnd ) { - doc = doc; parag = parag; idx = idx; ox = ox; oy = oy; Q_UNUSED( atEnd ) return TRUE; + doc = doc; parag = parag; idx = idx; ox = ox; oy = oy; Q_UNUSED( atEnd ) return true; } bool KoTextCustomItem::enterAt( KoTextCursor *, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy, const TQPoint & ) { - doc = doc; parag = parag; idx = idx; ox = ox; oy = oy; return TRUE; + doc = doc; parag = parag; idx = idx; ox = ox; oy = oy; return true; } bool KoTextCustomItem::next( KoTextCursor *, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy ) { - doc = doc; parag = parag; idx = idx; ox = ox; oy = oy; return TRUE; + doc = doc; parag = parag; idx = idx; ox = ox; oy = oy; return true; } bool KoTextCustomItem::prev( KoTextCursor *, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy ) { - doc = doc; parag = parag; idx = idx; ox = ox; oy = oy; return TRUE; + doc = doc; parag = parag; idx = idx; ox = ox; oy = oy; return true; } bool KoTextCustomItem::down( KoTextCursor *, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy ) { - doc = doc; parag = parag; idx = idx; ox = ox; oy = oy; return TRUE; + doc = doc; parag = parag; idx = idx; ox = ox; oy = oy; return true; } bool KoTextCustomItem::up( KoTextCursor *, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy ) { - doc = doc; parag = parag; idx = idx; ox = ox; oy = oy; return TRUE; + doc = doc; parag = parag; idx = idx; ox = ox; oy = oy; return true; } int KoTextCustomItem::index() const diff --git a/lib/kotext/KoTextCustomItem.h b/lib/kotext/KoTextCustomItem.h index 73ee8942b..42496c634 100644 --- a/lib/kotext/KoTextCustomItem.h +++ b/lib/kotext/KoTextCustomItem.h @@ -53,12 +53,12 @@ public: virtual Placement placement() const { return PlaceInline; } bool placeInline() { return placement() == PlaceInline; } - virtual bool ownLine() const { return FALSE; } + virtual bool ownLine() const { return false; } // Called for "ownline" items virtual void resize( int nwidth ) { width = nwidth; } virtual void invalidate() {}; - virtual bool isNested() const { return FALSE; } + virtual bool isNested() const { return false; } virtual int minimumWidth() const { return 0; } virtual int widthHint() const { return 0; } virtual int ascent() const { return height; } @@ -70,7 +70,7 @@ public: TQRect geometry() const { return TQRect( xpos, ypos, width, height ); } - virtual bool enter( KoTextCursor *, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy, bool atEnd = FALSE ); + virtual bool enter( KoTextCursor *, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy, bool atEnd = false ); virtual bool enterAt( KoTextCursor *, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy, const TQPoint & ); virtual bool next( KoTextCursor *, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy ); virtual bool prev( KoTextCursor *, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy ); diff --git a/lib/kotext/KoTextDocument.cpp b/lib/kotext/KoTextDocument.cpp index 35adf8143..bb72478cf 100644 --- a/lib/kotext/KoTextDocument.cpp +++ b/lib/kotext/KoTextDocument.cpp @@ -69,7 +69,7 @@ KoTextDocument::KoTextDocument( KoTextZoomHandler *zoomHandler, KoTextFormatColl void KoTextDocument::init() { //pProcessor = 0; - useFC = TRUE; + useFC = true; pFormatter = 0; fParag = 0; m_pageBreakEnabled = false; @@ -77,15 +77,15 @@ void KoTextDocument::init() align = TQt::AlignAuto; nSelections = 2; - underlLinks = TRUE; + underlLinks = true; backBrush = 0; buf_pixmap = 0; - //nextDoubleBuffered = FALSE; + //nextDoubleBuffered = false; //if ( par ) // withoutDoubleBuffer = par->withoutDoubleBuffer; // else - withoutDoubleBuffer = FALSE; + withoutDoubleBuffer = false; lParag = fParag = createParag( this, 0, 0 ); @@ -102,9 +102,9 @@ void KoTextDocument::init() rightmargin = 0; // 4 in TQRT selectionColors[ Standard ] = TQApplication::palette().color( TQPalette::Active, TQColorGroup::Highlight ); - selectionText[ Standard ] = TRUE; + selectionText[ Standard ] = true; assert( Standard < nSelections ); - selectionText[ InputMethodPreedit ] = FALSE; + selectionText[ InputMethodPreedit ] = false; assert( InputMethodPreedit < nSelections ); commandHistory = new KoTextDocCommandHistory( 100 ); tStopWidth = formatCollection()->defaultFormat()->width( 'x' ) * 8; @@ -186,8 +186,8 @@ KoTextParag *KoTextDocument::createParag( KoTextDocument *d, KoTextParag *pr, Ko void KoTextDocument::setPlainText( const TQString &text ) { clear(); - //preferRichText = FALSE; - //oTextValid = TRUE; + //preferRichText = false; + //oTextValid = true; //oText = text; int lastNl = 0; @@ -387,7 +387,7 @@ bool KoTextDocument::setSelectionEnd( int id, KoTextCursor *cursor ) { TQMap<int, KoTextDocumentSelection>::Iterator it = selections.find( id ); if ( it == selections.end() ) - return FALSE; + return false; KoTextDocumentSelection &sel = *it; KoTextCursor start = sel.startCursor; @@ -396,15 +396,15 @@ bool KoTextDocument::setSelectionEnd( int id, KoTextCursor *cursor ) if ( start == end ) { removeSelection( id ); setSelectionStart( id, cursor ); - return TRUE; + return true; } if ( sel.endCursor.parag() == end.parag() ) { setSelectionEndHelper( id, sel, start, end ); - return TRUE; + return true; } - bool inSelection = FALSE; + bool inSelection = false; KoTextCursor c( this ); KoTextCursor tmp = sel.startCursor; if ( sel.swapped ) @@ -412,32 +412,32 @@ bool KoTextDocument::setSelectionEnd( int id, KoTextCursor *cursor ) KoTextCursor tmp2 = *cursor; c.setParag( tmp.parag()->paragId() < tmp2.parag()->paragId() ? tmp.parag() : tmp2.parag() ); KoTextCursor old; - bool hadStart = FALSE; - bool hadEnd = FALSE; - bool hadStartParag = FALSE; - bool hadEndParag = FALSE; - bool hadOldStart = FALSE; - bool hadOldEnd = FALSE; - bool leftSelection = FALSE; - sel.swapped = FALSE; + bool hadStart = false; + bool hadEnd = false; + bool hadStartParag = false; + bool hadEndParag = false; + bool hadOldStart = false; + bool hadOldEnd = false; + bool leftSelection = false; + sel.swapped = false; for ( ;; ) { if ( c == start ) - hadStart = TRUE; + hadStart = true; if ( c == end ) - hadEnd = TRUE; + hadEnd = true; if ( c.parag() == start.parag() ) - hadStartParag = TRUE; + hadStartParag = true; if ( c.parag() == end.parag() ) - hadEndParag = TRUE; + hadEndParag = true; if ( c == sel.startCursor ) - hadOldStart = TRUE; + hadOldStart = true; if ( c == sel.endCursor ) - hadOldEnd = TRUE; + hadOldEnd = true; if ( !sel.swapped && ( hadEnd && !hadStart || hadEnd && hadStart && start.parag() == end.parag() && start.index() > end.index() ) ) - sel.swapped = TRUE; + sel.swapped = true; if ( c == end && hadStartParag || c == start && hadEndParag ) { @@ -451,9 +451,9 @@ bool KoTextDocument::setSelectionEnd( int id, KoTextCursor *cursor ) if ( inSelection && ( c == end && hadStart || c == start && hadEnd ) ) - leftSelection = TRUE; + leftSelection = true; else if ( !leftSelection && !inSelection && ( hadStart || hadEnd ) ) - inSelection = TRUE; + inSelection = true; bool noSelectionAnymore = hadOldStart && hadOldEnd && leftSelection && !inSelection && !c.parag()->hasSelection( id ) && c.atParagEnd(); c.parag()->removeSelection( id ); @@ -474,7 +474,7 @@ bool KoTextDocument::setSelectionEnd( int id, KoTextCursor *cursor ) } if ( leftSelection ) - inSelection = FALSE; + inSelection = false; old = c; c.gotoNextLetter(); @@ -492,7 +492,7 @@ bool KoTextDocument::setSelectionEnd( int id, KoTextCursor *cursor ) setSelectionEndHelper( id, sel, start, end ); - return TRUE; + return true; } void KoTextDocument::selectAll( int id ) @@ -500,7 +500,7 @@ void KoTextDocument::selectAll( int id ) removeSelection( id ); KoTextDocumentSelection sel; - sel.swapped = FALSE; + sel.swapped = false; KoTextCursor c( this ); c.setParag( fParag ); @@ -534,7 +534,7 @@ bool KoTextDocument::removeSelection( int id ) { TQMap<int, KoTextDocumentSelection>::Iterator it = selections.find( id ); if ( it == selections.end() ) - return FALSE; + return false; KoTextDocumentSelection &sel = *it; @@ -544,25 +544,25 @@ bool KoTextDocument::removeSelection( int id ) tmp = sel.endCursor; c.setParag( tmp.parag() ); KoTextCursor old; - bool hadStart = FALSE; - bool hadEnd = FALSE; + bool hadStart = false; + bool hadEnd = false; KoTextParag *lastParag = 0; - bool leftSelection = FALSE; - bool inSelection = FALSE; - sel.swapped = FALSE; + bool leftSelection = false; + bool inSelection = false; + sel.swapped = false; for ( ;; ) { if ( !hadStart && c.parag() == sel.startCursor.parag() ) - hadStart = TRUE; + hadStart = true; if ( !hadEnd && c.parag() == sel.endCursor.parag() ) - hadEnd = TRUE; + hadEnd = true; if ( !leftSelection && !inSelection && ( c.parag() == sel.startCursor.parag() || c.parag() == sel.endCursor.parag() ) ) - inSelection = TRUE; + inSelection = true; if ( inSelection && ( c == sel.endCursor && hadStart || c == sel.startCursor && hadEnd ) ) { - leftSelection = TRUE; - inSelection = FALSE; + leftSelection = true; + inSelection = false; } bool noSelectionAnymore = leftSelection && !inSelection && !c.parag()->hasSelection( id ) && c.atParagEnd(); @@ -578,7 +578,7 @@ bool KoTextDocument::removeSelection( int id ) } selections.remove( id ); - return TRUE; + return true; } TQString KoTextDocument::selectedText( int id, bool withCustom ) const @@ -710,17 +710,17 @@ void KoTextDocument::setFormat( int id, const KoTextFormat *f, int flags ) } if ( c1.parag() == c2.parag() ) { - c1.parag()->setFormat( c1.index(), c2.index() - c1.index(), f, TRUE, flags ); + c1.parag()->setFormat( c1.index(), c2.index() - c1.index(), f, true, flags ); return; } - c1.parag()->setFormat( c1.index(), c1.parag()->length() - c1.index(), f, TRUE, flags ); + c1.parag()->setFormat( c1.index(), c1.parag()->length() - c1.index(), f, true, flags ); KoTextParag *p = c1.parag()->next(); while ( p && p != c2.parag() ) { - p->setFormat( 0, p->length(), f, TRUE, flags ); + p->setFormat( 0, p->length(), f, true, flags ); p = p->next(); } - c2.parag()->setFormat( 0, c2.index(), f, TRUE, flags ); + c2.parag()->setFormat( 0, c2.index(), f, true, flags ); } /*void KoTextDocument::copySelectedText( int id ) @@ -760,13 +760,13 @@ void KoTextDocument::removeSelectedText( int id, KoTextCursor *cursor ) bool valid = true; if ( c1.parag() == fParag && c1.index() == 0 && c2.parag() == lParag && c2.index() == lParag->length() - 1 ) - valid = FALSE; + valid = false; - bool didGoLeft = FALSE; + bool didGoLeft = false; if ( c1.index() == 0 && c1.parag() != fParag ) { cursor->gotoPreviousLetter(); if ( valid ) - didGoLeft = TRUE; + didGoLeft = true; } c1.parag()->remove( c1.index(), c1.parag()->length() - 1 - c1.index() ); @@ -821,7 +821,7 @@ bool KoTextDocument::find( const TQString &expr, bool cs, bool wo, bool forward, p = paragAt( *parag ); else if ( cursor ) p = cursor->parag(); - bool first = TRUE; + bool first = true; while ( p ) { TQString s = p->string()->toString(); @@ -834,26 +834,26 @@ bool KoTextDocument::find( const TQString &expr, bool cs, bool wo, bool forward, if ( !forward && first ) { start -= expr.length() + 1; if ( start < 0 ) { - first = FALSE; + first = false; p = p->prev(); continue; } } - first = FALSE; + first = false; for ( ;; ) { int res = forward ? s.find( expr, start, cs ) : s.findRev( expr, start, cs ); if ( res == -1 ) break; - bool ok = TRUE; + bool ok = true; if ( wo ) { int end = res + expr.length(); if ( ( res == 0 || s[ res - 1 ].isSpace() || s[ res - 1 ].isPunct() ) && ( end == (int)s.length() || s[ end ].isSpace() || s[ end ].isPunct() ) ) - ok = TRUE; + ok = true; else - ok = FALSE; + ok = false; } if ( ok ) { cursor->setParag( p ); @@ -865,7 +865,7 @@ bool KoTextDocument::find( const TQString &expr, bool cs, bool wo, bool forward, *parag = p->paragId(); if ( index ) *index = res; - return TRUE; + return true; } if ( forward ) { start = res + 1; @@ -878,21 +878,21 @@ bool KoTextDocument::find( const TQString &expr, bool cs, bool wo, bool forward, p = forward ? p->next() : p->prev(); } - return FALSE; + return false; } bool KoTextDocument::inSelection( int selId, const TQPoint &pos ) const { TQMap<int, KoTextDocumentSelection>::ConstIterator it = selections.find( selId ); if ( it == selections.end() ) - return FALSE; + return false; KoTextDocumentSelection sel = *it; KoTextParag *startParag = sel.startCursor.parag(); KoTextParag *endParag = sel.endCursor.parag(); if ( sel.startCursor.parag() == sel.endCursor.parag() && sel.startCursor.parag()->selectionStart( selId ) == sel.endCursor.parag()->selectionEnd( selId ) ) - return FALSE; + return false; if ( sel.endCursor.parag()->paragId() < sel.startCursor.parag()->paragId() ) { endParag = sel.startCursor.parag(); startParag = sel.endCursor.parag(); @@ -901,14 +901,14 @@ bool KoTextDocument::inSelection( int selId, const TQPoint &pos ) const KoTextParag *p = startParag; while ( p ) { if ( p->rect().contains( pos ) ) { - bool inSel = FALSE; + bool inSel = false; int selStart = p->selectionStart( selId ); int selEnd = p->selectionEnd( selId ); int y = 0; int h = 0; for ( int i = 0; i < p->length(); ++i ) { if ( i == selStart ) - inSel = TRUE; + inSel = true; if ( i == selEnd ) break; if ( p->at( i )->lineStart ) { @@ -918,7 +918,7 @@ bool KoTextDocument::inSelection( int selId, const TQPoint &pos ) const if ( pos.y() - p->rect().y() >= y && pos.y() - p->rect().y() <= y + h ) { if ( inSel && pos.x() >= p->at( i )->x && pos.x() <= p->at( i )->x + p->at( i )->width /*p->at( i )->format()->width( p->at( i )->c )*/ ) - return TRUE; + return true; } } } @@ -929,7 +929,7 @@ bool KoTextDocument::inSelection( int selId, const TQPoint &pos ) const p = p->next(); } - return FALSE; + return false; } TQPixmap *KoTextDocument::bufferPixmap( const TQSize &s ) @@ -1000,7 +1000,7 @@ void KoTextDocument::setSelectionStart( int id, KoTextCursor *cursor ) KoTextDocumentSelection sel; sel.startCursor = *cursor; sel.endCursor = *cursor; - sel.swapped = FALSE; + sel.swapped = false; selections[ id ] = sel; } @@ -1078,12 +1078,12 @@ KoTextParag *KoTextDocument::drawWYSIWYG( TQPainter *p, int cx, int cy, int cw, // This stuff relies on doLayout()... simpler to just test for Printer. // If someone understand doLayout() please tell me (David) /*if ( isWithoutDoubleBuffer() || par && par->withoutDoubleBuffer ) { */ - //setWithoutDoubleBuffer( TRUE ); + //setWithoutDoubleBuffer( true ); TQRect crect( cx, cy, cw, ch ); drawWithoutDoubleBuffer( p, crect, cg, zoomHandler ); return 0; } - //setWithoutDoubleBuffer( FALSE ); + //setWithoutDoubleBuffer( false ); if ( !firstParag() ) return 0; @@ -1181,7 +1181,7 @@ floating: TQRect cr( cx, cy, cw, ch ); cr = cr.intersect( TQRect( 0, pixelRect.y() + pixelRect.height(), docwidth, docheight - ( pixelRect.y() + pixelRect.height() ) ) ); - flow()->drawFloatingItems( p, cr.x(), cr.y(), cr.width(), cr.height(), cg, FALSE ); + flow()->drawFloatingItems( p, cr.x(), cr.y(), cr.width(), cr.height(), cg, false ); } } @@ -1238,7 +1238,7 @@ void KoTextDocument::drawWithoutDoubleBuffer( TQPainter *p, const TQRect &cr, co p->fillRect( TQRect( 0, 0, pr.width(), pr.height() ), brush ); //p->setBrushOrigin( p->brushOrigin() + TQPoint( 0, pr.y() ) ); - parag->paint( *p, cg, 0, FALSE, + parag->paint( *p, cg, 0, false, crect_lu.x(), crect_lu.y(), crect_lu.width(), crect_lu.height() ); p->translate( 0, -pr.y() ); @@ -1290,7 +1290,7 @@ void KoTextDocument::drawParagWYSIWYG( TQPainter *p, KoTextParag *parag, int cx, bool useDoubleBuffer = !parag->document()->parent(); if ( is_printer(p) ) - useDoubleBuffer = FALSE; + useDoubleBuffer = false; // Can't handle transparency using double-buffering, in case of rotation/scaling (due to bitBlt) // The test on mat is almost like isIdentity(), but allows for translation. //// ##### The way to fix this: initialize the pixmap to be fully transparent instead @@ -1298,7 +1298,7 @@ void KoTextDocument::drawParagWYSIWYG( TQPainter *p, KoTextParag *parag, int cx, TQWMatrix mat = p->worldMatrix(); if ( ( mat.m11() != 1.0 || mat.m22() != 1.0 || mat.m12() != 0.0 || mat.m21() != 0.0 ) && brush.style() != TQt::SolidPattern ) - useDoubleBuffer = FALSE; + useDoubleBuffer = false; #ifdef DEBUG_PAINTING kdDebug(32500) << "KoTextDocument::drawParagWYSIWYG parag->rect=" << parag->rect() @@ -1399,7 +1399,7 @@ void KoTextDocument::drawParagWYSIWYG( TQPainter *p, KoTextParag *parag, int cx, } if ( resetChanged ) - parag->setChanged( FALSE ); + parag->setChanged( false ); } diff --git a/lib/kotext/KoTextDocument.h b/lib/kotext/KoTextDocument.h index b1a1a17ee..55597c4fd 100644 --- a/lib/kotext/KoTextDocument.h +++ b/lib/kotext/KoTextDocument.h @@ -121,7 +121,7 @@ public: int numSelections() const { return nSelections; } void addSelection( int id ); - TQString selectedText( int id, bool withCustom = TRUE ) const; + TQString selectedText( int id, bool withCustom = true ) const; //void copySelectedText( int id ); void removeSelectedText( int id, KoTextCursor *cursor ); @@ -152,10 +152,10 @@ public: void draw( TQPainter *p, const TQRect& rect, const TQColorGroup &cg, const TQBrush *paper = 0 ); void drawParag( TQPainter *p, KoTextParag *parag, int cx, int cy, int cw, int ch, TQPixmap *&doubleBuffer, const TQColorGroup &cg, - bool drawCursor, KoTextCursor *cursor, bool resetChanged = TRUE ); + bool drawCursor, KoTextCursor *cursor, bool resetChanged = true ); KoTextParag *draw( TQPainter *p, int cx, int cy, int cw, int ch, const TQColorGroup &cg, - bool onlyChanged = FALSE, bool drawCursor = FALSE, KoTextCursor *cursor = 0, - bool resetChanged = TRUE ); + bool onlyChanged = false, bool drawCursor = false, KoTextCursor *cursor = 0, + bool resetChanged = true ); #endif //void setDefaultFont( const TQFont &f ); @@ -200,7 +200,7 @@ public: int undoDepth() const { return commandHistory->undoDepth(); } int length() const; - void clear( bool createEmptyParag = FALSE ); + void clear( bool createEmptyParag = false ); KoTextParag* loadList( const TQDomElement& list, KoOasisContext& context, KoTextParag* lastParagraph, KoStyleCollection * styleColl, KoTextParag* nextParagraph ); @@ -211,7 +211,7 @@ public: void saveOasisContent( KoXmlWriter& writer, KoSavingContext& context ) const; - virtual KoTextParag *createParag( KoTextDocument *d, KoTextParag *pr = 0, KoTextParag *nx = 0, bool updateIds = TRUE ); + virtual KoTextParag *createParag( KoTextDocument *d, KoTextParag *pr = 0, KoTextParag *nx = 0, bool updateIds = true ); // Whether margins are added or max'ed. int addMargins() const { return true; } @@ -292,9 +292,9 @@ public: /** The main drawing method. Equivalent to KoTextDocument::draw, but reimplemented * for wysiwyg */ KoTextParag *drawWYSIWYG( TQPainter *p, int cx, int cy, int cw, int ch, const TQColorGroup &cg, - KoTextZoomHandler* zoomHandler, bool onlyChanged = FALSE, - bool drawCursor = FALSE, KoTextCursor *cursor = 0, - bool resetChanged = TRUE, uint drawingFlags = KoTextDocument::DrawSelections ); + KoTextZoomHandler* zoomHandler, bool onlyChanged = false, + bool drawCursor = false, KoTextCursor *cursor = 0, + bool resetChanged = true, uint drawingFlags = KoTextDocument::DrawSelections ); /** Draw a single paragraph (used by drawWYSIWYG and by KWTextFrameSet::drawCursor). * Equivalent to KoTextDocument::draw, but modified for wysiwyg */ @@ -302,7 +302,7 @@ public: TQPixmap *&doubleBuffer, const TQColorGroup &cg, KoTextZoomHandler* zoomHandler, bool drawCursor, KoTextCursor *cursor, - bool resetChanged = TRUE, + bool resetChanged = true, uint drawingFlags = KoTextDocument::DrawSelections ); /** Set by drawParagWYSIWYG, used by KoTextParag::drawParagString */ diff --git a/lib/kotext/KoTextFormat.cpp b/lib/kotext/KoTextFormat.cpp index 4648898d0..bb0992b29 100644 --- a/lib/kotext/KoTextFormat.cpp +++ b/lib/kotext/KoTextFormat.cpp @@ -54,9 +54,9 @@ void KoTextFormat::zoomChanged() KoTextFormat::KoTextFormat() { - //linkColor = TRUE; + //linkColor = true; ref = 0; - missp = FALSE; + missp = false; va = AlignNormal; collection = 0; //// kotext: WYSIWYG works much much better with scalable fonts -> force it to be scalable @@ -83,7 +83,7 @@ KoTextFormat::KoTextFormat() } KoTextFormat::KoTextFormat( const TQFont &f, const TQColor &c, const TQString &_language, bool hyphenation, KoTextFormatCollection *parent ) - : fn( f ), col( c ) /*fm( TQFontMetrics( f ) ),*/ //linkColor( TRUE ) + : fn( f ), col( c ) /*fm( TQFontMetrics( f ) ),*/ //linkColor( true ) { #ifdef DEBUG_COLLECTION kdDebug(32500) << "KoTextFormat with font & color & parent (" << parent << "), addRef. " << this << endl; @@ -103,7 +103,7 @@ KoTextFormat::KoTextFormat( const TQFont &f, const TQColor &c, const TQString &_ //hei = fm.height(); //asc = fm.ascent(); //dsc = fm.descent(); - missp = FALSE; + missp = false; va = AlignNormal; //// kotext d = new KoTextFormatPrivate; @@ -1681,7 +1681,7 @@ KoTextFormatCollection::KoTextFormatCollection() defFormat = new KoTextFormat( TQApplication::font(), TQColor(), TDEGlobal::locale()->language(), false ); lastFormat = cres = 0; cflags = -1; - cKey.setAutoDelete( TRUE ); + cKey.setAutoDelete( true ); cachedFormat = 0; } @@ -1694,7 +1694,7 @@ KoTextFormatCollection::KoTextFormatCollection( const TQFont& defaultFont, const defFormat = new KoTextFormat( defaultFont, defaultColor, defaultLanguage, defaultHyphenation ); lastFormat = cres = 0; cflags = -1; - cKey.setAutoDelete( TRUE ); + cKey.setAutoDelete( true ); cachedFormat = 0; } @@ -1813,7 +1813,7 @@ KoTextFormat *KoTextFormatCollection::format( const TQFont &f, const TQColor &c, return cachedFormat; } - TQString key = KoTextFormat::getKey( f, c, FALSE, KoTextFormat::AlignNormal ); + TQString key = KoTextFormat::getKey( f, c, false, KoTextFormat::AlignNormal ); cachedFormat = cKey.find( key ); cfont = f; ccol = c; diff --git a/lib/kotext/KoTextFormatter.cpp b/lib/kotext/KoTextFormatter.cpp index 5fb9cdc28..c1df5e032 100644 --- a/lib/kotext/KoTextFormatter.cpp +++ b/lib/kotext/KoTextFormatter.cpp @@ -225,7 +225,7 @@ bool KoTextFormatterCore::format() if ( maxY == 0 ) kdDebug(32500) << "KoTextFormatter::format " << parag->paragId() << " warning, maxY=0" << endl; #endif - bool fullWidth = TRUE; + bool fullWidth = true; //int marg = left + initialRMargin; // minw is the really minimum width needed for this paragraph, i.e. @@ -248,7 +248,7 @@ bool KoTextFormatterCore::format() int tmpBaseLine = 0, tmph = 0; //int tminw = marg; int tmpWused = 0; - bool lastWasNonInlineCustom = FALSE; + bool lastWasNonInlineCustom = false; bool abort = false; int align = parag->alignment(); @@ -281,9 +281,9 @@ bool KoTextFormatterCore::format() } if ( c->isCustom() && c->customItem()->placement() != KoTextCustomItem::PlaceInline ) - lastWasNonInlineCustom = TRUE; + lastWasNonInlineCustom = true; else - lastWasNonInlineCustom = FALSE; + lastWasNonInlineCustom = false; TQPair<int, int> widths = determineCharWidth(); ww = widths.first; @@ -457,7 +457,7 @@ bool KoTextFormatterCore::format() ww = nx - x; } if ( x != left || availableWidth != dw ) - fullWidth = FALSE; + fullWidth = false; lineStart->y = y; parag->insertLineStart( i, lineStart ); tempWordData.clear(); @@ -550,7 +550,7 @@ bool KoTextFormatterCore::format() initialLMargin = x; availableWidth = dw - initialRMargin; if ( x != left || availableWidth != dw ) - fullWidth = FALSE; + fullWidth = false; lineStart->y = y; parag->insertLineStart( i + 1, lineStart ); tempWordData.clear(); @@ -976,7 +976,7 @@ KoTextParagLineStart *KoTextFormatterCore::koBidiReorderLine( int pixelx = zh->layoutUnitToPixelX( x ); int toAdd = 0; int toAddPix = 0; - bool first = TRUE; + bool first = true; KoTextRun *r = runs->first(); int xmax = -0xffffff; while ( r ) { @@ -997,7 +997,7 @@ KoTextParagLineStart *KoTextFormatterCore::koBidiReorderLine( chr.width += s; chr.pixelwidth += zh->layoutUnitToPixelX( s ); // ### rounding problem, recalculate } else if ( first ) { - first = FALSE; + first = false; if ( chr.c == ' ' ) // trailing space { //x -= chr.format()->width( ' ' ); @@ -1010,8 +1010,8 @@ KoTextParagLineStart *KoTextFormatterCore::koBidiReorderLine( #ifdef DEBUG_FORMATTER kdDebug(32500) << "koBidiReorderLine: pos=" << pos << " x(LU)=" << x << " toAdd(LU)=" << toAdd << " -> chr.x=" << chr.x << " pixelx=" << pixelx << "+" << zh->layoutUnitToPixelX( toAdd ) << ", pixelxadj=" << pixelx+zh->layoutUnitToPixelX( toAdd )-zh->layoutUnitToPixelX( chr.x ) << endl; #endif - chr.rightToLeft = TRUE; - chr.startOfRun = FALSE; + chr.rightToLeft = true; + chr.startOfRun = false; int ww = chr.width; if ( xmax < x + toAdd + ww ) xmax = x + toAdd + ww; x += ww; @@ -1032,7 +1032,7 @@ KoTextParagLineStart *KoTextFormatterCore::koBidiReorderLine( space -= s; numSpaces--; } else if ( first ) { - first = FALSE; + first = false; if ( chr.c == ' ' ) // trailing space { //x -= chr.format()->width( ' ' ); @@ -1042,8 +1042,8 @@ KoTextParagLineStart *KoTextFormatterCore::koBidiReorderLine( } chr.x = x + toAdd; chr.pixelxadj = pixelx + toAddPix - zh->layoutUnitToPixelX( chr.x ); - chr.rightToLeft = FALSE; - chr.startOfRun = FALSE; + chr.rightToLeft = false; + chr.startOfRun = false; int ww = chr.width; //kdDebug(32500) << "setting char " << pos << " at pos " << chr.x << endl; if ( xmax < x + toAdd + ww ) xmax = x + toAdd + ww; @@ -1052,7 +1052,7 @@ KoTextParagLineStart *KoTextFormatterCore::koBidiReorderLine( pos++; } } - text->at( r->start + start ).startOfRun = TRUE; + text->at( r->start + start ).startOfRun = true; r = runs->next(); } diff --git a/lib/kotext/KoTextObject.cpp b/lib/kotext/KoTextObject.cpp index 7c9518ead..b8bc9dd59 100644 --- a/lib/kotext/KoTextObject.cpp +++ b/lib/kotext/KoTextObject.cpp @@ -1063,7 +1063,7 @@ KCommand * KoTextObject::setFormatCommand( KoTextCursor * cursor, KoTextFormat * //kdDebug(32500) << "KoTextObject::setFormatCommand index=" << cursor->index() << " length-1=" << cursor->parag()->length() - 1 << endl; if ( cursor && cursor->index() == cursor->parag()->length() - 1 ) { newFormat->addRef(); - cursor->parag()->string()->setFormat( cursor->index(), newFormat, TRUE ); + cursor->parag()->string()->setFormat( cursor->index(), newFormat, true ); if ( cursor->parag()->length() == 1 ) { newFormat->addRef(); cursor->parag()->setFormat( newFormat ); @@ -1751,7 +1751,7 @@ bool KoTextObject::formatMore( int count /* = 10 */, bool emitAfterFormatting /* if ( count == 0 ) { - formatTimer->start( interval, TRUE ); + formatTimer->start( interval, true ); return true; } @@ -1859,7 +1859,7 @@ bool KoTextObject::formatMore( int count /* = 10 */, bool emitAfterFormatting /* // Now let's see when we'll need to get back here. if ( m_lastFormatted ) { - formatTimer->start( interval, TRUE ); + formatTimer->start( interval, true ); #ifdef DEBUG_FORMAT_MORE kdDebug(32500) << name() << " formatMore: will have to format more. formatTimer->start with interval=" << interval << endl; #endif @@ -1899,7 +1899,7 @@ void KoTextObject::typingStarted() void KoTextObject::typingDone() { - changeIntervalTimer->start( 100, TRUE ); + changeIntervalTimer->start( 100, true ); } @@ -2173,7 +2173,7 @@ KoTextCursor KoTextObject::pasteOasisText( const TQDomElement &bodyElem, KoOasis // Now split this parag, to make room for the next paragraphs resultCursor.setParag( lastParagraph ); resultCursor.setIndex( pos ); - resultCursor.splitAndInsertEmptyParag( FALSE, TRUE ); + resultCursor.splitAndInsertEmptyParag( false, true ); removeNewline = true; // Done with first parag, remove it and exit loop diff --git a/lib/kotext/KoTextParag.cpp b/lib/kotext/KoTextParag.cpp index b3e92c9eb..28a1975ab 100644 --- a/lib/kotext/KoTextParag.cpp +++ b/lib/kotext/KoTextParag.cpp @@ -40,11 +40,11 @@ KoTextParag::KoTextParag( KoTextDocument *d, KoTextParag *pr, KoTextParag *nx, bool updateIds ) : p( pr ), n( nx ), doc( d ), m_invalid( true ), - changed( FALSE ), - fullWidth( TRUE ), - newLinesAllowed( TRUE ), // default in kotext - visible( TRUE ), //breakable( TRUE ), - movedDown( FALSE ), + changed( false ), + fullWidth( true ), + newLinesAllowed( true ), // default in kotext + visible( true ), //breakable( true ), + movedDown( false ), m_toc( false ), align( 0 ), m_lineChanged( -1 ), @@ -71,10 +71,10 @@ KoTextParag::KoTextParag( KoTextDocument *d, KoTextParag *pr, KoTextParag *nx, b if ( !n && doc ) doc->setLastParag( this ); - //firstFormat = TRUE; //// unused - //firstPProcess = TRUE; + //firstFormat = true; //// unused + //firstPProcess = true; //state = -1; - //needPreProcess = FALSE; + //needPreProcess = false; if ( p ) id = p->id + 1; @@ -187,14 +187,14 @@ void KoTextParag::insert( int index, const TQString &s ) { str->insert( index, s, formatCollection()->defaultFormat() ); invalidate( index ); - //needPreProcess = TRUE; + //needPreProcess = true; } void KoTextParag::truncate( int index ) { str->truncate( index ); insert( length(), " " ); - //needPreProcess = TRUE; + //needPreProcess = true; } void KoTextParag::remove( int index, int len ) @@ -210,7 +210,7 @@ void KoTextParag::remove( int index, int len ) } str->remove( index, len ); invalidate( 0 ); - //needPreProcess = TRUE; + //needPreProcess = true; } void KoTextParag::join( KoTextParag *s ) @@ -228,12 +228,12 @@ void KoTextParag::join( KoTextParag *s ) remove( length() - 1, 1 ); --start; } - append( s->str->toString(), TRUE ); + append( s->str->toString(), true ); for ( int i = 0; i < s->length(); ++i ) { if ( doc->useFormatCollection() ) { s->str->at( i ).format()->addRef(); - str->setFormat( i + start, s->str->at( i ).format(), TRUE ); + str->setFormat( i + start, s->str->at( i ).format(), true ); } if ( s->str->at( i ).isCustom() ) { KoTextCustomItem * item = s->str->at( i ).customItem(); @@ -257,14 +257,14 @@ void KoTextParag::join( KoTextParag *s ) invalidateCounters(); //// r.setHeight( oh ); - //needPreProcess = TRUE; + //needPreProcess = true; if ( n ) { KoTextParag *s = n; while ( s ) { s->id = s->p->id + 1; //s->state = -1; - //s->needPreProcess = TRUE; - s->changed = TRUE; + //s->needPreProcess = true; + s->changed = true; s = s->n; } } @@ -277,7 +277,7 @@ void KoTextParag::move( int &dy ) //kdDebug(32500) << "KoTextParag::move paragId=" << paragId() << " dy=" << dy << endl; if ( dy == 0 ) return; - changed = TRUE; + changed = true; r.moveBy( 0, dy ); if ( mFloatingItems ) { for ( KoTextCustomItem *i = mFloatingItems->first(); i; i = mFloatingItems->next() ) { @@ -285,16 +285,16 @@ void KoTextParag::move( int &dy ) } } //if ( p ) - // p->lastInFrame = TRUE; // TQt does this, but the loop at the end of format() calls move a lot! + // p->lastInFrame = true; // TQt does this, but the loop at the end of format() calls move a lot! - movedDown = FALSE; + movedDown = false; // do page breaks if required if ( doc && doc->isPageBreakEnabled() ) { int shift; if ( ( shift = doc->formatter()->formatVertically( doc, this ) ) ) { if ( p ) - p->setChanged( TRUE ); + p->setChanged( true ); dy += shift; } } @@ -312,10 +312,10 @@ void KoTextParag::format( int start, bool doMove ) r.moveTopLeft( TQPoint( documentX(), p ? p->r.y() + p->r.height() : documentY() ) ); //if ( p ) - // p->lastInFrame = FALSE; + // p->lastInFrame = false; - movedDown = FALSE; - bool formattedAgain = FALSE; + movedDown = false; + bool formattedAgain = false; formatAgain: r.setWidth( documentWidth() ); @@ -388,7 +388,7 @@ void KoTextParag::format( int start, bool doMove ) int shift = doc->formatter()->formatVertically( doc, this ); //kdDebug(32500) << "formatVertically returned shift=" << shift << endl; if ( shift && !formattedAgain ) { - formattedAgain = TRUE; + formattedAgain = true; goto formatAgain; } } @@ -408,12 +408,12 @@ void KoTextParag::format( int start, bool doMove ) break; } if ( !s->isFullWidth() ) - makeInvalid = TRUE; + makeInvalid = true; if ( makeInvalid ) s->invalidate( 0 ); s->move( dy ); //if ( s->lastInFrame ) - // makeInvalid = TRUE; + // makeInvalid = true; s = s->n; } } @@ -455,13 +455,13 @@ void KoTextParag::format( int start, bool doMove ) } } - //firstFormat = FALSE; //// unused + //firstFormat = false; //// unused if ( formatterWorked ) // only if it worked, i.e. we had some width to format it { m_invalid = false; } - changed = TRUE; - //#### str->setTextChanged( FALSE ); + changed = true; + //#### str->setTextChanged( false ); } int KoTextParag::lineHeightOfChar( int i, int *bl, int *y ) const @@ -581,7 +581,7 @@ void KoTextParag::setFormat( int index, int len, const KoTextFormat *_f, bool us for ( int i = 0; i < len; ++i ) { of = str->at( i + index ).format(); if ( !changed && _f->key() != of->key() ) - changed = TRUE; + changed = true; // Check things that need the textformatter to run // (e.g. not color changes) // ######## Is this test exhaustive? @@ -676,14 +676,14 @@ void KoTextParag::show() { if ( visible || !doc ) return; - visible = TRUE; + visible = true; } void KoTextParag::hide() { if ( !visible || !doc ) return; - visible = FALSE; + visible = false; } void KoTextParag::setDirection( TQChar::Direction d ) @@ -715,7 +715,7 @@ void KoTextParag::setSelection( int id, int start, int end ) sel.start = start; sel.end = end; (*mSelections)[ id ] = sel; - setChanged( TRUE, TRUE ); + setChanged( true, true ); } void KoTextParag::removeSelection( int id ) @@ -724,7 +724,7 @@ void KoTextParag::removeSelection( int id ) return; if ( mSelections ) mSelections->remove( id ); - setChanged( TRUE, TRUE ); + setChanged( true, true ); } int KoTextParag::selectionStart( int id ) const @@ -750,20 +750,20 @@ int KoTextParag::selectionEnd( int id ) const bool KoTextParag::hasSelection( int id ) const { if ( !mSelections ) - return FALSE; + return false; TQMap<int, KoTextParagSelection>::ConstIterator it = mSelections->find( id ); if ( it == mSelections->end() ) - return FALSE; + return false; return ( *it ).start != ( *it ).end || length() == 1; } bool KoTextParag::fullSelected( int id ) const { if ( !mSelections ) - return FALSE; + return false; TQMap<int, KoTextParagSelection>::ConstIterator it = mSelections->find( id ); if ( it == mSelections->end() ) - return FALSE; + return false; return ( *it ).start == 0 && ( *it ).end == str->length() - 1; } @@ -845,9 +845,9 @@ uint KoTextParag::alignment() const void KoTextParag::setFormat( KoTextFormat *fm ) { #if 0 - bool doUpdate = FALSE; + bool doUpdate = false; if (defFormat && (defFormat != formatCollection()->defaultFormat())) - doUpdate = TRUE; + doUpdate = true; #endif defFormat = formatCollection()->format( fm ); #if 0 @@ -1515,13 +1515,13 @@ void KoTextParag::paintLines( TQPainter &painter, const TQColorGroup &cg, KoText TQMemArray<int> selectionStarts( nSels ); TQMemArray<int> selectionEnds( nSels ); if ( drawSelections ) { - bool hasASelection = FALSE; + bool hasASelection = false; for ( int i = 0; i < nSels; ++i ) { if ( !hasSelection( i ) ) { selectionStarts[ i ] = -1; selectionEnds[ i ] = -1; } else { - hasASelection = TRUE; + hasASelection = true; selectionStarts[ i ] = selectionStart( i ); int end = selectionEnd( i ); if ( end == length() - 1 && n && n->hasSelection( i ) ) @@ -1530,7 +1530,7 @@ void KoTextParag::paintLines( TQPainter &painter, const TQColorGroup &cg, KoText } } if ( !hasASelection ) - drawSelections = FALSE; + drawSelections = false; } // Draw the lines! @@ -1614,7 +1614,7 @@ void KoTextParag::paintLines( TQPainter &painter, const TQColorGroup &cg, KoText // we flush when the selection state changes if ( drawSelections ) { // check if selection state changed - TODO update from TQRT - bool selectionChange = FALSE; + bool selectionChange = false; if ( drawSelections ) { for ( int j = 0; j < nSels; ++j ) { selectionChange = selectionStarts[ j ] == i+1 || selectionEnds[ j ] == i+1; @@ -1786,7 +1786,7 @@ void KoTextParag::drawParagString( TQPainter &painter, const TQString &str, int drawParagStringInternal( painter, str, start, draw_len, draw_startX_pix, lastY_pix, baseLine_pix, draw_bw, - h_pix, FALSE /*drawSelections*/, + h_pix, false /*drawSelections*/, format, selectionStarts, selectionEnds, cg, rightToLeft, line, zh, true ); painter.restore(); @@ -2516,7 +2516,7 @@ void KoTextParag::drawFontEffects( TQPainter * p, KoTextFormat *format, KoTextZo p->drawLine( startX, y, startX + bw, y ); p->restore(); if ( font.underline() ) { // can this happen? - font.setUnderline( FALSE ); + font.setUnderline( false ); p->setFont( font ); } } @@ -2553,7 +2553,7 @@ void KoTextParag::drawFontEffects( TQPainter * p, KoTextFormat *format, KoTextZo p->drawLine( startX, y, startX + bw, y ); p->restore(); - font.setUnderline( FALSE ); + font.setUnderline( false ); p->setFont( font ); } else if ( format->waveUnderline() ) @@ -2586,7 +2586,7 @@ void KoTextParag::drawFontEffects( TQPainter * p, KoTextFormat *format, KoTextZo anc=acos(1.0-2*(static_cast<double>((startX+bw)%offset)/static_cast<double>(offset)))/3.1415*180; p->drawArc( zigzag_x, y, offset, offset, 180*16, -tqRound(pos*anc*16) ); p->restore(); - font.setUnderline( FALSE ); + font.setUnderline( false ); p->setFont( font ); } @@ -2626,7 +2626,7 @@ void KoTextParag::drawFontEffects( TQPainter * p, KoTextFormat *format, KoTextZo y -= static_cast<int>(5*dimd); p->drawLine( startX, y, startX + bw, y ); p->restore(); - font.setStrikeOut( FALSE ); + font.setStrikeOut( false ); p->setFont( font ); } else if ( format->strikeOutType() == KoTextFormat::S_DOUBLE ) @@ -2660,7 +2660,7 @@ void KoTextParag::drawFontEffects( TQPainter * p, KoTextFormat *format, KoTextZo y -= static_cast<int>(2*dimd); p->drawLine( startX, y, startX + bw, y); p->restore(); - font.setStrikeOut( FALSE ); + font.setStrikeOut( false ); p->setFont( font ); } @@ -2840,7 +2840,7 @@ void KoTextParag::loadOasisSpan( const TQDomElement& parent, KoOasisContext& con KoTextFormat f; f.load( context ); //kdDebug(32500) << "loadOasisSpan: applying formatting from " << pos << " to " << pos+length << "\n format=" << f.key() << endl; - setFormat( pos, length, document()->formatCollection()->format( &f ), TRUE ); + setFormat( pos, length, document()->formatCollection()->format( &f ), true ); pos += length; } context.styleStack().restore(); @@ -2903,7 +2903,7 @@ void KoTextParag::loadOasis( const TQDomElement& parent, KoOasisContext& context // Apply default format to trailing space const int len = str->length(); Q_ASSERT( len >= 1 ); - setFormat( len - 1, 1, paragFormat(), TRUE ); + setFormat( len - 1, 1, paragFormat(), true ); setChanged( true ); invalidate( 0 ); diff --git a/lib/kotext/KoTextParag.h b/lib/kotext/KoTextParag.h index c89582c5e..89f5cba66 100644 --- a/lib/kotext/KoTextParag.h +++ b/lib/kotext/KoTextParag.h @@ -52,7 +52,7 @@ class KOTEXT_EXPORT KoTextParag friend class KoTextCursor; public: - KoTextParag( KoTextDocument *d, KoTextParag *pr = 0, KoTextParag *nx = 0, bool updateIds = TRUE ); + KoTextParag( KoTextDocument *d, KoTextParag *pr = 0, KoTextParag *nx = 0, bool updateIds = true ); virtual ~KoTextParag(); KoTextString *string() const; @@ -82,12 +82,12 @@ public: void setNext( KoTextParag *s ); void insert( int index, const TQString &s ); - void append( const TQString &s, bool reallyAtEnd = FALSE ); + void append( const TQString &s, bool reallyAtEnd = false ); void truncate( int index ); void remove( int index, int len ); void move( int &dy ); - void format( int start = -1, bool doMove = TRUE ); + void format( int start = -1, bool doMove = true ); /// Call this to ensure that format() will be called on this paragraph later on void invalidate( int chr /*ignored*/ = 0 ); @@ -96,7 +96,7 @@ public: /// 'changed' tells the painting code what it needs to paint bool hasChanged() const; - void setChanged( bool b, bool recursive = FALSE ); + void setChanged( bool b, bool recursive = false ); short int lineChanged(); // first line that has been changed. void setLineChanged( short int line ); @@ -125,7 +125,7 @@ public: TQMap<int, KoTextParagLineStart*> &lineStartList(); - void setFormat( int index, int len, const KoTextFormat *f, bool useCollection = TRUE, int flags = -1 ); + void setFormat( int index, int len, const KoTextFormat *f, bool useCollection = true, int flags = -1 ); void setAlignment( uint a ); void setAlignmentDirect( uint a ) { align = a; } @@ -475,7 +475,7 @@ inline KoTextParag *KoTextParag::next() const inline bool KoTextParag::hasAnySelection() const { - return mSelections ? !selections().isEmpty() : FALSE; + return mSelections ? !selections().isEmpty() : false; } /*inline void KoTextParag::setEndState( int s ) diff --git a/lib/kotext/KoTextView.cpp b/lib/kotext/KoTextView.cpp index 86f87a54d..6e6d55db4 100644 --- a/lib/kotext/KoTextView.cpp +++ b/lib/kotext/KoTextView.cpp @@ -92,11 +92,11 @@ KoTextView::KoTextView( KoTextObject *textobj ) m_textobj->formatMore( 2 ); - blinkCursorVisible = FALSE; - inDoubleClick = FALSE; - mightStartDrag = FALSE; - possibleTripleClick = FALSE; - afterTripleClick = FALSE; + blinkCursorVisible = false; + inDoubleClick = false; + mightStartDrag = false; + possibleTripleClick = false; + afterTripleClick = false; m_currentFormat = 0; m_variablePosition =-1; m_overwriteMode = false; @@ -165,30 +165,30 @@ void KoTextView::handleKeyPressEvent( TQKeyEvent * e, TQWidget *widget, const TQ { textObject()->typingStarted(); - /* bool selChanged = FALSE; + /* bool selChanged = false; for ( int i = 1; i < textDocument()->numSelections(); ++i ) selChanged = textDocument()->removeSelection( i ) || selChanged; if ( selChanged ) { - // m_cursor->parag()->document()->nextDoubleBuffered = TRUE; ######## we need that only if we have nested items/documents + // m_cursor->parag()->document()->nextDoubleBuffered = true; ######## we need that only if we have nested items/documents textFrameSet()->selectionChangedNotify(); }*/ - bool clearUndoRedoInfo = TRUE; + bool clearUndoRedoInfo = true; if ( TDEShortcut( KKey( e ) ) == TDEStdAccel::deleteWordBack() ) { if ( m_cursor->parag()->string()->isRightToLeft() ) deleteWordRight(); else deleteWordLeft(); - clearUndoRedoInfo = TRUE; + clearUndoRedoInfo = true; } else if ( TDEShortcut( KKey( e ) ) == TDEStdAccel::deleteWordForward() ) { if ( m_cursor->parag()->string()->isRightToLeft() ) deleteWordLeft(); else deleteWordRight(); - clearUndoRedoInfo = TRUE; + clearUndoRedoInfo = true; } else switch ( e->key() ) { @@ -233,7 +233,7 @@ void KoTextView::handleKeyPressEvent( TQKeyEvent * e, TQWidget *widget, const TQ { if ( textObject()->hasSelection() ) textObject()->removeSelectedText( m_cursor ); - clearUndoRedoInfo = FALSE; + clearUndoRedoInfo = false; textObject()->doKeyboardAction( m_cursor, m_currentFormat, KoTextObject::ActionReturn ); Q_ASSERT( m_cursor->parag()->prev() ); if ( m_cursor->parag()->prev() ) @@ -250,7 +250,7 @@ void KoTextView::handleKeyPressEvent( TQKeyEvent * e, TQWidget *widget, const TQ textObject()->doKeyboardAction( m_cursor, m_currentFormat, KoTextObject::ActionDelete ); - clearUndoRedoInfo = FALSE; + clearUndoRedoInfo = false; break; case Key_Backtab: if (e->state() & ShiftButton && m_cursor->parag() && m_cursor->atParagStart() && m_cursor->parag()->counter() && textDecreaseIndent()) @@ -263,7 +263,7 @@ void KoTextView::handleKeyPressEvent( TQKeyEvent * e, TQWidget *widget, const TQ } textObject()->doKeyboardAction( m_cursor, m_currentFormat, KoTextObject::ActionBackspace ); - clearUndoRedoInfo = FALSE; + clearUndoRedoInfo = false; break; case Key_F16: // Copy key on Sun keyboards emit copy(); @@ -311,7 +311,7 @@ void KoTextView::handleKeyPressEvent( TQKeyEvent * e, TQWidget *widget, const TQ if ( e->text().length() && ( !e->ascii() || e->ascii() >= 32 ) || ( e->text() == "\t" && !( e->state() & ControlButton ) ) ) { - clearUndoRedoInfo = FALSE; + clearUndoRedoInfo = false; TQString text = e->text(); if ( d->m_backSpeller ) { @@ -382,13 +382,13 @@ void KoTextView::handleKeyPressEvent( TQKeyEvent * e, TQWidget *widget, const TQ insertNonbreakingSpace(); break; default: - clearUndoRedoInfo = FALSE; + clearUndoRedoInfo = false; break; } } else // e.g. just Key_Shift -> don't do anything (#129481) { - clearUndoRedoInfo = FALSE; + clearUndoRedoInfo = false; } } break; @@ -656,7 +656,7 @@ void KoTextView::extendParagraphSelection( const TQPoint& iPoint ) KoTextCursor oldCursor = *m_cursor; placeCursor( iPoint ); - bool redraw = FALSE; + bool redraw = false; if ( textDocument()->hasSelection( KoTextDocument::Standard ) ) { redraw = textDocument()->setSelectionEnd( KoTextDocument::Standard, m_cursor ); @@ -689,7 +689,7 @@ TQString KoTextView::wordUnderCursor( const KoTextCursor& cursor ) bool KoTextView::handleMousePressEvent( TQMouseEvent *e, const TQPoint &iPoint, bool canStartDrag, bool insertDirectCursor ) { bool addParag = false; - mightStartDrag = FALSE; + mightStartDrag = false; hideCursor(); if (possibleTripleClick) @@ -716,14 +716,14 @@ bool KoTextView::handleMousePressEvent( TQMouseEvent *e, const TQPoint &iPoint, KoTextDocument * textdoc = textDocument(); if ( canStartDrag && textdoc->inSelection( KoTextDocument::Standard, iPoint ) ) { - mightStartDrag = TRUE; + mightStartDrag = true; m_textobj->emitShowCursor(); - dragStartTimer->start( TQApplication::startDragTime(), TRUE ); + dragStartTimer->start( TQApplication::startDragTime(), true ); dragStartPos = e->pos(); return addParag; } - bool redraw = FALSE; + bool redraw = false; if ( textdoc->hasSelection( KoTextDocument::Standard ) ) { if ( !( e->state() & ShiftButton ) ) { redraw = textdoc->removeSelection( KoTextDocument::Standard ); @@ -778,7 +778,7 @@ void KoTextView::handleMouseMoveEvent( TQMouseEvent*, const TQPoint& iPoint ) *m_cursor = oldCursor; } - bool redraw = FALSE; + bool redraw = false; if ( textDocument()->hasSelection( KoTextDocument::Standard ) ) redraw = textDocument()->setSelectionEnd( KoTextDocument::Standard, m_cursor ) || redraw; else // it may be that the initial click was out of the frame @@ -795,7 +795,7 @@ void KoTextView::handleMouseReleaseEvent() if ( dragStartTimer->isActive() ) dragStartTimer->stop(); if ( mightStartDrag ) { - textObject()->selectAll( FALSE ); + textObject()->selectAll( false ); mightStartDrag = false; } else @@ -813,7 +813,7 @@ void KoTextView::handleMouseReleaseEvent() TQApplication::clipboard()->setSelectionMode( false ); } - inDoubleClick = FALSE; + inDoubleClick = false; m_textobj->emitShowCursor(); } @@ -827,7 +827,7 @@ void KoTextView::handleMouseDoubleClickEvent( TQMouseEvent*ev, const TQPoint& i return; } - inDoubleClick = TRUE; + inDoubleClick = true; *m_cursor = selectWordUnderCursor( *m_cursor ); textObject()->selectionChangedNotify(); // Copy the selection. @@ -853,7 +853,7 @@ void KoTextView::handleMouseTripleClickEvent( TQMouseEvent*ev, const TQPoint& /* return; } afterTripleClick= true; - inDoubleClick = FALSE; + inDoubleClick = false; *m_cursor = selectParagUnderCursor( *m_cursor ); TQTimer::singleShot(TQApplication::doubleClickInterval(),this,TQ_SLOT(afterTripleClickTimeout())); } @@ -888,7 +888,7 @@ bool KoTextView::insertParagraph(const TQPoint &pos) for (int i = 0; i < nbParag ;i++) { KoTextParag *s=textDocument()->createParag( textDocument(), last ); - s->setFormat( 0, 1, f, TRUE ); + s->setFormat( 0, 1, f, true ); if ( style ) s->setStyle( style ); s->setCounter( counter ); @@ -978,8 +978,8 @@ KCommand* KoTextView::setFormatCommand( const KoTextFormat * newFormat, int flag void KoTextView::dragStarted() { - mightStartDrag = FALSE; - inDoubleClick = FALSE; + mightStartDrag = false; + inDoubleClick = false; } void KoTextView::applyStyle( const KoParagStyle * style ) diff --git a/lib/kwmf/kowmfpaint.h b/lib/kwmf/kowmfpaint.h index 58b27b186..6622a3980 100644 --- a/lib/kwmf/kowmfpaint.h +++ b/lib/kwmf/kowmfpaint.h @@ -99,12 +99,12 @@ private: void drawPie( int x, int y, int w, int h, int a, int alen ); void drawChord( int x, int y, int w, int h, int a, int alen ); void drawPolyline( const TQPointArray& pa ); - void drawPolygon( const TQPointArray& pa, bool winding=FALSE ); + void drawPolygon( const TQPointArray& pa, bool winding=false ); /** * drawPolyPolygon draw the XOR of a list of polygons * listPa : list of polygons */ - void drawPolyPolygon( TQPtrList<TQPointArray>& listPa, bool winding=FALSE ); + void drawPolyPolygon( TQPtrList<TQPointArray>& listPa, bool winding=false ); void drawImage( int x, int y, const TQImage &, int sx = 0, int sy = 0, int sw = -1, int sh = -1 ); // Text drawing functions @@ -113,7 +113,7 @@ private: void drawText( int x, int y, int w, int h, int flags, const TQString &s, double rotation ); // matrix transformation : only used in some bitmap manipulation - void setWorldMatrix( const TQWMatrix &, bool combine=FALSE ); + void setWorldMatrix( const TQWMatrix &, bool combine=false ); private: TQPainter mPainter; diff --git a/lib/kwmf/kowmfread.h b/lib/kwmf/kowmfread.h index ca1183b11..b4b7b92bf 100644 --- a/lib/kwmf/kowmfread.h +++ b/lib/kwmf/kowmfread.h @@ -131,10 +131,10 @@ public: virtual void drawPie( int x, int y, int w, int h, int a, int alen ) = 0; virtual void drawChord( int x, int y, int w, int h, int a, int alen ) = 0; virtual void drawPolyline( const TQPointArray &pa ) = 0; - virtual void drawPolygon( const TQPointArray &pa, bool winding=FALSE ) = 0; + virtual void drawPolygon( const TQPointArray &pa, bool winding=false ) = 0; // drawPolyPolygon draw the XOR of a list of polygons // listPa : list of polygons - virtual void drawPolyPolygon( TQPtrList<TQPointArray>& listPa, bool winding=FALSE ) = 0; + virtual void drawPolyPolygon( TQPtrList<TQPointArray>& listPa, bool winding=false ) = 0; virtual void drawImage( int x, int y, const TQImage &, int sx = 0, int sy = 0, int sw = -1, int sh = -1 ) = 0; // Text drawing functions @@ -143,7 +143,7 @@ public: virtual void drawText( int x, int y, int w, int h, int flags, const TQString &s, double rotation ) = 0; // matrix transformation : only used for bitmap manipulation - virtual void setWorldMatrix( const TQWMatrix &, bool combine=FALSE ) = 0; + virtual void setWorldMatrix( const TQWMatrix &, bool combine=false ) = 0; private: KoWmfReadPrivate *mKwmf; diff --git a/lib/kwmf/kowmfwrite.h b/lib/kwmf/kowmfwrite.h index 04ce2c3a2..6972191ba 100644 --- a/lib/kwmf/kowmfwrite.h +++ b/lib/kwmf/kowmfwrite.h @@ -104,10 +104,10 @@ public: void drawPie( int left, int top, int width, int height, int a, int alen ); void drawChord( int left, int top, int width, int height, int a, int alen ); void drawPolyline( const TQPointArray& pa ); - void drawPolygon( const TQPointArray& pa, bool winding=FALSE ); + void drawPolygon( const TQPointArray& pa, bool winding=false ); // drawPolyPolygon draw the XOR of a list of polygons // listPa : list of polygons - void drawPolyPolygon( TQPtrList<TQPointArray>& listPa, bool winding=FALSE ); + void drawPolyPolygon( TQPtrList<TQPointArray>& listPa, bool winding=false ); void drawImage( int left, int top, const TQImage &, int sx = 0, int sy = 0, int sw = -1, int sh = -1 ); // Text drawing functions |