diff options
Diffstat (limited to 'lib/kotext/KoTextFormat.cpp')
-rw-r--r-- | lib/kotext/KoTextFormat.cpp | 354 |
1 files changed, 177 insertions, 177 deletions
diff --git a/lib/kotext/KoTextFormat.cpp b/lib/kotext/KoTextFormat.cpp index ff4de62c..7395a050 100644 --- a/lib/kotext/KoTextFormat.cpp +++ b/lib/kotext/KoTextFormat.cpp @@ -29,8 +29,8 @@ #include <kdebug.h> #include <klocale.h> -#include <qapplication.h> -#include <qregexp.h> +#include <tqapplication.h> +#include <tqregexp.h> #include <assert.h> void KoTextFormat::KoTextFormatPrivate::clearCache() @@ -60,9 +60,9 @@ KoTextFormat::KoTextFormat() va = AlignNormal; collection = 0; //// kotext: WYSIWYG works much much better with scalable fonts -> force it to be scalable - fn.setStyleStrategy( QFont::ForceOutline ); + fn.setStyleStrategy( TQFont::ForceOutline ); d = new KoTextFormatPrivate; - m_textUnderlineColor=QColor(); + m_textUnderlineColor=TQColor(); m_underlineType = U_NONE; m_strikeOutType = S_NONE; m_underlineStyle = U_SOLID; @@ -82,11 +82,11 @@ KoTextFormat::KoTextFormat() //#endif } -KoTextFormat::KoTextFormat( const QFont &f, const QColor &c, const QString &_language, bool hyphenation, KoTextFormatCollection *parent ) - : fn( f ), col( c ) /*fm( QFontMetrics( f ) ),*/ //linkColor( TRUE ) +KoTextFormat::KoTextFormat( const TQFont &f, const TQColor &c, const TQString &_language, bool hyphenation, KoTextFormatCollection *tqparent ) + : fn( f ), col( c ) /*fm( TQFontMetrics( f ) ),*/ //linkColor( TRUE ) { #ifdef DEBUG_COLLECTION - kdDebug(32500) << "KoTextFormat with font & color & parent (" << parent << "), addRef. " << this << endl; + kdDebug(32500) << "KoTextFormat with font & color & tqparent (" << tqparent << "), addRef. " << this << endl; #endif int pointSize; if ( f.pointSize() == -1 ) // font was set with a pixelsize, we need a pointsize! @@ -95,9 +95,9 @@ KoTextFormat::KoTextFormat( const QFont &f, const QColor &c, const QString &_lan pointSize = f.pointSize(); fn.setPointSize( pointSize ); // WYSIWYG works much much better with scalable fonts -> force it to be scalable - fn.setStyleStrategy( QFont::ForceOutline ); + fn.setStyleStrategy( TQFont::ForceOutline ); ref = 0; - collection = parent; + collection = tqparent; //leftBearing = fm.minLeftBearing(); //rightBearing = fm.minRightBearing(); //hei = fm.height(); @@ -107,7 +107,7 @@ KoTextFormat::KoTextFormat( const QFont &f, const QColor &c, const QString &_lan va = AlignNormal; //// kotext d = new KoTextFormatPrivate; - m_textUnderlineColor = QColor(); + m_textUnderlineColor = TQColor(); m_underlineType = U_NONE; m_strikeOutType = S_NONE; m_underlineStyle = U_SOLID; @@ -127,29 +127,29 @@ KoTextFormat::KoTextFormat( const QFont &f, const QColor &c, const QString &_lan addRef(); } -KoTextFormat::KoTextFormat( const QFont &_font, +KoTextFormat::KoTextFormat( const TQFont &_font, VerticalAlignment _valign, - const QColor & _color, - const QColor & _backGroundColor, - const QColor & _underlineColor, + const TQColor & _color, + const TQColor & _backGroundColor, + const TQColor & _underlineColor, KoTextFormat::UnderlineType _underlineType, KoTextFormat::UnderlineStyle _underlineStyle, KoTextFormat::StrikeOutType _strikeOutType, KoTextFormat::StrikeOutStyle _strikeOutStyle, KoTextFormat::AttributeStyle _fontAttribute, - const QString &_language, + const TQString &_language, double _relativeTextSize, int _offsetFromBaseLine, bool _wordByWord, bool _hyphenation, double _shadowDistanceX, double _shadowDistanceY, - const QColor& _shadowColor ) + const TQColor& _shadowColor ) { ref = 0; collection = 0; fn = _font; - fn.setStyleStrategy( QFont::ForceOutline ); + fn.setStyleStrategy( TQFont::ForceOutline ); col = _color; missp = false; va = _valign; @@ -188,8 +188,8 @@ KoTextFormat::~KoTextFormat() // Removing a format that is in the collection is forbidden, in fact. // It should have been removed from the collection before being deleted. #ifndef NDEBUG - if ( parent() && parent()->defaultFormat() ) // not when destroying the collection - assert( ! ( parent()->dict().find( key() ) == this ) ); + if ( tqparent() && tqparent()->defaultFormat() ) // not when destroying the collection + assert( ! ( tqparent()->dict().tqfind( key() ) == this ) ); // (has to be the same pointer, not only the same key) #endif delete d; @@ -241,15 +241,15 @@ KoTextFormat& KoTextFormat::operator=( const KoTextFormat &f ) } // Helper for load -static void importTextPosition( const QString& text_position, double fontSize, KoTextFormat::VerticalAlignment& value, double& relativetextsize, int& offset, KoOasisContext& context ) +static void importTextPosition( const TQString& text_position, double fontSize, KoTextFormat::VerticalAlignment& value, double& relativetextsize, int& offset, KoOasisContext& context ) { //OO: <vertical position (% or sub or super)> [<size as %>] //Examples: "super" or "super 58%" or "82% 58%" (where 82% is the vertical position) - QStringList lst = QStringList::split( ' ', text_position ); + TQStringList lst = TQStringList::split( ' ', text_position ); if ( !lst.isEmpty() ) { - QString textPos = lst.front().stripWhiteSpace(); - QString textSize; + TQString textPos = lst.front().stripWhiteSpace(); + TQString textSize; lst.pop_front(); if ( !lst.isEmpty() ) textSize = lst.front().stripWhiteSpace(); @@ -265,7 +265,7 @@ static void importTextPosition( const QString& text_position, double fontSize, K { textPos.truncate( textPos.length() - 1 ); double val = textPos.toDouble(); - offset = qRound( fontSize * val / 100.0 ); + offset = tqRound( fontSize * val / 100.0 ); value = KoTextFormat::AlignCustom; } else if ( textPos == "super" ) @@ -285,7 +285,7 @@ static void importTextPosition( const QString& text_position, double fontSize, K } // OASIS 14.2.29 -static void importOasisUnderline( const QString& type, const QString& style, +static void importOasisUnderline( const TQString& type, const TQString& style, KoTextFormat::UnderlineType& underline, KoTextFormat::UnderlineStyle& styleline ) { @@ -317,7 +317,7 @@ static void importOasisUnderline( const QString& type, const QString& style, // We should separate them in kotext... } -QString exportOasisUnderline( KoTextFormat::UnderlineStyle styleline ) +TQString exportOasisUnderline( KoTextFormat::UnderlineStyle styleline ) { switch( styleline ) { case KoTextFormat::U_DOT: @@ -334,7 +334,7 @@ QString exportOasisUnderline( KoTextFormat::UnderlineStyle styleline ) } // Helper for load. Legacy OO format. -static void importUnderline( const QString& in, +static void importUnderline( const TQString& in, KoTextFormat::UnderlineType& underline, KoTextFormat::UnderlineStyle& styleline ) { @@ -383,7 +383,7 @@ void KoTextFormat::load( KoOasisContext& context ) if ( styleStack.hasAttributeNS( KoXmlNS::fo, "font-family" ) // 3.10.9 || styleStack.hasAttributeNS( KoXmlNS::style, "font-name") ) { // 3.10.8 // Hmm, the remove "'" could break it's in the middle of the fontname... - QString fontName = styleStack.attributeNS( KoXmlNS::fo, "font-family" ).remove( "'" ); + TQString fontName = styleStack.attributeNS( KoXmlNS::fo, "font-family" ).remove( "'" ); if (fontName.isEmpty()) { // ##### TODO. This is wrong. style:font-name refers to a font-decl entry. // We have to look it up there, and retrieve _all_ font attributes from it, not just the name. @@ -394,7 +394,7 @@ void KoTextFormat::load( KoOasisContext& context ) if ( fontName == "Thorndale" ) fontName = "Times New Roman"; - fontName.remove(QRegExp("\\sCE$")); // Arial CE -> Arial + fontName.remove(TQRegExp("\\sCE$")); // Arial CE -> Arial fn.setFamily( fontName ); } if ( styleStack.hasAttributeNS( KoXmlNS::fo, "font-size" ) ) { // 3.10.14 @@ -402,14 +402,14 @@ void KoTextFormat::load( KoOasisContext& context ) fn.setPointSizeFloat( pointSize ); } if ( styleStack.hasAttributeNS( KoXmlNS::fo, "font-weight" ) ) { // 3.10.24 - QString fontWeight = styleStack.attributeNS( KoXmlNS::fo, "font-weight" ); + TQString fontWeight = styleStack.attributeNS( KoXmlNS::fo, "font-weight" ); int boldness; if ( fontWeight == "normal" ) boldness = 50; else if ( fontWeight == "bold" ) boldness = 75; else - // XSL/CSS has 100,200,300...900. Not the same scale as Qt! + // XSL/CSS has 100,200,300...900. Not the same scale as TQt! // See http://www.w3.org/TR/2001/REC-xsl-20011015/slice7.html#font-weight boldness = fontWeight.toInt() / 10; fn.setWeight( boldness ); @@ -427,7 +427,7 @@ void KoTextFormat::load( KoOasisContext& context ) d->m_bWordByWord = (styleStack.hasAttributeNS( KoXmlNS::fo, "score-spaces")) // 3.10.25 && (styleStack.attributeNS( KoXmlNS::fo, "score-spaces") == "false"); if( styleStack.hasAttributeNS( KoXmlNS::style, "text-crossing-out" )) { // 3.10.6 - QString strikeOutType = styleStack.attributeNS( KoXmlNS::style, "text-crossing-out" ); + TQString strikeOutType = styleStack.attributeNS( KoXmlNS::style, "text-crossing-out" ); if( strikeOutType =="double-line") m_strikeOutType = S_DOUBLE; else if( strikeOutType =="single-line") @@ -448,7 +448,7 @@ void KoTextFormat::load( KoOasisContext& context ) importUnderline( styleStack.attributeNS( KoXmlNS::style, "text-underline" ), m_underlineType, m_underlineStyle ); } - QString underLineColor = styleStack.attributeNS( KoXmlNS::style, "text-underline-color" ); // OO 3.10.23, OASIS 14.4.31 + TQString underLineColor = styleStack.attributeNS( KoXmlNS::style, "text-underline-color" ); // OO 3.10.23, OASIS 14.4.31 if ( !underLineColor.isEmpty() && underLineColor != "font-color" ) m_textUnderlineColor.setNamedColor( underLineColor ); @@ -480,7 +480,7 @@ void KoTextFormat::load( KoOasisContext& context ) if ( smallCaps ) { m_attributeFont = ATT_SMALL_CAPS; } else { - QString textTransform = styleStack.attributeNS( KoXmlNS::fo, "text-transform" ); + TQString textTransform = styleStack.attributeNS( KoXmlNS::fo, "text-transform" ); if ( textTransform == "uppercase" ) m_attributeFont = ATT_UPPER; else if ( textTransform == "lowercase" ) @@ -490,14 +490,14 @@ void KoTextFormat::load( KoOasisContext& context ) } if ( styleStack.hasAttributeNS( KoXmlNS::fo, "language") ) { // 3.10.17 m_language = styleStack.attributeNS( KoXmlNS::fo, "language"); - const QString country = styleStack.attributeNS( KoXmlNS::fo, "country" ); + const TQString country = styleStack.attributeNS( KoXmlNS::fo, "country" ); if ( !country.isEmpty() ) { m_language += '_'; m_language += country; } } if ( styleStack.hasAttributeNS( KoXmlNS::fo, "background-color") ) { - QString tmp = styleStack.attributeNS( KoXmlNS::fo, "background-color"); + TQString tmp = styleStack.attributeNS( KoXmlNS::fo, "background-color"); if (tmp != "transparent") m_textBackColor.setNamedColor( tmp ); } @@ -518,7 +518,7 @@ void KoTextFormat::load( KoOasisContext& context ) style:font-family-generic, 3.10.10 - roman, swiss, modern -> map to a font? style:font-style-name, 3.10.11 - can be ignored, says DV, the other ways to specify a font are more precise style:font-pitch, 3.10.12 - fixed or variable -> map to a font? - style:font-charset, 3.10.14 - not necessary with Qt + style:font-charset, 3.10.14 - not necessary with TQt style:font-size-rel, 3.10.15 - TODO in StyleStack::fontSize() fo:letter-spacing, 3.10.16 - not implemented in kotext style:text-relief, 3.10.20 - not implemented in kotext @@ -557,7 +557,7 @@ void KoTextFormat::save( KoGenStyle& gs, KoSavingContext& context, KoTextFormat int w = fn.weight(); if ( !refFormat || w != refFormat->font().weight() ) { - gs.addProperty( "fo:font-weight", w == 50 ? "normal" : w == 75 ? "bold" : QString::number( qRound( w / 10 ) * 100 ), tt ); + gs.addProperty( "fo:font-weight", w == 50 ? "normal" : w == 75 ? "bold" : TQString::number( tqRound( w / 10 ) * 100 ), tt ); } if ( !refFormat || this->font().italic() != refFormat->font().italic() ) { @@ -572,7 +572,7 @@ void KoTextFormat::save( KoGenStyle& gs, KoSavingContext& context, KoTextFormat { gs.addProperty( "style:text-underline-type", m_underlineType == U_NONE ? "none" : m_underlineType == U_DOUBLE ? "double" : "single", tt ); - QString styleline; + TQString styleline; if ( m_underlineType == U_WAVE ) styleline = "wave"; else @@ -593,7 +593,7 @@ void KoTextFormat::save( KoGenStyle& gs, KoSavingContext& context, KoTextFormat // TODO U_SIMPLE_BOLD // TODO style:text-line-through-mode gs.addProperty( "style:text-line-through-type", m_strikeOutType == S_DOUBLE ? "double" : "single", tt ); - const QString styleline = exportOasisUnderline( (UnderlineStyle) m_strikeOutStyle ); + const TQString styleline = exportOasisUnderline( (UnderlineStyle) m_strikeOutStyle ); gs.addProperty( "style:text-line-through-style", styleline, tt ); //gs.addProperty( "style:text-line-through-color", ...) TODO in kotext } @@ -606,16 +606,16 @@ void KoTextFormat::save( KoGenStyle& gs, KoSavingContext& context, KoTextFormat if ( !refFormat || (this->vAlign() != refFormat->vAlign()) || (this->relativeTextSize() != refFormat->relativeTextSize()) ) { - QString textPos; + TQString textPos; if ( d->m_offsetFromBaseLine != 0 ) - textPos = QString::number( 100 * d->m_offsetFromBaseLine / fn.pointSizeFloat() ) + '%'; + textPos = TQString::number( 100 * d->m_offsetFromBaseLine / fn.pointSizeFloat() ) + '%'; else if ( va == AlignSuperScript ) textPos = "super"; else if ( va == AlignSubScript ) textPos = "sub"; else textPos = "0%"; // AlignNormal if ( va != AlignNormal ) { textPos += ' '; - textPos += QString::number( d->m_relativeTextSize * 100 ); + textPos += TQString::number( d->m_relativeTextSize * 100 ); textPos += '%'; } gs.addProperty( "style:text-position", textPos, tt ); @@ -643,9 +643,9 @@ void KoTextFormat::save( KoGenStyle& gs, KoSavingContext& context, KoTextFormat if( !refFormat || this->language() != refFormat->language()) { - QString lang = m_language; - QString country; - const int pos = lang.find( '_' ); + TQString lang = m_language; + TQString country; + const int pos = lang.tqfind( '_' ); if ( pos != -1 ) { country = lang.mid( pos + 1 ); lang = lang.left( pos ); @@ -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 = QString::null; // invalidate key, recalc at the next key() call + m_key = TQString(); // tqinvalidate key, recalc at the next key() call assert( d ); d->clearCache(); // i.e. recalc at the next screenFont[Metrics]() call } @@ -775,7 +775,7 @@ void KoTextFormat::setUnderline( bool b ) update(); } -void KoTextFormat::setFamily( const QString &f ) +void KoTextFormat::setFamily( const TQString &f ) { if ( f == fn.family() ) return; @@ -791,16 +791,16 @@ void KoTextFormat::setPointSize( int s ) update(); } -void KoTextFormat::setFont( const QFont &f ) +void KoTextFormat::setFont( const TQFont &f ) { if ( f == fn ) return; fn = f; - fn.setStyleStrategy( QFont::ForceOutline ); + fn.setStyleStrategy( TQFont::ForceOutline ); update(); } -void KoTextFormat::setColor( const QColor &c ) +void KoTextFormat::setColor( const TQColor &c ) { if ( c == col ) return; @@ -827,49 +827,49 @@ int KoTextFormat::minRightBearing() const #endif // ## Maybe we need a binary form for speed when NDEBUG, and to keep the -// ## readable form when !NDEBUG, like QFont does? +// ## readable form when !NDEBUG, like TQFont does? void KoTextFormat::generateKey() { - QString k = fn.key(); + TQString k = fn.key(); k += '/'; if ( col.isValid() ) // just to shorten the key in the common case - k += QString::number( (uint)col.rgb() ); + k += TQString::number( (uint)col.rgb() ); k += '/'; - k += QString::number( (int)isMisspelled() ); // 1 digit, no need for '/' - k += QString::number( (int)vAlign() ); + k += TQString::number( (int)isMisspelled() ); // 1 digit, no need for '/' + k += TQString::number( (int)vAlign() ); //// kotext addition k += '/'; if (m_textBackColor.isValid()) - k += QString::number( (uint)m_textBackColor.rgb() ); + k += TQString::number( (uint)m_textBackColor.rgb() ); k += '/'; if ( m_textUnderlineColor.isValid()) - k += QString::number( (uint)m_textUnderlineColor.rgb() ); + k += TQString::number( (uint)m_textUnderlineColor.rgb() ); k += '/'; - k += QString::number( (int)m_underlineType ); // a digit each, no need for '/' - k += QString::number( (int)m_strikeOutType ); - k += QString::number( (int)m_underlineStyle ); - k += QString::number( (int)m_strikeOutStyle ); + k += TQString::number( (int)m_underlineType ); // a digit each, no need for '/' + k += TQString::number( (int)m_strikeOutType ); + k += TQString::number( (int)m_underlineStyle ); + k += TQString::number( (int)m_strikeOutStyle ); k += '/'; k += m_language; k += '/'; if ( d->m_shadowDistanceX != 0 || d->m_shadowDistanceY != 0 ) { - k += QString::number( d->m_shadowDistanceX ); + k += TQString::number( d->m_shadowDistanceX ); k += '/'; - k += QString::number( d->m_shadowDistanceY ); + k += TQString::number( d->m_shadowDistanceY ); k += '/'; - k += QString::number( (uint)d->m_shadowColor.rgb() ); + k += TQString::number( (uint)d->m_shadowColor.rgb() ); } k += '/'; - k += QString::number( d->m_relativeTextSize); + k += TQString::number( d->m_relativeTextSize); k += '/'; - k += QString::number( d->m_offsetFromBaseLine); + k += TQString::number( d->m_offsetFromBaseLine); k += '/'; - k += QString::number( (int)d->m_bWordByWord); // boolean -> 1 digit -> no '/' - k += QString::number( (int)m_attributeFont); + k += TQString::number( (int)d->m_bWordByWord); // boolean -> 1 digit -> no '/' + k += TQString::number( (int)m_attributeFont); k += '/'; - k += QString::number( (int)d->m_bHyphenation); // boolean -> 1 digit -> no '/' - k += QString::number( (double)d->m_underLineWidth); + k += TQString::number( (int)d->m_bHyphenation); // boolean -> 1 digit -> no '/' + k += TQString::number( (double)d->m_underLineWidth); //// // Keep in sync with method below m_key = k; @@ -877,27 +877,27 @@ void KoTextFormat::generateKey() // This is used to create "simple formats", with font and color etc., but without // advanced features. Doesn't matter, don't extend the args. -QString KoTextFormat::getKey( const QFont &fn, const QColor &col, bool misspelled, VerticalAlignment a ) +TQString KoTextFormat::getKey( const TQFont &fn, const TQColor &col, bool misspelled, VerticalAlignment a ) { - QString k = fn.key(); + TQString k = fn.key(); k += '/'; if ( col.isValid() ) // just to shorten the key in the common case - k += QString::number( (uint)col.rgb() ); + k += TQString::number( (uint)col.rgb() ); k += '/'; - k += QString::number( (int)misspelled ); - k += QString::number( (int)a ); + k += TQString::number( (int)misspelled ); + k += TQString::number( (int)a ); //// kotext addition k += '/'; // no background color k += '/'; // no underline color k += '/'; - k += QString::number( (int)U_NONE ); - k += QString::number( (int)S_NONE ); // no double-underline in a "simple format" - k += QString::number( (int)U_SOLID ); - k += QString::number( (int)S_SOLID ); // no double-underline in a "simple format" + k += TQString::number( (int)U_NONE ); + k += TQString::number( (int)S_NONE ); // no double-underline in a "simple format" + k += TQString::number( (int)U_SOLID ); + k += TQString::number( (int)S_SOLID ); // no double-underline in a "simple format" k += '/'; - //k += QString::null; // spellcheck language + //k += TQString(); // spellcheck language k += '/'; //no shadow k += '/'; @@ -916,7 +916,7 @@ QString KoTextFormat::getKey( const QFont &fn, const QColor &col, bool misspelle } -QString KoTextFormat::key() const +TQString KoTextFormat::key() const { if ( m_key.isEmpty() ) const_cast<KoTextFormat*>( this )->generateKey(); @@ -976,14 +976,14 @@ void KoTextFormat::setStrikeOutStyle( StrikeOutStyle _type ) update(); } -void KoTextFormat::setTextBackgroundColor(const QColor &_col) +void KoTextFormat::setTextBackgroundColor(const TQColor &_col) { if(m_textBackColor==_col) return; m_textBackColor=_col; update(); } -void KoTextFormat::setTextUnderlineColor(const QColor &_col) +void KoTextFormat::setTextUnderlineColor(const TQColor &_col) { if ( m_textUnderlineColor == _col ) return; @@ -991,7 +991,7 @@ void KoTextFormat::setTextUnderlineColor(const QColor &_col) update(); } -void KoTextFormat::setShadow( double shadowDistanceX, double shadowDistanceY, const QColor& shadowColor ) +void KoTextFormat::setShadow( double shadowDistanceX, double shadowDistanceY, const TQColor& shadowColor ) { if ( d->m_shadowDistanceX == shadowDistanceX && d->m_shadowDistanceY == shadowDistanceY && @@ -1081,11 +1081,11 @@ int KoTextFormat::compare( const KoTextFormat & format ) const return flags; } -QColor KoTextFormat::defaultTextColor( QPainter * painter ) +TQColor KoTextFormat::defaultTextColor( TQPainter * painter ) { - if ( painter->device()->devType() == QInternal::Printer ) - return Qt::black; - return QApplication::palette().color( QPalette::Active, QColorGroup::Text ); + if ( painter->device()->devType() == TQInternal::Printer ) + return TQt::black; + return TQApplication::palette().color( TQPalette::Active, TQColorGroup::Text ); } float KoTextFormat::screenPointSize( const KoTextZoomHandler* zh ) const @@ -1094,7 +1094,7 @@ float KoTextFormat::screenPointSize( const KoTextZoomHandler* zh ) const int pointSizeLU = KoTextZoomHandler::ptToLayoutUnitPt( pointSize() ); if ( vAlign() != KoTextFormat::AlignNormal ) pointSizeLU = (int)( pointSizeLU *relativeTextSize() ); - return zh->layoutUnitToFontSize( pointSizeLU, false /* forPrint */ ); + return zh->tqlayoutUnitToFontSize( pointSizeLU, false /* forPrint */ ); } float KoTextFormat::refPointSize() const @@ -1105,13 +1105,13 @@ float KoTextFormat::refPointSize() const return pointSize(); } -QFont KoTextFormat::refFont() const +TQFont KoTextFormat::refFont() const { float pointSize = refPointSize(); if ( !d->m_refFont || pointSize != d->m_refFont->pointSizeFloat() ) { delete d->m_refFont; - d->m_refFont = new QFont( font() ); + d->m_refFont = new TQFont( font() ); d->m_refFont->setPointSizeFloat( pointSize ); delete d->m_refFontMetrics; d->m_refFontMetrics = 0; @@ -1120,7 +1120,7 @@ QFont KoTextFormat::refFont() const return *d->m_refFont; } -QFont KoTextFormat::screenFont( const KoTextZoomHandler* zh ) const +TQFont KoTextFormat::screenFont( const KoTextZoomHandler* zh ) const { float pointSize = screenPointSize( zh ); //kdDebug(32500) << "KoTextFormat::screenFont pointSize=" << pointSize << endl; @@ -1132,7 +1132,7 @@ QFont KoTextFormat::screenFont( const KoTextZoomHandler* zh ) const if ( !d->m_screenFont || kAbs( pointSize - d->m_screenFont->pointSizeFloat() ) > 1E-4 ) { delete d->m_screenFont; - d->m_screenFont = new QFont( font() ); + d->m_screenFont = new TQFont( font() ); d->m_screenFont->setPointSizeFloat( pointSize ); delete d->m_screenFontMetrics; d->m_screenFontMetrics = 0; @@ -1141,36 +1141,36 @@ QFont KoTextFormat::screenFont( const KoTextZoomHandler* zh ) const return *d->m_screenFont; } -const QFontMetrics& KoTextFormat::screenFontMetrics( const KoTextZoomHandler* zh ) const +const TQFontMetrics& KoTextFormat::screenFontMetrics( const KoTextZoomHandler* zh ) const { - QFont f = screenFont(zh); // don't move inside the if! + TQFont f = screenFont(zh); // don't move inside the if! - if ( !d->m_screenFontMetrics ) // not calculated, or invalidated by screenFont above + if ( !d->m_screenFontMetrics ) // not calculated, or tqinvalidated by screenFont above { //kdDebug(32500) << this << " KoTextFormat::screenFontMetrics pointSize=" << pointSize << " d->m_screenFont->pointSizeFloat()=" << d->m_screenFont->pointSizeFloat() << endl; - d->m_screenFontMetrics = new QFontMetrics( f ); + d->m_screenFontMetrics = new TQFontMetrics( f ); //kdDebug(32500) << "KoTextFormat::screenFontMetrics created new metrics with size " << pointSize << " height:" << d->m_screenFontMetrics->height() << endl; } return *d->m_screenFontMetrics; } -const QFontMetrics& KoTextFormat::refFontMetrics() const +const TQFontMetrics& KoTextFormat::refFontMetrics() const { - QFont f = refFont(); + TQFont f = refFont(); if ( !d->m_refFontMetrics ) { //kdDebug(32500) << this << " KoTextFormat::refFontMetrics pointSize=" << pointSize << " d->m_refFont->pointSizeFloat()=" << d->m_refFont->pointSizeFloat() << endl; - d->m_refFontMetrics = new QFontMetrics( f ); + d->m_refFontMetrics = new TQFontMetrics( f ); //kdDebug(32500) << "KoTextFormat::refFontMetrics created new metrics with size " << pointSize << " height:" << d->m_refFontMetrics->height() << endl; } return *d->m_refFontMetrics; } -QFont KoTextFormat::smallCapsFont( const KoTextZoomHandler* zh, bool applyZoom ) const +TQFont KoTextFormat::smallCapsFont( const KoTextZoomHandler* zh, bool applyZoom ) const { - QFont font = applyZoom ? screenFont( zh ) : refFont(); - QFontMetrics fm = refFontMetrics(); // only used for proportions, so applyZoom doesn't matter + TQFont font = applyZoom ? screenFont( zh ) : refFont(); + TQFontMetrics fm = refFontMetrics(); // only used for proportions, so applyZoom doesn't matter double pointSize = font.pointSize() * ((double)fm.boundingRect("x").height()/(double)fm.boundingRect("X").height()); font.setPointSizeFloat( pointSize ); return font; @@ -1179,15 +1179,15 @@ QFont KoTextFormat::smallCapsFont( const KoTextZoomHandler* zh, bool applyZoom ) int KoTextFormat::charWidth( const KoTextZoomHandler* zh, bool applyZoom, const KoTextStringChar* c, const KoTextParag* parag, int i ) const { - ushort unicode = c->c.unicode(); - if ( !c->charStop || unicode == 0xad || unicode == 0x2028 ) + ushort tqunicode = c->c.tqunicode(); + if ( !c->charStop || tqunicode == 0xad || tqunicode == 0x2028 ) return 0; Q_ASSERT( !c->isCustom() ); // actually it's a bit stupid to call this for custom items if( c->isCustom() ) { if( c->customItem()->placement() == KoTextCustomItem::PlaceInline ) { // customitem width is in LU pixels. Convert to 100%-zoom-pixels (pt2pt==pix2pix) - double w = KoTextZoomHandler::layoutUnitPtToPt( c->customItem()->width ); - return qRound( applyZoom ? ( w * zh->zoomFactorX() ) : w ); + double w = KoTextZoomHandler::tqlayoutUnitPtToPt( c->customItem()->width ); + return tqRound( applyZoom ? ( w * zh->zoomFactorX() ) : w ); } else return 0; @@ -1199,7 +1199,7 @@ int KoTextFormat::charWidth( const KoTextZoomHandler* zh, bool applyZoom, const // Small caps -> we can't use the cached font metrics from KoTextFormat if ( attributeFont() == KoTextFormat::ATT_SMALL_CAPS && c->c.upper() != c->c ) { - pixelww = QFontMetrics( smallCapsFont( zh, applyZoom ) ).width( displayedChar( c->c ) ); + pixelww = TQFontMetrics( smallCapsFont( zh, applyZoom ) ).width( displayedChar( c->c ) ); } else // Use the cached font metrics from KoTextFormat @@ -1209,13 +1209,13 @@ int KoTextFormat::charWidth( const KoTextZoomHandler* zh, bool applyZoom, const pixelww = this->screenFontMetrics( zh ).width( displayedChar( c->c ) ); } else { // Use the m_screenWidths[] array when possible, even faster - Q_ASSERT( unicode < 256 ); - pixelww = d->m_screenWidths[ unicode ]; + Q_ASSERT( tqunicode < 256 ); + pixelww = d->m_screenWidths[ tqunicode ]; // Not in cache yet -> calculate if ( pixelww == 0 ) { pixelww = this->screenFontMetrics( zh ).width( displayedChar( c->c ) ); Q_ASSERT( pixelww < 65535 ); - d->m_screenWidths[ unicode ] = pixelww; + d->m_screenWidths[ tqunicode ] = pixelww; } } } @@ -1226,13 +1226,13 @@ int KoTextFormat::charWidth( const KoTextZoomHandler* zh, bool applyZoom, const else { // Complex text. We need some hacks to get the right metric here bool smallCaps = ( attributeFont() == KoTextFormat::ATT_SMALL_CAPS && c->c.upper() != c->c ); - const QFontMetrics& fontMetrics = smallCaps ? smallCapsFont( zh, applyZoom ) : applyZoom ? screenFontMetrics( zh ) : refFontMetrics(); - QString str; + const TQFontMetrics& fontMetrics = smallCaps ? smallCapsFont( zh, applyZoom ) : applyZoom ? screenFontMetrics( zh ) : refFontMetrics(); + TQString str; int pos = 0; if( i > 8 ) pos = i - 8; int off = i - pos; - int end = QMIN( parag->length(), i + 8 ); + int end = TQMIN( parag->length(), i + 8 ); while ( pos < end ) { str += displayedChar( parag->at(pos)->c ); pos++; @@ -1241,7 +1241,7 @@ int KoTextFormat::charWidth( const KoTextZoomHandler* zh, bool applyZoom, const } #if 0 - kdDebug(32500) << "KoTextFormat::charWidth: char=" << QString(c->c) << " format=" << key() + kdDebug(32500) << "KoTextFormat::charWidth: char=" << TQString(c->c) << " format=" << key() << ", applyZoom=" << applyZoom << " pixel-width=" << pixelww << endl; #endif return pixelww; @@ -1252,7 +1252,7 @@ int KoTextFormat::height() const if ( d->m_refHeight < 0 ) { // Calculate height using 100%-zoom font - int h = refFontMetrics().height()+QABS(offsetFromBaseLine()); + int h = refFontMetrics().height()+TQABS(offsetFromBaseLine()); if ( vAlign() == KoTextFormat::AlignSuperScript ) h += refFontMetrics().height()/2; else if ( vAlign() == KoTextFormat::AlignSubScript ) @@ -1261,12 +1261,12 @@ int KoTextFormat::height() const // Add room for the shadow if ( d->m_shadowDistanceY != 0 ) { // pt -> pixel (at 100% zoom) - h += (int)(POINT_TO_INCH( static_cast<double>( KoGlobal::dpiY() ) ) * QABS( d->m_shadowDistanceY ) ); + h += (int)(POINT_TO_INCH( static_cast<double>( KoGlobal::dpiY() ) ) * TQABS( d->m_shadowDistanceY ) ); } //kdDebug(32500) << "KoTextFormat::height 100%-zoom font says h=" << h << " in LU:" << KoTextZoomHandler::ptToLayoutUnitPt(h) << endl; // Then scale to LU - d->m_refHeight = qRound( KoTextZoomHandler::ptToLayoutUnitPt( h ) ); + d->m_refHeight = tqRound( KoTextZoomHandler::ptToLayoutUnitPt( h ) ); } return d->m_refHeight; } @@ -1280,7 +1280,7 @@ int KoTextFormat::offsetX() const // in LU pixels // Somehow we should only do this if x == 0 (in the formatter) if ( d->m_shadowDistanceX < 0 ) { - double lupt = KoTextZoomHandler::ptToLayoutUnitPt( QABS( d->m_shadowDistanceX ) ); + double lupt = KoTextZoomHandler::ptToLayoutUnitPt( TQABS( d->m_shadowDistanceX ) ); off += (int)(POINT_TO_INCH( static_cast<double>( KoGlobal::dpiX() ) ) * lupt ); } #endif @@ -1294,14 +1294,14 @@ int KoTextFormat::offsetY() const // in LU pixels // Shadow on top -> character is moved down if ( d->m_shadowDistanceY < 0 ) { - double lupt = KoTextZoomHandler::ptToLayoutUnitPt( QABS( d->m_shadowDistanceY ) ); + double lupt = KoTextZoomHandler::ptToLayoutUnitPt( TQABS( d->m_shadowDistanceY ) ); off += (int)(POINT_TO_INCH( static_cast<double>( KoGlobal::dpiY() ) ) * lupt ); } #endif return off; } -QString KoTextFormat::displayedString( const QString& str )const +TQString KoTextFormat::displayedString( const TQString& str )const { switch ( m_attributeFont ) { case ATT_NONE: @@ -1317,9 +1317,9 @@ QString KoTextFormat::displayedString( const QString& str )const } } -QChar KoTextFormat::displayedChar( QChar c )const +TQChar KoTextFormat::displayedChar( TQChar c )const { - if ( c.unicode() == 0xa0 ) // nbsp + if ( c.tqunicode() == 0xa0 ) // nbsp return ' '; switch ( m_attributeFont ) { case ATT_NONE: @@ -1346,7 +1346,7 @@ int KoTextFormat::ascent() const if ( vAlign() == KoTextFormat::AlignSuperScript ) h += refFontMetrics().height()/2; // Then scale to LU - d->m_refAscent = qRound( KoTextZoomHandler::ptToLayoutUnitPt( h ) ); + d->m_refAscent = tqRound( KoTextZoomHandler::ptToLayoutUnitPt( h ) ); //d->m_refAscent += offsetY(); } return d->m_refAscent; @@ -1361,7 +1361,7 @@ int KoTextFormat::descent() const if ( offsetFromBaseLine()<0 ) h -= offsetFromBaseLine(); // Then scale to LU - d->m_refDescent = qRound( KoTextZoomHandler::ptToLayoutUnitPt( h ) ); + d->m_refDescent = tqRound( KoTextZoomHandler::ptToLayoutUnitPt( h ) ); //d->m_refDescent += offsetY(); } return d->m_refDescent; @@ -1374,7 +1374,7 @@ int KoTextFormat::charWidthLU( const KoTextStringChar* c, const KoTextParag* par return KoTextZoomHandler::ptToLayoutUnitPt( charWidth( 0L, false, c, parag, i ) ); } -int KoTextFormat::width( const QChar& ch ) const +int KoTextFormat::width( const TQChar& ch ) const { // Warning this doesn't take into account the shadow return KoTextZoomHandler::ptToLayoutUnitPt( refFontMetrics().width( ch ) ); @@ -1390,43 +1390,43 @@ KoCharStyle *KoTextFormat::style() const return d->m_charStyle; } -QString KoTextFormat::shadowAsCss( double shadowDistanceX, double shadowDistanceY, const QColor& shadowColor ) +TQString KoTextFormat::shadowAsCss( double shadowDistanceX, double shadowDistanceY, const TQColor& shadowColor ) { // http://www.w3.org/TR/REC-CSS2/text.html#text-shadow-props // none | [<color> || <length (h)> <length (v)> <length (blur radius, not used here)>] ... // => none or color length length if ( shadowDistanceX != 0 || shadowDistanceY != 0 ) { - QString css = shadowColor.name() + " "; - css += QString::number(shadowDistanceX) + "pt "; - css += QString::number(shadowDistanceY) + "pt"; + TQString css = shadowColor.name() + " "; + css += TQString::number(shadowDistanceX) + "pt "; + css += TQString::number(shadowDistanceY) + "pt"; return css; } return "none"; } -QString KoTextFormat::shadowAsCss() const +TQString KoTextFormat::shadowAsCss() const { return shadowAsCss( d->m_shadowDistanceX, d->m_shadowDistanceY, d->m_shadowColor ); } -void KoTextFormat::parseShadowFromCss( const QString& _css ) +void KoTextFormat::parseShadowFromCss( const TQString& _css ) { - QString css = _css.simplifyWhiteSpace(); + TQString css = _css.simplifyWhiteSpace(); if ( css.isEmpty() || css == "none" ) { d->m_shadowDistanceX = 0; d->m_shadowDistanceY = 0; - d->m_shadowColor = QColor(); + d->m_shadowColor = TQColor(); } else { - QStringList tokens = QStringList::split(' ', css); + TQStringList tokens = TQStringList::split(' ', css); if ( tokens.isEmpty() ) { kdWarning(32500) << "Parse error in text-shadow: " << css << endl; return; } // Check which token looks like a color - QColor col( tokens.first() ); + TQColor col( tokens.first() ); if ( col.isValid() ) tokens.pop_front(); else if ( tokens.count() > 1 ) @@ -1452,7 +1452,7 @@ void KoTextFormat::parseShadowFromCss( const QString& _css ) update(); } -QColor KoTextFormat::shadowColor() const +TQColor KoTextFormat::shadowColor() const { if ( d->m_shadowColor.isValid() ) return d->m_shadowColor; @@ -1471,9 +1471,9 @@ int KoTextFormat::shadowY( KoTextZoomHandler *zh ) const } //static -QString KoTextFormat::underlineStyleToString( KoTextFormat::UnderlineStyle _lineType ) +TQString KoTextFormat::underlineStyleToString( KoTextFormat::UnderlineStyle _lineType ) { - QString strLineType; + TQString strLineType; switch ( _lineType ) { case KoTextFormat::U_SOLID: @@ -1495,9 +1495,9 @@ QString KoTextFormat::underlineStyleToString( KoTextFormat::UnderlineStyle _line return strLineType; } -QString KoTextFormat::strikeOutStyleToString( KoTextFormat::StrikeOutStyle _lineType ) +TQString KoTextFormat::strikeOutStyleToString( KoTextFormat::StrikeOutStyle _lineType ) { - QString strLineType; + TQString strLineType; switch ( _lineType ) { case KoTextFormat::S_SOLID: @@ -1519,7 +1519,7 @@ QString KoTextFormat::strikeOutStyleToString( KoTextFormat::StrikeOutStyle _line return strLineType; } -KoTextFormat::UnderlineStyle KoTextFormat::stringToUnderlineStyle( const QString & _str ) +KoTextFormat::UnderlineStyle KoTextFormat::stringToUnderlineStyle( const TQString & _str ) { if ( _str =="solid") return KoTextFormat::U_SOLID; @@ -1535,7 +1535,7 @@ KoTextFormat::UnderlineStyle KoTextFormat::stringToUnderlineStyle( const QString return KoTextFormat::U_SOLID; } -KoTextFormat::StrikeOutStyle KoTextFormat::stringToStrikeOutStyle( const QString & _str ) +KoTextFormat::StrikeOutStyle KoTextFormat::stringToStrikeOutStyle( const TQString & _str ) { if ( _str =="solid") return KoTextFormat::S_SOLID; @@ -1551,21 +1551,21 @@ KoTextFormat::StrikeOutStyle KoTextFormat::stringToStrikeOutStyle( const QString return KoTextFormat::S_SOLID; } -QString KoTextFormat::attributeFontToString( KoTextFormat::AttributeStyle _attr ) +TQString KoTextFormat::attributeFontToString( KoTextFormat::AttributeStyle _attr ) { if (_attr == KoTextFormat::ATT_NONE ) - return QString("none"); + return TQString("none"); else if ( _attr == KoTextFormat::ATT_UPPER ) - return QString("uppercase"); + return TQString("uppercase"); else if ( _attr == KoTextFormat::ATT_LOWER ) - return QString("lowercase"); + return TQString("lowercase"); else if ( _attr == KoTextFormat::ATT_SMALL_CAPS ) - return QString("smallcaps"); + return TQString("smallcaps"); else - return QString("none"); + return TQString("none"); } -KoTextFormat::AttributeStyle KoTextFormat::stringToAttributeFont( const QString & _str ) +KoTextFormat::AttributeStyle KoTextFormat::stringToAttributeFont( const TQString & _str ) { if ( _str == "none" ) return KoTextFormat::ATT_NONE; @@ -1598,7 +1598,7 @@ void KoTextFormat::setUnderLineWidth( double ulw ) } -void KoTextFormat::setLanguage( const QString & _lang) +void KoTextFormat::setLanguage( const TQString & _lang) { if ( m_language == _lang ) return; @@ -1606,9 +1606,9 @@ void KoTextFormat::setLanguage( const QString & _lang) update(); } -QStringList KoTextFormat::underlineTypeList() +TQStringList KoTextFormat::underlineTypeList() { - QStringList lst; + TQStringList lst; lst <<i18n("Underline Style", "None"); lst <<i18n("Single"); lst <<i18n("Double"); @@ -1617,9 +1617,9 @@ QStringList KoTextFormat::underlineTypeList() return lst; } -QStringList KoTextFormat::strikeOutTypeList() +TQStringList KoTextFormat::strikeOutTypeList() { - QStringList lst; + TQStringList lst; lst <<i18n("Strikeout Style", "None"); lst <<i18n("Single"); lst <<i18n("Double"); @@ -1627,9 +1627,9 @@ QStringList KoTextFormat::strikeOutTypeList() return lst; } -QStringList KoTextFormat::fontAttributeList() +TQStringList KoTextFormat::fontAttributeList() { - QStringList lst; + TQStringList lst; lst <<i18n("Normal"); lst <<i18n("Uppercase"); lst <<i18n("Lowercase"); @@ -1637,9 +1637,9 @@ QStringList KoTextFormat::fontAttributeList() return lst; } -QStringList KoTextFormat::underlineStyleList() +TQStringList KoTextFormat::underlineStyleList() { - QStringList lst; + TQStringList lst; lst <<"_________"; // SOLID lst <<"___ ___ __"; // DASH lst <<"_ _ _ _ _ _"; // DOT @@ -1648,9 +1648,9 @@ QStringList KoTextFormat::underlineStyleList() return lst; } -QStringList KoTextFormat::strikeOutStyleList() +TQStringList KoTextFormat::strikeOutStyleList() { - QStringList lst; + TQStringList lst; lst <<"_________"; // SOLID lst <<"___ ___ __"; // DASH lst <<"_ _ _ _ _ _"; // DOT @@ -1662,10 +1662,10 @@ QStringList KoTextFormat::strikeOutStyleList() #ifndef NDEBUG void KoTextFormat::printDebug() { - QString col = color().isValid() ? color().name() : QString("(default)"); + TQString col = color().isValid() ? color().name() : TQString("(default)"); kdDebug(32500) << "format '" << key() << "' (" << (void*)this << "):" << " refcount: " << ref - << " realfont: " << QFontInfo( font() ).family() + << " realfont: " << TQFontInfo( font() ).family() << " color: " << col << " shadow=" << shadowAsCss() << endl; } #endif @@ -1678,14 +1678,14 @@ KoTextFormatCollection::KoTextFormatCollection() #ifdef DEBUG_COLLECTION kdDebug(32500) << "KoTextFormatCollection::KoTextFormatCollection " << this << endl; #endif - defFormat = new KoTextFormat( QApplication::font(), QColor(), KGlobal::locale()->language(), false ); + defFormat = new KoTextFormat( TQApplication::font(), TQColor(), KGlobal::locale()->language(), false ); lastFormat = cres = 0; cflags = -1; cKey.setAutoDelete( TRUE ); cachedFormat = 0; } -KoTextFormatCollection::KoTextFormatCollection( const QFont& defaultFont, const QColor& defaultColor, const QString & defaultLanguage, bool defaultHyphenation ) +KoTextFormatCollection::KoTextFormatCollection( const TQFont& defaultFont, const TQColor& defaultColor, const TQString & defaultLanguage, bool defaultHyphenation ) : cKey( 307 ) { #ifdef DEBUG_COLLECTION @@ -1709,7 +1709,7 @@ KoTextFormatCollection::~KoTextFormatCollection() KoTextFormat *KoTextFormatCollection::format( const KoTextFormat *f ) { - if ( f->parent() == this || f == defFormat ) { + if ( f->tqparent() == this || f == defFormat ) { #ifdef DEBUG_COLLECTION kdDebug(32500) << " format(f) need '" << f->key() << "', best case!" << endl; #endif @@ -1737,7 +1737,7 @@ KoTextFormat *KoTextFormatCollection::format( const KoTextFormat *f ) } #endif - KoTextFormat *fm = cKey.find( f->key() ); + KoTextFormat *fm = cKey.tqfind( f->key() ); if ( fm ) { #ifdef DEBUG_COLLECTION kdDebug(32500) << " format(f) need '" << f->key() << "', normal case!" << endl; @@ -1783,7 +1783,7 @@ KoTextFormat *KoTextFormatCollection::format( const KoTextFormat *of, const KoTe #endif cres->copyFormat( *nf, flags ); - KoTextFormat *fm = cKey.find( cres->key() ); + KoTextFormat *fm = cKey.tqfind( cres->key() ); if ( !fm ) { #ifdef DEBUG_COLLECTION kdDebug(32500) << " format(of,nf,flags) mix of '" << of->key() << "' and '" << nf->key() << ", worst case!" << endl; @@ -1803,7 +1803,7 @@ KoTextFormat *KoTextFormatCollection::format( const KoTextFormat *of, const KoTe } #if 0 -KoTextFormat *KoTextFormatCollection::format( const QFont &f, const QColor &c, const QString & language, bool hyphen ) +KoTextFormat *KoTextFormatCollection::format( const TQFont &f, const TQColor &c, const TQString & language, bool hyphen ) { if ( cachedFormat && cfont == f && ccol == c ) { #ifdef DEBUG_COLLECTION @@ -1813,8 +1813,8 @@ KoTextFormat *KoTextFormatCollection::format( const QFont &f, const QColor &c, c return cachedFormat; } - QString key = KoTextFormat::getKey( f, c, FALSE, KoTextFormat::AlignNormal ); - cachedFormat = cKey.find( key ); + TQString key = KoTextFormat::getKey( f, c, FALSE, KoTextFormat::AlignNormal ); + cachedFormat = cKey.tqfind( key ); cfont = f; ccol = c; @@ -1854,16 +1854,16 @@ void KoTextFormatCollection::remove( KoTextFormat *f ) void KoTextFormatCollection::zoomChanged() { - QDictIterator<KoTextFormat> it( cKey ); + TQDictIterator<KoTextFormat> it( cKey ); for ( ; it.current(); ++it ) { it.current()->zoomChanged(); } } #if 0 -void KoTextFormatCollection::setPainter( QPainter *p ) +void KoTextFormatCollection::setPainter( TQPainter *p ) { - QDictIterator<KoTextFormat> it( cKey ); + TQDictIterator<KoTextFormat> it( cKey ); KoTextFormat *f; while ( ( f = it.current() ) ) { ++it; @@ -1876,8 +1876,8 @@ void KoTextFormatCollection::setPainter( QPainter *p ) void KoTextFormatCollection::debug() { kdDebug(32500) << "------------ KoTextFormatCollection: debug --------------- BEGIN" << endl; - kdDebug(32500) << "Default Format: '" << defFormat->key() << "' (" << (void*)defFormat << "): realfont: " << QFontInfo( defFormat->font() ).family() << endl; - QDictIterator<KoTextFormat> it( cKey ); + kdDebug(32500) << "Default Format: '" << defFormat->key() << "' (" << (void*)defFormat << "): realfont: " << TQFontInfo( defFormat->font() ).family() << endl; + TQDictIterator<KoTextFormat> it( cKey ); for ( ; it.current(); ++it ) { Q_ASSERT(it.currentKey() == it.current()->key()); if(it.currentKey() != it.current()->key()) |