diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /lib/kotext/KoTextCommand.cpp | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib/kotext/KoTextCommand.cpp')
-rw-r--r-- | lib/kotext/KoTextCommand.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/lib/kotext/KoTextCommand.cpp b/lib/kotext/KoTextCommand.cpp index 3a6f5ef3..68f83ad3 100644 --- a/lib/kotext/KoTextCommand.cpp +++ b/lib/kotext/KoTextCommand.cpp @@ -37,9 +37,9 @@ void KoTextCommand::unexecute() } KoTextDeleteCommand::KoTextDeleteCommand( - KoTextDocument *d, int i, int idx, const QMemArray<KoTextStringChar> &str, + KoTextDocument *d, int i, int idx, const TQMemArray<KoTextStringChar> &str, const CustomItemsMap & customItemsMap, - const QValueList<KoParagLayout> &oldParagLayouts ) + const TQValueList<KoParagLayout> &oldParagLayouts ) : KoTextDocDeleteCommand( d, i, idx, str ), m_oldParagLayouts( oldParagLayouts ), m_customItemsMap( customItemsMap ) @@ -75,7 +75,7 @@ KoTextCursor * KoTextDeleteCommand::execute( KoTextCursor *c ) KoTextCursor * KoTextDeleteCommand::unexecute( KoTextCursor *c ) { - // Let QRichText re-create the text and formatting + // Let TQRichText re-create the text and formatting KoTextCursor * cr = KoTextDocDeleteCommand::unexecute(c); KoTextParag *s = doc ? doc->paragAt( id ) : parag; @@ -88,15 +88,15 @@ KoTextCursor * KoTextDeleteCommand::unexecute( KoTextCursor *c ) // Set any custom item that we had m_customItemsMap.insertItems( cursor, text.size() ); - // Now restore the parag layouts (i.e. libkotext specific stuff) - QValueList<KoParagLayout>::Iterator lit = m_oldParagLayouts.begin(); - kdDebug(32500) << "KoTextDeleteCommand::unexecute " << m_oldParagLayouts.count() << " parag layouts. First parag=" << s->paragId() << endl; + // Now restore the parag tqlayouts (i.e. libkotext specific stuff) + TQValueList<KoParagLayout>::Iterator lit = m_oldParagLayouts.begin(); + kdDebug(32500) << "KoTextDeleteCommand::unexecute " << m_oldParagLayouts.count() << " parag tqlayouts. First parag=" << s->paragId() << endl; Q_ASSERT( id == s->paragId() ); KoTextParag *p = s; while ( p ) { if ( lit != m_oldParagLayouts.end() ) { - kdDebug(32500) << "KoTextDeleteCommand::unexecute applying paraglayout to parag " << p->paragId() << endl; + kdDebug(32500) << "KoTextDeleteCommand::unexecute applying paragtqlayout to parag " << p->paragId() << endl; p->setParagLayout( *lit ); } else @@ -110,10 +110,10 @@ KoTextCursor * KoTextDeleteCommand::unexecute( KoTextCursor *c ) } KoTextParagCommand::KoTextParagCommand( KoTextDocument *d, int fParag, int lParag, - const QValueList<KoParagLayout> &oldParagLayouts, + const TQValueList<KoParagLayout> &oldParagLayouts, KoParagLayout newParagLayout, int flags, - QStyleSheetItem::Margin margin ) + TQStyleSheetItem::Margin margin ) : KoTextDocCommand( d ), firstParag( fParag ), lastParag( lParag ), m_oldParagLayouts( oldParagLayouts ), m_newParagLayout( newParagLayout ), m_flags( flags ), m_margin( margin ) { @@ -131,8 +131,8 @@ KoTextCursor * KoTextParagCommand::execute( KoTextCursor *c ) return c; } while ( p ) { - if ( ( m_flags & KoParagLayout::Margins ) && m_margin != (QStyleSheetItem::Margin)-1 ) // all - p->setMargin( static_cast<QStyleSheetItem::Margin>(m_margin), m_newParagLayout.margins[m_margin] ); + if ( ( m_flags & KoParagLayout::Margins ) && m_margin != (TQStyleSheetItem::Margin)-1 ) // all + p->setMargin( static_cast<TQStyleSheetItem::Margin>(m_margin), m_newParagLayout.margins[m_margin] ); else { p->setParagLayout( m_newParagLayout, m_flags ); @@ -157,15 +157,15 @@ KoTextCursor * KoTextParagCommand::unexecute( KoTextCursor *c ) kdDebug(32500) << "KoTextParagCommand::unexecute paragraph " << firstParag << "not found" << endl; return c; } - QValueList<KoParagLayout>::Iterator lit = m_oldParagLayouts.begin(); + TQValueList<KoParagLayout>::Iterator lit = m_oldParagLayouts.begin(); while ( p ) { if ( lit == m_oldParagLayouts.end() ) { kdDebug(32500) << "KoTextParagCommand::unexecute m_oldParagLayouts not big enough!" << endl; break; } - if ( m_flags & KoParagLayout::Margins && m_margin != (QStyleSheetItem::Margin)-1 ) // just one - p->setMargin( static_cast<QStyleSheetItem::Margin>(m_margin), (*lit).margins[m_margin] ); + if ( m_flags & KoParagLayout::Margins && m_margin != (TQStyleSheetItem::Margin)-1 ) // just one + p->setMargin( static_cast<TQStyleSheetItem::Margin>(m_margin), (*lit).margins[m_margin] ); else { p->setParagLayout( *lit, m_flags ); @@ -184,19 +184,19 @@ KoTextCursor * KoTextParagCommand::unexecute( KoTextCursor *c ) ////////// KoParagFormatCommand::KoParagFormatCommand( KoTextDocument *d, int fParag, int lParag, - const QValueList<KoTextFormat *> &oldFormats, + const TQValueList<KoTextFormat *> &oldFormats, KoTextFormat * newFormat ) : KoTextDocCommand( d ), firstParag( fParag ), lastParag( lParag ), m_oldFormats( oldFormats ), m_newFormat( newFormat ) { - QValueList<KoTextFormat *>::Iterator lit = m_oldFormats.begin(); + TQValueList<KoTextFormat *>::Iterator lit = m_oldFormats.begin(); for ( ; lit != m_oldFormats.end() ; ++lit ) (*lit)->addRef(); } KoParagFormatCommand::~KoParagFormatCommand() { - QValueList<KoTextFormat *>::Iterator lit = m_oldFormats.begin(); + TQValueList<KoTextFormat *>::Iterator lit = m_oldFormats.begin(); for ( ; lit != m_oldFormats.end() ; ++lit ) (*lit)->removeRef(); } @@ -211,7 +211,7 @@ KoTextCursor * KoParagFormatCommand::execute( KoTextCursor *c ) } while ( p ) { p->setFormat( m_newFormat ); - p->invalidate(0); + p->tqinvalidate(0); if ( p->paragId() == lastParag ) break; p = p->next(); @@ -228,7 +228,7 @@ KoTextCursor * KoParagFormatCommand::unexecute( KoTextCursor *c ) kdDebug(32500) << "KoParagFormatCommand::unexecute paragraph " << firstParag << "not found" << endl; return c; } - QValueList<KoTextFormat *>::Iterator lit = m_oldFormats.begin(); + TQValueList<KoTextFormat *>::Iterator lit = m_oldFormats.begin(); while ( p ) { if ( lit == m_oldFormats.end() ) { @@ -244,7 +244,7 @@ KoTextCursor * KoParagFormatCommand::unexecute( KoTextCursor *c ) return c; } -KoTextFormatCommand::KoTextFormatCommand(KoTextDocument *d, int sid, int sidx, int eid, int eidx, const QMemArray<KoTextStringChar> &old, const KoTextFormat *f, int fl ) +KoTextFormatCommand::KoTextFormatCommand(KoTextDocument *d, int sid, int sidx, int eid, int eidx, const TQMemArray<KoTextStringChar> &old, const KoTextFormat *f, int fl ) : KoTextDocFormatCommand(d, sid, sidx, eid, eidx, old, f, fl) { } @@ -275,7 +275,7 @@ void KoTextFormatCommand::resizeCustomItems() if ( start.parag() == end.parag() ) { - QString text = start.parag()->string()->toString().mid( start.index(), end.index() - start.index() ); + TQString text = start.parag()->string()->toString().mid( start.index(), end.index() - start.index() ); for ( int i = start.index(); i < end.index(); ++i ) { if( start.parag()->at(i)->isCustom()) @@ -287,7 +287,7 @@ void KoTextFormatCommand::resizeCustomItems() else { int i; - QString text = start.parag()->string()->toString().mid( start.index(), start.parag()->length() - 1 - start.index() ); + TQString text = start.parag()->string()->toString().mid( start.index(), start.parag()->length() - 1 - start.index() ); for ( i = start.index(); i < start.parag()->length(); ++i ) if( start.parag()->at(i)->isCustom()) { @@ -360,7 +360,7 @@ void KoChangeVariableSubType::unexecute() m_var->recalcAndRepaint(); } -QString KoChangeVariableSubType::name() const +TQString KoChangeVariableSubType::name() const { return i18n( "Change Variable Subtype" ); } @@ -368,7 +368,7 @@ QString KoChangeVariableSubType::name() const //// KoChangeVariableFormatProperties::KoChangeVariableFormatProperties( - const QString &_oldValue, const QString &_newValue, + const TQString &_oldValue, const TQString &_newValue, KoVariable *var) : KCommand(), m_newValue(_newValue), @@ -395,7 +395,7 @@ void KoChangeVariableFormatProperties::unexecute() m_var->recalcAndRepaint(); } -QString KoChangeVariableFormatProperties::name() const +TQString KoChangeVariableFormatProperties::name() const { return i18n( "Change Variable Format" ); } |