diff options
Diffstat (limited to 'kword/KWFrameLayout.cpp')
-rw-r--r-- | kword/KWFrameLayout.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/kword/KWFrameLayout.cpp b/kword/KWFrameLayout.cpp index 93c67e44..5c0fee78 100644 --- a/kword/KWFrameLayout.cpp +++ b/kword/KWFrameLayout.cpp @@ -22,7 +22,7 @@ #include "KWPage.h" #include "KWTextFrameSet.h" #include "KWDocument.h" -#include <qtimer.h> +#include <tqtimer.h> // #define DEBUG_FRAMELAYOUT @@ -38,7 +38,7 @@ KWFrameLayout::HeaderFooterFrameset::HeaderFooterFrameset( KWTextFrameSet* fs, i if ( fs->frameCount() > 0 ) m_height = fs->frame(0)->height(); else - m_height = 20; // whatever. The text layout will resize it. + m_height = 20; // whatever. The text tqlayout will resize it. Q_ASSERT( m_height > 0 ); } @@ -48,7 +48,7 @@ void KWFrameLayout::HeaderFooterFrameset::debug() #ifdef DEBUG_FRAMELAYOUT HeaderFooterFrameset* hff = this; kdDebug(32002) << " * " << hff->m_frameset->name() - << " pages:" << hff->m_startAtPage << "-" << (hff->m_endAtPage==-1?QString("(all)"):QString::number(hff->m_endAtPage)) + << " pages:" << hff->m_startAtPage << "-" << (hff->m_endAtPage==-1?TQString("(all)"):TQString::number(hff->m_endAtPage)) << " page-selection:" << (hff->m_oddEvenAll==HeaderFooterFrameset::Odd ? "Odd" : hff->m_oddEvenAll==HeaderFooterFrameset::Even ? "Even" : "All") << " frames:" << hff->m_frameset->frameCount() @@ -89,7 +89,7 @@ int KWFrameLayout::HeaderFooterFrameset::lastFrameNumber( int lastPage ) const { return -1; // we need none int pg = lastPage; if ( m_endAtPage > -1 ) - pg = QMIN( m_endAtPage, pg ); + pg = TQMIN( m_endAtPage, pg ); pg -= m_startAtPage; // always >=0 Q_ASSERT( pg >= 0 ); switch (m_oddEvenAll) { @@ -129,21 +129,21 @@ int KWFrameLayout::HeaderFooterFrameset::frameNumberForPage( int page ) const ///// -void KWFrameLayout::layout( KWFrameSet* mainTextFrameSet, int numColumns, +void KWFrameLayout::tqlayout( KWFrameSet* mainTextFrameSet, int numColumns, int fromPage, int toPage, uint flags ) { - //kdDebug(32002) << "KWFrameLayout::layout " << kdBacktrace() << endl; + //kdDebug(32002) << "KWFrameLayout::tqlayout " << kdBacktrace() << endl; // Just debug stuff #ifdef DEBUG_FRAMELAYOUT - kdDebug(32002) << "KWFrameLayout::layout " << fromPage << " to " << toPage << endl; + kdDebug(32002) << "KWFrameLayout::tqlayout " << fromPage << " to " << toPage << endl; Q_ASSERT( toPage >= fromPage ); - QPtrListIterator<HeaderFooterFrameset> itdbg( m_headersFooters ); + TQPtrListIterator<HeaderFooterFrameset> itdbg( m_headersFooters ); for ( ; itdbg.current() ; ++itdbg ) itdbg.current()->debug(); - QPtrListIterator<HeaderFooterFrameset> itdbg2( m_footnotes ); + TQPtrListIterator<HeaderFooterFrameset> itdbg2( m_footnotes ); for ( ; itdbg2.current() ; ++itdbg2 ) itdbg2.current()->debug(); - QPtrListIterator<HeaderFooterFrameset> itdbg3( m_endnotes ); + TQPtrListIterator<HeaderFooterFrameset> itdbg3( m_endnotes ); for ( ; itdbg3.current() ; ++itdbg3 ) itdbg3.current()->debug(); #endif @@ -157,13 +157,13 @@ void KWFrameLayout::layout( KWFrameSet* mainTextFrameSet, int numColumns, KoTextParag * lastParag = static_cast<KWTextFrameSet *>(mainTextFrameSet)->textDocument()->lastParag(); if ( lastParag->isValid() ) { - QRect rect = lastParag->rect(); + TQRect rect = lastParag->rect(); int bottom = rect.top() + rect.height() + 2; // cf kwtextframeset #ifdef DEBUG_FRAMELAYOUT kdDebug(32002) << "bottom LU=" << bottom << endl; #endif - if ( static_cast<KWTextFrameSet *>(mainTextFrameSet)->internalToDocument( QPoint(rect.left(), bottom), textBottomPoint ) ) + if ( static_cast<KWTextFrameSet *>(mainTextFrameSet)->internalToDocument( TQPoint(rect.left(), bottom), textBottomPoint ) ) textBottom = textBottomPoint.y(); } } @@ -194,7 +194,7 @@ void KWFrameLayout::layout( KWFrameSet* mainTextFrameSet, int numColumns, #endif // For each header/footer.... - for ( QPtrListIterator<HeaderFooterFrameset> it( m_headersFooters ); it.current() ; ++it ) + for ( TQPtrListIterator<HeaderFooterFrameset> it( m_headersFooters ); it.current() ; ++it ) { int frameNum = it.current()->frameNumberForPage( pageNum ); if ( frameNum != -1 ) @@ -241,7 +241,7 @@ void KWFrameLayout::layout( KWFrameSet* mainTextFrameSet, int numColumns, //// Then we'll reduce this height after every footnote being positionned, so it's always //// the "height on top of us". double totalFootNotesHeight = 0; - for ( QPtrListIterator<HeaderFooterFrameset> it( m_footnotes ); it.current() ; ++it ) + for ( TQPtrListIterator<HeaderFooterFrameset> it( m_footnotes ); it.current() ; ++it ) { int frameNum = it.current()->frameNumberForPage( pageNum ); if ( frameNum != -1 ) @@ -249,7 +249,7 @@ void KWFrameLayout::layout( KWFrameSet* mainTextFrameSet, int numColumns, } // For each footnote (caller sorted them from bottom to top) - for ( QPtrListIterator<HeaderFooterFrameset> it( m_footnotes ); it.current() ; ++it ) + for ( TQPtrListIterator<HeaderFooterFrameset> it( m_footnotes ); it.current() ; ++it ) { int frameNum = it.current()->frameNumberForPage( pageNum ); if ( frameNum != -1 ) @@ -263,7 +263,7 @@ void KWFrameLayout::layout( KWFrameSet* mainTextFrameSet, int numColumns, KoRect rect; // When two footnotes are in the same page there should be 0 spacing between them - // Yeah, write a generic frame layouter and then realize it's not flexible enough :( + // Yeah, write a generic frame tqlayouter and then realize it's not flexible enough :( if ( fs->isFootEndNote() && !firstFootNote ) { // Undo "bottom -= spacing" (done below). This assumes equal spacing for all footnotes @@ -342,7 +342,7 @@ void KWFrameLayout::layout( KWFrameSet* mainTextFrameSet, int numColumns, kdDebug(32002) << " Endnotes: textBottom=" << textBottom << "pt, endNoteTop=" << endNoteTop << "pt, bottom=" << bottom << "pt" << endl; #endif bool firstEndNote = true; - for ( QPtrListIterator<HeaderFooterFrameset> it( m_endnotes ); it.current() ; ++it ) + for ( TQPtrListIterator<HeaderFooterFrameset> it( m_endnotes ); it.current() ; ++it ) { if ( ! it.current()->m_positioned ) { @@ -440,11 +440,11 @@ void KWFrameLayout::layout( KWFrameSet* mainTextFrameSet, int numColumns, const int lastPage = m_doc->lastPage(); // Final cleanup: delete all frames after lastFrameNumber in each frameset - QPtrListIterator<HeaderFooterFrameset> it( m_headersFooters ); + TQPtrListIterator<HeaderFooterFrameset> it( m_headersFooters ); for ( ; it.current() ; ++it ) if ( it.current()->deleteFramesAfterLast( lastPage ) ) m_framesetsToUpdate.insert( it.current()->m_frameset, true ); - QPtrListIterator<HeaderFooterFrameset> it2( m_footnotes ); + TQPtrListIterator<HeaderFooterFrameset> it2( m_footnotes ); for ( ; it2.current() ; ++it2 ) if ( it2.current()->deleteFramesAfterLast( lastPage ) ) m_framesetsToUpdate.insert( it2.current()->m_frameset, true ); @@ -478,7 +478,7 @@ void KWFrameLayout::layout( KWFrameSet* mainTextFrameSet, int numColumns, } } - QMap<KWFrameSet*, bool>::iterator fsit = m_framesetsToUpdate.begin(); + TQMap<KWFrameSet*, bool>::iterator fsit = m_framesetsToUpdate.begin(); for ( ; fsit != m_framesetsToUpdate.end() ; ++fsit ) fsit.key()->updateFrames(); @@ -492,10 +492,10 @@ void KWFrameLayout::layout( KWFrameSet* mainTextFrameSet, int numColumns, KWTextFrameSet* fs = static_cast<KWTextFrameSet *>(mainTextFrameSet); // Not right now, this could be called during formatting... - //m_doc->invalidate(); - // ### This means the layout will be done during painting. Not good. - // What about mainTextFrameSet->invalidate() or even layout()? - //QTimer::singleShot( 0, m_doc, SLOT( invalidate() ) ); + //m_doc->tqinvalidate(); + // ### This means the tqlayout will be done during painting. Not good. + // What about mainTextFrameSet->tqinvalidate() or even tqlayout()? + //TQTimer::singleShot( 0, m_doc, TQT_SLOT( tqinvalidate() ) ); // Invalidate main textframeset only, and from top of page only. // Otherwise loading a long document (with headers/footers) takes ages, @@ -549,8 +549,8 @@ void KWFrameLayout::resizeOrCreateHeaderFooter( KWTextFrameSet* headerFooter, ui m_framesetsToUpdate.insert( headerFooter, true ); } -// Called at beginning and end of the layout for a given page, -// to determine if the main-text-frame layout really changed or not. +// Called at beginning and end of the tqlayout for a given page, +// to determine if the main-text-frame tqlayout really changed or not. // Testing in resizeMainTextFrame doesn't work, we call it several times, // once for each footnote, so it can't detect the "no change" case. KoRect KWFrameLayout::firstColumnRect( KWFrameSet* mainTextFrameSet, int pageNum, int numColumns ) const @@ -616,7 +616,7 @@ void KWFrameLayout::checkFootNotes() { // We recalculate all footnotes pages, but we return true // if those on pageNum have changed. - QPtrListIterator<HeaderFooterFrameset> it( m_footnotes ); + TQPtrListIterator<HeaderFooterFrameset> it( m_footnotes ); for ( ; it.current() ; ++it ) { HeaderFooterFrameset* hff = it.current(); |