summaryrefslogtreecommitdiffstats
path: root/lib/kotext/KoTextView.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kotext/KoTextView.cpp')
-rw-r--r--lib/kotext/KoTextView.cpp58
1 files changed, 29 insertions, 29 deletions
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 )