diff options
Diffstat (limited to 'lib/kotext/KoParagCounter.cpp')
-rw-r--r-- | lib/kotext/KoParagCounter.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/lib/kotext/KoParagCounter.cpp b/lib/kotext/KoParagCounter.cpp index 6126d6c5..9810e8b0 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 ) @@ -216,7 +216,7 @@ void KoParagCounter::loadOasisListStyle( const TQDomElement& listStyle, TQString bulletChar = listStyle.attributeNS( KoXmlNS::text, "bullet-char", TQString() ); if ( !bulletChar.isEmpty() ) { // Reverse engineering, I found those codes: - switch( bulletChar[0].tqunicode() ) { + switch( bulletChar[0].unicode() ) { case 0x2022: // small disc -> circle m_style = STYLE_CIRCLEBULLET; break; @@ -235,7 +235,7 @@ void KoParagCounter::loadOasisListStyle( const TQDomElement& listStyle, m_style = STYLE_BOXBULLET; break; default: - kdDebug() << "Unhandled bullet code 0x" << TQString::number( (uint)m_customBulletChar.tqunicode(), 16 ) << endl; + kdDebug() << "Unhandled bullet code 0x" << TQString::number( (uint)m_customBulletChar.unicode(), 16 ) << endl; // fallback case 0x2794: // arrow case 0x2717: // cross @@ -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 } } @@ -504,7 +504,7 @@ void KoParagCounter::save( TQDomElement & element ) element.setAttribute( "depth", m_depth ); if ( (Style)m_style == STYLE_CUSTOMBULLET ) { - element.setAttribute( "bullet", m_customBulletChar.tqunicode() ); + element.setAttribute( "bullet", m_customBulletChar.unicode() ); if ( !m_customBulletFont.isEmpty() ) element.setAttribute( "bulletfont", m_customBulletFont ); } @@ -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::tqsetAlignment( int a ) +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 @@ -839,7 +839,7 @@ const TQCString RNThousands[] = {"", "m", "mm", "mmm"}; TQString KoParagCounter::makeRomanNumber( int n ) { if ( n >= 0 ) - return TQString::tqfromLatin1( RNThousands[ ( n / 1000 ) ] + + return TQString::fromLatin1( RNThousands[ ( n / 1000 ) ] + RNHundreds[ ( n / 100 ) % 10 ] + RNTens[ ( n / 10 ) % 10 ] + RNUnits[ ( n ) % 10 ] ); @@ -973,7 +973,7 @@ void KoParagCounter::printRTDebug( KoTextParag* parag ) if ( restartCounter() ) additionalInfo = "[restartCounter]"; if ( m_style == STYLE_CUSTOMBULLET ) - additionalInfo += " [customBullet: " + TQString::number( m_customBulletChar.tqunicode() ) + additionalInfo += " [customBullet: " + TQString::number( m_customBulletChar.unicode() ) + " in font '" + m_customBulletFont + "']"; static const char * const s_numbering[] = { "List", "Chapter", "None", "Footnote" }; kdDebug(32500) << " Counter style=" << style() |