summaryrefslogtreecommitdiffstats
path: root/kword/KWDocument.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kword/KWDocument.cpp
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-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 'kword/KWDocument.cpp')
-rw-r--r--kword/KWDocument.cpp1198
1 files changed, 599 insertions, 599 deletions
diff --git a/kword/KWDocument.cpp b/kword/KWDocument.cpp
index eb4f1461..19d87a05 100644
--- a/kword/KWDocument.cpp
+++ b/kword/KWDocument.cpp
@@ -84,10 +84,10 @@
#include <kspell2/settings.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
-#include <qtimer.h>
-#include <qbuffer.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
+#include <tqbuffer.h>
#include <unistd.h>
#include <math.h>
@@ -105,7 +105,7 @@ class KWCommandHistory : public KoCommandHistory
{
public:
KWCommandHistory( KWDocument * doc ) : KoCommandHistory( doc->actionCollection(), true ), m_pDoc( doc ) {}
-public /*slots*/: // They are already slots in the parent. Running moc on the inherited class shouldn't be necessary AFAICS.
+public /*slots*/: // They are already slots in the tqparent. Running tqmoc on the inherited class shouldn't be necessary AFAICS.
virtual void undo();
virtual void redo();
private:
@@ -129,7 +129,7 @@ void KWCommandHistory::redo()
/******************************************************************/
void KWDocument::clearUndoRedoInfos()
{
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit )
{
KWTextFrameSet *fs = dynamic_cast<KWTextFrameSet *>( fit.current() );
@@ -144,15 +144,15 @@ void KWDocument::clearUndoRedoInfos()
*/
class KWDocument::InitialEditing {
public:
- QString m_initialFrameSet;
+ TQString m_initialFrameSet;
int m_initialCursorParag;
int m_initialCursorIndex;
};
const int KWDocument::CURRENT_SYNTAX_VERSION = 3;
-KWDocument::KWDocument(QWidget *parentWidget, const char *widname, QObject* parent, const char* name, bool singleViewMode )
- : KoDocument( parentWidget, widname, parent, name, singleViewMode ),
+KWDocument::KWDocument(TQWidget *tqparentWidget, const char *widname, TQObject* tqparent, const char* name, bool singleViewMode )
+ : KoDocument( tqparentWidget, widname, tqparent, name, singleViewMode ),
m_urlIntern()
{
KWStatisticVariable::setExtendedType( true );
@@ -201,7 +201,7 @@ KWDocument::KWDocument(QWidget *parentWidget, const char *widname, QObject* pare
m_viewFormattingBreak = true;
m_viewFrameBorders = true;
- m_repaintAllViewsPending = false;
+ m_tqrepaintAllViewsPending = false;
m_recalcFramesPending = -1;
m_bShowDocStruct = true;
m_bShowRuler = true;
@@ -220,8 +220,8 @@ KWDocument::KWDocument(QWidget *parentWidget, const char *widname, QObject* pare
m_layoutViewMode = 0;
m_commandHistory = new KWCommandHistory( this );
- connect( m_commandHistory, SIGNAL( documentRestored() ), this, SLOT( slotDocumentRestored() ) );
- connect( m_commandHistory, SIGNAL( commandExecuted() ), this, SLOT( slotCommandExecuted() ) );
+ connect( m_commandHistory, TQT_SIGNAL( documentRestored() ), this, TQT_SLOT( slotDocumentRestored() ) );
+ connect( m_commandHistory, TQT_SIGNAL( commandExecuted() ), this, TQT_SLOT( slotCommandExecuted() ) );
//styleMask = U_FONT_FAMILY_ALL_SIZE | U_COLOR | U_BORDER | U_INDENT |
// U_NUMBERING | U_ALIGN | U_TABS | U_SMART;
@@ -259,20 +259,20 @@ KWDocument::KWDocument(QWidget *parentWidget, const char *widname, QObject* pare
// Get default font from the KWord config file
KConfig *config = KWFactory::instance()->config();
config->setGroup("Document defaults" );
- QString defaultFontname=config->readEntry("DefaultFont");
+ TQString defaultFontname=config->readEntry("DefaultFont");
if ( !defaultFontname.isEmpty() )
m_defaultFont.fromString( defaultFontname );
// If not found, we automatically fallback to the application font (the one from KControl's font module)
// Try to force a scalable font.
- m_defaultFont.setStyleStrategy( QFont::ForceOutline );
+ m_defaultFont.setStyleStrategy( TQFont::ForceOutline );
int ptSize = m_defaultFont.pointSize();
if ( ptSize == -1 ) // specified with a pixel size ?
- ptSize = QFontInfo(m_defaultFont).pointSize();
+ ptSize = TQFontInfo(m_defaultFont).pointSize();
//kdDebug() << "Default font: requested family: " << m_defaultFont.family() << endl;
- //kdDebug() << "Default font: real family: " << QFontInfo(m_defaultFont).family() << endl;
+ //kdDebug() << "Default font: real family: " << TQFontInfo(m_defaultFont).family() << endl;
if ( name )
dcopObject();
@@ -330,8 +330,8 @@ void KWDocument::initConfig()
if(config->hasGroup("Interface" ) )
{
config->setGroup( "Interface" );
- setGridY(QMAX( config->readDoubleNumEntry("GridY",MM_TO_POINT(5.0) ), 0.1));
- setGridX(QMAX( config->readDoubleNumEntry("GridX",MM_TO_POINT(5.0) ), 0.1));
+ setGridY(TQMAX( config->readDoubleNumEntry("GridY",MM_TO_POINT(5.0) ), 0.1));
+ setGridX(TQMAX( config->readDoubleNumEntry("GridX",MM_TO_POINT(5.0) ), 0.1));
setCursorInProtectedArea( config->readBoolEntry( "cursorInProtectArea", true ));
// Config-file value in mm, default 10 pt
double indent = config->readDoubleNumEntry("Indent", MM_TO_POINT(10.0) ) ;
@@ -457,7 +457,7 @@ void KWDocument::setZoomAndResolution( int zoom, int dpiX, int dpiY )
KWTextFrameSet * KWDocument::textFrameSet ( unsigned int num ) const
{
unsigned int i=0;
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit )
{
if(fit.current()->isDeleted()) continue;
@@ -476,23 +476,23 @@ void KWDocument::newZoomAndResolution( bool updateViews, bool forPrint )
if ( KFormula::Document* formulaDocument = m_formulaDocumentWrapper->document() )
formulaDocument->newZoomAndResolution( updateViews,forPrint );
#if 0
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit )
fit.current()->zoom( forPrint );
#endif
// First recalc all frames (including the kotextdocument width)
updateAllFrames();
- // Then relayout the text inside the frames
- layout();
+ // Then retqlayout the text inside the frames
+ tqlayout();
if ( updateViews )
{
emit newContentsSize();
- repaintAllViews( true );
+ tqrepaintAllViews( true );
}
}
-bool KWDocument::initDoc(InitDocFlags flags, QWidget* parentWidget)
+bool KWDocument::initDoc(InitDocFlags flags, TQWidget* tqparentWidget)
{
m_pageColumns.columns = 1;
m_pageColumns.ptColumnSpacing = m_defaultColumnSpacing;
@@ -507,7 +507,7 @@ bool KWDocument::initDoc(InitDocFlags flags, QWidget* parentWidget)
if ( isEmbedded() )
{
- QString fileName( locate( "kword_template", "Normal/.source/Embedded.kwt" , KWFactory::instance() ) );
+ TQString fileName( locate( "kword_template", "Normal/.source/Embedded.kwt" , KWFactory::instance() ) );
resetURL();
ok = loadNativeFormat( fileName );
if ( !ok )
@@ -518,7 +518,7 @@ bool KWDocument::initDoc(InitDocFlags flags, QWidget* parentWidget)
}
else if (flags==KoDocument::InitDocEmpty)
{
- QString fileName( locate( "kword_template", "Normal/.source/PlainText.kwt" , KWFactory::instance() ) );
+ TQString fileName( locate( "kword_template", "Normal/.source/PlainText.kwt" , KWFactory::instance() ) );
resetURL();
ok = loadNativeFormat( fileName );
if ( !ok )
@@ -536,10 +536,10 @@ bool KWDocument::initDoc(InitDocFlags flags, QWidget* parentWidget)
dlgtype = KoTemplateChooseDia::OnlyTemplates;
- QString file;
+ TQString file;
KoTemplateChooseDia::ReturnType ret = KoTemplateChooseDia::choose(
KWFactory::instance(), file,
- dlgtype, "kword_template", parentWidget );
+ dlgtype, "kword_template", tqparentWidget );
if ( ret == KoTemplateChooseDia::Template ) {
resetURL();
ok = loadNativeFormat( file );
@@ -551,7 +551,7 @@ bool KWDocument::initDoc(InitDocFlags flags, QWidget* parentWidget)
//kdDebug() << "KWDocument::initDoc opening URL " << url.prettyURL() << endl;
ok = openURL( url );
} else if ( ret == KoTemplateChooseDia::Empty ) {
- QString fileName( locate( "kword_template", "Normal/.source/PlainText.kwt" , KWFactory::instance() ) );
+ TQString fileName( locate( "kword_template", "Normal/.source/PlainText.kwt" , KWFactory::instance() ) );
resetURL();
ok = loadNativeFormat( fileName );
if ( !ok )
@@ -562,7 +562,7 @@ bool KWDocument::initDoc(InitDocFlags flags, QWidget* parentWidget)
return ok;
}
-void KWDocument::openExistingFile( const QString& file )
+void KWDocument::openExistingFile( const TQString& file )
{
m_pageColumns.columns = 1;
m_pageColumns.ptColumnSpacing = m_defaultColumnSpacing;
@@ -576,7 +576,7 @@ void KWDocument::openExistingFile( const QString& file )
KoDocument::openExistingFile( file );
}
-void KWDocument::openTemplate( const QString& file )
+void KWDocument::openTemplate( const TQString& file )
{
m_pageColumns.columns = 1;
m_pageColumns.ptColumnSpacing = m_defaultColumnSpacing;
@@ -601,7 +601,7 @@ void KWDocument::initEmpty()
m_pageHeaderFooter.ptFooterBodySpacing = 10;
m_pageHeaderFooter.ptFootNoteBodySpacing = 10;
- QString fileName( locate( "kword_template", "Normal/.source/PlainText.kwt" , KWFactory::instance() ) );
+ TQString fileName( locate( "kword_template", "Normal/.source/PlainText.kwt" , KWFactory::instance() ) );
bool ok = loadNativeFormat( fileName );
if ( !ok )
showLoadingErrorDialog();
@@ -617,9 +617,9 @@ KoPageLayout KWDocument::pageLayout(int pageNumber /* = 0 */) const
return pageManager()->pageLayout(pageNumber);
}
-void KWDocument::setPageLayout( const KoPageLayout& layout, const KoColumns& cl, const KoKWHeaderFooter& hf, bool updateViews )
+void KWDocument::setPageLayout( const KoPageLayout& tqlayout, const KoColumns& cl, const KoKWHeaderFooter& hf, bool updateViews )
{
- m_pageLayout = layout;
+ m_pageLayout = tqlayout;
if ( m_processingType == WP ) {
m_pageColumns = cl;
}
@@ -643,8 +643,8 @@ void KWDocument::setPageLayout( const KoPageLayout& layout, const KoColumns& cl,
if ( updateViews )
{
- // Invalidate document layout, for proper repaint
- this->layout();
+ // Invalidate document tqlayout, for proper tqrepaint
+ this->tqlayout();
emit pageLayoutChanged( m_pageLayout );
updateContentsSize();
}
@@ -659,13 +659,13 @@ double KWDocument::ptColumnWidth() const
/ m_pageColumns.columns;
}
-class KWFootNoteFrameSetList : public QPtrList<KWFootNoteFrameSet>
+class KWFootNoteFrameSetList : public TQPtrList<KWFootNoteFrameSet>
{
public:
KWFootNoteFrameSetList( bool reversed ) : m_reversed( reversed ) {}
protected:
// Compare the order of the associated variables
- virtual int compareItems(QPtrCollection::Item a, QPtrCollection::Item b)
+ virtual int compareItems(TQPtrCollection::Item a, TQPtrCollection::Item b)
{
KWFootNoteFrameSet* fsa = ((KWFootNoteFrameSet *)a);
KWFootNoteFrameSet* fsb = ((KWFootNoteFrameSet *)b);
@@ -688,7 +688,7 @@ private:
/* append headers and footers if needed, and create enough pages for all the existing frames */
void KWDocument::recalcFrames( int fromPage, int toPage /*-1 for all*/, uint flags )
{
- fromPage = QMAX(pageManager()->startPage(), fromPage);
+ fromPage = TQMAX(pageManager()->startPage(), fromPage);
if ( m_lstFrameSet.isEmpty() )
return;
//printDebug();
@@ -707,7 +707,7 @@ void KWDocument::recalcFrames( int fromPage, int toPage /*-1 for all*/, uint fla
KWFootNoteFrameSetList footnotesList( true ); // Reversed, we want footnotes from bottom to top
KWFootNoteFrameSetList endnotesList( false ); // Endnotes are in top to bottom order
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit )
{
KWFrameSet * fs = fit.current();
@@ -762,7 +762,7 @@ void KWDocument::recalcFrames( int fromPage, int toPage /*-1 for all*/, uint fla
// This allocation each time might slow things down a bit.
// TODO KWHeaderFooterFrameSet : public KWTextFrameSet, and store the HeaderFooterFrameset data into there.
// ... hmm, and then KWFootNoteFrameSet needs to inherit KWHeaderFooterFrameSet
- QPtrList<KWFrameLayout::HeaderFooterFrameset> headerFooterList;
+ TQPtrList<KWFrameLayout::HeaderFooterFrameset> headerFooterList;
headerFooterList.setAutoDelete( true );
const int firstPageNum = startPage();
@@ -885,11 +885,11 @@ void KWDocument::recalcFrames( int fromPage, int toPage /*-1 for all*/, uint fla
// Footer
// In the list it will have to be from top and from bottom:
// Header, Footer, Footnote from bottom to top
- QPtrList<KWFrameLayout::HeaderFooterFrameset> footnotesHFList;
+ TQPtrList<KWFrameLayout::HeaderFooterFrameset> footnotesHFList;
footnotesHFList.setAutoDelete( true );
footnotesList.sort();
- QPtrListIterator<KWFootNoteFrameSet> fnfsIt( footnotesList ); // fnfs == "footnote frameset"
+ TQPtrListIterator<KWFootNoteFrameSet> fnfsIt( footnotesList ); // fnfs == "footnote frameset"
for ( ; fnfsIt.current() ; ++fnfsIt )
{
KWFootNoteFrameSet* fnfs = fnfsIt.current();
@@ -902,18 +902,18 @@ void KWDocument::recalcFrames( int fromPage, int toPage /*-1 for all*/, uint fla
// With other kind of framesets, the height is simply frame->height.
// But for footnotes, the height to pass to KWFrameLayout is the sum of the frame heights.
hff->m_height = 0;
- for (QPtrListIterator<KWFrame> f = fnfs->frameIterator(); f.current() ; ++f )
+ for (TQPtrListIterator<KWFrame> f = fnfs->frameIterator(); f.current() ; ++f )
hff->m_height += f.current()->height();
footnotesHFList.append( hff );
}
// Endnotes, however are laid out from top to bottom.
- QPtrList<KWFrameLayout::HeaderFooterFrameset> endnotesHFList;
+ TQPtrList<KWFrameLayout::HeaderFooterFrameset> endnotesHFList;
endnotesHFList.setAutoDelete( true );
endnotesList.sort();
- QPtrListIterator<KWFootNoteFrameSet> enfsIt( endnotesList ); // enfs == "endnote frameset"
+ TQPtrListIterator<KWFootNoteFrameSet> enfsIt( endnotesList ); // enfs == "endnote frameset"
for ( ; enfsIt.current() ; ++enfsIt )
{
KWFootNoteFrameSet* enfs = enfsIt.current();
@@ -924,7 +924,7 @@ void KWDocument::recalcFrames( int fromPage, int toPage /*-1 for all*/, uint fla
// The height to pass to KWFrameLayout is the sum of the frame heights.
hff->m_height = 0;
- for (QPtrListIterator<KWFrame> f = enfs->frameIterator(); f.current() ; ++f )
+ for (TQPtrListIterator<KWFrame> f = enfs->frameIterator(); f.current() ; ++f )
hff->m_height += f.current()->height();
endnotesHFList.append( hff );
@@ -932,13 +932,13 @@ void KWDocument::recalcFrames( int fromPage, int toPage /*-1 for all*/, uint fla
// append pages as needed.
double maxBottom = 0;
- for (QPtrListIterator<KWFrameSet> fsit = framesetsIterator(); fsit.current() ; ++fsit ) {
+ for (TQPtrListIterator<KWFrameSet> fsit = framesetsIterator(); fsit.current() ; ++fsit ) {
KWFrameSet *fs = fsit.current();
if ( !fs->isVisible() || fs->isAHeader() || !fs->isAFooter() ||
!fs->isFloating() || !fs->isFootEndNote() )
continue;
- for (QPtrListIterator<KWFrame> fit = fs->frameIterator(); fit.current() ; ++fit )
- maxBottom = QMAX(maxBottom, fit.current()->bottom());
+ for (TQPtrListIterator<KWFrame> fit = fs->frameIterator(); fit.current() ; ++fit )
+ maxBottom = TQMAX(maxBottom, fit.current()->bottom());
}
KWPage *last = pageManager()->page(lastPage());
double docHeight = last->offsetInDocument() + last->height();
@@ -953,10 +953,10 @@ void KWDocument::recalcFrames( int fromPage, int toPage /*-1 for all*/, uint fla
if ( fromPage > toPage ) // this can happen with "endnotes only" pages :) // ### really?
fromPage = toPage; // ie. start at the last real page
KWFrameLayout frameLayout( this, headerFooterList, footnotesHFList, endnotesHFList );
- frameLayout.layout( frameset, m_pageColumns.columns, fromPage, toPage, flags );
+ frameLayout.tqlayout( frameset, m_pageColumns.columns, fromPage, toPage, flags );
// If the number of pages changed, update views and variables etc.
- // (now that the frame layout has been done)
+ // (now that the frame tqlayout has been done)
if ( pageCount() != oldPages && !m_bGeneratingPreview )
{
// Very much like the end of appendPage, but we don't want to call recalcFrames ;)
@@ -969,12 +969,12 @@ void KWDocument::recalcFrames( int fromPage, int toPage /*-1 for all*/, uint fla
else {
// DTP mode: calculate the number of pages from the frames.
double maxBottom=0;
- for (QPtrListIterator<KWFrameSet> fit = framesetsIterator(); fit.current() ; ++fit ) {
+ for (TQPtrListIterator<KWFrameSet> fit = framesetsIterator(); fit.current() ; ++fit ) {
if(fit.current()->isDeleted()) continue;
if(fit.current()->frameSetInfo()==KWFrameSet::FI_BODY && !fit.current()->isFloating()) {
KWFrameSet * fs = fit.current();
- for (QPtrListIterator<KWFrame> f = fs->frameIterator(); f.current() ; ++f )
- maxBottom=QMAX(maxBottom, f.current()->bottom());
+ for (TQPtrListIterator<KWFrame> f = fs->frameIterator(); f.current() ; ++f )
+ maxBottom=TQMAX(maxBottom, f.current()->bottom());
}
}
KWPage *last = pageManager()->page(lastPage());
@@ -996,7 +996,7 @@ void KWDocument::recalcFrames( int fromPage, int toPage /*-1 for all*/, uint fla
bool KWDocument::loadChildren( KoStore *store )
{
//kdDebug(32001) << "KWDocument::loadChildren" << endl;
- QPtrListIterator<KoDocumentChild> it( children() );
+ TQPtrListIterator<KoDocumentChild> it( tqchildren() );
for( ; it.current(); ++it ) {
if ( !it.current()->loadDocument( store ) )
return FALSE;
@@ -1005,26 +1005,26 @@ bool KWDocument::loadChildren( KoStore *store )
return TRUE;
}
-void KWDocument::loadPictureMap ( QDomElement& domElement )
+void KWDocument::loadPictureMap ( TQDomElement& domElement )
{
m_pictureMap.clear();
// <PICTURES>
- QDomElement picturesElem = domElement.namedItem( "PICTURES" ).toElement();
+ TQDomElement picturesElem = domElement.namedItem( "PICTURES" ).toElement();
if ( !picturesElem.isNull() )
{
m_pictureCollection->readXML( picturesElem, m_pictureMap );
}
// <PIXMAPS>
- QDomElement pixmapsElem = domElement.namedItem( "PIXMAPS" ).toElement();
+ TQDomElement pixmapsElem = domElement.namedItem( "PIXMAPS" ).toElement();
if ( !pixmapsElem.isNull() )
{
m_pictureCollection->readXML( pixmapsElem, m_pictureMap );
}
// <CLIPARTS>
- QDomElement clipartsElem = domElement.namedItem( "CLIPARTS" ).toElement();
+ TQDomElement clipartsElem = domElement.namedItem( "CLIPARTS" ).toElement();
if ( !clipartsElem.isNull() )
{
m_pictureCollection->readXML( pixmapsElem, m_pictureMap );
@@ -1032,35 +1032,35 @@ void KWDocument::loadPictureMap ( QDomElement& domElement )
}
-bool KWDocument::loadOasis( const QDomDocument& doc, KoOasisStyles& oasisStyles, const QDomDocument& settings, KoStore* store )
+bool KWDocument::loadOasis( const TQDomDocument& doc, KoOasisStyles& oasisStyles, const TQDomDocument& settings, KoStore* store )
{
- QTime dt;
+ TQTime dt;
dt.start();
emit sigProgress( 0 );
clear();
kdDebug(32001) << "KWDocument::loadOasis" << endl;
- QDomElement content = doc.documentElement();
- QDomElement realBody ( KoDom::namedItemNS( content, KoXmlNS::office, "body" ) );
+ TQDomElement content = doc.documentElement();
+ TQDomElement realBody ( KoDom::namedItemNS( content, KoXmlNS::office, "body" ) );
if ( realBody.isNull() )
{
kdError(32001) << "No office:body found!" << endl;
setErrorMessage( i18n( "Invalid OASIS OpenDocument file. No office:body tag found." ) );
return false;
}
- QDomElement body = KoDom::namedItemNS( realBody, KoXmlNS::office, "text" );
+ TQDomElement body = KoDom::namedItemNS( realBody, KoXmlNS::office, "text" );
if ( body.isNull() )
{
kdError(32001) << "No office:text found!" << endl;
- QDomElement childElem;
- QString localName;
+ TQDomElement childElem;
+ TQString localName;
forEachElement( childElem, realBody ) {
localName = childElem.localName();
}
if ( localName.isEmpty() )
setErrorMessage( i18n( "Invalid OASIS OpenDocument file. No tag found inside office:body." ) );
else
- setErrorMessage( i18n( "This is not a word processing document, but %1. Please try opening it with the appropriate application." ).arg( KoDocument::tagNameToDocumentType( localName ) ) );
+ setErrorMessage( i18n( "This is not a word processing document, but %1. Please try opening it with the appropriate application." ).tqarg( KoDocument::tagNameToDocumentType( localName ) ) );
return false;
}
@@ -1072,7 +1072,7 @@ bool KWDocument::loadOasis( const QDomDocument& doc, KoOasisStyles& oasisStyles,
// In theory the page format is the style:master-page-name of the first paragraph...
// But, hmm, in a doc with only a table there was no reference to the master page at all...
- // So we load the standard page layout to start with, and in KWTextParag
+ // So we load the standard page tqlayout to start with, and in KWTextParag
// we might overwrite it with another one.
m_loadingInfo->m_currentMasterPage = "Standard";
if ( !loadOasisPageLayout( m_loadingInfo->m_currentMasterPage, context ) )
@@ -1086,12 +1086,12 @@ bool KWDocument::loadOasis( const QDomDocument& doc, KoOasisStyles& oasisStyles,
m_hasTOC = false;
m_tabStop = MM_TO_POINT(15);
- const QDomElement* defaultParagStyle = oasisStyles.defaultStyle( "paragraph" );
+ const TQDomElement* defaultParagStyle = oasisStyles.defaultStyle( "paragraph" );
if ( defaultParagStyle ) {
KoStyleStack stack;
stack.push( *defaultParagStyle );
stack.setTypeProperties( "paragraph" );
- QString tabStopVal = stack.attributeNS( KoXmlNS::style, "tab-stop-distance" );
+ TQString tabStopVal = stack.attributeNS( KoXmlNS::style, "tab-stop-distance" );
if ( !tabStopVal.isEmpty() )
m_tabStop = KoUnit::parseValue( tabStopVal );
}
@@ -1132,30 +1132,30 @@ bool KWDocument::loadOasis( const QDomDocument& doc, KoOasisStyles& oasisStyles,
fs->addFrame( frame );
// load padding, background and borders for the main frame
- const QDomElement* masterPage = context.oasisStyles().masterPages()[ m_loadingInfo->m_currentMasterPage ];
- const QDomElement *masterPageStyle = masterPage ? context.oasisStyles().findStyle(masterPage->attributeNS( KoXmlNS::style, "page-layout-name", QString::null ) ) : 0;
+ const TQDomElement* masterPage = context.oasisStyles().masterPages()[ m_loadingInfo->m_currentMasterPage ];
+ const TQDomElement *masterPageStyle = masterPage ? context.oasisStyles().findStyle(masterPage->attributeNS( KoXmlNS::style, "page-tqlayout-name", TQString() ) ) : 0;
if ( masterPageStyle )
{
KoStyleStack styleStack;
styleStack.push( *masterPageStyle );
- styleStack.setTypeProperties( "page-layout" );
+ styleStack.setTypeProperties( "page-tqlayout" );
frame->loadBorderProperties( styleStack );
}
- fs->renumberFootNotes( false /*no repaint*/ );
+ fs->renumberFootNotes( false /*no tqrepaint*/ );
} else {
// DTP mode: the items in the body are page-sequence and then frames
- QDomElement tag;
+ TQDomElement tag;
forEachElement( tag, body )
{
context.styleStack().save();
- const QString localName = tag.localName();
+ const TQString localName = tag.localName();
if ( localName == "page-sequence" && tag.namespaceURI() == KoXmlNS::text )
{
- // We don't have support for changing the page layout yet, so just take the
+ // We don't have support for changing the page tqlayout yet, so just take the
// number of pages
int pages=1;
- QDomElement page;
+ TQDomElement page;
forEachElement( page, tag )
++pages;
kdDebug() << "DTP mode: found " << pages << "pages" << endl;
@@ -1198,39 +1198,39 @@ bool KWDocument::loadOasis( const QDomDocument& doc, KoOasisStyles& oasisStyles,
return true;
}
-bool KWDocument::loadOasisPageLayout( const QString& masterPageName, KoOasisContext& context )
+bool KWDocument::loadOasisPageLayout( const TQString& masterPageName, KoOasisContext& context )
{
KoColumns& columns = m_loadingInfo->columns;
const KoOasisStyles& oasisStyles = context.oasisStyles();
- const QDomElement* masterPage = oasisStyles.masterPages()[ masterPageName ];
+ const TQDomElement* masterPage = oasisStyles.masterPages()[ masterPageName ];
Q_ASSERT( masterPage );
- const QDomElement *masterPageStyle = masterPage ? oasisStyles.findStyle( masterPage->attributeNS( KoXmlNS::style, "page-layout-name", QString::null ) ) : 0;
+ const TQDomElement *masterPageStyle = masterPage ? oasisStyles.findStyle( masterPage->attributeNS( KoXmlNS::style, "page-tqlayout-name", TQString() ) ) : 0;
Q_ASSERT( masterPageStyle );
if ( masterPageStyle )
{
m_pageLayout.loadOasis( *masterPageStyle );
pageManager()->setDefaultPage(m_pageLayout);
- const QDomElement properties( KoDom::namedItemNS( *masterPageStyle, KoXmlNS::style, "page-layout-properties" ) );
- const QDomElement footnoteSep = KoDom::namedItemNS( properties, KoXmlNS::style, "footnote-sep" );
+ const TQDomElement properties( KoDom::namedItemNS( *masterPageStyle, KoXmlNS::style, "page-tqlayout-properties" ) );
+ const TQDomElement footnoteSep = KoDom::namedItemNS( properties, KoXmlNS::style, "footnote-sep" );
if ( !footnoteSep.isNull() ) {
// style:width="0.018cm" style:distance-before-sep="0.101cm"
// style:distance-after-sep="0.101cm" style:adjustment="left"
// style:rel-width="25%" style:color="#000000"
- const QString width = footnoteSep.attributeNS( KoXmlNS::style, "width", QString::null );
+ const TQString width = footnoteSep.attributeNS( KoXmlNS::style, "width", TQString() );
if ( !width.isEmpty() ) {
m_footNoteSeparatorLineWidth = KoUnit::parseValue( width );
}
- QString pageWidth = footnoteSep.attributeNS( KoXmlNS::style, "rel-width", QString::null );
+ TQString pageWidth = footnoteSep.attributeNS( KoXmlNS::style, "rel-width", TQString() );
if ( pageWidth.endsWith( "%" ) ) {
pageWidth.truncate( pageWidth.length() - 1 ); // remove '%'
- m_iFootNoteSeparatorLineLength = qRound( pageWidth.toDouble() );
+ m_iFootNoteSeparatorLineLength = tqRound( pageWidth.toDouble() );
}
// Not in KWord: color, distance before and after separator
- const QString style = footnoteSep.attributeNS( KoXmlNS::style, "line-style", QString::null );
+ const TQString style = footnoteSep.attributeNS( KoXmlNS::style, "line-style", TQString() );
if ( style == "solid" || style.isEmpty() )
m_footNoteSeparatorLineType = SLT_SOLID;
else if ( style == "dash" )
@@ -1244,7 +1244,7 @@ bool KWDocument::loadOasisPageLayout( const QString& masterPageName, KoOasisCont
else
kdDebug() << "Unknown value for m_footNoteSeparatorLineType: " << style << endl;
- const QString pos = footnoteSep.attributeNS( KoXmlNS::style, "adjustment", QString::null );
+ const TQString pos = footnoteSep.attributeNS( KoXmlNS::style, "adjustment", TQString() );
if ( pos == "centered" )
m_footNoteSeparatorLinePos = SLP_CENTERED;
else if ( pos == "right")
@@ -1253,17 +1253,17 @@ bool KWDocument::loadOasisPageLayout( const QString& masterPageName, KoOasisCont
m_footNoteSeparatorLinePos = SLP_LEFT;
}
- const QDomElement columnsElem = KoDom::namedItemNS( properties, KoXmlNS::style, "columns" );
+ const TQDomElement columnsElem = KoDom::namedItemNS( properties, KoXmlNS::style, "columns" );
if ( !columnsElem.isNull() )
{
- columns.columns = columnsElem.attributeNS( KoXmlNS::fo, "column-count", QString::null ).toInt();
+ columns.columns = columnsElem.attributeNS( KoXmlNS::fo, "column-count", TQString() ).toInt();
if ( columns.columns == 0 )
columns.columns = 1;
// TODO OASIS OpenDocument supports columns of different sizes, using <style:column style:rel-width="...">
// (with fo:start-indent/fo:end-indent for per-column spacing)
// But well, it also allows us to specify a single gap.
if ( columnsElem.hasAttributeNS( KoXmlNS::fo, "column-gap" ) )
- columns.ptColumnSpacing = KoUnit::parseValue( columnsElem.attributeNS( KoXmlNS::fo, "column-gap", QString::null ) );
+ columns.ptColumnSpacing = KoUnit::parseValue( columnsElem.attributeNS( KoXmlNS::fo, "column-gap", TQString() ) );
// It also supports drawing a vertical line as a separator...
}
@@ -1287,29 +1287,29 @@ bool KWDocument::loadOasisPageLayout( const QString& masterPageName, KoOasisCont
return true;
}
-bool KWDocument::loadMasterPageStyle( const QString& masterPageName, KoOasisContext& context )
+bool KWDocument::loadMasterPageStyle( const TQString& masterPageName, KoOasisContext& context )
{
const KoOasisStyles& oasisStyles = context.oasisStyles();
- const QDomElement* masterPage = oasisStyles.masterPages()[ masterPageName ];
+ const TQDomElement* masterPage = oasisStyles.masterPages()[ masterPageName ];
Q_ASSERT( masterPage );
- const QDomElement *masterPageStyle = masterPage ? oasisStyles.findStyle( masterPage->attributeNS( KoXmlNS::style, "page-layout-name", QString::null ) ) : 0;
+ const TQDomElement *masterPageStyle = masterPage ? oasisStyles.findStyle( masterPage->attributeNS( KoXmlNS::style, "page-tqlayout-name", TQString() ) ) : 0;
Q_ASSERT( masterPageStyle );
// This check is done here and not in loadOasisPageLayout in case the Standard master-page
// has no page information but the first paragraph points to a master-page that does (#129585)
if ( m_pageLayout.ptWidth <= 1e-13 || m_pageLayout.ptHeight <= 1e-13 )
{
- // Loading page layout failed, try to see why.
- QDomElement properties( KoDom::namedItemNS( *masterPageStyle, KoXmlNS::style, "page-layout-properties" ) );
+ // Loading page tqlayout failed, try to see why.
+ TQDomElement properties( KoDom::namedItemNS( *masterPageStyle, KoXmlNS::style, "page-tqlayout-properties" ) );
//if ( properties.isNull() )
- // setErrorMessage( i18n( "Invalid document. No page layout properties were found. The application which produced this document isn't OASIS-compliant." ) );
+ // setErrorMessage( i18n( "Invalid document. No page tqlayout properties were found. The application which produced this document isn't OASIS-compliant." ) );
//else if ( properties.hasAttributeNS( KoXmlNS::fo, "page-width" ) )
- // setErrorMessage( i18n( "Invalid document. Page layout has no page width. The application which produced this document isn't OASIS-compliant." ) );
+ // setErrorMessage( i18n( "Invalid document. Page tqlayout has no page width. The application which produced this document isn't OASIS-compliant." ) );
//else
if ( properties.hasAttributeNS( "http://www.w3.org/1999/XSL/Format", "page-width" ) )
setErrorMessage( i18n( "Invalid document. 'fo' has the wrong namespace. The application which produced this document is not OASIS-compliant." ) );
else
- setErrorMessage( i18n( "Invalid document. Paper size: %1x%2" ).arg( m_pageLayout.ptWidth ).arg( m_pageLayout.ptHeight ) );
+ setErrorMessage( i18n( "Invalid document. Paper size: %1x%2" ).tqarg( m_pageLayout.ptWidth ).tqarg( m_pageLayout.ptHeight ) );
return false;
}
@@ -1322,10 +1322,10 @@ bool KWDocument::loadMasterPageStyle( const QString& masterPageName, KoOasisCont
{
KWOasisLoader oasisLoader( this );
- QDomElement headerStyle = KoDom::namedItemNS( *masterPageStyle, KoXmlNS::style, "header-style" );
- QDomElement footerStyle = KoDom::namedItemNS( *masterPageStyle, KoXmlNS::style, "footer-style" );
- QDomElement headerLeftElem = KoDom::namedItemNS( *masterPage, KoXmlNS::style, "header-left" );
- QDomElement headerFirstElem = KoDom::namedItemNS( *masterPage, KoXmlNS::style, "header-first" ); // hack, not oasis compliant
+ TQDomElement headerStyle = KoDom::namedItemNS( *masterPageStyle, KoXmlNS::style, "header-style" );
+ TQDomElement footerStyle = KoDom::namedItemNS( *masterPageStyle, KoXmlNS::style, "footer-style" );
+ TQDomElement headerLeftElem = KoDom::namedItemNS( *masterPage, KoXmlNS::style, "header-left" );
+ TQDomElement headerFirstElem = KoDom::namedItemNS( *masterPage, KoXmlNS::style, "header-first" ); // hack, not oasis compliant
const bool hasFirstHeader = !headerFirstElem.isNull();
if ( !headerLeftElem.isNull() )
{
@@ -1342,7 +1342,7 @@ bool KWDocument::loadMasterPageStyle( const QString& masterPageName, KoOasisCont
oasisLoader.loadOasisHeaderFooter( headerFirstElem, hasEvenOddHeader, headerStyle, context );
}
- QDomElement headerElem = KoDom::namedItemNS( *masterPage, KoXmlNS::style, "header" );
+ TQDomElement headerElem = KoDom::namedItemNS( *masterPage, KoXmlNS::style, "header" );
if ( !headerElem.isNull() )
{
oasisLoader.loadOasisHeaderFooter( headerElem, hasEvenOddHeader, headerStyle, context );
@@ -1350,8 +1350,8 @@ bool KWDocument::loadMasterPageStyle( const QString& masterPageName, KoOasisCont
// -- and now footers
- QDomElement footerLeftElem = KoDom::namedItemNS( *masterPage, KoXmlNS::style, "footer-left" );
- QDomElement footerFirstElem = KoDom::namedItemNS( *masterPage, KoXmlNS::style, "footer-first" ); // hack, not oasis compliant
+ TQDomElement footerLeftElem = KoDom::namedItemNS( *masterPage, KoXmlNS::style, "footer-left" );
+ TQDomElement footerFirstElem = KoDom::namedItemNS( *masterPage, KoXmlNS::style, "footer-first" ); // hack, not oasis compliant
const bool hasFirstFooter = !footerFirstElem.isNull();
if ( !footerLeftElem.isNull() )
{
@@ -1367,7 +1367,7 @@ bool KWDocument::loadMasterPageStyle( const QString& masterPageName, KoOasisCont
{
oasisLoader.loadOasisHeaderFooter( footerFirstElem, hasEvenOddFooter, footerStyle, context );
}
- QDomElement footerElem = KoDom::namedItemNS( *masterPage, KoXmlNS::style, "footer" );
+ TQDomElement footerElem = KoDom::namedItemNS( *masterPage, KoXmlNS::style, "footer" );
if ( !footerElem.isNull() )
{
oasisLoader.loadOasisHeaderFooter( footerElem, hasEvenOddFooter, footerStyle, context );
@@ -1440,11 +1440,11 @@ void KWDocument::clear()
// And let's do the same for framestyles
KWFrameStyle * standardFrameStyle = new KWFrameStyle( "Plain" );
- standardFrameStyle->setBackgroundColor(Qt::white);
- standardFrameStyle->setTopBorder(KoBorder(Qt::black,KoBorder::SOLID,0));
- standardFrameStyle->setRightBorder(KoBorder(Qt::black,KoBorder::SOLID,0));
- standardFrameStyle->setLeftBorder(KoBorder(Qt::black,KoBorder::SOLID,0));
- standardFrameStyle->setBottomBorder(KoBorder(Qt::black,KoBorder::SOLID,0));
+ standardFrameStyle->setBackgroundColor(TQt::white);
+ standardFrameStyle->setTopBorder(KoBorder(TQt::black,KoBorder::SOLID,0));
+ standardFrameStyle->setRightBorder(KoBorder(TQt::black,KoBorder::SOLID,0));
+ standardFrameStyle->setLeftBorder(KoBorder(TQt::black,KoBorder::SOLID,0));
+ standardFrameStyle->setBottomBorder(KoBorder(TQt::black,KoBorder::SOLID,0));
m_frameStyleColl->addStyle( standardFrameStyle );
// And let's do the same for tablestyles
@@ -1452,9 +1452,9 @@ void KWDocument::clear()
m_tableStyleColl->addStyle( standardTableStyle );
}
-bool KWDocument::loadXML( QIODevice *, const QDomDocument & doc )
+bool KWDocument::loadXML( TQIODevice *, const TQDomDocument & doc )
{
- QTime dt;
+ TQTime dt;
dt.start();
emit sigProgress( 0 );
kdDebug(32001) << "KWDocument::loadXML" << endl;
@@ -1471,10 +1471,10 @@ bool KWDocument::loadXML( QIODevice *, const QDomDocument & doc )
hf.ptFooterBodySpacing = 10.0;
hf.ptFootNoteBodySpacing = 10.0;
- QString value;
- QDomElement word = doc.documentElement();
+ TQString value;
+ TQDomElement word = doc.documentElement();
- value = KWDocument::getAttribute( word, "mime", QString::null );
+ value = KWDocument::getAttribute( word, "mime", TQString() );
if ( value.isEmpty() )
{
kdError(32001) << "No mime type specified!" << endl;
@@ -1484,7 +1484,7 @@ bool KWDocument::loadXML( QIODevice *, const QDomDocument & doc )
else if ( value != "application/x-kword" && value != "application/vnd.kde.kword" )
{
kdError(32001) << "Unknown mime type " << value << endl;
- setErrorMessage( i18n( "Invalid document. Expected mimetype application/x-kword or application/vnd.kde.kword, got %1" ).arg( value ) );
+ setErrorMessage( i18n( "Invalid document. Expected mimetype application/x-kword or application/vnd.kde.kword, got %1" ).tqarg( value ) );
return false;
}
m_syntaxVersion = KWDocument::getAttribute( word, "syntaxVersion", 0 );
@@ -1492,7 +1492,7 @@ bool KWDocument::loadXML( QIODevice *, const QDomDocument & doc )
{
int ret = KMessageBox::warningContinueCancel(
0, i18n("This document was created with a newer version of KWord (syntax version: %1)\n"
- "Opening it in this version of KWord will lose some information.").arg(m_syntaxVersion),
+ "Opening it in this version of KWord will lose some information.").tqarg(m_syntaxVersion),
i18n("File Format Mismatch"), KStdGuiItem::cont() );
if ( ret == KMessageBox::Cancel )
{
@@ -1505,7 +1505,7 @@ bool KWDocument::loadXML( QIODevice *, const QDomDocument & doc )
// Looks like support for the old way of naming images internally,
// see completeLoading.
- value = KWDocument::getAttribute( word, "url", QString::null );
+ value = KWDocument::getAttribute( word, "url", TQString() );
if ( !value.isNull() )
{
m_urlIntern = KURL( value ).path();
@@ -1514,7 +1514,7 @@ bool KWDocument::loadXML( QIODevice *, const QDomDocument & doc )
emit sigProgress(5);
// <PAPER>
- QDomElement paper = word.namedItem( "PAPER" ).toElement();
+ TQDomElement paper = word.namedItem( "PAPER" ).toElement();
if ( !paper.isNull() )
{
pgLayout.format = static_cast<KoFormat>( KWDocument::getAttribute( paper, "format", 0 ) );
@@ -1535,7 +1535,7 @@ bool KWDocument::loadXML( QIODevice *, const QDomDocument & doc )
if ( pgLayout.ptWidth <= 0 || pgLayout.ptHeight <= 0 )
{
setErrorMessage( i18n( "Invalid document. Paper size: %1x%2" )
- .arg( pgLayout.ptWidth ).arg( pgLayout.ptHeight ) );
+ .tqarg( pgLayout.ptWidth ).tqarg( pgLayout.ptHeight ) );
return false;
}
}
@@ -1552,7 +1552,7 @@ bool KWDocument::loadXML( QIODevice *, const QDomDocument & doc )
if ( paper.hasAttribute("slFootNotePosition"))
{
- QString tmp =paper.attribute("slFootNotePosition");
+ TQString tmp =paper.attribute("slFootNotePosition");
if ( tmp =="centered" )
m_footNoteSeparatorLinePos = SLP_CENTERED;
else if ( tmp =="right")
@@ -1582,7 +1582,7 @@ bool KWDocument::loadXML( QIODevice *, const QDomDocument & doc )
columns.ptColumnSpacing = getAttribute( paper, "ptColumnspc", 0.0 );
// <PAPERBORDERS>
- QDomElement paperborders = paper.namedItem( "PAPERBORDERS" ).toElement();
+ TQDomElement paperborders = paper.namedItem( "PAPERBORDERS" ).toElement();
if ( !paperborders.isNull() )
{
pgLayout.ptLeft = getAttribute( paperborders, "left", 0.0 );
@@ -1607,11 +1607,11 @@ bool KWDocument::loadXML( QIODevice *, const QDomDocument & doc )
kdWarning() << "No <PAPER> tag! This is a mandatory tag! Expect weird page sizes..." << endl;
// <ATTRIBUTES>
- QDomElement attributes = word.namedItem( "ATTRIBUTES" ).toElement();
+ TQDomElement attributes = word.namedItem( "ATTRIBUTES" ).toElement();
if ( !attributes.isNull() )
{
m_processingType = static_cast<ProcessingType>( KWDocument::getAttribute( attributes, "processing", 0 ) );
- //KWDocument::getAttribute( attributes, "standardpage", QString::null );
+ //KWDocument::getAttribute( attributes, "standardpage", TQString() );
m_headerVisible = static_cast<bool>( KWDocument::getAttribute( attributes, "hasHeader", 0 ) );
m_footerVisible = static_cast<bool>( KWDocument::getAttribute( attributes, "hasFooter", 0 ) );
if ( attributes.hasAttribute( "unit" ) )
@@ -1641,8 +1641,8 @@ bool KWDocument::loadXML( QIODevice *, const QDomDocument & doc )
emit sigProgress(10);
- QDomElement mailmerge = word.namedItem( "MAILMERGE" ).toElement();
- if (mailmerge!=QDomElement())
+ TQDomElement mailmerge = word.namedItem( "MAILMERGE" ).toElement();
+ if (mailmerge!=TQDomElement())
{
m_slDataBase->load(mailmerge);
}
@@ -1650,13 +1650,13 @@ bool KWDocument::loadXML( QIODevice *, const QDomDocument & doc )
emit sigProgress(15);
// Load all styles before the corresponding paragraphs try to use them!
- QDomElement stylesElem = word.namedItem( "STYLES" ).toElement();
+ TQDomElement stylesElem = word.namedItem( "STYLES" ).toElement();
if ( !stylesElem.isNull() )
loadStyleTemplates( stylesElem );
emit sigProgress(17);
- QDomElement frameStylesElem = word.namedItem( "FRAMESTYLES" ).toElement();
+ TQDomElement frameStylesElem = word.namedItem( "FRAMESTYLES" ).toElement();
if ( !frameStylesElem.isNull() )
loadFrameStyleTemplates( frameStylesElem );
else // load default styles
@@ -1664,7 +1664,7 @@ bool KWDocument::loadXML( QIODevice *, const QDomDocument & doc )
emit sigProgress(18);
- QDomElement tableStylesElem = word.namedItem( "TABLESTYLES" ).toElement();
+ TQDomElement tableStylesElem = word.namedItem( "TABLESTYLES" ).toElement();
if ( !tableStylesElem.isNull() )
loadTableStyleTemplates( tableStylesElem );
else // load default styles
@@ -1676,10 +1676,10 @@ bool KWDocument::loadXML( QIODevice *, const QDomDocument & doc )
emit sigProgress(20);
- QDomElement bookmark = word.namedItem( "BOOKMARKS" ).toElement();
+ TQDomElement bookmark = word.namedItem( "BOOKMARKS" ).toElement();
if( !bookmark.isNull() )
{
- QDomElement bookmarkitem = word.namedItem("BOOKMARKS").toElement();
+ TQDomElement bookmarkitem = word.namedItem("BOOKMARKS").toElement();
bookmarkitem = bookmarkitem.firstChild().toElement();
while ( !bookmarkitem.isNull() )
@@ -1700,11 +1700,11 @@ bool KWDocument::loadXML( QIODevice *, const QDomDocument & doc )
}
}
- QStringList lst;
- QDomElement spellCheckIgnore = word.namedItem( "SPELLCHECKIGNORELIST" ).toElement();
+ TQStringList lst;
+ TQDomElement spellCheckIgnore = word.namedItem( "SPELLCHECKIGNORELIST" ).toElement();
if( !spellCheckIgnore.isNull() )
{
- QDomElement spellWord=word.namedItem("SPELLCHECKIGNORELIST").toElement();
+ TQDomElement spellWord=word.namedItem("SPELLCHECKIGNORELIST").toElement();
spellWord=spellWord.firstChild().toElement();
while ( !spellWord.isNull() )
{
@@ -1718,7 +1718,7 @@ bool KWDocument::loadXML( QIODevice *, const QDomDocument & doc )
emit sigProgress(25);
- QDomElement framesets = word.namedItem( "FRAMESETS" ).toElement();
+ TQDomElement framesets = word.namedItem( "FRAMESETS" ).toElement();
if ( !framesets.isNull() )
loadFrameSets( framesets );
@@ -1743,11 +1743,11 @@ void KWDocument::endOfLoading() // called by both oasis and oldxml
{
// insert pages
double maxBottom = 0;
- for (QPtrListIterator<KWFrameSet> fsit = framesetsIterator(); fsit.current() ; ++fsit ) {
+ for (TQPtrListIterator<KWFrameSet> fsit = framesetsIterator(); fsit.current() ; ++fsit ) {
KWFrameSet *fs = fsit.current();
- for (QPtrListIterator<KWFrame> fit = fs->frameIterator(); fit.current() ; ++fit ) {
+ for (TQPtrListIterator<KWFrame> fit = fs->frameIterator(); fit.current() ; ++fit ) {
KWFrame *frame = fit.current();
- maxBottom = QMAX(maxBottom, frame->bottom());
+ maxBottom = TQMAX(maxBottom, frame->bottom());
}
}
KWPage *last = pageManager()->page(lastPage());
@@ -1761,7 +1761,7 @@ void KWDocument::endOfLoading() // called by both oasis and oldxml
bool first_footer = false, even_footer = false, odd_footer = false;
bool first_header = false, even_header = false, odd_header = false;
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit )
{
switch( fit.current()->frameSetInfo() ) {
@@ -1799,7 +1799,7 @@ void KWDocument::endOfLoading() // called by both oasis and oldxml
KWTextFrameSet *fs = new KWTextFrameSet( this, i18n( "Odd Pages Header" ) );
//kdDebug(32001) << "KWDocument::loadXML KWTextFrameSet created " << fs << endl;
fs->setFrameSetInfo( KWFrameSet::FI_ODD_HEADER );
- KWPage *page = pageManager()->page(QMIN(startPage()+2, lastPage()));
+ KWPage *page = pageManager()->page(TQMIN(startPage()+2, lastPage()));
KWFrame *frame = new KWFrame(fs, page->leftMargin(), page->topMargin(),
page->width() - page->leftMargin() - page->rightMargin(), 20 );
//kdDebug(32001) << "KWDocument::loadXML KWFrame created " << *frame << endl;
@@ -1813,7 +1813,7 @@ void KWDocument::endOfLoading() // called by both oasis and oldxml
KWTextFrameSet *fs = new KWTextFrameSet( this, i18n( "Even Pages Header" ) );
//kdDebug(32001) << "KWDocument::loadXML KWTextFrameSet created " << fs << endl;
fs->setFrameSetInfo( KWFrameSet::FI_EVEN_HEADER );
- KWPage *page = pageManager()->page(QMIN(startPage()+1, lastPage()));
+ KWPage *page = pageManager()->page(TQMIN(startPage()+1, lastPage()));
KWFrame *frame = new KWFrame(fs, page->leftMargin(), page->topMargin(), page->width() -
page->leftMargin() - page->rightMargin(), 20 );
//kdDebug(32001) << "KWDocument::loadXML KWFrame created " << *frame << endl;
@@ -1841,7 +1841,7 @@ void KWDocument::endOfLoading() // called by both oasis and oldxml
KWTextFrameSet *fs = new KWTextFrameSet( this, i18n( "Odd Pages Footer" ) );
//kdDebug(32001) << "KWDocument::loadXML KWTextFrameSet created " << fs << endl;
fs->setFrameSetInfo( KWFrameSet::FI_ODD_FOOTER );
- KWPage *page = pageManager()->page(QMIN(startPage()+2, lastPage()));
+ KWPage *page = pageManager()->page(TQMIN(startPage()+2, lastPage()));
KWFrame *frame = new KWFrame(fs, page->leftMargin(), page->height()- page->topMargin() - 20,
page->width() - page->leftMargin() - page->rightMargin(), 20 );
//kdDebug(32001) << "KWDocument::loadXML KWFrame created " << *frame << endl;
@@ -1855,7 +1855,7 @@ void KWDocument::endOfLoading() // called by both oasis and oldxml
KWTextFrameSet *fs = new KWTextFrameSet( this, i18n( "Even Pages Footer" ) );
//kdDebug(32001) << "KWDocument::loadXML KWTextFrameSet created " << fs << endl;
fs->setFrameSetInfo( KWFrameSet::FI_EVEN_FOOTER );
- KWPage *page = pageManager()->page(QMIN(startPage()+1, lastPage()));
+ KWPage *page = pageManager()->page(TQMIN(startPage()+1, lastPage()));
KWFrame *frame = new KWFrame(fs, page->leftMargin(), page->height() - page->topMargin()- 20,
page->width() - page->leftMargin() - page->rightMargin(), 20 );
//kdDebug(32001) << "KWDocument::loadXML KWFrame created " << *frame << endl;
@@ -1928,7 +1928,7 @@ void KWDocument::endOfLoading() // called by both oasis and oldxml
// Renumber footnotes
KWTextFrameSet *frameset = dynamic_cast<KWTextFrameSet *>( m_lstFrameSet.getFirst() );
if ( frameset )
- frameset->renumberFootNotes( false /*no repaint*/ );
+ frameset->renumberFootNotes( false /*no tqrepaint*/ );
emit sigProgress(-1);
@@ -1936,10 +1936,10 @@ void KWDocument::endOfLoading() // called by both oasis and oldxml
// Connect to notifications from main text-frameset
if ( frameset ) {
- connect( frameset->textObject(), SIGNAL( chapterParagraphFormatted( KoTextParag * ) ),
- SLOT( slotChapterParagraphFormatted( KoTextParag * ) ) );
- connect( frameset, SIGNAL( mainTextHeightChanged() ),
- SIGNAL( mainTextHeightChanged() ) );
+ connect( frameset->textObject(), TQT_SIGNAL( chapterParagraphFormatted( KoTextParag * ) ),
+ TQT_SLOT( slotChapterParagraphFormatted( KoTextParag * ) ) );
+ connect( frameset, TQT_SIGNAL( mainTextHeightChanged() ),
+ TQT_SIGNAL( mainTextHeightChanged() ) );
}
// Note that more stuff will happen in completeLoading
@@ -1953,26 +1953,26 @@ void KWDocument::startBackgroundSpellCheck()
}
}
-void KWDocument::loadEmbeddedObjects( QDomElement& word )
+void KWDocument::loadEmbeddedObjects( TQDomElement& word )
{
- QDomNodeList listEmbedded = word.elementsByTagName ( "EMBEDDED" );
+ TQDomNodeList listEmbedded = word.elementsByTagName ( "EMBEDDED" );
for (unsigned int item = 0; item < listEmbedded.count(); item++)
{
- QDomElement embedded = listEmbedded.item( item ).toElement();
+ TQDomElement embedded = listEmbedded.item( item ).toElement();
loadEmbedded( embedded );
}
}
-void KWDocument::loadEmbedded( const QDomElement &embedded )
+void KWDocument::loadEmbedded( const TQDomElement &embedded )
{
- QDomElement object = embedded.namedItem( "OBJECT" ).toElement();
+ TQDomElement object = embedded.namedItem( "OBJECT" ).toElement();
if ( !object.isNull() )
{
KWDocumentChild *ch = new KWDocumentChild( this );
ch->load( object, true );
insertChild( ch );
- QDomElement settings = embedded.namedItem( "SETTINGS" ).toElement();
- QString name;
+ TQDomElement settings = embedded.namedItem( "SETTINGS" ).toElement();
+ TQString name;
if ( !settings.isNull() )
name = settings.attribute( "name" );
KWPartFrameSet *fs = new KWPartFrameSet( this, ch, name );
@@ -1990,10 +1990,10 @@ void KWDocument::loadEmbedded( const QDomElement &embedded )
}
-void KWDocument::loadStyleTemplates( const QDomElement &stylesElem )
+void KWDocument::loadStyleTemplates( const TQDomElement &stylesElem )
{
- QValueList<QString> followingStyles;
- QDomNodeList listStyles = stylesElem.elementsByTagName( "STYLE" );
+ TQValueList<TQString> followingStyles;
+ TQDomNodeList listStyles = stylesElem.elementsByTagName( "STYLE" );
if( listStyles.count() > 0) { // we are going to import at least one style.
KoParagStyle *s = m_styleColl->findStyle("Standard");
//kdDebug(32001) << "KWDocument::loadStyleTemplates looking for Standard, to delete it. Found " << s << endl;
@@ -2001,9 +2001,9 @@ void KWDocument::loadStyleTemplates( const QDomElement &stylesElem )
m_styleColl->removeStyle(s);
}
for (unsigned int item = 0; item < listStyles.count(); item++) {
- QDomElement styleElem = listStyles.item( item ).toElement();
+ TQDomElement styleElem = listStyles.item( item ).toElement();
- KoParagStyle *sty = new KoParagStyle( QString::null );
+ KoParagStyle *sty = new KoParagStyle( TQString() );
// Load the style from the <STYLE> element
sty->loadStyle( styleElem, m_syntaxVersion );
@@ -2020,7 +2020,7 @@ void KWDocument::loadStyleTemplates( const QDomElement &stylesElem )
// the real value of followingStyle is set below after loading all styles
sty->setFollowingStyle( sty );
- QDomElement formatElem = styleElem.namedItem( "FORMAT" ).toElement();
+ TQDomElement formatElem = styleElem.namedItem( "FORMAT" ).toElement();
if ( !formatElem.isNull() )
sty->format() = KWTextParag::loadFormat( formatElem, 0L, defaultFont(), globalLanguage(), globalHyphenation() );
else
@@ -2031,7 +2031,7 @@ void KWDocument::loadStyleTemplates( const QDomElement &stylesElem )
if(m_styleColl->styleList().count() > followingStyles.count() )
{
- QString following = styleElem.namedItem("FOLLOWING").toElement().attribute("name");
+ TQString following = styleElem.namedItem("FOLLOWING").toElement().attribute("name");
followingStyles.append( following );
}
else
@@ -2041,23 +2041,23 @@ void KWDocument::loadStyleTemplates( const QDomElement &stylesElem )
Q_ASSERT( followingStyles.count() == m_styleColl->styleList().count() );
unsigned int i=0;
- for( QValueList<QString>::Iterator it = followingStyles.begin(); it != followingStyles.end(); ++it ) {
+ for( TQValueList<TQString>::Iterator it = followingStyles.begin(); it != followingStyles.end(); ++it ) {
KoParagStyle * style = m_styleColl->findStyle(*it);
m_styleColl->styleAt(i++)->setFollowingStyle( style );
}
}
-void KWDocument::loadFrameStyleTemplates( const QDomElement &stylesElem )
+void KWDocument::loadFrameStyleTemplates( const TQDomElement &stylesElem )
{
- QDomNodeList listStyles = stylesElem.elementsByTagName( "FRAMESTYLE" );
+ TQDomNodeList listStyles = stylesElem.elementsByTagName( "FRAMESTYLE" );
if( listStyles.count() > 0) { // we are going to import at least one style.
KWFrameStyle *s = m_frameStyleColl->findStyle("Plain");
if(s) // delete the standard style.
m_frameStyleColl->removeStyle(s);
}
for (unsigned int item = 0; item < listStyles.count(); item++) {
- QDomElement styleElem = listStyles.item( item ).toElement();
+ TQDomElement styleElem = listStyles.item( item ).toElement();
KWFrameStyle *sty = new KWFrameStyle( styleElem );
m_frameStyleColl->addStyle( sty );
@@ -2066,7 +2066,7 @@ void KWDocument::loadFrameStyleTemplates( const QDomElement &stylesElem )
void KWDocument::loadDefaultFrameStyleTemplates()
{
- const QString fsfileName( locate("data", "kword/framestyles.xml") );
+ const TQString fsfileName( locate("data", "kword/framestyles.xml") );
kdDebug(30003) << "Data directory: " << KGlobal::dirs()->resourceDirs( "data" ) << endl;
kdDebug(30003) << "Directory searched: " << KGlobal::dirs()->resourceDirs( "data" ) << endl;
@@ -2074,16 +2074,16 @@ void KWDocument::loadDefaultFrameStyleTemplates()
m_frameStyleColl->setDefault( true );
- if ( ! QFile::exists( fsfileName ) )
+ if ( ! TQFile::exists( fsfileName ) )
{
kdWarning(30003) << "Cannot find any framestyles.xml" << endl;
if (!m_frameStyleColl->findStyle("Plain")) {
KWFrameStyle * standardFrameStyle = new KWFrameStyle( "Plain" );
- standardFrameStyle->setBackgroundColor(QColor("white"));
- standardFrameStyle->setTopBorder(KoBorder(QColor("black"),KoBorder::SOLID,0));
- standardFrameStyle->setRightBorder(KoBorder(QColor("black"),KoBorder::SOLID,0));
- standardFrameStyle->setLeftBorder(KoBorder(QColor("black"),KoBorder::SOLID,0));
- standardFrameStyle->setBottomBorder(KoBorder(QColor("black"),KoBorder::SOLID,0));
+ standardFrameStyle->setBackgroundColor(TQColor("white"));
+ standardFrameStyle->setTopBorder(KoBorder(TQColor("black"),KoBorder::SOLID,0));
+ standardFrameStyle->setRightBorder(KoBorder(TQColor("black"),KoBorder::SOLID,0));
+ standardFrameStyle->setLeftBorder(KoBorder(TQColor("black"),KoBorder::SOLID,0));
+ standardFrameStyle->setBottomBorder(KoBorder(TQColor("black"),KoBorder::SOLID,0));
m_frameStyleColl->addStyle( standardFrameStyle );
}
return;
@@ -2092,17 +2092,17 @@ void KWDocument::loadDefaultFrameStyleTemplates()
kdDebug(30003) << "File framestyles.xml found!" << endl;
// Open file and parse it
- QFile in( fsfileName );
+ TQFile in( fsfileName );
if ( !in.open( IO_ReadOnly ) )
{
//i18n( "Couldn't open the file for reading (check read permissions)" );
kdWarning(30003) << "Couldn't open the file for reading (check read permissions)" << endl;
return;
}
- QString errorMsg;
+ TQString errorMsg;
int errorLine;
int errorColumn;
- QDomDocument doc;
+ TQDomDocument doc;
if ( ! doc.setContent( &in , &errorMsg, &errorLine, &errorColumn ) )
{
kdError (30003) << "Parsing Error! Aborting! (in KWDocument::loadDefaultFrameStyleTemplates())" << endl
@@ -2112,32 +2112,32 @@ void KWDocument::loadDefaultFrameStyleTemplates()
in.close();
// Start adding framestyles
- QDomElement stylesElem = doc.documentElement();
+ TQDomElement stylesElem = doc.documentElement();
- QDomNodeList listStyles = stylesElem.elementsByTagName( "FRAMESTYLE" );
+ TQDomNodeList listStyles = stylesElem.elementsByTagName( "FRAMESTYLE" );
if( listStyles.count() > 0) { // we are going to import at least one style.
KWFrameStyle *s = m_frameStyleColl->findStyle("Plain");
if(s) // delete the standard style.
m_frameStyleColl->removeStyle(s);
}
for (unsigned int item = 0; item < listStyles.count(); item++) {
- QDomElement styleElem = listStyles.item( item ).toElement();
+ TQDomElement styleElem = listStyles.item( item ).toElement();
KWFrameStyle *sty = new KWFrameStyle( styleElem );
m_frameStyleColl->addStyle( sty );
}
}
-void KWDocument::loadTableStyleTemplates( const QDomElement& stylesElem )
+void KWDocument::loadTableStyleTemplates( const TQDomElement& stylesElem )
{
- QDomNodeList listStyles = stylesElem.elementsByTagName( "TABLESTYLE" );
+ TQDomNodeList listStyles = stylesElem.elementsByTagName( "TABLESTYLE" );
if( listStyles.count() > 0) { // we are going to import at least one style.
KWTableStyle *s = m_tableStyleColl->findStyle("Plain");
if(s) // delete the standard style.
m_tableStyleColl->removeStyle(s);
}
for (unsigned int item = 0; item < listStyles.count(); item++) {
- QDomElement styleElem = listStyles.item( item ).toElement();
+ TQDomElement styleElem = listStyles.item( item ).toElement();
KWTableStyle *sty = new KWTableStyle( styleElem, this );
m_tableStyleColl->addStyle( sty );
@@ -2150,7 +2150,7 @@ void KWDocument::loadDefaultTableStyleTemplates()
m_tableStyleColl->setDefault( true );
- if ( ! QFile::exists(locate("data", "kword/tablestyles.xml")) )
+ if ( ! TQFile::exists(locate("data", "kword/tablestyles.xml")) )
{
if (!m_tableStyleColl->findStyle("Plain")) {
m_tableStyleColl->addStyle( new KWTableStyle( "Plain", m_styleColl->styleAt(0), m_frameStyleColl->frameStyleAt(0) ) );
@@ -2161,17 +2161,17 @@ void KWDocument::loadDefaultTableStyleTemplates()
fsfile.setPath( locate("data", "kword/tablestyles.xml") );
// Open file and parse it
- QFile in( fsfile.path() );
+ TQFile in( fsfile.path() );
if ( !in.open( IO_ReadOnly ) )
{
//i18n( "Couldn't open the file for reading (check read permissions)" );
return;
}
in.at(0);
- QString errorMsg;
+ TQString errorMsg;
int errorLine;
int errorColumn;
- QDomDocument doc;
+ TQDomDocument doc;
if ( doc.setContent( &in , &errorMsg, &errorLine, &errorColumn ) ) {
}
else
@@ -2183,16 +2183,16 @@ void KWDocument::loadDefaultTableStyleTemplates()
in.close();
// Start adding tablestyles
- QDomElement stylesElem = doc.documentElement();
+ TQDomElement stylesElem = doc.documentElement();
- QDomNodeList listStyles = stylesElem.elementsByTagName( "TABLESTYLE" );
+ TQDomNodeList listStyles = stylesElem.elementsByTagName( "TABLESTYLE" );
if( listStyles.count() > 0) { // we are going to import at least one style.
KWTableStyle *s = m_tableStyleColl->findStyle("Plain");
if(s) // delete the standard style.
m_tableStyleColl->removeStyle(s);
}
for (unsigned int item = 0; item < listStyles.count(); item++) {
- QDomElement styleElem = listStyles.item( item ).toElement();
+ TQDomElement styleElem = listStyles.item( item ).toElement();
KWTableStyle *sty = new KWTableStyle( styleElem, this );
m_tableStyleColl->addStyle( sty );
@@ -2203,7 +2203,7 @@ void KWDocument::loadDefaultTableTemplates()
{
KURL fsfile;
- if ( ! QFile::exists(locate("data", "kword/tabletemplates.xml")) )
+ if ( ! TQFile::exists(locate("data", "kword/tabletemplates.xml")) )
{
if (!m_tableTemplateColl->findTableTemplate("Plain")) {
KWTableTemplate * standardTableTemplate = new KWTableTemplate( "Plain" );
@@ -2225,17 +2225,17 @@ void KWDocument::loadDefaultTableTemplates()
fsfile.setPath( locate("data", "kword/tabletemplates.xml") );
// Open file and parse it
- QFile in( fsfile.path() );
+ TQFile in( fsfile.path() );
if ( !in.open( IO_ReadOnly ) )
{
//i18n( "Couldn't open the file for reading (check read permissions)" );
return;
}
in.at(0);
- QString errorMsg;
+ TQString errorMsg;
int errorLine;
int errorColumn;
- QDomDocument doc;
+ TQDomDocument doc;
if ( doc.setContent( &in , &errorMsg, &errorLine, &errorColumn ) ) {
}
else
@@ -2247,16 +2247,16 @@ void KWDocument::loadDefaultTableTemplates()
in.close();
// Start adding framestyles
- QDomElement templatesElem = doc.documentElement();
+ TQDomElement templatesElem = doc.documentElement();
- QDomNodeList listTemplates = templatesElem.elementsByTagName( "TABLETEMPLATE" );
+ TQDomNodeList listTemplates = templatesElem.elementsByTagName( "TABLETEMPLATE" );
if( listTemplates.count() > 0) {
KWTableTemplate *s = m_tableTemplateColl->findTableTemplate("Plain");
if(s)
m_tableTemplateColl->removeTableTemplate(s);
}
for (unsigned int item = 0; item < listTemplates.count(); item++) {
- QDomElement templateElem = listTemplates.item( item ).toElement();
+ TQDomElement templateElem = listTemplates.item( item ).toElement();
KWTableTemplate *temp = new KWTableTemplate( templateElem, this );
m_tableTemplateColl->addTableTemplate( temp );
@@ -2277,14 +2277,14 @@ void KWDocument::progressItemLoaded()
}
}
-void KWDocument::loadFrameSets( const QDomElement &framesetsElem )
+void KWDocument::loadFrameSets( const TQDomElement &framesetsElem )
{
// <FRAMESET>
// First prepare progress info
m_nrItemsToLoad = 0; // total count of items (mostly paragraph and frames)
- QDomElement framesetElem = framesetsElem.firstChild().toElement();
- // Workaround the slowness of QDom's elementsByTagName
- QValueList<QDomElement> framesets;
+ TQDomElement framesetElem = framesetsElem.firstChild().toElement();
+ // Workaround the slowness of TQDom's elementsByTagName
+ TQValueList<TQDomElement> framesets;
for ( ; !framesetElem.isNull() ; framesetElem = framesetElem.nextSibling().toElement() )
{
if ( framesetElem.tagName() == "FRAMESET" )
@@ -2296,26 +2296,26 @@ void KWDocument::loadFrameSets( const QDomElement &framesetsElem )
m_itemsLoaded = 0;
- QValueList<QDomElement>::Iterator it = framesets.begin();
- QValueList<QDomElement>::Iterator end = framesets.end();
+ TQValueList<TQDomElement>::Iterator it = framesets.begin();
+ TQValueList<TQDomElement>::Iterator end = framesets.end();
for ( ; it != end ; ++it )
{
(void) loadFrameSet( *it );
}
}
-KWFrameSet * KWDocument::loadFrameSet( QDomElement framesetElem, bool loadFrames, bool loadFootnote )
+KWFrameSet * KWDocument::loadFrameSet( TQDomElement framesetElem, bool loadFrames, bool loadFootnote )
{
FrameSetType frameSetType = static_cast<FrameSetType>( KWDocument::getAttribute( framesetElem, "frameType", FT_BASE ) );
- QString fsname = KWDocument::getAttribute( framesetElem, "name", "" );
+ TQString fsname = KWDocument::getAttribute( framesetElem, "name", "" );
switch ( frameSetType ) {
case FT_TEXT: {
- QString tableName = KWDocument::getAttribute( framesetElem, "grpMgr", "" );
+ TQString tableName = KWDocument::getAttribute( framesetElem, "grpMgr", "" );
if ( !tableName.isEmpty() ) {
// Text frameset belongs to a table -> find table by name
KWTableFrameSet *table = 0L;
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit ) {
KWFrameSet *f = fit.current();
if( f->type() == FT_TABLE &&
@@ -2356,7 +2356,7 @@ KWFrameSet * KWDocument::loadFrameSet( QDomElement framesetElem, bool loadFrames
if ( framesetElem.hasAttribute( "autoCreateNewFrame" ) )
{
KWFrame::FrameBehavior behav = static_cast<KWFrame::FrameBehavior>( framesetElem.attribute( "autoCreateNewFrame" ).toInt() );
- QPtrListIterator<KWFrame> frameIt( fs->frameIterator() );
+ TQPtrListIterator<KWFrame> frameIt( fs->frameIterator() );
for ( ; frameIt.current() ; ++frameIt ) // Apply it to all frames
frameIt.current()->setFrameBehavior( behav );
}
@@ -2415,7 +2415,7 @@ bool KWDocument::completeLoading( KoStore *store )
processFootNoteRequests();
// Save memory
- m_urlIntern = QString::null;
+ m_urlIntern = TQString();
// The fields and dates just got loaded -> update vars
recalcVariables( VT_FIELD );
@@ -2423,7 +2423,7 @@ bool KWDocument::completeLoading( KoStore *store )
recalcVariables( VT_STATISTIC ); // e.g. number of words etc.
// Finalize all the existing [non-inline] framesets
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit )
fit.current()->finalize();
@@ -2437,9 +2437,9 @@ bool KWDocument::completeLoading( KoStore *store )
fixZOrders();
emit newContentsSize();
- repaintAllViews( true ); // in case any view exists already
+ tqrepaintAllViews( true ); // in case any view exists already
reactivateBgSpellChecking();
- connect( documentInfo(), SIGNAL( sigDocumentInfoModifed()),this,SLOT(slotDocumentInfoModifed() ) );
+ connect( documentInfo(), TQT_SIGNAL( sigDocumentInfoModifed()),this,TQT_SLOT(slotDocumentInfoModifed() ) );
//desactivate bgspellchecking
//attributes isReadWrite is not placed at the beginning !
@@ -2473,7 +2473,7 @@ void KWDocument::deleteLoadingInfo()
void KWDocument::processPictureRequests()
{
- QPtrListIterator<KWTextImage> it2 ( m_textImageRequests );
+ TQPtrListIterator<KWTextImage> it2 ( m_textImageRequests );
for ( ; it2.current() ; ++it2 )
{
it2.current()->setImage( *m_pictureCollection );
@@ -2481,7 +2481,7 @@ void KWDocument::processPictureRequests()
m_textImageRequests.clear();
//kdDebug(32001) << m_pictureRequests.count() << " picture requests." << endl;
- QPtrListIterator<KWPictureFrameSet> it3( m_pictureRequests );
+ TQPtrListIterator<KWPictureFrameSet> it3( m_pictureRequests );
for ( ; it3.current() ; ++it3 )
it3.current()->setPicture( m_pictureCollection->findPicture( it3.current()->key() ) );
m_pictureRequests.clear();
@@ -2489,17 +2489,17 @@ void KWDocument::processPictureRequests()
void KWDocument::processAnchorRequests()
{
- QMapIterator<QString, KWAnchorPosition> itanch = m_anchorRequests.begin();
+ TQMapIterator<TQString, KWAnchorPosition> itanch = m_anchorRequests.begin();
for ( ; itanch != m_anchorRequests.end(); ++itanch )
{
- QString fsname = itanch.key();
- if ( m_pasteFramesetsMap && m_pasteFramesetsMap->contains( fsname ) )
+ TQString fsname = itanch.key();
+ if ( m_pasteFramesetsMap && m_pasteFramesetsMap->tqcontains( fsname ) )
fsname = (*m_pasteFramesetsMap)[ fsname ];
kdDebug(32001) << "KWDocument::processAnchorRequests anchoring frameset " << fsname << endl;
KWFrameSet * fs = frameSetByName( fsname );
Q_ASSERT( fs );
if ( fs )
- fs->setAnchored( itanch.data().textfs, itanch.data().paragId, itanch.data().index, true, false /*don't repaint yet*/ );
+ fs->setAnchored( itanch.data().textfs, itanch.data().paragId, itanch.data().index, true, false /*don't tqrepaint yet*/ );
}
m_anchorRequests.clear();
}
@@ -2507,11 +2507,11 @@ void KWDocument::processAnchorRequests()
bool KWDocument::processFootNoteRequests()
{
bool ret = false;
- QMapIterator<QString, KWFootNoteVariable *> itvar = m_footnoteVarRequests.begin();
+ TQMapIterator<TQString, KWFootNoteVariable *> itvar = m_footnoteVarRequests.begin();
for ( ; itvar != m_footnoteVarRequests.end(); ++itvar )
{
- QString fsname = itvar.key();
- if ( m_pasteFramesetsMap && m_pasteFramesetsMap->contains( fsname ) )
+ TQString fsname = itvar.key();
+ if ( m_pasteFramesetsMap && m_pasteFramesetsMap->tqcontains( fsname ) )
fsname = (*m_pasteFramesetsMap)[ fsname ];
//kdDebug(32001) << "KWDocument::processFootNoteRequests binding footnote var " << itvar.data() << " and frameset " << fsname << endl;
KWFrameSet * fs = frameSetByName( fsname );
@@ -2533,46 +2533,46 @@ bool KWDocument::processFootNoteRequests()
if ( ret ) {
KWFrameSet *frameset = m_lstFrameSet.getFirst();
if ( frameset && frameset->type() == FT_TEXT )
- static_cast<KWTextFrameSet *>(frameset)->renumberFootNotes( false /*no repaint*/ );
+ static_cast<KWTextFrameSet *>(frameset)->renumberFootNotes( false /*no tqrepaint*/ );
}
return ret;
}
-QString KWDocument::uniqueFramesetName( const QString& oldName )
+TQString KWDocument::uniqueFramesetName( const TQString& oldName )
{
- QString newName = oldName;
+ TQString newName = oldName;
if (frameSetByName( oldName ))//rename it if name frameset exists
{
// make up a new name for the frameset, use Copy[digits]-[oldname] as template.
// Fully translatable naturally :)
- QString searchString( "^(" + i18n("Copy%1-%2").arg("\\d*").arg("){0,1}") );
- searchString = searchString.replace(QRegExp("\\-"), "\\-"); // escape the '-'
- QRegExp searcher(searchString);
+ TQString searchString( "^(" + i18n("Copy%1-%2").tqarg("\\d*").tqarg("){0,1}") );
+ searchString = searchString.tqreplace(TQRegExp("\\-"), "\\-"); // escape the '-'
+ TQRegExp searcher(searchString);
int count=0;
do {
newName=oldName;
- newName.replace(searcher,i18n("Copy%1-%2").arg(count > 0? QString("%1").arg(count):"").arg(""));
+ newName.tqreplace(searcher,i18n("Copy%1-%2").tqarg(count > 0? TQString("%1").tqarg(count):"").tqarg(""));
count++;
} while ( frameSetByName( newName ) );
}
return newName;
}
-void KWDocument::pasteFrames( QDomElement topElem, KMacroCommand * macroCmd, bool copyFootNote, bool loadFootNote, bool selectFrames )
+void KWDocument::pasteFrames( TQDomElement topElem, KMacroCommand * macroCmd, bool copyFootNote, bool loadFootNote, bool selectFrames )
{
- m_pasteFramesetsMap = new QMap<QString, QString>();
- //QPtrList<KWFrameSet> frameSetsToFinalize;
+ m_pasteFramesetsMap = new TQMap<TQString, TQString>();
+ //TQPtrList<KWFrameSet> frameSetsToFinalize;
int ref=0;
int nb = 0;
- QDomElement elem = topElem.firstChild().toElement();
+ TQDomElement elem = topElem.firstChild().toElement();
for ( ; !elem.isNull() ; elem = elem.nextSibling().toElement() )
{
//kdDebug() << "pasteFrames: elem=" << elem.tagName() << endl;
- QDomElement frameElem;
+ TQDomElement frameElem;
KWFrameSet * fs = 0L;
if ( elem.tagName() == "FRAME" )
{
- QString frameSetName = frameElem.attribute( "parentFrameset" );
+ TQString frameSetName = frameElem.attribute( "tqparentFrameset" );
fs = frameSetByName( frameSetName );
if ( !fs )
{
@@ -2584,8 +2584,8 @@ void KWDocument::pasteFrames( QDomElement topElem, KMacroCommand * macroCmd, boo
else if ( elem.tagName() == "FRAMESET" )
{
// Prepare a new name for the frameset
- QString oldName = elem.attribute( "name" );
- QString newName = uniqueFramesetName( oldName ); // make up a new name for the frameset
+ TQString oldName = elem.attribute( "name" );
+ TQString newName = uniqueFramesetName( oldName ); // make up a new name for the frameset
m_pasteFramesetsMap->insert( oldName, newName ); // remember the name transformation
if(oldName != newName)
@@ -2599,7 +2599,7 @@ void KWDocument::pasteFrames( QDomElement topElem, KMacroCommand * macroCmd, boo
m_lstFrameSet.append( table );
table->setZOrder();
if ( macroCmd )
- macroCmd->addCommand( new KWCreateTableCommand( QString::null, table ) );
+ macroCmd->addCommand( new KWCreateTableCommand( TQString(), table ) );
fs = table;
break;
}
@@ -2635,7 +2635,7 @@ void KWDocument::pasteFrames( QDomElement topElem, KMacroCommand * macroCmd, boo
if ( fs )
{
- //if ( frameSetsToFinalize.findRef( fs ) == -1 )
+ //if ( frameSetsToFinalize.tqfindRef( fs ) == -1 )
// frameSetsToFinalize.append( fs );
// Load the frame
@@ -2653,7 +2653,7 @@ void KWDocument::pasteFrames( QDomElement topElem, KMacroCommand * macroCmd, boo
nb++;
fs->addFrame( frame, false );
if ( selectFrames ) {
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin();
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin();
it != m_lstViews.end(); ++it ) {
KWFrameView *fv = (*it)->frameViewManager()->view(frame);
if(fv)
@@ -2662,7 +2662,7 @@ void KWDocument::pasteFrames( QDomElement topElem, KMacroCommand * macroCmd, boo
}
if ( macroCmd )
{
- KWCreateFrameCommand *cmd = new KWCreateFrameCommand( QString::null, frame );
+ KWCreateFrameCommand *cmd = new KWCreateFrameCommand( TQString(), frame );
macroCmd->addCommand(cmd);
}
}
@@ -2705,43 +2705,43 @@ void KWDocument::completePasting()
processAnchorRequests();
if ( processFootNoteRequests() )
{
- // We pasted footnotes. Relayout frames.
+ // We pasted footnotes. Retqlayout frames.
recalcFrames();
}
// Finalize afterwards - especially in case of inline frames, made them inline in processAnchorRequests
- //for ( QPtrListIterator<KWFrameSet> fit( frameSetsToFinalize ); fit.current(); ++fit )
+ //for ( TQPtrListIterator<KWFrameSet> fit( frameSetsToFinalize ); fit.current(); ++fit )
// Do it on all of them (we'd need to store frameSetsToFinalize as member var if this is really slow)
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit )
fit.current()->finalize();
- repaintAllViews();
+ tqrepaintAllViews();
delete m_pasteFramesetsMap;
m_pasteFramesetsMap = 0L;
}
void KWDocument::completeOasisPasting()
{
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit )
fit.current()->finalize();
- repaintAllViews();
+ tqrepaintAllViews();
}
-void KWDocument::insertEmbedded( KoStore *store, QDomElement topElem, KMacroCommand * macroCmd, double offset )
+void KWDocument::insertEmbedded( KoStore *store, TQDomElement topElem, KMacroCommand * macroCmd, double offset )
{
if ( !m_pasteFramesetsMap ) // may have been created by pasteFrames
- m_pasteFramesetsMap = new QMap<QString, QString>();
+ m_pasteFramesetsMap = new TQMap<TQString, TQString>();
- QDomElement elem = topElem.firstChild().toElement();
+ TQDomElement elem = topElem.firstChild().toElement();
for ( ; !elem.isNull() ; elem = elem.nextSibling().toElement() )
{
if ( elem.tagName() == "EMBEDDED" )
{
kdDebug()<<"KWDocument::insertEmbedded() Embedded object"<<endl;
- QDomElement object = elem.namedItem( "OBJECT" ).toElement();
- QDomElement settings = elem.namedItem( "SETTINGS" ).toElement();
+ TQDomElement object = elem.namedItem( "OBJECT" ).toElement();
+ TQDomElement settings = elem.namedItem( "SETTINGS" ).toElement();
if ( object.isNull() || settings.isNull() )
{
kdError() << "No <OBJECT> or <SETTINGS> tag" << endl;
@@ -2754,25 +2754,25 @@ void KWDocument::insertEmbedded( KoStore *store, QDomElement topElem, KMacroComm
{
ch->loadDocument( store );
insertChild( ch );
- QString oldName = settings.attribute( "name" );
- QString newName = uniqueFramesetName( oldName );
+ TQString oldName = settings.attribute( "name" );
+ TQString newName = uniqueFramesetName( oldName );
m_pasteFramesetsMap->insert( oldName, newName ); // remember the name transformation
KWPartFrameSet *part = new KWPartFrameSet( this, ch, newName );
m_lstFrameSet.append( part );
kdDebug() << "KWDocument::insertEmbedded loading embedded object" << endl;
part->load( settings );
if ( offset != 0 ) {
- QRect r = ch->geometry();
+ TQRect r = ch->tqgeometry();
r.moveBy( (int)offset, (int)offset );
ch->setGeometry( r );
}
part->setZOrder();
if ( macroCmd )
{
- QPtrListIterator<KWFrame> frameIt( part->frameIterator() );
+ TQPtrListIterator<KWFrame> frameIt( part->frameIterator() );
for ( ; frameIt.current(); ++frameIt )
{
- macroCmd->addCommand( new KWCreateFrameCommand( QString::null, frameIt.current() ) );
+ macroCmd->addCommand( new KWCreateFrameCommand( TQString(), frameIt.current() ) );
}
}
}
@@ -2784,12 +2784,12 @@ void KWDocument::insertEmbedded( KoStore *store, QDomElement topElem, KMacroComm
bool KWDocument::saveOasis( KoStore* store, KoXmlWriter* manifestWriter )
{
- QValueList<KWFrameView*> noFrames;
+ TQValueList<KWFrameView*> noFrames;
return saveOasisHelper( store, manifestWriter, SaveAll, noFrames);
}
// can't be const due to recalcVariables()
-bool KWDocument::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, SaveFlag saveFlag, const QValueList<KWFrameView*> &selectedFrames, QString* plainText, KoPicture* picture, KWTextFrameSet* fs) {
+bool KWDocument::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, SaveFlag saveFlag, const TQValueList<KWFrameView*> &selectedFrames, TQString* plainText, KoPicture* picture, KWTextFrameSet* fs) {
m_pictureCollection->assignUniqueIds();
fixZOrders();
@@ -2800,11 +2800,11 @@ bool KWDocument::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, S
if ( !contentWriter )
return false;
- QValueList<KoPictureKey> pictureList;
+ TQValueList<KoPictureKey> pictureList;
if ( saveFlag == SaveAll )
pictureList = savePictureList();
- m_varColl->variableSetting()->setModificationDate(QDateTime::currentDateTime());
+ m_varColl->variableSetting()->setModificationDate(TQDateTime::tqcurrentDateTime());
recalcVariables( VT_DATE );
recalcVariables( VT_TIME ); // for "current time"
recalcVariables( VT_STATISTIC );
@@ -2816,7 +2816,7 @@ bool KWDocument::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, S
// Save user styles as KoGenStyle objects
m_styleColl->saveOasis( mainStyles, KoGenStyle::STYLE_USER, savingContext );
- QByteArray headerFooterContent;
+ TQByteArray headerFooterContent;
if ( saveFlag == SaveAll )
{
// Save visual info for the first view, such as the active frameset and cursor position
@@ -2837,13 +2837,13 @@ bool KWDocument::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, S
}
// Header and footers save their content into master-styles/master-page, and their
- // styles into the page-layout automatic-style.
+ // styles into the page-tqlayout automatic-style.
// However the paragraph styles used by header/footers need to be known before
// hand, to promote them to styles.xml. So we collect them first, which means
// storing the content into a buffer.
- QBuffer buffer( headerFooterContent );
+ TQBuffer buffer( headerFooterContent );
buffer.open( IO_WriteOnly );
- KoXmlWriter headerFooterTmpWriter( &buffer ); // TODO pass indentation level
+ KoXmlWriter headerFooterTmpWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level
// The order we write out header, header-left, etc. is important. So, we go here
// the dirty way to collect them first and then flush them ordered out.
@@ -2867,7 +2867,7 @@ bool KWDocument::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, S
<< KWFrameSet::FI_FIRST_FOOTER << KWFrameSet::FI_ODD_FOOTER << KWFrameSet::FI_EVEN_FOOTER;
for (uint i=0; i<order.count(); ++i) {
KWFrameSet::Info info = order[i];
- if (tempmap.contains(info)) {
+ if (tempmap.tqcontains(info)) {
const KWFrameSet* fs = tempmap[info];
// Save content
@@ -2877,13 +2877,13 @@ bool KWDocument::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, S
}
}
- // Add trailing '0' (Qt4: remove)
+ // Add trailing '0' (TQt4: remove)
headerFooterContent.resize( headerFooterContent.size() + 1 );
headerFooterContent[headerFooterContent.size()-1] = '\0';
// Now mark all autostyles as "for styles.xml" since headers/footers need them
- QValueList<KoGenStyles::NamedStyle> autoStyles = mainStyles.styles( KoGenStyle::STYLE_AUTO );
- for ( QValueList<KoGenStyles::NamedStyle>::const_iterator it = autoStyles.begin();
+ TQValueList<KoGenStyles::NamedStyle> autoStyles = mainStyles.styles( KoGenStyle::STYLE_AUTO );
+ for ( TQValueList<KoGenStyles::NamedStyle>::const_iterator it = autoStyles.begin();
it != autoStyles.end(); ++it ) {
mainStyles.markStyleForStylesXml( (*it).name );
}
@@ -2908,15 +2908,15 @@ bool KWDocument::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, S
// Collect inline framesets for e.g. pictures
KWCollectFramesetsVisitor visitor;
fs->textDocument()->visitSelection( KoTextDocument::Standard, &visitor );
- const QValueList<KWFrameSet *>& frameset = visitor.frameSets();
+ const TQValueList<KWFrameSet *>& frameset = visitor.frameSets();
kdDebug(32001) << frameset.count() << " inline framesets" << endl;
- for ( QValueList<KWFrameSet *>::ConstIterator it = frameset.begin(); it != frameset.end(); ++it )
+ for ( TQValueList<KWFrameSet *>::ConstIterator it = frameset.begin(); it != frameset.end(); ++it )
{
switch ( (*it)->type() ) {
case FT_PICTURE:
{
const KoPictureKey key = static_cast<KWPictureFrameSet *>( *it )->key();
- if ( !pictureList.contains( key ) )
+ if ( !pictureList.tqcontains( key ) )
pictureList.append( key );
}
break;
@@ -2929,7 +2929,7 @@ bool KWDocument::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, S
}
// write selected (non-inline) frames
- QString newText;
+ TQString newText;
saveSelectedFrames( *bodyWriter, savingContext, pictureList,
selectedFrames, &newText ); // output vars
*plainText += newText;
@@ -2970,8 +2970,8 @@ bool KWDocument::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, S
// not while writing it (like in saveSelectedFrames).
// We can't be writing to two files at the same time.
- QValueList<KoDocumentChild*> embeddedObjects;
- QValueListConstIterator<KWFrameView*> framesIterator = selectedFrames.begin();
+ TQValueList<KoDocumentChild*> embeddedObjects;
+ TQValueListConstIterator<KWFrameView*> framesIterator = selectedFrames.begin();
for(; framesIterator != selectedFrames.end(); ++framesIterator) {
KWFrame *frame = (*framesIterator)->frame();
KWFrameSet *fs = frame->frameSet();
@@ -2980,7 +2980,7 @@ bool KWDocument::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, S
}
}
- QValueList<KoDocumentChild *>::const_iterator chl = embeddedObjects.begin();
+ TQValueList<KoDocumentChild *>::const_iterator chl = embeddedObjects.begin();
for( ; chl != embeddedObjects.end(); ++chl ) {
if ( !(*chl)->saveOasis( store, manifestWriter ) )
return false;
@@ -3007,28 +3007,28 @@ bool KWDocument::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, S
}
// can't be const due to recalcVariables()
-QDragObject* KWDocument::dragSelected( const QValueList<KWFrameView*> &selectedFrames) {
+TQDragObject* KWDocument::dragSelected( const TQValueList<KWFrameView*> &selectedFrames) {
return dragSelectedPrivate(0, selectedFrames, 0);
}
// can't be const due to recalcVariables()
-QDragObject* KWDocument::dragSelected( QWidget *parent, KWTextFrameSet* fs) {
- QValueList<KWFrameView*> noFrames;
- return dragSelectedPrivate(parent, noFrames, fs);
+TQDragObject* KWDocument::dragSelected( TQWidget *tqparent, KWTextFrameSet* fs) {
+ TQValueList<KWFrameView*> noFrames;
+ return dragSelectedPrivate(tqparent, noFrames, fs);
}
// can't be const due to recalcVariables()
-QDragObject* KWDocument::dragSelectedPrivate( QWidget *parent, const QValueList<KWFrameView*> &selectedFrames, KWTextFrameSet* fs)
+TQDragObject* KWDocument::dragSelectedPrivate( TQWidget *tqparent, const TQValueList<KWFrameView*> &selectedFrames, KWTextFrameSet* fs)
{
// We'll create a store (ZIP format) in memory
- QBuffer buffer;
- QCString mimeType = KWOasisSaver::selectionMimeType();
- KoStore* store = KoStore::createStore( &buffer, KoStore::Write, mimeType );
+ TQBuffer buffer;
+ TQCString mimeType = KWOasisSaver::selectionMimeType();
+ KoStore* store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Write, mimeType );
Q_ASSERT( store );
Q_ASSERT( !store->bad() );
KoOasisStore oasisStore( store );
KoXmlWriter* manifestWriter = oasisStore.manifestWriter( mimeType );
- QString plainText;
+ TQString plainText;
KoPicture picture;
if ( !saveOasisHelper( store, manifestWriter, KWDocument::SaveSelected, selectedFrames, &plainText, &picture, fs )
|| !oasisStore.closeManifestWriter() )
@@ -3039,9 +3039,9 @@ QDragObject* KWDocument::dragSelectedPrivate( QWidget *parent, const QValueList<
delete store;
- KMultipleDrag* multiDrag = new KMultipleDrag( parent );
+ KMultipleDrag* multiDrag = new KMultipleDrag( tqparent );
if ( !plainText.isEmpty() )
- multiDrag->addDragObject( new QTextDrag( plainText, 0 ) );
+ multiDrag->addDragObject( new TQTextDrag( plainText, 0 ) );
if ( !picture.isNull() )
multiDrag->addDragObject( picture.dragObject( 0 ) );
KoStoreDrag* storeDrag = new KoStoreDrag( KWOasisSaver::selectionMimeType(), 0 );
@@ -3051,9 +3051,9 @@ QDragObject* KWDocument::dragSelectedPrivate( QWidget *parent, const QValueList<
return multiDrag;
}
-void KWDocument::saveSelectedFrames( KoXmlWriter& bodyWriter, KoSavingContext& savingContext, QValueList<KoPictureKey>& pictureList, const QValueList<KWFrameView*> &selectedFrames, QString* plainText ) const {
- QPtrList<KoDocumentChild> embeddedObjects;
- QValueListConstIterator<KWFrameView*> framesIterator = selectedFrames.begin();
+void KWDocument::saveSelectedFrames( KoXmlWriter& bodyWriter, KoSavingContext& savingContext, TQValueList<KoPictureKey>& pictureList, const TQValueList<KWFrameView*> &selectedFrames, TQString* plainText ) const {
+ TQPtrList<KoDocumentChild> embeddedObjects;
+ TQValueListConstIterator<KWFrameView*> framesIterator = selectedFrames.begin();
for(; framesIterator != selectedFrames.end(); ++framesIterator) {
KWFrame *frame = (*framesIterator)->frame();
KWFrameSet *fs = frame->frameSet();
@@ -3073,13 +3073,13 @@ void KWDocument::saveSelectedFrames( KoXmlWriter& bodyWriter, KoSavingContext& s
else if ( !isTable ) {
#if 0
// Save the frame information
- QDomElement frameElem = parentElem.ownerDocument().createElement( "FRAME" );
- parentElem.appendChild( frameElem );
+ TQDomElement frameElem = tqparentElem.ownerDocument().createElement( "FRAME" );
+ tqparentElem.appendChild( frameElem );
frame->save( frameElem );
if ( frame != firstFrame )
{
// Frame saved alone -> remember which frameset it's part of
- frameElem.setAttribute( "parentFrameset", fs->name() );
+ frameElem.setAttribute( "tqparentFrameset", fs->name() );
}
#endif
}
@@ -3087,7 +3087,7 @@ void KWDocument::saveSelectedFrames( KoXmlWriter& bodyWriter, KoSavingContext& s
kdDebug(32001) << "found non-inline picture framesets" << endl;
const KoPictureKey key = static_cast<KWPictureFrameSet *>( fs )->key();
- if ( !pictureList.contains( key ) )
+ if ( !pictureList.tqcontains( key ) )
pictureList.append( key );
}
if ( isTable ) // Copy tables only once, even if they have many cells selected
@@ -3118,7 +3118,7 @@ void KWDocument::saveOasisSettings( KoXmlWriter& settingsWriter ) const
settingsWriter.endDocument();
}
-void KWDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyles, KoSavingContext& savingContext, SaveFlag saveFlag, const QByteArray& headerFooterContent ) const
+void KWDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyles, KoSavingContext& savingContext, SaveFlag saveFlag, const TQByteArray& headerFooterContent ) const
{
if ( saveFlag == SaveAll )
{
@@ -3144,8 +3144,8 @@ void KWDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyle
stylesWriter->endElement(); // default-style
}
- QValueList<KoGenStyles::NamedStyle> styles = mainStyles.styles( KoGenStyle::STYLE_USER );
- QValueList<KoGenStyles::NamedStyle>::const_iterator it = styles.begin();
+ TQValueList<KoGenStyles::NamedStyle> styles = mainStyles.styles( KoGenStyle::STYLE_USER );
+ TQValueList<KoGenStyles::NamedStyle>::const_iterator it = styles.begin();
for ( ; it != styles.end() ; ++it ) {
(*it).style->writeStyle( stylesWriter, mainStyles, "style:style", (*it).name, "style:paragraph-properties" );
}
@@ -3169,7 +3169,7 @@ void KWDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyle
static_cast<KWVariableSettings *>( m_varColl->variableSetting() )->saveNoteConfiguration( *stylesWriter );
stylesWriter->endElement(); // office:styles
- QString pageLayoutName;
+ TQString pageLayoutName;
if ( saveFlag == SaveAll )
{
stylesWriter->startElement( "office:automatic-styles" );
@@ -3187,11 +3187,11 @@ void KWDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyle
}
}
- QBuffer buffer;
+ TQBuffer buffer;
buffer.open( IO_WriteOnly );
- KoXmlWriter footnoteSepTmpWriter( &buffer ); // TODO pass indentation level
+ KoXmlWriter footnoteSepTmpWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level
footnoteSepTmpWriter.startElement( "style:footnote-sep" );
- QString tmp;
+ TQString tmp;
switch( m_footNoteSeparatorLinePos )
{
case SLP_CENTERED:
@@ -3207,7 +3207,7 @@ void KWDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyle
footnoteSepTmpWriter.addAttribute( "style:adjustment", tmp );
footnoteSepTmpWriter.addAttributePt( "style:width", m_footNoteSeparatorLineWidth );
- footnoteSepTmpWriter.addAttribute( "style:rel-width", QString::number( footNoteSeparatorLineLength() ) + "%" );
+ footnoteSepTmpWriter.addAttribute( "style:rel-width", TQString::number( footNoteSeparatorLineLength() ) + "%" );
switch( m_footNoteSeparatorLineType )
{
case SLT_SOLID:
@@ -3230,20 +3230,20 @@ void KWDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyle
footnoteSepTmpWriter.addAttribute( "style:line-style", tmp );
footnoteSepTmpWriter.endElement();
- const QString elementContents = QString::fromUtf8( buffer.buffer(), buffer.buffer().size() );
+ const TQString elementContents = TQString::fromUtf8( buffer.buffer(), buffer.buffer().size() );
pageLayout.addChildElement( "separator", elementContents );
buffer.close();
if ( m_pageColumns.columns > 1 ) {
- buffer.setBuffer( QByteArray() ); // clear data
+ buffer.tqsetBufferFromCopy(TQByteArray()); // clear data
buffer.open( IO_WriteOnly );
- KoXmlWriter columnsTmpWriter( &buffer ); // TODO pass indentation level
+ KoXmlWriter columnsTmpWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level
columnsTmpWriter.startElement( "style:columns" );
columnsTmpWriter.addAttribute( "fo:column-count", m_pageColumns.columns );
columnsTmpWriter.addAttributePt( "fo:column-gap", m_pageColumns.ptColumnSpacing );
columnsTmpWriter.endElement(); // style:columns
buffer.close();
- const QString elementContents = QString::fromUtf8( buffer.buffer(), buffer.buffer().size() );
+ const TQString elementContents = TQString::fromUtf8( buffer.buffer(), buffer.buffer().size() );
pageLayout.addChildElement( "columns", elementContents );
}
@@ -3251,15 +3251,15 @@ void KWDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyle
// if there's more than one pagemaster we need to rethink all this
pageLayoutName = mainStyles.lookup( pageLayout, "pm" );
- pageLayout.writeStyle( stylesWriter, mainStyles, "style:page-layout", pageLayoutName,
- "style:page-layout-properties", false /*don't close*/ );
+ pageLayout.writeStyle( stylesWriter, mainStyles, "style:page-tqlayout", pageLayoutName,
+ "style:page-tqlayout-properties", false /*don't close*/ );
// Ouch another problem: there is only one header style in oasis
// ##### can't have different borders for even/odd headers...
bool headerStyleSaved = false;
bool footerStyleSaved = false;
// ## This loop is duplicated in saveOasis
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit ) {
const KWFrameSet* fs = fit.current();
if ( fs->isVisible() && // HACK to avoid saving [hidden] headers/footers framesets for now
@@ -3301,7 +3301,7 @@ void KWDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyle
stylesWriter->endElement(); // header-style
}
}
- stylesWriter->endElement(); // style:page-layout
+ stylesWriter->endElement(); // style:page-tqlayout
// Headers and footers might have created new automatic parag/text styles -> save those
KWOasisSaver::writeAutomaticStyles( *stylesWriter, mainStyles, true );
@@ -3313,7 +3313,7 @@ void KWDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyle
stylesWriter->startElement( "office:master-styles" );
stylesWriter->startElement( "style:master-page" );
stylesWriter->addAttribute( "style:name", "Standard" );
- stylesWriter->addAttribute( "style:page-layout-name", pageLayoutName );
+ stylesWriter->addAttribute( "style:page-tqlayout-name", pageLayoutName );
if ( isHeaderVisible() || isFooterVisible() ) { // ### TODO save them even when hidden (and not empty)?
stylesWriter->addCompleteElement( headerFooterContent.data() );
@@ -3330,7 +3330,7 @@ void KWDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyle
void KWDocument::saveOasisCustomFied( KoXmlWriter &writer )const
{
bool customVariableFound = false;
- QPtrListIterator<KoVariable> it( m_varColl->getVariables() );
+ TQPtrListIterator<KoVariable> it( m_varColl->getVariables() );
for ( ; it.current() ; ++it )
{
if ( it.current()->type() == VT_CUSTOM )
@@ -3358,7 +3358,7 @@ void KWDocument::saveOasisBody( KoXmlWriter& writer, KoSavingContext& context )
if ( m_processingType == WP ) {
// Write out the non-inline framesets first; OOo wants it that way...
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
++fit; // skip main text frameset
for ( ; fit.current() ; ++fit ) {
KWFrameSet* fs = fit.current();
@@ -3390,7 +3390,7 @@ void KWDocument::saveOasisBody( KoXmlWriter& writer, KoSavingContext& context )
}
writer.endElement() ; // "text:page-sequence";
// Now write the framesets
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit ) {
KWFrameSet* fs = fit.current();
if ( !fs->isFloating() &&
@@ -3403,20 +3403,20 @@ void KWDocument::saveOasisBody( KoXmlWriter& writer, KoSavingContext& context )
}
}
-QDomDocument KWDocument::saveXML()
+TQDomDocument KWDocument::saveXML()
{
- m_varColl->variableSetting()->setModificationDate(QDateTime::currentDateTime());
+ m_varColl->variableSetting()->setModificationDate(TQDateTime::tqcurrentDateTime());
recalcVariables( VT_DATE );
recalcVariables( VT_TIME ); // for "current time"
recalcVariables( VT_STATISTIC );
- QDomDocument doc = createDomDocument( "DOC", CURRENT_DTD_VERSION );
- QDomElement kwdoc = doc.documentElement();
+ TQDomDocument doc = createDomDocument( "DOC", CURRENT_DTD_VERSION );
+ TQDomElement kwdoc = doc.documentElement();
kwdoc.setAttribute( "editor", "KWord" );
kwdoc.setAttribute( "mime", "application/x-kword" );
m_syntaxVersion = CURRENT_SYNTAX_VERSION;
kwdoc.setAttribute( "syntaxVersion", m_syntaxVersion );
- QDomElement paper = doc.createElement( "PAPER" );
+ TQDomElement paper = doc.createElement( "PAPER" );
kwdoc.appendChild( paper );
paper.setAttribute( "format", static_cast<int>( m_pageLayout.format ) );
paper.setAttribute( "pages", pageCount() );
@@ -3449,14 +3449,14 @@ QDomDocument KWDocument::saveXML()
// Now part of the app config
//paper.setAttribute( "zoom",m_zoom );
- QDomElement borders = doc.createElement( "PAPERBORDERS" );
+ TQDomElement borders = doc.createElement( "PAPERBORDERS" );
paper.appendChild( borders );
borders.setAttribute( "left", m_pageLayout.ptLeft );
borders.setAttribute( "top", m_pageLayout.ptTop );
borders.setAttribute( "right", m_pageLayout.ptRight );
borders.setAttribute( "bottom", m_pageLayout.ptBottom );
- QDomElement docattrs = doc.createElement( "ATTRIBUTES" );
+ TQDomElement docattrs = doc.createElement( "ATTRIBUTES" );
kwdoc.appendChild( docattrs );
docattrs.setAttribute( "processing", static_cast<int>( m_processingType ) );
docattrs.setAttribute( "standardpage", 1 );
@@ -3486,7 +3486,7 @@ QDomDocument KWDocument::saveXML()
if( !m_bookmarkList->isEmpty() )
{
- QDomElement bookmark = doc.createElement( "BOOKMARKS" );
+ TQDomElement bookmark = doc.createElement( "BOOKMARKS" );
kwdoc.appendChild( bookmark );
for ( KoTextBookmarkList::const_iterator it = m_bookmarkList->begin();
@@ -3498,7 +3498,7 @@ QDomDocument KWDocument::saveXML()
book.endParag() &&
fs && !fs->isDeleted() )
{
- QDomElement bookElem = doc.createElement( "BOOKMARKITEM" );
+ TQDomElement bookElem = doc.createElement( "BOOKMARKITEM" );
bookmark.appendChild( bookElem );
bookElem.setAttribute( "name", book.bookmarkName() );
bookElem.setAttribute( "frameset", fs->name() );
@@ -3512,13 +3512,13 @@ QDomDocument KWDocument::saveXML()
}
variableCollection()->variableSetting()->save(kwdoc );
- QDomElement framesets = doc.createElement( "FRAMESETS" );
+ TQDomElement framesets = doc.createElement( "FRAMESETS" );
kwdoc.appendChild( framesets );
m_textImageRequests.clear(); // for KWTextImage
- QValueList<KoPictureKey> savePictures;
+ TQValueList<KoPictureKey> savePictures;
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit )
{
KWFrameSet *frameSet = fit.current();
@@ -3530,98 +3530,98 @@ QDomDocument KWDocument::saveXML()
if ( !frameSet->isDeleted() && ( frameSet->type() == FT_PICTURE ) )
{
KoPictureKey key = static_cast<KWPictureFrameSet *>( frameSet )->key();
- if ( !savePictures.contains( key ) )
+ if ( !savePictures.tqcontains( key ) )
savePictures.append( key );
}
}
// Process the data of the KWTextImage classes.
- QPtrListIterator<KWTextImage> textIt ( m_textImageRequests );
+ TQPtrListIterator<KWTextImage> textIt ( m_textImageRequests );
for ( ; textIt.current() ; ++textIt )
{
KoPictureKey key = textIt.current()->getKey();
kdDebug(32001) << "KWDocument::saveXML registering text image " << key.toString() << endl;
- if ( !savePictures.contains( key ) )
+ if ( !savePictures.tqcontains( key ) )
savePictures.append( key );
}
- QDomElement styles = doc.createElement( "STYLES" );
+ TQDomElement styles = doc.createElement( "STYLES" );
kwdoc.appendChild( styles );
- QValueList<KoUserStyle *> styleList(m_styleColl->styleList());
- for ( QValueList<KoUserStyle *>::const_iterator it = styleList.begin(), end = styleList.end();
+ TQValueList<KoUserStyle *> styleList(m_styleColl->styleList());
+ for ( TQValueList<KoUserStyle *>::const_iterator it = styleList.begin(), end = styleList.end();
it != end ; ++it )
saveStyle( static_cast<KoParagStyle *>( *it ), styles );
- QDomElement frameStyles = doc.createElement( "FRAMESTYLES" );
+ TQDomElement frameStyles = doc.createElement( "FRAMESTYLES" );
kwdoc.appendChild( frameStyles );
- QValueList<KoUserStyle *> frameStyleList(m_frameStyleColl->styleList());
- for ( QValueList<KoUserStyle *>::const_iterator it = frameStyleList.begin(), end = frameStyleList.end();
+ TQValueList<KoUserStyle *> frameStyleList(m_frameStyleColl->styleList());
+ for ( TQValueList<KoUserStyle *>::const_iterator it = frameStyleList.begin(), end = frameStyleList.end();
it != end ; ++it )
saveFrameStyle( static_cast<KWFrameStyle *>(*it), frameStyles );
- QDomElement tableStyles = doc.createElement( "TABLESTYLES" );
+ TQDomElement tableStyles = doc.createElement( "TABLESTYLES" );
kwdoc.appendChild( tableStyles );
- QValueList<KoUserStyle *> tableStyleList(m_tableStyleColl->styleList());
- for ( QValueList<KoUserStyle *>::const_iterator it = tableStyleList.begin(), end = tableStyleList.end();
+ TQValueList<KoUserStyle *> tableStyleList(m_tableStyleColl->styleList());
+ for ( TQValueList<KoUserStyle *>::const_iterator it = tableStyleList.begin(), end = tableStyleList.end();
it != end ; ++it )
saveTableStyle( static_cast<KWTableStyle *>(*it), tableStyles );
- QDomElement pictures = m_pictureCollection->saveXML( KoPictureCollection::CollectionPicture, doc, savePictures );
+ TQDomElement pictures = m_pictureCollection->saveXML( KoPictureCollection::CollectionPicture, doc, savePictures );
kwdoc.appendChild( pictures );
// Not needed anymore
#if 0
// Write out the list of parags (id) that form the table of contents, see KWContents::createContents
if ( contents->hasContents() ) {
- QDomElement cParags = doc.createElement( "CPARAGS" );
+ TQDomElement cParags = doc.createElement( "CPARAGS" );
kwdoc.appendChild( cParags );
- QValueList<int>::Iterator it = contents->begin();
+ TQValueList<int>::Iterator it = contents->begin();
for ( ; it != contents->end(); ++it )
{
- QDomElement paragElem = doc.createElement( "PARAG" );
+ TQDomElement paragElem = doc.createElement( "PARAG" );
cParags.appendChild( paragElem );
- paragElem.setAttribute( "name", QString::number( *it ) ); // write parag id
+ paragElem.setAttribute( "name", TQString::number( *it ) ); // write parag id
}
}
#endif
- QDomElement mailMerge=m_slDataBase->save(doc);
+ TQDomElement mailMerge=m_slDataBase->save(doc);
kwdoc.appendChild(mailMerge);
if( !m_spellCheckIgnoreList.isEmpty() )
{
- QDomElement spellCheckIgnore = doc.createElement( "SPELLCHECKIGNORELIST" );
+ TQDomElement spellCheckIgnore = doc.createElement( "SPELLCHECKIGNORELIST" );
kwdoc.appendChild( spellCheckIgnore );
- for ( QStringList::ConstIterator it = m_spellCheckIgnoreList.begin(); it != m_spellCheckIgnoreList.end(); ++it )
+ for ( TQStringList::ConstIterator it = m_spellCheckIgnoreList.begin(); it != m_spellCheckIgnoreList.end(); ++it )
{
- QDomElement spellElem = doc.createElement( "SPELLCHECKIGNOREWORD" );
+ TQDomElement spellElem = doc.createElement( "SPELLCHECKIGNOREWORD" );
spellCheckIgnore.appendChild( spellElem );
spellElem.setAttribute( "word", *it );
}
}
// Save embedded objects
- saveEmbeddedObjects( kwdoc, children() );
+ saveEmbeddedObjects( kwdoc, tqchildren() );
return doc;
}
// KWord-1.3 format
-void KWDocument::saveEmbeddedObjects( QDomElement& parentElem, const QPtrList<KoDocumentChild>& childList )
+void KWDocument::saveEmbeddedObjects( TQDomElement& tqparentElem, const TQPtrList<KoDocumentChild>& childList )
{
// Write "OBJECT" tag for every child, appending "EMBEDDING" tags to the main XML
- QPtrListIterator<KoDocumentChild> chl( childList );
- QDomDocument doc = parentElem.ownerDocument();
+ TQPtrListIterator<KoDocumentChild> chl( childList );
+ TQDomDocument doc = tqparentElem.ownerDocument();
for( ; chl.current(); ++chl ) {
KWDocumentChild* curr = static_cast<KWDocumentChild*>(chl.current());
if ( !curr->isDeleted() )
{
- QDomElement embeddedElem = doc.createElement( "EMBEDDED" );
- parentElem.appendChild( embeddedElem );
+ TQDomElement embeddedElem = doc.createElement( "EMBEDDED" );
+ tqparentElem.appendChild( embeddedElem );
- QDomElement objectElem = curr->save( doc, true );
+ TQDomElement objectElem = curr->save( doc, true );
embeddedElem.appendChild( objectElem );
- QDomElement settingsElem = doc.createElement( "SETTINGS" );
+ TQDomElement settingsElem = doc.createElement( "SETTINGS" );
embeddedElem.appendChild( settingsElem );
curr->partFrameSet()->save( settingsElem );
@@ -3630,57 +3630,57 @@ void KWDocument::saveEmbeddedObjects( QDomElement& parentElem, const QPtrList<Ko
}
// KWord-1.3 format
-void KWDocument::saveStyle( KoParagStyle *sty, QDomElement parentElem )
+void KWDocument::saveStyle( KoParagStyle *sty, TQDomElement tqparentElem )
{
- QDomDocument doc = parentElem.ownerDocument();
- QDomElement styleElem = doc.createElement( "STYLE" );
- parentElem.appendChild( styleElem );
+ TQDomDocument doc = tqparentElem.ownerDocument();
+ TQDomElement styleElem = doc.createElement( "STYLE" );
+ tqparentElem.appendChild( styleElem );
sty->saveStyle( styleElem );
- QDomElement formatElem = KWTextParag::saveFormat( doc, &sty->format(), 0L, 0, 0 );
+ TQDomElement formatElem = KWTextParag::saveFormat( doc, &sty->format(), 0L, 0, 0 );
styleElem.appendChild( formatElem );
}
// KWord-1.3 format
-void KWDocument::saveFrameStyle( KWFrameStyle *sty, QDomElement parentElem )
+void KWDocument::saveFrameStyle( KWFrameStyle *sty, TQDomElement tqparentElem )
{
- QDomDocument doc = parentElem.ownerDocument();
- QDomElement frameStyleElem = doc.createElement( "FRAMESTYLE" );
- parentElem.appendChild( frameStyleElem );
+ TQDomDocument doc = tqparentElem.ownerDocument();
+ TQDomElement frameStyleElem = doc.createElement( "FRAMESTYLE" );
+ tqparentElem.appendChild( frameStyleElem );
sty->saveFrameStyle( frameStyleElem );
}
// KWord-1.3 format
-void KWDocument::saveTableStyle( KWTableStyle *sty, QDomElement parentElem )
+void KWDocument::saveTableStyle( KWTableStyle *sty, TQDomElement tqparentElem )
{
- QDomDocument doc = parentElem.ownerDocument();
- QDomElement tableStyleElem = doc.createElement( "TABLESTYLE" );
- parentElem.appendChild( tableStyleElem );
+ TQDomDocument doc = tqparentElem.ownerDocument();
+ TQDomElement tableStyleElem = doc.createElement( "TABLESTYLE" );
+ tqparentElem.appendChild( tableStyleElem );
sty->saveTableStyle( tableStyleElem );
}
-QValueList<KoPictureKey> KWDocument::savePictureList()
+TQValueList<KoPictureKey> KWDocument::savePictureList()
{
- QValueList<KoPictureKey> savePictures;
+ TQValueList<KoPictureKey> savePictures;
// At first, we must process the data of the KWTextImage classes.
// Process the data of the KWTextImage classes.
- QPtrListIterator<KWTextImage> textIt ( m_textImageRequests );
+ TQPtrListIterator<KWTextImage> textIt ( m_textImageRequests );
for ( ; textIt.current() ; ++textIt )
{
KoPictureKey key = textIt.current()->getKey();
kdDebug(32001) << "KWDocument::saveXML registering text image " << key.toString() << endl;
- if ( !savePictures.contains( key ) )
+ if ( !savePictures.tqcontains( key ) )
savePictures.append( key );
}
m_textImageRequests.clear(); // Save some memory!
// Now do the images/cliparts in frames.
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit )
{
KWFrameSet *frameSet = fit.current();
@@ -3688,7 +3688,7 @@ QValueList<KoPictureKey> KWDocument::savePictureList()
if ( !frameSet->isDeleted() && ( frameSet->type() == FT_PICTURE ) )
{
KoPictureKey key = static_cast<KWPictureFrameSet *>( frameSet )->key();
- if ( !savePictures.contains( key ) )
+ if ( !savePictures.tqcontains( key ) )
savePictures.append( key );
}
}
@@ -3701,9 +3701,9 @@ bool KWDocument::completeSaving( KoStore *store )
if ( !store )
return TRUE;
- QString u = KURL( url() ).path();
+ TQString u = KURL( url() ).path();
- QValueList<KoPictureKey> savePictures( savePictureList() );
+ TQValueList<KoPictureKey> savePictures( savePictureList() );
return m_pictureCollection->saveToStore( KoPictureCollection::CollectionPicture, store, savePictures );
}
@@ -3717,7 +3717,7 @@ void KWDocument::addView( KoView *view )
{
m_lstViews.append( (KWView*)view );
KoDocument::addView( view );
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it ) {
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it ) {
(*it)->deselectAllFrames();
}
}
@@ -3730,22 +3730,22 @@ void KWDocument::removeView( KoView *view )
void KWDocument::addShell( KoMainWindow *shell )
{
- connect( shell, SIGNAL( documentSaved() ), m_commandHistory, SLOT( documentSaved() ) );
- connect( shell, SIGNAL( saveDialogShown() ), this, SLOT( saveDialogShown() ) );
+ connect( shell, TQT_SIGNAL( documentSaved() ), m_commandHistory, TQT_SLOT( documentSaved() ) );
+ connect( shell, TQT_SIGNAL( saveDialogShown() ), this, TQT_SLOT( saveDialogShown() ) );
KoDocument::addShell( shell );
}
-KoView* KWDocument::createViewInstance( QWidget* parent, const char* name )
+KoView* KWDocument::createViewInstance( TQWidget* tqparent, const char* name )
{
if ( isEmbedded() )
- return new KWView( "ModeEmbedded", parent, name, this );
+ return new KWView( "ModeEmbedded", tqparent, name, this );
else
- return new KWView( m_viewModeType, parent, name, this );
+ return new KWView( m_viewModeType, tqparent, name, this );
}
// Paint this document when it's embedded
// This is also used to paint the preview.png that goes into the ZIP file
-void KWDocument::paintContent( QPainter& painter, const QRect& rectangle, bool transparent, double zoomX, double zoomY )
+void KWDocument::paintContent( TQPainter& painter, const TQRect& rectangle, bool transparent, double zoomX, double zoomY )
{
//kdDebug(32001) << "KWDocument::paintContent m_zoom=" << m_zoom << " zoomX=" << zoomX << " zoomY=" << zoomY << " transparent=" << transparent << " rectangle=" << rectangle << endl;
Q_ASSERT( zoomX != 0 );
@@ -3761,34 +3761,34 @@ void KWDocument::paintContent( QPainter& painter, const QRect& rectangle, bool t
if ( m_zoomedResolutionX != zoomX || m_zoomedResolutionY != zoomY )
{
//kdDebug(32001) << "m_zoomedResolutionX=" << m_zoomedResolutionX << " != " << zoomX << " -> calling setResolution(" << zoomX << ")" << endl;
- int zoomLevel = qRound( 100 * zoomY / m_zoomedResolutionY ); // ## ignores the case where the x and y scaling differs
+ int zoomLevel = tqRound( 100 * zoomY / m_zoomedResolutionY ); // ## ignores the case where the x and y scaling differs
setZoom( zoomLevel );
- bool forPrint = painter.device() && painter.device()->devType() == QInternal::Printer;
+ bool forPrint = painter.device() && painter.device()->devType() == TQInternal::Printer;
newZoomAndResolution( false, forPrint );
if ( KFormula::Document* formulaDocument = m_formulaDocumentWrapper->document() )
formulaDocument->setZoomAndResolution( zoomLevel, zoomX, zoomY, false, forPrint );
// Note that this zoom and resolution are then used when activating the embedded object!
}
- QRect rect( rectangle );
+ TQRect rect( rectangle );
painter.save();
painter.translate( rect.x(), rect.y() );
- QRect clipRect( 0, 0, rect.width(), rect.height() );
+ TQRect clipRect( 0, 0, rect.width(), rect.height() );
KWViewModeEmbedded * viewMode = new KWViewModeEmbedded( this, 0 /*no canvas*/ );
viewMode->setDrawFrameBackground( !transparent );
viewMode->setDrawSelections( false );
- QColorGroup cg = QApplication::palette().active();
+ TQColorGroup cg = TQApplication::tqpalette().active();
if (!transparent)
{
- QRegion emptyRegion( rect );
+ TQRegion emptyRegion( rect );
createEmptyRegion( rect, emptyRegion, viewMode );
- eraseEmptySpace( &painter, emptyRegion, cg.brush( QColorGroup::Base ) );
+ eraseEmptySpace( &painter, emptyRegion, cg.brush( TQColorGroup::Base ) );
}
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit )
{
KWFrameSet * frameset = fit.current();
@@ -3802,7 +3802,7 @@ void KWDocument::paintContent( QPainter& painter, const QRect& rectangle, bool t
painter.restore();
}
-QPixmap KWDocument::generatePreview( const QSize& size )
+TQPixmap KWDocument::generatePreview( const TQSize& size )
{
int oldZoom = m_zoom;
double oldResolutionX = resolutionX();
@@ -3810,23 +3810,23 @@ QPixmap KWDocument::generatePreview( const QSize& size )
double oldZoomX = zoomedResolutionX();
double oldZoomY = zoomedResolutionY();
- // Sometimes (due to the different resolution?) the layout creates a new page
- // while saving the preview. If this happens, we don't want to repaint the real views
+ // Sometimes (due to the different resolution?) the tqlayout creates a new page
+ // while saving the preview. If this happens, we don't want to tqrepaint the real views
// (due to KWCanvas::slotNewContentsSize)
// ##### One day when we have real doc/view separation in kotextparag, we shouldn't mess with
// the real view's resolution, we should instead create a fake view for the preview itself.
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it ) {
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it ) {
(*it)->getGUI()->canvasWidget()->setUpdatesEnabled( false );
}
Q_ASSERT( !m_bGeneratingPreview );
m_bGeneratingPreview = true;
- QPixmap pix = KoDocument::generatePreview(size);
+ TQPixmap pix = KoDocument::generatePreview(size);
// Restore everything as it was before
setResolution( oldResolutionX, oldResolutionY );
setZoom( oldZoom );
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it ) {
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it ) {
(*it)->getGUI()->canvasWidget()->setUpdatesEnabled( true );
}
newZoomAndResolution( true /*set contents size again*/, false );
@@ -3837,9 +3837,9 @@ QPixmap KWDocument::generatePreview( const QSize& size )
return pix;
}
-void KWDocument::createEmptyRegion( const QRect & crect, QRegion & emptyRegion, KWViewMode * viewMode )
+void KWDocument::createEmptyRegion( const TQRect & crect, TQRegion & emptyRegion, KWViewMode * viewMode )
{
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit )
{
KWFrameSet *frameset = fit.current();
@@ -3848,11 +3848,11 @@ void KWDocument::createEmptyRegion( const QRect & crect, QRegion & emptyRegion,
}
}
-void KWDocument::eraseEmptySpace( QPainter * painter, const QRegion & emptySpaceRegion, const QBrush & brush )
+void KWDocument::eraseEmptySpace( TQPainter * painter, const TQRegion & emptySpaceRegion, const TQBrush & brush )
{
painter->save();
- painter->setClipRegion( emptySpaceRegion, QPainter::CoordPainter );
- painter->setPen( Qt::NoPen );
+ painter->setClipRegion( emptySpaceRegion, TQPainter::CoordPainter );
+ painter->setPen( TQt::NoPen );
//kdDebug(32001) << "KWDocument::eraseEmptySpace emptySpaceRegion: " << emptySpaceRegion << endl;
//kdDebug(32001) << " boundingRect: " << DEBUGRECT( emptySpaceRegion.boundingRect() ) << endl;
@@ -3862,23 +3862,23 @@ void KWDocument::eraseEmptySpace( QPainter * painter, const QRegion & emptySpace
KWDocumentChild* KWDocument::createChildDoc( const KoRect& rect, KoDocument* childDoc )
{
- KWDocumentChild* ch = new KWDocumentChild( this, rect.toQRect(), childDoc );
+ KWDocumentChild* ch = new KWDocumentChild( this, rect.toTQRect(), childDoc );
insertChild( ch );
return ch;
}
-KWPartFrameSet* KWDocument::insertObject( const KoRect& rect, KoDocumentEntry& e, QWidget* parentWidget )
+KWPartFrameSet* KWDocument::insertObject( const KoRect& rect, KoDocumentEntry& e, TQWidget* tqparentWidget )
{
KoDocument* doc = e.createDoc( this );
if ( !doc )
return 0;
- if ( !doc->showEmbedInitDialog( parentWidget ) )
+ if ( !doc->showEmbedInitDialog( tqparentWidget ) )
return 0;
KWDocumentChild* ch = createChildDoc( rect, doc );
setModified( TRUE );
- KWPartFrameSet *frameset = new KWPartFrameSet( this, ch, QString::null );
+ KWPartFrameSet *frameset = new KWPartFrameSet( this, ch, TQString() );
KWFrame *frame = new KWFrame(frameset, rect.x(), rect.y(), rect.width(), rect.height() );
frame->setZOrder( maxZOrder( frame->pageNumber(this) ) + 1 ); // make sure it's on top
frameset->addFrame( frame );
@@ -3887,22 +3887,22 @@ KWPartFrameSet* KWDocument::insertObject( const KoRect& rect, KoDocumentEntry& e
KWCreateFrameCommand *cmd = new KWCreateFrameCommand( i18n("Create Part Frame"), frame);
addCommand(cmd);
- frameChanged( frame ); // repaint etc.
+ frameChanged( frame ); // tqrepaint etc.
return frameset;
}
void KWDocument::delayedRepaintAllViews() {
- if (!m_repaintAllViewsPending) {
- QTimer::singleShot( 0, this, SLOT( slotRepaintAllViews() ) );
- m_repaintAllViewsPending=true;
+ if (!m_tqrepaintAllViewsPending) {
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotRepaintAllViews() ) );
+ m_tqrepaintAllViewsPending=true;
}
}
void KWDocument::slotRepaintAllViews() {
- m_repaintAllViewsPending=false;
- repaintAllViews( false );
+ m_tqrepaintAllViewsPending=false;
+ tqrepaintAllViews( false );
}
void KWDocument::delayedRecalcFrames( int fromPage ) {
@@ -3910,7 +3910,7 @@ void KWDocument::delayedRecalcFrames( int fromPage ) {
if ( m_recalcFramesPending == -1 || fromPage < m_recalcFramesPending )
{
m_recalcFramesPending = fromPage;
- QTimer::singleShot( 0, this, SLOT( slotRecalcFrames() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotRecalcFrames() ) );
}
}
@@ -3922,31 +3922,31 @@ void KWDocument::slotRecalcFrames() {
recalcFrames( from );
}
-void KWDocument::repaintAllViewsExcept( KWView *view, bool erase )
+void KWDocument::tqrepaintAllViewsExcept( KWView *view, bool erase )
{
- //kdDebug(32001) << "KWDocument::repaintAllViewsExcept" << endl;
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it ) {
+ //kdDebug(32001) << "KWDocument::tqrepaintAllViewsExcept" << endl;
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it ) {
KWView* viewPtr = *it;
if ( viewPtr != view /*&& viewPtr->getGUI() && viewPtr->getGUI()->canvasWidget()*/ ) {
- viewPtr->getGUI()->canvasWidget()->repaintAll( erase );
+ viewPtr->getGUI()->canvasWidget()->tqrepaintAll( erase );
}
}
}
void KWDocument::updateAllStyleLists()
{
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
(*it)->updateStyleList();
}
-void KWDocument::updateStyleListOrder( const QStringList &list )
+void KWDocument::updateStyleListOrder( const TQStringList &list )
{
styleCollection()->updateStyleListOrder( list );
}
void KWDocument::applyStyleChange( KoStyleChangeDefMap changed )
{
- QPtrList<KWTextFrameSet> textFramesets = allTextFramesets( true );
+ TQPtrList<KWTextFrameSet> textFramesets = allTextFramesets( true );
KWTextFrameSet *frm;
for ( frm=textFramesets.first(); frm != 0; frm=textFramesets.next() ){
@@ -3956,44 +3956,44 @@ void KWDocument::applyStyleChange( KoStyleChangeDefMap changed )
void KWDocument::updateAllFrameStyleLists()
{
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
(*it)->updateFrameStyleList();
}
void KWDocument::updateAllTableStyleLists()
{
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
(*it)->updateTableStyleList();
}
-void KWDocument::repaintAllViews( bool erase )
+void KWDocument::tqrepaintAllViews( bool erase )
{
- //kdDebug(32001) << "KWDocument::repaintAllViews" << endl;
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
- (*it)->getGUI()->canvasWidget()->repaintAll( erase );
+ //kdDebug(32001) << "KWDocument::tqrepaintAllViews" << endl;
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ (*it)->getGUI()->canvasWidget()->tqrepaintAll( erase );
}
-QPtrList<KWFrame> KWDocument::framesToCopyOnNewPage( int afterPageNum ) const {
+TQPtrList<KWFrame> KWDocument::framesToCopyOnNewPage( int afterPageNum ) const {
// afterPageNum can be -1 for 'before page 1'
// Look at frames on pages afterPageNum and afterPageNum-1 (for sheetside stuff)
- QPtrList<KWFrame> framesToLookAt;
+ TQPtrList<KWFrame> framesToLookAt;
if ( afterPageNum >= startPage() )
framesToLookAt = framesInPage( afterPageNum, false );
if ( afterPageNum >= startPage() + 1 )
{
- QPtrList<KWFrame> framesToAlsoLookAt = framesInPage( afterPageNum-1, false ); // order doesn't matter
+ TQPtrList<KWFrame> framesToAlsoLookAt = framesInPage( afterPageNum-1, false ); // order doesn't matter
// Merge into single list. Other alternative, two loops, code inside moved to another method.
- QPtrListIterator<KWFrame> frameAlsoIt( framesToAlsoLookAt );
+ TQPtrListIterator<KWFrame> frameAlsoIt( framesToAlsoLookAt );
for ( ; frameAlsoIt.current(); ++frameAlsoIt )
framesToLookAt.append( frameAlsoIt.current() );
}
- QPtrList<KWFrame> framesToCopy; // the result
+ TQPtrList<KWFrame> framesToCopy; // the result
- QPtrListIterator<KWFrame> frameIt( framesToLookAt );
+ TQPtrListIterator<KWFrame> frameIt( framesToLookAt );
for ( ; frameIt.current(); ++frameIt )
{
KWFrame * frame = frameIt.current();
@@ -4033,11 +4033,11 @@ KWPage* KWDocument::insertPage( int afterPageNum ) // can be -1 for 'before page
for ( int pg = pageCount () -1 ; pg > afterPageNum ; --pg )
{
// pg is the 'src' page. Its contents must be moved to the page pg+1
- QPtrList<KWFrame> frames = framesInPage( pg, false );
+ TQPtrList<KWFrame> frames = framesInPage( pg, false );
#ifdef DEBUG_PAGES
kdDebug(32002) << "insertPage: moving " << frames.count() << " frames down, from page " << pg << endl;
#endif
- QPtrListIterator<KWFrame> frameIt( frames );
+ TQPtrListIterator<KWFrame> frameIt( frames );
for ( ; frameIt.current(); ++frameIt )
frameIt.current()->moveBy( 0, pageHeight );
}
@@ -4045,8 +4045,8 @@ KWPage* KWDocument::insertPage( int afterPageNum ) // can be -1 for 'before page
KWPage *page = pageManager()->insertPage(afterPageNum+1);
// Fill in the new page
- QPtrList<KWFrame> framesToCopy = framesToCopyOnNewPage( afterPageNum );
- QPtrListIterator<KWFrame> frameIt( framesToCopy );
+ TQPtrList<KWFrame> framesToCopy = framesToCopyOnNewPage( afterPageNum );
+ TQPtrListIterator<KWFrame> frameIt( framesToCopy );
for ( ; frameIt.current(); ++frameIt )
{
KWFrame * frame = frameIt.current();
@@ -4087,13 +4087,13 @@ void KWDocument::afterInsertPage( int pageNum )
recalcVariables( VT_PGNUM );
emit numPagesChanged();
if ( m_viewModeType == "ModePreview" )
- repaintAllViews();
+ tqrepaintAllViews();
}
bool KWDocument::canRemovePage( int num )
{
kdDebug() << "KWDocument::canRemovePage " << num<< endl;
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit )
{
KWFrameSet * frameSet = fit.current();
@@ -4117,11 +4117,11 @@ void KWDocument::removePage( int pageNum )
return;
// ## This assumes that framesInPage is up-to-date.
- QPtrList<KWFrame> framesToDelete = framesInPage( pageNum, false );
+ TQPtrList<KWFrame> framesToDelete = framesInPage( pageNum, false );
#ifdef DEBUG_PAGES
kdDebug(32002) << "KWDocument::removePage " << pageNum << ", " << framesToDelete.count() << " frames to delete" << endl;
#endif
- QPtrListIterator<KWFrame> frameIt( framesToDelete );
+ TQPtrListIterator<KWFrame> frameIt( framesToDelete );
for ( ; frameIt.current(); ++frameIt )
{
KWFrame * frame = frameIt.current();
@@ -4135,11 +4135,11 @@ void KWDocument::removePage( int pageNum )
for ( int pg = pageNum+1 ; pg < pageCount() ; ++pg )
{
// pg is the 'src' page. Its contents must be moved to the page pg-1
- QPtrList<KWFrame> frames = framesInPage( pg, false );
+ TQPtrList<KWFrame> frames = framesInPage( pg, false );
#ifdef DEBUG_PAGES
kdDebug(32002) << "removePage: moving " << frames.count() << " frames up, from page " << pg << endl;
#endif
- QPtrListIterator<KWFrame> frameIt( frames );
+ TQPtrListIterator<KWFrame> frameIt( frames );
for ( ; frameIt.current(); ++frameIt )
frameIt.current()->moveBy( 0, pageManager()->page(0)->height() );
}
@@ -4156,10 +4156,10 @@ void KWDocument::afterRemovePages()
{
//### IMHO recalcFrames should take care of updateAllFrames (it already does it partially).
recalcFrames();
- // Do this before recalcVariables (which repaints). The removed frames must be removed from the frame caches.
+ // Do this before recalcVariables (which tqrepaints). The removed frames must be removed from the frame caches.
// We don't call updateAllFrames() directly, because it still calls
// updateFramesOnTopOrBelow, which is useless (and slow) here.
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit )
fit.current()->updateFrames();
@@ -4167,7 +4167,7 @@ void KWDocument::afterRemovePages()
if ( !m_bGeneratingPreview )
emit newContentsSize();
if ( m_viewModeType == "ModePreview" )
- repaintAllViews();
+ tqrepaintAllViews();
}
bool KWDocument::tryRemovingPages()
@@ -4192,10 +4192,10 @@ bool KWDocument::tryRemovingPages()
}
-KWFrameSet * KWDocument::frameSetByName( const QString & name )
+KWFrameSet * KWDocument::frameSetByName( const TQString & name )
{
// Note: this isn't recursive, so it won't find table cells.
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit )
if ( fit.current()->name() == name )
return fit.current();
@@ -4204,13 +4204,13 @@ KWFrameSet * KWDocument::frameSetByName( const QString & name )
//#define DEBUG_FRAMESELECT
-QString KWDocument::generateFramesetName( const QString & templateName )
+TQString KWDocument::generateFramesetName( const TQString & templateName )
{
- QString name;
+ TQString name;
int num = 1;
bool exists;
do {
- name = templateName.arg( num );
+ name = templateName.tqarg( num );
exists = frameSetByName( name );
++num;
} while ( exists );
@@ -4220,7 +4220,7 @@ QString KWDocument::generateFramesetName( const QString & templateName )
void KWDocument::fixZOrders() {
//KWFrame *frameFixed = 0;
for (int pgnum = startPage() ; pgnum <= lastPage() ; pgnum++) {
- QPtrList<KWFrame> frames = framesInPage(pgnum);
+ TQPtrList<KWFrame> frames = framesInPage(pgnum);
// scan this page to see if we need to fixup:
// fix up if two frames have the same zOrder,
// or if a zOrder is negative (not allowed by OASIS)
@@ -4265,10 +4265,10 @@ void KWDocument::fixZOrders() {
void KWDocument::lowerMainFrames( int pageNum )
{
- QPtrList<KWFrame> framesInPage = this->framesInPage(pageNum);
+ TQPtrList<KWFrame> framesInPage = this->framesInPage(pageNum);
int lowestZOrder=10000;
- for ( QPtrListIterator<KWFrame> frameIt( framesInPage ); frameIt.current(); ++frameIt )
- lowestZOrder=QMIN(lowestZOrder, frameIt.current()->zOrder());
+ for ( TQPtrListIterator<KWFrame> frameIt( framesInPage ); frameIt.current(); ++frameIt )
+ lowestZOrder=TQMIN(lowestZOrder, frameIt.current()->zOrder());
lowerMainFrames( pageNum, lowestZOrder );
}
@@ -4276,8 +4276,8 @@ void KWDocument::lowerMainFrames( int pageNum )
void KWDocument::lowerMainFrames( int pageNum, int lowestZOrder )
{
// Get the main frameset and see if we have to lower its frame(s).
- QPtrList<KWFrame> framesInPage = this->framesInPage(pageNum);
- for ( QPtrListIterator<KWFrame> frameIt( framesInPage ); frameIt.current(); ++frameIt ) {
+ TQPtrList<KWFrame> framesInPage = this->framesInPage(pageNum);
+ for ( TQPtrListIterator<KWFrame> frameIt( framesInPage ); frameIt.current(); ++frameIt ) {
if(frameIt.current()->frameSet()->isMainFrameset()) {
if(lowestZOrder <= frameIt.current()->zOrder())
frameIt.current()->setZOrder(lowestZOrder-1);
@@ -4286,17 +4286,17 @@ void KWDocument::lowerMainFrames( int pageNum, int lowestZOrder )
}
}
-QPtrList<KWFrame> KWDocument::framesInPage( int pageNum, bool sorted ) const {
+TQPtrList<KWFrame> KWDocument::framesInPage( int pageNum, bool sorted ) const {
ZOrderedFrameList frames;
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit )
{
KWFrameSet *frameSet = fit.current();
if ( !frameSet->isVisible() )
continue;
// Append all frames from frameSet in page pageNum
- QPtrListIterator<KWFrame> it( frameSet->framesInPage( pageNum ) );
+ TQPtrListIterator<KWFrame> it( frameSet->framesInPage( pageNum ) );
for ( ; it.current() ; ++it )
frames.append( it.current() );
}
@@ -4307,10 +4307,10 @@ QPtrList<KWFrame> KWDocument::framesInPage( int pageNum, bool sorted ) const {
void KWDocument::updateAllFrames( int flags )
{
#ifdef DEBUG_SPEED
- QTime dt;
+ TQTime dt;
dt.start();
#endif
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit )
fit.current()->updateFrames( flags );
@@ -4328,20 +4328,20 @@ void KWDocument::updateAllFrames( int flags )
}
// Tell this method when a frame is moved / resized / created / deleted
-// and everything will be update / repainted accordingly
+// and everything will be update / tqrepainted accordingly
void KWDocument::frameChanged( KWFrame * frame )
{
if(! m_framesChangedHandler) {
m_framesChangedHandler = new FramesChangedHandler(this);
- QTimer::singleShot( 0, this, SLOT( updateFramesChanged() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( updateFramesChanged() ) );
}
m_framesChangedHandler->addFrame(frame);
}
-void KWDocument::framesChanged( const QPtrList<KWFrame> & frames, KWView * view )
+void KWDocument::framesChanged( const TQPtrList<KWFrame> & frames, KWView * view )
{
Q_UNUSED( view ); // DF: seems my idea of excluding one view got thrown away
- QPtrListIterator<KWFrame> it( frames );
+ TQPtrListIterator<KWFrame> it( frames );
for ( ; it.current() ; ++it )
frameChanged(it.current());
}
@@ -4353,8 +4353,8 @@ void KWDocument::updateFramesChanged() { // slot called from frameChanged()
m_framesChangedHandler = 0;
}
-void KWDocument::framesChanged( const QValueList<KWFrame*> &frames) {
- QValueListConstIterator<KWFrame*> framesIterator = frames.begin();
+void KWDocument::framesChanged( const TQValueList<KWFrame*> &frames) {
+ TQValueListConstIterator<KWFrame*> framesIterator = frames.begin();
for(;framesIterator != frames.end(); ++framesIterator)
frameChanged(*framesIterator);
}
@@ -4364,9 +4364,9 @@ void KWDocument::setHeaderVisible( bool h )
m_headerVisible = h;
recalcFrames();
updateAllFrames();
- layout();
+ tqlayout();
setModified(true);
- repaintAllViews( true );
+ tqrepaintAllViews( true );
}
void KWDocument::setFooterVisible( bool f )
@@ -4374,9 +4374,9 @@ void KWDocument::setFooterVisible( bool f )
m_footerVisible = f;
recalcFrames();
updateAllFrames();
- layout();
+ tqlayout();
setModified(true);
- repaintAllViews( true );
+ tqrepaintAllViews( true );
}
bool KWDocument::hasEndNotes() const
@@ -4386,7 +4386,7 @@ bool KWDocument::hasEndNotes() const
void KWDocument::updateHeaderButton()
{
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
{
(*it)->updateHeaderFooterButton();
(*it)->updateHeader();
@@ -4395,7 +4395,7 @@ void KWDocument::updateHeaderButton()
void KWDocument::updateFooterButton()
{
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
{
(*it)->updateHeaderFooterButton();
(*it)->updateFooter();
@@ -4412,12 +4412,12 @@ void KWDocument::addPictureRequest( KWPictureFrameSet *fs )
m_pictureRequests.append( fs );
}
-void KWDocument::addAnchorRequest( const QString &framesetName, const KWAnchorPosition &anchorPos )
+void KWDocument::addAnchorRequest( const TQString &framesetName, const KWAnchorPosition &anchorPos )
{
m_anchorRequests.insert( framesetName, anchorPos );
}
-void KWDocument::addFootNoteRequest( const QString &framesetName, KWFootNoteVariable* var )
+void KWDocument::addFootNoteRequest( const TQString &framesetName, KWFootNoteVariable* var )
{
if ( var->noteType() == EndNote )
m_bHasEndNotes = true;
@@ -4431,14 +4431,14 @@ void KWDocument::refreshMenuCustomVariable()
void KWDocument::recalcVariables( int type )
{
- const QValueList<KoVariable *> modifiedVariables = m_varColl->recalcVariables(type);
+ const TQValueList<KoVariable *> modifiedVariables = m_varColl->recalcVariables(type);
if ( m_bGeneratingPreview )
return;
- QMap<KoTextDocument *, bool> modifiedTextDocuments; // Qt4: QSet
- for ( QValueList<KoVariable *>::const_iterator it = modifiedVariables.begin(), end = modifiedVariables.end() ; it != end ; ++it ) {
+ TQMap<KoTextDocument *, bool> modifiedTextDocuments; // TQt4: TQSet
+ for ( TQValueList<KoVariable *>::const_iterator it = modifiedVariables.begin(), end = modifiedVariables.end() ; it != end ; ++it ) {
KoTextDocument* textdoc = (*it)->textDocument();
- if ( modifiedTextDocuments.find( textdoc ) != modifiedTextDocuments.end() ) // Qt4: !contains
+ if ( modifiedTextDocuments.tqfind( textdoc ) != modifiedTextDocuments.end() ) // TQt4: !tqcontains
{
modifiedTextDocuments.insert( textdoc, true );
KWTextFrameSet * textfs = static_cast<KWTextDocument *>(textdoc)->textFrameSet();
@@ -4457,16 +4457,16 @@ void KWDocument::setMailMergeRecord( int r )
slRecordNum = r;
}
-void KWDocument::getPageLayout( KoPageLayout& layout, KoColumns& cl, KoKWHeaderFooter& hf )
+void KWDocument::getPageLayout( KoPageLayout& tqlayout, KoColumns& cl, KoKWHeaderFooter& hf )
{
- layout = m_pageLayout;
+ tqlayout = m_pageLayout;
cl = m_pageColumns;
hf = m_pageHeaderFooter;
}
void KWDocument::addFrameSet( KWFrameSet *f, bool finalize /*= true*/ )
{
- if(m_lstFrameSet.contains(f) > 0) {
+ if(m_lstFrameSet.tqcontains(f) > 0) {
kdWarning(32001) << "Frameset " << f << " " << f->name() << " already in list!" << endl;
return;
}
@@ -4483,7 +4483,7 @@ void KWDocument::addFrameSet( KWFrameSet *f, bool finalize /*= true*/ )
void KWDocument::removeFrameSet( KWFrameSet *f )
{
emit sig_terminateEditing( f );
- m_lstFrameSet.take( m_lstFrameSet.find(f) );
+ m_lstFrameSet.take( m_lstFrameSet.tqfind(f) );
setModified( true );
emit sigFrameSetRemoved(f);
}
@@ -4525,7 +4525,7 @@ void KWDocument::printDebug()
kdDebug() << "Footer visible: " << isFooterVisible() << endl;
kdDebug() << "Units: " << unit() <<endl;
kdDebug() << "# Framesets: " << frameSetCount() <<endl;
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( unsigned int iFrameset = 0; fit.current() ; ++fit, iFrameset++ )
{
KWFrameSet * frameset = fit.current();
@@ -4542,7 +4542,7 @@ void KWDocument::printDebug()
}
/*
kdDebug() << "# Images: " << getImageCollection()->iterator().count() <<endl;
- QDictIterator<KWImage> it( getImageCollection()->iterator() );
+ TQDictIterator<KWImage> it( getImageCollection()->iterator() );
while ( it.current() ) {
kdDebug() << " + " << it.current()->getFilename() << ": "<<it.current()->refCount() <<endl;
++it;
@@ -4560,20 +4560,20 @@ void KWDocument::printDebug()
}
#endif
-void KWDocument::layout()
+void KWDocument::tqlayout()
{
- QPtrListIterator<KWFrameSet> it = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> it = framesetsIterator();
for (; it.current(); ++it )
if ( it.current()->isVisible() )
- it.current()->layout();
+ it.current()->tqlayout();
}
-void KWDocument::invalidate(const KWFrameSet *skipThisFrameSet)
+void KWDocument::tqinvalidate(const KWFrameSet *skipThisFrameSet)
{
- QPtrListIterator<KWFrameSet> it = framesetsIterator();
+ TQPtrListIterator<KWFrameSet> it = framesetsIterator();
for (; it.current(); ++it )
if(it.current()!=skipThisFrameSet)
- it.current()->invalidate();
+ it.current()->tqinvalidate();
}
KFormula::Document* KWDocument::formulaDocument( bool init )
@@ -4586,8 +4586,8 @@ KFormula::Document* KWDocument::formulaDocument( bool init )
if ( formulaDocument != 0 ) {
// re-calculate dpiX and dpiY
formulaDocument->setZoomAndResolution( m_zoom,
- qRound(INCH_TO_POINT( m_resolutionX )),
- qRound(INCH_TO_POINT( m_resolutionY )) );
+ tqRound(INCH_TO_POINT( m_resolutionX )),
+ tqRound(INCH_TO_POINT( m_resolutionY )) );
formulaDocument->newZoomAndResolution(false,false);
}
}
@@ -4599,8 +4599,8 @@ void KWDocument::slotRepaintChanged( KWFrameSet * frameset )
{
// This has to be a loop instead of a signal, so that we can
// send "true" for the last view (see KWFrameSet::drawContents)
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it ) {
- (*it)->getGUI()->canvasWidget()->repaintChanged( frameset, it == m_lstViews.fromLast() );
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it ) {
+ (*it)->getGUI()->canvasWidget()->tqrepaintChanged( frameset, it == m_lstViews.fromLast() );
}
}
@@ -4626,7 +4626,7 @@ void KWDocument::deleteFrame( KWFrame * frame )
{
KWFrameSet * fs = frame->frameSet();
kdDebug(32002) << "KWDocument::deleteFrame frame=" << frame << " fs=" << fs << endl;
- QString cmdName;
+ TQString cmdName;
TypeStructDocItem docItem = (TypeStructDocItem) 0;
switch (fs->type() ) {
case FT_TEXT:
@@ -4669,7 +4669,7 @@ void KWDocument::deleteFrame( KWFrame * frame )
void KWDocument::reorganizeGUI()
{
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
(*it)->getGUI()->reorganize();
}
@@ -4715,16 +4715,16 @@ void KWDocument::refreshDocStructure(FrameSetType type)
emit docStructureChanged(typeItemDocStructure(type));
}
-QBrush KWDocument::resolveBgBrush( const QBrush & brush, QPainter * painter )
+TQBrush KWDocument::resolveBgBrush( const TQBrush & brush, TQPainter * painter )
{
if ( brush.color().isValid() )
return brush;
- QBrush ret( brush );
+ TQBrush ret( brush );
ret.setColor( defaultBgColor( painter ) );
return ret;
}
-QColor KWDocument::resolveBgColor( const QColor & col, QPainter * painter )
+TQColor KWDocument::resolveBgColor( const TQColor & col, TQPainter * painter )
{
if (col.isValid())
return col;
@@ -4732,30 +4732,30 @@ QColor KWDocument::resolveBgColor( const QColor & col, QPainter * painter )
return defaultBgColor( painter );
}
-QColor KWDocument::defaultBgColor( QPainter * painter )
+TQColor KWDocument::defaultBgColor( TQPainter * painter )
{
- if ( painter && painter->device()->devType() == QInternal::Printer )
- return Qt::white;
- return QApplication::palette().color( QPalette::Active, QColorGroup::Base );
+ if ( painter && painter->device()->devType() == TQInternal::Printer )
+ return TQt::white;
+ return TQApplication::palette().color( TQPalette::Active, TQColorGroup::Base );
}
void KWDocument::setTocPresent(bool hasToc)
{
m_hasTOC=hasToc;
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
(*it)->updateTocActionText(hasToc);
}
void KWDocument::refreshMenuExpression()
{
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
(*it)->refreshMenuExpression();
}
void KWDocument::updateZoomRuler()
{
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it ) {
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it ) {
(*it)->getGUI()->getHorzRuler()->setZoom( zoomedResolutionX() );
(*it)->getGUI()->getVertRuler()->setZoom( zoomedResolutionY() );
(*it)->slotUpdateRuler();
@@ -4764,7 +4764,7 @@ void KWDocument::updateZoomRuler()
void KWDocument::updateRulerFrameStartEnd()
{
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
(*it)->slotUpdateRuler();
}
@@ -4781,14 +4781,14 @@ void KWDocument::setUndoRedoLimit(int val)
void KWDocument::setGridX(double gridx) {
m_gridX = gridx;
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
(*it)->getGUI()->getHorzRuler()->setGridSize(gridx);
}
-QValueList<KoTextObject *> KWDocument::visibleTextObjects(KWViewMode *viewmode) const
+TQValueList<KoTextObject *> KWDocument::visibleTextObjects(KWViewMode *viewmode) const
{
- QValueList<KoTextObject *> lst;
- QPtrList<KWTextFrameSet> textFramesets = allTextFramesets( true );
+ TQValueList<KoTextObject *> lst;
+ TQPtrList<KWTextFrameSet> textFramesets = allTextFramesets( true );
KWTextFrameSet *frm;
for ( frm=textFramesets.first(); frm != 0; frm=textFramesets.next() ) {
@@ -4803,14 +4803,14 @@ QValueList<KoTextObject *> KWDocument::visibleTextObjects(KWViewMode *viewmode)
void KWDocument::refreshGUIButton()
{
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
(*it)->initGUIButton();
}
void KWDocument::enableBackgroundSpellCheck( bool b )
{
m_bgSpellCheck->setEnabled(b);
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
(*it)->updateBgSpellCheckingState();
}
@@ -4821,13 +4821,13 @@ bool KWDocument::backgroundSpellCheckEnabled() const
void KWDocument::reactivateBgSpellChecking()
{
- QPtrList<KWTextFrameSet> textFramesets = allTextFramesets( true );
+ TQPtrList<KWTextFrameSet> textFramesets = allTextFramesets( true );
KWTextFrameSet *frm;
for ( frm=textFramesets.first(); frm != 0; frm=textFramesets.next() ){
frm->textObject()->setNeedSpellCheck(true);
}
- repaintAllViews();
+ tqrepaintAllViews();
startBackgroundSpellCheck();
}
@@ -4835,7 +4835,7 @@ void KWDocument::slotChapterParagraphFormatted( KoTextParag* /*parag*/ )
{
// Attempt at invalidating from the parag's page only
// But that's not good enough - if a header gets moved down,
- // we also need to invalidate the previous page, from where the paragraph disappeared.
+ // we also need to tqinvalidate the previous page, from where the paragraph disappeared.
/*
KoPoint p;
KWFrame* frame = internalToDocument( parag->rect().topLeft(), p );
@@ -4852,12 +4852,12 @@ void KWDocument::slotChapterParagraphFormatted( KoTextParag* /*parag*/ )
// (or if it keeps existing info then it can't update properly)
}
-QString KWDocument::checkSectionTitleInParag( KoTextParag* parag, KWTextFrameSet* frameset, int pageNum ) const
+TQString KWDocument::checkSectionTitleInParag( KoTextParag* parag, KWTextFrameSet* frameset, int pageNum ) const
{
if ( parag->counter() && parag->counter()->numbering() == KoParagCounter::NUM_CHAPTER
&& parag->counter()->depth() == 0 )
{
- QString txt = parag->string()->toString();
+ TQString txt = parag->string()->toString();
txt = txt.left( txt.length() - 1 ); // remove trailing space
#ifndef NDEBUG // not needed, just checking
KoPoint p;
@@ -4876,10 +4876,10 @@ QString KWDocument::checkSectionTitleInParag( KoTextParag* parag, KWTextFrameSet
const_cast<KWDocument*>(this)->m_sectionTitles[ pageNum ] = txt;
return txt;
}
- return QString::null;
+ return TQString();
}
-QString KWDocument::sectionTitle( int pageNum ) const
+TQString KWDocument::sectionTitle( int pageNum ) const
{
//kdDebug(32001) << "KWDocument::sectionTitle(pageNum=" << pageNum << ") m_sectionTitles.size()=" << m_sectionTitles.size() << endl;
// First look in the cache. If info is present, it's uptodate (see slotChapterParagraphFormatted)
@@ -4888,7 +4888,7 @@ QString KWDocument::sectionTitle( int pageNum ) const
// Look whether this page has a section title, and if not, go back pages, one by one
for ( int i = pageNum; i >= 0 ; --i )
{
- const QString& s = m_sectionTitles[i];
+ const TQString& s = m_sectionTitles[i];
if ( !s.isEmpty() )
{
// Update cache, to make this faster next time
@@ -4903,15 +4903,15 @@ QString KWDocument::sectionTitle( int pageNum ) const
// If not in the cache, determine from the paragraphs in the page.
if ( m_lstFrameSet.isEmpty() )
- return QString::null;
+ return TQString();
// We use the "main" frameset to determine section titles.
KWTextFrameSet *frameset = dynamic_cast<KWTextFrameSet *>( m_lstFrameSet.getFirst() );
if ( !frameset )
- return QString::null;
+ return TQString();
int topLUpix, bottomLUpix;
if ( !frameset->minMaxInternalOnPage( pageNum, topLUpix, bottomLUpix ) )
- return QString::null;
+ return TQString();
KoTextParag* parag = frameset->textDocument()->firstParag();
//kdDebug(32001) << "KWDocument::sectionTitle " << pageNum
@@ -4927,7 +4927,7 @@ QString KWDocument::sectionTitle( int pageNum ) const
}
if ( parag->rect().top() > bottomLUpix ) // done
break;
- QString txt = checkSectionTitleInParag( parag, frameset, pageNum );
+ TQString txt = checkSectionTitleInParag( parag, frameset, pageNum );
if ( !txt.isEmpty() )
return txt;
}
@@ -4937,27 +4937,27 @@ QString KWDocument::sectionTitle( int pageNum ) const
parag = lastParagOfPageAbove;
for ( ; parag ; parag = parag->prev() )
{
- QString txt = checkSectionTitleInParag( parag, frameset, pageNum );
+ TQString txt = checkSectionTitleInParag( parag, frameset, pageNum );
if ( !txt.isEmpty() )
return txt;
}
// First page, no heading found
- return QString::null;
+ return TQString();
}
-void KWDocument::setSpellCheckIgnoreList( const QStringList& lst )
+void KWDocument::setSpellCheckIgnoreList( const TQStringList& lst )
{
m_spellCheckIgnoreList = lst;
m_bgSpellCheck->settings()->setCurrentIgnoreList( m_spellCheckIgnoreList + m_spellCheckPersonalDict );
setModified( true );
}
-void KWDocument::addSpellCheckIgnoreWord( const QString & word )
+void KWDocument::addSpellCheckIgnoreWord( const TQString & word )
{
// ### missing: undo/redo support
- if( m_spellCheckIgnoreList.findIndex( word ) == -1 )
+ if( m_spellCheckIgnoreList.tqfindIndex( word ) == -1 )
m_spellCheckIgnoreList.append( word );
setSpellCheckIgnoreList( m_spellCheckIgnoreList );
if ( backgroundSpellCheckEnabled() )
@@ -4969,8 +4969,8 @@ int KWDocument::maxZOrder( int pageNum) const
{
bool first = true;
int maxZOrder = 0; //this value is only used if there's no frame on the page
- QPtrList<KWFrame> frames = framesInPage( pageNum );
- QPtrListIterator<KWFrame> frameIt( frames );
+ TQPtrList<KWFrame> frames = framesInPage( pageNum );
+ TQPtrListIterator<KWFrame> frameIt( frames );
for ( ; frameIt.current(); ++frameIt ) {
if ( first || frameIt.current()->zOrder() > maxZOrder ) {
maxZOrder = frameIt.current()->zOrder();
@@ -4980,10 +4980,10 @@ int KWDocument::maxZOrder( int pageNum) const
return maxZOrder;
}
-QPtrList<KWTextFrameSet> KWDocument::allTextFramesets(bool onlyReadWrite) const
+TQPtrList<KWTextFrameSet> KWDocument::allTextFramesets(bool onlyReadWrite) const
{
- QPtrList<KWTextFrameSet> textFramesets;
- QPtrListIterator<KWFrameSet> fit = framesetsIterator();
+ TQPtrList<KWTextFrameSet> textFramesets;
+ TQPtrListIterator<KWFrameSet> fit = framesetsIterator();
for ( ; fit.current() ; ++fit ) {
if(fit.current()->isDeleted()) continue;
fit.current()->addTextFrameSets(textFramesets, onlyReadWrite);
@@ -4991,11 +4991,11 @@ QPtrList<KWTextFrameSet> KWDocument::allTextFramesets(bool onlyReadWrite) const
return textFramesets;
}
-QValueList<KoTextDocument *> KWDocument::allTextDocuments() const
+TQValueList<KoTextDocument *> KWDocument::allTextDocuments() const
{
- QValueList<KoTextDocument *> lst;
- const QPtrList<KWTextFrameSet> textFramesets = allTextFramesets(false);
- QPtrListIterator<KWTextFrameSet> fit( textFramesets );
+ TQValueList<KoTextDocument *> lst;
+ const TQPtrList<KWTextFrameSet> textFramesets = allTextFramesets(false);
+ TQPtrListIterator<KWTextFrameSet> fit( textFramesets );
for ( ; fit.current() ; ++fit ) {
lst.append( fit.current()->textObject()->textDocument() );
}
@@ -5004,8 +5004,8 @@ QValueList<KoTextDocument *> KWDocument::allTextDocuments() const
int KWDocument::numberOfTextFrameSet( KWFrameSet* fs, bool onlyReadWrite )
{
- QPtrList<KWTextFrameSet> textFramesets = allTextFramesets( onlyReadWrite );
- return textFramesets.findRef( static_cast<KWTextFrameSet*>(fs) );
+ TQPtrList<KWTextFrameSet> textFramesets = allTextFramesets( onlyReadWrite );
+ return textFramesets.tqfindRef( static_cast<KWTextFrameSet*>(fs) );
}
KWFrameSet * KWDocument::textFrameSetFromIndex( unsigned int num, bool onlyReadWrite )
@@ -5015,14 +5015,14 @@ KWFrameSet * KWDocument::textFrameSetFromIndex( unsigned int num, bool onlyReadW
void KWDocument::updateTextFrameSetEdit()
{
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
(*it)->slotFrameSetEditChanged();
}
void KWDocument::displayFootNoteFieldCode()
{
- QPtrListIterator<KoVariable> it( m_varColl->getVariables() );
+ TQPtrListIterator<KoVariable> it( m_varColl->getVariables() );
for ( ; it.current() ; ++it )
{
if ( it.current()->type() == VT_FOOTNOTE )
@@ -5033,7 +5033,7 @@ void KWDocument::displayFootNoteFieldCode()
KoTextParag * parag = it.current()->paragraph();
if ( parag )
{
- parag->invalidate( 0 );
+ parag->tqinvalidate( 0 );
parag->setChanged( true );
}
}
@@ -5042,8 +5042,8 @@ void KWDocument::displayFootNoteFieldCode()
void KWDocument::changeFootNoteConfig()
{
- QMap<KoTextDocument *, bool> modifiedTextDocuments; // Qt4: QSet
- QPtrListIterator<KoVariable> it( m_varColl->getVariables() );
+ TQMap<KoTextDocument *, bool> modifiedTextDocuments; // TQt4: TQSet
+ TQPtrListIterator<KoVariable> it( m_varColl->getVariables() );
for ( ; it.current() ; ++it )
{
if ( it.current()->type() == VT_FOOTNOTE )
@@ -5058,15 +5058,15 @@ void KWDocument::changeFootNoteConfig()
KoTextParag * parag = footNoteVar->paragraph();
if ( parag )
{
- parag->invalidate( 0 );
+ parag->tqinvalidate( 0 );
parag->setChanged( true );
}
KoTextDocument* textdoc = parag->textDocument();
- if ( modifiedTextDocuments.find( textdoc ) != modifiedTextDocuments.end() ) // Qt4: !contains
+ if ( modifiedTextDocuments.tqfind( textdoc ) != modifiedTextDocuments.end() ) // TQt4: !tqcontains
modifiedTextDocuments.insert( textdoc, true );
}
}
- for( QMap<KoTextDocument *,bool>::const_iterator it = modifiedTextDocuments.begin();
+ for( TQMap<KoTextDocument *,bool>::const_iterator it = modifiedTextDocuments.begin();
it != modifiedTextDocuments.end(); ++it ) {
KoTextDocument* textdoc = it.key();
KWTextFrameSet * textfs = static_cast<KWTextDocument *>(textdoc)->textFrameSet();
@@ -5078,14 +5078,14 @@ void KWDocument::changeFootNoteConfig()
void KWDocument::setTabStopValue ( double tabStop )
{
m_tabStop = tabStop;
- QPtrList<KWTextFrameSet> textFramesets = allTextFramesets( true );
+ TQPtrList<KWTextFrameSet> textFramesets = allTextFramesets( true );
KWTextFrameSet *frm;
for ( frm=textFramesets.first(); frm != 0; frm=textFramesets.next() ){
frm->textDocument()->setTabStops( ptToLayoutUnitPixX( tabStop ));
- frm->layout();
+ frm->tqlayout();
}
- repaintAllViews();
+ tqrepaintAllViews();
}
void KWDocument::setGlobalHyphenation( bool hyphen )
@@ -5099,11 +5099,11 @@ void KWDocument::setViewFrameBorders( bool b )
{
m_viewFrameBorders = b;
m_layoutViewMode->setDrawFrameBorders( b );
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
(*it)->getGUI()->canvasWidget()->viewMode()->setDrawFrameBorders( b );
}
-void KWDocument::switchViewMode( const QString& newViewModeType )
+void KWDocument::switchViewMode( const TQString& newViewModeType )
{
// Don't compare m_viewModeType and newViewMode here, it would break
// changing the number of pages per row for the preview mode, in kwconfig.
@@ -5113,21 +5113,21 @@ void KWDocument::switchViewMode( const QString& newViewModeType )
//necessary to switchmode view in all canvas in first.
//otherwise with more than one view kword crashes !
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
(*it)->getGUI()->canvasWidget()->switchViewMode( m_viewModeType );
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
(*it)->switchModeView();
emit newContentsSize();
- // Since the text layout depends on the view mode, we need to redo it
+ // Since the text tqlayout depends on the view mode, we need to redo it
// But after telling the canvas about the new viewmode, otherwise stuff like
// slotNewContentsSize will crash.
updateAllFrames();
- layout();
+ tqlayout();
- repaintAllViews( true );
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ tqrepaintAllViews( true );
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
(*it)->getGUI()->canvasWidget()->ensureCursorVisible();
}
@@ -5140,9 +5140,9 @@ void KWDocument::changeBgSpellCheckingState( bool b )
config->writeEntry( "SpellCheck", (int)b );
}
-QString KWDocument::initialFrameSet() const
+TQString KWDocument::initialFrameSet() const
{
- return m_initialEditing ? m_initialEditing->m_initialFrameSet : QString::null;
+ return m_initialEditing ? m_initialEditing->m_initialFrameSet : TQString();
}
int KWDocument::initialCursorParag() const
@@ -5177,30 +5177,30 @@ void KWDocument::testAndCloseAllFrameSetProtectedContent()
{
if ( !m_cursorInProtectectedArea )
{
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
(*it)->testAndCloseAllFrameSetProtectedContent();
}
}
void KWDocument::updateRulerInProtectContentMode()
{
- for( QValueList<KWView *>::const_iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ for( TQValueList<KWView *>::const_iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
(*it)->updateRulerInProtectContentMode();
}
-void KWDocument::insertBookmark( const QString &name, KoTextParag *startparag, KoTextParag *endparag, int start, int end )
+void KWDocument::insertBookmark( const TQString &name, KoTextParag *startparag, KoTextParag *endparag, int start, int end )
{
m_bookmarkList->append( KoTextBookmark( name, startparag, endparag, start, end ) );
}
-void KWDocument::deleteBookmark( const QString &name )
+void KWDocument::deleteBookmark( const TQString &name )
{
if ( m_bookmarkList->removeByName( name ) )
setModified(true);
}
-void KWDocument::renameBookmark( const QString &oldName, const QString &newName )
+void KWDocument::renameBookmark( const TQString &oldName, const TQString &newName )
{
if ( oldName == newName )
return;
@@ -5213,7 +5213,7 @@ void KWDocument::renameBookmark( const QString &oldName, const QString &newName
}
}
-const KoTextBookmark * KWDocument::bookmarkByName( const QString & name ) const
+const KoTextBookmark * KWDocument::bookmarkByName( const TQString & name ) const
{
KoTextBookmarkList::const_iterator it = m_bookmarkList->findByName( name );
if ( it != m_bookmarkList->end() )
@@ -5221,9 +5221,9 @@ const KoTextBookmark * KWDocument::bookmarkByName( const QString & name ) const
return 0;
}
-QStringList KWDocument::listOfBookmarkName( KWViewMode * viewMode ) const
+TQStringList KWDocument::listOfBookmarkName( KWViewMode * viewMode ) const
{
- QStringList list;
+ TQStringList list;
KoTextBookmarkList::const_iterator it = m_bookmarkList->begin();
const KoTextBookmarkList::const_iterator end = m_bookmarkList->end();
for ( ; it != end ; ++it )
@@ -5277,7 +5277,7 @@ void KWDocument::initBookmarkList()
for( ; it != end; ++it )
{
KWFrameSet * fs = 0L;
- QString fsName = (*it).frameSetName;
+ TQString fsName = (*it).frameSetName;
if ( !fsName.isEmpty() )
fs = frameSetByName( fsName );
if ( fs )
@@ -5299,17 +5299,17 @@ void KWDocument::initBookmarkList()
}
}
-QPixmap* KWDocument::doubleBufferPixmap( const QSize& s )
+TQPixmap* KWDocument::doubleBufferPixmap( const TQSize& s )
{
if ( !m_bufPixmap ) {
- int w = QABS( s.width() );
- int h = QABS( s.height() );
- m_bufPixmap = new QPixmap( w, h );
+ int w = TQABS( s.width() );
+ int h = TQABS( s.height() );
+ m_bufPixmap = new TQPixmap( w, h );
} else {
if ( m_bufPixmap->width() < s.width() ||
m_bufPixmap->height() < s.height() ) {
- m_bufPixmap->resize( QMAX( s.width(), m_bufPixmap->width() ),
- QMAX( s.height(), m_bufPixmap->height() ) );
+ m_bufPixmap->resize( TQMAX( s.width(), m_bufPixmap->width() ),
+ TQMAX( s.height(), m_bufPixmap->height() ) );
}
}
@@ -5325,7 +5325,7 @@ void KWDocument::maybeDeleteDoubleBufferPixmap()
}
}
-void KWDocument::setPersonalExpressionPath( const QStringList & lst)
+void KWDocument::setPersonalExpressionPath( const TQStringList & lst)
{
m_personalExpressionPath = lst;
refreshMenuExpression();
@@ -5333,7 +5333,7 @@ void KWDocument::setPersonalExpressionPath( const QStringList & lst)
void KWDocument::updateDirectCursorButton()
{
- for( QValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
+ for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it )
(*it)->updateDirectCursorButton();
}
@@ -5353,9 +5353,9 @@ void KWDocument::saveDialogShown()
// Grab first 50 chars from the main frameset's document
// ### This is a somewhat slow method, if the document is huge - better iterate
// over the first few parags until 50 chars have been collected.
- QString first_row = textFrameSet(0)->textDocument()->plainText().left(50);
+ TQString first_row = textFrameSet(0)->textDocument()->plainText().left(50);
bool truncate = false;
- QChar ch;
+ TQChar ch;
for (int i=0; i < (int)first_row.length(); i++)
{
ch = first_row.at(i);
@@ -5378,11 +5378,11 @@ void KWDocument::saveDialogShown()
setURL(first_row);
}
-void KWDocument::addWordToDictionary( const QString& word )
+void KWDocument::addWordToDictionary( const TQString& word )
{
if ( m_bgSpellCheck )
{
- if( m_spellCheckPersonalDict.findIndex( word ) == -1 )
+ if( m_spellCheckPersonalDict.tqfindIndex( word ) == -1 )
m_spellCheckPersonalDict.append( word );
m_bgSpellCheck->settings()->setCurrentIgnoreList( m_spellCheckIgnoreList + m_spellCheckPersonalDict );
if ( backgroundSpellCheckEnabled() )
@@ -5395,14 +5395,14 @@ void KWDocument::setEmpty()
{
KoDocument::setEmpty();
// Whether loaded from template or from empty doc: this is a new one -> set creation date
- m_varColl->variableSetting()->setCreationDate(QDateTime::currentDateTime());
+ m_varColl->variableSetting()->setCreationDate(TQDateTime::tqcurrentDateTime());
recalcVariables( VT_DATE ); // , VST_CREATION_DATE ...
// If we then load a document, it will override that date.
}
void KWDocument::updateGridButton()
{
- QPtrListIterator<KoView> it( views() );
+ TQPtrListIterator<KoView> it( views() );
for (; it.current(); ++it )
((KWView*)it.current())->updateGridButton();
@@ -5431,28 +5431,28 @@ int KWDocument::lastPage() const {
return pageManager()->lastPageNumber();
}
-QWidget* KWDocument::createCustomDocumentWidget(QWidget *parent) {
+TQWidget* KWDocument::createCustomDocumentWidget(TQWidget *tqparent) {
KoColumns columns;
columns.columns = 1;
columns.ptColumnSpacing = m_defaultColumnSpacing;
- return new KWStartupWidget(parent, this, columns);
+ return new KWStartupWidget(tqparent, this, columns);
}
-KWDocument::FramesChangedHandler::FramesChangedHandler(KWDocument *parent) {
- m_parent = parent;
+KWDocument::FramesChangedHandler::FramesChangedHandler(KWDocument *tqparent) {
+ m_parent = tqparent;
m_needLayout = false;
}
void KWDocument::FramesChangedHandler::addFrame(KWFrame *frame) {
if(frame == 0) return;
- if(m_frameSets.contains(frame->frameSet())) return;
+ if(m_frameSets.tqcontains(frame->frameSet())) return;
m_frameSets.append(frame->frameSet());
if( frame->runAround() != KWFrame::RA_NO )
m_needLayout = true;
}
void KWDocument::FramesChangedHandler::addFrameSet(KWFrameSet *fs) {
- if(m_frameSets.contains(fs)) return;
+ if(m_frameSets.tqcontains(fs)) return;
m_frameSets.append(fs);
m_needLayout = true;
}
@@ -5461,22 +5461,22 @@ void KWDocument::FramesChangedHandler::execute() {
if(m_frameSets.count() == 0)
m_parent->updateAllFrames();
else {
- QValueListIterator<KWFrameSet*> iter = m_frameSets.begin();
+ TQValueListIterator<KWFrameSet*> iter = m_frameSets.begin();
for(;iter != m_frameSets.end(); ++iter) {
KWFrameSet *fs = *iter;
fs->updateFrames();
if(!m_needLayout)
- fs->layout();
+ fs->tqlayout();
}
KWFrameList::recalcAllFrames(m_parent);
}
- // If frame with text flowing around it -> re-layout all frames
+ // If frame with text flowing around it -> re-tqlayout all frames
if ( m_needLayout)
- m_parent->layout();
- //m_parent->repaintAllViewsExcept( 0 );
- m_parent->repaintAllViews();
+ m_parent->tqlayout();
+ //m_parent->tqrepaintAllViewsExcept( 0 );
+ m_parent->tqrepaintAllViews();
m_parent->updateRulerFrameStartEnd();
}