summaryrefslogtreecommitdiffstats
path: root/kspread/kspread_doc.cc
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 /kspread/kspread_doc.cc
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 'kspread/kspread_doc.cc')
-rw-r--r--kspread/kspread_doc.cc454
1 files changed, 227 insertions, 227 deletions
diff --git a/kspread/kspread_doc.cc b/kspread/kspread_doc.cc
index 2164a28b..825808b8 100644
--- a/kspread/kspread_doc.cc
+++ b/kspread/kspread_doc.cc
@@ -33,10 +33,10 @@
#include <dirent.h>
#include <pwd.h>
-#include <qapplication.h>
-#include <qfileinfo.h>
-#include <qfont.h>
-#include <qpair.h>
+#include <tqapplication.h>
+#include <tqfileinfo.h>
+#include <tqfont.h>
+#include <tqpair.h>
#include <kstandarddirs.h>
#include <kdebug.h>
@@ -104,14 +104,14 @@ public:
Sheet *activeSheet;
KSPLoadingInfo *m_loadingInfo;
- static QValueList<Doc*> s_docs;
+ static TQValueList<Doc*> s_docs;
static int s_docId;
DCOPObject* dcop;
// URL of the this part. This variable is only set if the load() function
// had been called with an URL as argument.
- QString fileURL;
+ TQString fileURL;
// for undo/redo
int undoLocked;
@@ -121,16 +121,16 @@ public:
// This flag is used to avoid updates etc. during loading.
bool isLoading;
- QColor pageBorderColor;
+ TQColor pageBorderColor;
- QPtrList<Plugin> plugins;
+ TQPtrList<Plugin> plugins;
- QValueList<Reference> refs;
+ TQValueList<Reference> refs;
KCompletion listCompletion;
int numOperations;
- QValueList<Damage*> damages;
+ TQValueList<Damage*> damages;
// document properties
int syntaxVersion;
@@ -138,7 +138,7 @@ public:
bool horizontalScrollBar:1;
bool columnHeader:1;
bool rowHeader:1;
- QColor gridColor;
+ TQColor gridColor;
double indentValue;
bool showStatusBar:1;
bool showTabBar:1;
@@ -152,11 +152,11 @@ public:
bool dontCheckUpperWord:1;
bool dontCheckTitleCase:1;
bool configLoadFromFile:1;
- QStringList spellListIgnoreAll;
+ TQStringList spellListIgnoreAll;
/// list of all objects
- QPtrList<EmbeddedObject> m_embeddedObjects;
+ TQPtrList<EmbeddedObject> m_embeddedObjects;
KoPictureCollection m_pictureCollection;
- QValueList<KoPictureKey> usedPictures;
+ TQValueList<KoPictureKey> usedPictures;
bool m_savingWholeDocument;
};
@@ -166,11 +166,11 @@ public:
*
*****************************************************************************/
-QValueList<Doc*> Doc::Private::s_docs;
+TQValueList<Doc*> Doc::Private::s_docs;
int Doc::Private::s_docId = 0;
-Doc::Doc( QWidget *parentWidget, const char *widgetName, QObject* parent, const char* name, bool singleViewMode )
- : KoDocument( parentWidget, widgetName, parent, name, singleViewMode )
+Doc::Doc( TQWidget *tqparentWidget, const char *widgetName, TQObject* tqparent, const char* name, bool singleViewMode )
+ : KoDocument( tqparentWidget, widgetName, tqparent, name, singleViewMode )
{
d = new Private;
d->m_loadingInfo = 0L;
@@ -187,10 +187,10 @@ Doc::Doc( QWidget *parentWidget, const char *widgetName, QObject* parent, const
d->activeSheet = 0;
- d->pageBorderColor = Qt::red;
+ d->pageBorderColor = TQt::red;
d->configLoadFromFile = false;
- QFont f( KoGlobal::defaultFont() );
+ TQFont f( KoGlobal::defaultFont() );
Format::setGlobalRowHeight( f.pointSizeFloat() + 3 );
Format::setGlobalColWidth( ( f.pointSizeFloat() + 3 ) * 5 );
@@ -205,20 +205,20 @@ Doc::Doc( QWidget *parentWidget, const char *widgetName, QObject* parent, const
d->dcop = 0;
d->isLoading = false;
- d->numOperations = 1; // don't start repainting before the GUI is done...
+ d->numOperations = 1; // don't start tqrepainting before the GUI is done...
d->undoLocked = 0;
d->commandHistory = new KoCommandHistory( actionCollection() );
- connect( d->commandHistory, SIGNAL( commandExecuted() ), SLOT( commandExecuted() ) );
- connect( d->commandHistory, SIGNAL( documentRestored() ), SLOT( documentRestored() ) );
+ connect( d->commandHistory, TQT_SIGNAL( commandExecuted() ), TQT_SLOT( commandExecuted() ) );
+ connect( d->commandHistory, TQT_SIGNAL( documentRestored() ), TQT_SLOT( documentRestored() ) );
// Make us scripsheet if the document has a name
// Set a name if there is no name specified
if ( !name )
{
- QString tmp( "Document%1" );
- tmp = tmp.arg( d->s_docId++ );
+ TQString tmp( "Document%1" );
+ tmp = tmp.tqarg( d->s_docId++ );
setName( tmp.local8Bit());//tmp.latin1() );
dcopObject();
}
@@ -231,14 +231,14 @@ Doc::Doc( QWidget *parentWidget, const char *widgetName, QObject* parent, const
d->horizontalScrollBar = true;
d->columnHeader = true;
d->rowHeader = true;
- d->gridColor = Qt::lightGray;
+ d->gridColor = TQt::lightGray;
d->indentValue = 10.0;
d->showStatusBar = true;
d->showFormulaBar = true;
d->showTabBar = true;
d->showError = false;
d->calcMethod = SumOfNumber;
- d->moveTo = Bottom;
+ d->moveTo = KSpread::Bottom;
d->completionMode = KGlobalSettings::CompletionAuto;
d->spellConfig = 0;
d->dontCheckUpperWord = false;
@@ -271,16 +271,16 @@ Doc::~Doc()
delete d;
}
-QValueList<Doc*> Doc::documents()
+TQValueList<Doc*> Doc::documents()
{
return Private::s_docs;
}
-bool Doc::initDoc(InitDocFlags flags, QWidget* parentWidget)
+bool Doc::initDoc(InitDocFlags flags, TQWidget* tqparentWidget)
{
// ElapsedTime et( " initDoc " );
- QString f;
+ TQString f;
if (flags==KoDocument::InitDocEmpty)
{
@@ -311,7 +311,7 @@ bool Doc::initDoc(InitDocFlags flags, QWidget* parentWidget)
dlgtype = KoTemplateChooseDia::OnlyTemplates;
ret = KoTemplateChooseDia::choose( Factory::global(), f,
- dlgtype, "kspread_template", parentWidget );
+ dlgtype, "kspread_template", tqparentWidget );
if ( ret == KoTemplateChooseDia::File )
{
@@ -366,7 +366,7 @@ bool Doc::initDoc(InitDocFlags flags, QWidget* parentWidget)
return false;
}
-void Doc::openTemplate (const QString& file)
+void Doc::openTemplate (const TQString& file)
{
d->m_loadingInfo = new KSPLoadingInfo;
d->m_loadingInfo->setLoadTemplate( true );
@@ -485,17 +485,17 @@ void Doc::doNotPaint(bool status)
}
-QColor Doc::pageBorderColor() const
+TQColor Doc::pageBorderColor() const
{
return d->pageBorderColor;
}
-void Doc::changePageBorderColor( const QColor & _color)
+void Doc::changePageBorderColor( const TQColor & _color)
{
d->pageBorderColor = _color;
}
-const QValueList<Reference> &Doc::listArea()
+const TQValueList<Reference> &Doc::listArea()
{
return d->refs;
}
@@ -505,11 +505,11 @@ KCompletion& Doc::completion()
return d->listCompletion;
}
-KoView* Doc::createViewInstance( QWidget* parent, const char* name )
+KoView* Doc::createViewInstance( TQWidget* tqparent, const char* name )
{
if ( name == 0 )
name = "View";
- return new View( parent, name, this );
+ return new View( tqparent, name, this );
}
bool Doc::saveChildren( KoStore* _store )
@@ -530,10 +530,10 @@ bool Doc::completeSaving( KoStore* _store )
}
-QDomDocument Doc::saveXML()
+TQDomDocument Doc::saveXML()
{
//Terminate current cell edition, if any
- QPtrListIterator<KoView> it( views() );
+ TQPtrListIterator<KoView> it( views() );
/* don't pull focus away from the editor if this is just a background
autosave */
@@ -543,28 +543,28 @@ QDomDocument Doc::saveXML()
static_cast<View *>( it.current() )->deleteEditor( true );
}
- QDomDocument doc = createDomDocument( "spreadsheet", CURRENT_DTD_VERSION );
- QDomElement spread = doc.documentElement();
+ TQDomDocument doc = createDomDocument( "spreadsheet", CURRENT_DTD_VERSION );
+ TQDomElement spread = doc.documentElement();
spread.setAttribute( "editor", "KSpread" );
spread.setAttribute( "mime", "application/x-kspread" );
spread.setAttribute( "syntaxVersion", CURRENT_SYNTAX_VERSION );
- QDomElement dlocale = ((Locale *)locale())->save( doc );
+ TQDomElement dlocale = ((Locale *)locale())->save( doc );
spread.appendChild( dlocale );
if (d->refs.count() != 0 )
{
- QDomElement areaname = saveAreaName( doc );
+ TQDomElement areaname = saveAreaName( doc );
spread.appendChild( areaname );
}
if( !d->spellListIgnoreAll.isEmpty() )
{
- QDomElement spellCheckIgnore = doc.createElement( "SPELLCHECKIGNORELIST" );
+ TQDomElement spellCheckIgnore = doc.createElement( "SPELLCHECKIGNORELIST" );
spread.appendChild( spellCheckIgnore );
- for ( QStringList::Iterator it = d->spellListIgnoreAll.begin(); it != d->spellListIgnoreAll.end(); ++it )
+ for ( TQStringList::Iterator it = d->spellListIgnoreAll.begin(); it != d->spellListIgnoreAll.end(); ++it )
{
- QDomElement spellElem = doc.createElement( "SPELLCHECKIGNOREWORD" );
+ TQDomElement spellElem = doc.createElement( "SPELLCHECKIGNOREWORD" );
spellCheckIgnore.appendChild( spellElem );
spellElem.setAttribute( "word", *it );
}
@@ -579,7 +579,7 @@ QDomDocument Doc::saveXML()
++iter;
}
- QDomElement defaults = doc.createElement( "defaults" );
+ TQDomElement defaults = doc.createElement( "defaults" );
defaults.setAttribute( "row-height", Format::globalRowHeight() );
defaults.setAttribute( "col-width", Format::globalColWidth() );
spread.appendChild( defaults );
@@ -587,14 +587,14 @@ QDomDocument Doc::saveXML()
Plugin * plugin = d->plugins.first();
for ( ; plugin != 0; plugin = d->plugins.next() )
{
- QDomElement data( plugin->saveXML( doc ) );
+ TQDomElement data( plugin->saveXML( doc ) );
if ( !data.isNull() )
spread.appendChild( data );
}
- QDomElement s = styleManager()->save( doc );
+ TQDomElement s = styleManager()->save( doc );
spread.appendChild( s );
- QDomElement e = map()->save( doc );
+ TQDomElement e = map()->save( doc );
spread.appendChild( e );
setModified( false );
@@ -617,11 +617,11 @@ bool Doc::saveOasis( KoStore* store, KoXmlWriter* manifestWriter )
}
bool Doc::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, SaveFlag saveFlag,
- QString* /*plainText*/, KoPicture* /*picture*/ )
+ TQString* /*plainText*/, KoPicture* /*picture*/ )
{
d->m_pictureCollection.assignUniqueIds();
//Terminate current cell edition, if any
- QPtrListIterator<KoView> it2( views() );
+ TQPtrListIterator<KoView> it2( views() );
d->m_savingWholeDocument = saveFlag == SaveAll ? true : false;
/* don't pull focus away from the editor if this is just a background
@@ -647,8 +647,8 @@ bool Doc::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, SaveFlag
}
contentTmpFile.setAutoDelete( true );
- QFile* tmpFile = contentTmpFile.file();
- KoXmlWriter contentTmpWriter( tmpFile, 1 );
+ TQFile* tmpFile = contentTmpFile.file();
+ KoXmlWriter contentTmpWriter( TQT_TQIODEVICE(tmpFile), 1 );
@@ -684,8 +684,8 @@ bool Doc::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, SaveFlag
// Done with writing out the contents to the tempfile, we can now write out the automatic styles
contentWriter->startElement( "office:automatic-styles" );
- QValueList<KoGenStyles::NamedStyle> styles = mainStyles.styles( KoGenStyle::STYLE_AUTO );
- QValueList<KoGenStyles::NamedStyle>::const_iterator it = styles.begin();
+ TQValueList<KoGenStyles::NamedStyle> styles = mainStyles.styles( KoGenStyle::STYLE_AUTO );
+ TQValueList<KoGenStyles::NamedStyle>::const_iterator it = styles.begin();
for ( ; it != styles.end() ; ++it ) {
(*it).style->writeStyle( contentWriter, mainStyles, "style:style", (*it).name, "style:paragraph-properties" );
}
@@ -765,7 +765,7 @@ bool Doc::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, SaveFlag
// And now we can copy over the contents from the tempfile to the real one
tmpFile->close();
- contentWriter->addCompleteElement( tmpFile );
+ contentWriter->addCompleteElement( TQT_TQIODEVICE(tmpFile) );
contentTmpFile.close();
@@ -821,7 +821,7 @@ bool Doc::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, SaveFlag
if ( saveFlag == SaveSelected )
{
- QPtrListIterator<EmbeddedObject> it(embeddedObjects() );
+ TQPtrListIterator<EmbeddedObject> it(embeddedObjects() );
for( ; it.current(); ++it )
{
if ( it.current()->getType() != OBJECT_CHART && it.current()->getType() != OBJECT_KOFFICE_PART )
@@ -841,7 +841,7 @@ bool Doc::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, SaveFlag
return true;
}
-void Doc::loadOasisSettings( const QDomDocument&settingsDoc )
+void Doc::loadOasisSettings( const TQDomDocument&settingsDoc )
{
KoOasisSettings settings( settingsDoc );
KoOasisSettings::Items viewSettings = settings.itemSet( "view-settings" );
@@ -869,9 +869,9 @@ void Doc::loadOasisIgnoreList( const KoOasisSettings& settings )
KoOasisSettings::Items configurationSettings = settings.itemSet( "configuration-settings" );
if ( !configurationSettings.isNull() )
{
- const QString ignorelist = configurationSettings.parseConfigItemString( "SpellCheckerIgnoreList" );
+ const TQString ignorelist = configurationSettings.parseConfigItemString( "SpellCheckerIgnoreList" );
//kdDebug()<<" ignorelist :"<<ignorelist<<endl;
- d->spellListIgnoreAll = QStringList::split( ',', ignorelist );
+ d->spellListIgnoreAll = TQStringList::split( ',', ignorelist );
}
}
@@ -882,8 +882,8 @@ void Doc::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyles ) con
KoXmlWriter* stylesWriter = createOasisXmlWriter( &stylesDev, "office:document-styles" );
stylesWriter->startElement( "office:styles" );
- 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" );
}
@@ -941,7 +941,7 @@ void Doc::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyles ) con
styles = mainStyles.styles( KoGenStyle::STYLE_PAGELAYOUT );
it = styles.begin();
for ( ; it != styles.end() ; ++it ) {
- (*it).style->writeStyle( stylesWriter, mainStyles, "style:page-layout", (*it).name, "style:page-layout-properties", false /*don't close*/ );
+ (*it).style->writeStyle( stylesWriter, mainStyles, "style:page-tqlayout", (*it).name, "style:page-tqlayout-properties", false /*don't close*/ );
stylesWriter->endElement();
}
@@ -963,12 +963,12 @@ void Doc::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyles ) con
delete stylesWriter;;
}
-bool Doc::loadOasis( const QDomDocument& doc, KoOasisStyles& oasisStyles, const QDomDocument& settings, KoStore* store)
+bool Doc::loadOasis( const TQDomDocument& doc, KoOasisStyles& oasisStyles, const TQDomDocument& settings, KoStore* store)
{
if ( !d->m_loadingInfo )
d->m_loadingInfo = new KSPLoadingInfo;
- QTime dt;
+ TQTime dt;
dt.start();
emit sigProgress( 0 );
@@ -977,28 +977,28 @@ bool Doc::loadOasis( const QDomDocument& doc, KoOasisStyles& oasisStyles, const
d->refs.clear();
- 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() )
{
setErrorMessage( i18n( "Invalid OASIS OpenDocument file. No office:body tag found." ));
deleteLoadingInfo();
return false;
}
- QDomElement body = KoDom::namedItemNS( realBody, KoXmlNS::office, "spreadsheet" );
+ TQDomElement body = KoDom::namedItemNS( realBody, KoXmlNS::office, "spreadsheet" );
if ( body.isNull() )
{
kdError(32001) << "No office:spreadsheet 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 document is not a spreadsheet, but %1. Please try opening it with the appropriate application." ).arg( KoDocument::tagNameToDocumentType( localName ) ) );
+ setErrorMessage( i18n( "This document is not a spreadsheet, but %1. Please try opening it with the appropriate application." ).tqarg( KoDocument::tagNameToDocumentType( localName ) ) );
deleteLoadingInfo();
return false;
}
@@ -1009,7 +1009,7 @@ bool Doc::loadOasis( const QDomDocument& doc, KoOasisStyles& oasisStyles, const
styleManager()->loadOasisStyleTemplate( oasisStyles );
// load default column style
- const QDomElement* defaultColumnStyle = oasisStyles.defaultStyle( "table-column" );
+ const TQDomElement* defaultColumnStyle = oasisStyles.defaultStyle( "table-column" );
if ( defaultColumnStyle )
{
// kDebug() << "style:default-style style:family=\"table-column\"" << endl;
@@ -1028,7 +1028,7 @@ bool Doc::loadOasis( const QDomDocument& doc, KoOasisStyles& oasisStyles, const
}
// load default row style
- const QDomElement* defaultRowStyle = oasisStyles.defaultStyle( "table-row" );
+ const TQDomElement* defaultRowStyle = oasisStyles.defaultStyle( "table-row" );
if ( defaultRowStyle )
{
// kDebug() << "style:default-style style:family=\"table-row\"" << endl;
@@ -1072,21 +1072,21 @@ bool Doc::loadOasis( const QDomDocument& doc, KoOasisStyles& oasisStyles, const
return true;
}
-bool Doc::loadXML( QIODevice *, const QDomDocument& doc )
+bool Doc::loadXML( TQIODevice *, const TQDomDocument& doc )
{
- QTime dt;
+ TQTime dt;
dt.start();
emit sigProgress( 0 );
d->isLoading = true;
d->spellListIgnoreAll.clear();
// <spreadsheet>
- QDomElement spread = doc.documentElement();
+ TQDomElement spread = doc.documentElement();
if ( spread.attribute( "mime" ) != "application/x-kspread" && spread.attribute( "mime" ) != "application/vnd.kde.kspread" )
{
d->isLoading = false;
- setErrorMessage( i18n( "Invalid document. Expected mimetype application/x-kspread or application/vnd.kde.kspread, got %1" ).arg( spread.attribute("mime") ) );
+ setErrorMessage( i18n( "Invalid document. Expected mimetype application/x-kspread or application/vnd.kde.kspread, got %1" ).tqarg( spread.attribute("mime") ) );
return false;
}
@@ -1095,7 +1095,7 @@ bool Doc::loadXML( QIODevice *, const QDomDocument& doc )
{
int ret = KMessageBox::warningContinueCancel(
0, i18n("This document was created with a newer version of KSpread (syntax version: %1)\n"
- "When you open it with this version of KSpread, some information may be lost.").arg(d->syntaxVersion),
+ "When you open it with this version of KSpread, some information may be lost.").tqarg(d->syntaxVersion),
i18n("File Format Mismatch"), KStdGuiItem::cont() );
if ( ret == KMessageBox::Cancel )
{
@@ -1105,13 +1105,13 @@ bool Doc::loadXML( QIODevice *, const QDomDocument& doc )
}
// <locale>
- QDomElement loc = spread.namedItem( "locale" ).toElement();
+ TQDomElement loc = spread.namedItem( "locale" ).toElement();
if ( !loc.isNull() )
((Locale *) locale())->load( loc );
emit sigProgress( 5 );
- QDomElement defaults = spread.namedItem( "defaults" ).toElement();
+ TQDomElement defaults = spread.namedItem( "defaults" ).toElement();
if ( !defaults.isNull() )
{
bool ok = false;
@@ -1130,14 +1130,14 @@ bool Doc::loadXML( QIODevice *, const QDomDocument& doc )
d->refs.clear();
//<areaname >
- QDomElement areaname = spread.namedItem( "areaname" ).toElement();
+ TQDomElement areaname = spread.namedItem( "areaname" ).toElement();
if ( !areaname.isNull())
loadAreaName(areaname);
- QDomElement ignoreAll = spread.namedItem( "SPELLCHECKIGNORELIST").toElement();
+ TQDomElement ignoreAll = spread.namedItem( "SPELLCHECKIGNORELIST").toElement();
if ( !ignoreAll.isNull())
{
- QDomElement spellWord=spread.namedItem("SPELLCHECKIGNORELIST").toElement();
+ TQDomElement spellWord=spread.namedItem("SPELLCHECKIGNORELIST").toElement();
spellWord=spellWord.firstChild().toElement();
while ( !spellWord.isNull() )
@@ -1154,7 +1154,7 @@ bool Doc::loadXML( QIODevice *, const QDomDocument& doc )
// In case of reload (e.g. from konqueror)
map()->sheetList().clear(); // it's set to autoDelete
- QDomElement styles = spread.namedItem( "styles" ).toElement();
+ TQDomElement styles = spread.namedItem( "styles" ).toElement();
if ( !styles.isNull() )
{
if ( !styleManager()->loadXML( styles ) )
@@ -1166,7 +1166,7 @@ bool Doc::loadXML( QIODevice *, const QDomDocument& doc )
}
// <map>
- QDomElement mymap = spread.namedItem( "map" ).toElement();
+ TQDomElement mymap = spread.namedItem( "map" ).toElement();
if ( mymap.isNull() )
{
setErrorMessage( i18n("Invalid document. No map tag.") );
@@ -1179,10 +1179,10 @@ bool Doc::loadXML( QIODevice *, const QDomDocument& doc )
return false;
}
- //Backwards compatibility with older versions for paper layout
+ //Backwards compatibility with older versions for paper tqlayout
if ( d->syntaxVersion < 1 )
{
- QDomElement paper = spread.namedItem( "paper" ).toElement();
+ TQDomElement paper = spread.namedItem( "paper" ).toElement();
if ( !paper.isNull() )
{
loadPaper( paper );
@@ -1191,10 +1191,10 @@ bool Doc::loadXML( QIODevice *, const QDomDocument& doc )
emit sigProgress( 85 );
- QDomElement element( spread.firstChild().toElement() );
+ TQDomElement element( spread.firstChild().toElement() );
while ( !element.isNull() )
{
- QString tagName( element.tagName() );
+ TQString tagName( element.tagName() );
if ( tagName != "locale" && tagName != "map" && tagName != "styles"
&& tagName != "SPELLCHECKIGNORELIST" && tagName != "areaname"
@@ -1218,14 +1218,14 @@ bool Doc::loadXML( QIODevice *, const QDomDocument& doc )
return true;
}
-void Doc::loadPaper( QDomElement const & paper )
+void Doc::loadPaper( TQDomElement const & paper )
{
// <paper>
- QString format = paper.attribute( "format" );
- QString orientation = paper.attribute( "orientation" );
+ TQString format = paper.attribute( "format" );
+ TQString orientation = paper.attribute( "orientation" );
// <borders>
- QDomElement borders = paper.namedItem( "borders" ).toElement();
+ TQDomElement borders = paper.namedItem( "borders" ).toElement();
if ( !borders.isNull() )
{
float left = borders.attribute( "left" ).toFloat();
@@ -1234,7 +1234,7 @@ void Doc::loadPaper( QDomElement const & paper )
float bottom = borders.attribute( "bottom" ).toFloat();
//apply to all sheet
- QPtrListIterator<Sheet> it ( map()->sheetList() );
+ TQPtrListIterator<Sheet> it ( map()->sheetList() );
for( ; it.current(); ++it )
{
it.current()->print()->setPaperLayout( left, top, right, bottom,
@@ -1242,45 +1242,45 @@ void Doc::loadPaper( QDomElement const & paper )
}
}
- QString hleft, hright, hcenter;
- QString fleft, fright, fcenter;
+ TQString hleft, hright, hcenter;
+ TQString fleft, fright, fcenter;
// <head>
- QDomElement head = paper.namedItem( "head" ).toElement();
+ TQDomElement head = paper.namedItem( "head" ).toElement();
if ( !head.isNull() )
{
- QDomElement left = head.namedItem( "left" ).toElement();
+ TQDomElement left = head.namedItem( "left" ).toElement();
if ( !left.isNull() )
hleft = left.text();
- QDomElement center = head.namedItem( "center" ).toElement();
+ TQDomElement center = head.namedItem( "center" ).toElement();
if ( !center.isNull() )
hcenter = center.text();
- QDomElement right = head.namedItem( "right" ).toElement();
+ TQDomElement right = head.namedItem( "right" ).toElement();
if ( !right.isNull() )
hright = right.text();
}
// <foot>
- QDomElement foot = paper.namedItem( "foot" ).toElement();
+ TQDomElement foot = paper.namedItem( "foot" ).toElement();
if ( !foot.isNull() )
{
- QDomElement left = foot.namedItem( "left" ).toElement();
+ TQDomElement left = foot.namedItem( "left" ).toElement();
if ( !left.isNull() )
fleft = left.text();
- QDomElement center = foot.namedItem( "center" ).toElement();
+ TQDomElement center = foot.namedItem( "center" ).toElement();
if ( !center.isNull() )
fcenter = center.text();
- QDomElement right = foot.namedItem( "right" ).toElement();
+ TQDomElement right = foot.namedItem( "right" ).toElement();
if ( !right.isNull() )
fright = right.text();
}
//The macro "<sheet>" formerly was typed as "<table>"
- hleft = hleft.replace( "<table>", "<sheet>" );
- hcenter = hcenter.replace( "<table>", "<sheet>" );
- hright = hright.replace( "<table>", "<sheet>" );
- fleft = fleft.replace( "<table>", "<sheet>" );
- fcenter = fcenter.replace( "<table>", "<sheet>" );
- fright = fright.replace( "<table>", "<sheet>" );
-
- QPtrListIterator<Sheet> it ( map()->sheetList() );
+ hleft = hleft.tqreplace( "<table>", "<sheet>" );
+ hcenter = hcenter.tqreplace( "<table>", "<sheet>" );
+ hright = hright.tqreplace( "<table>", "<sheet>" );
+ fleft = fleft.tqreplace( "<table>", "<sheet>" );
+ fcenter = fcenter.tqreplace( "<table>", "<sheet>" );
+ fright = fright.tqreplace( "<table>", "<sheet>" );
+
+ TQPtrListIterator<Sheet> it ( map()->sheetList() );
for( ; it.current(); ++it )
{
it.current()->print()->setHeadFootLine( hleft, hcenter, hright,
@@ -1296,7 +1296,7 @@ bool Doc::completeLoading( KoStore* /* _store */ )
// map()->update();
- QPtrListIterator<KoView> it( views() );
+ TQPtrListIterator<KoView> it( views() );
for (; it.current(); ++it )
((View*)it.current())->initialPosition();
@@ -1317,9 +1317,9 @@ void Doc::deregisterPlugin( Plugin * plugin )
d->plugins.remove( plugin );
}
-bool Doc::docData( QString const & xmlTag, QDomElement & data )
+bool Doc::docData( TQString const & xmlTag, TQDomElement & data )
{
- SavedDocParts::iterator iter = m_savedDocParts.find( xmlTag );
+ SavedDocParts::iterator iter = m_savedDocParts.tqfind( xmlTag );
if ( iter == m_savedDocParts.end() )
return false;
@@ -1374,12 +1374,12 @@ bool Doc::showRowHeader() const
return d->rowHeader;
}
-void Doc::setGridColor( const QColor& color )
+void Doc::setGridColor( const TQColor& color )
{
d->gridColor = color;
}
-QColor Doc::gridColor() const
+TQColor Doc::gridColor() const
{
return d->gridColor;
}
@@ -1517,7 +1517,7 @@ void Doc::setDontCheckTitleCase( bool b )
d->dontCheckTitleCase = b;
}
-QString Doc::unitName() const
+TQString Doc::unitName() const
{
return KoUnit::unitName( unit() );
}
@@ -1532,12 +1532,12 @@ void Doc::decreaseNumOperation()
--d->numOperations;
}
-void Doc::addIgnoreWordAllList( const QStringList & _lst)
+void Doc::addIgnoreWordAllList( const TQStringList & _lst)
{
d->spellListIgnoreAll = _lst;
}
-QStringList Doc::spellListIgnoreAll() const
+TQStringList Doc::spellListIgnoreAll() const
{
return d->spellListIgnoreAll;
}
@@ -1549,7 +1549,7 @@ void Doc::setZoomAndResolution( int zoom, int dpiX, int dpiY )
void Doc::newZoomAndResolution( bool updateViews, bool /*forPrint*/ )
{
-/* layout();
+/* tqlayout();
updateAllFrames();*/
if ( updateViews )
{
@@ -1618,19 +1618,19 @@ KoCommandHistory* Doc::commandHistory()
void Doc::enableUndo( bool _b )
{
- QPtrListIterator<KoView> it( views() );
+ TQPtrListIterator<KoView> it( views() );
for (; it.current(); ++it )
static_cast<View *>( it.current() )->enableUndo( _b );
}
void Doc::enableRedo( bool _b )
{
- QPtrListIterator<KoView> it( views() );
+ TQPtrListIterator<KoView> it( views() );
for (; it.current(); ++it )
static_cast<View *>( it.current() )->enableRedo( _b );
}
-void Doc::paintContent( QPainter& painter, const QRect& rect,
+void Doc::paintContent( TQPainter& painter, const TQRect& rect,
bool transparent, double zoomX, double /*zoomY*/ )
{
kdDebug(36001) << "paintContent() called on " << rect << endl;
@@ -1656,12 +1656,12 @@ void Doc::paintContent( QPainter& painter, const QRect& rect,
if ( m_zoomedResolutionX != zoomX )
d_zoom *= ( zoomX / m_zoomedResolutionX );
- // KSpread support zoom, therefore no need to scale with worldMatrix
- QWMatrix matrix = painter.worldMatrix();
+ // KSpread support zoom, therefore no need to scale with tqworldMatrix
+ TQWMatrix matrix = painter.tqworldMatrix();
matrix.setMatrix( 1, 0, 0, 1, matrix.dx(), matrix.dy() );
- QRect prect = rect;
- prect.setWidth( (int) (prect.width() * painter.worldMatrix().m11()) );
- prect.setHeight( (int) (prect.height() * painter.worldMatrix().m22()) );
+ TQRect prect = rect;
+ prect.setWidth( (int) (prect.width() * painter.tqworldMatrix().m11()) );
+ prect.setHeight( (int) (prect.height() * painter.tqworldMatrix().m22()) );
setZoomAndResolution( (int) ( d_zoom * 100 ), KoGlobal::dpiX(), KoGlobal::dpiY() );
// paint the content, now zoom is correctly set
kdDebug(36001)<<"paintContent-------------------------------------\n";
@@ -1675,7 +1675,7 @@ void Doc::paintContent( QPainter& painter, const QRect& rect,
setZoomAndResolution( oldZoom, KoGlobal::dpiX(), KoGlobal::dpiY() );
}
-void Doc::paintContent( QPainter& painter, const QRect& rect, bool /*transparent*/, Sheet* sheet, bool drawCursor )
+void Doc::paintContent( TQPainter& painter, const TQRect& rect, bool /*transparent*/, Sheet* sheet, bool drawCursor )
{
if ( isLoading() )
return;
@@ -1690,13 +1690,13 @@ void Doc::paintContent( QPainter& painter, const QRect& rect, bool /*transparent
int right_col = sheet->rightColumn( unzoomItX( rect.right() ) );
int top_row = sheet->topRow( unzoomItY( rect.y() ), ypos );
int bottom_row = sheet->bottomRow( unzoomItY( rect.bottom() ) );
- QPen pen;
+ TQPen pen;
pen.setWidth( 1 );
painter.setPen( pen );
/* Update the entire visible area. */
- QValueList<QRect> cellAreaList;
- cellAreaList.append( QRect( left_col,
+ TQValueList<TQRect> cellAreaList;
+ cellAreaList.append( TQRect( left_col,
top_row,
right_col - left_col + 1,
bottom_row - top_row + 1) );
@@ -1708,7 +1708,7 @@ void Doc::paintUpdates()
{
// ElapsedTime et( "Doc::paintUpdates" );
- QPtrListIterator<KoView> it( views() );
+ TQPtrListIterator<KoView> it( views() );
View * view = NULL;
Sheet * sheet = NULL;
@@ -1725,20 +1725,20 @@ void Doc::paintUpdates()
}
}
-void Doc::paintCellRegions(QPainter& painter, const QRect &viewRect,
+void Doc::paintCellRegions(TQPainter& painter, const TQRect &viewRect,
View* view,
- QValueList<QRect> cellRegions,
+ TQValueList<TQRect> cellRegions,
const Sheet* sheet, bool /*drawCursor*/)
{
//
- // Clip away children
+ // Clip away tqchildren
//
- QRegion rgn = painter.clipRegion();
+ TQRegion rgn = painter.clipRegion();
if ( rgn.isEmpty() )
- rgn = QRegion( QRect( 0, 0, viewRect.width(), viewRect.height() ) );
+ rgn = TQRegion( TQRect( 0, 0, viewRect.width(), viewRect.height() ) );
- QWMatrix matrix;
+ TQWMatrix matrix;
if ( view ) {
matrix.scale( zoomedResolutionX(),
zoomedResolutionY() );
@@ -1746,10 +1746,10 @@ void Doc::paintCellRegions(QPainter& painter, const QRect &viewRect,
- view->canvasWidget()->yOffset() );
}
else {
- matrix = painter.worldMatrix();
+ matrix = painter.tqworldMatrix();
}
-// QPtrListIterator<KoDocumentChild> it( children() );
+// TQPtrListIterator<KoDocumentChild> it( tqchildren() );
// for( ; it.current(); ++it ) {
// // if ( ((Child*)it.current())->sheet() == sheet &&
// // !m_pView->hasDocumentInWindow( it.current()->document() ) )
@@ -1758,11 +1758,11 @@ void Doc::paintCellRegions(QPainter& painter, const QRect &viewRect,
// }
painter.setClipRegion( rgn );
- QPen pen;
+ TQPen pen;
pen.setWidth( 1 );
painter.setPen( pen );
- QRect cellRegion;
+ TQRect cellRegion;
KoRect unzoomedViewRect = unzoomRect( viewRect );
for (unsigned int i=0; i < cellRegions.size(); i++) {
@@ -1773,8 +1773,8 @@ void Doc::paintCellRegions(QPainter& painter, const QRect &viewRect,
}
-void Doc::PaintRegion(QPainter &painter, const KoRect &viewRegion,
- View* view, const QRect &paintRegion,
+void Doc::PaintRegion(TQPainter &painter, const KoRect &viewRegion,
+ View* view, const TQRect &paintRegion,
const Sheet* sheet)
{
// Paint region has cell coordinates (col,row) while viewRegion has
@@ -1807,7 +1807,7 @@ void Doc::PaintRegion(QPainter &painter, const KoRect &viewRegion,
int regionLeft = paintRegion.left();
int regionTop = paintRegion.top();
- QValueList<QPoint> mergedCellsPainted;
+ TQValueList<TQPoint> mergedCellsPainted;
for ( int y = regionTop;
y <= regionBottom && dblCurrentCellPos.y() <= viewRegion.bottom();
++y )
@@ -1822,7 +1822,7 @@ void Doc::PaintRegion(QPainter &painter, const KoRect &viewRegion,
const ColumnFormat *col_lay = sheet->columnFormat( x );
Cell* cell = sheet->cellAt( x, y );
- QPoint cellRef( x, y );
+ TQPoint cellRef( x, y );
#if 0
bool paintBordersBottom = false;
@@ -1832,10 +1832,10 @@ void Doc::PaintRegion(QPainter &painter, const KoRect &viewRegion,
#endif
int paintBorder = Cell::Border_None;
- QPen rightPen( cell->effRightBorderPen( x, y ) );
- QPen leftPen( cell->effLeftBorderPen( x, y ) );
- QPen topPen( cell->effTopBorderPen( x, y ) );
- QPen bottomPen( cell->effBottomBorderPen( x, y ) );
+ TQPen rightPen( cell->effRightBorderPen( x, y ) );
+ TQPen leftPen( cell->effLeftBorderPen( x, y ) );
+ TQPen topPen( cell->effTopBorderPen( x, y ) );
+ TQPen bottomPen( cell->effBottomBorderPen( x, y ) );
// Paint border if outermost cell or if the pen is more "worth"
// than the border pen of the cell on the other side of the
@@ -1916,7 +1916,7 @@ void Doc::PaintRegion(QPainter &painter, const KoRect &viewRegion,
mergedCellsPainted, false );
Cell::BorderSides highlightBorder=Cell::Border_None;
- QPen highlightPen;
+ TQPen highlightPen;
#endif
cell->paintCell( viewRegion, painter, view, dblCurrentCellPos, cellRef,
@@ -1940,7 +1940,7 @@ DCOPObject* Doc::dcopObject()
return d->dcop;
}
-void Doc::addAreaName(const QRect &_rect,const QString & name,const QString & sheetName)
+void Doc::addAreaName(const TQRect &_rect,const TQString & name,const TQString & sheetName)
{
setModified( true );
Reference tmp;
@@ -1951,9 +1951,9 @@ void Doc::addAreaName(const QRect &_rect,const QString & name,const QString & sh
emit sig_addAreaName( name );
}
-void Doc::removeArea( const QString & name)
+void Doc::removeArea( const TQString & name)
{
- QValueList<Reference>::Iterator it2;
+ TQValueList<Reference>::Iterator it2;
for ( it2 = d->refs.begin(); it2 != d->refs.end(); ++it2 )
{
if((*it2).ref_name==name)
@@ -1965,9 +1965,9 @@ void Doc::removeArea( const QString & name)
}
}
-void Doc::changeAreaSheetName(const QString & oldName,const QString & sheetName)
+void Doc::changeAreaSheetName(const TQString & oldName,const TQString & sheetName)
{
- QValueList<Reference>::Iterator it2;
+ TQValueList<Reference>::Iterator it2;
for ( it2 = d->refs.begin(); it2 != d->refs.end(); ++it2 )
{
if((*it2).sheet_name==oldName)
@@ -1975,9 +1975,9 @@ void Doc::changeAreaSheetName(const QString & oldName,const QString & sheetName)
}
}
-QRect Doc::getRectArea(const QString &_sheetName)
+TQRect Doc::getRectArea(const TQString &_sheetName)
{
- QValueList<Reference>::Iterator it2;
+ TQValueList<Reference>::Iterator it2;
for ( it2 = d->refs.begin(); it2 != d->refs.end(); ++it2 )
{
if((*it2).ref_name==_sheetName)
@@ -1985,25 +1985,25 @@ QRect Doc::getRectArea(const QString &_sheetName)
return (*it2).rect;
}
}
- return QRect(-1,-1,-1,-1);
+ return TQRect(-1,-1,-1,-1);
}
-QDomElement Doc::saveAreaName( QDomDocument& doc )
+TQDomElement Doc::saveAreaName( TQDomDocument& doc )
{
- QDomElement element = doc.createElement( "areaname" );
- QValueList<Reference>::Iterator it2;
+ TQDomElement element = doc.createElement( "areaname" );
+ TQValueList<Reference>::Iterator it2;
for ( it2 = d->refs.begin(); it2 != d->refs.end(); ++it2 )
{
- QDomElement e = doc.createElement("reference");
- QDomElement tabname = doc.createElement( "tabname" );
+ TQDomElement e = doc.createElement("reference");
+ TQDomElement tabname = doc.createElement( "tabname" );
tabname.appendChild( doc.createTextNode( (*it2).sheet_name ) );
e.appendChild( tabname );
- QDomElement refname = doc.createElement( "refname" );
+ TQDomElement refname = doc.createElement( "refname" );
refname.appendChild( doc.createTextNode( (*it2).ref_name ) );
e.appendChild( refname );
- QDomElement rect = doc.createElement( "rect" );
+ TQDomElement rect = doc.createElement( "rect" );
rect.setAttribute( "left-rect", ((*it2).rect).left() );
rect.setAttribute( "right-rect",((*it2).rect).right() );
rect.setAttribute( "top-rect", ((*it2).rect).top() );
@@ -2014,23 +2014,23 @@ QDomElement Doc::saveAreaName( QDomDocument& doc )
return element;
}
-void Doc::loadOasisCellValidation( const QDomElement&body )
+void Doc::loadOasisCellValidation( const TQDomElement&body )
{
- QDomNode validation = KoDom::namedItemNS( body, KoXmlNS::table, "content-validations" );
- kdDebug()<<"void Doc::loadOasisCellValidation( const QDomElement&body ) \n";
+ TQDomNode validation = KoDom::namedItemNS( body, KoXmlNS::table, "content-validations" );
+ kdDebug()<<"void Doc::loadOasisCellValidation( const TQDomElement&body ) \n";
kdDebug()<<"validation.isNull ? "<<validation.isNull()<<endl;
if ( !validation.isNull() )
{
- QDomNode n = validation.firstChild();
+ TQDomNode n = validation.firstChild();
for( ; !n.isNull(); n = n.nextSibling() )
{
if ( n.isElement() )
{
- QDomElement element = n.toElement();
+ TQDomElement element = n.toElement();
//kdDebug()<<" loadOasisCellValidation element.tagName() :"<<element.tagName()<<endl;
if ( element.tagName() == "content-validation" && element.namespaceURI() == KoXmlNS::table ) {
- d->m_loadingInfo->appendValidation(element.attributeNS( KoXmlNS::table, "name", QString::null ), element );
- kdDebug()<<" validation found :"<<element.attributeNS( KoXmlNS::table, "name", QString::null )<<endl;
+ d->m_loadingInfo->appendValidation(element.attributeNS( KoXmlNS::table, "name", TQString() ), element );
+ kdDebug()<<" validation found :"<<element.attributeNS( KoXmlNS::table, "name", TQString() )<<endl;
}
else {
kdDebug()<<" Tag not recognize :"<<element.tagName()<<endl;
@@ -2045,7 +2045,7 @@ void Doc::saveOasisAreaName( KoXmlWriter & xmlWriter )
if ( listArea().count()>0 )
{
xmlWriter.startElement( "table:named-expressions" );
- QValueList<Reference>::Iterator it;
+ TQValueList<Reference>::Iterator it;
for ( it = d->refs.begin(); it != d->refs.end(); ++it )
{
xmlWriter.startElement( "table:named-range" );
@@ -2060,17 +2060,17 @@ void Doc::saveOasisAreaName( KoXmlWriter & xmlWriter )
}
}
-void Doc::loadOasisAreaName( const QDomElement& body )
+void Doc::loadOasisAreaName( const TQDomElement& body )
{
- kdDebug()<<"void Doc::loadOasisAreaName( const QDomElement& body ) \n";
- QDomNode namedAreas = KoDom::namedItemNS( body, KoXmlNS::table, "named-expressions" );
+ kdDebug()<<"void Doc::loadOasisAreaName( const TQDomElement& body ) \n";
+ TQDomNode namedAreas = KoDom::namedItemNS( body, KoXmlNS::table, "named-expressions" );
if ( !namedAreas.isNull() )
{
kdDebug()<<" area name exist \n";
- QDomNode area = namedAreas.firstChild();
+ TQDomNode area = namedAreas.firstChild();
while ( !area.isNull() )
{
- QDomElement e = area.toElement();
+ TQDomElement e = area.toElement();
if ( e.localName() == "named-range" )
{
@@ -2082,26 +2082,26 @@ void Doc::loadOasisAreaName( const QDomElement& body )
}
// TODO: what is: sheet:base-cell-address
- QString name = e.attributeNS( KoXmlNS::table, "name", QString::null );
- QString range = e.attributeNS( KoXmlNS::table, "cell-range-address", QString::null );
+ TQString name = e.attributeNS( KoXmlNS::table, "name", TQString() );
+ TQString range = e.attributeNS( KoXmlNS::table, "cell-range-address", TQString() );
kdDebug()<<"area name : "<<name<<" range :"<<range<<endl;
d->m_loadingInfo->addWordInAreaList( name );
kdDebug() << "Reading in named area, name: " << name << ", area: " << range << endl;
range = Oasis::decodeFormula( range );
- if ( range.find( ':' ) == -1 )
+ if ( range.tqfind( ':' ) == -1 )
{
Point p( range );
- int n = range.find( '!' );
+ int n = range.tqfind( '!' );
if ( n > 0 )
range = range + ":" + range.right( range.length() - n - 1);
kdDebug() << "=> Area: " << range << endl;
}
- if ( range.contains( '!' ) && range[0] == '$' )
+ if ( range.tqcontains( '!' ) && range[0] == '$' )
{
// cut absolute sheet indicator
range.remove( 0, 1 );
@@ -2123,30 +2123,30 @@ void Doc::loadOasisAreaName( const QDomElement& body )
}
}
-void Doc::loadAreaName( const QDomElement& element )
+void Doc::loadAreaName( const TQDomElement& element )
{
- QDomElement tmp=element.firstChild().toElement();
+ TQDomElement tmp=element.firstChild().toElement();
for( ; !tmp.isNull(); tmp=tmp.nextSibling().toElement() )
{
if ( tmp.tagName() == "reference" )
{
- QString tabname;
- QString refname;
+ TQString tabname;
+ TQString refname;
int left=0;
int right=0;
int top=0;
int bottom=0;
- QDomElement sheetName = tmp.namedItem( "tabname" ).toElement();
+ TQDomElement sheetName = tmp.namedItem( "tabname" ).toElement();
if ( !sheetName.isNull() )
{
tabname=sheetName.text();
}
- QDomElement referenceName = tmp.namedItem( "refname" ).toElement();
+ TQDomElement referenceName = tmp.namedItem( "refname" ).toElement();
if ( !referenceName.isNull() )
{
refname=referenceName.text();
}
- QDomElement rect =tmp.namedItem( "rect" ).toElement();
+ TQDomElement rect =tmp.namedItem( "rect" ).toElement();
if (!rect.isNull())
{
bool ok;
@@ -2159,16 +2159,16 @@ void Doc::loadAreaName( const QDomElement& element )
if ( rect.hasAttribute( "bottom-rect" ) )
bottom=rect.attribute("bottom-rect").toInt( &ok );
}
- QRect _rect;
+ TQRect _rect;
_rect.setCoords(left,top,right,bottom);
addAreaName(_rect,refname,tabname);
}
}
}
-void Doc::addStringCompletion(const QString &stringCompletion)
+void Doc::addStringCompletion(const TQString &stringCompletion)
{
- if ( d->listCompletion.items().contains(stringCompletion) == 0 )
+ if ( d->listCompletion.items().tqcontains(stringCompletion) == 0 )
d->listCompletion.addItem( stringCompletion );
}
@@ -2190,17 +2190,17 @@ void Doc::emitBeginOperation(bool waitCursor)
//
//The reason being that any operations started before the first one with waitCursor set
//are expected to be completed in a short time anyway.
- QCursor* activeOverride = QApplication::overrideCursor();
+ TQCursor* activeOverride = static_cast<TQCursor*>(TQApplication::overrideCursor());
- if (waitCursor && ( (!activeOverride) || (activeOverride->shape() != Qt::waitCursor.shape()) ) )
+ if (waitCursor && ( (!activeOverride) || (activeOverride->tqshape() != TQt::waitCursor.tqshape()) ) )
{
- QApplication::setOverrideCursor(Qt::waitCursor);
+ TQApplication::setOverrideCursor(TQt::waitCursor);
}
// /* just duplicate the current cursor on the stack, then */
-// else if (QApplication::overrideCursor() != NULL)
+// else if (TQApplication::overrideCursor() != NULL)
// {
-// QApplication::setOverrideCursor(QApplication::overrideCursor()->shape());
+// TQApplication::setOverrideCursor(TQApplication::overrideCursor()->tqshape());
// }
KoDocument::emitBeginOperation();
@@ -2228,9 +2228,9 @@ void Doc::emitEndOperation()
if (d->numOperations == 0)
{
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
- /* do this after the parent class emitEndOperation because that allows updates
+ /* do this after the tqparent class emitEndOperation because that allows updates
on the view again
*/
paintUpdates();
@@ -2252,9 +2252,9 @@ void Doc::emitEndOperation( const Region& /*region*/ )
KoDocument::emitEndOperation();
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
- /* do this after the parent class emitEndOperation because that allows updates
+ /* do this after the tqparent class emitEndOperation because that allows updates
on the view again
*/
paintUpdates();
@@ -2267,28 +2267,28 @@ bool Doc::delayCalculation() const
void Doc::updateBorderButton()
{
- QPtrListIterator<KoView> it( views() );
+ TQPtrListIterator<KoView> it( views() );
for (; it.current(); ++it )
static_cast<View *>( it.current() )->updateBorderButton();
}
void Doc::insertSheet( Sheet * sheet )
{
- QPtrListIterator<KoView> it( views() );
+ TQPtrListIterator<KoView> it( views() );
for (; it.current(); ++it )
((View*)it.current())->insertSheet( sheet );
}
void Doc::takeSheet( Sheet * sheet )
{
- QPtrListIterator<KoView> it( views() );
+ TQPtrListIterator<KoView> it( views() );
for (; it.current(); ++it )
((View*)it.current())->removeSheet( sheet );
}
-void Doc::addIgnoreWordAll( const QString & word)
+void Doc::addIgnoreWordAll( const TQString & word)
{
- if( d->spellListIgnoreAll.findIndex( word )==-1)
+ if( d->spellListIgnoreAll.tqfindIndex( word )==-1)
d->spellListIgnoreAll.append( word );
}
@@ -2321,7 +2321,7 @@ Sheet * Doc::displaySheet() const
void Doc::addView( KoView *_view )
{
KoDocument::addView( _view );
- QPtrListIterator<KoView> it( views() );
+ TQPtrListIterator<KoView> it( views() );
for (; it.current(); ++it )
((View*)it.current())->closeEditor();
}
@@ -2331,13 +2331,13 @@ void Doc::addDamage( Damage* damage )
d->damages.append( damage );
if( d->damages.count() == 1 )
- QTimer::singleShot( 0, this, SLOT( flushDamages() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( flushDamages() ) );
}
void Doc::flushDamages()
{
emit damagesFlushed( d->damages );
- QValueList<Damage*>::Iterator it;
+ TQValueList<Damage*>::Iterator it;
for( it = d->damages.begin(); it != d->damages.end(); ++it )
delete *it;
d->damages.clear();
@@ -2369,7 +2369,7 @@ void Doc::insertObject( EmbeddedObject * obj )
d->m_embeddedObjects.append( obj );
}
-QPtrList<EmbeddedObject>& Doc::embeddedObjects()
+TQPtrList<EmbeddedObject>& Doc::embeddedObjects()
{
return d->m_embeddedObjects;
}
@@ -2379,35 +2379,35 @@ KoPictureCollection *Doc::pictureCollection()
return &d->m_pictureCollection;
}
-void Doc::repaint( const QRect& rect )
+void Doc::tqrepaint( const TQRect& rect )
{
- QRect r;
- QPtrListIterator<KoView> it( views() );
+ TQRect r;
+ TQPtrListIterator<KoView> it( views() );
for( ; it.current(); ++it )
{
r = rect;
Canvas* canvas = ((View*)it.current())->canvasWidget();
- r.moveTopLeft( QPoint( r.x() - (int) canvas->xOffset(),
+ r.moveTopLeft( TQPoint( r.x() - (int) canvas->xOffset(),
r.y() - (int) canvas->yOffset() ) );
canvas->update( r );
}
}
-void Doc::repaint( EmbeddedObject *obj )
+void Doc::tqrepaint( EmbeddedObject *obj )
{
- QPtrListIterator<KoView> it( views() );
+ TQPtrListIterator<KoView> it( views() );
for( ; it.current(); ++it )
{
Canvas* canvas = ((View*)it.current())->canvasWidget();
if ( obj->sheet() == canvas->activeSheet() )
- canvas->repaintObject( obj );
+ canvas->tqrepaintObject( obj );
}
}
-void Doc::repaint( const KoRect& rect )
+void Doc::tqrepaint( const KoRect& rect )
{
- QRect r;
- QPtrListIterator<KoView> it( views() );
+ TQRect r;
+ TQPtrListIterator<KoView> it( views() );
for( ; it.current(); ++it )
{
Canvas* canvas = ((View*)it.current())->canvasWidget();
@@ -2421,7 +2421,7 @@ void Doc::repaint( const KoRect& rect )
void Doc::addShell( KoMainWindow *shell )
{
- connect( shell, SIGNAL( documentSaved() ), d->commandHistory, SLOT( documentSaved() ) );
+ connect( shell, TQT_SIGNAL( documentSaved() ), d->commandHistory, TQT_SLOT( documentSaved() ) );
KoDocument::addShell( shell );
}
@@ -2438,14 +2438,14 @@ void Doc::setUndoRedoLimit(int val)
void Doc::insertPixmapKey( KoPictureKey key )
{
- if ( !d->usedPictures.contains( key ) )
+ if ( !d->usedPictures.tqcontains( key ) )
d->usedPictures.append( key );
}
void Doc::makeUsedPixmapList()
{
d->usedPictures.clear();
- QPtrListIterator<EmbeddedObject> it( d->m_embeddedObjects );
+ TQPtrListIterator<EmbeddedObject> it( d->m_embeddedObjects );
for ( ; it.current() ; ++it )
{
if( it.current()->getType() == OBJECT_PICTURE && ( d->m_savingWholeDocument || it.current()->isSelected() ) )