diff options
Diffstat (limited to 'lib/kotext/KoTextParag.cpp')
-rw-r--r-- | lib/kotext/KoTextParag.cpp | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/lib/kotext/KoTextParag.cpp b/lib/kotext/KoTextParag.cpp index a081dfda..aba58abc 100644 --- a/lib/kotext/KoTextParag.cpp +++ b/lib/kotext/KoTextParag.cpp @@ -154,7 +154,7 @@ void KoTextParag::setPrev( KoTextParag *s ) doc->setFirstParag( this ); } -void KoTextParag::tqinvalidate( int /*chr, ignored*/ ) +void KoTextParag::invalidate( int /*chr, ignored*/ ) { m_invalid = true; #if 0 @@ -186,7 +186,7 @@ void KoTextParag::setLineChanged( short int line ) void KoTextParag::insert( int index, const TQString &s ) { str->insert( index, s, formatCollection()->defaultFormat() ); - tqinvalidate( index ); + invalidate( index ); //needPreProcess = TRUE; } @@ -209,7 +209,7 @@ void KoTextParag::remove( int index, int len ) } } str->remove( index, len ); - tqinvalidate( 0 ); + invalidate( 0 ); //needPreProcess = TRUE; } @@ -252,7 +252,7 @@ void KoTextParag::join( KoTextParag *s ) extraData()->join( s->extraData() ); }*/ delete s; - tqinvalidate( 0 ); + invalidate( 0 ); //// kotext invalidateCounters(); //// @@ -403,14 +403,14 @@ void KoTextParag::format( int start, bool doMove ) bool makeInvalid = false; //p && p->lastInFrame; //kdDebug(32500) << "might move of dy=" << dy << ". previous's lastInFrame (=makeInvalid): " << makeInvalid << endl; while ( s && dy ) { - if ( s->movedDown ) { // (not in TQRT) : moved down -> tqinvalidate and stop moving down - s->tqinvalidate( 0 ); // (there is no point in moving down a parag that has a frame break...) + if ( s->movedDown ) { // (not in TQRT) : moved down -> invalidate and stop moving down + s->invalidate( 0 ); // (there is no point in moving down a parag that has a frame break...) break; } if ( !s->isFullWidth() ) makeInvalid = TRUE; if ( makeInvalid ) - s->tqinvalidate( 0 ); + s->invalidate( 0 ); s->move( dy ); //if ( s->lastInFrame ) // makeInvalid = TRUE; @@ -600,7 +600,7 @@ void KoTextParag::setFormat( int index, int len, const KoTextFormat *_f, bool us _f->shadowDistanceX() != of->shadowDistanceX() || _f->shadowDistanceY() != of->shadowDistanceY() ) ) { - tqinvalidate( 0 ); + invalidate( 0 ); } if ( flags == -1 || flags == KoTextFormat::Format || !fc ) { #ifdef DEBUG_COLLECTION @@ -690,7 +690,7 @@ void KoTextParag::setDirection( TQChar::Direction d ) { if ( str && str->direction() != d ) { str->setDirection( d ); - tqinvalidate( 0 ); + invalidate( 0 ); //// kotext m_layout.direction = d; invalidateCounters(); // #47178 @@ -837,7 +837,7 @@ void KoTextParag::lineInfo( int l, int &y, int &h, int &bl ) const bl = ( *it )->baseLine; } -uint KoTextParag::tqalignment() const +uint KoTextParag::alignment() const { return align; } @@ -946,15 +946,15 @@ void KoTextParag::setMargin( TQStyleSheetItem::Margin m, double _i ) //kdDebug(32500) << "KoTextParag::setMargin " << m << " margin " << _i << endl; m_layout.margins[m] = _i; if ( m == TQStyleSheetItem::MarginTop && prev() ) - prev()->tqinvalidate(0); // for top margin (post-1.1: remove this, not necessary anymore) - tqinvalidate(0); + prev()->invalidate(0); // for top margin (post-1.1: remove this, not necessary anymore) + invalidate(0); } void KoTextParag::setMargins( const double * margins ) { for ( int i = 0 ; i < 5 ; ++i ) m_layout.margins[i] = margins[i]; - tqinvalidate(0); + invalidate(0); } void KoTextParag::setAlign( int align ) @@ -962,50 +962,50 @@ void KoTextParag::setAlign( int align ) Q_ASSERT( align <= TQt::AlignJustify ); align &= TQt::AlignHorizontal_Mask; setAlignment( align ); - m_layout.tqalignment = align; + m_layout.alignment = align; } int KoTextParag::resolveAlignment() const { - if ( (int)m_layout.tqalignment == TQt::AlignAuto ) + if ( (int)m_layout.alignment == TQt::AlignAuto ) return str->isRightToLeft() ? TQt::AlignRight : TQt::AlignLeft; - return m_layout.tqalignment; + return m_layout.alignment; } void KoTextParag::setLineSpacing( double _i ) { m_layout.setLineSpacingValue(_i); - tqinvalidate(0); + invalidate(0); } void KoTextParag::setLineSpacingType( KoParagLayout::SpacingType _type ) { m_layout.lineSpacingType = _type; - tqinvalidate(0); + invalidate(0); } void KoTextParag::setTopBorder( const KoBorder & _brd ) { m_layout.topBorder = _brd; - tqinvalidate(0); + invalidate(0); } void KoTextParag::setBottomBorder( const KoBorder & _brd ) { m_layout.bottomBorder = _brd; - tqinvalidate(0); + invalidate(0); } void KoTextParag::setJoinBorder( bool join ) { m_layout.joinBorder = join; - tqinvalidate(0); + invalidate(0); } void KoTextParag::setBackgroundColor ( const TQColor& color ) { m_layout.backgroundColor = color; - tqinvalidate(0); + invalidate(0); } void KoTextParag::setNoCounter() @@ -1060,17 +1060,17 @@ void KoTextParag::invalidateCounters() { // Invalidate this paragraph and all the following ones // (Numbering may have changed) - tqinvalidate( 0 ); + invalidate( 0 ); if ( m_layout.counter ) - m_layout.counter->tqinvalidate(); + m_layout.counter->invalidate(); KoTextParag *s = next(); // #### Possible optimization: since any invalidation propagates down, // it's enough to stop at the first paragraph with an already-invalidated counter, isn't it? - // This is only true if nobody else calls counter->tqinvalidate... + // This is only true if nobody else calls counter->invalidate... while ( s ) { if ( s->m_layout.counter ) - s->m_layout.counter->tqinvalidate(); - s->tqinvalidate( 0 ); + s->m_layout.counter->invalidate(); + s->invalidate( 0 ); s = s->next(); } } @@ -1290,7 +1290,7 @@ int KoTextParag::rightMargin() const KoTextZoomHandler * zh = textDocument()->formattingZoomHandler(); int cw=0; if( m_layout.counter && str->isRightToLeft() && - (( m_layout.counter->tqalignment() == TQt::AlignRight ) || ( m_layout.counter->tqalignment() == TQt::AlignAuto ))) + (( m_layout.counter->alignment() == TQt::AlignRight ) || ( m_layout.counter->alignment() == TQt::AlignAuto ))) cw = counterWidth(); return zh->ptToLayoutUnitPixX( @@ -1603,7 +1603,7 @@ void KoTextParag::paintLines( TQPainter &painter, const TQColorGroup &cg, KoText // we flush before custom items flush = flush || nextchr->isCustom(); // when painting justified we flush on spaces - if ((tqalignment() & TQt::AlignJustify) == TQt::AlignJustify ) + if ((alignment() & TQt::AlignJustify) == TQt::AlignJustify ) //flush = flush || TQTextFormatter::isBreakable( str, i ); flush = flush || chr->whiteSpace; // when underlining or striking "word by word" we flush before/after spaces @@ -2104,7 +2104,7 @@ void KoTextParag::setTabList( const KoTabulatorList &tabList ) { setTabArray( 0 ); } - tqinvalidate( 0 ); + invalidate( 0 ); } /** "Reimplemented" (compared to nextTabDefault) to implement non-left-aligned tabs */ @@ -2244,7 +2244,7 @@ void KoTextParag::setParagLayout( const KoParagLayout & tqlayout, int flags, int { //kdDebug(32500) << "KoTextParag::setParagLayout flags=" << flags << endl; if ( flags & KoParagLayout::Alignment ) - setAlign( tqlayout.tqalignment ); + setAlign( tqlayout.alignment ); if ( flags & KoParagLayout::Margins ) { if ( marginIndex == -1 ) setMargins( tqlayout.margins ); @@ -2290,7 +2290,7 @@ void KoTextParag::setCustomItem( int index, KoTextCustomItem * custom, KoTextFor //addCustomItem(); document()->registerCustomItem( custom, this ); custom->recalc(); // calc value (e.g. for variables) and set initial size - tqinvalidate( 0 ); + invalidate( 0 ); setChanged( true ); } @@ -2349,7 +2349,7 @@ void KoTextParag::printRTDebug( int info ) static const char * const s_align[] = { "Auto", "Left", "Right", "ERROR", "HCenter", "ERR", "ERR", "ERR", "Justify", }; static const char * const s_linespacing[] = { "Single", "1.5", "2", "custom", "atLeast", "Multiple", "Fixed" }; static const char * const s_dir[] = { "DirL", "DirR", "DirEN", "DirES", "DirET", "DirAN", "DirCS", "DirB", "DirS", "DirWS", "DirON", "DirLRE", "DirLRO", "DirAL", "DirRLE", "DirRLO", "DirPDF", "DirNSM", "DirBN" }; - kdDebug(32500) << " align: " << s_align[tqalignment()] << " resolveAlignment: " << s_align[resolveAlignment()] + kdDebug(32500) << " align: " << s_align[alignment()] << " resolveAlignment: " << s_align[resolveAlignment()] << " isRTL:" << str->isRightToLeft() << " dir: " << s_dir[direction()] << endl; TQRect pixr = pixelRect( textDocument()->paintingZoomHandler() ); @@ -2906,7 +2906,7 @@ void KoTextParag::loadOasis( const TQDomElement& parent, KoOasisContext& context setFormat( len - 1, 1, paragFormat(), TRUE ); setChanged( true ); - tqinvalidate( 0 ); + invalidate( 0 ); } void KoTextParag::saveOasis( KoXmlWriter& writer, KoSavingContext& context, |