diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-19 11:38:41 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-19 11:38:41 -0600 |
commit | f0de9e167e289ab7dc33e57f077c1f04ec7c68c8 (patch) | |
tree | 1fc538e179833e62caec21956bfe47a252be5a72 /lib/kotext | |
parent | 11191ef0b9908604d1d7aaca382b011ef22c454c (diff) | |
download | koffice-f0de9e167e289ab7dc33e57f077c1f04ec7c68c8.tar.gz koffice-f0de9e167e289ab7dc33e57f077c1f04ec7c68c8.zip |
Remove additional unneeded tq method conversions
Diffstat (limited to 'lib/kotext')
38 files changed, 262 insertions, 262 deletions
diff --git a/lib/kotext/IsoDuration.h b/lib/kotext/IsoDuration.h index c0f8fd6f..ee1cdfb9 100644 --- a/lib/kotext/IsoDuration.h +++ b/lib/kotext/IsoDuration.h @@ -31,7 +31,7 @@ static TQString minutesToISODuration( int mn ) { bool neg = mn < 0; // PT == period of time - see ISO8601 - TQString str = TQString::fromLatin1( "PT00H%1M00S" ).tqarg( TQABS( mn ) ); + TQString str = TQString::fromLatin1( "PT00H%1M00S" ).arg( TQABS( mn ) ); if ( neg ) str.prepend( '-' ); return str; @@ -41,7 +41,7 @@ static TQString daysToISODuration( int days ) { bool neg = days < 0; // P == period, time is ommitted - see ISO8601 - TQString str = TQString::fromLatin1( "P%1D" ).tqarg( TQABS( days ) ); + TQString str = TQString::fromLatin1( "P%1D" ).arg( TQABS( days ) ); if ( neg ) str.prepend( '-' ); return str; diff --git a/lib/kotext/KFontDialog_local.cpp b/lib/kotext/KFontDialog_local.cpp index edefb8e5..393488c9 100644 --- a/lib/kotext/KFontDialog_local.cpp +++ b/lib/kotext/KFontDialog_local.cpp @@ -654,7 +654,7 @@ void KFontChooser_local::setupDisplay() void KFontChooser_local::getFontList( TQStringList &list, uint fontListCriteria) { TQFontDatabase dbase; - TQStringList lstSys(dbase.tqfamilies()); + TQStringList lstSys(dbase.families()); // if we have criteria; then check fonts before adding if (fontListCriteria) diff --git a/lib/kotext/KoAutoFormat.cpp b/lib/kotext/KoAutoFormat.cpp index f2c88bcc..7ca6f1a7 100644 --- a/lib/kotext/KoAutoFormat.cpp +++ b/lib/kotext/KoAutoFormat.cpp @@ -952,7 +952,7 @@ bool KoAutoFormat::doCompletion( KoTextCursor* textEditCursor, KoTextParag *para TQChar ch = new_wordlist.first().at(i); for (TQStringList::ConstIterator it = new_wordlist.begin(); it != new_wordlist.end(); ++it ) { - if ( (*it).tqat(i).lower() != ch.lower() ) + if ( (*it).at(i).lower() != ch.lower() ) { word = (*it).left(i); //the completion word is truncated here //kdDebug() << "set the word completion to:" << word << endl; @@ -1778,7 +1778,7 @@ void KoAutoFormat::doAutoDetectUrl( KoTextCursor *textEditCursor, KoTextParag *p txtObj->insert( textEditCursor, lastFormat, KoTextObject::customItemChar(), i18n("Insert Variable"), KoTextDocument::HighlightSelection, KoTextObject::DefaultInsertFlags, customItemsMap ); var->recalc(); - parag->tqinvalidate(0); + parag->invalidate(0); parag->setChanged( true ); // adjust index @@ -1819,7 +1819,7 @@ void KoAutoFormat::doAutoIncludeUpperUpper(KoTextCursor* /*textEditCursor*/, KoT break; word.append( ch ); } - if( word.length() > 2 && word.left(2)==word.left(2).upper() && word.tqat(3)!=word.tqat(3).upper() ) + if( word.length() > 2 && word.left(2)==word.left(2).upper() && word.at(3)!=word.at(3).upper() ) { if ( m_twoUpperLetterException.findIndex(word )==-1) m_twoUpperLetterException.append( word); @@ -1856,7 +1856,7 @@ void KoAutoFormat::doAutoIncludeAbbreviation(KoTextCursor* /*textEditCursor*/, K break; wordAfter.append( ch ); } - if( word.length()>1 && !wordAfter.isEmpty() && wordAfter.tqat(0)==wordAfter.tqat(0).lower()) + if( word.length()>1 && !wordAfter.isEmpty() && wordAfter.at(0)==wordAfter.at(0).lower()) { if ( m_upperCaseExceptions.findIndex(word )==-1) m_upperCaseExceptions.append( word ); @@ -2158,14 +2158,14 @@ KCommand *KoAutoFormat::doCapitalizeNameOfDays( KoTextCursor* textEditCursor, Ko TQString replaceStr= m_cacheNameOfDays[pos]; int start = index - replaceStr.length(); int length = replaceStr.length(); - if( word.tqat(0).isLetter() && word.tqat(0)==word.tqat(0).lower() ) + if( word.at(0).isLetter() && word.at(0)==word.at(0).lower() ) { KoTextCursor cursor( parag->document() ); cursor.setParag( parag ); cursor.setIndex( start ); textdoc->setSelectionStart( KoTextDocument::HighlightSelection, &cursor ); cursor.setIndex( start + length ); - TQString replacement = replaceStr.tqat(0).upper() + replaceStr.right( length-1 ); + TQString replacement = replaceStr.at(0).upper() + replaceStr.right( length-1 ); textdoc->setSelectionEnd( KoTextDocument::HighlightSelection, &cursor ); TQString cmdName=i18n("Capitalize Name of Days"); KCommand *cmd =txtObj->replaceSelectionCommand( textEditCursor, replacement, diff --git a/lib/kotext/KoAutoFormatDia.cpp b/lib/kotext/KoAutoFormatDia.cpp index ddcfb1ae..74b35908 100644 --- a/lib/kotext/KoAutoFormatDia.cpp +++ b/lib/kotext/KoAutoFormatDia.cpp @@ -286,7 +286,7 @@ void KoAutoFormatDia::setupTab1() cbAutoReplaceNumber=new TQCheckBox( tab1 ); cbAutoReplaceNumber->setText( i18n( "We add the 1/2 char at the %1", "Re&place 1/2... with %1..." ) - .tqarg( TQString( "�" ) ) ); + .arg( TQString( "�" ) ) ); TQWhatsThis::add( cbAutoReplaceNumber, i18n( "Most standard fraction notations will be converted when available" ) ); diff --git a/lib/kotext/KoBgSpellCheck.cpp b/lib/kotext/KoBgSpellCheck.cpp index f3b8928b..612f0be7 100644 --- a/lib/kotext/KoBgSpellCheck.cpp +++ b/lib/kotext/KoBgSpellCheck.cpp @@ -135,7 +135,7 @@ void KoBgSpellCheck::spellCheckerMisspelling( const TQString &old, int pos ) #endif markWord( parag, pos, old.length(), true ); // Repaint immediately, since the checking is timer-based (slow), it looks - // slow (chunky) if we only tqrepaint once a paragraph is completely done. + // slow (chunky) if we only repaint once a paragraph is completely done. parag->document()->emitRepaintChanged(); if ( d->startupChecking && d->marked > delayAfterMarked ) { @@ -171,7 +171,7 @@ void KoBgSpellCheck::markWord( KoTextParag* parag, int pos, int length, bool mis #endif parag->setFormat( pos, length, &format, true, KoTextFormat::Misspelled ); parag->setChanged( true ); - // don't tqrepaint here, in the slotParagraphModified case we want to tqrepaint only once at the end + // don't repaint here, in the slotParagraphModified case we want to repaint only once at the end } void KoBgSpellCheck::checkerContinue() diff --git a/lib/kotext/KoCommentDia.cpp b/lib/kotext/KoCommentDia.cpp index be5278e1..9882e6de 100644 --- a/lib/kotext/KoCommentDia.cpp +++ b/lib/kotext/KoCommentDia.cpp @@ -66,7 +66,7 @@ void KoCommentDia::slotAddAuthorName() { TQString date = KGlobal::locale()->formatDate( TQDate::currentDate() ); TQString time = KGlobal::locale()->formatTime( TQTime::currentTime() ); - TQString result = TQString("--------%1 ,%2, %3------\n").tqarg(authorName).tqarg(date).tqarg(time); + TQString result = TQString("--------%1 ,%2, %3------\n").arg(authorName).arg(date).arg(time); m_multiLine->insertLine( result, m_multiLine->numLines() ); } diff --git a/lib/kotext/KoComplexText.cpp b/lib/kotext/KoComplexText.cpp index 981ec506..96ff88e1 100644 --- a/lib/kotext/KoComplexText.cpp +++ b/lib/kotext/KoComplexText.cpp @@ -65,8 +65,8 @@ KoBidiContext::~KoBidiContext() delete parent; } -static TQChar *tqshapeBuffer = 0; -static int tqshapeBufSize = 0; +static TQChar *shapeBuffer = 0; +static int shapeBufSize = 0; /* Arabic shaping obeys a number of rules according to the joining classes (see Unicode book, section on @@ -103,7 +103,7 @@ static int tqshapeBufSize = 0; */ /* - Two small helper functions for arabic shaping. They get the next tqshape causing character on either + Two small helper functions for arabic shaping. They get the next shape causing character on either side of the char in question. Implements rule R1. leftChar() returns true if the char to the left is a left join-causing char @@ -159,7 +159,7 @@ KoComplexText::Shape KoComplexText::glyphVariant( const TQString &str, int pos) switch ( joining ) { case TQChar::OtherJoining: case TQChar::Center: - // these don't change tqshape + // these don't change shape return XIsolated; case TQChar::Right: // only rule R2 applies @@ -204,7 +204,7 @@ KoComplexText::Shape KoComplexText::glyphVariantLogical( const TQString &str, in switch ( joining ) { case TQChar::OtherJoining: case TQChar::Center: - // these don't change tqshape + // these don't change shape return XIsolated; case TQChar::Right: // only rule R2 applies @@ -233,7 +233,7 @@ KoComplexText::Shape KoComplexText::glyphVariantLogical( const TQString &str, in // does only presentation forms B at the moment, but that should be enough for // simple display static const ushort arabicUnicodeMapping[256][2] = { - // base of tqshaped forms, and number-1 of them ( 0 for non shaping, + // base of shaped forms, and number-1 of them ( 0 for non shaping, // 1 for right binding and 3 for dual binding { 0x0600, 0 }, // 0x600 { 0x0601, 0 }, // 0x601 @@ -355,7 +355,7 @@ static const ushort arabicUnicodeMapping[256][2] = { { 0x066e, 0 }, // 0x66e { 0x066f, 0 }, // 0x66f - // ### some glyphs do not have tqshaped mappings in the presentation forms A. + // ### some glyphs do not have shaped mappings in the presentation forms A. // these have the shaping set to 0 for the moment. Will have to find out better mappings for them. { 0x0670, 0 }, // 0x670 { 0xfb50, 1 }, // 0x671 R Alef Wasla @@ -512,7 +512,7 @@ static const ushort arabicUnicodeMapping[256][2] = { }; -// this is a bit tricky. Alef always binds to the right, so the second parameter descibing the tqshape +// this is a bit tricky. Alef always binds to the right, so the second parameter descibing the shape // of the lam can be either initial of medial. So initial maps to the isolated form of the ligature, // medial to the final form static const ushort arabicUnicodeLamAlefMapping[6][4] = { @@ -524,14 +524,14 @@ static const ushort arabicUnicodeLamAlefMapping[6][4] = { { 0xfffd, 0xfffd, 0xfefb, 0xfefc } // 0x627 R Alef }; -static inline int getShape( const TQChar * /* base */, uchar cell, int tqshape, +static inline int getShape( const TQChar * /* base */, uchar cell, int shape, const TQFontMetrics * /* fm */ ) { - uint ch = arabicUnicodeMapping[cell][0] + tqshape; + uint ch = arabicUnicodeMapping[cell][0] + shape; /* - // we revert to the untqshaped glyph in case the tqshaped version doesn't exist + // we revert to the unshaped glyph in case the shaped version doesn't exist if ( fm && !fm->inFont( ch ) ) { - switch( tqshape ) { + switch( shape ) { case KoComplexText::XIsolated: break; // try base form case KoComplexText::XFinal: @@ -551,7 +551,7 @@ static inline int getShape( const TQChar * /* base */, uchar cell, int tqshape, return ch; } -TQString KoComplexText::tqshapedString(const TQString& uc, int from, int len, TQPainter::TextDirection dir, const TQFontMetrics *fm ) +TQString KoComplexText::shapedString(const TQString& uc, int from, int len, TQPainter::TextDirection dir, const TQFontMetrics *fm ) { if( len < 0 ) len = uc.length() - from; @@ -575,16 +575,16 @@ TQString KoComplexText::tqshapedString(const TQString& uc, int from, int len, TQ } if ( len == 0 ) return TQString(); - if( !tqshapeBuffer || len > tqshapeBufSize ) { - if( tqshapeBuffer ) free( (void *) tqshapeBuffer ); - tqshapeBuffer = (TQChar *) malloc( len*sizeof( TQChar ) ); -// delete [] tqshapeBuffer; -// tqshapeBuffer = new TQChar[ len + 1]; - tqshapeBufSize = len; + if( !shapeBuffer || len > shapeBufSize ) { + if( shapeBuffer ) free( (void *) shapeBuffer ); + shapeBuffer = (TQChar *) malloc( len*sizeof( TQChar ) ); +// delete [] shapeBuffer; +// shapeBuffer = new TQChar[ len + 1]; + shapeBufSize = len; } int lenOut = 0; - TQChar *data = tqshapeBuffer; + TQChar *data = shapeBuffer; if ( dir == TQPainter::RTL ) ch += len - 1; for ( int i = 0; i < len; i++ ) { @@ -601,8 +601,8 @@ TQString KoComplexText::tqshapedString(const TQString& uc, int from, int len, TQ int pos = i + from; if ( dir == TQPainter::RTL ) pos = from + len - 1 - i; - int tqshape = glyphVariantLogical( uc, pos ); - //kdDebug() << "mapping U+" << ch->tqunicode() << " to tqshape " << tqshape << " glyph=0x" << arabicUnicodeMapping[ch->cell()][tqshape] << endl; + int shape = glyphVariantLogical( uc, pos ); + //kdDebug() << "mapping U+" << ch->tqunicode() << " to shape " << shape << " glyph=0x" << arabicUnicodeMapping[ch->cell()][shape] << endl; // take care of lam-alef ligatures (lam right of alef) ushort map; switch ( c ) { @@ -615,7 +615,7 @@ TQString KoComplexText::tqshapedString(const TQString& uc, int from, int len, TQ case 0x25: case 0x27: //kdDebug() << " lam of lam-alef ligature" << endl; - map = arabicUnicodeLamAlefMapping[pch->cell() - 0x22][tqshape]; + map = arabicUnicodeLamAlefMapping[pch->cell() - 0x22][shape]; goto next; default: break; @@ -635,7 +635,7 @@ TQString KoComplexText::tqshapedString(const TQString& uc, int from, int len, TQ default: break; } - map = getShape( ch, c, tqshape, fm ); + map = getShape( ch, c, shape, fm ); next: *data = map; data++; @@ -649,11 +649,11 @@ TQString KoComplexText::tqshapedString(const TQString& uc, int from, int len, TQ } if ( dir == TQPainter::Auto && !uc.simpleText() ) { - return bidiReorderString( TQConstString( tqshapeBuffer, lenOut ).string() ); + return bidiReorderString( TQConstString( shapeBuffer, lenOut ).string() ); } if ( dir == TQPainter::RTL ) { // reverses the non spacing marks to be again after the base char - TQChar *s = tqshapeBuffer; + TQChar *s = shapeBuffer; int i = 0; while ( i < lenOut ) { if ( s->combiningClass() != 0 ) { @@ -684,17 +684,17 @@ TQString KoComplexText::tqshapedString(const TQString& uc, int from, int len, TQ } } - return TQConstString( tqshapeBuffer, lenOut ).string(); + return TQConstString( shapeBuffer, lenOut ).string(); } -TQChar KoComplexText::tqshapedCharacter( const TQString &str, int pos, const TQFontMetrics *fm ) +TQChar KoComplexText::shapedCharacter( const TQString &str, int pos, const TQFontMetrics *fm ) { const TQChar *ch = str.tqunicode() + pos; if ( ch->row() != 0x06 ) return *ch; else { - int tqshape = glyphVariantLogical( str, pos ); - //kdDebug() << "mapping U+" << ch->tqunicode() << " to tqshape " << tqshape << " glyph=0x" << arabicUnicodeMapping[ch->cell()][tqshape] << endl; + int shape = glyphVariantLogical( str, pos ); + //kdDebug() << "mapping U+" << ch->tqunicode() << " to shape " << shape << " glyph=0x" << arabicUnicodeMapping[ch->cell()][shape] << endl; // lam aleph ligatures switch ( ch->cell() ) { case 0x44: { // lam @@ -705,7 +705,7 @@ TQChar KoComplexText::tqshapedCharacter( const TQString &str, int pos, const TQF case 0x23: case 0x25: case 0x27: - return TQChar(arabicUnicodeLamAlefMapping[nch->cell() - 0x22][tqshape]); + return TQChar(arabicUnicodeLamAlefMapping[nch->cell() - 0x22][shape]); default: break; } @@ -722,7 +722,7 @@ TQChar KoComplexText::tqshapedCharacter( const TQString &str, int pos, const TQF default: break; } - return TQChar( getShape( ch, ch->cell(), tqshape, fm ) ); + return TQChar( getShape( ch, ch->cell(), shape, fm ) ); } } @@ -739,7 +739,7 @@ TQPointArray KoComplexText::positionMarks( TQFontPrivate *f, const TQString &str if ( !nmarks ) return TQPointArray(); - TQChar baseChar = KoComplexText::tqshapedCharacter( str, pos ); + TQChar baseChar = KoComplexText::shapedCharacter( str, pos ); TQRect baseRect = f->boundingRect( baseChar ); int baseOffset = f->textWidth( str, pos, 1 ); diff --git a/lib/kotext/KoComplexText.h b/lib/kotext/KoComplexText.h index 7f75d730..8a22d152 100644 --- a/lib/kotext/KoComplexText.h +++ b/lib/kotext/KoComplexText.h @@ -115,8 +115,8 @@ public: static Shape glyphVariant( const TQString &str, int pos); static Shape glyphVariantLogical( const TQString &str, int pos); - static TQString tqshapedString( const TQString &str, int from = 0, int len = -1, TQPainter::TextDirection dir = TQPainter::Auto, const TQFontMetrics *fm = 0); - static TQChar tqshapedCharacter(const TQString &str, int pos, const TQFontMetrics *fm = 0); + static TQString shapedString( const TQString &str, int from = 0, int len = -1, TQPainter::TextDirection dir = TQPainter::Auto, const TQFontMetrics *fm = 0); + static TQChar shapedCharacter(const TQString &str, int pos, const TQFontMetrics *fm = 0); // positions non spacing marks relative to the base character at position pos. //static TQPointArray positionMarks( TQFontPrivate *f, const TQString &str, int pos, TQRect *boundingRect = 0 ); diff --git a/lib/kotext/KoImportStyleDia.cpp b/lib/kotext/KoImportStyleDia.cpp index 327dbe53..6d9d57d6 100644 --- a/lib/kotext/KoImportStyleDia.cpp +++ b/lib/kotext/KoImportStyleDia.cpp @@ -98,7 +98,7 @@ TQString KoImportStyleDia::generateStyleName( const TQString & templateName ) co int num = 1; bool exists; do { - name = templateName.tqarg( num ); + name = templateName.arg( num ); exists = m_currentCollection->findStyle( name ) != 0; ++num; } while ( exists ); @@ -111,7 +111,7 @@ TQString KoImportStyleDia::generateStyleDisplayName( const TQString & templateNa int num = 1; bool exists; do { - name = templateName.tqarg( num ); + name = templateName.arg( num ); exists = m_currentCollection->findStyleByDisplayName( name ) != 0; ++num; } while ( exists ); diff --git a/lib/kotext/KoParagCounter.cpp b/lib/kotext/KoParagCounter.cpp index 0de6ee87..56adc3a2 100644 --- a/lib/kotext/KoParagCounter.cpp +++ b/lib/kotext/KoParagCounter.cpp @@ -43,7 +43,7 @@ KoParagCounter::KoParagCounter() m_customBulletChar = TQChar( '-' ); m_customBulletFont = TQString(); m_align = TQt::AlignAuto; - tqinvalidate(); + invalidate(); } bool KoParagCounter::operator==( const KoParagCounter & c2 ) const @@ -83,7 +83,7 @@ unsigned int KoParagCounter::depth() const return m_depth; } -void KoParagCounter::tqinvalidate() +void KoParagCounter::invalidate() { m_cache.number = -1; m_cache.text = TQString(); @@ -144,7 +144,7 @@ void KoParagCounter::load( TQDomElement & element ) m_align = element.attribute("align", "0").toInt(); //AlignAuto as defeult TQString restart = element.attribute("restart"); m_restartCounter = (restart == "true") || (restart == "1"); - tqinvalidate(); + invalidate(); } static int importCounterType( TQChar numFormat ) @@ -259,7 +259,7 @@ void KoParagCounter::loadOasisListStyle( const TQDomElement& listStyle, m_style = STYLE_DISCBULLET; } } - tqinvalidate(); + invalidate(); } void KoParagCounter::saveOasis( KoGenStyle& listStyle, bool savingStyle ) const @@ -326,7 +326,7 @@ void KoParagCounter::saveOasisListLevel( KoXmlWriter& listLevelWriter, bool incl listLevelWriter.startElement( "style:list-level-properties" ); listLevelWriter.addAttribute( "fo:text-align", KoParagLayout::saveOasisAlignment( (TQt::AlignmentFlags)m_align ) ); // OASIS has other style properties: text:space-before (indent), text:min-label-width (TODO), - // text:min-label-distance, style:font-name (for bullets), image size and vertical tqalignment. + // text:min-label-distance, style:font-name (for bullets), image size and vertical alignment. listLevelWriter.endElement(); // style:list-level-properties } } @@ -531,66 +531,66 @@ void KoParagCounter::save( TQDomElement & element ) void KoParagCounter::setCustom( TQString c ) { m_custom = c; - tqinvalidate(); + invalidate(); } void KoParagCounter::setCustomBulletCharacter( TQChar c ) { m_customBulletChar = c; - tqinvalidate(); + invalidate(); } void KoParagCounter::setCustomBulletFont( TQString f ) { m_customBulletFont = f; - tqinvalidate(); + invalidate(); } void KoParagCounter::setDepth( unsigned int d ) { m_depth = d; - tqinvalidate(); + invalidate(); } void KoParagCounter::setNumbering( Numbering n ) { m_numbering = n; - tqinvalidate(); + invalidate(); } void KoParagCounter::setPrefix( TQString p ) { m_prefix = p; - tqinvalidate(); + invalidate(); } void KoParagCounter::setStartNumber( int s ) { m_startNumber = s; - tqinvalidate(); + invalidate(); } void KoParagCounter::setDisplayLevels( int l ) { m_displayLevels = l; - tqinvalidate(); + invalidate(); } void KoParagCounter::setAlignment( int a ) { m_align = a; - tqinvalidate(); + invalidate(); } void KoParagCounter::setStyle( Style s ) { m_style = s; - tqinvalidate(); + invalidate(); } void KoParagCounter::setSuffix( TQString s ) { m_suffix = s; - tqinvalidate(); + invalidate(); } int KoParagCounter::startNumber() const @@ -603,7 +603,7 @@ int KoParagCounter::displayLevels() const return m_displayLevels; } -int KoParagCounter::tqalignment() const +int KoParagCounter::alignment() const { return m_align; } @@ -626,7 +626,7 @@ bool KoParagCounter::restartCounter() const void KoParagCounter::setRestartCounter( bool restart ) { m_restartCounter = restart; - tqinvalidate(); + invalidate(); } // Return the text for that level only diff --git a/lib/kotext/KoParagCounter.h b/lib/kotext/KoParagCounter.h index 6758d952..d45b2435 100644 --- a/lib/kotext/KoParagCounter.h +++ b/lib/kotext/KoParagCounter.h @@ -40,7 +40,7 @@ public: /** Invalidate the internal cache. Use it whenever the number associated with this * counter may have changed. */ - void tqinvalidate(); + void invalidate(); /** Return the current value of the counter as a number. */ @@ -172,9 +172,9 @@ public: TQString custom() const; void setCustom( TQString c ); - /** Counter tqalignment + /** Counter alignment */ - int tqalignment() const; + int alignment() const; void setAlignment( int a ); /** diff --git a/lib/kotext/KoParagDia.cpp b/lib/kotext/KoParagDia.cpp index 13c48350..1d424b27 100644 --- a/lib/kotext/KoParagDia.cpp +++ b/lib/kotext/KoParagDia.cpp @@ -129,7 +129,7 @@ KoCounterStyleWidget::KoCounterStyleWidget( bool displayDepth, bool onlyStyleTyp grid->addWidget( spnStart, 2, 2); lAlignment = new TQLabel( gStyle, "lAlignment" ); - lAlignment->setText( i18n( "Counter tqalignment:" ) ); + lAlignment->setText( i18n( "Counter alignment:" ) ); grid->addWidget( lAlignment, 2, 3 ); cbAlignment = new KComboBox( gStyle, "cbAlignment" ); @@ -296,11 +296,11 @@ void KoCounterStyleWidget::displayStyle( KoParagCounter::Style style ) spnStart->setValue( m_counter.startNumber() ); cbRestart->setChecked( m_counter.restartCounter() ); - if(m_counter.tqalignment()==TQt::AlignLeft) + if(m_counter.alignment()==TQt::AlignLeft) cbAlignment->setCurrentText(i18n("Align Left")); - else if(m_counter.tqalignment()==TQt::AlignRight) + else if(m_counter.alignment()==TQt::AlignRight) cbAlignment->setCurrentText(i18n("Align Right")); - else if(m_counter.tqalignment()==TQt::AlignAuto) + else if(m_counter.alignment()==TQt::AlignAuto) cbAlignment->setCurrentText(i18n("Align Auto")); else kdError()<<"Not Implemented"<<endl; @@ -812,14 +812,14 @@ void KoStylePreview::setCounter( const KoParagCounter & counter ) { KoTextParag * parag = m_textdoc->firstParag(); parag->setCounter( counter ); - tqrepaint( true ); + repaint( true ); } void KoStylePreview::setStyle( KoParagStyle * style ) { KoTextParag * parag = m_textdoc->firstParag(); parag->applyStyle( style ); - tqrepaint(true); + repaint(true); } void KoStylePreview::drawContents( TQPainter *painter ) @@ -839,13 +839,13 @@ void KoStylePreview::drawContents( TQPainter *painter ) { // For centering to work, and to even get word wrapping when the thing is too big :) m_textdoc->setWidth( widthLU ); - parag->tqinvalidate(0); + parag->invalidate(0); } parag->format(); TQRect textRect = parag->pixelRect( m_zoomHandler ); - // Center vertically, but not horizontally, to keep the parag tqalignment working, + // Center vertically, but not horizontally, to keep the parag alignment working, textRect.moveTopLeft( TQPoint( whiteRect.x(), whiteRect.y() + ( whiteRect.height() - textRect.height() ) / 2 ) ); // Move it from the left border a little @@ -879,8 +879,8 @@ KoIndentSpacingWidget::KoIndentSpacingWidget( KoUnit::Unit unit, double _frameW frameWidth=9999; } else { length=i18n("Frame width: %1 %2") - .tqarg(KoUnit::toUserStringValue(frameWidth,m_unit)) - .tqarg(KoUnit::unitName(m_unit)); + .arg(KoUnit::toUserStringValue(frameWidth,m_unit)) + .arg(KoUnit::unitName(m_unit)); frameWidth=KoUnit::toUserValue(frameWidth,m_unit); } @@ -938,9 +938,9 @@ KoIndentSpacingWidget::KoIndentSpacingWidget( KoUnit::Unit unit, double _frameW cSpacing->insertItem( i18n( "Line spacing value", "1.5 Lines" ) ); cSpacing->insertItem( i18n( "Line spacing value", "Double" ) ); cSpacing->insertItem( i18n( "Proportional") ); // LS_MULTIPLE, called Proportional like in OO - cSpacing->insertItem( i18n( "Line Distance (%1)" ).tqarg(unitName) ); // LS_CUSTOM - cSpacing->insertItem( i18n( "At Least (%1)" ).tqarg(unitName) ); - cSpacing->insertItem( i18n( "Fixed (%1)").tqarg(unitName) ); // LS_FIXED + cSpacing->insertItem( i18n( "Line Distance (%1)" ).arg(unitName) ); // LS_CUSTOM + cSpacing->insertItem( i18n( "At Least (%1)" ).arg(unitName) ); + cSpacing->insertItem( i18n( "Fixed (%1)").arg(unitName) ); // LS_FIXED connect( cSpacing, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( spacingActivated( int ) ) ); spacingGrid->addWidget( cSpacing, 1, 0 ); @@ -1273,7 +1273,7 @@ int KoParagAlignWidget::pageBreaking() const void KoParagAlignWidget::display( const KoParagLayout & lay ) { - int align = lay.tqalignment; + int align = lay.alignment; prev2->setAlign( align ); clearAligns(); @@ -1302,7 +1302,7 @@ void KoParagAlignWidget::display( const KoParagLayout & lay ) void KoParagAlignWidget::save( KoParagLayout & lay ) { - lay.tqalignment = align(); + lay.alignment = align(); lay.pageBreaking = pageBreaking(); } @@ -1705,7 +1705,7 @@ void KoParagCounterWidget::display( const KoParagLayout & lay ) { void KoParagCounterWidget::updatePreview() { preview->setCounter(m_counter); - preview->tqrepaint(true); + preview->repaint(true); } void KoParagCounterWidget::save( KoParagLayout & lay ) { @@ -1746,8 +1746,8 @@ KoParagTabulatorsWidget::KoParagTabulatorsWidget( KoUnit::Unit unit, double fram } else { m_toplimit=frameWidth; length=i18n("Frame width: %1 %2") - .tqarg(KoUnit::toUserStringValue(frameWidth,m_unit)) - .tqarg(KoUnit::unitName(m_unit)); + .arg(KoUnit::toUserStringValue(frameWidth,m_unit)) + .arg(KoUnit::unitName(m_unit)); frameWidth=KoUnit::toUserValue(frameWidth,m_unit); } TQVBoxLayout* Form1Layout = new TQVBoxLayout( this ); @@ -2272,7 +2272,7 @@ KoParagLayout KoParagDia::paragLayout() const newLayout.setLineSpacingValue( lineSpacing() ); newLayout.lineSpacingType = lineSpacingType(); newLayout.setTabList( tabListTabulator() ); - newLayout.tqalignment = align(); + newLayout.alignment = align(); newLayout.margins[TQStyleSheetItem::MarginFirstLine] = firstLineIndent(); newLayout.margins[TQStyleSheetItem::MarginLeft] = leftIndent(); newLayout.margins[TQStyleSheetItem::MarginRight] = rightIndent(); diff --git a/lib/kotext/KoParagDia.h b/lib/kotext/KoParagDia.h index 26f68e0b..443bb62f 100644 --- a/lib/kotext/KoParagDia.h +++ b/lib/kotext/KoParagDia.h @@ -147,7 +147,7 @@ private: }; /** - * The widget for editing paragraph tqalignment (tab 2) + * The widget for editing paragraph alignment (tab 2) */ class KOTEXT_EXPORT KoParagAlignWidget : public KoParagLayoutWidget { @@ -549,7 +549,7 @@ public: TQColor backgroundColor() const { return m_decorationsWidget->backgroundColor(); } // Support for "what has changed?" - bool isAlignChanged() const {return oldLayout.tqalignment!=align();} + bool isAlignChanged() const {return oldLayout.alignment!=align();} bool isLineSpacingChanged() const { return (oldLayout.lineSpacingValue() !=lineSpacing() || oldLayout.lineSpacingType != lineSpacingType()); diff --git a/lib/kotext/KoParagDia_p.h b/lib/kotext/KoParagDia_p.h index a1ca5737..48f77ea1 100644 --- a/lib/kotext/KoParagDia_p.h +++ b/lib/kotext/KoParagDia_p.h @@ -66,17 +66,17 @@ public: ~KPagePreview() {} void setLeft( double _left ) - { left = _left; tqrepaint( false ); } + { left = _left; repaint( false ); } void setRight( double _right ) - { right = _right; tqrepaint( false ); } + { right = _right; repaint( false ); } void setFirst( double _first ) - { first = _first; tqrepaint( false ); } + { first = _first; repaint( false ); } void setSpacing( double _spacing ) - { spacing = _spacing; tqrepaint( false ); } + { spacing = _spacing; repaint( false ); } void setBefore( double _before ) - { before = _before; tqrepaint( false ); } + { before = _before; repaint( false ); } void setAfter( double _after ) - { after = _after; tqrepaint( false ); } + { after = _after; repaint( false ); } protected: void drawContents( TQPainter* ); @@ -100,7 +100,7 @@ public: ~KPagePreview2() {} void setAlign( int _align ) - { align = _align; tqrepaint( false ); } + { align = _align; repaint( false ); } protected: void drawContents( TQPainter* ); @@ -124,16 +124,16 @@ public: KoBorder leftBorder()const { return m_leftBorder; } void setLeftBorder( const KoBorder& _leftBorder ) - { m_leftBorder = _leftBorder; tqrepaint( true ); } + { m_leftBorder = _leftBorder; repaint( true ); } KoBorder rightBorder() const { return m_rightBorder; } void setRightBorder( const KoBorder& _rightBorder ) - { m_rightBorder = _rightBorder; tqrepaint( true ); } + { m_rightBorder = _rightBorder; repaint( true ); } KoBorder topBorder()const { return m_topBorder; } void setTopBorder( const KoBorder& _topBorder ) - { m_topBorder = _topBorder; tqrepaint( true ); } + { m_topBorder = _topBorder; repaint( true ); } KoBorder bottomBorder()const { return m_bottomBorder; } void setBottomBorder( const KoBorder& _bottomBorder ) - { m_bottomBorder = _bottomBorder; tqrepaint( true ); } + { m_bottomBorder = _bottomBorder; repaint( true ); } void setBorder( KoBorder::BorderType which, const KoBorder& border); diff --git a/lib/kotext/KoParagLayout.cpp b/lib/kotext/KoParagLayout.cpp index fd1a9453..8e5178a5 100644 --- a/lib/kotext/KoParagLayout.cpp +++ b/lib/kotext/KoParagLayout.cpp @@ -46,7 +46,7 @@ KoParagLayout::KoParagLayout() void KoParagLayout::operator=( const KoParagLayout &tqlayout ) { - tqalignment = tqlayout.tqalignment; + alignment = tqlayout.alignment; for ( int i = 0 ; i < 5 ; ++i ) margins[i] = tqlayout.margins[i]; pageBreaking = tqlayout.pageBreaking; @@ -70,7 +70,7 @@ void KoParagLayout::operator=( const KoParagLayout &tqlayout ) int KoParagLayout::compare( const KoParagLayout & tqlayout ) const { int flags = 0; - if ( tqalignment != tqlayout.tqalignment ) + if ( alignment != tqlayout.alignment ) flags |= Alignment; for ( int i = 0 ; i < 5 ; ++i ) if ( margins[i] != tqlayout.margins[i] ) @@ -119,7 +119,7 @@ int KoParagLayout::compare( const KoParagLayout & tqlayout ) const void KoParagLayout::initialise() { - tqalignment = TQt::AlignAuto; + alignment = TQt::AlignAuto; for ( int i = 0 ; i < 5 ; ++i ) // use memset ? margins[i] = 0; lineSpacingType = LS_SINGLE; @@ -172,14 +172,14 @@ void KoParagLayout::loadParagLayout( KoParagLayout& tqlayout, const TQDomElement } qHeapSort( tabList ); tqlayout.setTabList( tabList ); - tqlayout.tqalignment = TQt::AlignAuto; - element = parentElem.namedItem( "FLOW" ).toElement(); // Flow is what is now called tqalignment internally + tqlayout.alignment = TQt::AlignAuto; + element = parentElem.namedItem( "FLOW" ).toElement(); // Flow is what is now called alignment internally if ( !element.isNull() ) { TQString flow = element.attribute( "align" ); // KWord-1.0 DTD if ( !flow.isEmpty() ) { - tqlayout.tqalignment = flow=="right" ? TQt::AlignRight : + tqlayout.alignment = flow=="right" ? TQt::AlignRight : flow=="center" ? TQt::AlignHCenter : flow=="justify" ? TQt::AlignJustify : flow=="left" ? TQt::AlignLeft : TQt::AlignAuto; @@ -197,7 +197,7 @@ void KoParagLayout::loadParagLayout( KoParagLayout& tqlayout, const TQDomElement flow = element.attribute( "value" ); // KWord-0.8 static const int flow2align[] = { TQt::AlignAuto, TQt::AlignRight, TQt::AlignHCenter, TQt::AlignJustify }; if ( !flow.isEmpty() && flow.toInt() < 4 ) - tqlayout.tqalignment = flow2align[flow.toInt()]; + tqlayout.alignment = flow2align[flow.toInt()]; } } @@ -425,12 +425,12 @@ TQt::AlignmentFlags KoParagLayout::loadOasisAlignment( const TQCString& str ) } //static -TQCString KoParagLayout::saveOasisAlignment( TQt::AlignmentFlags tqalignment ) +TQCString KoParagLayout::saveOasisAlignment( TQt::AlignmentFlags alignment ) { - return tqalignment == TQt::AlignLeft ? "left" : - tqalignment == TQt::AlignRight ? "right" : - tqalignment == TQt::AlignHCenter ? "center" : - tqalignment == TQt::AlignJustify ? "justify" : + return alignment == TQt::AlignLeft ? "left" : + alignment == TQt::AlignRight ? "right" : + alignment == TQt::AlignHCenter ? "center" : + alignment == TQt::AlignJustify ? "justify" : "start"; // i.e. direction-dependent } @@ -443,7 +443,7 @@ void KoParagLayout::loadOasisParagLayout( KoParagLayout& tqlayout, KoOasisContex // code from OoWriterImport::writeLayout if ( context.styleStack().hasAttributeNS( KoXmlNS::fo, "text-align" ) ) { TQCString align = context.styleStack().attributeNS( KoXmlNS::fo, "text-align" ).latin1(); - tqlayout.tqalignment = loadOasisAlignment( align ); + tqlayout.alignment = loadOasisAlignment( align ); } if ( context.styleStack().hasAttributeNS( KoXmlNS::style, "writing-mode" ) ) { // http://web4.w3.org/TR/xsl/slice7.html#writing-mode @@ -549,7 +549,7 @@ void KoParagLayout::loadOasisParagLayout( KoParagLayout& tqlayout, KoOasisContex TQString delimiterChar = tabStop.attributeNS( KoXmlNS::style, "char", TQString() ); // single character if ( !delimiterChar.isEmpty() ) tab.alignChar = delimiterChar[0]; - tab.type = T_DEC_PNT; // "tqalignment on decimal point" + tab.type = T_DEC_PNT; // "alignment on decimal point" } else //if ( type == "left" ) tab.type = T_LEFT; @@ -658,7 +658,7 @@ void KoParagLayout::loadOasisParagLayout( KoParagLayout& tqlayout, KoOasisContex } } -void KoParagLayout::saveParagLayout( TQDomElement & parentElem, int tqalignment ) const +void KoParagLayout::saveParagLayout( TQDomElement & parentElem, int alignment ) const { const KoParagLayout& tqlayout = *this; // code moved from somewhere else;) TQDomDocument doc = parentElem.ownerDocument(); @@ -672,10 +672,10 @@ void KoParagLayout::saveParagLayout( TQDomElement & parentElem, int tqalignment element = doc.createElement( "FLOW" ); parentElem.appendChild( element ); - element.setAttribute( "align", tqalignment==TQt::AlignRight ? "right" : - tqalignment==TQt::AlignHCenter ? "center" : - tqalignment==TQt::AlignJustify ? "justify" : - tqalignment==TQt::AlignAuto ? "auto" : "left" ); // Note: styles can have AlignAuto. Not paragraphs. + element.setAttribute( "align", alignment==TQt::AlignRight ? "right" : + alignment==TQt::AlignHCenter ? "center" : + alignment==TQt::AlignJustify ? "justify" : + alignment==TQt::AlignAuto ? "auto" : "left" ); // Note: styles can have AlignAuto. Not paragraphs. if ( static_cast<TQChar::Direction>(tqlayout.direction) == TQChar::DirR ) element.setAttribute( "dir", "R" ); @@ -806,7 +806,7 @@ void KoParagLayout::saveParagLayout( TQDomElement & parentElem, int tqalignment void KoParagLayout::saveOasis( KoGenStyle& gs, KoSavingContext& context, bool savingStyle ) const { - gs.addProperty( "fo:text-align", saveOasisAlignment( (TQt::AlignmentFlags)tqalignment ).data() ); + gs.addProperty( "fo:text-align", saveOasisAlignment( (TQt::AlignmentFlags)alignment ).data() ); // Don't save the direction for a style, if "auto", so that the // auto-determination of direction based on first char, works. if ( !savingStyle || (TQChar::Direction) direction != TQChar::DirON ) @@ -863,7 +863,7 @@ void KoParagLayout::saveOasis( KoGenStyle& gs, KoSavingContext& context, bool sa case T_RIGHT: tabsWriter.addAttribute( "style:type", "right" ); break; - case T_DEC_PNT: // "tqalignment on decimal point" + case T_DEC_PNT: // "alignment on decimal point" tabsWriter.addAttribute( "style:type", "char" ); if ( !(*it).alignChar.isNull() ) tabsWriter.addAttribute( "style:char", TQString( (*it).alignChar ) ); diff --git a/lib/kotext/KoParagLayout.h b/lib/kotext/KoParagLayout.h index 2c9b9dea..c0582b19 100644 --- a/lib/kotext/KoParagLayout.h +++ b/lib/kotext/KoParagLayout.h @@ -96,7 +96,7 @@ public: char pageBreaking; // Page breaking flags char direction; // TQChar::Direction /// Alignment flag (AlignAuto/AlignLeft/AlignRight/AlignJustify) - char tqalignment; // TQt::AlignmentFlags + char alignment; // TQt::AlignmentFlags KoBorder leftBorder, rightBorder, topBorder, bottomBorder; /// The background color of the paragraph @@ -135,7 +135,7 @@ public: /** Save this parag tqlayout to XML. * This format is used by KWord for paragraphs, and by KPresenter+KWord for styles. */ - void saveParagLayout( TQDomElement & parentElem, int tqalignment ) const; + void saveParagLayout( TQDomElement & parentElem, int alignment ) const; /** Load this parag tqlayout from XML. * This format is used by KWord for paragraphs, and by KPresenter+KWord for styles. @@ -151,10 +151,10 @@ public: /// @param context the current context void saveOasis( KoGenStyle& gs, KoSavingContext& context, bool savingStyle ) const; - /// Convert an tqalignment string into an tqalignment flag (load) + /// Convert an alignment string into an alignment flag (load) static TQt::AlignmentFlags loadOasisAlignment( const TQCString& str ); - /// Convert an tqalignment flag into an tqalignment string (save) - static TQCString saveOasisAlignment( TQt::AlignmentFlags tqalignment ); + /// Convert an alignment flag into an alignment string (save) + static TQCString saveOasisAlignment( TQt::AlignmentFlags alignment ); private: static int getAttribute(const TQDomElement &element, const char *attributeName, int defaultValue) { diff --git a/lib/kotext/KoParagStyle.cpp b/lib/kotext/KoParagStyle.cpp index a68c6768..b09fe90e 100644 --- a/lib/kotext/KoParagStyle.cpp +++ b/lib/kotext/KoParagStyle.cpp @@ -88,7 +88,7 @@ void KoParagStyle::setFollowingStyle( KoParagStyle *fst ) void KoParagStyle::saveStyle( TQDomElement & parentElem ) { - m_paragLayout.saveParagLayout( parentElem, m_paragLayout.tqalignment ); + m_paragLayout.saveParagLayout( parentElem, m_paragLayout.alignment ); if ( followingStyle() ) { @@ -207,7 +207,7 @@ TQString KoParagStyle::saveStyle( KoGenStyles& genStyles, int styleType, const T // This display-name will probably look nicer in OO, but this also means // no re-use possible between list styles... listStyle.addAttribute( "style:display-name", - i18n( "Numbering Style for %1" ).tqarg( m_displayName ) ); + i18n( "Numbering Style for %1" ).arg( m_displayName ) ); TQString autoListStyleName = genStyles.lookup( listStyle, "L", KoGenStyles::ForceNumbering ); gs.addAttribute( "style:list-style-name", autoListStyleName ); @@ -245,7 +245,7 @@ void KoParagStyle::propagateChanges( int paragLayoutFlag, int /*formatFlag*/ ) if ( !m_parentStyle ) return; if ( !(paragLayoutFlag & KoParagLayout::Alignment) ) - m_paragLayout.tqalignment = m_parentStyle->paragLayout().tqalignment; + m_paragLayout.alignment = m_parentStyle->paragLayout().alignment; if ( !(paragLayoutFlag & KoParagLayout::Margins) ) for ( int i = 0 ; i < 5 ; ++i ) m_paragLayout.margins[i] = m_parentStyle->paragLayout().margins[i]; diff --git a/lib/kotext/KoRichText.cpp b/lib/kotext/KoRichText.cpp index 374184b3..addbd574 100644 --- a/lib/kotext/KoRichText.cpp +++ b/lib/kotext/KoRichText.cpp @@ -375,7 +375,7 @@ bool KoTextCursor::operator==( const KoTextCursor &c ) const void KoTextCursor::insert( const TQString &str, bool checkNewLine, TQMemArray<KoTextStringChar> *formatting ) { - string->tqinvalidate( idx ); + string->invalidate( idx ); tmpIndex = -1; bool justInsert = TRUE; TQString s( str ); @@ -420,7 +420,7 @@ void KoTextCursor::insert( const TQString &str, bool checkNewLine, TQMemArray<Ko if ( !s.isEmpty() ) string->insert( idx, s ); else - string->tqinvalidate( 0 ); + string->invalidate( 0 ); if ( formatting ) { int len = s.length(); @@ -448,7 +448,7 @@ void KoTextCursor::insert( const TQString &str, bool checkNewLine, TQMemArray<Ko while ( p ) { p->setParagId( p->prev()->paragId() + 1 ); //p->move( dy ); - p->tqinvalidate( 0 ); + p->invalidate( 0 ); p = p->next(); } } @@ -963,7 +963,7 @@ bool KoTextCursor::remove() KoTextParag *p = string->next(); delete string; string = p; - string->tqinvalidate( 0 ); + string->invalidate( 0 ); //// kotext string->invalidateCounters(); //// @@ -1520,7 +1520,7 @@ KoTextParagLineStart *KoTextFormatterBase::bidiReorderLine( KoTextParag * /*para // now construct the reordered string out of the runs... int numSpaces = 0; - // set the correct tqalignment. This is a bit messy.... + // set the correct alignment. This is a bit messy.... if( align == TQt::AlignAuto ) { // align according to directionality of the paragraph... if ( text->isRightToLeft() ) diff --git a/lib/kotext/KoRichText.h b/lib/kotext/KoRichText.h index a5fd6b1a..f3cf9746 100644 --- a/lib/kotext/KoRichText.h +++ b/lib/kotext/KoRichText.h @@ -483,7 +483,7 @@ public: TQSizePolicy::ExpandData expanding() const; bool isEmpty() const; void setGeometry( const TQRect& ) ; - TQRect tqgeometry() const; + TQRect geometry() const; bool hasHeightForWidth() const; int heightForWidth( int ) const; @@ -502,7 +502,7 @@ public: void draw( int x, int y, int cx, int cy, int cw, int ch, const TQColorGroup& cg, bool selected ); TQBrush *backGround() const { return background; } - virtual void tqinvalidate(); + virtual void invalidate(); int verticalAlignmentOffset() const; int horizontalAlignmentOffset() const; @@ -552,7 +552,7 @@ public: Placement placement() const { return place; } bool isNested() const { return TRUE; } void resize( int nwidth ); - virtual void tqinvalidate(); + 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 ); @@ -569,7 +569,7 @@ public: TQPtrList<KoTextTableCell> tableCells() const { return cells; } - TQRect tqgeometry() const { return tqlayout ? tqlayout->tqgeometry() : TQRect(); } + TQRect geometry() const { return tqlayout ? tqlayout->geometry() : TQRect(); } bool isStretching() const { return stretch; } private: diff --git a/lib/kotext/KoSearchDia.cpp b/lib/kotext/KoSearchDia.cpp index a41de932..8aaab47b 100644 --- a/lib/kotext/KoSearchDia.cpp +++ b/lib/kotext/KoSearchDia.cpp @@ -382,8 +382,8 @@ void KoFindReplace::replace( const TQString &text, int matchingIndex, { replaceWithAttribut( &cursor, index ); } - // Don't tqrepaint if we're doing batch changes - bool tqrepaint = options() & KReplaceDialog::PromptOnReplace; + // Don't repaint if we're doing batch changes + bool repaint = options() & KReplaceDialog::PromptOnReplace; // Grab replacement string TQString rep = text.mid( matchingIndex, replacementLength ); @@ -395,7 +395,7 @@ void KoFindReplace::replace( const TQString &text, int matchingIndex, KCommand *cmd = currentTextObj->replaceSelectionCommand( &cursor, rep, TQString(), KoTextDocument::HighlightSelection, - tqrepaint ? KoTextObject::DefaultInsertFlags : KoTextObject::DoNotRepaint ); + repaint ? KoTextObject::DefaultInsertFlags : KoTextObject::DoNotRepaint ); connect( &m_textIterator, TQT_SIGNAL( currentParagraphModified( int, int, int ) ), this, TQT_SLOT( slotCurrentParagraphModified( int, int, int ) ) ); @@ -587,7 +587,7 @@ KoFormatDia::KoFormatDia( TQWidget* parent, const TQString & _caption, KoSearchC m_languageItem->setCurrentText( KoGlobal::languageFromTag( m_ctx->m_language ) ); - m_checkVertAlign = new TQCheckBox( i18n( "Vertical tqalignment:" ), page ); + m_checkVertAlign = new TQCheckBox( i18n( "Vertical alignment:" ), page ); m_familyItem = new KFontCombo(page); m_familyItem->setCurrentFont(m_ctx->m_family); diff --git a/lib/kotext/KoStyleCollection.cpp b/lib/kotext/KoStyleCollection.cpp index f8c93f01..fa0818d8 100644 --- a/lib/kotext/KoStyleCollection.cpp +++ b/lib/kotext/KoStyleCollection.cpp @@ -242,7 +242,7 @@ void KoStyleCollection::printDebug() const kdDebug() << "Style " << style << " " << style->name() << " isOutline=" << style->isOutline() << endl; kdDebug() << " format: " << style->format().key() <<endl; static const char * const s_align[] = { "Auto", "Left", "Right", "ERROR", "HCenter", "ERR", "ERR", "ERR", "Justify", }; - kdDebug() << " align: " << s_align[(TQt::AlignmentFlags)style->paragLayout().tqalignment] << endl; + kdDebug() << " align: " << s_align[(TQt::AlignmentFlags)style->paragLayout().alignment] << endl; if ( style->paragLayout().counter ) kdDebug() << " counter level=" << style->paragLayout().counter->depth() << endl; diff --git a/lib/kotext/KoStyleManager.cpp b/lib/kotext/KoStyleManager.cpp index 19840621..2c759282 100644 --- a/lib/kotext/KoStyleManager.cpp +++ b/lib/kotext/KoStyleManager.cpp @@ -345,7 +345,7 @@ void KoStyleManager::updateGUI() { void KoStyleManager::updatePreview() { d->preview->setStyle(m_currentStyle); - d->preview->tqrepaint(true); + d->preview->repaint(true); } void KoStyleManager::save() { @@ -408,7 +408,7 @@ TQString KoStyleManager::generateUniqueName() void KoStyleManager::addStyle() { save(); - TQString str = i18n( "New Style Template (%1)" ).tqarg(numStyles++); + TQString str = i18n( "New Style Template (%1)" ).arg(numStyles++); if ( m_currentStyle ) { m_currentStyle = new KoParagStyle( *m_currentStyle ); // Create a new style, initializing from the current one diff --git a/lib/kotext/KoStyleManager.h b/lib/kotext/KoStyleManager.h index af848e1d..84c75349 100644 --- a/lib/kotext/KoStyleManager.h +++ b/lib/kotext/KoStyleManager.h @@ -181,7 +181,7 @@ private: Font simple font dia Color simple color dia Spacing and Indents paragraph spacing dia (KWParagDia) -alignments KoParagDia tqalignment tab +alignments KoParagDia alignment tab borders KoParagDia borders tab numbering KoParagDia tab numbering tabulators KoParagDia tab tabs */ diff --git a/lib/kotext/KoTextCommand.cpp b/lib/kotext/KoTextCommand.cpp index fb496836..1b0f1076 100644 --- a/lib/kotext/KoTextCommand.cpp +++ b/lib/kotext/KoTextCommand.cpp @@ -211,7 +211,7 @@ KoTextCursor * KoParagFormatCommand::execute( KoTextCursor *c ) } while ( p ) { p->setFormat( m_newFormat ); - p->tqinvalidate(0); + p->invalidate(0); if ( p->paragId() == lastParag ) break; p = p->next(); diff --git a/lib/kotext/KoTextCustomItem.h b/lib/kotext/KoTextCustomItem.h index d232bedc..7df4d515 100644 --- a/lib/kotext/KoTextCustomItem.h +++ b/lib/kotext/KoTextCustomItem.h @@ -57,7 +57,7 @@ public: virtual bool ownLine() const { return FALSE; } // Called for "ownline" items virtual void resize( int nwidth ) { width = nwidth; } - virtual void tqinvalidate() {}; + virtual void invalidate() {}; virtual bool isNested() const { return FALSE; } virtual int minimumWidth() const { return 0; } @@ -69,7 +69,7 @@ public: int width; int height; - TQRect tqgeometry() const { return TQRect( xpos, ypos, width, height ); } + 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 enterAt( KoTextCursor *, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy, const TQPoint & ); diff --git a/lib/kotext/KoTextDocument.cpp b/lib/kotext/KoTextDocument.cpp index 126568ef..fe20b049 100644 --- a/lib/kotext/KoTextDocument.cpp +++ b/lib/kotext/KoTextDocument.cpp @@ -154,13 +154,13 @@ int KoTextDocument::widthUsed() const KoTextParag *p = fParag; int w = 0; while ( p ) { - int a = p->tqalignment(); + int a = p->alignment(); p->setAlignment( TQt::AlignLeft ); - p->tqinvalidate( 0 ); + p->invalidate( 0 ); p->format(); w = TQMAX( w, p->rect().width() ); p->setAlignment( a ); - p->tqinvalidate( 0 ); + p->invalidate( 0 ); p = p->next(); } return w; @@ -247,11 +247,11 @@ TQString KoTextDocument::plainText() const return buffer; } -void KoTextDocument::tqinvalidate() +void KoTextDocument::invalidate() { KoTextParag *s = fParag; while ( s ) { - s->tqinvalidate( 0 ); + s->invalidate( 0 ); s = s->next(); } } @@ -785,9 +785,9 @@ void KoTextDocument::removeSelectedText( int id, KoTextCursor *cursor ) p->move( dy ); //// kotext if ( p->paragLayout().counter ) - p->paragLayout().counter->tqinvalidate(); + p->paragLayout().counter->invalidate(); //// - p->tqinvalidate( 0 ); + p->invalidate( 0 ); //p->setEndState( -1 ); p = p->next(); } diff --git a/lib/kotext/KoTextDocument.h b/lib/kotext/KoTextDocument.h index 5f2a0665..8cf9fd4d 100644 --- a/lib/kotext/KoTextDocument.h +++ b/lib/kotext/KoTextDocument.h @@ -94,7 +94,7 @@ public: void setFirstParag( KoTextParag *p ); void setLastParag( KoTextParag *p ); - void tqinvalidate(); + void invalidate(); //void setPreProcessor( KoTextPreProcessor *sh ); //KoTextPreProcessor *preProcessor() const; @@ -189,7 +189,7 @@ public: //bool focusNextPrevChild( bool next ); - int tqalignment() const; + int alignment() const; void setAlignment( int a ); int *tabArray() const; @@ -535,7 +535,7 @@ inline KoTextFormatCollection *KoTextDocument::formatCollection() const return fCollection; } -inline int KoTextDocument::tqalignment() const +inline int KoTextDocument::alignment() const { return align; } diff --git a/lib/kotext/KoTextFormat.cpp b/lib/kotext/KoTextFormat.cpp index 24214ae4..9b8e8869 100644 --- a/lib/kotext/KoTextFormat.cpp +++ b/lib/kotext/KoTextFormat.cpp @@ -675,7 +675,7 @@ void KoTextFormat::save( KoGenStyle& gs, KoSavingContext& context, KoTextFormat void KoTextFormat::update() { //kdDebug(32500) << this << " KoTextFormat::update " << fn.family() << " " << pointSize() << endl; - m_key = TQString(); // tqinvalidate key, recalc at the next key() call + m_key = TQString(); // invalidate key, recalc at the next key() call assert( d ); d->clearCache(); // i.e. recalc at the next screenFont[Metrics]() call } diff --git a/lib/kotext/KoTextFormatter.cpp b/lib/kotext/KoTextFormatter.cpp index 7bdfbc0c..d978ba43 100644 --- a/lib/kotext/KoTextFormatter.cpp +++ b/lib/kotext/KoTextFormatter.cpp @@ -131,8 +131,8 @@ int KoTextFormatterCore::leftMargin( bool firstLine, bool includeFirstLineMargin left += parag->firstLineMargin(); // Add the width of the paragraph counter - first line of parag only. if( parag->counter() && - ( parag->counter()->tqalignment() == TQt::AlignLeft || - parag->counter()->tqalignment() == TQt::AlignAuto ) ) + ( parag->counter()->alignment() == TQt::AlignLeft || + parag->counter()->alignment() == TQt::AlignAuto ) ) left += parag->counterWidth(); // in LU pixels } return left; @@ -251,9 +251,9 @@ bool KoTextFormatterCore::format() bool lastWasNonInlineCustom = FALSE; bool abort = false; - int align = parag->tqalignment(); - if ( align == TQt::AlignAuto && doc && doc->tqalignment() != TQt::AlignAuto ) - align = doc->tqalignment(); + int align = parag->alignment(); + if ( align == TQt::AlignAuto && doc && doc->alignment() != TQt::AlignAuto ) + align = doc->alignment(); int col = 0; @@ -810,7 +810,7 @@ KoTextParagLineStart *KoTextFormatterCore::koFormatLine( if (space < 0) space = 0; - // do tqalignment Auto == Left in this case + // do alignment Auto == Left in this case if ( align & TQt::AlignHCenter || align & TQt::AlignRight ) { if ( align & TQt::AlignHCenter ) space /= 2; @@ -949,7 +949,7 @@ KoTextParagLineStart *KoTextFormatterCore::koBidiReorderLine( // now construct the reordered string out of the runs... int numSpaces = 0; - // set the correct tqalignment. This is a bit messy.... + // set the correct alignment. This is a bit messy.... if( align == TQt::AlignAuto ) { // align according to directionality of the paragraph... if ( text->isRightToLeft() ) diff --git a/lib/kotext/KoTextObject.cpp b/lib/kotext/KoTextObject.cpp index 8732d71d..06394275 100644 --- a/lib/kotext/KoTextObject.cpp +++ b/lib/kotext/KoTextObject.cpp @@ -602,10 +602,10 @@ void KoTextObject::insert( KoTextCursor * cursor, KoTextFormat * currentFormat, return; const bool checkNewLine = insertFlags & CheckNewLine; const bool removeSelected = ( insertFlags & DoNotRemoveSelected ) == 0; - const bool tqrepaint = ( insertFlags & DoNotRepaint ) == 0; + const bool repaint = ( insertFlags & DoNotRepaint ) == 0; //kdDebug(32500) << "KoTextObject::insert txt=" << txt << endl; bool tinyRepaint = !checkNewLine; - if ( tqrepaint ) + if ( repaint ) emit hideCursor(); if ( textdoc->hasSelection( selectionId, true ) && removeSelected ) { kdDebug() << k_funcinfo << "removing selection " << selectionId << endl; @@ -673,7 +673,7 @@ void KoTextObject::insert( KoTextCursor * cursor, KoTextFormat * currentFormat, } // Speed optimization: if we only type a char, and it doesn't - // tqinvalidate the next parag, only format the current one + // invalidate the next parag, only format the current one // ### This idea is wrong. E.g. when the last parag grows and must create a new page. #if 0 KoTextParag *parag = cursor->parag(); @@ -687,9 +687,9 @@ void KoTextObject::insert( KoTextCursor * cursor, KoTextFormat * currentFormat, // Doing this here means callers don't have to do it, and cursor can be positionned correctly. ensureFormatted( cursor->parag() ); - // Speed optimization: if we only type a char, only tqrepaint from current line + // Speed optimization: if we only type a char, only repaint from current line // (In fact the one before. When typing a space, a word could move up to the - // line before, we need to tqrepaint it too...) + // line before, we need to repaint it too...) if ( !checkNewLine && tinyRepaint && !wasChanged ) { // insert() called format() which called setChanged(). @@ -703,12 +703,12 @@ void KoTextObject::insert( KoTextCursor * cursor, KoTextFormat * currentFormat, parag->setLineChanged( origLine - 1 ); // if origLine=0, it'll pass -1, which is 'all' } - if ( tqrepaint ) { + if ( repaint ) { emit repaintChanged( this ); emit ensureCursorVisible(); emit showCursor(); - // we typed the first char of a paragraph in AlignAuto mode -> show correct tqalignment in UI - if ( oldCursor.index() == 0 && oldCursor.parag()->tqalignment() == TQt::AlignAuto ) + // we typed the first char of a paragraph in AlignAuto mode -> show correct alignment in UI + if ( oldCursor.index() == 0 && oldCursor.parag()->alignment() == TQt::AlignAuto ) emit updateUI( true ); } @@ -722,8 +722,8 @@ void KoTextObject::insert( KoTextCursor * cursor, KoTextFormat * currentFormat, if ( !removeSelected ) { // ## not sure why we do this. I'd prefer leaving the selection unchanged... // but then it'd need adjustements in the offsets etc. - if ( textdoc->removeSelection( selectionId ) && tqrepaint ) - selectionChangedNotify(); // does the tqrepaint + if ( textdoc->removeSelection( selectionId ) && repaint ) + selectionChangedNotify(); // does the repaint } if ( !customItemsMap.isEmpty() && !commandName.isNull() /* see replace-selection; #139890 */ ) { @@ -1066,7 +1066,7 @@ KCommand * KoTextObject::setFormatCommand( KoTextCursor * cursor, KoTextFormat * if ( cursor->parag()->length() == 1 ) { newFormat->addRef(); cursor->parag()->setFormat( newFormat ); - cursor->parag()->tqinvalidate(0); + cursor->parag()->invalidate(0); cursor->parag()->format(); emit repaintChanged( this ); } @@ -1146,7 +1146,7 @@ KCommand * KoTextObject::setAlignCommand( KoTextCursor * cursor, int align, KoTe if ( protectContent() ) return 0L; if ( !textdoc->hasSelection( selectionId, true ) && cursor && - (int)cursor->parag()->tqalignment() == align ) + (int)cursor->parag()->alignment() == align ) return 0L; // No change needed. emit hideCursor(); @@ -1165,7 +1165,7 @@ KCommand * KoTextObject::setAlignCommand( KoTextCursor * cursor, int align, KoTe } formatMore( 2 ); emit repaintChanged( this ); - undoRedoInfo.newParagLayout.tqalignment = align; + undoRedoInfo.newParagLayout.alignment = align; KoTextParagCommand *cmd = new KoTextParagCommand( textdoc, undoRedoInfo.id, undoRedoInfo.eid, undoRedoInfo.oldParagLayouts, undoRedoInfo.newParagLayout, @@ -1547,7 +1547,7 @@ void KoTextObject::removeSelectedText( KoTextCursor * cursor, KoTextDocument::Se undoRedoInfo.clear(); } -KCommand * KoTextObject::removeSelectedTextCommand( KoTextCursor * cursor, KoTextDocument::SelectionId selectionId, bool tqrepaint ) +KCommand * KoTextObject::removeSelectedTextCommand( KoTextCursor * cursor, KoTextDocument::SelectionId selectionId, bool repaint ) { if ( protectContent() ) return 0L; @@ -1578,7 +1578,7 @@ KCommand * KoTextObject::removeSelectedTextCommand( KoTextCursor * cursor, KoTex undoRedoInfo.type = UndoRedoInfo::Invalid; // we don't want clear() to create a command undoRedoInfo.clear(); - if ( tqrepaint ) + if ( repaint ) selectionChangedNotify(); return macroCmd; } @@ -1592,8 +1592,8 @@ KCommand* KoTextObject::replaceSelectionCommand( KoTextCursor * cursor, const TQ if ( protectContent() ) return 0L; Q_ASSERT( ( insertFlags & DoNotRemoveSelected ) == 0 ); // nonsensical - const bool tqrepaint = ( insertFlags & DoNotRepaint ) == 0; // DoNotRepaint is set during search/replace - if ( tqrepaint ) + const bool repaint = ( insertFlags & DoNotRepaint ) == 0; // DoNotRepaint is set during search/replace + if ( repaint ) emit hideCursor(); // This could be improved to use a macro command only when there's a selection to remove. KMacroCommand * macroCmd = new KMacroCommand( cmdName ); @@ -1604,7 +1604,7 @@ KCommand* KoTextObject::replaceSelectionCommand( KoTextCursor * cursor, const TQ format->addRef(); // Remove selected text, if any - KCommand* removeSelCmd = removeSelectedTextCommand( cursor, selectionId, tqrepaint ); + KCommand* removeSelCmd = removeSelectedTextCommand( cursor, selectionId, repaint ); if ( removeSelCmd ) macroCmd->addCommand( removeSelCmd ); @@ -1625,7 +1625,7 @@ KCommand* KoTextObject::replaceSelectionCommand( KoTextCursor * cursor, const TQ format->removeRef(); setLastFormattedParag( c1.parag() ); - if ( tqrepaint ) + if ( repaint ) { formatMore( 2 ); emit repaintChanged( this ); @@ -1645,7 +1645,7 @@ KCommand * KoTextObject::insertParagraphCommand( KoTextCursor *cursor ) return replaceSelectionCommand( cursor, "\n", TQString(), KoTextDocument::Standard, CheckNewLine ); } -void KoTextObject::highlightPortion( KoTextParag * parag, int index, int length, bool tqrepaint ) +void KoTextObject::highlightPortion( KoTextParag * parag, int index, int length, bool repaint ) { if ( !m_highlightSelectionAdded ) { @@ -1656,20 +1656,20 @@ void KoTextObject::highlightPortion( KoTextParag * parag, int index, int length, m_highlightSelectionAdded = true; } - removeHighlight(tqrepaint); // remove previous highlighted selection + removeHighlight(repaint); // remove previous highlighted selection KoTextCursor cursor( textdoc ); cursor.setParag( parag ); cursor.setIndex( index ); textdoc->setSelectionStart( KoTextDocument::HighlightSelection, &cursor ); cursor.setIndex( index + length ); textdoc->setSelectionEnd( KoTextDocument::HighlightSelection, &cursor ); - if ( tqrepaint ) { + if ( repaint ) { parag->setChanged( true ); emit repaintChanged( this ); } } -void KoTextObject::removeHighlight(bool tqrepaint) +void KoTextObject::removeHighlight(bool repaint) { if ( textdoc->hasSelection( KoTextDocument::HighlightSelection, true ) ) { @@ -1677,7 +1677,7 @@ void KoTextObject::removeHighlight(bool tqrepaint) oldParag->setChanged( true ); textdoc->removeSelection( KoTextDocument::HighlightSelection ); } - if ( tqrepaint ) + if ( repaint ) emit repaintChanged( this ); } @@ -1831,7 +1831,7 @@ bool KoTextObject::formatMore( int count /* = 10 */, bool emitAfterFormatting /* } #ifdef DEBUG_FORMAT_MORE TQString id; - if ( m_lastFormatted ) id = TQString(" (%1)").tqarg(m_lastFormatted->paragId()); + if ( m_lastFormatted ) id = TQString(" (%1)").arg(m_lastFormatted->paragId()); kdDebug(32500) << "formatMore finished formatting. " << " bottom=" << bottom << " m_lastFormatted=" << m_lastFormatted << id @@ -2041,13 +2041,13 @@ TQString KoTextObject::textChangedCase(const TQString& _text,KoChangeCaseDia::Ty case KoChangeCaseDia::TitleCase: for(uint i=0;i<text.length();i++) { - if(text.tqat(i)!=' ') + if(text.at(i)!=' ') { - TQChar prev = text.tqat(TQMAX(i-1,0)); + TQChar prev = text.at(TQMAX(i-1,0)); if(i==0 || prev == ' ' || prev == '\n' || prev == '\t') - text=text.replace(i, 1, text.tqat(i).upper() ); + text=text.replace(i, 1, text.at(i).upper() ); else - text=text.replace(i, 1, text.tqat(i).lower() ); + text=text.replace(i, 1, text.at(i).lower() ); } } break; @@ -2055,9 +2055,9 @@ TQString KoTextObject::textChangedCase(const TQString& _text,KoChangeCaseDia::Ty for(uint i=0;i<text.length();i++) { TQString repl=TQString(text.at(i)); - if(text.tqat(i)!=text.tqat(i).upper()) + if(text.at(i)!=text.at(i).upper()) repl=repl.upper(); - else if(text.tqat(i).lower()!=text.tqat(i)) + else if(text.at(i).lower()!=text.at(i)) repl=repl.lower(); text=text.replace(i, 1, repl ); } @@ -2069,7 +2069,7 @@ TQString KoTextObject::textChangedCase(const TQString& _text,KoChangeCaseDia::Ty { TQChar prev = text.at(TQMAX(i-1,0)); if(i==0 || prev == '\n' ||prev.isPunct()) - text=text.replace(i, 1, text.tqat(i).upper() ); + text=text.replace(i, 1, text.at(i).upper() ); } } break; @@ -2167,7 +2167,7 @@ KoTextCursor KoTextObject::pasteOasisText( const TQDomElement &bodyElem, KoOasis context.styleStack().restore(); lastParagraph->setChanged( true ); - lastParagraph->tqinvalidate( 0 ); + lastParagraph->invalidate( 0 ); // Now split this parag, to make room for the next paragraphs resultCursor.setParag( lastParagraph ); @@ -2692,7 +2692,7 @@ KCommand *KoTextFormatInterface::setDefaultFormatCommand() KCommand *KoTextFormatInterface::setAlignCommand(int align) { KoParagLayout format( *currentParagLayoutFormat() ); - format.tqalignment=align; + format.alignment=align; return setParagLayoutFormatCommand(&format,KoParagLayout::Alignment); } diff --git a/lib/kotext/KoTextObject.h b/lib/kotext/KoTextObject.h index 15574075..90693bed 100644 --- a/lib/kotext/KoTextObject.h +++ b/lib/kotext/KoTextObject.h @@ -251,7 +251,7 @@ public: CheckNewLine = 1, /// < if true, the text to be inserted is checked for '\\n' (as a paragraph delimiter) OverwriteMode = 2, DoNotRemoveSelected = 4, ///< whether to remove selected text before - DoNotRepaint = 8 ///< usually we tqrepaint in insert(), this allows to turn it off + DoNotRepaint = 8 ///< usually we repaint in insert(), this allows to turn it off }; /** @@ -286,7 +286,7 @@ public: KoTextDocument::SelectionId selectionId = KoTextDocument::Standard, int insertFlags = DefaultInsertFlags, // KDE4: TODO use TQFlags CustomItemsMap customItemsMap = CustomItemsMap() ); - KCommand * removeSelectedTextCommand( KoTextCursor * cursor, KoTextDocument::SelectionId selectionId, bool tqrepaint = true ); + KCommand * removeSelectedTextCommand( KoTextCursor * cursor, KoTextDocument::SelectionId selectionId, bool repaint = true ); KCommand* insertParagraphCommand( KoTextCursor * cursor ); /** @@ -308,8 +308,8 @@ public: /** Highlighting support (for search/replace, spellchecking etc.). * Don't forget to ensure the paragraph is visible. */ - void highlightPortion( KoTextParag * parag, int index, int length, bool tqrepaint ); - void removeHighlight( bool tqrepaint ); + void highlightPortion( KoTextParag * parag, int index, int length, bool repaint ); + void removeHighlight( bool repaint ); /** Implementation of setFormatCommand from KoTextFormatInterface - apply change to the whole document */ KCommand *setFormatCommand( const KoTextFormat *format, int flags, bool zoomFont = false ); 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, diff --git a/lib/kotext/KoTextParag.h b/lib/kotext/KoTextParag.h index 591242a2..f42c3285 100644 --- a/lib/kotext/KoTextParag.h +++ b/lib/kotext/KoTextParag.h @@ -93,7 +93,7 @@ public: void format( int start = -1, bool doMove = TRUE ); /// Call this to ensure that format() will be called on this paragraph later on - void tqinvalidate( int chr /*ignored*/ = 0 ); + void invalidate( int chr /*ignored*/ = 0 ); /// Returns false if format() needs to be called on this paragraph bool isValid() const; @@ -132,7 +132,7 @@ public: void setAlignment( uint a ); void setAlignmentDirect( uint a ) { align = a; } - uint tqalignment() const; + uint alignment() const; virtual void paint( TQPainter &painter, const TQColorGroup &cg, KoTextCursor *cursor, bool drawSelections, int clipx, int clipy, int clipw, int cliph ); // kotextparag.cc @@ -235,9 +235,9 @@ public: void setLineSpacingType( KoParagLayout::SpacingType _type ); - /** Use this to change the paragraph tqalignment, not KoTextParag::setAlignment ! */ + /** Use this to change the paragraph alignment, not KoTextParag::setAlignment ! */ void setAlign( int align ); - /** Return the real tqalignment: Auto is resolved to either Left or Right */ + /** Return the real alignment: Auto is resolved to either Left or Right */ int resolveAlignment() const; /// The part of the top margin that can be broken by a page break @@ -328,7 +328,7 @@ public: /** * Load a section of text from a oasis based xml tree. - * @param parent the xml element that has content as tqchildren. + * @param parent the xml element that has content as children. * @param context the context * @param stripLeadingSpace whether to remove leading literal whitespace */ @@ -336,7 +336,7 @@ public: /** * Load a section of text from a oasis based xml tree. - * @param parent the xml element that has content as tqchildren. + * @param parent the xml element that has content as children. * @param context the context * @param stripLeadingSpace whether to remove leading literal whitespace * @param hasTrailingSpace whether there was trailing literal whitespace in the span's text @@ -525,13 +525,13 @@ inline void KoTextParag::setAlignment( uint a ) if ( a == align ) return; align = a; - tqinvalidate( 0 ); + invalidate( 0 ); } /*inline void KoTextParag::setListStyle( TQStyleSheetItem::ListStyle ls ) { lstyle = ls; - tqinvalidate( 0 ); + invalidate( 0 ); } inline TQStyleSheetItem::ListStyle KoTextParag::listStyle() const diff --git a/lib/kotext/KoTextView.cpp b/lib/kotext/KoTextView.cpp index e272422d..6211e1d8 100644 --- a/lib/kotext/KoTextView.cpp +++ b/lib/kotext/KoTextView.cpp @@ -900,7 +900,7 @@ bool KoTextView::insertParagraph(const TQPoint &pos) if ( pos.x() + f->width(' ') >= textDocument()->width()) { //FIXME me bidi. - //change parag tqalignment => right tqalignment + //change parag alignment => right alignment last->setAlignment( TQt::AlignRight ); } else @@ -1207,7 +1207,7 @@ bool KoTextView::openLink( KoLinkVariable* variable ) } else { - KMessageBox::sorry( 0, i18n("%1 is not a valid link.").tqarg( variable->url() ) ); + KMessageBox::sorry( 0, i18n("%1 is not a valid link.").arg( variable->url() ) ); return false; } } diff --git a/lib/kotext/KoVariable.cpp b/lib/kotext/KoVariable.cpp index 4b744faf..70eab87e 100644 --- a/lib/kotext/KoVariable.cpp +++ b/lib/kotext/KoVariable.cpp @@ -532,7 +532,7 @@ TQValueList<KoVariable *> KoVariableCollection::recalcVariables(int type) if ( parag ) { //kdDebug(32500) << "KoDoc::recalcVariables -> invalidating parag " << parag->paragId() << endl; - parag->tqinvalidate( 0 ); + parag->invalidate( 0 ); parag->setChanged( true ); } } @@ -896,7 +896,7 @@ void KoVariable::recalcAndRepaint() if ( parag ) { //kdDebug(32500) << "KoVariable::recalcAndRepaint -> invalidating parag " << parag->paragId() << endl; - parag->tqinvalidate( 0 ); + parag->invalidate( 0 ); parag->setChanged( true ); } textDocument()->emitRepaintChanged(); @@ -1319,9 +1319,9 @@ void KoDateVariable::saveOasis( KoXmlWriter& writer, KoSavingContext& context ) else if ( value.lower() == "localeshort" ) value = KGlobal::locale()->dateFormatShort(); else if ( value.lower() == "localedatetime" ) - value = TQString( "%1 %2" ).tqarg( KGlobal::locale()->dateFormat() ).tqarg( KGlobal::locale()->timeFormat() ); + value = TQString( "%1 %2" ).arg( KGlobal::locale()->dateFormat() ).arg( KGlobal::locale()->timeFormat() ); else if ( value.lower() == "localedatetimeshort" ) - value = TQString( "%1 %2" ).tqarg( KGlobal::locale()->dateFormatShort() ).tqarg( KGlobal::locale()->timeFormat() ); + value = TQString( "%1 %2" ).arg( KGlobal::locale()->dateFormatShort() ).arg( KGlobal::locale()->timeFormat() ); klocaleFormat = true; } writer.addAttribute( "style:data-style-name", KoOasisStyles::saveOasisDateStyle(context.mainStyles(), value, klocaleFormat ) ); diff --git a/lib/kotext/KoVariable.h b/lib/kotext/KoVariable.h index 88f17975..fce8fc2d 100644 --- a/lib/kotext/KoVariable.h +++ b/lib/kotext/KoVariable.h @@ -405,7 +405,7 @@ public: TQVariant varValue() const { return m_varValue; } /** - * Ask this variable to recalculate and to tqrepaint itself + * Ask this variable to recalculate and to repaint itself * Only use this if you're working on a single variable (e.g. popupmenu). * Otherwise, better do the repainting all at once. * @see KoVariableCollection::recalcVariables() diff --git a/lib/kotext/kohyphen/kohyphen.cpp b/lib/kotext/kohyphen/kohyphen.cpp index d8a0374e..abb00a29 100644 --- a/lib/kotext/kohyphen/kohyphen.cpp +++ b/lib/kotext/kohyphen/kohyphen.cpp @@ -177,10 +177,10 @@ HyphenDict *KoHyphenator::dict(const TQString &_lang) const if ( underscore > -1 ) { lang.truncate( underscore ); if (encodings.find(lang) == encodings.end()) - throw KoHyphenatorException( TQString("No dictionary for %1").tqarg(lang) ); + throw KoHyphenatorException( TQString("No dictionary for %1").arg(lang) ); } else - throw KoHyphenatorException( TQString("No dictionary for %1").tqarg(lang) ); + throw KoHyphenatorException( TQString("No dictionary for %1").arg(lang) ); } if (dicts.find(lang) == dicts.end()) { @@ -199,11 +199,11 @@ HyphenDict *KoHyphenator::dict(const TQString &_lang) const #ifdef DEBUG_HYPHENATOR kdDebug() << "No dictionary loaded" << endl; #endif - throw(KoHyphenatorException( TQString("Could not load dictionary for the language: %1").tqarg(lang) )); + throw(KoHyphenatorException( TQString("Could not load dictionary for the language: %1").arg(lang) )); } } else - throw(KoHyphenatorException( TQString("Could not load dictionary for the language: %1").tqarg(lang) )); + throw(KoHyphenatorException( TQString("Could not load dictionary for the language: %1").arg(lang) )); } return dicts[lang]; } diff --git a/lib/kotext/tests/kotextformattertest.cpp b/lib/kotext/tests/kotextformattertest.cpp index a13adddb..6721f771 100644 --- a/lib/kotext/tests/kotextformattertest.cpp +++ b/lib/kotext/tests/kotextformattertest.cpp @@ -89,7 +89,7 @@ void KoTextFormatterTest::speedTest() // Format it 50 times for ( uint i = 0 ; i < 50 ; ++i ) { - parag->tqinvalidate(0); + parag->invalidate(0); parag->format(); } doc->clear(false); |