summaryrefslogtreecommitdiffstats
path: root/kword/KWInsertTOCCommand.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kword/KWInsertTOCCommand.cpp')
-rw-r--r--kword/KWInsertTOCCommand.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/kword/KWInsertTOCCommand.cpp b/kword/KWInsertTOCCommand.cpp
index 5740e125b..03c6a5012 100644
--- a/kword/KWInsertTOCCommand.cpp
+++ b/kword/KWInsertTOCCommand.cpp
@@ -60,14 +60,14 @@ KoTextCursor * KWInsertTOCCommand::execute( KoTextCursor *c )
KWTextParag *p = static_cast<KWTextParag *>(textdoc->firstParag()/*parag->next()*/);
//ASSERT( p == body );
KWTextParag *prevTOCParag = parag;
- QMap<KWTextParag *, KWTextParag *> paragMap; // Associate a paragraph form the TOC with the real one from the body
+ TQMap<KWTextParag *, KWTextParag *> paragMap; // Associate a paragraph form the TOC with the real one from the body
while ( p ) {
// Include this paragraph in the TOC depending on the isOutline flag of the style
if ( p->style() && p->style()->isOutline() )
{
parag = static_cast<KWTextParag *>(textdoc->createParag( textdoc, prevTOCParag /*prev*/, body /*next*/, true ));
parag->setPartOfTableOfContents( true );
- QString txt = p->toString(); // includes the heading number, if any
+ TQString txt = p->toString(); // includes the heading number, if any
parag->append( txt );
prevTOCParag = parag;
@@ -80,13 +80,13 @@ KoTextCursor * KWInsertTOCCommand::execute( KoTextCursor *c )
prevTOCParag->setPageBreaking( prevTOCParag->pageBreaking() | KWParagLayout::HardFrameBreakAfter );
// Format paragraphs, to take this page break into account and update page numbers
- fs->layout();
+ fs->tqlayout();
fs->updateFrames();
- //kdDebug() << "KWInsertTOCCommand::execute layouting done, setting page numbers" << endl;
+ //kdDebug() << "KWInsertTOCCommand::execute tqlayouting done, setting page numbers" << endl;
// Now add the page numbers, and apply the style
- QMap<KWTextParag *, KWTextParag *>::Iterator mapIt = paragMap.begin();
+ TQMap<KWTextParag *, KWTextParag *>::Iterator mapIt = paragMap.begin();
for ( ; mapIt != paragMap.end() ; ++mapIt )
{
KWTextParag * parag = mapIt.key(); // Parag in the TOC
@@ -94,11 +94,11 @@ KoTextCursor * KWInsertTOCCommand::execute( KoTextCursor *c )
// Find page number for paragraph
KoPoint pt;
- KWFrame * frame = fs->internalToDocument( QPoint(0, p->rect().top()), pt );
+ KWFrame * frame = fs->internalToDocument( TQPoint(0, p->rect().top()), pt );
if ( frame ) // let's be safe
{
parag->append( "\t" );
- parag->append( QString::number( frame->pageNumber() ) );
+ parag->append( TQString::number( frame->pageNumber() ) );
}
// Apply style
@@ -199,7 +199,7 @@ KoTextCursor * KWInsertTOCCommand::removeTOC( KWTextFrameSet *fs, KoTextCursor *
}
p = p->prev();
}
- textdoc->invalidate();
+ textdoc->tqinvalidate();
if(posOfToc)
{
posOfTable=new KoTextCursor( textdoc );
@@ -213,12 +213,12 @@ KoTextCursor * KWInsertTOCCommand::removeTOC( KWTextFrameSet *fs, KoTextCursor *
KoParagStyle * KWInsertTOCCommand::findOrCreateTOCStyle( KWTextFrameSet *fs, int depth )
{
// Determine style name.
- QString name;
- QString displayName;
+ TQString name;
+ TQString displayName;
if ( depth >= 0 ) {
// Don't add i18n to this one, those are internal names and must have no spaces.
- name = QString( "Contents_Head_%1" ).arg( depth+1 );
- displayName = i18n( "Contents Head %1" ).arg( depth+1 );
+ name = TQString( "Contents_Head_%1" ).tqarg( depth+1 );
+ displayName = i18n( "Contents Head %1" ).tqarg( depth+1 );
} else {
name = "Contents_Title";
displayName = i18n( "Contents Title" );
@@ -232,13 +232,13 @@ KoParagStyle * KWInsertTOCCommand::findOrCreateTOCStyle( KWTextFrameSet *fs, int
style->format().setPointSize( depth==-1 ? 20 : 12 );
if ( depth == -1 )
{
- style->paragLayout().topBorder = KoBorder( Qt::black, KoBorder::SOLID, 1 );
- style->paragLayout().bottomBorder = KoBorder( Qt::black, KoBorder::SOLID, 1 );
+ style->paragLayout().topBorder = KoBorder( TQt::black, KoBorder::SOLID, 1 );
+ style->paragLayout().bottomBorder = KoBorder( TQt::black, KoBorder::SOLID, 1 );
// Old kword had only top and bottom. But borders are drawn differently now
// (not the whole line anymore), so we need the 4 borders.
- style->paragLayout().leftBorder = KoBorder( Qt::black, KoBorder::SOLID, 1 );
- style->paragLayout().rightBorder = KoBorder( Qt::black, KoBorder::SOLID, 1 );
- style->paragLayout().alignment = Qt::AlignHCenter;
+ style->paragLayout().leftBorder = KoBorder( TQt::black, KoBorder::SOLID, 1 );
+ style->paragLayout().rightBorder = KoBorder( TQt::black, KoBorder::SOLID, 1 );
+ style->paragLayout().tqalignment = TQt::AlignHCenter;
}
else
{
@@ -252,7 +252,7 @@ KoParagStyle * KWInsertTOCCommand::findOrCreateTOCStyle( KWTextFrameSet *fs, int
tab.ptWidth = 0.5;
tabList.append( tab );
style->paragLayout().setTabList( tabList );
- style->paragLayout().margins[QStyleSheetItem::MarginLeft] = KoUnit::fromUserValue( (depth*4.5), KoUnit::unit("mm") );
+ style->paragLayout().margins[TQStyleSheetItem::MarginLeft] = KoUnit::fromUserValue( (depth*4.5), KoUnit::unit("mm") );
}
style = fs->kWordDocument()->styleCollection()->addStyle( style ); // register the new style
fs->kWordDocument()->updateAllStyleLists(); // show it in the UI