diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /filters | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'filters')
650 files changed, 15614 insertions, 15474 deletions
diff --git a/filters/generic_wrapper/generic_filter.cc b/filters/generic_wrapper/generic_filter.cc index 14830762..f3ae2b13 100644 --- a/filters/generic_wrapper/generic_filter.cc +++ b/filters/generic_wrapper/generic_filter.cc @@ -19,8 +19,8 @@ #include <stdlib.h> -#include <qtextcodec.h> -#include <qfile.h> +#include <tqtextcodec.h> +#include <tqfile.h> #include <kdebug.h> #include <KoFilterChain.h> @@ -37,11 +37,11 @@ typedef KGenericFactory<GenericFilter, KoFilter> GenericFilterFactory; K_EXPORT_COMPONENT_FACTORY( libgenerickofilter, GenericFilterFactory ) -GenericFilter::GenericFilter(KoFilter *, const char *, const QStringList&) : +GenericFilter::GenericFilter(KoFilter *, const char *, const TQStringList&) : KoFilter() { } -KoFilter::ConversionStatus GenericFilter::convert( const QCString &from, const QCString &to ) +KoFilter::ConversiontqStatus GenericFilter::convert( const TQCString &from, const TQCString &to ) { //find the right script to use @@ -80,14 +80,14 @@ KoFilter::ConversionStatus GenericFilter::convert( const QCString &from, const Q return KoFilter::NotImplemented; } -KoFilter::ConversionStatus GenericFilter::doImport() +KoFilter::ConversiontqStatus GenericFilter::doImport() { - KTempFile temp(QString("genericfilter-")); + KTempFile temp(TQString("genericfilter-")); temp.setAutoDelete(true); - QFile tempFile(temp.name()); + TQFile tempFile(temp.name()); - m_out = KoStore::createStore(&tempFile, KoStore::Write); + m_out = KoStore::createStore(TQT_TQIODEVICE(&tempFile), KoStore::Write); if (!m_out || !m_out->open("root")) { @@ -97,15 +97,15 @@ KoFilter::ConversionStatus GenericFilter::doImport() } else { - QString exec = m_exec + " " + KProcess::quote(m_chain->inputFile()) + " " + TQString exec = m_exec + " " + KProcess::quote(m_chain->inputFile()) + " " + KProcess::quote(m_chain->outputFile()); - system(QFile::encodeName(exec)); + system(TQFile::encodeName(exec)); kdDebug() << "Executing: " << exec << endl; - QFile outFile(m_chain->outputFile()); + TQFile outFile(m_chain->outputFile()); outFile.open(IO_ReadOnly); - QByteArray outData = outFile.readAll(); + TQByteArray outData = outFile.readAll(); if (outData.size()==0) { m_out->close(); return KoFilter::UnexpectedEOF; @@ -119,7 +119,7 @@ KoFilter::ConversionStatus GenericFilter::doImport() return KoFilter::OK; } -KoFilter::ConversionStatus GenericFilter::doExport() +KoFilter::ConversiontqStatus GenericFilter::doExport() { return KoFilter::NotImplemented; } diff --git a/filters/generic_wrapper/generic_filter.h b/filters/generic_wrapper/generic_filter.h index 21cc7311..1fde2b95 100644 --- a/filters/generic_wrapper/generic_filter.h +++ b/filters/generic_wrapper/generic_filter.h @@ -20,8 +20,8 @@ #ifndef __GENERICFILTER_H__ #define __GENERICFILTER_H__ -#include <qcstring.h> -#include <qstringlist.h> +#include <tqcstring.h> +#include <tqstringlist.h> #include <kprocess.h> #include <KoFilter.h> @@ -30,17 +30,18 @@ class GenericFilter : public KoFilter { Q_OBJECT + TQ_OBJECT public: - GenericFilter(KoFilter *parent, const char *name, const QStringList&); + GenericFilter(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~GenericFilter() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, - const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, + const TQCString& to ); private: - KoFilter::ConversionStatus doImport(); - KoFilter::ConversionStatus doExport(); - QString m_to, m_from, m_exec; + KoFilter::ConversiontqStatus doImport(); + KoFilter::ConversiontqStatus doExport(); + TQString m_to, m_from, m_exec; KoStore* m_out; }; diff --git a/filters/karbon/ai/ai88handler.cc b/filters/karbon/ai/ai88handler.cc index f3cf53a7..a271f33f 100644 --- a/filters/karbon/ai/ai88handler.cc +++ b/filters/karbon/ai/ai88handler.cc @@ -326,7 +326,7 @@ void AI88Handler::_handleSetFillPattern() AIElement elem (m_delegate->m_stack.top()); m_delegate->m_stack.pop(); - const QValueVector<AIElement> aval = elem.toElementArray(); + const TQValueVector<AIElement> aval = elem.toElementArray(); double ka = m_delegate->getDoubleValue(); double k = m_delegate->getDoubleValue(); @@ -341,7 +341,7 @@ void AI88Handler::_handleSetFillPattern() AIElement elem2 (m_delegate->m_stack.top()); m_delegate->m_stack.pop(); - const QString &name = elem2.toString(); + const TQString &name = elem2.toString(); if (m_delegate->m_gstateHandler) m_delegate->m_gstateHandler->gotFillPattern (name.latin1(), px, py, sx, sy, angle, rf, r, k, ka, aval); } @@ -350,7 +350,7 @@ void AI88Handler::_handleSetStrokePattern() AIElement elem (m_delegate->m_stack.top()); m_delegate->m_stack.pop(); - const QValueVector<AIElement> aval = elem.toElementArray(); + const TQValueVector<AIElement> aval = elem.toElementArray(); double ka = m_delegate->getDoubleValue(); double k = m_delegate->getDoubleValue(); @@ -365,7 +365,7 @@ void AI88Handler::_handleSetStrokePattern() AIElement elem2 (m_delegate->m_stack.top()); m_delegate->m_stack.pop(); - const QString &name = elem2.toString(); + const TQString &name = elem2.toString(); if (m_delegate->m_gstateHandler) m_delegate->m_gstateHandler->gotStrokePattern (name.latin1(), px, py, sx, sy, angle, rf, r, k, ka, aval); } @@ -406,7 +406,7 @@ void AI88Handler::_handleSetStrokeColorGray() void AI88Handler::_handleSetFillColorCustom() { double g = m_delegate->getDoubleValue(); - const QString name = m_delegate->getStringValue(); + const TQString name = m_delegate->getStringValue(); double k = m_delegate->getDoubleValue(); double y = m_delegate->getDoubleValue(); double m = m_delegate->getDoubleValue(); @@ -426,7 +426,7 @@ void AI88Handler::_handleSetDash() AIElement elem (m_delegate->m_stack.top()); m_delegate->m_stack.pop(); - const QValueVector<AIElement> aval = elem.toElementArray(); + const TQValueVector<AIElement> aval = elem.toElementArray(); if (m_delegate->m_gstateHandler) m_delegate->m_gstateHandler->gotDash (aval, fval); // qDebug ("dash operation finished"); } @@ -436,7 +436,7 @@ void AI88Handler::_handlePatternDefinition() AIElement elem (m_delegate->m_stack.top()); m_delegate->m_stack.pop(); - const QValueVector<AIElement> aval = elem.toElementArray(); + const TQValueVector<AIElement> aval = elem.toElementArray(); double ury = m_delegate->getDoubleValue(); double urx = m_delegate->getDoubleValue(); @@ -446,7 +446,7 @@ void AI88Handler::_handlePatternDefinition() AIElement elem2 (m_delegate->m_stack.top()); m_delegate->m_stack.pop(); - const QString &name = elem2.toString(); + const TQString &name = elem2.toString(); if (m_delegate->m_documentHandler) m_delegate->m_documentHandler->gotPatternDefinition (name.latin1(), aval, llx, lly, urx, ury); } @@ -455,7 +455,7 @@ void AI88Handler::_handleGsaveIncludeDocument() { AIElement elem2 (m_delegate->m_stack.top()); m_delegate->m_stack.pop(); - const QString &name = elem2.toString(); + const TQString &name = elem2.toString(); int ury = m_delegate->getIntValue(); int urx = m_delegate->getIntValue(); @@ -465,7 +465,7 @@ void AI88Handler::_handleGsaveIncludeDocument() { AIElement elem (m_delegate->m_stack.top()); m_delegate->m_stack.pop(); - const QValueVector<AIElement> aval = elem.toElementArray(); + const TQValueVector<AIElement> aval = elem.toElementArray(); if (m_delegate->m_embeddedHandler) m_delegate->m_embeddedHandler->gotGsaveIncludeDocument (aval, llx,lly,urx,ury,name.latin1()); } @@ -491,7 +491,7 @@ void AI88Handler::_handleSetCurrentText() { AIElement elem2 (m_delegate->m_stack.top()); m_delegate->m_stack.pop(); - const QString &fontname = elem2.toReference(); + const TQString &fontname = elem2.toReference(); if (m_delegate->m_textHandler) m_delegate->m_textHandler->gotFontDefinition (fontname.latin1(), size, leading, kerning, ta); @@ -502,7 +502,7 @@ void AI88Handler::_handleTextBlock (TextOperation to) { qDebug ("to element is (%s)",elem.typeName()); m_delegate->m_stack.pop(); - const QValueVector<AIElement> aval = elem.toElementArray(); + const TQValueVector<AIElement> aval = elem.toElementArray(); if (m_delegate->m_textHandler) m_delegate->m_textHandler->gotTextBlockBegin (aval, to); } @@ -511,7 +511,7 @@ void AI88Handler::_handleTextOutput () { AIElement elem (m_delegate->m_stack.top()); m_delegate->m_stack.pop(); - const QString &text = elem.toString(); + const TQString &text = elem.toString(); int length = -1; @@ -535,15 +535,15 @@ void AI88Handler::_handleFontEncoding() AIElement elem (m_delegate->m_stack.top()); m_delegate->m_stack.pop(); - const QString &oldFont = elem.toReference(); + const TQString &oldFont = elem.toReference(); AIElement elem2 (m_delegate->m_stack.top()); m_delegate->m_stack.pop(); - const QString &newFont = elem2.toReference(); + const TQString &newFont = elem2.toReference(); AIElement elem3 (m_delegate->m_stack.top()); m_delegate->m_stack.pop(); - const QValueVector<AIElement> encodingData = elem3.toElementArray(); + const TQValueVector<AIElement> encodingData = elem3.toElementArray(); if (m_delegate->m_textHandler) m_delegate->m_textHandler->gotFontEncoding (encodingData, oldFont.latin1(), newFont.latin1()); } @@ -551,7 +551,7 @@ void AI88Handler::_handleFontEncoding() void AI88Handler::_handleSetStrokeColorCustom() { double g = m_delegate->getDoubleValue(); - const QString name = m_delegate->getStringValue(); + const TQString name = m_delegate->getStringValue(); double k = m_delegate->getDoubleValue(); double y = m_delegate->getDoubleValue(); double m = m_delegate->getDoubleValue(); diff --git a/filters/karbon/ai/aicolor.h b/filters/karbon/ai/aicolor.h index b8cc1414..6e22984c 100644 --- a/filters/karbon/ai/aicolor.h +++ b/filters/karbon/ai/aicolor.h @@ -20,7 +20,7 @@ #ifndef AICOLOR_H #define AICOLOR_H -#include <qstring.h> +#include <tqstring.h> /** *@author diff --git a/filters/karbon/ai/aielement.cc b/filters/karbon/ai/aielement.cc index 13887b50..608bdf61 100644 --- a/filters/karbon/ai/aielement.cc +++ b/filters/karbon/ai/aielement.cc @@ -1,5 +1,5 @@ /* This file is part of the KDE project - Copyright (C) 2002, Dirk Schönberger <dirk.schoenberger@sz-online.de> + Copyright (C) 2002, Dirk Sch�nberger <dirk.schoenberger@sz-online.de> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -18,7 +18,7 @@ */ #include "aielement.h" -#include <qglobal.h> +#include <tqglobal.h> AIElement::Private::Private() { @@ -34,23 +34,23 @@ AIElement::Private::Private( Private* d ) case AIElement::String: case AIElement::Reference: case AIElement::Operator: - value.ptr = new QString( *((QString*)d->value.ptr) ); + value.ptr = new TQString( *((TQString*)d->value.ptr) ); break; case AIElement::CString: - // QCString is explicit shared - value.ptr = new QCString( *((QCString*)d->value.ptr) ); + // TQCString is explicit shared + value.ptr = new TQCString( *((TQCString*)d->value.ptr) ); break; /* case AIElement::List: - value.ptr = new QValueList<AIElement>( *((QValueList<AIElement>*)d->value.ptr) ); + value.ptr = new TQValueList<AIElement>( *((TQValueList<AIElement>*)d->value.ptr) ); break; */ case AIElement::ElementArray: - value.ptr = new QValueVector<AIElement>( *((QValueVector<AIElement>*)d->value.ptr) ); + value.ptr = new TQValueVector<AIElement>( *((TQValueVector<AIElement>*)d->value.ptr) ); break; case AIElement::Block: - value.ptr = new QValueVector<AIElement>( *((QValueVector<AIElement>*)d->value.ptr) ); + value.ptr = new TQValueVector<AIElement>( *((TQValueVector<AIElement>*)d->value.ptr) ); break; case AIElement::ByteArray: - value.ptr = new QByteArray( *((QByteArray*)d->value.ptr) ); + value.ptr = new TQByteArray( *((TQByteArray*)d->value.ptr) ); break; case AIElement::Int: value.i = d->value.i; @@ -83,22 +83,22 @@ void AIElement::Private::clear() case AIElement::String: case AIElement::Operator: case AIElement::Reference: - delete (QString*)value.ptr; + delete (TQString*)value.ptr; break; case AIElement::CString: - delete (QCString*)value.ptr; + delete (TQCString*)value.ptr; break; /* case AIElement::List: - delete (QValueList<AIElement>*)value.ptr; + delete (TQValueList<AIElement>*)value.ptr; break; */ case AIElement::ElementArray: - delete (QValueVector<AIElement>*)value.ptr; + delete (TQValueVector<AIElement>*)value.ptr; break; case AIElement::Block: - delete (QValueVector<AIElement>*)value.ptr; + delete (TQValueVector<AIElement>*)value.ptr; break; case AIElement::ByteArray: - delete (QByteArray*)value.ptr; + delete (TQByteArray*)value.ptr; break; case AIElement::Invalid: case AIElement::Int: @@ -136,7 +136,7 @@ AIElement::~AIElement() /*! Constructs a copy of the aielement, \a p, passed as the argument to this constructor. Usually this is a deep copy, but a shallow copy is made - if the stored data type is explicitly shared, as e.g. QImage is. + if the stored data type is explicitly shared, as e.g. TQImage is. */ AIElement::AIElement( const AIElement& p ) { @@ -147,25 +147,25 @@ AIElement::AIElement( const AIElement& p ) /*! Constructs a new aielement with a string value, \a val. */ -AIElement::AIElement( const QString& val, Type type ) +AIElement::AIElement( const TQString& val, Type type ) { d = new Private; d->typ = type; - d->value.ptr = new QString( val ); + d->value.ptr = new TQString( val ); } /*! Constructs a new aielement with a C-string value, \a val. - If you want to modify the QCString after you've passed it to this + If you want to modify the TQCString after you've passed it to this constructor, we recommend passing a deep copy (see - QCString::copy()). + TQCString::copy()). */ -AIElement::AIElement( const QCString& val ) +AIElement::AIElement( const TQCString& val ) { d = new Private; d->typ = CString; - d->value.ptr = new QCString( val ); + d->value.ptr = new TQCString( val ); } /*! @@ -180,7 +180,7 @@ AIElement::AIElement( const char* val ) if ( val == 0 ) return; d->typ = CString; - d->value.ptr = new QCString( val ); + d->value.ptr = new TQCString( val ); } /*! @@ -227,32 +227,32 @@ AIElement::AIElement( double val ) /*! Constructs a new aielement with a list value, \a val. */ -/* AIElement::AIElement( const QValueList<AIElement>& val ) +/* AIElement::AIElement( const TQValueList<AIElement>& val ) { d = new Private; d->typ = List; - d->value.ptr = new QValueList<AIElement>( val ); + d->value.ptr = new TQValueList<AIElement>( val ); } */ -AIElement::AIElement( const QValueVector<AIElement>& val, Type type ) +AIElement::AIElement( const TQValueVector<AIElement>& val, Type type ) { d = new Private; d->typ = type; - d->value.ptr = new QValueVector<AIElement>( val ); + d->value.ptr = new TQValueVector<AIElement>( val ); } -AIElement::AIElement( const QByteArray& val ) +AIElement::AIElement( const TQByteArray& val ) { d = new Private; d->typ = ByteArray; - d->value.ptr = new QByteArray( val ); + d->value.ptr = new TQByteArray( val ); } /*! Assigns the value of the aielement \a aielement to this aielement. This is a deep copy of the aielement, but note that if the aielement - holds an explicitly shared type such as QImage, a shallow copy + holds an explicitly shared type such as TQImage, a shallow copy is performed. */ AIElement& AIElement::operator= ( const AIElement& aielement ) @@ -283,7 +283,7 @@ void AIElement::detach() /*! Returns the name of the type stored in the aielement. The returned strings describe the C++ datatype used to store the - data: for example, "QFont", "QString", or "QValueList<AIElement>". + data: for example, "TQFont", TQSTRING_OBJECT_NAME_STRING, or "TQValueList<AIElement>". An Invalid aielement returns 0. */ const char* AIElement::typeName() const @@ -310,16 +310,16 @@ static const int ntypes = 11; static const char* const type_map[ntypes] = { 0, -// "QValueList<AIElement>", - "QString", +// "TQValueList<AIElement>", + TQSTRING_OBJECT_NAME_STRING, "int", "uint", "double", - "QCString", + "TQCString", "Operator", "Reference", - "QValueVector<AIElement>", - "QByteArray", + "TQValueVector<AIElement>", + TQBYTEARRAY_OBJECT_NAME_STRING, "uchar", }; @@ -351,59 +351,59 @@ AIElement::Type AIElement::nameToType( const char* name ) } /*! - Returns the aielement as a QString if the aielement has type() + Returns the aielement as a TQString if the aielement has type() String, CString, ByteArray, Int, Uint, Double, - or QString::null otherwise. + or TQString() otherwise. \sa asString() */ -const QString AIElement::toString() const +const TQString AIElement::toString() const { if ( d->typ == CString ) - return QString::fromLatin1( toCString() ); + return TQString::tqfromLatin1( toCString() ); if ( d->typ == Int ) - return QString::number( toInt() ); + return TQString::number( toInt() ); if ( d->typ == UInt ) - return QString::number( toUInt() ); + return TQString::number( toUInt() ); if ( d->typ == Double ) - return QString::number( toDouble() ); + return TQString::number( toDouble() ); if ( d->typ == Byte ) - return QString::number( toByte() ); + return TQString::number( toByte() ); if ( d->typ != String ) - return QString::null; - return *((QString*)d->value.ptr); + return TQString(); + return *((TQString*)d->value.ptr); } -const QString AIElement::toReference() const +const TQString AIElement::toReference() const { if ( d->typ != Reference ) - return QString::null; - return *((QString*)d->value.ptr); + return TQString(); + return *((TQString*)d->value.ptr); } -const QString AIElement::toOperator() const +const TQString AIElement::toOperator() const { if ( d->typ != Operator ) - return QString::null; - return *((QString*)d->value.ptr); + return TQString(); + return *((TQString*)d->value.ptr); } /*! - Returns the aielement as a QCString if the aielement has type() + Returns the aielement as a TQCString if the aielement has type() CString or String, or a 0 otherwise. \sa asCString() */ -const QCString AIElement::toCString() const +const TQCString AIElement::toCString() const { if ( d->typ == CString ) - return *((QCString*)d->value.ptr); + return *((TQCString*)d->value.ptr); if ( d->typ == String ) - return ((QString*)d->value.ptr)->latin1(); + return ((TQString*)d->value.ptr)->latin1(); if ( d->typ == Operator ) - return ((QString*)d->value.ptr)->latin1(); + return ((TQString*)d->value.ptr)->latin1(); if ( d->typ == Reference ) - return ((QString*)d->value.ptr)->latin1(); + return ((TQString*)d->value.ptr)->latin1(); return 0; } @@ -421,9 +421,9 @@ const QCString AIElement::toCString() const int AIElement::toInt( bool * ok ) const { if( d->typ == String ) - return ((QString*)d->value.ptr)->toInt( ok ); + return ((TQString*)d->value.ptr)->toInt( ok ); if ( d->typ == CString ) - return ((QCString*)d->value.ptr)->toInt( ok ); + return ((TQCString*)d->value.ptr)->toInt( ok ); if ( ok ) *ok = canCast( UInt ); if( d->typ == Int ) @@ -440,9 +440,9 @@ int AIElement::toInt( bool * ok ) const uchar AIElement::toByte( bool * ok ) const { if( d->typ == String ) - return ((QString*)d->value.ptr)->toShort( ok ); + return ((TQString*)d->value.ptr)->toShort( ok ); if ( d->typ == CString ) - return ((QCString*)d->value.ptr)->toShort( ok ); + return ((TQCString*)d->value.ptr)->toShort( ok ); if ( ok ) *ok = canCast( UInt ); if( d->typ == Byte ) @@ -469,9 +469,9 @@ uchar AIElement::toByte( bool * ok ) const uint AIElement::toUInt( bool * ok ) const { if( d->typ == String ) - return ((QString*)d->value.ptr)->toUInt( ok ); + return ((TQString*)d->value.ptr)->toUInt( ok ); if ( d->typ == CString ) - return ((QCString*)d->value.ptr)->toUInt( ok ); + return ((TQCString*)d->value.ptr)->toUInt( ok ); if ( ok ) *ok = canCast( UInt ); if( d->typ == Int ) @@ -498,9 +498,9 @@ uint AIElement::toUInt( bool * ok ) const double AIElement::toDouble( bool * ok ) const { if( d->typ == String ) - return ((QString*)d->value.ptr)->toDouble( ok ); + return ((TQString*)d->value.ptr)->toDouble( ok ); if ( d->typ == CString ) - return ((QCString*)d->value.ptr)->toDouble( ok ); + return ((TQCString*)d->value.ptr)->toDouble( ok ); if ( ok ) *ok = canCast( Double ); if ( d->typ == Double ) @@ -515,14 +515,14 @@ double AIElement::toDouble( bool * ok ) const } /*! - Returns the aielement as a QValueList<AIElement> if the aielement has type() + Returns the aielement as a TQValueList<AIElement> if the aielement has type() List or StringList, or an empty list otherwise. Note that if you want to iterate over the list, you should iterate over a copy, e.g. \code - QValueList<AIElement> list = myAIElement.toList(); - QValueList<AIElement>::Iterator it = list.begin(); + TQValueList<AIElement> list = myAIElement.toList(); + TQValueList<AIElement>::Iterator it = list.begin(); while( it != list.end() ) { myProcessing( *it ); ++it; @@ -531,40 +531,40 @@ double AIElement::toDouble( bool * ok ) const \sa asList() */ -/* const QValueList<AIElement> AIElement::toList() const +/* const TQValueList<AIElement> AIElement::toList() const { if ( d->typ == List ) - return *((QValueList<AIElement>*)d->value.ptr); - return QValueList<AIElement>(); + return *((TQValueList<AIElement>*)d->value.ptr); + return TQValueList<AIElement>(); } */ -const QValueVector<AIElement> AIElement::toElementArray() const +const TQValueVector<AIElement> AIElement::toElementArray() const { if ( d->typ == ElementArray ) - return *((QValueVector<AIElement>*)d->value.ptr); - return QValueVector<AIElement>(); + return *((TQValueVector<AIElement>*)d->value.ptr); + return TQValueVector<AIElement>(); } -const QValueVector<AIElement> AIElement::toBlock() const +const TQValueVector<AIElement> AIElement::toBlock() const { if ( d->typ == Block ) - return *((QValueVector<AIElement>*)d->value.ptr); - return QValueVector<AIElement>(); + return *((TQValueVector<AIElement>*)d->value.ptr); + return TQValueVector<AIElement>(); } -const QByteArray AIElement::toByteArray() const +const TQByteArray AIElement::toByteArray() const { if ( d->typ == ByteArray ) - return *((QByteArray*)d->value.ptr); - return QByteArray(); + return *((TQByteArray*)d->value.ptr); + return TQByteArray(); } -#define Q_VARIANT_AS( f ) Q##f& AIElement::as##f() { \ - if ( d->typ != f ) *this = AIElement( to##f() ); else detach(); return *((Q##f*)d->value.ptr);} +#define TQ_VARIANT_AS( f ) TQ##f& AIElement::as##f() { \ + if ( d->typ != f ) *this = AIElement( to##f() ); else detach(); return *((TQ##f*)d->value.ptr);} -Q_VARIANT_AS(String) -Q_VARIANT_AS(CString) +TQ_VARIANT_AS(String) +TQ_VARIANT_AS(CString) /*! Returns the aielement's value as int reference. @@ -632,41 +632,41 @@ uchar& AIElement::asByte() Note that if you want to iterate over the list, you should iterate over a copy, e.g. \code - QValueList<AIElement> list = myAIElement.asList(); - QValueList<AIElement>::Iterator it = list.begin(); + TQValueList<AIElement> list = myAIElement.asList(); + TQValueList<AIElement>::Iterator it = list.begin(); while( it != list.end() ) { myProcessing( *it ); ++it; } \endcode */ -/* QValueList<AIElement>& AIElement::asList() +/* TQValueList<AIElement>& AIElement::asList() { if ( d->typ != List ) *this = AIElement( toList() ); - return *((QValueList<AIElement>*)d->value.ptr); + return *((TQValueList<AIElement>*)d->value.ptr); } */ -QValueVector<AIElement>& AIElement::asElementArray() +TQValueVector<AIElement>& AIElement::asElementArray() { if ( d->typ != ElementArray ) *this = AIElement( toElementArray() ); - return *((QValueVector<AIElement>*)d->value.ptr); + return *((TQValueVector<AIElement>*)d->value.ptr); } -QValueVector<AIElement>& AIElement::asBlock() +TQValueVector<AIElement>& AIElement::asBlock() { if ( d->typ != Block ) *this = AIElement( toBlock() ); - return *((QValueVector<AIElement>*)d->value.ptr); + return *((TQValueVector<AIElement>*)d->value.ptr); } -QByteArray& AIElement::asByteArray() +TQByteArray& AIElement::asByteArray() { if ( d->typ != ByteArray ) *this = AIElement( toByteArray() ); - return *((QByteArray*)d->value.ptr); + return *((TQByteArray*)d->value.ptr); } /*! diff --git a/filters/karbon/ai/aielement.h b/filters/karbon/ai/aielement.h index 5c6ab045..4fdf64a2 100644 --- a/filters/karbon/ai/aielement.h +++ b/filters/karbon/ai/aielement.h @@ -20,11 +20,11 @@ #ifndef AIELEMENT_H #define AIELEMENT_H -// #include <qvaluelist.h> -#include <qvaluevector.h> +// #include <tqvaluelist.h> +#include <tqvaluevector.h> -class QString; -class QCString; +class TQString; +class TQCString; /** *@author @@ -52,15 +52,15 @@ public: AIElement(); ~AIElement(); AIElement( const AIElement& ); - AIElement( const QString&, Type type = String ); - AIElement( const QCString& ); + AIElement( const TQString&, Type type = String ); + AIElement( const TQCString& ); AIElement( const char* ); -// AIElement( const QValueList<AIElement>& ); - AIElement( const QValueVector<AIElement>&, Type type = ElementArray); +// AIElement( const TQValueList<AIElement>& ); + AIElement( const TQValueVector<AIElement>&, Type type = ElementArray); AIElement( int ); AIElement( uint ); AIElement( double ); - AIElement( const QByteArray& ); + AIElement( const TQByteArray& ); AIElement( uchar ); AIElement& operator= ( const AIElement& ); @@ -77,36 +77,36 @@ public: void clear(); - const QString toString() const; - const QCString toCString() const; + const TQString toString() const; + const TQCString toCString() const; int toInt( bool * ok=0 ) const; uint toUInt( bool * ok=0 ) const; double toDouble( bool * ok=0 ) const; -// const QValueList<AIElement> toList() const; - const QValueVector<AIElement> toElementArray() const; - const QValueVector<AIElement> toBlock() const; +// const TQValueList<AIElement> toList() const; + const TQValueVector<AIElement> toElementArray() const; + const TQValueVector<AIElement> toBlock() const; // Custom types - const QString toReference() const; - const QString toOperator() const; - const QByteArray toByteArray() const; + const TQString toReference() const; + const TQString toOperator() const; + const TQByteArray toByteArray() const; uchar toByte( bool * ok=0 ) const; -// QValueListConstIterator<AIElement> listBegin() const; -// QValueListConstIterator<AIElement> listEnd() const; - QString& asString(); - QCString& asCString(); +// TQValueListConstIterator<AIElement> listBegin() const; +// TQValueListConstIterator<AIElement> listEnd() const; + TQString& asString(); + TQCString& asCString(); int& asInt(); uint& asUInt(); double& asDouble(); -// QValueList<AIElement>& asList(); - QValueVector<AIElement>& asElementArray(); - QValueVector<AIElement>& asBlock(); +// TQValueList<AIElement>& asList(); + TQValueVector<AIElement>& asElementArray(); + TQValueVector<AIElement>& asBlock(); // Custom types - QString& asReference(); - QString& asToken(); - QByteArray& asByteArray(); + TQString& asReference(); + TQString& asToken(); + TQByteArray& asByteArray(); uchar& asByte(); static const char* typeToName( Type typ ); @@ -115,7 +115,7 @@ public: private: void detach(); - class Private : public QShared + class Private : public TQShared { public: Private(); diff --git a/filters/karbon/ai/aiimport.cc b/filters/karbon/ai/aiimport.cc index a5e24f5b..4a201ec5 100644 --- a/filters/karbon/ai/aiimport.cc +++ b/filters/karbon/ai/aiimport.cc @@ -1,5 +1,5 @@ /* This file is part of the KDE project - Copyright (C) 2002, Dirk Schönberger <dirk.schoenberger@sz-online.de> + Copyright (C) 2002, Dirk Sch�nberger <dirk.schoenberger@sz-online.de> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -17,10 +17,10 @@ * Boston, MA 02110-1301, USA. */ -#include <qdom.h> -#include <qcstring.h> -#include <qfile.h> -#include <qstring.h> +#include <tqdom.h> +#include <tqcstring.h> +#include <tqfile.h> +#include <tqstring.h> #include <kgenericfactory.h> #include <KoFilterChain.h> @@ -47,7 +47,7 @@ protected: K_EXPORT_COMPONENT_FACTORY( libkarbonaiimport, AiImportFactory() ) -AiImport::AiImport( KoFilter*, const char*, const QStringList& ) +AiImport::AiImport( KoFilter*, const char*, const TQStringList& ) : KoFilter() { } @@ -56,29 +56,29 @@ AiImport::~AiImport() { } -KoFilter::ConversionStatus -AiImport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus +AiImport::convert( const TQCString& from, const TQCString& to ) { if ( from != "application/illustrator" || to != "application/x-karbon" ) { return KoFilter::NotImplemented; } - QFile fileIn( m_chain->inputFile() ); + TQFile fileIn( m_chain->inputFile() ); if( !fileIn.open( IO_ReadOnly ) ) { fileIn.close(); return KoFilter::FileNotFound; } - QDomDocument doc ("DOC"); + TQDomDocument doc ("DOC"); KarbonAIParserBase parser; - if (!parser.parse (fileIn, doc)) + if (!parser.parse (*TQT_TQIODEVICE(&fileIn), doc)) { fileIn.close(); return KoFilter::CreationError; } - QString result = doc.toString(); + TQString result = doc.toString(); kdDebug() << result << endl; KoStoreDevice* storeOut = m_chain->storageFile( "root", KoStore::Write ); @@ -88,7 +88,7 @@ AiImport::convert( const QCString& from, const QCString& to ) return KoFilter::StorageCreationError; } - QCString cStr = result.latin1(); + TQCString cStr = result.latin1(); storeOut->writeBlock( cStr, cStr.size() - 1 ); return KoFilter::OK; diff --git a/filters/karbon/ai/aiimport.h b/filters/karbon/ai/aiimport.h index 2ec2d19b..901eba6d 100644 --- a/filters/karbon/ai/aiimport.h +++ b/filters/karbon/ai/aiimport.h @@ -24,20 +24,21 @@ #include "karbonaiparserbase.h" -class QDomElement; -class QTextStream; +class TQDomElement; +class TQTextStream; class AiImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - AiImport( KoFilter* parent, const char* name, const QStringList& ); + AiImport( KoFilter* tqparent, const char* name, const TQStringList& ); virtual ~AiImport(); - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); /* private: - QString m_result; */ + TQString m_result; */ }; diff --git a/filters/karbon/ai/ailexer.cc b/filters/karbon/ai/ailexer.cc index 7b660f7f..a1ab4bda 100644 --- a/filters/karbon/ai/ailexer.cc +++ b/filters/karbon/ai/ailexer.cc @@ -19,7 +19,7 @@ #include <ctype.h> #include <stdlib.h> -#include <qstringlist.h> +#include <tqstringlist.h> #include "ailexer.h" #define CATEGORY_WHITESPACE -1 @@ -173,7 +173,7 @@ AILexer::AILexer(){ AILexer::~AILexer(){ } -bool AILexer::parse (QIODevice& fin){ +bool AILexer::parse (TQIODevice& fin){ char c; m_buffer.clear(); @@ -350,7 +350,7 @@ void AILexer::gotByte (uchar value) { qDebug ( "got byte %d" , value ); } -void AILexer::gotByteArray (const QByteArray &data) { +void AILexer::gotByteArray (const TQByteArray &data) { qDebug ( "got byte array" ); /* for ( uint i = 0; i < data.size(); i++ ) { @@ -413,11 +413,11 @@ void AILexer::doHandleByteArray () uint strIdx = 0; uint arrayIdx = 0; - QByteArray data (m_buffer.length() >> 1); + TQByteArray data (m_buffer.length() >> 1); while (strIdx < m_buffer.length()) { - const QString &item = m_buffer.mid (strIdx, 2); + const TQString &item = m_buffer.mid (strIdx, 2); uchar val = item.toShort(NULL, 16); data[arrayIdx] = val; strIdx += 2; @@ -431,7 +431,7 @@ uchar AILexer::getByte() { // qDebug ("convert string to byte (%s)", m_buffer.latin1()); - QStringList list = QStringList::split ("#", m_buffer.toString()); + TQStringList list = TQStringList::split ("#", m_buffer.toString()); int radix = list[0].toShort(); uchar value = list[1].toShort (NULL, radix); @@ -471,8 +471,8 @@ void StringBuffer::clear(){ m_length = 0; } -QString StringBuffer::toString() const { - QString ret(m_buffer); +TQString StringBuffer::toString() const { + TQString ret(m_buffer); return ret; } @@ -495,12 +495,12 @@ uint StringBuffer::length() { } double StringBuffer::toFloat() { - QString data = toString(); + TQString data = toString(); return data.toFloat(); } int StringBuffer::toInt() { - QString data = toString(); + TQString data = toString(); return data.toInt(); } @@ -508,7 +508,7 @@ const char *StringBuffer::latin1() { return m_buffer; } -QString StringBuffer::mid( uint index, uint len) const { - QString data = toString(); +TQString StringBuffer::mid( uint index, uint len) const { + TQString data = toString(); return data.mid(index,len); } diff --git a/filters/karbon/ai/ailexer.h b/filters/karbon/ai/ailexer.h index c53aab66..c0aaf022 100644 --- a/filters/karbon/ai/ailexer.h +++ b/filters/karbon/ai/ailexer.h @@ -20,8 +20,8 @@ #ifndef AILEXER_H #define AILEXER_H -#include <qiodevice.h> -#include <qstring.h> +#include <tqiodevice.h> +#include <tqstring.h> /** *@author Dirk Schönberger @@ -65,12 +65,12 @@ public: void append (char c); void clear(); - QString toString() const; + TQString toString() const; uint length(); double toFloat(); int toInt(); const char *latin1(); - QString mid( uint index, uint len=0xffffffff) const; + TQString mid( uint index, uint len=0xffffffff) const; private: char *m_buffer; uint m_length; @@ -84,7 +84,7 @@ public: AILexer(); virtual ~AILexer(); - virtual bool parse (QIODevice& fin); + virtual bool parse (TQIODevice& fin); private: State m_curState; StringBuffer m_buffer; @@ -116,7 +116,7 @@ protected: virtual void gotArrayStart (); virtual void gotArrayEnd (); virtual void gotByte (uchar value); - virtual void gotByteArray (const QByteArray &data); + virtual void gotByteArray (const TQByteArray &data); }; #endif diff --git a/filters/karbon/ai/aiparserbase.cc b/filters/karbon/ai/aiparserbase.cc index 63ace734..6e9ff040 100644 --- a/filters/karbon/ai/aiparserbase.cc +++ b/filters/karbon/ai/aiparserbase.cc @@ -20,8 +20,8 @@ #include "aiparserbase.h" #include "ai88handler.h" #include "ai3handler.h" -#include <qregexp.h> -#include <qstringlist.h> +#include <tqregexp.h> +#include <tqstringlist.h> typedef struct { char* op; @@ -204,7 +204,7 @@ AIParserBase::~AIParserBase(){ } -bool AIParserBase::parse (QIODevice& fin){ +bool AIParserBase::parse (TQIODevice& fin){ return AILexer::parse (fin); } @@ -376,13 +376,13 @@ void AIParserBase::handleElement (AIElement &element) if (m_sink == DS_Array) { if (m_debug) qDebug ("in mode array"); - QValueVector<AIElement> &elementArray = m_arrayStack.top(); + TQValueVector<AIElement> &elementArray = m_arrayStack.top(); elementArray.push_back(element); } if (m_sink == DS_Block) { if (m_debug) qDebug ("in mode block"); - QValueVector<AIElement> &elementArray = m_blockStack.top(); + TQValueVector<AIElement> &elementArray = m_blockStack.top(); elementArray.push_back(element); } else @@ -425,7 +425,7 @@ void AIParserBase::gotReference (const char *value) { if (m_ignoring) return; if (value == NULL) value = ""; if (m_debug) qDebug ("reference: %s", value); - QString string(value); + TQString string(value); AIElement element (string, AIElement::Reference); handleElement (element); if (m_debug) qDebug ("/got reference value"); @@ -441,7 +441,7 @@ void AIParserBase::gotByte (uchar value) { if (m_debug) qDebug ("/got byte value"); } -void AIParserBase::gotByteArray (const QByteArray &data) { +void AIParserBase::gotByteArray (const TQByteArray &data) { if (m_ignoring) return; AIElement element (data); handleElement (element); @@ -452,7 +452,7 @@ void AIParserBase::gotArrayStart () { if (m_ignoring) return; if (m_debug) qDebug ("got array start"); - QValueVector<AIElement> array; + TQValueVector<AIElement> array; m_arrayStack.push (array); m_sink = DS_Array; @@ -462,7 +462,7 @@ void AIParserBase::gotBlockStart () { if (m_ignoring) return; if (m_debug) qDebug ("got block start"); - QValueVector<AIElement> array; + TQValueVector<AIElement> array; m_blockStack.push (array); m_sink = DS_Block; @@ -472,7 +472,7 @@ void AIParserBase::gotArrayEnd () { if (m_ignoring) return; if (m_debug) qDebug ("got array end"); - QValueVector<AIElement> stackArray = m_arrayStack.pop(); + TQValueVector<AIElement> stackArray = m_arrayStack.pop(); if (m_arrayStack.empty()) { @@ -491,7 +491,7 @@ void AIParserBase::gotArrayEnd () { else { if (m_debug) qDebug ("put elements to nest stack level"); - QValueVector<AIElement> currentTOS = m_arrayStack.top(); + TQValueVector<AIElement> currentTOS = m_arrayStack.top(); currentTOS.push_back (stackArray); } } @@ -500,7 +500,7 @@ void AIParserBase::gotBlockEnd () { if (m_ignoring) return; if (m_debug) qDebug ("got block end"); - QValueVector<AIElement> stackArray = m_blockStack.pop(); + TQValueVector<AIElement> stackArray = m_blockStack.pop(); if (m_blockStack.empty()) { @@ -519,7 +519,7 @@ void AIParserBase::gotBlockEnd () { else { if (m_debug) qDebug ("put elements to nest stack level"); - QValueVector<AIElement> currentTOS = m_blockStack.top(); + TQValueVector<AIElement> currentTOS = m_blockStack.top(); currentTOS.push_back (stackArray); } } @@ -531,7 +531,7 @@ void AIParserBase::gotBlockEnd () { AIElement elem (m_stack.top()); m_stack.pop(); - const QValueVector<AIElement> aval = elem.toElementArray(); + const TQValueVector<AIElement> aval = elem.toElementArray(); if (m_gstateHandler) m_gstateHandler->gotDash (aval, fval); } */ @@ -553,7 +553,7 @@ void AIParserBase::gotBlockEnd () { AIElement elem (m_stack.top()); m_stack.pop(); - const QValueVector<AIElement> aval = elem.toElementArray(); + const TQValueVector<AIElement> aval = elem.toElementArray(); double ka = getDoubleValue(); double k = getDoubleValue(); @@ -568,7 +568,7 @@ void AIParserBase::gotBlockEnd () { AIElement elem2 (m_stack.top()); m_stack.pop(); - const QString &name = elem2.toString(); + const TQString &name = elem2.toString(); if (m_gstateHandler) m_gstateHandler->gotFillPattern (name.latin1(), px, py, sx, sy, angle, rf, r, k, ka, aval); } */ @@ -577,7 +577,7 @@ void AIParserBase::gotBlockEnd () { AIElement elem (m_stack.top()); m_stack.pop(); - const QValueVector<AIElement> aval = elem.toElementArray(); + const TQValueVector<AIElement> aval = elem.toElementArray(); double ka = getDoubleValue(); double k = getDoubleValue(); @@ -592,7 +592,7 @@ void AIParserBase::gotBlockEnd () { AIElement elem2 (m_stack.top()); m_stack.pop(); - const QString &name = elem2.toString(); + const TQString &name = elem2.toString(); if (m_gstateHandler) m_gstateHandler->gotStrokePattern (name.latin1(), px, py, sx, sy, angle, rf, r, k, ka, aval); } */ @@ -632,7 +632,7 @@ void AIParserBase::gotBlockEnd () { /*Ai88*/ /* void AIParserBase::_handleSetFillColorCustom() { double g = getDoubleValue(); - const QString &name = getStringValue(); + const TQString &name = getStringValue(); double k = getDoubleValue(); double y = getDoubleValue(); double m = getDoubleValue(); @@ -648,7 +648,7 @@ void AIParserBase::_handlePSGet() { m_stack.pop(); m_stack.pop(); - QString name ("xxx"); + TQString name ("xxx"); AIElement ref (name,AIElement::Reference); m_stack.push (ref); } @@ -660,7 +660,7 @@ void AIParserBase::_handlePSExec() { void AIParserBase::_handlePSString() { m_stack.pop(); - QString name ("stringval"); + TQString name ("stringval"); AIElement ref (name,AIElement::Reference); m_stack.push (ref); } @@ -668,13 +668,13 @@ void AIParserBase::_handlePSString() { void AIParserBase::_handlePSBind() { m_stack.pop(); - QString name ("bindentry"); + TQString name ("bindentry"); AIElement ref (name,AIElement::Reference); m_stack.push (ref); } void AIParserBase::_handlePSUserdict() { - QString name ("userdict"); + TQString name ("userdict"); AIElement ref (name,AIElement::Reference); m_stack.push (ref); } @@ -684,7 +684,7 @@ void AIParserBase::_handlePSDict() { m_stack.pop(); m_stack.pop(); - QString name ("dict"); + TQString name ("dict"); AIElement ref (name,AIElement::Reference); m_stack.push (ref); } @@ -699,7 +699,7 @@ void AIParserBase::_handlePSDup() { void AIParserBase::_handlePSBegin() { m_stack.pop(); - QString name ("dictionary begin"); + TQString name ("dictionary begin"); AIElement ref (name,AIElement::Reference); m_stack.push (ref); } @@ -714,7 +714,7 @@ void AIParserBase::_handlePSPut() { AIElement elem (m_stack.top()); m_stack.pop(); - const QValueVector<AIElement> aval = elem.toElementArray(); + const TQValueVector<AIElement> aval = elem.toElementArray(); double ury = getDoubleValue(); double urx = getDoubleValue(); @@ -724,7 +724,7 @@ void AIParserBase::_handlePSPut() { AIElement elem2 (m_stack.top()); m_stack.pop(); - const QString &name = elem2.toString(); + const TQString &name = elem2.toString(); if (m_documentHandler) m_documentHandler->gotPatternDefinition (name.latin1(), aval, llx, lly, urx, ury); } */ @@ -740,7 +740,7 @@ void AIParserBase::_handlePSDef() { /*Ai88*/ /* void AIParserBase::_handleSetStrokeColorCustom() { double g = getDoubleValue(); - const QString &name = getStringValue(); + const TQString &name = getStringValue(); double k = getDoubleValue(); double y = getDoubleValue(); double m = getDoubleValue(); @@ -763,22 +763,22 @@ void AIParserBase::_handleDocumentCustomColors(const char *) { void AIParserBase::_handleDocumentNeededResources(const char *data) { if (!data) return; - QStringList items = QStringList::split (' ', data); + TQStringList items = TQStringList::split (' ', data); - QString itemType = items[1]; - QString name = items[2]; - QString version = items[3]; - QString release = items[4]; + TQString itemType = items[1]; + TQString name = items[2]; + TQString version = items[3]; + TQString release = items[4]; } void AIParserBase::_handleIncludeResource(const char *data) { if (!data) return; - QStringList items = QStringList::split (' ', data); + TQStringList items = TQStringList::split (' ', data); - QString itemType = items[1]; - QString name = items[2]; - QString version = items[3]; - QString release = items[4]; + TQString itemType = items[1]; + TQString name = items[2]; + TQString version = items[3]; + TQString release = items[4]; m_modules.push_back (name); } @@ -787,20 +787,20 @@ void AIParserBase::_handleDocumentProcessColors(const char *data) { if (!data) return; int colorSet = 0; - QString tmp (data); + TQString tmp (data); signed int index; - index = tmp.find ("Cyan"); + index = tmp.tqfind ("Cyan"); if (index > 0) colorSet |= PC_Cyan; - index = tmp.find ("Magenta"); + index = tmp.tqfind ("Magenta"); if (index > 0) colorSet |= PC_Magenta; - index = tmp.find ("Yellow"); + index = tmp.tqfind ("Yellow"); if (index > 0) colorSet |= PC_Yellow; - index = tmp.find ("Black"); + index = tmp.tqfind ("Black"); if (index > 0) colorSet |= PC_Black; if (m_documentHandler) m_documentHandler->gotProcessColors (colorSet); @@ -813,7 +813,7 @@ void AIParserBase::_handleCMYKCustomColor(const char *) { AIElement elem2 (m_stack.top()); m_stack.pop(); - const QString &name = elem2.toString(); + const TQString &name = elem2.toString(); int ury = getIntValue(); int urx = getIntValue(); @@ -823,7 +823,7 @@ void AIParserBase::_handleCMYKCustomColor(const char *) { AIElement elem (m_stack.top()); m_stack.pop(); - const QValueVector<AIElement> aval = elem.toElementArray(); + const TQValueVector<AIElement> aval = elem.toElementArray(); if (m_embeddedHandler) m_embeddedHandler->gotGsaveIncludeDocument (aval, llx,lly,urx,ury,name.latin1()); } */ @@ -849,7 +849,7 @@ void AIParserBase::_handleCMYKCustomColor(const char *) { AIElement elem2 (m_stack.top()); m_stack.pop(); - const QString &fontname = elem2.toReference(); + const TQString &fontname = elem2.toReference(); if (m_textHandler) m_textHandler->gotFontDefinition (fontname.latin1(), size, leading, kerning, ta); } */ @@ -859,7 +859,7 @@ void AIParserBase::_handleCMYKCustomColor(const char *) { qDebug ("to element is (%s)",elem.typeName()); m_stack.pop(); - const QValueVector<AIElement> aval = elem.toElementArray(); + const TQValueVector<AIElement> aval = elem.toElementArray(); if (m_textHandler) m_textHandler->gotTextBlockBegin (aval, to); } */ @@ -868,7 +868,7 @@ void AIParserBase::_handleCMYKCustomColor(const char *) { AIElement elem (m_stack.top()); m_stack.pop(); - const QString &text = elem.toString(); + const TQString &text = elem.toString(); int length = -1; @@ -888,11 +888,11 @@ void AIParserBase::_handleCreationDate (const char *data) { if (!data) return; - QRegExp test ("\\((.+)\\) \\((.+)\\)"); + TQRegExp test ("\\((.+)\\) \\((.+)\\)"); if (test.search (data)) { - QString val1 = test.cap(1); - QString val2 = test.cap(2); + TQString val1 = test.cap(1); + TQString val2 = test.cap(2); if (m_documentHandler) m_documentHandler->gotCreationDate (val1.latin1(),val2.latin1()); } @@ -907,7 +907,7 @@ void AIParserBase::gotToken (const char *value) { if (m_sink == DS_Array) { if (m_debug) qDebug ("token in array"); - QString op (value); + TQString op (value); AIElement realElement (op, AIElement::Operator); handleElement (realElement); @@ -916,7 +916,7 @@ void AIParserBase::gotToken (const char *value) { if (m_sink == DS_Block) { if (m_debug) qDebug ("token in block"); - QString op (value); + TQString op (value); AIElement realElement (op, AIElement::Operator); handleElement (realElement); @@ -943,9 +943,9 @@ void AIParserBase::gotToken (const char *value) { } qWarning ( "unknown operator: %s", value ); - QString string(value); + TQString string(value); - if (m_modules.findIndex(string) != -1) + if (m_modules.tqfindIndex(string) != -1) { AIElement element (string, AIElement::Reference); handleElement (element); @@ -1019,13 +1019,13 @@ const bool AIParserBase::getBoolValue(void) { return getIntValue() == 1; } -const QString AIParserBase::getStringValue(void) { +const TQString AIParserBase::getStringValue(void) { const AIElement &elem = m_stack.pop(); return elem.toString(); } -const QString AIParserBase::getOperatorValue(void) { +const TQString AIParserBase::getOperatorValue(void) { const AIElement &elem = m_stack.pop(); return elem.toOperator(); @@ -1034,7 +1034,7 @@ const QString AIParserBase::getOperatorValue(void) { AIOperation AIParserBase::getAIOperation (const char *operand) { int i=0; - QString cmpValue (operand); + TQString cmpValue (operand); for(;;) { AIOperationMapping map = aiMappings[i]; if (map.op == NULL) return AIO_Other; @@ -1047,7 +1047,7 @@ AIOperation AIParserBase::getAIOperation (const char *operand) PSOperation AIParserBase::getPSOperation (const char *operand) { int i=0; - QString cmpValue (operand); + TQString cmpValue (operand); for(;;) { PSOperationMapping map = psMappings[i]; if (map.op == NULL) return PSO_Other; @@ -1058,7 +1058,7 @@ PSOperation AIParserBase::getPSOperation (const char *operand) } CommentOperation AIParserBase::getCommentOperation (const char *command) { - QString data (command); + TQString data (command); signed int index; @@ -1067,28 +1067,28 @@ CommentOperation AIParserBase::getCommentOperation (const char *command) { for(;;) { CommentOperationMapping map = commentMappings[i]; if (map.op == NULL) return CO_Other; - index = data.find (map.op); + index = data.tqfind (map.op); if (index >= 0) return map.action; i++; } } -void GStateHandlerBase::gotFillPattern (const char *pname, double px, double py, double sx, double sy, double angle, double rf, double r, double k, double ka, const QValueVector<AIElement>& transformData) { +void GStateHandlerBase::gotFillPattern (const char *pname, double px, double py, double sx, double sy, double angle, double rf, double r, double k, double ka, const TQValueVector<AIElement>& transformData) { qDebug ( "got fill pattern %s %f %f %f %f %f %f %f %f %f", pname, px, py, sx, sy, angle, rf, r, k, ka); arraytoa (transformData); qDebug ("/got fill pattern"); } -void GStateHandlerBase::gotStrokePattern (const char *pname, double px, double py, double sx, double sy, double angle, double rf, double r, double k, double ka, const QValueVector<AIElement>& transformData) { +void GStateHandlerBase::gotStrokePattern (const char *pname, double px, double py, double sx, double sy, double angle, double rf, double r, double k, double ka, const TQValueVector<AIElement>& transformData) { qDebug ( "got stroke pattern %s %f %f %f %f %f %f %f %f %f", pname, px, py, sx, sy, angle, rf, r, k, ka); arraytoa (transformData); qDebug ("/got stroke pattern"); } const char *AIParserBase::getValue (const char *input) { - QString data(input); + TQString data(input); - signed int index = data.find (':'); + signed int index = data.tqfind (':'); if (index < 0) return ""; index++; while (data.at(index) == ' ') index++; @@ -1098,9 +1098,9 @@ const char *AIParserBase::getValue (const char *input) { bool AIParserBase::getRectangle (const char* input, int &llx, int &lly, int &urx, int &ury) { if (input == NULL) return false; - QString s(input); - if (s.contains ("(atend)")) return false; - QStringList values = QStringList::split (" ", input); + TQString s(input); + if (s.tqcontains ("(atend)")) return false; + TQStringList values = TQStringList::split (" ", input); if (values.size() < 5) return false; llx = values[1].toInt(); lly = values[2].toInt(); @@ -1113,8 +1113,8 @@ bool AIParserBase::getRectangle (const char* input, int &llx, int &lly, int &urx bool AIParserBase::getPoint (const char* input, int &x, int &y) { if (input == NULL) return false; - QString s(input); - QStringList values = QStringList::split (" ", input); + TQString s(input); + TQStringList values = TQStringList::split (" ", input); if (values.size() < 3) return false; @@ -1139,20 +1139,20 @@ void AIParserBase::cleanupArrays() AIElement elem (m_stack.top()); m_stack.pop(); - const QString &oldFont = elem.toReference(); + const TQString &oldFont = elem.toReference(); AIElement elem2 (m_stack.top()); m_stack.pop(); - const QString &newFont = elem2.toReference(); + const TQString &newFont = elem2.toReference(); AIElement elem3 (m_stack.top()); m_stack.pop(); - const QValueVector<AIElement> encodingData = elem3.toElementArray(); + const TQValueVector<AIElement> encodingData = elem3.toElementArray(); if (m_textHandler) m_textHandler->gotFontEncoding (encodingData, oldFont.latin1(), newFont.latin1()); } */ -void TextHandlerBase::gotFontEncoding (const QValueVector<AIElement>& encodingData, const char*oldFontName, const char*newFontName) +void TextHandlerBase::gotFontEncoding (const TQValueVector<AIElement>& encodingData, const char*oldFontName, const char*newFontName) { qDebug ("font encoding %s to %s",oldFontName, newFontName); arraytoa (encodingData); @@ -1164,7 +1164,7 @@ void TextHandlerBase::gotFontDefinition (const char*fontName, double size, doubl qDebug ("font definition: name %s size %f leading %f kerning %f align %d", fontName, size, leading, kerning, align); } -void TextHandlerBase::gotTextBlockBegin (const QValueVector<AIElement>& transData, TextOperation mode) +void TextHandlerBase::gotTextBlockBegin (const TQValueVector<AIElement>& transData, TextOperation mode) { qDebug ("text block begin %d",mode); arraytoa (transData); @@ -1213,7 +1213,7 @@ const void elementtoa (const AIElement &/*data*/) } */ } -const void arraytoa (const QValueVector<AIElement> &/*data*/) +const void arraytoa (const TQValueVector<AIElement> &/*data*/) { /* qDebug ("array size is %d ",data.size()); if (data.size() > 0) @@ -1227,7 +1227,7 @@ const void arraytoa (const QValueVector<AIElement> &/*data*/) } */ } -const void stacktoa (const QValueStack<AIElement> &/*data*/) +const void stacktoa (const TQValueStack<AIElement> &/*data*/) { /* qDebug ("stack size is %d",data.size()); if (data.size() > 0) @@ -1241,7 +1241,7 @@ const void stacktoa (const QValueStack<AIElement> &/*data*/) qDebug (">>>>>>>>>>>>>>>>>>"); */ } -const void stacktoa2 (const QValueStack<QValueVector<AIElement> >&/*data*/) +const void stacktoa2 (const TQValueStack<TQValueVector<AIElement> >&/*data*/) { /* qDebug ("stack size is %d",data.size()); diff --git a/filters/karbon/ai/aiparserbase.h b/filters/karbon/ai/aiparserbase.h index 8d2633f3..14c00a14 100644 --- a/filters/karbon/ai/aiparserbase.h +++ b/filters/karbon/ai/aiparserbase.h @@ -22,19 +22,19 @@ #include "ailexer.h" -#include <qstring.h> -#include <qvaluestack.h> -#include <qvaluevector.h> -#include <qvaluelist.h> +#include <tqstring.h> +#include <tqvaluestack.h> +#include <tqvaluevector.h> +#include <tqvaluelist.h> #include "aielement.h" #include "aicolor.h" -const void arraytoa (const QValueVector<AIElement> &data); +const void arraytoa (const TQValueVector<AIElement> &data); const void elementtoa (const AIElement &data); -const void stacktoa (const QValueStack<AIElement> &data); -const void stacktoa2 (const QValueStack<QValueVector<AIElement> >&data); +const void stacktoa (const TQValueStack<AIElement> &data); +const void stacktoa2 (const TQValueStack<TQValueVector<AIElement> >&data); class GStateHandlerBase; class StructureHandlerBase; @@ -209,9 +209,9 @@ typedef enum { #define PatternTileFilledDefiniton "_" #define TextSizeUnknown -1 -/* typedef QValueVector<AElement> ElementArray; -typedef QValueStack<AIElement> ElementStack; -typedef QValueStack<ElementArray> ElementArrayStack; */ +/* typedef TQValueVector<AElement> ElementArray; +typedef TQValueStack<AIElement> ElementStack; +typedef TQValueStack<ElementArray> ElementArrayStack; */ typedef struct { PathElementType petype; @@ -234,19 +234,19 @@ protected: bool m_debug; private: bool m_ignoring; - QValueStack<AIElement> m_stack; - QValueStack<QValueVector<AIElement> > m_arrayStack; - QValueStack<QValueVector<AIElement> > m_blockStack; + TQValueStack<AIElement> m_stack; + TQValueStack<TQValueVector<AIElement> > m_arrayStack; + TQValueStack<TQValueVector<AIElement> > m_blockStack; DataSink m_sink; - QValueList<QString> m_modules; + TQValueList<TQString> m_modules; ContinuationMode m_continuationMode; const double getDoubleValue(void); const int getIntValue(void); const bool getBoolValue(void); - const QString getStringValue(void); - const QString& getReferenceValue(void); - const QString getOperatorValue(void); + const TQString getStringValue(void); + const TQString& getReferenceValue(void); + const TQString getOperatorValue(void); /*Ai88*/ // void _handleSetDash(); /*Ai88*/ // void _handleGsaveIncludeDocument(); @@ -308,7 +308,7 @@ protected: void gotArrayStart (); void gotArrayEnd (); void gotByte (uchar value); - void gotByteArray (const QByteArray &data); + void gotByteArray (const TQByteArray &data); GStateHandlerBase *m_gstateHandler; StructureHandlerBase *m_structureHandler; @@ -328,7 +328,7 @@ public: AIParserBase(); ~AIParserBase(); - bool parse (QIODevice& fin); + bool parse (TQIODevice& fin); }; const void aiotoa (AIOperation &data); @@ -342,15 +342,15 @@ class GStateHandlerBase virtual void gotFillColor (AIColor &) {} virtual void gotStrokeColor (AIColor &) {} - virtual void gotFillPattern (const char *pname, double px, double py, double sx, double sy, double angle, double rf, double r, double k, double ka, const QValueVector<AIElement>& transformData); - virtual void gotStrokePattern (const char *pname, double px, double py, double sx, double sy, double angle, double rf, double r, double k, double ka, const QValueVector<AIElement>& transformData); + virtual void gotFillPattern (const char *pname, double px, double py, double sx, double sy, double angle, double rf, double r, double k, double ka, const TQValueVector<AIElement>& transformData); + virtual void gotStrokePattern (const char *pname, double px, double py, double sx, double sy, double angle, double rf, double r, double k, double ka, const TQValueVector<AIElement>& transformData); virtual void gotFlatness (double) {} virtual void gotLineWidth (double) {} virtual void gotLineCaps (int) {} virtual void gotLineJoin (int) {} virtual void gotMiterLimit (double) {} virtual void gotWindingOrder (int) {} - virtual void gotDash (const QValueVector<AIElement>& /*dashData*/, double /*phase*/) {} + virtual void gotDash (const TQValueVector<AIElement>& /*dashData*/, double /*phase*/) {} }; class StructureHandlerBase { @@ -401,7 +401,7 @@ class DocumentHandlerBase { virtual void gotTemplate (const char *) {} virtual void gotTitle (const char *) {} virtual void gotCreator (const char *) {} - virtual void gotPatternDefinition (const char */*name*/, const QValueVector<AIElement>& /*layerData*/, double /*llx*/, double /*lly*/, double /*urx*/, double /*ury*/) {} + virtual void gotPatternDefinition (const char */*name*/, const TQValueVector<AIElement>& /*layerData*/, double /*llx*/, double /*lly*/, double /*urx*/, double /*ury*/) {} virtual void gotCreationDate (const char */*val1*/,const char */*val2*/) {} virtual void gotProcessColors (int /*colors*/) {} }; @@ -420,7 +420,7 @@ class EmbeddedHandlerBase { EmbeddedHandlerBase() {} virtual ~EmbeddedHandlerBase() {} - virtual void gotGsaveIncludeDocument (const QValueVector<AIElement>& /*transData*/, int /*llx*/, int /*lly*/, int /*urx*/, int /*ury*/, const char*/*fileName*/) {} + virtual void gotGsaveIncludeDocument (const TQValueVector<AIElement>& /*transData*/, int /*llx*/, int /*lly*/, int /*urx*/, int /*ury*/, const char*/*fileName*/) {} virtual void gotGrestore () {} }; @@ -429,9 +429,9 @@ class TextHandlerBase { TextHandlerBase() {} virtual ~TextHandlerBase() {} - virtual void gotFontEncoding (const QValueVector<AIElement>& encodingData, const char*oldFontName, const char*newFontName); + virtual void gotFontEncoding (const TQValueVector<AIElement>& encodingData, const char*oldFontName, const char*newFontName); virtual void gotFontDefinition (const char*fontName, double size, double leading, double kerning, TextAlign align); - virtual void gotTextBlockBegin (const QValueVector<AIElement>& transData, TextOperation mode); + virtual void gotTextBlockBegin (const TQValueVector<AIElement>& transData, TextOperation mode); virtual void gotTextOutput (const char*text, int length=-1); virtual void gotTextBlockEnd (); }; diff --git a/filters/karbon/ai/karbonaiparserbase.cc b/filters/karbon/ai/karbonaiparserbase.cc index 8c2b5a5f..77945723 100644 --- a/filters/karbon/ai/karbonaiparserbase.cc +++ b/filters/karbon/ai/karbonaiparserbase.cc @@ -25,7 +25,7 @@ #include <core/vclipgroup.h> #include <core/vvisitor.h> #include "aicolor.h" -#include <qwmatrix.h> +#include <tqwmatrix.h> #include <commands/vtransformcmd.h> #include <KoPageLayout.h> @@ -90,7 +90,7 @@ void KarbonAIParserBase::parsingFinished(){ if (m_bbox.height() > 0. ) m_document->setHeight (m_bbox.height()); -/* QWMatrix matrix; +/* TQWMatrix matrix; matrix.translate (-m_bbox.x(),-m_bbox.y()); VTransformNodes translator (matrix); @@ -101,8 +101,8 @@ void KarbonAIParserBase::parsingFinished(){ } // generic -QString KarbonAIParserBase::getParamList(Parameters& params){ - QString data(""); +TQString KarbonAIParserBase::getParamList(Parameters& params){ + TQString data(""); Parameter *param; @@ -450,7 +450,7 @@ void KarbonAIParserBase::doOutputCurrentPath2(PathOutputType type) m_curKarbonPath = new VPath( 0L ); } -bool KarbonAIParserBase::parse (QIODevice& fin, QDomDocument &doc) +bool KarbonAIParserBase::parse (TQIODevice& fin, TQDomDocument &doc) { bool res = AIParserBase::parse (fin); @@ -461,7 +461,7 @@ bool KarbonAIParserBase::parse (QIODevice& fin, QDomDocument &doc) qDebug ("before save document"); doc = m_document->saveXML(); // add paper info, we always need custom for svg (Rob) - QDomElement paper = doc.createElement( "PAPER" ); + TQDomElement paper = doc.createElement( "PAPER" ); doc.documentElement().appendChild( paper ); paper.setAttribute( "format", PG_CUSTOM ); paper.setAttribute( "width", m_document->width() ); @@ -471,7 +471,7 @@ bool KarbonAIParserBase::parse (QIODevice& fin, QDomDocument &doc) } else { - QDomDocument tempDoc; + TQDomDocument tempDoc; doc = tempDoc; } diff --git a/filters/karbon/ai/karbonaiparserbase.h b/filters/karbon/ai/karbonaiparserbase.h index 4b6f05a9..160fdc20 100644 --- a/filters/karbon/ai/karbonaiparserbase.h +++ b/filters/karbon/ai/karbonaiparserbase.h @@ -21,9 +21,9 @@ #define KARBONAIPARSERBASE_H #include <aiparserbase.h> -#include <qptrlist.h> -#include <qstring.h> -#include <qpair.h> +#include <tqptrlist.h> +#include <tqstring.h> +#include <tqpair.h> #include "aicolor.h" @@ -34,16 +34,16 @@ #include <core/vgroup.h> #include <core/vfill.h> #include <core/vstroke.h> -#include <qdom.h> +#include <tqdom.h> -#include <qptrstack.h> +#include <tqptrstack.h> /** *@author */ -typedef QPair<QString,QString> Parameter; -typedef QPtrList<Parameter> Parameters; -typedef QPtrList<PathElement> PathElements; +typedef TQPair<TQString,TQString> Parameter; +typedef TQPtrList<Parameter> Parameters; +typedef TQPtrList<PathElement> PathElements; typedef enum { POT_Filled = 1, POT_Stroked = 2, POT_FilledStroked = 3, POT_Clip = 4, POT_Ignore = 8, POT_Leave = -1, POT_Other = 0 } PathOutputType; typedef enum { PTT_Output = 1, PTT_Combine = 2 } PathTransferType; @@ -132,13 +132,13 @@ public: KarbonAIParserBase(); ~KarbonAIParserBase(); - bool parse (QIODevice& fin, QDomDocument &doc); + bool parse (TQIODevice& fin, TQDomDocument &doc); private: VPath *m_curKarbonPath; VDocument *m_document; VLayer *m_layer; VPath *m_combination; - QPtrStack<VGroup> m_groupStack; + TQPtrStack<VGroup> m_groupStack; FillMode m_fm; PathOutputType m_pot; @@ -171,7 +171,7 @@ protected: void parsingStarted(); void parsingFinished(); - QString getParamList(Parameters& params); + TQString getParamList(Parameters& params); void gotPathElement (PathElement &element); void gotFillPath (bool closed, bool reset, FillMode fm = FM_NonZero); diff --git a/filters/karbon/applixgraphics/applixgraphicimport.cc b/filters/karbon/applixgraphics/applixgraphicimport.cc index 2ee52685..8a433ec9 100644 --- a/filters/karbon/applixgraphics/applixgraphicimport.cc +++ b/filters/karbon/applixgraphics/applixgraphicimport.cc @@ -25,9 +25,9 @@ #endif #include <kdebug.h> -#include <qfile.h> -#include <qtextstream.h> -#include <qmessagebox.h> +#include <tqfile.h> +#include <tqtextstream.h> +#include <tqmessagebox.h> #include <KoFilterChain.h> #include <kgenericfactory.h> #include <math.h> @@ -115,7 +115,7 @@ applixGraphicsRect::applixGraphicsRect() : applixGraphicsLine() * * * * ******************************************************************************/ -APPLIXGRAPHICImport::APPLIXGRAPHICImport (KoFilter *, const char *, const QStringList&) : +APPLIXGRAPHICImport::APPLIXGRAPHICImport (KoFilter *, const char *, const TQStringList&) : KoFilter () { @@ -133,7 +133,7 @@ APPLIXGRAPHICImport::APPLIXGRAPHICImport (KoFilter *, const char *, const QStrin * * * * ******************************************************************************/ -KoFilter::ConversionStatus APPLIXGRAPHICImport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus APPLIXGRAPHICImport::convert( const TQCString& from, const TQCString& to ) { // Check MIME Types @@ -141,7 +141,7 @@ KoFilter::ConversionStatus APPLIXGRAPHICImport::convert( const QCString& from, c return KoFilter::NotImplemented; // Open Inputfile - QFile in (m_chain->inputFile()); + TQFile in (m_chain->inputFile()); if (!in.open (IO_ReadOnly) ) { kdError(30502) << "Unable to open input file!" << endl; @@ -149,21 +149,21 @@ KoFilter::ConversionStatus APPLIXGRAPHICImport::convert( const QCString& from, c return KoFilter::FileNotFound; } - QString str; + TQString str; // Create karbon header str += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; str += "<!DOCTYPE karbon>\n"; str += " <karbon mime=\"application/x-karbon\" version=\"2\" editor=\"APPLIXGRAPHICS import filter\">\n"; // str += " <head>\n"; -// str += " <layout width=\"210\" lmargin=\"0\" format=\"a4\" bmargin=\"0\" height=\"297\" rmargin=\"0\" tmargin=\"0\" orientation=\"portrait\"/>\n"; +// str += " <tqlayout width=\"210\" lmargin=\"0\" format=\"a4\" bmargin=\"0\" height=\"297\" rmargin=\"0\" tmargin=\"0\" orientation=\"portrait\"/>\n"; // str += " <grid dx=\"20\" dy=\"20\" align=\"0\">\n"; // str += " <helplines align=\"0\"/>\n"; // str += " </grid>\n"; // str += " </head>\n"; str += " <layer name=\"ag-layer\" visible=\"1\">\n"; - QTextStream stream(&in); + TQTextStream stream(&in); int step = in.size()/50; int value = 0; int i = 0; @@ -171,7 +171,7 @@ KoFilter::ConversionStatus APPLIXGRAPHICImport::convert( const QCString& from, c int pos = 0; int vers[3] = { 0, 0, 0 }; int rueck; // Check scanf inputs - QString mystr; + TQString mystr; // Read Headline mystr = stream.readLine (); @@ -186,13 +186,13 @@ KoFilter::ConversionStatus APPLIXGRAPHICImport::convert( const QCString& from, c kdDebug (s_area) << "Header not correkt - May be it is not an applixgraphics file" << endl; kdDebug (s_area) << "Headerline: " << mystr << endl; - QMessageBox::critical (0L, "Applixgraphics header problem", - QString ("The Applixgraphics header is not correct. " + TQMessageBox::critical (0L, "Applixgraphics header problem", + TQString ("The Applixgraphics header is not correct. " "May be it is not an applixgraphics file! <BR>" - "This is the header line I did read:<BR><B>%1</B>").arg(mystr.latin1()), + "This is the header line I did read:<BR><B>%1</B>").tqarg(mystr.latin1()), "Comma"); - // i18n( "What is the separator used in this file ? First line is \n%1" ).arg(firstLine), + // i18n( "What is the separator used in this file ? First line is \n%1" ).tqarg(firstLine), return KoFilter::StupidError; } @@ -231,11 +231,11 @@ KoFilter::ConversionStatus APPLIXGRAPHICImport::convert( const QCString& from, c //mystr.remove (0, 7); - //remove_pos = mystr.find ('('); + //remove_pos = mystr.tqfind ('('); //mystr.remove (0, remove_pos); //agLine.offX= mystr.toInt(); - //remove_pos = mystr.find (','); + //remove_pos = mystr.tqfind (','); //mystr.remove (0, remove_pos); //agLine.offY= mystr.toInt(); rueck = sscanf ((const char *) mystr.latin1(), "(%d,%d)", @@ -301,16 +301,16 @@ KoFilter::ConversionStatus APPLIXGRAPHICImport::convert( const QCString& from, c str += " <polyline arrow1=\"0\" arrow2=\"0\" >\n"; // str += " <point x=\"" + agLine.ptX[0] + "\" y=\"" + agLine.ptY[0] + "\" />"; str += " <point x=\"" ; - str += QString::number ((agLine.ptX[0] + agLine.offX)/FAKTOR); + str += TQString::number ((agLine.ptX[0] + agLine.offX)/FAKTOR); str += "\" y=\""; - str += QString::number ((agLine.ptY[0] + agLine.offY)/FAKTOR); + str += TQString::number ((agLine.ptY[0] + agLine.offY)/FAKTOR); str += "\" />\n"; // str += " <point x=\"" + agLine.ptX[1] + "\" y=\"" + agLine.ptY[1] + "\" />"; str += " <point x=\""; - str += QString::number ((agLine.ptX[1] + agLine.offX)/FAKTOR); + str += TQString::number ((agLine.ptX[1] + agLine.offX)/FAKTOR); str += "\" y=\""; - str += QString::number ((agLine.ptY[1] + agLine.offY)/FAKTOR); + str += TQString::number ((agLine.ptY[1] + agLine.offY)/FAKTOR); str += "\" />\n"; str += " <gobject fillstyle=\"0\" linewidth=\"1\" strokecolor=\"#000000\" strokestyle=\"1\" >\n"; str += " <matrix dx=\"0\" dy=\"0\" m21=\"0\" m22=\"1\" m11=\"1\" m12=\"0\" />\n"; @@ -411,8 +411,8 @@ KoFilter::ConversionStatus APPLIXGRAPHICImport::convert( const QCString& from, c b = agLine.ptY[2] / 2; for (int i=0; i<nsides; i++) { - x[i] = qRound (a * cos (wink*M_PI/180)); - y[i] = qRound (b * sin (wink*M_PI/180)); + x[i] = tqRound (a * cos (wink*M_PI/180)); + y[i] = tqRound (b * sin (wink*M_PI/180)); wink += (360/nsides); } @@ -421,9 +421,9 @@ KoFilter::ConversionStatus APPLIXGRAPHICImport::convert( const QCString& from, c for (int i=0; i<nsides; i++) { str += " <point x=\"" ; - str += QString::number ((x[i] + agLine.offX)/FAKTOR); + str += TQString::number ((x[i] + agLine.offX)/FAKTOR); str += "\" y=\""; - str += QString::number ((y[i] + agLine.offY)/FAKTOR); + str += TQString::number ((y[i] + agLine.offY)/FAKTOR); str += "\" />\n"; } @@ -514,9 +514,9 @@ KoFilter::ConversionStatus APPLIXGRAPHICImport::convert( const QCString& from, c // Werte in die Struktur einlagern str += " <text "; str += "x=\"" ; - str += QString::number (agText.offX); + str += TQString::number (agText.offX); str += "\" y=\"" ; - str += QString::number (agText.offY); + str += TQString::number (agText.offY); str += "\" >\n"; str += " <![CDATA[" + agText.str; str += "]]>\n"; @@ -672,38 +672,38 @@ KoFilter::ConversionStatus APPLIXGRAPHICImport::convert( const QCString& from, c // Werte in die Struktur einlagern str += " <rectangle "; str += "x=\"" ; - str += QString::number ((agRect.offX)/FAKTOR); + str += TQString::number ((agRect.offX)/FAKTOR); str += "\" y=\""; - str += QString::number ((agRect.offY)/FAKTOR); + str += TQString::number ((agRect.offY)/FAKTOR); str += "\" width=\"" ; - str += QString::number ((agRect.ptX[2])/FAKTOR); + str += TQString::number ((agRect.ptX[2])/FAKTOR); str += "\" height=\""; - str += QString::number ((agRect.ptY[2])/FAKTOR); + str += TQString::number ((agRect.ptY[2])/FAKTOR); str += "\" >\n"; str += " <polyline arrow1=\"0\" arrow2=\"0\" >\n"; str += " <point x=\"" ; - str += QString::number ((agRect.ptX[0] + agRect.offX)/FAKTOR) ; + str += TQString::number ((agRect.ptX[0] + agRect.offX)/FAKTOR) ; str += "\" y=\"" ; - str += QString::number ((agRect.ptY[0] + agRect.offY)/FAKTOR) ; + str += TQString::number ((agRect.ptY[0] + agRect.offY)/FAKTOR) ; str += "\" />\n"; str += " <point x=\"" ; - str += QString::number ((agRect.ptX[0] + agRect.ptX[2] + agRect.offX)/FAKTOR) ; + str += TQString::number ((agRect.ptX[0] + agRect.ptX[2] + agRect.offX)/FAKTOR) ; str += "\" y=\"" ; - str += QString::number ((agRect.ptY[0] + agRect.offY)/FAKTOR) ; + str += TQString::number ((agRect.ptY[0] + agRect.offY)/FAKTOR) ; str += "\" />\n"; str += " <point x=\"" ; - str += QString::number ((agRect.ptX[0] + agRect.ptX[2] + agRect.offX)/FAKTOR) ; + str += TQString::number ((agRect.ptX[0] + agRect.ptX[2] + agRect.offX)/FAKTOR) ; str += "\" y=\"" ; - str += QString::number ((agRect.ptY[0] + agRect.ptY[2] + agRect.offY)/FAKTOR) ; + str += TQString::number ((agRect.ptY[0] + agRect.ptY[2] + agRect.offY)/FAKTOR) ; str += "\" />\n"; str += " <point x=\"" ; - str += QString::number ((agRect.ptX[0] + agRect.offX)/FAKTOR) ; + str += TQString::number ((agRect.ptX[0] + agRect.offX)/FAKTOR) ; str += "\" y=\"" ; - str += QString::number ((agRect.ptY[0] + agRect.ptY[2] + agRect.offY)/FAKTOR) ; + str += TQString::number ((agRect.ptY[0] + agRect.ptY[2] + agRect.offY)/FAKTOR) ; str += "\" />\n"; @@ -818,7 +818,7 @@ KoFilter::ConversionStatus APPLIXGRAPHICImport::convert( const QCString& from, c return KoFilter::StorageCreationError; } - QCString cstring = str.utf8(); + TQCString cstring = str.utf8(); out->writeBlock ( (const char*)cstring, cstring.size() - 1 ); in.close (); diff --git a/filters/karbon/applixgraphics/applixgraphicimport.h b/filters/karbon/applixgraphics/applixgraphicimport.h index a65e26db..4b25471d 100644 --- a/filters/karbon/applixgraphics/applixgraphicimport.h +++ b/filters/karbon/applixgraphics/applixgraphicimport.h @@ -26,12 +26,13 @@ class APPLIXGRAPHICImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - APPLIXGRAPHICImport (KoFilter *parent, const char *name, const QStringList&); + APPLIXGRAPHICImport (KoFilter *tqparent, const char *name, const TQStringList&); virtual ~APPLIXGRAPHICImport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; @@ -47,7 +48,7 @@ class applixGraphicsLine int thickNess; int ptX[5]; int ptY[5]; - QString str; + TQString str; applixGraphicsLine (); // Constructor }; diff --git a/filters/karbon/eps/epsexport.cc b/filters/karbon/eps/epsexport.cc index 8ded1772..e1bd06a5 100644 --- a/filters/karbon/eps/epsexport.cc +++ b/filters/karbon/eps/epsexport.cc @@ -17,13 +17,13 @@ * Boston, MA 02110-1301, USA. */ -#include <qapplication.h> -#include <qcstring.h> -#include <qdatetime.h> // For creation date/time. -#include <qdom.h> -#include <qfile.h> -#include <qstring.h> -#include <qvaluelist.h> +#include <tqapplication.h> +#include <tqcstring.h> +#include <tqdatetime.h> // For creation date/time. +#include <tqdom.h> +#include <tqfile.h> +#include <tqstring.h> +#include <tqvaluelist.h> #include <kdebug.h> #include <kgenericfactory.h> @@ -82,13 +82,13 @@ protected: K_EXPORT_COMPONENT_FACTORY( libkarbonepsexport, EpsExportFactory() ) -EpsExport::EpsExport( KoFilter*, const char*, const QStringList& ) +EpsExport::EpsExport( KoFilter*, const char*, const TQStringList& ) : KoFilter(), m_exportHidden( true ) { } -KoFilter::ConversionStatus -EpsExport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus +EpsExport::convert( const TQCString& from, const TQCString& to ) { if ( to != "image/x-eps" || from != "application/x-karbon" ) { @@ -102,12 +102,12 @@ EpsExport::convert( const QCString& from, const QCString& to ) return KoFilter::StupidError; - KoFilter::ConversionStatus status = KoFilter::OK; + KoFilter::ConversiontqStatus status = KoFilter::OK; // Ask questions about PS level etc. EpsExportDlg* dialog = new EpsExportDlg(); - QApplication::setOverrideCursor( Qt::arrowCursor ); + TQApplication::setOverrideCursor( TQt::arrowCursor ); if( dialog->exec() ) { @@ -115,20 +115,20 @@ EpsExport::convert( const QCString& from, const QCString& to ) m_psLevel = dialog->psLevel() + 1; m_exportHidden = dialog->exportHidden(); - QFile fileOut( m_chain->outputFile() ); + TQFile fileOut( m_chain->outputFile() ); if( !fileOut.open( IO_WriteOnly ) ) { - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); delete( dialog ); return KoFilter::StupidError; } - QDomDocument domIn; + TQDomDocument domIn; domIn.setContent( storeIn ); - QDomElement docNode = domIn.documentElement(); + TQDomElement docNode = domIn.documentElement(); - m_stream = new QTextStream( &fileOut ); + m_stream = new TQTextStream( &fileOut ); // Load the document. VDocument doc; @@ -146,7 +146,7 @@ EpsExport::convert( const QCString& from, const QCString& to ) status = KoFilter::UserCancelled; } - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); delete( dialog ); return status; @@ -165,11 +165,11 @@ EpsExport::visitVDocument( VDocument& document ) "%!PS-Adobe-3.0 EPSF-3.0\n" "%%BoundingBox: " << // Round down. - qRound( rect.left() - 0.5 ) << " " << - qRound( rect.top() - 0.5 ) << " " << + tqRound( rect.left() - 0.5 ) << " " << + tqRound( rect.top() - 0.5 ) << " " << // Round up. - qRound( rect.right() + 0.5 ) << " " << - qRound( rect.bottom() + 0.5 ) << "\n" << + tqRound( rect.right() + 0.5 ) << " " << + tqRound( rect.bottom() + 0.5 ) << "\n" << "%%HiResBoundingBox: " << rect.left() << " " << rect.top() << " " << @@ -184,7 +184,7 @@ EpsExport::visitVDocument( VDocument& document ) if( storeIn ) { - QDomDocument domIn; + TQDomDocument domIn; domIn.setContent( storeIn ); KoDocumentInfo docInfo; @@ -194,7 +194,7 @@ EpsExport::visitVDocument( VDocument& document ) static_cast<KoDocumentInfoAuthor*>( docInfo.page( "author" ) ); // Get creation date/time = "now". - QDateTime now( QDateTime::currentDateTime() ); + TQDateTime now( TQDateTime::tqcurrentDateTime() ); *m_stream << "%%CreationDate: (" << now.toString( Qt::LocalDate ) << ")\n" @@ -333,10 +333,10 @@ EpsExport::getStroke( const VStroke& stroke ) // Dash pattern. *m_stream << "["; - const QValueList<float>& + const TQValueList<float>& array( stroke.dashPattern().array() ); - QValueListConstIterator<float> itr = array.begin(); + TQValueListConstIterator<float> itr = array.begin(); for( ; itr != array.end(); ++itr ) *m_stream << *itr << " "; @@ -385,7 +385,7 @@ EpsExport::getFill( const VFill& fill ) *m_stream << l1_gsave << " "; VGradient grad = fill.gradient(); - QPtrVector<VColorStop> ramp = grad.colorStops(); + TQPtrVector<VColorStop> ramp = grad.colorStops(); if( ramp.size() < 2 ) { if( ramp.size() == 1 ) diff --git a/filters/karbon/eps/epsexport.h b/filters/karbon/eps/epsexport.h index b2dd4919..939887c9 100644 --- a/filters/karbon/eps/epsexport.h +++ b/filters/karbon/eps/epsexport.h @@ -25,7 +25,7 @@ #include "vvisitor.h" -class QTextStream; +class TQTextStream; class VColor; class VPath; class VDocument; @@ -40,12 +40,13 @@ class VText; class EpsExport : public KoFilter, private VVisitor { Q_OBJECT + TQ_OBJECT public: - EpsExport( KoFilter* parent, const char* name, const QStringList& ); + EpsExport( KoFilter* tqparent, const char* name, const TQStringList& ); virtual ~EpsExport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); private: virtual void visitVPath( VPath& composite ); @@ -61,7 +62,7 @@ private: bool isVisible( const VObject* object ) const; - QTextStream* m_stream; + TQTextStream* m_stream; uint m_psLevel; bool m_exportHidden; diff --git a/filters/karbon/eps/epsexportdlg.cc b/filters/karbon/eps/epsexportdlg.cc index 2fb34e14..df51b95b 100644 --- a/filters/karbon/eps/epsexportdlg.cc +++ b/filters/karbon/eps/epsexportdlg.cc @@ -17,11 +17,11 @@ * Boston, MA 02110-1301, USA. */ -#include <qbuttongroup.h> -#include <qradiobutton.h> -#include <qstring.h> -#include <qvbox.h> -#include <qcheckbox.h> +#include <tqbuttongroup.h> +#include <tqradiobutton.h> +#include <tqstring.h> +#include <tqvbox.h> +#include <tqcheckbox.h> #include <klocale.h> #include <knuminput.h> @@ -29,20 +29,20 @@ #include "epsexportdlg.h" -EpsExportDlg::EpsExportDlg( QWidget* parent, const char* name ) - : KDialogBase( parent, name, true, i18n( "EPS Export" ), Ok | Cancel ) +EpsExportDlg::EpsExportDlg( TQWidget* tqparent, const char* name ) + : KDialogBase( tqparent, name, true, i18n( "EPS Export" ), Ok | Cancel ) { - QVBox* page = makeVBoxMainWidget(); + TQVBox* page = makeVBoxMainWidget(); - m_psLevelButtons = new QButtonGroup( 1, QGroupBox::Horizontal, + m_psLevelButtons = new TQButtonGroup( 1, Qt::Horizontal, i18n( "Options" ), page ); - QRadioButton* radio; - radio = new QRadioButton( i18n( "PostScript level 1" ), m_psLevelButtons ); - radio = new QRadioButton( i18n( "PostScript level 2" ), m_psLevelButtons ); - radio = new QRadioButton( i18n( "PostScript level 3" ), m_psLevelButtons ); + TQRadioButton* radio; + radio = new TQRadioButton( i18n( "PostScript level 1" ), m_psLevelButtons ); + radio = new TQRadioButton( i18n( "PostScript level 2" ), m_psLevelButtons ); + radio = new TQRadioButton( i18n( "PostScript level 3" ), m_psLevelButtons ); - m_hiddenExport = new QCheckBox( i18n( "Export hidden layers" ), page ); + m_hiddenExport = new TQCheckBox( i18n( "Export hidden layers" ), page ); m_hiddenExport->setChecked( true ); m_psLevelButtons->setRadioButtonExclusive( true ); diff --git a/filters/karbon/eps/epsexportdlg.h b/filters/karbon/eps/epsexportdlg.h index 332ca882..6850fc97 100644 --- a/filters/karbon/eps/epsexportdlg.h +++ b/filters/karbon/eps/epsexportdlg.h @@ -23,21 +23,22 @@ #include <kdialogbase.h> -class QButtonGroup; -class QCheckBox; +class TQButtonGroup; +class TQCheckBox; class EpsExportDlg : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - EpsExportDlg( QWidget* parent = 0L, const char* name = 0L ); + EpsExportDlg( TQWidget* tqparent = 0L, const char* name = 0L ); uint psLevel() const; bool exportHidden() const; private: - QButtonGroup* m_psLevelButtons; - QCheckBox* m_hiddenExport; + TQButtonGroup* m_psLevelButtons; + TQCheckBox* m_hiddenExport; }; #endif diff --git a/filters/karbon/eps/epsimport.cc b/filters/karbon/eps/epsimport.cc index 2ff34a94..0fefb3e0 100644 --- a/filters/karbon/eps/epsimport.cc +++ b/filters/karbon/eps/epsimport.cc @@ -17,9 +17,9 @@ * Boston, MA 02110-1301, USA. */ -#include <qcstring.h> -#include <qstring.h> -#include <qfile.h> +#include <tqcstring.h> +#include <tqstring.h> +#include <tqfile.h> #include <kgenericfactory.h> #include <KoFilter.h> @@ -48,7 +48,7 @@ protected: K_EXPORT_COMPONENT_FACTORY( libkarbonepsimport, EpsImportFactory() ) -EpsImport::EpsImport( KoFilter*, const char*, const QStringList& ) +EpsImport::EpsImport( KoFilter*, const char*, const TQStringList& ) : KoFilter() { } @@ -57,8 +57,8 @@ EpsImport::~EpsImport() { } -KoFilter::ConversionStatus -EpsImport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus +EpsImport::convert( const TQCString& from, const TQCString& to ) { if( to != "application/illustrator" || @@ -70,18 +70,18 @@ EpsImport::convert( const QCString& from, const QCString& to ) } // Copy input filename: - QString input = m_chain->inputFile(); + TQString input = m_chain->inputFile(); // EPS original bounding box int llx = -1, lly = -1, urx = -1, ury = -1; BoundingBoxExtractor extractor; - QFile file (input); + TQFile file (input); if ( file.open(IO_ReadOnly) ) { - extractor.parse (file); + extractor.parse (*TQT_TQIODEVICE(&file)); llx = extractor.llx(); lly = extractor.lly(); urx = extractor.urx(); @@ -92,11 +92,11 @@ EpsImport::convert( const QCString& from, const QCString& to ) qDebug ("file could not be opened"); // sed filter - QString sedFilter = QString ("sed -e \"s/%%BoundingBox: 0 0 612 792/%%BoundingBox: %1 %2 %3 %4/g\""). - arg(llx).arg(lly).arg(urx).arg(ury); + TQString sedFilter = TQString ("sed -e \"s/%%BoundingBox: 0 0 612 792/%%BoundingBox: %1 %2 %3 %4/g\""). + tqarg(llx).tqarg(lly).tqarg(urx).tqarg(ury); // Build ghostscript call to convert ps/eps -> ai: - QString command( + TQString command( "gs -q -P- -dBATCH -dNOPAUSE -dSAFER -dPARANOIDSAFER -dNODISPLAY ps2ai.ps "); command += KProcess::quote(input); command += " | "; @@ -104,10 +104,10 @@ EpsImport::convert( const QCString& from, const QCString& to ) command += " > "; command += KProcess::quote(m_chain->outputFile()); - qDebug ("command to execute is (%s)", QFile::encodeName(command).data()); + qDebug ("command to execute is (%s)", TQFile::encodeName(command).data()); // Execute it: - if( !system( QFile::encodeName(command)) ) + if( !system( TQFile::encodeName(command)) ) return KoFilter::OK; else return KoFilter::StupidError; diff --git a/filters/karbon/eps/epsimport.h b/filters/karbon/eps/epsimport.h index 15673297..f5e17dfb 100644 --- a/filters/karbon/eps/epsimport.h +++ b/filters/karbon/eps/epsimport.h @@ -20,22 +20,23 @@ #ifndef __EPSIMPORT_H__ #define __EPSIMPORT_H__ -#include <qobject.h> +#include <tqobject.h> #include <KoFilter.h> -class QDomElement; -class QTextStream; +class TQDomElement; +class TQTextStream; class EpsImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - EpsImport( KoFilter* parent, const char* name, const QStringList& ); + EpsImport( KoFilter* tqparent, const char* name, const TQStringList& ); virtual ~EpsImport(); - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; #endif diff --git a/filters/karbon/eps/pscommentlexer.cc b/filters/karbon/eps/pscommentlexer.cc index 46d993dc..dc0a67a1 100644 --- a/filters/karbon/eps/pscommentlexer.cc +++ b/filters/karbon/eps/pscommentlexer.cc @@ -19,7 +19,7 @@ #include <stdlib.h> #include <ctype.h> -#include <qstringlist.h> +#include <tqstringlist.h> #include "pscommentlexer.h" #define CATEGORY_WHITESPACE -1 @@ -82,7 +82,7 @@ PSCommentLexer::PSCommentLexer(){ PSCommentLexer::~PSCommentLexer(){ } -bool PSCommentLexer::parse (QIODevice& fin){ +bool PSCommentLexer::parse (TQIODevice& fin){ char c; m_buffer.clear(); @@ -249,8 +249,8 @@ void StringBuffer::clear(){ m_length = 0; } -QString StringBuffer::toString() const { - QString ret(m_buffer); +TQString StringBuffer::toString() const { + TQString ret(m_buffer); return ret; } @@ -273,12 +273,12 @@ uint StringBuffer::length() { } double StringBuffer::toFloat() { - QString data = toString(); + TQString data = toString(); return data.toFloat(); } int StringBuffer::toInt() { - QString data = toString(); + TQString data = toString(); return data.toInt(); } @@ -286,8 +286,8 @@ const char *StringBuffer::latin1() { return m_buffer; } -QString StringBuffer::mid( uint index, uint len) const { - QString data = toString(); +TQString StringBuffer::mid( uint index, uint len) const { + TQString data = toString(); return data.mid(index,len); } @@ -297,8 +297,8 @@ BoundingBoxExtractor::~BoundingBoxExtractor() {} void BoundingBoxExtractor::gotComment (const char *value) { - QString data (value); - if (data.find("%BoundingBox:")==-1) return; + TQString data (value); + if (data.tqfind("%BoundingBox:")==-1) return; getRectangle (value, m_llx, m_lly, m_urx, m_ury); } @@ -307,11 +307,11 @@ bool BoundingBoxExtractor::getRectangle (const char* input, int &llx, int &lly, { if (input == NULL) return false; - QString s(input); - if (s.contains ("(atend)")) return false; + TQString s(input); + if (s.tqcontains ("(atend)")) return false; - QString s2 = s.remove("%BoundingBox:"); - QStringList values = QStringList::split (" ", s2.latin1()); + TQString s2 = s.remove("%BoundingBox:"); + TQStringList values = TQStringList::split (" ", s2.latin1()); qDebug("size is %d",values.size()); // if (values.size() < 5) return false; llx = values[0].toInt(); diff --git a/filters/karbon/eps/pscommentlexer.h b/filters/karbon/eps/pscommentlexer.h index bf155211..f5893c75 100644 --- a/filters/karbon/eps/pscommentlexer.h +++ b/filters/karbon/eps/pscommentlexer.h @@ -20,8 +20,8 @@ #ifndef PSCOMMENTLEXER_H #define PSCOMMENTLEXER_H -#include <qiodevice.h> -#include <qstring.h> +#include <tqiodevice.h> +#include <tqstring.h> /** *@author Dirk Schönberger @@ -52,12 +52,12 @@ public: void append (char c); void clear(); - QString toString() const; + TQString toString() const; uint length(); double toFloat(); int toInt(); const char *latin1(); - QString mid( uint index, uint len=0xffffffff) const; + TQString mid( uint index, uint len=0xffffffff) const; private: char *m_buffer; uint m_length; @@ -71,7 +71,7 @@ public: PSCommentLexer(); virtual ~PSCommentLexer(); - virtual bool parse (QIODevice& fin); + virtual bool parse (TQIODevice& fin); private: State m_curState; StringBuffer m_buffer; diff --git a/filters/karbon/kontour/kontourimport.cpp b/filters/karbon/kontour/kontourimport.cpp index 88d2fc4b..a260fd50 100644 --- a/filters/karbon/kontour/kontourimport.cpp +++ b/filters/karbon/kontour/kontourimport.cpp @@ -1,5 +1,5 @@ /* This file is part of the KDE project - Copyright (C) 2002, Sven Lüppken <sven@kde.org> + Copyright (C) 2002, Sven L�ppken <sven@kde.org> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -30,15 +30,15 @@ #include <core/vpath.h> #include <core/vfill.h> #include <core/vstroke.h> -#include <qcolor.h> -#include <qfile.h> +#include <tqcolor.h> +#include <tqfile.h> #define DPI 90 typedef KGenericFactory<KontourImport, KoFilter> KontourImportFactory; K_EXPORT_COMPONENT_FACTORY( libkarbonkontourimport, KontourImportFactory( "kofficefilters" ) ) -KontourImport::KontourImport(KoFilter *, const char *, const QStringList&) : +KontourImport::KontourImport(KoFilter *, const char *, const TQStringList&) : KoFilter(), outdoc( "DOC" ) { @@ -49,7 +49,7 @@ KontourImport::~KontourImport() } -KoFilter::ConversionStatus KontourImport::convert(const QCString& from, const QCString& to) +KoFilter::ConversiontqStatus KontourImport::convert(const TQCString& from, const TQCString& to) { // check for proper conversion if ( to != "application/x-karbon" || ( from != "application/x-kontour" && from != "application/x-killustrator") ) @@ -74,14 +74,14 @@ KoFilter::ConversionStatus KontourImport::convert(const QCString& from, const QC kdError(30502) << "Unable to open output file!" << endl; return KoFilter::StorageCreationError; } - QCString cstring = outdoc.toCString(); // utf-8 already + TQCString cstring = outdoc.toCString(); // utf-8 already out->writeBlock( cstring.data(), cstring.length() ); return KoFilter::OK; // was successful } void -KontourImport::parseGObject( VObject *object, const QDomElement &e ) +KontourImport::parseGObject( VObject *object, const TQDomElement &e ) { if( !e.attribute( "fillstyle" ).isEmpty() ) { @@ -92,7 +92,7 @@ KontourImport::parseGObject( VObject *object, const QDomElement &e ) case 1: { fill.setType( VFill::solid ); - QColor c; + TQColor c; c.setNamedColor( e.attribute( "fillcolor" ) ); VColor color( c ); fill.setColor( color ); @@ -103,7 +103,7 @@ KontourImport::parseGObject( VObject *object, const QDomElement &e ) VGradient grad; // set color stops grad.clearStops(); - QColor c; + TQColor c; c.setNamedColor( e.attribute( "gradcolor1" ) ); VColor color( c ); grad.addStop( color, 0.0, 0.5 ); @@ -132,7 +132,7 @@ KontourImport::parseGObject( VObject *object, const QDomElement &e ) break; case 1: { - QColor c; + TQColor c; c.setNamedColor( e.attribute( "strokecolor" ) ); VColor color( c ); stroke.setColor( color ); @@ -140,12 +140,12 @@ KontourImport::parseGObject( VObject *object, const QDomElement &e ) break; case 2: case 3: case 4: case 5: { - QColor c; + TQColor c; c.setNamedColor( e.attribute( "strokecolor" ) ); VColor color( c ); stroke.setColor( color ); VDashPattern dash; - QValueList<float> list; + TQValueList<float> list; switch ( strokestyle ) { case 2: // dashed line @@ -172,8 +172,8 @@ KontourImport::parseGObject( VObject *object, const QDomElement &e ) object->setStroke( stroke ); } // handle matrix - QDomElement matrix = e.namedItem( "matrix" ).toElement(); - QWMatrix mat( matrix.attribute( "m11" ).toDouble(), + TQDomElement matrix = e.namedItem( "matrix" ).toElement(); + TQWMatrix mat( matrix.attribute( "m11" ).toDouble(), matrix.attribute( "m12" ).toDouble(), matrix.attribute( "m21" ).toDouble(), matrix.attribute( "m22" ).toDouble(), @@ -191,15 +191,15 @@ KontourImport::parseGObject( VObject *object, const QDomElement &e ) void KontourImport::convert() { - QDomElement docElem = inpdoc.documentElement(); - QDomElement lay; + TQDomElement docElem = inpdoc.documentElement(); + TQDomElement lay; double height; double width; if( docElem.attribute( "version" ).toInt() == 2 ) { lay = docElem; - height = lay.firstChild().namedItem( "layout" ).toElement().attribute( "height" ).toDouble(); - width = lay.firstChild().namedItem( "layout" ).toElement().attribute( "width" ).toDouble(); + height = lay.firstChild().namedItem( "tqlayout" ).toElement().attribute( "height" ).toDouble(); + width = lay.firstChild().namedItem( "tqlayout" ).toElement().attribute( "width" ).toDouble(); } else { @@ -217,9 +217,9 @@ KontourImport::convert() } void -KontourImport::parseGroup( const QDomElement &e ) +KontourImport::parseGroup( const TQDomElement &e ) { - QDomElement b = e; + TQDomElement b = e; for( ; !b.isNull(); b = b.nextSibling().toElement() ) { if ( b.tagName() == "rectangle" ) @@ -229,15 +229,15 @@ KontourImport::parseGroup( const QDomElement &e ) int width = b.attribute( "width" ).toInt(); int height = b.attribute( "height" ).toInt(); VObject *rect = new VRectangle( 0L, KoPoint( x, height + y ) , width, height ); - QDomElement object = b.namedItem( "polyline" ).namedItem( "gobject" ).toElement(); + TQDomElement object = b.namedItem( "polyline" ).namedItem( "gobject" ).toElement(); parseGObject( rect, object ); m_document.append( rect ); } else if ( b.tagName() == "ellipse" ) { - QDomElement object = b.namedItem( "gobject" ).toElement(); - QDomElement matrix = object.namedItem( "matrix" ).toElement(); + TQDomElement object = b.namedItem( "gobject" ).toElement(); + TQDomElement matrix = object.namedItem( "matrix" ).toElement(); /** * Kontour uses a quite different way to display ellipses, so we * need to calculate the values for the Karbon ellipse here @@ -259,7 +259,7 @@ KontourImport::parseGroup( const QDomElement &e ) * Kontour is much simpler because it doesn't support curves, so * we're done with connecting points with lines. */ - QDomElement point = b.firstChild().toElement(); + TQDomElement point = b.firstChild().toElement(); VPath *path = new VPath( &m_document ); double x, y; x = point.attribute( "x" ).toDouble(); @@ -277,7 +277,7 @@ KontourImport::parseGroup( const QDomElement &e ) } else if( b.tagName() == "polygon" ) { - QDomElement point = b.namedItem( "polyline" ).firstChild().toElement(); + TQDomElement point = b.namedItem( "polyline" ).firstChild().toElement(); VPath *path = new VPath( &m_document ); double x, y; x = point.attribute( "x" ).toDouble(); @@ -297,7 +297,7 @@ KontourImport::parseGroup( const QDomElement &e ) } else if( b.tagName() == "bezier" ) { - QDomElement point = b.namedItem( "polyline" ).firstChild().toElement(); + TQDomElement point = b.namedItem( "polyline" ).firstChild().toElement(); VPath *path = new VPath( &m_document ); double x, y; x = point.attribute( "x" ).toDouble(); diff --git a/filters/karbon/kontour/kontourimport.h b/filters/karbon/kontour/kontourimport.h index f227f908..9e9bc85a 100644 --- a/filters/karbon/kontour/kontourimport.h +++ b/filters/karbon/kontour/kontourimport.h @@ -21,27 +21,28 @@ #define __KONTOURIMPORT_H__ #include <KoFilter.h> -#include <qdom.h> +#include <tqdom.h> #include <core/vdocument.h> class KontourImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - KontourImport(KoFilter *parent, const char *name, const QStringList&); + KontourImport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~KontourImport(); - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); protected: - QDomDocument inpdoc; - QDomDocument outdoc; + TQDomDocument inpdoc; + TQDomDocument outdoc; void convert(); private: - void parseGObject( VObject *, const QDomElement & ); - void parseGroup( const QDomElement & ); + void parseGObject( VObject *, const TQDomElement & ); + void parseGroup( const TQDomElement & ); VDocument m_document; }; diff --git a/filters/karbon/msod/msod.cc b/filters/karbon/msod/msod.cc index dd848c83..ab48642d 100644 --- a/filters/karbon/msod/msod.cc +++ b/filters/karbon/msod/msod.cc @@ -21,12 +21,12 @@ DESCRIPTION */ #include <kdebug.h> -#include <qdatastream.h> -#include <qfile.h> -#include <qptrlist.h> -#include <qpointarray.h> -#include <qrect.h> -#include <qsize.h> +#include <tqdatastream.h> +#include <tqfile.h> +#include <tqptrlist.h> +#include <tqpointarray.h> +#include <tqrect.h> +#include <tqsize.h> #include <msod.h> #include <zlib.h> @@ -39,20 +39,20 @@ Msod::Msod( m_dpi = dpi; m_images.setAutoDelete(true); m_opt = new Options(*this); - m_shape.data = 0L; - m_shape.length = 0; + m_tqshape.data = 0L; + m_tqshape.length = 0; } Msod::~Msod() { - delete [] m_shape.data; + delete [] m_tqshape.data; delete m_opt; } void Msod::drawShape( - unsigned shapeType, - Q_UINT32 bytes, - QDataStream &operands) + unsigned tqshapeType, + TQ_UINT32 bytes, + TQDataStream &operands) { static const char *funcTab[] = { @@ -77,7 +77,7 @@ void Msod::drawShape( "SEAL", // Seal "ARC", // Arc "LINE", // Line - "PLAQUE", // Plaque + "PLATQUE", // Plaque "CAN", // Can "DONUT", // Donut "TEXTSIMPLE", // Textsimple @@ -132,14 +132,14 @@ void Msod::drawShape( "LIGHTNINGBOLT", // Lightningbolt "HEART", // Heart "PICTUREFRAME", // PictureFrame - "QUADARROW", // Quadarrow + "TQUADARROW", // Quadarrow "LEFTARROWCALLOUT", // Leftarrowcallout "RIGHTARROWCALLOUT", // Rightarrowcallout "UPARROWCALLOUT", // Uparrowcallout "DOWNARROWCALLOUT", // Downarrowcallout "LEFTRIGHTARROWCALLOUT", // Leftrightarrowcallout "UPDOWNARROWCALLOUT", // Updownarrowcallout - "QUADARROWCALLOUT", // Quadarrowcallout + "TQUADARROWCALLOUT", // Quadarrowcallout "BEVEL", // Bevel "LEFTBRACKET", // Leftbracket "RIGHTBRACKET", // Rightbracket @@ -153,8 +153,8 @@ void Msod::drawShape( "NOTCHEDRIGHTARROW", // Notchedrightarrow "BLOCKARC", // Blockarc "SMILEYFACE", // Smileyface - "VERTICALSCROLL", // Verticalscroll - "HORIZONTALSCROLL", // Horizontalscroll + "VERTICALSCROLL", //Qt::Verticalscroll + "HORIZONTALSCROLL", //Qt::Horizontalscroll "CIRCULARARROW", // Circulararrow "NOTCHEDCIRCULARARROW", // Notchedcirculararrow "UTURNARROW", // Uturnarrow @@ -262,26 +262,26 @@ void Msod::drawShape( }; struct { - Q_UINT32 spid; // The shape id + TQ_UINT32 spid; // The tqshape id union { - Q_UINT32 info; + TQ_UINT32 info; struct { - Q_UINT32 fGroup : 1; // This shape is a group shape - Q_UINT32 fChild : 1; // Not a top-level shape - Q_UINT32 fPatriarch : 1; // This is the topmost group shape. + TQ_UINT32 fGroup : 1; // This tqshape is a group tqshape + TQ_UINT32 fChild : 1; // Not a top-level tqshape + TQ_UINT32 fPatriarch : 1; // This is the topmost group tqshape. // Exactly one of these per drawing. - Q_UINT32 fDeleted : 1; // The shape has been deleted - Q_UINT32 fOleShape : 1; // The shape is an OLE object - Q_UINT32 fHaveMaster : 1; // Shape has a hspMaster property - Q_UINT32 fFlipH : 1; // Shape is flipped horizontally - Q_UINT32 fFlipV : 1; // Shape is flipped vertically - Q_UINT32 fConnector : 1; // Connector type of shape - Q_UINT32 fHaveAnchor : 1; // Shape has an anchor of some kind - Q_UINT32 fBackground : 1; // Background shape - Q_UINT32 fHaveSpt : 1; // Shape has a shape type property - Q_UINT32 reserved : 20; // Not yet used + TQ_UINT32 fDeleted : 1; // The shape.has been deleted + TQ_UINT32 fOleShape : 1; // The tqshape is an OLE object + TQ_UINT32 fHaveMaster : 1; // Shape has a hspMaster property + TQ_UINT32 fFlipH : 1; // Shape is flipped horizontally + TQ_UINT32 fFlipV : 1; // Shape is flipped vertically + TQ_UINT32 fConnector : 1; // Connector type of tqshape + TQ_UINT32 fHaveAnchor : 1; // Shape has an anchor of some kind + TQ_UINT32 fBackground : 1; // Background tqshape + TQ_UINT32 fHaveSpt : 1; // Shape has a tqshape type property + TQ_UINT32 reserved : 20; // Not yet used } fields; } grfPersistent; } data; @@ -291,12 +291,12 @@ void Msod::drawShape( operands >> data.spid; operands >> data.grfPersistent.info; bytes -= 8; - kdDebug(s_area) << "shape-id: " << data.spid << " type: " << funcTab[shapeType] << " (" << shapeType << ")" << + kdDebug(s_area) << "tqshape-id: " << data.spid << " type: " << funcTab[tqshapeType] << " (" << tqshapeType << ")" << (data.grfPersistent.fields.fGroup ? " group" : "") << (data.grfPersistent.fields.fChild ? " child" : "") << (data.grfPersistent.fields.fPatriarch ? " patriarch" : "") << (data.grfPersistent.fields.fDeleted ? " deleted" : "") << - (data.grfPersistent.fields.fOleShape ? " oleshape" : "") << + (data.grfPersistent.fields.fOleShape ? " oletqshape" : "") << (data.grfPersistent.fields.fHaveMaster ? " master" : "") << (data.grfPersistent.fields.fFlipH ? " flipv" : "") << (data.grfPersistent.fields.fConnector ? " connector" : "") << @@ -309,9 +309,9 @@ void Msod::drawShape( if ((!m_isRequiredDrawing) && (m_requestedShapeId != data.spid)) return; - // An active shape! Let's draw it... + // An active tqshape! Let's draw it... - switch (shapeType) + switch (tqshapeType) { case 0: if (m_opt->m_pVertices) @@ -322,14 +322,14 @@ void Msod::drawShape( case 1: if (bytes > 7) { - QPoint topLeft; - QSize size; + TQPoint topLeft; + TQSize size; topLeft = normalisePoint(operands); size = normaliseSize(operands); - QRect rect(topLeft, size); - QPointArray points(4); + TQRect rect(topLeft, size); + TQPointArray points(4); points.setPoint(0, topLeft); points.setPoint(1, rect.topRight()); @@ -340,12 +340,12 @@ void Msod::drawShape( case 20: if (bytes > 7) { - QPoint lineFrom; - QPoint lineTo; + TQPoint lineFrom; + TQPoint lineTo; lineTo = normalisePoint(operands); - QPointArray points(2); + TQPointArray points(2); points.setPoint(0, lineFrom); points.setPoint(1, lineTo); @@ -359,15 +359,15 @@ void Msod::drawShape( void Msod::invokeHandler( Header &op, - Q_UINT32 bytes, - QDataStream &operands) + TQ_UINT32 bytes, + TQDataStream &operands) { - typedef void (Msod::*method)(Header &op, Q_UINT32 bytes, QDataStream &operands); + typedef void (Msod::*method)(Header &op, TQ_UINT32 bytes, TQDataStream &operands); typedef struct { const char *name; - Q_UINT16 opcode; + TQ_UINT16 opcode; method handler; } opcodeEntry; @@ -432,7 +432,7 @@ void Msod::invokeHandler( " operands: " << bytes << endl; else kdWarning(s_area) << "invokeHandler: unsupported opcode: 0x" << - QString::number(op.opcode.fields.fbt, 16) << + TQString::number(op.opcode.fields.fbt, 16) << " operands: " << bytes << endl; // Skip data we cannot use. @@ -452,19 +452,19 @@ void Msod::invokeHandler( if (bytes) { - QByteArray *record = new QByteArray(bytes); - QDataStream *body; + TQByteArray *record = new TQByteArray(bytes); + TQDataStream *body; operands.readRawBytes(record->data(), bytes); - body = new QDataStream(*record, IO_ReadOnly); - body->setByteOrder(QDataStream::LittleEndian); + body = new TQDataStream(*record, IO_ReadOnly); + body->setByteOrder(TQDataStream::LittleEndian); (this->*result)(op, bytes, *body); delete body; delete record; } else { - QDataStream *body = new QDataStream(); + TQDataStream *body = new TQDataStream(); (this->*result)(op, bytes, *body); delete body; @@ -472,52 +472,52 @@ void Msod::invokeHandler( } } -QPoint Msod::normalisePoint( - QDataStream &operands) +TQPoint Msod::normalisePoint( + TQDataStream &operands) { - Q_UINT16 x; - Q_UINT16 y; + TQ_UINT16 x; + TQ_UINT16 y; operands >> x >> y; - return QPoint(x / m_dpi, y / m_dpi); + return TQPoint(x / m_dpi, y / m_dpi); } -QSize Msod::normaliseSize( - QDataStream &operands) +TQSize Msod::normaliseSize( + TQDataStream &operands) { - Q_UINT16 width; - Q_UINT16 height; + TQ_UINT16 width; + TQ_UINT16 height; operands >> width >> height; - return QSize(width / m_dpi, height / m_dpi); + return TQSize(width / m_dpi, height / m_dpi); } bool Msod::parse( - unsigned shapeId, - const QString &file, + unsigned tqshapeId, + const TQString &file, const char *delayStream) { - QFile in(file); + TQFile in(file); if (!in.open(IO_ReadOnly)) { kdError(s_area) << "Unable to open input file!" << endl; in.close(); return false; } - QDataStream stream(&in); - bool result = parse(shapeId, stream, in.size(), delayStream); + TQDataStream stream(&in); + bool result = parse(tqshapeId, stream, in.size(), delayStream); in.close(); return result; } bool Msod::parse( - unsigned shapeId, - QDataStream &stream, + unsigned tqshapeId, + TQDataStream &stream, unsigned size, const char *delayStream) { - stream.setByteOrder(QDataStream::LittleEndian); // Great, I love Qt ! - m_requestedShapeId = shapeId; + stream.setByteOrder(TQDataStream::LittleEndian); // Great, I love TQt ! + m_requestedShapeId = tqshapeId; m_isRequiredDrawing = false; m_delayStream = delayStream; @@ -529,26 +529,26 @@ bool Msod::parse( void Msod::opAlignrule( Header &, - Q_UINT32, - QDataStream &) + TQ_UINT32, + TQDataStream &) { } void Msod::opAnchor( Header &, - Q_UINT32, - QDataStream &) + TQ_UINT32, + TQDataStream &) { } void Msod::opArcrule( Header &, - Q_UINT32, - QDataStream &) + TQ_UINT32, + TQDataStream &) { } -void Msod::opBlip(Header &, Q_UINT32 bytes, QDataStream &operands) +void Msod::opBlip(Header &, TQ_UINT32 bytes, TQDataStream &operands) { typedef enum { @@ -568,25 +568,25 @@ void Msod::opBlip(Header &, Q_UINT32 bytes, QDataStream &operands) } MSOBLIPCOMPRESSION; bool hasPrimaryId; - Q_UINT32 length = 0; + TQ_UINT32 length = 0; struct { - Q_UINT32 cb; + TQ_UINT32 cb; struct { - Q_UINT32 x; - Q_UINT32 y; - Q_UINT32 w; - Q_UINT32 h; + TQ_UINT32 x; + TQ_UINT32 y; + TQ_UINT32 w; + TQ_UINT32 h; } bounds; struct { - Q_UINT32 w; - Q_UINT32 h; + TQ_UINT32 w; + TQ_UINT32 h; } ptSize; - Q_UINT32 cbSave; - Q_UINT8 compression; - Q_UINT8 filter; + TQ_UINT32 cbSave; + TQ_UINT8 compression; + TQ_UINT8 filter; } data; // Skip any explicit primary header (m_rgbUidprimary). @@ -684,7 +684,7 @@ void Msod::opBlip(Header &, Q_UINT32 bytes, QDataStream &operands) int result; tmp = new char[data.cb]; - result = uncompress((Q_UINT8 *)tmp, &destLen, (Q_UINT8 *)image->data, image->length); + result = uncompress((TQ_UINT8 *)tmp, &destLen, (TQ_UINT8 *)image->data, image->length); if (result != Z_OK) { kdError(s_area) << "opBlip: uncompress failed: " << result << endl; @@ -703,21 +703,21 @@ void Msod::opBlip(Header &, Q_UINT32 bytes, QDataStream &operands) // FBSE - File Blip Store Entry -void Msod::opBse(Header &op, Q_UINT32, QDataStream &operands) +void Msod::opBse(Header &op, TQ_UINT32, TQDataStream &operands) { struct { - Q_UINT8 btWin32; // Required type on Win32. - Q_UINT8 btMacOS; // Required type on Mac. - Q_UINT8 rgbUid[16]; // Identifier of blip. - Q_UINT16 tag; // currently unused. - Q_UINT32 size; // Blip size in stream. - Q_UINT32 cRef; // Reference count on the blip. - Q_UINT32 foDelay; // File offset in the delay stream. - Q_UINT8 usage; // How this blip is used (MSOBLIPUSAGE). - Q_UINT8 cbName; // length of the blip name. - Q_UINT8 unused2; // for the future. - Q_UINT8 unused3; // for the future. + TQ_UINT8 btWin32; // Required type on Win32. + TQ_UINT8 btMacOS; // Required type on Mac. + TQ_UINT8 rgbUid[16]; // Identifier of blip. + TQ_UINT16 tag; // currently unused. + TQ_UINT32 size; // Blip size in stream. + TQ_UINT32 cRef; // Reference count on the blip. + TQ_UINT32 foDelay; // File offset in the delay stream. + TQ_UINT8 usage; // How this blip is used (MSOBLIPUSAGE). + TQ_UINT8 cbName; // length of the blip name. + TQ_UINT8 unused2; // for the future. + TQ_UINT8 unused3; // for the future. } data; unsigned i; @@ -743,10 +743,10 @@ void Msod::opBse(Header &op, Q_UINT32, QDataStream &operands) if (data.size && data.cRef) { - QByteArray bytes; + TQByteArray bytes; bytes.setRawData(m_delayStream + data.foDelay, data.size); - QDataStream stream(bytes, IO_ReadOnly); - stream.setByteOrder(QDataStream::LittleEndian); + TQDataStream stream(bytes, IO_ReadOnly); + stream.setByteOrder(TQDataStream::LittleEndian); walk(data.size, stream); bytes.resetRawData(m_delayStream + data.foDelay, data.size); } @@ -758,41 +758,41 @@ void Msod::opBse(Header &op, Q_UINT32, QDataStream &operands) } } -void Msod::opBstorecontainer(Header &, Q_UINT32 bytes, QDataStream &operands) +void Msod::opBstorecontainer(Header &, TQ_UINT32 bytes, TQDataStream &operands) { walk(bytes, operands); } void Msod::opCalloutrule( Header &, - Q_UINT32, - QDataStream &) + TQ_UINT32, + TQDataStream &) { } void Msod::opChildanchor( Header &, - Q_UINT32, - QDataStream &) + TQ_UINT32, + TQDataStream &) { } -void Msod::opClientanchor(Header &, Q_UINT32, QDataStream &operands) +void Msod::opClientanchor(Header &, TQ_UINT32, TQDataStream &operands) { struct { - Q_UINT32 unknown; + TQ_UINT32 unknown; } data; operands >> data.unknown; kdDebug(s_area) << "client anchor: " << data.unknown << endl; } -void Msod::opClientdata(Header &, Q_UINT32, QDataStream &operands) +void Msod::opClientdata(Header &, TQ_UINT32, TQDataStream &operands) { struct { - Q_UINT32 unknown; + TQ_UINT32 unknown; } data; operands >> data.unknown; @@ -801,61 +801,61 @@ void Msod::opClientdata(Header &, Q_UINT32, QDataStream &operands) void Msod::opClientrule( Header &, - Q_UINT32, - QDataStream &) + TQ_UINT32, + TQDataStream &) { } void Msod::opClienttextbox( Header &, - Q_UINT32, - QDataStream &operands) + TQ_UINT32, + TQDataStream &operands) { struct { - Q_UINT32 unknown; + TQ_UINT32 unknown; } data; operands >> data.unknown; - kdDebug(s_area) << "client textbox: 0x" << QString::number(data.unknown,16) << endl; + kdDebug(s_area) << "client textbox: 0x" << TQString::number(data.unknown,16) << endl; } void Msod::opClsid( Header &, - Q_UINT32, - QDataStream &) + TQ_UINT32, + TQDataStream &) { } void Msod::opColormru( Header &, - Q_UINT32, - QDataStream &) + TQ_UINT32, + TQDataStream &) { } void Msod::opConnectorrule( Header &, - Q_UINT32, - QDataStream &) + TQ_UINT32, + TQDataStream &) { } void Msod::opDeletedpspl( Header &, - Q_UINT32, - QDataStream &) + TQ_UINT32, + TQDataStream &) { } // FDG - File DG -void Msod::opDg(Header &, Q_UINT32, QDataStream &operands) +void Msod::opDg(Header &, TQ_UINT32, TQDataStream &operands) { struct { - Q_UINT32 csp; // The number of shapes in this drawing. - Q_UINT32 spidCur; // The last shape ID given to an SP in this DG. + TQ_UINT32 csp; // The number of tqshapes in this drawing. + TQ_UINT32 spidCur; // The last tqshape ID given to an SP in this DG. } data; operands >> data.csp >> data.spidCur; @@ -867,36 +867,36 @@ void Msod::opDg(Header &, Q_UINT32, QDataStream &operands) } } -void Msod::opDgcontainer(Header &, Q_UINT32 bytes, QDataStream &operands) +void Msod::opDgcontainer(Header &, TQ_UINT32 bytes, TQDataStream &operands) { walk(bytes, operands); } // FDGG - File DGG -void Msod::opDgg(Header &, Q_UINT32, QDataStream &operands) +void Msod::opDgg(Header &, TQ_UINT32, TQDataStream &operands) { struct { - Q_UINT32 spidMax; // The current maximum shape ID. - Q_UINT32 cidcl; // The number of ID clusters (FIDCLs). - Q_UINT32 cspSaved; // The total number of shapes saved. - // (including deleted shapes, if undo + TQ_UINT32 spidMax; // The current maximum tqshape ID. + TQ_UINT32 cidcl; // The number of ID clusters (FIDCLs). + TQ_UINT32 cspSaved; // The total number of tqshapes saved. + // (including deleted tqshapes, if undo // information was saved). - Q_UINT32 cdgSaved; // The total number of drawings saved. + TQ_UINT32 cdgSaved; // The total number of drawings saved. } data; // File ID Cluster - used to save IDCLs struct { - Q_UINT32 dgid; // DG owning the SPIDs in this cluster - Q_UINT32 cspidCur; // number of SPIDs used so far + TQ_UINT32 dgid; // DG owning the SPIDs in this cluster + TQ_UINT32 cspidCur; // number of SPIDs used so far } data1; unsigned i; operands >> data.spidMax >> data.cidcl >> data.cspSaved >> data.cdgSaved; - kdDebug(s_area) << data.cspSaved << " shapes in " << + kdDebug(s_area) << data.cspSaved << " tqshapes in " << data.cidcl - 1 << " clusters in " << data.cdgSaved << " drawings" << endl; for (i = 0; i < data.cidcl - 1; i++) @@ -905,97 +905,97 @@ void Msod::opDgg(Header &, Q_UINT32, QDataStream &operands) } } -void Msod::opDggcontainer(Header &, Q_UINT32 bytes, QDataStream &operands) +void Msod::opDggcontainer(Header &, TQ_UINT32 bytes, TQDataStream &operands) { walk(bytes, operands); } void Msod::opOleobject( Header &, - Q_UINT32, - QDataStream &) + TQ_UINT32, + TQDataStream &) { } -void Msod::opOpt(Header &, Q_UINT32 bytes, QDataStream &operands) +void Msod::opOpt(Header &, TQ_UINT32 bytes, TQDataStream &operands) { m_opt->walk(bytes, operands); } void Msod::opRegroupitems( Header &, - Q_UINT32, - QDataStream &) + TQ_UINT32, + TQDataStream &) { } void Msod::opSelection( Header &, - Q_UINT32, - QDataStream &) + TQ_UINT32, + TQDataStream &) { } -void Msod::opSolvercontainer(Header &, Q_UINT32 bytes, QDataStream &operands) +void Msod::opSolvercontainer(Header &, TQ_UINT32 bytes, TQDataStream &operands) { walk(bytes, operands); } -void Msod::opSp(Header &op, Q_UINT32 bytes, QDataStream &operands) +void Msod::opSp(Header &op, TQ_UINT32 bytes, TQDataStream &operands) { - // We want to defer the act of drawing a shape until we have seen any options + // We want to defer the act of drawing a tqshape until we have seen any options // that may affect it. Thus, we merely store the data away, and let opSpContainer // do all the ahrd work. - m_shape.type = op.opcode.fields.inst; - m_shape.length = bytes; - m_shape.data = new char [bytes]; - operands.readRawBytes(m_shape.data, bytes); + m_tqshape.type = op.opcode.fields.inst; + m_tqshape.length = bytes; + m_tqshape.data = new char [bytes]; + operands.readRawBytes(m_tqshape.data, bytes); } -void Msod::opSpcontainer(Header &, Q_UINT32 bytes, QDataStream &operands) +void Msod::opSpcontainer(Header &, TQ_UINT32 bytes, TQDataStream &operands) { walk(bytes, operands); - // Having gathered all the information for this shape, we can now draw it. + // Having gathered all the information for this tqshape, we can now draw it. - QByteArray a; + TQByteArray a; - a.setRawData(m_shape.data, m_shape.length); - QDataStream s(a, IO_ReadOnly); - s.setByteOrder(QDataStream::LittleEndian); // Great, I love Qt ! - drawShape(m_shape.type, m_shape.length, s); - a.resetRawData(m_shape.data, m_shape.length); - delete [] m_shape.data; - m_shape.data = 0L; + a.setRawData(m_tqshape.data, m_tqshape.length); + TQDataStream s(a, IO_ReadOnly); + s.setByteOrder(TQDataStream::LittleEndian); // Great, I love TQt ! + drawShape(m_tqshape.type, m_tqshape.length, s); + a.resetRawData(m_tqshape.data, m_tqshape.length); + delete [] m_tqshape.data; + m_tqshape.data = 0L; } -void Msod::opSpgr(Header &, Q_UINT32, QDataStream &operands) +void Msod::opSpgr(Header &, TQ_UINT32, TQDataStream &operands) { struct { - Q_UINT32 x; - Q_UINT32 y; - Q_UINT32 w; - Q_UINT32 h; + TQ_UINT32 x; + TQ_UINT32 y; + TQ_UINT32 w; + TQ_UINT32 h; } data; operands >> data.x >> data.y >> data.w >> data.h; } -void Msod::opSpgrcontainer(Header &, Q_UINT32 bytes, QDataStream &operands) +void Msod::opSpgrcontainer(Header &, TQ_UINT32 bytes, TQDataStream &operands) { walk(bytes, operands); } -void Msod::opSplitmenucolors(Header &, Q_UINT32, QDataStream &operands) +void Msod::opSplitmenucolors(Header &, TQ_UINT32, TQDataStream &operands) { struct { - Q_UINT32 fill; - Q_UINT32 line; - Q_UINT32 shadow; - Q_UINT32 threeDee; + TQ_UINT32 fill; + TQ_UINT32 line; + TQ_UINT32 shadow; + TQ_UINT32 threeDee; } data; operands >> data.fill >> data.line >> data.shadow >> data.threeDee; @@ -1003,12 +1003,12 @@ void Msod::opSplitmenucolors(Header &, Q_UINT32, QDataStream &operands) void Msod::opTextbox( Header &, - Q_UINT32, - QDataStream &) + TQ_UINT32, + TQDataStream &) { } -void Msod::skip(Q_UINT32 bytes, QDataStream &operands) +void Msod::skip(TQ_UINT32 bytes, TQDataStream &operands) { if ((int)bytes < 0) { @@ -1017,8 +1017,8 @@ void Msod::skip(Q_UINT32 bytes, QDataStream &operands) } if (bytes) { - Q_UINT32 i; - Q_UINT8 discard; + TQ_UINT32 i; + TQ_UINT8 discard; kdDebug(s_area) << "skip: " << bytes << endl; for (i = 0; i < bytes; i++) @@ -1028,10 +1028,10 @@ void Msod::skip(Q_UINT32 bytes, QDataStream &operands) } } -void Msod::walk(Q_UINT32 bytes, QDataStream &operands) +void Msod::walk(TQ_UINT32 bytes, TQDataStream &operands) { Header op; - Q_UINT32 length = 0; + TQ_UINT32 length = 0; // Stop parsing when there are no more records. Note that we stop as soon // as we cannot get a complete header. @@ -1061,8 +1061,8 @@ void Msod::walk(Q_UINT32 bytes, QDataStream &operands) } Msod::Options::Options( - Msod &parent) : - m_parent(parent) + Msod &tqparent) : + m_parent(tqparent) { m_pVertices = 0L; initialise(); @@ -1073,7 +1073,7 @@ Msod::Options::~Options() delete m_pVertices; } -double Msod::Options::from1616ToDouble(Q_UINT32 value) +double Msod::Options::from1616ToDouble(TQ_UINT32 value) { return (value >> 16) + 65535.0 / (double)(value & 0xffff); } @@ -1085,7 +1085,7 @@ void Msod::Options::initialise() m_lTxid = 0; m_pib = 0; - m_pibName = QString::null; + m_pibName = TQString(); m_pibFlags = 0; m_pictureId = 0; m_fNoHitTestPicture = false; @@ -1097,7 +1097,7 @@ void Msod::Options::initialise() m_geoTop = 0; m_geoRight = 21600; m_geoBottom = 21600; - m_shapePath = 1; + m_tqshapePath = 1; delete m_pVertices; m_pVertices = 0L; m_fShadowOK = true; @@ -1133,11 +1133,11 @@ void Msod::Options::initialise() m_fBackground = false; } -void Msod::Options::walk(Q_UINT32 bytes, QDataStream &operands) +void Msod::Options::walk(TQ_UINT32 bytes, TQDataStream &operands) { Header op; - Q_UINT16 length = 0; - Q_UINT16 complexLength = 0; + TQ_UINT16 length = 0; + TQ_UINT16 complexLength = 0; // Reset all options to default values. @@ -1145,7 +1145,7 @@ void Msod::Options::walk(Q_UINT32 bytes, QDataStream &operands) // First process all simple options, and add all complex options to a list. - QPtrList<Header> complexOpts; + TQPtrList<Header> complexOpts; complexOpts.setAutoDelete(true); bool unsupported; while (length + complexLength < (int)bytes) @@ -1172,7 +1172,7 @@ void Msod::Options::walk(Q_UINT32 bytes, QDataStream &operands) break; case 128: m_lTxid = op.value; - kdDebug(s_area) << "textbox: 0x" << QString::number(op.value,16) << endl; + kdDebug(s_area) << "textbox: 0x" << TQString::number(op.value,16) << endl; break; case 260: if (op.opcode.fields.fBid) @@ -1187,9 +1187,9 @@ void Msod::Options::walk(Q_UINT32 bytes, QDataStream &operands) if (image->extension == "wmf") { - QByteArray a; + TQByteArray a; a.setRawData(image->data, image->length); - QDataStream s(a, IO_ReadOnly); + TQDataStream s(a, IO_ReadOnly); m_parent.KWmf::parse(s, image->length); a.resetRawData(image->data, image->length); } @@ -1233,7 +1233,7 @@ void Msod::Options::walk(Q_UINT32 bytes, QDataStream &operands) m_geoBottom = op.value; break; case 324: - m_shapePath = op.value; + m_tqshapePath = op.value; break; case 383: m_fShadowOK = (op.value & 0x0020) != 0; @@ -1294,7 +1294,7 @@ void Msod::Options::walk(Q_UINT32 bytes, QDataStream &operands) while (complexOpts.count()) { - Q_INT16 t16; + TQ_INT16 t16; unsigned i; op = *complexOpts.getFirst(); @@ -1308,11 +1308,11 @@ void Msod::Options::walk(Q_UINT32 bytes, QDataStream &operands) operands >> t16; if (!t16) break; - m_pibName += QChar(t16); + m_pibName += TQChar(t16); }; break; case 325: - m_pVertices = new QPointArray(op.value / 4); + m_pVertices = new TQPointArray(op.value / 4); for (i = 0; i < m_pVertices->count(); i++) { m_pVertices->setPoint(i, m_parent.normalisePoint(operands)); diff --git a/filters/karbon/msod/msod.h b/filters/karbon/msod/msod.h index a3dd9efe..a1243aaa 100644 --- a/filters/karbon/msod/msod.h +++ b/filters/karbon/msod/msod.h @@ -28,10 +28,10 @@ DESCRIPTION #ifndef MSOD_H #define MSOD_H -class QString; -class QPointArray; +class TQString; +class TQPointArray; #include <kwmf.h> -#include <qptrvector.h> +#include <tqptrvector.h> class Msod : private KWmf @@ -44,16 +44,16 @@ public: unsigned dpi); virtual ~Msod(); - // Called to parse the given file. We extract a drawing by shapeId. + // Called to parse the given file. We extract a drawing by tqshapeId. // If the drawing is not found, the return value will be false. bool parse( - unsigned shapeId, - const QString &file, + unsigned tqshapeId, + const TQString &file, const char *delayStream = 0L); bool parse( - unsigned shapeId, - QDataStream &stream, + unsigned tqshapeId, + TQDataStream &stream, unsigned size, const char *delayStream = 0L); @@ -74,25 +74,25 @@ protected: virtual void gotEllipse( const DrawContext &dc, - QString type, - QPoint topLeft, - QSize halfAxes, + TQString type, + TQPoint topLeft, + TQSize halfAxes, unsigned startAngle, unsigned stopAngle) = 0; virtual void gotPicture( unsigned id, - QString extension, + TQString extension, unsigned length, const char *data) = 0; virtual void gotPolygon( const DrawContext &dc, - const QPointArray &points) = 0; + const TQPointArray &points) = 0; virtual void gotPolyline( const DrawContext &dc, - const QPointArray &points) = 0; + const TQPointArray &points) = 0; virtual void gotRectangle( const DrawContext &dc, - const QPointArray &points) = 0; + const TQPointArray &points) = 0; private: Msod(const Msod &); @@ -114,16 +114,16 @@ private: unsigned type; char *data; unsigned length; - } m_shape; + } m_tqshape; - QPoint normalisePoint( - QDataStream &operands); - QSize normaliseSize( - QDataStream &operands); + TQPoint normalisePoint( + TQDataStream &operands); + TQSize normaliseSize( + TQDataStream &operands); void drawShape( - unsigned shapeType, - Q_UINT32 bytes, - QDataStream &operands); + unsigned tqshapeType, + TQ_UINT32 bytes, + TQDataStream &operands); public: @@ -132,15 +132,15 @@ public: { union { - Q_UINT32 info; + TQ_UINT32 info; struct { - Q_UINT32 ver: 4; - Q_UINT32 inst: 12; - Q_UINT32 fbt: 16; + TQ_UINT32 ver: 4; + TQ_UINT32 inst: 12; + TQ_UINT32 fbt: 16; } fields; } opcode; - Q_UINT32 cbLength; + TQ_UINT32 cbLength; } Header; private: @@ -163,89 +163,89 @@ private: class Image { public: - QString extension; + TQString extension; unsigned length; const char *data; Image() { data = 0L; } ~Image() { delete [] data; } }; - QPtrVector<Image> m_images; + TQPtrVector<Image> m_images; // Opcode handling and painter methods. void walk( - Q_UINT32 bytes, - QDataStream &operands); + TQ_UINT32 bytes, + TQDataStream &operands); void skip( - Q_UINT32 bytes, - QDataStream &operands); + TQ_UINT32 bytes, + TQDataStream &operands); void invokeHandler( Header &op, - Q_UINT32 bytes, - QDataStream &operands); - - void opAlignrule(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opAnchor(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opArcrule(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opBlip(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opBse(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opBstorecontainer(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opCalloutrule(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opChildanchor(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opClientanchor(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opClientdata(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opClientrule(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opClienttextbox(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opClsid(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opColormru(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opConnectorrule(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opDeletedpspl(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opDg(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opDgcontainer(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opDgg(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opDggcontainer(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opOleobject(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opOpt(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opRegroupitems(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opSelection(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opSolvercontainer(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opSp(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opSpcontainer(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opSpgr(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opSpgrcontainer(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opSplitmenucolors(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opTextbox(Header &op, Q_UINT32 bytes, QDataStream &operands); + TQ_UINT32 bytes, + TQDataStream &operands); + + void opAlignrule(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opAnchor(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opArcrule(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opBlip(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opBse(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opBstorecontainer(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opCalloutrule(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opChildanchor(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opClientanchor(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opClientdata(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opClientrule(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opClienttextbox(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opClsid(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opColormru(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opConnectorrule(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opDeletedpspl(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opDg(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opDgcontainer(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opDgg(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opDggcontainer(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opOleobject(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opOpt(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opRegroupitems(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opSelection(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opSolvercontainer(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opSp(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opSpcontainer(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opSpgr(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opSpgrcontainer(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opSplitmenucolors(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opTextbox(Header &op, TQ_UINT32 bytes, TQDataStream &operands); // Option handling. class Options { public: - Options(Msod &parent); + Options(Msod &tqparent); ~Options(); void walk( - Q_UINT32 bytes, - QDataStream &operands); + TQ_UINT32 bytes, + TQDataStream &operands); double m_rotation; - Q_UINT32 m_lTxid; + TQ_UINT32 m_lTxid; - Q_UINT32 m_pib; - QString m_pibName; - Q_UINT32 m_pibFlags; - Q_UINT32 m_pictureId; + TQ_UINT32 m_pib; + TQString m_pibName; + TQ_UINT32 m_pibFlags; + TQ_UINT32 m_pictureId; bool m_fNoHitTestPicture; bool m_pictureGray; bool m_pictureBiLevel; bool m_pictureActive; - Q_UINT32 m_geoLeft; - Q_UINT32 m_geoTop; - Q_UINT32 m_geoRight; - Q_UINT32 m_geoBottom; - Q_UINT32 m_shapePath; - QPointArray *m_pVertices; + TQ_UINT32 m_geoLeft; + TQ_UINT32 m_geoTop; + TQ_UINT32 m_geoRight; + TQ_UINT32 m_geoBottom; + TQ_UINT32 m_tqshapePath; + TQPointArray *m_pVertices; bool m_fShadowOK; bool m_f3DOK; bool m_fLineOK; @@ -259,10 +259,10 @@ private: bool m_fillUseRect; bool m_fNoFillHitTest; - Q_UINT32 m_lineColor; - Q_UINT32 m_lineBackColor; - Q_UINT32 m_lineType; - Q_UINT32 m_lineWidth; + TQ_UINT32 m_lineColor; + TQ_UINT32 m_lineBackColor; + TQ_UINT32 m_lineType; + TQ_UINT32 m_lineWidth; bool m_fArrowheadsOK; bool m_fLine; @@ -270,7 +270,7 @@ private: bool m_lineFillShape; bool m_fNoLineDrawDash; - Q_UINT32 m_bWMode; + TQ_UINT32 m_bWMode; bool m_fOleIcon; bool m_fPreferRelativeResize; @@ -285,19 +285,19 @@ private: { union { - Q_UINT16 info; + TQ_UINT16 info; struct { - Q_UINT16 pid: 14; - Q_UINT16 fBid: 1; - Q_UINT16 fComplex: 1; + TQ_UINT16 pid: 14; + TQ_UINT16 fBid: 1; + TQ_UINT16 fComplex: 1; } fields; } opcode; - Q_UINT32 value; + TQ_UINT32 value; } Header; void initialise(); - double from1616ToDouble(Q_UINT32 value); + double from1616ToDouble(TQ_UINT32 value); }; friend class Msod::Options; diff --git a/filters/karbon/msod/msodimport.cc b/filters/karbon/msod/msodimport.cc index 9af11181..903d50a2 100644 --- a/filters/karbon/msod/msodimport.cc +++ b/filters/karbon/msod/msodimport.cc @@ -25,9 +25,9 @@ DESCRIPTION #include <kmimetype.h> #include <kgenericfactory.h> #include <KoFilterChain.h> -#include <qfile.h> +#include <tqfile.h> #include <msodimport.h> -#include <qpointarray.h> +#include <tqpointarray.h> typedef KGenericFactory<MSODImport, KoFilter> MSODImportFactory; K_EXPORT_COMPONENT_FACTORY( libmsodimport, MSODImportFactory( "kofficefilters" ) ) @@ -37,7 +37,7 @@ const int MSODImport::s_area = 30505; MSODImport::MSODImport( KoFilter *, const char *, - const QStringList&) : + const TQStringList&) : KoEmbeddingFilter(), Msod(100) { } @@ -46,31 +46,31 @@ MSODImport::~MSODImport() { } -KoFilter::ConversionStatus MSODImport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus MSODImport::convert( const TQCString& from, const TQCString& to ) { if (to != "application/x-karbon" || from != "image/x-msod") return KoFilter::NotImplemented; - // Get configuration data: the shape id, and any delay stream that we were given. - unsigned shapeId; - emit commSignalShapeID( shapeId ); + // Get configuration data: the tqshape id, and any delay stream that we were given. + unsigned tqshapeId; + emit commSignalShapeID( tqshapeId ); const char *delayStream = 0L; emit commSignalDelayStream( delayStream ); kdDebug( s_area ) << "##################################################################" << endl; - kdDebug( s_area ) << "shape id: " << shapeId << endl; + kdDebug( s_area ) << "tqshape id: " << tqshapeId << endl; kdDebug( s_area ) << "delay stream: " << delayStream << endl; kdDebug( s_area ) << "##################################################################" << endl; /* - QString config = ""; // ###### FIXME: We aren't able to pass config data right now - QStringList args = QStringList::split(";", config); + TQString config = ""; // ###### FIXME: We aren't able to pass config data right now + TQStringList args = TQStringList::split(";", config); unsigned i; kdDebug(s_area) << "MSODImport::filter: config: " << config << endl; for (i = 0; i < args.count(); i++) { - if (args[i].startsWith("shape-id=")) + if (args[i].startsWith("tqshape-id=")) { - shapeId = args[i].mid(9).toUInt(); + tqshapeId = args[i].mid(9).toUInt(); } else if (args[i].startsWith("delay-stream=")) @@ -91,7 +91,7 @@ KoFilter::ConversionStatus MSODImport::convert( const QCString& from, const QCSt m_text += "<DOC mime=\"application/x-karbon\" syntaxVersion=\"0.1\" editor=\"WMF import filter\">\n"; m_text += " <LAYER name=\"Layer\" visible=\"1\">\n"; - if (!parse(shapeId, m_chain->inputFile(), delayStream)) + if (!parse(tqshapeId, m_chain->inputFile(), delayStream)) return KoFilter::WrongFormat; // close doc @@ -106,7 +106,7 @@ KoFilter::ConversionStatus MSODImport::convert( const QCString& from, const QCSt kdError(s_area) << "Cannot open output file" << endl; return KoFilter::StorageCreationError; } - QCString cstring ( m_text.utf8() ); + TQCString cstring ( m_text.utf8() ); dev->writeBlock(cstring.data(), cstring.size()-1); return KoFilter::OK; @@ -114,27 +114,27 @@ KoFilter::ConversionStatus MSODImport::convert( const QCString& from, const QCSt void MSODImport::gotEllipse( const DrawContext &/*dc*/, - QString /*type*/, - QPoint /*topLeft*/, - QSize /*halfAxes*/, + TQString /*type*/, + TQPoint /*topLeft*/, + TQSize /*halfAxes*/, unsigned /*startAngle*/, unsigned /*stopAngle*/) { // ### TODO #if 0 - m_text += "<ellipse angle1=\"" + QString::number(startAngle) + - "\" angle2=\"" + QString::number(stopAngle) + - "\" x=\"" + QString::number(topLeft.x()) + - "\" y=\"" + QString::number(topLeft.y()) + + m_text += "<ellipse angle1=\"" + TQString::number(startAngle) + + "\" angle2=\"" + TQString::number(stopAngle) + + "\" x=\"" + TQString::number(topLeft.x()) + + "\" y=\"" + TQString::number(topLeft.y()) + "\" kind=\"" + type + - "\" rx=\"" + QString::number(halfAxes.width()) + - "\" ry=\"" + QString::number(halfAxes.height()) + + "\" rx=\"" + TQString::number(halfAxes.width()) + + "\" ry=\"" + TQString::number(halfAxes.height()) + "\">\n"; - m_text += " <gobject fillcolor=\"#" + QString::number(dc.m_brushColour, 16) + - "\" fillstyle=\"" + QString::number(1 /*m_winding*/) + - "\" linewidth=\"" + QString::number(dc.m_penWidth) + - "\" strokecolor=\"#" + QString::number(dc.m_penColour, 16) + - "\" strokestyle=\"" + QString::number(dc.m_penStyle) + + m_text += " <gobject fillcolor=\"#" + TQString::number(dc.m_brushColour, 16) + + "\" fillstyle=\"" + TQString::number(1 /*m_winding*/) + + "\" linewidth=\"" + TQString::number(dc.m_penWidth) + + "\" strokecolor=\"#" + TQString::number(dc.m_penColour, 16) + + "\" strokestyle=\"" + TQString::number(dc.m_penStyle) + "\">\n"; m_text += " <matrix dx=\"0\" dy=\"0\" m21=\"0\" m22=\"1\" m11=\"1\" m12=\"0\"/>\n"; m_text += " </gobject>\n"; @@ -151,7 +151,7 @@ static void toRGB(int c, double &r, double &g, double &b) void MSODImport::gotPicture( unsigned key, - QString extension, + TQString extension, unsigned length, const char *data) { @@ -163,20 +163,20 @@ void MSODImport::gotPicture( (extension == "emf") || (extension == "pict")) { - int partRef = internalPartReference( QString::number( key ) ); + int partRef = internalPartReference( TQString::number( key ) ); if (partRef == -1) { m_embeddeeData = data; m_embeddeeLength = length; - QString srcMime( KoEmbeddingFilter::mimeTypeByExtension( extension ) ); + TQString srcMime( KoEmbeddingFilter::mimeTypeByExtension( extension ) ); if ( srcMime == KMimeType::defaultMimeType() ) kdWarning( s_area ) << "Couldn't determine the mimetype from the extension" << endl; - QCString destMime; // intentionally empty, the filter manager will do the rest - KoFilter::ConversionStatus status; - partRef = embedPart( srcMime.latin1(), destMime, status, QString::number( key ) ); + TQCString destMime; // intentionally empty, the filter manager will do the rest + KoFilter::ConversiontqStatus status; + partRef = embedPart( srcMime.latin1(), destMime, status, TQString::number( key ) ); m_embeddeeData = 0; m_embeddeeLength = 0; @@ -186,14 +186,14 @@ void MSODImport::gotPicture( return; } } - m_text += "<object url=\"" + QString::number( partRef ) + "\" mime=\""; - m_text += internalPartMimeType( QString::number( key ) ); + m_text += "<object url=\"" + TQString::number( partRef ) + "\" mime=\""; + m_text += internalPartMimeType( TQString::number( key ) ); m_text += "\" x=\"0\" y=\"0\" width=\"100\" height=\"200\"/>\n"; } else { // We could not import it as a part. Try as an image. - KTempFile tempFile( QString::null, '.' + extension ); + KTempFile tempFile( TQString(), '.' + extension ); tempFile.file()->writeBlock( data, length ); tempFile.close(); @@ -210,26 +210,26 @@ void MSODImport::gotPicture( void MSODImport::gotPolygon( const DrawContext &dc, - const QPointArray &points) + const TQPointArray &points) { kdDebug(s_area) << "MSODImport::gotPolygon" << endl; - kdDebug(s_area) << QString::number(dc.m_penWidth, 16) << endl; + kdDebug(s_area) << TQString::number(dc.m_penWidth, 16) << endl; kdDebug(s_area) << dc.m_penStyle << endl; m_text += "<COMPOSITE>\n"; if( dc.m_penWidth > 0 ) { - m_text += "<STROKE lineWidth=\"1\">\n";// + QString::number(dc.m_penWidth, 16) + "\">\n"; + m_text += "<STROKE lineWidth=\"1\">\n";// + TQString::number(dc.m_penWidth, 16) + "\">\n"; double r, g, b; toRGB(dc.m_penColour, r, g, b); - m_text += "<COLOR v1=\"" + QString::number(r) + "\" v2=\"" + QString::number(g) + "\" v3=\"" + QString::number(b) + "\" opacity=\"1\" colorSpace=\"0\" />\n"; + m_text += "<COLOR v1=\"" + TQString::number(r) + "\" v2=\"" + TQString::number(g) + "\" v3=\"" + TQString::number(b) + "\" opacity=\"1\" colorSpace=\"0\" />\n"; m_text += "</STROKE>\n"; } else m_text += "<STROKE lineWidth=\"1\" />\n"; - m_text += "<FILL fillRule=\"" + QString::number(dc.m_winding) + "\">\n"; + m_text += "<FILL fillRule=\"" + TQString::number(dc.m_winding) + "\">\n"; double r, g, b; toRGB(dc.m_brushColour, r, g, b); - m_text += "<COLOR v1=\"" + QString::number(r) + "\" v2=\"" + QString::number(g) + "\" v3=\"" + QString::number(b) + "\" opacity=\"1\" colorSpace=\"0\" />\n"; + m_text += "<COLOR v1=\"" + TQString::number(r) + "\" v2=\"" + TQString::number(g) + "\" v3=\"" + TQString::number(b) + "\" opacity=\"1\" colorSpace=\"0\" />\n"; m_text += "</FILL>\n"; m_text += "<PATH isClosed=\"1\" >\n"; @@ -241,12 +241,12 @@ void MSODImport::gotPolygon( void MSODImport::gotPolyline( const DrawContext &dc, - const QPointArray &points) + const TQPointArray &points) { kdDebug(s_area) << "MSODImport::gotPolyline" << endl; return; // ### TODO m_text += "<COMPOSITE>\n"; - m_text += "<STROKE lineWidth=\"" + QString::number(dc.m_penWidth) + "\">\n"; + m_text += "<STROKE lineWidth=\"" + TQString::number(dc.m_penWidth) + "\">\n"; m_text += "</STROKE>\n"; m_text += "<PATH isClosed=\"1\" >\n"; pointArray(points); @@ -256,24 +256,24 @@ void MSODImport::gotPolyline( void MSODImport::gotRectangle( const DrawContext &dc, - const QPointArray &points) + const TQPointArray &points) { // ### TODO #if 0 - QRect bounds = points.boundingRect(); + TQRect bounds = points.boundingRect(); - m_text += "<rectangle width=\"" + QString::number(bounds.width()) + - "\" x=\"" + QString::number(bounds.x()) + - "\" y=\"" + QString::number(bounds.y()) + - "\" height=\"" + QString::number(bounds.height()) + + m_text += "<rectangle width=\"" + TQString::number(bounds.width()) + + "\" x=\"" + TQString::number(bounds.x()) + + "\" y=\"" + TQString::number(bounds.y()) + + "\" height=\"" + TQString::number(bounds.height()) + "\" rounding=\"0\">\n"; m_text += "<polyline arrow1=\"0\" arrow2=\"0\">\n"; pointArray(points); - m_text += " <gobject fillcolor=\"#" + QString::number(dc.m_brushColour, 16) + - "\" fillstyle=\"" + QString::number(1 /*m_winding*/) + - "\" linewidth=\"" + QString::number(dc.m_penWidth) + - "\" strokecolor=\"#" + QString::number(dc.m_penColour, 16) + - "\" strokestyle=\"" + QString::number(dc.m_penStyle) + + m_text += " <gobject fillcolor=\"#" + TQString::number(dc.m_brushColour, 16) + + "\" fillstyle=\"" + TQString::number(1 /*m_winding*/) + + "\" linewidth=\"" + TQString::number(dc.m_penWidth) + + "\" strokecolor=\"#" + TQString::number(dc.m_penColour, 16) + + "\" strokestyle=\"" + TQString::number(dc.m_penStyle) + "\">\n"; m_text += " <matrix dx=\"0\" dy=\"0\" m21=\"0\" m22=\"1\" m11=\"1\" m12=\"0\"/>\n"; m_text += " </gobject>\n"; @@ -282,29 +282,29 @@ void MSODImport::gotRectangle( #endif } -void MSODImport::savePartContents( QIODevice* file ) +void MSODImport::savePartContents( TQIODevice* file ) { if ( m_embeddeeData != 0 && m_embeddeeLength != 0 ) file->writeBlock( m_embeddeeData, m_embeddeeLength ); } void MSODImport::pointArray( - const QPointArray &points) + const TQPointArray &points) { - m_text += "<MOVE x=\"" + QString::number(points.point(0).x()) + - "\" y=\"" + QString::number(points.point(0).y()) + + m_text += "<MOVE x=\"" + TQString::number(points.point(0).x()) + + "\" y=\"" + TQString::number(points.point(0).y()) + "\" />\n"; - kdDebug(s_area) << "\n<MOVE x=\"" + QString::number(points.point(0).x()) + - "\" y=\"" + QString::number(points.point(0).y()) + + kdDebug(s_area) << "\n<MOVE x=\"" + TQString::number(points.point(0).x()) + + "\" y=\"" + TQString::number(points.point(0).y()) + "\" />" << endl; for (unsigned int i = 1; i < points.count(); i++) { - m_text += "<LINE x=\"" + QString::number(points.point(i).x()) + - "\" y=\"" + QString::number(points.point(i).y()) + + m_text += "<LINE x=\"" + TQString::number(points.point(i).x()) + + "\" y=\"" + TQString::number(points.point(i).y()) + "\" />\n"; - kdDebug(s_area) << "<LINE x=\"" + QString::number(points.point(i).x()) + - "\" y=\"" + QString::number(points.point(i).y()) + + kdDebug(s_area) << "<LINE x=\"" + TQString::number(points.point(i).x()) + + "\" y=\"" + TQString::number(points.point(i).y()) + "\" />" << endl; } diff --git a/filters/karbon/msod/msodimport.h b/filters/karbon/msod/msodimport.h index cb6aec16..ec036bdf 100644 --- a/filters/karbon/msod/msodimport.h +++ b/filters/karbon/msod/msodimport.h @@ -30,54 +30,55 @@ class MSODImport : public KoEmbeddingFilter, protected Msod { Q_OBJECT + TQ_OBJECT public: MSODImport( - KoFilter *parent, + KoFilter *tqparent, const char *name, - const QStringList&); + const TQStringList&); virtual ~MSODImport(); - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); protected: virtual void gotEllipse( const DrawContext &dc, - QString type, - QPoint topLeft, - QSize halfAxes, + TQString type, + TQPoint topLeft, + TQSize halfAxes, unsigned startAngle, unsigned stopAngle); virtual void gotPicture( unsigned id, - QString extension, + TQString extension, unsigned length, const char *data); virtual void gotPolygon( const DrawContext &dc, - const QPointArray &points); + const TQPointArray &points); virtual void gotPolyline( const DrawContext &dc, - const QPointArray &points); + const TQPointArray &points); virtual void gotRectangle( const DrawContext &dc, - const QPointArray &points); + const TQPointArray &points); signals: - // Communication signals to the parent filters + // Communication signals to the tqparent filters void commSignalDelayStream( const char* delay ); - void commSignalShapeID( unsigned int& shapeID ); + void commSignalShapeID( unsigned int& tqshapeID ); private: - virtual void savePartContents( QIODevice* file ); + virtual void savePartContents( TQIODevice* file ); // Debug support. static const int s_area; void pointArray( - const QPointArray &points); - QString m_text; + const TQPointArray &points); + TQString m_text; // Embedded objects. const char* m_embeddeeData; diff --git a/filters/karbon/oodraw/oodrawimport.cc b/filters/karbon/oodraw/oodrawimport.cc index f52ed5b8..a31d80a4 100644 --- a/filters/karbon/oodraw/oodrawimport.cc +++ b/filters/karbon/oodraw/oodrawimport.cc @@ -21,9 +21,9 @@ #include <math.h> -#include <qdatetime.h> -#include <qfileinfo.h> -#include <qdir.h> +#include <tqdatetime.h> +#include <tqfileinfo.h> +#include <tqdir.h> #include <kzip.h> #include <karchive.h> @@ -50,7 +50,7 @@ typedef KGenericFactory<OoDrawImport, KoFilter> OoDrawImportFactory; K_EXPORT_COMPONENT_FACTORY( liboodrawimport, OoDrawImportFactory( "kofficefilters" ) ) -OoDrawImport::OoDrawImport( KoFilter *, const char *, const QStringList & ) +OoDrawImport::OoDrawImport( KoFilter *, const char *, const TQStringList & ) : KoFilter(), m_styles( 23, true ), m_styleStack( ooNS::style, ooNS::fo ) @@ -62,7 +62,7 @@ OoDrawImport::~OoDrawImport() { } -KoFilter::ConversionStatus OoDrawImport::convert( QCString const & from, QCString const & to ) +KoFilter::ConversiontqStatus OoDrawImport::convert( TQCString const & from, TQCString const & to ) { kdDebug() << "Entering Oodraw Import filter: " << from << " - " << to << endl; @@ -81,42 +81,42 @@ KoFilter::ConversionStatus OoDrawImport::convert( QCString const & from, QCStrin return KoFilter::FileNotFound; } - KoFilter::ConversionStatus preStatus = openFile(); + KoFilter::ConversiontqStatus pretqStatus = openFile(); - if( preStatus != KoFilter::OK ) + if( pretqStatus != KoFilter::OK ) { m_zip->close(); delete m_zip; - return preStatus; + return pretqStatus; } -/*QDomDocument docinfo; +/*TQDomDocument docinfo; createDocumentInfo( docinfo ); // store document info KoStoreDevice* out = m_chain->storageFile( "documentinfo.xml", KoStore::Write ); if( out ) { -QCString info = docinfo.toCString(); +TQCString info = docinfo.toCString(); //kdDebug() << " info :" << info << endl; -// WARNING: we cannot use KoStore::write(const QByteArray&) because it gives an extra NULL character at the end. +// WARNING: we cannot use KoStore::write(const TQByteArray&) because it gives an extra NULL character at the end. out->writeBlock( info , info.length() ); }*/ - QDomDocument docinfo; + TQDomDocument docinfo; createDocumentInfo( docinfo ); // store document info KoStoreDevice* out = m_chain->storageFile( "documentinfo.xml", KoStore::Write ); if( out ) { - QCString info = docinfo.toCString(); + TQCString info = docinfo.toCString(); //kdDebug(30518) << " info :" << info << endl; - // WARNING: we cannot use KoStore::write(const QByteArray&) because it gives an extra NULL character at the end. + // WARNING: we cannot use KoStore::write(const TQByteArray&) because it gives an extra NULL character at the end. out->writeBlock( info , info.length() ); } convert(); - QDomDocument outdoc = m_document.saveXML(); + TQDomDocument outdoc = m_document.saveXML(); // add paper info, we always need custom for svg (Rob) - QDomElement paper = outdoc.createElement( "PAPER" ); + TQDomElement paper = outdoc.createElement( "PAPER" ); outdoc.documentElement().appendChild( paper ); paper.setAttribute( "format", PG_CUSTOM ); paper.setAttribute( "width", m_document.width() ); @@ -126,7 +126,7 @@ out->writeBlock( info , info.length() ); out = m_chain->storageFile( "maindoc.xml", KoStore::Write ); if( out ) { - QCString content = outdoc.toCString(); + TQCString content = outdoc.toCString(); kdDebug() << " content :" << content << endl; out->writeBlock( content , content.length() ); } @@ -139,7 +139,7 @@ out->writeBlock( info , info.length() ); } // Very related to OoWriterImport::createDocumentInfo -void OoDrawImport::createDocumentInfo( QDomDocument &docinfo ) +void OoDrawImport::createDocumentInfo( TQDomDocument &docinfo ) { docinfo = KoDocument::createDomDocument( "document-info" /*DTD name*/, "document-info" /*tag name*/, "1.1" ); @@ -149,9 +149,9 @@ void OoDrawImport::createDocumentInfo( QDomDocument &docinfo ) // Very related to OoWriterImport::openFile() -KoFilter::ConversionStatus OoDrawImport::openFile() +KoFilter::ConversiontqStatus OoDrawImport::openFile() { - KoFilter::ConversionStatus status = loadAndParse( "content.xml", m_content ); + KoFilter::ConversiontqStatus status = loadAndParse( "content.xml", m_content ); if ( status != KoFilter::OK ) { kdError(30518) << "Content.xml could not be parsed correctly! Aborting!" << endl; @@ -159,7 +159,7 @@ KoFilter::ConversionStatus OoDrawImport::openFile() } // We do not stop if the following calls fail. - QDomDocument styles; + TQDomDocument styles; loadAndParse( "styles.xml", styles ); loadAndParse( "meta.xml", m_meta ); loadAndParse( "settings.xml", m_settings ); @@ -174,25 +174,25 @@ void OoDrawImport::convert() { m_document.saveAsPath( false ); - QDomElement content = m_content.documentElement(); + TQDomElement content = m_content.documentElement(); // content.xml contains some automatic-styles that we need to store - QDomNode automaticStyles = KoDom::namedItemNS( content, ooNS::office, "automatic-styles" ); + TQDomNode automaticStyles = KoDom::namedItemNS( content, ooNS::office, "automatic-styles" ); if( !automaticStyles.isNull() ) insertStyles( automaticStyles.toElement() ); - QDomNode body = KoDom::namedItemNS( content, ooNS::office, "body" ); + TQDomNode body = KoDom::namedItemNS( content, ooNS::office, "body" ); if( body.isNull() ) return; // we take the settings of the first slide for the whole document. - QDomElement drawPage = KoDom::namedItemNS( body, ooNS::draw, "page" ); + TQDomElement drawPage = KoDom::namedItemNS( body, ooNS::draw, "page" ); if( drawPage.isNull() ) // no pages? give up. return; - QDomElement *master = m_styles[drawPage.attributeNS( ooNS::draw, "master-page-name", QString::null )]; - QDomElement *style = m_styles[master->attributeNS( ooNS::style, "page-master-name", QString::null )]; - QDomElement properties = KoDom::namedItemNS( *style, ooNS::style, "properties" ).toElement(); + TQDomElement *master = m_styles[drawPage.attributeNS( ooNS::draw, "master-page-name", TQString() )]; + TQDomElement *style = m_styles[master->attributeNS( ooNS::style, "page-master-name", TQString() )]; + TQDomElement properties = KoDom::namedItemNS( *style, ooNS::style, "properties" ).toElement(); if( properties.isNull() ) { @@ -201,20 +201,20 @@ void OoDrawImport::convert() } else { - m_document.setWidth( KoUnit::parseValue(properties.attributeNS( ooNS::fo, "page-width", QString::null ) ) ); - m_document.setHeight( KoUnit::parseValue(properties.attributeNS( ooNS::fo, "page-height", QString::null ) ) ); + m_document.setWidth( KoUnit::parseValue(properties.attributeNS( ooNS::fo, "page-width", TQString() ) ) ); + m_document.setHeight( KoUnit::parseValue(properties.attributeNS( ooNS::fo, "page-height", TQString() ) ) ); } // parse all pages - for( QDomNode drawPage = body.firstChild(); !drawPage.isNull(); drawPage = drawPage.nextSibling() ) + for( TQDomNode drawPage = body.firstChild(); !drawPage.isNull(); drawPage = drawPage.nextSibling() ) { - QDomElement dp = drawPage.toElement(); + TQDomElement dp = drawPage.toElement(); m_styleStack.clear(); // remove all styles fillStyleStack( dp ); //m_styleStack.setPageMark(); // set the pagetitle - //QDomElement titleElement = doc.createElement( "Title" ); + //TQDomElement titleElement = doc.createElement( "Title" ); //titleElement.setAttribute( "title", dp.attributeNS( "name" ) ); //pageTitleElement.appendChild( titleElement ); @@ -223,27 +223,27 @@ void OoDrawImport::convert() } -KoFilter::ConversionStatus OoDrawImport::loadAndParse(const QString& filename, QDomDocument& doc) +KoFilter::ConversiontqStatus OoDrawImport::loadAndParse(const TQString& filename, TQDomDocument& doc) { return OoUtils::loadAndParse( filename, doc, m_zip); } void -OoDrawImport::parseGroup( VGroup *parent, const QDomElement& parentobject ) +OoDrawImport::parseGroup( VGroup *tqparent, const TQDomElement& tqparentobject ) { // parse all objects - for( QDomNode object = parentobject.firstChild(); !object.isNull(); object = object.nextSibling() ) + for( TQDomNode object = tqparentobject.firstChild(); !object.isNull(); object = object.nextSibling() ) { - QDomElement o = object.toElement(); + TQDomElement o = object.toElement(); if( o.namespaceURI() != ooNS::draw ) continue; - QString name = o.localName(); - QString drawID = o.attributeNS( ooNS::draw, "id", QString::null ); + TQString name = o.localName(); + TQString drawID = o.attributeNS( ooNS::draw, "id", TQString() ); VObject *obj = 0L; if( name == "g" ) // polyline { storeObjectStyles( o ); - VGroup *group = new VGroup( parent ); + VGroup *group = new VGroup( tqparent ); appendPen( *group ); appendBrush( *group ); obj = group; @@ -252,12 +252,12 @@ OoDrawImport::parseGroup( VGroup *parent, const QDomElement& parentobject ) else if( name == "rect" ) // rectangle { storeObjectStyles( o ); - double x = KoUnit::parseValue( o.attributeNS( ooNS::svg, "x", QString::null ) ); - double y = ymirror( KoUnit::parseValue( o.attributeNS( ooNS::svg, "y", QString::null ) ) ); - double w = KoUnit::parseValue( o.attributeNS( ooNS::svg, "width", QString::null ) ); - double h = KoUnit::parseValue( o.attributeNS( ooNS::svg, "height", QString::null ) ); - int corner = static_cast<int>( KoUnit::parseValue( o.attributeNS( ooNS::draw, "corner-radius", QString::null ) ) ); - VRectangle *rect = new VRectangle( parent, KoPoint( x, y ), w, h, corner ); + double x = KoUnit::parseValue( o.attributeNS( ooNS::svg, "x", TQString() ) ); + double y = ymirror( KoUnit::parseValue( o.attributeNS( ooNS::svg, "y", TQString() ) ) ); + double w = KoUnit::parseValue( o.attributeNS( ooNS::svg, "width", TQString() ) ); + double h = KoUnit::parseValue( o.attributeNS( ooNS::svg, "height", TQString() ) ); + int corner = static_cast<int>( KoUnit::parseValue( o.attributeNS( ooNS::draw, "corner-radius", TQString() ) ) ); + VRectangle *rect = new VRectangle( tqparent, KoPoint( x, y ), w, h, corner ); appendPen( *rect ); appendBrush( *rect ); obj = rect; @@ -265,13 +265,13 @@ OoDrawImport::parseGroup( VGroup *parent, const QDomElement& parentobject ) else if( name == "circle" || name == "ellipse" ) { storeObjectStyles( o ); - double w = KoUnit::parseValue( o.attributeNS( ooNS::svg, "width", QString::null ) ); - double h = KoUnit::parseValue( o.attributeNS( ooNS::svg, "height", QString::null ) ); - double x = KoUnit::parseValue( o.attributeNS( ooNS::svg, "x", QString::null ) ); - double y = ymirror( KoUnit::parseValue( o.attributeNS( ooNS::svg, "y", QString::null ) ) ) - h; - double start = o.attributeNS( ooNS::draw, "start-angle", QString::null ).toDouble(); - double end = o.attributeNS( ooNS::draw, "end-angle", QString::null ).toDouble(); - QString kind = o.attributeNS( ooNS::draw, "kind", QString::null ); + double w = KoUnit::parseValue( o.attributeNS( ooNS::svg, "width", TQString() ) ); + double h = KoUnit::parseValue( o.attributeNS( ooNS::svg, "height", TQString() ) ); + double x = KoUnit::parseValue( o.attributeNS( ooNS::svg, "x", TQString() ) ); + double y = ymirror( KoUnit::parseValue( o.attributeNS( ooNS::svg, "y", TQString() ) ) ) - h; + double start = o.attributeNS( ooNS::draw, "start-angle", TQString() ).toDouble(); + double end = o.attributeNS( ooNS::draw, "end-angle", TQString() ).toDouble(); + TQString kind = o.attributeNS( ooNS::draw, "kind", TQString() ); VEllipse::VEllipseType type = VEllipse::full; if( !kind.isEmpty() ) { @@ -282,7 +282,7 @@ OoDrawImport::parseGroup( VGroup *parent, const QDomElement& parentobject ) else if( kind == "arc" ) type = VEllipse::arc; } - VEllipse *ellipse = new VEllipse( parent, KoPoint( x, y ), w, h, type, start, end ); + VEllipse *ellipse = new VEllipse( tqparent, KoPoint( x, y ), w, h, type, start, end ); appendPen( *ellipse ); // arc has no brush if( kind != "arc" ) @@ -292,11 +292,11 @@ OoDrawImport::parseGroup( VGroup *parent, const QDomElement& parentobject ) else if( name == "line" ) // line { storeObjectStyles( o ); - VPath *line = new VPath( parent ); - double x1 = KoUnit::parseValue( o.attributeNS( ooNS::svg, "x1", QString::null ) ); - double y1 = ymirror( KoUnit::parseValue( o.attributeNS( ooNS::svg, "y1", QString::null ) ) ); - double x2 = KoUnit::parseValue( o.attributeNS( ooNS::svg, "x2", QString::null ) ); - double y2 = ymirror( KoUnit::parseValue( o.attributeNS( ooNS::svg, "y2", QString::null ) ) ); + VPath *line = new VPath( tqparent ); + double x1 = KoUnit::parseValue( o.attributeNS( ooNS::svg, "x1", TQString() ) ); + double y1 = ymirror( KoUnit::parseValue( o.attributeNS( ooNS::svg, "y1", TQString() ) ) ); + double x2 = KoUnit::parseValue( o.attributeNS( ooNS::svg, "x2", TQString() ) ); + double y2 = ymirror( KoUnit::parseValue( o.attributeNS( ooNS::svg, "y2", TQString() ) ) ); line->moveTo( KoPoint( x1, y1 ) ); line->lineTo( KoPoint( x2, y2 ) ); appendPen( *line ); @@ -306,7 +306,7 @@ OoDrawImport::parseGroup( VGroup *parent, const QDomElement& parentobject ) else if( name == "polyline" ) // polyline { storeObjectStyles( o ); - VPath *polyline = new VPath( parent ); + VPath *polyline = new VPath( tqparent ); appendPoints( *polyline, o); appendPen( *polyline ); appendBrush( *polyline ); @@ -315,9 +315,9 @@ OoDrawImport::parseGroup( VGroup *parent, const QDomElement& parentobject ) else if( name == "polygon" ) // polygon { storeObjectStyles( o ); - //VPolygon *polygon = new VPolygon( parent ); + //VPolygon *polygon = new VPolygon( tqparent ); //polygon->load( o ); - VPath *polygon = new VPath( parent ); + VPath *polygon = new VPath( tqparent ); appendPoints( *polygon, o ); appendPen( *polygon ); appendBrush( *polygon ); @@ -326,14 +326,14 @@ OoDrawImport::parseGroup( VGroup *parent, const QDomElement& parentobject ) else if( name == "path" ) // path { storeObjectStyles( o ); - VPath *path = new VPath( parent ); - path->loadSvgPath( o.attributeNS( ooNS::svg, "d", QString::null ) ); + VPath *path = new VPath( tqparent ); + path->loadSvgPath( o.attributeNS( ooNS::svg, "d", TQString() ) ); KoRect rect = parseViewBox( o ); - double x = KoUnit::parseValue( o.attributeNS( ooNS::svg, "x", QString::null ) ); - double y = ymirror( KoUnit::parseValue( o.attributeNS( ooNS::svg, "y", QString::null ) ) ); - double w = KoUnit::parseValue( o.attributeNS( ooNS::svg, "width", QString::null ) ); - double h = KoUnit::parseValue( o.attributeNS( ooNS::svg, "height", QString::null ) ); - QWMatrix mat; + double x = KoUnit::parseValue( o.attributeNS( ooNS::svg, "x", TQString() ) ); + double y = ymirror( KoUnit::parseValue( o.attributeNS( ooNS::svg, "y", TQString() ) ) ); + double w = KoUnit::parseValue( o.attributeNS( ooNS::svg, "width", TQString() ) ); + double h = KoUnit::parseValue( o.attributeNS( ooNS::svg, "height", TQString() ) ); + TQWMatrix mat; mat.translate( x, y ); mat.scale( w / rect.width(), -h / rect.height() ); path->transform( mat ); @@ -353,8 +353,8 @@ appendImage( doc, e, pictureElement, o ); kdDebug() << "Unsupported object '" << name << "'" << endl; continue; } - if( parent && obj ) - parent->append( obj ); + if( tqparent && obj ) + tqparent->append( obj ); else if( obj ) m_document.append( obj ); } @@ -373,9 +373,9 @@ OoDrawImport::appendPen( VObject &obj ) stroke.setType( VStroke::solid ); else if( m_styleStack.attributeNS( ooNS::draw, "stroke" ) == "dash" ) { - QValueList<float> dashes; + TQValueList<float> dashes; stroke.setType( VStroke::solid ); - QString style = m_styleStack.attributeNS( ooNS::draw, "stroke-dash" ); + TQString style = m_styleStack.attributeNS( ooNS::draw, "stroke-dash" ); if( style == "Ultrafine Dashed" || style == "Fine Dashed (var)" || style == "Dashed (var)" ) stroke.dashPattern().setArray( dashes << 2 << 2 ); @@ -412,7 +412,7 @@ OoDrawImport::appendBrush( VObject &obj ) { if( m_styleStack.hasAttributeNS( ooNS::draw, "fill" ) ) { - const QString fill = m_styleStack.attributeNS( ooNS::draw, "fill" ); + const TQString fill = m_styleStack.attributeNS( ooNS::draw, "fill" ); VFill f; if( fill == "solid" ) @@ -430,25 +430,25 @@ OoDrawImport::appendBrush( VObject &obj ) VGradient gradient; gradient.clearStops(); gradient.setRepeatMethod( VGradient::none ); - QString style = m_styleStack.attributeNS( ooNS::draw, "fill-gradient-name" ); + TQString style = m_styleStack.attributeNS( ooNS::draw, "fill-gradient-name" ); - QDomElement* draw = m_draws[style]; + TQDomElement* draw = m_draws[style]; if( draw ) { double border = 0.0; if( draw->hasAttributeNS( ooNS::draw, "border" ) ) - border += draw->attributeNS( ooNS::draw, "border", QString::null ).remove( '%' ).toDouble() / 100.0; + border += draw->attributeNS( ooNS::draw, "border", TQString() ).remove( '%' ).toDouble() / 100.0; VColor c; - parseColor( c, draw->attributeNS( ooNS::draw, "start-color", QString::null ) ); + parseColor( c, draw->attributeNS( ooNS::draw, "start-color", TQString() ) ); gradient.addStop( c, border, 0.5 ); - parseColor( c, draw->attributeNS( ooNS::draw, "end-color", QString::null ) ); + parseColor( c, draw->attributeNS( ooNS::draw, "end-color", TQString() ) ); gradient.addStop( c, 1.0, 0.5 ); - QString type = draw->attributeNS( ooNS::draw, "style", QString::null ); + TQString type = draw->attributeNS( ooNS::draw, "style", TQString() ); if( type == "linear" || type == "axial" ) { gradient.setType( VGradient::linear ); - int angle = draw->attributeNS( ooNS::draw, "angle", QString::null ).toInt() / 10; + int angle = draw->attributeNS( ooNS::draw, "angle", TQString() ).toInt() / 10; // make sure the angle is between 0 and 359 angle = abs( angle ); @@ -515,12 +515,12 @@ OoDrawImport::appendBrush( VObject &obj ) // and (un-)balanced settings of kpresenter. Let's try it. double x, y; if( draw->hasAttributeNS( ooNS::draw, "cx" ) ) - x = draw->attributeNS( ooNS::draw, "cx", QString::null ).remove( '%' ).toDouble() / 100.0; + x = draw->attributeNS( ooNS::draw, "cx", TQString() ).remove( '%' ).toDouble() / 100.0; else x = 0.5; if( draw->hasAttributeNS( ooNS::draw, "cy" ) ) - y = draw->attributeNS( ooNS::draw, "cy", QString::null ).remove( '%' ).toDouble() / 100.0; + y = draw->attributeNS( ooNS::draw, "cy", TQString() ).remove( '%' ).toDouble() / 100.0; else y = 0.5; @@ -540,8 +540,8 @@ OoDrawImport::appendBrush( VObject &obj ) } /*else if( fill == "hatch" ) { -QDomElement brush = doc.createElement( "BRUSH" ); -QString style = m_styleStack.attributeNS( "fill-hatch-name" ); +TQDomElement brush = doc.createElement( "BRUSH" ); +TQString style = m_styleStack.attributeNS( "fill-hatch-name" ); if( style == "Black 0 Degrees" ) brush.setAttribute( "style", 9 ); else if( style == "Black 90 Degrees" ) @@ -555,7 +555,7 @@ brush.setAttribute( "style", 13 ); else if( style == "Red Crossed 45 Degrees" || style == "Blue Crossed 45 Degrees" ) brush.setAttribute( "style", 14 ); -QDomElement* draw = m_draws[style]; +TQDomElement* draw = m_draws[style]; if( draw && draw->hasAttributeNS( "color" ) ) brush.setAttribute( "color", draw->attributeNS( "color" ) ); e.appendChild( brush ); @@ -563,88 +563,88 @@ e.appendChild( brush ); } void -OoDrawImport::createStyleMap( QDomDocument &docstyles ) +OoDrawImport::createStyleMap( TQDomDocument &docstyles ) { - QDomElement styles = docstyles.documentElement(); + TQDomElement styles = docstyles.documentElement(); if( styles.isNull() ) return; - QDomNode fixedStyles = KoDom::namedItemNS( styles, ooNS::office, "styles" ); + TQDomNode fixedStyles = KoDom::namedItemNS( styles, ooNS::office, "styles" ); if( !fixedStyles.isNull() ) { insertDraws( fixedStyles.toElement() ); insertStyles( fixedStyles.toElement() ); } - QDomNode automaticStyles = KoDom::namedItemNS( styles, ooNS::office, "automatic-styles" ); + TQDomNode automaticStyles = KoDom::namedItemNS( styles, ooNS::office, "automatic-styles" ); if( !automaticStyles.isNull() ) insertStyles( automaticStyles.toElement() ); - QDomNode masterStyles = KoDom::namedItemNS( styles, ooNS::office, "master-styles" ); + TQDomNode masterStyles = KoDom::namedItemNS( styles, ooNS::office, "master-styles" ); if( !masterStyles.isNull() ) insertStyles( masterStyles.toElement() ); } void -OoDrawImport::insertDraws( const QDomElement& styles ) +OoDrawImport::insertDraws( const TQDomElement& styles ) { - for( QDomNode n = styles.firstChild(); !n.isNull(); n = n.nextSibling() ) + for( TQDomNode n = styles.firstChild(); !n.isNull(); n = n.nextSibling() ) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); if( !e.hasAttributeNS( ooNS::draw, "name" ) ) continue; - QString name = e.attributeNS( ooNS::draw, "name", QString::null ); - m_draws.insert( name, new QDomElement( e ) ); + TQString name = e.attributeNS( ooNS::draw, "name", TQString() ); + m_draws.insert( name, new TQDomElement( e ) ); } } void -OoDrawImport::insertStyles( const QDomElement& styles ) +OoDrawImport::insertStyles( const TQDomElement& styles ) { - for ( QDomNode n = styles.firstChild(); !n.isNull(); n = n.nextSibling() ) + for ( TQDomNode n = styles.firstChild(); !n.isNull(); n = n.nextSibling() ) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); if( !e.hasAttributeNS( ooNS::style, "name" ) ) continue; - QString name = e.attributeNS( ooNS::style, "name", QString::null ); - m_styles.insert( name, new QDomElement( e ) ); + TQString name = e.attributeNS( ooNS::style, "name", TQString() ); + m_styles.insert( name, new TQDomElement( e ) ); //kdDebug() << "Style: '" << name << "' loaded " << endl; } } void -OoDrawImport::fillStyleStack( const QDomElement& object ) +OoDrawImport::fillStyleStack( const TQDomElement& object ) { // find all styles associated with an object and push them on the stack if( object.hasAttributeNS( ooNS::presentation, "style-name" ) ) - addStyles( m_styles[object.attributeNS( ooNS::presentation, "style-name", QString::null )] ); + addStyles( m_styles[object.attributeNS( ooNS::presentation, "style-name", TQString() )] ); if( object.hasAttributeNS( ooNS::draw, "style-name" ) ) - addStyles( m_styles[object.attributeNS( ooNS::draw, "style-name", QString::null )] ); + addStyles( m_styles[object.attributeNS( ooNS::draw, "style-name", TQString() )] ); if( object.hasAttributeNS( ooNS::draw, "text-style-name" ) ) - addStyles( m_styles[object.attributeNS( ooNS::draw, "text-style-name", QString::null )] ); + addStyles( m_styles[object.attributeNS( ooNS::draw, "text-style-name", TQString() )] ); if( object.hasAttributeNS( ooNS::text, "style-name" ) ) - addStyles( m_styles[object.attributeNS( ooNS::text, "style-name", QString::null )] ); + addStyles( m_styles[object.attributeNS( ooNS::text, "style-name", TQString() )] ); } void -OoDrawImport::addStyles( const QDomElement* style ) +OoDrawImport::addStyles( const TQDomElement* style ) { - // this function is necessary as parent styles can have parents themself - if( style->hasAttributeNS( ooNS::style, "parent-style-name" ) ) - addStyles( m_styles[style->attributeNS( ooNS::style, "parent-style-name", QString::null )] ); + // this function is necessary as tqparent styles can have tqparents themself + if( style->hasAttributeNS( ooNS::style, "tqparent-style-name" ) ) + addStyles( m_styles[style->attributeNS( ooNS::style, "tqparent-style-name", TQString() )] ); m_styleStack.push( *style ); } void -OoDrawImport::storeObjectStyles( const QDomElement& object ) +OoDrawImport::storeObjectStyles( const TQDomElement& object ) { //m_styleStack.clearPageMark(); // remove styles of previous object fillStyleStack( object ); @@ -652,14 +652,14 @@ OoDrawImport::storeObjectStyles( const QDomElement& object ) } KoRect -OoDrawImport::parseViewBox( const QDomElement& object ) +OoDrawImport::parseViewBox( const TQDomElement& object ) { KoRect rect; - if( !object.attributeNS( ooNS::svg, "viewBox", QString::null ).isEmpty() ) + if( !object.attributeNS( ooNS::svg, "viewBox", TQString() ).isEmpty() ) { // allow for viewbox def with ',' or whitespace - QString viewbox( object.attributeNS( ooNS::svg, "viewBox", QString::null ) ); - QStringList points = QStringList::split( ' ', viewbox.replace( ',', ' ').simplifyWhiteSpace() ); + TQString viewbox( object.attributeNS( ooNS::svg, "viewBox", TQString() ) ); + TQStringList points = TQStringList::split( ' ', viewbox.tqreplace( ',', ' ').simplifyWhiteSpace() ); rect.setX( points[0].toFloat() ); rect.setY( points[1].toFloat() ); @@ -670,24 +670,24 @@ OoDrawImport::parseViewBox( const QDomElement& object ) } void -OoDrawImport::appendPoints(VPath &path, const QDomElement& object) +OoDrawImport::appendPoints(VPath &path, const TQDomElement& object) { - double x = KoUnit::parseValue( object.attributeNS( ooNS::svg, "x", QString::null ) ); - double y = KoUnit::parseValue( object.attributeNS( ooNS::svg, "y", QString::null ) ); - double w = KoUnit::parseValue( object.attributeNS( ooNS::svg, "width", QString::null ) ); - double h = KoUnit::parseValue( object.attributeNS( ooNS::svg, "height", QString::null ) ); + double x = KoUnit::parseValue( object.attributeNS( ooNS::svg, "x", TQString() ) ); + double y = KoUnit::parseValue( object.attributeNS( ooNS::svg, "y", TQString() ) ); + double w = KoUnit::parseValue( object.attributeNS( ooNS::svg, "width", TQString() ) ); + double h = KoUnit::parseValue( object.attributeNS( ooNS::svg, "height", TQString() ) ); KoRect rect = parseViewBox( object ); rect.setX( rect.x() + x ); rect.setY( rect.y() + y ); - QStringList ptList = QStringList::split( ' ', object.attributeNS( ooNS::draw, "points", QString::null ) ); + TQStringList ptList = TQStringList::split( ' ', object.attributeNS( ooNS::draw, "points", TQString() ) ); - QString pt_x, pt_y; + TQString pt_x, pt_y; double tmp_x, tmp_y; KoPoint point; bool bFirst = true; - for( QStringList::Iterator it = ptList.begin(); it != ptList.end(); ++it ) + for( TQStringList::Iterator it = ptList.begin(); it != ptList.end(); ++it ) { tmp_x = rect.x() + ( (*it).section( ',', 0, 0 ).toInt() * w ) / rect.width(); tmp_y = rect.y() + ( (*it).section( ',', 1, 1 ).toInt() * h ) / rect.height(); @@ -705,41 +705,41 @@ OoDrawImport::appendPoints(VPath &path, const QDomElement& object) } void -OoDrawImport::parseColor( VColor &color, const QString &s ) +OoDrawImport::parseColor( VColor &color, const TQString &s ) { if( s.startsWith( "rgb(" ) ) { - QString parse = s.stripWhiteSpace(); - QStringList colors = QStringList::split( ',', parse ); - QString r = colors[0].right( ( colors[0].length() - 4 ) ); - QString g = colors[1]; - QString b = colors[2].left( ( colors[2].length() - 1 ) ); + TQString parse = s.stripWhiteSpace(); + TQStringList colors = TQStringList::split( ',', parse ); + TQString r = colors[0].right( ( colors[0].length() - 4 ) ); + TQString g = colors[1]; + TQString b = colors[2].left( ( colors[2].length() - 1 ) ); - if( r.contains( "%" ) ) + if( r.tqcontains( "%" ) ) { r = r.left( r.length() - 1 ); - r = QString::number( int( ( double( 255 * r.toDouble() ) / 100.0 ) ) ); + r = TQString::number( int( ( double( 255 * r.toDouble() ) / 100.0 ) ) ); } - if( g.contains( "%" ) ) + if( g.tqcontains( "%" ) ) { g = g.left( g.length() - 1 ); - g = QString::number( int( ( double( 255 * g.toDouble() ) / 100.0 ) ) ); + g = TQString::number( int( ( double( 255 * g.toDouble() ) / 100.0 ) ) ); } - if( b.contains( "%" ) ) + if( b.tqcontains( "%" ) ) { b = b.left( b.length() - 1 ); - b = QString::number( int( ( double( 255 * b.toDouble() ) / 100.0 ) ) ); + b = TQString::number( int( ( double( 255 * b.toDouble() ) / 100.0 ) ) ); } - QColor c( r.toInt(), g.toInt(), b.toInt() ); + TQColor c( r.toInt(), g.toInt(), b.toInt() ); color.set( c.red() / 255.0, c.green() / 255.0, c.blue() / 255.0 ); } else { - QString rgbColor = s.stripWhiteSpace(); - QColor c; + TQString rgbColor = s.stripWhiteSpace(); + TQColor c; if( rgbColor.startsWith( "#" ) ) c.setNamedColor( rgbColor ); //else diff --git a/filters/karbon/oodraw/oodrawimport.h b/filters/karbon/oodraw/oodrawimport.h index 06e664ac..ea29b276 100644 --- a/filters/karbon/oodraw/oodrawimport.h +++ b/filters/karbon/oodraw/oodrawimport.h @@ -23,9 +23,9 @@ #include <KoFilter.h> #include <KoStore.h> -#include <qdom.h> -#include <qdict.h> -#include <qcolor.h> +#include <tqdom.h> +#include <tqdict.h> +#include <tqcolor.h> #include <KoStyleStack.h> #include <core/vdocument.h> #include <core/vcomposite.h> @@ -38,38 +38,39 @@ class VGroup; class OoDrawImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - OoDrawImport( KoFilter *parent, const char *name, const QStringList & ); + OoDrawImport( KoFilter *tqparent, const char *name, const TQStringList & ); virtual ~OoDrawImport(); - virtual KoFilter::ConversionStatus convert( QCString const & from, QCString const & to ); + virtual KoFilter::ConversiontqStatus convert( TQCString const & from, TQCString const & to ); private: - void createDocumentInfo( QDomDocument &docinfo ); - - void createStyleMap( QDomDocument &docstyles ); - void insertStyles( const QDomElement& styles ); - void insertDraws( const QDomElement& styles ); - void fillStyleStack( const QDomElement& object ); - void addStyles( const QDomElement* style ); - void storeObjectStyles( const QDomElement& object ); + void createDocumentInfo( TQDomDocument &docinfo ); + + void createStyleMap( TQDomDocument &docstyles ); + void insertStyles( const TQDomElement& styles ); + void insertDraws( const TQDomElement& styles ); + void fillStyleStack( const TQDomElement& object ); + void addStyles( const TQDomElement* style ); + void storeObjectStyles( const TQDomElement& object ); void appendPen( VObject &obj ); void appendBrush( VObject &obj ); - void appendPoints(VPath &path, const QDomElement& object); + void appendPoints(VPath &path, const TQDomElement& object); void convert(); - void parseGroup( VGroup *parent, const QDomElement& object ); - void parseColor( VColor &color, const QString &s ); + void parseGroup( VGroup *tqparent, const TQDomElement& object ); + void parseColor( VColor &color, const TQString &s ); double ymirror( double y ); - KoRect parseViewBox( const QDomElement& object ); + KoRect parseViewBox( const TQDomElement& object ); - KoFilter::ConversionStatus openFile(); - KoFilter::ConversionStatus loadAndParse(const QString& filename, QDomDocument& doc); + KoFilter::ConversiontqStatus openFile(); + KoFilter::ConversiontqStatus loadAndParse(const TQString& filename, TQDomDocument& doc); VDocument m_document; - QDomDocument m_content; - QDomDocument m_meta; - QDomDocument m_settings; - QDict<QDomElement> m_styles, m_draws; + TQDomDocument m_content; + TQDomDocument m_meta; + TQDomDocument m_settings; + TQDict<TQDomElement> m_styles, m_draws; KoStyleStack m_styleStack; KZip * m_zip; diff --git a/filters/karbon/png/pngexport.cc b/filters/karbon/png/pngexport.cc index 652074e9..4de61a44 100644 --- a/filters/karbon/png/pngexport.cc +++ b/filters/karbon/png/pngexport.cc @@ -17,12 +17,12 @@ * Boston, MA 02110-1301, USA. */ -#include <qcstring.h> -#include <qdom.h> -#include <qfile.h> -#include <qstring.h> -#include <qvaluelist.h> -#include <qimage.h> +#include <tqcstring.h> +#include <tqdom.h> +#include <tqfile.h> +#include <tqstring.h> +#include <tqvaluelist.h> +#include <tqimage.h> #include <kgenericfactory.h> #include <KoFilter.h> @@ -43,13 +43,13 @@ typedef KGenericFactory<PngExport, KoFilter> PngExportFactory; K_EXPORT_COMPONENT_FACTORY( libkarbonpngexport, PngExportFactory( "kofficefilters" ) ) -PngExport::PngExport( KoFilter*, const char*, const QStringList& ) +PngExport::PngExport( KoFilter*, const char*, const TQStringList& ) : KoFilter() { } -KoFilter::ConversionStatus -PngExport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus +PngExport::convert( const TQCString& from, const TQCString& to ) { if ( to != "image/png" || from != "application/x-karbon" ) { @@ -60,9 +60,9 @@ PngExport::convert( const QCString& from, const QCString& to ) if( !storeIn ) return KoFilter::StupidError; - QDomDocument domIn; + TQDomDocument domIn; domIn.setContent( storeIn ); - QDomElement docNode = domIn.documentElement(); + TQDomElement docNode = domIn.documentElement(); // load the document and export it: VDocument doc; @@ -74,18 +74,18 @@ PngExport::convert( const QCString& from, const QCString& to ) const KoRect &rect = bbox.boundingRect(); // create image with correct width and height - QImage img( int( rect.width() ), int( rect.height() ), 32 ); + TQImage img( int( rect.width() ), int( rect.height() ), 32 ); //img.setAlphaBuffer( true ); // Create painter and set up objects to draw VKoPainter p( img.bits(), rect.width(), rect.height() ); - p.clear( qRgba( 0xFF, 0xFF, 0xFF, 0xFF ) ); - p.setWorldMatrix( QWMatrix().translate( -rect.x(), -rect.y() ) ); + p.clear( tqRgba( 0xFF, 0xFF, 0xFF, 0xFF ) ); + p.setWorldMatrix( TQWMatrix().translate( -rect.x(), -rect.y() ) ); doc.draw( &p, &rect ); - QImage image = img.swapRGB(); - QImage mirrored = image.mirror( false, true ); + TQImage image = img.swapRGB(); + TQImage mirrored = image.mirror( false, true ); // save png mirrored.save( m_chain->outputFile(), "PNG" ); diff --git a/filters/karbon/png/pngexport.h b/filters/karbon/png/pngexport.h index a14e81c8..9fe9f7eb 100644 --- a/filters/karbon/png/pngexport.h +++ b/filters/karbon/png/pngexport.h @@ -27,12 +27,13 @@ class PngExport : public KoFilter, private VVisitor { Q_OBJECT + TQ_OBJECT public: - PngExport( KoFilter* parent, const char* name, const QStringList& ); + PngExport( KoFilter* tqparent, const char* name, const TQStringList& ); virtual ~PngExport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; #endif diff --git a/filters/karbon/svg/color.h b/filters/karbon/svg/color.h index bfdc93c6..49bc2e52 100644 --- a/filters/karbon/svg/color.h +++ b/filters/karbon/svg/color.h @@ -6,7 +6,7 @@ g = green; \ } -void keywordToRGB( QString rgbColor, int &r, int &g, int &b ) +void keywordToRGB( TQString rgbColor, int &r, int &g, int &b ) { if( rgbColor == "aliceblue" ) TORGB( 240, 248, 255) @@ -206,7 +206,7 @@ void keywordToRGB( QString rgbColor, int &r, int &g, int &b ) TORGB( 245, 255, 250 ) else if( rgbColor == "mistyrose" ) TORGB( 255, 228, 225 ) - else if( rgbColor == "moccasin" ) + else if( rgbColor == "tqmoccasin" ) TORGB( 255, 228, 181 ) else if( rgbColor == "navajowhite" ) TORGB( 255, 222, 173 ) diff --git a/filters/karbon/svg/svgexport.cc b/filters/karbon/svg/svgexport.cc index 4f434d4d..2e661039 100644 --- a/filters/karbon/svg/svgexport.cc +++ b/filters/karbon/svg/svgexport.cc @@ -17,11 +17,11 @@ * Boston, MA 02110-1301, USA. */ -#include <qcstring.h> -#include <qdom.h> -#include <qfile.h> -#include <qstring.h> -#include <qvaluelist.h> +#include <tqcstring.h> +#include <tqdom.h> +#include <tqfile.h> +#include <tqstring.h> +#include <tqvaluelist.h> #include <kgenericfactory.h> #include <KoFilter.h> @@ -48,10 +48,10 @@ #include <kdebug.h> -QString INDENT(" "); +TQString INDENT(" "); void -printIndentation( QTextStream *stream, unsigned int indent ) +printIndentation( TQTextStream *stream, unsigned int indent ) { for( unsigned int i = 0; i < indent;++i) *stream << INDENT; @@ -61,14 +61,14 @@ typedef KGenericFactory<SvgExport, KoFilter> SvgExportFactory; K_EXPORT_COMPONENT_FACTORY( libkarbonsvgexport, SvgExportFactory( "kofficefilters" ) ) -SvgExport::SvgExport( KoFilter*, const char*, const QStringList& ) +SvgExport::SvgExport( KoFilter*, const char*, const TQStringList& ) : KoFilter(), m_indent( 0 ), m_indent2( 0 ), m_trans( 0L ) { m_gc.setAutoDelete( true ); } -KoFilter::ConversionStatus -SvgExport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus +SvgExport::convert( const TQCString& from, const TQCString& to ) { if ( to != "image/svg+xml" || from != "application/x-karbon" ) { @@ -79,22 +79,22 @@ SvgExport::convert( const QCString& from, const QCString& to ) if( !storeIn ) return KoFilter::StupidError; - QFile fileOut( m_chain->outputFile() ); + TQFile fileOut( m_chain->outputFile() ); if( !fileOut.open( IO_WriteOnly ) ) { delete storeIn; return KoFilter::StupidError; } - QDomDocument domIn; + TQDomDocument domIn; domIn.setContent( storeIn ); - QDomElement docNode = domIn.documentElement(); + TQDomElement docNode = domIn.documentElement(); - m_stream = new QTextStream( &fileOut ); - QString body; - m_body = new QTextStream( &body, IO_ReadWrite ); - QString defs; - m_defs = new QTextStream( &defs, IO_ReadWrite ); + m_stream = new TQTextStream( &fileOut ); + TQString body; + m_body = new TQTextStream( &body, IO_ReadWrite ); + TQString defs; + m_defs = new TQTextStream( &defs, IO_ReadWrite ); // load the document and export it: VDocument doc; @@ -149,7 +149,7 @@ SvgExport::visitVDocument( VDocument& document ) SvgGraphicsContext *gc = new SvgGraphicsContext; m_gc.push( gc ); - QWMatrix mat; + TQWMatrix mat; mat.scale( 1, -1 ); mat.translate( 0, -document.height() ); @@ -167,12 +167,12 @@ SvgExport::visitVDocument( VDocument& document ) *m_body << "</svg>" << endl; } -QString +TQString SvgExport::getID( VObject *obj ) { if( obj && !obj->name().isEmpty() ) - return QString( " id=\"%1\"" ).arg( obj->name() ); - return QString(); + return TQString( " id=\"%1\"" ).tqarg( obj->name() ); + return TQString(); } void @@ -213,7 +213,7 @@ SvgExport::visitVLayer( VLayer& layer ) } void -SvgExport::writePathToStream( VPath &composite, const QString &id, QTextStream *stream, unsigned int indent ) +SvgExport::writePathToStream( VPath &composite, const TQString &id, TQTextStream *stream, unsigned int indent ) { if( ! stream ) return; @@ -226,7 +226,7 @@ SvgExport::writePathToStream( VPath &composite, const QString &id, QTextStream * getFill( *( composite.fill() ), stream ); getStroke( *( composite.stroke() ), stream ); - QString d; + TQString d; composite.saveSvgPath( d ); *stream << " d=\"" << d << "\" "; @@ -254,15 +254,15 @@ SvgExport::visitVSubpath( VSubpath& ) { } -QString createUID() +TQString createUID() { static unsigned int nr = 0; - return "defitem" + QString().setNum( nr++ ); + return "defitem" + TQString().setNum( nr++ ); } void -SvgExport::getColorStops( const QPtrVector<VColorStop> &colorStops ) +SvgExport::getColorStops( const TQPtrVector<VColorStop> &colorStops ) { m_indent2++; for( unsigned int i = 0; i < colorStops.count() ; i++ ) @@ -270,7 +270,7 @@ SvgExport::getColorStops( const QPtrVector<VColorStop> &colorStops ) printIndentation( m_defs, m_indent2 ); *m_defs << "<stop stop-color=\""; getHexColor( m_defs, colorStops.at( i )->color ); - *m_defs << "\" offset=\"" << QString().setNum( colorStops.at( i )->rampPoint ); + *m_defs << "\" offset=\"" << TQString().setNum( colorStops.at( i )->rampPoint ); *m_defs << "\" stop-opacity=\"" << colorStops.at( i )->color.opacity() << "\"" << " />" << endl; } m_indent2--; @@ -279,7 +279,7 @@ SvgExport::getColorStops( const QPtrVector<VColorStop> &colorStops ) void SvgExport::getGradient( const VGradient& grad ) { - QString uid = createUID(); + TQString uid = createUID(); if( grad.type() == VGradient::linear ) { printIndentation( m_defs, m_indent2 ); @@ -314,7 +314,7 @@ SvgExport::getGradient( const VGradient& grad ) *m_defs << "fx=\"" << grad.focalPoint().x() << "\" "; *m_defs << "fy=\"" << grad.focalPoint().y() << "\" "; double r = sqrt( pow( grad.vector().x() - grad.origin().x(), 2 ) + pow( grad.vector().y() - grad.origin().y(), 2 ) ); - *m_defs << "r=\"" << QString().setNum( r ) << "\" "; + *m_defs << "r=\"" << TQString().setNum( r ) << "\" "; if( grad.repeatMethod() == VGradient::reflect ) *m_defs << "spreadMethod=\"reflect\" "; else if( grad.repeatMethod() == VGradient::repeat ) @@ -341,7 +341,7 @@ SvgExport::getGradient( const VGradient& grad ) *m_defs << "fx=\"" << grad.focalPoint().x() << "\" "; *m_defs << "fy=\"" << grad.focalPoint().y() << "\" "; double r = sqrt( pow( grad.vector().x() - grad.origin().x(), 2 ) + pow( grad.vector().y() - grad.origin().y(), 2 ) ); - *m_defs << "r=\"" << QString().setNum( r ) << "\" "; + *m_defs << "r=\"" << TQString().setNum( r ) << "\" "; if( grad.repeatMethod() == VGradient::reflect ) *m_defs << "spreadMethod=\"reflect\" "; else if( grad.repeatMethod() == VGradient::repeat ) @@ -361,7 +361,7 @@ SvgExport::getGradient( const VGradient& grad ) void SvgExport::getPattern( const VPattern & ) { - QString uid = createUID(); + TQString uid = createUID(); printIndentation( m_defs, m_indent2 ); *m_defs << "<pattern id=\"" << uid << "\" "; *m_defs << "width=\"" << "\" "; @@ -376,7 +376,7 @@ SvgExport::getPattern( const VPattern & ) } void -SvgExport::getFill( const VFill& fill, QTextStream *stream ) +SvgExport::getFill( const VFill& fill, TQTextStream *stream ) { *stream << " fill=\""; if( fill.type() == VFill::none ) @@ -394,7 +394,7 @@ SvgExport::getFill( const VFill& fill, QTextStream *stream ) } void -SvgExport::getStroke( const VStroke& stroke, QTextStream *stream ) +SvgExport::getStroke( const VStroke& stroke, TQTextStream *stream ) { if( stroke.type() != m_gc.current()->stroke.type() ) { @@ -443,7 +443,7 @@ SvgExport::getStroke( const VStroke& stroke, QTextStream *stream ) *stream << " stroke-dashoffset=\"" << stroke.dashPattern().offset() << "\""; *stream << " stroke-dasharray=\" "; - QValueListConstIterator<float> itr; + TQValueListConstIterator<float> itr; for(itr = stroke.dashPattern().array().begin(); itr != stroke.dashPattern().array().end(); ++itr ) { *stream << *itr << " "; @@ -453,11 +453,11 @@ SvgExport::getStroke( const VStroke& stroke, QTextStream *stream ) } void -SvgExport::getHexColor( QTextStream *stream, const VColor& color ) +SvgExport::getHexColor( TQTextStream *stream, const VColor& color ) { // Convert the various color-spaces to hex - QString Output; + TQString Output; VColor copy( color ); copy.setColorSpace( VColor::rgb ); @@ -475,7 +475,7 @@ SvgExport::visitVText( VText& text ) m_trans->visitVPath( path ); - QString id = createUID(); + TQString id = createUID(); writePathToStream( path, " id=\""+ id + "\"", m_defs, m_indent2 ); printIndentation( m_body, m_indent++ ); @@ -490,9 +490,9 @@ SvgExport::visitVText( VText& text ) *m_body << " font-weight=\"bold\""; if( text.font().italic() ) *m_body << " font-style=\"italic\""; - if( text.alignment() == VText::Center ) + if( text.tqalignment() == VText::Center ) *m_body << " text-anchor=\"middle\""; - else if( text.alignment() == VText::Right ) + else if( text.tqalignment() == VText::Right ) *m_body << " text-anchor=\"end\""; *m_body << ">" << endl; diff --git a/filters/karbon/svg/svgexport.h b/filters/karbon/svg/svgexport.h index 8a4eab63..6a79fb07 100644 --- a/filters/karbon/svg/svgexport.h +++ b/filters/karbon/svg/svgexport.h @@ -27,9 +27,9 @@ #include "svggraphiccontext.h" -#include <qptrstack.h> +#include <tqptrstack.h> -class QTextStream; +class TQTextStream; class VColor; class VPath; class VDocument; @@ -46,12 +46,13 @@ class VTransformCmd; class SvgExport : public KoFilter, private VVisitor { Q_OBJECT + TQ_OBJECT public: - SvgExport( KoFilter* parent, const char* name, const QStringList& ); + SvgExport( KoFilter* tqparent, const char* name, const TQStringList& ); virtual ~SvgExport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); private: virtual void visitVPath( VPath& composite ); @@ -62,21 +63,21 @@ private: virtual void visitVSubpath( VSubpath& path ); virtual void visitVText( VText& text ); - void getStroke( const VStroke& stroke, QTextStream *stream ); - void getColorStops( const QPtrVector<VColorStop> &colorStops ); - void getFill( const VFill& fill, QTextStream *stream ); + void getStroke( const VStroke& stroke, TQTextStream *stream ); + void getColorStops( const TQPtrVector<VColorStop> &colorStops ); + void getFill( const VFill& fill, TQTextStream *stream ); void getGradient( const VGradient& grad ); void getPattern( const VPattern& patt ); - void getHexColor( QTextStream *, const VColor& color ); - QString getID( VObject *obj ); + void getHexColor( TQTextStream *, const VColor& color ); + TQString getID( VObject *obj ); - void writePathToStream( VPath &composite, const QString &id, QTextStream *stream, unsigned int indent ); + void writePathToStream( VPath &composite, const TQString &id, TQTextStream *stream, unsigned int indent ); - QTextStream* m_stream; - QTextStream* m_defs; - QTextStream* m_body; + TQTextStream* m_stream; + TQTextStream* m_defs; + TQTextStream* m_body; - QPtrStack<SvgGraphicsContext> m_gc; + TQPtrStack<SvgGraphicsContext> m_gc; unsigned int m_indent; unsigned int m_indent2; diff --git a/filters/karbon/svg/svggraphiccontext.h b/filters/karbon/svg/svggraphiccontext.h index 96737fd9..e9d5eb4b 100644 --- a/filters/karbon/svg/svggraphiccontext.h +++ b/filters/karbon/svg/svggraphiccontext.h @@ -33,16 +33,16 @@ public: stroke.setLineWidth( 1.0 ); stroke.setLineCap( VStroke::capButt ); stroke.setLineJoin( VStroke::joinMiter ); - fill.setColor( VColor( Qt::black ) ); + fill.setColor( VColor( TQt::black ) ); fillRule = winding; - color = Qt::black; + color = TQt::black; } VFill fill; VFillRule fillRule; VStroke stroke; - QWMatrix matrix; - QFont font; - QColor color; + TQWMatrix matrix; + TQFont font; + TQColor color; }; #endif diff --git a/filters/karbon/svg/svgimport.cc b/filters/karbon/svg/svgimport.cc index f97546c6..b8b580f7 100644 --- a/filters/karbon/svg/svgimport.cc +++ b/filters/karbon/svg/svgimport.cc @@ -35,15 +35,15 @@ #include <core/vgroup.h> #include <core/vimage.h> #include <core/vlayer.h> -#include <qcolor.h> -#include <qfile.h> -#include <qregexp.h> +#include <tqcolor.h> +#include <tqfile.h> +#include <tqregexp.h> #include <kfilterdev.h> typedef KGenericFactory<SvgImport, KoFilter> SvgImportFactory; K_EXPORT_COMPONENT_FACTORY( libkarbonsvgimport, SvgImportFactory( "kofficefilters" ) ) -SvgImport::SvgImport(KoFilter *, const char *, const QStringList&) : +SvgImport::SvgImport(KoFilter *, const char *, const TQStringList&) : KoFilter(), outdoc( "DOC" ) { @@ -54,20 +54,20 @@ SvgImport::~SvgImport() { } -KoFilter::ConversionStatus SvgImport::convert(const QCString& from, const QCString& to) +KoFilter::ConversiontqStatus SvgImport::convert(const TQCString& from, const TQCString& to) { // check for proper conversion if( to != "application/x-karbon" || from != "image/svg+xml" ) return KoFilter::NotImplemented; //Find the last extension - QString strExt; - QString fileIn ( m_chain->inputFile() ); - const int result=fileIn.findRev('.'); + TQString strExt; + TQString fileIn ( m_chain->inputFile() ); + const int result=fileIn.tqfindRev('.'); if (result>=0) strExt=fileIn.mid(result).lower(); - QString strMime; // Mime type of the compressor + TQString strMime; // Mime type of the compressor if ((strExt==".gz") //in case of .svg.gz (logical extension) ||(strExt==".svgz")) //in case of .svgz (extension used prioritary) strMime="application/x-gzip"; // Compressed with gzip @@ -78,7 +78,7 @@ KoFilter::ConversionStatus SvgImport::convert(const QCString& from, const QCStri /*kdDebug(30514) << "File extension: -" << strExt << "- Compression: " << strMime << endl;*/ - QIODevice* in = KFilterDev::deviceForFile(fileIn,strMime); + TQIODevice* in = KFilterDev::deviceForFile(fileIn,strMime); if (!in->open(IO_ReadOnly)) { @@ -88,7 +88,7 @@ KoFilter::ConversionStatus SvgImport::convert(const QCString& from, const QCStri } int line, col; - QString errormessage; + TQString errormessage; const bool parsed=inpdoc.setContent( in, &errormessage, &line, &col ); @@ -107,7 +107,7 @@ KoFilter::ConversionStatus SvgImport::convert(const QCString& from, const QCStri // Do the conversion! convert(); // add paper info, we always need custom for svg (Rob) - QDomElement paper = outdoc.createElement( "PAPER" ); + TQDomElement paper = outdoc.createElement( "PAPER" ); outdoc.documentElement().appendChild( paper ); paper.setAttribute( "format", PG_CUSTOM ); paper.setAttribute( "width", m_document.width() ); @@ -119,7 +119,7 @@ KoFilter::ConversionStatus SvgImport::convert(const QCString& from, const QCStri kdError(30514) << "Unable to open output file!" << endl; return KoFilter::StorageCreationError; } - QCString cstring = outdoc.toCString(); // utf-8 already + TQCString cstring = outdoc.toCString(); // utf-8 already out->writeBlock( cstring.data(), cstring.length() ); return KoFilter::OK; // was successful @@ -128,7 +128,7 @@ KoFilter::ConversionStatus SvgImport::convert(const QCString& from, const QCStri void SvgImport::convert() { SvgGraphicsContext *gc = new SvgGraphicsContext; - QDomElement docElem = inpdoc.documentElement(); + TQDomElement docElem = inpdoc.documentElement(); KoRect bbox( 0, 0, 550.0, 841.0 ); double width = !docElem.attribute( "width" ).isEmpty() ? parseUnit( docElem.attribute( "width" ), true, false, bbox ) : 550.0; double height = !docElem.attribute( "height" ).isEmpty() ? parseUnit( docElem.attribute( "height" ), false, true, bbox ) : 841.0; @@ -138,12 +138,12 @@ void SvgImport::convert() m_outerRect = m_document.boundingBox(); // undo y-mirroring - //m_debug->append(QString("%1\tUndo Y-mirroring.").arg(m_time.elapsed())); + //m_debug->append(TQString("%1\tUndo Y-mirroring.").tqarg(m_time.elapsed())); if( !docElem.attribute( "viewBox" ).isEmpty() ) { // allow for viewbox def with ',' or whitespace - QString viewbox( docElem.attribute( "viewBox" ) ); - QStringList points = QStringList::split( ' ', viewbox.replace( ',', ' ').simplifyWhiteSpace() ); + TQString viewbox( docElem.attribute( "viewBox" ) ); + TQStringList points = TQStringList::split( ' ', viewbox.tqreplace( ',', ' ').simplifyWhiteSpace() ); gc->matrix.scale( width / points[2].toFloat() , height / points[3].toFloat() ); m_outerRect.setWidth( m_outerRect.width() * ( points[2].toFloat() / width ) ); @@ -153,7 +153,7 @@ void SvgImport::convert() m_gc.push( gc ); parseGroup( 0L, docElem ); - QWMatrix mat; + TQWMatrix mat; mat.scale( 1, -1 ); mat.translate( 0, -m_document.height() ); VTransformCmd trafo( 0L, mat ); @@ -166,7 +166,7 @@ void SvgImport::convert() // Helper functions // --------------------------------------------------------------------------------------- -double SvgImport::toPercentage( QString s ) +double SvgImport::toPercentage( TQString s ) { if( s.endsWith( "%" ) ) return s.remove( '%' ).toDouble(); @@ -174,7 +174,7 @@ double SvgImport::toPercentage( QString s ) return s.toDouble() * 100.0; } -double SvgImport::fromPercentage( QString s ) +double SvgImport::fromPercentage( TQString s ) { if( s.endsWith( "%" ) ) return s.remove( '%' ).toDouble() / 100.0; @@ -182,7 +182,7 @@ double SvgImport::fromPercentage( QString s ) return s.toDouble(); } -double SvgImport::getScalingFromMatrix( QWMatrix &matrix ) +double SvgImport::getScalingFromMatrix( TQWMatrix &matrix ) { double xscale = matrix.m11() + matrix.m12(); double yscale = matrix.m22() + matrix.m21(); @@ -258,15 +258,15 @@ void SvgImport::addGraphicContext() m_gc.push( gc ); } -void SvgImport::setupTransform( const QDomElement &e ) +void SvgImport::setupTransform( const TQDomElement &e ) { SvgGraphicsContext *gc = m_gc.current(); - QWMatrix mat = VPath::parseTransform( e.attribute( "transform" ) ); + TQWMatrix mat = VPath::parseTransform( e.attribute( "transform" ) ); gc->matrix = mat * gc->matrix; } -VObject* SvgImport::findObject( const QString &name, VGroup* group ) +VObject* SvgImport::findObject( const TQString &name, VGroup* group ) { if( ! group ) return 0L; @@ -290,9 +290,9 @@ VObject* SvgImport::findObject( const QString &name, VGroup* group ) return 0L; } -VObject* SvgImport::findObject( const QString &name ) +VObject* SvgImport::findObject( const TQString &name ) { - QPtrVector<VLayer> vector; + TQPtrVector<VLayer> vector; m_document.layers().toVector( &vector ); for( int i = vector.count() - 1; i >= 0; i-- ) { @@ -307,22 +307,22 @@ VObject* SvgImport::findObject( const QString &name ) return 0L; } -SvgImport::GradientHelper* SvgImport::findGradient( const QString &id, const QString &href) +SvgImport::GradientHelper* SvgImport::findGradient( const TQString &id, const TQString &href) { // check if gradient was already parsed, and return it - if( m_gradients.contains( id ) ) + if( m_gradients.tqcontains( id ) ) return &m_gradients[ id ]; // check if gradient was stored for later parsing - if( !m_defs.contains( id ) ) + if( !m_defs.tqcontains( id ) ) return 0L; - QDomElement e = m_defs[ id ]; + TQDomElement e = m_defs[ id ]; if(e.childNodes().count() == 0) { - QString mhref = e.attribute("xlink:href").mid(1); + TQString mhref = e.attribute("xlink:href").mid(1); - if(m_defs.contains(mhref)) + if(m_defs.tqcontains(mhref)) return findGradient(mhref, id); else return 0L; @@ -334,22 +334,22 @@ SvgImport::GradientHelper* SvgImport::findGradient( const QString &id, const QSt } // return successfully parsed gradient or NULL - QString n; + TQString n; if(href.isEmpty()) n = id; else n = href; - if( m_gradients.contains( n ) ) + if( m_gradients.tqcontains( n ) ) return &m_gradients[ n ]; else return 0L; } -QDomElement SvgImport::mergeStyles( const QDomElement &referencedBy, const QDomElement &referencedElement ) +TQDomElement SvgImport::mergeStyles( const TQDomElement &referencedBy, const TQDomElement &referencedElement ) { // First use all the style attributes of the element being referenced. - QDomElement e = referencedElement; + TQDomElement e = referencedElement; // Now go through the style attributes of the element that is referencing and substitute the original ones. if( !referencedBy.attribute( "color" ).isEmpty() ) @@ -388,7 +388,7 @@ QDomElement SvgImport::mergeStyles( const QDomElement &referencedBy, const QDomE // Parsing functions // --------------------------------------------------------------------------------------- -double SvgImport::parseUnit( const QString &unit, bool horiz, bool vert, KoRect bbox ) +double SvgImport::parseUnit( const TQString &unit, bool horiz, bool vert, KoRect bbox ) { // TODO : percentage? double value = 0; @@ -439,42 +439,42 @@ double SvgImport::parseUnit( const QString &unit, bool horiz, bool vert, KoRect return value; } -QColor SvgImport::parseColor( const QString &rgbColor ) +TQColor SvgImport::parseColor( const TQString &rgbColor ) { int r, g, b; keywordToRGB( rgbColor, r, g, b ); - return QColor( r, g, b ); + return TQColor( r, g, b ); } -void SvgImport::parseColor( VColor &color, const QString &s ) +void SvgImport::parseColor( VColor &color, const TQString &s ) { if( s.startsWith( "rgb(" ) ) { - QString parse = s.stripWhiteSpace(); - QStringList colors = QStringList::split( ',', parse ); - QString r = colors[0].right( ( colors[0].length() - 4 ) ); - QString g = colors[1]; - QString b = colors[2].left( ( colors[2].length() - 1 ) ); + TQString parse = s.stripWhiteSpace(); + TQStringList colors = TQStringList::split( ',', parse ); + TQString r = colors[0].right( ( colors[0].length() - 4 ) ); + TQString g = colors[1]; + TQString b = colors[2].left( ( colors[2].length() - 1 ) ); - if( r.contains( "%" ) ) + if( r.tqcontains( "%" ) ) { r = r.left( r.length() - 1 ); - r = QString::number( int( ( double( 255 * r.toDouble() ) / 100.0 ) ) ); + r = TQString::number( int( ( double( 255 * r.toDouble() ) / 100.0 ) ) ); } - if( g.contains( "%" ) ) + if( g.tqcontains( "%" ) ) { g = g.left( g.length() - 1 ); - g = QString::number( int( ( double( 255 * g.toDouble() ) / 100.0 ) ) ); + g = TQString::number( int( ( double( 255 * g.toDouble() ) / 100.0 ) ) ); } - if( b.contains( "%" ) ) + if( b.tqcontains( "%" ) ) { b = b.left( b.length() - 1 ); - b = QString::number( int( ( double( 255 * b.toDouble() ) / 100.0 ) ) ); + b = TQString::number( int( ( double( 255 * b.toDouble() ) / 100.0 ) ) ); } - QColor c( r.toInt(), g.toInt(), b.toInt() ); + TQColor c( r.toInt(), g.toInt(), b.toInt() ); color.set( c.red() / 255.0, c.green() / 255.0, c.blue() / 255.0 ); } else if( s == "currentColor" ) @@ -484,8 +484,8 @@ void SvgImport::parseColor( VColor &color, const QString &s ) } else { - QString rgbColor = s.stripWhiteSpace(); - QColor c; + TQString rgbColor = s.stripWhiteSpace(); + TQColor c; if( rgbColor.startsWith( "#" ) ) c.setNamedColor( rgbColor ); else @@ -494,17 +494,17 @@ void SvgImport::parseColor( VColor &color, const QString &s ) } } -void SvgImport::parseColorStops( VGradient *gradient, const QDomElement &e ) +void SvgImport::parseColorStops( VGradient *gradient, const TQDomElement &e ) { VColor c; - for( QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling() ) + for( TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling() ) { - QDomElement stop = n.toElement(); + TQDomElement stop = n.toElement(); if( stop.tagName() == "stop" ) { float offset; - QString temp = stop.attribute( "offset" ); - if( temp.contains( '%' ) ) + TQString temp = stop.attribute( "offset" ); + if( temp.tqcontains( '%' ) ) { temp = temp.left( temp.length() - 1 ); offset = temp.toFloat() / 100.0; @@ -517,13 +517,13 @@ void SvgImport::parseColorStops( VGradient *gradient, const QDomElement &e ) else { // try style attr - QString style = stop.attribute( "style" ).simplifyWhiteSpace(); - QStringList substyles = QStringList::split( ';', style ); - for( QStringList::Iterator it = substyles.begin(); it != substyles.end(); ++it ) + TQString style = stop.attribute( "style" ).simplifyWhiteSpace(); + TQStringList substyles = TQStringList::split( ';', style ); + for( TQStringList::Iterator it = substyles.begin(); it != substyles.end(); ++it ) { - QStringList substyle = QStringList::split( ':', (*it) ); - QString command = substyle[0].stripWhiteSpace(); - QString params = substyle[1].stripWhiteSpace(); + TQStringList substyle = TQStringList::split( ':', (*it) ); + TQString command = substyle[0].stripWhiteSpace(); + TQString params = substyle[1].stripWhiteSpace(); if( command == "stop-color" ) parseColor( c, params ); if( command == "stop-opacity" ) @@ -538,7 +538,7 @@ void SvgImport::parseColorStops( VGradient *gradient, const QDomElement &e ) } } -void SvgImport::parseGradient( const QDomElement &e , const QDomElement &referencedBy) +void SvgImport::parseGradient( const TQDomElement &e , const TQDomElement &referencedBy) { // IMPROVEMENTS: // - Store the parsed colorstops in some sort of a cache so they don't need to be parsed again. @@ -555,7 +555,7 @@ void SvgImport::parseGradient( const QDomElement &e , const QDomElement &referen if(e.childNodes().count() == 0) { - QString href = e.attribute("xlink:href").mid(1); + TQString href = e.attribute("xlink:href").mid(1); if(href.isEmpty()) { @@ -572,17 +572,17 @@ void SvgImport::parseGradient( const QDomElement &e , const QDomElement &referen } // Use the gradient that is referencing, or if there isn't one, the original gradient. - QDomElement b; + TQDomElement b; if( !referencedBy.isNull() ) b = referencedBy; else b = e; - QString id = b.attribute("id"); + TQString id = b.attribute("id"); if( !id.isEmpty() ) { // Copy existing gradient if it exists - if( m_gradients.find( id ) != m_gradients.end() ) + if( m_gradients.tqfind( id ) != m_gradients.end() ) gradhelper.gradient = m_gradients[ id ].gradient; } @@ -598,13 +598,13 @@ void SvgImport::parseGradient( const QDomElement &e , const QDomElement &referen else { // try style attr - QString style = b.attribute( "style" ).simplifyWhiteSpace(); - QStringList substyles = QStringList::split( ';', style ); - for( QStringList::Iterator it = substyles.begin(); it != substyles.end(); ++it ) + TQString style = b.attribute( "style" ).simplifyWhiteSpace(); + TQStringList substyles = TQStringList::split( ';', style ); + for( TQStringList::Iterator it = substyles.begin(); it != substyles.end(); ++it ) { - QStringList substyle = QStringList::split( ':', (*it) ); - QString command = substyle[0].stripWhiteSpace(); - QString params = substyle[1].stripWhiteSpace(); + TQStringList substyle = TQStringList::split( ':', (*it) ); + TQString command = substyle[0].stripWhiteSpace(); + TQString params = substyle[1].stripWhiteSpace(); if( command == "color" ) parseColor( c, params ); } @@ -642,7 +642,7 @@ void SvgImport::parseGradient( const QDomElement &e , const QDomElement &referen gradhelper.gradient.setType( VGradient::radial ); } // handle spread method - QString spreadMethod = b.attribute( "spreadMethod" ); + TQString spreadMethod = b.attribute( "spreadMethod" ); if( !spreadMethod.isEmpty() ) { if( spreadMethod == "reflect" ) @@ -663,7 +663,7 @@ void SvgImport::parseGradient( const QDomElement &e , const QDomElement &referen m_gradients.insert( b.attribute( "id" ), gradhelper ); } -void SvgImport::parsePA( VObject *obj, SvgGraphicsContext *gc, const QString &command, const QString ¶ms ) +void SvgImport::parsePA( VObject *obj, SvgGraphicsContext *gc, const TQString &command, const TQString ¶ms ) { VColor fillcolor = gc->fill.color(); VColor strokecolor = gc->stroke.color(); @@ -676,9 +676,9 @@ void SvgImport::parsePA( VObject *obj, SvgGraphicsContext *gc, const QString &co gc->fill.setType( VFill::none ); else if( params.startsWith( "url(" ) ) { - unsigned int start = params.find("#") + 1; - unsigned int end = params.findRev(")"); - QString key = params.mid( start, end - start ); + unsigned int start = params.tqfind("#") + 1; + unsigned int end = params.tqfindRev(")"); + TQString key = params.mid( start, end - start ); GradientHelper *gradHelper = findGradient( key ); if( gradHelper ) { @@ -692,17 +692,17 @@ void SvgImport::parsePA( VObject *obj, SvgGraphicsContext *gc, const QString &co //kdDebug() << "!!!!!!bbox y : " << bbox.y() << endl; //kdDebug() << gc->fill.gradient().origin().x() << endl; //kdDebug() << gc->fill.gradient().vector().x() << endl; - double offsetx = parseUnit( QString( "%1%" ).arg( gc->fill.gradient().origin().x() ), true, false, bbox ); - double offsety = parseUnit( QString( "%1%" ).arg( gc->fill.gradient().origin().y() ), false, true, bbox ); + double offsetx = parseUnit( TQString( "%1%" ).tqarg( gc->fill.gradient().origin().x() ), true, false, bbox ); + double offsety = parseUnit( TQString( "%1%" ).tqarg( gc->fill.gradient().origin().y() ), false, true, bbox ); gc->fill.gradient().setOrigin( KoPoint( bbox.x() + offsetx, bbox.y() + offsety ) ); if(gc->fill.gradient().type() == VGradient::radial) { - offsetx = parseUnit( QString( "%1%" ).arg( gc->fill.gradient().focalPoint().x() ), true, false, bbox ); - offsety = parseUnit( QString( "%1%" ).arg( gc->fill.gradient().focalPoint().y() ), false, true, bbox ); + offsetx = parseUnit( TQString( "%1%" ).tqarg( gc->fill.gradient().focalPoint().x() ), true, false, bbox ); + offsety = parseUnit( TQString( "%1%" ).tqarg( gc->fill.gradient().focalPoint().y() ), false, true, bbox ); gc->fill.gradient().setFocalPoint( KoPoint( bbox.x() + offsetx, bbox.y() + offsety ) ); } - offsetx = parseUnit( QString( "%1%" ).arg( gc->fill.gradient().vector().x() ), true, false, bbox ); - offsety = parseUnit( QString( "%1%" ).arg( gc->fill.gradient().vector().y() ), false, true, bbox ); + offsetx = parseUnit( TQString( "%1%" ).tqarg( gc->fill.gradient().vector().x() ), true, false, bbox ); + offsety = parseUnit( TQString( "%1%" ).tqarg( gc->fill.gradient().vector().y() ), false, true, bbox ); gc->fill.gradient().setVector( KoPoint( bbox.x() + offsetx, bbox.y() + offsety ) ); //kdDebug() << offsety << endl; //kdDebug() << gc->fill.gradient().origin().x() << endl; @@ -739,9 +739,9 @@ void SvgImport::parsePA( VObject *obj, SvgGraphicsContext *gc, const QString &co gc->stroke.setType( VStroke::none ); else if( params.startsWith( "url(" ) ) { - unsigned int start = params.find("#") + 1; - unsigned int end = params.findRev(")"); - QString key = params.mid( start, end - start ); + unsigned int start = params.tqfind("#") + 1; + unsigned int end = params.tqfindRev(")"); + TQString key = params.mid( start, end - start ); GradientHelper *gradHelper = findGradient( key ); if( gradHelper ) @@ -784,13 +784,13 @@ void SvgImport::parsePA( VObject *obj, SvgGraphicsContext *gc, const QString &co gc->stroke.setMiterLimit( params.toFloat() ); else if( command == "stroke-dasharray" ) { - QValueList<float> array; + TQValueList<float> array; if(params != "none") { // with "stroke-dasharray", the separator is a white space // inside style attribute, stroke-dasharray is separated by comma (,) - QStringList dashes = QStringList::split( QRegExp("[\\s,]"), params ); - for( QStringList::Iterator it = dashes.begin(); it != dashes.end(); ++it ) + TQStringList dashes = TQStringList::split( TQRegExp("[\\s,]"), params ); + for( TQStringList::Iterator it = dashes.begin(); it != dashes.end(); ++it ) array.append( (*it).toFloat() ); } gc->stroke.dashPattern().setArray( array ); @@ -809,8 +809,8 @@ void SvgImport::parsePA( VObject *obj, SvgGraphicsContext *gc, const QString &co } else if( command == "font-family" ) { - QString family = params; - family.replace( '\'' , ' ' ); + TQString family = params; + family.tqreplace( '\'' , ' ' ); gc->font.setFamily( family ); } else if( command == "font-size" ) @@ -820,7 +820,7 @@ void SvgImport::parsePA( VObject *obj, SvgGraphicsContext *gc, const QString &co } else if( command == "font-weight" ) { - int weight = QFont::Normal; + int weight = TQFont::Normal; // map svg weight to qt weight // svg value qt value @@ -831,7 +831,7 @@ void SvgImport::parsePA( VObject *obj, SvgGraphicsContext *gc, const QString &co // 800,900 87,99 if( params == "bold" ) - weight = QFont::Bold; + weight = TQFont::Bold; else if( params == "lighter" ) { weight = gc->font.weight(); @@ -915,7 +915,7 @@ void SvgImport::parsePA( VObject *obj, SvgGraphicsContext *gc, const QString &co gc->stroke.setColor( strokecolor ); } -void SvgImport::parseStyle( VObject *obj, const QDomElement &e ) +void SvgImport::parseStyle( VObject *obj, const TQDomElement &e ) { SvgGraphicsContext *gc = m_gc.current(); if( !gc ) return; @@ -949,13 +949,13 @@ void SvgImport::parseStyle( VObject *obj, const QDomElement &e ) parsePA( obj, gc, "opacity", e.attribute( "opacity" ) ); // try style attr - QString style = e.attribute( "style" ).simplifyWhiteSpace(); - QStringList substyles = QStringList::split( ';', style ); - for( QStringList::Iterator it = substyles.begin(); it != substyles.end(); ++it ) + TQString style = e.attribute( "style" ).simplifyWhiteSpace(); + TQStringList substyles = TQStringList::split( ';', style ); + for( TQStringList::Iterator it = substyles.begin(); it != substyles.end(); ++it ) { - QStringList substyle = QStringList::split( ':', (*it) ); - QString command = substyle[0].stripWhiteSpace(); - QString params = substyle[1].stripWhiteSpace(); + TQStringList substyle = TQStringList::split( ':', (*it) ); + TQString command = substyle[0].stripWhiteSpace(); + TQString params = substyle[1].stripWhiteSpace(); parsePA( obj, gc, command, params ); } @@ -972,7 +972,7 @@ void SvgImport::parseStyle( VObject *obj, const QDomElement &e ) gc->stroke.setLineWidth( lineWidth ); } -void SvgImport::parseFont( const QDomElement &e ) +void SvgImport::parseFont( const TQDomElement &e ) { SvgGraphicsContext *gc = m_gc.current(); if( !gc ) return; @@ -987,16 +987,16 @@ void SvgImport::parseFont( const QDomElement &e ) parsePA( 0L, m_gc.current(), "text-decoration", e.attribute( "text-decoration" ) ); } -void SvgImport::parseUse( VGroup *grp, const QDomElement &e ) +void SvgImport::parseUse( VGroup *grp, const TQDomElement &e ) { - QString id = e.attribute( "xlink:href" ); + TQString id = e.attribute( "xlink:href" ); if( !id.isEmpty() ) { addGraphicContext(); setupTransform( e ); - QString key = id.mid( 1 ); + TQString key = id.mid( 1 ); if( !e.attribute( "x" ).isEmpty() && !e.attribute( "y" ).isEmpty() ) { @@ -1006,9 +1006,9 @@ void SvgImport::parseUse( VGroup *grp, const QDomElement &e ) m_gc.current()->matrix.translate(tx,ty); } - if(m_defs.contains(key)) + if(m_defs.tqcontains(key)) { - QDomElement a = m_defs[key]; + TQDomElement a = m_defs[key]; if(a.tagName() == "g" || a.tagName() == "a") parseGroup( grp, a); else @@ -1023,11 +1023,11 @@ void SvgImport::parseUse( VGroup *grp, const QDomElement &e ) } } -void SvgImport::parseGroup( VGroup *grp, const QDomElement &e ) +void SvgImport::parseGroup( VGroup *grp, const TQDomElement &e ) { - for( QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling() ) + for( TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling() ) { - QDomElement b = n.toElement(); + TQDomElement b = n.toElement(); if( b.isNull() ) continue; // treat svg link <a> as group so we don't miss its child elements @@ -1090,17 +1090,17 @@ void SvgImport::parseGroup( VGroup *grp, const QDomElement &e ) } } -void SvgImport::parseDefs( const QDomElement &e ) +void SvgImport::parseDefs( const TQDomElement &e ) { - for( QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling() ) + for( TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling() ) { - QDomElement b = n.toElement(); + TQDomElement b = n.toElement(); if( b.isNull() ) continue; - QString definition = b.attribute( "id" ); + TQString definition = b.attribute( "id" ); if( !definition.isEmpty() ) { - if( !m_defs.contains( definition ) ) + if( !m_defs.tqcontains( definition ) ) m_defs.insert( definition, b ); } } @@ -1110,13 +1110,13 @@ void SvgImport::parseDefs( const QDomElement &e ) // Creating functions // --------------------------------------------------------------------------------------- -void SvgImport::createText( VGroup *grp, const QDomElement &b ) +void SvgImport::createText( VGroup *grp, const TQDomElement &b ) { const double pathLength = 10.0; VText *text = 0L; - QString content; - QString anchor; + TQString content; + TQString anchor; VSubpath base( 0L ); VPath *path = 0L; double offset = 0.0; @@ -1139,9 +1139,9 @@ void SvgImport::createText( VGroup *grp, const QDomElement &b ) base.lineTo( KoPoint( x + pathLength, y ) ); } - for( QDomNode n = b.firstChild(); !n.isNull(); n = n.nextSibling() ) + for( TQDomNode n = b.firstChild(); !n.isNull(); n = n.nextSibling() ) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); if( e.isNull() ) { content += n.toCharacterData().data(); @@ -1151,8 +1151,8 @@ void SvgImport::createText( VGroup *grp, const QDomElement &b ) if( e.attribute( "xlink:href" ).isEmpty() ) continue; - QString key = e.attribute( "xlink:href" ).mid( 1 ); - if( ! m_defs.contains(key) ) + TQString key = e.attribute( "xlink:href" ).mid( 1 ); + if( ! m_defs.tqcontains(key) ) { // try to find referenced object in document VObject* obj = findObject( key ); @@ -1164,7 +1164,7 @@ void SvgImport::createText( VGroup *grp, const QDomElement &b ) } else { - QDomElement p = m_defs[key]; + TQDomElement p = m_defs[key]; createObject( grp, p, VObject::deleted); } if( ! path ) @@ -1174,7 +1174,7 @@ void SvgImport::createText( VGroup *grp, const QDomElement &b ) if( ! e.attribute( "startOffset" ).isEmpty() ) { - QString start = e.attribute( "startOffset" ); + TQString start = e.attribute( "startOffset" ); if( start.endsWith( "%" ) ) offset = 0.01 * start.remove( '%' ).toDouble(); else @@ -1197,8 +1197,8 @@ void SvgImport::createText( VGroup *grp, const QDomElement &b ) content += e.text(); if( base.isEmpty() && ! e.attribute( "x" ).isEmpty() && ! e.attribute( "y" ).isEmpty() ) { - QStringList posX = QStringList::split( ", ", e.attribute( "x" ) ); - QStringList posY = QStringList::split( ", ", e.attribute( "y" ) ); + TQStringList posX = TQStringList::split( ", ", e.attribute( "x" ) ); + TQStringList posY = TQStringList::split( ", ", e.attribute( "y" ) ); if( posX.count() && posY.count() ) { double x = parseUnit( posX.first() ); @@ -1213,8 +1213,8 @@ void SvgImport::createText( VGroup *grp, const QDomElement &b ) if( e.attribute( "xlink:href" ).isEmpty() ) continue; - QString key = e.attribute( "xlink:href" ).mid( 1 ); - if( ! m_defs.contains(key) ) + TQString key = e.attribute( "xlink:href" ).mid( 1 ); + if( ! m_defs.tqcontains(key) ) { // try to find referenced object in document VObject* obj = findObject( key ); @@ -1226,7 +1226,7 @@ void SvgImport::createText( VGroup *grp, const QDomElement &b ) } else { - QDomElement p = m_defs[key]; + TQDomElement p = m_defs[key]; content += p.text(); } } @@ -1263,9 +1263,9 @@ void SvgImport::createText( VGroup *grp, const QDomElement &b ) text->setName( b.attribute("id") ); if( anchor == "middle" ) - text->setAlignment( VText::Center ); + text->tqsetAlignment( VText::Center ); else if( anchor == "end" ) - text->setAlignment( VText::Right ); + text->tqsetAlignment( VText::Right ); if( offset > 0.0 ) text->setOffset( offset ); @@ -1279,7 +1279,7 @@ void SvgImport::createText( VGroup *grp, const QDomElement &b ) delete( m_gc.pop() ); } -void SvgImport::createObject( VGroup *grp, const QDomElement &b, const VObject::VState state, const QDomElement &style ) +void SvgImport::createObject( VGroup *grp, const TQDomElement &b, const VObject::VState state, const TQDomElement &style ) { VObject *obj = 0L; @@ -1327,12 +1327,12 @@ void SvgImport::createObject( VGroup *grp, const QDomElement &b, const VObject:: VPath *path = new VPath( &m_document ); bool bFirst = true; - QString points = b.attribute( "points" ).simplifyWhiteSpace(); - points.replace( ',', ' ' ); + TQString points = b.attribute( "points" ).simplifyWhiteSpace(); + points.tqreplace( ',', ' ' ); points.remove( '\r' ); points.remove( '\n' ); - QStringList pointList = QStringList::split( ' ', points ); - for( QStringList::Iterator it = pointList.begin(); it != pointList.end(); ++it) + TQStringList pointList = TQStringList::split( ' ', points ); + for( TQStringList::Iterator it = pointList.begin(); it != pointList.end(); ++it) { KoPoint point; point.setX( (*it).toDouble() ); @@ -1357,7 +1357,7 @@ void SvgImport::createObject( VGroup *grp, const QDomElement &b, const VObject:: } else if( b.tagName() == "image" ) { - QString fname = b.attribute("xlink:href"); + TQString fname = b.attribute("xlink:href"); obj = new VImage( 0L, fname ); } diff --git a/filters/karbon/svg/svgimport.h b/filters/karbon/svg/svgimport.h index a558c1fc..24857b65 100644 --- a/filters/karbon/svg/svgimport.h +++ b/filters/karbon/svg/svgimport.h @@ -21,9 +21,9 @@ #define __SVGIMPORT_H__ #include <KoFilter.h> -#include <qdom.h> -#include <qmap.h> -#include <qptrstack.h> +#include <tqdom.h> +#include <tqmap.h> +#include <tqptrstack.h> #include <core/vdocument.h> #include <core/vgradient.h> #include <core/vfill.h> @@ -39,12 +39,13 @@ class VPath; class SvgImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - SvgImport(KoFilter *parent, const char *name, const QStringList&); + SvgImport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~SvgImport(); - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); protected: class GradientHelper @@ -56,46 +57,46 @@ protected: } VGradient gradient; bool bbox; - QWMatrix gradientTransform; + TQWMatrix gradientTransform; }; - void parseGroup( VGroup *, const QDomElement & ); - void parseDefs( const QDomElement & ); - void parseUse( VGroup *, const QDomElement & ); - void parseStyle( VObject *, const QDomElement & ); - void parsePA( VObject *, SvgGraphicsContext *, const QString &, const QString & ); - void parseGradient( const QDomElement &, const QDomElement &referencedBy = QDomElement() ); - void parseColorStops( VGradient *, const QDomElement & ); - double parseUnit( const QString &, bool horiz = false, bool vert = false, KoRect bbox = KoRect() ); - void parseColor( VColor &, const QString & ); - QColor parseColor( const QString & ); - double toPercentage( QString ); - double fromPercentage( QString ); - void setupTransform( const QDomElement & ); + void parseGroup( VGroup *, const TQDomElement & ); + void parseDefs( const TQDomElement & ); + void parseUse( VGroup *, const TQDomElement & ); + void parseStyle( VObject *, const TQDomElement & ); + void parsePA( VObject *, SvgGraphicsContext *, const TQString &, const TQString & ); + void parseGradient( const TQDomElement &, const TQDomElement &referencedBy = TQDomElement() ); + void parseColorStops( VGradient *, const TQDomElement & ); + double parseUnit( const TQString &, bool horiz = false, bool vert = false, KoRect bbox = KoRect() ); + void parseColor( VColor &, const TQString & ); + TQColor parseColor( const TQString & ); + double toPercentage( TQString ); + double fromPercentage( TQString ); + void setupTransform( const TQDomElement & ); void addGraphicContext(); - QDomDocument inpdoc; - QDomDocument outdoc; + TQDomDocument inpdoc; + TQDomDocument outdoc; void convert(); - void createObject( VGroup *grp, const QDomElement &, VObject::VState state = VObject::normal, const QDomElement &style = QDomElement() ); - void createText( VGroup *, const QDomElement & ); - void parseFont( const QDomElement & ); + void createObject( VGroup *grp, const TQDomElement &, VObject::VState state = VObject::normal, const TQDomElement &style = TQDomElement() ); + void createText( VGroup *, const TQDomElement & ); + void parseFont( const TQDomElement & ); // find object with given id in document - VObject* findObject( const QString &name ); + VObject* findObject( const TQString &name ); // find object with given id in given group - VObject* findObject( const QString &name, VGroup * ); + VObject* findObject( const TQString &name, VGroup * ); // find gradient with given id in gradient map - GradientHelper* findGradient( const QString &id, const QString &href = 0 ); + GradientHelper* findGradient( const TQString &id, const TQString &href = 0 ); // Determine scaling factor from given matrix - double getScalingFromMatrix( QWMatrix &matrix ); + double getScalingFromMatrix( TQWMatrix &matrix ); - QDomElement mergeStyles( const QDomElement &, const QDomElement & ); + TQDomElement mergeStyles( const TQDomElement &, const TQDomElement & ); private: VDocument m_document; - QPtrStack<SvgGraphicsContext> m_gc; - QMap<QString, GradientHelper> m_gradients; - QMap<QString, QDomElement> m_defs; + TQPtrStack<SvgGraphicsContext> m_gc; + TQMap<TQString, GradientHelper> m_gradients; + TQMap<TQString, TQDomElement> m_defs; KoRect m_outerRect; }; diff --git a/filters/karbon/wmf/wmfexport.cc b/filters/karbon/wmf/wmfexport.cc index 5f1e94d7..a04dfc11 100644 --- a/filters/karbon/wmf/wmfexport.cc +++ b/filters/karbon/wmf/wmfexport.cc @@ -17,8 +17,8 @@ */ #include <config.h> -#include <qdom.h> -#include <qcstring.h> +#include <tqdom.h> +#include <tqcstring.h> #include <kdebug.h> #include <kgenericfactory.h> #include <KoFilterChain.h> @@ -48,7 +48,7 @@ typedef KGenericFactory<WmfExport, KoFilter> WmfExportFactory; K_EXPORT_COMPONENT_FACTORY( libwmfexport, WmfExportFactory( "kofficefilters" ) ) -WmfExport::WmfExport( KoFilter *, const char *, const QStringList&) : +WmfExport::WmfExport( KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -57,7 +57,7 @@ WmfExport::~WmfExport() { } -KoFilter::ConversionStatus WmfExport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus WmfExport::convert( const TQCString& from, const TQCString& to ) { if( to != "image/x-wmf" || from != "application/x-karbon" ) { return KoFilter::NotImplemented; @@ -76,9 +76,9 @@ KoFilter::ConversionStatus WmfExport::convert( const QCString& from, const QCStr return KoFilter::WrongFormat; } - QDomDocument domIn; + TQDomDocument domIn; domIn.setContent( storeIn ); - QDomElement docNode = domIn.documentElement(); + TQDomElement docNode = domIn.documentElement(); // Load the document. mDoc = new VDocument; @@ -123,8 +123,8 @@ void WmfExport::visitVDocument( VDocument& document ) { void WmfExport::visitVPath( VPath& composite ) { - QPen pen; - QBrush brush; + TQPen pen; + TQBrush brush; getPen( pen, composite.stroke() ); getBrush( brush, composite.fill() ); @@ -133,7 +133,7 @@ void WmfExport::visitVPath( VPath& composite ) { if ( mListPa.count() > 0 ) { mWmf->setPen( pen ); - if( (brush.style() == Qt::NoBrush) + if( (brush.style() == TQt::NoBrush) && (mListPa.count() == 1) ) { mWmf->drawPolyline( *mListPa.first() ); } @@ -158,7 +158,7 @@ void WmfExport::visitVSubpath( VSubpath& path ) { VSubpath *newPath; VSubpathIterator itr( path ); VFlattenCmd cmd( 0L, INCH_TO_POINT(0.3 / (double)mDpi) ); - QPointArray *pa = new QPointArray( path.count() ); + TQPointArray *pa = new TQPointArray( path.count() ); int nbrPoint=0; // number of points in the path for( ; itr.current(); ++itr ) { @@ -221,7 +221,7 @@ void WmfExport::visitVText( VText& text ) { } -void WmfExport::getBrush( QBrush& brush, const VFill *fill ) { +void WmfExport::getBrush( TQBrush& brush, const VFill *fill ) { if( (fill->type() == VFill::solid) || (fill->type() == VFill::grad) || (fill->type() == VFill::patt) ) { if ( fill->color().opacity() < 0.1 ) { @@ -238,7 +238,7 @@ void WmfExport::getBrush( QBrush& brush, const VFill *fill ) { } -void WmfExport::getPen( QPen& pen, const VStroke *stroke ) { +void WmfExport::getPen( TQPen& pen, const VStroke *stroke ) { if( (stroke->type() == VStroke::solid) || (stroke->type() == VStroke::grad) || (stroke->type() == VStroke::patt) ) { // TODO : Dash pattern. diff --git a/filters/karbon/wmf/wmfexport.h b/filters/karbon/wmf/wmfexport.h index 8f107ee0..9d7bf9cb 100644 --- a/filters/karbon/wmf/wmfexport.h +++ b/filters/karbon/wmf/wmfexport.h @@ -19,10 +19,10 @@ #ifndef WMFEXPORT_H #define WMFEXPORT_H -#include <qpen.h> -#include <qbrush.h> -#include <qptrlist.h> -#include <qpointarray.h> +#include <tqpen.h> +#include <tqbrush.h> +#include <tqptrlist.h> +#include <tqpointarray.h> #include <KoFilter.h> #include "vvisitor.h" @@ -35,20 +35,21 @@ class VText; class WmfExport : public KoFilter, private VVisitor { Q_OBJECT + TQ_OBJECT public: - WmfExport( KoFilter *parent, const char *name, const QStringList&); + WmfExport( KoFilter *tqparent, const char *name, const TQStringList&); virtual ~WmfExport(); - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); private: void visitVPath( VPath& composite ); void visitVDocument( VDocument& document ); void visitVSubpath( VSubpath& path ); void visitVText( VText& text ); - void getBrush( QBrush& brush, const VFill *fill ); - void getPen( QPen& pen, const VStroke *stroke ); + void getBrush( TQBrush& brush, const VFill *fill ); + void getPen( TQPen& pen, const VStroke *stroke ); // coordinate transformation // translate origin from (left,bottom) to (left,top) -> scale to wmf size @@ -65,7 +66,7 @@ private: int mDpi; double mScaleX; double mScaleY; - QPtrList<QPointArray> mListPa; + TQPtrList<TQPointArray> mListPa; }; #endif diff --git a/filters/karbon/wmf/wmfimport.cc b/filters/karbon/wmf/wmfimport.cc index eadad26b..23eaaa12 100644 --- a/filters/karbon/wmf/wmfimport.cc +++ b/filters/karbon/wmf/wmfimport.cc @@ -21,8 +21,8 @@ DESCRIPTION */ #include <config.h> -#include <qdom.h> -#include <qcstring.h> +#include <tqdom.h> +#include <tqcstring.h> #include <kdebug.h> #include <kgenericfactory.h> #include <KoFilterChain.h> @@ -36,7 +36,7 @@ typedef KGenericFactory<WMFImport, KoFilter> WMFImportFactory; K_EXPORT_COMPONENT_FACTORY( libwmfimport, WMFImportFactory( "kofficefilters" ) ) -WMFImport::WMFImport( KoFilter *, const char *, const QStringList&) : +WMFImport::WMFImport( KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -45,7 +45,7 @@ WMFImport::~WMFImport() { } -KoFilter::ConversionStatus WMFImport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus WMFImport::convert( const TQCString& from, const TQCString& to ) { if( to != "application/x-karbon" || from != "image/x-wmf" ) return KoFilter::NotImplemented; @@ -66,8 +66,8 @@ KoFilter::ConversionStatus WMFImport::convert( const QCString& from, const QCStr kdError(3800) << "Unable to open output file!" << endl; return KoFilter::StorageCreationError; } - QDomDocument outdoc = document.saveXML(); - QCString content = outdoc.toCString(); + TQDomDocument outdoc = document.saveXML(); + TQCString content = outdoc.toCString(); // kdDebug() << " content : " << content << endl; out->writeBlock( content , content.length() ); diff --git a/filters/karbon/wmf/wmfimport.h b/filters/karbon/wmf/wmfimport.h index e1290422..45ddefec 100644 --- a/filters/karbon/wmf/wmfimport.h +++ b/filters/karbon/wmf/wmfimport.h @@ -30,12 +30,13 @@ DESCRIPTION class WMFImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - WMFImport( KoFilter *parent, const char *name, const QStringList&); + WMFImport( KoFilter *tqparent, const char *name, const TQStringList&); virtual ~WMFImport(); - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; diff --git a/filters/karbon/wmf/wmfimportparser.cc b/filters/karbon/wmf/wmfimportparser.cc index 2eb380a4..275490fe 100644 --- a/filters/karbon/wmf/wmfimportparser.cc +++ b/filters/karbon/wmf/wmfimportparser.cc @@ -47,7 +47,7 @@ bool WMFImportParser::play( VDocument& doc ) // Virtual Painter bool WMFImportParser::begin() { - QRect bounding = boundingRect(); + TQRect bounding = boundingRect(); mBackgroundMode = Qt::TransparentMode; mCurrentOrg.setX( bounding.left() ); @@ -87,26 +87,26 @@ void WMFImportParser::restore() { } -void WMFImportParser::setFont( const QFont & ) { +void WMFImportParser::setFont( const TQFont & ) { } -void WMFImportParser::setPen( const QPen &pen ) { +void WMFImportParser::setPen( const TQPen &pen ) { mPen = pen; } -const QPen &WMFImportParser::pen() const { +const TQPen &WMFImportParser::pen() const { return mPen; } -void WMFImportParser::setBrush( const QBrush &brush ) { +void WMFImportParser::setBrush( const TQBrush &brush ) { mBrush = brush; } -void WMFImportParser::setBackgroundColor( const QColor &c ) { +void WMFImportParser::setBackgroundColor( const TQColor &c ) { mBackgroundColor = c; } @@ -116,7 +116,7 @@ void WMFImportParser::setBackgroundMode( Qt::BGMode mode ) { } -void WMFImportParser::setRasterOp( Qt::RasterOp ) { +void WMFImportParser::setRasterOp( TQt::RasterOp ) { } @@ -135,15 +135,15 @@ void WMFImportParser::setWindowExt( int width, int height ) { } -void WMFImportParser::setWorldMatrix( const QWMatrix &, bool ) { +void WMFImportParser::setWorldMatrix( const TQWMatrix &, bool ) { } -void WMFImportParser::setClipRegion( const QRegion & ) { +void WMFImportParser::setClipRegion( const TQRegion & ) { } -QRegion WMFImportParser::clipRegion() { +TQRegion WMFImportParser::clipRegion() { return mClippingRegion; } @@ -241,7 +241,7 @@ void WMFImportParser::drawChord( int x, int y, int w, int h, int aStart, int aLe } -void WMFImportParser::drawPolyline( const QPointArray &pa ) { +void WMFImportParser::drawPolyline( const TQPointArray &pa ) { VPath *polyline = new VPath( mDoc ); appendPen( *polyline ); appendPoints( *polyline, pa ); @@ -250,7 +250,7 @@ void WMFImportParser::drawPolyline( const QPointArray &pa ) { } -void WMFImportParser::drawPolygon( const QPointArray &pa, bool ) { +void WMFImportParser::drawPolygon( const TQPointArray &pa, bool ) { VPath *polygon = new VPath( mDoc ); appendPen( *polygon ); appendBrush( *polygon ); @@ -261,7 +261,7 @@ void WMFImportParser::drawPolygon( const QPointArray &pa, bool ) { } -void WMFImportParser::drawPolyPolygon( QPtrList<QPointArray>& listPa, bool ) { +void WMFImportParser::drawPolyPolygon( TQPtrList<TQPointArray>& listPa, bool ) { VPath *path = new VPath( mDoc ); if ( listPa.count() > 0 ) { @@ -282,10 +282,10 @@ void WMFImportParser::drawPolyPolygon( QPtrList<QPointArray>& listPa, bool ) { } -void WMFImportParser::drawImage( int , int , const QImage &, int , int , int , int ) {} +void WMFImportParser::drawImage( int , int , const TQImage &, int , int , int , int ) {} -void WMFImportParser::drawText( int , int , int , int , int , const QString& , double ) {} +void WMFImportParser::drawText( int , int , int , int , int , const TQString& , double ) {} //----------------------------------------------------------------------------- @@ -296,30 +296,30 @@ void WMFImportParser::appendPen( VObject& obj ) VStroke stroke( mDoc ); stroke.setLineCap( VStroke::capRound ); - if ( mPen.style() == Qt::NoPen ) { + if ( mPen.style() == TQt::NoPen ) { stroke.setType( VStroke::none ); } else { - QValueList<float> dashes; + TQValueList<float> dashes; stroke.setType( VStroke::solid ); switch ( mPen.style() ) { - case Qt::DashLine : + case TQt::DashLine : stroke.dashPattern().setArray( dashes << MM_TO_POINT(3) << MM_TO_POINT(2) ); break; - case Qt::DotLine : + case TQt::DotLine : stroke.dashPattern().setArray( dashes << MM_TO_POINT(1) << MM_TO_POINT(1) ); break; - case Qt::DashDotLine : + case TQt::DashDotLine : stroke.dashPattern().setArray( dashes << MM_TO_POINT(3) << MM_TO_POINT(1) << MM_TO_POINT(1) << MM_TO_POINT(1) ); break; - case Qt::DashDotDotLine : + case TQt::DashDotDotLine : stroke.dashPattern().setArray( dashes << MM_TO_POINT(3) << MM_TO_POINT(1) << MM_TO_POINT(1) << MM_TO_POINT(1) << MM_TO_POINT(1) << MM_TO_POINT(1) ); break; default: break; } } - stroke.setColor( mPen.color() ); + stroke.setColor( TQColor(mPen.color()) ); double width = mPen.width() * mScaleX; stroke.setLineWidth( ((width < 0.99) ? 1 : width) ); obj.setStroke( stroke ); @@ -329,23 +329,23 @@ void WMFImportParser::appendPen( VObject& obj ) void WMFImportParser::appendBrush( VObject& obj ) { VFill fill( mBackgroundColor ); - fill.setColor( mBrush.color() ); + fill.setColor( TQColor(mBrush.color()) ); switch ( mBrush.style() ) { - case Qt::NoBrush : + case TQt::NoBrush : fill.setType( VFill::none ); break; - case Qt::SolidPattern : + case TQt::SolidPattern : fill.setType( VFill::solid ); break; - case Qt::CustomPattern : + case TQt::CustomPattern : // TODO: bitmap pattern brush fill.setType( VFill::solid ); //fill.pattern(). break; default : // TODO: pattern brush - if ( mBackgroundMode == Qt::OpaqueMode ) { + if ( mBackgroundMode == TQt::OpaqueMode ) { fill.setColor( mBackgroundColor ); fill.setType( VFill::solid ); } @@ -358,7 +358,7 @@ void WMFImportParser::appendBrush( VObject& obj ) } -void WMFImportParser::appendPoints(VPath &path, const QPointArray& pa) +void WMFImportParser::appendPoints(VPath &path, const TQPointArray& pa) { // list of point array if ( pa.size() > 0 ) { diff --git a/filters/karbon/wmf/wmfimportparser.h b/filters/karbon/wmf/wmfimportparser.h index fcb1fbe2..4e904d7f 100644 --- a/filters/karbon/wmf/wmfimportparser.h +++ b/filters/karbon/wmf/wmfimportparser.h @@ -18,8 +18,8 @@ #ifndef _WMFIMPORTPARSER_H_ #define _WMFIMPORTPARSER_H_ -#include <qpainter.h> -#include <qdom.h> +#include <tqpainter.h> +#include <tqdom.h> #include <core/vdocument.h> #include <core/vcomposite.h> #include <kowmfread.h> @@ -45,23 +45,23 @@ public: private: // ------------------------------------------------------------------------- - // A virtual QPainter + // A virtual TQPainter bool begin(); bool end(); void save(); void restore(); // Drawing tools - void setFont( const QFont &font ); + void setFont( const TQFont &font ); // the pen : the width of the pen is in logical coordinate - void setPen( const QPen &pen ); - const QPen &pen() const; - void setBrush( const QBrush &brush ); + void setPen( const TQPen &pen ); + const TQPen &pen() const; + void setBrush( const TQBrush &brush ); // Drawing attributes/modes - void setBackgroundColor( const QColor &c ); + void setBackgroundColor( const TQColor &c ); void setBackgroundMode( Qt::BGMode mode ); - void setRasterOp( Qt::RasterOp op ); + void setRasterOp( TQt::RasterOp op ); /** * Change logical Coordinate @@ -75,8 +75,8 @@ private: // Clipping // the 'CoordinateMode' is ommitted : always CoordPainter in wmf // setClipRegion() is often used with save() and restore() => implement all or none - void setClipRegion( const QRegion &rec ); - QRegion clipRegion(); + void setClipRegion( const TQRegion &rec ); + TQRegion clipRegion(); // Graphics drawing functions void moveTo( int x, int y ); @@ -87,29 +87,29 @@ private: void drawArc( int x, int y, int w, int h, int a, int alen ); void drawPie( int x, int y, int w, int h, int a, int alen ); void drawChord( int x, int y, int w, int h, int a, int alen ); - void drawPolyline( const QPointArray &pa ); - void drawPolygon( const QPointArray &pa, bool winding=FALSE ); + void drawPolyline( const TQPointArray &pa ); + void drawPolygon( const TQPointArray &pa, bool winding=FALSE ); /** * drawPolyPolygon draw the XOR of a list of polygons * listPa : list of polygons */ - void drawPolyPolygon( QPtrList<QPointArray>& listPa, bool winding=FALSE ); - void drawImage( int x, int y, const QImage &, int sx = 0, int sy = 0, int sw = -1, int sh = -1 ); + void drawPolyPolygon( TQPtrList<TQPointArray>& listPa, bool winding=FALSE ); + void drawImage( int x, int y, const TQImage &, int sx = 0, int sy = 0, int sw = -1, int sh = -1 ); // Text drawing // rotation = the degrees of rotation in counterclockwise // not yet implemented in KWinMetaFile - void drawText( int x, int y, int w, int h, int flags, const QString &s, double rotation ); + void drawText( int x, int y, int w, int h, int flags, const TQString &s, double rotation ); // matrix transformation : only used in some bitmap manipulation - void setWorldMatrix( const QWMatrix &, bool combine=FALSE ); + void setWorldMatrix( const TQWMatrix &, bool combine=FALSE ); //----------------------------------------------------------------------------- // Utilities // Add pen, brush and points to a path void appendPen( VObject& obj ); void appendBrush( VObject& obj ); - void appendPoints(VPath& path, const QPointArray& pa); + void appendPoints(VPath& path, const TQPointArray& pa); // coordinate transformation // translate wmf to (0,0) -> scale to document size -> translate to karbon (0,0) // Wmf origin is (left,top) corner @@ -125,17 +125,17 @@ private: private: VDocument *mDoc; - QRegion mClippingRegion; - QPen mPen; - QBrush mBrush; + TQRegion mClippingRegion; + TQPen mPen; + TQBrush mBrush; Qt::BGMode mBackgroundMode; - QColor mBackgroundColor; + TQColor mBackgroundColor; // current origin of WMF logical coordinate - QPoint mCurrentOrg; + TQPoint mCurrentOrg; double mScaleX; double mScaleY; // current position in WMF coordinate (INT16) - QPoint mCurrentPoint; + TQPoint mCurrentPoint; }; #endif diff --git a/filters/karbon/xaml/color.h b/filters/karbon/xaml/color.h index bfdc93c6..49bc2e52 100644 --- a/filters/karbon/xaml/color.h +++ b/filters/karbon/xaml/color.h @@ -6,7 +6,7 @@ g = green; \ } -void keywordToRGB( QString rgbColor, int &r, int &g, int &b ) +void keywordToRGB( TQString rgbColor, int &r, int &g, int &b ) { if( rgbColor == "aliceblue" ) TORGB( 240, 248, 255) @@ -206,7 +206,7 @@ void keywordToRGB( QString rgbColor, int &r, int &g, int &b ) TORGB( 245, 255, 250 ) else if( rgbColor == "mistyrose" ) TORGB( 255, 228, 225 ) - else if( rgbColor == "moccasin" ) + else if( rgbColor == "tqmoccasin" ) TORGB( 255, 228, 181 ) else if( rgbColor == "navajowhite" ) TORGB( 255, 222, 173 ) diff --git a/filters/karbon/xaml/xamlexport.cc b/filters/karbon/xaml/xamlexport.cc index c4ccb467..09dda268 100644 --- a/filters/karbon/xaml/xamlexport.cc +++ b/filters/karbon/xaml/xamlexport.cc @@ -20,11 +20,11 @@ // based on the SVG exporter. Not intended for public release // Microsoft WVG renamed to XAML Graphics. Worry about that later. -#include <qcstring.h> -#include <qdom.h> -#include <qfile.h> -#include <qstring.h> -#include <qvaluelist.h> +#include <tqcstring.h> +#include <tqdom.h> +#include <tqfile.h> +#include <tqstring.h> +#include <tqvaluelist.h> #include <kgenericfactory.h> #include <KoFilter.h> @@ -54,14 +54,14 @@ typedef KGenericFactory<XAMLExport, KoFilter> XAMLExportFactory; K_EXPORT_COMPONENT_FACTORY( libkarbonxamlexport, XAMLExportFactory( "kofficefilters" ) ) -XAMLExport::XAMLExport( KoFilter*, const char*, const QStringList& ) +XAMLExport::XAMLExport( KoFilter*, const char*, const TQStringList& ) : KoFilter() { m_gc.setAutoDelete( true ); } -KoFilter::ConversionStatus -XAMLExport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus +XAMLExport::convert( const TQCString& from, const TQCString& to ) { // TODO: ??? if ( to != "image/wvg+xml" || from != "application/x-karbon" ) @@ -73,22 +73,22 @@ XAMLExport::convert( const QCString& from, const QCString& to ) if( !storeIn ) return KoFilter::StupidError; - QFile fileOut( m_chain->outputFile() ); + TQFile fileOut( m_chain->outputFile() ); if( !fileOut.open( IO_WriteOnly ) ) { delete storeIn; return KoFilter::StupidError; } - QDomDocument domIn; + TQDomDocument domIn; domIn.setContent( storeIn ); - QDomElement docNode = domIn.documentElement(); + TQDomElement docNode = domIn.documentElement(); - m_stream = new QTextStream( &fileOut ); - QString body; - m_body = new QTextStream( &body, IO_ReadWrite ); - QString defs; - m_defs = new QTextStream( &defs, IO_ReadWrite ); + m_stream = new TQTextStream( &fileOut ); + TQString body; + m_body = new TQTextStream( &body, IO_ReadWrite ); + TQString defs; + m_defs = new TQTextStream( &defs, IO_ReadWrite ); // load the document and export it: @@ -157,12 +157,12 @@ XAMLExport::visitVDocument( VDocument& document ) *m_body << "</Canvas>" << endl; } -QString +TQString XAMLExport::getID( VObject *obj ) { if( obj && !obj->name().isEmpty() ) - return QString( " Name=\"%1\"" ).arg( obj->name() ); - return QString(); + return TQString( " Name=\"%1\"" ).tqarg( obj->name() ); + return TQString(); } // which markup to use? Group or Canvas? @@ -185,7 +185,7 @@ XAMLExport::visitVPath( VPath& composite ) getFill( *( composite.fill() ) ); getStroke( *( composite.stroke() ) ); - QString d; + TQString d; composite.saveSvgPath( d ); *m_body << " Data=\"" << d << "\" "; @@ -205,22 +205,22 @@ XAMLExport::visitVSubpath( VSubpath& ) { } -QString createUID() +TQString createUID() { static unsigned int nr = 0; - return "defitem" + QString().setNum( nr++ ); + return "defitem" + TQString().setNum( nr++ ); } void -XAMLExport::getColorStops( const QPtrVector<VColorStop> &colorStops ) +XAMLExport::getColorStops( const TQPtrVector<VColorStop> &colorStops ) { for( unsigned int i = 0; i < colorStops.count() ; i++ ) { *m_defs << "<GradientStop Color=\""; getHexColor( m_defs, colorStops.at( i )->color ); - *m_defs << "\" Offset=\"" << QString().setNum( colorStops.at( i )->rampPoint ); - // XAML uses ARGB values and other methods such as masks for Transparency/Opacity # aa rrggbb + *m_defs << "\" Offset=\"" << TQString().setNum( colorStops.at( i )->rampPoint ); + // XAML uses ARGB values and other methods such as tqmasks for Transparency/Opacity # aa rrggbb // *m_defs << "\" stop-opacity=\"" << colorStops.at( i )->color.opacity() << "\"" << " />" << endl; // Maybe this only applies to gradients, need to check. } @@ -229,7 +229,7 @@ XAMLExport::getColorStops( const QPtrVector<VColorStop> &colorStops ) void XAMLExport::getGradient( const VGradient& grad ) { - QString uid = createUID(); + TQString uid = createUID(); if( grad.type() == VGradient::linear ) { // do linear grad @@ -262,7 +262,7 @@ XAMLExport::getGradient( const VGradient& grad ) *m_defs << "GradientOrigin=\"" << grad.focalPoint().x() << ","; *m_defs << grad.focalPoint().y() << "\" "; double r = sqrt( pow( grad.vector().x() - grad.origin().x(), 2 ) + pow( grad.vector().y() - grad.origin().y(), 2 ) ); - *m_defs << "Radius=\"" << QString().setNum( r ) << "\" "; + *m_defs << "Radius=\"" << TQString().setNum( r ) << "\" "; if( grad.repeatMethod() == VGradient::reflect ) *m_defs << "SpreadMethod=\"Reflect\" "; else if( grad.repeatMethod() == VGradient::repeat ) @@ -343,7 +343,7 @@ XAMLExport::getStroke( const VStroke& stroke ) *m_body << " StrokeDashOffset=\"" << stroke.dashPattern().offset() << "\""; *m_body << " StrokeDashArray=\" "; - QValueListConstIterator<float> itr; + TQValueListConstIterator<float> itr; for(itr = stroke.dashPattern().array().begin(); itr != stroke.dashPattern().array().end(); ++itr ) { *m_body << *itr << " "; @@ -353,11 +353,11 @@ XAMLExport::getStroke( const VStroke& stroke ) } void -XAMLExport::getHexColor( QTextStream *stream, const VColor& color ) +XAMLExport::getHexColor( TQTextStream *stream, const VColor& color ) { // Convert the various color-spaces to hex - QString Output; + TQString Output; VColor copy( color ); copy.setColorSpace( VColor::rgb ); diff --git a/filters/karbon/xaml/xamlexport.h b/filters/karbon/xaml/xamlexport.h index 3d2701c6..cb762a8d 100644 --- a/filters/karbon/xaml/xamlexport.h +++ b/filters/karbon/xaml/xamlexport.h @@ -27,9 +27,9 @@ #include "xamlgraphiccontext.h" -#include <qptrstack.h> +#include <tqptrstack.h> -class QTextStream; +class TQTextStream; class VColor; class VPath; class VDocument; @@ -44,12 +44,13 @@ class VText; class XAMLExport : public KoFilter, private VVisitor { Q_OBJECT + TQ_OBJECT public: - XAMLExport( KoFilter* parent, const char* name, const QStringList& ); + XAMLExport( KoFilter* tqparent, const char* name, const TQStringList& ); virtual ~XAMLExport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); private: virtual void visitVPath( VPath& composite ); @@ -59,17 +60,17 @@ private: //virtual void visitVText( VText& text ); void getStroke( const VStroke& stroke ); - void getColorStops( const QPtrVector<VColorStop> &colorStops ); + void getColorStops( const TQPtrVector<VColorStop> &colorStops ); void getFill( const VFill& fill ); void getGradient( const VGradient& grad ); - void getHexColor( QTextStream *, const VColor& color ); - QString getID( VObject *obj ); + void getHexColor( TQTextStream *, const VColor& color ); + TQString getID( VObject *obj ); - QTextStream* m_stream; - QTextStream* m_defs; - QTextStream* m_body; + TQTextStream* m_stream; + TQTextStream* m_defs; + TQTextStream* m_body; - QPtrStack<XAMLGraphicsContext> m_gc; + TQPtrStack<XAMLGraphicsContext> m_gc; }; #endif diff --git a/filters/karbon/xaml/xamlgraphiccontext.h b/filters/karbon/xaml/xamlgraphiccontext.h index db4a8363..8f298138 100644 --- a/filters/karbon/xaml/xamlgraphiccontext.h +++ b/filters/karbon/xaml/xamlgraphiccontext.h @@ -33,14 +33,14 @@ public: stroke.setLineWidth( 1.0 ); stroke.setLineCap( VStroke::capButt ); stroke.setLineJoin( VStroke::joinMiter ); - fill.setColor( VColor( Qt::black ) ); + fill.setColor( VColor( TQt::black ) ); fillRule = winding; } VFill fill; VFillRule fillRule; VStroke stroke; - QWMatrix matrix; - QFont font; + TQWMatrix matrix; + TQFont font; }; #endif diff --git a/filters/karbon/xaml/xamlimport.cc b/filters/karbon/xaml/xamlimport.cc index 297ff68d..b7f68bbb 100644 --- a/filters/karbon/xaml/xamlimport.cc +++ b/filters/karbon/xaml/xamlimport.cc @@ -24,9 +24,9 @@ #include <kdebug.h> #include <KoUnit.h> #include <KoGlobal.h> -#include <shapes/vellipse.h> -#include <shapes/vrectangle.h> -#include <shapes/vpolygon.h> +#include <tqshapes/vellipse.h> +#include <tqshapes/vrectangle.h> +#include <tqshapes/vpolygon.h> #include <commands/vtransformcmd.h> #include <core/vsegment.h> #include <core/vtext.h> @@ -34,14 +34,14 @@ #include <core/vgroup.h> #include <core/vimage.h> #include <core/vlayer.h> -#include <qcolor.h> -#include <qfile.h> +#include <tqcolor.h> +#include <tqfile.h> #include <kfilterdev.h> typedef KGenericFactory<XAMLImport, KoFilter> XAMLImportFactory; K_EXPORT_COMPONENT_FACTORY( libkarbonxamlimport, XAMLImportFactory( "kofficefilters" ) ) -XAMLImport::XAMLImport(KoFilter *, const char *, const QStringList&) : +XAMLImport::XAMLImport(KoFilter *, const char *, const TQStringList&) : KoFilter(), outdoc( "DOC" ) { @@ -52,22 +52,22 @@ XAMLImport::~XAMLImport() { } -KoFilter::ConversionStatus XAMLImport::convert(const QCString& from, const QCString& to) +KoFilter::ConversiontqStatus XAMLImport::convert(const TQCString& from, const TQCString& to) { // check for proper conversion if( to != "application/x-karbon" || from != "image/wvg+xml" ) return KoFilter::NotImplemented; //Find the last extension - QString strExt; - QString fileIn ( m_chain->inputFile() ); - const int result=fileIn.findRev('.'); + TQString strExt; + TQString fileIn ( m_chain->inputFile() ); + const int result=fileIn.tqfindRev('.'); if (result>=0) { strExt=fileIn.mid(result).lower(); } - QString strMime; // Mime type of the compressor + TQString strMime; // Mime type of the compressor if ((strExt==".gz") //in case of .svg.gz (logical extension) ||(strExt==".wvgz")) //in case of .svgz (extension used prioritary) strMime="application/x-gzip"; // Compressed with gzip @@ -78,7 +78,7 @@ KoFilter::ConversionStatus XAMLImport::convert(const QCString& from, const QCStr kdDebug(30514) << "File extension: -" << strExt << "- Compression: " << strMime << endl; - QIODevice* in = KFilterDev::deviceForFile(fileIn,strMime); + TQIODevice* in = KFilterDev::deviceForFile(fileIn,strMime); if (!in->open(IO_ReadOnly)) { @@ -88,7 +88,7 @@ KoFilter::ConversionStatus XAMLImport::convert(const QCString& from, const QCStr } int line, col; - QString errormessage; + TQString errormessage; const bool parsed=inpdoc.setContent( in, &errormessage, &line, &col ); in->close(); delete in; @@ -110,7 +110,7 @@ KoFilter::ConversionStatus XAMLImport::convert(const QCString& from, const QCStr kdError(30514) << "Unable to open output file!" << endl; return KoFilter::StorageCreationError; } - QCString cstring = outdoc.toCString(); // utf-8 already + TQCString cstring = outdoc.toCString(); // utf-8 already out->writeBlock( cstring.data(), cstring.length() ); return KoFilter::OK; // was successful @@ -120,7 +120,7 @@ void XAMLImport::convert() { XAMLGraphicsContext *gc = new XAMLGraphicsContext; - QDomElement docElem = inpdoc.documentElement(); + TQDomElement docElem = inpdoc.documentElement(); KoRect bbox( 0, 0, 550.0, 841.0 ); double width = !docElem.attribute( "width" ).isEmpty() ? parseUnit( docElem.attribute( "width" ), true, false, bbox ) : 550.0; double height = !docElem.attribute( "height" ).isEmpty() ? parseUnit( docElem.attribute( "height" ), false, true, bbox ) : 841.0; @@ -132,8 +132,8 @@ XAMLImport::convert() if( !docElem.attribute( "viewBox" ).isEmpty() ) { // allow for viewbox def with ',' or whitespace - QString viewbox( docElem.attribute( "viewBox" ) ); - QStringList points = QStringList::split( ' ', viewbox.replace( ',', ' ').simplifyWhiteSpace() ); + TQString viewbox( docElem.attribute( "viewBox" ) ); + TQStringList points = TQStringList::split( ' ', viewbox.tqreplace( ',', ' ').simplifyWhiteSpace() ); gc->matrix.scale( width / points[2].toFloat() , height / points[3].toFloat() ); m_outerRect.setWidth( m_outerRect.width() * ( points[2].toFloat() / width ) ); @@ -142,7 +142,7 @@ XAMLImport::convert() m_gc.push( gc ); parseGroup( 0L, docElem ); - QWMatrix mat; + TQWMatrix mat; mat.scale( 1, -1 ); mat.translate( 0, -m_document.height() ); VTransformCmd trafo( 0L, mat ); @@ -153,7 +153,7 @@ XAMLImport::convert() #define DPI 90 double -XAMLImport::toPercentage( QString s ) +XAMLImport::toPercentage( TQString s ) { if( s.endsWith( "%" ) ) return s.remove( '%' ).toDouble(); @@ -162,7 +162,7 @@ XAMLImport::toPercentage( QString s ) } double -XAMLImport::fromPercentage( QString s ) +XAMLImport::fromPercentage( TQString s ) { if( s.endsWith( "%" ) ) return s.remove( '%' ).toDouble() / 100.0; @@ -233,7 +233,7 @@ getNumber( const char *ptr, double &number ) double -XAMLImport::parseUnit( const QString &unit, bool horiz, bool vert, KoRect bbox ) +XAMLImport::parseUnit( const TQString &unit, bool horiz, bool vert, KoRect bbox ) { // TODO : percentage? double value = 0; @@ -284,50 +284,50 @@ XAMLImport::parseUnit( const QString &unit, bool horiz, bool vert, KoRect bbox ) return value; } -QColor -XAMLImport::parseColor( const QString &rgbColor ) +TQColor +XAMLImport::parseColor( const TQString &rgbColor ) { int r, g, b; keywordToRGB( rgbColor, r, g, b ); - return QColor( r, g, b ); + return TQColor( r, g, b ); } void -XAMLImport::parseColor( VColor &color, const QString &s ) +XAMLImport::parseColor( VColor &color, const TQString &s ) { if( s.startsWith( "rgb(" ) ) { - QString parse = s.stripWhiteSpace(); - QStringList colors = QStringList::split( ',', parse ); - QString r = colors[0].right( ( colors[0].length() - 4 ) ); - QString g = colors[1]; - QString b = colors[2].left( ( colors[2].length() - 1 ) ); + TQString parse = s.stripWhiteSpace(); + TQStringList colors = TQStringList::split( ',', parse ); + TQString r = colors[0].right( ( colors[0].length() - 4 ) ); + TQString g = colors[1]; + TQString b = colors[2].left( ( colors[2].length() - 1 ) ); - if( r.contains( "%" ) ) + if( r.tqcontains( "%" ) ) { r = r.left( r.length() - 1 ); - r = QString::number( int( ( double( 255 * r.toDouble() ) / 100.0 ) ) ); + r = TQString::number( int( ( double( 255 * r.toDouble() ) / 100.0 ) ) ); } - if( g.contains( "%" ) ) + if( g.tqcontains( "%" ) ) { g = g.left( g.length() - 1 ); - g = QString::number( int( ( double( 255 * g.toDouble() ) / 100.0 ) ) ); + g = TQString::number( int( ( double( 255 * g.toDouble() ) / 100.0 ) ) ); } - if( b.contains( "%" ) ) + if( b.tqcontains( "%" ) ) { b = b.left( b.length() - 1 ); - b = QString::number( int( ( double( 255 * b.toDouble() ) / 100.0 ) ) ); + b = TQString::number( int( ( double( 255 * b.toDouble() ) / 100.0 ) ) ); } - QColor c( r.toInt(), g.toInt(), b.toInt() ); + TQColor c( r.toInt(), g.toInt(), b.toInt() ); color.set( c.red() / 255.0, c.green() / 255.0, c.blue() / 255.0 ); } else { - QString rgbColor = s.stripWhiteSpace(); - QColor c; + TQString rgbColor = s.stripWhiteSpace(); + TQColor c; if( rgbColor.startsWith( "#" ) ) c.setNamedColor( rgbColor ); else @@ -337,17 +337,17 @@ XAMLImport::parseColor( VColor &color, const QString &s ) } void -XAMLImport::parseColorStops( VGradient *gradient, const QDomElement &e ) +XAMLImport::parseColorStops( VGradient *gradient, const TQDomElement &e ) { VColor c; - for( QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling() ) + for( TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling() ) { - QDomElement stop = n.toElement(); + TQDomElement stop = n.toElement(); if( stop.tagName() == "stop" ) { float offset; - QString temp = stop.attribute( "offset" ); - if( temp.contains( '%' ) ) + TQString temp = stop.attribute( "offset" ); + if( temp.tqcontains( '%' ) ) { temp = temp.left( temp.length() - 1 ); offset = temp.toFloat() / 100.0; @@ -360,13 +360,13 @@ XAMLImport::parseColorStops( VGradient *gradient, const QDomElement &e ) else { // try style attr - QString style = stop.attribute( "style" ).simplifyWhiteSpace(); - QStringList substyles = QStringList::split( ';', style ); - for( QStringList::Iterator it = substyles.begin(); it != substyles.end(); ++it ) + TQString style = stop.attribute( "style" ).simplifyWhiteSpace(); + TQStringList substyles = TQStringList::split( ';', style ); + for( TQStringList::Iterator it = substyles.begin(); it != substyles.end(); ++it ) { - QStringList substyle = QStringList::split( ':', (*it) ); - QString command = substyle[0].stripWhiteSpace(); - QString params = substyle[1].stripWhiteSpace(); + TQStringList substyle = TQStringList::split( ':', (*it) ); + TQString command = substyle[0].stripWhiteSpace(); + TQString params = substyle[1].stripWhiteSpace(); if( command == "stop-color" ) parseColor( c, params ); if( command == "stop-opacity" ) @@ -382,13 +382,13 @@ XAMLImport::parseColorStops( VGradient *gradient, const QDomElement &e ) } void -XAMLImport::parseGradient( const QDomElement &e ) +XAMLImport::parseGradient( const TQDomElement &e ) { GradientHelper gradhelper; gradhelper.gradient.clearStops(); gradhelper.gradient.setRepeatMethod( VGradient::none ); - QString href = e.attribute( "xlink:href" ).mid( 1 ); + TQString href = e.attribute( "xlink:href" ).mid( 1 ); if( !href.isEmpty() ) { //kdDebug() << "Indexing with href : " << href.latin1() << endl; @@ -428,7 +428,7 @@ XAMLImport::parseGradient( const QDomElement &e ) gradhelper.gradient.setType( VGradient::radial ); } // handle spread method - QString spreadMethod = e.attribute( "spreadMethod" ); + TQString spreadMethod = e.attribute( "spreadMethod" ); if( !spreadMethod.isEmpty() ) { if( spreadMethod == "reflect" ) @@ -443,7 +443,7 @@ XAMLImport::parseGradient( const QDomElement &e ) } void -XAMLImport::parsePA( VObject *obj, XAMLGraphicsContext *gc, const QString &command, const QString ¶ms ) +XAMLImport::parsePA( VObject *obj, XAMLGraphicsContext *gc, const TQString &command, const TQString ¶ms ) { VColor fillcolor = gc->fill.color(); VColor strokecolor = gc->stroke.color(); @@ -454,9 +454,9 @@ XAMLImport::parsePA( VObject *obj, XAMLGraphicsContext *gc, const QString &comma gc->fill.setType( VFill::none ); else if( params.startsWith( "url(" ) ) { - unsigned int start = params.find("#") + 1; - unsigned int end = params.findRev(")"); - QString key = params.mid( start, end - start ); + unsigned int start = params.tqfind("#") + 1; + unsigned int end = params.tqfindRev(")"); + TQString key = params.mid( start, end - start ); gc->fill.gradient() = m_gradients[ key ].gradient; if( m_gradients[ key ].bbox ) { @@ -466,14 +466,14 @@ XAMLImport::parsePA( VObject *obj, XAMLGraphicsContext *gc, const QString &comma //kdDebug() << "!!!!!!bbox y : " << bbox.y() << endl; //kdDebug() << gc->fill.gradient().origin().x() << endl; //kdDebug() << gc->fill.gradient().vector().x() << endl; - double offsetx = parseUnit( QString( "%1%" ).arg( gc->fill.gradient().origin().x() ), true, false, bbox ); - double offsety = parseUnit( QString( "%1%" ).arg( gc->fill.gradient().origin().y() ), false, true, bbox ); + double offsetx = parseUnit( TQString( "%1%" ).tqarg( gc->fill.gradient().origin().x() ), true, false, bbox ); + double offsety = parseUnit( TQString( "%1%" ).tqarg( gc->fill.gradient().origin().y() ), false, true, bbox ); gc->fill.gradient().setOrigin( KoPoint( bbox.x() + offsetx, bbox.y() + offsety ) ); - offsetx = parseUnit( QString( "%1%" ).arg( gc->fill.gradient().focalPoint().x() ), true, false, bbox ); - offsety = parseUnit( QString( "%1%" ).arg( gc->fill.gradient().focalPoint().y() ), false, true, bbox ); + offsetx = parseUnit( TQString( "%1%" ).tqarg( gc->fill.gradient().focalPoint().x() ), true, false, bbox ); + offsety = parseUnit( TQString( "%1%" ).tqarg( gc->fill.gradient().focalPoint().y() ), false, true, bbox ); gc->fill.gradient().setFocalPoint( KoPoint( bbox.x() + offsetx, bbox.y() + offsety ) ); - offsetx = parseUnit( QString( "%1%" ).arg( gc->fill.gradient().vector().x() ), true, false, bbox ); - offsety = parseUnit( QString( "%1%" ).arg( gc->fill.gradient().vector().y() ), false, true, bbox ); + offsetx = parseUnit( TQString( "%1%" ).tqarg( gc->fill.gradient().vector().x() ), true, false, bbox ); + offsety = parseUnit( TQString( "%1%" ).tqarg( gc->fill.gradient().vector().y() ), false, true, bbox ); gc->fill.gradient().setVector( KoPoint( bbox.x() + offsetx, bbox.y() + offsety ) ); //kdDebug() << offsety << endl; //kdDebug() << gc->fill.gradient().origin().x() << endl; @@ -505,9 +505,9 @@ XAMLImport::parsePA( VObject *obj, XAMLGraphicsContext *gc, const QString &comma gc->stroke.setType( VStroke::none ); else if( params.startsWith( "url(" ) ) { - unsigned int start = params.find("#") + 1; - unsigned int end = params.findRev(")"); - QString key = params.mid( start, end - start ); + unsigned int start = params.tqfind("#") + 1; + unsigned int end = params.tqfindRev(")"); + TQString key = params.mid( start, end - start ); gc->stroke.gradient() = m_gradients[ key ].gradient; gc->stroke.gradient().transform( m_gradients[ key ].gradientTransform ); gc->stroke.gradient().transform( gc->matrix ); @@ -543,11 +543,11 @@ XAMLImport::parsePA( VObject *obj, XAMLGraphicsContext *gc, const QString &comma gc->stroke.setMiterLimit( params.toFloat() ); else if( command == "stroke-dasharray" ) { - QValueList<float> array; + TQValueList<float> array; if(params != "none") { - QStringList dashes = QStringList::split( ' ', params ); - for( QStringList::Iterator it = dashes.begin(); it != dashes.end(); ++it ) + TQStringList dashes = TQStringList::split( ' ', params ); + for( TQStringList::Iterator it = dashes.begin(); it != dashes.end(); ++it ) array.append( (*it).toFloat() ); } gc->stroke.dashPattern().setArray( array ); @@ -566,8 +566,8 @@ XAMLImport::parsePA( VObject *obj, XAMLGraphicsContext *gc, const QString &comma } else if( command == "font-family" ) { - QString family = params; - family.replace( '\'' , ' ' ); + TQString family = params; + family.tqreplace( '\'' , ' ' ); gc->font.setFamily( family ); } else if( command == "font-size" ) @@ -600,16 +600,16 @@ XAMLImport::addGraphicContext() } void -XAMLImport::setupTransform( const QDomElement &e ) +XAMLImport::setupTransform( const TQDomElement &e ) { XAMLGraphicsContext *gc = m_gc.current(); - QWMatrix mat = VPath::parseTransform( e.attribute( "transform" ) ); + TQWMatrix mat = VPath::parseTransform( e.attribute( "transform" ) ); gc->matrix = mat * gc->matrix; } void -XAMLImport::parseStyle( VObject *obj, const QDomElement &e ) +XAMLImport::parseStyle( VObject *obj, const TQDomElement &e ) { XAMLGraphicsContext *gc = m_gc.current(); if( !gc ) return; @@ -641,13 +641,13 @@ XAMLImport::parseStyle( VObject *obj, const QDomElement &e ) parsePA( obj, gc, "opacity", e.attribute( "opacity" ) ); // try style attr - QString style = e.attribute( "style" ).simplifyWhiteSpace(); - QStringList substyles = QStringList::split( ';', style ); - for( QStringList::Iterator it = substyles.begin(); it != substyles.end(); ++it ) + TQString style = e.attribute( "style" ).simplifyWhiteSpace(); + TQStringList substyles = TQStringList::split( ';', style ); + for( TQStringList::Iterator it = substyles.begin(); it != substyles.end(); ++it ) { - QStringList substyle = QStringList::split( ':', (*it) ); - QString command = substyle[0].stripWhiteSpace(); - QString params = substyle[1].stripWhiteSpace(); + TQStringList substyle = TQStringList::split( ':', (*it) ); + TQString command = substyle[0].stripWhiteSpace(); + TQString params = substyle[1].stripWhiteSpace(); parsePA( obj, gc, command, params ); } @@ -662,7 +662,7 @@ XAMLImport::parseStyle( VObject *obj, const QDomElement &e ) } void -XAMLImport::parseFont( const QDomElement &e ) +XAMLImport::parseFont( const TQDomElement &e ) { XAMLGraphicsContext *gc = m_gc.current(); if( !gc ) return; @@ -676,15 +676,15 @@ XAMLImport::parseFont( const QDomElement &e ) } void -XAMLImport::parseGroup( VGroup *grp, const QDomElement &e ) +XAMLImport::parseGroup( VGroup *grp, const TQDomElement &e ) { bool isDef = false; if( e.tagName() == "defs" ) isDef = true; - for( QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling() ) + for( TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling() ) { - QDomElement b = n.toElement(); + TQDomElement b = n.toElement(); if( b.isNull() ) continue; VObject *obj = 0L; if( b.tagName() == "g" ) @@ -749,13 +749,13 @@ XAMLImport::parseGroup( VGroup *grp, const QDomElement &e ) if( !b.attribute( "xlink:href" ).isEmpty() ) { - QString params = b.attribute( "xlink:href" ); - unsigned int start = params.find("#") + 1; - unsigned int end = params.findRev(")"); - QString key = params.mid( start, end - start ); - if(m_paths.contains(key)) + TQString params = b.attribute( "xlink:href" ); + unsigned int start = params.tqfind("#") + 1; + unsigned int end = params.tqfindRev(")"); + TQString key = params.mid( start, end - start ); + if(m_paths.tqcontains(key)) { - QDomElement a = m_paths[key]; + TQDomElement a = m_paths[key]; obj = createObject( a ); m_gc.current()->matrix.translate(tx,ty); parsePA( grp, m_gc.current(), "fill", b.attribute( "fill" ) ); @@ -777,7 +777,7 @@ XAMLImport::parseGroup( VGroup *grp, const QDomElement &e ) } } -VObject* XAMLImport::findObject( const QString &name, VGroup* group ) +VObject* XAMLImport::findObject( const TQString &name, VGroup* group ) { if( ! group ) return 0L; @@ -801,9 +801,9 @@ VObject* XAMLImport::findObject( const QString &name, VGroup* group ) return 0L; } -VObject* XAMLImport::findObject( const QString &name ) +VObject* XAMLImport::findObject( const TQString &name ) { - QPtrVector<VLayer> vector; + TQPtrVector<VLayer> vector; m_document.layers().toVector( &vector ); for( int i = vector.count() - 1; i >= 0; i-- ) { @@ -818,10 +818,10 @@ VObject* XAMLImport::findObject( const QString &name ) return 0L; } -void XAMLImport::createText( VGroup *grp, const QDomElement &b ) +void XAMLImport::createText( VGroup *grp, const TQDomElement &b ) { VText *text = 0L; - QString content; + TQString content; VSubpath base( 0L ); VPath *path = 0L; @@ -841,9 +841,9 @@ void XAMLImport::createText( VGroup *grp, const QDomElement &b ) base.lineTo( KoPoint( x + 10, y ) ); } - for( QDomNode n = b.firstChild(); !n.isNull(); n = n.nextSibling() ) + for( TQDomNode n = b.firstChild(); !n.isNull(); n = n.nextSibling() ) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); if( e.isNull() ) { content += n.toCharacterData().data(); @@ -853,11 +853,11 @@ void XAMLImport::createText( VGroup *grp, const QDomElement &b ) if( e.attribute( "xlink:href" ).isEmpty() ) continue; - QString uri = e.attribute( "xlink:href" ); - unsigned int start = uri.find("#") + 1; - unsigned int end = uri.findRev(")"); - QString key = uri.mid( start, end - start ); - if( ! m_paths.contains(key) ) + TQString uri = e.attribute( "xlink:href" ); + unsigned int start = uri.tqfind("#") + 1; + unsigned int end = uri.tqfindRev(")"); + TQString key = uri.mid( start, end - start ); + if( ! m_paths.tqcontains(key) ) { VObject* obj = findObject( key ); if( obj ) @@ -865,7 +865,7 @@ void XAMLImport::createText( VGroup *grp, const QDomElement &b ) } else { - QDomElement p = m_paths[key]; + TQDomElement p = m_paths[key]; path = dynamic_cast<VPath*>( createObject( p ) ); if( path ) path->setState( VObject::deleted ); @@ -882,8 +882,8 @@ void XAMLImport::createText( VGroup *grp, const QDomElement &b ) content += e.text(); if( base.isEmpty() && ! e.attribute( "x" ).isEmpty() && ! e.attribute( "y" ).isEmpty() ) { - QStringList posX = QStringList::split( ", ", e.attribute( "x" ) ); - QStringList posY = QStringList::split( ", ", e.attribute( "y" ) ); + TQStringList posX = TQStringList::split( ", ", e.attribute( "x" ) ); + TQStringList posY = TQStringList::split( ", ", e.attribute( "y" ) ); if( posX.count() && posY.count() ) { double x = parseUnit( posX.first() ); @@ -898,12 +898,12 @@ void XAMLImport::createText( VGroup *grp, const QDomElement &b ) if( e.attribute( "xlink:href" ).isEmpty() ) continue; - QString uri = e.attribute( "xlink:href" ); - unsigned int start = uri.find("#") + 1; - unsigned int end = uri.findRev(")"); - QString key = uri.mid( start, end - start ); + TQString uri = e.attribute( "xlink:href" ); + unsigned int start = uri.tqfind("#") + 1; + unsigned int end = uri.tqfindRev(")"); + TQString key = uri.mid( start, end - start ); - if( ! m_paths.contains(key) ) + if( ! m_paths.tqcontains(key) ) { VObject* obj = findObject( key ); if( obj ) @@ -911,7 +911,7 @@ void XAMLImport::createText( VGroup *grp, const QDomElement &b ) } else { - QDomElement p = m_paths[key]; + TQDomElement p = m_paths[key]; content += p.text(); } } @@ -948,7 +948,7 @@ void XAMLImport::createText( VGroup *grp, const QDomElement &b ) delete( m_gc.pop() ); } -VObject* XAMLImport::createObject( const QDomElement &b ) +VObject* XAMLImport::createObject( const TQDomElement &b ) { if( b.tagName() == "rect" ) { @@ -999,12 +999,12 @@ VObject* XAMLImport::createObject( const QDomElement &b ) VPath *path = new VPath( &m_document ); bool bFirst = true; - QString points = b.attribute( "points" ).simplifyWhiteSpace(); - points.replace( ',', ' ' ); + TQString points = b.attribute( "points" ).simplifyWhiteSpace(); + points.tqreplace( ',', ' ' ); points.remove( '\r' ); points.remove( '\n' ); - QStringList pointList = QStringList::split( ' ', points ); - for( QStringList::Iterator it = pointList.begin(); it != pointList.end(); ++it) + TQStringList pointList = TQStringList::split( ' ', points ); + for( TQStringList::Iterator it = pointList.begin(); it != pointList.end(); ++it) { KoPoint point; point.setX( (*it).toDouble() ); @@ -1032,7 +1032,7 @@ VObject* XAMLImport::createObject( const QDomElement &b ) { addGraphicContext(); setupTransform( b ); - QString fname = b.attribute("xlink:href"); + TQString fname = b.attribute("xlink:href"); return new VImage( 0L, fname ); } diff --git a/filters/karbon/xaml/xamlimport.h b/filters/karbon/xaml/xamlimport.h index 05763419..83f11fc8 100644 --- a/filters/karbon/xaml/xamlimport.h +++ b/filters/karbon/xaml/xamlimport.h @@ -21,9 +21,9 @@ #define __XAMLIMPORT_H__ #include <KoFilter.h> -#include <qdom.h> -#include <qmap.h> -#include <qptrstack.h> +#include <tqdom.h> +#include <tqmap.h> +#include <tqptrstack.h> #include <core/vdocument.h> #include <core/vgradient.h> #include <core/vfill.h> @@ -37,12 +37,13 @@ class VPath; class XAMLImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - XAMLImport(KoFilter *parent, const char *name, const QStringList&); + XAMLImport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~XAMLImport(); - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); protected: class GradientHelper @@ -54,37 +55,37 @@ protected: } VGradient gradient; bool bbox; - QWMatrix gradientTransform; + TQWMatrix gradientTransform; }; - void parseGroup( VGroup *, const QDomElement & ); - void parseStyle( VObject *, const QDomElement & ); - void parsePA( VObject *, XAMLGraphicsContext *, const QString &, const QString & ); - void parseGradient( const QDomElement & ); - void parseColorStops( VGradient *, const QDomElement & ); - double parseUnit( const QString &, bool horiz = false, bool vert = false, KoRect bbox = KoRect() ); - void parseColor( VColor &, const QString & ); - QColor parseColor( const QString & ); - double toPercentage( QString ); - double fromPercentage( QString ); - void setupTransform( const QDomElement & ); + void parseGroup( VGroup *, const TQDomElement & ); + void parseStyle( VObject *, const TQDomElement & ); + void parsePA( VObject *, XAMLGraphicsContext *, const TQString &, const TQString & ); + void parseGradient( const TQDomElement & ); + void parseColorStops( VGradient *, const TQDomElement & ); + double parseUnit( const TQString &, bool horiz = false, bool vert = false, KoRect bbox = KoRect() ); + void parseColor( VColor &, const TQString & ); + TQColor parseColor( const TQString & ); + double toPercentage( TQString ); + double fromPercentage( TQString ); + void setupTransform( const TQDomElement & ); void addGraphicContext(); - QDomDocument inpdoc; - QDomDocument outdoc; + TQDomDocument inpdoc; + TQDomDocument outdoc; void convert(); - VObject* createObject( const QDomElement & ); - void createText( VGroup *, const QDomElement & ); - void parseFont( const QDomElement & ); + VObject* createObject( const TQDomElement & ); + void createText( VGroup *, const TQDomElement & ); + void parseFont( const TQDomElement & ); // find object with given id in document - VObject* findObject( const QString &name ); + VObject* findObject( const TQString &name ); // find object with given id in given group - VObject* findObject( const QString &name, VGroup * ); + VObject* findObject( const TQString &name, VGroup * ); private: VDocument m_document; - QPtrStack<XAMLGraphicsContext> m_gc; - QMap<QString, GradientHelper> m_gradients; - QMap<QString, QDomElement> m_paths; + TQPtrStack<XAMLGraphicsContext> m_gc; + TQMap<TQString, GradientHelper> m_gradients; + TQMap<TQString, TQDomElement> m_paths; KoRect m_outerRect; }; diff --git a/filters/karbon/xcf/xcfexport.cc b/filters/karbon/xcf/xcfexport.cc index fde8bbd5..d5a0c71b 100644 --- a/filters/karbon/xcf/xcfexport.cc +++ b/filters/karbon/xcf/xcfexport.cc @@ -17,12 +17,12 @@ * Boston, MA 02110-1301, USA. */ -#include <qcstring.h> -#include <qdatastream.h> -#include <qdom.h> -#include <qfile.h> -#include <qstring.h> -#include <qvaluelist.h> +#include <tqcstring.h> +#include <tqdatastream.h> +#include <tqdom.h> +#include <tqfile.h> +#include <tqstring.h> +#include <tqvaluelist.h> #include <kgenericfactory.h> #include <KoFilter.h> @@ -45,15 +45,15 @@ typedef KGenericFactory<XcfExport, KoFilter> XcfExportFactory; K_EXPORT_COMPONENT_FACTORY( libkarbonxcfexport, XcfExportFactory( "kofficefilters" ) ) -XcfExport::XcfExport( KoFilter*, const char*, const QStringList& ) +XcfExport::XcfExport( KoFilter*, const char*, const TQStringList& ) : KoFilter() { m_zoomX = 1.0; m_zoomY = 1.0; } -KoFilter::ConversionStatus -XcfExport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus +XcfExport::convert( const TQCString& from, const TQCString& to ) { if( to != "image/x-xcf-gimp" || from != "application/x-karbon" ) { @@ -67,17 +67,17 @@ XcfExport::convert( const QCString& from, const QCString& to ) return KoFilter::StupidError; - QFile fileOut( m_chain->outputFile() ); + TQFile fileOut( m_chain->outputFile() ); if( !fileOut.open( IO_WriteOnly ) ) return KoFilter::StupidError; - QDomDocument domIn; + TQDomDocument domIn; domIn.setContent( storeIn ); - QDomElement docNode = domIn.documentElement(); + TQDomElement docNode = domIn.documentElement(); - m_stream = new QDataStream( &fileOut ); + m_stream = new TQDataStream( &fileOut ); // Load the document. @@ -98,9 +98,9 @@ void XcfExport::visitVDocument( VDocument& document ) { // Offsets. - QIODevice::Offset current = 0; - QIODevice::Offset start = 0; - QIODevice::Offset end = 0; + TQIODevice::Offset current = 0; + TQIODevice::Offset start = 0; + TQIODevice::Offset end = 0; // Save width and height for layer saving. m_width = static_cast<unsigned>( document.width() * m_zoomX ); @@ -111,27 +111,27 @@ XcfExport::visitVDocument( VDocument& document ) m_stream->writeRawBytes( "gimp xcf file", 14 ); // Image width. - *m_stream << static_cast<Q_UINT32>( m_width ); + *m_stream << static_cast<TQ_UINT32>( m_width ); // Image height. - *m_stream << static_cast<Q_UINT32>( m_height ); + *m_stream << static_cast<TQ_UINT32>( m_height ); // Image type = RGB. - *m_stream << static_cast<Q_UINT32>( 0 ); + *m_stream << static_cast<TQ_UINT32>( 0 ); // Do not save any properties currently. *m_stream // "END". - << static_cast<Q_UINT32>( 0 ) + << static_cast<TQ_UINT32>( 0 ) // Property size in bytes. - << static_cast<Q_UINT32>( 0 ); + << static_cast<TQ_UINT32>( 0 ); // Save current offset. - current = m_stream->device()->at(); + current = m_stream->tqdevice()->at(); // Leave space for layer and channel offsets. - m_stream->device()->at( + m_stream->tqdevice()->at( // current position + (number layers + number channels + 2) * 4. current + ( document.layers().count() + 3 + 2 ) * 4 ); @@ -142,7 +142,7 @@ XcfExport::visitVDocument( VDocument& document ) for( ; itr.current(); ++itr ) { // Save start offset. - start = m_stream->device()->at(); + start = m_stream->tqdevice()->at(); // Write layer. @@ -150,142 +150,142 @@ XcfExport::visitVDocument( VDocument& document ) // Save end offset. - end = m_stream->device()->at(); + end = m_stream->tqdevice()->at(); // Return to current offset. - m_stream->device()->at( current ); + m_stream->tqdevice()->at( current ); // Save layer offset. *m_stream << start; // Increment offset. - current = m_stream->device()->at(); + current = m_stream->tqdevice()->at(); // Return to end offset. - m_stream->device()->at( end ); + m_stream->tqdevice()->at( end ); } // Return to current offset. - m_stream->device()->at( current ); + m_stream->tqdevice()->at( current ); // Append a zero offset to indicate end of layer offsets. - *m_stream << static_cast<Q_UINT32>( 0 ); + *m_stream << static_cast<TQ_UINT32>( 0 ); // Return to end offset. - m_stream->device()->at( end ); + m_stream->tqdevice()->at( end ); // Append a zero offset to indicate end of channel offsets. - *m_stream << static_cast<Q_UINT32>( 0 ); + *m_stream << static_cast<TQ_UINT32>( 0 ); } void XcfExport::visitVLayer( VLayer& layer ) { // Layer width = image width. - *m_stream << static_cast<Q_UINT32>( m_width ); + *m_stream << static_cast<TQ_UINT32>( m_width ); // Layer height = image height. - *m_stream << static_cast<Q_UINT32>( m_height ); + *m_stream << static_cast<TQ_UINT32>( m_height ); // Layer type = RGBA. - *m_stream << static_cast<Q_UINT32>( 1 ); + *m_stream << static_cast<TQ_UINT32>( 1 ); // Layer name. *m_stream << layer.name().latin1(); // Layer opacity. - *m_stream << static_cast<Q_UINT32>( 6 ); + *m_stream << static_cast<TQ_UINT32>( 6 ); // Property size in bytes. - *m_stream << static_cast<Q_UINT32>( 4 ); + *m_stream << static_cast<TQ_UINT32>( 4 ); // Fully opaque = 255. - *m_stream << static_cast<Q_UINT32>( 255 ); + *m_stream << static_cast<TQ_UINT32>( 255 ); // Layer visible? - *m_stream << static_cast<Q_UINT32>( 8 ); + *m_stream << static_cast<TQ_UINT32>( 8 ); // Property size in bytes. - *m_stream << static_cast<Q_UINT32>( 4 ); + *m_stream << static_cast<TQ_UINT32>( 4 ); // True. - *m_stream << static_cast<Q_UINT32>( 1 ); + *m_stream << static_cast<TQ_UINT32>( 1 ); // Layer linked? - *m_stream << static_cast<Q_UINT32>( 9 ); + *m_stream << static_cast<TQ_UINT32>( 9 ); // Property size in bytes. - *m_stream << static_cast<Q_UINT32>( 4 ); + *m_stream << static_cast<TQ_UINT32>( 4 ); // False. - *m_stream << static_cast<Q_UINT32>( 0 ); + *m_stream << static_cast<TQ_UINT32>( 0 ); // Preserve transparency? - *m_stream << static_cast<Q_UINT32>( 10 ); + *m_stream << static_cast<TQ_UINT32>( 10 ); // Property size in bytes. - *m_stream << static_cast<Q_UINT32>( 4 ); + *m_stream << static_cast<TQ_UINT32>( 4 ); // False. - *m_stream << static_cast<Q_UINT32>( 0 ); + *m_stream << static_cast<TQ_UINT32>( 0 ); - // Apply mask? - *m_stream << static_cast<Q_UINT32>( 11 ); + // Apply tqmask? + *m_stream << static_cast<TQ_UINT32>( 11 ); // Property size in bytes. - *m_stream << static_cast<Q_UINT32>( 4 ); + *m_stream << static_cast<TQ_UINT32>( 4 ); // False. - *m_stream << static_cast<Q_UINT32>( 0 ); + *m_stream << static_cast<TQ_UINT32>( 0 ); - // Edit mask? - *m_stream << static_cast<Q_UINT32>( 12 ); + // Edit tqmask? + *m_stream << static_cast<TQ_UINT32>( 12 ); // Property size in bytes. - *m_stream << static_cast<Q_UINT32>( 4 ); + *m_stream << static_cast<TQ_UINT32>( 4 ); // False. - *m_stream << static_cast<Q_UINT32>( 0 ); + *m_stream << static_cast<TQ_UINT32>( 0 ); - // Show mask? - *m_stream << static_cast<Q_UINT32>( 13 ); + // Show tqmask? + *m_stream << static_cast<TQ_UINT32>( 13 ); // Property size in bytes. - *m_stream << static_cast<Q_UINT32>( 4 ); + *m_stream << static_cast<TQ_UINT32>( 4 ); // False. - *m_stream << static_cast<Q_UINT32>( 0 ); + *m_stream << static_cast<TQ_UINT32>( 0 ); // Layer offsets. - *m_stream << static_cast<Q_UINT32>( 15 ); + *m_stream << static_cast<TQ_UINT32>( 15 ); // Property size in bytes. - *m_stream << static_cast<Q_UINT32>( 8 ); + *m_stream << static_cast<TQ_UINT32>( 8 ); // X-Offset. - *m_stream << static_cast<Q_UINT32>( 0 ); + *m_stream << static_cast<TQ_UINT32>( 0 ); // Y-Offset. - *m_stream << static_cast<Q_UINT32>( 0 ); + *m_stream << static_cast<TQ_UINT32>( 0 ); // Layer mode. - *m_stream << static_cast<Q_UINT32>( 7 ); + *m_stream << static_cast<TQ_UINT32>( 7 ); // Property size in bytes. - *m_stream << static_cast<Q_UINT32>( 4 ); + *m_stream << static_cast<TQ_UINT32>( 4 ); // Normal mode. - *m_stream << static_cast<Q_UINT32>( 0 ); + *m_stream << static_cast<TQ_UINT32>( 0 ); // TODO: Tattoo. - *m_stream << static_cast<Q_UINT32>( 20 ); + *m_stream << static_cast<TQ_UINT32>( 20 ); // Property size in bytes. - *m_stream << static_cast<Q_UINT32>( 4 ); + *m_stream << static_cast<TQ_UINT32>( 4 ); // False. - *m_stream << static_cast<Q_UINT32>( 0 ); + *m_stream << static_cast<TQ_UINT32>( 0 ); // Layer properties end. - *m_stream << static_cast<Q_UINT32>( 0 ); + *m_stream << static_cast<TQ_UINT32>( 0 ); // Property size in bytes. - *m_stream << static_cast<Q_UINT32>( 0 ); + *m_stream << static_cast<TQ_UINT32>( 0 ); // Offsets. - QIODevice::Offset current = 0; - QIODevice::Offset start = 0; - QIODevice::Offset end = 0; + TQIODevice::Offset current = 0; + TQIODevice::Offset start = 0; + TQIODevice::Offset end = 0; // Save current offset. - current = m_stream->device()->at(); + current = m_stream->tqdevice()->at(); // Leave space for hierarchy offsets. - m_stream->device()->at( current + 8 ); + m_stream->tqdevice()->at( current + 8 ); // Save start offset. - start = m_stream->device()->at(); + start = m_stream->tqdevice()->at(); // Write hierarchy. @@ -293,26 +293,26 @@ XcfExport::visitVLayer( VLayer& layer ) // Save end offset. - end = m_stream->device()->at(); + end = m_stream->tqdevice()->at(); // Return to current offset. - m_stream->device()->at( current ); + m_stream->tqdevice()->at( current ); // Save hierarchy offset. *m_stream << start; - // Append a zero offset to indicate end of layer mask offsets. - *m_stream << static_cast<Q_UINT32>( 0 ); + // Append a zero offset to indicate end of layer tqmask offsets. + *m_stream << static_cast<TQ_UINT32>( 0 ); } void XcfExport::writeHierarchy() { // Offsets. - QIODevice::Offset current = 0; - QIODevice::Offset start = 0; - QIODevice::Offset end = 0; + TQIODevice::Offset current = 0; + TQIODevice::Offset start = 0; + TQIODevice::Offset end = 0; // Width (again?). *m_stream << m_width; @@ -321,27 +321,27 @@ XcfExport::writeHierarchy() *m_stream << m_height; // Color depth. - *m_stream << static_cast<Q_UINT32>( 3 ); + *m_stream << static_cast<TQ_UINT32>( 3 ); // Calculate level number. int levX = levels( m_width, m_tileWidth ); int levY = levels( m_height, m_tileHeight ); - int levels = QMAX( levX, levY ); + int levels = TQMAX( levX, levY ); int width = m_width; int height = m_height; // Save current offset. - current = m_stream->device()->at(); + current = m_stream->tqdevice()->at(); // Leave space for level offsets. - m_stream->device()->at( current + ( levels + 1 ) * 4 ); + m_stream->tqdevice()->at( current + ( levels + 1 ) * 4 ); for( int i = 0; i < levels; ++i ) { // Save start offset. - start = m_stream->device()->at(); + start = m_stream->tqdevice()->at(); if( i == 0 ) { @@ -354,90 +354,90 @@ XcfExport::writeHierarchy() width /= 2; height /= 2; - *m_stream << static_cast<Q_UINT32>( width ); - *m_stream << static_cast<Q_UINT32>( height ); - *m_stream << static_cast<Q_UINT32>( 0 ); + *m_stream << static_cast<TQ_UINT32>( width ); + *m_stream << static_cast<TQ_UINT32>( height ); + *m_stream << static_cast<TQ_UINT32>( 0 ); } // Save end offset. - end = m_stream->device()->at(); + end = m_stream->tqdevice()->at(); // Return to current offset. - m_stream->device()->at( current ); + m_stream->tqdevice()->at( current ); // Save level offset. *m_stream << start; // Increment offset. - current = m_stream->device()->at(); + current = m_stream->tqdevice()->at(); // Return to end offset. - m_stream->device()->at( end ); + m_stream->tqdevice()->at( end ); } // Return to current offset. - m_stream->device()->at( current ); + m_stream->tqdevice()->at( current ); // Append a zero offset to indicate end of level offsets. - *m_stream << static_cast<Q_UINT32>( 0 ); + *m_stream << static_cast<TQ_UINT32>( 0 ); } void XcfExport::writeLevel() { // Offsets. - QIODevice::Offset current = 0; - QIODevice::Offset start = 0; - QIODevice::Offset end = 0; + TQIODevice::Offset current = 0; + TQIODevice::Offset start = 0; + TQIODevice::Offset end = 0; - *m_stream << static_cast<Q_UINT32>( m_width ); - *m_stream << static_cast<Q_UINT32>( m_height ); + *m_stream << static_cast<TQ_UINT32>( m_width ); + *m_stream << static_cast<TQ_UINT32>( m_height ); int rows = ( m_height + m_tileHeight - 1 ) / m_tileHeight; int cols = ( m_width + m_tileWidth - 1 ) / m_tileWidth; int tiles = rows * cols; // Save current offset. - current = m_stream->device()->at(); + current = m_stream->tqdevice()->at(); // Leave space for tile offsets. - m_stream->device()->at( current + ( tiles + 1 ) * 4 ); + m_stream->tqdevice()->at( current + ( tiles + 1 ) * 4 ); for( int i = 0; i < tiles; ++i ) { // Save start offset. - start = m_stream->device()->at(); + start = m_stream->tqdevice()->at(); // TODO: Save tile. - *m_stream << static_cast<Q_UINT8>( 1 ); - *m_stream << static_cast<Q_UINT8>( 1 ); - *m_stream << static_cast<Q_UINT8>( 1 ); - *m_stream << static_cast<Q_UINT8>( 1 ); - *m_stream << static_cast<Q_UINT8>( 1 ); - *m_stream << static_cast<Q_UINT8>( 1 ); - *m_stream << static_cast<Q_UINT8>( 1 ); - *m_stream << static_cast<Q_UINT8>( 1 ); - *m_stream << static_cast<Q_UINT8>( 1 ); - *m_stream << static_cast<Q_UINT8>( 1 ); - *m_stream << static_cast<Q_UINT8>( 1 ); - *m_stream << static_cast<Q_UINT8>( 1 ); + *m_stream << static_cast<TQ_UINT8>( 1 ); + *m_stream << static_cast<TQ_UINT8>( 1 ); + *m_stream << static_cast<TQ_UINT8>( 1 ); + *m_stream << static_cast<TQ_UINT8>( 1 ); + *m_stream << static_cast<TQ_UINT8>( 1 ); + *m_stream << static_cast<TQ_UINT8>( 1 ); + *m_stream << static_cast<TQ_UINT8>( 1 ); + *m_stream << static_cast<TQ_UINT8>( 1 ); + *m_stream << static_cast<TQ_UINT8>( 1 ); + *m_stream << static_cast<TQ_UINT8>( 1 ); + *m_stream << static_cast<TQ_UINT8>( 1 ); + *m_stream << static_cast<TQ_UINT8>( 1 ); // Save end offset. - end = m_stream->device()->at(); + end = m_stream->tqdevice()->at(); // Return to current offset. - m_stream->device()->at( current ); + m_stream->tqdevice()->at( current ); // Save tile offset. *m_stream << start; // Increment offset. - current = m_stream->device()->at(); + current = m_stream->tqdevice()->at(); // Return to end offset. - m_stream->device()->at( end ); + m_stream->tqdevice()->at( end ); } } diff --git a/filters/karbon/xcf/xcfexport.h b/filters/karbon/xcf/xcfexport.h index 92913cb4..0c60dd4e 100644 --- a/filters/karbon/xcf/xcfexport.h +++ b/filters/karbon/xcf/xcfexport.h @@ -26,7 +26,7 @@ #include "vvisitor.h" -class QDataStream; +class TQDataStream; class VDocument; class VLayer; @@ -34,12 +34,13 @@ class VLayer; class XcfExport : public KoFilter, private VVisitor { Q_OBJECT + TQ_OBJECT public: - XcfExport( KoFilter* parent, const char* name, const QStringList& ); + XcfExport( KoFilter* tqparent, const char* name, const TQStringList& ); virtual ~XcfExport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); virtual void visitVDocument( VDocument& document ); virtual void visitVLayer( VLayer& layer ); @@ -70,7 +71,7 @@ private: /** * Output stream. */ - QDataStream* m_stream; + TQDataStream* m_stream; /** * Image width. diff --git a/filters/karbon/xfig/xfigimport.cc b/filters/karbon/xfig/xfigimport.cc index 06301e01..2932e05c 100644 --- a/filters/karbon/xfig/xfigimport.cc +++ b/filters/karbon/xfig/xfigimport.cc @@ -37,7 +37,7 @@ DESCRIPTION #include <xfigimport.h> #include <xfigimport.moc> -#include <qtl.h> +#include <tqtl.h> #include <kdebug.h> #include <core/vdocument.h> @@ -79,44 +79,44 @@ int arrow_ids[] = { struct PSFont { const char* family; - QFont::Weight weight; + TQFont::Weight weight; bool italic; } psFontTable[] = { - { "times", QFont::Normal, false }, // Times Roman - { "times", QFont::Normal, true }, // Times Italic - { "times", QFont::Bold, false }, // Times Bold - { "times", QFont::Bold, true }, // Times Bold Italic - { "avantgarde", QFont::Normal, false }, // AvantGarde Book - { "avantgarde", QFont::Normal, true }, // AvantGarde Book Oblique - { "avantgarde", QFont::DemiBold, false }, // AvantGarde Demi - { "avantgarde", QFont::DemiBold, true }, // AvantGarde Demi Oblique - { "bookman", QFont::Light, false }, // Bookman Light - { "bookman", QFont::Light, true }, // Bookman Light Italic - { "bookman", QFont::DemiBold, false }, // Bookman Demi - { "bookman", QFont::DemiBold, true }, // Bookman Demi Italic - { "courier", QFont::Normal, false }, // Courier - { "courier", QFont::Normal, true }, // Courier Oblique - { "courier", QFont::Bold, false }, // Courier Bold - { "courier", QFont::Bold, true }, // Courier Bold Oblique - { "helvetica", QFont::Normal, false }, // Helvetica - { "helvetica", QFont::Normal, true }, // Helvetica Oblique - { "helvetica", QFont::Bold, false }, // Helvetica Bold - { "helvetica", QFont::Bold, true }, // Helvetica Bold Oblique - { "helvetica", QFont::Normal, false }, // Helvetica Narrow - { "helvetica", QFont::Normal, true }, // Helvetica Narrow Oblique - { "helvetica", QFont::Bold, false }, // Helvetica Narrow Bold - { "helvetica", QFont::Bold, true }, // Helvetica Narrow Bold Oblique - { "newcenturyschoolbook", QFont::Normal, false },// New Century Schoolbook - { "newcenturyschoolbook", QFont::Normal, true }, // New Century Italic - { "newcenturyschoolbook", QFont::Bold, false }, // New Century Bold - { "newcenturyschoolbook", QFont::Bold, true }, // New Century Bold Italic - { "palatino", QFont::Normal, false }, // Palatino Roman - { "palatino", QFont::Normal, true }, // Palatino Italic - { "palatino", QFont::Bold, false }, // Palatino Bold - { "palatino", QFont::Bold, true }, // Palatino Bold Italic - { "symbol", QFont::Normal, false }, // Symbol - { "zapfchancery", QFont::Normal, false }, // Zapf Chancery Medium Italic - { "zapfdingbats", QFont::Normal, false }, // Zapf Dingbats + { "times", TQFont::Normal, false }, // Times Roman + { "times", TQFont::Normal, true }, // Times Italic + { "times", TQFont::Bold, false }, // Times Bold + { "times", TQFont::Bold, true }, // Times Bold Italic + { "avantgarde", TQFont::Normal, false }, // AvantGarde Book + { "avantgarde", TQFont::Normal, true }, // AvantGarde Book Oblique + { "avantgarde", TQFont::DemiBold, false }, // AvantGarde Demi + { "avantgarde", TQFont::DemiBold, true }, // AvantGarde Demi Oblique + { "bookman", TQFont::Light, false }, // Bookman Light + { "bookman", TQFont::Light, true }, // Bookman Light Italic + { "bookman", TQFont::DemiBold, false }, // Bookman Demi + { "bookman", TQFont::DemiBold, true }, // Bookman Demi Italic + { "courier", TQFont::Normal, false }, // Courier + { "courier", TQFont::Normal, true }, // Courier Oblique + { "courier", TQFont::Bold, false }, // Courier Bold + { "courier", TQFont::Bold, true }, // Courier Bold Oblique + { "helvetica", TQFont::Normal, false }, // Helvetica + { "helvetica", TQFont::Normal, true }, // Helvetica Oblique + { "helvetica", TQFont::Bold, false }, // Helvetica Bold + { "helvetica", TQFont::Bold, true }, // Helvetica Bold Oblique + { "helvetica", TQFont::Normal, false }, // Helvetica Narrow + { "helvetica", TQFont::Normal, true }, // Helvetica Narrow Oblique + { "helvetica", TQFont::Bold, false }, // Helvetica Narrow Bold + { "helvetica", TQFont::Bold, true }, // Helvetica Narrow Bold Oblique + { "newcenturyschoolbook", TQFont::Normal, false },// New Century Schoolbook + { "newcenturyschoolbook", TQFont::Normal, true }, // New Century Italic + { "newcenturyschoolbook", TQFont::Bold, false }, // New Century Bold + { "newcenturyschoolbook", TQFont::Bold, true }, // New Century Bold Italic + { "palatino", TQFont::Normal, false }, // Palatino Roman + { "palatino", TQFont::Normal, true }, // Palatino Italic + { "palatino", TQFont::Bold, false }, // Palatino Bold + { "palatino", TQFont::Bold, true }, // Palatino Bold Italic + { "symbol", TQFont::Normal, false }, // Symbol + { "zapfchancery", TQFont::Normal, false }, // Zapf Chancery Medium Italic + { "zapfdingbats", TQFont::Normal, false }, // Zapf Dingbats }; int hexstrToInt (const char *str) { @@ -134,22 +134,22 @@ int hexstrToInt (const char *str) { return value; } -XFIGImport::XFIGImport( KoFilter *parent, const char *name ) : KoFilter(parent, name) +XFIGImport::XFIGImport( KoFilter *tqparent, const char *name ) : KoFilter(tqparent, name) { fig_resolution = 1200.0 / 72.0; coordinate_system = 2; - colorTable.insert (0, new QColor (Qt::black)); - colorTable.insert (1, new QColor (Qt::blue)); - colorTable.insert (2, new QColor (Qt::green)); - colorTable.insert (3, new QColor (Qt::cyan)); - colorTable.insert (4, new QColor (Qt::red)); - colorTable.insert (5, new QColor (Qt::magenta)); - colorTable.insert (6, new QColor (Qt::yellow)); - colorTable.insert (7, new QColor (Qt::white)); + colorTable.insert (0, new TQColor (TQt::black)); + colorTable.insert (1, new TQColor (TQt::blue)); + colorTable.insert (2, new TQColor (TQt::green)); + colorTable.insert (3, new TQColor (TQt::cyan)); + colorTable.insert (4, new TQColor (TQt::red)); + colorTable.insert (5, new TQColor (TQt::magenta)); + colorTable.insert (6, new TQColor (TQt::yellow)); + colorTable.insert (7, new TQColor (TQt::white)); for (int i = 0; i <= 23; i++) - colorTable.insert (i + 8, new QColor (colors[i])); + colorTable.insert (i + 8, new TQColor (colors[i])); objList.clear (); } @@ -158,16 +158,16 @@ XFIGImport::~XFIGImport() { } -bool XFIGImport::filterImport( const QString &file, KoDocument *doc, - const QString &from, const QString &to, - const QString & ) { +bool XFIGImport::filterImport( const TQString &file, KoDocument *doc, + const TQString &from, const TQString &to, + const TQString & ) { if( to != "application/x-karbon" || from != "image/x-xfig" ) return false; char buf[255]; int value; - KoPageLayout layout; + KoPageLayout tqlayout; ifstream fin( file.local8Bit() ); if (! fin) @@ -177,7 +177,7 @@ bool XFIGImport::filterImport( const QString &file, KoDocument *doc, GDocument *gdoc = kidoc->gdoc(); //GPage *activePage = gdoc->activePage(); - layout = gdoc->activePage()->pageLayout (); + tqlayout = gdoc->activePage()->pageLayout (); fin.getline (buf, 255); if (::strncmp (buf, "#FIG 3", 6)) { @@ -203,9 +203,9 @@ bool XFIGImport::filterImport( const QString &file, KoDocument *doc, // orientation fin.getline (buf, 255); if (::strcmp (buf, "Landscape") == 0) - layout.orientation = PG_LANDSCAPE; + tqlayout.orientation = PG_LANDSCAPE; else if (::strcmp (buf, "Portrait") == 0) - layout.orientation = PG_PORTRAIT; + tqlayout.orientation = PG_PORTRAIT; else kdDebug() << "ERROR: invalid orientation" << endl; @@ -215,9 +215,9 @@ bool XFIGImport::filterImport( const QString &file, KoDocument *doc, // units fin.getline (buf, 255); if (::strcmp (buf, "Metric") == 0) - layout.unit = PG_MM; + tqlayout.unit = PG_MM; else if (::strcmp (buf, "Inches") == 0) - layout.unit = PG_INCH; + tqlayout.unit = PG_INCH; else kdDebug() << "ERROR: invalid units" << endl; @@ -310,7 +310,7 @@ void XFIGImport::parseColorObject (istream& fin) { green = hexstrToInt (green_str); blue = hexstrToInt (blue_str); - colorTable.insert (number, new QColor (red, green, blue)); + colorTable.insert (number, new TQColor (red, green, blue)); } void XFIGImport::parseArc (istream& fin, GDocument* doc) { @@ -473,7 +473,7 @@ void XFIGImport::parsePolyline (istream& fin, GDocument* doc) { int arrow_type, arrow_style; float arrow_thickness, arrow_width, arrow_height; GObject::OutlineInfo oinfo; - oinfo.mask = GObject::OutlineInfo::Custom; + oinfo.tqmask = GObject::OutlineInfo::Custom; oinfo.startArrowId = oinfo.endArrowId = 0; if (forward_arrow > 0) { @@ -537,7 +537,7 @@ void XFIGImport::parseSpline (istream& fin, GDocument* doc) int arrow_type, arrow_style; float arrow_thickness, arrow_width, arrow_height; GObject::OutlineInfo oinfo; - oinfo.mask = GObject::OutlineInfo::Custom; + oinfo.tqmask = GObject::OutlineInfo::Custom; oinfo.startArrowId = oinfo.endArrowId = 0; if (forward_arrow > 0) { @@ -599,8 +599,8 @@ void XFIGImport::parseText (istream& fin, GDocument* doc) char c; char ocode[4]; bool finished = false; - QString text; - QFont qfont; + TQString text; + TQFont qfont; fin >> sub_type >> color >> depth >> pen_style >> font >> font_size >> angle >> font_flags >> height >> length >> x >> y; @@ -609,7 +609,7 @@ void XFIGImport::parseText (istream& fin, GDocument* doc) // PostScript font if (font == -1) font = 0; - qfont = QFont (psFontTable[font].family, qRound (font_size), + qfont = TQFont (psFontTable[font].family, tqRound (font_size), psFontTable[font].weight, psFontTable[font].italic); } else { @@ -634,7 +634,7 @@ void XFIGImport::parseText (istream& fin, GDocument* doc) break; } } - qfont.setPointSize (qRound (font_size)); + qfont.setPointSize (tqRound (font_size)); obj->setFont (qfont); while (! finished) { @@ -670,7 +670,7 @@ void XFIGImport::parseText (istream& fin, GDocument* doc) if (angle != 0) { // rotate the text float nangle = angle * RAD_FACTOR; - QWMatrix m1, m2, m3; + TQWMatrix m1, m2, m3; Coord rotCenter; if (sub_type == 0) { @@ -713,7 +713,7 @@ void XFIGImport::buildDocument (GDocument *doc) { qBubbleSort(objList); // Now all we need to do is insert them in the document, in that order - QValueList<GObjectListItem>::Iterator it=objList.begin(); + TQValueList<GObjectListItem>::Iterator it=objList.begin(); for ( ; it != objList.end() ; ++it ) { //kdDebug() << "Inserting object with depth=" << (*it).depth << endl; @@ -731,11 +731,11 @@ void XFIGImport::setProperties (GObject* obj, int pen_color, int style, obj->setOutlineColor (*colorTable[pen_color]); if (style < 1) - obj->setOutlineStyle (Qt::SolidLine); + obj->setOutlineStyle (TQt::SolidLine); else if (style == 1) - obj->setOutlineStyle (Qt::DashLine); + obj->setOutlineStyle (TQt::DashLine); else if (style == 2) - obj->setOutlineStyle (Qt::DotLine); + obj->setOutlineStyle (TQt::DotLine); obj->setOutlineWidth (thickness * 72.0 / 80.0); @@ -745,13 +745,13 @@ void XFIGImport::setProperties (GObject* obj, int pen_color, int style, obj->setFillStyle (GObject::FillInfo::SolidFill); if (fill_color < 1) { // for BLACK or DEFAULT color - int val = qRound ((20 - area_fill) * 255.0 / 20.0); - obj->setFillColor (QColor (val, val, val)); + int val = tqRound ((20 - area_fill) * 255.0 / 20.0); + obj->setFillColor (TQColor (val, val, val)); } else if (fill_color == 7) { // for WHITE color - int val = qRound ( area_fill * 255.0 / 20.0); - obj->setFillColor (QColor (val, val, val)); + int val = tqRound ( area_fill * 255.0 / 20.0); + obj->setFillColor (TQColor (val, val, val)); } else obj->setFillColor (*colorTable[fill_color]); diff --git a/filters/karbon/xfig/xfigimport.h b/filters/karbon/xfig/xfigimport.h index bf959315..5cf9dddf 100644 --- a/filters/karbon/xfig/xfigimport.h +++ b/filters/karbon/xfig/xfigimport.h @@ -25,29 +25,30 @@ DESCRIPTION #ifndef XFIGIMPORT_H #define XFIGIMPORT_H -#include <qintdict.h> -#include <qvaluelist.h> +#include <tqintdict.h> +#include <tqvaluelist.h> #include <iostream.h> class GDocument; class GObject; -class QColor; +class TQColor; #include <KoFilter.h> -#include <qobject.h> -#include <qstring.h> +#include <tqobject.h> +#include <tqstring.h> class XFIGImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - XFIGImport( KoFilter *parent, const char *name ); + XFIGImport( KoFilter *tqparent, const char *name ); virtual ~XFIGImport(); - virtual bool filterImport( const QString &file, KoDocument *, - const QString &from, const QString &to, - const QString &config=QString::null ); + virtual bool filterImport( const TQString &file, KoDocument *, + const TQString &from, const TQString &to, + const TQString &config=TQString() ); private: void parseColorObject (istream& fin); @@ -65,13 +66,13 @@ private: float fig_resolution; int coordinate_system; int version; - QIntDict<QColor> colorTable; + TQIntDict<TQColor> colorTable; // An object and the depth. Used for sorting objects // in the object list struct GObjectListItem { - GObjectListItem() : object(0L) {} // for QValueList + GObjectListItem() : object(0L) {} // for TQValueList GObjectListItem( int d, GObject * obj ) : object(obj), depth(d) {} @@ -88,7 +89,7 @@ private: return depth == item.depth; } }; - QValueList<GObjectListItem> objList; + TQValueList<GObjectListItem> objList; }; #endif diff --git a/filters/karbon/xfig/xfigimport_factory.cc b/filters/karbon/xfig/xfigimport_factory.cc index 7783072d..79fb695c 100644 --- a/filters/karbon/xfig/xfigimport_factory.cc +++ b/filters/karbon/xfig/xfigimport_factory.cc @@ -33,9 +33,9 @@ K_EXPORT_COMPONENT_FACTORY( libxfigimport, XFIGImportFactory ) KInstance *XFIGImportFactory::s_global = 0; XFIGImportFactory::XFIGImportFactory( - QObject *parent, + TQObject *tqparent, const char *name) : - KLibFactory(parent, name) + KLibFactory(tqparent, name) { s_global = new KInstance("xfigimport"); } @@ -46,18 +46,18 @@ XFIGImportFactory::~XFIGImportFactory() s_global = 0L; } -QObject *XFIGImportFactory::createObject( - QObject *parent, +TQObject *XFIGImportFactory::createObject( + TQObject *tqparent, const char *name, const char*, - const QStringList &) + const TQStringList &) { - if (parent && !parent->inherits("KoFilter")) + if (tqparent && !tqparent->inherits("KoFilter")) { - kdDebug(30502) << "XFIGImportFactory: parent does not inherit KoFilter" << endl; + kdDebug(30502) << "XFIGImportFactory: tqparent does not inherit KoFilter" << endl; return 0L; } - XFIGImport *f = new XFIGImport((KoFilter*)parent, name); + XFIGImport *f = new XFIGImport((KoFilter*)tqparent, name); return f; } diff --git a/filters/karbon/xfig/xfigimport_factory.h b/filters/karbon/xfig/xfigimport_factory.h index 8da70040..b4fe1bac 100644 --- a/filters/karbon/xfig/xfigimport_factory.h +++ b/filters/karbon/xfig/xfigimport_factory.h @@ -32,11 +32,12 @@ class XFIGImportFactory : public KLibFactory { Q_OBJECT + TQ_OBJECT public: - XFIGImportFactory(QObject* parent = 0, const char* name = 0); + XFIGImportFactory(TQObject* tqparent = 0, const char* name = 0); virtual ~XFIGImportFactory(); - virtual QObject* createObject(QObject* parent = 0, const char* name = 0, const char* classname = "QObject", const QStringList &args = QStringList()); + virtual TQObject* createObject(TQObject* tqparent = 0, const char* name = 0, const char* classname = TQOBJECT_OBJECT_NAME_STRING, const TQStringList &args = TQStringList()); static KInstance* global(); diff --git a/filters/kchart/bmp/bmpexport.cpp b/filters/kchart/bmp/bmpexport.cpp index 26ff2fe1..5f00bb5e 100644 --- a/filters/kchart/bmp/bmpexport.cpp +++ b/filters/kchart/bmp/bmpexport.cpp @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include <qpixmap.h> -#include <qpainter.h> +#include <tqpixmap.h> +#include <tqpainter.h> #include <kmessagebox.h> @@ -33,7 +33,7 @@ typedef KGenericFactory<BmpExport, KoFilter> bmpExportFactory; K_EXPORT_COMPONENT_FACTORY( libkchartbmpexport, bmpExportFactory( "bmpexport" ) ) -BmpExport::BmpExport(KoFilter *fil, const char *name, const QStringList&lst) +BmpExport::BmpExport(KoFilter *fil, const char *name, const TQStringList&lst) : ImageExport(fil,name,lst) { } @@ -56,7 +56,7 @@ void BmpExport::extraImageAttribute() } -bool BmpExport::saveImage( QString fileName) +bool BmpExport::saveImage( TQString fileName) { bool ret = pixmap.save( fileName, "BMP" ); // Save the image. diff --git a/filters/kchart/bmp/bmpexport.h b/filters/kchart/bmp/bmpexport.h index 89afa941..ebba6b5d 100644 --- a/filters/kchart/bmp/bmpexport.h +++ b/filters/kchart/bmp/bmpexport.h @@ -25,11 +25,12 @@ class BmpExport : public ImageExport { Q_OBJECT + TQ_OBJECT public: - BmpExport(KoFilter *parent, const char *name, const QStringList&); + BmpExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~BmpExport(); - virtual bool saveImage( QString fileName); + virtual bool saveImage( TQString fileName); virtual void extraImageAttribute(); virtual const char * exportFormat(); }; diff --git a/filters/kchart/jpeg/jpegexport.cpp b/filters/kchart/jpeg/jpegexport.cpp index 709e2d0f..7d2bcec0 100644 --- a/filters/kchart/jpeg/jpegexport.cpp +++ b/filters/kchart/jpeg/jpegexport.cpp @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include <qpixmap.h> -#include <qpainter.h> +#include <tqpixmap.h> +#include <tqpainter.h> #include <kmessagebox.h> @@ -33,7 +33,7 @@ typedef KGenericFactory<JpegExport, KoFilter> jpegExportFactory; K_EXPORT_COMPONENT_FACTORY( libkchartjpegexport, jpegExportFactory( "jpegexport" ) ) -JpegExport::JpegExport(KoFilter *fil, const char *name, const QStringList&lst) +JpegExport::JpegExport(KoFilter *fil, const char *name, const TQStringList&lst) : ImageExport(fil,name,lst) { } @@ -56,7 +56,7 @@ void JpegExport::extraImageAttribute() } -bool JpegExport::saveImage( QString fileName) +bool JpegExport::saveImage( TQString fileName) { bool ret = pixmap.save( fileName, "JPEG" ); // Save the image. diff --git a/filters/kchart/jpeg/jpegexport.h b/filters/kchart/jpeg/jpegexport.h index f167b0a2..2498fb31 100644 --- a/filters/kchart/jpeg/jpegexport.h +++ b/filters/kchart/jpeg/jpegexport.h @@ -25,11 +25,12 @@ class JpegExport : public ImageExport { Q_OBJECT + TQ_OBJECT public: - JpegExport(KoFilter *parent, const char *name, const QStringList&); + JpegExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~JpegExport(); - virtual bool saveImage( QString fileName); + virtual bool saveImage( TQString fileName); virtual void extraImageAttribute(); virtual const char * exportFormat(); }; diff --git a/filters/kchart/libimageexport/imageexport.cpp b/filters/kchart/libimageexport/imageexport.cpp index 7b9a61c4..5033762b 100644 --- a/filters/kchart/libimageexport/imageexport.cpp +++ b/filters/kchart/libimageexport/imageexport.cpp @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include <qpixmap.h> -#include <qpainter.h> +#include <tqpixmap.h> +#include <tqpainter.h> #include <kmessagebox.h> @@ -30,7 +30,7 @@ #include "imageexport.h" #include "kchart_part.h" -ImageExport::ImageExport(KoFilter *, const char *, const QStringList&) +ImageExport::ImageExport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -40,8 +40,8 @@ ImageExport::~ImageExport() } -KoFilter::ConversionStatus -ImageExport::convert(const QCString& from, const QCString& to) +KoFilter::ConversiontqStatus +ImageExport::convert(const TQCString& from, const TQCString& to) { // Check for proper conversion. if ( from != "application/x-kchart" || to != exportFormat() ) @@ -56,9 +56,9 @@ ImageExport::convert(const QCString& from, const QCString& to) } // Get the XML tree. - QDomDocument domIn; + TQDomDocument domIn; domIn.setContent( storeIn ); - QDomElement docNode = domIn.documentElement(); + TQDomElement docNode = domIn.documentElement(); // Read the document from the XML tree. KChart::KChartPart kchartDoc; @@ -70,8 +70,8 @@ ImageExport::convert(const QCString& from, const QCString& to) width = 500; height = 400; extraImageAttribute(); - pixmap = QPixmap(width, height); - QPainter painter(&pixmap); + pixmap = TQPixmap(width, height); + TQPainter painter(&pixmap); kchartDoc.paintContent(painter, pixmap.rect(), false); if(!saveImage( m_chain->outputFile())) return KoFilter::CreationError; diff --git a/filters/kchart/libimageexport/imageexport.h b/filters/kchart/libimageexport/imageexport.h index a8314a08..4aa0e5f4 100644 --- a/filters/kchart/libimageexport/imageexport.h +++ b/filters/kchart/libimageexport/imageexport.h @@ -22,23 +22,24 @@ #include <KoFilter.h> -class QPixmap; +class TQPixmap; class ImageExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - ImageExport(KoFilter *parent, const char *name, const QStringList&); + ImageExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~ImageExport(); - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); virtual void extraImageAttribute() {}; - virtual bool saveImage( QString fileName) = 0; + virtual bool saveImage( TQString fileName) = 0; virtual const char* exportFormat() = 0; protected: int width; int height; - QPixmap pixmap; + TQPixmap pixmap; }; #endif // __IMAGEEXPORT_H__ diff --git a/filters/kchart/mng/mngexport.cpp b/filters/kchart/mng/mngexport.cpp index b029beea..e23e870c 100644 --- a/filters/kchart/mng/mngexport.cpp +++ b/filters/kchart/mng/mngexport.cpp @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include <qpixmap.h> -#include <qpainter.h> +#include <tqpixmap.h> +#include <tqpainter.h> #include <kmessagebox.h> @@ -33,7 +33,7 @@ typedef KGenericFactory<MngExport, KoFilter> mngExportFactory; K_EXPORT_COMPONENT_FACTORY( libkchartmngexport, mngExportFactory( "mngexport" ) ) -MngExport::MngExport(KoFilter *fil, const char *name, const QStringList&lst) +MngExport::MngExport(KoFilter *fil, const char *name, const TQStringList&lst) : ImageExport(fil,name,lst) { } @@ -56,7 +56,7 @@ void MngExport::extraImageAttribute() } -bool MngExport::saveImage( QString fileName) +bool MngExport::saveImage( TQString fileName) { bool ret = pixmap.save( fileName, "MNG" ); // Save the image. diff --git a/filters/kchart/mng/mngexport.h b/filters/kchart/mng/mngexport.h index 38f7830e..025be07c 100644 --- a/filters/kchart/mng/mngexport.h +++ b/filters/kchart/mng/mngexport.h @@ -25,11 +25,12 @@ class MngExport : public ImageExport { Q_OBJECT + TQ_OBJECT public: - MngExport(KoFilter *parent, const char *name, const QStringList&); + MngExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~MngExport(); - virtual bool saveImage( QString fileName); + virtual bool saveImage( TQString fileName); virtual void extraImageAttribute(); virtual const char * exportFormat(); }; diff --git a/filters/kchart/png/pngexport.cpp b/filters/kchart/png/pngexport.cpp index d0a87154..456ca887 100644 --- a/filters/kchart/png/pngexport.cpp +++ b/filters/kchart/png/pngexport.cpp @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include <qpixmap.h> -#include <qpainter.h> +#include <tqpixmap.h> +#include <tqpainter.h> #include <kmessagebox.h> @@ -33,7 +33,7 @@ typedef KGenericFactory<PngExport, KoFilter> PngExportFactory; K_EXPORT_COMPONENT_FACTORY( libkchartpngexport, PngExportFactory( "pngexport" ) ) -PngExport::PngExport(KoFilter *fil, const char *name, const QStringList&lst) +PngExport::PngExport(KoFilter *fil, const char *name, const TQStringList&lst) : ImageExport(fil,name,lst) { } @@ -60,7 +60,7 @@ const char * PngExport::exportFormat() return "image/png"; } -bool PngExport::saveImage( QString fileName) +bool PngExport::saveImage( TQString fileName) { bool ret = pixmap.save( fileName, "PNG" ); // Save the image. diff --git a/filters/kchart/png/pngexport.h b/filters/kchart/png/pngexport.h index 34214477..4953f44f 100644 --- a/filters/kchart/png/pngexport.h +++ b/filters/kchart/png/pngexport.h @@ -25,11 +25,12 @@ class PngExport : public ImageExport { Q_OBJECT + TQ_OBJECT public: - PngExport(KoFilter *parent, const char *name, const QStringList&); + PngExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~PngExport(); - virtual bool saveImage( QString fileName); + virtual bool saveImage( TQString fileName); virtual void extraImageAttribute(); virtual const char * exportFormat(); }; diff --git a/filters/kchart/svg/svgexport.cc b/filters/kchart/svg/svgexport.cc index 204c59db..8d8ad52c 100644 --- a/filters/kchart/svg/svgexport.cc +++ b/filters/kchart/svg/svgexport.cc @@ -17,8 +17,8 @@ Boston, MA 02110-1301 USA. */ -#include <qpicture.h> -#include <qpainter.h> +#include <tqpicture.h> +#include <tqpainter.h> #include <kmessagebox.h> @@ -35,7 +35,7 @@ typedef KGenericFactory<SvgExport, KoFilter> SvgExportFactory; K_EXPORT_COMPONENT_FACTORY( libkchartsvgexport, SvgExportFactory( "svgexport" ) ) -SvgExport::SvgExport(KoFilter *, const char *, const QStringList&) +SvgExport::SvgExport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -45,8 +45,8 @@ SvgExport::~SvgExport() } -KoFilter::ConversionStatus -SvgExport::convert(const QCString& from, const QCString& to) +KoFilter::ConversiontqStatus +SvgExport::convert(const TQCString& from, const TQCString& to) { // Check for proper conversion. if ( from != "application/x-kchart" || to != "image/svg+xml" ) @@ -61,9 +61,9 @@ SvgExport::convert(const QCString& from, const QCString& to) } // Get the XML tree. - QDomDocument domIn; + TQDomDocument domIn; domIn.setContent( storeIn ); - QDomElement docNode = domIn.documentElement(); + TQDomElement docNode = domIn.documentElement(); // Read the document from the XML tree. KChart::KChartPart kchartDoc; @@ -74,9 +74,9 @@ SvgExport::convert(const QCString& from, const QCString& to) } // Draw the actual bitmap. - QPicture picture; - QPainter painter(&picture); - QRect rect(QPoint(0, 0), QPoint(500, 400)); + TQPicture picture; + TQPainter painter(&picture); + TQRect rect(TQPoint(0, 0), TQPoint(500, 400)); kchartDoc.paintContent(painter, rect, false); painter.end(); diff --git a/filters/kchart/svg/svgexport.h b/filters/kchart/svg/svgexport.h index d2a9823c..1ec2f61e 100644 --- a/filters/kchart/svg/svgexport.h +++ b/filters/kchart/svg/svgexport.h @@ -25,12 +25,13 @@ class SvgExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - SvgExport(KoFilter *parent, const char *name, const QStringList&); + SvgExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~SvgExport(); - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; #endif // __SVGEXPORT_H__ diff --git a/filters/kchart/xbm/xbmexport.cpp b/filters/kchart/xbm/xbmexport.cpp index f6b6fab0..a0acd648 100644 --- a/filters/kchart/xbm/xbmexport.cpp +++ b/filters/kchart/xbm/xbmexport.cpp @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include <qpixmap.h> -#include <qpainter.h> +#include <tqpixmap.h> +#include <tqpainter.h> #include <kmessagebox.h> @@ -33,7 +33,7 @@ typedef KGenericFactory<XbmExport, KoFilter> xbmExportFactory; K_EXPORT_COMPONENT_FACTORY( libkchartxbmexport, xbmExportFactory( "xbmexport" ) ) -XbmExport::XbmExport(KoFilter *fil, const char *name, const QStringList&lst) +XbmExport::XbmExport(KoFilter *fil, const char *name, const TQStringList&lst) : ImageExport(fil,name,lst) { } @@ -56,7 +56,7 @@ void XbmExport::extraImageAttribute() } -bool XbmExport::saveImage( QString fileName) +bool XbmExport::saveImage( TQString fileName) { bool ret = pixmap.save( fileName, "XBM" ); // Save the image. diff --git a/filters/kchart/xbm/xbmexport.h b/filters/kchart/xbm/xbmexport.h index 1ab779e3..a5b466d9 100644 --- a/filters/kchart/xbm/xbmexport.h +++ b/filters/kchart/xbm/xbmexport.h @@ -25,11 +25,12 @@ class XbmExport : public ImageExport { Q_OBJECT + TQ_OBJECT public: - XbmExport(KoFilter *parent, const char *name, const QStringList&); + XbmExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~XbmExport(); - virtual bool saveImage( QString fileName); + virtual bool saveImage( TQString fileName); virtual void extraImageAttribute(); virtual const char * exportFormat(); }; diff --git a/filters/kchart/xpm/xpmexport.cpp b/filters/kchart/xpm/xpmexport.cpp index 116fef46..da5832d0 100644 --- a/filters/kchart/xpm/xpmexport.cpp +++ b/filters/kchart/xpm/xpmexport.cpp @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include <qpixmap.h> -#include <qpainter.h> +#include <tqpixmap.h> +#include <tqpainter.h> #include <kmessagebox.h> @@ -33,7 +33,7 @@ typedef KGenericFactory<XpmExport, KoFilter> xpmExportFactory; K_EXPORT_COMPONENT_FACTORY( libkchartxpmexport, xpmExportFactory( "xpmexport" ) ) -XpmExport::XpmExport(KoFilter *fil, const char *name, const QStringList&lst) +XpmExport::XpmExport(KoFilter *fil, const char *name, const TQStringList&lst) : ImageExport(fil,name,lst) { } @@ -56,7 +56,7 @@ void XpmExport::extraImageAttribute() } -bool XpmExport::saveImage( QString fileName) +bool XpmExport::saveImage( TQString fileName) { bool ret = pixmap.save( fileName, "XPM" ); // Save the image. diff --git a/filters/kchart/xpm/xpmexport.h b/filters/kchart/xpm/xpmexport.h index 8fc7e008..67acdc7a 100644 --- a/filters/kchart/xpm/xpmexport.h +++ b/filters/kchart/xpm/xpmexport.h @@ -25,11 +25,12 @@ class XpmExport : public ImageExport { Q_OBJECT + TQ_OBJECT public: - XpmExport(KoFilter *parent, const char *name, const QStringList&); + XpmExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~XpmExport(); - virtual bool saveImage( QString fileName); + virtual bool saveImage( TQString fileName); virtual void extraImageAttribute(); virtual const char * exportFormat(); }; diff --git a/filters/kformula/latex/latexexport.cc b/filters/kformula/latex/latexexport.cc index 20cecdcf..b280df1c 100644 --- a/filters/kformula/latex/latexexport.cc +++ b/filters/kformula/latex/latexexport.cc @@ -17,9 +17,9 @@ * Boston, MA 02110-1301, USA. */ -#include <qstring.h> -#include <qtextstream.h> -#include <qfile.h> +#include <tqstring.h> +#include <tqtextstream.h> +#include <tqfile.h> #include <kapplication.h> #include <kdebug.h> @@ -40,34 +40,34 @@ typedef KGenericFactory<LATEXExport, KoFilter> LATEXExportFactory; K_EXPORT_COMPONENT_FACTORY( libkfolatexexport, LATEXExportFactory( "kofficefilters" ) ) -LATEXExport::LATEXExport( KoFilter */*parent*/, const char */*name*/, const QStringList& ) +LATEXExport::LATEXExport( KoFilter */*tqparent*/, const char */*name*/, const TQStringList& ) : KoFilter() { } -KoFilter::ConversionStatus LATEXExport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus LATEXExport::convert( const TQCString& from, const TQCString& to ) { if ( to != "text/x-tex" || from != "application/x-kformula" ) return KoFilter::NotImplemented; KoStoreDevice* in = m_chain->storageFile( "root", KoStore::Read ); if(!in) { - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); KMessageBox::error( 0, i18n( "Failed to read data." ), i18n( "LaTeX Export Error" ) ); return KoFilter::StorageCreationError; } - QDomDocument dom( "KFORMULA" ); + TQDomDocument dom( "KFORMULA" ); if ( !dom.setContent( in, false ) ) { - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); KMessageBox::error( 0, i18n( "Malformed XML data." ), i18n( "LaTeX Export Error" ) ); return KoFilter::WrongFormat; } - QFile f( m_chain->outputFile() ); + TQFile f( m_chain->outputFile() ); if( !f.open( IO_Truncate | IO_ReadWrite ) ) { - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); KMessageBox::error( 0, i18n( "Failed to write file." ), i18n( "LaTeX Export Error" ) ); return KoFilter::FileNotFound; } @@ -80,8 +80,8 @@ KoFilter::ConversionStatus LATEXExport::convert( const QCString& from, const QCS kdError(30522) << "Failed." << endl; } - QTextStream stream(&f); - //stream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream stream(&f); + //stream.setEncoding(TQTextStream::UnicodeUTF8); stream << "\\documentclass{article}\n\\usepackage{amsmath}\n\\begin{document}\n\\[\n" << formula->texString() << "\n\\]\n\\end{document}"; diff --git a/filters/kformula/latex/latexexport.h b/filters/kformula/latex/latexexport.h index af24003d..1da761be 100644 --- a/filters/kformula/latex/latexexport.h +++ b/filters/kformula/latex/latexexport.h @@ -20,19 +20,20 @@ #ifndef LATEXEXPORT_H #define LATEXEXPORT_H -class QCString; -class QStringList; +class TQCString; +class TQStringList; #include <KoFilter.h> class LATEXExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - LATEXExport( KoFilter *parent, const char *name, const QStringList& ); + LATEXExport( KoFilter *tqparent, const char *name, const TQStringList& ); virtual ~LATEXExport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; #endif // LATEXEXPORT_H diff --git a/filters/kformula/mathml/mathmlexport.cc b/filters/kformula/mathml/mathmlexport.cc index cbf8489e..667c18ef 100644 --- a/filters/kformula/mathml/mathmlexport.cc +++ b/filters/kformula/mathml/mathmlexport.cc @@ -17,9 +17,9 @@ * Boston, MA 02110-1301, USA. */ -#include <qstring.h> -#include <qtextstream.h> -#include <qfile.h> +#include <tqstring.h> +#include <tqtextstream.h> +#include <tqfile.h> #include <kapplication.h> #include <kdebug.h> @@ -40,34 +40,34 @@ typedef KGenericFactory<MathMLExport, KoFilter> MathMLExportFactory; K_EXPORT_COMPONENT_FACTORY( libkfomathmlexport, MathMLExportFactory( "kofficefilters" ) ) -MathMLExport::MathMLExport( KoFilter */*parent*/, const char */*name*/, const QStringList& ) +MathMLExport::MathMLExport( KoFilter */*tqparent*/, const char */*name*/, const TQStringList& ) : KoFilter() { } -KoFilter::ConversionStatus MathMLExport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus MathMLExport::convert( const TQCString& from, const TQCString& to ) { if ( to != "application/mathml+xml" || from != "application/x-kformula" ) return KoFilter::NotImplemented; KoStoreDevice* in = m_chain->storageFile( "root", KoStore::Read ); if(!in) { - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); KMessageBox::error( 0, i18n( "Failed to read data." ), i18n( "MathML Export Error" ) ); return KoFilter::StorageCreationError; } - QDomDocument dom; + TQDomDocument dom; if ( !dom.setContent( in, false ) ) { - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); KMessageBox::error( 0, i18n( "Malformed XML data." ), i18n( "MathML Export Error" ) ); return KoFilter::WrongFormat; } - QFile f( m_chain->outputFile() ); + TQFile f( m_chain->outputFile() ); if( !f.open( IO_Truncate | IO_ReadWrite ) ) { - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); KMessageBox::error( 0, i18n( "Failed to write file." ), i18n( "MathML Export Error" ) ); return KoFilter::FileNotFound; } @@ -80,8 +80,8 @@ KoFilter::ConversionStatus MathMLExport::convert( const QCString& from, const QC kdError() << "Failed." << endl; } - QTextStream stream(&f); - stream.setEncoding( QTextStream::UnicodeUTF8 ); + TQTextStream stream(&f); + stream.setEncoding( TQTextStream::UnicodeUTF8 ); formula->saveMathML( stream ); f.close(); diff --git a/filters/kformula/mathml/mathmlexport.h b/filters/kformula/mathml/mathmlexport.h index 0e15b7a0..7f3eee19 100644 --- a/filters/kformula/mathml/mathmlexport.h +++ b/filters/kformula/mathml/mathmlexport.h @@ -20,19 +20,20 @@ #ifndef MATHMLEXPORT_H #define MATHMLEXPORT_H -class QCString; -class QStringList; +class TQCString; +class TQStringList; #include <KoFilter.h> class MathMLExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - MathMLExport( KoFilter *parent, const char *name, const QStringList& ); + MathMLExport( KoFilter *tqparent, const char *name, const TQStringList& ); virtual ~MathMLExport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; #endif // MATHMLEXPORT_H diff --git a/filters/kformula/mathml/mathmlimport.cc b/filters/kformula/mathml/mathmlimport.cc index 9ede69ce..87ce2182 100644 --- a/filters/kformula/mathml/mathmlimport.cc +++ b/filters/kformula/mathml/mathmlimport.cc @@ -25,7 +25,7 @@ #include <kmessagebox.h> #include <KoFilterChain.h> -#include <qtextcodec.h> +#include <tqtextcodec.h> #include <kformuladocument.h> #include <kformulacontainer.h> @@ -39,12 +39,12 @@ typedef KGenericFactory<MathMLImport, KoFilter> MathMLImportFactory; K_EXPORT_COMPONENT_FACTORY( libkfomathmlimport, MathMLImportFactory( "kofficefilters" ) ) -MathMLImport::MathMLImport(KoFilter *, const char *, const QStringList&) +MathMLImport::MathMLImport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } -KoFilter::ConversionStatus MathMLImport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus MathMLImport::convert( const TQCString& from, const TQCString& to ) { kdDebug( KFormula::DEBUGID ) << "From: " << from << endl; kdDebug( KFormula::DEBUGID ) << "To: " << to << endl; @@ -52,7 +52,7 @@ KoFilter::ConversionStatus MathMLImport::convert( const QCString& from, const QC if(from != "application/mathml+xml" || to != "application/x-kformula") return KoFilter::NotImplemented; - KoStore* out = KoStore::createStore(QString(m_chain->outputFile()), KoStore::Write); + KoStore* out = KoStore::createStore(TQString(m_chain->outputFile()), KoStore::Write); if(!out || !out->open("root")) { KMessageBox::error( 0, i18n( "Unable to open output file." ), i18n( "MathML Import Error" ) ); delete out; @@ -65,26 +65,26 @@ KoFilter::ConversionStatus MathMLImport::convert( const QCString& from, const QC KFormula::Container* formula = doc->createFormula(); //formula->loadMathML( m_chain->inputFile() ); - const QString filename( m_chain->inputFile() ); - QFile f( filename ); + const TQString filename( m_chain->inputFile() ); + TQFile f( filename ); if ( !f.open( IO_ReadOnly ) ) { - KMessageBox::error( 0, i18n( "Failed to open input file: %1" ).arg( filename ), i18n( "MathML Import Error" ) ); + KMessageBox::error( 0, i18n( "Failed to open input file: %1" ).tqarg( filename ), i18n( "MathML Import Error" ) ); delete wrapper; return KoFilter::FileNotFound; } - QDomDocument mathML; - // Error variables for QDomDocument::setContent - QString errorMsg; + TQDomDocument mathML; + // Error variables for TQDomDocument::setContent + TQString errorMsg; int errorLine, errorColumn; if ( !mathML.setContent( &f, true, &errorMsg, &errorLine, &errorColumn ) ) { delete wrapper; - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); kdError(KFormula::DEBUGID) << "Parsing error in " << filename << "! Aborting!" << endl << " In line: " << errorLine << ", column: " << errorColumn << endl << " Error message: " << errorMsg << endl; KMessageBox::error( 0, i18n( "Parsing error in MathML file %4 at line %1, column %2\nError message: %3" ) - .arg( errorLine ).arg( errorColumn ).arg( i18n ( "QXml", errorMsg.utf8() ).arg( filename ) ), i18n( "MathML Import Error" ) ); + .tqarg( errorLine ).tqarg( errorColumn ).tqarg( i18n ( "TQXml", errorMsg.utf8() ).tqarg( filename ) ), i18n( "MathML Import Error" ) ); return KoFilter::WrongFormat; } f.close(); @@ -95,7 +95,7 @@ KoFilter::ConversionStatus MathMLImport::convert( const QCString& from, const QC // taken from KoDocument::saveToStore KoStoreDevice dev( out ); - const QCString s = doc->saveXML().toCString(); // utf8 already + const TQCString s = doc->saveXML().toCString(); // utf8 already const int nwritten = dev.writeBlock( s.data(), s.size()-1 ); if ( nwritten != (int)s.size()-1 ) { kdWarning() << "wrote " << nwritten << " - expected " << s.size()-1 << endl; diff --git a/filters/kformula/mathml/mathmlimport.h b/filters/kformula/mathml/mathmlimport.h index 79f6c052..b1d1152f 100644 --- a/filters/kformula/mathml/mathmlimport.h +++ b/filters/kformula/mathml/mathmlimport.h @@ -20,10 +20,10 @@ #ifndef MATHMLIMPORT_H #define MATHMLIMPORT_H -#include <qstring.h> -#include <qtextstream.h> -#include <qfile.h> -#include <qobject.h> +#include <tqstring.h> +#include <tqtextstream.h> +#include <tqfile.h> +#include <tqobject.h> #include <KoFilter.h> #include <KoStore.h> @@ -31,11 +31,12 @@ class MathMLImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - MathMLImport(KoFilter *parent, const char *name, const QStringList&); + MathMLImport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~MathMLImport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; #endif /* MATHMLIMPORT_H */ diff --git a/filters/kformula/png/pngexport.cc b/filters/kformula/png/pngexport.cc index f51bc1f1..b8d0f3d3 100644 --- a/filters/kformula/png/pngexport.cc +++ b/filters/kformula/png/pngexport.cc @@ -17,10 +17,10 @@ * Boston, MA 02110-1301, USA. */ -#include <qstring.h> -#include <qtextstream.h> -#include <qfile.h> -#include <qobject.h> +#include <tqstring.h> +#include <tqtextstream.h> +#include <tqfile.h> +#include <tqobject.h> #include <kapplication.h> #include <kdebug.h> @@ -40,13 +40,13 @@ typedef KGenericFactory<PNGExport, KoFilter> PNGExportFactory; K_EXPORT_COMPONENT_FACTORY( libkfopngexport, PNGExportFactory( "kofficefilters" ) ) -PNGExport::PNGExport( KoFilter */*parent*/, const char */*name*/, const QStringList& ) +PNGExport::PNGExport( KoFilter */*tqparent*/, const char */*name*/, const TQStringList& ) : KoFilter() { } -KoFilter::ConversionStatus PNGExport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus PNGExport::convert( const TQCString& from, const TQCString& to ) { if ( to != "image/png" || from != "application/x-kformula" ) return KoFilter::NotImplemented; @@ -58,7 +58,7 @@ KoFilter::ConversionStatus PNGExport::convert( const QCString& from, const QCStr return KoFilter::FileNotFound; } - QDomDocument dom( "KFORMULA" ); + TQDomDocument dom( "KFORMULA" ); if ( !dom.setContent( in, false ) ) { kapp->restoreOverrideCursor(); KMessageBox::error( 0, i18n( "Malformed XML data." ), i18n( "PNG Export Error" ) ); diff --git a/filters/kformula/png/pngexport.h b/filters/kformula/png/pngexport.h index b9425439..54c121e3 100644 --- a/filters/kformula/png/pngexport.h +++ b/filters/kformula/png/pngexport.h @@ -20,19 +20,20 @@ #ifndef PNGEXPORT_H #define PNGEXPORT_H -class QCString; -class QStringList; +class TQCString; +class TQStringList; #include <KoFilter.h> class PNGExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - PNGExport( KoFilter *parent, const char *name, const QStringList& ); + PNGExport( KoFilter *tqparent, const char *name, const TQStringList& ); virtual ~PNGExport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; #endif // PNGEXPORT_H diff --git a/filters/kformula/png/pngexportdia.cc b/filters/kformula/png/pngexportdia.cc index 8de33b75..e366882c 100644 --- a/filters/kformula/png/pngexportdia.cc +++ b/filters/kformula/png/pngexportdia.cc @@ -17,15 +17,15 @@ * Boston, MA 02110-1301, USA. */ -#include <qcheckbox.h> -#include <qimage.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlineedit.h> -#include <qpaintdevice.h> -#include <qrect.h> -#include <qvbuttongroup.h> -#include <qwidget.h> +#include <tqcheckbox.h> +#include <tqimage.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqpaintdevice.h> +#include <tqrect.h> +#include <tqvbuttongroup.h> +#include <tqwidget.h> #include <kapplication.h> #include <kdebug.h> @@ -39,8 +39,8 @@ #include "pngexportdia.h" #include <knuminput.h> -PNGExportDia::PNGExportDia( const QDomDocument &dom, const QString &outFile, QWidget *parent, const char *name ) - : KDialogBase( parent, name, true, i18n("PNG Export Filter Parameters" ), Ok|Cancel ), +PNGExportDia::PNGExportDia( const TQDomDocument &dom, const TQString &outFile, TQWidget *tqparent, const char *name ) + : KDialogBase( tqparent, name, true, i18n("PNG Export Filter Parameters" ), Ok|Cancel ), _fileOut( outFile ) { kapp->restoreOverrideCursor(); @@ -54,7 +54,7 @@ PNGExportDia::PNGExportDia( const QDomDocument &dom, const QString &outFile, QWi setupGUI(); - QRect rect = formula->boundingRect(); + TQRect rect = formula->boundingRect(); realWidth = rect.width(); realHeight = rect.height(); widthEdit->setValue( realWidth ); @@ -63,8 +63,8 @@ PNGExportDia::PNGExportDia( const QDomDocument &dom, const QString &outFile, QWi percHeightEdit->setValue( 100 ); connectAll(); - connect( proportional, SIGNAL( clicked() ), - this, SLOT( proportionalClicked() ) ); + connect( proportional, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( proportionalClicked() ) ); } PNGExportDia::~PNGExportDia() @@ -74,33 +74,33 @@ PNGExportDia::~PNGExportDia() void PNGExportDia::connectAll() { - connect( widthEdit, SIGNAL( valueChanged(int) ), - this, SLOT( widthChanged( int ) ) ); - connect( heightEdit, SIGNAL( valueChanged(int) ), - this, SLOT( heightChanged( int ) ) ); - connect( percWidthEdit, SIGNAL( valueChanged(double) ), - this, SLOT( percentWidthChanged( double ) ) ); - connect( percHeightEdit, SIGNAL( valueChanged(double) ), - this, SLOT( percentHeightChanged(double ) ) ); + connect( widthEdit, TQT_SIGNAL( valueChanged(int) ), + this, TQT_SLOT( widthChanged( int ) ) ); + connect( heightEdit, TQT_SIGNAL( valueChanged(int) ), + this, TQT_SLOT( heightChanged( int ) ) ); + connect( percWidthEdit, TQT_SIGNAL( valueChanged(double) ), + this, TQT_SLOT( percentWidthChanged( double ) ) ); + connect( percHeightEdit, TQT_SIGNAL( valueChanged(double) ), + this, TQT_SLOT( percentHeightChanged(double ) ) ); } void PNGExportDia::disconnectAll() { - disconnect( widthEdit, SIGNAL( valueChanged(int) ), - this, SLOT( widthChanged( int ) ) ); - disconnect( heightEdit, SIGNAL( valueChanged(int) ), - this, SLOT( heightChanged( int ) ) ); - disconnect( percWidthEdit, SIGNAL( valueChanged(double) ), - this, SLOT( percentWidthChanged( double ) ) ); - disconnect( percHeightEdit, SIGNAL( valueChanged(double) ), - this, SLOT( percentHeightChanged(double ) ) ); + disconnect( widthEdit, TQT_SIGNAL( valueChanged(int) ), + this, TQT_SLOT( widthChanged( int ) ) ); + disconnect( heightEdit, TQT_SIGNAL( valueChanged(int) ), + this, TQT_SLOT( heightChanged( int ) ) ); + disconnect( percWidthEdit, TQT_SIGNAL( valueChanged(double) ), + this, TQT_SLOT( percentWidthChanged( double ) ) ); + disconnect( percHeightEdit, TQT_SIGNAL( valueChanged(double) ), + this, TQT_SLOT( percentHeightChanged(double ) ) ); } void PNGExportDia::widthChanged( int width ) { disconnectAll(); - width = QMIN( width, realWidth*10 ); - width = QMAX( width, realWidth/10 ); + width = TQMIN( width, realWidth*10 ); + width = TQMAX( width, realWidth/10 ); double percent = 100.*static_cast<double>( width )/static_cast<double>( realWidth ); percWidthEdit->setValue( percent ); if ( proportional->isChecked() ) { @@ -114,8 +114,8 @@ void PNGExportDia::widthChanged( int width ) void PNGExportDia::heightChanged( int height ) { disconnectAll(); - height = QMIN( height, realHeight*10 ); - height = QMAX( height, realHeight/10 ); + height = TQMIN( height, realHeight*10 ); + height = TQMAX( height, realHeight/10 ); double percent = 100.*static_cast<double>( height )/static_cast<double>( realHeight ); percHeightEdit->setValue( percent ); if ( proportional->isChecked() ) { @@ -129,8 +129,8 @@ void PNGExportDia::heightChanged( int height ) void PNGExportDia::percentWidthChanged( double percent ) { disconnectAll(); - percent = QMIN( percent, 1000 ); - percent = QMAX( percent, 10 ); + percent = TQMIN( percent, 1000 ); + percent = TQMAX( percent, 10 ); int width = static_cast<int>( realWidth*percent/100. ); widthEdit->setValue( width ); if ( proportional->isChecked() ) { @@ -144,8 +144,8 @@ void PNGExportDia::percentWidthChanged( double percent ) void PNGExportDia::percentHeightChanged( double percent ) { disconnectAll(); - percent = QMIN( percent, 1000 ); - percent = QMAX( percent, 10 ); + percent = TQMIN( percent, 1000 ); + percent = TQMAX( percent, 10 ); if ( proportional->isChecked() ) { int width = static_cast<int>( realWidth*percent/100. ); widthEdit->setValue( width ); @@ -161,8 +161,8 @@ void PNGExportDia::proportionalClicked() if ( proportional->isChecked() ) { disconnectAll(); int width = widthEdit->value( ); - width = QMIN( width, realWidth*10 ); - width = QMAX( width, realWidth/10 ); + width = TQMIN( width, realWidth*10 ); + width = TQMAX( width, realWidth/10 ); double percent = 100.*static_cast<double>( width )/static_cast<double>( realWidth ); percHeightEdit->setValue( percent ); int height = static_cast<int>( realHeight*percent/100. ); @@ -173,47 +173,47 @@ void PNGExportDia::proportionalClicked() void PNGExportDia::setupGUI() { - QWidget *page = new QWidget( this ); + TQWidget *page = new TQWidget( this ); setMainWidget(page); - QBoxLayout* mainLayout = new QVBoxLayout( page, KDialog::marginHint(), KDialog::spacingHint() ); + TQBoxLayout* mainLayout = new TQVBoxLayout( page, KDialog::marginHint(), KDialog::spacingHint() ); - proportional = new QCheckBox( page, "proportional" ); + proportional = new TQCheckBox( page, "proportional" ); proportional->setText( i18n( "Keep ratio" ) ); proportional->setChecked( true ); mainLayout->addWidget( proportional ); - QLabel* height = new QLabel( page, "Height" ); + TQLabel* height = new TQLabel( page, "Height" ); height->setText( i18n( "Height" ) ); widthEdit = new KIntNumInput( page, "widthEdit" ); - QLabel* width = new QLabel( page, "Width" ); + TQLabel* width = new TQLabel( page, "Width" ); width->setText( i18n( "Width" ) ); heightEdit = new KIntNumInput( page, "heightEdit" ); - QGridLayout* layout1 = new QGridLayout; - layout1->addWidget( height, 1, 0 ); - layout1->addWidget( widthEdit, 0, 1 ); - layout1->addWidget( width, 0, 0 ); - layout1->addWidget( heightEdit, 1, 1 ); + TQGridLayout* tqlayout1 = new TQGridLayout; + tqlayout1->addWidget( height, 1, 0 ); + tqlayout1->addWidget( widthEdit, 0, 1 ); + tqlayout1->addWidget( width, 0, 0 ); + tqlayout1->addWidget( heightEdit, 1, 1 ); - mainLayout->addLayout( layout1 ); + mainLayout->addLayout( tqlayout1 ); - QLabel* percentHeight = new QLabel( page, "PercentHeight" ); + TQLabel* percentHeight = new TQLabel( page, "PercentHeight" ); percentHeight->setText( i18n( "Height (%)" ) ); - QLabel* percentWidth = new QLabel( page, "PercentWidth" ); + TQLabel* percentWidth = new TQLabel( page, "PercentWidth" ); percentWidth->setText( i18n( "Width (%)" ) ); percWidthEdit = new KDoubleNumInput( page, "percWidthEdit" ); percHeightEdit = new KDoubleNumInput( page, "percHeightEdit" ); - QGridLayout* layout2 = new QGridLayout; - layout2->addWidget( percWidthEdit, 0, 1 ); - layout2->addWidget( percHeightEdit, 1, 1 ); - layout2->addWidget( percentHeight, 1, 0 ); - layout2->addWidget( percentWidth, 0, 0 ); + TQGridLayout* tqlayout2 = new TQGridLayout; + tqlayout2->addWidget( percWidthEdit, 0, 1 ); + tqlayout2->addWidget( percHeightEdit, 1, 1 ); + tqlayout2->addWidget( percentHeight, 1, 0 ); + tqlayout2->addWidget( percentWidth, 0, 0 ); - mainLayout->addLayout( layout2 ); + mainLayout->addLayout( tqlayout2 ); - /* Display the main layout */ + /* Display the main tqlayout */ mainLayout->addStretch( 5 ); mainLayout->activate(); } @@ -223,7 +223,7 @@ void PNGExportDia::slotOk() { hide(); //doc->setZoomAndResolution( 100, 600, 600 ); - //doc->setZoomAndResolution( 1000, QPaintDevice::x11AppDpiX(), QPaintDevice::x11AppDpiY() ); + //doc->setZoomAndResolution( 1000, TQPaintDevice::x11AppDpiX(), TQPaintDevice::x11AppDpiY() ); //doc->newZoomAndResolution( false, false ); int width = widthEdit->value(); int height = heightEdit->value(); @@ -232,7 +232,7 @@ void PNGExportDia::slotOk() // << endl; // width = realWidth; // height = realHeight; - QImage image = formula->drawImage( width, height ); + TQImage image = formula->drawImage( width, height ); if ( !image.save( _fileOut, "PNG" ) ) { KMessageBox::error( 0, i18n( "Failed to write file." ), i18n( "PNG Export Error" ) ); } diff --git a/filters/kformula/png/pngexportdia.h b/filters/kformula/png/pngexportdia.h index 3957ef88..4d04d429 100644 --- a/filters/kformula/png/pngexportdia.h +++ b/filters/kformula/png/pngexportdia.h @@ -20,8 +20,8 @@ #ifndef PNGEXPORTDIA_H #define PNGEXPORTDIA_H -class QCheckBox; -class QString; +class TQCheckBox; +class TQString; class KIntNumInput; class KDoubleNumInput; @@ -30,7 +30,7 @@ namespace KFormula { class DocumentWrapper; } -#include <qdom.h> +#include <tqdom.h> #include <kdialogbase.h> @@ -38,9 +38,10 @@ namespace KFormula { class PNGExportDia : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - PNGExportDia( const QDomDocument &dom, const QString &outFile, QWidget *parent=0L, const char *name=0L ); + PNGExportDia( const TQDomDocument &dom, const TQString &outFile, TQWidget *tqparent=0L, const char *name=0L ); ~PNGExportDia(); public slots: @@ -65,13 +66,13 @@ private: int realWidth; int realHeight; - QString _fileOut; - QByteArray _arrayOut; + TQString _fileOut; + TQByteArray _arrayOut; KFormula::Container* formula; KFormula::DocumentWrapper* wrapper; - QCheckBox* proportional; + TQCheckBox* proportional; KIntNumInput* widthEdit; KIntNumInput* heightEdit; KDoubleNumInput* percWidthEdit; diff --git a/filters/kformula/svg/svgexport.cc b/filters/kformula/svg/svgexport.cc index 46177a9a..25758e82 100644 --- a/filters/kformula/svg/svgexport.cc +++ b/filters/kformula/svg/svgexport.cc @@ -18,8 +18,8 @@ Boston, MA 02110-1301 USA. */ -#include <qpicture.h> -#include <qpainter.h> +#include <tqpicture.h> +#include <tqpainter.h> #include <kapplication.h> #include <kmessagebox.h> @@ -38,7 +38,7 @@ typedef KGenericFactory<SvgExport, KoFilter> SvgExportFactory; K_EXPORT_COMPONENT_FACTORY( libkfosvgexport, SvgExportFactory( "svgexport" ) ) -SvgExport::SvgExport(KoFilter *, const char *, const QStringList&) +SvgExport::SvgExport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -48,8 +48,8 @@ SvgExport::~SvgExport() } -KoFilter::ConversionStatus -SvgExport::convert(const QCString& from, const QCString& to) +KoFilter::ConversiontqStatus +SvgExport::convert(const TQCString& from, const TQCString& to) { // Check for proper conversion. if ( from != "application/x-kformula" || to != "image/svg+xml" ) @@ -64,9 +64,9 @@ SvgExport::convert(const QCString& from, const QCString& to) } // Get the XML tree. - QDomDocument domIn; + TQDomDocument domIn; domIn.setContent( storeIn ); - QDomElement docNode = domIn.documentElement(); + TQDomElement docNode = domIn.documentElement(); // Read the document from the XML tree. KFormula::DocumentWrapper* wrapper = new KFormula::DocumentWrapper( kapp->config(), 0 ); @@ -81,9 +81,9 @@ SvgExport::convert(const QCString& from, const QCString& to) } // Draw the actual bitmap. - QPicture picture; - QPainter painter(&picture); - QRect rect(QPoint(0, 0), QPoint(500, 400)); + TQPicture picture; + TQPainter painter(&picture); + TQRect rect(TQPoint(0, 0), TQPoint(500, 400)); formula->draw( painter, rect, false ); painter.end(); diff --git a/filters/kformula/svg/svgexport.h b/filters/kformula/svg/svgexport.h index 085654a0..98d4d8d4 100644 --- a/filters/kformula/svg/svgexport.h +++ b/filters/kformula/svg/svgexport.h @@ -26,12 +26,13 @@ class SvgExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - SvgExport(KoFilter *parent, const char *name, const QStringList&); + SvgExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~SvgExport(); - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; #endif // __SVGEXPORT_H__ diff --git a/filters/kivio/imageexport/kivio_imageexport.cpp b/filters/kivio/imageexport/kivio_imageexport.cpp index e5a6600c..cd983fe6 100644 --- a/filters/kivio/imageexport/kivio_imageexport.cpp +++ b/filters/kivio/imageexport/kivio_imageexport.cpp @@ -20,12 +20,12 @@ #include "kivio_imageexport.h" -#include <qdom.h> -#include <qcstring.h> -#include <qpixmap.h> -#include <qpainter.h> -#include <qsize.h> -#include <qstringlist.h> +#include <tqdom.h> +#include <tqcstring.h> +#include <tqpixmap.h> +#include <tqpainter.h> +#include <tqsize.h> +#include <tqstringlist.h> #include <kmessagebox.h> #include <klocale.h> @@ -49,19 +49,19 @@ K_EXPORT_COMPONENT_FACTORY( libkivioimageexport, KivioImageExportFactory("KivioI namespace Kivio { -ImageExport::ImageExport(KoFilter *, const char *, const QStringList&) +ImageExport::ImageExport(KoFilter *, const char *, const TQStringList&) : KoFilter() { KGlobal::locale()->insertCatalogue("kofficefilters"); } -KoFilter::ConversionStatus ImageExport::convert(const QCString& from, const QCString& to) +KoFilter::ConversiontqStatus ImageExport::convert(const TQCString& from, const TQCString& to) { if(from != "application/x-kivio") { return KoFilter::BadMimeType; } - QString format; + TQString format; if(to == "image/png") { format = "PNG"; @@ -95,7 +95,7 @@ KoFilter::ConversionStatus ImageExport::convert(const QCString& from, const QCSt } // Get the XML tree. - QDomDocument domIn; + TQDomDocument domIn; domIn.setContent(storeIn); KivioDoc doc; @@ -107,9 +107,9 @@ KoFilter::ConversionStatus ImageExport::convert(const QCString& from, const QCSt ImageExportDialog dlg; - QStringList pageNames; - QPtrList<KivioPage> pageList = doc.map()->pageList(); - QPtrListIterator<KivioPage> it(pageList); + TQStringList pageNames; + TQPtrList<KivioPage> pageList = doc.map()->pageList(); + TQPtrListIterator<KivioPage> it(pageList); for(; it.current() != 0; ++it) { pageNames.append(it.current()->pageName()); @@ -120,7 +120,7 @@ KoFilter::ConversionStatus ImageExport::convert(const QCString& from, const QCSt dlg.setInitialDPI(300); dlg.setInitialmargin(10); - if(dlg.exec() != QDialog::Accepted) { + if(dlg.exec() != TQDialog::Accepted) { return KoFilter::UserCancelled; } @@ -133,11 +133,11 @@ KoFilter::ConversionStatus ImageExport::convert(const QCString& from, const QCSt float z = (float)dlg.imageDPI()/(float)KoGlobal::dpiX(); KoZoomHandler zoom; - zoom.setZoomAndResolution(qRound(z * 100), KoGlobal::dpiX(), KoGlobal::dpiY()); + zoom.setZoomAndResolution(tqRound(z * 100), KoGlobal::dpiX(), KoGlobal::dpiY()); - QSize size; + TQSize size; if(dlg.usePageBorders()) { - size = QSize(zoom.zoomItX(page->paperLayout().ptWidth), zoom.zoomItY(page->paperLayout().ptHeight)); + size = TQSize(zoom.zoomItX(page->paperLayout().ptWidth), zoom.zoomItY(page->paperLayout().ptHeight)); } else { size = zoom.zoomSize(page->getRectForAllStencils().size()); } @@ -149,16 +149,16 @@ KoFilter::ConversionStatus ImageExport::convert(const QCString& from, const QCSt size.setWidth(size.width() + (border * 2)); size.setHeight(size.height() + (border * 2)); - QPixmap pixmap = QPixmap(size); - pixmap.fill(Qt::white); + TQPixmap pixmap = TQPixmap(size); + pixmap.fill(TQt::white); KivioScreenPainter kpainter; - kpainter.start(&pixmap); + kpainter.start(TQT_TQPAINTDEVICE(&pixmap)); float translationX = border; float translationY = border; if(!dlg.usePageBorders()) { - QPoint point = zoom.zoomPoint(page->getRectForAllStencils().topLeft()); + TQPoint point = zoom.zoomPoint(page->getRectForAllStencils().topLeft()); translationX -= point.x(); translationY -= point.y(); } diff --git a/filters/kivio/imageexport/kivio_imageexport.h b/filters/kivio/imageexport/kivio_imageexport.h index f538ce24..e1946f0f 100644 --- a/filters/kivio/imageexport/kivio_imageexport.h +++ b/filters/kivio/imageexport/kivio_imageexport.h @@ -28,10 +28,11 @@ namespace Kivio class ImageExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - ImageExport(KoFilter *, const char *, const QStringList&); + ImageExport(KoFilter *, const char *, const TQStringList&); - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; } diff --git a/filters/kivio/imageexport/kivio_imageexportdialog.cpp b/filters/kivio/imageexport/kivio_imageexportdialog.cpp index 0ed61397..b4e8348b 100644 --- a/filters/kivio/imageexport/kivio_imageexportdialog.cpp +++ b/filters/kivio/imageexport/kivio_imageexportdialog.cpp @@ -19,8 +19,8 @@ #include "kivio_imageexportdialog.h" -#include <qspinbox.h> -#include <qcheckbox.h> +#include <tqspinbox.h> +#include <tqcheckbox.h> #include <kcombobox.h> #include <klocale.h> @@ -31,15 +31,15 @@ namespace Kivio { -ImageExportDialog::ImageExportDialog(QWidget* parent, const char* name) - : KDialogBase(parent, name, false, i18n("Export to Image"), Ok|Cancel) +ImageExportDialog::ImageExportDialog(TQWidget* tqparent, const char* name) + : KDialogBase(tqparent, name, false, i18n("Export to Image"), Ok|Cancel) { kapp->restoreOverrideCursor(); m_mainWidget = new ImageExportWidget(this); setMainWidget(m_mainWidget); } -void ImageExportDialog::setPageList(const QStringList& pages) +void ImageExportDialog::setPageList(const TQStringList& pages) { m_mainWidget->m_pageCombo->clear(); m_mainWidget->m_pageCombo->insertStringList(pages); @@ -61,7 +61,7 @@ void ImageExportDialog::setInitialmargin(const int margin) m_mainWidget->m_marginSpinBox->setValue(margin); } -QString ImageExportDialog::selectedPage() const +TQString ImageExportDialog::selectedPage() const { return m_mainWidget->m_pageCombo->currentText(); } diff --git a/filters/kivio/imageexport/kivio_imageexportdialog.h b/filters/kivio/imageexport/kivio_imageexportdialog.h index 72d1e9ab..da005e0c 100644 --- a/filters/kivio/imageexport/kivio_imageexportdialog.h +++ b/filters/kivio/imageexport/kivio_imageexportdialog.h @@ -30,14 +30,15 @@ class ImageExportWidget; class ImageExportDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - ImageExportDialog(QWidget* parent = 0, const char* name = 0); + ImageExportDialog(TQWidget* tqparent = 0, const char* name = 0); - void setPageList(const QStringList& pages); + void setPageList(const TQStringList& pages); void setInitialDPI(const int dpi); void setInitialmargin(const int margin); - QString selectedPage() const; + TQString selectedPage() const; bool usePageBorders() const; int imageDPI() const; int margin() const; diff --git a/filters/kivio/imageexport/kivio_imageexportwidget.ui b/filters/kivio/imageexport/kivio_imageexportwidget.ui index 00241fcf..86fef7a7 100644 --- a/filters/kivio/imageexport/kivio_imageexportwidget.ui +++ b/filters/kivio/imageexport/kivio_imageexportwidget.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>Kivio::ImageExportWidget</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>Kivio::ImageExportWidget</cstring> </property> @@ -29,14 +29,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>40</height> </size> </property> </spacer> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>m_pageLabel</cstring> </property> @@ -44,7 +44,7 @@ <string>Page:</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>m_exportAreaLabel</cstring> </property> @@ -52,7 +52,7 @@ <string>Area to export:</string> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>m_DPILabel</cstring> </property> @@ -63,7 +63,7 @@ <string>Set the resolution of the resulting bitmap image</string> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>m_marginLabel</cstring> </property> @@ -81,14 +81,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>60</width> <height>21</height> </size> </property> </spacer> - <widget class="QSpinBox" row="4" column="1"> + <widget class="TQSpinBox" row="4" column="1"> <property name="name"> <cstring>m_marginSpinBox</cstring> </property> @@ -103,14 +103,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>70</width> <height>20</height> </size> </property> </spacer> - <widget class="QComboBox" row="3" column="1"> + <widget class="TQComboBox" row="3" column="1"> <item> <property name="text"> <string>72</string> @@ -194,8 +194,8 @@ </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="6" margin="11"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +<tqlayoutdefaults spacing="6" margin="11"/> +<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <includehints> <includehint>kcombobox.h</includehint> <includehint>kcombobox.h</includehint> diff --git a/filters/kpresenter/bmp/bmpexport.cpp b/filters/kpresenter/bmp/bmpexport.cpp index b2ecfe0f..f7351a10 100644 --- a/filters/kpresenter/bmp/bmpexport.cpp +++ b/filters/kpresenter/bmp/bmpexport.cpp @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include <qpixmap.h> -#include <qpainter.h> +#include <tqpixmap.h> +#include <tqpainter.h> #include <kmessagebox.h> @@ -36,7 +36,7 @@ typedef KGenericFactory<BmpExport, KoFilter> bmpExportFactory; K_EXPORT_COMPONENT_FACTORY( libkpresenterbmpexport, bmpExportFactory( "bmpexport" ) ) -BmpExport::BmpExport(KoFilter *fil, const char *name, const QStringList&lst) +BmpExport::BmpExport(KoFilter *fil, const char *name, const TQStringList&lst) : ImageExport(fil,name,lst) { } @@ -61,7 +61,7 @@ bool BmpExport::extraImageAttribute() } -bool BmpExport::saveImage( QString fileName) +bool BmpExport::saveImage( TQString fileName) { bool ret = pixmap.save( fileName, "BMP" ); // Save the image. diff --git a/filters/kpresenter/bmp/bmpexport.h b/filters/kpresenter/bmp/bmpexport.h index 6e4f29bf..f266f636 100644 --- a/filters/kpresenter/bmp/bmpexport.h +++ b/filters/kpresenter/bmp/bmpexport.h @@ -25,11 +25,12 @@ class BmpExport : public ImageExport { Q_OBJECT + TQ_OBJECT public: - BmpExport(KoFilter *parent, const char *name, const QStringList&); + BmpExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~BmpExport(); - virtual bool saveImage( QString fileName); + virtual bool saveImage( TQString fileName); virtual bool extraImageAttribute(); virtual const char * exportFormat(); }; diff --git a/filters/kpresenter/jpeg/jpegexport.cpp b/filters/kpresenter/jpeg/jpegexport.cpp index b62d985d..52711188 100644 --- a/filters/kpresenter/jpeg/jpegexport.cpp +++ b/filters/kpresenter/jpeg/jpegexport.cpp @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include <qpixmap.h> -#include <qpainter.h> +#include <tqpixmap.h> +#include <tqpainter.h> #include <kmessagebox.h> @@ -36,7 +36,7 @@ typedef KGenericFactory<JpegExport, KoFilter> jpegExportFactory; K_EXPORT_COMPONENT_FACTORY( libkpresenterjpegexport, jpegExportFactory( "jpegexport" ) ) -JpegExport::JpegExport(KoFilter *fil, const char *name, const QStringList&lst) +JpegExport::JpegExport(KoFilter *fil, const char *name, const TQStringList&lst) : ImageExport(fil,name,lst) { } @@ -62,7 +62,7 @@ bool JpegExport::extraImageAttribute() } -bool JpegExport::saveImage( QString fileName) +bool JpegExport::saveImage( TQString fileName) { bool ret = pixmap.save( fileName, "JPEG" ); // Save the image. diff --git a/filters/kpresenter/jpeg/jpegexport.h b/filters/kpresenter/jpeg/jpegexport.h index 873e463f..518615df 100644 --- a/filters/kpresenter/jpeg/jpegexport.h +++ b/filters/kpresenter/jpeg/jpegexport.h @@ -25,11 +25,12 @@ class JpegExport : public ImageExport { Q_OBJECT + TQ_OBJECT public: - JpegExport(KoFilter *parent, const char *name, const QStringList&); + JpegExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~JpegExport(); - virtual bool saveImage( QString fileName); + virtual bool saveImage( TQString fileName); virtual bool extraImageAttribute(); virtual const char * exportFormat(); }; diff --git a/filters/kpresenter/kword/kprkword.cc b/filters/kpresenter/kword/kprkword.cc index a0cd7ab4..75042fc3 100644 --- a/filters/kpresenter/kword/kprkword.cc +++ b/filters/kpresenter/kword/kprkword.cc @@ -26,13 +26,13 @@ #include <kprkword.h> #include <klocale.h> #include <kdebug.h> -#include <qsortedlist.h> -#include <qcolor.h> +#include <tqsortedlist.h> +#include <tqcolor.h> typedef KGenericFactory<KprKword, KoFilter> KprKwordFactory; K_EXPORT_COMPONENT_FACTORY( libkprkword, KprKwordFactory( "kofficefilters" ) ) -KprKword::KprKword(KoFilter *, const char *, const QStringList&) : +KprKword::KprKword(KoFilter *, const char *, const TQStringList&) : KoFilter(), outdoc( "DOC" ) { @@ -40,8 +40,8 @@ KprKword::KprKword(KoFilter *, const char *, const QStringList&) : // This filter can act as an import filter for KWord and as an export // filter for KPresenter (isn't our architecture really nice ? :) -// This is why we use the file-to-file method, not a QDomDoc one. -KoFilter::ConversionStatus KprKword::convert( const QCString& from, const QCString& to ) +// This is why we use the file-to-file method, not a TQDomDoc one. +KoFilter::ConversiontqStatus KprKword::convert( const TQCString& from, const TQCString& to ) { if(to!="application/x-kword" || from!="application/x-kpresenter") return KoFilter::NotImplemented; @@ -57,32 +57,32 @@ KoFilter::ConversionStatus KprKword::convert( const QCString& from, const QCStri outdoc.appendChild( outdoc.createProcessingInstruction( "xml", "version=\"1.0\" encoding=\"UTF-8\"" ) ); - QDomElement kwdoc = outdoc.createElement( "DOC" ); + TQDomElement kwdoc = outdoc.createElement( "DOC" ); kwdoc.setAttribute( "editor", "KprKword converter" ); kwdoc.setAttribute( "mime", "application/x-kword" ); kwdoc.setAttribute( "syntaxVersion", 1 ); outdoc.appendChild( kwdoc ); - QDomElement paper = outdoc.createElement( "PAPER" ); + TQDomElement paper = outdoc.createElement( "PAPER" ); kwdoc.appendChild( paper ); paper.setAttribute( "format", 1 ); // A4. How on earth could I know what the user really wants ? :) paper.setAttribute( "width", 595 ); paper.setAttribute( "height", 841 ); - QDomElement borders = outdoc.createElement( "PAPERBORDERS" ); + TQDomElement borders = outdoc.createElement( "PAPERBORDERS" ); paper.appendChild( borders ); borders.setAttribute( "left", 28 ); borders.setAttribute( "top", 42 ); borders.setAttribute( "right", 28 ); borders.setAttribute( "bottom", 42 ); - QDomElement framesets = outdoc.createElement( "FRAMESETS" ); + TQDomElement framesets = outdoc.createElement( "FRAMESETS" ); kwdoc.appendChild( framesets ); frameset = outdoc.createElement( "FRAMESET" ); framesets.appendChild( frameset ); frameset.setAttribute( "frameType", 1 ); // text frameset.setAttribute( "frameInfo", 0 ); // body - QDomElement frame = outdoc.createElement( "FRAME" ); + TQDomElement frame = outdoc.createElement( "FRAME" ); frameset.appendChild( frame ); frame.setAttribute( "left", 28 ); frame.setAttribute( "top", 42 ); @@ -99,19 +99,19 @@ KoFilter::ConversionStatus KprKword::convert( const QCString& from, const QCStri // Create a style for the slide titles - QDomElement styles = outdoc.createElement( "STYLES" ); + TQDomElement styles = outdoc.createElement( "STYLES" ); kwdoc.appendChild( styles ); - QDomElement style = outdoc.createElement( "STYLE" ); + TQDomElement style = outdoc.createElement( "STYLE" ); styles.appendChild( style ); - QDomElement elem = outdoc.createElement( "NAME" ); + TQDomElement elem = outdoc.createElement( "NAME" ); style.appendChild( elem ); elem.setAttribute( "value", titleStyleName ); elem = outdoc.createElement( "FOLLOWING" ); style.appendChild( elem ); elem.setAttribute( "name", "Standard" ); // no i18n here! - QDomElement counter = outdoc.createElement( "COUNTER" ); + TQDomElement counter = outdoc.createElement( "COUNTER" ); style.appendChild( counter ); counter.setAttribute( "type", 1 ); // numbered counter.setAttribute( "depth", 0 ); @@ -119,15 +119,15 @@ KoFilter::ConversionStatus KprKword::convert( const QCString& from, const QCStri counter.setAttribute( "numberingtype", 1 ); // chapter counter.setAttribute( "righttext", "." ); - QDomElement format = outdoc.createElement( "FORMAT" ); + TQDomElement format = outdoc.createElement( "FORMAT" ); style.appendChild( format ); - QDomElement font = outdoc.createElement( "FONT" ); + TQDomElement font = outdoc.createElement( "FONT" ); format.appendChild( font ); font.setAttribute( "name", titleFont ); // found when reading the first title - QDomElement size = outdoc.createElement( "SIZE" ); + TQDomElement size = outdoc.createElement( "SIZE" ); format.appendChild( size ); size.setAttribute( "value", 24 ); - QDomElement bold = outdoc.createElement( "WEIGHT" ); + TQDomElement bold = outdoc.createElement( "WEIGHT" ); format.appendChild( bold ); bold.setAttribute( "value", 75 ); @@ -147,7 +147,7 @@ KoFilter::ConversionStatus KprKword::convert( const QCString& from, const QCStri kdError(30502) << "Unable to open output file!" << endl; return KoFilter::StorageCreationError; } - QCString cstring = outdoc.toCString(); // utf-8 already + TQCString cstring = outdoc.toCString(); // utf-8 already out->writeBlock( cstring.data(), cstring.length() ); return KoFilter::OK; } @@ -156,7 +156,7 @@ KoFilter::ConversionStatus KprKword::convert( const QCString& from, const QCStri class KprObject { public: double y; - QDomElement elem; + TQDomElement elem; bool operator < ( const KprObject & c ) const { return y < c.y; @@ -169,25 +169,25 @@ class KprObject { void KprKword::convert() { - QDomElement docElem = inpdoc.documentElement(); - QDomElement paper = docElem.namedItem( "PAPER" ).toElement(); + TQDomElement docElem = inpdoc.documentElement(); + TQDomElement paper = docElem.namedItem( "PAPER" ).toElement(); int ptPageHeight = paper.attribute( "ptHeight" ).toInt(); - QDomElement objects = docElem.namedItem( "OBJECTS" ).toElement(); + TQDomElement objects = docElem.namedItem( "OBJECTS" ).toElement(); if ( objects.isNull() ) return; - QSortedList< KprObject > objList; + TQSortedList< KprObject > objList; objList.setAutoDelete( true ); - QDomNodeList lst = objects.elementsByTagName( "OBJECT" ); + TQDomNodeList lst = objects.elementsByTagName( "OBJECT" ); uint lstcount = lst.count(); for ( uint item = 0 ; item < lstcount ; ++item ) { - QDomElement object = lst.item( item ).toElement(); + TQDomElement object = lst.item( item ).toElement(); if ( object.attribute( "type" ).toInt() == 4 ) // we only care about text objs { - QDomElement orig = object.namedItem( "ORIG" ).toElement(); + TQDomElement orig = object.namedItem( "ORIG" ).toElement(); if ( !orig.isNull() ) { KprObject * obj = new KprObject; @@ -201,9 +201,9 @@ void KprKword::convert() int curPage = -1; //kdDebug() << "found " << objList.count() << " objects" << endl; - for ( QPtrListIterator<KprObject> it(objList); it.current(); ++it ) + for ( TQPtrListIterator<KprObject> it(objList); it.current(); ++it ) { - QDomElement elem = it.current()->elem; + TQDomElement elem = it.current()->elem; // Detect the first object of each page int page = int( it.current()->y / ptPageHeight ); bool isTitle = ( page > curPage ); @@ -211,64 +211,64 @@ void KprKword::convert() // << " isTitle=" << isTitle << endl; curPage = page; - QDomElement textObj = elem.namedItem( "TEXTOBJ" ).toElement(); + TQDomElement textObj = elem.namedItem( "TEXTOBJ" ).toElement(); if (textObj.isNull()) continue; // For each paragraph in this text object... - QDomNodeList lst = textObj.elementsByTagName( "P" ); + TQDomNodeList lst = textObj.elementsByTagName( "P" ); uint lstcount = lst.count(); for ( uint item = 0; item < lstcount ; ++item ) { - QDomElement p = lst.item( item ).toElement(); + TQDomElement p = lst.item( item ).toElement(); // Create paragraph in KWord doc - QDomElement parag = outdoc.createElement( "PARAGRAPH" ); + TQDomElement parag = outdoc.createElement( "PARAGRAPH" ); frameset.appendChild( parag ); - QDomElement outFormatsElem = outdoc.createElement( "FORMATS" ); + TQDomElement outFormatsElem = outdoc.createElement( "FORMATS" ); - QString text; + TQString text; // For each text element in the paragraph... - QDomElement textElem = p.firstChild().toElement(); + TQDomElement textElem = p.firstChild().toElement(); - QDomElement counter = p.namedItem( "COUNTER" ).toElement(); - QDomElement indent=p.namedItem("INDENTS").toElement(); - QDomElement lineSpacing=p.namedItem( "LINESPACING" ).toElement(); - QDomElement offset=p.namedItem("OFFSETS").toElement(); - QDomElement leftBorder = p.namedItem( "LEFTBORDER" ).toElement(); - QDomElement rightBorder = p.namedItem( "RIGHTBORDER" ).toElement(); - QDomElement topBorder = p.namedItem( "TOPBORDER" ).toElement(); - QDomElement bottomBorder = p.namedItem( "BOTTOMBORDER" ).toElement(); + TQDomElement counter = p.namedItem( "COUNTER" ).toElement(); + TQDomElement indent=p.namedItem("INDENTS").toElement(); + TQDomElement lineSpacing=p.namedItem( "LINESPACING" ).toElement(); + TQDomElement offset=p.namedItem("OFFSETS").toElement(); + TQDomElement leftBorder = p.namedItem( "LEFTBORDER" ).toElement(); + TQDomElement rightBorder = p.namedItem( "RIGHTBORDER" ).toElement(); + TQDomElement topBorder = p.namedItem( "TOPBORDER" ).toElement(); + TQDomElement bottomBorder = p.namedItem( "BOTTOMBORDER" ).toElement(); - QDomElement shadow=p.namedItem("SHADOW").toElement(); + TQDomElement shadow=p.namedItem("SHADOW").toElement(); for ( ; !textElem.isNull() ; textElem = textElem.nextSibling().toElement() ) { int oldLen = text.length(); text += textElem.text(); //kdDebug() << "KprKword::convert text now " << text << endl; - QDomElement outFormatElem = outdoc.createElement( "FORMAT" ); + TQDomElement outFormatElem = outdoc.createElement( "FORMAT" ); if ( textElem.attribute( "italic" ).toInt() ) { - QDomElement e = outdoc.createElement("ITALIC"); + TQDomElement e = outdoc.createElement("ITALIC"); e.setAttribute( "value", 1 ); outFormatElem.appendChild( e ); } - QColor underlineColor; + TQColor underlineColor; if ( textElem.hasAttribute("underlinecolor" )) { - underlineColor =QColor(textElem.attribute("underlinecolor" )); + underlineColor =TQColor(textElem.attribute("underlinecolor" )); } - QString underlineStyleLine; + TQString underlineStyleLine; if ( textElem.hasAttribute("underlinestyleline")) { underlineStyleLine = textElem.attribute("underlinestyleline"); } if ( textElem.hasAttribute("underline" )) { - QDomElement e = outdoc.createElement("UNDERLINE"); - QString value = textElem.attribute( "underline" ); + TQDomElement e = outdoc.createElement("UNDERLINE"); + TQString value = textElem.attribute( "underline" ); if ( value == "double" ) { e.setAttribute( "value", "double" ); @@ -291,12 +291,12 @@ void KprKword::convert() } - QString strikeOutStyleLine; + TQString strikeOutStyleLine; if ( textElem.hasAttribute("strikeoutstyleline")) { strikeOutStyleLine = textElem.attribute("strikeoutstyleline"); } - QString strikeOutValue; + TQString strikeOutValue; if ( textElem.hasAttribute("strikeOut")) { strikeOutValue = textElem.attribute("strikeOut"); @@ -304,7 +304,7 @@ void KprKword::convert() if( !strikeOutValue.isEmpty()) { - QDomElement e = outdoc.createElement("STRIKEOUT"); + TQDomElement e = outdoc.createElement("STRIKEOUT"); e.setAttribute( "value", strikeOutValue ); if ( !strikeOutStyleLine.isEmpty()) e.setAttribute("styleline", strikeOutStyleLine); @@ -312,7 +312,7 @@ void KprKword::convert() } /*if ( textElem.attribute( "bold" ).toInt() ) { - QDomElement e = outdoc.createElement("WEIGHT"); + TQDomElement e = outdoc.createElement("WEIGHT"); e.setAttribute( "value", 75 ); outFormatElem.appendChild( e ); }*/ // doesn't look good @@ -322,9 +322,9 @@ void KprKword::convert() // Family and point size are voluntarily NOT passed over. if ( !textElem.attribute( "color" ).isEmpty()) { - QColor col; + TQColor col; col.setNamedColor(textElem.attribute( "color" )); - QDomElement e = outdoc.createElement("COLOR"); + TQDomElement e = outdoc.createElement("COLOR"); e.setAttribute( "red", col.red() ); e.setAttribute( "green", col.green() ); e.setAttribute( "blue", col.blue() ); @@ -332,9 +332,9 @@ void KprKword::convert() } if ( !textElem.attribute("textbackcolor").isEmpty()) { - QColor col; + TQColor col; col.setNamedColor(textElem.attribute( "textbackcolor" )); - QDomElement e = outdoc.createElement("TEXTBACKGROUNDCOLOR"); + TQDomElement e = outdoc.createElement("TEXTBACKGROUNDCOLOR"); e.setAttribute( "red", col.red() ); e.setAttribute( "green", col.green() ); e.setAttribute( "blue", col.blue() ); @@ -351,7 +351,7 @@ void KprKword::convert() if( textElem.attribute("VERTALIGN").toInt()) { - QDomElement e = outdoc.createElement("VERTALIGN"); + TQDomElement e = outdoc.createElement("VERTALIGN"); e.setAttribute( "value", textElem.attribute("VERTALIGN").toInt() ); if ( relative != 0) e.setAttribute( "relativetextsize", relative ); @@ -360,34 +360,34 @@ void KprKword::convert() if( textElem.hasAttribute("shadowtext")) { - QDomElement e = outdoc.createElement("SHADOWTEXT"); + TQDomElement e = outdoc.createElement("SHADOWTEXT"); e.setAttribute( "value", textElem.attribute("shadowtext").toInt() ); outFormatElem.appendChild( e ); } if( textElem.hasAttribute("offsetfrombaseline")) { - QDomElement e = outdoc.createElement("OFFSETFROMBASELINE"); + TQDomElement e = outdoc.createElement("OFFSETFROMBASELINE"); e.setAttribute( "value", textElem.attribute("offsetfrombaseline").toInt() ); outFormatElem.appendChild( e ); } if( textElem.hasAttribute("wordbyword")) { - QDomElement e = outdoc.createElement("WORDBYWORD"); + TQDomElement e = outdoc.createElement("WORDBYWORD"); e.setAttribute( "value", textElem.attribute("wordbyword").toInt() ); outFormatElem.appendChild( e ); } if( textElem.hasAttribute("fontattribute")) { - QDomElement e = outdoc.createElement("FONTATTRIBUTE"); + TQDomElement e = outdoc.createElement("FONTATTRIBUTE"); e.setAttribute( "value", textElem.attribute("fontattribute") ); outFormatElem.appendChild( e ); } if( textElem.hasAttribute("language")) { - QDomElement e = outdoc.createElement("LANGUAGE"); + TQDomElement e = outdoc.createElement("LANGUAGE"); e.setAttribute( "value", textElem.attribute("language") ); outFormatElem.appendChild( e ); } @@ -406,19 +406,19 @@ void KprKword::convert() if ( len > 0 && text[ len - 1 ] == ' ' ) text.truncate( len - 1 ); - QDomElement outTextElem = outdoc.createElement( "TEXT" ); + TQDomElement outTextElem = outdoc.createElement( "TEXT" ); parag.appendChild( outTextElem ); outTextElem.appendChild( outdoc.createTextNode( text ) ); if ( !outFormatsElem.firstChild().isNull() ) // Do we have formats to save ? parag.appendChild( outFormatsElem ); - QDomElement layoutElem = outdoc.createElement( "LAYOUT" ); - parag.appendChild( layoutElem ); - QDomElement nameElem = outdoc.createElement( "NAME" ); - layoutElem.appendChild( nameElem ); - nameElem.setAttribute( "value", isTitle ? titleStyleName : QString("Standard") ); - QDomElement align=outdoc.createElement("FLOW"); + TQDomElement tqlayoutElem = outdoc.createElement( "LAYOUT" ); + parag.appendChild( tqlayoutElem ); + TQDomElement nameElem = outdoc.createElement( "NAME" ); + tqlayoutElem.appendChild( nameElem ); + nameElem.setAttribute( "value", isTitle ? titleStyleName : TQString("Standard") ); + TQDomElement align=outdoc.createElement("FLOW"); if(p.hasAttribute("align")) { switch(p.attribute( "align" ).toInt()) @@ -438,25 +438,25 @@ void KprKword::convert() } } if(!counter.isNull() ) - layoutElem.appendChild( counter ); + tqlayoutElem.appendChild( counter ); if(!indent.isNull()) - layoutElem.appendChild( indent ); + tqlayoutElem.appendChild( indent ); if(!lineSpacing.isNull()) - layoutElem.appendChild( lineSpacing ); + tqlayoutElem.appendChild( lineSpacing ); if(!offset.isNull()) - layoutElem.appendChild( offset); + tqlayoutElem.appendChild( offset); if(!leftBorder.isNull()) - layoutElem.appendChild(leftBorder); + tqlayoutElem.appendChild(leftBorder); if(!rightBorder.isNull()) - layoutElem.appendChild(rightBorder); + tqlayoutElem.appendChild(rightBorder); if(!topBorder.isNull()) - layoutElem.appendChild(topBorder); + tqlayoutElem.appendChild(topBorder); if(!bottomBorder.isNull()) - layoutElem.appendChild(bottomBorder); + tqlayoutElem.appendChild(bottomBorder); if(!align.isNull()) - layoutElem.appendChild(align); + tqlayoutElem.appendChild(align); if(!shadow.isNull()) - layoutElem.appendChild(shadow); + tqlayoutElem.appendChild(shadow); // Only the first parag of the top text object is set to the 'title' style isTitle = false; } diff --git a/filters/kpresenter/kword/kprkword.h b/filters/kpresenter/kword/kprkword.h index 5e0aed2d..0ba4efa5 100644 --- a/filters/kpresenter/kword/kprkword.h +++ b/filters/kpresenter/kword/kprkword.h @@ -21,25 +21,26 @@ #define KPRKWORD_H #include <KoFilter.h> -#include <qdom.h> +#include <tqdom.h> class KprKword : public KoFilter { Q_OBJECT + TQ_OBJECT public: - KprKword(KoFilter *parent, const char *name, const QStringList&); + KprKword(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~KprKword() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); protected: void convert(); - QDomDocument inpdoc; - QDomDocument outdoc; - QDomElement frameset; - QString titleStyleName; - QString titleFont; + TQDomDocument inpdoc; + TQDomDocument outdoc; + TQDomElement frameset; + TQString titleStyleName; + TQString titleFont; }; #endif // KPRKWORD_H diff --git a/filters/kpresenter/libimageexport/imageexport.cpp b/filters/kpresenter/libimageexport/imageexport.cpp index 7611a936..9e933380 100644 --- a/filters/kpresenter/libimageexport/imageexport.cpp +++ b/filters/kpresenter/libimageexport/imageexport.cpp @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include <qpixmap.h> -#include <qpainter.h> +#include <tqpixmap.h> +#include <tqpainter.h> #include <kmessagebox.h> @@ -32,7 +32,7 @@ #include "KPrCanvas.h" #include "imageexport.h" -ImageExport::ImageExport(KoFilter *, const char *, const QStringList&) +ImageExport::ImageExport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -42,8 +42,8 @@ ImageExport::~ImageExport() } -KoFilter::ConversionStatus -ImageExport::convert(const QCString& from, const QCString& to) +KoFilter::ConversiontqStatus +ImageExport::convert(const TQCString& from, const TQCString& to) { KoDocument * document = m_chain->inputDocument(); @@ -70,9 +70,9 @@ ImageExport::convert(const QCString& from, const QCString& to) kdWarning() << "Invalid document mimetype " << kpresenterdoc->mimeType() << endl; return KoFilter::NotImplemented; } - KoPageLayout layoutPage= kpresenterdoc->pageLayout(); - width = int( layoutPage.ptWidth ); - height = int( layoutPage.ptHeight ); + KoPageLayout tqlayoutPage= kpresenterdoc->pageLayout(); + width = int( tqlayoutPage.ptWidth ); + height = int( tqlayoutPage.ptHeight ); if (extraImageAttribute()) { KPrView* view = static_cast<KPrView*>( kpresenterdoc->views().getFirst()); @@ -83,8 +83,8 @@ ImageExport::convert(const QCString& from, const QCString& to) } else //when it's embedded we use just it. { - pixmap = QPixmap(width, height); - QPainter painter(&pixmap); + pixmap = TQPixmap(width, height); + TQPainter painter(&pixmap); kpresenterdoc->paintContent(painter, pixmap.rect(), false); } if( !saveImage( m_chain->outputFile())) diff --git a/filters/kpresenter/libimageexport/imageexport.h b/filters/kpresenter/libimageexport/imageexport.h index e5dfeb81..641a9010 100644 --- a/filters/kpresenter/libimageexport/imageexport.h +++ b/filters/kpresenter/libimageexport/imageexport.h @@ -22,23 +22,24 @@ #include <KoFilter.h> -class QPixmap; +class TQPixmap; class ImageExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - ImageExport(KoFilter *parent, const char *name, const QStringList&); + ImageExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~ImageExport(); - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); virtual bool extraImageAttribute() { return true;}; - virtual bool saveImage( QString fileName) = 0; + virtual bool saveImage( TQString fileName) = 0; virtual const char* exportFormat() = 0; protected: int width; int height; - QPixmap pixmap; + TQPixmap pixmap; }; #endif // __IMAGEEXPORT_H__ diff --git a/filters/kpresenter/magicpoint/mgp2kpr.py b/filters/kpresenter/magicpoint/mgp2kpr.py index 97527471..73751f26 100755 --- a/filters/kpresenter/magicpoint/mgp2kpr.py +++ b/filters/kpresenter/magicpoint/mgp2kpr.py @@ -56,7 +56,7 @@ class MgpImporter: self.__reset() #init properties def __reset(self): - self.alignment="1" #text alignment, left + self.tqalignment="1" #text tqalignment, left self.vgap=1 #line spacing #font properties @@ -84,14 +84,14 @@ class MgpImporter: def __setupDefaultFonts(self,command): tokens=string.split(command,' ') - _key=string.replace(tokens[1], '"', '') - _val=string.replace(tokens[3], '"', '') + _key=string.tqreplace(tokens[1], '"', '') + _val=string.tqreplace(tokens[3], '"', '') self.defFonts[_key]=_val #print self.defFonts def __setFontIndirect(self,command): tokens=string.split(command,' ') - _font=string.replace(tokens[1], '"', '') + _font=string.tqreplace(tokens[1], '"', '') if _font in self.defFonts.keys(): # we have a "default" font, find it in the map self.__setFont(None,self.defFonts[_font]) #print self.defFonts[_font] @@ -99,9 +99,9 @@ class MgpImporter: def __setFont(self,command,font=""): if command: tokens=string.split(command,' ') - font=string.replace(tokens[1], '"', '').strip() #XLFD-like, eg: mincho-medium-r (family-weight-slant) + font=string.tqreplace(tokens[1], '"', '').strip() #XLFD-like, eg: mincho-medium-r (family-weight-slant) - _numDash=string.find(font,"-") #find dashes + _numDash=string.tqfind(font,"-") #find dashes if (_numDash==-1): #mincho self.fontName=font @@ -124,7 +124,7 @@ class MgpImporter: def __setBgColor(self, command): tokens=string.split(command,' ') self.bctype="0" - self.color1=string.replace(tokens[1].strip(),'"', '') #strip quotes and \n + self.color1=string.tqreplace(tokens[1].strip(),'"', '') #strip quotes and \n def __setBgGradient(self, command): tokens=string.split(command,' ') @@ -135,8 +135,8 @@ class MgpImporter: try: dir=tokens[4] - self.color1=string.replace(tokens[6].strip(),'"', '') #strip quotes and \n - self.color2=string.replace(tokens[7].strip(),'"', '') + self.color1=string.tqreplace(tokens[6].strip(),'"', '') #strip quotes and \n + self.color2=string.tqreplace(tokens[7].strip(),'"', '') except: self.bctype="0" self.color1="black" @@ -167,16 +167,16 @@ class MgpImporter: def __setAlign(self,command): tokens=string.split(command,' ') if (tokens[0]=='leftfill'): #justify - self.alignment="8" + self.tqalignment="8" elif (tokens[0]=='right'): - self.alignment="2" + self.tqalignment="2" elif (tokens[0]=='center'): - self.alignment="4" + self.tqalignment="4" else: - self.alignment="1" #left - #print self.alignment + self.tqalignment="1" #left + #print self.tqalignment - def __setBackground(self,parent): + def __setBackground(self,tqparent): pageElem=self.document.createElement("PAGE") elem=self.document.createElement("BACKTYPE") #color @@ -200,9 +200,9 @@ class MgpImporter: elem.setAttribute("color", self.color2) pageElem.appendChild(elem) - parent.appendChild(pageElem) + tqparent.appendChild(pageElem) - def __handlePage(self,parent,bgParent): + def __handlePage(self,tqparent,bgParent): if (self.pageCount!=-1): self.__setBackground(bgParent) #set the background for this page @@ -224,7 +224,7 @@ class MgpImporter: ### para comes here objElem.appendChild(self.textElem) - parent.appendChild(objElem) + tqparent.appendChild(objElem) self.useDefaults=1 self.__reset() @@ -233,7 +233,7 @@ class MgpImporter: indent=-1 pElem=self.document.createElement("P") #paragraph - pElem.setAttribute("align", self.alignment) + pElem.setAttribute("align", self.tqalignment) elem=self.document.createElement("NAME") #style name elem.setAttribute("value", "Standard") ###is this needed at all? @@ -283,7 +283,7 @@ class MgpImporter: if (self.fontItalic!=0): elem.setAttribute("italic", "1") - text=self.document.createTextNode(unicode(line, self.charset, 'ignore')) + text=self.document.createTextNode(tqunicode(line, self.charset, 'ignore')) elem.appendChild(text) pElem.appendChild(elem) self.textElem.appendChild(pElem) @@ -296,14 +296,14 @@ class MgpImporter: def __setTextColor(self,command): tokens=string.split(command,' ') - self.textColor=string.replace(tokens[1].strip(),'"', '') #strip quotes + self.textColor=string.tqreplace(tokens[1].strip(),'"', '') #strip quotes #print self.textColor def __handleBar(self,command): tokens=string.split(command,' ') try: - color=string.replace(tokens[1].strip(),'"', '') #strip quotes and \n + color=string.tqreplace(tokens[1].strip(),'"', '') #strip quotes and \n width=tokens[2].strip()/1000*Y_OFFSET #in per mils of display height start=tokens[3].strip()/100*PAGE_WIDTH #start position percent of display width length=tokens[4].strip()/100*PAGE_WIDTH #length percent of display width @@ -314,7 +314,7 @@ class MgpImporter: length=PAGE_WIDTH - def __setPaper(self,parent): + def __setPaper(self,tqparent): paperElem=self.document.createElement("PAPER") paperElem.setAttribute("ptWidth", str(PAGE_WIDTH)) paperElem.setAttribute("ptHeight", str(Y_OFFSET)) @@ -330,7 +330,7 @@ class MgpImporter: paperElem.appendChild(borderElem) - parent.appendChild(paperElem) + tqparent.appendChild(paperElem) def convert(self, fileIn, fileOut=None): """Parses the Magicpoint document and returns a KPresenter XML document. @@ -357,7 +357,7 @@ class MgpImporter: if (line.startswith('#') or line.startswith('%%')): #skip comments continue elif (line.startswith('%')): #commands - commands=string.split(string.replace(line, '%', ''),',') #list of commands, comma separated, remove '%' + commands=string.split(string.tqreplace(line, '%', ''),',') #list of commands, comma separated, remove '%' for command in commands: command=command.strip().lower() #print command @@ -377,7 +377,7 @@ class MgpImporter: self.__setFontSize(command) elif (command.startswith('left') or command.startswith('center') or - command.startswith('right')): #text alignment + command.startswith('right')): #text tqalignment self.__setAlign(command) elif (command.startswith('charset')): #charset self.__setCharset(command) diff --git a/filters/kpresenter/mng/mngexport.cpp b/filters/kpresenter/mng/mngexport.cpp index f56f4c77..67ff47d5 100644 --- a/filters/kpresenter/mng/mngexport.cpp +++ b/filters/kpresenter/mng/mngexport.cpp @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include <qpixmap.h> -#include <qpainter.h> +#include <tqpixmap.h> +#include <tqpainter.h> #include <kmessagebox.h> @@ -33,7 +33,7 @@ typedef KGenericFactory<MngExport, KoFilter> mngExportFactory; K_EXPORT_COMPONENT_FACTORY( libkpresentermngexport, mngExportFactory( "mngexport" ) ) -MngExport::MngExport(KoFilter *fil, const char *name, const QStringList&lst) +MngExport::MngExport(KoFilter *fil, const char *name, const TQStringList&lst) : ImageExport(fil,name,lst) { } @@ -58,7 +58,7 @@ bool MngExport::extraImageAttribute() } -bool MngExport::saveImage( QString fileName) +bool MngExport::saveImage( TQString fileName) { bool ret = pixmap.save( fileName, "MNG" ); // Save the image. diff --git a/filters/kpresenter/mng/mngexport.h b/filters/kpresenter/mng/mngexport.h index c479b1e0..6e5f9d4a 100644 --- a/filters/kpresenter/mng/mngexport.h +++ b/filters/kpresenter/mng/mngexport.h @@ -25,11 +25,12 @@ class MngExport : public ImageExport { Q_OBJECT + TQ_OBJECT public: - MngExport(KoFilter *parent, const char *name, const QStringList&); + MngExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~MngExport(); - virtual bool saveImage( QString fileName); + virtual bool saveImage( TQString fileName); virtual bool extraImageAttribute(); virtual const char * exportFormat(); }; diff --git a/filters/kpresenter/ooimpress/ooimpressexport.cc b/filters/kpresenter/ooimpress/ooimpressexport.cc index 27d0781d..3e54a05f 100644 --- a/filters/kpresenter/ooimpress/ooimpressexport.cc +++ b/filters/kpresenter/ooimpress/ooimpressexport.cc @@ -19,9 +19,9 @@ #include "ooimpressexport.h" -#include <qdom.h> -#include <qfile.h> -#include <qdatetime.h> +#include <tqdom.h> +#include <tqfile.h> +#include <tqdatetime.h> #include <kdebug.h> #include <kgenericfactory.h> @@ -33,7 +33,7 @@ typedef KGenericFactory<OoImpressExport, KoFilter> OoImpressExportFactory; K_EXPORT_COMPONENT_FACTORY( libooimpressexport, OoImpressExportFactory( "kofficefilters" ) ) -OoImpressExport::OoImpressExport( KoFilter *, const char *, const QStringList & ) +OoImpressExport::OoImpressExport( KoFilter *, const char *, const TQStringList & ) : KoFilter() , m_currentPage( 0 ) , m_objectIndex( 0 ) @@ -54,8 +54,8 @@ OoImpressExport::~OoImpressExport() delete m_storeinp; } -KoFilter::ConversionStatus OoImpressExport::convert( const QCString & from, - const QCString & to ) +KoFilter::ConversiontqStatus OoImpressExport::convert( const TQCString & from, + const TQCString & to ) { kdDebug(30518) << "Entering Ooimpress Export filter: " << from << " - " << to << endl; @@ -66,13 +66,13 @@ KoFilter::ConversionStatus OoImpressExport::convert( const QCString & from, } // read in the KPresenter file - KoFilter::ConversionStatus preStatus = openFile(); + KoFilter::ConversiontqStatus pretqStatus = openFile(); - if ( preStatus != KoFilter::OK ) - return preStatus; + if ( pretqStatus != KoFilter::OK ) + return pretqStatus; - QDomImplementation impl; - QDomDocument meta( impl.createDocumentType( "office:document-meta", + TQDomImplementation impl; + TQDomDocument meta( impl.createDocumentType( "office:document-meta", "-//OpenOffice.org//DTD OfficeDocument 1.0//EN", "office.dtd" ) ); @@ -93,12 +93,12 @@ KoFilter::ConversionStatus OoImpressExport::convert( const QCString & from, return KoFilter::CreationError; } - QCString metaString = meta.toCString(); + TQCString metaString = meta.toCString(); //kdDebug(30518) << "meta :" << metaString << endl; m_storeout->write( metaString , metaString.length() ); m_storeout->close(); - QDomDocument content( impl.createDocumentType( "office:document-content", + TQDomDocument content( impl.createDocumentType( "office:document-content", "-//OpenOffice.org//DTD OfficeDocument 1.0//EN", "office.dtd" ) ); @@ -114,12 +114,12 @@ KoFilter::ConversionStatus OoImpressExport::convert( const QCString & from, return KoFilter::CreationError; } - QCString contentString = content.toCString(); + TQCString contentString = content.toCString(); //kdDebug(30518) << "content :" << contentString << endl; m_storeout->write( contentString , contentString.length() ); m_storeout->close(); - QDomDocument settings( impl.createDocumentType( "office:document-content", + TQDomDocument settings( impl.createDocumentType( "office:document-content", "-//OpenOffice.org//DTD OfficeDocument 1.0//EN", "office.dtd" ) ); @@ -132,13 +132,13 @@ KoFilter::ConversionStatus OoImpressExport::convert( const QCString & from, return KoFilter::CreationError; } - QCString settingsString = settings.toCString(); + TQCString settingsString = settings.toCString(); //kdDebug(30518) << "content :" << settingsString << endl; m_storeout->write( settingsString , settingsString.length() ); m_storeout->close(); - QDomDocument styles( impl.createDocumentType( "office:document-styles", + TQDomDocument styles( impl.createDocumentType( "office:document-styles", "-//OpenOffice.org//DTD OfficeDocument 1.0//EN", "office.dtd" ) ); @@ -151,12 +151,12 @@ KoFilter::ConversionStatus OoImpressExport::convert( const QCString & from, return KoFilter::CreationError; } - QCString stylesString = styles.toCString(); + TQCString stylesString = styles.toCString(); //kdDebug(30518) << "styles :" << stylesString << endl; m_storeout->write( stylesString , stylesString.length() ); m_storeout->close(); - QDomDocument manifest( impl.createDocumentType( "manifest:manifest", + TQDomDocument manifest( impl.createDocumentType( "manifest:manifest", "-//OpenOffice.org//DTD Manifest 1.0//EN", "Manifest.dtd" ) ); @@ -170,7 +170,7 @@ KoFilter::ConversionStatus OoImpressExport::convert( const QCString & from, return KoFilter::CreationError; } - QCString manifestString = manifest.toCString(); + TQCString manifestString = manifest.toCString(); //kdDebug(30518) << "manifest :" << manifestString << endl; m_storeout->write( manifestString , manifestString.length() ); m_storeout->close(); @@ -178,7 +178,7 @@ KoFilter::ConversionStatus OoImpressExport::convert( const QCString & from, return KoFilter::OK; } -KoFilter::ConversionStatus OoImpressExport::openFile() +KoFilter::ConversiontqStatus OoImpressExport::openFile() { m_storeinp = KoStore::createStore( m_chain->inputFile(), KoStore::Read ); @@ -210,31 +210,31 @@ KoFilter::ConversionStatus OoImpressExport::openFile() return KoFilter::OK; } -void OoImpressExport::createDocumentMeta( QDomDocument & docmeta ) +void OoImpressExport::createDocumentMeta( TQDomDocument & docmeta ) { docmeta.appendChild( docmeta.createProcessingInstruction( "xml","version=\"1.0\" encoding=\"UTF-8\"" ) ); - QDomElement content = docmeta.createElement( "office:document-meta" ); + TQDomElement content = docmeta.createElement( "office:document-meta" ); content.setAttribute( "xmlns:office", "http://openoffice.org/2000/office" ); content.setAttribute( "xmlns:xlink", "http://www.w3.org/1999/xlink" ); content.setAttribute( "xmlns:dc", "http://purl.org/dc/elements/1.1/" ); content.setAttribute( "xmlns:meta", "http://openoffice.org/2000/meta" ); content.setAttribute( "office:version", "1.0" ); - QDomNode meta = docmeta.createElement( "office:meta" ); + TQDomNode meta = docmeta.createElement( "office:meta" ); - QDomElement generator = docmeta.createElement( "meta:generator" ); + TQDomElement generator = docmeta.createElement( "meta:generator" ); generator.appendChild( docmeta.createTextNode( "KPresenter 1.5" ) ); meta.appendChild( generator ); - QDomNode i = m_documentinfo.namedItem( "document-info" ); + TQDomNode i = m_documentinfo.namedItem( "document-info" ); if ( !i.isNull() ) { - QDomNode n = i.namedItem( "author" ).namedItem( "full-name" ); + TQDomNode n = i.namedItem( "author" ).namedItem( "full-name" ); if ( !n.isNull() ) { - QDomElement fullName = n.toElement(); - QDomElement creator = docmeta.createElement( "meta:initial-creator" ); + TQDomElement fullName = n.toElement(); + TQDomElement creator = docmeta.createElement( "meta:initial-creator" ); creator.appendChild( docmeta.createTextNode( fullName.text() ) ); meta.appendChild( creator ); @@ -245,16 +245,16 @@ void OoImpressExport::createDocumentMeta( QDomDocument & docmeta ) n = i.namedItem( "about" ).namedItem( "abstract" ); if ( !n.isNull() ) { - QDomElement user = docmeta.createElement( "dc:description" ); + TQDomElement user = docmeta.createElement( "dc:description" ); user.appendChild( n.firstChild() ); meta.appendChild( user ); } n = i.namedItem( "about" ).namedItem( "keyword" ); if ( !n.isNull() ) { - QDomElement text = n.toElement(); - QDomElement key = docmeta.createElement( "meta:keywords" ); - QDomElement keyword = docmeta.createElement( "meta:keyword" ); + TQDomElement text = n.toElement(); + TQDomElement key = docmeta.createElement( "meta:keywords" ); + TQDomElement keyword = docmeta.createElement( "meta:keyword" ); key.appendChild( keyword ); keyword.appendChild( docmeta.createTextNode( text.text() ) ); meta.appendChild( key ); @@ -262,22 +262,22 @@ void OoImpressExport::createDocumentMeta( QDomDocument & docmeta ) n = i.namedItem( "about" ).namedItem( "subject" ); if ( !n.isNull() ) { - QDomElement text = n.toElement(); - QDomElement subjet = docmeta.createElement( "dc:subject" ); + TQDomElement text = n.toElement(); + TQDomElement subjet = docmeta.createElement( "dc:subject" ); subjet.appendChild( docmeta.createTextNode( text.text() ) ); meta.appendChild( subjet ); } n = i.namedItem( "about" ).namedItem( "title" ); if ( !n.isNull() ) { - QDomElement text = n.toElement(); - QDomElement title = docmeta.createElement( "dc:title" ); + TQDomElement text = n.toElement(); + TQDomElement title = docmeta.createElement( "dc:title" ); title.appendChild( docmeta.createTextNode( text.text() ) ); meta.appendChild( title ); } } -// QDomElement statistic = docmeta.createElement( "meta:document-statistic" ); +// TQDomElement statistic = docmeta.createElement( "meta:document-statistic" ); // statistic.setAttribute( "meta:object-count", 0 ); // meta.appendChild( data ); @@ -285,11 +285,11 @@ void OoImpressExport::createDocumentMeta( QDomDocument & docmeta ) docmeta.appendChild( content ); } -void OoImpressExport::createDocumentStyles( QDomDocument & docstyles ) +void OoImpressExport::createDocumentStyles( TQDomDocument & docstyles ) { docstyles.appendChild( docstyles.createProcessingInstruction( "xml","version=\"1.0\" encoding=\"UTF-8\"" ) ); - QDomElement content = docstyles.createElement( "office:document-content" ); + TQDomElement content = docstyles.createElement( "office:document-content" ); content.setAttribute( "xmlns:office", "http://openoffice.org/2000/office" ); content.setAttribute( "xmlns:style", "http://openoffice.org/2000/style" ); content.setAttribute( "xmlns:text", "http://openoffice.org/2000/text" ); @@ -307,45 +307,45 @@ void OoImpressExport::createDocumentStyles( QDomDocument & docstyles ) content.setAttribute( "office:version", "1.0" ); // order important here! - QDomElement styles = docstyles.createElement( "office:styles" ); + TQDomElement styles = docstyles.createElement( "office:styles" ); m_styleFactory.addOfficeStyles( docstyles, styles ); content.appendChild( styles ); - QDomElement automatic = docstyles.createElement( "office:automatic-styles" ); + TQDomElement automatic = docstyles.createElement( "office:automatic-styles" ); m_styleFactory.addOfficeAutomatic( docstyles, automatic ); content.appendChild( automatic ); - QDomElement master = docstyles.createElement( "office:master-styles" ); + TQDomElement master = docstyles.createElement( "office:master-styles" ); m_styleFactory.addOfficeMaster( docstyles, master ); content.appendChild( master ); docstyles.appendChild( content ); } -void OoImpressExport::createDocumentSettings( QDomDocument & docsetting ) +void OoImpressExport::createDocumentSettings( TQDomDocument & docsetting ) { docsetting.appendChild( docsetting.createProcessingInstruction( "xml","version=\"1.0\" encoding=\"UTF-8\"" ) ); - QDomElement setting = docsetting.createElement( "office:document-settings" ); + TQDomElement setting = docsetting.createElement( "office:document-settings" ); setting.setAttribute( "xmlns:office", "http://openoffice.org/2000/office"); setting.setAttribute( "xmlns:config", "http://openoffice.org/2001/config" ); setting.setAttribute( "office:class", "presentation" ); setting.setAttribute( "office:version", "1.0" ); - QDomElement begin = docsetting.createElement( "office:settings" ); + TQDomElement begin = docsetting.createElement( "office:settings" ); - QDomElement configItem = docsetting.createElement("config:config-item-set" ); + TQDomElement configItem = docsetting.createElement("config:config-item-set" ); configItem.setAttribute( "config:name", "view-settings" ); - QDomElement mapIndexed = docsetting.createElement( "config:config-item-map-indexed" ); + TQDomElement mapIndexed = docsetting.createElement( "config:config-item-map-indexed" ); mapIndexed.setAttribute("config:name", "Views" ); configItem.appendChild( mapIndexed ); //<config:config-item-map-indexed config:name="Views"> - QDomElement mapItem = docsetting.createElement("config:config-item-map-entry" ); + TQDomElement mapItem = docsetting.createElement("config:config-item-map-entry" ); - QDomElement attribute = docsetting.createElement("config:config-item" ); + TQDomElement attribute = docsetting.createElement("config:config-item" ); attribute.setAttribute( "config:name", "SnapLinesDrawing" ); attribute.setAttribute( "config:type", "string" ); attribute.appendChild( docsetting.createTextNode( m_helpLine ) ); @@ -363,7 +363,7 @@ void OoImpressExport::createDocumentSettings( QDomDocument & docsetting ) attribute = docsetting.createElement("config:config-item" ); attribute.setAttribute( "config:name", "GridFineWidth" ); attribute.setAttribute( "config:type", "int" ); - attribute.appendChild( docsetting.createTextNode( QString::number( ( int ) ( KoUnit::toMM( ( m_gridX ) )*100 ) ) ) ); + attribute.appendChild( docsetting.createTextNode( TQString::number( ( int ) ( KoUnit::toMM( ( m_gridX ) )*100 ) ) ) ); mapItem.appendChild( attribute ); } @@ -372,14 +372,14 @@ void OoImpressExport::createDocumentSettings( QDomDocument & docsetting ) attribute = docsetting.createElement("config:config-item" ); attribute.setAttribute( "config:name", "GridFineHeight" ); attribute.setAttribute( "config:type", "int" ); - attribute.appendChild( docsetting.createTextNode( QString::number( ( int ) ( KoUnit::toMM( ( m_gridY ) )*100 ) ) ) ); + attribute.appendChild( docsetting.createTextNode( TQString::number( ( int ) ( KoUnit::toMM( ( m_gridY ) )*100 ) ) ) ); mapItem.appendChild( attribute ); } attribute = docsetting.createElement("config:config-item" ); attribute.setAttribute( "config:name", "SelectedPage" ); attribute.setAttribute( "config:type", "short" ); - attribute.appendChild( docsetting.createTextNode( QString::number( m_activePage ) ) ); + attribute.appendChild( docsetting.createTextNode( TQString::number( m_activePage ) ) ); mapItem.appendChild( attribute ); @@ -394,11 +394,11 @@ void OoImpressExport::createDocumentSettings( QDomDocument & docsetting ) } -void OoImpressExport::createDocumentContent( QDomDocument & doccontent ) +void OoImpressExport::createDocumentContent( TQDomDocument & doccontent ) { doccontent.appendChild( doccontent.createProcessingInstruction( "xml","version=\"1.0\" encoding=\"UTF-8\"" ) ); - QDomElement content = doccontent.createElement( "office:document-content" ); + TQDomElement content = doccontent.createElement( "office:document-content" ); content.setAttribute( "xmlns:office", "http://openoffice.org/2000/office"); content.setAttribute( "xmlns:style", "http://openoffice.org/2000/style" ); content.setAttribute( "xmlns:text", "http://openoffice.org/2000/text" ); @@ -417,32 +417,32 @@ void OoImpressExport::createDocumentContent( QDomDocument & doccontent ) content.setAttribute( "office:class", "presentation" ); content.setAttribute( "office:version", "1.0" ); - QDomElement script = doccontent.createElement( "office:script" ); + TQDomElement script = doccontent.createElement( "office:script" ); content.appendChild( script ); m_styles = doccontent.createElement( "office:automatic-styles" ); content.appendChild( m_styles ); - QDomElement body = doccontent.createElement( "office:body" ); + TQDomElement body = doccontent.createElement( "office:body" ); exportBody( doccontent, body ); content.appendChild( body ); doccontent.appendChild( content ); } -void OoImpressExport::createDocumentManifest( QDomDocument & docmanifest ) +void OoImpressExport::createDocumentManifest( TQDomDocument & docmanifest ) { docmanifest.appendChild( docmanifest.createProcessingInstruction( "xml","version=\"1.0\" encoding=\"UTF-8\"" ) ); - QDomElement manifest = docmanifest.createElement( "manifest:manifest" ); + TQDomElement manifest = docmanifest.createElement( "manifest:manifest" ); manifest.setAttribute( "xmlns:manifest", "http://openoffice.org/2001/manifest" ); - QDomElement entry = docmanifest.createElement( "manifest:file-entry" ); + TQDomElement entry = docmanifest.createElement( "manifest:file-entry" ); entry.setAttribute( "manifest:media-type", "application/vnd.sun.xml.impress" ); entry.setAttribute( "manifest:full-path", "/" ); manifest.appendChild( entry ); - QMap<QString, QString>::Iterator it; + TQMap<TQString, TQString>::Iterator it; for ( it = m_pictureLst.begin(); it != m_pictureLst.end(); ++it ) { entry = docmanifest.createElement( "manifest:file-entry" ); @@ -474,7 +474,7 @@ void OoImpressExport::createDocumentManifest( QDomDocument & docmanifest ) docmanifest.appendChild( manifest ); } -QString OoImpressExport::pictureKey( QDomElement &elem ) +TQString OoImpressExport::pictureKey( TQDomElement &elem ) { // Default date/time is the *nix epoch: 1970-01-01 00:00:00,000 int year=1970, month=1, day=1; @@ -496,20 +496,20 @@ QString OoImpressExport::pictureKey( QDomElement &elem ) if( elem.hasAttribute( "msec" ) ) msec=elem.attribute( "msec" ).toInt(); } - QDateTime key; - key.setDate( QDate( year, month, day ) ); - key.setTime( QTime( hour, minute, second, msec ) ); + TQDateTime key; + key.setDate( TQDate( year, month, day ) ); + key.setTime( TQTime( hour, minute, second, msec ) ); return key.toString(); } -void OoImpressExport::createPictureList( QDomNode &pictures ) +void OoImpressExport::createPictureList( TQDomNode &pictures ) { pictures = pictures.firstChild(); for( ; !pictures.isNull(); pictures = pictures.nextSibling() ) { if ( pictures.isElement() ) { - QDomElement element = pictures.toElement(); + TQDomElement element = pictures.toElement(); if ( element.tagName() == "KEY" ) { //kdDebug(30518)<<"element.attribute( name ) :"<<element.attribute( "name" )<<endl; @@ -521,9 +521,9 @@ void OoImpressExport::createPictureList( QDomNode &pictures ) } } -void OoImpressExport::createAttribute( QDomNode &attributeValue ) +void OoImpressExport::createAttribute( TQDomNode &attributeValue ) { - QDomElement elem = attributeValue.toElement(); + TQDomElement elem = attributeValue.toElement(); if(elem.hasAttribute("activePage")) m_activePage=elem.attribute("activePage").toInt(); if(elem.hasAttribute("gridx")) @@ -534,10 +534,10 @@ void OoImpressExport::createAttribute( QDomNode &attributeValue ) m_snapToGrid = (bool)elem.attribute("snaptogrid").toInt(); } -void OoImpressExport::createHelpLine( QDomNode &helpline ) +void OoImpressExport::createHelpLine( TQDomNode &helpline ) { helpline = helpline.firstChild(); - QDomElement helplines; + TQDomElement helplines; for( ; !helpline.isNull(); helpline = helpline.nextSibling() ) { if ( helpline.isElement() ) @@ -546,19 +546,19 @@ void OoImpressExport::createHelpLine( QDomNode &helpline ) if ( helplines.tagName()=="Vertical" ) { int tmpX = ( int ) ( KoUnit::toMM( helplines.attribute("value").toDouble() )*100 ); - m_helpLine+="V"+QString::number( tmpX ); + m_helpLine+="V"+TQString::number( tmpX ); } else if ( helplines.tagName()=="Horizontal" ) { int tmpY = ( int ) ( KoUnit::toMM( helplines.attribute("value").toDouble() )*100 ); - m_helpLine+="H"+QString::number( tmpY ); + m_helpLine+="H"+TQString::number( tmpY ); } else if ( helplines.tagName()=="HelpPoint" ) { - QString str( "P%1,%2" ); + TQString str( "P%1,%2" ); int tmpX = ( int ) ( KoUnit::toMM( helplines.attribute("posX").toDouble() )*100 ); int tmpY = ( int ) ( KoUnit::toMM( helplines.attribute("posY").toDouble() )*100 ); - m_helpLine+=str.arg( QString::number( tmpX ) ).arg( QString::number( tmpY ) ); + m_helpLine+=str.tqarg( TQString::number( tmpX ) ).tqarg( TQString::number( tmpY ) ); } } } @@ -566,26 +566,26 @@ void OoImpressExport::createHelpLine( QDomNode &helpline ) } -void OoImpressExport::exportBody( QDomDocument & doccontent, QDomElement & body ) +void OoImpressExport::exportBody( TQDomDocument & doccontent, TQDomElement & body ) { - QDomNode doc = m_maindoc.namedItem( "DOC" ); - QDomNode paper = doc.namedItem( "PAPER" ); - QDomNode background = doc.namedItem( "BACKGROUND" ); - QDomNode header = doc.namedItem( "HEADER" ); - QDomNode footer = doc.namedItem( "FOOTER" ); - QDomNode titles = doc.namedItem( "PAGETITLES" ); - QDomNode notes = doc.namedItem( "PAGENOTES" ); - QDomNode objects = doc.namedItem( "OBJECTS" ); - QDomNode pictures = doc.namedItem( "PICTURES" ); - QDomNode sounds = doc.namedItem( "SOUNDS" ); - QDomNode helpline = doc.namedItem( "HELPLINES" ); - QDomNode attributeValue = doc.namedItem( "ATTRIBUTES" ); - QDomNode infiniLoop = doc.namedItem( "INFINITLOOP" ); - QDomNode manualSwitch = doc.namedItem( "MANUALSWITCH" ); - QDomNode customSlideShow = doc.namedItem( "CUSTOMSLIDESHOWCONFIG" ); - QDomNode customSlideShowDefault = doc.namedItem( "DEFAULTCUSTOMSLIDESHOWNAME" ); - - QDomNode bgpage = background.firstChild(); + TQDomNode doc = m_maindoc.namedItem( "DOC" ); + TQDomNode paper = doc.namedItem( "PAPER" ); + TQDomNode background = doc.namedItem( "BACKGROUND" ); + TQDomNode header = doc.namedItem( "HEADER" ); + TQDomNode footer = doc.namedItem( "FOOTER" ); + TQDomNode titles = doc.namedItem( "PAGETITLES" ); + TQDomNode notes = doc.namedItem( "PAGENOTES" ); + TQDomNode objects = doc.namedItem( "OBJECTS" ); + TQDomNode pictures = doc.namedItem( "PICTURES" ); + TQDomNode sounds = doc.namedItem( "SOUNDS" ); + TQDomNode helpline = doc.namedItem( "HELPLINES" ); + TQDomNode attributeValue = doc.namedItem( "ATTRIBUTES" ); + TQDomNode infiniLoop = doc.namedItem( "INFINITLOOP" ); + TQDomNode manualSwitch = doc.namedItem( "MANUALSWITCH" ); + TQDomNode customSlideShow = doc.namedItem( "CUSTOMSLIDESHOWCONFIG" ); + TQDomNode customSlideShowDefault = doc.namedItem( "DEFAULTCUSTOMSLIDESHOWNAME" ); + + TQDomNode bgpage = background.firstChild(); createPictureList( pictures ); @@ -594,25 +594,25 @@ void OoImpressExport::exportBody( QDomDocument & doccontent, QDomElement & body createAttribute( attributeValue ); // store the paper settings - QDomElement p = paper.toElement(); + TQDomElement p = paper.toElement(); m_masterPageStyle = m_styleFactory.createPageMasterStyle( p ); m_pageHeight = p.attribute( "ptHeight" ).toFloat(); m_currentPage = 1; // parse all pages - QDomNode note = notes.firstChild(); - for ( QDomNode title = titles.firstChild(); !title.isNull() && !note.isNull(); + TQDomNode note = notes.firstChild(); + for ( TQDomNode title = titles.firstChild(); !title.isNull() && !note.isNull(); title = title.nextSibling(), note = note.nextSibling() ) { // create the page style and ignore the fact that there may // be less backgrounds than pages - QDomElement bg = bgpage.toElement(); - QString ps = m_styleFactory.createPageStyle( bg ); + TQDomElement bg = bgpage.toElement(); + TQString ps = m_styleFactory.createPageStyle( bg ); bgpage = bgpage.nextSibling(); - QDomElement t = title.toElement(); - QDomElement drawPage = doccontent.createElement( "draw:page" ); + TQDomElement t = title.toElement(); + TQDomElement drawPage = doccontent.createElement( "draw:page" ); drawPage.setAttribute( "draw:name", t.attribute( "title" ) ); drawPage.setAttribute( "draw:style-name", ps ); drawPage.setAttribute( "draw:id", m_currentPage ); @@ -620,7 +620,7 @@ void OoImpressExport::exportBody( QDomDocument & doccontent, QDomElement & body appendObjects( doccontent, objects, drawPage ); - QDomElement noteElement = note.toElement(); + TQDomElement noteElement = note.toElement(); appendNote( doccontent, noteElement, drawPage ); body.appendChild( drawPage ); m_currentPage++; @@ -643,7 +643,7 @@ void OoImpressExport::exportBody( QDomDocument & doccontent, QDomElement & body } if ( infiniLoopValue != -1 || manualSwitchValue != -1 || !customSlideShowDefault.isNull()) { - QDomElement settings = doccontent.createElement( "presentation:settings" ); + TQDomElement settings = doccontent.createElement( "presentation:settings" ); if ( infiniLoopValue !=-1 ) settings.setAttribute( "presentation:force-manual", ( manualSwitchValue==1 ) ? "true" : "false" ); if ( manualSwitchValue != -1 ) @@ -653,13 +653,13 @@ void OoImpressExport::exportBody( QDomDocument & doccontent, QDomElement & body if ( !customSlideShow.isNull() ) { - for ( QDomNode customPage = customSlideShow.firstChild(); !customPage.isNull(); + for ( TQDomNode customPage = customSlideShow.firstChild(); !customPage.isNull(); customPage = customPage.nextSibling() ) { - QDomElement show = customPage.toElement(); + TQDomElement show = customPage.toElement(); if ( !show.isNull() && show.tagName()=="CUSTOMSLIDESHOW" ) { - QDomElement showElement = doccontent.createElement( "presentation:show" ); + TQDomElement showElement = doccontent.createElement( "presentation:show" ); showElement.setAttribute( "presentation:name",show.attribute( "name" ) ); showElement.setAttribute( "presentation:pages",show.attribute( "pages" ) ); settings.appendChild( showElement ); @@ -671,16 +671,16 @@ void OoImpressExport::exportBody( QDomDocument & doccontent, QDomElement & body } -void OoImpressExport::appendObjects(QDomDocument & doccontent, QDomNode &objects, QDomElement &drawPage) +void OoImpressExport::appendObjects(TQDomDocument & doccontent, TQDomNode &objects, TQDomElement &drawPage) { // I am not sure if objects are always stored sorted so I parse all // of them to find the ones belonging to a certain page. - for ( QDomNode object = objects.firstChild(); !object.isNull(); + for ( TQDomNode object = objects.firstChild(); !object.isNull(); object = object.nextSibling() ) { - QDomElement o = object.toElement(); + TQDomElement o = object.toElement(); - QDomElement orig = o.namedItem( "ORIG" ).toElement(); + TQDomElement orig = o.namedItem( "ORIG" ).toElement(); float y = orig.attribute( "y" ).toFloat(); if ( y < m_pageHeight * ( m_currentPage - 1 ) || @@ -725,7 +725,7 @@ void OoImpressExport::appendObjects(QDomDocument & doccontent, QDomNode &objects case 12: // polyline appendPolyline( doccontent, o, drawPage ); break; - case 13: //OT_QUADRICBEZIERCURVE = 13 + case 13: //OT_TQUADRICBEZIERCURVE = 13 case 14: //OT_CUBICBEZIERCURVE = 14 //todo // "draw:path" @@ -740,29 +740,29 @@ void OoImpressExport::appendObjects(QDomDocument & doccontent, QDomNode &objects } -void OoImpressExport::appendGroupObject( QDomDocument & doc, QDomElement & source, QDomElement & target ) +void OoImpressExport::appendGroupObject( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ) { - QDomElement groupElement = doc.createElement( "draw:g" ); - QDomNode objects = source.namedItem( "OBJECTS" ); + TQDomElement groupElement = doc.createElement( "draw:g" ); + TQDomNode objects = source.namedItem( "OBJECTS" ); appendObjects( doc, objects, groupElement); target.appendChild( groupElement ); } -void OoImpressExport::appendNote( QDomDocument & doc, QDomElement & source, QDomElement & target ) +void OoImpressExport::appendNote( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ) { - QString noteText = source.attribute("note"); + TQString noteText = source.attribute("note"); //kdDebug(30518)<<"noteText :"<<noteText<<endl; if ( noteText.isEmpty() ) return; - QDomElement noteElement = doc.createElement( "presentation:notes" ); - QDomElement noteTextBox = doc.createElement( "draw:text-box" ); + TQDomElement noteElement = doc.createElement( "presentation:notes" ); + TQDomElement noteTextBox = doc.createElement( "draw:text-box" ); //TODO : add draw:text-box size : - //<draw:text-box draw:style-name="gr2" draw:text-style-name="P2" draw:layer="layout" svg:width="13.336cm" svg:height="56.288cm" svg:x="-0.54cm" svg:y="-14.846cm"> + //<draw:text-box draw:style-name="gr2" draw:text-style-name="P2" draw:layer="tqlayout" svg:width="13.336cm" svg:height="56.288cm" svg:x="-0.54cm" svg:y="-14.846cm"> - QStringList text = QStringList::split( "\n", noteText ); - for ( QStringList::Iterator it = text.begin(); it != text.end(); ++it ) { - QDomElement tmp = doc.createElement( "text:p" ); + TQStringList text = TQStringList::split( "\n", noteText ); + for ( TQStringList::Iterator it = text.begin(); it != text.end(); ++it ) { + TQDomElement tmp = doc.createElement( "text:p" ); tmp.appendChild( doc.createTextNode( *it ) ); noteTextBox.appendChild( tmp ); } @@ -770,64 +770,64 @@ void OoImpressExport::appendNote( QDomDocument & doc, QDomElement & source, QDom target.appendChild( noteElement ); } -void OoImpressExport::appendTextbox( QDomDocument & doc, QDomElement & source, QDomElement & target ) +void OoImpressExport::appendTextbox( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ) { - QDomElement textbox = doc.createElement( "draw:text-box" ); + TQDomElement textbox = doc.createElement( "draw:text-box" ); - QDomNode textobject = source.namedItem( "TEXTOBJ" ); + TQDomNode textobject = source.namedItem( "TEXTOBJ" ); // create the graphic style - QString gs = m_styleFactory.createGraphicStyle( source ); + TQString gs = m_styleFactory.createGraphicStyle( source ); textbox.setAttribute( "draw:style-name", gs ); - // set the geometry + // set the tqgeometry set2DGeometry( source, textbox ); // parse every paragraph - for ( QDomNode paragraph = textobject.firstChild(); !paragraph.isNull(); + for ( TQDomNode paragraph = textobject.firstChild(); !paragraph.isNull(); paragraph = paragraph.nextSibling() ) { - QDomElement p = paragraph.toElement(); + TQDomElement p = paragraph.toElement(); appendParagraph( doc, p, textbox ); } target.appendChild( textbox ); } -void OoImpressExport::appendParagraph( QDomDocument & doc, QDomElement & source, QDomElement & target ) +void OoImpressExport::appendParagraph( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ) { - QDomElement paragraph = doc.createElement( "text:p" ); + TQDomElement paragraph = doc.createElement( "text:p" ); // create the paragraph style - QString ps = m_styleFactory.createParagraphStyle( source ); + TQString ps = m_styleFactory.createParagraphStyle( source ); paragraph.setAttribute( "text:style-name", ps ); // parse every text element - for ( QDomNode text = source.firstChild(); !text.isNull(); + for ( TQDomNode text = source.firstChild(); !text.isNull(); text = text.nextSibling() ) { if ( text.nodeName() == "TEXT" ) { - QDomElement t = text.toElement(); + TQDomElement t = text.toElement(); appendText( doc, t, paragraph ); } } // take care of lists - QDomNode counter = source.namedItem( "COUNTER" ); + TQDomNode counter = source.namedItem( "COUNTER" ); if ( !counter.isNull() ) { - QDomElement c = counter.toElement(); + TQDomElement c = counter.toElement(); int type = c.attribute( "type" ).toInt(); int level = 1; if ( c.hasAttribute( "depth" ) ) level = c.attribute( "depth" ).toInt() + 1; - QDomElement endOfList = target; + TQDomElement endOfList = target; for ( int l = 0; l < level; l++ ) { - QDomElement list; + TQDomElement list; if ( type == 1 ) { list = doc.createElement( "text:ordered-list" ); @@ -839,11 +839,11 @@ void OoImpressExport::appendParagraph( QDomDocument & doc, QDomElement & source, if ( l == 0 ) { // create the list style - QString ls = m_styleFactory.createListStyle( c ); + TQString ls = m_styleFactory.createListStyle( c ); list.setAttribute( "text:style-name", ls ); } - QDomElement item = doc.createElement( "text:list-item" ); + TQDomElement item = doc.createElement( "text:list-item" ); list.appendChild( item ); endOfList.appendChild( list ); endOfList = item; @@ -855,28 +855,28 @@ void OoImpressExport::appendParagraph( QDomDocument & doc, QDomElement & source, target.appendChild( paragraph ); } -void OoImpressExport::appendText( QDomDocument & doc, QDomElement & source, QDomElement & target ) +void OoImpressExport::appendText( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ) { - QDomElement textspan = doc.createElement( "text:span" ); + TQDomElement textspan = doc.createElement( "text:span" ); // create the text style - QString ts = m_styleFactory.createTextStyle( source ); + TQString ts = m_styleFactory.createTextStyle( source ); textspan.setAttribute( "text:style-name", ts ); textspan.appendChild( doc.createTextNode( source.text() ) ); target.appendChild( textspan ); } -void OoImpressExport::appendPicture( QDomDocument & doc, QDomElement & source, QDomElement & target ) +void OoImpressExport::appendPicture( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ) { - QDomElement image = doc.createElement( "draw:image" ); + TQDomElement image = doc.createElement( "draw:image" ); // create the graphic style - QString gs = m_styleFactory.createGraphicStyle( source ); + TQString gs = m_styleFactory.createGraphicStyle( source ); image.setAttribute( "draw:style-name", gs ); - QDomElement key = source.namedItem( "KEY" ).toElement(); + TQDomElement key = source.namedItem( "KEY" ).toElement(); - QString pictureName = QString( "Picture/Picture%1" ).arg( m_pictureIndex ); + TQString pictureName = TQString( "Picture/Picture%1" ).tqarg( m_pictureIndex ); image.setAttribute( "xlink:type", "simple" ); image.setAttribute( "xlink:show", "embed" ); @@ -884,12 +884,12 @@ void OoImpressExport::appendPicture( QDomDocument & doc, QDomElement & source, Q if ( !key.isNull() ) { - QString str = pictureKey( key ); - QString returnstr = m_kpresenterPictureLst[str]; - const int pos=returnstr.findRev('.'); + TQString str = pictureKey( key ); + TQString returnstr = m_kpresenterPictureLst[str]; + const int pos=returnstr.tqfindRev('.'); if (pos!=-1) { - const QString extension( returnstr.mid(pos+1) ); + const TQString extension( returnstr.mid(pos+1) ); pictureName +="."+extension; } @@ -897,7 +897,7 @@ void OoImpressExport::appendPicture( QDomDocument & doc, QDomElement & source, Q { if ( m_storeout->open( pictureName ) ) { - QByteArray data(8*1024); + TQByteArray data(8*1024); uint total = 0; for ( int block = 0; ( block = m_storeinp->read(data.data(), data.size()) ) > 0; total += block ) @@ -909,7 +909,7 @@ void OoImpressExport::appendPicture( QDomDocument & doc, QDomElement & source, Q } image.setAttribute( "xlink:href", "#" + pictureName ); -// set the geometry +// set the tqgeometry set2DGeometry( source, image ); target.appendChild( image ); @@ -919,94 +919,94 @@ void OoImpressExport::appendPicture( QDomDocument & doc, QDomElement & source, Q } -void OoImpressExport::appendLine( QDomDocument & doc, QDomElement & source, QDomElement & target ) +void OoImpressExport::appendLine( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ) { - QDomElement line = doc.createElement( "draw:line" ); + TQDomElement line = doc.createElement( "draw:line" ); // create the graphic style - QString gs = m_styleFactory.createGraphicStyle( source ); + TQString gs = m_styleFactory.createGraphicStyle( source ); line.setAttribute( "draw:style-name", gs ); - // set the geometry + // set the tqgeometry setLineGeometry( source, line ); target.appendChild( line ); } -void OoImpressExport::appendRectangle( QDomDocument & doc, QDomElement & source, QDomElement & target ) +void OoImpressExport::appendRectangle( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ) { - QDomElement rectangle = doc.createElement( "draw:rect" ); + TQDomElement rectangle = doc.createElement( "draw:rect" ); // create the graphic style - QString gs = m_styleFactory.createGraphicStyle( source ); + TQString gs = m_styleFactory.createGraphicStyle( source ); rectangle.setAttribute( "draw:style-name", gs ); - // set the geometry + // set the tqgeometry set2DGeometry( source, rectangle ); target.appendChild( rectangle ); } -void OoImpressExport::appendPolyline( QDomDocument & doc, QDomElement & source, QDomElement & target, bool _poly) +void OoImpressExport::appendPolyline( TQDomDocument & doc, TQDomElement & source, TQDomElement & target, bool _poly) { - QDomElement polyline = doc.createElement( _poly ? "draw:polygon" : "draw:polyline" ); + TQDomElement polyline = doc.createElement( _poly ? "draw:polygon" : "draw:polyline" ); // create the graphic style - QString gs = m_styleFactory.createGraphicStyle( source ); + TQString gs = m_styleFactory.createGraphicStyle( source ); polyline.setAttribute( "draw:style-name", gs ); - // set the geometry + // set the tqgeometry set2DGeometry( source, polyline, false, true /*multipoint*/ ); target.appendChild( polyline ); } -void OoImpressExport::appendEllipse( QDomDocument & doc, QDomElement & source, QDomElement & target, bool pieObject ) +void OoImpressExport::appendEllipse( TQDomDocument & doc, TQDomElement & source, TQDomElement & target, bool pieObject ) { - QDomElement size = source.namedItem( "SIZE" ).toElement(); + TQDomElement size = source.namedItem( "SIZE" ).toElement(); double width = size.attribute( "width" ).toDouble(); double height = size.attribute( "height" ).toDouble(); - QDomElement ellipse = doc.createElement( (width == height) ? "draw:circle" : "draw:ellipse" ); + TQDomElement ellipse = doc.createElement( (width == height) ? "draw:circle" : "draw:ellipse" ); // create the graphic style - QString gs = m_styleFactory.createGraphicStyle( source ); + TQString gs = m_styleFactory.createGraphicStyle( source ); ellipse.setAttribute( "draw:style-name", gs ); - // set the geometry + // set the tqgeometry set2DGeometry( source, ellipse, pieObject ); target.appendChild( ellipse ); } -void OoImpressExport::set2DGeometry( QDomElement & source, QDomElement & target, bool pieObject, bool multiPoint ) +void OoImpressExport::set2DGeometry( TQDomElement & source, TQDomElement & target, bool pieObject, bool multiPoint ) { - QDomElement orig = source.namedItem( "ORIG" ).toElement(); - QDomElement size = source.namedItem( "SIZE" ).toElement(); - QDomElement name = source.namedItem( "OBJECTNAME").toElement(); + TQDomElement orig = source.namedItem( "ORIG" ).toElement(); + TQDomElement size = source.namedItem( "SIZE" ).toElement(); + TQDomElement name = source.namedItem( "OBJECTNAME").toElement(); float y = orig.attribute( "y" ).toFloat(); y -= m_pageHeight * ( m_currentPage - 1 ); - QDomElement angle = source.namedItem( "ANGLE").toElement(); + TQDomElement angle = source.namedItem( "ANGLE").toElement(); if ( !angle.isNull() ) { - QString returnAngle = rotateValue( angle.attribute( "value" ).toDouble() ); + TQString returnAngle = rotateValue( angle.attribute( "value" ).toDouble() ); if ( !returnAngle.isEmpty() ) target.setAttribute("draw:transform",returnAngle ); } - target.setAttribute( "draw:id", QString::number( m_objectIndex ) ); + target.setAttribute( "draw:id", TQString::number( m_objectIndex ) ); target.setAttribute( "svg:x", StyleFactory::toCM( orig.attribute( "x" ) ) ); - target.setAttribute( "svg:y", QString( "%1cm" ).arg( KoUnit::toCM( y ) ) ); + target.setAttribute( "svg:y", TQString( "%1cm" ).tqarg( KoUnit::toCM( y ) ) ); target.setAttribute( "svg:width", StyleFactory::toCM( size.attribute( "width" ) ) ); target.setAttribute( "svg:height", StyleFactory::toCM( size.attribute( "height" ) ) ); - QString nameStr = name.attribute("objectName"); + TQString nameStr = name.attribute("objectName"); if( !nameStr.isEmpty() ) target.setAttribute( "draw:name", nameStr ); if ( pieObject ) { - QDomElement pie = source.namedItem( "PIETYPE").toElement(); + TQDomElement pie = source.namedItem( "PIETYPE").toElement(); if( !pie.isNull() ) { int typePie = pie.attribute("value").toInt(); @@ -1028,7 +1028,7 @@ void OoImpressExport::set2DGeometry( QDomElement & source, QDomElement & target, } else target.setAttribute( "draw:kind", "section");//by default - QDomElement pieAngle = source.namedItem( "PIEANGLE").toElement(); + TQDomElement pieAngle = source.namedItem( "PIEANGLE").toElement(); int startangle = 45; if( !pieAngle.isNull() ) { @@ -1040,7 +1040,7 @@ void OoImpressExport::set2DGeometry( QDomElement & source, QDomElement & target, //default value take it into kppieobject target.setAttribute( "draw:start-angle", 45 ); } - QDomElement pieLength = source.namedItem( "PIELENGTH").toElement(); + TQDomElement pieLength = source.namedItem( "PIELENGTH").toElement(); if( !pieLength.isNull() ) { int value = pieLength.attribute("value").toInt(); @@ -1058,10 +1058,10 @@ void OoImpressExport::set2DGeometry( QDomElement & source, QDomElement & target, if ( multiPoint ) { //loadPoint - QDomElement point = source.namedItem( "POINTS" ).toElement(); + TQDomElement point = source.namedItem( "POINTS" ).toElement(); if ( !point.isNull() ) { - QDomElement elemPoint = point.firstChild().toElement(); - QString listOfPoint; + TQDomElement elemPoint = point.firstChild().toElement(); + TQString listOfPoint; int maxX=0; int maxY=0; while ( !elemPoint.isNull() ) { @@ -1073,42 +1073,42 @@ void OoImpressExport::set2DGeometry( QDomElement & source, QDomElement & target, if( elemPoint.hasAttribute( "point_y" ) ) tmpY = ( int ) ( KoUnit::toMM(elemPoint.attribute( "point_y" ).toDouble() )*100 ); if ( !listOfPoint.isEmpty() ) - listOfPoint += QString( " %1,%2" ).arg( tmpX ).arg( tmpY ); + listOfPoint += TQString( " %1,%2" ).tqarg( tmpX ).tqarg( tmpY ); else - listOfPoint = QString( "%1,%2" ).arg( tmpX ).arg( tmpY ); - maxX = QMAX( maxX, tmpX ); - maxY = QMAX( maxY, tmpY ); + listOfPoint = TQString( "%1,%2" ).tqarg( tmpX ).tqarg( tmpY ); + maxX = TQMAX( maxX, tmpX ); + maxY = TQMAX( maxY, tmpY ); } elemPoint = elemPoint.nextSibling().toElement(); } target.setAttribute( "draw:points", listOfPoint ); - target.setAttribute( "svg:viewBox", QString( "0 0 %1 %2" ).arg( maxX ).arg( maxY ) ); + target.setAttribute( "svg:viewBox", TQString( "0 0 %1 %2" ).tqarg( maxX ).tqarg( maxY ) ); } } } -QString OoImpressExport::rotateValue( double val ) +TQString OoImpressExport::rotateValue( double val ) { - QString str; + TQString str; if ( val!=0.0 ) { double value = -1 * ( ( double )val* M_PI )/180.0; - str=QString( "rotate (%1)" ).arg( value ); + str=TQString( "rotate (%1)" ).tqarg( value ); } return str; } -void OoImpressExport::setLineGeometry( QDomElement & source, QDomElement & target ) +void OoImpressExport::setLineGeometry( TQDomElement & source, TQDomElement & target ) { - QDomElement orig = source.namedItem( "ORIG" ).toElement(); - QDomElement size = source.namedItem( "SIZE" ).toElement(); - QDomElement linetype = source.namedItem( "LINETYPE" ).toElement(); - QDomElement name = source.namedItem( "OBJECTNAME").toElement(); - QDomElement angle = source.namedItem( "ANGLE").toElement(); + TQDomElement orig = source.namedItem( "ORIG" ).toElement(); + TQDomElement size = source.namedItem( "SIZE" ).toElement(); + TQDomElement linetype = source.namedItem( "LINETYPE" ).toElement(); + TQDomElement name = source.namedItem( "OBJECTNAME").toElement(); + TQDomElement angle = source.namedItem( "ANGLE").toElement(); if ( !angle.isNull() ) { - QString returnAngle = rotateValue( angle.attribute( "value" ).toDouble() ); + TQString returnAngle = rotateValue( angle.attribute( "value" ).toDouble() ); if ( !returnAngle.isEmpty() ) target.setAttribute("draw:transform",returnAngle ); } @@ -1123,36 +1123,36 @@ void OoImpressExport::setLineGeometry( QDomElement & source, QDomElement & targe x2 += x1; y2 += y1; - target.setAttribute( "draw:id", QString::number( m_objectIndex ) ); - QString xpos1 = StyleFactory::toCM( orig.attribute( "x" ) ); - QString xpos2 = QString( "%1cm" ).arg( KoUnit::toCM( x2 ) ); + target.setAttribute( "draw:id", TQString::number( m_objectIndex ) ); + TQString xpos1 = StyleFactory::toCM( orig.attribute( "x" ) ); + TQString xpos2 = TQString( "%1cm" ).tqarg( KoUnit::toCM( x2 ) ); if ( type == 0 ) { - target.setAttribute( "svg:y1", QString( "%1cm" ).arg( KoUnit::toCM( y2/2.0 ) ) ); - target.setAttribute( "svg:y2", QString( "%1cm" ).arg( KoUnit::toCM( y2/2.0 ) ) ); + target.setAttribute( "svg:y1", TQString( "%1cm" ).tqarg( KoUnit::toCM( y2/2.0 ) ) ); + target.setAttribute( "svg:y2", TQString( "%1cm" ).tqarg( KoUnit::toCM( y2/2.0 ) ) ); } else if ( type == 1 ) { - target.setAttribute( "svg:y1", QString( "%1cm" ).arg( KoUnit::toCM( y1 ) ) ); - target.setAttribute( "svg:y2", QString( "%1cm" ).arg( KoUnit::toCM( y2 ) ) ); - xpos1 = QString( "%1cm" ).arg( KoUnit::toCM( x1/2.0 ) ); + target.setAttribute( "svg:y1", TQString( "%1cm" ).tqarg( KoUnit::toCM( y1 ) ) ); + target.setAttribute( "svg:y2", TQString( "%1cm" ).tqarg( KoUnit::toCM( y2 ) ) ); + xpos1 = TQString( "%1cm" ).tqarg( KoUnit::toCM( x1/2.0 ) ); xpos2 = xpos1; } else if ( type == 3 ) // from left bottom to right top { - target.setAttribute( "svg:y1", QString( "%1cm" ).arg( KoUnit::toCM( y2 ) ) ); - target.setAttribute( "svg:y2", QString( "%1cm" ).arg( KoUnit::toCM( y1 ) ) ); + target.setAttribute( "svg:y1", TQString( "%1cm" ).tqarg( KoUnit::toCM( y2 ) ) ); + target.setAttribute( "svg:y2", TQString( "%1cm" ).tqarg( KoUnit::toCM( y1 ) ) ); } else // from left top to right bottom { - target.setAttribute( "svg:y1", QString( "%1cm" ).arg( KoUnit::toCM( y1 ) ) ); - target.setAttribute( "svg:y2", QString( "%1cm" ).arg( KoUnit::toCM( y2 ) ) ); + target.setAttribute( "svg:y1", TQString( "%1cm" ).tqarg( KoUnit::toCM( y1 ) ) ); + target.setAttribute( "svg:y2", TQString( "%1cm" ).tqarg( KoUnit::toCM( y2 ) ) ); } target.setAttribute( "svg:x1", xpos1 ); target.setAttribute( "svg:x2", xpos2 ); - QString nameStr = name.attribute("objectName"); + TQString nameStr = name.attribute("objectName"); if( !nameStr.isEmpty() ) target.setAttribute( "draw:name", nameStr ); } diff --git a/filters/kpresenter/ooimpress/ooimpressexport.h b/filters/kpresenter/ooimpress/ooimpressexport.h index 9ab3d153..3b1e7b79 100644 --- a/filters/kpresenter/ooimpress/ooimpressexport.h +++ b/filters/kpresenter/ooimpress/ooimpressexport.h @@ -22,68 +22,69 @@ #include "stylefactory.h" -#include <qdom.h> +#include <tqdom.h> #include <KoFilter.h> -class QDomElement; +class TQDomElement; class KoStore; class OoImpressExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - OoImpressExport( KoFilter * parent, const char * name, const QStringList & ); + OoImpressExport( KoFilter * tqparent, const char * name, const TQStringList & ); virtual ~OoImpressExport(); - virtual KoFilter::ConversionStatus convert( const QCString & from, - const QCString & to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString & from, + const TQCString & to ); private: - KoFilter::ConversionStatus openFile(); - - void exportBody( QDomDocument & doccontent, QDomElement & body ); - void createDocumentMeta( QDomDocument & docmeta ); - void createDocumentStyles( QDomDocument & docstyles ); - void createDocumentContent( QDomDocument & doccontent ); - void createDocumentManifest( QDomDocument & docmanifest ); - void createDocumentSettings( QDomDocument & docsetting ); - void appendTextbox( QDomDocument & doc, QDomElement & source, QDomElement & target ); - void appendParagraph( QDomDocument & doc, QDomElement & source, QDomElement & target ); - void appendText( QDomDocument & doc, QDomElement & source, QDomElement & target ); - void appendLine( QDomDocument & doc, QDomElement & source, QDomElement & target ); - void appendRectangle( QDomDocument & doc, QDomElement & source, QDomElement & target ); - void appendEllipse( QDomDocument & doc, QDomElement & source, QDomElement & target, bool pieObject = false ); - void set2DGeometry( QDomElement & source, QDomElement & target, bool pieObject = false, bool multiPoint = false ); - void setLineGeometry( QDomElement & source, QDomElement & target ); - void appendPolyline( QDomDocument & doc, QDomElement & source, QDomElement & target, bool polygone = false); - void appendPicture( QDomDocument & doc, QDomElement & source, QDomElement & target ); - void createPictureList( QDomNode &pictures ); - void appendNote( QDomDocument & doc, QDomElement & source, QDomElement & target ); - void appendGroupObject( QDomDocument & doc, QDomElement & source, QDomElement & target ); - QString rotateValue( double val ); - QString pictureKey( QDomElement &element ); - void createHelpLine( QDomNode &helpline ); - void createAttribute( QDomNode &attributeValue ); - void appendObjects(QDomDocument & doccontent, QDomNode &objects, QDomElement &drawPage); + KoFilter::ConversiontqStatus openFile(); + + void exportBody( TQDomDocument & doccontent, TQDomElement & body ); + void createDocumentMeta( TQDomDocument & docmeta ); + void createDocumentStyles( TQDomDocument & docstyles ); + void createDocumentContent( TQDomDocument & doccontent ); + void createDocumentManifest( TQDomDocument & docmanifest ); + void createDocumentSettings( TQDomDocument & docsetting ); + void appendTextbox( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ); + void appendParagraph( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ); + void appendText( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ); + void appendLine( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ); + void appendRectangle( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ); + void appendEllipse( TQDomDocument & doc, TQDomElement & source, TQDomElement & target, bool pieObject = false ); + void set2DGeometry( TQDomElement & source, TQDomElement & target, bool pieObject = false, bool multiPoint = false ); + void setLineGeometry( TQDomElement & source, TQDomElement & target ); + void appendPolyline( TQDomDocument & doc, TQDomElement & source, TQDomElement & target, bool polygone = false); + void appendPicture( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ); + void createPictureList( TQDomNode &pictures ); + void appendNote( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ); + void appendGroupObject( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ); + TQString rotateValue( double val ); + TQString pictureKey( TQDomElement &element ); + void createHelpLine( TQDomNode &helpline ); + void createAttribute( TQDomNode &attributeValue ); + void appendObjects(TQDomDocument & doccontent, TQDomNode &objects, TQDomElement &drawPage); int m_currentPage; int m_objectIndex; float m_pageHeight; StyleFactory m_styleFactory; - QString m_masterPageStyle; - QDomElement m_styles; - QDomDocument m_maindoc; - QDomDocument m_documentinfo; - QMap<QString, QString> m_pictureLst; + TQString m_masterPageStyle; + TQDomElement m_styles; + TQDomDocument m_maindoc; + TQDomDocument m_documentinfo; + TQMap<TQString, TQString> m_pictureLst; - QString m_helpLine; + TQString m_helpLine; int m_activePage; double m_gridX, m_gridY; bool m_snapToGrid; //load from kpresenter file format - QMap<QString, QString> m_kpresenterPictureLst; + TQMap<TQString, TQString> m_kpresenterPictureLst; int m_pictureIndex; KoStore *m_storeinp; KoStore *m_storeout; diff --git a/filters/kpresenter/ooimpress/ooimpressimport.cc b/filters/kpresenter/ooimpress/ooimpressimport.cc index be6c094d..8ca41b2a 100644 --- a/filters/kpresenter/ooimpress/ooimpressimport.cc +++ b/filters/kpresenter/ooimpress/ooimpressimport.cc @@ -23,10 +23,10 @@ #include <math.h> -#include <qregexp.h> -#include <qdatetime.h> -#include <qfileinfo.h> -#include <qdir.h> +#include <tqregexp.h> +#include <tqdatetime.h> +#include <tqfileinfo.h> +#include <tqdir.h> #include <kzip.h> #include <karchive.h> @@ -46,7 +46,7 @@ typedef KGenericFactory<OoImpressImport, KoFilter> OoImpressImportFactory; K_EXPORT_COMPONENT_FACTORY( libooimpressimport, OoImpressImportFactory( "kofficefilters" ) ) -OoImpressImport::OoImpressImport( KoFilter *, const char *, const QStringList & ) +OoImpressImport::OoImpressImport( KoFilter *, const char *, const TQStringList & ) : KoFilter(), m_numPicture( 1 ), m_numSound(1), @@ -59,7 +59,7 @@ OoImpressImport::OoImpressImport( KoFilter *, const char *, const QStringList & OoImpressImport::~OoImpressImport() { - QDictIterator<animationList> it( m_animations ); // See QDictIterator + TQDictIterator<animationList> it( m_animations ); // See TQDictIterator for( ; it.current(); ++it ) { delete it.current()->element; @@ -67,7 +67,7 @@ OoImpressImport::~OoImpressImport() m_animations.clear(); } -KoFilter::ConversionStatus OoImpressImport::convert( QCString const & from, QCString const & to ) +KoFilter::ConversiontqStatus OoImpressImport::convert( TQCString const & from, TQCString const & to ) { kdDebug(30518) << "Entering Ooimpress Import filter: " << from << " - " << to << endl; @@ -87,36 +87,36 @@ KoFilter::ConversionStatus OoImpressImport::convert( QCString const & from, QCSt return KoFilter::FileNotFound; } - KoFilter::ConversionStatus preStatus = openFile(); + KoFilter::ConversiontqStatus pretqStatus = openFile(); - if ( preStatus != KoFilter::OK ) + if ( pretqStatus != KoFilter::OK ) { m_zip->close(); delete m_zip; - return preStatus; + return pretqStatus; } - QDomDocument docinfo; + TQDomDocument docinfo; createDocumentInfo( docinfo ); // store document info KoStoreDevice* out = m_chain->storageFile( "documentinfo.xml", KoStore::Write ); if( out ) { - QCString info = docinfo.toCString(); + TQCString info = docinfo.toCString(); //kdDebug(30518) << " info :" << info << endl; - // WARNING: we cannot use KoStore::write(const QByteArray&) because it gives an extra NULL character at the end. + // WARNING: we cannot use KoStore::write(const TQByteArray&) because it gives an extra NULL character at the end. out->writeBlock( info , info.length() ); } - QDomDocument doccontent; + TQDomDocument doccontent; createDocumentContent( doccontent ); // store document content out = m_chain->storageFile( "maindoc.xml", KoStore::Write ); if( out ) { - QCString content = doccontent.toCString(); + TQCString content = doccontent.toCString(); kdDebug(30518) << " content :" << content << endl; out->writeBlock( content , content.length() ); } @@ -129,9 +129,9 @@ KoFilter::ConversionStatus OoImpressImport::convert( QCString const & from, QCSt } // Very related to OoWriterImport::openFile() -KoFilter::ConversionStatus OoImpressImport::openFile() +KoFilter::ConversiontqStatus OoImpressImport::openFile() { - KoFilter::ConversionStatus status = loadAndParse( "content.xml", m_content ); + KoFilter::ConversiontqStatus status = loadAndParse( "content.xml", m_content ); if ( status != KoFilter::OK ) { kdError(30518) << "Content.xml could not be parsed correctly! Aborting!" << endl; @@ -139,7 +139,7 @@ KoFilter::ConversionStatus OoImpressImport::openFile() } // We do not stop if the following calls fail. - QDomDocument styles; + TQDomDocument styles; loadAndParse( "styles.xml", styles ); loadAndParse( "meta.xml", m_meta ); loadAndParse( "settings.xml", m_settings ); @@ -150,13 +150,13 @@ KoFilter::ConversionStatus OoImpressImport::openFile() return KoFilter::OK; } -KoFilter::ConversionStatus OoImpressImport::loadAndParse(const QString& filename, QDomDocument& doc) +KoFilter::ConversiontqStatus OoImpressImport::loadAndParse(const TQString& filename, TQDomDocument& doc) { return OoUtils::loadAndParse( filename, doc, m_zip); } // Very related to OoWriterImport::createDocumentInfo -void OoImpressImport::createDocumentInfo( QDomDocument &docinfo ) +void OoImpressImport::createDocumentInfo( TQDomDocument &docinfo ) { docinfo = KoDocument::createDomDocument( "document-info" /*DTD name*/, "document-info" /*tag name*/, "1.1" ); @@ -164,60 +164,60 @@ void OoImpressImport::createDocumentInfo( QDomDocument &docinfo ) //kdDebug(30518) << " meta-info :" << m_meta.toCString() << endl; } -void OoImpressImport::createDocumentContent( QDomDocument &doccontent ) +void OoImpressImport::createDocumentContent( TQDomDocument &doccontent ) { - QDomDocument doc = KoDocument::createDomDocument( "kpresenter", "DOC", "1.2" ); - QDomElement docElement = doc.documentElement(); + TQDomDocument doc = KoDocument::createDomDocument( "kpresenter", "DOC", "1.2" ); + TQDomElement docElement = doc.documentElement(); docElement.setAttribute( "editor", "KPresenter" ); docElement.setAttribute( "mime", "application/x-kpresenter" ); docElement.setAttribute( "syntaxVersion", "2" ); - QDomElement content = m_content.documentElement(); + TQDomElement content = m_content.documentElement(); // content.xml contains some automatic-styles that we need to store - QDomNode automaticStyles = KoDom::namedItemNS( content, ooNS::office, "automatic-styles" ); + TQDomNode automaticStyles = KoDom::namedItemNS( content, ooNS::office, "automatic-styles" ); if ( !automaticStyles.isNull() ) insertStyles( automaticStyles.toElement() ); - QDomNode body = KoDom::namedItemNS( content, ooNS::office, "body" ); + TQDomNode body = KoDom::namedItemNS( content, ooNS::office, "body" ); if ( body.isNull() ) return; - QDomElement customSlideShow = doc.createElement( "CUSTOMSLIDESHOWCONFIG" ); + TQDomElement customSlideShow = doc.createElement( "CUSTOMSLIDESHOWCONFIG" ); // presentation settings - QDomElement settings = KoDom::namedItemNS( body, ooNS::presentation, "settings"); + TQDomElement settings = KoDom::namedItemNS( body, ooNS::presentation, "settings"); if (!settings.isNull()) { - if (settings.attributeNS( ooNS::presentation, "endless", QString::null)=="true") + if (settings.attributeNS( ooNS::presentation, "endless", TQString())=="true") { - QDomElement infElem = doc.createElement("INFINITLOOP"); + TQDomElement infElem = doc.createElement("INFINITLOOP"); infElem.setAttribute("value", 1); docElement.appendChild(infElem); } - if (settings.attributeNS( ooNS::presentation, "show-end-of-presentation-slide", QString::null)=="true") + if (settings.attributeNS( ooNS::presentation, "show-end-of-presentation-slide", TQString())=="true") { - QDomElement infElem = doc.createElement("SHOWENDOFPRESENTATIONSLIDE"); + TQDomElement infElem = doc.createElement("SHOWENDOFPRESENTATIONSLIDE"); infElem.setAttribute("value", 1); docElement.appendChild(infElem); } - if (settings.attributeNS( ooNS::presentation, "force-manual", QString::null)=="true") + if (settings.attributeNS( ooNS::presentation, "force-manual", TQString())=="true") { - QDomElement manualElem = doc.createElement("MANUALSWITCH"); + TQDomElement manualElem = doc.createElement("MANUALSWITCH"); manualElem.setAttribute("value", 1); docElement.appendChild(manualElem); } if ( settings.hasAttributeNS( ooNS::presentation, "show") ) { - QDomElement defaultPage = doc.createElement("DEFAULTCUSTOMSLIDESHOWNAME"); - defaultPage.setAttribute("name", settings.attributeNS( ooNS::presentation, "show", QString::null) ); + TQDomElement defaultPage = doc.createElement("DEFAULTCUSTOMSLIDESHOWNAME"); + defaultPage.setAttribute("name", settings.attributeNS( ooNS::presentation, "show", TQString()) ); docElement.appendChild(defaultPage); } } - QDomElement presentationShow; + TQDomElement presentationShow; forEachElement( presentationShow, settings ) { if ( presentationShow.localName()=="show" && presentationShow.namespaceURI() == ooNS::presentation ) @@ -225,40 +225,40 @@ void OoImpressImport::createDocumentContent( QDomDocument &doccontent ) if ( presentationShow.hasAttributeNS( ooNS::presentation, "pages") && presentationShow.hasAttributeNS( ooNS::presentation, "name")) { - QDomElement slide=doc.createElement("CUSTOMSLIDESHOW"); - slide.setAttribute( "pages", presentationShow.attributeNS( ooNS::presentation, "pages", QString::null )); - slide.setAttribute( "name", presentationShow.attributeNS( ooNS::presentation, "name", QString::null )); + TQDomElement slide=doc.createElement("CUSTOMSLIDESHOW"); + slide.setAttribute( "pages", presentationShow.attributeNS( ooNS::presentation, "pages", TQString() )); + slide.setAttribute( "name", presentationShow.attributeNS( ooNS::presentation, "name", TQString() )); customSlideShow.appendChild( slide ); } } } // it seems that ooimpress has different paper-settings for every slide. // we take the settings of the first slide for the whole document. - QDomElement drawPage = KoDom::namedItemNS( body, ooNS::draw, "page" ); + TQDomElement drawPage = KoDom::namedItemNS( body, ooNS::draw, "page" ); if ( drawPage.isNull() ) // no slides? give up. return; - QDomElement objectElement = doc.createElement( "OBJECTS" ); - QDomElement pictureElement = doc.createElement( "PICTURES" ); - QDomElement pageTitleElement = doc.createElement( "PAGETITLES" ); - QDomElement pageNoteElement = doc.createElement( "PAGENOTES" ); - QDomElement backgroundElement = doc.createElement( "BACKGROUND" ); - QDomElement soundElement = doc.createElement( "SOUNDS" ); - QDomElement selSlideElement = doc.createElement( "SELSLIDES" ); - QDomElement helpLineElement = doc.createElement( "HELPLINES" ); - QDomElement attributeElement = doc.createElement( "ATTRIBUTES" ); - QDomElement *master = m_styles[drawPage.attributeNS( ooNS::draw, "master-page-name", QString::null )]; + TQDomElement objectElement = doc.createElement( "OBJECTS" ); + TQDomElement pictureElement = doc.createElement( "PICTURES" ); + TQDomElement pageTitleElement = doc.createElement( "PAGETITLES" ); + TQDomElement pageNoteElement = doc.createElement( "PAGENOTES" ); + TQDomElement backgroundElement = doc.createElement( "BACKGROUND" ); + TQDomElement soundElement = doc.createElement( "SOUNDS" ); + TQDomElement selSlideElement = doc.createElement( "SELSLIDES" ); + TQDomElement helpLineElement = doc.createElement( "HELPLINES" ); + TQDomElement attributeElement = doc.createElement( "ATTRIBUTES" ); + TQDomElement *master = m_styles[drawPage.attributeNS( ooNS::draw, "master-page-name", TQString() )]; appendObject(*master, doc, soundElement,pictureElement,pageNoteElement,objectElement, 0, true); - QDomElement *style = m_styles[master->attributeNS( ooNS::style, "page-master-name", QString::null )]; - QDomElement properties = KoDom::namedItemNS( *style, ooNS::style, "properties" ); - //kdDebug(30518)<<" master->attribute( draw:style-name ) :"<<master->attributeNS( ooNS::draw, "style-name", QString::null )<<endl; - QDomElement *backgroundStyle = m_stylesPresentation[ master->attributeNS( ooNS::draw, "style-name", QString::null ).isEmpty() ? "Standard-background" : master->attributeNS( ooNS::draw, "style-name", QString::null ) ]; + TQDomElement *style = m_styles[master->attributeNS( ooNS::style, "page-master-name", TQString() )]; + TQDomElement properties = KoDom::namedItemNS( *style, ooNS::style, "properties" ); + //kdDebug(30518)<<" master->attribute( draw:style-name ) :"<<master->attributeNS( ooNS::draw, "style-name", TQString() )<<endl; + TQDomElement *backgroundStyle = m_stylesPresentation[ master->attributeNS( ooNS::draw, "style-name", TQString() ).isEmpty() ? "Standard-background" : master->attributeNS( ooNS::draw, "style-name", TQString() ) ]; //kdDebug(30518)<<" backgroundStyle :"<<backgroundStyle<<endl; double pageHeight; - QDomElement paperElement = doc.createElement( "PAPER" ); + TQDomElement paperElement = doc.createElement( "PAPER" ); if ( properties.isNull() ) { paperElement.setAttribute( "ptWidth", CM_TO_POINT(28) ); @@ -269,7 +269,7 @@ void OoImpressImport::createDocumentContent( QDomDocument &doccontent ) paperElement.setAttribute( "orientation", 0 ); pageHeight = 21; - QDomElement paperBorderElement = doc.createElement( "PAPERBORDERS" ); + TQDomElement paperBorderElement = doc.createElement( "PAPERBORDERS" ); paperBorderElement.setAttribute( "ptRight", 0 ); paperBorderElement.setAttribute( "ptBottom", 0 ); paperBorderElement.setAttribute( "ptLeft", 0 ); @@ -278,8 +278,8 @@ void OoImpressImport::createDocumentContent( QDomDocument &doccontent ) } else { - paperElement.setAttribute( "ptWidth", KoUnit::parseValue(properties.attributeNS( ooNS::fo, "page-width", QString::null ) ) ); - paperElement.setAttribute( "ptHeight", KoUnit::parseValue(properties.attributeNS( ooNS::fo, "page-height", QString::null ) ) ); + paperElement.setAttribute( "ptWidth", KoUnit::parseValue(properties.attributeNS( ooNS::fo, "page-width", TQString() ) ) ); + paperElement.setAttribute( "ptHeight", KoUnit::parseValue(properties.attributeNS( ooNS::fo, "page-height", TQString() ) ) ); // paperElement.setAttribute( "unit", 0 ); // paperElement.setAttribute( "format", 5 ); // paperElement.setAttribute( "tabStopValue", 42.5198 ); @@ -287,20 +287,20 @@ void OoImpressImport::createDocumentContent( QDomDocument &doccontent ) // Keep pageHeight in cm to avoid rounding-errors that would // get multiplied with every new slide. - if (properties.attributeNS( ooNS::style, "print-orientation", QString::null)=="portrait") + if (properties.attributeNS( ooNS::style, "print-orientation", TQString())=="portrait") paperElement.setAttribute("orientation", 0); - else if (properties.attributeNS( ooNS::style, "print-orientation", QString::null)=="landscape") + else if (properties.attributeNS( ooNS::style, "print-orientation", TQString())=="landscape") paperElement.setAttribute("orientation", 1); - pageHeight = properties.attributeNS( ooNS::fo, "page-height", QString::null ).remove( "cm" ).toDouble(); + pageHeight = properties.attributeNS( ooNS::fo, "page-height", TQString() ).remove( "cm" ).toDouble(); - QDomElement paperBorderElement = doc.createElement( "PAPERBORDERS" ); - paperBorderElement.setAttribute( "ptRight", KoUnit::parseValue( properties.attributeNS( ooNS::fo, "margin-right", QString::null ) ) ); - paperBorderElement.setAttribute( "ptBottom", KoUnit::parseValue( properties.attributeNS( ooNS::fo, "margin-bottom", QString::null ) ) ); - paperBorderElement.setAttribute( "ptLeft", KoUnit::parseValue( properties.attributeNS( ooNS::fo, "margin-left", QString::null ) ) ); - paperBorderElement.setAttribute( "ptTop", KoUnit::parseValue( properties.attributeNS( ooNS::fo, "margin-top", QString::null ) ) ); + TQDomElement paperBorderElement = doc.createElement( "PAPERBORDERS" ); + paperBorderElement.setAttribute( "ptRight", KoUnit::parseValue( properties.attributeNS( ooNS::fo, "margin-right", TQString() ) ) ); + paperBorderElement.setAttribute( "ptBottom", KoUnit::parseValue( properties.attributeNS( ooNS::fo, "margin-bottom", TQString() ) ) ); + paperBorderElement.setAttribute( "ptLeft", KoUnit::parseValue( properties.attributeNS( ooNS::fo, "margin-left", TQString() ) ) ); + paperBorderElement.setAttribute( "ptTop", KoUnit::parseValue( properties.attributeNS( ooNS::fo, "margin-top", TQString() ) ) ); paperElement.appendChild( paperBorderElement ); } @@ -313,7 +313,7 @@ void OoImpressImport::createDocumentContent( QDomDocument &doccontent ) m_styleStack.clear(); // remove all styles fillStyleStack( drawPage ); m_styleStack.save(); - int pagePos = drawPage.attributeNS( ooNS::draw, "id", QString::null ).toInt() - 1; + int pagePos = drawPage.attributeNS( ooNS::draw, "id", TQString() ).toInt() - 1; // take care of a possible page background or slide transition or sound if ( m_styleStack.hasAttributeNS( ooNS::draw, "fill" ) || m_styleStack.hasAttributeNS( ooNS::presentation, "transition-style" )) @@ -330,8 +330,8 @@ void OoImpressImport::createDocumentContent( QDomDocument &doccontent ) } if ( m_styleStack.hasAttributeNS( ooNS::presentation, "visibility" ) ) { - QString str = m_styleStack.attributeNS( ooNS::presentation, "visibility" ); - QDomElement slide = doc.createElement("SLIDE"); + TQString str = m_styleStack.attributeNS( ooNS::presentation, "visibility" ); + TQDomElement slide = doc.createElement("SLIDE"); slide.setAttribute( "nr", pagePos ); slide.setAttribute( "show", ( ( str=="hidden" ) ? "0" : "1" )); selSlideElement.appendChild( slide ); @@ -340,13 +340,13 @@ void OoImpressImport::createDocumentContent( QDomDocument &doccontent ) kdDebug(30518)<<"m_styleStack.hasAttribute( presentation:visibility ) :"<<str<<" position page "<<pagePos<<endl; } // set the pagetitle - QDomElement titleElement = doc.createElement( "Title" ); - titleElement.setAttribute( "title", drawPage.attributeNS( ooNS::draw, "name", QString::null ) ); + TQDomElement titleElement = doc.createElement( "Title" ); + titleElement.setAttribute( "title", drawPage.attributeNS( ooNS::draw, "name", TQString() ) ); pageTitleElement.appendChild( titleElement ); // The '+1' is necessary to avoid that objects that start on the first line // of a slide will show up on the last line of the previous slide. - double offset = CM_TO_POINT( ( drawPage.attributeNS( ooNS::draw, "id", QString::null ).toInt() - 1 ) * pageHeight ) + 1; + double offset = CM_TO_POINT( ( drawPage.attributeNS( ooNS::draw, "id", TQString() ).toInt() - 1 ) * pageHeight ) + 1; // animations (object effects) createPresentationAnimation(KoDom::namedItemNS( drawPage, ooNS::presentation, "animations") ); @@ -375,7 +375,7 @@ void OoImpressImport::createDocumentContent( QDomDocument &doccontent ) doccontent.appendChild( doc ); } -bool OoImpressImport::parseSettings( QDomDocument &doc, QDomElement &helpLineElement, QDomElement &attributeElement ) +bool OoImpressImport::parseSettings( TQDomDocument &doc, TQDomElement &helpLineElement, TQDomElement &attributeElement ) { bool foundElement = false; KoOasisSettings settings( m_settings, ooNS::office, ooNS::config ); @@ -388,7 +388,7 @@ bool OoImpressImport::parseSettings( QDomDocument &doc, QDomElement &helpLineEle if ( !firstView.isNull() ) { - QString str = firstView.parseConfigItemString( "SnapLinesDrawing" ); + TQString str = firstView.parseConfigItemString( "SnapLinesDrawing" ); if ( !str.isEmpty() ) { parseHelpLine( doc, helpLineElement, str ); @@ -413,9 +413,9 @@ bool OoImpressImport::parseSettings( QDomDocument &doc, QDomElement &helpLineEle return foundElement; } -void OoImpressImport::parseHelpLine( QDomDocument &doc,QDomElement &helpLineElement, const QString &text ) +void OoImpressImport::parseHelpLine( TQDomDocument &doc,TQDomElement &helpLineElement, const TQString &text ) { - QString str; + TQString str; int newPos = text.length()-1; //start to element = 1 for ( int pos = text.length()-1; pos >=0;--pos ) { @@ -424,10 +424,10 @@ void OoImpressImport::parseHelpLine( QDomDocument &doc,QDomElement &helpLineElem //point str = text.mid( pos+1, ( newPos-pos ) ); - QDomElement point=doc.createElement("HelpPoint"); + TQDomElement point=doc.createElement("HelpPoint"); //kdDebug(30518)<<" point element :"<< str <<endl; - QStringList listVal = QStringList::split( ",", str ); + TQStringList listVal = TQStringList::split( ",", str ); int posX = ( listVal[0].toInt()/100 ); int posY = ( listVal[1].toInt()/100 ); point.setAttribute("posX", MM_TO_POINT( posX )); @@ -438,7 +438,7 @@ void OoImpressImport::parseHelpLine( QDomDocument &doc,QDomElement &helpLineElem } else if ( text[pos]=='V' ) { - QDomElement lines=doc.createElement("Vertical"); + TQDomElement lines=doc.createElement("Vertical"); //vertical element str = text.mid( pos+1, ( newPos-pos ) ); //kdDebug(30518)<<" vertical :"<< str <<endl; @@ -452,7 +452,7 @@ void OoImpressImport::parseHelpLine( QDomDocument &doc,QDomElement &helpLineElem else if ( text[pos]=='H' ) { //horizontal element - QDomElement lines=doc.createElement("Horizontal"); + TQDomElement lines=doc.createElement("Horizontal"); str = text.mid( pos+1, ( newPos-pos ) ); //kdDebug(30518)<<" horizontal :"<< str <<endl; int posY = ( str.toInt()/100 ); @@ -463,17 +463,17 @@ void OoImpressImport::parseHelpLine( QDomDocument &doc,QDomElement &helpLineElem } } -void OoImpressImport::appendObject(QDomNode & drawPage, QDomDocument & doc, QDomElement & soundElement, QDomElement & pictureElement, QDomElement & pageNoteElement, QDomElement &objectElement, double offset, bool sticky) +void OoImpressImport::appendObject(TQDomNode & drawPage, TQDomDocument & doc, TQDomElement & soundElement, TQDomElement & pictureElement, TQDomElement & pageNoteElement, TQDomElement &objectElement, double offset, bool sticky) { - QDomElement o; + TQDomElement o; forEachElement( o, drawPage ) { - const QString localName = o.localName(); - const QString ns = o.namespaceURI(); - const QString drawID = o.attributeNS( ooNS::draw, "id", QString::null); + const TQString localName = o.localName(); + const TQString ns = o.namespaceURI(); + const TQString drawID = o.attributeNS( ooNS::draw, "id", TQString()); m_styleStack.save(); - QDomElement e; + TQDomElement e; if ( localName == "text-box" && ns == ooNS::draw ) // textbox { fillStyleStack( o, sticky ); @@ -523,9 +523,9 @@ void OoImpressImport::appendObject(QDomNode & drawPage, QDomDocument & doc, QD { e.setAttribute( "type", 8 ); appendPie( doc, e, o ); - QDomElement type = doc.createElement( "PIETYPE" ); + TQDomElement type = doc.createElement( "PIETYPE" ); - QString kind = o.attributeNS( ooNS::draw, "kind", QString::null ); + TQString kind = o.attributeNS( ooNS::draw, "kind", TQString() ); if ( kind == "section" ) { appendBrush( doc, e ); @@ -620,18 +620,18 @@ void OoImpressImport::appendObject(QDomNode & drawPage, QDomDocument & doc, QD } else if ( localName == "notes" && ns == ooNS::presentation ) // notes { - QDomNode textBox = KoDom::namedItemNS( o, ooNS::draw, "text-box" ); + TQDomNode textBox = KoDom::namedItemNS( o, ooNS::draw, "text-box" ); if ( !textBox.isNull() ) { - QString note; - QDomElement t; + TQString note; + TQDomElement t; forEachElement( t, textBox ) { // We don't care about styles as they are not supported in kpresenter. // Only add a linebreak for every child. note += t.text() + "\n"; } - QDomElement notesElement = doc.createElement( "Note" ); + TQDomElement notesElement = doc.createElement( "Note" ); notesElement.setAttribute( "note", note ); pageNoteElement.appendChild( notesElement ); } @@ -648,44 +648,44 @@ void OoImpressImport::appendObject(QDomNode & drawPage, QDomDocument & doc, QD } } -void OoImpressImport::appendBackgroundPage( QDomDocument &doc, QDomElement &backgroundElement, QDomElement & pictureElement, QDomElement &soundElement) +void OoImpressImport::appendBackgroundPage( TQDomDocument &doc, TQDomElement &backgroundElement, TQDomElement & pictureElement, TQDomElement &soundElement) { - QDomElement bgPage = doc.createElement( "PAGE" ); + TQDomElement bgPage = doc.createElement( "PAGE" ); // background if ( m_styleStack.hasAttributeNS( ooNS::draw, "fill" ) ) { - const QString fill = m_styleStack.attributeNS( ooNS::draw, "fill" ); + const TQString fill = m_styleStack.attributeNS( ooNS::draw, "fill" ); if ( fill == "solid" ) { - QDomElement backColor1 = doc.createElement( "BACKCOLOR1" ); + TQDomElement backColor1 = doc.createElement( "BACKCOLOR1" ); backColor1.setAttribute( "color", m_styleStack.attributeNS( ooNS::draw, "fill-color" ) ); bgPage.appendChild( backColor1 ); - QDomElement bcType = doc.createElement( "BCTYPE" ); + TQDomElement bcType = doc.createElement( "BCTYPE" ); bcType.setAttribute( "value", 0 ); // plain bgPage.appendChild( bcType ); - QDomElement backType = doc.createElement( "BACKTYPE" ); + TQDomElement backType = doc.createElement( "BACKTYPE" ); backType.setAttribute( "value", 0 ); // color/gradient bgPage.appendChild( backType ); } else if ( fill == "gradient" ) { - QString style = m_styleStack.attributeNS( ooNS::draw, "fill-gradient-name" ); - QDomElement* draw = m_draws[style]; + TQString style = m_styleStack.attributeNS( ooNS::draw, "fill-gradient-name" ); + TQDomElement* draw = m_draws[style]; appendBackgroundGradient( doc, bgPage, *draw ); } else if ( fill == "bitmap" ) { - QString style = m_styleStack.attributeNS( ooNS::draw, "fill-image-name" ); - QDomElement* draw = m_draws[style]; + TQString style = m_styleStack.attributeNS( ooNS::draw, "fill-image-name" ); + TQDomElement* draw = m_draws[style]; appendBackgroundImage( doc, bgPage, pictureElement, *draw ); - QDomElement backView = doc.createElement( "BACKVIEW" ); + TQDomElement backView = doc.createElement( "BACKVIEW" ); if ( m_styleStack.hasAttributeNS( ooNS::style, "repeat" ) ) { - QString repeat = m_styleStack.attributeNS( ooNS::style, "repeat" ); + TQString repeat = m_styleStack.attributeNS( ooNS::style, "repeat" ); if ( repeat == "stretch" ) backView.setAttribute( "value", 0 ); // zoomed else if ( repeat == "no-repeat" ) @@ -697,7 +697,7 @@ void OoImpressImport::appendBackgroundPage( QDomDocument &doc, QDomElement &back backView.setAttribute( "value", 2 ); // use tiled as default bgPage.appendChild( backView ); - QDomElement backType = doc.createElement( "BACKTYPE" ); + TQDomElement backType = doc.createElement( "BACKTYPE" ); backType.setAttribute( "value", 1 ); // image bgPage.appendChild( backType ); } @@ -705,23 +705,23 @@ void OoImpressImport::appendBackgroundPage( QDomDocument &doc, QDomElement &back if ( m_styleStack.hasAttributeNS( ooNS::presentation, "duration" ) ) { - QString str = m_styleStack.attributeNS( ooNS::presentation, "duration"); + TQString str = m_styleStack.attributeNS( ooNS::presentation, "duration"); kdDebug(30518)<<"styleStack.hasAttribute(presentation:duration ) :"<<str<<endl; //convert date duration int hour( str.mid( 2, 2 ).toInt() ); int minute( str.mid( 5, 2 ).toInt() ); int second( str.mid( 8, 2 ).toInt() ); int pageTimer = second + minute*60 + hour*60*60; - QDomElement pgEffect = doc.createElement("PGTIMER"); + TQDomElement pgEffect = doc.createElement("PGTIMER"); pgEffect.setAttribute( "timer", pageTimer ); bgPage.appendChild(pgEffect); } // slide transition if (m_styleStack.hasAttributeNS( ooNS::presentation, "transition-style")) { - QDomElement pgEffect = doc.createElement("PGEFFECT"); + TQDomElement pgEffect = doc.createElement("PGEFFECT"); - const QString effect = m_styleStack.attributeNS( ooNS::presentation, "transition-style"); + const TQString effect = m_styleStack.attributeNS( ooNS::presentation, "transition-style"); //kdDebug(30518) << "Transition name: " << effect << endl; int pef; @@ -786,12 +786,12 @@ void OoImpressImport::appendBackgroundPage( QDomDocument &doc, QDomElement &back // slide transition sound if (m_styleStack.hasChildNodeNS( ooNS::presentation, "sound")) { - QString soundUrl = storeSound(m_styleStack.childNodeNS( ooNS::presentation, "sound"), + TQString soundUrl = storeSound(m_styleStack.childNodeNS( ooNS::presentation, "sound"), soundElement, doc); if (!soundUrl.isNull()) { - QDomElement pseElem = doc.createElement("PGSOUNDEFFECT"); + TQDomElement pseElem = doc.createElement("PGSOUNDEFFECT"); pseElem.setAttribute("soundEffect", 1); pseElem.setAttribute("soundFileName", soundUrl); @@ -802,43 +802,43 @@ void OoImpressImport::appendBackgroundPage( QDomDocument &doc, QDomElement &back backgroundElement.appendChild(bgPage); } -void OoImpressImport::appendName(QDomDocument& doc, QDomElement& e, const QDomElement& object) +void OoImpressImport::appendName(TQDomDocument& doc, TQDomElement& e, const TQDomElement& object) { if( object.hasAttributeNS( ooNS::draw, "name" )) { - QDomElement name = doc.createElement( "OBJECTNAME" ); - name.setAttribute( "objectName", object.attributeNS( ooNS::draw, "name", QString::null )); + TQDomElement name = doc.createElement( "OBJECTNAME" ); + name.setAttribute( "objectName", object.attributeNS( ooNS::draw, "name", TQString() )); e.appendChild( name ); } } -void OoImpressImport::append2DGeometry( QDomDocument& doc, QDomElement& e, const QDomElement& object, int offset ) +void OoImpressImport::append2DGeometry( TQDomDocument& doc, TQDomElement& e, const TQDomElement& object, int offset ) { - QDomElement orig = doc.createElement( "ORIG" ); - orig.setAttribute( "x", KoUnit::parseValue( object.attributeNS( ooNS::svg, "x", QString::null ) ) ); - orig.setAttribute( "y", KoUnit::parseValue( object.attributeNS( ooNS::svg, "y", QString::null ) ) + offset ); + TQDomElement orig = doc.createElement( "ORIG" ); + orig.setAttribute( "x", KoUnit::parseValue( object.attributeNS( ooNS::svg, "x", TQString() ) ) ); + orig.setAttribute( "y", KoUnit::parseValue( object.attributeNS( ooNS::svg, "y", TQString() ) ) + offset ); e.appendChild( orig ); - QDomElement size = doc.createElement( "SIZE" ); - size.setAttribute( "width", KoUnit::parseValue( object.attributeNS( ooNS::svg, "width", QString::null ) ) ); - size.setAttribute( "height", KoUnit::parseValue( object.attributeNS( ooNS::svg, "height", QString::null ) ) ); + TQDomElement size = doc.createElement( "SIZE" ); + size.setAttribute( "width", KoUnit::parseValue( object.attributeNS( ooNS::svg, "width", TQString() ) ) ); + size.setAttribute( "height", KoUnit::parseValue( object.attributeNS( ooNS::svg, "height", TQString() ) ) ); e.appendChild( size ); if( object.hasAttributeNS( ooNS::draw, "transform" )) { kdDebug(30518)<<" object transform \n"; //todo parse it - QString transform = object.attributeNS( ooNS::draw, "transform", QString::null ); - if( transform.contains("rotate (")) + TQString transform = object.attributeNS( ooNS::draw, "transform", TQString() ); + if( transform.tqcontains("rotate (")) { //kdDebug(30518)<<" rotate object \n"; transform = transform.remove("rotate (" ); - transform = transform.left(transform.find(")")); + transform = transform.left(transform.tqfind(")")); //kdDebug(30518)<<" transform :"<<transform<<endl; bool ok; double radian = transform.toDouble(&ok); if( ok ) { - QDomElement angle = doc.createElement( "ANGLE" ); + TQDomElement angle = doc.createElement( "ANGLE" ); //angle is defined as a radian in oo but degree into kpresenter. angle.setAttribute("value", (-1 * ((radian*180)/M_PI))); @@ -849,27 +849,27 @@ void OoImpressImport::append2DGeometry( QDomDocument& doc, QDomElement& e, const } //return true if (x1 < x2) necessary to load correctly start-line and end-line -bool OoImpressImport::appendLineGeometry( QDomDocument& doc, QDomElement& e, const QDomElement& object, int offset ) +bool OoImpressImport::appendLineGeometry( TQDomDocument& doc, TQDomElement& e, const TQDomElement& object, int offset ) { - double x1 = KoUnit::parseValue( object.attributeNS( ooNS::svg, "x1", QString::null ) ); - double y1 = KoUnit::parseValue( object.attributeNS( ooNS::svg, "y1", QString::null ) ); - double x2 = KoUnit::parseValue( object.attributeNS( ooNS::svg, "x2", QString::null ) ); - double y2 = KoUnit::parseValue( object.attributeNS( ooNS::svg, "y2", QString::null ) ); + double x1 = KoUnit::parseValue( object.attributeNS( ooNS::svg, "x1", TQString() ) ); + double y1 = KoUnit::parseValue( object.attributeNS( ooNS::svg, "y1", TQString() ) ); + double x2 = KoUnit::parseValue( object.attributeNS( ooNS::svg, "x2", TQString() ) ); + double y2 = KoUnit::parseValue( object.attributeNS( ooNS::svg, "y2", TQString() ) ); - double x = QMIN( x1, x2 ); - double y = QMIN( y1, y2 ); + double x = TQMIN( x1, x2 ); + double y = TQMIN( y1, y2 ); - QDomElement orig = doc.createElement( "ORIG" ); + TQDomElement orig = doc.createElement( "ORIG" ); orig.setAttribute( "x", x ); orig.setAttribute( "y", y + offset ); e.appendChild( orig ); - QDomElement size = doc.createElement( "SIZE" ); + TQDomElement size = doc.createElement( "SIZE" ); size.setAttribute( "width", fabs( x1 - x2 ) ); size.setAttribute( "height", fabs( y1 - y2 ) ); e.appendChild( size ); - QDomElement linetype = doc.createElement( "LINETYPE" ); + TQDomElement linetype = doc.createElement( "LINETYPE" ); if ( ( x1 < x2 && y1 < y2 ) || ( x1 > x2 && y1 > y2 ) ) linetype.setAttribute( "value", 2 ); else @@ -879,18 +879,18 @@ bool OoImpressImport::appendLineGeometry( QDomDocument& doc, QDomElement& e, con return (x1 < x2); } -void OoImpressImport::appendPen( QDomDocument& doc, QDomElement& e ) +void OoImpressImport::appendPen( TQDomDocument& doc, TQDomElement& e ) { if ( m_styleStack.hasAttributeNS( ooNS::draw, "stroke" )) { - QDomElement pen = doc.createElement( "PEN" ); + TQDomElement pen = doc.createElement( "PEN" ); if ( m_styleStack.attributeNS( ooNS::draw, "stroke" ) == "none" ) pen.setAttribute( "style", 0 ); else if ( m_styleStack.attributeNS( ooNS::draw, "stroke" ) == "solid" ) pen.setAttribute( "style", 1 ); else if ( m_styleStack.attributeNS( ooNS::draw, "stroke" ) == "dash" ) { - QString style = m_styleStack.attributeNS( ooNS::draw, "stroke-dash" ); + TQString style = m_styleStack.attributeNS( ooNS::draw, "stroke-dash" ); if ( style == "Ultrafine Dashed" || style == "Fine Dashed" || style == "Fine Dashed (var)" || style == "Dashed (var)" ) pen.setAttribute( "style", 2 ); @@ -911,18 +911,18 @@ void OoImpressImport::appendPen( QDomDocument& doc, QDomElement& e ) } } -void OoImpressImport::appendBrush( QDomDocument& doc, QDomElement& e ) +void OoImpressImport::appendBrush( TQDomDocument& doc, TQDomElement& e ) { if ( m_styleStack.hasAttributeNS( ooNS::draw, "fill" ) ) { - const QString fill = m_styleStack.attributeNS( ooNS::draw, "fill" ); - //kdDebug(30518)<<"void OoImpressImport::appendBrush( QDomDocument& doc, QDomElement& e ) :"<<fill<<endl; + const TQString fill = m_styleStack.attributeNS( ooNS::draw, "fill" ); + //kdDebug(30518)<<"void OoImpressImport::appendBrush( TQDomDocument& doc, TQDomElement& e ) :"<<fill<<endl; if ( fill == "solid" ) { - QDomElement brush = doc.createElement( "BRUSH" ); + TQDomElement brush = doc.createElement( "BRUSH" ); if ( m_styleStack.hasAttributeNS( ooNS::draw, "transparency" ) ) { - QString transparency = m_styleStack.attributeNS( ooNS::draw, "transparency" ); + TQString transparency = m_styleStack.attributeNS( ooNS::draw, "transparency" ); transparency = transparency.remove( '%' ); int value = transparency.toInt(); if ( value >= 94 && value <= 99 ) @@ -962,22 +962,22 @@ void OoImpressImport::appendBrush( QDomDocument& doc, QDomElement& e ) } else if ( fill == "hatch" ) { - QDomElement brush = doc.createElement( "BRUSH" ); - QString style = m_styleStack.attributeNS( ooNS::draw, "fill-hatch-name" ); - QDomElement* draw = m_draws[style]; + TQDomElement brush = doc.createElement( "BRUSH" ); + TQString style = m_styleStack.attributeNS( ooNS::draw, "fill-hatch-name" ); + TQDomElement* draw = m_draws[style]; if ( draw ) { if( draw->hasAttributeNS( ooNS::draw, "color" ) ) - brush.setAttribute( "color", draw->attributeNS( ooNS::draw, "color", QString::null ) ); + brush.setAttribute( "color", draw->attributeNS( ooNS::draw, "color", TQString() ) ); int angle = 0; if( draw->hasAttributeNS( ooNS::draw, "rotation" )) { - angle = (draw->attributeNS( ooNS::draw, "rotation", QString::null ).toInt())/10; + angle = (draw->attributeNS( ooNS::draw, "rotation", TQString() ).toInt())/10; kdDebug(30518)<<"angle :"<<angle<<endl; } if( draw->hasAttributeNS( ooNS::draw, "style" )) { - QString styleHash = draw->attributeNS( ooNS::draw, "style", QString::null ); + TQString styleHash = draw->attributeNS( ooNS::draw, "style", TQString() ); if( styleHash == "single") { switch( angle ) @@ -1041,24 +1041,24 @@ void OoImpressImport::appendBrush( QDomDocument& doc, QDomElement& e ) // We have to set a brush with brushstyle != no background fill // otherwise the properties dialog for the object won't // display the preview for the gradient. - QDomElement brush = doc.createElement( "BRUSH" ); + TQDomElement brush = doc.createElement( "BRUSH" ); brush.setAttribute( "style", 1 ); e.appendChild( brush ); - QDomElement gradient = doc.createElement( "GRADIENT" ); - QString style = m_styleStack.attributeNS( ooNS::draw, "fill-gradient-name" ); + TQDomElement gradient = doc.createElement( "GRADIENT" ); + TQString style = m_styleStack.attributeNS( ooNS::draw, "fill-gradient-name" ); - QDomElement* draw = m_draws[style]; + TQDomElement* draw = m_draws[style]; if ( draw ) { - gradient.setAttribute( "color1", draw->attributeNS( ooNS::draw, "start-color", QString::null ) ); - gradient.setAttribute( "color2", draw->attributeNS( ooNS::draw, "end-color", QString::null ) ); + gradient.setAttribute( "color1", draw->attributeNS( ooNS::draw, "start-color", TQString() ) ); + gradient.setAttribute( "color2", draw->attributeNS( ooNS::draw, "end-color", TQString() ) ); - QString type = draw->attributeNS( ooNS::draw, "style", QString::null ); + TQString type = draw->attributeNS( ooNS::draw, "style", TQString() ); //kdDebug(30518)<<" type !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! :"<<type<<endl; if ( type == "linear" ) { - int angle = draw->attributeNS( ooNS::draw, "angle", QString::null ).toInt() / 10; + int angle = draw->attributeNS( ooNS::draw, "angle", TQString() ).toInt() / 10; // make sure the angle is between 0 and 359 angle = abs( angle ); @@ -1099,12 +1099,12 @@ void OoImpressImport::appendBrush( QDomDocument& doc, QDomElement& e ) // and (un-)balanced settings of kpresenter. Let's try it. int x, y; if ( draw->hasAttributeNS( ooNS::draw, "cx" ) ) - x = draw->attributeNS( ooNS::draw, "cx", QString::null ).remove( '%' ).toInt(); + x = draw->attributeNS( ooNS::draw, "cx", TQString() ).remove( '%' ).toInt(); else x = 50; if ( draw->hasAttributeNS( ooNS::draw, "cy" ) ) - y = draw->attributeNS( ooNS::draw, "cy", QString::null ).remove( '%' ).toInt(); + y = draw->attributeNS( ooNS::draw, "cy", TQString() ).remove( '%' ).toInt(); else y = 50; @@ -1124,22 +1124,22 @@ void OoImpressImport::appendBrush( QDomDocument& doc, QDomElement& e ) } e.appendChild( gradient ); - QDomElement fillType = doc.createElement( "FILLTYPE" ); + TQDomElement fillType = doc.createElement( "FILLTYPE" ); fillType.setAttribute( "value", 1 ); e.appendChild( fillType ); } } } -void OoImpressImport::appendPie( QDomDocument& doc, QDomElement& e, const QDomElement& object ) +void OoImpressImport::appendPie( TQDomDocument& doc, TQDomElement& e, const TQDomElement& object ) { - QDomElement angle = doc.createElement( "PIEANGLE" ); - int start = (int) ( object.attributeNS( ooNS::draw, "start-angle", QString::null ).toDouble() ); + TQDomElement angle = doc.createElement( "PIEANGLE" ); + int start = (int) ( object.attributeNS( ooNS::draw, "start-angle", TQString() ).toDouble() ); angle.setAttribute( "value", start * 16 ); e.appendChild( angle ); - QDomElement length = doc.createElement( "PIELENGTH" ); - int end = (int) ( object.attributeNS( ooNS::draw, "end-angle", QString::null ).toDouble() ); + TQDomElement length = doc.createElement( "PIELENGTH" ); + int end = (int) ( object.attributeNS( ooNS::draw, "end-angle", TQString() ).toDouble() ); if ( end < start ) length.setAttribute( "value", ( 360 - start + end ) * 16 ); else @@ -1147,16 +1147,16 @@ void OoImpressImport::appendPie( QDomDocument& doc, QDomElement& e, const QDomEl e.appendChild( length ); } -void OoImpressImport::appendImage( QDomDocument& doc, QDomElement& e, QDomElement& p, - const QDomElement& object ) +void OoImpressImport::appendImage( TQDomDocument& doc, TQDomElement& e, TQDomElement& p, + const TQDomElement& object ) { - QString fileName = storeImage( object ); + TQString fileName = storeImage( object ); // create a key for the picture - QTime time = QTime::currentTime(); - QDate date = QDate::currentDate(); + TQTime time = TQTime::currentTime(); + TQDate date = TQDate::tqcurrentDate(); - QDomElement image = doc.createElement( "KEY" ); + TQDomElement image = doc.createElement( "KEY" ); image.setAttribute( "msec", time.msec() ); image.setAttribute( "second", time.second() ); image.setAttribute( "minute", time.minute() ); @@ -1167,7 +1167,7 @@ void OoImpressImport::appendImage( QDomDocument& doc, QDomElement& e, QDomElemen image.setAttribute( "filename", fileName ); e.appendChild( image ); - QDomElement settings = doc.createElement( "PICTURESETTINGS" ); + TQDomElement settings = doc.createElement( "PICTURESETTINGS" ); if ( m_styleStack.hasAttributeNS( ooNS::draw, "color-mode" ) && ( m_styleStack.attributeNS( ooNS::draw, "color-mode" )=="greyscale" ) ) settings.setAttribute( "grayscal", 1 ); else @@ -1175,7 +1175,7 @@ void OoImpressImport::appendImage( QDomDocument& doc, QDomElement& e, QDomElemen if ( m_styleStack.hasAttributeNS( ooNS::draw, "luminance" ) ) { - QString str( m_styleStack.attributeNS( ooNS::draw, "luminance" ) ); + TQString str( m_styleStack.attributeNS( ooNS::draw, "luminance" ) ); str = str.remove( '%' ); settings.setAttribute( "bright", str ); } @@ -1187,36 +1187,36 @@ void OoImpressImport::appendImage( QDomDocument& doc, QDomElement& e, QDomElemen settings.setAttribute( "depth", 0 ); e.appendChild( settings ); - QDomElement effects = doc.createElement( "EFFECTS" ); + TQDomElement effects = doc.createElement( "EFFECTS" ); bool hasEffect = false; if ( m_styleStack.hasAttributeNS( ooNS::draw, "contrast" ) ) { - QString str( m_styleStack.attributeNS( ooNS::draw, "contrast" ) ); + TQString str( m_styleStack.attributeNS( ooNS::draw, "contrast" ) ); str = str.remove( '%' ); int val = str.toInt(); val = ( int )( 255.0 *val/100.0 ); effects.setAttribute( "type", "5" ); - effects.setAttribute( "param1", QString::number( val ) ); + effects.setAttribute( "param1", TQString::number( val ) ); hasEffect = true; } if ( hasEffect ) e.appendChild( effects ); - QDomElement key = image.cloneNode().toElement(); + TQDomElement key = image.cloneNode().toElement(); key.setAttribute( "name", "pictures/" + fileName ); p.appendChild( key ); } -void OoImpressImport::appendBackgroundImage( QDomDocument& doc, QDomElement& e, - QDomElement& p, const QDomElement& object ) +void OoImpressImport::appendBackgroundImage( TQDomDocument& doc, TQDomElement& e, + TQDomElement& p, const TQDomElement& object ) { - QString fileName = storeImage( object ); + TQString fileName = storeImage( object ); // create a key for the picture - QTime time = QTime::currentTime(); - QDate date = QDate::currentDate(); + TQTime time = TQTime::currentTime(); + TQDate date = TQDate::tqcurrentDate(); - QDomElement image = doc.createElement( "BACKPICTUREKEY" ); + TQDomElement image = doc.createElement( "BACKPICTUREKEY" ); image.setAttribute( "msec", time.msec() ); image.setAttribute( "second", time.second() ); image.setAttribute( "minute", time.minute() ); @@ -1227,32 +1227,32 @@ void OoImpressImport::appendBackgroundImage( QDomDocument& doc, QDomElement& e, image.setAttribute( "filename", fileName ); e.appendChild( image ); - QDomElement key = image.cloneNode().toElement(); + TQDomElement key = image.cloneNode().toElement(); key.setTagName( "KEY" ); key.setAttribute( "name", "pictures/" + fileName ); p.appendChild( key ); } -void OoImpressImport::appendBackgroundGradient( QDomDocument& doc, QDomElement& e, - const QDomElement& object ) +void OoImpressImport::appendBackgroundGradient( TQDomDocument& doc, TQDomElement& e, + const TQDomElement& object ) { - QDomElement backColor1 = doc.createElement( "BACKCOLOR1" ); - backColor1.setAttribute( "color", object.attributeNS( ooNS::draw, "start-color", QString::null ) ); + TQDomElement backColor1 = doc.createElement( "BACKCOLOR1" ); + backColor1.setAttribute( "color", object.attributeNS( ooNS::draw, "start-color", TQString() ) ); e.appendChild( backColor1 ); - QDomElement backColor2 = doc.createElement( "BACKCOLOR2" ); - backColor2.setAttribute( "color", object.attributeNS( ooNS::draw, "end-color", QString::null ) ); + TQDomElement backColor2 = doc.createElement( "BACKCOLOR2" ); + backColor2.setAttribute( "color", object.attributeNS( ooNS::draw, "end-color", TQString() ) ); e.appendChild( backColor2 ); - QDomElement backType = doc.createElement( "BACKTYPE" ); + TQDomElement backType = doc.createElement( "BACKTYPE" ); backType.setAttribute( "value", 0 ); // color/gradient e.appendChild( backType ); - QDomElement bcType = doc.createElement( "BCTYPE" ); - QString type = object.attributeNS( ooNS::draw, "style", QString::null ); + TQDomElement bcType = doc.createElement( "BCTYPE" ); + TQString type = object.attributeNS( ooNS::draw, "style", TQString() ); if ( type == "linear" ) { - int angle = object.attributeNS( ooNS::draw, "angle", QString::null ).toInt() / 10; + int angle = object.attributeNS( ooNS::draw, "angle", TQString() ).toInt() / 10; // make sure the angle is between 0 and 359 angle = abs( angle ); @@ -1291,18 +1291,18 @@ void OoImpressImport::appendBackgroundGradient( QDomDocument& doc, QDomElement& e.appendChild( bcType ); - QDomElement bGradient = doc.createElement( "BGRADIENT" ); + TQDomElement bGradient = doc.createElement( "BGRADIENT" ); // Hard to map between x- and y-center settings of ooimpress // and (un-)balanced settings of kpresenter. Let's try it. int x, y; if ( object.hasAttributeNS( ooNS::draw, "cx" ) ) - x = object.attributeNS( ooNS::draw, "cx", QString::null ).remove( '%' ).toInt(); + x = object.attributeNS( ooNS::draw, "cx", TQString() ).remove( '%' ).toInt(); else x = 50; if ( object.hasAttributeNS( ooNS::draw, "cy" ) ) - y = object.attributeNS( ooNS::draw, "cy", QString::null ).remove( '%' ).toInt(); + y = object.attributeNS( ooNS::draw, "cy", TQString() ).remove( '%' ).toInt(); else y = 50; @@ -1323,20 +1323,20 @@ void OoImpressImport::appendBackgroundGradient( QDomDocument& doc, QDomElement& e.appendChild( bGradient ); } -void OoImpressImport::appendRounding( QDomDocument& doc, QDomElement& e, const QDomElement& object ) +void OoImpressImport::appendRounding( TQDomDocument& doc, TQDomElement& e, const TQDomElement& object ) { if ( object.hasAttributeNS( ooNS::draw, "corner-radius" ) ) { // kpresenter uses percent, ooimpress uses cm ... hmm? - QDomElement rounding = doc.createElement( "RNDS" ); - int corner = static_cast<int>(KoUnit::parseValue(object.attributeNS( ooNS::draw, "corner-radius", QString::null))); + TQDomElement rounding = doc.createElement( "RNDS" ); + int corner = static_cast<int>(KoUnit::parseValue(object.attributeNS( ooNS::draw, "corner-radius", TQString()))); rounding.setAttribute( "x", corner ); rounding.setAttribute( "y", corner ); e.appendChild( rounding ); } } -void OoImpressImport::appendShadow( QDomDocument& doc, QDomElement& e ) +void OoImpressImport::appendShadow( TQDomDocument& doc, TQDomElement& e ) { // Note that ooimpress makes a difference between shadowed text and // a shadowed object while kpresenter only knows the attribute 'shadow'. @@ -1351,9 +1351,9 @@ void OoImpressImport::appendShadow( QDomDocument& doc, QDomElement& e ) m_styleStack.attributeNS( ooNS::fo, "text-shadow" ) != "none" ) { // use the shadow attribute to indicate a text-shadow - QDomElement shadow = doc.createElement( "SHADOW" ); - QString distance = m_styleStack.attributeNS( ooNS::fo, "text-shadow" ); - distance.truncate( distance.find( ' ' ) ); + TQDomElement shadow = doc.createElement( "SHADOW" ); + TQString distance = m_styleStack.attributeNS( ooNS::fo, "text-shadow" ); + distance.truncate( distance.tqfind( ' ' ) ); shadow.setAttribute( "distance", KoUnit::parseValue( distance ) ); shadow.setAttribute( "direction", 5 ); shadow.setAttribute( "color", "#a0a0a0" ); @@ -1364,7 +1364,7 @@ void OoImpressImport::appendShadow( QDomDocument& doc, QDomElement& e ) m_styleStack.attributeNS( ooNS::draw, "shadow" ) == "visible" ) { // use the shadow attribute to indicate an object-shadow - QDomElement shadow = doc.createElement( "SHADOW" ); + TQDomElement shadow = doc.createElement( "SHADOW" ); double x = KoUnit::parseValue( m_styleStack.attributeNS( ooNS::draw, "shadow-offset-x" ) ); double y = KoUnit::parseValue( m_styleStack.attributeNS( ooNS::draw, "shadow-offset-y" ) ); @@ -1419,20 +1419,20 @@ void OoImpressImport::appendShadow( QDomDocument& doc, QDomElement& e ) bool b = ( m_styleStack.attributeNS( ooNS::draw, "size-protect" ) == "true" ) || ( m_styleStack.attributeNS( ooNS::draw, "move-protect" ) == "true" ); if ( b ) { - QDomElement protect = doc.createElement( "PROTECT" ); + TQDomElement protect = doc.createElement( "PROTECT" ); protect.setAttribute("state" , b); e.appendChild(protect); } } } -void OoImpressImport::appendLineEnds( QDomDocument& doc, QDomElement& e, bool orderEndStartLine) +void OoImpressImport::appendLineEnds( TQDomDocument& doc, TQDomElement& e, bool orderEndStartLine) { const char* attr = orderEndStartLine ? "marker-start" : "marker-end"; if ( m_styleStack.hasAttributeNS( ooNS::draw, attr ) ) { - QDomElement lineBegin = doc.createElement( "LINEBEGIN" ); - QString type = m_styleStack.attributeNS( ooNS::draw, attr ); + TQDomElement lineBegin = doc.createElement( "LINEBEGIN" ); + TQString type = m_styleStack.attributeNS( ooNS::draw, attr ); if ( type == "Arrow" || type == "Small Arrow" || type == "Rounded short Arrow" || type == "Symmetric Arrow" || type == "Rounded large Arrow" || type == "Arrow concave" ) lineBegin.setAttribute( "value", 1 ); @@ -1451,8 +1451,8 @@ void OoImpressImport::appendLineEnds( QDomDocument& doc, QDomElement& e, bool or attr = orderEndStartLine ? "marker-end" : "marker-start"; if ( m_styleStack.hasAttributeNS( ooNS::draw, attr ) ) { - QDomElement lineEnd = doc.createElement( "LINEEND" ); - QString type = m_styleStack.attributeNS( ooNS::draw, attr ); + TQDomElement lineEnd = doc.createElement( "LINEEND" ); + TQString type = m_styleStack.attributeNS( ooNS::draw, attr ); if ( type == "Arrow" || type == "Small Arrow" || type == "Rounded short Arrow" || type == "Symmetric Arrow" || type == "Rounded large Arrow" || type == "Arrow concave" ) lineEnd.setAttribute( "value", 1 ); @@ -1470,7 +1470,7 @@ void OoImpressImport::appendLineEnds( QDomDocument& doc, QDomElement& e, bool or } } -void OoImpressImport::appendTextObjectMargin( QDomDocument& /*doc*/, QDomElement& e ) +void OoImpressImport::appendTextObjectMargin( TQDomDocument& /*doc*/, TQDomElement& e ) { if ( m_styleStack.hasAttributeNS( ooNS::fo, "padding" ) ) { @@ -1493,20 +1493,20 @@ void OoImpressImport::appendTextObjectMargin( QDomDocument& /*doc*/, QDomElement } } -QDomElement OoImpressImport::parseTextBox( QDomDocument& doc, const QDomElement& textBox ) +TQDomElement OoImpressImport::parseTextBox( TQDomDocument& doc, const TQDomElement& textBox ) { - QDomElement textObjectElement = doc.createElement( "TEXTOBJ" ); + TQDomElement textObjectElement = doc.createElement( "TEXTOBJ" ); appendTextObjectMargin( doc, textObjectElement ); - // vertical alignment + // vertical tqalignment if ( m_styleStack.hasAttributeNS( ooNS::draw, "textarea-vertical-align" ) ) { - QString alignment = m_styleStack.attributeNS( ooNS::draw, "textarea-vertical-align" ); - if ( alignment == "top" ) + TQString tqalignment = m_styleStack.attributeNS( ooNS::draw, "textarea-vertical-align" ); + if ( tqalignment == "top" ) textObjectElement.setAttribute( "verticalAlign", "top" ); - else if ( alignment == "middle" ) + else if ( tqalignment == "middle" ) textObjectElement.setAttribute( "verticalAlign", "center" ); - else if ( alignment == "bottom" ) + else if ( tqalignment == "bottom" ) textObjectElement.setAttribute( "verticalAlign", "bottom" ); textObjectElement.setAttribute("verticalValue", 0.0); @@ -1517,17 +1517,17 @@ QDomElement OoImpressImport::parseTextBox( QDomDocument& doc, const QDomElement& return textObjectElement; } -void OoImpressImport::parseParagraphs( QDomDocument& doc, QDomElement& textObjectElement, const QDomElement& parent ) +void OoImpressImport::parseParagraphs( TQDomDocument& doc, TQDomElement& textObjectElement, const TQDomElement& tqparent ) { - QDomElement t; - forEachElement( t, parent ) + TQDomElement t; + forEachElement( t, tqparent ) { m_styleStack.save(); - const QString localName = t.localName(); - const QString ns = t.namespaceURI(); + const TQString localName = t.localName(); + const TQString ns = t.namespaceURI(); const bool isTextNS = ns == ooNS::text; - QDomElement e; + TQDomElement e; if ( isTextNS && localName == "p" ) // text paragraph e = parseParagraph( doc, t ); else if ( isTextNS && localName == "h" ) // heading - can this happen in ooimpress? @@ -1552,17 +1552,17 @@ void OoImpressImport::parseParagraphs( QDomDocument& doc, QDomElement& textObjec } } -void OoImpressImport::applyListStyle( QDomElement& paragraph ) +void OoImpressImport::applyListStyle( TQDomElement& paragraph ) { // Spec: see 3.3.5 p137 if ( m_listStyleStack.hasListStyle() && m_nextItemIsListItem ) { - //const QDomElement listStyle = m_listStyleStack.currentListStyle(); + //const TQDomElement listStyle = m_listStyleStack.currentListStyle(); //bool heading = paragraph.localName() == "h"; m_nextItemIsListItem = false; - /*int level = heading ? paragraph.attributeNS( ooNS::text, "level", QString::null ).toInt() + /*int level = heading ? paragraph.attributeNS( ooNS::text, "level", TQString() ).toInt() : m_listStyleStack.level();*/ - QDomElement counter = paragraph.ownerDocument().createElement( "COUNTER" ); + TQDomElement counter = paragraph.ownerDocument().createElement( "COUNTER" ); counter.setAttribute( "numberingtype", 0 ); counter.setAttribute( "depth", 0 ); @@ -1574,20 +1574,20 @@ void OoImpressImport::applyListStyle( QDomElement& paragraph ) } } -static QDomElement findListLevelStyle( QDomElement& fullListStyle, int level ) +static TQDomElement findListLevelStyle( TQDomElement& fullListStyle, int level ) { - QDomElement listLevelItem; + TQDomElement listLevelItem; forEachElement( listLevelItem, fullListStyle ) { - if ( listLevelItem.attributeNS( ooNS::text, "level", QString::null ).toInt() == level ) + if ( listLevelItem.attributeNS( ooNS::text, "level", TQString() ).toInt() == level ) return listLevelItem; } - return QDomElement(); + return TQDomElement(); } -bool OoImpressImport::pushListLevelStyle( const QString& listStyleName, int level ) +bool OoImpressImport::pushListLevelStyle( const TQString& listStyleName, int level ) { - QDomElement* fullListStyle = m_listStyles[listStyleName]; + TQDomElement* fullListStyle = m_listStyles[listStyleName]; if ( !fullListStyle ) { kdWarning(30518) << "List style " << listStyleName << " not found!" << endl; return false; @@ -1596,12 +1596,12 @@ bool OoImpressImport::pushListLevelStyle( const QString& listStyleName, int leve return pushListLevelStyle( listStyleName, *fullListStyle, level ); } -bool OoImpressImport::pushListLevelStyle( const QString& listStyleName, // for debug only - QDomElement& fullListStyle, int level ) +bool OoImpressImport::pushListLevelStyle( const TQString& listStyleName, // for debug only + TQDomElement& fullListStyle, int level ) { // Find applicable list-level-style for level int i = level; - QDomElement listLevelStyle; + TQDomElement listLevelStyle; while ( i > 0 && listLevelStyle.isNull() ) { listLevelStyle = findListLevelStyle( fullListStyle, i ); --i; @@ -1615,14 +1615,14 @@ bool OoImpressImport::pushListLevelStyle( const QString& listStyleName, // for d return true; } -void OoImpressImport::parseList( QDomDocument& doc, QDomElement& textObjectElement, const QDomElement& list ) +void OoImpressImport::parseList( TQDomDocument& doc, TQDomElement& textObjectElement, const TQDomElement& list ) { //kdDebug(30518) << k_funcinfo << "parseList"<< endl; m_insideOrderedList = ( list.localName() == "ordered-list" ); - QString oldListStyleName = m_currentListStyleName; + TQString oldListStyleName = m_currentListStyleName; if ( list.hasAttributeNS( ooNS::text, "style-name" ) ) - m_currentListStyleName = list.attributeNS( ooNS::text, "style-name", QString::null ); + m_currentListStyleName = list.attributeNS( ooNS::text, "style-name", TQString() ); bool listOK = !m_currentListStyleName.isEmpty(); const int level = m_listStyleStack.level() + 1; //kdDebug(30518) << k_funcinfo << " listOK=" << listOK << " level=" << level << endl; @@ -1630,14 +1630,14 @@ void OoImpressImport::parseList( QDomDocument& doc, QDomElement& textObjectEleme listOK = pushListLevelStyle( m_currentListStyleName, level ); // Iterate over list items - QDomElement listItem; + TQDomElement listItem; forEachElement( listItem, list ) { // It's either list-header (normal text on top of list) or list-item m_nextItemIsListItem = ( listItem.localName() != "list-header" ); m_restartNumbering = -1; if ( listItem.hasAttributeNS( ooNS::text, "start-value" ) ) - m_restartNumbering = listItem.attributeNS( ooNS::text, "start-value", QString::null ).toInt(); + m_restartNumbering = listItem.attributeNS( ooNS::text, "start-value", TQString() ).toInt(); // ### Oasis: can be p h or list only. parseParagraphs( doc, textObjectElement, listItem ); m_restartNumbering = -1; @@ -1647,26 +1647,26 @@ void OoImpressImport::parseList( QDomDocument& doc, QDomElement& textObjectEleme m_currentListStyleName = oldListStyleName; } -QDomElement OoImpressImport::parseParagraph( QDomDocument& doc, const QDomElement& paragraph ) +TQDomElement OoImpressImport::parseParagraph( TQDomDocument& doc, const TQDomElement& paragraph ) { - QDomElement p = doc.createElement( "P" ); + TQDomElement p = doc.createElement( "P" ); // parse the paragraph-properties fillStyleStack( paragraph ); // Style name - QString styleName = m_styleStack.userStyleName("paragraph"); + TQString styleName = m_styleStack.userStyleName("paragraph"); if ( !styleName.isEmpty() ) { - QDomElement nameElem = doc.createElement("NAME"); + TQDomElement nameElem = doc.createElement("NAME"); nameElem.setAttribute("value", styleName); p.appendChild(nameElem); } - // Paragraph alignment + // Paragraph tqalignment if ( m_styleStack.hasAttributeNS( ooNS::fo, "text-align" ) ) { - QString align = m_styleStack.attributeNS( ooNS::fo, "text-align" ); + TQString align = m_styleStack.attributeNS( ooNS::fo, "text-align" ); if ( align == "center" ) p.setAttribute( "align", 4 ); else if ( align == "justify" ) @@ -1707,19 +1707,19 @@ QDomElement OoImpressImport::parseParagraph( QDomDocument& doc, const QDomElemen return p; } -void OoImpressImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& parent, - QDomElement& outputParagraph, uint& pos) +void OoImpressImport::parseSpanOrSimilar( TQDomDocument& doc, const TQDomElement& tqparent, + TQDomElement& outputParagraph, uint& pos) { - // Parse every child node of the parent + // Parse every child node of the tqparent // Can't use forEachElement here since we also care about text nodes - for( QDomNode node = parent.firstChild(); !node.isNull(); node = node.nextSibling() ) + for( TQDomNode node = tqparent.firstChild(); !node.isNull(); node = node.nextSibling() ) { - QDomElement ts = node.toElement(); - QString textData; - const QString localName( ts.localName() ); - const QString ns = ts.namespaceURI(); + TQDomElement ts = node.toElement(); + TQString textData; + const TQString localName( ts.localName() ); + const TQString ns = ts.namespaceURI(); const bool isTextNS = ns == ooNS::text; - QDomText t = node.toText(); + TQDomText t = node.toText(); // Try to keep the order of the tag names by probability of happening if ( isTextNS && localName == "span" ) // text:span @@ -1736,7 +1736,7 @@ void OoImpressImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& else if ( isTextNS && localName == "tab-stop" ) // text:tab-stop { // KPresenter currently uses \t. - // Known bug: a line with only \t\t\t\t isn't loaded - XML (QDom) strips out whitespace. + // Known bug: a line with only \t\t\t\t isn't loaded - XML (TQDom) strips out whitespace. // One more good reason to switch to <text:tab-stop> instead... textData = '\t'; } @@ -1752,7 +1752,7 @@ void OoImpressImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& else if ( isTextNS && localName == "a" ) { m_styleStack.save(); - QString href( ts.attributeNS( ooNS::xlink, "href", QString::null) ); + TQString href( ts.attributeNS( ooNS::xlink, "href", TQString()) ); if ( href.startsWith("#") ) { // We have a reference to a bookmark (### TODO) @@ -1764,13 +1764,13 @@ void OoImpressImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& #if 0 // TODO // The problem is that KPresenter's hyperlink text is not inside the normal text, but for OOWriter it is nearly a <text:span> // So we have to fake. - QDomElement fakeParagraph, fakeFormats; + TQDomElement fakeParagraph, fakeFormats; uint fakePos=0; - QString text; + TQString text; parseSpanOrSimilar( doc, ts, fakeParagraph, fakeFormats, text, fakePos); textData = '#'; // hyperlink placeholder - QDomElement linkElement (doc.createElement("LINK")); - linkElement.setAttribute("hrefName",ts.attributeNS( ooNS::xlink, "href", QString::null)); + TQDomElement linkElement (doc.createElement("LINK")); + linkElement.setAttribute("hrefName",ts.attributeNS( ooNS::xlink, "href", TQString())); linkElement.setAttribute("linkName",text); appendVariable(doc, ts, pos, "STRING", 9, text, linkElement); #endif @@ -1798,12 +1798,12 @@ void OoImpressImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& pos += textData.length(); - QDomElement text = saveHelper(textData, doc); + TQDomElement text = saveHelper(textData, doc); kdDebug(30518) << k_funcinfo << "Para text is: " << textData << endl; if (m_styleStack.hasAttributeNS( ooNS::fo, "language" )) { - QString lang = m_styleStack.attributeNS( ooNS::fo, "language" ); + TQString lang = m_styleStack.attributeNS( ooNS::fo, "language" ); if (lang=="en") text.setAttribute("language", "en_US"); else @@ -1830,7 +1830,7 @@ void OoImpressImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& if ( m_styleStack.hasAttributeNS( ooNS::fo, "font-size" ) ) { double pointSize = m_styleStack.fontSize(); - text.setAttribute( "pointSize", qRound(pointSize) ); // KPresenter uses toInt()! + text.setAttribute( "pointSize", tqRound(pointSize) ); // KPresenter uses toInt()! } if ( m_styleStack.hasAttributeNS( ooNS::fo, "font-weight" ) ) // 3.10.24 if ( m_styleStack.attributeNS( ooNS::fo, "font-weight" ) == "bold" ) @@ -1841,9 +1841,9 @@ void OoImpressImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& if ( m_styleStack.hasAttributeNS( ooNS::style, "text-position" ) ) // 3.10.17 { - QString text_position = m_styleStack.attributeNS( ooNS::style, "text-position"); - QString value; - QString relativetextsize; + TQString text_position = m_styleStack.attributeNS( ooNS::style, "text-position"); + TQString value; + TQString relativetextsize; OoUtils::importTextPosition( text_position, value, relativetextsize ); text.setAttribute( "VERTALIGN", value ); if ( !relativetextsize.isEmpty() ) @@ -1857,7 +1857,7 @@ void OoImpressImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& if ( m_styleStack.hasAttributeNS( ooNS::style, "text-crossing-out")// 3.10.6 && m_styleStack.attributeNS( ooNS::style, "text-crossing-out") != "none") { - QString strikeOutType = m_styleStack.attributeNS( ooNS::style, "text-crossing-out" ); + TQString strikeOutType = m_styleStack.attributeNS( ooNS::style, "text-crossing-out" ); if ( strikeOutType =="double-line" ) { text.setAttribute( "strikeOut", "double" ); @@ -1881,11 +1881,11 @@ void OoImpressImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& // underlining if ( m_styleStack.hasAttributeNS( ooNS::style, "text-underline" ) ) // 3.10.22 { - QString underline; - QString styleline; + TQString underline; + TQString styleline; OoUtils::importUnderline( m_styleStack.attributeNS( ooNS::style, "text-underline" ), underline, styleline ); - QString underLineColor = m_styleStack.attributeNS( ooNS::style, "text-underline-color" );// 3.10.23 + TQString underLineColor = m_styleStack.attributeNS( ooNS::style, "text-underline-color" );// 3.10.23 text.setAttribute( "value", underline ); text.setAttribute( "styleline", styleline ); @@ -1900,7 +1900,7 @@ void OoImpressImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& if ( m_styleStack.hasAttributeNS( ooNS::fo, "font-variant" ) // 3.10.1 || m_styleStack.hasAttributeNS( ooNS::fo, "text-transform" ) ) // 3.10.2 { - QDomElement fontAttrib( doc.createElement( "FONTATTRIBUTE" ) ); + TQDomElement fontAttrib( doc.createElement( "FONTATTRIBUTE" ) ); bool smallCaps = m_styleStack.attributeNS( ooNS::fo, "font-variant" ) == "small-caps"; if ( smallCaps ) { @@ -1916,7 +1916,7 @@ void OoImpressImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& // background color (property of the paragraph in OOo, of the text in kword/kpresenter) if (m_styleStack.hasAttributeNS( ooNS::fo, "background-color" )) { - QString bgColor = m_styleStack.attributeNS( ooNS::fo, "background-color"); + TQString bgColor = m_styleStack.attributeNS( ooNS::fo, "background-color"); if (bgColor != "transparent") text.setAttribute("textbackcolor", bgColor); } @@ -1926,13 +1926,13 @@ void OoImpressImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& } // for each text span } -void OoImpressImport::createStyleMap( QDomDocument &docstyles ) +void OoImpressImport::createStyleMap( TQDomDocument &docstyles ) { - QDomElement styles = docstyles.documentElement(); + TQDomElement styles = docstyles.documentElement(); if ( styles.isNull() ) return; - QDomNode fixedStyles = KoDom::namedItemNS( styles, ooNS::office, "styles" ); + TQDomNode fixedStyles = KoDom::namedItemNS( styles, ooNS::office, "styles" ); if ( !fixedStyles.isNull() ) { insertDraws( fixedStyles.toElement() ); @@ -1940,148 +1940,148 @@ void OoImpressImport::createStyleMap( QDomDocument &docstyles ) insertStylesPresentation( fixedStyles.toElement() ); } - QDomNode automaticStyles = KoDom::namedItemNS( styles, ooNS::office, "automatic-styles" ); + TQDomNode automaticStyles = KoDom::namedItemNS( styles, ooNS::office, "automatic-styles" ); if ( !automaticStyles.isNull() ) { insertStyles( automaticStyles.toElement() ); insertStylesPresentation( automaticStyles.toElement() ); } - QDomNode masterStyles = KoDom::namedItemNS( styles, ooNS::office, "master-styles" ); + TQDomNode masterStyles = KoDom::namedItemNS( styles, ooNS::office, "master-styles" ); if ( !masterStyles.isNull() ) insertStyles( masterStyles.toElement() ); } -void OoImpressImport::insertDraws( const QDomElement& styles ) +void OoImpressImport::insertDraws( const TQDomElement& styles ) { - QDomElement e; + TQDomElement e; forEachElement( e, styles ) { if ( !e.hasAttributeNS( ooNS::draw, "name" ) ) continue; - QString name = e.attributeNS( ooNS::draw, "name", QString::null ); - m_draws.insert( name, new QDomElement( e ) ); + TQString name = e.attributeNS( ooNS::draw, "name", TQString() ); + m_draws.insert( name, new TQDomElement( e ) ); } } -void OoImpressImport::insertStyles( const QDomElement& styles ) +void OoImpressImport::insertStyles( const TQDomElement& styles ) { - QDomElement e; + TQDomElement e; forEachElement( e, styles ) { - const QString localName = e.localName(); - const QString ns = e.namespaceURI(); + const TQString localName = e.localName(); + const TQString ns = e.namespaceURI(); if ( !e.hasAttributeNS( ooNS::style, "name" ) ) continue; - const QString name = e.attributeNS( ooNS::style, "name", QString::null ); + const TQString name = e.attributeNS( ooNS::style, "name", TQString() ); if ( localName == "list-style" && ns == ooNS::text ) { - QDomElement* ep = new QDomElement( e ); + TQDomElement* ep = new TQDomElement( e ); m_listStyles.insert( name, ep ); kdDebug(30518) << "List style: '" << name << "' loaded " << endl; } else { - m_styles.insert( name, new QDomElement( e ) ); + m_styles.insert( name, new TQDomElement( e ) ); kdDebug(30518) << "Style: '" << name << "' loaded " << endl; } } } -void OoImpressImport::insertStylesPresentation( const QDomElement& styles ) +void OoImpressImport::insertStylesPresentation( const TQDomElement& styles ) { - QDomElement e; + TQDomElement e; forEachElement( e, styles ) { if ( !e.hasAttributeNS( ooNS::style, "name" ) ) continue; - QString name = e.attributeNS( ooNS::style, "name", QString::null ); - m_stylesPresentation.insert( name, new QDomElement( e ) ); + TQString name = e.attributeNS( ooNS::style, "name", TQString() ); + m_stylesPresentation.insert( name, new TQDomElement( e ) ); //kdDebug(30518) << "Style: '" << name << "' loaded " << endl; } } -void OoImpressImport::fillStyleStack( const QDomElement& object, bool sticky ) +void OoImpressImport::fillStyleStack( const TQDomElement& object, bool sticky ) { // find all styles associated with an object and push them on the stack if ( object.hasAttributeNS( ooNS::presentation, "style-name" ) ) { - kdDebug(30518)<<" presentation:style-name **************************** :"<<object.attributeNS( ooNS::presentation, "style-name", QString::null )<<endl; + kdDebug(30518)<<" presentation:style-name **************************** :"<<object.attributeNS( ooNS::presentation, "style-name", TQString() )<<endl; if ( sticky ) - addStyles( m_stylesPresentation[object.attributeNS( ooNS::presentation, "style-name", QString::null )] ); + addStyles( m_stylesPresentation[object.attributeNS( ooNS::presentation, "style-name", TQString() )] ); else - addStyles( m_styles[object.attributeNS( ooNS::presentation, "style-name", QString::null )] ); + addStyles( m_styles[object.attributeNS( ooNS::presentation, "style-name", TQString() )] ); } if ( object.hasAttributeNS( ooNS::draw, "style-name" ) ) - addStyles( m_styles[object.attributeNS( ooNS::draw, "style-name", QString::null )] ); + addStyles( m_styles[object.attributeNS( ooNS::draw, "style-name", TQString() )] ); if ( object.hasAttributeNS( ooNS::draw, "text-style-name" ) ) - addStyles( m_styles[object.attributeNS( ooNS::draw, "text-style-name", QString::null )] ); + addStyles( m_styles[object.attributeNS( ooNS::draw, "text-style-name", TQString() )] ); if ( object.hasAttributeNS( ooNS::text, "style-name" ) ) { - QString styleName = object.attributeNS( ooNS::text, "style-name", QString::null ); + TQString styleName = object.attributeNS( ooNS::text, "style-name", TQString() ); //kdDebug(30518) << "adding style " << styleName << endl; addStyles( m_styles[styleName] ); } } -void OoImpressImport::addStyles( const QDomElement* style ) +void OoImpressImport::addStyles( const TQDomElement* style ) { - kdDebug(30518)<<" addStyle :" << style->attributeNS( ooNS::style, "name", QString::null ) <<endl; - // this function is necessary as parent styles can have parents themself - if ( style->hasAttributeNS( ooNS::style, "parent-style-name" ) ) + kdDebug(30518)<<" addStyle :" << style->attributeNS( ooNS::style, "name", TQString() ) <<endl; + // this function is necessary as tqparent styles can have tqparents themself + if ( style->hasAttributeNS( ooNS::style, "tqparent-style-name" ) ) { - //kdDebug(30518)<<"m_styles[style->attribute( style:parent-style-name )] :"<<m_styles[style->attributeNS( ooNS::style, "parent-style-name", QString::null )]<<endl; - addStyles( m_styles[style->attributeNS( ooNS::style, "parent-style-name", QString::null )] ); + //kdDebug(30518)<<"m_styles[style->attribute( style:tqparent-style-name )] :"<<m_styles[style->attributeNS( ooNS::style, "tqparent-style-name", TQString() )]<<endl; + addStyles( m_styles[style->attributeNS( ooNS::style, "tqparent-style-name", TQString() )] ); } - //kdDebug(30518)<<" void OoImpressImport::addStyles( const QDomElement* style ) :"<<style<<endl; + //kdDebug(30518)<<" void OoImpressImport::addStyles( const TQDomElement* style ) :"<<style<<endl; m_styleStack.push( *style ); } -QString OoImpressImport::storeImage( const QDomElement& object ) +TQString OoImpressImport::storeImage( const TQDomElement& object ) { // store the picture - QString url = object.attributeNS( ooNS::xlink, "href", QString::null ).remove( '#' ); + TQString url = object.attributeNS( ooNS::xlink, "href", TQString() ).remove( '#' ); KArchiveFile* file = (KArchiveFile*) m_zip->directory()->entry( url ); - QString extension = url.mid( url.find( '.' ) ); - QString fileName = QString( "picture%1" ).arg( m_numPicture++ ) + extension; + TQString extension = url.mid( url.tqfind( '.' ) ); + TQString fileName = TQString( "picture%1" ).tqarg( m_numPicture++ ) + extension; KoStoreDevice* out = m_chain->storageFile( "pictures/" + fileName, KoStore::Write ); if ( file && out ) { - QByteArray buffer = file->data(); + TQByteArray buffer = file->data(); out->writeBlock( buffer.data(), buffer.size() ); } return fileName; } -QString OoImpressImport::storeSound(const QDomElement & object, QDomElement & p, QDomDocument & doc) +TQString OoImpressImport::storeSound(const TQDomElement & object, TQDomElement & p, TQDomDocument & doc) { - QFileInfo fi(m_chain->inputFile()); // handle relative URLs - QDir::setCurrent(fi.dirPath(true)); - fi.setFile(object.attributeNS( ooNS::xlink, "href", QString::null)); - QString url = fi.absFilePath(); + TQFileInfo fi(m_chain->inputFile()); // handle relative URLs + TQDir::setCurrent(fi.dirPath(true)); + fi.setFile(object.attributeNS( ooNS::xlink, "href", TQString())); + TQString url = fi.absFilePath(); //kdDebug(30518) << "Sound URL: " << url << endl; - QFile file(url); + TQFile file(url); if (!file.exists()) - return QString::null; + return TQString(); - QString extension = url.mid( url.find( '.' ) ); - QString fileName = QString( "sound%1" ).arg( m_numSound++ ) + extension; + TQString extension = url.mid( url.tqfind( '.' ) ); + TQString fileName = TQString( "sound%1" ).tqarg( m_numSound++ ) + extension; fileName = "sounds/" + fileName; KoStoreDevice* out = m_chain->storageFile( fileName, KoStore::Write ); if (out) { if (!file.open(IO_ReadOnly)) - return QString::null; + return TQString(); - QByteArray data(8*1024); + TQByteArray data(8*1024); uint total = 0; for ( int block = 0; ( block = file.readBlock(data.data(), data.size()) ) > 0; @@ -2093,9 +2093,9 @@ QString OoImpressImport::storeSound(const QDomElement & object, QDomElement & p, file.close(); } else - return QString::null; + return TQString(); - QDomElement key = doc.createElement("FILE"); + TQDomElement key = doc.createElement("FILE"); key.setAttribute("name", fileName); key.setAttribute("filename", url); p.appendChild(key); @@ -2103,29 +2103,29 @@ QString OoImpressImport::storeSound(const QDomElement & object, QDomElement & p, return url; } -QDomElement OoImpressImport::saveHelper(const QString &tmpText, QDomDocument &doc) +TQDomElement OoImpressImport::saveHelper(const TQString &tmpText, TQDomDocument &doc) { - QDomElement element=doc.createElement("TEXT"); + TQDomElement element=doc.createElement("TEXT"); if(tmpText.stripWhiteSpace().isEmpty()) // ### careful, this also strips \t and \n .... - // working around a bug in QDom + // working around a bug in TQDom element.setAttribute("whitespace", tmpText.length()); element.appendChild(doc.createTextNode(tmpText)); return element; } -void OoImpressImport::appendPoints(QDomDocument& doc, QDomElement& e, const QDomElement& object) +void OoImpressImport::appendPoints(TQDomDocument& doc, TQDomElement& e, const TQDomElement& object) { - QDomElement ptsElem = doc.createElement("POINTS"); + TQDomElement ptsElem = doc.createElement("POINTS"); - QStringList ptList = QStringList::split(' ', object.attributeNS( ooNS::draw, "points", QString::null)); + TQStringList ptList = TQStringList::split(' ', object.attributeNS( ooNS::draw, "points", TQString())); - QString pt_x, pt_y; + TQString pt_x, pt_y; double tmp_x, tmp_y; - for (QStringList::Iterator it = ptList.begin(); it != ptList.end(); ++it) + for (TQStringList::Iterator it = ptList.begin(); it != ptList.end(); ++it) { - QDomElement point = doc.createElement("Point"); + TQDomElement point = doc.createElement("Point"); tmp_x = (*it).section(',',0,0).toInt() / 100; tmp_y = (*it).section(',',1,1).toInt() / 100; @@ -2144,37 +2144,37 @@ void OoImpressImport::appendPoints(QDomDocument& doc, QDomElement& e, const QDom e.appendChild(ptsElem); } -void OoImpressImport::appendField(QDomDocument& doc, QDomElement& e, const QDomElement& object, uint pos) +void OoImpressImport::appendField(TQDomDocument& doc, TQDomElement& e, const TQDomElement& object, uint pos) { - const QString tag = object.localName(); - const QString ns = object.namespaceURI(); + const TQString tag = object.localName(); + const TQString ns = object.namespaceURI(); const bool isTextNS = ns == ooNS::text; - QDomElement custom = doc.createElement("CUSTOM"); + TQDomElement custom = doc.createElement("CUSTOM"); custom.setAttribute("pos", pos); - QDomElement variable = doc.createElement("VARIABLE"); + TQDomElement variable = doc.createElement("VARIABLE"); if (isTextNS && tag == "date") { - QDateTime dt(QDate::fromString(object.attributeNS( ooNS::text, "date-value", QString::null), Qt::ISODate)); + TQDateTime dt(TQDate::fromString(object.attributeNS( ooNS::text, "date-value", TQString()), Qt::ISODate)); - bool fixed = (object.hasAttributeNS( ooNS::text, "fixed") && object.attributeNS( ooNS::text, "fixed", QString::null)=="true"); + bool fixed = (object.hasAttributeNS( ooNS::text, "fixed") && object.attributeNS( ooNS::text, "fixed", TQString())=="true"); if (!dt.isValid()) { - dt = QDateTime::currentDateTime(); // OOo docs say so :) + dt = TQDateTime::tqcurrentDateTime(); // OOo docs say so :) fixed = false; } - QDomElement typeElem = doc.createElement("TYPE"); + TQDomElement typeElem = doc.createElement("TYPE"); typeElem.setAttribute("key", "DATE0locale"); // ### find out the correlation between KOffice and OOo date/time types typeElem.setAttribute("type", 0); // VT_DATE typeElem.setAttribute("text", object.text()); variable.appendChild(typeElem); - const QDate date(dt.date()); - const QTime time(dt.time()); - QDomElement dateElement = doc.createElement("DATE"); + const TQDate date(dt.date()); + const TQTime time(dt.time()); + TQDomElement dateElement = doc.createElement("DATE"); dateElement.setAttribute("subtype", fixed ? 0 : 1); // VST_DATE_FIX, VST_DATE_CURRENT dateElement.setAttribute("fix", fixed ? 1 : 0); dateElement.setAttribute("day", date.day()); @@ -2184,57 +2184,57 @@ void OoImpressImport::appendField(QDomDocument& doc, QDomElement& e, const QDomE dateElement.setAttribute("minute", time.minute()); dateElement.setAttribute("second", time.second()); if (object.hasAttributeNS( ooNS::text, "date-adjust")) - dateElement.setAttribute("correct", object.attributeNS( ooNS::text, "date-adjust", QString::null)); + dateElement.setAttribute("correct", object.attributeNS( ooNS::text, "date-adjust", TQString())); variable.appendChild(dateElement); } else if (isTextNS && tag == "time") { - // Use QDateTime to work around a possible problem of QTime::FromString in Qt 3.2.2 - QDateTime dt(QDateTime::fromString(object.attributeNS( ooNS::text, "time-value", QString::null), Qt::ISODate)); + // Use TQDateTime to work around a possible problem of TQTime::FromString in TQt 3.2.2 + TQDateTime dt(TQDateTime::fromString(object.attributeNS( ooNS::text, "time-value", TQString()), Qt::ISODate)); - bool fixed = (object.hasAttributeNS( ooNS::text, "fixed") && object.attributeNS( ooNS::text, "fixed", QString::null)=="true"); + bool fixed = (object.hasAttributeNS( ooNS::text, "fixed") && object.attributeNS( ooNS::text, "fixed", TQString())=="true"); if (!dt.isValid()) { - dt = QDateTime::currentDateTime(); // OOo docs say so :) + dt = TQDateTime::tqcurrentDateTime(); // OOo docs say so :) fixed = false; } - QDomElement typeElem = doc.createElement("TYPE"); + TQDomElement typeElem = doc.createElement("TYPE"); typeElem.setAttribute("key", "TIMElocale"); // ### find out the correlation between KOffice and OOo date/time types typeElem.setAttribute("type", 2); // VT_TIME typeElem.setAttribute("text", object.text()); variable.appendChild(typeElem); - const QTime time(dt.time()); - QDomElement timeElement = doc.createElement("TIME"); + const TQTime time(dt.time()); + TQDomElement timeElement = doc.createElement("TIME"); timeElement.setAttribute("subtype", fixed ? 0 : 1); // VST_TIME_FIX, VST_TIME_CURRENT timeElement.setAttribute("fix", fixed ? 1 : 0); timeElement.setAttribute("hour", time.hour()); timeElement.setAttribute("minute", time.minute()); timeElement.setAttribute("second", time.second()); /*if (object.hasAttributeNS( ooNS::text, "time-adjust")) - timeElem.setAttribute("correct", object.attributeNS( ooNS::text, "time-adjust", QString::null));*/ // ### TODO + timeElem.setAttribute("correct", object.attributeNS( ooNS::text, "time-adjust", TQString()));*/ // ### TODO variable.appendChild(timeElement); } else if (isTextNS && tag == "page-number") { - QDomElement typeElem = doc.createElement("TYPE"); + TQDomElement typeElem = doc.createElement("TYPE"); typeElem.setAttribute("key", "NUMBER"); typeElem.setAttribute("type", 4); // VT_PGNUM typeElem.setAttribute("text", object.text()); variable.appendChild(typeElem); - QDomElement pgNumElem = doc.createElement("PGNUM"); + TQDomElement pgNumElem = doc.createElement("PGNUM"); int subtype = 0; // VST_PGNUM_CURRENT if (object.hasAttributeNS( ooNS::text, "select-page")) { - const QString select = object.attributeNS( ooNS::text, "select-page", QString::null); + const TQString select = object.attributeNS( ooNS::text, "select-page", TQString()); if (select == "previous") subtype = 3; // VST_PGNUM_PREVIOUS @@ -2251,7 +2251,7 @@ void OoImpressImport::appendField(QDomDocument& doc, QDomElement& e, const QDomE } else if (isTextNS && tag == "file-name") { - QDomElement typeElem = doc.createElement("TYPE"); + TQDomElement typeElem = doc.createElement("TYPE"); typeElem.setAttribute("key", "STRING"); typeElem.setAttribute("type", 8); // VT_FIELD typeElem.setAttribute("text", object.text()); @@ -2262,7 +2262,7 @@ void OoImpressImport::appendField(QDomDocument& doc, QDomElement& e, const QDomE if (object.hasAttributeNS( ooNS::text, "display")) { - const QString display = object.attributeNS( ooNS::text, "display", QString::null); + const TQString display = object.attributeNS( ooNS::text, "display", TQString()); if (display == "path") subtype = 1; // VST_DIRECTORYNAME @@ -2274,7 +2274,7 @@ void OoImpressImport::appendField(QDomDocument& doc, QDomElement& e, const QDomE subtype = 5; // VST_PATHFILENAME } - QDomElement fileNameElem = doc.createElement("FIELD"); + TQDomElement fileNameElem = doc.createElement("FIELD"); fileNameElem.setAttribute("subtype", subtype); fileNameElem.setAttribute("value", object.text()); @@ -2283,7 +2283,7 @@ void OoImpressImport::appendField(QDomDocument& doc, QDomElement& e, const QDomE else if (isTextNS && tag == "author-name" || isTextNS && tag == "author-initials") { - QDomElement typeElem = doc.createElement("TYPE"); + TQDomElement typeElem = doc.createElement("TYPE"); typeElem.setAttribute("key", "STRING"); typeElem.setAttribute("type", 8); // VT_FIELD typeElem.setAttribute("text", object.text()); @@ -2295,7 +2295,7 @@ void OoImpressImport::appendField(QDomDocument& doc, QDomElement& e, const QDomE if (isTextNS && tag == "author-initials") subtype = 16; // VST_INITIAL - QDomElement authorElem = doc.createElement("FIELD"); + TQDomElement authorElem = doc.createElement("FIELD"); authorElem.setAttribute("subtype", subtype); authorElem.setAttribute("value", object.text()); @@ -2306,20 +2306,20 @@ void OoImpressImport::appendField(QDomDocument& doc, QDomElement& e, const QDomE e.appendChild(custom); } -void OoImpressImport::createPresentationAnimation(const QDomElement& element) +void OoImpressImport::createPresentationAnimation(const TQDomElement& element) { int order = 0; - QDomElement e; + TQDomElement e; forEachElement( e, element ) { - const QString localName = e.localName(); - const QString ns = e.namespaceURI(); - if ( ns == ooNS::presentation && localName == "show-shape" && e.hasAttributeNS( ooNS::draw, "shape-id" ) ) + const TQString localName = e.localName(); + const TQString ns = e.namespaceURI(); + if ( ns == ooNS::presentation && localName == "show-tqshape" && e.hasAttributeNS( ooNS::draw, "tqshape-id" ) ) { - QString name = e.attributeNS( ooNS::draw, "shape-id", QString::null ); + TQString name = e.attributeNS( ooNS::draw, "tqshape-id", TQString() ); //kdDebug(30518)<<" insert animation style : name :"<<name<<endl; animationList *lst = new animationList; - QDomElement* ep = new QDomElement( e ); + TQDomElement* ep = new TQDomElement( e ); lst->element = ep; lst->order = order; m_animations.insert( name, lst ); @@ -2328,41 +2328,41 @@ void OoImpressImport::createPresentationAnimation(const QDomElement& element) } } -QDomElement OoImpressImport::findAnimationByObjectID(const QString & id, int & order) +TQDomElement OoImpressImport::findAnimationByObjectID(const TQString & id, int & order) { - kdDebug(30518)<<"QDomElement OoImpressImport::findAnimationByObjectID(const QString & id) :"<<id<<endl; + kdDebug(30518)<<"TQDomElement OoImpressImport::findAnimationByObjectID(const TQString & id) :"<<id<<endl; if (m_animations.isEmpty() ) - return QDomElement(); + return TQDomElement(); animationList *animation = m_animations[id]; - //kdDebug(30518)<<"QDomElement *animation = m_animations[id]; :"<<animation<<endl; + //kdDebug(30518)<<"TQDomElement *animation = m_animations[id]; :"<<animation<<endl; if ( !animation ) - return QDomElement(); - for (QDomNode node = *( animation->element ); !node.isNull(); node = node.nextSibling()) + return TQDomElement(); + for (TQDomNode node = *( animation->element ); !node.isNull(); node = node.nextSibling()) { - QDomElement e = node.toElement(); + TQDomElement e = node.toElement(); order = animation->order; - kdDebug(30518)<<"e.tagName() :"<<e.tagName()<<" e.attribute(draw:shape-id) :"<<e.attributeNS( ooNS::draw, "shape-id", QString::null)<<endl; - if (e.tagName()=="presentation:show-shape" && e.attributeNS( ooNS::draw, "shape-id", QString::null)==id) + kdDebug(30518)<<"e.tagName() :"<<e.tagName()<<" e.attribute(draw:tqshape-id) :"<<e.attributeNS( ooNS::draw, "tqshape-id", TQString())<<endl; + if (e.tagName()=="presentation:show-tqshape" && e.attributeNS( ooNS::draw, "tqshape-id", TQString())==id) return e; } - return QDomElement(); + return TQDomElement(); } -void OoImpressImport::appendObjectEffect(QDomDocument& doc, QDomElement& e, const QDomElement& object, - QDomElement& sound) +void OoImpressImport::appendObjectEffect(TQDomDocument& doc, TQDomElement& e, const TQDomElement& object, + TQDomElement& sound) { int order = 0; - QDomElement origEffect = findAnimationByObjectID(object.attributeNS( ooNS::draw, "id", QString::null), order).toElement(); + TQDomElement origEffect = findAnimationByObjectID(object.attributeNS( ooNS::draw, "id", TQString()), order).toElement(); if (origEffect.isNull()) return; - QString effect = origEffect.attributeNS( ooNS::presentation, "effect", QString::null); - QString dir = origEffect.attributeNS( ooNS::presentation, "direction", QString::null); - QString speed = origEffect.attributeNS( ooNS::presentation, "speed", QString::null); + TQString effect = origEffect.attributeNS( ooNS::presentation, "effect", TQString()); + TQString dir = origEffect.attributeNS( ooNS::presentation, "direction", TQString()); + TQString speed = origEffect.attributeNS( ooNS::presentation, "speed", TQString()); kdDebug(30518)<<"speed :"<<speed<<endl; //todo implement speed value. @@ -2405,23 +2405,23 @@ void OoImpressImport::appendObjectEffect(QDomDocument& doc, QDomElement& e, cons else return; // sorry, no more supported effects :( - QDomElement effElem = doc.createElement("EFFECTS"); + TQDomElement effElem = doc.createElement("EFFECTS"); effElem.setAttribute("effect", effVal); e.appendChild(effElem); - QDomElement presNum = doc.createElement( "PRESNUM" ); + TQDomElement presNum = doc.createElement( "PRESNUM" ); presNum.setAttribute("value", order); e.appendChild( presNum ); // sound effect - QDomElement origSoundEff = KoDom::namedItemNS( origEffect, ooNS::presentation, "sound"); + TQDomElement origSoundEff = KoDom::namedItemNS( origEffect, ooNS::presentation, "sound"); if (!origSoundEff.isNull()) { - QString soundUrl = storeSound(origSoundEff, sound, doc); + TQString soundUrl = storeSound(origSoundEff, sound, doc); if (!soundUrl.isNull()) { - QDomElement pseElem = doc.createElement("APPEARSOUNDEFFECT"); + TQDomElement pseElem = doc.createElement("APPEARSOUNDEFFECT"); pseElem.setAttribute("appearSoundEffect", 1); pseElem.setAttribute("appearSoundFileName", soundUrl); diff --git a/filters/kpresenter/ooimpress/ooimpressimport.h b/filters/kpresenter/ooimpress/ooimpressimport.h index 403daf98..26d49420 100644 --- a/filters/kpresenter/ooimpress/ooimpressimport.h +++ b/filters/kpresenter/ooimpress/ooimpressimport.h @@ -24,9 +24,9 @@ #include <KoFilter.h> #include <KoStore.h> -#include <qdom.h> -#include <qdict.h> -#include <qcolor.h> +#include <tqdom.h> +#include <tqdict.h> +#include <tqcolor.h> #include <KoStyleStack.h> #include <liststylestack.h> @@ -34,83 +34,84 @@ class KZip; struct animationList { - QDomElement *element; + TQDomElement *element; int order; }; class OoImpressImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - OoImpressImport( KoFilter * parent, const char * name, const QStringList & ); + OoImpressImport( KoFilter * tqparent, const char * name, const TQStringList & ); virtual ~OoImpressImport(); - virtual KoFilter::ConversionStatus convert( QCString const & from, QCString const & to ); + virtual KoFilter::ConversiontqStatus convert( TQCString const & from, TQCString const & to ); private: - void createDocumentInfo( QDomDocument &docinfo ); - void createDocumentContent( QDomDocument &doccontent ); - void createStyleMap( QDomDocument &docstyles ); - void insertDraws( const QDomElement& styles ); - void insertStyles( const QDomElement& styles ); - void insertStylesPresentation( const QDomElement& styles ); - - void fillStyleStack( const QDomElement& object,bool sticky = false ); - void addStyles( const QDomElement* style ); - void appendName(QDomDocument& doc, QDomElement& e, const QDomElement& object); - void append2DGeometry( QDomDocument& doc, QDomElement& e, const QDomElement& object, int offset ); - bool appendLineGeometry( QDomDocument& doc, QDomElement& e, const QDomElement& object, int offset ); - void appendPoints(QDomDocument& doc, QDomElement& e, const QDomElement& object); - void appendPie( QDomDocument& doc, QDomElement& e, const QDomElement& object ); - void appendImage( QDomDocument& doc, QDomElement& e, QDomElement& p, const QDomElement& object ); - void appendBackgroundImage( QDomDocument& doc, QDomElement& e, QDomElement& p, const QDomElement& object ); - void appendBackgroundGradient( QDomDocument& doc, QDomElement& e, const QDomElement& object ); - void appendRounding( QDomDocument& doc, QDomElement& e, const QDomElement& object ); - void appendPen( QDomDocument& doc, QDomElement& e ); - void appendBrush( QDomDocument& doc, QDomElement& e ); - void appendShadow( QDomDocument& doc, QDomElement& e ); - void appendLineEnds( QDomDocument& doc, QDomElement& e, bool _orderEndStartLine = true ); - void appendTextObjectMargin( QDomDocument& doc, QDomElement& e ); - void appendField(QDomDocument& doc, QDomElement& e, const QDomElement& object, uint pos); - void createPresentationAnimation(const QDomElement& element); - QDomElement findAnimationByObjectID(const QString & id, int & order); - - void appendObjectEffect(QDomDocument& doc, QDomElement& e, const QDomElement& object, QDomElement& sound); - void appendBackgroundPage( QDomDocument &doc, QDomElement &e,QDomElement & pictureElement, QDomElement &soundElement ); - - QDomElement saveHelper(const QString &tmpText, QDomDocument &doc); - void appendObject(QDomNode & drawPage, QDomDocument & doc, QDomElement & soundElement, QDomElement & pictureElement, QDomElement & pageNoteElement, QDomElement &objectElement,double offset, bool sticky = false); - - QString storeImage( const QDomElement& object ); - QString storeSound(const QDomElement & object, QDomElement & p, QDomDocument & doc); - QDomElement parseTextBox( QDomDocument& doc, const QDomElement& textBox ); - bool pushListLevelStyle( const QString& listStyleName, int level ); - bool pushListLevelStyle( const QString& listStyleName, QDomElement& fullListStyle, int level ); - void applyListStyle( QDomElement& paragraph ); - void parseList( QDomDocument& doc, QDomElement& textObjectElement, const QDomElement& list ); - void parseParagraphs( QDomDocument& doc, QDomElement& textObjectElement, const QDomElement& textBox ); - QDomElement parseParagraph( QDomDocument& doc, const QDomElement& paragraph ); - void parseSpanOrSimilar( QDomDocument& doc, const QDomElement& parent, - QDomElement& outputParagraph, uint& pos); - bool parseSettings( QDomDocument &doc, QDomElement &helpLineElement, QDomElement &attributeElement ); - void parseHelpLine( QDomDocument &doc,QDomElement &helpLineElement, const QString &text ); - - KoFilter::ConversionStatus openFile(); - KoFilter::ConversionStatus loadAndParse(const QString& filename, QDomDocument& doc); + void createDocumentInfo( TQDomDocument &docinfo ); + void createDocumentContent( TQDomDocument &doccontent ); + void createStyleMap( TQDomDocument &docstyles ); + void insertDraws( const TQDomElement& styles ); + void insertStyles( const TQDomElement& styles ); + void insertStylesPresentation( const TQDomElement& styles ); + + void fillStyleStack( const TQDomElement& object,bool sticky = false ); + void addStyles( const TQDomElement* style ); + void appendName(TQDomDocument& doc, TQDomElement& e, const TQDomElement& object); + void append2DGeometry( TQDomDocument& doc, TQDomElement& e, const TQDomElement& object, int offset ); + bool appendLineGeometry( TQDomDocument& doc, TQDomElement& e, const TQDomElement& object, int offset ); + void appendPoints(TQDomDocument& doc, TQDomElement& e, const TQDomElement& object); + void appendPie( TQDomDocument& doc, TQDomElement& e, const TQDomElement& object ); + void appendImage( TQDomDocument& doc, TQDomElement& e, TQDomElement& p, const TQDomElement& object ); + void appendBackgroundImage( TQDomDocument& doc, TQDomElement& e, TQDomElement& p, const TQDomElement& object ); + void appendBackgroundGradient( TQDomDocument& doc, TQDomElement& e, const TQDomElement& object ); + void appendRounding( TQDomDocument& doc, TQDomElement& e, const TQDomElement& object ); + void appendPen( TQDomDocument& doc, TQDomElement& e ); + void appendBrush( TQDomDocument& doc, TQDomElement& e ); + void appendShadow( TQDomDocument& doc, TQDomElement& e ); + void appendLineEnds( TQDomDocument& doc, TQDomElement& e, bool _orderEndStartLine = true ); + void appendTextObjectMargin( TQDomDocument& doc, TQDomElement& e ); + void appendField(TQDomDocument& doc, TQDomElement& e, const TQDomElement& object, uint pos); + void createPresentationAnimation(const TQDomElement& element); + TQDomElement findAnimationByObjectID(const TQString & id, int & order); + + void appendObjectEffect(TQDomDocument& doc, TQDomElement& e, const TQDomElement& object, TQDomElement& sound); + void appendBackgroundPage( TQDomDocument &doc, TQDomElement &e,TQDomElement & pictureElement, TQDomElement &soundElement ); + + TQDomElement saveHelper(const TQString &tmpText, TQDomDocument &doc); + void appendObject(TQDomNode & drawPage, TQDomDocument & doc, TQDomElement & soundElement, TQDomElement & pictureElement, TQDomElement & pageNoteElement, TQDomElement &objectElement,double offset, bool sticky = false); + + TQString storeImage( const TQDomElement& object ); + TQString storeSound(const TQDomElement & object, TQDomElement & p, TQDomDocument & doc); + TQDomElement parseTextBox( TQDomDocument& doc, const TQDomElement& textBox ); + bool pushListLevelStyle( const TQString& listStyleName, int level ); + bool pushListLevelStyle( const TQString& listStyleName, TQDomElement& fullListStyle, int level ); + void applyListStyle( TQDomElement& paragraph ); + void parseList( TQDomDocument& doc, TQDomElement& textObjectElement, const TQDomElement& list ); + void parseParagraphs( TQDomDocument& doc, TQDomElement& textObjectElement, const TQDomElement& textBox ); + TQDomElement parseParagraph( TQDomDocument& doc, const TQDomElement& paragraph ); + void parseSpanOrSimilar( TQDomDocument& doc, const TQDomElement& tqparent, + TQDomElement& outputParagraph, uint& pos); + bool parseSettings( TQDomDocument &doc, TQDomElement &helpLineElement, TQDomElement &attributeElement ); + void parseHelpLine( TQDomDocument &doc,TQDomElement &helpLineElement, const TQString &text ); + + KoFilter::ConversiontqStatus openFile(); + KoFilter::ConversiontqStatus loadAndParse(const TQString& filename, TQDomDocument& doc); int m_numPicture; int m_numSound; - QDomDocument m_content; - QDomDocument m_meta; - QDomDocument m_settings; - QDict<QDomElement> m_styles, m_draws, m_stylesPresentation; - QDict<QDomElement> m_listStyles; - QDict<animationList> m_animations; + TQDomDocument m_content; + TQDomDocument m_meta; + TQDomDocument m_settings; + TQDict<TQDomElement> m_styles, m_draws, m_stylesPresentation; + TQDict<TQDomElement> m_listStyles; + TQDict<animationList> m_animations; bool m_insideOrderedList; bool m_nextItemIsListItem; // only the first elem inside list-item is numbered int m_restartNumbering; - QString m_currentListStyleName; + TQString m_currentListStyleName; KZip * m_zip; KoStyleStack m_styleStack; diff --git a/filters/kpresenter/ooimpress/status.html b/filters/kpresenter/ooimpress/status.html index b0062c04..f64a38b0 100644 --- a/filters/kpresenter/ooimpress/status.html +++ b/filters/kpresenter/ooimpress/status.html @@ -61,7 +61,7 @@ - Rounding (for rectangles)<br> - Shadow<br> - Text margins<br> - - Vertical alignment for text<br> + -Qt::Vertical tqalignment for text<br> - Text style (underline, sub/super script, bold, italic, strikeout, background color)<br> - Paragraph style (line spacing, offset before/after paragraph, indent first/right/left, borders)<br> - Presentation settings<br> @@ -168,7 +168,7 @@ - Settings element (snap line drawing)<br> - Export Transparency<br> - Export Group Object<br> - - Vertical alignment for text<br> + -Qt::Vertical tqalignment for text<br> - Text margins<br> - Export title/keyword/subject<br> - Custom Slide Show<br> diff --git a/filters/kpresenter/ooimpress/stylefactory.cc b/filters/kpresenter/ooimpress/stylefactory.cc index 0c7d9a2c..18ce339b 100644 --- a/filters/kpresenter/ooimpress/stylefactory.cc +++ b/filters/kpresenter/ooimpress/stylefactory.cc @@ -19,8 +19,8 @@ #include "stylefactory.h" -#include <qcolor.h> -#include <qdatetime.h> +#include <tqcolor.h> +#include <tqdatetime.h> #include <KoUnit.h> #include <kdebug.h> @@ -55,7 +55,7 @@ StyleFactory::~StyleFactory() { } -void StyleFactory::addOfficeStyles( QDomDocument & doc, QDomElement & styles ) +void StyleFactory::addOfficeStyles( TQDomDocument & doc, TQDomElement & styles ) { StrokeDashStyle * sd; for ( sd = m_strokeDashStyles.first(); sd ; sd = m_strokeDashStyles.next() ) @@ -78,12 +78,12 @@ void StyleFactory::addOfficeStyles( QDomDocument & doc, QDomElement & styles ) gr->toXML( doc, styles ); } -void StyleFactory::addOfficeMaster( QDomDocument & doc, QDomElement & master ) +void StyleFactory::addOfficeMaster( TQDomDocument & doc, TQDomElement & master ) { PageMasterStyle * p; for ( p = m_pageMasterStyles.first(); p ; p = m_pageMasterStyles.next() ) { - QDomElement masterPage = doc.createElement( "style:master-page" ); + TQDomElement masterPage = doc.createElement( "style:master-page" ); masterPage.setAttribute( "style:name", p->style() ); masterPage.setAttribute( "style:page-master-name", p->name() ); masterPage.setAttribute( "draw:style-name", "dp1" ); @@ -91,7 +91,7 @@ void StyleFactory::addOfficeMaster( QDomDocument & doc, QDomElement & master ) } } -void StyleFactory::addOfficeAutomatic( QDomDocument & doc, QDomElement & automatic ) +void StyleFactory::addOfficeAutomatic( TQDomDocument & doc, TQDomElement & automatic ) { PageMasterStyle * p; for ( p = m_pageMasterStyles.first(); p ; p = m_pageMasterStyles.next() ) @@ -100,7 +100,7 @@ void StyleFactory::addOfficeAutomatic( QDomDocument & doc, QDomElement & automat } } -void StyleFactory::addAutomaticStyles( QDomDocument & doc, QDomElement & autoStyles ) +void StyleFactory::addAutomaticStyles( TQDomDocument & doc, TQDomElement & autoStyles ) { ListStyle * l; for ( l = m_listStyles.first(); l ; l = m_listStyles.next() ) @@ -124,7 +124,7 @@ void StyleFactory::addAutomaticStyles( QDomDocument & doc, QDomElement & autoSty pg->toXML( doc, autoStyles ); } -QString StyleFactory::createStrokeDashStyle( int style ) +TQString StyleFactory::createStrokeDashStyle( int style ) { StrokeDashStyle * newStrokeDashStyle, * sd; newStrokeDashStyle = new StrokeDashStyle( style ); @@ -141,7 +141,7 @@ QString StyleFactory::createStrokeDashStyle( int style ) return newStrokeDashStyle->name(); } -QString StyleFactory::createGradientStyle( QDomElement & gradient ) +TQString StyleFactory::createGradientStyle( TQDomElement & gradient ) { GradientStyle * newGradientStyle, * g; newGradientStyle = new GradientStyle( gradient, m_gradientStyles.count() + 1 ); @@ -158,7 +158,7 @@ QString StyleFactory::createGradientStyle( QDomElement & gradient ) return newGradientStyle->name(); } -QString StyleFactory::createMarkerStyle( int style ) +TQString StyleFactory::createMarkerStyle( int style ) { MarkerStyle * newMarkerStyle, * m; newMarkerStyle = new MarkerStyle( style ); @@ -175,7 +175,7 @@ QString StyleFactory::createMarkerStyle( int style ) return newMarkerStyle->name(); } -QString StyleFactory::createHatchStyle( int style, QString & color ) +TQString StyleFactory::createHatchStyle( int style, TQString & color ) { HatchStyle * newHatchStyle, * h; newHatchStyle = new HatchStyle( style, color ); @@ -192,7 +192,7 @@ QString StyleFactory::createHatchStyle( int style, QString & color ) return newHatchStyle->name(); } -QString StyleFactory::createListStyle( QDomElement & e ) +TQString StyleFactory::createListStyle( TQDomElement & e ) { ListStyle * newListStyle, * l; newListStyle = new ListStyle( e, m_listStyles.count() + 1 ); @@ -209,7 +209,7 @@ QString StyleFactory::createListStyle( QDomElement & e ) return newListStyle->name(); } -QString StyleFactory::createPageStyle( QDomElement & e ) +TQString StyleFactory::createPageStyle( TQDomElement & e ) { PageStyle * newPageStyle, * p; newPageStyle = new PageStyle( this, e, m_pageStyles.count() + 1 ); @@ -226,7 +226,7 @@ QString StyleFactory::createPageStyle( QDomElement & e ) return newPageStyle->name(); } -QString StyleFactory::createTextStyle( QDomElement & e ) +TQString StyleFactory::createTextStyle( TQDomElement & e ) { TextStyle * newTextStyle, * t; newTextStyle = new TextStyle( e, m_textStyles.count() + 1 ); @@ -243,7 +243,7 @@ QString StyleFactory::createTextStyle( QDomElement & e ) return newTextStyle->name(); } -QString StyleFactory::createGraphicStyle( QDomElement & e ) +TQString StyleFactory::createGraphicStyle( TQDomElement & e ) { GraphicStyle * newGraphicStyle, * g; newGraphicStyle = new GraphicStyle( this, e, m_graphicStyles.count() ); @@ -260,7 +260,7 @@ QString StyleFactory::createGraphicStyle( QDomElement & e ) return newGraphicStyle->name(); } -QString StyleFactory::createParagraphStyle( QDomElement & e ) +TQString StyleFactory::createParagraphStyle( TQDomElement & e ) { ParagraphStyle * newParagraphStyle, * p; newParagraphStyle = new ParagraphStyle( e, m_paragraphStyles.count() + 1 ); @@ -277,7 +277,7 @@ QString StyleFactory::createParagraphStyle( QDomElement & e ) return newParagraphStyle->name(); } -QString StyleFactory::createPageMasterStyle( QDomElement & e ) +TQString StyleFactory::createPageMasterStyle( TQDomElement & e ) { PageMasterStyle * newPMStyle, * p; newPMStyle = new PageMasterStyle( e, m_pageMasterStyles.count() ); @@ -294,11 +294,11 @@ QString StyleFactory::createPageMasterStyle( QDomElement & e ) return newPMStyle->style(); } -QString StyleFactory::toCM( const QString & point ) +TQString StyleFactory::toCM( const TQString & point ) { double pt = point.toFloat(); double cm = KoUnit::toCM( pt ); - return QString( "%1cm" ).arg ( cm ); + return TQString( "%1cm" ).arg ( cm ); } StrokeDashStyle::StrokeDashStyle( int style ) @@ -340,9 +340,9 @@ StrokeDashStyle::StrokeDashStyle( int style ) } } -void StrokeDashStyle::toXML( QDomDocument & doc, QDomElement & e ) const +void StrokeDashStyle::toXML( TQDomDocument & doc, TQDomElement & e ) const { - QDomElement strokeDash = doc.createElement( "draw:stroke-dash" ); + TQDomElement strokeDash = doc.createElement( "draw:stroke-dash" ); strokeDash.setAttribute( "draw:name", m_name ); if ( !m_style.isNull() ) strokeDash.setAttribute( "draw:style", m_style ); @@ -360,9 +360,9 @@ void StrokeDashStyle::toXML( QDomDocument & doc, QDomElement & e ) const e.appendChild( strokeDash ); } -GradientStyle::GradientStyle( QDomElement & gradient, int index ) +GradientStyle::GradientStyle( TQDomElement & gradient, int index ) { - m_name = QString( "Gradient %1" ).arg( index ); + m_name = TQString( "Gradient %1" ).tqarg( index ); m_start_intensity = "100%"; m_end_intensity = "100%"; m_border = "0%"; @@ -371,10 +371,10 @@ GradientStyle::GradientStyle( QDomElement & gradient, int index ) if ( gradient.nodeName() == "PAGE" ) { // gradient from page background - QDomElement backColor1 = gradient.namedItem( "BACKCOLOR1" ).toElement(); - QDomElement backColor2 = gradient.namedItem( "BACKCOLOR2" ).toElement(); - QDomElement bcType = gradient.namedItem( "BCTYPE" ).toElement(); - QDomElement bGradient = gradient.namedItem( "BGRADIENT" ).toElement(); + TQDomElement backColor1 = gradient.namedItem( "BACKCOLOR1" ).toElement(); + TQDomElement backColor2 = gradient.namedItem( "BACKCOLOR2" ).toElement(); + TQDomElement bcType = gradient.namedItem( "BCTYPE" ).toElement(); + TQDomElement bGradient = gradient.namedItem( "BGRADIENT" ).toElement(); if ( !backColor1.isNull() ) m_start_color = backColor1.attribute( "color" ); @@ -393,8 +393,8 @@ GradientStyle::GradientStyle( QDomElement & gradient, int index ) { int cx = bGradient.attribute( "xfactor" ).toInt(); int cy = bGradient.attribute( "yfactor" ).toInt(); - m_cx = QString( "%1%" ).arg( cx / 4 + 50 ); - m_cy = QString( "%1%" ).arg( cy / 4 + 50 ); + m_cx = TQString( "%1%" ).tqarg( cx / 4 + 50 ); + m_cy = TQString( "%1%" ).tqarg( cy / 4 + 50 ); } } @@ -419,8 +419,8 @@ GradientStyle::GradientStyle( QDomElement & gradient, int index ) { int cx = gradient.attribute( "xfactor" ).toInt(); int cy = gradient.attribute( "yfactor" ).toInt(); - m_cx = QString( "%1%" ).arg( cx / 4 + 50 ); - m_cy = QString( "%1%" ).arg( cy / 4 + 50 ); + m_cx = TQString( "%1%" ).tqarg( cx / 4 + 50 ); + m_cy = TQString( "%1%" ).tqarg( cy / 4 + 50 ); } } @@ -459,9 +459,9 @@ GradientStyle::GradientStyle( QDomElement & gradient, int index ) } } -void GradientStyle::toXML( QDomDocument & doc, QDomElement & e ) const +void GradientStyle::toXML( TQDomDocument & doc, TQDomElement & e ) const { - QDomElement gradient = doc.createElement( "draw:gradient" ); + TQDomElement gradient = doc.createElement( "draw:gradient" ); gradient.setAttribute( "draw:name", m_name ); if ( !m_style.isNull() ) gradient.setAttribute( "draw:style", m_style ); @@ -527,9 +527,9 @@ MarkerStyle::MarkerStyle( int style ) } } -void MarkerStyle::toXML( QDomDocument & doc, QDomElement & e ) const +void MarkerStyle::toXML( TQDomDocument & doc, TQDomElement & e ) const { - QDomElement marker = doc.createElement( "draw:marker" ); + TQDomElement marker = doc.createElement( "draw:marker" ); marker.setAttribute( "draw:name", m_name ); if ( !m_viewBox.isNull() ) marker.setAttribute( "svg:viewBox", m_viewBox ); @@ -539,7 +539,7 @@ void MarkerStyle::toXML( QDomDocument & doc, QDomElement & e ) const e.appendChild( marker ); } -HatchStyle::HatchStyle( int style, QString & color ) +HatchStyle::HatchStyle( int style, TQString & color ) { m_color = color; @@ -584,9 +584,9 @@ HatchStyle::HatchStyle( int style, QString & color ) } } -void HatchStyle::toXML( QDomDocument & doc, QDomElement & e ) const +void HatchStyle::toXML( TQDomDocument & doc, TQDomElement & e ) const { - QDomElement hatch = doc.createElement( "draw:hatch" ); + TQDomElement hatch = doc.createElement( "draw:hatch" ); hatch.setAttribute( "draw:name", m_name ); if ( !m_style.isNull() ) hatch.setAttribute( "draw:style", m_style ); @@ -600,23 +600,23 @@ void HatchStyle::toXML( QDomDocument & doc, QDomElement & e ) const e.appendChild( hatch ); } -FillImageStyle::FillImageStyle( QString & name ) +FillImageStyle::FillImageStyle( TQString & name ) { } -void FillImageStyle::toXML( QDomDocument & doc, QDomElement & e ) const +void FillImageStyle::toXML( TQDomDocument & doc, TQDomElement & e ) const { } -PageMasterStyle::PageMasterStyle( QDomElement & e, const uint index ) +PageMasterStyle::PageMasterStyle( TQDomElement & e, const uint index ) { - QDomNode borders = e.namedItem( "PAPERBORDERS" ); - QDomElement b = borders.toElement(); + TQDomNode borders = e.namedItem( "PAPERBORDERS" ); + TQDomElement b = borders.toElement(); - m_name = QString( "PM%1" ).arg( index ); - m_style = QString( "Default%1" ).arg( index ); + m_name = TQString( "PM%1" ).tqarg( index ); + m_style = TQString( "Default%1" ).tqarg( index ); m_margin_top = StyleFactory::toCM( b.attribute( "ptTop" ) ); m_margin_bottom = StyleFactory::toCM( b.attribute( "ptBottom" ) ); m_margin_left = StyleFactory::toCM( b.attribute( "ptLeft" ) ); @@ -626,12 +626,12 @@ PageMasterStyle::PageMasterStyle( QDomElement & e, const uint index ) m_orientation = "landscape"; } -void PageMasterStyle::toXML( QDomDocument & doc, QDomElement & e ) const +void PageMasterStyle::toXML( TQDomDocument & doc, TQDomElement & e ) const { - QDomElement style = doc.createElement( "style:page-master" ); + TQDomElement style = doc.createElement( "style:page-master" ); style.setAttribute( "style:name", "PM0" ); - QDomElement properties = doc.createElement( "style:properties" ); + TQDomElement properties = doc.createElement( "style:properties" ); properties.setAttribute( "fo:margin-top", m_margin_top ); properties.setAttribute( "fo:margin-bottom", m_margin_bottom ); properties.setAttribute( "fo:margin-left", m_margin_left ); @@ -655,9 +655,9 @@ bool PageMasterStyle::operator==( const PageMasterStyle & pageMasterStyle ) cons m_orientation == pageMasterStyle.m_orientation ); } -PageStyle::PageStyle( StyleFactory * styleFactory, QDomElement & e, const uint index ) +PageStyle::PageStyle( StyleFactory * styleFactory, TQDomElement & e, const uint index ) { - QDomElement backMaster = e.namedItem( "BACKMASTER" ).toElement(); + TQDomElement backMaster = e.namedItem( "BACKMASTER" ).toElement(); if( !backMaster.isNull()) { int tmp=0; @@ -675,21 +675,21 @@ PageStyle::PageStyle( StyleFactory * styleFactory, QDomElement & e, const uint i m_bg_objects_visible = "true"; } - m_name = QString( "dp%1" ).arg( index ); + m_name = TQString( "dp%1" ).tqarg( index ); // check if this is an empty page tag if ( !e.hasChildNodes() ) return; - QDomElement backType = e.namedItem( "BACKTYPE" ).toElement(); + TQDomElement backType = e.namedItem( "BACKTYPE" ).toElement(); if ( backType.isNull() || backType.attribute( "value" ) == "0" ) { // color - QDomElement bcType = e.namedItem( "BCTYPE" ).toElement(); + TQDomElement bcType = e.namedItem( "BCTYPE" ).toElement(); if ( bcType.isNull() || bcType.attribute( "value" ) == "0" ) { // plain - QDomElement backColor = e.namedItem( "BACKCOLOR1" ).toElement(); + TQDomElement backColor = e.namedItem( "BACKCOLOR1" ).toElement(); m_fill = "solid"; m_fill_color = backColor.attribute( "color" ); } @@ -705,23 +705,23 @@ PageStyle::PageStyle( StyleFactory * styleFactory, QDomElement & e, const uint i // picture } - QDomElement pageDuration = e.namedItem( "PGTIMER" ).toElement(); + TQDomElement pageDuration = e.namedItem( "PGTIMER" ).toElement(); if ( !pageDuration.isNull() ) { - QTime time; + TQTime time; time = time.addSecs( pageDuration.attribute("timer").toInt() ); - QString hours( QString::number( time.hour() ).rightJustify( 2, '0' ) ); - QString ms( QString::number( time.minute() ).rightJustify( 2, '0' ) ); - QString sec( QString::number( time.second() ).rightJustify( 2, '0' ) ); + TQString hours( TQString::number( time.hour() ).rightJustify( 2, '0' ) ); + TQString ms( TQString::number( time.minute() ).rightJustify( 2, '0' ) ); + TQString sec( TQString::number( time.second() ).rightJustify( 2, '0' ) ); //ISO8601 chapter 5.5.3.2 - //QDate doesn't encode it as this format. - m_page_duration = QString( "PT%1H%2M%3S" ).arg( hours ).arg( ms ).arg( sec ); + //TQDate doesn't encode it as this format. + m_page_duration = TQString( "PT%1H%2M%3S" ).tqarg( hours ).tqarg( ms ).tqarg( sec ); } - QDomElement pageEffect = e.namedItem( "PGEFFECT" ).toElement(); + TQDomElement pageEffect = e.namedItem( "PGEFFECT" ).toElement(); if ( !pageEffect.isNull() ) { int tmp=0; @@ -842,13 +842,13 @@ PageStyle::PageStyle( StyleFactory * styleFactory, QDomElement & e, const uint i } } -void PageStyle::toXML( QDomDocument & doc, QDomElement & e ) const +void PageStyle::toXML( TQDomDocument & doc, TQDomElement & e ) const { - QDomElement style = doc.createElement( "style:style" ); + TQDomElement style = doc.createElement( "style:style" ); style.setAttribute( "style:name", m_name ); style.setAttribute( "style:family", "drawing-page" ); - QDomElement properties = doc.createElement( "style:properties" ); + TQDomElement properties = doc.createElement( "style:properties" ); properties.setAttribute( "presentation:background-visible", m_bg_visible ); properties.setAttribute( "presentation:background-objects-visible", m_bg_objects_visible ); @@ -897,13 +897,13 @@ bool PageStyle::operator==( const PageStyle & pageStyle ) const m_page_duration == pageStyle.m_page_duration ); } -TextStyle::TextStyle( QDomElement & e, const uint index ) +TextStyle::TextStyle( TQDomElement & e, const uint index ) { - m_name = QString( "T%1" ).arg( index ); + m_name = TQString( "T%1" ).tqarg( index ); if ( e.hasAttribute( "family" ) ) m_font_family = e.attribute( "family" ); if ( e.hasAttribute( "pointSize" ) ) - m_font_size = QString( "%1pt" ).arg( e.attribute( "pointSize" ) ); + m_font_size = TQString( "%1pt" ).tqarg( e.attribute( "pointSize" ) ); if ( e.hasAttribute( "color" ) ) m_color = e.attribute( "color" ); if ( e.hasAttribute( "bold" ) && e.attribute( "bold" ) == "1" ) @@ -921,8 +921,8 @@ TextStyle::TextStyle( QDomElement & e, const uint index ) } if ( e.hasAttribute( "underline" ) ) { - QString underline = e.attribute( "underline" ); - QString style = e.attribute( "underlinestyleline" ); + TQString underline = e.attribute( "underline" ); + TQString style = e.attribute( "underlinestyleline" ); m_text_underline_color = e.attribute( "underlinecolor" ); if ( style == "solid" ) @@ -948,13 +948,13 @@ TextStyle::TextStyle( QDomElement & e, const uint index ) } } -void TextStyle::toXML( QDomDocument & doc, QDomElement & e ) const +void TextStyle::toXML( TQDomDocument & doc, TQDomElement & e ) const { - QDomElement style = doc.createElement( "style:style" ); + TQDomElement style = doc.createElement( "style:style" ); style.setAttribute( "style:name", m_name ); style.setAttribute( "style:family", "text" ); - QDomElement properties = doc.createElement( "style:properties" ); + TQDomElement properties = doc.createElement( "style:properties" ); if ( !m_font_size.isNull() ) properties.setAttribute( "fo:font-size", m_font_size ); if ( !m_font_family.isNull() ) @@ -997,18 +997,18 @@ bool TextStyle::operator==( const TextStyle & textStyle ) const m_text_crossing_out == textStyle.m_text_crossing_out ); } -GraphicStyle::GraphicStyle( StyleFactory * styleFactory, QDomElement & e, const uint index ) +GraphicStyle::GraphicStyle( StyleFactory * styleFactory, TQDomElement & e, const uint index ) { - QDomNode pen = e.namedItem( "PEN" ); - QDomNode brush = e.namedItem( "BRUSH" ); - QDomNode linebegin = e.namedItem( "LINEBEGIN" ); - QDomNode lineend = e.namedItem( "LINEEND" ); - QDomNode gradient = e.namedItem( "GRADIENT" ); - QDomNode shadow = e.namedItem( "SHADOW" ); - QDomNode textObject = e.namedItem( "TEXTOBJ" ); + TQDomNode pen = e.namedItem( "PEN" ); + TQDomNode brush = e.namedItem( "BRUSH" ); + TQDomNode linebegin = e.namedItem( "LINEBEGIN" ); + TQDomNode lineend = e.namedItem( "LINEEND" ); + TQDomNode gradient = e.namedItem( "GRADIENT" ); + TQDomNode shadow = e.namedItem( "SHADOW" ); + TQDomNode textObject = e.namedItem( "TEXTOBJ" ); if ( !textObject.isNull() ) { - QDomElement textObjectElement = textObject.toElement(); + TQDomElement textObjectElement = textObject.toElement(); if ( textObjectElement.hasAttribute( "verticalAlign" ) ) { m_textAlignment = textObjectElement.attribute("verticalAlign"); @@ -1017,28 +1017,28 @@ GraphicStyle::GraphicStyle( StyleFactory * styleFactory, QDomElement & e, const } if ( textObjectElement.hasAttribute( "bleftpt" ) ) { - m_textMarginLeft = QString( "%1pt" ).arg( textObjectElement.attribute( "bleftpt" ) ); + m_textMarginLeft = TQString( "%1pt" ).tqarg( textObjectElement.attribute( "bleftpt" ) ); } if ( textObjectElement.hasAttribute( "bbottompt" ) ) { - m_textMarginBottom = QString( "%1pt" ).arg( textObjectElement.attribute( "bbottompt" ) ); + m_textMarginBottom = TQString( "%1pt" ).tqarg( textObjectElement.attribute( "bbottompt" ) ); } if ( textObjectElement.hasAttribute( "btoppt" ) ) { - m_textMarginTop = QString( "%1pt" ).arg( textObjectElement.attribute( "btoppt" ) ); + m_textMarginTop = TQString( "%1pt" ).tqarg( textObjectElement.attribute( "btoppt" ) ); } if ( textObjectElement.hasAttribute( "brightpt" ) ) { - m_textMarginRight = QString( "%1pt" ).arg( textObjectElement.attribute( "brightpt" ) ); + m_textMarginRight = TQString( "%1pt" ).tqarg( textObjectElement.attribute( "brightpt" ) ); } } - kdDebug(30518)<<" alignment :"<<m_textAlignment<<endl; + kdDebug(30518)<<" tqalignment :"<<m_textAlignment<<endl; - m_name = QString( "gr%1" ).arg( index ); + m_name = TQString( "gr%1" ).tqarg( index ); if ( !pen.isNull() ) { - QDomElement p = pen.toElement(); + TQDomElement p = pen.toElement(); m_stroke_width = StyleFactory::toCM( p.attribute( "width" ) ); m_stroke_color = p.attribute( "color" ); @@ -1056,7 +1056,7 @@ GraphicStyle::GraphicStyle( StyleFactory * styleFactory, QDomElement & e, const if ( !brush.isNull() ) { - QDomElement b = brush.toElement(); + TQDomElement b = brush.toElement(); m_fill_color = b.attribute( "color" ); int style = b.attribute( "style" ).toInt(); @@ -1087,7 +1087,7 @@ GraphicStyle::GraphicStyle( StyleFactory * styleFactory, QDomElement & e, const } else if ( !gradient.isNull() ) { - QDomElement g = gradient.toElement(); + TQDomElement g = gradient.toElement(); m_fill = "gradient"; m_fill_gradient_name = styleFactory->createGradientStyle( g ); } @@ -1096,7 +1096,7 @@ GraphicStyle::GraphicStyle( StyleFactory * styleFactory, QDomElement & e, const if ( !linebegin.isNull() ) { - QDomElement lb = linebegin.toElement(); + TQDomElement lb = linebegin.toElement(); m_marker_start_width = "0.25cm"; int style = lb.attribute( "value" ).toInt(); @@ -1105,7 +1105,7 @@ GraphicStyle::GraphicStyle( StyleFactory * styleFactory, QDomElement & e, const if ( !lineend.isNull() ) { - QDomElement le = lineend.toElement(); + TQDomElement le = lineend.toElement(); m_marker_end_width = "0.25cm"; int style = le.attribute( "value" ).toInt(); @@ -1114,12 +1114,12 @@ GraphicStyle::GraphicStyle( StyleFactory * styleFactory, QDomElement & e, const if ( !shadow.isNull() ) { - QDomElement s = shadow.toElement(); + TQDomElement s = shadow.toElement(); m_shadow = "visible"; m_shadow_color = s.attribute( "color" ); int direction = s.attribute( "direction" ).toInt(); - QString distance = StyleFactory::toCM( s.attribute( "distance" ) ); + TQString distance = StyleFactory::toCM( s.attribute( "distance" ) ); switch ( direction ) { case 1: @@ -1202,15 +1202,15 @@ GraphicStyle::GraphicStyle( const char * name, } -void GraphicStyle::toXML( QDomDocument & doc, QDomElement & e ) const +void GraphicStyle::toXML( TQDomDocument & doc, TQDomElement & e ) const { - QDomElement style = doc.createElement( "style:style" ); + TQDomElement style = doc.createElement( "style:style" ); style.setAttribute( "style:name", m_name ); style.setAttribute( "style:family", "graphics" ); if ( m_name != "standard" ) - style.setAttribute( "style:parent-style-name", "standard" ); + style.setAttribute( "style:tqparent-style-name", "standard" ); - QDomElement properties = doc.createElement( "style:properties" ); + TQDomElement properties = doc.createElement( "style:properties" ); if ( !m_stroke.isNull() ) properties.setAttribute( "draw:stroke", m_stroke ); if ( !m_stroke_dash.isNull() ) @@ -1335,24 +1335,24 @@ bool GraphicStyle::operator==( const GraphicStyle & graphicStyle ) const m_textMarginRight == graphicStyle.m_textMarginRight); } -ParagraphStyle::ParagraphStyle( QDomElement & e, const uint index ) +ParagraphStyle::ParagraphStyle( TQDomElement & e, const uint index ) { // some defaults that may be overwritten m_margin_left = "0cm"; m_margin_right = "0cm"; m_text_indent = "0cm"; - QDomNode shadow = e.namedItem( "SHADOW" ); - QDomNode indents = e.namedItem( "INDENTS" ); - QDomNode offsets = e.namedItem( "OFFSETS" ); - QDomNode leftBorder = e.namedItem( "LEFTBORDER" ); - QDomNode rightBorder = e.namedItem( "RIGHTBORDER" ); - QDomNode topBorder = e.namedItem( "TOPBORDER" ); - QDomNode bottomBorder = e.namedItem( "BOTTOMBORDER" ); - QDomNode lineSpacing = e.namedItem( "LINESPACING" ); - QDomNode counter = e.namedItem( "COUNTER" ); - - m_name = QString( "P%1" ).arg( index ); + TQDomNode shadow = e.namedItem( "SHADOW" ); + TQDomNode indents = e.namedItem( "INDENTS" ); + TQDomNode offsets = e.namedItem( "OFFSETS" ); + TQDomNode leftBorder = e.namedItem( "LEFTBORDER" ); + TQDomNode rightBorder = e.namedItem( "RIGHTBORDER" ); + TQDomNode topBorder = e.namedItem( "TOPBORDER" ); + TQDomNode bottomBorder = e.namedItem( "BOTTOMBORDER" ); + TQDomNode lineSpacing = e.namedItem( "LINESPACING" ); + TQDomNode counter = e.namedItem( "COUNTER" ); + + m_name = TQString( "P%1" ).tqarg( index ); if ( e.hasAttribute( "align" ) ) { int align = e.attribute( "align" ).toInt(); @@ -1375,14 +1375,14 @@ ParagraphStyle::ParagraphStyle( QDomElement & e, const uint index ) if ( !shadow.isNull() ) { - QDomElement s = shadow.toElement(); - QString distance = QString( "%1pt" ).arg( s.attribute( "distance" ) ); + TQDomElement s = shadow.toElement(); + TQString distance = TQString( "%1pt" ).tqarg( s.attribute( "distance" ) ); m_text_shadow = distance + " " + distance; } if ( !indents.isNull() ) { - QDomElement i = indents.toElement(); + TQDomElement i = indents.toElement(); m_margin_left = StyleFactory::toCM( i.attribute( "left" ) ); m_margin_right = StyleFactory::toCM( i.attribute( "right" ) ); m_text_indent = StyleFactory::toCM( i.attribute( "first" ) ); @@ -1390,7 +1390,7 @@ ParagraphStyle::ParagraphStyle( QDomElement & e, const uint index ) if ( !offsets.isNull() ) { - QDomElement o = offsets.toElement(); + TQDomElement o = offsets.toElement(); m_margin_top = StyleFactory::toCM( o.attribute( "before" ) ); m_margin_bottom = StyleFactory::toCM( o.attribute( "after" ) ); } @@ -1406,8 +1406,8 @@ ParagraphStyle::ParagraphStyle( QDomElement & e, const uint index ) if ( !lineSpacing.isNull() ) { - QDomElement l = lineSpacing.toElement(); - QString type = l.attribute( "type" ); + TQDomElement l = lineSpacing.toElement(); + TQString type = l.attribute( "type" ); if ( type == "single" ) m_line_height = "100%"; @@ -1416,7 +1416,7 @@ ParagraphStyle::ParagraphStyle( QDomElement & e, const uint index ) else if ( type == "double" ) m_line_height = "200%"; else if ( type == "multiple" ) - m_line_height = QString( "%1%" ).arg( l.attribute( "spacingvalue" ).toInt() * 100 ); + m_line_height = TQString( "%1%" ).tqarg( l.attribute( "spacingvalue" ).toInt() * 100 ); else if ( type == "custom" ) m_line_spacing = StyleFactory::toCM( l.attribute( "spacingvalue" ) ); else if ( type == "atleast" ) @@ -1427,13 +1427,13 @@ ParagraphStyle::ParagraphStyle( QDomElement & e, const uint index ) m_enable_numbering = "true"; } -void ParagraphStyle::toXML( QDomDocument & doc, QDomElement & e ) const +void ParagraphStyle::toXML( TQDomDocument & doc, TQDomElement & e ) const { - QDomElement style = doc.createElement( "style:style" ); + TQDomElement style = doc.createElement( "style:style" ); style.setAttribute( "style:name", m_name ); style.setAttribute( "style:family", "paragraph" ); - QDomElement properties = doc.createElement( "style:properties" ); + TQDomElement properties = doc.createElement( "style:properties" ); if ( !m_margin_left.isNull() ) properties.setAttribute( "fo:margin-left", m_margin_left ); if ( !m_margin_right.isNull() ) @@ -1488,32 +1488,32 @@ bool ParagraphStyle::operator==( const ParagraphStyle & paragraphStyle ) const m_line_spacing == paragraphStyle.m_line_spacing ); } -QString ParagraphStyle::parseBorder( QDomElement e ) +TQString ParagraphStyle::parseBorder( TQDomElement e ) { - QString style; + TQString style; int _style = e.attribute( "style" ).toInt(); if ( _style == 5 ) style = "double"; else style = "solid"; - QString width = StyleFactory::toCM( e.attribute( "width" ) ); + TQString width = StyleFactory::toCM( e.attribute( "width" ) ); - QColor color( e.attribute( "red" ).toInt(), + TQColor color( e.attribute( "red" ).toInt(), e.attribute( "green" ).toInt(), e.attribute( "blue" ).toInt() ); - return QString( "%1 %2 %3" ).arg( width ).arg( style ).arg( color.name() ); + return TQString( "%1 %2 %3" ).tqarg( width ).tqarg( style ).tqarg( color.name() ); } -ListStyle::ListStyle( QDomElement & e, const uint index ) +ListStyle::ListStyle( TQDomElement & e, const uint index ) { // setting some default values m_min_label_width = 0.6; m_color = "#000000"; m_font_size = "100%"; - m_name = QString( "L%1" ).arg( index ); + m_name = TQString( "L%1" ).tqarg( index ); if ( e.hasAttribute( "type" ) ) { @@ -1569,14 +1569,14 @@ ListStyle::ListStyle( QDomElement & e, const uint index ) m_font_family = e.attribute( "bulletfont" ); } -void ListStyle::toXML( QDomDocument & doc, QDomElement & e ) const +void ListStyle::toXML( TQDomDocument & doc, TQDomElement & e ) const { - QDomElement style = doc.createElement( "text:list-style" ); + TQDomElement style = doc.createElement( "text:list-style" ); style.setAttribute( "style:name", m_name ); for ( int level = 1; level <= 10; level++ ) { - QDomElement listLevelStyle; + TQDomElement listLevelStyle; if ( m_listLevelStyle == LLS_NUMBER ) { listLevelStyle = doc.createElement( "text:list-level-style-number" ); @@ -1594,13 +1594,13 @@ void ListStyle::toXML( QDomDocument & doc, QDomElement & e ) const listLevelStyle.setAttribute( "text:bullet-char", m_bullet_char ); } - QDomElement properties = doc.createElement( "style:properties" ); + TQDomElement properties = doc.createElement( "style:properties" ); if ( level > 1 ) { properties.setAttribute( "text:min-label-width", - QString( "%1cm" ).arg( m_min_label_width ) ); + TQString( "%1cm" ).tqarg( m_min_label_width ) ); properties.setAttribute( "text:space-before", - QString( "%1cm" ).arg( m_min_label_width * ( level - 1 ) ) ); + TQString( "%1cm" ).tqarg( m_min_label_width * ( level - 1 ) ) ); } if ( !m_color.isNull() ) diff --git a/filters/kpresenter/ooimpress/stylefactory.h b/filters/kpresenter/ooimpress/stylefactory.h index 9de6a548..86ee1089 100644 --- a/filters/kpresenter/ooimpress/stylefactory.h +++ b/filters/kpresenter/ooimpress/stylefactory.h @@ -21,10 +21,10 @@ #ifndef STYLEFACTORY_H #define STYLEFACTORY_H -#include <qptrlist.h> -#include <qstring.h> +#include <tqptrlist.h> +#include <tqstring.h> -#include <qdom.h> +#include <tqdom.h> class StyleFactory; @@ -34,29 +34,29 @@ public: StrokeDashStyle( int style ); ~StrokeDashStyle() {}; - void toXML( QDomDocument & doc, QDomElement & e ) const; - QString name() const { return m_name; }; + void toXML( TQDomDocument & doc, TQDomElement & e ) const; + TQString name() const { return m_name; }; private: StrokeDashStyle() {}; - QString m_name, m_style, m_dots1, m_dots2, m_dots1_length, m_dots2_length, + TQString m_name, m_style, m_dots1, m_dots2, m_dots1_length, m_dots2_length, m_distance; }; class GradientStyle { public: - GradientStyle( QDomElement & gradient, int index ); + GradientStyle( TQDomElement & gradient, int index ); ~GradientStyle() {}; - void toXML( QDomDocument & doc, QDomElement & e ) const; - QString name() const { return m_name; }; + void toXML( TQDomDocument & doc, TQDomElement & e ) const; + TQString name() const { return m_name; }; private: GradientStyle() {}; - QString m_name, m_style, m_cx, m_cy, m_start_color, m_end_color, + TQString m_name, m_style, m_cx, m_cy, m_start_color, m_end_color, m_start_intensity, m_end_intensity, m_angle, m_border; }; @@ -66,76 +66,76 @@ public: MarkerStyle( int style ); ~MarkerStyle() {}; - void toXML( QDomDocument & doc, QDomElement & e ) const; - QString name() const { return m_name; }; + void toXML( TQDomDocument & doc, TQDomElement & e ) const; + TQString name() const { return m_name; }; private: MarkerStyle() {}; - QString m_name, m_viewBox, m_d; + TQString m_name, m_viewBox, m_d; }; class HatchStyle { public: - HatchStyle( int style, QString & color ); + HatchStyle( int style, TQString & color ); ~HatchStyle() {}; - void toXML( QDomDocument & doc, QDomElement & e ) const; - QString name() const { return m_name; }; + void toXML( TQDomDocument & doc, TQDomElement & e ) const; + TQString name() const { return m_name; }; private: HatchStyle() {}; - QString m_name, m_style, m_color, m_distance, m_rotation; + TQString m_name, m_style, m_color, m_distance, m_rotation; }; class FillImageStyle { public: - FillImageStyle( QString & name ); + FillImageStyle( TQString & name ); ~FillImageStyle() {}; - void toXML( QDomDocument & doc, QDomElement & e ) const; + void toXML( TQDomDocument & doc, TQDomElement & e ) const; private: FillImageStyle() {}; - QString m_name, m_href, m_type, m_show, m_actuate; + TQString m_name, m_href, m_type, m_show, m_actuate; }; class PageMasterStyle { public: - PageMasterStyle( QDomElement & e, const uint index ); + PageMasterStyle( TQDomElement & e, const uint index ); ~PageMasterStyle() {}; - void toXML( QDomDocument & doc, QDomElement & e ) const; + void toXML( TQDomDocument & doc, TQDomElement & e ) const; bool operator==( const PageMasterStyle & pageMasterStyle ) const; - QString name() const { return m_name; }; - QString style() const { return m_style; }; + TQString name() const { return m_name; }; + TQString style() const { return m_style; }; private: PageMasterStyle() {}; - QString m_name, m_page_width, m_page_height, m_orientation, m_style; - QString m_margin_top, m_margin_bottom, m_margin_left, m_margin_right; + TQString m_name, m_page_width, m_page_height, m_orientation, m_style; + TQString m_margin_top, m_margin_bottom, m_margin_left, m_margin_right; }; class PageStyle { public: - PageStyle( StyleFactory * styleFactory, QDomElement & e, const uint index ); + PageStyle( StyleFactory * styleFactory, TQDomElement & e, const uint index ); ~PageStyle() {}; - void toXML( QDomDocument & doc, QDomElement & e ) const; + void toXML( TQDomDocument & doc, TQDomElement & e ) const; bool operator==( const PageStyle & pageStyle ) const; - QString name() const { return m_name; }; + TQString name() const { return m_name; }; private: PageStyle() {}; - QString m_name, m_bg_visible, m_bg_objects_visible, m_fill, m_fill_color, + TQString m_name, m_bg_visible, m_bg_objects_visible, m_fill, m_fill_color, m_fill_image_name, m_fill_image_width, m_fill_image_height, m_fill_image_ref_point, m_fill_gradient_name, m_repeat, m_page_effect, m_page_duration; @@ -144,17 +144,17 @@ private: class TextStyle { public: - TextStyle( QDomElement & e, const uint index ); + TextStyle( TQDomElement & e, const uint index ); ~TextStyle() {}; - void toXML( QDomDocument & doc, QDomElement & e ) const; + void toXML( TQDomDocument & doc, TQDomElement & e ) const; bool operator==( const TextStyle & textStyle ) const; - QString name() const { return m_name; }; + TQString name() const { return m_name; }; private: TextStyle() {}; - QString m_name, m_font_size, m_font_family, m_font_family_generic, + TQString m_name, m_font_size, m_font_family, m_font_family_generic, m_color, m_font_pitch, m_font_style, m_font_weight, m_text_shadow, m_text_underline, m_text_underline_color, m_text_crossing_out; }; @@ -162,7 +162,7 @@ private: class GraphicStyle { public: - GraphicStyle( StyleFactory * styleFactory, QDomElement & e, const uint index ); + GraphicStyle( StyleFactory * styleFactory, TQDomElement & e, const uint index ); GraphicStyle( const char * name, const char * stroke, const char * stroke_color, const char * stroke_width, const char * shadow, @@ -179,14 +179,14 @@ public: const char * enable_numbering ); ~GraphicStyle() {}; - void toXML( QDomDocument & doc, QDomElement & e ) const; + void toXML( TQDomDocument & doc, TQDomElement & e ) const; bool operator==( const GraphicStyle & graphicStyle ) const; - QString name() const { return m_name; }; + TQString name() const { return m_name; }; private: GraphicStyle() {}; - QString m_name, m_stroke, m_stroke_color, m_stroke_width, m_shadow, + TQString m_name, m_stroke, m_stroke_color, m_stroke_width, m_shadow, m_shadow_offset_x, m_shadow_offset_y, m_shadow_color, m_margin_left, m_margin_right, m_margin_top, m_margin_bottom, m_color, m_text_outline, m_text_crossing_out, m_font_family, m_font_size, m_font_style, @@ -200,18 +200,18 @@ private: class ParagraphStyle { public: - ParagraphStyle( QDomElement & e, const uint index ); + ParagraphStyle( TQDomElement & e, const uint index ); ~ParagraphStyle() {}; - void toXML( QDomDocument & doc, QDomElement & e ) const; + void toXML( TQDomDocument & doc, TQDomElement & e ) const; bool operator==( const ParagraphStyle & paragraphStyle ) const; - QString name() const { return m_name; }; + TQString name() const { return m_name; }; private: ParagraphStyle() {}; - QString parseBorder( QDomElement e ); + TQString parseBorder( TQDomElement e ); - QString m_name, m_margin_left, m_margin_right, m_text_indent, m_text_align, + TQString m_name, m_margin_left, m_margin_right, m_text_indent, m_text_align, m_enable_numbering, m_text_shadow, m_margin_top, m_margin_bottom, m_border_left, m_border_right, m_border_top, m_border_bottom, m_line_height, m_line_height_at_least, m_line_spacing; @@ -220,12 +220,12 @@ private: class ListStyle { public: - ListStyle( QDomElement & e, const uint index ); + ListStyle( TQDomElement & e, const uint index ); ~ListStyle() {}; - void toXML( QDomDocument & doc, QDomElement & e ) const; + void toXML( TQDomDocument & doc, TQDomElement & e ) const; bool operator==( const ListStyle & listStyle ) const; - QString name() const { return m_name; }; + TQString name() const { return m_name; }; private: ListStyle() {}; @@ -237,7 +237,7 @@ private: float m_min_label_width; list_level_style_t m_listLevelStyle; - QString m_name, m_num_suffix, m_num_format, m_bullet_char, m_color, + TQString m_name, m_num_suffix, m_num_format, m_bullet_char, m_color, m_font_size, m_font_family; }; @@ -247,36 +247,36 @@ public: StyleFactory(); ~StyleFactory(); - void addOfficeStyles( QDomDocument & doc, QDomElement & styles ); - void addOfficeMaster( QDomDocument & doc, QDomElement & master ); - void addOfficeAutomatic( QDomDocument & doc, QDomElement & automatic ); - void addAutomaticStyles( QDomDocument & doc, QDomElement & autoStyles ); + void addOfficeStyles( TQDomDocument & doc, TQDomElement & styles ); + void addOfficeMaster( TQDomDocument & doc, TQDomElement & master ); + void addOfficeAutomatic( TQDomDocument & doc, TQDomElement & automatic ); + void addAutomaticStyles( TQDomDocument & doc, TQDomElement & autoStyles ); - QString createStrokeDashStyle( int style ); - QString createGradientStyle( QDomElement & gradient ); - QString createMarkerStyle( int style ); - QString createHatchStyle( int style, QString & color ); - QString createListStyle( QDomElement & e ); - QString createPageStyle( QDomElement & e ); - QString createTextStyle( QDomElement & e ); - QString createGraphicStyle( QDomElement & e ); - QString createParagraphStyle( QDomElement & e ); - QString createPageMasterStyle( QDomElement & e ); + TQString createStrokeDashStyle( int style ); + TQString createGradientStyle( TQDomElement & gradient ); + TQString createMarkerStyle( int style ); + TQString createHatchStyle( int style, TQString & color ); + TQString createListStyle( TQDomElement & e ); + TQString createPageStyle( TQDomElement & e ); + TQString createTextStyle( TQDomElement & e ); + TQString createGraphicStyle( TQDomElement & e ); + TQString createParagraphStyle( TQDomElement & e ); + TQString createPageMasterStyle( TQDomElement & e ); - static QString toCM( const QString & point ); + static TQString toCM( const TQString & point ); private: - QPtrList<StrokeDashStyle> m_strokeDashStyles; - QPtrList<GradientStyle> m_gradientStyles; - QPtrList<HatchStyle> m_hatchStyles; - QPtrList<MarkerStyle> m_markerStyles; - QPtrList<FillImageStyle> m_fillImageStyles; - QPtrList<ListStyle> m_listStyles; - QPtrList<PageStyle> m_pageStyles; - QPtrList<TextStyle> m_textStyles; - QPtrList<GraphicStyle> m_graphicStyles; - QPtrList<ParagraphStyle> m_paragraphStyles; - QPtrList<PageMasterStyle> m_pageMasterStyles; + TQPtrList<StrokeDashStyle> m_strokeDashStyles; + TQPtrList<GradientStyle> m_gradientStyles; + TQPtrList<HatchStyle> m_hatchStyles; + TQPtrList<MarkerStyle> m_markerStyles; + TQPtrList<FillImageStyle> m_fillImageStyles; + TQPtrList<ListStyle> m_listStyles; + TQPtrList<PageStyle> m_pageStyles; + TQPtrList<TextStyle> m_textStyles; + TQPtrList<GraphicStyle> m_graphicStyles; + TQPtrList<ParagraphStyle> m_paragraphStyles; + TQPtrList<PageMasterStyle> m_pageMasterStyles; }; #endif diff --git a/filters/kpresenter/png/pngexport.cpp b/filters/kpresenter/png/pngexport.cpp index 571e7864..8bb6b054 100644 --- a/filters/kpresenter/png/pngexport.cpp +++ b/filters/kpresenter/png/pngexport.cpp @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include <qpixmap.h> -#include <qpainter.h> +#include <tqpixmap.h> +#include <tqpainter.h> #include <kmessagebox.h> @@ -33,7 +33,7 @@ typedef KGenericFactory<PngExport, KoFilter> PngExportFactory; K_EXPORT_COMPONENT_FACTORY( libkpresenterpngexport, PngExportFactory( "pngexport" ) ) -PngExport::PngExport(KoFilter *fil, const char *name, const QStringList&lst) +PngExport::PngExport(KoFilter *fil, const char *name, const TQStringList&lst) : ImageExport(fil,name,lst) { } @@ -62,7 +62,7 @@ const char * PngExport::exportFormat() return "image/png"; } -bool PngExport::saveImage( QString fileName) +bool PngExport::saveImage( TQString fileName) { bool ret = pixmap.save( fileName, "PNG" ); // Save the image. diff --git a/filters/kpresenter/png/pngexport.h b/filters/kpresenter/png/pngexport.h index 8856dbd8..692aa76a 100644 --- a/filters/kpresenter/png/pngexport.h +++ b/filters/kpresenter/png/pngexport.h @@ -25,11 +25,12 @@ class PngExport : public ImageExport { Q_OBJECT + TQ_OBJECT public: - PngExport(KoFilter *parent, const char *name, const QStringList&); + PngExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~PngExport(); - virtual bool saveImage( QString fileName); + virtual bool saveImage( TQString fileName); virtual bool extraImageAttribute(); virtual const char * exportFormat(); }; diff --git a/filters/kpresenter/powerpoint/import/powerpointimport.cc b/filters/kpresenter/powerpoint/import/powerpointimport.cc index 761e4f0d..6afdc659 100644 --- a/filters/kpresenter/powerpoint/import/powerpointimport.cc +++ b/filters/kpresenter/powerpoint/import/powerpointimport.cc @@ -26,11 +26,11 @@ #include <powerpointimport.h> #include <powerpointimport.moc> -#include <qbuffer.h> -#include <qcstring.h> -#include <qfile.h> -#include <qstring.h> -#include <qtextstream.h> +#include <tqbuffer.h> +#include <tqcstring.h> +#include <tqfile.h> +#include <tqstring.h> +#include <tqtextstream.h> #include <kdebug.h> #include <KoFilterChain.h> @@ -52,9 +52,9 @@ K_EXPORT_COMPONENT_FACTORY( libpowerpointimport, namespace Libppt { -inline QConstString string( const Libppt::UString& str ) +inline TQConstString string( const Libppt::UString& str ) { - return QConstString( reinterpret_cast<const QChar*>( str.data() ), str.length() ); + return TQConstString( reinterpret_cast<const TQChar*>( str.data() ), str.length() ); } } @@ -62,14 +62,14 @@ inline QConstString string( const Libppt::UString& str ) class PowerPointImport::Private { public: - QString inputFile; - QString outputFile; + TQString inputFile; + TQString outputFile; Presentation *presentation; }; -PowerPointImport::PowerPointImport ( QObject*, const char*, const QStringList& ) +PowerPointImport::PowerPointImport ( TQObject*, const char*, const TQStringList& ) : KoFilter() { d = new Private; @@ -80,7 +80,7 @@ PowerPointImport::~PowerPointImport() delete d; } -KoFilter::ConversionStatus PowerPointImport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus PowerPointImport::convert( const TQCString& from, const TQCString& to ) { if ( from != "application/mspowerpoint" ) return KoFilter::NotImplemented; @@ -143,21 +143,21 @@ KoFilter::ConversionStatus PowerPointImport::convert( const QCString& from, cons // we are done! delete d->presentation; delete storeout; - d->inputFile = QString::null; - d->outputFile = QString::null; + d->inputFile = TQString(); + d->outputFile = TQString(); d->presentation = 0; return KoFilter::OK; } -QByteArray PowerPointImport::createStyles() +TQByteArray PowerPointImport::createStyles() { KoXmlWriter* stylesWriter; - QByteArray stylesData; - QBuffer stylesBuffer( stylesData ); + TQByteArray stylesData; + TQBuffer stylesBuffer( stylesData ); - QString pageWidth = QString("%1pt").arg( d->presentation->masterSlide()->pageWidth() ); - QString pageHeight = QString("%1pt").arg( d->presentation->masterSlide()->pageHeight() ); + TQString pageWidth = TQString("%1pt").tqarg( d->presentation->masterSlide()->pageWidth() ); + TQString pageHeight = TQString("%1pt").tqarg( d->presentation->masterSlide()->pageHeight() ); stylesBuffer.open( IO_WriteOnly ); stylesWriter = new KoXmlWriter( &stylesBuffer ); @@ -178,10 +178,10 @@ QByteArray PowerPointImport::createStyles() // office:automatic-styles stylesWriter->startElement( "office:automatic-styles" ); - stylesWriter->startElement( "style:page-layout" ); + stylesWriter->startElement( "style:page-tqlayout" ); stylesWriter->addAttribute( "style:name","pm1" ); stylesWriter->addAttribute( "style:page-usage","all" ); - stylesWriter->startElement( "style:page-layout-properties" ); + stylesWriter->startElement( "style:page-tqlayout-properties" ); stylesWriter->addAttribute( "fo:margin-bottom","0pt" ); stylesWriter->addAttribute( "fo:margin-left","0pt" ); stylesWriter->addAttribute( "fo:margin-right","0pt" ); @@ -189,8 +189,8 @@ QByteArray PowerPointImport::createStyles() stylesWriter->addAttribute( "fo:page-height", pageHeight ); stylesWriter->addAttribute( "fo:page-width", pageWidth ); stylesWriter->addAttribute( "style:print-orientation","landscape" ); - stylesWriter->endElement(); // style:page-layout-properties - stylesWriter->endElement(); // style:page-layout + stylesWriter->endElement(); // style:page-tqlayout-properties + stylesWriter->endElement(); // style:page-tqlayout stylesWriter->startElement( "style:style" ); stylesWriter->addAttribute( "style:name","dp1" ); @@ -237,7 +237,7 @@ QByteArray PowerPointImport::createStyles() stylesWriter->startElement( "office:master-styles" ); stylesWriter->startElement( "style:master-page" ); stylesWriter->addAttribute( "style:name", "Standard" ); - stylesWriter->addAttribute( "style:page-layout-name", "pm1" ); + stylesWriter->addAttribute( "style:page-tqlayout-name", "pm1" ); stylesWriter->addAttribute( "draw:style-name", "dp1" ); stylesWriter->endElement(); stylesWriter->endElement(); @@ -247,7 +247,7 @@ QByteArray PowerPointImport::createStyles() delete stylesWriter; // for troubleshooting only !! - QString dbg; + TQString dbg; for( unsigned i=0; i<stylesData.size(); i++ ) dbg.append( stylesData[i] ); qDebug("\nstyles.xml:\n%s\n", dbg.latin1() ); @@ -256,11 +256,11 @@ QByteArray PowerPointImport::createStyles() } -QByteArray PowerPointImport::createContent() +TQByteArray PowerPointImport::createContent() { KoXmlWriter* contentWriter; - QByteArray contentData; - QBuffer contentBuffer( contentData ); + TQByteArray contentData; + TQBuffer contentBuffer( contentData ); contentBuffer.open( IO_WriteOnly ); contentWriter = new KoXmlWriter( &contentBuffer ); @@ -308,7 +308,7 @@ QByteArray PowerPointImport::createContent() delete contentWriter; // for troubleshooting only !! - QString dbg; + TQString dbg; for( unsigned i=0; i<contentData.size(); i++ ) dbg.append( contentData[i] ); qDebug("\ncontent.xml:\n%s\n", dbg.latin1() ); @@ -316,11 +316,11 @@ QByteArray PowerPointImport::createContent() return contentData; } -QByteArray PowerPointImport::createManifest() +TQByteArray PowerPointImport::createManifest() { KoXmlWriter* manifestWriter; - QByteArray manifestData; - QBuffer manifestBuffer( manifestData ); + TQByteArray manifestData; + TQBuffer manifestBuffer( manifestData ); manifestBuffer.open( IO_WriteOnly ); manifestWriter = new KoXmlWriter( &manifestBuffer ); @@ -339,7 +339,7 @@ QByteArray PowerPointImport::createManifest() delete manifestWriter; // for troubleshooting only !! - QString dbg; + TQString dbg; for( unsigned i=0; i<manifestData.size(); i++ ) dbg.append( manifestData[i] ); qDebug("\nmanifest.xml:\n%s\n", dbg.latin1() ); @@ -351,11 +351,11 @@ void PowerPointImport::processEllipse (DrawObject* drawObject, KoXmlWriter* xmlW { if( !drawObject || !xmlWriter ) return; - QString widthStr = QString("%1mm").arg( drawObject->width() ); - QString heightStr = QString("%1mm").arg( drawObject->height() ); - QString xStr = QString("%1mm").arg( drawObject->left() ); - QString yStr = QString("%1mm").arg( drawObject->top() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString widthStr = TQString("%1mm").tqarg( drawObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( drawObject->height() ); + TQString xStr = TQString("%1mm").tqarg( drawObject->left() ); + TQString yStr = TQString("%1mm").tqarg( drawObject->top() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); xmlWriter->startElement( "draw:ellipse" ); xmlWriter->addAttribute( "draw:style-name", styleName ); @@ -363,7 +363,7 @@ void PowerPointImport::processEllipse (DrawObject* drawObject, KoXmlWriter* xmlW xmlWriter->addAttribute( "svg:height", heightStr ); xmlWriter->addAttribute( "svg:x", xStr ); xmlWriter->addAttribute( "svg:y", yStr ); - xmlWriter->addAttribute( "draw:layer", "layout" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); xmlWriter->endElement(); // draw:ellipse } @@ -372,11 +372,11 @@ void PowerPointImport::processRectangle (DrawObject* drawObject, KoXmlWriter* xm if( !drawObject ) return; if( !xmlWriter ) return; - QString widthStr = QString("%1mm").arg( drawObject->width() ); - QString heightStr = QString("%1mm").arg( drawObject->height() ); - QString xStr = QString("%1mm").arg( drawObject->left() ); - QString yStr = QString("%1mm").arg( drawObject->top() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString widthStr = TQString("%1mm").tqarg( drawObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( drawObject->height() ); + TQString xStr = TQString("%1mm").tqarg( drawObject->left() ); + TQString yStr = TQString("%1mm").tqarg( drawObject->top() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); xmlWriter->startElement( "draw:rect" ); xmlWriter->addAttribute( "draw:style-name", styleName ); @@ -393,7 +393,7 @@ void PowerPointImport::processRectangle (DrawObject* drawObject, KoXmlWriter* xm double xNew = xVec*cos(rotAngle) - yVec*sin(rotAngle); double yNew = xVec*sin(rotAngle) + yVec*cos(rotAngle); - QString rot = QString("rotate (%1) translate (%2mm %3mm)").arg(rotAngle).arg(xNew+xMid).arg(yMid-yNew); + TQString rot = TQString("rotate (%1) translate (%2mm %3mm)").tqarg(rotAngle).tqarg(xNew+xMid).tqarg(yMid-yNew); xmlWriter->addAttribute( "draw:transform", rot ); } else @@ -401,7 +401,7 @@ void PowerPointImport::processRectangle (DrawObject* drawObject, KoXmlWriter* xm xmlWriter->addAttribute( "svg:x", xStr ); xmlWriter->addAttribute( "svg:y", yStr ); } - xmlWriter->addAttribute( "draw:layer", "layout" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); xmlWriter->endElement(); // draw:rect } @@ -409,13 +409,13 @@ void PowerPointImport::processRoundRectangle (DrawObject* drawObject, KoXmlWrite { if( !drawObject || !xmlWriter ) return; - QString widthStr = QString("%1mm").arg( drawObject->width() ); - QString heightStr = QString("%1mm").arg( drawObject->height() ); - QString xStr = QString("%1mm").arg( drawObject->left() ); - QString yStr = QString("%1mm").arg( drawObject->top() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString widthStr = TQString("%1mm").tqarg( drawObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( drawObject->height() ); + TQString xStr = TQString("%1mm").tqarg( drawObject->left() ); + TQString yStr = TQString("%1mm").tqarg( drawObject->top() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); - xmlWriter->startElement( "draw:custom-shape" ); + xmlWriter->startElement( "draw:custom-tqshape" ); xmlWriter->addAttribute( "draw:style-name", styleName ); @@ -435,7 +435,7 @@ void PowerPointImport::processRoundRectangle (DrawObject* drawObject, KoXmlWrite double xNew = xVec*cos(rotAngle) - yVec*sin(rotAngle); double yNew = xVec*sin(rotAngle) + yVec*cos(rotAngle); - QString rot = QString("rotate (%1) translate (%2mm %3mm)").arg(rotAngle).arg(xNew+xMid).arg(yMid+yNew); + TQString rot = TQString("rotate (%1) translate (%2mm %3mm)").tqarg(rotAngle).tqarg(xNew+xMid).tqarg(yMid+yNew); xmlWriter->addAttribute( "draw:transform", rot ); } else @@ -448,7 +448,7 @@ void PowerPointImport::processRoundRectangle (DrawObject* drawObject, KoXmlWrite double xNew = xVec*cos(rotAngle) - yVec*sin(rotAngle); double yNew = xVec*sin(rotAngle) + yVec*cos(rotAngle); - QString rot = QString("rotate (%1) translate (%2mm %3mm)").arg(rotAngle).arg(xNew+xMid).arg(yMid-yNew); + TQString rot = TQString("rotate (%1) translate (%2mm %3mm)").tqarg(rotAngle).tqarg(xNew+xMid).tqarg(yMid-yNew); xmlWriter->addAttribute( "draw:transform", rot ); } @@ -463,8 +463,8 @@ void PowerPointImport::processRoundRectangle (DrawObject* drawObject, KoXmlWrite // xmlWriter->addAttribute( "svg:x", xStr ); // xmlWriter->addAttribute( "svg:y", yStr ); - xmlWriter->addAttribute( "draw:layer", "layout" ); - xmlWriter->startElement( "draw:enhanced-geometry" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); + xmlWriter->startElement( "draw:enhanced-tqgeometry" ); xmlWriter->addAttribute( "draw:type", "round-rectangle"); xmlWriter->startElement( "draw:equation" ); xmlWriter->addAttribute( "draw:formula", "$0 /3" ); @@ -486,21 +486,21 @@ void PowerPointImport::processRoundRectangle (DrawObject* drawObject, KoXmlWrite xmlWriter->addAttribute( "draw:formula", "top+?f0 " ); xmlWriter->addAttribute( "draw:name", "f4" ); xmlWriter->endElement(); // draw:equation - xmlWriter->endElement(); // draw:enhanced-geometry - xmlWriter->endElement(); // draw:custom-shape + xmlWriter->endElement(); // draw:enhanced-tqgeometry + xmlWriter->endElement(); // draw:custom-tqshape } void PowerPointImport::processDiamond (DrawObject* drawObject, KoXmlWriter* xmlWriter ) { if( !drawObject || !xmlWriter ) return; - QString widthStr = QString("%1mm").arg( drawObject->width() ); - QString heightStr = QString("%1mm").arg( drawObject->height() ); - QString xStr = QString("%1mm").arg( drawObject->left() ); - QString yStr = QString("%1mm").arg( drawObject->top() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString widthStr = TQString("%1mm").tqarg( drawObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( drawObject->height() ); + TQString xStr = TQString("%1mm").tqarg( drawObject->left() ); + TQString yStr = TQString("%1mm").tqarg( drawObject->top() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); - xmlWriter->startElement( "draw:custom-shape" ); + xmlWriter->startElement( "draw:custom-tqshape" ); xmlWriter->addAttribute( "draw:style-name", styleName ); xmlWriter->addAttribute( "svg:width", widthStr ); xmlWriter->addAttribute( "svg:height", heightStr ); @@ -522,10 +522,10 @@ void PowerPointImport::processDiamond (DrawObject* drawObject, KoXmlWriter* xmlW xmlWriter->addAttribute( "svg:x", 10 ); xmlWriter->addAttribute( "svg:y", 5 ); xmlWriter->endElement(); - xmlWriter->startElement( "draw:enhanced-geometry" ); + xmlWriter->startElement( "draw:enhanced-tqgeometry" ); xmlWriter->addAttribute( "draw:type", "diamond"); xmlWriter->endElement(); - xmlWriter->addAttribute( "draw:layer", "layout" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); xmlWriter->endElement(); } @@ -533,20 +533,20 @@ void PowerPointImport::processTriangle (DrawObject* drawObject, KoXmlWriter* xml { if( !drawObject || !xmlWriter ) return; - QString widthStr = QString("%1mm").arg( drawObject->width() ); - QString heightStr = QString("%1mm").arg( drawObject->height() ); - QString xStr = QString("%1mm").arg( drawObject->left() ); - QString yStr = QString("%1mm").arg( drawObject->top() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString widthStr = TQString("%1mm").tqarg( drawObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( drawObject->height() ); + TQString xStr = TQString("%1mm").tqarg( drawObject->left() ); + TQString yStr = TQString("%1mm").tqarg( drawObject->top() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); /* draw IsocelesTriangle or RightTriangle */ - xmlWriter->startElement( "draw:custom-shape" ); + xmlWriter->startElement( "draw:custom-tqshape" ); xmlWriter->addAttribute( "draw:style-name", styleName ); xmlWriter->addAttribute( "svg:width", widthStr ); xmlWriter->addAttribute( "svg:height", heightStr ); xmlWriter->addAttribute( "svg:x", xStr ); xmlWriter->addAttribute( "svg:y", yStr ); - xmlWriter->addAttribute( "draw:layer", "layout" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); xmlWriter->startElement( "draw:glue-point" ); xmlWriter->addAttribute( "svg:x", 5 ); xmlWriter->addAttribute( "svg:y", 0 ); @@ -572,7 +572,7 @@ void PowerPointImport::processTriangle (DrawObject* drawObject, KoXmlWriter* xml xmlWriter->addAttribute( "svg:y", 5 ); xmlWriter->endElement(); - xmlWriter->startElement( "draw:enhanced-geometry" ); + xmlWriter->startElement( "draw:enhanced-tqgeometry" ); if (drawObject->hasProperty("draw:mirror-vertical")) { @@ -588,14 +588,14 @@ void PowerPointImport::processTriangle (DrawObject* drawObject, KoXmlWriter* xml double rotAngle = drawObject->getDoubleProperty("libppt:rotation" ); double xMid = ( drawObject->left() + 0.5*drawObject->width() ); double yMid = ( drawObject->top() + 0.5*drawObject->height() ); - QString rot = QString("rotate (%1) translate (%2cm %3cm)").arg(rotAngle).arg(xMid).arg(yMid); + TQString rot = TQString("rotate (%1) translate (%2cm %3cm)").tqarg(rotAngle).tqarg(xMid).tqarg(yMid); xmlWriter->addAttribute( "draw:transform", rot ); } - if (drawObject->shape() == DrawObject::RightTriangle) + if (drawObject->tqshape() == DrawObject::RightTriangle) { xmlWriter->addAttribute( "draw:type", "right-triangle"); } - else if (drawObject->shape() == DrawObject::IsoscelesTriangle) + else if (drawObject->tqshape() == DrawObject::IsoscelesTriangle) { xmlWriter->addAttribute( "draw:type", "isosceles-triangle"); xmlWriter->startElement( "draw:equation" ); @@ -637,27 +637,27 @@ void PowerPointImport::processTriangle (DrawObject* drawObject, KoXmlWriter* xml xmlWriter->endElement(); } - xmlWriter->endElement(); // enhanced-geometry - xmlWriter->endElement(); // custom-shape + xmlWriter->endElement(); // enhanced-tqgeometry + xmlWriter->endElement(); // custom-tqshape } void PowerPointImport::processTrapezoid (DrawObject* drawObject, KoXmlWriter* xmlWriter ) { if( !drawObject || !xmlWriter ) return; - QString widthStr = QString("%1mm").arg( drawObject->width() ); - QString heightStr = QString("%1mm").arg( drawObject->height() ); - QString xStr = QString("%1mm").arg( drawObject->left() ); - QString yStr = QString("%1mm").arg( drawObject->top() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString widthStr = TQString("%1mm").tqarg( drawObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( drawObject->height() ); + TQString xStr = TQString("%1mm").tqarg( drawObject->left() ); + TQString yStr = TQString("%1mm").tqarg( drawObject->top() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); - xmlWriter->startElement( "draw:custom-shape" ); + xmlWriter->startElement( "draw:custom-tqshape" ); xmlWriter->addAttribute( "draw:style-name", styleName ); xmlWriter->addAttribute( "svg:width", widthStr ); xmlWriter->addAttribute( "svg:height", heightStr ); xmlWriter->addAttribute( "svg:x", xStr ); xmlWriter->addAttribute( "svg:y", yStr ); - xmlWriter->addAttribute( "draw:layer", "layout" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); xmlWriter->startElement( "draw:glue-point" ); xmlWriter->addAttribute( "svg:x", 5 ); @@ -675,7 +675,7 @@ void PowerPointImport::processTrapezoid (DrawObject* drawObject, KoXmlWriter* xm xmlWriter->addAttribute( "svg:x", 5 ); xmlWriter->addAttribute( "svg:y", 10 ); xmlWriter->endElement(); - xmlWriter->startElement( "draw:enhanced-geometry" ); + xmlWriter->startElement( "draw:enhanced-tqgeometry" ); if ( drawObject->hasProperty("draw:mirror-vertical") ) { xmlWriter->addAttribute("draw:mirror-vertical","true"); @@ -718,27 +718,27 @@ void PowerPointImport::processTrapezoid (DrawObject* drawObject, KoXmlWriter* xm xmlWriter->addAttribute( "draw:handle-range-x-minimum", 0); xmlWriter->addAttribute("draw:handle-position","$0 bottom"); xmlWriter->endElement(); - xmlWriter->endElement(); // enhanced-geometry - xmlWriter->endElement(); // custom-shape + xmlWriter->endElement(); // enhanced-tqgeometry + xmlWriter->endElement(); // custom-tqshape } void PowerPointImport::processParallelogram (DrawObject* drawObject, KoXmlWriter* xmlWriter ) { if( !drawObject || !xmlWriter ) return; - QString widthStr = QString("%1mm").arg( drawObject->width() ); - QString heightStr = QString("%1mm").arg( drawObject->height() ); - QString xStr = QString("%1mm").arg( drawObject->left() ); - QString yStr = QString("%1mm").arg( drawObject->top() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString widthStr = TQString("%1mm").tqarg( drawObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( drawObject->height() ); + TQString xStr = TQString("%1mm").tqarg( drawObject->left() ); + TQString yStr = TQString("%1mm").tqarg( drawObject->top() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); - xmlWriter->startElement( "draw:custom-shape" ); + xmlWriter->startElement( "draw:custom-tqshape" ); xmlWriter->addAttribute( "draw:style-name", styleName ); xmlWriter->addAttribute( "svg:width", widthStr ); xmlWriter->addAttribute( "svg:height", heightStr ); xmlWriter->addAttribute( "svg:x", xStr ); xmlWriter->addAttribute( "svg:y", yStr ); - xmlWriter->addAttribute( "draw:layer", "layout" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); xmlWriter->startElement( "draw:glue-point" ); xmlWriter->addAttribute( "svg:x", 6.25 ); xmlWriter->addAttribute( "svg:y", 0 ); @@ -763,7 +763,7 @@ void PowerPointImport::processParallelogram (DrawObject* drawObject, KoXmlWriter xmlWriter->addAttribute( "svg:x", 1.25 ); xmlWriter->addAttribute( "svg:y", 5 ); xmlWriter->endElement(); - xmlWriter->startElement( "draw:enhanced-geometry" ); + xmlWriter->startElement( "draw:enhanced-tqgeometry" ); if (drawObject->hasProperty("draw:mirror-vertical")) { xmlWriter->addAttribute("draw:mirror-vertical","true"); @@ -834,27 +834,27 @@ void PowerPointImport::processParallelogram (DrawObject* drawObject, KoXmlWriter xmlWriter->addAttribute( "draw:handle-range-x-minimum", 0); xmlWriter->addAttribute("draw:handle-position","$0 top"); xmlWriter->endElement(); - xmlWriter->endElement(); // enhanced-geometry - xmlWriter->endElement(); // custom-shape + xmlWriter->endElement(); // enhanced-tqgeometry + xmlWriter->endElement(); // custom-tqshape } void PowerPointImport::processHexagon (DrawObject* drawObject, KoXmlWriter* xmlWriter ) { if( !drawObject || !xmlWriter ) return; - QString widthStr = QString("%1mm").arg( drawObject->width() ); - QString heightStr = QString("%1mm").arg( drawObject->height() ); - QString xStr = QString("%1mm").arg( drawObject->left() ); - QString yStr = QString("%1mm").arg( drawObject->top() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString widthStr = TQString("%1mm").tqarg( drawObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( drawObject->height() ); + TQString xStr = TQString("%1mm").tqarg( drawObject->left() ); + TQString yStr = TQString("%1mm").tqarg( drawObject->top() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); - xmlWriter->startElement( "draw:custom-shape" ); + xmlWriter->startElement( "draw:custom-tqshape" ); xmlWriter->addAttribute( "draw:style-name", styleName ); xmlWriter->addAttribute( "svg:width", widthStr ); xmlWriter->addAttribute( "svg:height", heightStr ); xmlWriter->addAttribute( "svg:x", xStr ); xmlWriter->addAttribute( "svg:y", yStr ); - xmlWriter->addAttribute( "draw:layer", "layout" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); xmlWriter->startElement( "draw:glue-point" ); xmlWriter->addAttribute( "svg:x", 5 ); xmlWriter->addAttribute( "svg:y", 0 ); @@ -871,7 +871,7 @@ void PowerPointImport::processHexagon (DrawObject* drawObject, KoXmlWriter* xmlW xmlWriter->addAttribute( "svg:x", 10 ); xmlWriter->addAttribute( "svg:y", 5 ); xmlWriter->endElement(); - xmlWriter->startElement( "draw:enhanced-geometry" ); + xmlWriter->startElement( "draw:enhanced-tqgeometry" ); xmlWriter->addAttribute( "draw:type", "hexagon" ); xmlWriter->startElement( "draw:equation" ); xmlWriter->addAttribute( "draw:formula", "$0 " ); @@ -898,27 +898,27 @@ void PowerPointImport::processHexagon (DrawObject* drawObject, KoXmlWriter* xmlW xmlWriter->addAttribute( "draw:handle-range-x-minimum", 0); xmlWriter->addAttribute("draw:handle-position","$0 top"); xmlWriter->endElement(); - xmlWriter->endElement(); // enhanced-geometry - xmlWriter->endElement(); // custom-shape + xmlWriter->endElement(); // enhanced-tqgeometry + xmlWriter->endElement(); // custom-tqshape } void PowerPointImport::processOctagon (DrawObject* drawObject, KoXmlWriter* xmlWriter ) { if( !drawObject || !xmlWriter ) return; - QString widthStr = QString("%1mm").arg( drawObject->width() ); - QString heightStr = QString("%1mm").arg( drawObject->height() ); - QString xStr = QString("%1mm").arg( drawObject->left() ); - QString yStr = QString("%1mm").arg( drawObject->top() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString widthStr = TQString("%1mm").tqarg( drawObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( drawObject->height() ); + TQString xStr = TQString("%1mm").tqarg( drawObject->left() ); + TQString yStr = TQString("%1mm").tqarg( drawObject->top() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); - xmlWriter->startElement( "draw:custom-shape" ); + xmlWriter->startElement( "draw:custom-tqshape" ); xmlWriter->addAttribute( "draw:style-name", styleName ); xmlWriter->addAttribute( "svg:width", widthStr ); xmlWriter->addAttribute( "svg:height", heightStr ); xmlWriter->addAttribute( "svg:x", xStr ); xmlWriter->addAttribute( "svg:y", yStr ); - xmlWriter->addAttribute( "draw:layer", "layout" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); xmlWriter->startElement( "draw:glue-point" ); xmlWriter->addAttribute( "svg:x", 5 ); xmlWriter->addAttribute( "svg:y", 0 ); @@ -935,7 +935,7 @@ void PowerPointImport::processOctagon (DrawObject* drawObject, KoXmlWriter* xmlW xmlWriter->addAttribute( "svg:x", 10 ); xmlWriter->addAttribute( "svg:y", 4.782 ); xmlWriter->endElement(); - xmlWriter->startElement( "draw:enhanced-geometry" ); + xmlWriter->startElement( "draw:enhanced-tqgeometry" ); xmlWriter->addAttribute( "draw:type", "octagon" ); xmlWriter->startElement( "draw:equation" ); xmlWriter->addAttribute( "draw:formula", "left+$0 " ); @@ -978,36 +978,36 @@ void PowerPointImport::processOctagon (DrawObject* drawObject, KoXmlWriter* xmlW xmlWriter->addAttribute( "draw:handle-range-x-minimum", 0); xmlWriter->addAttribute("draw:handle-position","$0 top"); xmlWriter->endElement(); - xmlWriter->endElement(); // enhanced-geometry - xmlWriter->endElement(); // custom-shape + xmlWriter->endElement(); // enhanced-tqgeometry + xmlWriter->endElement(); // custom-tqshape } void PowerPointImport::processArrow (DrawObject* drawObject, KoXmlWriter* xmlWriter ) { if( !drawObject || !xmlWriter ) return; - QString widthStr = QString("%1mm").arg( drawObject->width() ); - QString heightStr = QString("%1mm").arg( drawObject->height() ); - QString xStr = QString("%1mm").arg( drawObject->left() ); - QString yStr = QString("%1mm").arg( drawObject->top() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString widthStr = TQString("%1mm").tqarg( drawObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( drawObject->height() ); + TQString xStr = TQString("%1mm").tqarg( drawObject->left() ); + TQString yStr = TQString("%1mm").tqarg( drawObject->top() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); - xmlWriter->startElement( "draw:custom-shape" ); + xmlWriter->startElement( "draw:custom-tqshape" ); xmlWriter->addAttribute( "draw:style-name", styleName ); xmlWriter->addAttribute( "svg:width", widthStr ); xmlWriter->addAttribute( "svg:height", heightStr ); xmlWriter->addAttribute( "svg:x", xStr ); xmlWriter->addAttribute( "svg:y", yStr ); - xmlWriter->addAttribute( "draw:layer", "layout" ); - xmlWriter->startElement( "draw:enhanced-geometry" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); + xmlWriter->startElement( "draw:enhanced-tqgeometry" ); - if (drawObject->shape() == DrawObject::RightArrow) + if (drawObject->tqshape() == DrawObject::RightArrow) xmlWriter->addAttribute( "draw:type", "right-arrow" ); - else if (drawObject->shape() == DrawObject::LeftArrow) + else if (drawObject->tqshape() == DrawObject::LeftArrow) xmlWriter->addAttribute( "draw:type", "left-arrow" ); - else if (drawObject->shape() == DrawObject::UpArrow) + else if (drawObject->tqshape() == DrawObject::UpArrow) xmlWriter->addAttribute( "draw:type", "up-arrow" ); - else if (drawObject->shape() == DrawObject::DownArrow) + else if (drawObject->tqshape() == DrawObject::DownArrow) xmlWriter->addAttribute( "draw:type", "down-arrow" ); xmlWriter->startElement( "draw:equation" ); xmlWriter->addAttribute( "draw:formula","$1"); @@ -1042,7 +1042,7 @@ void PowerPointImport::processArrow (DrawObject* drawObject, KoXmlWriter* xmlWri xmlWriter->addAttribute( "draw:name","f7"); xmlWriter->endElement(); // draw:equation xmlWriter->startElement( "draw:handle" ); - if ( drawObject->shape() == DrawObject::RightArrow | drawObject->shape() == DrawObject::LeftArrow ) + if ( drawObject->tqshape() == DrawObject::RightArrow | drawObject->tqshape() == DrawObject::LeftArrow ) { xmlWriter->addAttribute( "draw:handle-range-x-maximum", 21600); xmlWriter->addAttribute( "draw:handle-range-x-minimum", 0); @@ -1050,7 +1050,7 @@ void PowerPointImport::processArrow (DrawObject* drawObject, KoXmlWriter* xmlWri xmlWriter->addAttribute("draw:handle-range-y-maximum",10800); xmlWriter->addAttribute("draw:handle-range-y-minimum",0); } - else if ( drawObject->shape() == DrawObject::UpArrow | drawObject->shape() == DrawObject::DownArrow ) + else if ( drawObject->tqshape() == DrawObject::UpArrow | drawObject->tqshape() == DrawObject::DownArrow ) { xmlWriter->addAttribute( "draw:handle-range-x-maximum", 10800); xmlWriter->addAttribute( "draw:handle-range-x-minimum", 0); @@ -1059,27 +1059,27 @@ void PowerPointImport::processArrow (DrawObject* drawObject, KoXmlWriter* xmlWri xmlWriter->addAttribute("draw:handle-range-y-minimum",0); } xmlWriter->endElement(); // draw:handle - xmlWriter->endElement(); // draw:enhanced-geometry - xmlWriter->endElement(); // draw:custom-shape + xmlWriter->endElement(); // draw:enhanced-tqgeometry + xmlWriter->endElement(); // draw:custom-tqshape } void PowerPointImport::processLine (DrawObject* drawObject, KoXmlWriter* xmlWriter ) { if( !drawObject || !xmlWriter) return; - QString x1Str = QString("%1mm").arg( drawObject->left() ); - QString y1Str = QString("%1mm").arg( drawObject->top() ); - QString x2Str = QString("%1mm").arg( drawObject->left() + drawObject->width() ); - QString y2Str = QString("%1mm").arg( drawObject->top() + drawObject->height() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString x1Str = TQString("%1mm").tqarg( drawObject->left() ); + TQString y1Str = TQString("%1mm").tqarg( drawObject->top() ); + TQString x2Str = TQString("%1mm").tqarg( drawObject->left() + drawObject->width() ); + TQString y2Str = TQString("%1mm").tqarg( drawObject->top() + drawObject->height() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); if ( drawObject->hasProperty("draw:mirror-vertical") ) - { QString temp = y1Str; + { TQString temp = y1Str; y1Str = y2Str; y2Str = temp; } if ( drawObject->hasProperty("draw:mirror-horizontal") ) - { QString temp = x1Str; + { TQString temp = x1Str; x1Str = x2Str; x2Str = temp; } @@ -1090,7 +1090,7 @@ void PowerPointImport::processLine (DrawObject* drawObject, KoXmlWriter* xmlWrit xmlWriter->addAttribute( "svg:y2", y2Str ); xmlWriter->addAttribute( "svg:x1", x1Str ); xmlWriter->addAttribute( "svg:x2", x2Str ); - xmlWriter->addAttribute( "draw:layer", "layout" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); xmlWriter->endElement(); } @@ -1099,19 +1099,19 @@ void PowerPointImport::processSmiley (DrawObject* drawObject, KoXmlWriter* xmlWr { if( !drawObject ||!xmlWriter ) return; - QString widthStr = QString("%1mm").arg( drawObject->width() ); - QString heightStr = QString("%1mm").arg( drawObject->height() ); - QString xStr = QString("%1mm").arg( drawObject->left() ); - QString yStr = QString("%1mm").arg( drawObject->top() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString widthStr = TQString("%1mm").tqarg( drawObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( drawObject->height() ); + TQString xStr = TQString("%1mm").tqarg( drawObject->left() ); + TQString yStr = TQString("%1mm").tqarg( drawObject->top() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); - xmlWriter->startElement( "draw:custom-shape" ); + xmlWriter->startElement( "draw:custom-tqshape" ); xmlWriter->addAttribute( "draw:style-name", styleName ); xmlWriter->addAttribute( "svg:width", widthStr ); xmlWriter->addAttribute( "svg:height", heightStr ); xmlWriter->addAttribute( "svg:x", xStr ); xmlWriter->addAttribute( "svg:y", yStr ); - xmlWriter->addAttribute( "draw:layer", "layout" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); xmlWriter->startElement( "draw:glue-point" ); xmlWriter->addAttribute( "svg:x", 5 ); xmlWriter->addAttribute( "svg:y", 0 ); @@ -1136,7 +1136,7 @@ void PowerPointImport::processSmiley (DrawObject* drawObject, KoXmlWriter* xmlWr xmlWriter->addAttribute( "svg:x", 8.536 ); xmlWriter->addAttribute( "svg:y", 1.461 ); xmlWriter->endElement(); - xmlWriter->startElement( "draw:enhanced-geometry" ); + xmlWriter->startElement( "draw:enhanced-tqgeometry" ); xmlWriter->addAttribute( "draw:type", "smiley" ); xmlWriter->startElement( "draw:equation" ); xmlWriter->addAttribute( "draw:formula", "$0-15510 " ); @@ -1156,27 +1156,27 @@ void PowerPointImport::processSmiley (DrawObject* drawObject, KoXmlWriter* xmlWr xmlWriter->addAttribute( "draw:handle-range-y-minimum", 15510); xmlWriter->addAttribute("draw:handle-position","$0 top"); xmlWriter->endElement(); - xmlWriter->endElement(); // enhanced-geometry - xmlWriter->endElement(); // custom-shape + xmlWriter->endElement(); // enhanced-tqgeometry + xmlWriter->endElement(); // custom-tqshape } void PowerPointImport::processHeart (DrawObject* drawObject, KoXmlWriter* xmlWriter ) { if( !drawObject || !xmlWriter ) return; - QString widthStr = QString("%1mm").arg( drawObject->width() ); - QString heightStr = QString("%1mm").arg( drawObject->height() ); - QString xStr = QString("%1mm").arg( drawObject->left() ); - QString yStr = QString("%1mm").arg( drawObject->top() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString widthStr = TQString("%1mm").tqarg( drawObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( drawObject->height() ); + TQString xStr = TQString("%1mm").tqarg( drawObject->left() ); + TQString yStr = TQString("%1mm").tqarg( drawObject->top() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); - xmlWriter->startElement( "draw:custom-shape" ); + xmlWriter->startElement( "draw:custom-tqshape" ); xmlWriter->addAttribute( "draw:style-name", styleName ); xmlWriter->addAttribute( "svg:width", widthStr ); xmlWriter->addAttribute( "svg:height", heightStr ); xmlWriter->addAttribute( "svg:x", xStr ); xmlWriter->addAttribute( "svg:y", yStr ); - xmlWriter->addAttribute( "draw:layer", "layout" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); xmlWriter->startElement( "draw:glue-point" ); xmlWriter->addAttribute( "svg:x", 5 ); xmlWriter->addAttribute( "svg:y", 1 ); @@ -1193,22 +1193,22 @@ void PowerPointImport::processHeart (DrawObject* drawObject, KoXmlWriter* xmlWri xmlWriter->addAttribute( "svg:x", 8.553 ); xmlWriter->addAttribute( "svg:y", 5 ); xmlWriter->endElement(); - xmlWriter->startElement( "draw:enhanced-geometry" ); + xmlWriter->startElement( "draw:enhanced-tqgeometry" ); xmlWriter->addAttribute( "draw:type", "heart" ); - xmlWriter->endElement(); // enhanced-geometry - xmlWriter->endElement(); // custom-shape + xmlWriter->endElement(); // enhanced-tqgeometry + xmlWriter->endElement(); // custom-tqshape } void PowerPointImport::processFreeLine (DrawObject* drawObject, KoXmlWriter* xmlWriter) { if( !drawObject ||!xmlWriter ) return; - QString widthStr = QString("%1mm").arg( drawObject->width() ); - QString heightStr = QString("%1mm").arg( drawObject->height() ); - QString xStr = QString("%1mm").arg( drawObject->left() ); - QString yStr = QString("%1mm").arg( drawObject->top() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString widthStr = TQString("%1mm").tqarg( drawObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( drawObject->height() ); + TQString xStr = TQString("%1mm").tqarg( drawObject->left() ); + TQString yStr = TQString("%1mm").tqarg( drawObject->top() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); xmlWriter->startElement( "draw:path" ); xmlWriter->addAttribute( "draw:style-name", styleName ); @@ -1216,7 +1216,7 @@ void PowerPointImport::processFreeLine (DrawObject* drawObject, KoXmlWriter* xml xmlWriter->addAttribute( "svg:height", heightStr ); xmlWriter->addAttribute( "svg:x", xStr ); xmlWriter->addAttribute( "svg:y", yStr ); - xmlWriter->addAttribute( "draw:layer", "layout" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); xmlWriter->endElement(); // path } @@ -1228,63 +1228,63 @@ void PowerPointImport::processDrawingObjectForBody( DrawObject* drawObject, KoXm drawingObjectCounter++; - if (drawObject->shape() == DrawObject::Ellipse) + if (drawObject->tqshape() == DrawObject::Ellipse) { processEllipse (drawObject, xmlWriter ); } - else if (drawObject->shape() == DrawObject::Rectangle) + else if (drawObject->tqshape() == DrawObject::Rectangle) { processRectangle (drawObject, xmlWriter ); } - else if (drawObject->shape() == DrawObject::RoundRectangle) + else if (drawObject->tqshape() == DrawObject::RoundRectangle) { processRoundRectangle (drawObject, xmlWriter ); } - else if (drawObject->shape() == DrawObject::Diamond) + else if (drawObject->tqshape() == DrawObject::Diamond) { processDiamond (drawObject, xmlWriter ); } - else if (drawObject->shape() == DrawObject::IsoscelesTriangle | - drawObject->shape() == DrawObject::RightTriangle) + else if (drawObject->tqshape() == DrawObject::IsoscelesTriangle | + drawObject->tqshape() == DrawObject::RightTriangle) { processTriangle (drawObject, xmlWriter ); } - else if (drawObject->shape() == DrawObject::Trapezoid) + else if (drawObject->tqshape() == DrawObject::Trapezoid) { processTrapezoid (drawObject, xmlWriter ); } - else if (drawObject->shape() == DrawObject::Parallelogram) + else if (drawObject->tqshape() == DrawObject::Parallelogram) { processParallelogram( drawObject, xmlWriter); } - else if (drawObject->shape() == DrawObject::Hexagon) + else if (drawObject->tqshape() == DrawObject::Hexagon) { processHexagon ( drawObject, xmlWriter ); } - else if (drawObject->shape() == DrawObject::Octagon) + else if (drawObject->tqshape() == DrawObject::Octagon) { processOctagon ( drawObject, xmlWriter ); } - else if (drawObject->shape() == DrawObject::RightArrow | - drawObject->shape() == DrawObject::LeftArrow | - drawObject->shape() == DrawObject::UpArrow | - drawObject->shape() == DrawObject::DownArrow ) + else if (drawObject->tqshape() == DrawObject::RightArrow | + drawObject->tqshape() == DrawObject::LeftArrow | + drawObject->tqshape() == DrawObject::UpArrow | + drawObject->tqshape() == DrawObject::DownArrow ) { processArrow ( drawObject, xmlWriter ); } - else if (drawObject->shape() == DrawObject::Line) + else if (drawObject->tqshape() == DrawObject::Line) { processLine ( drawObject, xmlWriter ); } - else if (drawObject->shape() == DrawObject::Smiley) + else if (drawObject->tqshape() == DrawObject::Smiley) { processSmiley (drawObject, xmlWriter ); } - else if (drawObject->shape() == DrawObject::Heart) + else if (drawObject->tqshape() == DrawObject::Heart) { processHeart (drawObject, xmlWriter ); } - else if (drawObject->shape() == DrawObject::FreeLine) + else if (drawObject->tqshape() == DrawObject::FreeLine) { processFreeLine (drawObject, xmlWriter ); } @@ -1311,20 +1311,20 @@ void PowerPointImport::processTextObjectForBody( TextObject* textObject, KoXmlWr { if( !textObject || !xmlWriter ) return; - QString classStr = "subtitle"; + TQString classStr = "subtitle"; if( textObject->type() == TextObject::Title ) classStr = "title"; -// QString pStr = string( textObject->text() ).string(); - QString pStr; +// TQString pStr = string( textObject->text() ).string(); + TQString pStr; - QString widthStr = QString("%1mm").arg( textObject->width() ); - QString heightStr = QString("%1mm").arg( textObject->height() ); - QString xStr = QString("%1mm").arg( textObject->left() ); - QString yStr = QString("%1mm").arg( textObject->top() ); + TQString widthStr = TQString("%1mm").tqarg( textObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( textObject->height() ); + TQString xStr = TQString("%1mm").tqarg( textObject->left() ); + TQString yStr = TQString("%1mm").tqarg( textObject->top() ); xmlWriter->startElement( "draw:frame" ); xmlWriter->addAttribute( "presentation:style-name", "pr1" ); - xmlWriter->addAttribute( "draw:layer", "layout" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); xmlWriter->addAttribute( "svg:width", widthStr ); xmlWriter->addAttribute( "svg:height", heightStr ); xmlWriter->addAttribute( "svg:x", xStr ); @@ -1379,17 +1379,17 @@ void PowerPointImport::processSlideForBody( unsigned slideNo, Slide* slide, KoXm { if( !slide || !xmlWriter ) return; - QString nameStr = Libppt::string( slide->title() ).string(); + TQString nameStr = Libppt::string( slide->title() ).string(); if( nameStr.isEmpty() ) - nameStr = QString("page%1").arg(slideNo+1); + nameStr = TQString("page%1").tqarg(slideNo+1); - QString styleNameStr = QString("dp%1").arg(slideNo+1); + TQString styleNameStr = TQString("dp%1").tqarg(slideNo+1); xmlWriter->startElement( "draw:page" ); xmlWriter->addAttribute( "draw:master-page-name", "Default" ); xmlWriter->addAttribute( "draw:name", nameStr ); xmlWriter->addAttribute( "draw:style-name", styleNameStr ); - xmlWriter->addAttribute( "presentation:presentation-page-layout-name", "AL1T0"); + xmlWriter->addAttribute( "presentation:presentation-page-tqlayout-name", "AL1T0"); GroupObject* root = slide->rootObject(); if( root ) @@ -1439,9 +1439,9 @@ void PowerPointImport::processGroupObjectForStyle( GroupObject* groupObject, KoX if( !groupObject ||!xmlWriter ) return; } -QString hexname( const Color &c ) +TQString hexname( const Color &c ) { - QColor qc( c.red, c.green, c.blue ); + TQColor qc( c.red, c.green, c.blue ); return qc.name(); } @@ -1450,12 +1450,12 @@ void PowerPointImport::processDrawingObjectForStyle( DrawObject* drawObject, KoX if( !drawObject || !xmlWriter) return; drawingObjectCounter++; - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); xmlWriter->startElement( "style:style" ); xmlWriter->addAttribute( "style:name", styleName ); xmlWriter->addAttribute( "style:family", "graphic" ); - xmlWriter->addAttribute( "style:parent-style-name", "standard" ); + xmlWriter->addAttribute( "style:tqparent-style-name", "standard" ); xmlWriter->startElement( "style:graphic-properties" ); /* @@ -1463,7 +1463,7 @@ void PowerPointImport::processDrawingObjectForStyle( DrawObject* drawObject, KoX { xmlWriter->addAttribute( "draw:stroke", "dash" ); std::string s = drawObject->getStrProperty("draw:stroke-dash"); - QString ss( s.c_str() ); + TQString ss( s.c_str() ); xmlWriter->addAttribute( "draw:stroke-dash", ss ); } else xmlWriter->addAttribute( "draw:stroke", "dash" ); */ @@ -1477,7 +1477,7 @@ void PowerPointImport::processDrawingObjectForStyle( DrawObject* drawObject, KoX { xmlWriter->addAttribute( "draw:stroke", "dash" ); std::string s = drawObject->getStrProperty("draw:stroke-dash"); - QString ss( s.c_str() ); + TQString ss( s.c_str() ); xmlWriter->addAttribute( "draw:stroke-dash", ss ); qDebug("=============stroke dash==================="); // qDebug("test %g\n",angka); @@ -1490,7 +1490,7 @@ void PowerPointImport::processDrawingObjectForStyle( DrawObject* drawObject, KoX if( drawObject->hasProperty( "svg:stroke-width" ) ) { double strokeWidth = drawObject->getDoubleProperty("svg:stroke-width" ); - xmlWriter->addAttribute( "svg:stroke-width",QString("%1mm").arg( strokeWidth ) ); + xmlWriter->addAttribute( "svg:stroke-width",TQString("%1mm").tqarg( strokeWidth ) ); } if( drawObject->hasProperty( "svg:stroke-color" ) ) @@ -1502,25 +1502,25 @@ void PowerPointImport::processDrawingObjectForStyle( DrawObject* drawObject, KoX if( drawObject->hasProperty( "draw:marker-start" ) ) { std::string s = drawObject->getStrProperty("draw:marker-start"); - QString ss( s.c_str() ); + TQString ss( s.c_str() ); xmlWriter->addAttribute( "draw:marker-start", ss ); } if( drawObject->hasProperty( "draw:marker-end" ) ) { std::string s = drawObject->getStrProperty("draw:marker-end"); - QString ss( s.c_str() ); + TQString ss( s.c_str() ); xmlWriter->addAttribute( "draw:marker-end", ss); } /* if( drawObject->hasProperty( "draw:marker-start-length" ) ) { std::string s = drawObject->getStrProperty("draw:marker-start-length"); - QString ss( s.c_str() ); + TQString ss( s.c_str() ); xmlWriter->addAttribute("draw:marker-start-length", ss ); } if( drawObject->hasProperty( "draw:marker-end-length" ) ) { std::string s = drawObject->getStrProperty("draw:marker-end-length"); - QString ss( s.c_str() ); + TQString ss( s.c_str() ); xmlWriter->addAttribute( "draw:marker-end-length", ss); } */ @@ -1528,14 +1528,14 @@ void PowerPointImport::processDrawingObjectForStyle( DrawObject* drawObject, KoX { double strokeWidth = drawObject->getDoubleProperty("svg:stroke-width" ); double arrowWidth = (drawObject->getDoubleProperty("draw:marker-start-width") * strokeWidth); - xmlWriter->addAttribute( "draw:marker-start-width",QString("%1cm").arg( arrowWidth ) ); + xmlWriter->addAttribute( "draw:marker-start-width",TQString("%1cm").tqarg( arrowWidth ) ); } if( drawObject->hasProperty( "draw:marker-end-width" ) ) { double strokeWidth = drawObject->getDoubleProperty("svg:stroke-width" ); double arrowWidth = (drawObject->getDoubleProperty("draw:marker-end-width") * strokeWidth); - xmlWriter->addAttribute( "draw:marker-end-width",QString("%1cm").arg( arrowWidth ) ); + xmlWriter->addAttribute( "draw:marker-end-width",TQString("%1cm").tqarg( arrowWidth ) ); } @@ -1543,7 +1543,7 @@ void PowerPointImport::processDrawingObjectForStyle( DrawObject* drawObject, KoX if( drawObject->hasProperty( "draw:fill" ) ) { std::string s = drawObject->getStrProperty("draw:fill"); - QString ss( s.c_str() ); + TQString ss( s.c_str() ); xmlWriter->addAttribute( "draw:fill", ss); } @@ -1569,19 +1569,19 @@ void PowerPointImport::processDrawingObjectForStyle( DrawObject* drawObject, KoX if( drawObject->hasProperty( "draw:shadow-opacity" ) ) { double opacity = drawObject->getDoubleProperty("draw:shadow-opacity") ; - xmlWriter->addAttribute( "draw:shadow-opacity",QString("%1%").arg( opacity ) ); + xmlWriter->addAttribute( "draw:shadow-opacity",TQString("%1%").tqarg( opacity ) ); } if( drawObject->hasProperty( "draw:shadow-offset-x" ) ) { double offset = drawObject->getDoubleProperty("draw:shadow-offset-x") ; - xmlWriter->addAttribute( "draw:shadow-offset-x",QString("%1cm").arg( offset ) ); + xmlWriter->addAttribute( "draw:shadow-offset-x",TQString("%1cm").tqarg( offset ) ); } if( drawObject->hasProperty( "draw:shadow-offset-y" ) ) { double offset = drawObject->getDoubleProperty("draw:shadow-offset-y"); - xmlWriter->addAttribute( "draw:shadow-offset-y",QString("%1cm").arg( offset ) ); + xmlWriter->addAttribute( "draw:shadow-offset-y",TQString("%1cm").tqarg( offset ) ); } diff --git a/filters/kpresenter/powerpoint/import/powerpointimport.h b/filters/kpresenter/powerpoint/import/powerpointimport.h index 6c6774ab..5c3a73bc 100644 --- a/filters/kpresenter/powerpoint/import/powerpointimport.h +++ b/filters/kpresenter/powerpoint/import/powerpointimport.h @@ -23,7 +23,7 @@ #include <KoFilter.h> #include <KoStore.h> -#include <qcstring.h> +#include <tqcstring.h> #include "libppt.h" @@ -34,20 +34,21 @@ class KoXmlWriter; class PowerPointImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - PowerPointImport ( QObject *parent, const char* name, const QStringList& ); + PowerPointImport ( TQObject *tqparent, const char* name, const TQStringList& ); virtual ~PowerPointImport(); - virtual KoFilter::ConversionStatus convert( const QCString& from, - const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, + const TQCString& to ); private: class Private; Private* d; - QByteArray createManifest(); - QByteArray createStyles(); - QByteArray createContent(); + TQByteArray createManifest(); + TQByteArray createStyles(); + TQByteArray createContent(); int drawingObjectCounter; diff --git a/filters/kpresenter/powerpoint/libppt/objects.cpp b/filters/kpresenter/powerpoint/libppt/objects.cpp index 29870cbd..82359d15 100644 --- a/filters/kpresenter/powerpoint/libppt/objects.cpp +++ b/filters/kpresenter/powerpoint/libppt/objects.cpp @@ -139,7 +139,7 @@ void Object::setBackground( bool bg ) bool Object::hasProperty( std::string name ) { std::map<std::string,PropertyValue>::const_iterator i; - i = d->properties.find( name ); + i = d->properties.tqfind( name ); if( i == d->properties.end() ) return false; else @@ -379,7 +379,7 @@ void GroupObject::takeObject( Object* object ) class DrawObject::Private { public: - unsigned shape; + unsigned tqshape; bool isVerFlip; bool isHorFlip; }; @@ -387,7 +387,7 @@ public: DrawObject::DrawObject() { d = new Private; - d->shape = None; + d->tqshape = None; } DrawObject::~DrawObject() @@ -395,14 +395,14 @@ DrawObject::~DrawObject() delete d; } -unsigned DrawObject::shape() const +unsigned DrawObject::tqshape() const { - return d->shape; + return d->tqshape; } void DrawObject::setShape( unsigned s ) { - d->shape = s; + d->tqshape = s; } bool DrawObject::isVerFlip() const diff --git a/filters/kpresenter/powerpoint/libppt/objects.h b/filters/kpresenter/powerpoint/libppt/objects.h index 823e2a75..a9160897 100644 --- a/filters/kpresenter/powerpoint/libppt/objects.h +++ b/filters/kpresenter/powerpoint/libppt/objects.h @@ -103,7 +103,7 @@ public: Body = 1, Notes = 2, NotUsed = 3, - Other = 4, // text in a shape + Other = 4, // text in a tqshape CenterBody = 5, // subtitle in title slide CenterTitle = 6, // title in title slide HalfBody = 7, // body in two-column slide @@ -184,7 +184,7 @@ public: virtual ~DrawObject(); virtual bool isDrawing() const { return true; } - unsigned shape() const; + unsigned tqshape() const; void setShape( unsigned s ); bool isVerFlip() const; diff --git a/filters/kpresenter/powerpoint/libppt/pole.cpp b/filters/kpresenter/powerpoint/libppt/pole.cpp index 2a78b79f..daab8ff9 100644 --- a/filters/kpresenter/powerpoint/libppt/pole.cpp +++ b/filters/kpresenter/powerpoint/libppt/pole.cpp @@ -94,7 +94,7 @@ class DirEntry { public: bool valid; // false if invalid (should be skipped) - std::string name; // the name, not in unicode anymore + std::string name; // the name, not in tqunicode anymore bool dir; // true if directory unsigned long size; // size (not valid if directory) unsigned long start; // starting block @@ -113,9 +113,9 @@ class DirTree DirEntry* entry( unsigned index ); DirEntry* entry( const std::string& name, bool create=false ); int indexOf( DirEntry* e ); - int parent( unsigned index ); + int tqparent( unsigned index ); std::string fullName( unsigned index ); - std::vector<unsigned> children( unsigned index ); + std::vector<unsigned> tqchildren( unsigned index ); void load( unsigned char* buffer, unsigned len ); void save( unsigned char* buffer ); unsigned size(); @@ -503,13 +503,13 @@ int DirTree::indexOf( DirEntry* e ) return -1; } -int DirTree::parent( unsigned index ) +int DirTree::tqparent( unsigned index ) { - // brute-force, basically we iterate for each entries, find its children - // and check if one of the children is 'index' + // brute-force, basically we iterate for each entries, find its tqchildren + // and check if one of the tqchildren is 'index' for( unsigned j=0; j<entryCount(); j++ ) { - std::vector<unsigned> chi = children( j ); + std::vector<unsigned> chi = tqchildren( j ); for( unsigned i=0; i<chi.size();i++ ) if( chi[i] == index ) return j; @@ -525,7 +525,7 @@ std::string DirTree::fullName( unsigned index ) std::string result = entry( index )->name; result.insert( 0, "/" ); - int p = parent( index ); + int p = tqparent( index ); DirEntry * _entry = 0; while( p > 0 ) { @@ -573,8 +573,8 @@ DirEntry* DirTree::entry( const std::string& name, bool create ) for( it = names.begin(); it != names.end(); ++it ) { - // find among the children of index - std::vector<unsigned> chi = children( index ); + // find among the tqchildren of index + std::vector<unsigned> chi = tqchildren( index ); unsigned child = 0; for( unsigned i = 0; i < chi.size(); i++ ) { @@ -589,11 +589,11 @@ DirEntry* DirTree::entry( const std::string& name, bool create ) if( child > 0 ) index = child; else { - // not found among children + // not found among tqchildren if( !create ) return (DirEntry*)0; // create a new entry - unsigned parent = index; + unsigned tqparent = index; entries.push_back( DirEntry() ); index = entryCount()-1; DirEntry* e = entry( index ); @@ -604,8 +604,8 @@ DirEntry* DirTree::entry( const std::string& name, bool create ) e->start = 0; e->child = End; e->prev = End; - e->next = entry(parent)->child; - entry(parent)->child = index; + e->next = entry(tqparent)->child; + entry(tqparent)->child = index; } } @@ -646,7 +646,7 @@ void dirtree_find_siblings( DirTree* dirtree, std::vector<unsigned>& result, } } -std::vector<unsigned> DirTree::children( unsigned index ) +std::vector<unsigned> DirTree::tqchildren( unsigned index ) { std::vector<unsigned> result; @@ -1102,7 +1102,7 @@ StreamIO::StreamIO( StorageIO* s, DirEntry* e) updateCache(); } -// FIXME tell parent we're gone +// FIXME tell tqparent we're gone StreamIO::~StreamIO() { delete[] cache_data; @@ -1248,10 +1248,10 @@ std::list<std::string> Storage::entries( const std::string& path ) DirEntry* e = dt->entry( path, false ); if( e && e->dir ) { - unsigned parent = dt->indexOf( e ); - std::vector<unsigned> children = dt->children( parent ); - for( unsigned i = 0; i < children.size(); i++ ) - result.push_back( dt->entry( children[i] )->name ); + unsigned tqparent = dt->indexOf( e ); + std::vector<unsigned> tqchildren = dt->tqchildren( tqparent ); + for( unsigned i = 0; i < tqchildren.size(); i++ ) + result.push_back( dt->entry( tqchildren[i] )->name ); } return result; @@ -1270,7 +1270,7 @@ Stream::Stream( Storage* storage, const std::string& name ) io = storage->io->streamIO( name ); } -// FIXME tell parent we're gone +// FIXME tell tqparent we're gone Stream::~Stream() { delete io; diff --git a/filters/kpresenter/powerpoint/libppt/powerpoint.cpp b/filters/kpresenter/powerpoint/libppt/powerpoint.cpp index af035c69..eceb3411 100644 --- a/filters/kpresenter/powerpoint/libppt/powerpoint.cpp +++ b/filters/kpresenter/powerpoint/libppt/powerpoint.cpp @@ -394,12 +394,12 @@ Record* Record::create( unsigned type ) return record; } -void Record::setParent( Record* parent ) +void Record::setParent( Record* tqparent ) { - record_parent = parent; + record_parent = tqparent; } -const Record* Record::parent() const +const Record* Record::tqparent() const { return record_parent; } @@ -3088,10 +3088,10 @@ void StyleTextPropAtom::setData( unsigned /*size*/, const unsigned char* data, u atomData.charCount = charCount; atomData.depth = readU16(data+k); k += 2; - unsigned mask = readU32(data+6); + unsigned tqmask = readU32(data+6); k += 4; - if ( mask & 0xF ) + if ( tqmask & 0xF ) { int bulletFlag = readU16(data+k); k += 2; @@ -3100,99 +3100,99 @@ void StyleTextPropAtom::setData( unsigned /*size*/, const unsigned char* data, u atomData.bulletHardColor = ( bulletFlag & 4 ) ? 1 : 0; } - if ( mask & 0x0080 ) + if ( tqmask & 0x0080 ) { atomData.bulletChar = readU16(data+k); k += 2; } - if ( mask & 0x0010 ) + if ( tqmask & 0x0010 ) { atomData.bulletFont = readU16(data+k); k += 2; } - if ( mask & 0x0040 ) + if ( tqmask & 0x0040 ) { atomData.bulletHeight = readU16(data+k); k += 2; } - if ( mask & 0x0020 ) + if ( tqmask & 0x0020 ) { atomData.bulletColor = readU32(data+k); k += 4; } - if ( mask & 0x0F00 ) + if ( tqmask & 0x0F00 ) { - if ( mask & 0x800 ) + if ( tqmask & 0x800 ) { unsigned dummy = readU16(data+k); atomData.align = ( dummy & 3 ); k += 2; } - if ( mask & 0x400 ) + if ( tqmask & 0x400 ) { /*unsigned dummy =*/ readU16(data+k); k += 2; } - if ( mask & 0x200 ) + if ( tqmask & 0x200 ) { /*unsigned dummy =*/ readU16(data+k); k += 2; } - if ( mask & 0x100 ) + if ( tqmask & 0x100 ) { /*unsigned dummy =*/ readU16(data+k); k += 2; } } - if ( mask & 0x1000 ) + if ( tqmask & 0x1000 ) { atomData.lineFeed = readU16(data+k); k += 2; } - if ( mask & 0x2000 ) + if ( tqmask & 0x2000 ) { atomData.upperDist = readU16(data+k); k += 2; } - if ( mask & 0x4000 ) + if ( tqmask & 0x4000 ) { atomData.lowerDist = readU16(data+k); k += 2; } - if ( mask & 0x8000 ) + if ( tqmask & 0x8000 ) { /*unsigned dummy =*/ readU16(data+k); k += 2; } - if ( mask & 0x10000 ) + if ( tqmask & 0x10000 ) { /*unsigned dummy =*/ readU16(data+k); k += 2; } - if ( mask & 0xe0000 ) + if ( tqmask & 0xe0000 ) { unsigned dummy = readU16(data+k); - if ( mask & 0x20000 ) + if ( tqmask & 0x20000 ) atomData.asianLB1 = dummy & 1; - if ( mask & 0x40000 ) + if ( tqmask & 0x40000 ) atomData.asianLB2 = (dummy >> 1) & 1; - if ( mask & 0x80000 ) + if ( tqmask & 0x80000 ) atomData.asianLB3 = (dummy >> 2) & 1; k += 2; } - if ( mask & 0x200000 ) + if ( tqmask & 0x200000 ) { atomData.biDi = readU16(data+k); k += 2; @@ -3537,15 +3537,15 @@ const unsigned int SlideAtom::id = 1007; class SlideAtom::Private { public: - int layoutGeom; - int layoutPlaceholderId1; - int layoutPlaceholderId2; - int layoutPlaceholderId3; - int layoutPlaceholderId4; - int layoutPlaceholderId5; - int layoutPlaceholderId6; - int layoutPlaceholderId7; - int layoutPlaceholderId8; + int tqlayoutGeom; + int tqlayoutPlaceholderId1; + int tqlayoutPlaceholderId2; + int tqlayoutPlaceholderId3; + int tqlayoutPlaceholderId4; + int tqlayoutPlaceholderId5; + int tqlayoutPlaceholderId6; + int tqlayoutPlaceholderId7; + int tqlayoutPlaceholderId8; int masterId; int notesId; int flags; @@ -3554,15 +3554,15 @@ public: SlideAtom::SlideAtom() { d = new Private; - d->layoutGeom = 0; - d->layoutPlaceholderId1 = 0; - d->layoutPlaceholderId2 = 0; - d->layoutPlaceholderId3 = 0; - d->layoutPlaceholderId4 = 0; - d->layoutPlaceholderId5 = 0; - d->layoutPlaceholderId6 = 0; - d->layoutPlaceholderId7 = 0; - d->layoutPlaceholderId8 = 0; + d->tqlayoutGeom = 0; + d->tqlayoutPlaceholderId1 = 0; + d->tqlayoutPlaceholderId2 = 0; + d->tqlayoutPlaceholderId3 = 0; + d->tqlayoutPlaceholderId4 = 0; + d->tqlayoutPlaceholderId5 = 0; + d->tqlayoutPlaceholderId6 = 0; + d->tqlayoutPlaceholderId7 = 0; + d->tqlayoutPlaceholderId8 = 0; d->masterId = 0; d->notesId = 0; d->flags = 0; @@ -3573,39 +3573,39 @@ SlideAtom::~SlideAtom() delete d; } -int SlideAtom::layoutGeom() const +int SlideAtom::tqlayoutGeom() const { - return d->layoutGeom; + return d->tqlayoutGeom; } -void SlideAtom::setLayoutGeom(int layoutGeom ) +void SlideAtom::setLayoutGeom(int tqlayoutGeom ) { - d->layoutGeom = layoutGeom; + d->tqlayoutGeom = tqlayoutGeom; } -int SlideAtom::layoutPlaceholderId() const +int SlideAtom::tqlayoutPlaceholderId() const { - return d->layoutPlaceholderId1; - return d->layoutPlaceholderId2; - return d->layoutPlaceholderId3; - return d->layoutPlaceholderId4; - return d->layoutPlaceholderId5; - return d->layoutPlaceholderId6; - return d->layoutPlaceholderId7; - return d->layoutPlaceholderId8; + return d->tqlayoutPlaceholderId1; + return d->tqlayoutPlaceholderId2; + return d->tqlayoutPlaceholderId3; + return d->tqlayoutPlaceholderId4; + return d->tqlayoutPlaceholderId5; + return d->tqlayoutPlaceholderId6; + return d->tqlayoutPlaceholderId7; + return d->tqlayoutPlaceholderId8; } -void SlideAtom::setLayoutPlaceholderId(int layoutPlaceholderId1, int layoutPlaceholderId2,int layoutPlaceholderId3,int layoutPlaceholderId4,int layoutPlaceholderId5,int layoutPlaceholderId6,int layoutPlaceholderId7,int layoutPlaceholderId8) +void SlideAtom::setLayoutPlaceholderId(int tqlayoutPlaceholderId1, int tqlayoutPlaceholderId2,int tqlayoutPlaceholderId3,int tqlayoutPlaceholderId4,int tqlayoutPlaceholderId5,int tqlayoutPlaceholderId6,int tqlayoutPlaceholderId7,int tqlayoutPlaceholderId8) { - d->layoutPlaceholderId1 = layoutPlaceholderId1; - d->layoutPlaceholderId2 = layoutPlaceholderId2; - d->layoutPlaceholderId3 = layoutPlaceholderId3; - d->layoutPlaceholderId4 = layoutPlaceholderId4; - d->layoutPlaceholderId5 = layoutPlaceholderId5; - d->layoutPlaceholderId6 = layoutPlaceholderId6; - d->layoutPlaceholderId7 = layoutPlaceholderId7; - d->layoutPlaceholderId8 = layoutPlaceholderId8; + d->tqlayoutPlaceholderId1 = tqlayoutPlaceholderId1; + d->tqlayoutPlaceholderId2 = tqlayoutPlaceholderId2; + d->tqlayoutPlaceholderId3 = tqlayoutPlaceholderId3; + d->tqlayoutPlaceholderId4 = tqlayoutPlaceholderId4; + d->tqlayoutPlaceholderId5 = tqlayoutPlaceholderId5; + d->tqlayoutPlaceholderId6 = tqlayoutPlaceholderId6; + d->tqlayoutPlaceholderId7 = tqlayoutPlaceholderId7; + d->tqlayoutPlaceholderId8 = tqlayoutPlaceholderId8; } int SlideAtom::masterId() const @@ -3650,16 +3650,16 @@ void SlideAtom::setData( unsigned , const unsigned char* data ) void SlideAtom::dump( std::ostream& out ) const { out << "SlideAtom" << std::endl; - out << "layoutGeom " << layoutGeom() << std::endl; - // out << "layoutPlaceholderId " << layoutPlaceholderId() <<std::endl; - out << "layoutPlaceholderId1 " << d->layoutPlaceholderId1 <<std::endl; - out << "layoutPlaceholderId2 " << d->layoutPlaceholderId2 <<std::endl; - out << "layoutPlaceholderId3 " << d->layoutPlaceholderId3 <<std::endl; - out << "layoutPlaceholderId4 " << d->layoutPlaceholderId4 <<std::endl; - out << "layoutPlaceholderId5 " << d->layoutPlaceholderId5 <<std::endl; - out << "layoutPlaceholderId6 " << d->layoutPlaceholderId6 <<std::endl; - out << "layoutPlaceholderId7 " << d->layoutPlaceholderId7 <<std::endl; - out << "layoutPlaceholderId8 " << d->layoutPlaceholderId8 <<std::endl; + out << "tqlayoutGeom " << tqlayoutGeom() << std::endl; + // out << "tqlayoutPlaceholderId " << tqlayoutPlaceholderId() <<std::endl; + out << "tqlayoutPlaceholderId1 " << d->tqlayoutPlaceholderId1 <<std::endl; + out << "tqlayoutPlaceholderId2 " << d->tqlayoutPlaceholderId2 <<std::endl; + out << "tqlayoutPlaceholderId3 " << d->tqlayoutPlaceholderId3 <<std::endl; + out << "tqlayoutPlaceholderId4 " << d->tqlayoutPlaceholderId4 <<std::endl; + out << "tqlayoutPlaceholderId5 " << d->tqlayoutPlaceholderId5 <<std::endl; + out << "tqlayoutPlaceholderId6 " << d->tqlayoutPlaceholderId6 <<std::endl; + out << "tqlayoutPlaceholderId7 " << d->tqlayoutPlaceholderId7 <<std::endl; + out << "tqlayoutPlaceholderId8 " << d->tqlayoutPlaceholderId8 <<std::endl; out << "masterId " << masterId() << std::endl; out << "notesId " << notesId() << std::endl; out << "flags " << flags() << std::endl; @@ -4105,7 +4105,7 @@ const unsigned int msofbtSpAtom::id = 61450; /* F00A */ class msofbtSpAtom::Private { public: - unsigned long shapeId; + unsigned long tqshapeId; unsigned long persistentFlag; bool background; bool hFlip; @@ -4115,7 +4115,7 @@ public: msofbtSpAtom ::msofbtSpAtom () { d = new Private; - d->shapeId = 0; + d->tqshapeId = 0; d->persistentFlag = 0; d->background = false; d->hFlip = false; @@ -4127,17 +4127,17 @@ msofbtSpAtom ::~msofbtSpAtom () delete d; } -unsigned long msofbtSpAtom::shapeId() const +unsigned long msofbtSpAtom::tqshapeId() const { - return d->shapeId; + return d->tqshapeId; } void msofbtSpAtom::setShapeId( unsigned long id ) { - d->shapeId = id; + d->tqshapeId = id; } -const char* msofbtSpAtom::shapeTypeAsString() const +const char* msofbtSpAtom::tqshapeTypeAsString() const { switch( instance() ) { @@ -5453,7 +5453,7 @@ int PPTReader::indexPersistence( unsigned long ofs ) return 0; } -void PPTReader::loadRecord( Record* parent ) +void PPTReader::loadRecord( Record* tqparent ) { // FIXME unsigned char buffer[65536]; @@ -5472,7 +5472,7 @@ void PPTReader::loadRecord( Record* parent ) Record* record = Record::create( type ); if( record ) { - record->setParent( parent ); + record->setParent( tqparent ); record->setPosition( pos ); record->setInstance( instance ); @@ -5821,7 +5821,7 @@ void PPTReader::handleEscherGroupAtom( msofbtSpgrAtom* atom ) // set rect bound of current group - // this is shape for the group, no need to + // this is tqshape for the group, no need to d->isShapeGroup = true; } diff --git a/filters/kpresenter/powerpoint/libppt/powerpoint.h b/filters/kpresenter/powerpoint/libppt/powerpoint.h index 49950817..ea293ae5 100644 --- a/filters/kpresenter/powerpoint/libppt/powerpoint.h +++ b/filters/kpresenter/powerpoint/libppt/powerpoint.h @@ -63,9 +63,9 @@ public: */ virtual bool isContainer() const { return false; } - void setParent( Record* parent ); + void setParent( Record* tqparent ); - const Record* parent() const; + const Record* tqparent() const; /** Sets the data for this record. @@ -1262,12 +1262,12 @@ public: SlideAtom(); ~SlideAtom(); - int layoutGeom() const; - void setLayoutGeom( int layoutGeom ); + int tqlayoutGeom() const; + void setLayoutGeom( int tqlayoutGeom ); // see OEPlaceHolderAtom - int layoutPlaceholderId() const; - // void setLayoutPlaceholderId(int layoutPlaceholderId); - void setLayoutPlaceholderId(int layoutPlaceholderId1, int layoutPlaceholderId2,int layoutPlaceholderId3,int layoutPlaceholderId4,int layoutPlaceholderId5,int layoutPlaceholderId6,int layoutPlaceholderId7,int layoutPlaceholderId8); + int tqlayoutPlaceholderId() const; + // void setLayoutPlaceholderId(int tqlayoutPlaceholderId); + void setLayoutPlaceholderId(int tqlayoutPlaceholderId1, int tqlayoutPlaceholderId2,int tqlayoutPlaceholderId3,int tqlayoutPlaceholderId4,int tqlayoutPlaceholderId5,int tqlayoutPlaceholderId6,int tqlayoutPlaceholderId7,int tqlayoutPlaceholderId8); int masterId() const; void setMasterId( int masterId ); int notesId() const; @@ -1901,9 +1901,9 @@ public: msofbtSpAtom (); ~msofbtSpAtom (); - unsigned long shapeId() const; + unsigned long tqshapeId() const; void setShapeId( unsigned long id ); - const char* shapeTypeAsString() const; + const char* tqshapeTypeAsString() const; unsigned long persistentFlag() const; void setPersistentFlag( unsigned long persistentFlag ); @@ -1957,10 +1957,10 @@ public: FillSolid, // Fill with a solid color FillPattern, // Fill with a pattern (bitmap) FillTexture, // A texture (pattern with its own color map) - FillPicture, // Center a picture in the shape + FillPicture, // Center a picture in the tqshape FillShade, // Shade from start to end points FillShadeCenter, // Shade from bounding rectangle to end point - FillShadeShape, // Shade from shape outline to end point + FillShadeShape, // Shade from tqshape outline to end point FillShadeScale, // Similar to msofillShade, but the fillAngle FillShadeTitle, // special type - shade to title --- for PP FillBackground // Use the background fill color/pattern @@ -2095,8 +2095,8 @@ public: NotesBody, CenteredTitle, Subtitle, - VerticalTextTitle, - VerticalTextBody, + Qt::VerticalTextTitle, + Qt::VerticalTextBody, NotesSlideImage, Object, Graph, @@ -2385,9 +2385,9 @@ public: int ruid() const; // rule ID void setRuid( int ruid ); int align() const; - void setAlign( int align );// alignment + void setAlign( int align );// tqalignment int cProxies() const; - void setCProxies( int cProxies );// number of shapes governed by rule + void setCProxies( int cProxies );// number of tqshapes governed by rule void setData( unsigned size, const unsigned char* data ); const char* name(){ return "msofbtAlignRuleAtom "; } @@ -2497,7 +2497,7 @@ protected: void loadDocument(); int indexPersistence( unsigned long offset ); - void loadRecord( Record* parent ); + void loadRecord( Record* tqparent ); void handleRecord( Record* record, int type ); void handleContainer( Container* container, int type, unsigned size ); diff --git a/filters/kpresenter/powerpoint/libppt/ustring.cpp b/filters/kpresenter/powerpoint/libppt/ustring.cpp index b0a44e56..b574d7de 100644 --- a/filters/kpresenter/powerpoint/libppt/ustring.cpp +++ b/filters/kpresenter/powerpoint/libppt/ustring.cpp @@ -216,13 +216,13 @@ UString UString::null; static char *statBuffer = 0L; UChar::UChar(const UCharReference &c) - : uc( c.unicode() ) + : uc( c.tqunicode() ) { } UChar UChar::toLower() const { - // ### properly support unicode tolower + // ### properly support tqunicode tolower if (uc >= 256 || islower(uc)) return *this; @@ -526,7 +526,7 @@ unsigned long UString::toULong(bool *ok) const return static_cast<unsigned long>(d); } -int UString::find(const UString &f, int pos) const +int UString::tqfind(const UString &f, int pos) const { if (isNull()) return -1; @@ -644,7 +644,7 @@ bool Libppt::operator<(const UString& s1, const UString& s2) l++; } if (l < lmin) - return (c1->unicode() < c2->unicode()); + return (c1->tqunicode() < c2->tqunicode()); return (l1 < l2); } diff --git a/filters/kpresenter/powerpoint/libppt/ustring.h b/filters/kpresenter/powerpoint/libppt/ustring.h index dfadbc7d..087aff50 100644 --- a/filters/kpresenter/powerpoint/libppt/ustring.h +++ b/filters/kpresenter/powerpoint/libppt/ustring.h @@ -40,8 +40,8 @@ namespace Libppt { * @short Unicode character. * * UChar represents a 16 bit Unicode character. It's internal data - * representation is compatible to XChar2b and QChar. It's therefore - * possible to exchange data with X and Qt with shallow copies. + * representation is compatible to XChar2b and TQChar. It's therefore + * possible to exchange data with X and TQt with shallow copies. */ struct UChar { /** @@ -71,7 +71,7 @@ namespace Libppt { /** * @return the 16 bit Unicode value of the character */ - unsigned short unicode() const { return uc; } + unsigned short tqunicode() const { return uc; } public: /** * @return The character converted to lower case. @@ -128,7 +128,7 @@ namespace Libppt { /** * @return Unicode value. */ - unsigned short unicode() const { return ref().unicode(); } + unsigned short tqunicode() const { return ref().tqunicode(); } /** * @return Lower byte. */ @@ -334,7 +334,7 @@ namespace Libppt { * @return Position of first occurence of f starting at position pos. * -1 if the search was not successful. */ - int find(const UString &f, int pos = 0) const; + int tqfind(const UString &f, int pos = 0) const; /** * @return Position of first occurence of f searching backwards from * position pos. diff --git a/filters/kpresenter/svg/svgexport.cc b/filters/kpresenter/svg/svgexport.cc index 2be6eea1..20cff46d 100644 --- a/filters/kpresenter/svg/svgexport.cc +++ b/filters/kpresenter/svg/svgexport.cc @@ -18,8 +18,8 @@ Boston, MA 02110-1301 USA. */ -#include <qpicture.h> -#include <qpainter.h> +#include <tqpicture.h> +#include <tqpainter.h> #include <kmessagebox.h> @@ -38,7 +38,7 @@ typedef KGenericFactory<SvgExport, KoFilter> SvgExportFactory; K_EXPORT_COMPONENT_FACTORY( libkpresentersvgexport, SvgExportFactory( "svgexport" ) ) -SvgExport::SvgExport(KoFilter *, const char *, const QStringList&) +SvgExport::SvgExport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -48,8 +48,8 @@ SvgExport::~SvgExport() } -KoFilter::ConversionStatus -SvgExport::convert(const QCString& from, const QCString& to) +KoFilter::ConversiontqStatus +SvgExport::convert(const TQCString& from, const TQCString& to) { KoDocument * document = m_chain->inputDocument(); @@ -76,13 +76,13 @@ SvgExport::convert(const QCString& from, const QCString& to) kdWarning() << "Invalid document mimetype " << kpresenterdoc->mimeType() << endl; return KoFilter::NotImplemented; } - KoPageLayout layoutPage= kpresenterdoc->pageLayout(); - int width = int( layoutPage.ptWidth ); - int height = int( layoutPage.ptHeight ); + KoPageLayout tqlayoutPage= kpresenterdoc->pageLayout(); + int width = int( tqlayoutPage.ptWidth ); + int height = int( tqlayoutPage.ptHeight ); - QPicture picture; - QPainter painter(&picture); - QRect rect(QPoint(0, 0), QPoint(width, height)); + TQPicture picture; + TQPainter painter(&picture); + TQRect rect(TQPoint(0, 0), TQPoint(width, height)); kpresenterdoc->paintContent(painter, rect, false); painter.end(); diff --git a/filters/kpresenter/svg/svgexport.h b/filters/kpresenter/svg/svgexport.h index 7b4583b3..a11b20c2 100644 --- a/filters/kpresenter/svg/svgexport.h +++ b/filters/kpresenter/svg/svgexport.h @@ -26,12 +26,13 @@ class SvgExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - SvgExport(KoFilter *parent, const char *name, const QStringList&); + SvgExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~SvgExport(); - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; #endif // __SVGEXPORT_H__ diff --git a/filters/kpresenter/xbm/xbmexport.cpp b/filters/kpresenter/xbm/xbmexport.cpp index 148288dc..16a0818a 100644 --- a/filters/kpresenter/xbm/xbmexport.cpp +++ b/filters/kpresenter/xbm/xbmexport.cpp @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include <qpixmap.h> -#include <qpainter.h> +#include <tqpixmap.h> +#include <tqpainter.h> #include <kmessagebox.h> @@ -33,7 +33,7 @@ typedef KGenericFactory<XbmExport, KoFilter> xbmExportFactory; K_EXPORT_COMPONENT_FACTORY( libkpresenterxbmexport, xbmExportFactory( "xbmexport" ) ) -XbmExport::XbmExport(KoFilter *fil, const char *name, const QStringList&lst) +XbmExport::XbmExport(KoFilter *fil, const char *name, const TQStringList&lst) : ImageExport(fil,name,lst) { } @@ -58,7 +58,7 @@ bool XbmExport::extraImageAttribute() } -bool XbmExport::saveImage( QString fileName) +bool XbmExport::saveImage( TQString fileName) { bool ret = pixmap.save( fileName, "XBM" ); // Save the image. diff --git a/filters/kpresenter/xbm/xbmexport.h b/filters/kpresenter/xbm/xbmexport.h index 065e52d5..9079f950 100644 --- a/filters/kpresenter/xbm/xbmexport.h +++ b/filters/kpresenter/xbm/xbmexport.h @@ -25,11 +25,12 @@ class XbmExport : public ImageExport { Q_OBJECT + TQ_OBJECT public: - XbmExport(KoFilter *parent, const char *name, const QStringList&); + XbmExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~XbmExport(); - virtual bool saveImage( QString fileName); + virtual bool saveImage( TQString fileName); virtual bool extraImageAttribute(); virtual const char * exportFormat(); }; diff --git a/filters/kpresenter/xpm/xpmexport.cpp b/filters/kpresenter/xpm/xpmexport.cpp index 1456504e..87097f5f 100644 --- a/filters/kpresenter/xpm/xpmexport.cpp +++ b/filters/kpresenter/xpm/xpmexport.cpp @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include <qpixmap.h> -#include <qpainter.h> +#include <tqpixmap.h> +#include <tqpainter.h> #include <kmessagebox.h> @@ -33,7 +33,7 @@ typedef KGenericFactory<XpmExport, KoFilter> xpmExportFactory; K_EXPORT_COMPONENT_FACTORY( libkpresenterxpmexport, xpmExportFactory( "xpmexport" ) ) -XpmExport::XpmExport(KoFilter *fil, const char *name, const QStringList&lst) +XpmExport::XpmExport(KoFilter *fil, const char *name, const TQStringList&lst) : ImageExport(fil,name,lst) { } @@ -58,7 +58,7 @@ bool XpmExport::extraImageAttribute() } -bool XpmExport::saveImage( QString fileName) +bool XpmExport::saveImage( TQString fileName) { bool ret = pixmap.save( fileName, "XPM" ); // Save the image. diff --git a/filters/kpresenter/xpm/xpmexport.h b/filters/kpresenter/xpm/xpmexport.h index 8ccec46c..14b14b6c 100644 --- a/filters/kpresenter/xpm/xpmexport.h +++ b/filters/kpresenter/xpm/xpmexport.h @@ -25,11 +25,12 @@ class XpmExport : public ImageExport { Q_OBJECT + TQ_OBJECT public: - XpmExport(KoFilter *parent, const char *name, const QStringList&); + XpmExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~XpmExport(); - virtual bool saveImage( QString fileName); + virtual bool saveImage( TQString fileName); virtual bool extraImageAttribute(); virtual const char * exportFormat(); }; diff --git a/filters/krita/gmagick/kis_image_magick_converter.cc b/filters/krita/gmagick/kis_image_magick_converter.cc index c94895f8..7d61515d 100644 --- a/filters/krita/gmagick/kis_image_magick_converter.cc +++ b/filters/krita/gmagick/kis_image_magick_converter.cc @@ -24,9 +24,9 @@ #include <magick/api.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qstring.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqstring.h> #include <kdeversion.h> #include <kdebug.h> @@ -35,7 +35,7 @@ #include <kurl.h> #include <kio/netaccess.h> -#include <qcolor.h> +#include <tqcolor.h> #include "kis_types.h" #include "kis_global.h" @@ -58,25 +58,25 @@ namespace { - const Q_UINT8 PIXEL_BLUE = 0; - const Q_UINT8 PIXEL_GREEN = 1; - const Q_UINT8 PIXEL_RED = 2; - const Q_UINT8 PIXEL_ALPHA = 3; + const TQ_UINT8 PIXEL_BLUE = 0; + const TQ_UINT8 PIXEL_GREEN = 1; + const TQ_UINT8 PIXEL_RED = 2; + const TQ_UINT8 PIXEL_ALPHA = 3; - static const Q_UINT8 PIXEL_CYAN = 0; - static const Q_UINT8 PIXEL_MAGENTA = 1; - static const Q_UINT8 PIXEL_YELLOW = 2; - static const Q_UINT8 PIXEL_BLACK = 3; - static const Q_UINT8 PIXEL_CMYK_ALPHA = 4; + static const TQ_UINT8 PIXEL_CYAN = 0; + static const TQ_UINT8 PIXEL_MAGENTA = 1; + static const TQ_UINT8 PIXEL_YELLOW = 2; + static const TQ_UINT8 PIXEL_BLACK = 3; + static const TQ_UINT8 PIXEL_CMYK_ALPHA = 4; - static const Q_UINT8 PIXEL_GRAY = 0; - static const Q_UINT8 PIXEL_GRAY_ALPHA = 1; + static const TQ_UINT8 PIXEL_GRAY = 0; + static const TQ_UINT8 PIXEL_GRAY_ALPHA = 1; /** * Make this more flexible -- although... ImageMagick * isn't that flexible either. */ - QString getColorSpaceName(ColorspaceType type, unsigned long imageDepth = 8) + TQString getColorSpaceName(ColorspaceType type, unsigned long imageDepth = 8) { if (type == GRAYColorspace) { @@ -125,7 +125,7 @@ namespace { const unsigned char * profiledata = GetImageProfile(image, "ICM", &length); if( profiledata == NULL ) return 0; - QByteArray rawdata; + TQByteArray rawdata; rawdata.resize(length); memcpy(rawdata.data(), profiledata, length); @@ -151,8 +151,8 @@ namespace { continue; // XXX: Hardcoded for icc type -- is that correct for us? - if (QString::compare(name, "icc") == 0) { - QByteArray rawdata; + if (TQString::compare(name, "icc") == 0) { + TQByteArray rawdata; rawdata.resize(profile->length); memcpy(rawdata.data(), profile->datum, profile->length); @@ -173,22 +173,22 @@ namespace { const unsigned char * profiledata = GetImageProfile(src, "IPTC", &length); if( profiledata != NULL ) { - QByteArray rawdata; + TQByteArray rawdata; rawdata.resize(length); memcpy(rawdata.data(), profiledata, length); - KisAnnotation* annotation = new KisAnnotation(QString("IPTC"), "", rawdata); + KisAnnotation* annotation = new KisAnnotation(TQString("IPTC"), "", rawdata); Q_CHECK_PTR(annotation); image -> addAnnotation(annotation); } for(int i = 0; i < src->generic_profiles; i++) { - QByteArray rawdata; + TQByteArray rawdata; rawdata.resize(length); memcpy(rawdata.data(), src->generic_profile[i].info, src->generic_profile[i].length); - KisAnnotation* annotation = new KisAnnotation(QString(src->generic_profile[i].name), "", rawdata); + KisAnnotation* annotation = new KisAnnotation(TQString(src->generic_profile[i].name), "", rawdata); Q_CHECK_PTR(annotation); image -> addAnnotation(annotation); @@ -197,12 +197,12 @@ namespace { const ImageAttribute* imgAttr = GetImageAttribute(src, NULL); while(imgAttr) { - QByteArray rawdata; + TQByteArray rawdata; int len = strlen(imgAttr -> value) + 1; rawdata.resize(len); memcpy(rawdata.data(), imgAttr -> value, len); - KisAnnotation* annotation = new KisAnnotation( QString("krita_attribute:%1").arg(QString(imgAttr -> key)), "", rawdata ); + KisAnnotation* annotation = new KisAnnotation( TQString("krita_attribute:%1").tqarg(TQString(imgAttr -> key)), "", rawdata ); Q_CHECK_PTR(annotation); image -> addAnnotation(annotation); @@ -226,14 +226,14 @@ namespace { continue; // XXX: icc will be written seperately? - if (QString::compare(name, "icc") == 0) + if (TQString::compare(name, "icc") == 0) continue; - QByteArray rawdata; + TQByteArray rawdata; rawdata.resize(profile->length); memcpy(rawdata.data(), profile->datum, profile->length); - annotation = new KisAnnotation(QString(name), "", rawdata); + annotation = new KisAnnotation(TQString(name), "", rawdata); Q_CHECK_PTR(annotation); image -> addAnnotation(annotation); @@ -252,13 +252,13 @@ namespace { ImageAttribute * attr = src -> attributes; while (attr) { #endif - QByteArray rawdata; + TQByteArray rawdata; int len = strlen(attr -> value) + 1; rawdata.resize(len); memcpy(rawdata.data(), attr -> value, len); annotation = new KisAnnotation( - QString("krita_attribute:%1").arg(QString(attr -> key)), "", rawdata); + TQString("krita_attribute:%1").tqarg(TQString(attr -> key)), "", rawdata); Q_CHECK_PTR(annotation); image -> addAnnotation(annotation); @@ -274,7 +274,7 @@ namespace { void exportAnnotationsForImage(Image * dst, vKisAnnotationSP_it& it, vKisAnnotationSP_it& annotationsEnd) { while(it != annotationsEnd) { - if (!(*it) || (*it) -> type() == QString()) { + if (!(*it) || (*it) -> type() == TQString()) { kdDebug(41008) << "Warning: empty annotation" << endl; ++it; continue; @@ -388,7 +388,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB images = BlobToImage(ii, &m_data[0], m_data.size(), &ei); } else { - qstrncpy(ii -> filename, QFile::encodeName(uri.path()), MaxTextExtent - 1); + qstrncpy(ii -> filename, TQFile::encodeName(uri.path()), MaxTextExtent - 1); if (ii -> filename[MaxTextExtent - 1]) { emit notifyProgressError(); @@ -426,7 +426,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB unsigned long imageDepth = image->depth; kdDebug(41008) << "Image depth: " << imageDepth << "\n"; - QString csName; + TQString csName; KisColorSpace * cs = 0; ColorspaceType colorspaceType; @@ -477,10 +477,10 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB if (image -> columns && image -> rows) { // Opacity (set by the photoshop import filter) - Q_UINT8 opacity = OPACITY_OPAQUE; + TQ_UINT8 opacity = OPACITY_OPAQUE; const ImageAttribute * attr = GetImageAttribute(image, "[layer-opacity]"); if (attr != 0) { - opacity = Q_UINT8_MAX - Downscale(QString(attr->value).toInt()); + opacity = TQ_UINT8_MAX - Downscale(TQString(attr->value).toInt()); } KisPaintLayerSP layer = 0; @@ -496,21 +496,21 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB Q_ASSERT(layer); // Layerlocation (set by the photoshop import filter) - Q_INT32 x_offset = 0; - Q_INT32 y_offset = 0; + TQ_INT32 x_offset = 0; + TQ_INT32 y_offset = 0; attr = GetImageAttribute(image, "[layer-xpos]"); if (attr != 0) { - x_offset = QString(attr->value).toInt(); + x_offset = TQString(attr->value).toInt(); } attr = GetImageAttribute(image, "[layer-ypos]"); if (attr != 0) { - y_offset = QString(attr->value).toInt(); + y_offset = TQString(attr->value).toInt(); } - for (Q_UINT32 y = 0; y < image->rows; y ++) + for (TQ_UINT32 y = 0; y < image->rows; y ++) { const PixelPacket *pp = AcquireCacheView(vi, 0, y, image->columns, 1, &ei); @@ -533,7 +533,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB int x = 0; while (!hiter.isDone()) { - Q_UINT8 *ptr= hiter.rawData(); + TQ_UINT8 *ptr= hiter.rawData(); *(ptr++) = Downscale(pp->red); // cyan *(ptr++) = Downscale(pp->green); // magenta *(ptr++) = Downscale(pp->blue); // yellow @@ -558,7 +558,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB else if (colorspaceType == LABColorspace) { while(! hiter.isDone()) { - Q_UINT16 *ptr = reinterpret_cast<Q_UINT16 *>(hiter.rawData()); + TQ_UINT16 *ptr = reinterpret_cast<TQ_UINT16 *>(hiter.rawData()); *(ptr++) = ScaleQuantumToShort(pp->red); *(ptr++) = ScaleQuantumToShort(pp->green); @@ -576,7 +576,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB if (imageDepth == 8) { while(! hiter.isDone()) { - Q_UINT8 *ptr= hiter.rawData(); + TQ_UINT8 *ptr= hiter.rawData(); // XXX: not colorstrategy and bitdepth independent *(ptr++) = Downscale(pp->blue); *(ptr++) = Downscale(pp->green); @@ -590,7 +590,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB else if (imageDepth == 16) { while(! hiter.isDone()) { - Q_UINT16 *ptr = reinterpret_cast<Q_UINT16 *>(hiter.rawData()); + TQ_UINT16 *ptr = reinterpret_cast<TQ_UINT16 *>(hiter.rawData()); // XXX: not colorstrategy independent *(ptr++) = ScaleQuantumToShort(pp->blue); *(ptr++) = ScaleQuantumToShort(pp->green); @@ -606,7 +606,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB if (imageDepth == 8) { while(! hiter.isDone()) { - Q_UINT8 *ptr= hiter.rawData(); + TQ_UINT8 *ptr= hiter.rawData(); // XXX: not colorstrategy and bitdepth independent *(ptr++) = Downscale(pp->blue); *(ptr++) = OPACITY_OPAQUE - Downscale(pp->opacity); @@ -618,7 +618,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB else if (imageDepth == 16) { while(! hiter.isDone()) { - Q_UINT16 *ptr = reinterpret_cast<Q_UINT16 *>(hiter.rawData()); + TQ_UINT16 *ptr = reinterpret_cast<TQ_UINT16 *>(hiter.rawData()); // XXX: not colorstrategy independent *(ptr++) = ScaleQuantumToShort(pp->blue); *(ptr++) = 65535/*OPACITY_OPAQUE*/ - ScaleQuantumToShort(pp->opacity); @@ -662,14 +662,14 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB if (uri.isEmpty()) return KisImageBuilder_RESULT_NO_URI; - if (!KIO::NetAccess::exists(uri, false, qApp -> mainWidget())) { + if (!KIO::NetAccess::exists(uri, false, tqApp -> mainWidget())) { return KisImageBuilder_RESULT_NOT_EXIST; } KisImageBuilder_Result result = KisImageBuilder_RESULT_FAILURE; - QString tmpFile; + TQString tmpFile; - if (KIO::NetAccess::download(uri, tmpFile, qApp -> mainWidget())) { + if (KIO::NetAccess::download(uri, tmpFile, tqApp -> mainWidget())) { KURL uriTF; uriTF.setPath( tmpFile ); result = decode(uriTF, false); @@ -712,13 +712,13 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB return KisImageBuilder_RESULT_NOT_LOCAL; - Q_UINT32 layerBytesPerChannel = layer->paintDevice()->pixelSize() / layer->paintDevice()->nChannels(); + TQ_UINT32 layerBytesPerChannel = layer->paintDevice()->pixelSize() / layer->paintDevice()->nChannels(); GetExceptionInfo(&ei); ii = CloneImageInfo(0); - qstrncpy(ii -> filename, QFile::encodeName(uri.path()), MaxTextExtent - 1); + qstrncpy(ii -> filename, TQFile::encodeName(uri.path()), MaxTextExtent - 1); if (ii -> filename[MaxTextExtent - 1]) { emit notifyProgressError(); @@ -755,13 +755,13 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB image -> matte = true; #endif - Q_INT32 y, height, width; + TQ_INT32 y, height, width; height = img -> height(); width = img -> width(); bool alpha = true; - QString ext = QFileInfo(QFile::encodeName(uri.path())).extension(false).upper(); + TQString ext = TQFileInfo(TQFile::encodeName(uri.path())).extension(false).upper(); if (ext == "BMP") { alpha = false; qstrncpy(ii->magick, "BMP2", MaxTextExtent - 1); @@ -796,7 +796,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB if (layerBytesPerChannel == 2) { while (!it.isDone()) { - const Q_UINT16 *d = reinterpret_cast<const Q_UINT16 *>(it.rawData()); + const TQ_UINT16 *d = reinterpret_cast<const TQ_UINT16 *>(it.rawData()); pp -> red = ScaleShortToQuantum(d[PIXEL_CYAN]); pp -> green = ScaleShortToQuantum(d[PIXEL_MAGENTA]); pp -> blue = ScaleShortToQuantum(d[PIXEL_YELLOW]); @@ -811,7 +811,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB else { while (!it.isDone()) { - Q_UINT8 * d = it.rawData(); + TQ_UINT8 * d = it.rawData(); pp -> red = Upscale(d[PIXEL_CYAN]); pp -> green = Upscale(d[PIXEL_MAGENTA]); pp -> blue = Upscale(d[PIXEL_YELLOW]); @@ -833,7 +833,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB if (layerBytesPerChannel == 2) { while (!it.isDone()) { - const Q_UINT16 *d = reinterpret_cast<const Q_UINT16 *>(it.rawData()); + const TQ_UINT16 *d = reinterpret_cast<const TQ_UINT16 *>(it.rawData()); pp -> red = ScaleShortToQuantum(d[PIXEL_RED]); pp -> green = ScaleShortToQuantum(d[PIXEL_GREEN]); pp -> blue = ScaleShortToQuantum(d[PIXEL_BLUE]); @@ -847,7 +847,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB else { while (!it.isDone()) { - Q_UINT8 * d = it.rawData(); + TQ_UINT8 * d = it.rawData(); pp -> red = Upscale(d[PIXEL_RED]); pp -> green = Upscale(d[PIXEL_GREEN]); pp -> blue = Upscale(d[PIXEL_BLUE]); @@ -865,7 +865,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB if (layerBytesPerChannel == 2) { while (!it.isDone()) { - const Q_UINT16 *d = reinterpret_cast<const Q_UINT16 *>(it.rawData()); + const TQ_UINT16 *d = reinterpret_cast<const TQ_UINT16 *>(it.rawData()); pp -> red = ScaleShortToQuantum(d[PIXEL_GRAY]); pp -> green = ScaleShortToQuantum(d[PIXEL_GRAY]); pp -> blue = ScaleShortToQuantum(d[PIXEL_GRAY]); @@ -878,7 +878,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB } else { while (!it.isDone()) { - Q_UINT8 * d = it.rawData(); + TQ_UINT8 * d = it.rawData(); pp -> red = Upscale(d[PIXEL_GRAY]); pp -> green = Upscale(d[PIXEL_GRAY]); pp -> blue = Upscale(d[PIXEL_GRAY]); @@ -919,7 +919,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB return KisImageBuilder_RESULT_OK; } - void KisImageMagickConverter::ioData(KIO::Job *job, const QByteArray& data) + void KisImageMagickConverter::ioData(KIO::Job *job, const TQByteArray& data) { if (data.isNull() || data.isEmpty()) { emit notifyProgressStage(i18n("Loading..."), 0); @@ -984,12 +984,12 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB * @name readFilters * @return Provide a list of file formats the application can read. */ - QString KisImageMagickConverter::readFilters() + TQString KisImageMagickConverter::readFilters() { - QString s; - QString all; - QString name; - QString description; + TQString s; + TQString all; + TQString name; + TQString description; unsigned long matches; /*#ifdef HAVE_MAGICK6 @@ -1025,7 +1025,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB description = info -> description; kdDebug(41008) << "Found import filter for: " << name << "\n"; - if (!description.isEmpty() && !description.contains('/')) { + if (!description.isEmpty() && !description.tqcontains('/')) { all += "*." + name.lower() + " *." + name + " "; s += "*." + name.lower() + " *." + name + "|"; s += i18n(description.utf8()); @@ -1042,7 +1042,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB description = mi -> description; kdDebug(41008) << "Found import filter for: " << name << "\n"; - if (!description.isEmpty() && !description.contains('/')) { + if (!description.isEmpty() && !description.tqcontains('/')) { all += "*." + name.lower() + " *." + name + " "; s += "*." + name.lower() + " *." + name + "|"; s += i18n(description.utf8()); @@ -1058,12 +1058,12 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB return all + s; } - QString KisImageMagickConverter::writeFilters() + TQString KisImageMagickConverter::writeFilters() { - QString s; - QString all; - QString name; - QString description; + TQString s; + TQString all; + TQString name; + TQString description; unsigned long matches; /*#ifdef HAVE_MAGICK6 @@ -1102,7 +1102,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB description = info -> description; - if (!description.isEmpty() && !description.contains('/')) { + if (!description.isEmpty() && !description.tqcontains('/')) { all += "*." + name.lower() + " *." + name + " "; s += "*." + name.lower() + " *." + name + "|"; s += i18n(description.utf8()); @@ -1121,7 +1121,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB description = mi -> description; - if (!description.isEmpty() && !description.contains('/')) { + if (!description.isEmpty() && !description.tqcontains('/')) { all += "*." + name.lower() + " *." + name + " "; s += "*." + name.lower() + " *." + name + "|"; s += i18n(description.utf8()); diff --git a/filters/krita/gmagick/kis_image_magick_converter.h b/filters/krita/gmagick/kis_image_magick_converter.h index 9b3b6bc0..28bd94ce 100644 --- a/filters/krita/gmagick/kis_image_magick_converter.h +++ b/filters/krita/gmagick/kis_image_magick_converter.h @@ -19,8 +19,8 @@ #ifndef KIS_IMAGE_MAGICK_CONVERTER_H_ #define KIS_IMAGE_MAGICK_CONVERTER_H_ -#include <qobject.h> -#include <qvaluevector.h> +#include <tqobject.h> +#include <tqvaluevector.h> #include <kio/job.h> @@ -28,7 +28,7 @@ #include "kis_global.h" #include "kis_progress_subject.h" -class QString; +class TQString; class KURL; class KisDoc; class KisNameServer; @@ -59,8 +59,9 @@ enum KisImageBuilder_Result { * Build a KisImage representation of an image file. */ class KisImageMagickConverter : public KisProgressSubject { - typedef QObject super; + typedef TQObject super; Q_OBJECT + TQ_OBJECT public: KisImageMagickConverter(KisDoc *doc, KisUndoAdapter *adapter); @@ -75,11 +76,11 @@ public: KisImageSP image(); public: - static QString readFilters(); - static QString writeFilters(); + static TQString readFilters(); + static TQString writeFilters(); private slots: - void ioData(KIO::Job *job, const QByteArray& data); + void ioData(KIO::Job *job, const TQByteArray& data); void ioResult(KIO::Job *job); void ioTotalSize(KIO::Job *job, KIO::filesize_t size); @@ -93,7 +94,7 @@ private: KisImageSP m_img; KisDoc *m_doc; KisUndoAdapter *m_adapter; - QValueVector<Q_UINT8> m_data; + TQValueVector<TQ_UINT8> m_data; KIO::TransferJob *m_job; KIO::filesize_t m_size; bool m_stop; diff --git a/filters/krita/gmagick/magickexport.cpp b/filters/krita/gmagick/magickexport.cpp index b47f198c..83965d65 100644 --- a/filters/krita/gmagick/magickexport.cpp +++ b/filters/krita/gmagick/magickexport.cpp @@ -31,7 +31,7 @@ typedef KGenericFactory<MagickExport, KoFilter> MagickExportFactory; K_EXPORT_COMPONENT_FACTORY(libkritagmagickexport, MagickExportFactory("kofficefilters")) -MagickExport::MagickExport(KoFilter *, const char *, const QStringList&) : KoFilter() +MagickExport::MagickExport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -39,7 +39,7 @@ MagickExport::~MagickExport() { } -KoFilter::ConversionStatus MagickExport::convert(const QCString& from, const QCString& to) +KoFilter::ConversiontqStatus MagickExport::convert(const TQCString& from, const TQCString& to) { kdDebug(41008) << "magick export! From: " << from << ", To: " << to << "\n"; @@ -49,7 +49,7 @@ KoFilter::ConversionStatus MagickExport::convert(const QCString& from, const QCS // XXX: Add dialog about flattening layers here KisDoc *output = dynamic_cast<KisDoc*>(m_chain->inputDocument()); - QString filename = m_chain->outputFile(); + TQString filename = m_chain->outputFile(); if (!output) return KoFilter::CreationError; diff --git a/filters/krita/gmagick/magickexport.h b/filters/krita/gmagick/magickexport.h index 3c499ebd..6ea7e238 100644 --- a/filters/krita/gmagick/magickexport.h +++ b/filters/krita/gmagick/magickexport.h @@ -23,13 +23,14 @@ class MagickExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - MagickExport(KoFilter *parent, const char *name, const QStringList&); + MagickExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~MagickExport(); public: - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; #endif // MAGICKEXPORT_H_ diff --git a/filters/krita/gmagick/magickimport.cpp b/filters/krita/gmagick/magickimport.cpp index 5b04d6ff..c1f922db 100644 --- a/filters/krita/gmagick/magickimport.cpp +++ b/filters/krita/gmagick/magickimport.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ -#include <qstring.h> +#include <tqstring.h> #include <magickimport.h> #include <kgenericfactory.h> @@ -33,7 +33,7 @@ typedef KGenericFactory<MagickImport, KoFilter> MagickImportFactory; K_EXPORT_COMPONENT_FACTORY(libkritagmagickimport, MagickImportFactory("kofficefilters")) -MagickImport::MagickImport(KoFilter *, const char *, const QStringList&) : KoFilter() +MagickImport::MagickImport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -41,7 +41,7 @@ MagickImport::~MagickImport() { } -KoFilter::ConversionStatus MagickImport::convert(const QCString&, const QCString& to) +KoFilter::ConversiontqStatus MagickImport::convert(const TQCString&, const TQCString& to) { kdDebug(41008) << "Importing using MagickImport!\n"; @@ -51,7 +51,7 @@ KoFilter::ConversionStatus MagickImport::convert(const QCString&, const QCString KisDoc * doc = dynamic_cast<KisDoc*>(m_chain -> outputDocument()); KisView * view = static_cast<KisView*>(doc -> views().getFirst()); - QString filename = m_chain -> inputFile(); + TQString filename = m_chain -> inputFile(); if (!doc) return KoFilter::CreationError; diff --git a/filters/krita/gmagick/magickimport.h b/filters/krita/gmagick/magickimport.h index 01156642..3373f129 100644 --- a/filters/krita/gmagick/magickimport.h +++ b/filters/krita/gmagick/magickimport.h @@ -23,13 +23,14 @@ class MagickImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - MagickImport(KoFilter *parent, const char *name, const QStringList&); + MagickImport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~MagickImport(); public: - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; #endif // MAGICKIMPORT_H_ diff --git a/filters/krita/jpeg/iccjpeg.c b/filters/krita/jpeg/iccjpeg.c index fefa9509..7abe1ff4 100644 --- a/filters/krita/jpeg/iccjpeg.c +++ b/filters/krita/jpeg/iccjpeg.c @@ -133,7 +133,7 @@ write_icc_profile (j_compress_ptr cinfo, void setup_read_icc_profile (j_decompress_ptr cinfo) { - /* Tell the library to keep any APP2 data it may find */ + /* Tell the library to keep any APP2 data it may tqfind */ jpeg_save_markers(cinfo, ICC_MARKER, 0xFFFF); } diff --git a/filters/krita/jpeg/kis_jpeg_converter.cc b/filters/krita/jpeg/kis_jpeg_converter.cc index 2ceaa68c..c60d90f0 100644 --- a/filters/krita/jpeg/kis_jpeg_converter.cc +++ b/filters/krita/jpeg/kis_jpeg_converter.cc @@ -25,7 +25,7 @@ extern "C" { #include <iccjpeg.h> } -#include <qfile.h> +#include <tqfile.h> #include <kapplication.h> #include <kmessagebox.h> @@ -73,11 +73,11 @@ namespace { { return JCS_CMYK; } - KMessageBox::error(0, i18n("Cannot export images in %1.\n").arg(cs->id().name()) ) ; + KMessageBox::error(0, i18n("Cannot export images in %1.\n").tqarg(cs->id().name()) ) ; return JCS_UNKNOWN; } - QString getColorSpaceForColorType(J_COLOR_SPACE color_type) { + TQString getColorSpaceForColorType(J_COLOR_SPACE color_type) { kdDebug(41008) << "color_type = " << color_type << endl; if(color_type == JCS_GRAYSCALE) { @@ -113,7 +113,7 @@ KisImageBuilder_Result KisJPEGConverter::decode(const KURL& uri) jpeg_create_decompress(&cinfo); // open the file - FILE *fp = fopen(QFile::encodeName(uri.path()), "rb"); + FILE *fp = fopen(TQFile::encodeName(uri.path()), "rb"); if (!fp) { return (KisImageBuilder_RESULT_NOT_EXIST); @@ -134,7 +134,7 @@ KisImageBuilder_Result KisJPEGConverter::decode(const KURL& uri) jpeg_start_decompress(&cinfo); // Get the colorspace - QString csName = getColorSpaceForColorType(cinfo.out_color_space); + TQString csName = getColorSpaceForColorType(cinfo.out_color_space); if(csName.isEmpty()) { kdDebug(41008) << "unsupported colorspace : " << cinfo.out_color_space << endl; jpeg_destroy_decompress(&cinfo); @@ -144,7 +144,7 @@ KisImageBuilder_Result KisJPEGConverter::decode(const KURL& uri) uchar* profile_data; uint profile_len; KisProfile* profile = 0; - QByteArray profile_rawdata; + TQByteArray profile_rawdata; if( read_icc_profile (&cinfo, &profile_data, &profile_len)) { profile_rawdata.resize(profile_len); @@ -200,7 +200,7 @@ KisImageBuilder_Result KisJPEGConverter::decode(const KURL& uri) } } - KisPaintLayerSP layer = new KisPaintLayer(m_img, m_img -> nextLayerName(), Q_UINT8_MAX); + KisPaintLayerSP layer = new KisPaintLayer(m_img, m_img -> nextLayerName(), TQ_UINT8_MAX); // Read exif information if any @@ -210,38 +210,38 @@ KisImageBuilder_Result KisJPEGConverter::decode(const KURL& uri) for (; cinfo.output_scanline < cinfo.image_height;) { KisHLineIterator it = layer->paintDevice()->createHLineIterator(0, cinfo.output_scanline, cinfo.image_width, true); jpeg_read_scanlines(&cinfo, &row_pointer, 1); - Q_UINT8 *src = row_pointer; + TQ_UINT8 *src = row_pointer; switch(cinfo.out_color_space) { case JCS_GRAYSCALE: while (!it.isDone()) { - Q_UINT8 *d = it.rawData(); + TQ_UINT8 *d = it.rawData(); d[0] = *(src++); if(transform) cmsDoTransform(transform, d, d, 1); - d[1] = Q_UINT8_MAX; + d[1] = TQ_UINT8_MAX; ++it; } break; case JCS_RGB: while (!it.isDone()) { - Q_UINT8 *d = it.rawData(); + TQ_UINT8 *d = it.rawData(); d[2] = *(src++); d[1] = *(src++); d[0] = *(src++); if(transform) cmsDoTransform(transform, d, d, 1); - d[3] = Q_UINT8_MAX; + d[3] = TQ_UINT8_MAX; ++it; } break; case JCS_CMYK: while (!it.isDone()) { - Q_UINT8 *d = it.rawData(); - d[0] = Q_UINT8_MAX - *(src++); - d[1] = Q_UINT8_MAX - *(src++); - d[2] = Q_UINT8_MAX - *(src++); - d[3] = Q_UINT8_MAX - *(src++); + TQ_UINT8 *d = it.rawData(); + d[0] = TQ_UINT8_MAX - *(src++); + d[1] = TQ_UINT8_MAX - *(src++); + d[2] = TQ_UINT8_MAX - *(src++); + d[3] = TQ_UINT8_MAX - *(src++); if(transform) cmsDoTransform(transform, d, d, 1); - d[4] = Q_UINT8_MAX; + d[4] = TQ_UINT8_MAX; ++it; } break; @@ -274,7 +274,7 @@ KisImageBuilder_Result KisJPEGConverter::decode(const KURL& uri) exifIO.readExifFromMem( marker->data , marker->data_length ); // Interpret orientation tag ExifValue v; - if( layer->paintDevice()->exifInfo()->getValue("Orientation", v) && v.type() == ExifValue::EXIF_TYPE_SHORT) + if( layer->paintDevice()->exifInfo()->getValue("Qt::Orientation", v) && v.type() == ExifValue::EXIF_TYPE_SHORT) { switch(v.asShort(0)) // { @@ -304,8 +304,8 @@ KisImageBuilder_Result KisJPEGConverter::decode(const KURL& uri) default: break; } - v.setValue(0, (Q_UINT16)1); - layer->paintDevice()->exifInfo()->setValue("Orientation", v); + v.setValue(0, (TQ_UINT16)1); + layer->paintDevice()->exifInfo()->setValue("Qt::Orientation", v); } break; } @@ -325,15 +325,15 @@ KisImageBuilder_Result KisJPEGConverter::buildImage(const KURL& uri) if (uri.isEmpty()) return KisImageBuilder_RESULT_NO_URI; - if (!KIO::NetAccess::exists(uri, false, qApp -> mainWidget())) { + if (!KIO::NetAccess::exists(uri, false, tqApp -> mainWidget())) { return KisImageBuilder_RESULT_NOT_EXIST; } // We're not set up to handle asynchronous loading at the moment. KisImageBuilder_Result result = KisImageBuilder_RESULT_FAILURE; - QString tmpFile; + TQString tmpFile; - if (KIO::NetAccess::download(uri, tmpFile, qApp -> mainWidget())) { + if (KIO::NetAccess::download(uri, tmpFile, tqApp -> mainWidget())) { KURL uriTF; uriTF.setPath( tmpFile ); result = decode(uriTF); @@ -365,7 +365,7 @@ KisImageBuilder_Result KisJPEGConverter::buildFile(const KURL& uri, KisPaintLaye if (!uri.isLocalFile()) return KisImageBuilder_RESULT_NOT_LOCAL; // Open file for writing - FILE *fp = fopen(QFile::encodeName(uri.path()), "wb"); + FILE *fp = fopen(TQFile::encodeName(uri.path()), "wb"); if (!fp) { return (KisImageBuilder_RESULT_FAILURE); @@ -426,7 +426,7 @@ KisImageBuilder_Result KisJPEGConverter::buildFile(const KURL& uri, KisPaintLaye // Save annotation vKisAnnotationSP_it it = annotationsStart; while(it != annotationsEnd) { - if (!(*it) || (*it) -> type() == QString()) { + if (!(*it) || (*it) -> type() == TQString()) { kdDebug(41008) << "Warning: empty annotation" << endl; ++it; continue; @@ -452,20 +452,20 @@ KisImageBuilder_Result KisJPEGConverter::buildFile(const KURL& uri, KisPaintLaye for (; cinfo.next_scanline < height;) { KisHLineIterator it = layer->paintDevice()->createHLineIterator(0, cinfo.next_scanline, width, false); - Q_UINT8 *dst = row_pointer; + TQ_UINT8 *dst = row_pointer; switch(color_type) { case JCS_GRAYSCALE: if(color_nb_bits == 16) { while (!it.isDone()) { - const Q_UINT16 *d = reinterpret_cast<const Q_UINT16 *>(it.rawData()); - *(dst++) = d[0] / Q_UINT8_MAX; + const TQ_UINT16 *d = reinterpret_cast<const TQ_UINT16 *>(it.rawData()); + *(dst++) = d[0] / TQ_UINT8_MAX; ++it; } } else { while (!it.isDone()) { - const Q_UINT8 *d = it.rawData(); + const TQ_UINT8 *d = it.rawData(); *(dst++) = d[0]; ++it; } @@ -475,15 +475,15 @@ KisImageBuilder_Result KisJPEGConverter::buildFile(const KURL& uri, KisPaintLaye if(color_nb_bits == 16) { while (!it.isDone()) { - const Q_UINT16 *d = reinterpret_cast<const Q_UINT16 *>(it.rawData()); - *(dst++) = d[2] / Q_UINT8_MAX; - *(dst++) = d[1] / Q_UINT8_MAX; - *(dst++) = d[0] / Q_UINT8_MAX; + const TQ_UINT16 *d = reinterpret_cast<const TQ_UINT16 *>(it.rawData()); + *(dst++) = d[2] / TQ_UINT8_MAX; + *(dst++) = d[1] / TQ_UINT8_MAX; + *(dst++) = d[0] / TQ_UINT8_MAX; ++it; } } else { while (!it.isDone()) { - const Q_UINT8 *d = it.rawData(); + const TQ_UINT8 *d = it.rawData(); *(dst++) = d[2]; *(dst++) = d[1]; *(dst++) = d[0]; @@ -495,20 +495,20 @@ KisImageBuilder_Result KisJPEGConverter::buildFile(const KURL& uri, KisPaintLaye if(color_nb_bits == 16) { while (!it.isDone()) { - const Q_UINT16 *d = reinterpret_cast<const Q_UINT16 *>(it.rawData()); - *(dst++) = Q_UINT8_MAX - d[0] / Q_UINT8_MAX; - *(dst++) = Q_UINT8_MAX - d[1] / Q_UINT8_MAX; - *(dst++) = Q_UINT8_MAX - d[2] / Q_UINT8_MAX; - *(dst++) = Q_UINT8_MAX - d[3] / Q_UINT8_MAX; + const TQ_UINT16 *d = reinterpret_cast<const TQ_UINT16 *>(it.rawData()); + *(dst++) = TQ_UINT8_MAX - d[0] / TQ_UINT8_MAX; + *(dst++) = TQ_UINT8_MAX - d[1] / TQ_UINT8_MAX; + *(dst++) = TQ_UINT8_MAX - d[2] / TQ_UINT8_MAX; + *(dst++) = TQ_UINT8_MAX - d[3] / TQ_UINT8_MAX; ++it; } } else { while (!it.isDone()) { - const Q_UINT8 *d = it.rawData(); - *(dst++) = Q_UINT8_MAX - d[0]; - *(dst++) = Q_UINT8_MAX - d[1]; - *(dst++) = Q_UINT8_MAX - d[2]; - *(dst++) = Q_UINT8_MAX - d[3]; + const TQ_UINT8 *d = it.rawData(); + *(dst++) = TQ_UINT8_MAX - d[0]; + *(dst++) = TQ_UINT8_MAX - d[1]; + *(dst++) = TQ_UINT8_MAX - d[2]; + *(dst++) = TQ_UINT8_MAX - d[3]; ++it; } } diff --git a/filters/krita/jpeg/kis_jpeg_converter.h b/filters/krita/jpeg/kis_jpeg_converter.h index 99b7eadf..8500d146 100644 --- a/filters/krita/jpeg/kis_jpeg_converter.h +++ b/filters/krita/jpeg/kis_jpeg_converter.h @@ -26,7 +26,7 @@ extern "C" { #include <jpeglib.h> } -#include <qvaluevector.h> +#include <tqvaluevector.h> #include <kio/job.h> @@ -66,6 +66,7 @@ struct KisJPEGOptions { class KisJPEGConverter : public KisProgressSubject { Q_OBJECT + TQ_OBJECT public: KisJPEGConverter(KisDoc *doc, KisUndoAdapter *adapter); virtual ~KisJPEGConverter(); diff --git a/filters/krita/jpeg/kis_jpeg_export.cc b/filters/krita/jpeg/kis_jpeg_export.cc index 39419833..58d906bc 100644 --- a/filters/krita/jpeg/kis_jpeg_export.cc +++ b/filters/krita/jpeg/kis_jpeg_export.cc @@ -19,8 +19,8 @@ #include "kis_jpeg_export.h" -#include <qcheckbox.h> -#include <qslider.h> +#include <tqcheckbox.h> +#include <tqslider.h> #include <kapplication.h> #include <kdialogbase.h> @@ -77,7 +77,7 @@ class KisExifInfoVisitor : public KisLayerVisitor typedef KGenericFactory<KisJPEGExport, KoFilter> KisJPEGExportFactory; K_EXPORT_COMPONENT_FACTORY(libkritajpegexport, KisJPEGExportFactory("kofficefilters")) -KisJPEGExport::KisJPEGExport(KoFilter *, const char *, const QStringList&) : KoFilter() +KisJPEGExport::KisJPEGExport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -85,7 +85,7 @@ KisJPEGExport::~KisJPEGExport() { } -KoFilter::ConversionStatus KisJPEGExport::convert(const QCString& from, const QCString& to) +KoFilter::ConversiontqStatus KisJPEGExport::convert(const TQCString& from, const TQCString& to) { kdDebug(41008) << "JPEG export! From: " << from << ", To: " << to << "\n"; @@ -98,7 +98,7 @@ KoFilter::ConversionStatus KisJPEGExport::convert(const QCString& from, const QC KisWdgOptionsJPEG* wdg = new KisWdgOptionsJPEG(kdb); kdb->setMainWidget(wdg); kapp->restoreOverrideCursor(); - if(kdb->exec() == QDialog::Rejected) + if(kdb->exec() == TQDialog::Rejected) { return KoFilter::OK; // FIXME Cancel doesn't exist :( } @@ -110,7 +110,7 @@ KoFilter::ConversionStatus KisJPEGExport::convert(const QCString& from, const QC // XXX: Add dialog about flattening layers here KisDoc *output = dynamic_cast<KisDoc*>(m_chain->inputDocument()); - QString filename = m_chain->outputFile(); + TQString filename = m_chain->outputFile(); if (!output) return KoFilter::CreationError; diff --git a/filters/krita/jpeg/kis_jpeg_export.h b/filters/krita/jpeg/kis_jpeg_export.h index 38e04b20..a0f47351 100644 --- a/filters/krita/jpeg/kis_jpeg_export.h +++ b/filters/krita/jpeg/kis_jpeg_export.h @@ -24,11 +24,12 @@ class KisJPEGExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - KisJPEGExport(KoFilter *parent, const char *name, const QStringList&); + KisJPEGExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~KisJPEGExport(); public: - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; #endif diff --git a/filters/krita/jpeg/kis_jpeg_import.cc b/filters/krita/jpeg/kis_jpeg_import.cc index e9b867e0..537be19a 100644 --- a/filters/krita/jpeg/kis_jpeg_import.cc +++ b/filters/krita/jpeg/kis_jpeg_import.cc @@ -33,7 +33,7 @@ typedef KGenericFactory<KisJPEGImport, KoFilter> JPEGImportFactory; K_EXPORT_COMPONENT_FACTORY(libkritajpegimport, JPEGImportFactory("kofficefilters")) -KisJPEGImport::KisJPEGImport(KoFilter *, const char *, const QStringList&) : KoFilter() +KisJPEGImport::KisJPEGImport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -41,7 +41,7 @@ KisJPEGImport::~KisJPEGImport() { } -KoFilter::ConversionStatus KisJPEGImport::convert(const QCString&, const QCString& to) +KoFilter::ConversiontqStatus KisJPEGImport::convert(const TQCString&, const TQCString& to) { kdDebug(41008) << "Importing using JPEGImport!\n"; @@ -51,7 +51,7 @@ KoFilter::ConversionStatus KisJPEGImport::convert(const QCString&, const QCStrin KisDoc * doc = dynamic_cast<KisDoc*>(m_chain -> outputDocument()); KisView * view = static_cast<KisView*>(doc -> views().getFirst()); - QString filename = m_chain -> inputFile(); + TQString filename = m_chain -> inputFile(); if (!doc) return KoFilter::CreationError; diff --git a/filters/krita/jpeg/kis_jpeg_import.h b/filters/krita/jpeg/kis_jpeg_import.h index 6e60c84b..4cfb62c2 100644 --- a/filters/krita/jpeg/kis_jpeg_import.h +++ b/filters/krita/jpeg/kis_jpeg_import.h @@ -23,11 +23,12 @@ class KisJPEGImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - KisJPEGImport(KoFilter *parent, const char *name, const QStringList&); + KisJPEGImport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~KisJPEGImport(); public: - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; #endif diff --git a/filters/krita/jpeg/kis_wdg_options_jpeg.ui b/filters/krita/jpeg/kis_wdg_options_jpeg.ui index 17f5eb36..06c39edc 100644 --- a/filters/krita/jpeg/kis_wdg_options_jpeg.ui +++ b/filters/krita/jpeg/kis_wdg_options_jpeg.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KisWdgOptionsJPEG</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KisWdgOptionsJPEG</cstring> </property> @@ -19,34 +19,34 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> <property name="text"> <string>Quality:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop</set> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QSlider"> + <widget class="TQSlider"> <property name="name"> <cstring>qualityLevel</cstring> </property> @@ -78,15 +78,15 @@ <string>These settings determine how much information is lost during compression</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -94,14 +94,14 @@ <string>Smallest</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel4</cstring> </property> <property name="text"> <string>Best</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -111,7 +111,7 @@ </widget> </hbox> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>progressive</cstring> </property> @@ -136,7 +136,7 @@ Enabling progressive will cause the image to be displayed by the browser even wh <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>61</height> @@ -145,5 +145,5 @@ Enabling progressive will cause the image to be displayed by the browser even wh </spacer> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/filters/krita/libkisexif/kis_exif_io.cpp b/filters/krita/libkisexif/kis_exif_io.cpp index a5e5dbd7..f02b49b7 100644 --- a/filters/krita/libkisexif/kis_exif_io.cpp +++ b/filters/krita/libkisexif/kis_exif_io.cpp @@ -102,9 +102,9 @@ void KisExifIO::readExifData( ExifData* exifData) for (uint i = 0; i < content->count; i++) { ExifEntry* entry = content->entries[i]; - QString tagname = exif_tag_get_name ( entry->tag ); + TQString tagname = exif_tag_get_name ( entry->tag ); // kdDebug() << "found tag : " << tagname << endl; - // QString tagname = exif_tag_get_name_in_ifd ( entry->tag, EXIF_IFD_0 ); TODO: would be better to rely on 0.6.13 when it becomes more common, as it supports better other IFD (GPS and interoperrabilibity) + // TQString tagname = exif_tag_get_name_in_ifd ( entry->tag, EXIF_IFD_0 ); TODO: would be better to rely on 0.6.13 when it becomes more common, as it supports better other IFD (GPS and interoperrabilibity) ExifValue value( format2type(entry->format), entry->data, entry->size, ifds[ifd], entry->components, bO ); // exif_entry_dump( entry, 4); // kdDebug() << "value = " << value.toString() << endl; diff --git a/filters/krita/magick/kis_image_magick_converter.cc b/filters/krita/magick/kis_image_magick_converter.cc index e5407037..e632b1a7 100644 --- a/filters/krita/magick/kis_image_magick_converter.cc +++ b/filters/krita/magick/kis_image_magick_converter.cc @@ -23,9 +23,9 @@ #include <magick/api.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qstring.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqstring.h> #include <kdeversion.h> #include <kdebug.h> @@ -34,7 +34,7 @@ #include <kurl.h> #include <kio/netaccess.h> -#include <qcolor.h> +#include <tqcolor.h> #include "kis_types.h" #include "kis_global.h" @@ -57,25 +57,25 @@ namespace { - const Q_UINT8 PIXEL_BLUE = 0; - const Q_UINT8 PIXEL_GREEN = 1; - const Q_UINT8 PIXEL_RED = 2; - const Q_UINT8 PIXEL_ALPHA = 3; + const TQ_UINT8 PIXEL_BLUE = 0; + const TQ_UINT8 PIXEL_GREEN = 1; + const TQ_UINT8 PIXEL_RED = 2; + const TQ_UINT8 PIXEL_ALPHA = 3; - static const Q_UINT8 PIXEL_CYAN = 0; - static const Q_UINT8 PIXEL_MAGENTA = 1; - static const Q_UINT8 PIXEL_YELLOW = 2; - static const Q_UINT8 PIXEL_BLACK = 3; - static const Q_UINT8 PIXEL_CMYK_ALPHA = 4; + static const TQ_UINT8 PIXEL_CYAN = 0; + static const TQ_UINT8 PIXEL_MAGENTA = 1; + static const TQ_UINT8 PIXEL_YELLOW = 2; + static const TQ_UINT8 PIXEL_BLACK = 3; + static const TQ_UINT8 PIXEL_CMYK_ALPHA = 4; - static const Q_UINT8 PIXEL_GRAY = 0; - static const Q_UINT8 PIXEL_GRAY_ALPHA = 1; + static const TQ_UINT8 PIXEL_GRAY = 0; + static const TQ_UINT8 PIXEL_GRAY_ALPHA = 1; /** * Make this more flexible -- although... ImageMagick * isn't that flexible either. */ - QString getColorSpaceName(ColorspaceType type, unsigned long imageDepth = 8) + TQString getColorSpaceName(ColorspaceType type, unsigned long imageDepth = 8) { if (type == GRAYColorspace) { @@ -139,8 +139,8 @@ namespace { continue; // XXX: Hardcoded for icc type -- is that correct for us? - if (QString::compare(name, "icc") == 0) { - QByteArray rawdata; + if (TQString::compare(name, "icc") == 0) { + TQByteArray rawdata; rawdata.resize(profile->length); memcpy(rawdata.data(), profile->datum, profile->length); @@ -174,14 +174,14 @@ namespace { continue; // XXX: icc will be written seperately? - if (QString::compare(name, "icc") == 0) + if (TQString::compare(name, "icc") == 0) continue; - QByteArray rawdata; + TQByteArray rawdata; rawdata.resize(profile->length); memcpy(rawdata.data(), profile->datum, profile->length); - annotation = new KisAnnotation(QString(name), "", rawdata); + annotation = new KisAnnotation(TQString(name), "", rawdata); Q_CHECK_PTR(annotation); image -> addAnnotation(annotation); @@ -200,13 +200,13 @@ namespace { ImageAttribute * attr = src -> attributes; while (attr) { #endif - QByteArray rawdata; + TQByteArray rawdata; int len = strlen(attr -> value) + 1; rawdata.resize(len); memcpy(rawdata.data(), attr -> value, len); annotation = new KisAnnotation( - QString("krita_attribute:%1").arg(QString(attr -> key)), "", rawdata); + TQString("krita_attribute:%1").tqarg(TQString(attr -> key)), "", rawdata); Q_CHECK_PTR(annotation); image -> addAnnotation(annotation); @@ -225,7 +225,7 @@ namespace { return; #else while(it != annotationsEnd) { - if (!(*it) || (*it) -> type() == QString()) { + if (!(*it) || (*it) -> type() == TQString()) { kdDebug(41008) << "Warning: empty annotation" << endl; ++it; continue; @@ -339,7 +339,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB images = BlobToImage(ii, &m_data[0], m_data.size(), &ei); } else { - qstrncpy(ii -> filename, QFile::encodeName(uri.path()), MaxTextExtent - 1); + qstrncpy(ii -> filename, TQFile::encodeName(uri.path()), MaxTextExtent - 1); if (ii -> filename[MaxTextExtent - 1]) { emit notifyProgressError(); @@ -371,7 +371,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB unsigned long imageDepth = image->depth; kdDebug(41008) << "Image depth: " << imageDepth << "\n"; - QString csName; + TQString csName; KisColorSpace * cs = 0; ColorspaceType colorspaceType; @@ -422,10 +422,10 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB if (image -> columns && image -> rows) { // Opacity (set by the photoshop import filter) - Q_UINT8 opacity = OPACITY_OPAQUE; + TQ_UINT8 opacity = OPACITY_OPAQUE; const ImageAttribute * attr = GetImageAttribute(image, "[layer-opacity]"); if (attr != 0) { - opacity = Q_UINT8_MAX - Downscale(QString(attr->value).toInt()); + opacity = TQ_UINT8_MAX - Downscale(TQString(attr->value).toInt()); } KisPaintLayerSP layer = 0; @@ -441,21 +441,21 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB Q_ASSERT(layer); // Layerlocation (set by the photoshop import filter) - Q_INT32 x_offset = 0; - Q_INT32 y_offset = 0; + TQ_INT32 x_offset = 0; + TQ_INT32 y_offset = 0; attr = GetImageAttribute(image, "[layer-xpos]"); if (attr != 0) { - x_offset = QString(attr->value).toInt(); + x_offset = TQString(attr->value).toInt(); } attr = GetImageAttribute(image, "[layer-ypos]"); if (attr != 0) { - y_offset = QString(attr->value).toInt(); + y_offset = TQString(attr->value).toInt(); } - for (Q_UINT32 y = 0; y < image->rows; y ++) + for (TQ_UINT32 y = 0; y < image->rows; y ++) { const PixelPacket *pp = AcquireCacheView(vi, 0, y, image->columns, 1, &ei); @@ -478,7 +478,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB int x = 0; while (!hiter.isDone()) { - Q_UINT8 *ptr= hiter.rawData(); + TQ_UINT8 *ptr= hiter.rawData(); *(ptr++) = Downscale(pp->red); // cyan *(ptr++) = Downscale(pp->green); // magenta *(ptr++) = Downscale(pp->blue); // yellow @@ -503,7 +503,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB else if (colorspaceType == LABColorspace) { while(! hiter.isDone()) { - Q_UINT16 *ptr = reinterpret_cast<Q_UINT16 *>(hiter.rawData()); + TQ_UINT16 *ptr = reinterpret_cast<TQ_UINT16 *>(hiter.rawData()); *(ptr++) = ScaleQuantumToShort(pp->red); *(ptr++) = ScaleQuantumToShort(pp->green); @@ -521,7 +521,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB if (imageDepth == 8) { while(! hiter.isDone()) { - Q_UINT8 *ptr= hiter.rawData(); + TQ_UINT8 *ptr= hiter.rawData(); // XXX: not colorstrategy and bitdepth independent *(ptr++) = Downscale(pp->blue); *(ptr++) = Downscale(pp->green); @@ -535,7 +535,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB else if (imageDepth == 16) { while(! hiter.isDone()) { - Q_UINT16 *ptr = reinterpret_cast<Q_UINT16 *>(hiter.rawData()); + TQ_UINT16 *ptr = reinterpret_cast<TQ_UINT16 *>(hiter.rawData()); // XXX: not colorstrategy independent *(ptr++) = ScaleQuantumToShort(pp->blue); *(ptr++) = ScaleQuantumToShort(pp->green); @@ -551,7 +551,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB if (imageDepth == 8) { while(! hiter.isDone()) { - Q_UINT8 *ptr= hiter.rawData(); + TQ_UINT8 *ptr= hiter.rawData(); // XXX: not colorstrategy and bitdepth independent *(ptr++) = Downscale(pp->blue); *(ptr++) = OPACITY_OPAQUE - Downscale(pp->opacity); @@ -563,7 +563,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB else if (imageDepth == 16) { while(! hiter.isDone()) { - Q_UINT16 *ptr = reinterpret_cast<Q_UINT16 *>(hiter.rawData()); + TQ_UINT16 *ptr = reinterpret_cast<TQ_UINT16 *>(hiter.rawData()); // XXX: not colorstrategy independent *(ptr++) = ScaleQuantumToShort(pp->blue); *(ptr++) = 65535/*OPACITY_OPAQUE*/ - ScaleQuantumToShort(pp->opacity); @@ -607,14 +607,14 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB if (uri.isEmpty()) return KisImageBuilder_RESULT_NO_URI; - if (!KIO::NetAccess::exists(uri, false, qApp -> mainWidget())) { + if (!KIO::NetAccess::exists(uri, false, tqApp -> mainWidget())) { return KisImageBuilder_RESULT_NOT_EXIST; } KisImageBuilder_Result result = KisImageBuilder_RESULT_FAILURE; - QString tmpFile; + TQString tmpFile; - if (KIO::NetAccess::download(uri, tmpFile, qApp -> mainWidget())) { + if (KIO::NetAccess::download(uri, tmpFile, tqApp -> mainWidget())) { KURL uriTF; uriTF.setPath( tmpFile ); result = decode(uriTF, false); @@ -657,13 +657,13 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB return KisImageBuilder_RESULT_NOT_LOCAL; - Q_UINT32 layerBytesPerChannel = layer->paintDevice()->pixelSize() / layer->paintDevice()->nChannels(); + TQ_UINT32 layerBytesPerChannel = layer->paintDevice()->pixelSize() / layer->paintDevice()->nChannels(); GetExceptionInfo(&ei); ii = CloneImageInfo(0); - qstrncpy(ii -> filename, QFile::encodeName(uri.path()), MaxTextExtent - 1); + qstrncpy(ii -> filename, TQFile::encodeName(uri.path()), MaxTextExtent - 1); if (ii -> filename[MaxTextExtent - 1]) { emit notifyProgressError(); @@ -700,13 +700,13 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB image -> matte = true; #endif - Q_INT32 y, height, width; + TQ_INT32 y, height, width; height = img -> height(); width = img -> width(); bool alpha = true; - QString ext = QFileInfo(QFile::encodeName(uri.path())).extension(false).upper(); + TQString ext = TQFileInfo(TQFile::encodeName(uri.path())).extension(false).upper(); if (ext == "BMP") { alpha = false; qstrncpy(ii->magick, "BMP2", MaxTextExtent - 1); @@ -741,7 +741,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB if (layerBytesPerChannel == 2) { while (!it.isDone()) { - const Q_UINT16 *d = reinterpret_cast<const Q_UINT16 *>(it.rawData()); + const TQ_UINT16 *d = reinterpret_cast<const TQ_UINT16 *>(it.rawData()); pp -> red = ScaleShortToQuantum(d[PIXEL_CYAN]); pp -> green = ScaleShortToQuantum(d[PIXEL_MAGENTA]); pp -> blue = ScaleShortToQuantum(d[PIXEL_YELLOW]); @@ -756,7 +756,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB else { while (!it.isDone()) { - Q_UINT8 * d = it.rawData(); + TQ_UINT8 * d = it.rawData(); pp -> red = Upscale(d[PIXEL_CYAN]); pp -> green = Upscale(d[PIXEL_MAGENTA]); pp -> blue = Upscale(d[PIXEL_YELLOW]); @@ -778,7 +778,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB if (layerBytesPerChannel == 2) { while (!it.isDone()) { - const Q_UINT16 *d = reinterpret_cast<const Q_UINT16 *>(it.rawData()); + const TQ_UINT16 *d = reinterpret_cast<const TQ_UINT16 *>(it.rawData()); pp -> red = ScaleShortToQuantum(d[PIXEL_RED]); pp -> green = ScaleShortToQuantum(d[PIXEL_GREEN]); pp -> blue = ScaleShortToQuantum(d[PIXEL_BLUE]); @@ -792,7 +792,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB else { while (!it.isDone()) { - Q_UINT8 * d = it.rawData(); + TQ_UINT8 * d = it.rawData(); pp -> red = Upscale(d[PIXEL_RED]); pp -> green = Upscale(d[PIXEL_GREEN]); pp -> blue = Upscale(d[PIXEL_BLUE]); @@ -810,7 +810,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB if (layerBytesPerChannel == 2) { while (!it.isDone()) { - const Q_UINT16 *d = reinterpret_cast<const Q_UINT16 *>(it.rawData()); + const TQ_UINT16 *d = reinterpret_cast<const TQ_UINT16 *>(it.rawData()); pp -> red = ScaleShortToQuantum(d[PIXEL_GRAY]); pp -> green = ScaleShortToQuantum(d[PIXEL_GRAY]); pp -> blue = ScaleShortToQuantum(d[PIXEL_GRAY]); @@ -823,7 +823,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB } else { while (!it.isDone()) { - Q_UINT8 * d = it.rawData(); + TQ_UINT8 * d = it.rawData(); pp -> red = Upscale(d[PIXEL_GRAY]); pp -> green = Upscale(d[PIXEL_GRAY]); pp -> blue = Upscale(d[PIXEL_GRAY]); @@ -864,7 +864,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB return KisImageBuilder_RESULT_OK; } - void KisImageMagickConverter::ioData(KIO::Job *job, const QByteArray& data) + void KisImageMagickConverter::ioData(KIO::Job *job, const TQByteArray& data) { if (data.isNull() || data.isEmpty()) { emit notifyProgressStage(i18n("Loading..."), 0); @@ -929,12 +929,12 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB * @name readFilters * @return Provide a list of file formats the application can read. */ - QString KisImageMagickConverter::readFilters() + TQString KisImageMagickConverter::readFilters() { - QString s; - QString all; - QString name; - QString description; + TQString s; + TQString all; + TQString name; + TQString description; unsigned long matches; #ifdef HAVE_MAGICK6 @@ -970,7 +970,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB description = info -> description; kdDebug(41008) << "Found import filter for: " << name << "\n"; - if (!description.isEmpty() && !description.contains('/')) { + if (!description.isEmpty() && !description.tqcontains('/')) { all += "*." + name.lower() + " *." + name + " "; s += "*." + name.lower() + " *." + name + "|"; s += i18n(description.utf8()); @@ -987,7 +987,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB description = mi -> description; kdDebug(41008) << "Found import filter for: " << name << "\n"; - if (!description.isEmpty() && !description.contains('/')) { + if (!description.isEmpty() && !description.tqcontains('/')) { all += "*." + name.lower() + " *." + name + " "; s += "*." + name.lower() + " *." + name + "|"; s += i18n(description.utf8()); @@ -1003,12 +1003,12 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB return all + s; } - QString KisImageMagickConverter::writeFilters() + TQString KisImageMagickConverter::writeFilters() { - QString s; - QString all; - QString name; - QString description; + TQString s; + TQString all; + TQString name; + TQString description; unsigned long matches; #ifdef HAVE_MAGICK6 @@ -1047,7 +1047,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB description = info -> description; - if (!description.isEmpty() && !description.contains('/')) { + if (!description.isEmpty() && !description.tqcontains('/')) { all += "*." + name.lower() + " *." + name + " "; s += "*." + name.lower() + " *." + name + "|"; s += i18n(description.utf8()); @@ -1066,7 +1066,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB description = mi -> description; - if (!description.isEmpty() && !description.contains('/')) { + if (!description.isEmpty() && !description.tqcontains('/')) { all += "*." + name.lower() + " *." + name + " "; s += "*." + name.lower() + " *." + name + "|"; s += i18n(description.utf8()); diff --git a/filters/krita/magick/kis_image_magick_converter.h b/filters/krita/magick/kis_image_magick_converter.h index 9b3b6bc0..28bd94ce 100644 --- a/filters/krita/magick/kis_image_magick_converter.h +++ b/filters/krita/magick/kis_image_magick_converter.h @@ -19,8 +19,8 @@ #ifndef KIS_IMAGE_MAGICK_CONVERTER_H_ #define KIS_IMAGE_MAGICK_CONVERTER_H_ -#include <qobject.h> -#include <qvaluevector.h> +#include <tqobject.h> +#include <tqvaluevector.h> #include <kio/job.h> @@ -28,7 +28,7 @@ #include "kis_global.h" #include "kis_progress_subject.h" -class QString; +class TQString; class KURL; class KisDoc; class KisNameServer; @@ -59,8 +59,9 @@ enum KisImageBuilder_Result { * Build a KisImage representation of an image file. */ class KisImageMagickConverter : public KisProgressSubject { - typedef QObject super; + typedef TQObject super; Q_OBJECT + TQ_OBJECT public: KisImageMagickConverter(KisDoc *doc, KisUndoAdapter *adapter); @@ -75,11 +76,11 @@ public: KisImageSP image(); public: - static QString readFilters(); - static QString writeFilters(); + static TQString readFilters(); + static TQString writeFilters(); private slots: - void ioData(KIO::Job *job, const QByteArray& data); + void ioData(KIO::Job *job, const TQByteArray& data); void ioResult(KIO::Job *job); void ioTotalSize(KIO::Job *job, KIO::filesize_t size); @@ -93,7 +94,7 @@ private: KisImageSP m_img; KisDoc *m_doc; KisUndoAdapter *m_adapter; - QValueVector<Q_UINT8> m_data; + TQValueVector<TQ_UINT8> m_data; KIO::TransferJob *m_job; KIO::filesize_t m_size; bool m_stop; diff --git a/filters/krita/magick/magickexport.cpp b/filters/krita/magick/magickexport.cpp index 30113503..b052ab10 100644 --- a/filters/krita/magick/magickexport.cpp +++ b/filters/krita/magick/magickexport.cpp @@ -31,7 +31,7 @@ typedef KGenericFactory<MagickExport, KoFilter> MagickExportFactory; K_EXPORT_COMPONENT_FACTORY(libkritamagickexport, MagickExportFactory("kofficefilters")) -MagickExport::MagickExport(KoFilter *, const char *, const QStringList&) : KoFilter() +MagickExport::MagickExport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -39,7 +39,7 @@ MagickExport::~MagickExport() { } -KoFilter::ConversionStatus MagickExport::convert(const QCString& from, const QCString& to) +KoFilter::ConversiontqStatus MagickExport::convert(const TQCString& from, const TQCString& to) { kdDebug(41008) << "magick export! From: " << from << ", To: " << to << "\n"; @@ -49,7 +49,7 @@ KoFilter::ConversionStatus MagickExport::convert(const QCString& from, const QCS // XXX: Add dialog about flattening layers here KisDoc *output = dynamic_cast<KisDoc*>(m_chain->inputDocument()); - QString filename = m_chain->outputFile(); + TQString filename = m_chain->outputFile(); if (!output) return KoFilter::CreationError; diff --git a/filters/krita/magick/magickexport.h b/filters/krita/magick/magickexport.h index 3c499ebd..6ea7e238 100644 --- a/filters/krita/magick/magickexport.h +++ b/filters/krita/magick/magickexport.h @@ -23,13 +23,14 @@ class MagickExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - MagickExport(KoFilter *parent, const char *name, const QStringList&); + MagickExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~MagickExport(); public: - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; #endif // MAGICKEXPORT_H_ diff --git a/filters/krita/magick/magickimport.cpp b/filters/krita/magick/magickimport.cpp index 33177723..0502e51a 100644 --- a/filters/krita/magick/magickimport.cpp +++ b/filters/krita/magick/magickimport.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ -#include <qstring.h> +#include <tqstring.h> #include <magickimport.h> #include <kgenericfactory.h> @@ -33,7 +33,7 @@ typedef KGenericFactory<MagickImport, KoFilter> MagickImportFactory; K_EXPORT_COMPONENT_FACTORY(libkritamagickimport, MagickImportFactory("kofficefilters")) -MagickImport::MagickImport(KoFilter *, const char *, const QStringList&) : KoFilter() +MagickImport::MagickImport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -41,7 +41,7 @@ MagickImport::~MagickImport() { } -KoFilter::ConversionStatus MagickImport::convert(const QCString&, const QCString& to) +KoFilter::ConversiontqStatus MagickImport::convert(const TQCString&, const TQCString& to) { kdDebug(41008) << "Importing using MagickImport!\n"; @@ -51,7 +51,7 @@ KoFilter::ConversionStatus MagickImport::convert(const QCString&, const QCString KisDoc * doc = dynamic_cast<KisDoc*>(m_chain -> outputDocument()); KisView * view = static_cast<KisView*>(doc -> views().getFirst()); - QString filename = m_chain -> inputFile(); + TQString filename = m_chain -> inputFile(); if (!doc) return KoFilter::CreationError; diff --git a/filters/krita/magick/magickimport.h b/filters/krita/magick/magickimport.h index 01156642..3373f129 100644 --- a/filters/krita/magick/magickimport.h +++ b/filters/krita/magick/magickimport.h @@ -23,13 +23,14 @@ class MagickImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - MagickImport(KoFilter *parent, const char *name, const QStringList&); + MagickImport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~MagickImport(); public: - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; #endif // MAGICKIMPORT_H_ diff --git a/filters/krita/openexr/kis_openexr_export.cpp b/filters/krita/openexr/kis_openexr_export.cpp index 724d07d0..c753bf48 100644 --- a/filters/krita/openexr/kis_openexr_export.cpp +++ b/filters/krita/openexr/kis_openexr_export.cpp @@ -17,7 +17,7 @@ * Boston, MA 02110-1301, USA. */ -#include <qfile.h> +#include <tqfile.h> #include <kmessagebox.h> @@ -49,7 +49,7 @@ using namespace Imath; typedef KGenericFactory<KisOpenEXRExport, KoFilter> KisOpenEXRExportFactory; K_EXPORT_COMPONENT_FACTORY(libkrita_openexr_export, KisOpenEXRExportFactory("kofficefilters")) -KisOpenEXRExport::KisOpenEXRExport(KoFilter *, const char *, const QStringList&) : KoFilter() +KisOpenEXRExport::KisOpenEXRExport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -57,7 +57,7 @@ KisOpenEXRExport::~KisOpenEXRExport() { } -KoFilter::ConversionStatus KisOpenEXRExport::convert(const QCString& from, const QCString& to) +KoFilter::ConversiontqStatus KisOpenEXRExport::convert(const TQCString& from, const TQCString& to) { if (to != "image/x-exr" || from != "application/x-krita") { return KoFilter::NotImplemented; @@ -68,7 +68,7 @@ KoFilter::ConversionStatus KisOpenEXRExport::convert(const QCString& from, const // XXX: Add dialog about flattening layers here KisDoc *doc = dynamic_cast<KisDoc*>(m_chain -> inputDocument()); - QString filename = m_chain -> outputFile(); + TQString filename = m_chain -> outputFile(); if (!doc) { return KoFilter::CreationError; @@ -110,15 +110,15 @@ KoFilter::ConversionStatus KisOpenEXRExport::convert(const QCString& from, const Box2i displayWindow(V2i(0, 0), V2i(img -> width() - 1, img -> height() - 1)); - QRect dataExtent = layer -> exactBounds(); + TQRect dataExtent = layer -> exactBounds(); int dataWidth = dataExtent.width(); int dataHeight = dataExtent.height(); Box2i dataWindow(V2i(dataExtent.left(), dataExtent.top()), V2i(dataExtent.right(), dataExtent.bottom())); - RgbaOutputFile file(QFile::encodeName(filename), displayWindow, dataWindow, WRITE_RGBA); + RgbaOutputFile file(TQFile::encodeName(filename), displayWindow, dataWindow, WRITE_RGBA); - QMemArray<Rgba> pixels(dataWidth); + TQMemArray<Rgba> pixels(dataWidth); for (int y = 0; y < dataHeight; ++y) { diff --git a/filters/krita/openexr/kis_openexr_export.h b/filters/krita/openexr/kis_openexr_export.h index 059a799d..56568e57 100644 --- a/filters/krita/openexr/kis_openexr_export.h +++ b/filters/krita/openexr/kis_openexr_export.h @@ -24,13 +24,14 @@ class KisOpenEXRExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - KisOpenEXRExport(KoFilter *parent, const char *name, const QStringList&); + KisOpenEXRExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~KisOpenEXRExport(); public: - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; #endif // KIS_OPENEXR_EXPORT_H_ diff --git a/filters/krita/openexr/kis_openexr_import.cpp b/filters/krita/openexr/kis_openexr_import.cpp index c2db3385..069a0059 100644 --- a/filters/krita/openexr/kis_openexr_import.cpp +++ b/filters/krita/openexr/kis_openexr_import.cpp @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include <qstring.h> -#include <qfile.h> +#include <tqstring.h> +#include <tqfile.h> #include <kgenericfactory.h> #include <KoDocument.h> @@ -54,7 +54,7 @@ using namespace Imath; typedef KGenericFactory<KisOpenEXRImport, KoFilter> KisOpenEXRImportFactory; K_EXPORT_COMPONENT_FACTORY(libkrita_openexr_import, KisOpenEXRImportFactory("kofficefilters")) -KisOpenEXRImport::KisOpenEXRImport(KoFilter *, const char *, const QStringList&) : KoFilter() +KisOpenEXRImport::KisOpenEXRImport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -62,7 +62,7 @@ KisOpenEXRImport::~KisOpenEXRImport() { } -KoFilter::ConversionStatus KisOpenEXRImport::convert(const QCString& from, const QCString& to) +KoFilter::ConversiontqStatus KisOpenEXRImport::convert(const TQCString& from, const TQCString& to) { if (from != "image/x-exr" || to != "application/x-krita") { return KoFilter::NotImplemented; @@ -77,23 +77,23 @@ KoFilter::ConversionStatus KisOpenEXRImport::convert(const QCString& from, const doc -> prepareForImport(); - QString filename = m_chain -> inputFile(); + TQString filename = m_chain -> inputFile(); if (filename.isEmpty()) { return KoFilter::FileNotFound; } - RgbaInputFile file(QFile::encodeName(filename)); + RgbaInputFile file(TQFile::encodeName(filename)); Box2i dataWindow = file.dataWindow(); Box2i displayWindow = file.displayWindow(); - kdDebug(41008) << "Data window: " << QRect(dataWindow.min.x, dataWindow.min.y, dataWindow.max.x - dataWindow.min.x + 1, dataWindow.max.y - dataWindow.min.y + 1) << endl; - kdDebug(41008) << "Display window: " << QRect(displayWindow.min.x, displayWindow.min.y, displayWindow.max.x - displayWindow.min.x + 1, displayWindow.max.y - displayWindow.min.y + 1) << endl; + kdDebug(41008) << "Data window: " << TQRect(dataWindow.min.x, dataWindow.min.y, dataWindow.max.x - dataWindow.min.x + 1, dataWindow.max.y - dataWindow.min.y + 1) << endl; + kdDebug(41008) << "Display window: " << TQRect(displayWindow.min.x, displayWindow.min.y, displayWindow.max.x - displayWindow.min.x + 1, displayWindow.max.y - displayWindow.min.y + 1) << endl; int imageWidth = displayWindow.max.x - displayWindow.min.x + 1; int imageHeight = displayWindow.max.y - displayWindow.min.y + 1; - QString imageName = "Imported from OpenEXR"; + TQString imageName = "Imported from OpenEXR"; int dataWidth = dataWindow.max.x - dataWindow.min.x + 1; int dataHeight = dataWindow.max.y - dataWindow.min.y + 1; @@ -118,7 +118,7 @@ KoFilter::ConversionStatus KisOpenEXRImport::convert(const QCString& from, const return KoFilter::CreationError; } - QMemArray<Rgba> pixels(dataWidth); + TQMemArray<Rgba> pixels(dataWidth); for (int y = 0; y < dataHeight; ++y) { diff --git a/filters/krita/openexr/kis_openexr_import.h b/filters/krita/openexr/kis_openexr_import.h index 98858537..f8cd5144 100644 --- a/filters/krita/openexr/kis_openexr_import.h +++ b/filters/krita/openexr/kis_openexr_import.h @@ -24,13 +24,14 @@ class KisOpenEXRImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - KisOpenEXRImport(KoFilter *parent, const char *name, const QStringList&); + KisOpenEXRImport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~KisOpenEXRImport(); public: - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; #endif // KIS_OPENEXR_IMPORT_H_ diff --git a/filters/krita/pdf/kis_pdf_import.cpp b/filters/krita/pdf/kis_pdf_import.cpp index ad200414..5249afb4 100644 --- a/filters/krita/pdf/kis_pdf_import.cpp +++ b/filters/krita/pdf/kis_pdf_import.cpp @@ -22,10 +22,10 @@ // poppler's headers #include <poppler-qt.h> -// Qt's headers -#include <qfile.h> -#include <qimage.h> // TODO that too -#include <qradiobutton.h> +// TQt's headers +#include <tqfile.h> +#include <tqimage.h> // TODO that too +#include <tqradiobutton.h> // KDE's headers #include <kapplication.h> @@ -55,7 +55,7 @@ typedef KGenericFactory<KisPDFImport, KoFilter> PDFImportFactory; K_EXPORT_COMPONENT_FACTORY(libkritapdfimport, PDFImportFactory("kofficefilters")) -KisPDFImport::KisPDFImport(KoFilter *, const char *, const QStringList&) : KoFilter() +KisPDFImport::KisPDFImport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -63,9 +63,9 @@ KisPDFImport::~KisPDFImport() { } -KisPDFImport::ConversionStatus KisPDFImport::convert(const QCString& , const QCString& ) +KisPDFImport::ConversiontqStatus KisPDFImport::convert(const TQCString& , const TQCString& ) { - QString filename = m_chain -> inputFile(); + TQString filename = m_chain -> inputFile(); kdDebug(41008) << "Importing using PDFImport!" << filename << endl; if (filename.isEmpty()) @@ -75,17 +75,17 @@ KisPDFImport::ConversionStatus KisPDFImport::convert(const QCString& , const QCS KURL url; url.setPath(filename); - if (!KIO::NetAccess::exists(url, false, qApp -> mainWidget())) { + if (!KIO::NetAccess::exists(url, false, tqApp -> mainWidget())) { return KoFilter::FileNotFound; } // We're not set up to handle asynchronous loading at the moment. - QString tmpFile; - if (KIO::NetAccess::download(url, tmpFile, qApp -> mainWidget())) { + TQString tmpFile; + if (KIO::NetAccess::download(url, tmpFile, tqApp -> mainWidget())) { url.setPath( tmpFile ); } - Poppler::Document* pdoc = Poppler::Document::load( QFile::encodeName(url.path() ) ); + Poppler::Document* pdoc = Poppler::Document::load( TQFile::encodeName(url.path() ) ); if ( !pdoc) @@ -97,7 +97,7 @@ KisPDFImport::ConversionStatus KisPDFImport::convert(const QCString& , const QCS while( pdoc->isLocked() ) { - QCString password; + TQCString password; int result = KPasswordDialog::getPassword(password, i18n("A password is required to read that pdf")); if (result == KPasswordDialog::Accepted) { @@ -113,7 +113,7 @@ KisPDFImport::ConversionStatus KisPDFImport::convert(const QCString& , const QCS KisPDFImportWidget* wdg = new KisPDFImportWidget(pdoc, kdb); kdb->setMainWidget(wdg); kapp->restoreOverrideCursor(); - if(kdb->exec() == QDialog::Rejected) + if(kdb->exec() == TQDialog::Rejected) { delete pdoc; delete kdb; @@ -138,11 +138,11 @@ KisPDFImport::ConversionStatus KisPDFImport::convert(const QCString& , const QCS img->blockSignals(true); // Don't send out signals while we're building the image // create a layer - QValueList<int> pages = wdg->pages(); - for(QValueList<int>::const_iterator it = pages.begin(); it != pages.end(); ++it) + TQValueList<int> pages = wdg->pages(); + for(TQValueList<int>::const_iterator it = pages.begin(); it != pages.end(); ++it) { - KisPaintLayer* layer = new KisPaintLayer(img, QString(i18n("Page %1")).arg( QString::number(*it) + 1), Q_UINT8_MAX); - layer->paintDevice()->convertFromQImage( pdoc->getPage( *it )->renderToImage(wdg->intHorizontal->value(), wdg->intVertical->value() ), ""); + KisPaintLayer* layer = new KisPaintLayer(img, TQString(i18n("Page %1")).tqarg( TQString::number(*it) + 1), TQ_UINT8_MAX); + layer->paintDevice()->convertFromTQImage( pdoc->getPage( *it )->renderToImage(wdg->intHorizontal->value(), wdg->intVertical->value() ), ""); img->addLayer(layer, img->rootLayer(), 0); } diff --git a/filters/krita/pdf/kis_pdf_import.h b/filters/krita/pdf/kis_pdf_import.h index 217319db..ab4535b9 100644 --- a/filters/krita/pdf/kis_pdf_import.h +++ b/filters/krita/pdf/kis_pdf_import.h @@ -24,11 +24,12 @@ class KisPDFImport : public KoFilter{ Q_OBJECT + TQ_OBJECT public: - KisPDFImport(KoFilter *parent, const char *name, const QStringList&); + KisPDFImport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~KisPDFImport(); public: - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; #endif diff --git a/filters/krita/pdf/kis_pdf_import_widget.cpp b/filters/krita/pdf/kis_pdf_import_widget.cpp index b3d37015..6919876f 100644 --- a/filters/krita/pdf/kis_pdf_import_widget.cpp +++ b/filters/krita/pdf/kis_pdf_import_widget.cpp @@ -22,33 +22,33 @@ // poppler's headers #include <poppler-qt.h> -// Qt's headers -#include <qradiobutton.h> +// TQt's headers +#include <tqradiobutton.h> // KDE's headers #include <kdebug.h> #include <klistbox.h> #include <knuminput.h> -KisPDFImportWidget::KisPDFImportWidget(Poppler::Document* pdfDoc, QWidget * parent, const char * name) - : PDFImportWidgetBase(parent, name), m_pdfDoc(pdfDoc) +KisPDFImportWidget::KisPDFImportWidget(Poppler::Document* pdfDoc, TQWidget * tqparent, const char * name) + : PDFImportWidgetBase(tqparent, name), m_pdfDoc(pdfDoc) { m_pages.push_back(0); // The first page is selected updateMaxCanvasSize(); for(int i = 1; i <= m_pdfDoc->getNumPages(); i++) { - listPages->insertItem(QString::number( i ) ); + listPages->insertItem(TQString::number( i ) ); } - connect(intWidth, SIGNAL( valueChanged ( int ) ), this, SLOT( updateHRes() ) ); - connect(intHeight, SIGNAL( valueChanged ( int ) ), this, SLOT( updateHVer() ) ); - connect(intHorizontal, SIGNAL( valueChanged ( int ) ), this, SLOT( updateWidth() ) ); - connect(intVertical, SIGNAL( valueChanged ( int ) ), this, SLOT( updateHeight() ) ); - connect(boolAllPages, SIGNAL( toggled ( bool ) ), this, SLOT( selectAllPages( bool ) ) ); - connect(boolFirstPage, SIGNAL( toggled ( bool ) ), this, SLOT( selectFirstPage( bool ) ) ); - connect(boolSelectionPage, SIGNAL( toggled ( bool ) ), this, SLOT( selectSelectionOfPages( bool ) ) ); - connect(listPages, SIGNAL(selectionChanged () ), this, SLOT(updateSelectionOfPages())); + connect(intWidth, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( updateHRes() ) ); + connect(intHeight, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( updateHVer() ) ); + connect(intHorizontal, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( updateWidth() ) ); + connect(intVertical, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( updateHeight() ) ); + connect(boolAllPages, TQT_SIGNAL( toggled ( bool ) ), this, TQT_SLOT( selectAllPages( bool ) ) ); + connect(boolFirstPage, TQT_SIGNAL( toggled ( bool ) ), this, TQT_SLOT( selectFirstPage( bool ) ) ); + connect(boolSelectionPage, TQT_SIGNAL( toggled ( bool ) ), this, TQT_SLOT( selectSelectionOfPages( bool ) ) ); + connect(listPages, TQT_SIGNAL(selectionChanged () ), this, TQT_SLOT(updateSelectionOfPages())); } @@ -99,10 +99,10 @@ void KisPDFImportWidget::updateSelectionOfPages() void KisPDFImportWidget::updateMaxCanvasSize() { m_maxWidthInch = 0., m_maxHeightInch =0.; - for(QValueList<int>::const_iterator it = m_pages.begin(); it != m_pages.end(); ++it) + for(TQValueList<int>::const_iterator it = m_pages.begin(); it != m_pages.end(); ++it) { Poppler::Page *p = m_pdfDoc->getPage(*it ); - QSize size = p->pageSize(); + TQSize size = p->pageSize(); if(size.width() > m_maxWidthInch) { m_maxWidthInch = size.width(); diff --git a/filters/krita/pdf/kis_pdf_import_widget.h b/filters/krita/pdf/kis_pdf_import_widget.h index debc0f0e..8fe806a8 100644 --- a/filters/krita/pdf/kis_pdf_import_widget.h +++ b/filters/krita/pdf/kis_pdf_import_widget.h @@ -29,12 +29,13 @@ class Document; class KisPDFImportWidget : public PDFImportWidgetBase { Q_OBJECT + TQ_OBJECT public: - KisPDFImportWidget(Poppler::Document* pdfDoc, QWidget * parent, const char * name = ""); + KisPDFImportWidget(Poppler::Document* pdfDoc, TQWidget * tqparent, const char * name = ""); ~KisPDFImportWidget(); public: - inline QValueList<int> pages() { return m_pages; } + inline TQValueList<int> pages() { return m_pages; } private slots: void selectAllPages(bool v); void selectFirstPage(bool v); @@ -47,7 +48,7 @@ class KisPDFImportWidget : public PDFImportWidgetBase void updateMaxCanvasSize(); private: Poppler::Document* m_pdfDoc; - QValueList<int> m_pages; + TQValueList<int> m_pages; double m_maxWidthInch, m_maxHeightInch; }; diff --git a/filters/krita/pdf/pdfimportwidgetbase.ui b/filters/krita/pdf/pdfimportwidgetbase.ui index 148e72a2..19da5d15 100644 --- a/filters/krita/pdf/pdfimportwidgetbase.ui +++ b/filters/krita/pdf/pdfimportwidgetbase.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>PDFImportWidgetBase</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>PDFImportWidgetBase</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox" row="0" column="1"> + <widget class="TQGroupBox" row="0" column="1"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -30,7 +30,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -38,9 +38,9 @@ <string>Resolution:</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <hbox> <property name="name"> @@ -56,22 +56,22 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>intVerticalqsdf</cstring> </property> @@ -111,7 +111,7 @@ <number>72</number> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel5</cstring> </property> @@ -141,7 +141,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>31</width> <height>20</height> @@ -150,7 +150,7 @@ </spacer> </hbox> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -158,9 +158,9 @@ <string>Size:</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> @@ -176,16 +176,16 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <grid> <property name="name"> @@ -199,7 +199,7 @@ <number>99999</number> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>intWidthzqffs</cstring> </property> @@ -215,7 +215,7 @@ <number>99999</number> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>intHeightqsdfq</cstring> </property> @@ -235,7 +235,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>51</width> <height>20</height> @@ -246,7 +246,7 @@ </widget> </vbox> </widget> - <widget class="QButtonGroup" row="0" column="0"> + <widget class="TQButtonGroup" row="0" column="0"> <property name="name"> <cstring>buttonGroup1</cstring> </property> @@ -257,7 +257,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>boolAllPages</cstring> </property> @@ -265,7 +265,7 @@ <string>&All pages</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>boolFirstPage</cstring> </property> @@ -276,7 +276,7 @@ <bool>true</bool> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>boolSelectionPage</cstring> </property> @@ -308,7 +308,7 @@ <tabstop>intWidth</tabstop> <tabstop>intHeight</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kcombobox.h</includehint> <includehint>knuminput.h</includehint> diff --git a/filters/krita/png/kis_png_converter.cc b/filters/krita/png/kis_png_converter.cc index 0beb0b74..12da2098 100644 --- a/filters/krita/png/kis_png_converter.cc +++ b/filters/krita/png/kis_png_converter.cc @@ -22,7 +22,7 @@ #include <stdio.h> -#include <qfile.h> +#include <tqfile.h> #include <kapplication.h> #include <kmessagebox.h> @@ -45,10 +45,10 @@ namespace { - const Q_UINT8 PIXEL_BLUE = 0; - const Q_UINT8 PIXEL_GREEN = 1; - const Q_UINT8 PIXEL_RED = 2; - const Q_UINT8 PIXEL_ALPHA = 3; + const TQ_UINT8 PIXEL_BLUE = 0; + const TQ_UINT8 PIXEL_GREEN = 1; + const TQ_UINT8 PIXEL_RED = 2; + const TQ_UINT8 PIXEL_ALPHA = 3; int getColorTypeforColorSpace( KisColorSpace * cs , bool alpha) @@ -62,13 +62,13 @@ namespace { return alpha ? PNG_COLOR_TYPE_RGB_ALPHA : PNG_COLOR_TYPE_RGB; } - KMessageBox::error(0, i18n("Cannot export images in %1.\n").arg(cs->id().name()) ) ; + KMessageBox::error(0, i18n("Cannot export images in %1.\n").tqarg(cs->id().name()) ) ; return -1; } - QString getColorSpaceForColorType(int color_type,int color_nb_bits) { + TQString getColorSpaceForColorType(int color_type,int color_nb_bits) { if(color_type == PNG_COLOR_TYPE_GRAY || color_type == PNG_COLOR_TYPE_GRAY_ALPHA) { switch(color_nb_bits) @@ -93,7 +93,7 @@ namespace { } - void fillText(png_text* p_text, char* key, QString& text) + void fillText(png_text* p_text, char* key, TQString& text) { p_text->compression = PNG_TEXT_COMPRESSION_zTXt; p_text->key = key; @@ -123,7 +123,7 @@ KisPNGConverter::~KisPNGConverter() class KisPNGStream { public: - KisPNGStream(Q_UINT8* buf, Q_UINT32 depth ) : m_posinc(8),m_depth(depth), m_buf(buf) { *m_buf = 0;}; + KisPNGStream(TQ_UINT8* buf, TQ_UINT32 depth ) : m_posinc(8),m_depth(depth), m_buf(buf) { *m_buf = 0;}; int nextValue() { if( m_posinc == 0) @@ -146,16 +146,16 @@ class KisPNGStream { *m_buf = (v << m_posinc) | *m_buf; } private: - Q_UINT32 m_posinc, m_depth; - Q_UINT8* m_buf; + TQ_UINT32 m_posinc, m_depth; + TQ_UINT8* m_buf; }; KisImageBuilder_Result KisPNGConverter::decode(const KURL& uri) { kdDebug(41008) << "Start decoding PNG File" << endl; // open the file - kdDebug(41008) << QFile::encodeName(uri.path()) << " " << uri.path() << " " << uri << endl; - FILE *fp = fopen(QFile::encodeName(uri.path()), "rb"); + kdDebug(41008) << TQFile::encodeName(uri.path()) << " " << uri.path() << " " << uri << endl; + FILE *fp = fopen(TQFile::encodeName(uri.path()), "rb"); if (!fp) { return (KisImageBuilder_RESULT_NOT_EXIST); @@ -213,7 +213,7 @@ KisImageBuilder_Result KisPNGConverter::decode(const KURL& uri) #endif // Determine the colorspace - QString csName = getColorSpaceForColorType(color_type, color_nb_bits); + TQString csName = getColorSpaceForColorType(color_type, color_nb_bits); if(csName.isEmpty()) { png_destroy_read_struct(&png_ptr, &info_ptr, &end_info); return KisImageBuilder_RESULT_UNSUPPORTED_COLORSPACE; @@ -232,9 +232,9 @@ KisImageBuilder_Result KisPNGConverter::decode(const KURL& uri) KisProfile* profile = 0; if(png_get_iCCP(png_ptr, info_ptr, &profile_name, &compression_type, &profile_data, &proflen)) { - QByteArray profile_rawdata; + TQByteArray profile_rawdata; // XXX: Hardcoded for icc type -- is that correct for us? - if (QString::compare(profile_name, "icc") == 0) { + if (TQString::compare(profile_name, "icc") == 0) { profile_rawdata.resize(proflen); memcpy(profile_rawdata.data(), profile_data, proflen); profile = new KisProfile(profile_rawdata); @@ -285,13 +285,13 @@ KisImageBuilder_Result KisPNGConverter::decode(const KURL& uri) for(int i = 0; i < num_comments; i++) { kdDebug(41008) << "key is " << text_ptr[i].key << " containing " << text_ptr[i].text << endl; - if(QString::compare(text_ptr[i].key, "title") == 0) + if(TQString::compare(text_ptr[i].key, "title") == 0) { aboutPage->setTitle(text_ptr[i].text); - } else if(QString::compare(text_ptr[i].key, "abstract") == 0) + } else if(TQString::compare(text_ptr[i].key, "abstract") == 0) { aboutPage->setAbstract(text_ptr[i].text); - } else if(QString::compare(text_ptr[i].key, "author") == 0) + } else if(TQString::compare(text_ptr[i].key, "author") == 0) { authorPage->setFullName(text_ptr[i].text); } @@ -339,7 +339,7 @@ KisImageBuilder_Result KisPNGConverter::decode(const KURL& uri) } } - KisPaintLayer* layer = new KisPaintLayer(m_img, m_img -> nextLayerName(), Q_UINT8_MAX); + KisPaintLayer* layer = new KisPaintLayer(m_img, m_img -> nextLayerName(), TQ_UINT8_MAX); for (int i = 0; i < number_of_passes; i++) { for (png_uint_32 y = 0; y < height; y++) { @@ -352,23 +352,23 @@ KisImageBuilder_Result KisPNGConverter::decode(const KURL& uri) case PNG_COLOR_TYPE_GRAY_ALPHA: if(color_nb_bits == 16) { - Q_UINT16 *src = reinterpret_cast<Q_UINT16 *>(row_pointer); + TQ_UINT16 *src = reinterpret_cast<TQ_UINT16 *>(row_pointer); while (!it.isDone()) { - Q_UINT16 *d = reinterpret_cast<Q_UINT16 *>(it.rawData()); + TQ_UINT16 *d = reinterpret_cast<TQ_UINT16 *>(it.rawData()); d[0] = *(src++); if(transform) cmsDoTransform(transform, d, d, 1); if(hasalpha) d[1] = *(src++); - else d[1] = Q_UINT16_MAX; + else d[1] = TQ_UINT16_MAX; ++it; } } else { - Q_UINT8 *src = row_pointer; + TQ_UINT8 *src = row_pointer; while (!it.isDone()) { - Q_UINT8 *d = it.rawData(); + TQ_UINT8 *d = it.rawData(); d[0] = *(src++); if(transform) cmsDoTransform(transform, d, d, 1); if(hasalpha) d[1] = *(src++); - else d[1] = Q_UINT8_MAX; + else d[1] = TQ_UINT8_MAX; ++it; } } @@ -378,27 +378,27 @@ KisImageBuilder_Result KisPNGConverter::decode(const KURL& uri) case PNG_COLOR_TYPE_RGB_ALPHA: if(color_nb_bits == 16) { - Q_UINT16 *src = reinterpret_cast<Q_UINT16 *>(row_pointer); + TQ_UINT16 *src = reinterpret_cast<TQ_UINT16 *>(row_pointer); while (!it.isDone()) { - Q_UINT16 *d = reinterpret_cast<Q_UINT16 *>(it.rawData()); + TQ_UINT16 *d = reinterpret_cast<TQ_UINT16 *>(it.rawData()); d[2] = *(src++); d[1] = *(src++); d[0] = *(src++); if(transform) cmsDoTransform(transform, d, d, 1); if(hasalpha) d[3] = *(src++); - else d[3] = Q_UINT16_MAX; + else d[3] = TQ_UINT16_MAX; ++it; } } else { - Q_UINT8 *src = row_pointer; + TQ_UINT8 *src = row_pointer; while (!it.isDone()) { - Q_UINT8 *d = it.rawData(); + TQ_UINT8 *d = it.rawData(); d[2] = *(src++); d[1] = *(src++); d[0] = *(src++); if(transform) cmsDoTransform(transform, d, d, 1); if(hasalpha) d[3] = *(src++); - else d[3] = Q_UINT8_MAX; + else d[3] = TQ_UINT8_MAX; ++it; } } @@ -407,12 +407,12 @@ KisImageBuilder_Result KisPNGConverter::decode(const KURL& uri) { KisPNGStream stream(row_pointer, color_nb_bits); while (!it.isDone()) { - Q_UINT8 *d = it.rawData(); + TQ_UINT8 *d = it.rawData(); png_color c = palette[ stream.nextValue() ]; d[2] = c.red; d[1] = c.green; d[0] = c.blue; - d[3] = Q_UINT8_MAX; + d[3] = TQ_UINT8_MAX; ++it; } } @@ -438,19 +438,19 @@ KisImageBuilder_Result KisPNGConverter::decode(const KURL& uri) KisImageBuilder_Result KisPNGConverter::buildImage(const KURL& uri) { - kdDebug(41008) << QFile::encodeName(uri.path()) << " " << uri.path() << " " << uri << endl; + kdDebug(41008) << TQFile::encodeName(uri.path()) << " " << uri.path() << " " << uri << endl; if (uri.isEmpty()) return KisImageBuilder_RESULT_NO_URI; - if (!KIO::NetAccess::exists(uri, false, qApp -> mainWidget())) { + if (!KIO::NetAccess::exists(uri, false, tqApp -> mainWidget())) { return KisImageBuilder_RESULT_NOT_EXIST; } // We're not set up to handle asynchronous loading at the moment. KisImageBuilder_Result result = KisImageBuilder_RESULT_FAILURE; - QString tmpFile; + TQString tmpFile; - if (KIO::NetAccess::download(uri, tmpFile, qApp -> mainWidget())) { + if (KIO::NetAccess::download(uri, tmpFile, tqApp -> mainWidget())) { KURL uriTF; uriTF.setPath( tmpFile ); result = decode(uriTF); @@ -482,7 +482,7 @@ KisImageBuilder_Result KisPNGConverter::buildFile(const KURL& uri, KisPaintLayer if (!uri.isLocalFile()) return KisImageBuilder_RESULT_NOT_LOCAL; // Open file for writing - FILE *fp = fopen(QFile::encodeName(uri.path()), "wb"); + FILE *fp = fopen(TQFile::encodeName(uri.path()), "wb"); if (!fp) { return (KisImageBuilder_RESULT_FAILURE); @@ -548,7 +548,7 @@ KisImageBuilder_Result KisPNGConverter::buildFile(const KURL& uri, KisPaintLayer bool toomuchcolor = false; while( !it.isDone() ) { - const Q_UINT8* c = it.rawData(); + const TQ_UINT8* c = it.rawData(); bool findit = false; for(int i = 0; i < num_palette; i++) { @@ -613,7 +613,7 @@ KisImageBuilder_Result KisPNGConverter::buildFile(const KURL& uri, KisPaintLayer // Save annotation vKisAnnotationSP_it it = annotationsStart; while(it != annotationsEnd) { - if (!(*it) || (*it) -> type() == QString()) { + if (!(*it) || (*it) -> type() == TQString()) { kdDebug(41008) << "Warning: empty annotation" << endl; ++it; continue; @@ -637,20 +637,20 @@ KisImageBuilder_Result KisPNGConverter::buildFile(const KURL& uri, KisPaintLayer int nbtexts = 0; KoDocumentInfo * info = m_doc->documentInfo(); KoDocumentInfoAbout * aboutPage = static_cast<KoDocumentInfoAbout *>(info->page( "about" )); - QString title = aboutPage->title(); + TQString title = aboutPage->title(); if(!title.isEmpty()) { fillText(texts+nbtexts, "title", title); nbtexts++; } - QString abstract = aboutPage->abstract(); + TQString abstract = aboutPage->abstract(); if(!abstract.isEmpty()) { fillText(texts+nbtexts, "abstract", abstract); nbtexts++; } KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" )); - QString author = authorPage->fullName(); + TQString author = authorPage->fullName(); if(!author.isEmpty()) { fillText(texts+nbtexts, "author", author); @@ -684,17 +684,17 @@ KisImageBuilder_Result KisPNGConverter::buildFile(const KURL& uri, KisPaintLayer case PNG_COLOR_TYPE_GRAY_ALPHA: if(color_nb_bits == 16) { - Q_UINT16 *dst = reinterpret_cast<Q_UINT16 *>(row_pointers[y]); + TQ_UINT16 *dst = reinterpret_cast<TQ_UINT16 *>(row_pointers[y]); while (!it.isDone()) { - const Q_UINT16 *d = reinterpret_cast<const Q_UINT16 *>(it.rawData()); + const TQ_UINT16 *d = reinterpret_cast<const TQ_UINT16 *>(it.rawData()); *(dst++) = d[0]; if(alpha) *(dst++) = d[1]; ++it; } } else { - Q_UINT8 *dst = row_pointers[y]; + TQ_UINT8 *dst = row_pointers[y]; while (!it.isDone()) { - const Q_UINT8 *d = it.rawData(); + const TQ_UINT8 *d = it.rawData(); *(dst++) = d[0]; if(alpha) *(dst++) = d[1]; ++it; @@ -705,9 +705,9 @@ KisImageBuilder_Result KisPNGConverter::buildFile(const KURL& uri, KisPaintLayer case PNG_COLOR_TYPE_RGB_ALPHA: if(color_nb_bits == 16) { - Q_UINT16 *dst = reinterpret_cast<Q_UINT16 *>(row_pointers[y]); + TQ_UINT16 *dst = reinterpret_cast<TQ_UINT16 *>(row_pointers[y]); while (!it.isDone()) { - const Q_UINT16 *d = reinterpret_cast<const Q_UINT16 *>(it.rawData()); + const TQ_UINT16 *d = reinterpret_cast<const TQ_UINT16 *>(it.rawData()); *(dst++) = d[2]; *(dst++) = d[1]; *(dst++) = d[0]; @@ -715,9 +715,9 @@ KisImageBuilder_Result KisPNGConverter::buildFile(const KURL& uri, KisPaintLayer ++it; } } else { - Q_UINT8 *dst = row_pointers[y]; + TQ_UINT8 *dst = row_pointers[y]; while (!it.isDone()) { - const Q_UINT8 *d = it.rawData(); + const TQ_UINT8 *d = it.rawData(); *(dst++) = d[2]; *(dst++) = d[1]; *(dst++) = d[0]; @@ -728,10 +728,10 @@ KisImageBuilder_Result KisPNGConverter::buildFile(const KURL& uri, KisPaintLayer break; case PNG_COLOR_TYPE_PALETTE: { - Q_UINT8 *dst = row_pointers[y]; + TQ_UINT8 *dst = row_pointers[y]; KisPNGStream writestream(dst, color_nb_bits); while (!it.isDone()) { - const Q_UINT8 *d = it.rawData(); + const TQ_UINT8 *d = it.rawData(); int i; for(i = 0; i < num_palette; i++) { diff --git a/filters/krita/png/kis_png_converter.h b/filters/krita/png/kis_png_converter.h index 6fd8b207..a4f1140b 100644 --- a/filters/krita/png/kis_png_converter.h +++ b/filters/krita/png/kis_png_converter.h @@ -22,7 +22,7 @@ #include <png.h> -#include <qvaluevector.h> +#include <tqvaluevector.h> #include <kio/job.h> @@ -56,6 +56,7 @@ enum KisImageBuilder_Result { class KisPNGConverter : public KisProgressSubject { Q_OBJECT + TQ_OBJECT public: KisPNGConverter(KisDoc *doc, KisUndoAdapter *adapter); virtual ~KisPNGConverter(); diff --git a/filters/krita/png/kis_png_export.cc b/filters/krita/png/kis_png_export.cc index b1df098c..46524b46 100644 --- a/filters/krita/png/kis_png_export.cc +++ b/filters/krita/png/kis_png_export.cc @@ -19,8 +19,8 @@ #include "kis_png_export.h" -#include <qcheckbox.h> -#include <qslider.h> +#include <tqcheckbox.h> +#include <tqslider.h> #include <kapplication.h> #include <kdialogbase.h> @@ -41,7 +41,7 @@ typedef KGenericFactory<KisPNGExport, KoFilter> KisPNGExportFactory; K_EXPORT_COMPONENT_FACTORY(libkritapngexport, KisPNGExportFactory("kofficefilters")) -KisPNGExport::KisPNGExport(KoFilter *, const char *, const QStringList&) : KoFilter() +KisPNGExport::KisPNGExport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -49,12 +49,12 @@ KisPNGExport::~KisPNGExport() { } -KoFilter::ConversionStatus KisPNGExport::convert(const QCString& from, const QCString& to) +KoFilter::ConversiontqStatus KisPNGExport::convert(const TQCString& from, const TQCString& to) { kdDebug(41008) << "Png export! From: " << from << ", To: " << to << "\n"; KisDoc *output = dynamic_cast<KisDoc*>(m_chain->inputDocument()); - QString filename = m_chain->outputFile(); + TQString filename = m_chain->outputFile(); if (!output) return KoFilter::CreationError; @@ -90,7 +90,7 @@ KoFilter::ConversionStatus KisPNGExport::convert(const QCString& from, const QCS wdg->alpha->setEnabled(isThereAlpha); kdb->setMainWidget(wdg); kapp->restoreOverrideCursor(); - if(kdb->exec() == QDialog::Rejected) + if(kdb->exec() == TQDialog::Rejected) { return KoFilter::OK; // FIXME Cancel doesn't exist :( } diff --git a/filters/krita/png/kis_png_export.h b/filters/krita/png/kis_png_export.h index 1c99d7c9..d962523d 100644 --- a/filters/krita/png/kis_png_export.h +++ b/filters/krita/png/kis_png_export.h @@ -24,11 +24,12 @@ class KisPNGExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - KisPNGExport(KoFilter *parent, const char *name, const QStringList&); + KisPNGExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~KisPNGExport(); public: - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; #endif diff --git a/filters/krita/png/kis_png_import.cc b/filters/krita/png/kis_png_import.cc index 5b824081..de0b7676 100644 --- a/filters/krita/png/kis_png_import.cc +++ b/filters/krita/png/kis_png_import.cc @@ -33,7 +33,7 @@ typedef KGenericFactory<KisPNGImport, KoFilter> PNGImportFactory; K_EXPORT_COMPONENT_FACTORY(libkritapngimport, PNGImportFactory("kofficefilters")) -KisPNGImport::KisPNGImport(KoFilter *, const char *, const QStringList&) : KoFilter() +KisPNGImport::KisPNGImport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -41,7 +41,7 @@ KisPNGImport::~KisPNGImport() { } -KoFilter::ConversionStatus KisPNGImport::convert(const QCString&, const QCString& to) +KoFilter::ConversiontqStatus KisPNGImport::convert(const TQCString&, const TQCString& to) { kdDebug(41008) << "Importing using PNGImport!\n"; @@ -51,7 +51,7 @@ KoFilter::ConversionStatus KisPNGImport::convert(const QCString&, const QCString KisDoc * doc = dynamic_cast<KisDoc*>(m_chain -> outputDocument()); KisView * view = static_cast<KisView*>(doc -> views().getFirst()); - QString filename = m_chain -> inputFile(); + TQString filename = m_chain -> inputFile(); if (!doc) return KoFilter::CreationError; diff --git a/filters/krita/png/kis_png_import.h b/filters/krita/png/kis_png_import.h index 8c952c96..d0b8502a 100644 --- a/filters/krita/png/kis_png_import.h +++ b/filters/krita/png/kis_png_import.h @@ -23,11 +23,12 @@ class KisPNGImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - KisPNGImport(KoFilter *parent, const char *name, const QStringList&); + KisPNGImport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~KisPNGImport(); public: - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; #endif diff --git a/filters/krita/png/kis_wdg_options_png.ui b/filters/krita/png/kis_wdg_options_png.ui index b8d11c3a..405db2fe 100644 --- a/filters/krita/png/kis_wdg_options_png.ui +++ b/filters/krita/png/kis_wdg_options_png.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KisWdgOptionsPNG</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KisWdgOptionsPNG</cstring> </property> @@ -22,22 +22,22 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> <property name="text"> <string>Compress:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop</set> </property> <property name="toolTip" stdset="0"> @@ -48,15 +48,15 @@ <br>Note: the compression level does not change the quality of the result.</p></string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QSlider"> + <widget class="TQSlider"> <property name="name"> <cstring>compressionLevel</cstring> </property> @@ -86,15 +86,15 @@ <br>Note: the compression level doesn't change the quality of the result.</p></string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -106,14 +106,14 @@ <br>Note: the compression level doesn't change the quality of the result.</p></string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel4</cstring> </property> <property name="text"> <string>Small</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="whatsThis" stdset="0"> @@ -137,14 +137,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>5</height> </size> </property> </spacer> - <widget class="QCheckBox" row="1" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> <cstring>interlacing</cstring> </property> @@ -159,7 +159,7 @@ Enabling interlacing will cause the image to be displayed by the browser even while downloading.</p></string> </property> </widget> - <widget class="QCheckBox" row="2" column="0"> + <widget class="TQCheckBox" row="2" column="0"> <property name="name"> <cstring>alpha</cstring> </property> @@ -179,5 +179,5 @@ You can uncheck the box if you are not using transparency and you want to make t </widget> </grid> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/filters/krita/raw/dcraw.c b/filters/krita/raw/dcraw.c index b562dd74..e92c1d3c 100644 --- a/filters/krita/raw/dcraw.c +++ b/filters/krita/raw/dcraw.c @@ -1146,12 +1146,12 @@ void CLASS rollei_load_raw() void CLASS phase_one_load_raw() { int row, col, a, b; - ushort *pixel, akey, bkey, mask; + ushort *pixel, akey, bkey, tqmask; fseek (ifp, nikon_curve_offset, SEEK_SET); akey = get2(); bkey = get2(); - mask = tiff_data_compression == 1 ? 0x5555:0x1354; + tqmask = tiff_data_compression == 1 ? 0x5555:0x1354; fseek (ifp, data_offset + top_margin*raw_width*2, SEEK_SET); pixel = calloc (raw_width, sizeof *pixel); merror (pixel, "phase_one_load_raw()"); @@ -1160,8 +1160,8 @@ void CLASS phase_one_load_raw() for (col=0; col < raw_width; col+=2) { a = pixel[col+0] ^ akey; b = pixel[col+1] ^ bkey; - pixel[col+0] = (a & mask) | (b & ~mask); - pixel[col+1] = (b & mask) | (a & ~mask); + pixel[col+0] = (a & tqmask) | (b & ~tqmask); + pixel[col+1] = (b & tqmask) | (a & ~tqmask); } for (col=0; col < width; col++) BAYER(row,col) = pixel[col+left_margin]; @@ -2147,7 +2147,7 @@ void CLASS foveon_interpolate() foveon_fixed (chroma_dq, 3, "ChromaDQ"); foveon_fixed (color_dq, 3, foveon_camf_param ("IncludeBlocks", "ColorDQ") ? - "ColorDQ" : "ColorDQCamRGB"); + "ColorDQ" : "ColorDTQCamRGB"); if (foveon_camf_param ("IncludeBlocks", "ColumnFilter")) foveon_fixed (&cfilt, 1, "ColumnFilter"); @@ -3281,7 +3281,7 @@ void CLASS parse_makernote() !strcmp (buf,"EPSON")) fseek (ifp, -2, SEEK_CUR); else if (!strcmp (buf,"AOC") || - !strcmp (buf,"QVC")) + !strcmp (buf,"TQVC")) fseek (ifp, -4, SEEK_CUR); else fseek (ifp, -10, SEEK_CUR); @@ -3514,7 +3514,7 @@ int CLASS parse_tiff_ifd (int base, int level) case 0x111: /* StripOffset */ data_offset = get4(); break; - case 0x112: /* Orientation */ + case 0x112: /* Qt::Orientation */ flip = flip_map[(get2()-1) & 7]; break; case 0x115: /* SamplesPerPixel */ @@ -5731,7 +5731,7 @@ void CLASS write_psd (FILE *ofp) 0,3, /* mode (1=grey, 3=rgb) */ 0,0,0,0, /* color mode data */ 0,0,0,0, /* image resources */ - 0,0,0,0, /* layer/mask info */ + 0,0,0,0, /* layer/tqmask info */ 0,0 /* no compression */ }; int hw[2], psize, row, col, c; diff --git a/filters/krita/raw/kis_raw_import.cpp b/filters/krita/raw/kis_raw_import.cpp index f9c1f5ea..62cd3e82 100644 --- a/filters/krita/raw/kis_raw_import.cpp +++ b/filters/krita/raw/kis_raw_import.cpp @@ -25,20 +25,20 @@ #include <sys/types.h> #include <netinet/in.h> -#include <qstring.h> -#include <qfile.h> -#include <qimage.h> -#include <qradiobutton.h> -#include <qgroupbox.h> -#include <qbuttongroup.h> -#include <qpushbutton.h> -#include <qlabel.h> -#include <qcheckbox.h> -#include <qapplication.h> -#include <qcursor.h> -#include <qeventloop.h> -#include <qprogressdialog.h> -#include <qtimer.h> +#include <tqstring.h> +#include <tqfile.h> +#include <tqimage.h> +#include <tqradiobutton.h> +#include <tqgroupbox.h> +#include <tqbuttongroup.h> +#include <tqpushbutton.h> +#include <tqlabel.h> +#include <tqcheckbox.h> +#include <tqapplication.h> +#include <tqcursor.h> +#include <tqeventloop.h> +#include <tqprogressdialog.h> +#include <tqtimer.h> #include <kglobal.h> #include <kconfig.h> @@ -74,7 +74,7 @@ typedef KGenericFactory<KisRawImport, KoFilter> KisRawImportFactory; K_EXPORT_COMPONENT_FACTORY(libkrita_raw_import, KisRawImportFactory("kofficefilters")) -KisRawImport::KisRawImport(KoFilter *, const char *, const QStringList&) +KisRawImport::KisRawImport(KoFilter *, const char *, const TQStringList&) : KoFilter() , m_data(0) , m_process(0) @@ -86,12 +86,12 @@ KisRawImport::KisRawImport(KoFilter *, const char *, const QStringList&) m_page = new WdgRawImport(m_dialog); m_dialog -> setMainWidget(m_page); - connect(m_page->bnPreview, SIGNAL(clicked()), this, SLOT(slotUpdatePreview())); - connect(m_page->grpColorSpace, SIGNAL(clicked( int )), this, SLOT(slotFillCmbProfiles())); - connect(m_page->grpChannelDepth, SIGNAL(clicked( int )), this, SLOT(slotFillCmbProfiles())); + connect(m_page->bnPreview, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotUpdatePreview())); + connect(m_page->grpColorSpace, TQT_SIGNAL(clicked( int )), this, TQT_SLOT(slotFillCmbProfiles())); + connect(m_page->grpChannelDepth, TQT_SIGNAL(clicked( int )), this, TQT_SLOT(slotFillCmbProfiles())); KisConfig cfg; - QString monitorProfileName = cfg.monitorProfile(); + TQString monitorProfileName = cfg.monitorProfile(); m_monitorProfile = KisMetaRegistry::instance()->csRegistry()->getProfileByName(monitorProfileName); slotFillCmbProfiles(); @@ -103,7 +103,7 @@ KisRawImport::~KisRawImport() delete m_process; } -KoFilter::ConversionStatus KisRawImport::convert(const QCString& from, const QCString& to) +KoFilter::ConversiontqStatus KisRawImport::convert(const TQCString& from, const TQCString& to) { if (from != "image/x-raw" || to != "application/x-krita") { return KoFilter::NotImplemented; @@ -122,7 +122,7 @@ KoFilter::ConversionStatus KisRawImport::convert(const QCString& from, const QCS doc -> prepareForImport(); - QString filename = m_chain -> inputFile(); + TQString filename = m_chain -> inputFile(); if (filename.isEmpty()) { return KoFilter::FileNotFound; @@ -131,8 +131,8 @@ KoFilter::ConversionStatus KisRawImport::convert(const QCString& from, const QCS slotUpdatePreview(); // Show dialog - m_dialog->setCursor(Qt::ArrowCursor); - QApplication::setOverrideCursor(Qt::ArrowCursor); + m_dialog->setCursor(TQt::ArrowCursor); + TQApplication::setOverrideCursor(TQt::ArrowCursor); KConfig * cfg = KGlobal::config(); cfg->setGroup("rawimport"); @@ -157,7 +157,7 @@ KoFilter::ConversionStatus KisRawImport::convert(const QCString& from, const QCS m_page->dblRed->setValue(cfg->readDoubleNumEntry("red", 1.0)); m_page->dblBlue->setValue(cfg->readDoubleNumEntry("blue", 1.0)); - if (m_dialog->exec() == QDialog::Accepted) { + if (m_dialog->exec() == TQDialog::Accepted) { cfg->writeEntry("gray", m_page->radioGray->isChecked()); cfg->writeEntry("rgb", m_page->radioRGB->isChecked()); @@ -179,13 +179,13 @@ KoFilter::ConversionStatus KisRawImport::convert(const QCString& from, const QCS cfg->writeEntry("red", m_page->dblRed->value()); cfg->writeEntry("blue", m_page->dblBlue->value()); - QApplication::setOverrideCursor(Qt::waitCursor); + TQApplication::setOverrideCursor(TQt::waitCursor); // Create a busy indicator to show that we didn't die or so - m_progress = new QProgressDialog(); + m_progress = new TQProgressDialog(); m_progress -> setTotalSteps(0); m_progress -> setCancelButton(0); - QTimer timer; - connect(&timer, SIGNAL(timeout()), this, SLOT(incrementProgress())); + TQTimer timer; + connect(&timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(incrementProgress())); timer.start(200); doc -> undoAdapter() -> setUndo(false); @@ -196,7 +196,7 @@ KoFilter::ConversionStatus KisRawImport::convert(const QCString& from, const QCS KisPaintLayerSP layer = 0; KisPaintDeviceSP device = 0; - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); delete m_progress; m_progress = 0; @@ -204,7 +204,7 @@ KoFilter::ConversionStatus KisRawImport::convert(const QCString& from, const QCS if (m_page->radio8->isChecked()) { // 8 bits - QImage img; + TQImage img; img.loadFromData(*m_data); KisColorSpace * cs = 0; @@ -226,13 +226,13 @@ KoFilter::ConversionStatus KisRawImport::convert(const QCString& from, const QCS device = layer->paintDevice(); if (device == 0) return KoFilter::CreationError; - device->convertFromQImage(img, ""); + device->convertFromTQImage(img, ""); } else { // 16 bits - Q_UINT32 startOfImagedata = 0; - QSize sz = determineSize(startOfImagedata); + TQ_UINT32 startOfImagedata = 0; + TQSize sz = determineSize(startOfImagedata); kdDebug(41008) << "Total bytes: " << m_data->size() << "\n start of image data: " << startOfImagedata @@ -271,26 +271,26 @@ KoFilter::ConversionStatus KisRawImport::convert(const QCString& from, const QCS while (!it.isDone()) { if (m_page->radioGray->isChecked()) { - Q_UINT16 d = (Q_INT16)*(data + pos); + TQ_UINT16 d = (TQ_INT16)*(data + pos); d = ntohs(d); memcpy(it.rawData(), &d, 2); pos += 2; } else { // Red - Q_UINT16 d = (Q_INT16)*(data + pos); + TQ_UINT16 d = (TQ_INT16)*(data + pos); d = ntohs(d); memcpy(it.rawData() + 4, &d, 2); // Green pos += 2; - d = (Q_INT16)*(data + pos ); + d = (TQ_INT16)*(data + pos ); d = ntohs(d); memcpy(it.rawData() + 2, &d, 2); // Blue pos += 2; - d = (Q_INT16)*(data + pos ); + d = (TQ_INT16)*(data + pos ); d = ntohs(d); memcpy(it.rawData(), &d, 2); @@ -308,11 +308,11 @@ KoFilter::ConversionStatus KisRawImport::convert(const QCString& from, const QCS doc -> setModified(false); kdDebug() << "everything ok\n"; - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); return KoFilter::OK; } - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); return KoFilter::UserCancelled; } @@ -324,14 +324,14 @@ void KisRawImport::incrementProgress() void KisRawImport::slotUpdatePreview() { - QApplication::setOverrideCursor(Qt::waitCursor); + TQApplication::setOverrideCursor(TQt::waitCursor); getImageData(createArgumentList(true)); kdDebug(41008) << "Retrieved " << m_data->size() << " bytes of image data\n"; if (m_data->isNull()) return; - QImage img; + TQImage img; if (m_page->radio8->isChecked()) { // 8 bits @@ -340,8 +340,8 @@ void KisRawImport::slotUpdatePreview() } else { // 16 bits - Q_UINT32 startOfImagedata = 0; - QSize sz = determineSize(startOfImagedata); + TQ_UINT32 startOfImagedata = 0; + TQSize sz = determineSize(startOfImagedata); kdDebug(41008) << "Total bytes: " << m_data->size() << "\n start of image data: " << startOfImagedata @@ -369,26 +369,26 @@ void KisRawImport::slotUpdatePreview() while (!it.isDone()) { if (m_page->radioGray->isChecked()) { - Q_UINT16 d = (Q_INT16)*(data + pos); + TQ_UINT16 d = (TQ_INT16)*(data + pos); d = ntohs(d); memcpy(it.rawData(), &d, 2); pos += 2; } else { // Red - Q_UINT16 d = (Q_INT16)*(data + pos); + TQ_UINT16 d = (TQ_INT16)*(data + pos); d = ntohs(d); memcpy(it.rawData() + 4, &d, 2); // Green pos += 2; - d = (Q_INT16)*(data + pos ); + d = (TQ_INT16)*(data + pos ); d = ntohs(d); memcpy(it.rawData() + 2, &d, 2); // Blue pos += 2; - d = (Q_INT16)*(data + pos ); + d = (TQ_INT16)*(data + pos ); d = ntohs(d); memcpy(it.rawData(), &d, 2); @@ -399,31 +399,31 @@ void KisRawImport::slotUpdatePreview() } } - img = dev->convertToQImage(m_monitorProfile); + img = dev->convertToTQImage(m_monitorProfile); } m_page->lblPreview->setImage(img); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } -void KisRawImport::getImageData( QStringList arguments ) +void KisRawImport::getImageData( TQStringList arguments ) { // delete m_process; delete m_data; kdDebug(41008) << "getImageData " << arguments.join(" ") << "\n"; KProcess process (this); - m_data = new QByteArray(0); + m_data = new TQByteArray(0); - for (QStringList::iterator it = arguments.begin(); it != arguments.end(); ++it) { + for (TQStringList::iterator it = arguments.begin(); it != arguments.end(); ++it) { process << *it; } process.setUseShell(true); - connect(&process, SIGNAL(receivedStdout(KProcess *, char *, int)), this, SLOT(slotReceivedStdout(KProcess *, char *, int))); - connect(&process, SIGNAL(receivedStderr(KProcess *, char *, int)), this, SLOT(slotReceivedStderr(KProcess *, char *, int))); - connect(&process, SIGNAL(processExited(KProcess *)), this, SLOT(slotProcessDone())); + connect(&process, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), this, TQT_SLOT(slotReceivedStdout(KProcess *, char *, int))); + connect(&process, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), this, TQT_SLOT(slotReceivedStderr(KProcess *, char *, int))); + connect(&process, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotProcessDone())); kdDebug(41008) << "Starting process\n"; @@ -433,7 +433,7 @@ void KisRawImport::getImageData( QStringList arguments ) } while (process.isRunning()) { //kdDebug(41008) << "Waiting...\n"; - qApp->eventLoop()->processEvents(QEventLoop::ExcludeUserInput); + tqApp->eventLoop()->processEvents(TQEventLoop::ExcludeUserInput); //process.wait(2); } @@ -456,25 +456,25 @@ void KisRawImport::slotProcessDone() void KisRawImport::slotReceivedStdout(KProcess *, char *buffer, int buflen) { //kdDebug(41008) << "stdout received " << buflen << " bytes on stdout.\n"; - //kdDebug(41008) << QString::fromAscii(buffer, buflen) << "\n"; + //kdDebug(41008) << TQString::fromAscii(buffer, buflen) << "\n"; int oldSize = m_data->size(); - m_data->resize(oldSize + buflen, QGArray::SpeedOptim); + m_data->resize(oldSize + buflen, TQGArray::SpeedOptim); memcpy(m_data->data() + oldSize, buffer, buflen); } void KisRawImport::slotReceivedStderr(KProcess *, char *buffer, int buflen) { - QByteArray b(buflen); + TQByteArray b(buflen); memcpy(b.data(), buffer, buflen); - kdDebug(41008) << QString(b) << "\n"; - KMessageBox::error(0, i18n("Error: Dcraw cannot load this image. Message: ") + QString(b)); + kdDebug(41008) << TQString(b) << "\n"; + KMessageBox::error(0, i18n("Error: Dcraw cannot load this image. Message: ") + TQString(b)); m_err = true; } -QStringList KisRawImport::createArgumentList(bool forPreview) +TQStringList KisRawImport::createArgumentList(bool forPreview) { - QStringList args; + TQStringList args; args.append("dcraw"); // XXX: Create a kritadcraw so we can count on it being available @@ -518,19 +518,19 @@ QStringList KisRawImport::createArgumentList(bool forPreview) } if (m_page->chkBrightness->isChecked()) { - args.append("-b " + QString::number(m_page->dblBrightness->value())); + args.append("-b " + TQString::number(m_page->dblBrightness->value())); } if (m_page->chkBlackpoint->isChecked()) { - args.append("-k " + QString::number(m_page->dblBlackpoint->value())); + args.append("-k " + TQString::number(m_page->dblBlackpoint->value())); } if (m_page->chkRed->isChecked()) { - args.append("-r " + QString::number(m_page->dblRed->value())); + args.append("-r " + TQString::number(m_page->dblRed->value())); } if (m_page->chkBlue->isChecked()) { - args.append("-l " + QString::number(m_page->dblBlue->value())); + args.append("-l " + TQString::number(m_page->dblBlue->value())); } @@ -550,23 +550,23 @@ QStringList KisRawImport::createArgumentList(bool forPreview) return args; } -QSize KisRawImport::determineSize(Q_UINT32& startOfImageData) +TQSize KisRawImport::determineSize(TQ_UINT32& startOfImageData) { if (m_data->isNull() || m_data->size() < 2048) { startOfImageData = 0; - return QSize(0,0); + return TQSize(0,0); } - QString magick = QString::fromAscii(m_data->data(), 2); + TQString magick = TQString::fromAscii(m_data->data(), 2); if (magick != "P6") { kdDebug(41008) << " Bad magick! " << magick << "\n"; startOfImageData = 0; - return QSize(0,0); + return TQSize(0,0); } // Find the third newline that marks the header end in a dcraw generated ppm. - Q_UINT32 i = 0; - Q_UINT32 counter = 0; + TQ_UINT32 i = 0; + TQ_UINT32 counter = 0; while (true) { if (counter == 3) break; @@ -576,14 +576,14 @@ QSize KisRawImport::determineSize(Q_UINT32& startOfImageData) ++i; } - QString size = QStringList::split("\n", QString::fromAscii(m_data->data(), i))[1]; - kdDebug(41008) << "Header: " << QString::fromAscii(m_data->data(), i) << "\n"; - QStringList sizelist = QStringList::split(" ", size); - Q_INT32 w = sizelist[0].toInt(); - Q_INT32 h = sizelist[1].toInt(); + TQString size = TQStringList::split("\n", TQString::fromAscii(m_data->data(), i))[1]; + kdDebug(41008) << "Header: " << TQString::fromAscii(m_data->data(), i) << "\n"; + TQStringList sizelist = TQStringList::split(" ", size); + TQ_INT32 w = sizelist[0].toInt(); + TQ_INT32 h = sizelist[1].toInt(); startOfImageData = i; - return QSize(w, h); + return TQSize(w, h); } @@ -602,8 +602,8 @@ void KisRawImport::slotFillCmbProfiles() KisColorSpaceFactory * csf = KisMetaRegistry::instance()->csRegistry() -> get(s); m_page -> cmbProfile -> clear(); - QValueVector<KisProfile *> profileList = KisMetaRegistry::instance()->csRegistry()->profilesFor( csf ); - QValueVector<KisProfile *> ::iterator it; + TQValueVector<KisProfile *> profileList = KisMetaRegistry::instance()->csRegistry()->profilesFor( csf ); + TQValueVector<KisProfile *> ::iterator it; for ( it = profileList.begin(); it != profileList.end(); ++it ) { m_page -> cmbProfile -> insertItem((*it) -> productName()); } diff --git a/filters/krita/raw/kis_raw_import.h b/filters/krita/raw/kis_raw_import.h index cff059f7..35adb6e1 100644 --- a/filters/krita/raw/kis_raw_import.h +++ b/filters/krita/raw/kis_raw_import.h @@ -26,17 +26,18 @@ class KProcess; class KDialogBase; class WdgRawImport; class KisProfile; -class QProgressDialog; +class TQProgressDialog; class KisRawImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - KisRawImport(KoFilter *parent, const char *name, const QStringList&); + KisRawImport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~KisRawImport(); public: - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); private slots: @@ -50,19 +51,19 @@ private slots: private: - QStringList createArgumentList(bool forPreview = false); - QSize determineSize(Q_UINT32& startOfImageData); - void getImageData(QStringList arguments); + TQStringList createArgumentList(bool forPreview = false); + TQSize determineSize(TQ_UINT32& startOfImageData); + void getImageData(TQStringList arguments); KisProfile * profile(); KisID getColorSpace(); private: - QByteArray * m_data; + TQByteArray * m_data; KDialogBase * m_dialog; WdgRawImport * m_page; KisProfile * m_monitorProfile; KProcess * m_process; - QProgressDialog* m_progress; + TQProgressDialog* m_progress; bool m_err; // Set to true when slotReceivedStderr is called }; diff --git a/filters/krita/raw/wdgrawimport.ui b/filters/krita/raw/wdgrawimport.ui index af2163ad..d6080a01 100644 --- a/filters/krita/raw/wdgrawimport.ui +++ b/filters/krita/raw/wdgrawimport.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>WdgRawImport</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>WdgRawImport</cstring> </property> @@ -16,7 +16,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton" row="2" column="2"> + <widget class="TQPushButton" row="2" column="2"> <property name="name"> <cstring>bnPreview</cstring> </property> @@ -36,22 +36,22 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>200</width> <height>150</height> </size> </property> </widget> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>grpColorSettings</cstring> </property> @@ -62,7 +62,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="1" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> <cstring>chkBlackpoint</cstring> </property> @@ -70,7 +70,7 @@ <string>Blackpoint:</string> </property> </widget> - <widget class="QCheckBox" row="2" column="0"> + <widget class="TQCheckBox" row="2" column="0"> <property name="name"> <cstring>chkRed</cstring> </property> @@ -89,7 +89,7 @@ <number>1</number> </property> </widget> - <widget class="QCheckBox" row="3" column="0"> + <widget class="TQCheckBox" row="3" column="0"> <property name="name"> <cstring>chkBlue</cstring> </property> @@ -127,7 +127,7 @@ <string>Brightness. 1.0 is default</string> </property> </widget> - <widget class="QButtonGroup" row="4" column="0" rowspan="1" colspan="2"> + <widget class="TQButtonGroup" row="4" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>grpWhiteBalance</cstring> </property> @@ -141,7 +141,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioFixed</cstring> </property> @@ -152,7 +152,7 @@ <bool>true</bool> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioAutomatic</cstring> </property> @@ -169,7 +169,7 @@ <string>Automatic color balance. The default is to use a fixed color balance based on a white card photographed in sunlight.</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioCamera</cstring> </property> @@ -186,7 +186,7 @@ </widget> </vbox> </widget> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>chkBrightness</cstring> </property> @@ -196,7 +196,7 @@ </widget> </grid> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>grpColorSpace</cstring> </property> @@ -210,7 +210,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton" row="0" column="0"> + <widget class="TQRadioButton" row="0" column="0"> <property name="name"> <cstring>radioGray</cstring> </property> @@ -218,7 +218,7 @@ <string>&Document mode</string> </property> </widget> - <widget class="QRadioButton" row="1" column="0"> + <widget class="TQRadioButton" row="1" column="0"> <property name="name"> <cstring>radioRGB</cstring> </property> @@ -231,7 +231,7 @@ </widget> </grid> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>grpChannelDepth</cstring> </property> @@ -251,7 +251,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton" row="1" column="0"> + <widget class="TQRadioButton" row="1" column="0"> <property name="name"> <cstring>radio16</cstring> </property> @@ -265,7 +265,7 @@ <bool>true</bool> </property> </widget> - <widget class="QRadioButton" row="0" column="0"> + <widget class="TQRadioButton" row="0" column="0"> <property name="name"> <cstring>radio8</cstring> </property> @@ -281,7 +281,7 @@ </widget> </grid> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>chkFourColorRGB</cstring> </property> @@ -304,7 +304,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>500</width> <height>20</height> @@ -321,22 +321,22 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>120</height> </size> </property> </spacer> - <widget class="QLayoutWidget" row="3" column="0" rowspan="1" colspan="3"> + <widget class="TQLayoutWidget" row="3" column="0" rowspan="1" colspan="3"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>chkClip</cstring> </property> @@ -353,15 +353,15 @@ <string>By default, dcraw clips all colors to prevent pink hues in the highlights. Combine this option with -b 0.25 to leave the image data completely unclipped.</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout10</cstring> + <cstring>tqlayout10</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>chkProfile</cstring> </property> @@ -390,7 +390,7 @@ </widget> </hbox> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>chkCameraColors</cstring> </property> @@ -408,7 +408,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>41</width> <height>20</height> @@ -492,5 +492,5 @@ <tabstop>bnPreview</tabstop> <tabstop>radioAutomatic</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/filters/krita/tiff/kis_dlg_options_tiff.cpp b/filters/krita/tiff/kis_dlg_options_tiff.cpp index 6b9f3027..345f7e7e 100644 --- a/filters/krita/tiff/kis_dlg_options_tiff.cpp +++ b/filters/krita/tiff/kis_dlg_options_tiff.cpp @@ -19,10 +19,10 @@ #include "kis_dlg_options_tiff.h" -#include <qcheckbox.h> -#include <qgroupbox.h> -#include <qslider.h> -#include <qwidgetstack.h> +#include <tqcheckbox.h> +#include <tqgroupbox.h> +#include <tqslider.h> +#include <tqwidgetstack.h> #include <kapplication.h> #include <kcombobox.h> @@ -30,16 +30,16 @@ #include "kis_wdg_options_tiff.h" -KisDlgOptionsTIFF::KisDlgOptionsTIFF(QWidget *parent, const char *name) - : KDialogBase(parent, name, false, i18n("TIFF Export Options"), KDialogBase::Ok | KDialogBase::Cancel) +KisDlgOptionsTIFF::KisDlgOptionsTIFF(TQWidget *tqparent, const char *name) + : KDialogBase(tqparent, name, false, i18n("TIFF Export Options"), KDialogBase::Ok | KDialogBase::Cancel) { optionswdg = new KisWdgOptionsTIFF(this); activated(0); - connect(optionswdg->kComboBoxCompressionType, SIGNAL(activated ( int )), this, SLOT(activated ( int ) )); - connect(optionswdg->flatten, SIGNAL(toggled(bool)), this, SLOT(flattenToggled( bool) ) ); + connect(optionswdg->kComboBoxCompressionType, TQT_SIGNAL(activated ( int )), this, TQT_SLOT(activated ( int ) )); + connect(optionswdg->flatten, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(flattenToggled( bool) ) ); setMainWidget(optionswdg); kapp->restoreOverrideCursor(); - setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum) ); + tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum) ); } KisDlgOptionsTIFF::~KisDlgOptionsTIFF() diff --git a/filters/krita/tiff/kis_dlg_options_tiff.h b/filters/krita/tiff/kis_dlg_options_tiff.h index a81bd65f..5fd1e48e 100644 --- a/filters/krita/tiff/kis_dlg_options_tiff.h +++ b/filters/krita/tiff/kis_dlg_options_tiff.h @@ -30,8 +30,9 @@ class KisWdgOptionsTIFF; class KisDlgOptionsTIFF : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - KisDlgOptionsTIFF(QWidget *parent=0, const char *name=0); + KisDlgOptionsTIFF(TQWidget *tqparent=0, const char *name=0); ~KisDlgOptionsTIFF(); public slots: void activated ( int index ); diff --git a/filters/krita/tiff/kis_tiff_converter.cc b/filters/krita/tiff/kis_tiff_converter.cc index 955ab9ef..229111ea 100644 --- a/filters/krita/tiff/kis_tiff_converter.cc +++ b/filters/krita/tiff/kis_tiff_converter.cc @@ -24,7 +24,7 @@ #include <config.h> #include LCMS_HEADER -#include <qfile.h> +#include <tqfile.h> #include <kapplication.h> #include <KoDocumentInfo.h> @@ -49,7 +49,7 @@ namespace { - QString getColorSpaceForColorType(uint16 color_type, uint16 color_nb_bits, TIFF *image, uint16 &nbchannels, uint16 &extrasamplescount, uint8 &destDepth, uint16 sampletype) { + TQString getColorSpaceForColorType(uint16 color_type, uint16 color_nb_bits, TIFF *image, uint16 &nbchannels, uint16 &extrasamplescount, uint8 &destDepth, uint16 sampletype) { if(color_type == PHOTOMETRIC_MINISWHITE || color_type == PHOTOMETRIC_MINISBLACK) { if(nbchannels == 0) nbchannels = 1; @@ -171,7 +171,7 @@ KisImageBuilder_Result KisTIFFConverter::decode(const KURL& uri) kdDebug(41008) << "Start decoding TIFF File" << endl; // Opent the TIFF file TIFF *image = 0; - if((image = TIFFOpen(QFile::encodeName(uri.path()), "r")) == NULL){ + if((image = TIFFOpen(TQFile::encodeName(uri.path()), "r")) == NULL){ kdDebug(41008) << "Could not open the file, either it doesn't exist, either it is not a TIFF : " << uri.path() << endl; return (KisImageBuilder_RESULT_BAD_FETCH); @@ -231,7 +231,7 @@ KisImageBuilder_Result KisTIFFConverter::readTIFFDirectory( TIFF* image) color_type = PHOTOMETRIC_MINISWHITE; } uint8 dstDepth; - QString csName = getColorSpaceForColorType(color_type, depth, image, nbchannels, extrasamplescount, dstDepth,sampletype); + TQString csName = getColorSpaceForColorType(color_type, depth, image, nbchannels, extrasamplescount, dstDepth,sampletype); if(csName.isEmpty()) { kdDebug(41008) << "Image has an unsupported colorspace : " << color_type << " for this depth : "<< depth << endl; TIFFClose(image); @@ -247,7 +247,7 @@ KisImageBuilder_Result KisTIFFConverter::readTIFFDirectory( TIFF* image) if (TIFFGetField(image, TIFFTAG_ICCPROFILE, &EmbedLen, &EmbedBuffer)) { kdDebug(41008) << "Profile found" << endl; - QByteArray rawdata; + TQByteArray rawdata; rawdata.resize(EmbedLen); memcpy(rawdata.data(), EmbedBuffer, EmbedLen); profile = new KisProfile(rawdata); @@ -340,21 +340,21 @@ KisImageBuilder_Result KisTIFFConverter::readTIFFDirectory( TIFF* image) m_img -> addAnnotation( profile->annotation() ); } } else { - if( m_img->width() < (Q_INT32)width || m_img->height() < (Q_INT32)height) + if( m_img->width() < (TQ_INT32)width || m_img->height() < (TQ_INT32)height) { - Q_UINT32 newwidth = (m_img->width() < (Q_INT32)width) ? width : m_img->width(); - Q_UINT32 newheight = (m_img->height() < (Q_INT32)height) ? height : m_img->height(); + TQ_UINT32 newwidth = (m_img->width() < (TQ_INT32)width) ? width : m_img->width(); + TQ_UINT32 newheight = (m_img->height() < (TQ_INT32)height) ? height : m_img->height(); m_img->resize(newwidth, newheight, false); } } - KisPaintLayer* layer = new KisPaintLayer(m_img, m_img -> nextLayerName(), Q_UINT8_MAX); + KisPaintLayer* layer = new KisPaintLayer(m_img, m_img -> nextLayerName(), TQ_UINT8_MAX); tdata_t buf = 0; tdata_t* ps_buf = 0; // used only for planar configuration seperated TIFFStreamBase* tiffstream; KisTIFFReaderBase* tiffReader = 0; - Q_UINT8 poses[5]; + TQ_UINT8 poses[5]; KisTIFFPostProcessor* postprocessor = 0; // Configure poses @@ -509,7 +509,7 @@ KisImageBuilder_Result KisTIFFConverter::readTIFFDirectory( TIFF* image) uint32 rowsPerStrip; TIFFGetFieldDefaulted(image, TIFFTAG_ROWSPERSTRIP, &rowsPerStrip); kdDebug() << rowsPerStrip << " " << height << endl; - rowsPerStrip = QMIN(rowsPerStrip, height); // when TIFFNumberOfStrips(image) == 1 it might happen that rowsPerStrip is incorrectly set + rowsPerStrip = TQMIN(rowsPerStrip, height); // when TIFFNumberOfStrips(image) == 1 it might happen that rowsPerStrip is incorrectly set if(planarconfig == PLANARCONFIG_CONTIG) { buf = _TIFFmalloc(stripsize); @@ -584,15 +584,15 @@ KisImageBuilder_Result KisTIFFConverter::buildImage(const KURL& uri) if (uri.isEmpty()) return KisImageBuilder_RESULT_NO_URI; - if (!KIO::NetAccess::exists(uri, false, qApp -> mainWidget())) { + if (!KIO::NetAccess::exists(uri, false, tqApp -> mainWidget())) { return KisImageBuilder_RESULT_NOT_EXIST; } // We're not set up to handle asynchronous loading at the moment. KisImageBuilder_Result result = KisImageBuilder_RESULT_FAILURE; - QString tmpFile; + TQString tmpFile; - if (KIO::NetAccess::download(uri, tmpFile, qApp -> mainWidget())) { + if (KIO::NetAccess::download(uri, tmpFile, tqApp -> mainWidget())) { KURL uriTF; uriTF.setPath( tmpFile ); result = decode(uriTF); @@ -623,7 +623,7 @@ KisImageBuilder_Result KisTIFFConverter::buildFile(const KURL& uri, KisImageSP i // Open file for writing TIFF *image; - if((image = TIFFOpen(QFile::encodeName(uri.path()), "w")) == NULL){ + if((image = TIFFOpen(TQFile::encodeName(uri.path()), "w")) == NULL){ kdDebug(41008) << "Could not open the file for writting " << uri.path() << endl; TIFFClose(image); return (KisImageBuilder_RESULT_FAILURE); @@ -632,18 +632,18 @@ KisImageBuilder_Result KisTIFFConverter::buildFile(const KURL& uri, KisImageSP i // Set the document informations KoDocumentInfo * info = m_doc->documentInfo(); KoDocumentInfoAbout * aboutPage = static_cast<KoDocumentInfoAbout *>(info->page( "about" )); - QString title = aboutPage->title(); + TQString title = aboutPage->title(); if(!title.isEmpty()) { TIFFSetField(image, TIFFTAG_DOCUMENTNAME, title.ascii()); } - QString abstract = aboutPage->abstract(); + TQString abstract = aboutPage->abstract(); if(!abstract.isEmpty()) { TIFFSetField(image, TIFFTAG_IMAGEDESCRIPTION, abstract.ascii()); } KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" )); - QString author = authorPage->fullName(); + TQString author = authorPage->fullName(); if(!author.isEmpty()) { TIFFSetField(image, TIFFTAG_ARTIST, author.ascii()); diff --git a/filters/krita/tiff/kis_tiff_converter.h b/filters/krita/tiff/kis_tiff_converter.h index fbda4abd..7d7176b7 100644 --- a/filters/krita/tiff/kis_tiff_converter.h +++ b/filters/krita/tiff/kis_tiff_converter.h @@ -23,7 +23,7 @@ #include <stdio.h> #include <tiffio.h> -#include <qvaluevector.h> +#include <tqvaluevector.h> #include <kio/job.h> @@ -56,18 +56,19 @@ enum KisImageBuilder_Result { }; struct KisTIFFOptions { - Q_UINT16 compressionType; - Q_UINT16 predictor; + TQ_UINT16 compressionType; + TQ_UINT16 predictor; bool alpha; bool flatten; - Q_UINT16 jpegQuality; - Q_UINT16 deflateCompress; - Q_UINT16 faxMode; - Q_UINT16 pixarLogCompress; + TQ_UINT16 jpegQuality; + TQ_UINT16 deflateCompress; + TQ_UINT16 faxMode; + TQ_UINT16 pixarLogCompress; }; class KisTIFFConverter : public KisProgressSubject { Q_OBJECT + TQ_OBJECT public: KisTIFFConverter(KisDoc *doc, KisUndoAdapter *adapter); virtual ~KisTIFFConverter(); diff --git a/filters/krita/tiff/kis_tiff_export.cc b/filters/krita/tiff/kis_tiff_export.cc index ee715c6a..d2b39977 100644 --- a/filters/krita/tiff/kis_tiff_export.cc +++ b/filters/krita/tiff/kis_tiff_export.cc @@ -19,8 +19,8 @@ #include "kis_tiff_export.h" -#include <qcheckbox.h> -#include <qslider.h> +#include <tqcheckbox.h> +#include <tqslider.h> #include <kapplication.h> #include <kcombobox.h> @@ -42,7 +42,7 @@ typedef KGenericFactory<KisTIFFExport, KoFilter> KisTIFFExportFactory; K_EXPORT_COMPONENT_FACTORY(libkritatiffexport, KisTIFFExportFactory("kofficefilters")) -KisTIFFExport::KisTIFFExport(KoFilter *, const char *, const QStringList&) : KoFilter() +KisTIFFExport::KisTIFFExport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -50,7 +50,7 @@ KisTIFFExport::~KisTIFFExport() { } -KoFilter::ConversionStatus KisTIFFExport::convert(const QCString& from, const QCString& to) +KoFilter::ConversiontqStatus KisTIFFExport::convert(const TQCString& from, const TQCString& to) { kdDebug(41008) << "Tiff export! From: " << from << ", To: " << to << "\n"; @@ -71,7 +71,7 @@ KoFilter::ConversionStatus KisTIFFExport::convert(const QCString& from, const QC kdb->optionswdg->kComboBoxPredictor->removeItem(2); } - if(kdb->exec() == QDialog::Rejected) + if(kdb->exec() == TQDialog::Rejected) { return KoFilter::OK; // FIXME Cancel doesn't exist :( } @@ -84,7 +84,7 @@ KoFilter::ConversionStatus KisTIFFExport::convert(const QCString& from, const QC } delete kdb; - QString filename = m_chain->outputFile(); + TQString filename = m_chain->outputFile(); if (!output) return KoFilter::CreationError; diff --git a/filters/krita/tiff/kis_tiff_export.h b/filters/krita/tiff/kis_tiff_export.h index 586c2390..113747c7 100644 --- a/filters/krita/tiff/kis_tiff_export.h +++ b/filters/krita/tiff/kis_tiff_export.h @@ -24,11 +24,12 @@ class KisTIFFExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - KisTIFFExport(KoFilter *parent, const char *name, const QStringList&); + KisTIFFExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~KisTIFFExport(); public: - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; #endif diff --git a/filters/krita/tiff/kis_tiff_import.cc b/filters/krita/tiff/kis_tiff_import.cc index 155cf67d..7c157846 100644 --- a/filters/krita/tiff/kis_tiff_import.cc +++ b/filters/krita/tiff/kis_tiff_import.cc @@ -33,7 +33,7 @@ typedef KGenericFactory<KisTIFFImport, KoFilter> TIFFImportFactory; K_EXPORT_COMPONENT_FACTORY(libkritatiffimport, TIFFImportFactory("kofficefilters")) -KisTIFFImport::KisTIFFImport(KoFilter *, const char *, const QStringList&) : KoFilter() +KisTIFFImport::KisTIFFImport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -41,7 +41,7 @@ KisTIFFImport::~KisTIFFImport() { } -KoFilter::ConversionStatus KisTIFFImport::convert(const QCString&, const QCString& to) +KoFilter::ConversiontqStatus KisTIFFImport::convert(const TQCString&, const TQCString& to) { kdDebug(41008) << "Importing using TIFFImport!\n"; @@ -51,7 +51,7 @@ KoFilter::ConversionStatus KisTIFFImport::convert(const QCString&, const QCStrin KisDoc * doc = dynamic_cast<KisDoc*>(m_chain -> outputDocument()); KisView * view = static_cast<KisView*>(doc -> views().getFirst()); - QString filename = m_chain -> inputFile(); + TQString filename = m_chain -> inputFile(); if (!doc) return KoFilter::CreationError; diff --git a/filters/krita/tiff/kis_tiff_import.h b/filters/krita/tiff/kis_tiff_import.h index 75953edc..9fef7755 100644 --- a/filters/krita/tiff/kis_tiff_import.h +++ b/filters/krita/tiff/kis_tiff_import.h @@ -23,11 +23,12 @@ class KisTIFFImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - KisTIFFImport(KoFilter *parent, const char *name, const QStringList&); + KisTIFFImport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~KisTIFFImport(); public: - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; #endif diff --git a/filters/krita/tiff/kis_tiff_reader.cc b/filters/krita/tiff/kis_tiff_reader.cc index bec7f184..f2eabd87 100644 --- a/filters/krita/tiff/kis_tiff_reader.cc +++ b/filters/krita/tiff/kis_tiff_reader.cc @@ -26,25 +26,25 @@ #include "kis_tiff_stream.h" - uint KisTIFFReaderTarget8bit::copyDataToChannels( Q_UINT32 x, Q_UINT32 y, Q_UINT32 dataWidth, TIFFStreamBase* tiffstream) + uint KisTIFFReaderTarget8bit::copyDataToChannels( TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 dataWidth, TIFFStreamBase* tiffstream) { KisHLineIterator it = paintDevice() -> createHLineIterator(x, y, dataWidth, true); - double coeff = Q_UINT8_MAX / (double)( pow(2, sourceDepth() ) - 1 ); + double coeff = TQ_UINT8_MAX / (double)( pow(2, sourceDepth() ) - 1 ); // kdDebug(41008) << " depth expension coefficient : " << coeff << endl; while (!it.isDone()) { - Q_UINT8 *d = it.rawData(); - Q_UINT8 i; + TQ_UINT8 *d = it.rawData(); + TQ_UINT8 i; for(i = 0; i < nbColorsSamples() ; i++) { - d[poses()[i]] = (Q_UINT8)( tiffstream->nextValue() * coeff ); + d[poses()[i]] = (TQ_UINT8)( tiffstream->nextValue() * coeff ); } postProcessor()->postProcess8bit( d); if(transform()) cmsDoTransform(transform(), d, d, 1); - d[poses()[i]] = Q_UINT8_MAX; + d[poses()[i]] = TQ_UINT8_MAX; for(int k = 0; k < nbExtraSamples(); k++) { if(k == alphaPos()) - d[poses()[i]] = (Q_UINT32) ( tiffstream->nextValue() * coeff ); + d[poses()[i]] = (TQ_UINT32) ( tiffstream->nextValue() * coeff ); else tiffstream->nextValue(); } @@ -52,25 +52,25 @@ } return 1; } - uint KisTIFFReaderTarget16bit::copyDataToChannels( Q_UINT32 x, Q_UINT32 y, Q_UINT32 dataWidth, TIFFStreamBase* tiffstream) + uint KisTIFFReaderTarget16bit::copyDataToChannels( TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 dataWidth, TIFFStreamBase* tiffstream) { KisHLineIterator it = paintDevice() -> createHLineIterator(x, y, dataWidth, true); - double coeff = Q_UINT16_MAX / (double)( pow(2, sourceDepth() ) - 1 ); + double coeff = TQ_UINT16_MAX / (double)( pow(2, sourceDepth() ) - 1 ); // kdDebug(41008) << " depth expension coefficient : " << coeff << endl; while (!it.isDone()) { - Q_UINT16 *d = reinterpret_cast<Q_UINT16 *>(it.rawData()); - Q_UINT8 i; + TQ_UINT16 *d = reinterpret_cast<TQ_UINT16 *>(it.rawData()); + TQ_UINT8 i; for(i = 0; i < nbColorsSamples(); i++) { - d[poses()[i]] = (Q_UINT16)( tiffstream->nextValue() * coeff ); + d[poses()[i]] = (TQ_UINT16)( tiffstream->nextValue() * coeff ); } postProcessor()->postProcess16bit( d); if(transform()) cmsDoTransform(transform(), d, d, 1); - d[poses()[i]] = Q_UINT16_MAX; + d[poses()[i]] = TQ_UINT16_MAX; for(int k = 0; k < nbExtraSamples(); k++) { if(k == alphaPos()) - d[poses()[i]] = (Q_UINT16) ( tiffstream->nextValue() * coeff ); + d[poses()[i]] = (TQ_UINT16) ( tiffstream->nextValue() * coeff ); else tiffstream->nextValue(); } @@ -79,25 +79,25 @@ return 1; } - uint KisTIFFReaderTarget32bit::copyDataToChannels( Q_UINT32 x, Q_UINT32 y, Q_UINT32 dataWidth, TIFFStreamBase* tiffstream) + uint KisTIFFReaderTarget32bit::copyDataToChannels( TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 dataWidth, TIFFStreamBase* tiffstream) { KisHLineIterator it = paintDevice() -> createHLineIterator(x, y, dataWidth, true); - double coeff = Q_UINT32_MAX / (double)( pow(2, sourceDepth() ) - 1 ); + double coeff = TQ_UINT32_MAX / (double)( pow(2, sourceDepth() ) - 1 ); // kdDebug(41008) << " depth expension coefficient : " << coeff << endl; while (!it.isDone()) { - Q_UINT32 *d = reinterpret_cast<Q_UINT32 *>(it.rawData()); - Q_UINT8 i; + TQ_UINT32 *d = reinterpret_cast<TQ_UINT32 *>(it.rawData()); + TQ_UINT8 i; for(i = 0; i < nbColorsSamples(); i++) { - d[poses()[i]] = (Q_UINT32)( tiffstream->nextValue() * coeff ); + d[poses()[i]] = (TQ_UINT32)( tiffstream->nextValue() * coeff ); } postProcessor()->postProcess32bit( d); if(transform()) cmsDoTransform(transform(), d, d, 1); - d[poses()[i]] = Q_UINT32_MAX; + d[poses()[i]] = TQ_UINT32_MAX; for(int k = 0; k < nbExtraSamples(); k++) { if(k == alphaPos()) - d[poses()[i]] = (Q_UINT32) ( tiffstream->nextValue() * coeff ); + d[poses()[i]] = (TQ_UINT32) ( tiffstream->nextValue() * coeff ); else tiffstream->nextValue(); } @@ -105,16 +105,16 @@ } return 1; } - uint KisTIFFReaderFromPalette::copyDataToChannels(Q_UINT32 x, Q_UINT32 y, Q_UINT32 dataWidth, TIFFStreamBase* tiffstream) + uint KisTIFFReaderFromPalette::copyDataToChannels(TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 dataWidth, TIFFStreamBase* tiffstream) { KisHLineIterator it = paintDevice() -> createHLineIterator(x, y, dataWidth, true); while (!it.isDone()) { - Q_UINT16* d = reinterpret_cast<Q_UINT16 *>(it.rawData()); + TQ_UINT16* d = reinterpret_cast<TQ_UINT16 *>(it.rawData()); uint32 index = tiffstream->nextValue(); d[2] = m_red[index]; d[1] = m_green[index]; d[0] = m_blue[index]; - d[3] = Q_UINT16_MAX; + d[3] = TQ_UINT16_MAX; ++it; } return 1; diff --git a/filters/krita/tiff/kis_tiff_reader.h b/filters/krita/tiff/kis_tiff_reader.h index d107d21e..2ab573dd 100644 --- a/filters/krita/tiff/kis_tiff_reader.h +++ b/filters/krita/tiff/kis_tiff_reader.h @@ -26,7 +26,7 @@ #include <stdio.h> #include <tiffio.h> -// #include <qvaluevector.h> +// #include <tqvaluevector.h> // #include <kio/job.h> // #include <kis_progress_subject.h> @@ -39,7 +39,7 @@ #include <kis_iterator.h> #include <kis_paint_device.h> -#define Q_UINT32_MAX 4294967295u +#define TQ_UINT32_MAX 4294967295u class TIFFStreamBase; @@ -47,9 +47,9 @@ class KisTIFFPostProcessor { public: KisTIFFPostProcessor(uint8 nbcolorssamples) : m_nbcolorssamples(nbcolorssamples) { } public: - virtual void postProcess8bit( Q_UINT8* ) { }; - virtual void postProcess16bit( Q_UINT16* ) { }; - virtual void postProcess32bit( Q_UINT32* ) { }; + virtual void postProcess8bit( TQ_UINT8* ) { }; + virtual void postProcess16bit( TQ_UINT16* ) { }; + virtual void postProcess32bit( TQ_UINT32* ) { }; protected: inline uint8 nbColorsSamples() { return m_nbcolorssamples; } private: @@ -60,27 +60,27 @@ class KisTIFFPostProcessorInvert : public KisTIFFPostProcessor { public: KisTIFFPostProcessorInvert(uint8 nbcolorssamples) : KisTIFFPostProcessor(nbcolorssamples) {} public: - virtual void postProcess8bit( Q_UINT8* data ) + virtual void postProcess8bit( TQ_UINT8* data ) { for(int i = 0; i < nbColorsSamples(); i++) { - data[i] = Q_UINT8_MAX - data[i]; + data[i] = TQ_UINT8_MAX - data[i]; } } - virtual void postProcess16bit( Q_UINT16* data ) + virtual void postProcess16bit( TQ_UINT16* data ) { - Q_UINT16* d = (Q_UINT16*) data; + TQ_UINT16* d = (TQ_UINT16*) data; for(int i = 0; i < nbColorsSamples(); i++) { - d[i] = Q_UINT16_MAX - d[i]; + d[i] = TQ_UINT16_MAX - d[i]; } } - virtual void postProcess32bit( Q_UINT32* data ) + virtual void postProcess32bit( TQ_UINT32* data ) { - Q_UINT32* d = (Q_UINT32*) data; + TQ_UINT32* d = (TQ_UINT32*) data; for(int i = 0; i < nbColorsSamples(); i++) { - d[i] = Q_UINT32_MAX - d[i]; + d[i] = TQ_UINT32_MAX - d[i]; } } }; @@ -89,30 +89,30 @@ class KisTIFFPostProcessorICCLABtoCIELAB : public KisTIFFPostProcessor { public: KisTIFFPostProcessorICCLABtoCIELAB(uint8 nbcolorssamples) : KisTIFFPostProcessor(nbcolorssamples) {} public: - void postProcess8bit(Q_UINT8* data) + void postProcess8bit(TQ_UINT8* data) { - Q_INT8* ds = (Q_INT8*) data; + TQ_INT8* ds = (TQ_INT8*) data; for(int i = 1; i < nbColorsSamples(); i++) { - ds[i] = data[i] - Q_UINT8_MAX/2; + ds[i] = data[i] - TQ_UINT8_MAX/2; } } - void postProcess16bit(Q_UINT16* data) + void postProcess16bit(TQ_UINT16* data) { - Q_UINT16* d = (Q_UINT16*) data; - Q_INT16* ds = (Q_INT16*) data; + TQ_UINT16* d = (TQ_UINT16*) data; + TQ_INT16* ds = (TQ_INT16*) data; for(int i = 1; i < nbColorsSamples(); i++) { - ds[i] = d[i] - Q_UINT16_MAX /2; + ds[i] = d[i] - TQ_UINT16_MAX /2; } } - void postProcess32bit(Q_UINT32* data) + void postProcess32bit(TQ_UINT32* data) { - Q_UINT32* d = (Q_UINT32*) data; - Q_INT32* ds = (Q_INT32*) data; + TQ_UINT32* d = (TQ_UINT32*) data; + TQ_INT32* ds = (TQ_INT32*) data; for(int i = 1; i < nbColorsSamples(); i++) { - ds[i] = d[i] - Q_UINT32_MAX /2; + ds[i] = d[i] - TQ_UINT32_MAX /2; } } }; @@ -120,7 +120,7 @@ class KisTIFFPostProcessorICCLABtoCIELAB : public KisTIFFPostProcessor { class KisTIFFReaderBase { public: - KisTIFFReaderBase( KisPaintDeviceSP device, Q_UINT8* poses, int8 alphapos, uint8 sourceDepth, uint8 nbcolorssamples, uint8 extrasamplescount, cmsHTRANSFORM transformProfile, KisTIFFPostProcessor* postprocessor) : m_device(device), m_alphapos(alphapos), m_sourceDepth(sourceDepth), m_nbcolorssamples(nbcolorssamples), m_nbextrasamples(extrasamplescount), m_poses(poses), m_transformProfile(transformProfile), m_postprocess(postprocessor) + KisTIFFReaderBase( KisPaintDeviceSP device, TQ_UINT8* poses, int8 alphapos, uint8 sourceDepth, uint8 nbcolorssamples, uint8 extrasamplescount, cmsHTRANSFORM transformProfile, KisTIFFPostProcessor* postprocessor) : m_device(device), m_alphapos(alphapos), m_sourceDepth(sourceDepth), m_nbcolorssamples(nbcolorssamples), m_nbextrasamples(extrasamplescount), m_poses(poses), m_transformProfile(transformProfile), m_postprocess(postprocessor) { } @@ -134,71 +134,71 @@ class KisTIFFReaderBase { * * @return the number of line which were copied */ - virtual uint copyDataToChannels( Q_UINT32 x, Q_UINT32 y, Q_UINT32 dataWidth, TIFFStreamBase* tiffstream) =0; + virtual uint copyDataToChannels( TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 dataWidth, TIFFStreamBase* tiffstream) =0; /** * This function is called when all data has been read and should be used for any postprocessing. */ virtual void finalize() { }; protected: inline KisPaintDeviceSP paintDevice() { return m_device; } - inline Q_UINT8 alphaPos() { return m_alphapos; } - inline Q_UINT8 sourceDepth() { return m_sourceDepth; } - inline Q_UINT8 nbColorsSamples() { return m_nbcolorssamples; } - inline Q_UINT8 nbExtraSamples() { return m_nbextrasamples; } - inline Q_UINT8* poses() { return m_poses; } + inline TQ_UINT8 alphaPos() { return m_alphapos; } + inline TQ_UINT8 sourceDepth() { return m_sourceDepth; } + inline TQ_UINT8 nbColorsSamples() { return m_nbcolorssamples; } + inline TQ_UINT8 nbExtraSamples() { return m_nbextrasamples; } + inline TQ_UINT8* poses() { return m_poses; } inline cmsHTRANSFORM transform() { return m_transformProfile; } inline KisTIFFPostProcessor* postProcessor() { return m_postprocess; } private: KisPaintDeviceSP m_device; - Q_UINT8 m_alphapos; - Q_UINT8 m_sourceDepth; - Q_UINT8 m_nbcolorssamples; - Q_UINT8 m_nbextrasamples; - Q_UINT8* m_poses; + TQ_UINT8 m_alphapos; + TQ_UINT8 m_sourceDepth; + TQ_UINT8 m_nbcolorssamples; + TQ_UINT8 m_nbextrasamples; + TQ_UINT8* m_poses; cmsHTRANSFORM m_transformProfile; KisTIFFPostProcessor* m_postprocess; - Q_UINT32 m_tiffDataWidth; + TQ_UINT32 m_tiffDataWidth; }; class KisTIFFReaderTarget8bit : public KisTIFFReaderBase { public: - KisTIFFReaderTarget8bit( KisPaintDeviceSP device, Q_UINT8* poses, int8 alphapos, uint8 sourceDepth, uint8 nbcolorssamples, uint8 extrasamplescount, cmsHTRANSFORM transformProfile, KisTIFFPostProcessor* postprocessor) : KisTIFFReaderBase(device, poses, alphapos, sourceDepth, nbcolorssamples, extrasamplescount, transformProfile, postprocessor ) + KisTIFFReaderTarget8bit( KisPaintDeviceSP device, TQ_UINT8* poses, int8 alphapos, uint8 sourceDepth, uint8 nbcolorssamples, uint8 extrasamplescount, cmsHTRANSFORM transformProfile, KisTIFFPostProcessor* postprocessor) : KisTIFFReaderBase(device, poses, alphapos, sourceDepth, nbcolorssamples, extrasamplescount, transformProfile, postprocessor ) { } public: - virtual uint copyDataToChannels( Q_UINT32 x, Q_UINT32 y, Q_UINT32 dataWidth, TIFFStreamBase* tiffstream); + virtual uint copyDataToChannels( TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 dataWidth, TIFFStreamBase* tiffstream); }; class KisTIFFReaderTarget16bit : public KisTIFFReaderBase { public: - KisTIFFReaderTarget16bit( KisPaintDeviceSP device, Q_UINT8* poses, int8 alphapos, uint8 sourceDepth, uint8 nbcolorssamples, uint8 extrasamplescount, cmsHTRANSFORM transformProfile, KisTIFFPostProcessor* postprocessor) : KisTIFFReaderBase(device, poses, alphapos, sourceDepth, nbcolorssamples, extrasamplescount, transformProfile, postprocessor ) + KisTIFFReaderTarget16bit( KisPaintDeviceSP device, TQ_UINT8* poses, int8 alphapos, uint8 sourceDepth, uint8 nbcolorssamples, uint8 extrasamplescount, cmsHTRANSFORM transformProfile, KisTIFFPostProcessor* postprocessor) : KisTIFFReaderBase(device, poses, alphapos, sourceDepth, nbcolorssamples, extrasamplescount, transformProfile, postprocessor ) { } public: - virtual uint copyDataToChannels( Q_UINT32 x, Q_UINT32 y, Q_UINT32 dataWidth, TIFFStreamBase* tiffstream) ; + virtual uint copyDataToChannels( TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 dataWidth, TIFFStreamBase* tiffstream) ; }; class KisTIFFReaderTarget32bit : public KisTIFFReaderBase { public: - KisTIFFReaderTarget32bit( KisPaintDeviceSP device, Q_UINT8* poses, int8 alphapos, uint8 sourceDepth, uint8 nbcolorssamples, uint8 extrasamplescount, cmsHTRANSFORM transformProfile, KisTIFFPostProcessor* postprocessor) : KisTIFFReaderBase(device, poses, alphapos, sourceDepth, nbcolorssamples, extrasamplescount, transformProfile, postprocessor ) + KisTIFFReaderTarget32bit( KisPaintDeviceSP device, TQ_UINT8* poses, int8 alphapos, uint8 sourceDepth, uint8 nbcolorssamples, uint8 extrasamplescount, cmsHTRANSFORM transformProfile, KisTIFFPostProcessor* postprocessor) : KisTIFFReaderBase(device, poses, alphapos, sourceDepth, nbcolorssamples, extrasamplescount, transformProfile, postprocessor ) { } public: - virtual uint copyDataToChannels( Q_UINT32 x, Q_UINT32 y, Q_UINT32 dataWidth, TIFFStreamBase* tiffstream) ; + virtual uint copyDataToChannels( TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 dataWidth, TIFFStreamBase* tiffstream) ; }; class KisTIFFReaderFromPalette : public KisTIFFReaderBase { public: - KisTIFFReaderFromPalette( KisPaintDeviceSP device, uint16 *red, uint16 *green, uint16 *blue, Q_UINT8* poses, int8 alphapos, uint8 sourceDepth, uint8 nbcolorssamples, uint8 extrasamplescount, cmsHTRANSFORM transformProfile, KisTIFFPostProcessor* postprocessor) : KisTIFFReaderBase(device, poses, alphapos, sourceDepth, nbcolorssamples, extrasamplescount, transformProfile, postprocessor ), m_red(red), m_green(green), m_blue(blue) + KisTIFFReaderFromPalette( KisPaintDeviceSP device, uint16 *red, uint16 *green, uint16 *blue, TQ_UINT8* poses, int8 alphapos, uint8 sourceDepth, uint8 nbcolorssamples, uint8 extrasamplescount, cmsHTRANSFORM transformProfile, KisTIFFPostProcessor* postprocessor) : KisTIFFReaderBase(device, poses, alphapos, sourceDepth, nbcolorssamples, extrasamplescount, transformProfile, postprocessor ), m_red(red), m_green(green), m_blue(blue) { } public: - virtual uint copyDataToChannels( Q_UINT32 x, Q_UINT32 y, Q_UINT32 dataWidth, TIFFStreamBase* tiffstream) ; + virtual uint copyDataToChannels( TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 dataWidth, TIFFStreamBase* tiffstream) ; private: uint16 *m_red, *m_green, *m_blue; }; diff --git a/filters/krita/tiff/kis_tiff_writer_visitor.cpp b/filters/krita/tiff/kis_tiff_writer_visitor.cpp index 64f7e252..76617534 100644 --- a/filters/krita/tiff/kis_tiff_writer_visitor.cpp +++ b/filters/krita/tiff/kis_tiff_writer_visitor.cpp @@ -63,7 +63,7 @@ namespace { return true; } - KMessageBox::error(0, i18n("Cannot export images in %1.\n").arg(cs->id().name()) ) ; + KMessageBox::error(0, i18n("Cannot export images in %1.\n").tqarg(cs->id().name()) ) ; return false; } @@ -79,13 +79,13 @@ KisTIFFWriterVisitor::~KisTIFFWriterVisitor() bool KisTIFFWriterVisitor::saveAlpha() { return m_options->alpha; } -bool KisTIFFWriterVisitor::copyDataToStrips( KisHLineIterator it, tdata_t buff, uint8 depth, uint8 nbcolorssamples, Q_UINT8* poses) +bool KisTIFFWriterVisitor::copyDataToStrips( KisHLineIterator it, tdata_t buff, uint8 depth, uint8 nbcolorssamples, TQ_UINT8* poses) { if(depth == 32) { - Q_UINT32 *dst = reinterpret_cast<Q_UINT32 *>(buff); + TQ_UINT32 *dst = reinterpret_cast<TQ_UINT32 *>(buff); while (!it.isDone()) { - const Q_UINT32 *d = reinterpret_cast<const Q_UINT32 *>(it.rawData()); + const TQ_UINT32 *d = reinterpret_cast<const TQ_UINT32 *>(it.rawData()); int i; for(i = 0; i < nbcolorssamples; i++) { @@ -97,9 +97,9 @@ bool KisTIFFWriterVisitor::copyDataToStrips( KisHLineIterator it, tdata_t buff, return true; } else if(depth == 16) { - Q_UINT16 *dst = reinterpret_cast<Q_UINT16 *>(buff); + TQ_UINT16 *dst = reinterpret_cast<TQ_UINT16 *>(buff); while (!it.isDone()) { - const Q_UINT16 *d = reinterpret_cast<const Q_UINT16 *>(it.rawData()); + const TQ_UINT16 *d = reinterpret_cast<const TQ_UINT16 *>(it.rawData()); int i; for(i = 0; i < nbcolorssamples; i++) { @@ -110,9 +110,9 @@ bool KisTIFFWriterVisitor::copyDataToStrips( KisHLineIterator it, tdata_t buff, } return true; } else if(depth == 8) { - Q_UINT8 *dst = reinterpret_cast<Q_UINT8 *>(buff); + TQ_UINT8 *dst = reinterpret_cast<TQ_UINT8 *>(buff); while (!it.isDone()) { - const Q_UINT8 *d = it.rawData(); + const TQ_UINT8 *d = it.rawData(); int i; for(i = 0; i < nbcolorssamples; i++) { @@ -159,9 +159,9 @@ bool KisTIFFWriterVisitor::visit(KisPaintLayer *layer) // Set the compression options TIFFSetField(image(), TIFFTAG_COMPRESSION, m_options->compressionType); TIFFSetField(image(), TIFFTAG_FAXMODE, m_options->faxMode); - TIFFSetField(image(), TIFFTAG_JPEGQUALITY, m_options->jpegQuality); - TIFFSetField(image(), TIFFTAG_ZIPQUALITY, m_options->deflateCompress); - TIFFSetField(image(), TIFFTAG_PIXARLOGQUALITY, m_options->pixarLogCompress); + TIFFSetField(image(), TIFFTAG_JPEGTQUALITY, m_options->jpegQuality); + TIFFSetField(image(), TIFFTAG_ZIPTQUALITY, m_options->deflateCompress); + TIFFSetField(image(), TIFFTAG_PIXARLOGTQUALITY, m_options->pixarLogCompress); // Set the predictor TIFFSetField(image(), TIFFTAG_PREDICTOR, m_options->predictor); @@ -175,13 +175,13 @@ bool KisTIFFWriterVisitor::visit(KisPaintLayer *layer) KisProfile* profile = pd->colorSpace()->getProfile(); if(profile) { - QByteArray ba = profile->annotation()->annotation(); + TQByteArray ba = profile->annotation()->annotation(); TIFFSetField(image(), TIFFTAG_ICCPROFILE, ba.size(),ba.data()); } tsize_t stripsize = TIFFStripSize(image()); tdata_t buff = _TIFFmalloc(stripsize); - Q_INT32 height = layer->image()->height(); - Q_INT32 width = layer->image()->width(); + TQ_INT32 height = layer->image()->height(); + TQ_INT32 width = layer->image()->width(); bool r = true; for (int y = 0; y < height; y++) { KisHLineIterator it = layer->paintDevice()->createHLineIterator(0, y, width, false); @@ -189,25 +189,25 @@ bool KisTIFFWriterVisitor::visit(KisPaintLayer *layer) { case PHOTOMETRIC_MINISBLACK: { - Q_UINT8 poses[]={ 0,1 }; + TQ_UINT8 poses[]={ 0,1 }; r = copyDataToStrips(it, buff, depth, 1, poses); } break; case PHOTOMETRIC_RGB: { - Q_UINT8 poses[]={ 2, 1, 0, 3}; + TQ_UINT8 poses[]={ 2, 1, 0, 3}; r = copyDataToStrips(it, buff, depth, 3, poses); } break; case PHOTOMETRIC_SEPARATED: { - Q_UINT8 poses[]={ 0, 1, 2, 3, 4 }; + TQ_UINT8 poses[]={ 0, 1, 2, 3, 4 }; r = copyDataToStrips(it, buff, depth, 4, poses); } break; case PHOTOMETRIC_CIELAB: { - Q_UINT8 poses[]={ 0, 1, 2, 3 }; + TQ_UINT8 poses[]={ 0, 1, 2, 3 }; r = copyDataToStrips(it, buff, depth, 3, poses); } break; diff --git a/filters/krita/tiff/kis_tiff_writer_visitor.h b/filters/krita/tiff/kis_tiff_writer_visitor.h index c05c8d78..abd1aec7 100644 --- a/filters/krita/tiff/kis_tiff_writer_visitor.h +++ b/filters/krita/tiff/kis_tiff_writer_visitor.h @@ -44,7 +44,7 @@ class KisTIFFWriterVisitor : public KisLayerVisitor private: inline TIFF* image() { return m_image; } inline bool saveAlpha(); - bool copyDataToStrips( KisHLineIterator it, tdata_t buff, uint8 depth, uint8 nbcolorssamples, Q_UINT8* poses); + bool copyDataToStrips( KisHLineIterator it, tdata_t buff, uint8 depth, uint8 nbcolorssamples, TQ_UINT8* poses); private: TIFF* m_image; KisTIFFOptions* m_options; diff --git a/filters/krita/tiff/kis_tiff_ycbcr_reader.cc b/filters/krita/tiff/kis_tiff_ycbcr_reader.cc index 5609f887..ce5e4ae9 100644 --- a/filters/krita/tiff/kis_tiff_ycbcr_reader.cc +++ b/filters/krita/tiff/kis_tiff_ycbcr_reader.cc @@ -25,17 +25,17 @@ #include "kis_tiff_stream.h" -KisTIFFYCbCrReaderTarget8Bit::KisTIFFYCbCrReaderTarget8Bit( KisPaintDeviceSP device, Q_UINT8* poses, int8 alphapos, uint8 sourceDepth, uint8 nbcolorssamples, uint8 extrasamplescount, cmsHTRANSFORM transformProfile, KisTIFFPostProcessor* postprocessor, uint16 hsub, uint16 vsub, KisTIFFYCbCr::Position position ) : KisTIFFReaderBase(device, poses, alphapos, sourceDepth, nbcolorssamples, extrasamplescount, transformProfile, postprocessor), m_hsub(hsub), m_vsub(vsub), m_position(position) +KisTIFFYCbCrReaderTarget8Bit::KisTIFFYCbCrReaderTarget8Bit( KisPaintDeviceSP device, TQ_UINT8* poses, int8 alphapos, uint8 sourceDepth, uint8 nbcolorssamples, uint8 extrasamplescount, cmsHTRANSFORM transformProfile, KisTIFFPostProcessor* postprocessor, uint16 hsub, uint16 vsub, KisTIFFYCbCr::Position position ) : KisTIFFReaderBase(device, poses, alphapos, sourceDepth, nbcolorssamples, extrasamplescount, transformProfile, postprocessor), m_hsub(hsub), m_vsub(vsub), m_position(position) { // Initialize the buffer - Q_INT32 imagewidth = device->image()->width(); + TQ_INT32 imagewidth = device->image()->width(); if(2*(imagewidth / 2) != imagewidth) imagewidth++; m_bufferWidth = imagewidth / m_hsub; - Q_INT32 imageheight = device->image()->height(); + TQ_INT32 imageheight = device->image()->height(); if(2*(imageheight / 2) != imageheight) imageheight++; m_bufferHeight = imageheight / m_vsub; - m_bufferCb = new Q_UINT8[ m_bufferWidth * m_bufferHeight ]; - m_bufferCr = new Q_UINT8[ m_bufferWidth * m_bufferHeight ]; + m_bufferCb = new TQ_UINT8[ m_bufferWidth * m_bufferHeight ]; + m_bufferCr = new TQ_UINT8[ m_bufferWidth * m_bufferHeight ]; } KisTIFFYCbCrReaderTarget8Bit::~KisTIFFYCbCrReaderTarget8Bit() @@ -44,10 +44,10 @@ KisTIFFYCbCrReaderTarget8Bit::~KisTIFFYCbCrReaderTarget8Bit() delete[] m_bufferCr; } -uint KisTIFFYCbCrReaderTarget8Bit::copyDataToChannels( Q_UINT32 x, Q_UINT32 y, Q_UINT32 dataWidth, TIFFStreamBase* tiffstream) +uint KisTIFFYCbCrReaderTarget8Bit::copyDataToChannels( TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 dataWidth, TIFFStreamBase* tiffstream) { int numcols = dataWidth / m_hsub; - double coeff = Q_UINT8_MAX / (double)( pow(2, sourceDepth() ) - 1 ); + double coeff = TQ_UINT8_MAX / (double)( pow(2, sourceDepth() ) - 1 ); // kdDebug(41008) << " depth expension coefficient : " << coeff << endl; // kdDebug(41008) << " y = " << y << endl; uint buffPos = y / m_vsub * m_bufferWidth + x / m_hsub ; @@ -58,13 +58,13 @@ uint KisTIFFYCbCrReaderTarget8Bit::copyDataToChannels( Q_UINT32 x, Q_UINT32 y, Q { while( !it.isDone() ) { - Q_UINT8 *d = it.rawData(); - d[0] = (Q_UINT8)( tiffstream->nextValue() * coeff ); - d[3] = Q_UINT8_MAX; + TQ_UINT8 *d = it.rawData(); + d[0] = (TQ_UINT8)( tiffstream->nextValue() * coeff ); + d[3] = TQ_UINT8_MAX; for(int k = 0; k < nbExtraSamples(); k++) { if(k == alphaPos()) - d[3] = (Q_UINT32) ( tiffstream->nextValue() * coeff ); + d[3] = (TQ_UINT32) ( tiffstream->nextValue() * coeff ); else tiffstream->nextValue(); } @@ -72,8 +72,8 @@ uint KisTIFFYCbCrReaderTarget8Bit::copyDataToChannels( Q_UINT32 x, Q_UINT32 y, Q } it.nextRow(); } - m_bufferCb[ buffPos ] = (Q_UINT8)(tiffstream->nextValue() * coeff); - m_bufferCr[ buffPos ] = (Q_UINT8)(tiffstream->nextValue() * coeff); + m_bufferCb[ buffPos ] = (TQ_UINT8)(tiffstream->nextValue() * coeff); + m_bufferCr[ buffPos ] = (TQ_UINT8)(tiffstream->nextValue() * coeff); buffPos ++; } return m_vsub; @@ -87,7 +87,7 @@ void KisTIFFYCbCrReaderTarget8Bit::finalize() int x = 0; while(!it.isDone()) { - Q_UINT8 *d = it.rawData(); + TQ_UINT8 *d = it.rawData(); int index = x/m_hsub + y/m_vsub * m_bufferWidth; d[1] = m_bufferCb[ index ]; d[2] = m_bufferCr[ index ]; @@ -97,17 +97,17 @@ void KisTIFFYCbCrReaderTarget8Bit::finalize() } } -KisTIFFYCbCrReaderTarget16Bit::KisTIFFYCbCrReaderTarget16Bit( KisPaintDeviceSP device, Q_UINT8* poses, int8 alphapos, uint8 sourceDepth, uint8 nbcolorssamples, uint8 extrasamplescount, cmsHTRANSFORM transformProfile, KisTIFFPostProcessor* postprocessor, uint16 hsub, uint16 vsub, KisTIFFYCbCr::Position position ) : KisTIFFReaderBase(device, poses, alphapos, sourceDepth, nbcolorssamples, extrasamplescount, transformProfile, postprocessor), m_hsub(hsub), m_vsub(vsub), m_position(position) +KisTIFFYCbCrReaderTarget16Bit::KisTIFFYCbCrReaderTarget16Bit( KisPaintDeviceSP device, TQ_UINT8* poses, int8 alphapos, uint8 sourceDepth, uint8 nbcolorssamples, uint8 extrasamplescount, cmsHTRANSFORM transformProfile, KisTIFFPostProcessor* postprocessor, uint16 hsub, uint16 vsub, KisTIFFYCbCr::Position position ) : KisTIFFReaderBase(device, poses, alphapos, sourceDepth, nbcolorssamples, extrasamplescount, transformProfile, postprocessor), m_hsub(hsub), m_vsub(vsub), m_position(position) { // Initialize the buffer - Q_INT32 imagewidth = device->image()->width(); + TQ_INT32 imagewidth = device->image()->width(); if(2*(imagewidth / 2) != imagewidth) imagewidth++; m_bufferWidth = imagewidth / m_hsub; - Q_INT32 imageheight = device->image()->height(); + TQ_INT32 imageheight = device->image()->height(); if(2*(imageheight / 2) != imageheight) imageheight++; m_bufferHeight = imageheight / m_vsub; - m_bufferCb = new Q_UINT16[ m_bufferWidth * m_bufferHeight ]; - m_bufferCr = new Q_UINT16[ m_bufferWidth * m_bufferHeight ]; + m_bufferCb = new TQ_UINT16[ m_bufferWidth * m_bufferHeight ]; + m_bufferCr = new TQ_UINT16[ m_bufferWidth * m_bufferHeight ]; } KisTIFFYCbCrReaderTarget16Bit::~KisTIFFYCbCrReaderTarget16Bit() @@ -116,10 +116,10 @@ KisTIFFYCbCrReaderTarget16Bit::~KisTIFFYCbCrReaderTarget16Bit() delete[] m_bufferCr; } -uint KisTIFFYCbCrReaderTarget16Bit::copyDataToChannels( Q_UINT32 x, Q_UINT32 y, Q_UINT32 dataWidth, TIFFStreamBase* tiffstream) +uint KisTIFFYCbCrReaderTarget16Bit::copyDataToChannels( TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 dataWidth, TIFFStreamBase* tiffstream) { int numcols = dataWidth / m_hsub; - double coeff = Q_UINT16_MAX / (double)( pow(2, sourceDepth() ) - 1 ); + double coeff = TQ_UINT16_MAX / (double)( pow(2, sourceDepth() ) - 1 ); // kdDebug(41008) << " depth expension coefficient : " << coeff << endl; // kdDebug(41008) << " y = " << y << endl; uint buffPos = y / m_vsub * m_bufferWidth + x / m_hsub ; @@ -130,13 +130,13 @@ uint KisTIFFYCbCrReaderTarget16Bit::copyDataToChannels( Q_UINT32 x, Q_UINT32 y, { while( !it.isDone() ) { - Q_UINT16 *d = reinterpret_cast<Q_UINT16 *>(it.rawData()); - d[0] = (Q_UINT16)( tiffstream->nextValue() * coeff ); - d[3] = Q_UINT16_MAX; + TQ_UINT16 *d = reinterpret_cast<TQ_UINT16 *>(it.rawData()); + d[0] = (TQ_UINT16)( tiffstream->nextValue() * coeff ); + d[3] = TQ_UINT16_MAX; for(int k = 0; k < nbExtraSamples(); k++) { if(k == alphaPos()) - d[3] = (Q_UINT32) ( tiffstream->nextValue() * coeff ); + d[3] = (TQ_UINT32) ( tiffstream->nextValue() * coeff ); else tiffstream->nextValue(); } @@ -144,8 +144,8 @@ uint KisTIFFYCbCrReaderTarget16Bit::copyDataToChannels( Q_UINT32 x, Q_UINT32 y, } it.nextRow(); } - m_bufferCb[ buffPos ] = (Q_UINT16)(tiffstream->nextValue() * coeff); - m_bufferCr[ buffPos ] = (Q_UINT16)(tiffstream->nextValue() * coeff); + m_bufferCb[ buffPos ] = (TQ_UINT16)(tiffstream->nextValue() * coeff); + m_bufferCr[ buffPos ] = (TQ_UINT16)(tiffstream->nextValue() * coeff); buffPos ++; } return m_vsub; @@ -159,7 +159,7 @@ void KisTIFFYCbCrReaderTarget16Bit::finalize() int x = 0; while(!it.isDone()) { - Q_UINT16 *d = reinterpret_cast<Q_UINT16 *>(it.rawData()); + TQ_UINT16 *d = reinterpret_cast<TQ_UINT16 *>(it.rawData()); int index = x/m_hsub + y/m_vsub * m_bufferWidth; d[1] = m_bufferCb[ index ]; d[2] = m_bufferCr[ index ]; diff --git a/filters/krita/tiff/kis_tiff_ycbcr_reader.h b/filters/krita/tiff/kis_tiff_ycbcr_reader.h index b640228c..e81e8893 100644 --- a/filters/krita/tiff/kis_tiff_ycbcr_reader.h +++ b/filters/krita/tiff/kis_tiff_ycbcr_reader.h @@ -35,14 +35,14 @@ class KisTIFFYCbCrReaderTarget8Bit : public KisTIFFReaderBase { * @param hsub horizontal subsampling of Cb and Cr * @param hsub vertical subsampling of Cb and Cr */ - KisTIFFYCbCrReaderTarget8Bit( KisPaintDeviceSP device, Q_UINT8* poses, int8 alphapos, uint8 sourceDepth, uint8 nbcolorssamples, uint8 extrasamplescount, cmsHTRANSFORM transformProfile, KisTIFFPostProcessor* postprocessor, uint16 hsub, uint16 vsub, KisTIFFYCbCr::Position position ); + KisTIFFYCbCrReaderTarget8Bit( KisPaintDeviceSP device, TQ_UINT8* poses, int8 alphapos, uint8 sourceDepth, uint8 nbcolorssamples, uint8 extrasamplescount, cmsHTRANSFORM transformProfile, KisTIFFPostProcessor* postprocessor, uint16 hsub, uint16 vsub, KisTIFFYCbCr::Position position ); ~KisTIFFYCbCrReaderTarget8Bit(); - virtual uint copyDataToChannels( Q_UINT32 x, Q_UINT32 y, Q_UINT32 dataWidth, TIFFStreamBase* tiffstream); + virtual uint copyDataToChannels( TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 dataWidth, TIFFStreamBase* tiffstream); virtual void finalize(); private: - Q_UINT8* m_bufferCb; - Q_UINT8* m_bufferCr; - Q_UINT32 m_bufferWidth, m_bufferHeight; + TQ_UINT8* m_bufferCb; + TQ_UINT8* m_bufferCr; + TQ_UINT32 m_bufferWidth, m_bufferHeight; uint16 m_hsub; uint16 m_vsub; KisTIFFYCbCr::Position m_position; @@ -55,14 +55,14 @@ class KisTIFFYCbCrReaderTarget16Bit : public KisTIFFReaderBase { * @param hsub horizontal subsampling of Cb and Cr * @param hsub vertical subsampling of Cb and Cr */ - KisTIFFYCbCrReaderTarget16Bit( KisPaintDeviceSP device, Q_UINT8* poses, int8 alphapos, uint8 sourceDepth, uint8 nbcolorssamples, uint8 extrasamplescount, cmsHTRANSFORM transformProfile, KisTIFFPostProcessor* postprocessor, uint16 hsub, uint16 vsub, KisTIFFYCbCr::Position position ); + KisTIFFYCbCrReaderTarget16Bit( KisPaintDeviceSP device, TQ_UINT8* poses, int8 alphapos, uint8 sourceDepth, uint8 nbcolorssamples, uint8 extrasamplescount, cmsHTRANSFORM transformProfile, KisTIFFPostProcessor* postprocessor, uint16 hsub, uint16 vsub, KisTIFFYCbCr::Position position ); ~KisTIFFYCbCrReaderTarget16Bit(); - virtual uint copyDataToChannels( Q_UINT32 x, Q_UINT32 y, Q_UINT32 dataWidth, TIFFStreamBase* tiffstream); + virtual uint copyDataToChannels( TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 dataWidth, TIFFStreamBase* tiffstream); virtual void finalize(); private: - Q_UINT16* m_bufferCb; - Q_UINT16* m_bufferCr; - Q_UINT32 m_bufferWidth, m_bufferHeight; + TQ_UINT16* m_bufferCb; + TQ_UINT16* m_bufferCr; + TQ_UINT32 m_bufferWidth, m_bufferHeight; uint16 m_hsub; uint16 m_vsub; KisTIFFYCbCr::Position m_position; diff --git a/filters/krita/tiff/kis_wdg_options_tiff.ui b/filters/krita/tiff/kis_wdg_options_tiff.ui index 2e1f1c80..3ffc1bd4 100644 --- a/filters/krita/tiff/kis_wdg_options_tiff.ui +++ b/filters/krita/tiff/kis_wdg_options_tiff.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KisWdgOptionsTIFF</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KisWdgOptionsTIFF</cstring> </property> @@ -30,7 +30,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -49,15 +49,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout10</cstring> + <cstring>tqlayout10</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -117,15 +117,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout7</cstring> + <cstring>tqlayout7</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_3</cstring> </property> @@ -146,7 +146,7 @@ </item> <item> <property name="text"> - <string>Floating Point Horizontal Differencing</string> + <string>Floating PointQt::Horizontal Differencing</string> </property> </item> <property name="name"> @@ -161,7 +161,7 @@ </widget> </hbox> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>alpha</cstring> </property> @@ -179,7 +179,7 @@ You can uncheck the box if you are not using transparancy and you want to make the resulting file smaller .<br>Always saving the alpha channel is recommended.</p></string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>flatten</cstring> </property> @@ -203,14 +203,14 @@ You can uncheck the box if you are not using transparancy and you want to make t </widget> </vbox> </widget> - <widget class="QWidgetStack"> + <widget class="TQWidgetStack"> <property name="name"> <cstring>codecsOptionsStack</cstring> </property> <property name="frameShape"> <enum>NoFrame</enum> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -227,7 +227,7 @@ You can uncheck the box if you are not using transparancy and you want to make t <property name="spacing"> <number>0</number> </property> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>frame4</cstring> </property> @@ -240,7 +240,7 @@ You can uncheck the box if you are not using transparancy and you want to make t </widget> </hbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -257,7 +257,7 @@ You can uncheck the box if you are not using transparancy and you want to make t <property name="spacing"> <number>0</number> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBoxJPEG</cstring> </property> @@ -276,26 +276,26 @@ You can uncheck the box if you are not using transparancy and you want to make t <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_2</cstring> </property> <property name="text"> <string>Quality:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop</set> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QSlider"> + <widget class="TQSlider"> <property name="name"> <cstring>qualityLevel</cstring> </property> @@ -327,15 +327,15 @@ You can uncheck the box if you are not using transparancy and you want to make t <string>These settings determine how much information is lost during compression</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4_2</cstring> + <cstring>tqlayout4_2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -343,14 +343,14 @@ You can uncheck the box if you are not using transparancy and you want to make t <string>Smallest</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel4</cstring> </property> <property name="text"> <string>Best</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -362,7 +362,7 @@ You can uncheck the box if you are not using transparancy and you want to make t </widget> </hbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -379,7 +379,7 @@ You can uncheck the box if you are not using transparancy and you want to make t <property name="spacing"> <number>0</number> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBoxDeflate</cstring> </property> @@ -398,14 +398,14 @@ You can uncheck the box if you are not using transparancy and you want to make t <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_4</cstring> </property> <property name="text"> <string>Compress:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop</set> </property> <property name="toolTip" stdset="0"> @@ -416,15 +416,15 @@ You can uncheck the box if you are not using transparancy and you want to make t <br>Note: the compression level does not change the quality of the result.</p></string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5_2</cstring> + <cstring>tqlayout5_2</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QSlider"> + <widget class="TQSlider"> <property name="name"> <cstring>compressionLevelDeflate</cstring> </property> @@ -454,15 +454,15 @@ You can uncheck the box if you are not using transparancy and you want to make t <br>Note: the compression level doesn't change the quality of the result.</p></string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel3_2</cstring> </property> @@ -474,14 +474,14 @@ You can uncheck the box if you are not using transparancy and you want to make t <br>Note: the compression level doesn't change the quality of the result.</p></string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel4_2</cstring> </property> <property name="text"> <string>Small</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="whatsThis" stdset="0"> @@ -497,7 +497,7 @@ You can uncheck the box if you are not using transparancy and you want to make t </widget> </hbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -514,7 +514,7 @@ You can uncheck the box if you are not using transparancy and you want to make t <property name="spacing"> <number>0</number> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBoxCCITGroupCCITG3</cstring> </property> @@ -533,7 +533,7 @@ You can uncheck the box if you are not using transparancy and you want to make t <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -565,7 +565,7 @@ You can uncheck the box if you are not using transparancy and you want to make t </widget> </hbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -582,7 +582,7 @@ You can uncheck the box if you are not using transparancy and you want to make t <property name="spacing"> <number>0</number> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBoxPixarLog</cstring> </property> @@ -601,14 +601,14 @@ You can uncheck the box if you are not using transparancy and you want to make t <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_4_2</cstring> </property> <property name="text"> <string>Compress:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop</set> </property> <property name="toolTip" stdset="0"> @@ -619,15 +619,15 @@ You can uncheck the box if you are not using transparancy and you want to make t <br>Note: the compression level does not change the quality of the result.</p></string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5_2_2</cstring> + <cstring>tqlayout5_2_2</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QSlider"> + <widget class="TQSlider"> <property name="name"> <cstring>compressionLevelPixarLog</cstring> </property> @@ -657,15 +657,15 @@ You can uncheck the box if you are not using transparancy and you want to make t <br>Note: the compression level doesn't change the quality of the result.</p></string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4_3</cstring> + <cstring>tqlayout4_3</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel3_2_2</cstring> </property> @@ -677,14 +677,14 @@ You can uncheck the box if you are not using transparancy and you want to make t <br>Note: the compression level doesn't change the quality of the result.</p></string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel4_2_2</cstring> </property> <property name="text"> <string>Small</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="whatsThis" stdset="0"> @@ -711,7 +711,7 @@ You can uncheck the box if you are not using transparancy and you want to make t <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> @@ -732,7 +732,7 @@ You can uncheck the box if you are not using transparancy and you want to make t <tabstop>kComboBoxFaxMode</tabstop> <tabstop>compressionLevelPixarLog</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kcombobox.h</includehint> <includehint>kcombobox.h</includehint> diff --git a/filters/krita/tiff/kis_ycbcr_colorspace.h b/filters/krita/tiff/kis_ycbcr_colorspace.h index 0b4ece87..05220127 100644 --- a/filters/krita/tiff/kis_ycbcr_colorspace.h +++ b/filters/krita/tiff/kis_ycbcr_colorspace.h @@ -20,8 +20,8 @@ #ifndef KIS_YCBCR_COLORSPACE_H #define KIS_YCBCR_COLORSPACE_H namespace { - const Q_INT32 MAX_CHANNEL_YCbCr = 3; - const Q_INT32 MAX_CHANNEL_YCbCrA = 4; + const TQ_INT32 MAX_CHANNEL_YCbCr = 3; + const TQ_INT32 MAX_CHANNEL_YCbCrA = 4; } #endif diff --git a/filters/krita/xcf/xcf/xcf-load.cc b/filters/krita/xcf/xcf/xcf-load.cc index dded6883..07b6a145 100644 --- a/filters/krita/xcf/xcf/xcf-load.cc +++ b/filters/krita/xcf/xcf/xcf-load.cc @@ -43,7 +43,7 @@ //#include "core/gimpimage-guides.h" //#include "core/gimplayer.h" //#include "core/gimplayer-floating-sel.h" -//#include "core/gimplayermask.h" +//#include "core/gimplayertqmask.h" //#include "core/gimpparasitelist.h" //#include "core/gimpselection.h" //#include "core/gimptemplate.h" @@ -69,25 +69,25 @@ static bool xcf_load_image_props (XcfInfo * info, KisImage * gimage); static bool xcf_load_layer_props (XcfInfo * info, KisImage * gimage, KisLayer * layer, - bool * apply_mask, - bool * edit_mask, - bool * show_mask, - Q_INT32 * text_layer_flags); + bool * apply_tqmask, + bool * edit_tqmask, + bool * show_tqmask, + TQ_INT32 * text_layer_flags); static bool xcf_load_channel_props (XcfInfo * info, KisImage * gimage, GimpChannel ** channel); static bool xcf_load_prop (XcfInfo * info, - PropType * prop_type, Q_INT32 * prop_size); + PropType * prop_type, TQ_INT32 * prop_size); static KisLayer *xcf_load_layer (XcfInfo * info, KisImage * gimage); //static GimpChannel * xcf_load_channel (XcfInfo *info, // KisImage *gimage); -//static GimpLayerMask * xcf_load_layer_mask (XcfInfo *info, +//static GimpLayerMask * xcf_load_layer_tqmask (XcfInfo *info, // KisImage *gimage); static bool xcf_load_hierarchy (XcfInfo * info, TileManager * tiles); static bool xcf_load_level (XcfInfo * info, TileManager * tiles); static bool xcf_load_tile (XcfInfo * info, Tile * tile); static bool xcf_load_tile_rle (XcfInfo * info, - Tile * tile, Q_INT32 data_length); + Tile * tile, TQ_INT32 data_length); //static GimpParasite * xcf_load_parasite (XcfInfo *info); static bool xcf_load_old_paths (XcfInfo * info, KisImage * gimage); static bool xcf_load_old_path (XcfInfo * info, KisImage * gimage); @@ -95,8 +95,8 @@ static bool xcf_load_vectors (XcfInfo * info, KisImage * gimage); static bool xcf_load_vector (XcfInfo * info, KisImage * gimage); #ifdef SWAP_FROM_FILE -static bool xcf_swap_func (Q_INT32 fd, - Tile * tile, Q_INT32 cmd, gpointer user_data); +static bool xcf_swap_func (TQ_INT32 fd, + Tile * tile, TQ_INT32 cmd, gpointer user_data); #endif @@ -107,17 +107,17 @@ xcf_load_image (XcfInfo * info) KisLayer *layer; //GimpChannel *channel; //KisAnnotation *parasite; - Q_INT32 saved_pos; - Q_INT32 offset; - Q_INT32 width; - Q_INT32 height; - Q_INT32 image_type; - Q_INT32 num_successful_elements = 0; + TQ_INT32 saved_pos; + TQ_INT32 offset; + TQ_INT32 width; + TQ_INT32 height; + TQ_INT32 image_type; + TQ_INT32 num_successful_elements = 0; /* read in the image width, height and type */ - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & width, 1); - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & height, 1); - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & image_type, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & width, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & height, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & image_type, 1); gimage = gimp_create_image (gimp, width, height, image_type, FALSE); @@ -128,7 +128,7 @@ xcf_load_image (XcfInfo * info) goto hard_error; /* check for a GimpGrid parasite */ - parasite = gimp_image_parasite_find (GIMP_IMAGE (gimage), + parasite = gimp_image_parasite_tqfind (GIMP_IMAGE (gimage), gimp_grid_parasite_name ()); if (parasite) { @@ -173,7 +173,7 @@ xcf_load_image (XcfInfo * info) /* add the layer to the image if its not the floating selection */ if (layer != info->floating_sel) gimp_image_add_layer (gimage, layer, - gimp_container_num_children (gimage->layers)); + gimp_container_num_tqchildren (gimage->layers)); /* restore the saved position so we'll be ready to * read the next offset. @@ -210,7 +210,7 @@ xcf_load_image (XcfInfo * info) num_successful_elements++; /* add the channel to the image if its not the selection */ - if (channel != gimage->selection_mask) + if (channel != gimage->selection_tqmask) gimp_image_add_channel (gimage, channel, -1); /* restore the saved position so we'll be ready to @@ -262,7 +262,7 @@ static bool xcf_load_image_props (XcfInfo * info, KisImage * gimage) { PropType prop_type; - Q_INT32 prop_size; + TQ_INT32 prop_size; while (TRUE) { @@ -277,13 +277,13 @@ xcf_load_image_props (XcfInfo * info, KisImage * gimage) case PROP_COLORMAP: if (info->file_version == 0) { - Q_INT32 i; + TQ_INT32 i; g_message (_("XCF warning: version 0 of XCF file format\n" "did not save indexed colormaps correctly.\n" "Substituting grayscale map.")); info->cp += - xcf_read_int32 (info->fp, (Q_INT32 *) & gimage->num_cols, 1); + xcf_read_int32 (info->fp, (TQ_INT32 *) & gimage->num_cols, 1); gimage->cmap = g_new (guchar, gimage->num_cols * 3); if (!xcf_seek_pos (info, info->cp + gimage->num_cols, NULL)) return FALSE; @@ -298,11 +298,11 @@ xcf_load_image_props (XcfInfo * info, KisImage * gimage) else { info->cp += - xcf_read_int32 (info->fp, (Q_INT32 *) & gimage->num_cols, 1); + xcf_read_int32 (info->fp, (TQ_INT32 *) & gimage->num_cols, 1); gimage->cmap = g_new (guchar, gimage->num_cols * 3); info->cp += xcf_read_int8 (info->fp, - (Q_UINT8 *) gimage->cmap, + (TQ_UINT8 *) gimage->cmap, gimage->num_cols * 3); } @@ -320,10 +320,10 @@ xcf_load_image_props (XcfInfo * info, KisImage * gimage) case PROP_COMPRESSION: { - Q_UINT8 compression; + TQ_UINT8 compression; info->cp += - xcf_read_int8 (info->fp, (Q_UINT8 *) & compression, 1); + xcf_read_int8 (info->fp, (TQ_UINT8 *) & compression, 1); if ((compression != COMPRESS_NONE) && (compression != COMPRESS_RLE) && @@ -340,17 +340,17 @@ xcf_load_image_props (XcfInfo * info, KisImage * gimage) case PROP_GUIDES: { - Q_INT3232 position; - Q_INT328 orientation; - Q_INT32 i, nguides; + TQ_INT3232 position; + TQ_INT328 orientation; + TQ_INT32 i, nguides; nguides = prop_size / (4 + 1); for (i = 0; i < nguides; i++) { info->cp += - xcf_read_int32 (info->fp, (Q_INT32 *) & position, 1); + xcf_read_int32 (info->fp, (TQ_INT32 *) & position, 1); info->cp += - xcf_read_int8 (info->fp, (Q_UINT8 *) & orientation, 1); + xcf_read_int8 (info->fp, (TQ_UINT8 *) & orientation, 1); /* skip -1 guides from old XCFs */ if (position < 0) @@ -422,7 +422,7 @@ xcf_load_image_props (XcfInfo * info, KisImage * gimage) case PROP_UNIT: { - Q_INT32 unit; + TQ_INT32 unit; info->cp += xcf_read_int32 (info->fp, &unit, 1); @@ -445,12 +445,12 @@ xcf_load_image_props (XcfInfo * info, KisImage * gimage) case PROP_USER_UNIT: { - QCString *unit_strings[5]; + TQCString *unit_strings[5]; float factor; - Q_INT32 digits; + TQ_INT32 digits; GimpUnit unit; - Q_INT32 num_units; - Q_INT32 i; + TQ_INT32 num_units; + TQ_INT32 i; info->cp += xcf_read_float (info->fp, &factor, 1); info->cp += xcf_read_int32 (info->fp, &digits, 1); @@ -498,7 +498,7 @@ xcf_load_image_props (XcfInfo * info, KisImage * gimage) case PROP_VECTORS: { - Q_INT32 base = info->cp; + TQ_INT32 base = info->cp; if (xcf_load_vectors (info, gimage)) { @@ -526,8 +526,8 @@ xcf_load_image_props (XcfInfo * info, KisImage * gimage) prop_type); #endif { - Q_UINT8 buf[16]; - Q_UINT32 amount; + TQ_UINT8 buf[16]; + TQ_UINT32 amount; while (prop_size > 0) { @@ -547,12 +547,12 @@ static bool xcf_load_layer_props (XcfInfo * info, KisImage * gimage, KisLayer * layer, - bool * apply_mask, - bool * edit_mask, - bool * show_mask, Q_INT32 * text_layer_flags) + bool * apply_tqmask, + bool * edit_tqmask, + bool * show_tqmask, TQ_INT32 * text_layer_flags) { PropType prop_type; - Q_INT32 prop_size; + TQ_INT32 prop_size; while (TRUE) { @@ -572,12 +572,12 @@ xcf_load_layer_props (XcfInfo * info, info->floating_sel = layer; info->cp += xcf_read_int32 (info->fp, - (Q_INT32 *) & info->floating_sel_offset, 1); + (TQ_INT32 *) & info->floating_sel_offset, 1); break; case PROP_OPACITY: { - Q_INT32 opacity; + TQ_INT32 opacity; info->cp += xcf_read_int32 (info->fp, &opacity, 1); layer->opacity = CLAMP ((gdouble) opacity / 255.0, @@ -590,7 +590,7 @@ xcf_load_layer_props (XcfInfo * info, { bool visible; - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & visible, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & visible, 1); gimp_item_set_visible (GIMP_ITEM (layer), visible ? TRUE : FALSE, FALSE); } @@ -600,7 +600,7 @@ xcf_load_layer_props (XcfInfo * info, { bool linked; - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & linked, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & linked, 1); gimp_item_set_linked (GIMP_ITEM (layer), linked ? TRUE : FALSE, FALSE); } @@ -608,37 +608,37 @@ xcf_load_layer_props (XcfInfo * info, case PROP_LOCK_ALPHA: info->cp += - xcf_read_int32 (info->fp, (Q_INT32 *) & layer->lock_alpha, 1); + xcf_read_int32 (info->fp, (TQ_INT32 *) & layer->lock_alpha, 1); break; case PROP_APPLY_MASK: - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) apply_mask, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) apply_tqmask, 1); break; case PROP_EDIT_MASK: - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) edit_mask, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) edit_tqmask, 1); break; case PROP_SHOW_MASK: - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) show_mask, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) show_tqmask, 1); break; case PROP_OFFSETS: info->cp += xcf_read_int32 (info->fp, - (Q_INT32 *) & GIMP_ITEM (layer)->offset_x, 1); + (TQ_INT32 *) & GIMP_ITEM (layer)->offset_x, 1); info->cp += xcf_read_int32 (info->fp, - (Q_INT32 *) & GIMP_ITEM (layer)->offset_y, 1); + (TQ_INT32 *) & GIMP_ITEM (layer)->offset_y, 1); break; case PROP_MODE: - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & layer->mode, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & layer->mode, 1); break; case PROP_TATTOO: info->cp += xcf_read_int32 (info->fp, - (Q_INT32 *) & GIMP_ITEM (layer)->tattoo, + (TQ_INT32 *) & GIMP_ITEM (layer)->tattoo, 1); break; @@ -664,8 +664,8 @@ xcf_load_layer_props (XcfInfo * info, default: { - Q_UINT8 buf[16]; - Q_UINT32 amount; + TQ_UINT8 buf[16]; + TQ_UINT32 amount; #ifdef GIMP_UNSTABLE g_printerr ("unexpected/unknown layer property: %d (skipping)", @@ -690,7 +690,7 @@ xcf_load_channel_props (XcfInfo * info, KisImage * gimage, GimpChannel ** channel) { PropType prop_type; - Q_INT32 prop_size; + TQ_INT32 prop_size; while (TRUE) { @@ -707,27 +707,27 @@ xcf_load_channel_props (XcfInfo * info, break; case PROP_SELECTION: - g_object_unref (gimage->selection_mask); - gimage->selection_mask = + g_object_unref (gimage->selection_tqmask); + gimage->selection_tqmask = gimp_selection_new (gimage, gimp_item_width (GIMP_ITEM (*channel)), gimp_item_height (GIMP_ITEM (*channel))); - g_object_ref (gimage->selection_mask); - gimp_item_sink (GIMP_ITEM (gimage->selection_mask)); + g_object_ref (gimage->selection_tqmask); + gimp_item_sink (GIMP_ITEM (gimage->selection_tqmask)); - tile_manager_unref (GIMP_DRAWABLE (gimage->selection_mask)->tiles); - GIMP_DRAWABLE (gimage->selection_mask)->tiles = + tile_manager_unref (GIMP_DRAWABLE (gimage->selection_tqmask)->tiles); + GIMP_DRAWABLE (gimage->selection_tqmask)->tiles = GIMP_DRAWABLE (*channel)->tiles; GIMP_DRAWABLE (*channel)->tiles = NULL; g_object_unref (*channel); - *channel = gimage->selection_mask; + *channel = gimage->selection_tqmask; (*channel)->boundary_known = FALSE; (*channel)->bounds_known = FALSE; break; case PROP_OPACITY: { - Q_INT32 opacity; + TQ_INT32 opacity; info->cp += xcf_read_int32 (info->fp, &opacity, 1); (*channel)->color.a = opacity / 255.0; @@ -738,7 +738,7 @@ xcf_load_channel_props (XcfInfo * info, { bool visible; - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & visible, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & visible, 1); gimp_item_set_visible (GIMP_ITEM (*channel), visible ? TRUE : FALSE, FALSE); } @@ -748,7 +748,7 @@ xcf_load_channel_props (XcfInfo * info, { bool linked; - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & linked, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & linked, 1); gimp_item_set_linked (GIMP_ITEM (*channel), linked ? TRUE : FALSE, FALSE); } @@ -756,11 +756,11 @@ xcf_load_channel_props (XcfInfo * info, case PROP_SHOW_MASKED: { - bool show_masked; + bool show_tqmasked; info->cp += - xcf_read_int32 (info->fp, (Q_INT32 *) & show_masked, 1); - gimp_channel_set_show_masked (*channel, show_masked); + xcf_read_int32 (info->fp, (TQ_INT32 *) & show_tqmasked, 1); + gimp_channel_set_show_tqmasked (*channel, show_tqmasked); } break; @@ -768,7 +768,7 @@ xcf_load_channel_props (XcfInfo * info, { guchar col[3]; - info->cp += xcf_read_int8 (info->fp, (Q_UINT8 *) col, 3); + info->cp += xcf_read_int8 (info->fp, (TQ_UINT8 *) col, 3); gimp_rgb_set_uchar (&(*channel)->color, col[0], col[1], col[2]); } @@ -802,8 +802,8 @@ xcf_load_channel_props (XcfInfo * info, #endif { - Q_UINT8 buf[16]; - Q_UINT32 amount; + TQ_UINT8 buf[16]; + TQ_UINT32 amount; while (prop_size > 0) { @@ -820,10 +820,10 @@ xcf_load_channel_props (XcfInfo * info, } static bool -xcf_load_prop (XcfInfo * info, PropType * prop_type, Q_INT32 * prop_size) +xcf_load_prop (XcfInfo * info, PropType * prop_type, TQ_INT32 * prop_size) { - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) prop_type, 1); - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) prop_size, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) prop_type, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) prop_size, 1); return TRUE; } @@ -831,20 +831,20 @@ static KisLayer * xcf_load_layer (XcfInfo * info, KisImage * gimage) { KisLayer *layer; - GimpLayerMask *layer_mask; - Q_INT32 hierarchy_offset; - Q_INT32 layer_mask_offset; - bool apply_mask = TRUE; - bool edit_mask = FALSE; - bool show_mask = FALSE; + GimpLayerMask *layer_tqmask; + TQ_INT32 hierarchy_offset; + TQ_INT32 layer_tqmask_offset; + bool apply_tqmask = TRUE; + bool edit_tqmask = FALSE; + bool show_tqmask = FALSE; bool active; bool floating; - Q_INT32 text_layer_flags = 0; - Q_INT32 width; - Q_INT32 height; - Q_INT32 type; + TQ_INT32 text_layer_flags = 0; + TQ_INT32 width; + TQ_INT32 height; + TQ_INT32 type; bool is_fs_drawable; - QCString *name; + TQCString *name; /* check and see if this is the drawable the floating selection * is attached to. if it is then we'll do the attachment in our caller. @@ -852,9 +852,9 @@ xcf_load_layer (XcfInfo * info, KisImage * gimage) is_fs_drawable = (info->cp == info->floating_sel_offset); /* read in the layer width, height, type and name */ - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & width, 1); - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & height, 1); - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & type, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & width, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & height, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & type, 1); info->cp += xcf_read_string (info->fp, &name, 1); /* create a new layer */ @@ -866,7 +866,7 @@ xcf_load_layer (XcfInfo * info, KisImage * gimage) /* read in the layer properties */ if (!xcf_load_layer_props (info, gimage, layer, - &apply_mask, &edit_mask, &show_mask, + &apply_tqmask, &edit_tqmask, &show_tqmask, &text_layer_flags)) goto error; @@ -885,9 +885,9 @@ xcf_load_layer (XcfInfo * info, KisImage * gimage) info->floating_sel = layer; } - /* read the hierarchy and layer mask offsets */ + /* read the hierarchy and layer tqmask offsets */ info->cp += xcf_read_int32 (info->fp, &hierarchy_offset, 1); - info->cp += xcf_read_int32 (info->fp, &layer_mask_offset, 1); + info->cp += xcf_read_int32 (info->fp, &layer_tqmask_offset, 1); /* read in the hierarchy */ if (!xcf_seek_pos (info, hierarchy_offset, NULL)) @@ -896,21 +896,21 @@ xcf_load_layer (XcfInfo * info, KisImage * gimage) if (!xcf_load_hierarchy (info, GIMP_DRAWABLE (layer)->tiles)) goto error; - /* read in the layer mask */ - if (layer_mask_offset != 0) + /* read in the layer tqmask */ + if (layer_tqmask_offset != 0) { - if (!xcf_seek_pos (info, layer_mask_offset, NULL)) + if (!xcf_seek_pos (info, layer_tqmask_offset, NULL)) goto error; - layer_mask = xcf_load_layer_mask (info, gimage); - if (!layer_mask) + layer_tqmask = xcf_load_layer_tqmask (info, gimage); + if (!layer_tqmask) goto error; - layer_mask->apply_mask = apply_mask; - layer_mask->edit_mask = edit_mask; - layer_mask->show_mask = show_mask; + layer_tqmask->apply_tqmask = apply_tqmask; + layer_tqmask->edit_tqmask = edit_tqmask; + layer_tqmask->show_tqmask = show_tqmask; - gimp_layer_add_mask (layer, layer_mask, FALSE); + gimp_layer_add_tqmask (layer, layer_tqmask, FALSE); } /* attach the floating selection... */ @@ -928,11 +928,11 @@ static GimpChannel * xcf_load_channel (XcfInfo * info, KisImage * gimage) { GimpChannel *channel; - Q_INT32 hierarchy_offset; - Q_INT32 width; - Q_INT32 height; + TQ_INT32 hierarchy_offset; + TQ_INT32 width; + TQ_INT32 height; bool is_fs_drawable; - QCString *name; + TQCString *name; GimpRGB color = { 0.0, 0.0, 0.0, GIMP_OPACITY_OPAQUE }; /* check and see if this is the drawable the floating selection @@ -941,8 +941,8 @@ xcf_load_channel (XcfInfo * info, KisImage * gimage) is_fs_drawable = (info->cp == info->floating_sel_offset); /* read in the layer width, height and name */ - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & width, 1); - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & height, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & width, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & height, 1); info->cp += xcf_read_string (info->fp, &name, 1); /* create a new channel */ @@ -955,7 +955,7 @@ xcf_load_channel (XcfInfo * info, KisImage * gimage) if (!xcf_load_channel_props (info, gimage, &channel)) goto error; - /* read the hierarchy and layer mask offsets */ + /* read the hierarchy and layer tqmask offsets */ info->cp += xcf_read_int32 (info->fp, &hierarchy_offset, 1); /* read in the hierarchy */ @@ -976,15 +976,15 @@ error: } static GimpLayerMask * -xcf_load_layer_mask (XcfInfo * info, KisImage * gimage) +xcf_load_layer_tqmask (XcfInfo * info, KisImage * gimage) { - GimpLayerMask *layer_mask; + GimpLayerMask *layer_tqmask; GimpChannel *channel; - Q_INT32 hierarchy_offset; - Q_INT32 width; - Q_INT32 height; + TQ_INT32 hierarchy_offset; + TQ_INT32 width; + TQ_INT32 height; bool is_fs_drawable; - QCString *name; + TQCString *name; GimpRGB color = { 0.0, 0.0, 0.0, GIMP_OPACITY_OPAQUE }; /* check and see if this is the drawable the floating selection @@ -993,55 +993,55 @@ xcf_load_layer_mask (XcfInfo * info, KisImage * gimage) is_fs_drawable = (info->cp == info->floating_sel_offset); /* read in the layer width, height and name */ - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & width, 1); - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & height, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & width, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & height, 1); info->cp += xcf_read_string (info->fp, &name, 1); - /* create a new layer mask */ - layer_mask = gimp_layer_mask_new (gimage, width, height, name, &color); + /* create a new layer tqmask */ + layer_tqmask = gimp_layer_tqmask_new (gimage, width, height, name, &color); g_free (name); - if (!layer_mask) + if (!layer_tqmask) return NULL; - /* read in the layer_mask properties */ - channel = GIMP_CHANNEL (layer_mask); + /* read in the layer_tqmask properties */ + channel = GIMP_CHANNEL (layer_tqmask); if (!xcf_load_channel_props (info, gimage, &channel)) goto error; - /* read the hierarchy and layer mask offsets */ + /* read the hierarchy and layer tqmask offsets */ info->cp += xcf_read_int32 (info->fp, &hierarchy_offset, 1); /* read in the hierarchy */ if (!xcf_seek_pos (info, hierarchy_offset, NULL)) goto error; - if (!xcf_load_hierarchy (info, GIMP_DRAWABLE (layer_mask)->tiles)) + if (!xcf_load_hierarchy (info, GIMP_DRAWABLE (layer_tqmask)->tiles)) goto error; /* attach the floating selection... */ if (is_fs_drawable) - info->floating_sel_drawable = GIMP_DRAWABLE (layer_mask); + info->floating_sel_drawable = GIMP_DRAWABLE (layer_tqmask); - return layer_mask; + return layer_tqmask; error: - g_object_unref (layer_mask); + g_object_unref (layer_tqmask); return NULL; } static bool xcf_load_hierarchy (XcfInfo * info, TileManager * tiles) { - Q_INT32 saved_pos; - Q_INT32 offset; - Q_INT32 junk; - Q_INT32 width; - Q_INT32 height; - Q_INT32 bpp; + TQ_INT32 saved_pos; + TQ_INT32 offset; + TQ_INT32 junk; + TQ_INT32 width; + TQ_INT32 height; + TQ_INT32 bpp; - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & width, 1); - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & height, 1); - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & bpp, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & width, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & height, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & bpp, 1); /* make sure the values in the file correspond to the values * calculated when the TileManager was created. @@ -1092,18 +1092,18 @@ xcf_load_hierarchy (XcfInfo * info, TileManager * tiles) static bool xcf_load_level (XcfInfo * info, TileManager * tiles) { - Q_INT32 saved_pos; - Q_INT32 offset, offset2; - Q_UINT32 ntiles; - Q_INT32 width; - Q_INT32 height; - Q_INT32 i; - Q_INT32 fail; + TQ_INT32 saved_pos; + TQ_INT32 offset, offset2; + TQ_UINT32 ntiles; + TQ_INT32 width; + TQ_INT32 height; + TQ_INT32 i; + TQ_INT32 fail; Tile *previous; Tile *tile; - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & width, 1); - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & height, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & width, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & height, 1); if (width != tile_manager_width (tiles) || height != tile_manager_height (tiles)) @@ -1252,12 +1252,12 @@ xcf_load_tile_rle (XcfInfo * info, Tile * tile, int data_length) { guchar *data; guchar val; - Q_INT32 size; - Q_INT32 count; - Q_INT32 length; - Q_INT32 bpp; - Q_INT32 i, j; - Q_INT32 nmemb_read_successfully; + TQ_INT32 size; + TQ_INT32 count; + TQ_INT32 length; + TQ_INT32 bpp; + TQ_INT32 i, j; + TQ_INT32 nmemb_read_successfully; guchar *xcfdata, *xcfodata, *xcfdatalimit; data = tile_data_pointer (tile, 0, 0); @@ -1267,7 +1267,7 @@ xcf_load_tile_rle (XcfInfo * info, Tile * tile, int data_length) /* we have to use fread instead of xcf_read_* because we may be reading past the end of the file here */ - nmemb_read_successfully = fread ((QCString *) xcfdata, sizeof (QCString), + nmemb_read_successfully = fread ((TQCString *) xcfdata, sizeof (TQCString), data_length, info->fp); info->cp += nmemb_read_successfully; @@ -1377,7 +1377,7 @@ xcf_load_parasite (XcfInfo * info) info->cp += xcf_read_string (info->fp, &p->name, 1); info->cp += xcf_read_int32 (info->fp, &p->flags, 1); info->cp += xcf_read_int32 (info->fp, &p->size, 1); - p->data = g_new (QCString, p->size); + p->data = g_new (TQCString, p->size); info->cp += xcf_read_int8 (info->fp, p->data, p->size); return p; @@ -1386,8 +1386,8 @@ xcf_load_parasite (XcfInfo * info) static bool xcf_load_old_paths (XcfInfo * info, KisImage * gimage) { - Q_INT32 num_paths; - Q_INT32 last_selected_row; + TQ_INT32 num_paths; + TQ_INT32 last_selected_row; GimpVectors *active_vectors; info->cp += xcf_read_int32 (info->fp, &last_selected_row, 1); @@ -1408,16 +1408,16 @@ xcf_load_old_paths (XcfInfo * info, KisImage * gimage) static bool xcf_load_old_path (XcfInfo * info, KisImage * gimage) { - QCString *name; - Q_INT32 locked; - Q_UINT8 state; - Q_INT32 closed; - Q_INT32 num_points; - Q_INT32 version; /* changed from num_paths */ + TQCString *name; + TQ_INT32 locked; + TQ_UINT8 state; + TQ_INT32 closed; + TQ_INT32 num_points; + TQ_INT32 version; /* changed from num_paths */ GimpTattoo tattoo = 0; GimpVectors *vectors; GimpVectorsCompatPoint *points; - Q_INT32 i; + TQ_INT32 i; info->cp += xcf_read_string (info->fp, &name, 1); info->cp += xcf_read_int32 (info->fp, &locked, 1); @@ -1428,18 +1428,18 @@ xcf_load_old_path (XcfInfo * info, KisImage * gimage) if (version == 2) { - Q_INT32 dummy; + TQ_INT32 dummy; /* Had extra type field and points are stored as doubles */ - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & dummy, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & dummy, 1); } else if (version == 3) { - Q_INT32 dummy; + TQ_INT32 dummy; /* Has extra tatto field */ - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & dummy, 1); - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & tattoo, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & dummy, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & tattoo, 1); } else if (version != 1) { @@ -1458,12 +1458,12 @@ xcf_load_old_path (XcfInfo * info, KisImage * gimage) { if (version == 1) { - Q_INT3232 x; - Q_INT3232 y; + TQ_INT3232 x; + TQ_INT3232 y; info->cp += xcf_read_int32 (info->fp, &points[i].type, 1); - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & x, 1); - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & y, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & x, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & y, 1); points[i].x = x; points[i].y = y; @@ -1494,7 +1494,7 @@ xcf_load_old_path (XcfInfo * info, KisImage * gimage) GIMP_ITEM (vectors)->tattoo = tattoo; gimp_image_add_vectors (gimage, vectors, - gimp_container_num_children (gimage->vectors)); + gimp_container_num_tqchildren (gimage->vectors)); return TRUE; } @@ -1502,11 +1502,11 @@ xcf_load_old_path (XcfInfo * info, KisImage * gimage) static bool xcf_load_vectors (XcfInfo * info, KisImage * gimage) { - Q_INT32 version; - Q_INT32 active_index; - Q_INT32 num_paths; + TQ_INT32 version; + TQ_INT32 active_index; + TQ_INT32 num_paths; GimpVectors *active_vectors; - Q_INT32 base; + TQ_INT32 base; #ifdef GIMP_XCF_PATH_DEBUG g_printerr ("xcf_load_vectors\n"); @@ -1548,14 +1548,14 @@ xcf_load_vectors (XcfInfo * info, KisImage * gimage) static bool xcf_load_vector (XcfInfo * info, KisImage * gimage) { - QCString *name; + TQCString *name; GimpTattoo tattoo = 0; - Q_INT32 visible; - Q_INT32 linked; - Q_INT32 num_parasites; - Q_INT32 num_strokes; + TQ_INT32 visible; + TQ_INT32 linked; + TQ_INT32 num_parasites; + TQ_INT32 num_strokes; GimpVectors *vectors; - Q_INT32 i; + TQ_INT32 i; #ifdef GIMP_XCF_PATH_DEBUG g_printerr ("xcf_load_vector\n"); @@ -1598,14 +1598,14 @@ xcf_load_vector (XcfInfo * info, KisImage * gimage) for (i = 0; i < num_strokes; i++) { - Q_INT32 stroke_type_id; - Q_INT32 closed; - Q_INT32 num_axes; - Q_INT32 num_control_points; - Q_INT32 type; + TQ_INT32 stroke_type_id; + TQ_INT32 closed; + TQ_INT32 num_axes; + TQ_INT32 num_control_points; + TQ_INT32 type; float coords[6] = { 0.0, 0.0, 1.0, 0.5, 0.5, 0.5 }; GimpStroke *stroke; - Q_INT32 j; + TQ_INT32 j; GValueArray *control_points; GValue value = { 0, }; @@ -1674,7 +1674,7 @@ xcf_load_vector (XcfInfo * info, KisImage * gimage) } gimp_image_add_vectors (gimage, vectors, - gimp_container_num_children (gimage->vectors)); + gimp_container_num_tqchildren (gimage->vectors)); return TRUE; } @@ -1682,12 +1682,12 @@ xcf_load_vector (XcfInfo * info, KisImage * gimage) #ifdef SWAP_FROM_FILE static bool -xcf_swap_func (Q_INT32 fd, Tile * tile, Q_INT32 cmd, gpointer user_data) +xcf_swap_func (TQ_INT32 fd, Tile * tile, TQ_INT32 cmd, gpointer user_data) { - Q_INT32 bytes; - Q_INT32 err; - Q_INT32 nleft; - Q_INT32 *ref_count; + TQ_INT32 bytes; + TQ_INT32 err; + TQ_INT32 nleft; + TQ_INT32 *ref_count; switch (cmd) { diff --git a/filters/krita/xcf/xcf/xcf-private.h b/filters/krita/xcf/xcf/xcf-private.h index d568f052..3a832fbd 100644 --- a/filters/krita/xcf/xcf/xcf-private.h +++ b/filters/krita/xcf/xcf/xcf-private.h @@ -19,7 +19,7 @@ #ifndef __XCF_PRIVATE_H__ #define __XCF_PRIVATE_H__ -#include <qcstring.h> +#include <tqcstring.h> typedef enum { @@ -64,7 +64,7 @@ typedef enum { XCF_ORIENTATION_HORIZONTAL = 1, XCF_ORIENTATION_VERTICAL = 2 -} XcfOrientationType; +} XcfQt::OrientationType; typedef enum { @@ -77,18 +77,18 @@ typedef struct _XcfInfo XcfInfo; struct _XcfInfo { FILE *fp; - Q_UINT32 cp; - const QCString filename; + TQ_UINT32 cp; + const TQCString filename; //GimpTattoo tattoo_state; KisLayer *active_layer; //GimpChannel *active_channel; //GimpDrawable *floating_sel_drawable; KisLayer *floating_sel; - Q_UINT32 floating_sel_offset; - Q_INT32 swap_num; - Q_INT32 *ref_count; + TQ_UINT32 floating_sel_offset; + TQ_INT32 swap_num; + TQ_INT32 *ref_count; XcfCompressionType compression; - Q_INT32 file_version; + TQ_INT32 file_version; }; diff --git a/filters/krita/xcf/xcf/xcf-read.cc b/filters/krita/xcf/xcf/xcf-read.cc index 04972294..314daa90 100644 --- a/filters/krita/xcf/xcf/xcf-read.cc +++ b/filters/krita/xcf/xcf/xcf-read.cc @@ -29,17 +29,17 @@ #include "gimp-intl.h" -Q_UINT32 +TQ_UINT32 xcf_read_int32 (FILE *fp, - Q_INT32 *data, - Q_INT32 count) + TQ_INT32 *data, + TQ_INT32 count) { - Q_UINT32 total; + TQ_UINT32 total; total = count; if (count > 0) { - xcf_read_int8 (fp, (Q_UINT8 *) data, count * 4); + xcf_read_int8 (fp, (TQ_UINT8 *) data, count * 4); while (count--) { @@ -51,21 +51,21 @@ xcf_read_int32 (FILE *fp, return total * 4; } -Q_UINT32 +TQ_UINT32 xcf_read_float (FILE *fp, float *data, - Q_INT32 count) + TQ_INT32 count) { - return xcf_read_int32 (fp, (Q_INT32 *) ((void *) data), count); + return xcf_read_int32 (fp, (TQ_INT32 *) ((void *) data), count); } -Q_UINT32 +TQ_UINT32 xcf_read_int8 (FILE *fp, - Q_UINT8 *data, - Q_INT32 count) + TQ_UINT8 *data, + TQ_INT32 count) { - Q_UINT32 total; - Q_INT32 bytes; + TQ_UINT32 total; + TQ_INT32 bytes; total = count; while (count > 0) @@ -80,14 +80,14 @@ xcf_read_int8 (FILE *fp, return total; } -Q_UINT32 +TQ_UINT32 xcf_read_string (FILE *fp, - QCString **data, - Q_INT32 count) + TQCString **data, + TQ_INT32 count) { - Q_INT32 tmp; - Q_UINT32 total; - Q_INT32 i; + TQ_INT32 tmp; + TQ_UINT32 total; + TQ_INT32 i; total = 0; for (i = 0; i < count; i++) @@ -95,10 +95,10 @@ xcf_read_string (FILE *fp, total += xcf_read_int32 (fp, &tmp, 1); if (tmp > 0) { - QCString *str; + TQCString *str; - str = g_new (QCString, tmp); - total += xcf_read_int8 (fp, (Q_UINT8*) str, tmp); + str = g_new (TQCString, tmp); + total += xcf_read_int8 (fp, (TQ_UINT8*) str, tmp); if (str[tmp - 1] != '\0') str[tmp - 1] = '\0'; diff --git a/filters/krita/xcf/xcf/xcf-read.h b/filters/krita/xcf/xcf/xcf-read.h index 3038ca44..b90b8a41 100644 --- a/filters/krita/xcf/xcf/xcf-read.h +++ b/filters/krita/xcf/xcf/xcf-read.h @@ -20,18 +20,18 @@ #define __XCF_READ_H__ -Q_UINT32 xcf_read_int32 (FILE *fp, - Q_INT32 *data, - Q_INT32 count); -Q_UINT32 xcf_read_float (FILE *fp, +TQ_UINT32 xcf_read_int32 (FILE *fp, + TQ_INT32 *data, + TQ_INT32 count); +TQ_UINT32 xcf_read_float (FILE *fp, float *data, - Q_INT32 count); -Q_UINT32 xcf_read_int8 (FILE *fp, - Q_UINT8 *data, - Q_INT32 count); -Q_UINT32 xcf_read_string (FILE *fp, - QCString **data, - Q_INT32 count); + TQ_INT32 count); +TQ_UINT32 xcf_read_int8 (FILE *fp, + TQ_UINT8 *data, + TQ_INT32 count); +TQ_UINT32 xcf_read_string (FILE *fp, + TQCString **data, + TQ_INT32 count); #endif /* __XCF_READ_H__ */ diff --git a/filters/krita/xcf/xcf/xcf-save.cc b/filters/krita/xcf/xcf/xcf-save.cc index 420578c7..50e5fb17 100644 --- a/filters/krita/xcf/xcf/xcf-save.cc +++ b/filters/krita/xcf/xcf/xcf-save.cc @@ -40,7 +40,7 @@ #include "core/gimpimage-guides.h" #include "core/gimplayer.h" #include "core/gimplayer-floating-sel.h" -#include "core/gimplayermask.h" +#include "core/gimplayertqmask.h" #include "core/gimplist.h" #include "core/gimpparasitelist.h" #include "core/gimpunit.h" @@ -191,12 +191,12 @@ static bool xcf_save_vectors (XcfInfo *info, } G_STMT_END #define xcf_write_prop_type_check_error(info, prop_type) G_STMT_START { \ - Q_INT32 _prop_int32 = prop_type; \ + TQ_INT32 _prop_int32 = prop_type; \ xcf_write_int32_check_error (info, &_prop_int32, 1); \ } G_STMT_END #define xcf_write_prop_type_print_error(info, prop_type) G_STMT_START { \ - Q_INT32 _prop_int32 = prop_type; \ + TQ_INT32 _prop_int32 = prop_type; \ xcf_write_int32_print_error (info, &_prop_int32, 1); \ } G_STMT_END @@ -222,7 +222,7 @@ xcf_save_choose_format (XcfInfo *info, KisLayer *layer; GList *list; - Q_INT32 save_version = 0; /* default to oldest */ + TQ_INT32 save_version = 0; /* default to oldest */ if (gimage->cmap) save_version = 1; /* need version 1 for colormaps */ @@ -251,21 +251,21 @@ xcf_save_choose_format (XcfInfo *info, info->file_version = save_version; } -Q_INT32 +TQ_INT32 xcf_save_image (XcfInfo *info, KisImage *gimage) { KisLayer *layer; KisLayer *floating_layer; GimpChannel *channel; - Q_INT32 saved_pos; - Q_INT32 offset; - Q_UINT32 nlayers; - Q_UINT32 nchannels; + TQ_INT32 saved_pos; + TQ_INT32 offset; + TQ_UINT32 nlayers; + TQ_UINT32 nchannels; GList *list; bool have_selection; - Q_INT32 t1, t2, t3, t4; - QCString version_tag[14]; + TQ_INT32 t1, t2, t3, t4; + TQCString version_tag[14]; GError *error = NULL; floating_layer = gimp_image_floating_sel (gimage); @@ -281,19 +281,19 @@ xcf_save_image (XcfInfo *info, { strcpy (version_tag, "gimp xcf file"); } - xcf_write_int8_print_error (info, (Q_UINT8 *) version_tag, 14); + xcf_write_int8_print_error (info, (TQ_UINT8 *) version_tag, 14); /* write out the width, height and image type information for the image */ - xcf_write_int32_print_error (info, (Q_INT32 *) &gimage->width, 1); - xcf_write_int32_print_error (info, (Q_INT32 *) &gimage->height, 1); - xcf_write_int32_print_error (info, (Q_INT32 *) &gimage->base_type, 1); + xcf_write_int32_print_error (info, (TQ_INT32 *) &gimage->width, 1); + xcf_write_int32_print_error (info, (TQ_INT32 *) &gimage->height, 1); + xcf_write_int32_print_error (info, (TQ_INT32 *) &gimage->base_type, 1); /* determine the number of layers and channels in the image */ - nlayers = (Q_UINT32) gimp_container_num_children (gimage->layers); - nchannels = (Q_UINT32) gimp_container_num_children (gimage->channels); + nlayers = (TQ_UINT32) gimp_container_num_tqchildren (gimage->layers); + nchannels = (TQ_UINT32) gimp_container_num_tqchildren (gimage->channels); /* check and see if we have to save out the selection */ - have_selection = gimp_channel_bounds (gimp_image_get_mask (gimage), + have_selection = gimp_channel_bounds (gimp_image_get_tqmask (gimage), &t1, &t2, &t3, &t4); if (have_selection) nchannels += 1; @@ -365,7 +365,7 @@ xcf_save_image (XcfInfo *info, } else { - channel = gimage->selection_mask; + channel = gimage->selection_tqmask; have_selection = FALSE; } @@ -442,7 +442,7 @@ xcf_save_image_props (XcfInfo *info, if (unit < _gimp_unit_get_number_of_built_in_units (gimage->gimp)) xcf_check_error (xcf_save_prop (info, gimage, PROP_UNIT, error, unit)); - if (gimp_container_num_children (gimage->vectors) > 0) + if (gimp_container_num_tqchildren (gimage->vectors) > 0) { if (gimp_vectors_compat_is_compatible (gimage)) xcf_check_error (xcf_save_prop (info, gimage, PROP_PATHS, error)); @@ -506,14 +506,14 @@ xcf_save_layer_props (XcfInfo *info, xcf_check_error (xcf_save_prop (info, gimage, PROP_LOCK_ALPHA, error, layer->lock_alpha)); - if (layer->mask) + if (layer->tqmask) { xcf_check_error (xcf_save_prop (info, gimage, PROP_APPLY_MASK, - error, layer->mask->apply_mask)); + error, layer->tqmask->apply_tqmask)); xcf_check_error (xcf_save_prop (info, gimage, PROP_EDIT_MASK, - error, layer->mask->edit_mask)); + error, layer->tqmask->edit_tqmask)); xcf_check_error (xcf_save_prop (info, gimage, PROP_SHOW_MASK, - error, layer->mask->show_mask)); + error, layer->tqmask->show_tqmask)); } else { @@ -536,7 +536,7 @@ xcf_save_layer_props (XcfInfo *info, if (GIMP_IS_TEXT_LAYER (layer) && GIMP_TEXT_LAYER (layer)->text) { GimpTextLayer *text_layer = GIMP_TEXT_LAYER (layer); - Q_INT32 flags = gimp_text_layer_get_xcf_flags (text_layer); + TQ_INT32 flags = gimp_text_layer_get_xcf_flags (text_layer); gimp_text_layer_xcf_save_prepare (text_layer); @@ -575,7 +575,7 @@ xcf_save_channel_props (XcfInfo *info, if (channel == gimp_image_get_active_channel (gimage)) xcf_check_error (xcf_save_prop (info, gimage, PROP_ACTIVE_CHANNEL, error)); - if (channel == gimage->selection_mask) + if (channel == gimage->selection_tqmask) xcf_check_error (xcf_save_prop (info, gimage, PROP_SELECTION, error)); xcf_check_error (xcf_save_prop (info, gimage, PROP_OPACITY, error, @@ -585,7 +585,7 @@ xcf_save_channel_props (XcfInfo *info, xcf_check_error (xcf_save_prop (info, gimage, PROP_LINKED, error, gimp_item_get_linked (GIMP_ITEM (channel)))); xcf_check_error (xcf_save_prop (info, gimage, PROP_SHOW_MASKED, error, - channel->show_masked)); + channel->show_tqmasked)); gimp_rgb_get_uchar (&channel->color, &col[0], &col[1], &col[2]); xcf_check_error (xcf_save_prop (info, gimage, PROP_COLOR, error, col)); @@ -609,7 +609,7 @@ xcf_save_prop (XcfInfo *info, GError **error, ...) { - Q_INT32 size; + TQ_INT32 size; va_list args; GError *tmp_error = NULL; @@ -627,10 +627,10 @@ xcf_save_prop (XcfInfo *info, case PROP_COLORMAP: { - Q_INT32 ncolors; + TQ_INT32 ncolors; guchar *colors; - ncolors = va_arg (args, Q_INT32); + ncolors = va_arg (args, TQ_INT32); colors = va_arg (args, guchar*); size = 4 + ncolors * 3; @@ -652,7 +652,7 @@ xcf_save_prop (XcfInfo *info, case PROP_FLOATING_SELECTION: { - Q_INT32 dummy; + TQ_INT32 dummy; dummy = 0; size = 4; @@ -667,7 +667,7 @@ xcf_save_prop (XcfInfo *info, case PROP_OPACITY: { gdouble opacity; - Q_INT32 uint_opacity; + TQ_INT32 uint_opacity; opacity = va_arg (args, gdouble); @@ -683,22 +683,22 @@ xcf_save_prop (XcfInfo *info, case PROP_MODE: { - Q_INT3232 mode; + TQ_INT3232 mode; - mode = va_arg (args, Q_INT3232); + mode = va_arg (args, TQ_INT3232); size = 4; xcf_write_prop_type_check_error (info, prop_type); xcf_write_int32_check_error (info, &size, 1); - xcf_write_int32_check_error (info, (Q_INT32 *) &mode, 1); + xcf_write_int32_check_error (info, (TQ_INT32 *) &mode, 1); } break; case PROP_VISIBLE: { - Q_INT32 visible; + TQ_INT32 visible; - visible = va_arg (args, Q_INT32); + visible = va_arg (args, TQ_INT32); size = 4; xcf_write_prop_type_check_error (info, prop_type); @@ -709,9 +709,9 @@ xcf_save_prop (XcfInfo *info, case PROP_LINKED: { - Q_INT32 linked; + TQ_INT32 linked; - linked = va_arg (args, Q_INT32); + linked = va_arg (args, TQ_INT32); size = 4; xcf_write_prop_type_check_error (info, prop_type); @@ -722,9 +722,9 @@ xcf_save_prop (XcfInfo *info, case PROP_LOCK_ALPHA: { - Q_INT32 lock_alpha; + TQ_INT32 lock_alpha; - lock_alpha = va_arg (args, Q_INT32); + lock_alpha = va_arg (args, TQ_INT32); size = 4; xcf_write_prop_type_check_error (info, prop_type); @@ -735,67 +735,67 @@ xcf_save_prop (XcfInfo *info, case PROP_APPLY_MASK: { - Q_INT32 apply_mask; + TQ_INT32 apply_tqmask; - apply_mask = va_arg (args, Q_INT32); + apply_tqmask = va_arg (args, TQ_INT32); size = 4; xcf_write_prop_type_check_error (info, prop_type); xcf_write_int32_check_error (info, &size, 1); - xcf_write_int32_check_error (info, &apply_mask, 1); + xcf_write_int32_check_error (info, &apply_tqmask, 1); } break; case PROP_EDIT_MASK: { - Q_INT32 edit_mask; + TQ_INT32 edit_tqmask; - edit_mask = va_arg (args, Q_INT32); + edit_tqmask = va_arg (args, TQ_INT32); size = 4; xcf_write_prop_type_check_error (info, prop_type); xcf_write_int32_check_error (info, &size, 1); - xcf_write_int32_check_error (info, &edit_mask, 1); + xcf_write_int32_check_error (info, &edit_tqmask, 1); } break; case PROP_SHOW_MASK: { - Q_INT32 show_mask; + TQ_INT32 show_tqmask; - show_mask = va_arg (args, Q_INT32); + show_tqmask = va_arg (args, TQ_INT32); size = 4; xcf_write_prop_type_check_error (info, prop_type); xcf_write_int32_check_error (info, &size, 1); - xcf_write_int32_check_error (info, &show_mask, 1); + xcf_write_int32_check_error (info, &show_tqmask, 1); } break; case PROP_SHOW_MASKED: { - Q_INT32 show_masked; + TQ_INT32 show_tqmasked; - show_masked = va_arg (args, Q_INT32); + show_tqmasked = va_arg (args, TQ_INT32); size = 4; xcf_write_prop_type_check_error (info, prop_type); xcf_write_int32_check_error (info, &size, 1); - xcf_write_int32_check_error (info, &show_masked, 1); + xcf_write_int32_check_error (info, &show_tqmasked, 1); } break; case PROP_OFFSETS: { - Q_INT3232 offsets[2]; + TQ_INT3232 offsets[2]; - offsets[0] = va_arg (args, Q_INT3232); - offsets[1] = va_arg (args, Q_INT3232); + offsets[0] = va_arg (args, TQ_INT3232); + offsets[1] = va_arg (args, TQ_INT3232); size = 8; xcf_write_prop_type_check_error (info, prop_type); xcf_write_int32_check_error (info, &size, 1); - xcf_write_int32_check_error (info, (Q_INT32 *) offsets, 2); + xcf_write_int32_check_error (info, (TQ_INT32 *) offsets, 2); } break; @@ -814,9 +814,9 @@ xcf_save_prop (XcfInfo *info, case PROP_COMPRESSION: { - Q_UINT8 compression; + TQ_UINT8 compression; - compression = (Q_UINT8) va_arg (args, Q_INT32); + compression = (TQ_UINT8) va_arg (args, TQ_INT32); size = 1; xcf_write_prop_type_check_error (info, prop_type); @@ -829,9 +829,9 @@ xcf_save_prop (XcfInfo *info, { GList *guides; GimpGuide *guide; - Q_INT3232 position; - Q_INT328 orientation; - Q_INT32 nguides; + TQ_INT3232 position; + TQ_INT328 orientation; + TQ_INT32 nguides; guides = va_arg (args, GList *); nguides = g_list_length (guides); @@ -863,8 +863,8 @@ xcf_save_prop (XcfInfo *info, continue; } - xcf_write_int32_check_error (info, (Q_INT32 *) &position, 1); - xcf_write_int8_check_error (info, (Q_UINT8 *) &orientation, 1); + xcf_write_int32_check_error (info, (TQ_INT32 *) &position, 1); + xcf_write_int8_check_error (info, (TQ_UINT8 *) &orientation, 1); } } break; @@ -890,9 +890,9 @@ xcf_save_prop (XcfInfo *info, case PROP_TATTOO: { - Q_INT32 tattoo; + TQ_INT32 tattoo; - tattoo = va_arg (args, Q_INT32); + tattoo = va_arg (args, TQ_INT32); size = 4; xcf_write_prop_type_check_error (info, prop_type); @@ -904,7 +904,7 @@ xcf_save_prop (XcfInfo *info, case PROP_PARASITES: { KisAnnotationList *list; - Q_INT32 base, length; + TQ_INT32 base, length; long pos; list = va_arg (args, KisAnnotationList *); @@ -939,9 +939,9 @@ xcf_save_prop (XcfInfo *info, case PROP_UNIT: { - Q_INT32 unit; + TQ_INT32 unit; - unit = va_arg (args, Q_INT32); + unit = va_arg (args, TQ_INT32); size = 4; @@ -953,7 +953,7 @@ xcf_save_prop (XcfInfo *info, case PROP_PATHS: { - Q_INT32 base, length; + TQ_INT32 base, length; glong pos; xcf_write_prop_type_check_error (info, prop_type); @@ -986,11 +986,11 @@ xcf_save_prop (XcfInfo *info, case PROP_USER_UNIT: { GimpUnit unit; - const QCString *unit_strings[5]; + const TQCString *unit_strings[5]; float factor; - Q_INT32 digits; + TQ_INT32 digits; - unit = va_arg (args, Q_INT32); + unit = va_arg (args, TQ_INT32); /* write the entire unit definition */ unit_strings[0] = _gimp_unit_get_identifier (gimage->gimp, unit); @@ -1013,13 +1013,13 @@ xcf_save_prop (XcfInfo *info, xcf_write_int32_check_error (info, &size, 1); xcf_write_float_check_error (info, &factor, 1); xcf_write_int32_check_error (info, &digits, 1); - xcf_write_string_check_error (info, (QCString **) unit_strings, 5); + xcf_write_string_check_error (info, (TQCString **) unit_strings, 5); } break; case PROP_VECTORS: { - Q_INT32 base, length; + TQ_INT32 base, length; glong pos; xcf_write_prop_type_check_error (info, prop_type); @@ -1051,9 +1051,9 @@ xcf_save_prop (XcfInfo *info, case PROP_TEXT_LAYER_FLAGS: { - Q_INT32 flags; + TQ_INT32 flags; - flags = va_arg (args, Q_INT32); + flags = va_arg (args, TQ_INT32); size = 4; xcf_write_prop_type_check_error (info, prop_type); @@ -1074,8 +1074,8 @@ xcf_save_layer (XcfInfo *info, KisLayer *layer, GError **error) { - Q_INT32 saved_pos; - Q_INT32 offset; + TQ_INT32 saved_pos; + TQ_INT32 offset; GError *tmp_error = NULL; @@ -1092,11 +1092,11 @@ xcf_save_layer (XcfInfo *info, /* write out the width, height and image type information for the layer */ xcf_write_int32_check_error (info, - (Q_INT32 *) &GIMP_ITEM (layer)->width, 1); + (TQ_INT32 *) &GIMP_ITEM (layer)->width, 1); xcf_write_int32_check_error (info, - (Q_INT32 *) &GIMP_ITEM (layer)->height, 1); + (TQ_INT32 *) &GIMP_ITEM (layer)->height, 1); xcf_write_int32_check_error (info, - (Q_INT32 *) &GIMP_DRAWABLE (layer)->type, 1); + (TQ_INT32 *) &GIMP_DRAWABLE (layer)->type, 1); /* write out the layers name */ xcf_write_string_check_error (info, &GIMP_OBJECT (layer)->name, 1); @@ -1120,14 +1120,14 @@ xcf_save_layer (XcfInfo *info, xcf_write_int32_check_error (info, &offset, 1); saved_pos = info->cp; - /* write out the layer mask */ - if (layer->mask) + /* write out the layer tqmask */ + if (layer->tqmask) { xcf_check_error (xcf_seek_end (info, error)); offset = info->cp; xcf_check_error (xcf_save_channel (info, - gimage, GIMP_CHANNEL(layer->mask), + gimage, GIMP_CHANNEL(layer->tqmask), error)); } else @@ -1145,8 +1145,8 @@ xcf_save_channel (XcfInfo *info, GimpChannel *channel, GError **error) { - Q_INT32 saved_pos; - Q_INT32 offset; + TQ_INT32 saved_pos; + TQ_INT32 offset; GError *tmp_error = NULL; @@ -1163,9 +1163,9 @@ xcf_save_channel (XcfInfo *info, /* write out the width and height information for the channel */ xcf_write_int32_check_error (info, - (Q_INT32 *) &GIMP_ITEM (channel)->width, 1); + (TQ_INT32 *) &GIMP_ITEM (channel)->width, 1); xcf_write_int32_check_error (info, - (Q_INT32 *) &GIMP_ITEM (channel)->height, 1); + (TQ_INT32 *) &GIMP_ITEM (channel)->height, 1); /* write out the channels name */ xcf_write_string_check_error (info, &GIMP_OBJECT (channel)->name, 1); @@ -1192,9 +1192,9 @@ xcf_save_channel (XcfInfo *info, return TRUE; } -static Q_INT32 -xcf_calc_levels (Q_INT32 size, - Q_INT32 tile_size) +static TQ_INT32 +xcf_calc_levels (TQ_INT32 size, + TQ_INT32 tile_size) { int levels; @@ -1214,14 +1214,14 @@ xcf_save_hierarchy (XcfInfo *info, TileManager *tiles, GError **error) { - Q_INT32 saved_pos; - Q_INT32 offset; - Q_INT32 width; - Q_INT32 height; - Q_INT32 bpp; - Q_INT32 i; - Q_INT32 nlevels; - Q_INT32 tmp1, tmp2; + TQ_INT32 saved_pos; + TQ_INT32 offset; + TQ_INT32 width; + TQ_INT32 height; + TQ_INT32 bpp; + TQ_INT32 i; + TQ_INT32 nlevels; + TQ_INT32 tmp1, tmp2; GError *tmp_error = NULL; @@ -1229,9 +1229,9 @@ xcf_save_hierarchy (XcfInfo *info, height = tile_manager_height (tiles); bpp = tile_manager_bpp (tiles); - xcf_write_int32_check_error (info, (Q_INT32 *) &width, 1); - xcf_write_int32_check_error (info, (Q_INT32 *) &height, 1); - xcf_write_int32_check_error (info, (Q_INT32 *) &bpp, 1); + xcf_write_int32_check_error (info, (TQ_INT32 *) &width, 1); + xcf_write_int32_check_error (info, (TQ_INT32 *) &height, 1); + xcf_write_int32_check_error (info, (TQ_INT32 *) &bpp, 1); saved_pos = info->cp; @@ -1256,9 +1256,9 @@ xcf_save_hierarchy (XcfInfo *info, tmp1 = 0; width /= 2; height /= 2; - xcf_write_int32_check_error (info, (Q_INT32 *) &width, 1); - xcf_write_int32_check_error (info, (Q_INT32 *) &height, 1); - xcf_write_int32_check_error (info, (Q_INT32 *) &tmp1, 1); + xcf_write_int32_check_error (info, (TQ_INT32 *) &width, 1); + xcf_write_int32_check_error (info, (TQ_INT32 *) &height, 1); + xcf_write_int32_check_error (info, (TQ_INT32 *) &tmp1, 1); } /* seek back to where we are to write out the next @@ -1293,12 +1293,12 @@ xcf_save_level (XcfInfo *info, TileManager *level, GError **error) { - Q_INT32 saved_pos; - Q_INT32 offset; - Q_INT32 width; - Q_INT32 height; - Q_UINT32 ntiles; - Q_INT32 i; + TQ_INT32 saved_pos; + TQ_INT32 offset; + TQ_INT32 width; + TQ_INT32 height; + TQ_UINT32 ntiles; + TQ_INT32 i; guchar *rlebuf; GError *tmp_error = NULL; @@ -1306,8 +1306,8 @@ xcf_save_level (XcfInfo *info, width = tile_manager_width (level); height = tile_manager_height (level); - xcf_write_int32_check_error (info, (Q_INT32 *) &width, 1); - xcf_write_int32_check_error (info, (Q_INT32 *) &height, 1); + xcf_write_int32_check_error (info, (TQ_INT32 *) &width, 1); + xcf_write_int32_check_error (info, (TQ_INT32 *) &height, 1); saved_pos = info->cp; @@ -1400,13 +1400,13 @@ xcf_save_tile_rle (XcfInfo *info, { guchar *data, *t; unsigned int last; - Q_INT32 state; - Q_INT32 length; - Q_INT32 count; - Q_INT32 size; - Q_INT32 bpp; - Q_INT32 i, j; - Q_INT32 len = 0; + TQ_INT32 state; + TQ_INT32 length; + TQ_INT32 count; + TQ_INT32 size; + TQ_INT32 bpp; + TQ_INT32 i, j; + TQ_INT32 len = 0; GError *tmp_error = NULL; @@ -1533,7 +1533,7 @@ typedef struct } XcfParasiteData; static void -xcf_save_parasite_func (QCString *key, +xcf_save_parasite_func (TQCString *key, KisAnnotation *parasite, XcfParasiteData *data) { @@ -1568,20 +1568,20 @@ xcf_save_old_paths (XcfInfo *info, GError **error) { GimpVectors *active_vectors; - Q_INT32 num_paths; - Q_INT32 active_index = 0; + TQ_INT32 num_paths; + TQ_INT32 active_index = 0; GList *list; GError *tmp_error = NULL; /* Write out the following:- * - * last_selected_row (Q_INT32) - * number_of_paths (Q_INT32) + * last_selected_row (TQ_INT32) + * number_of_paths (TQ_INT32) * * then each path:- */ - num_paths = gimp_container_num_children (gimage->vectors); + num_paths = gimp_container_num_tqchildren (gimage->vectors); active_vectors = gimp_image_get_active_vectors (gimage); @@ -1597,26 +1597,26 @@ xcf_save_old_paths (XcfInfo *info, list = g_list_next (list)) { GimpVectors *vectors = list->data; - QCString *name; - Q_INT32 locked; - Q_UINT8 state; - Q_INT32 version; - Q_INT32 pathtype; - Q_INT32 tattoo; + TQCString *name; + TQ_INT32 locked; + TQ_UINT8 state; + TQ_INT32 version; + TQ_INT32 pathtype; + TQ_INT32 tattoo; GimpVectorsCompatPoint *points; - Q_INT3232 num_points; - Q_INT3232 closed; - Q_INT32 i; + TQ_INT3232 num_points; + TQ_INT3232 closed; + TQ_INT32 i; /* * name (string) - * locked (Q_INT32) - * state (QCString) - * closed (Q_INT32) - * number points (Q_INT32) - * version (Q_INT32) - * pathtype (Q_INT32) - * tattoo (Q_INT32) + * locked (TQ_INT32) + * state (TQCString) + * closed (TQ_INT32) + * number points (TQ_INT32) + * version (TQ_INT32) + * pathtype (TQ_INT32) + * tattoo (TQ_INT32) * then each point. */ @@ -1627,7 +1627,7 @@ xcf_save_old_paths (XcfInfo *info, * we already saved the number of paths and I wont start seeking * around to fix that cruft */ - name = (QCString *) gimp_object_get_name (GIMP_OBJECT (vectors)); + name = (TQCString *) gimp_object_get_name (GIMP_OBJECT (vectors)); locked = gimp_item_get_linked (GIMP_ITEM (vectors)); state = closed ? 4 : 2; /* EDIT : ADD (editing state, 1.2 compat) */ version = 3; @@ -1652,7 +1652,7 @@ xcf_save_old_paths (XcfInfo *info, y = points[i].y; /* - * type (Q_INT32) + * type (TQ_INT32) * x (float) * y (float) */ @@ -1674,18 +1674,18 @@ xcf_save_vectors (XcfInfo *info, GError **error) { GimpVectors *active_vectors; - Q_INT32 version = 1; - Q_INT32 active_index = 0; - Q_INT32 num_paths; + TQ_INT32 version = 1; + TQ_INT32 active_index = 0; + TQ_INT32 num_paths; GList *list; GList *stroke_list; GError *tmp_error = NULL; /* Write out the following:- * - * version (Q_INT32) - * active_index (Q_INT32) - * num_paths (Q_INT32) + * version (TQ_INT32) + * active_index (TQ_INT32) + * num_paths (TQ_INT32) * * then each path:- */ @@ -1696,7 +1696,7 @@ xcf_save_vectors (XcfInfo *info, active_index = gimp_container_get_child_index (gimage->vectors, GIMP_OBJECT (active_vectors)); - num_paths = gimp_container_num_children (gimage->vectors); + num_paths = gimp_container_num_tqchildren (gimage->vectors); xcf_write_int32_check_error (info, &version, 1); xcf_write_int32_check_error (info, &active_index, 1); @@ -1708,20 +1708,20 @@ xcf_save_vectors (XcfInfo *info, { GimpVectors *vectors = list->data; KisAnnotationList *parasites; - QCString *name; - Q_INT32 tattoo; - Q_INT32 visible; - Q_INT32 linked; - Q_INT32 num_parasites; - Q_INT32 num_strokes; + TQCString *name; + TQ_INT32 tattoo; + TQ_INT32 visible; + TQ_INT32 linked; + TQ_INT32 num_parasites; + TQ_INT32 num_strokes; /* * name (string) - * tattoo (Q_INT32) - * visible (Q_INT32) - * linked (Q_INT32) - * num_parasites (Q_INT32) - * num_strokes (Q_INT32) + * tattoo (TQ_INT32) + * visible (TQ_INT32) + * linked (TQ_INT32) + * num_parasites (TQ_INT32) + * num_strokes (TQ_INT32) * * then each parasite * then each stroke @@ -1729,7 +1729,7 @@ xcf_save_vectors (XcfInfo *info, parasites = GIMP_ITEM (vectors)->parasites; - name = (QCString *) gimp_object_get_name (GIMP_OBJECT (vectors)); + name = (TQCString *) gimp_object_get_name (GIMP_OBJECT (vectors)); visible = gimp_item_get_visible (GIMP_ITEM (vectors)); linked = gimp_item_get_linked (GIMP_ITEM (vectors)); tattoo = gimp_item_get_tattoo (GIMP_ITEM (vectors)); @@ -1750,20 +1750,20 @@ xcf_save_vectors (XcfInfo *info, stroke_list = g_list_next (stroke_list)) { GimpStroke *stroke; - Q_INT32 stroke_type; - Q_INT32 closed; - Q_INT32 num_axes; + TQ_INT32 stroke_type; + TQ_INT32 closed; + TQ_INT32 num_axes; GArray *control_points; - Q_INT32 i; + TQ_INT32 i; - Q_INT32 type; + TQ_INT32 type; float coords[6]; /* - * stroke_type (Q_INT32) - * closed (Q_INT32) - * num_axes (Q_INT32) - * num_control_points (Q_INT32) + * stroke_type (TQ_INT32) + * closed (TQ_INT32) + * num_axes (TQ_INT32) + * num_control_points (TQ_INT32) * * then each control point. */ @@ -1803,7 +1803,7 @@ xcf_save_vectors (XcfInfo *info, coords[5] = anchor->position.wheel; /* - * type (Q_INT32) + * type (TQ_INT32) * * the first num_axis elements of: * [0] x (float) diff --git a/filters/krita/xcf/xcf/xcf-save.h b/filters/krita/xcf/xcf/xcf-save.h index 74c5278c..cc49d2d3 100644 --- a/filters/krita/xcf/xcf/xcf-save.h +++ b/filters/krita/xcf/xcf/xcf-save.h @@ -22,7 +22,7 @@ void xcf_save_choose_format (XcfInfo *info, KisImage *gimage); -Q_INT32 xcf_save_image (XcfInfo *info, +TQ_INT32 xcf_save_image (XcfInfo *info, KisImage *gimage); diff --git a/filters/krita/xcf/xcf/xcf-seek.cc b/filters/krita/xcf/xcf/xcf-seek.cc index 25e9e344..a24271f5 100644 --- a/filters/krita/xcf/xcf/xcf-seek.cc +++ b/filters/krita/xcf/xcf/xcf-seek.cc @@ -32,7 +32,7 @@ bool xcf_seek_pos (XcfInfo *info, - Q_UINT32 pos, + TQ_UINT32 pos, GError **error) { if (info->cp != pos) diff --git a/filters/krita/xcf/xcf/xcf-seek.h b/filters/krita/xcf/xcf/xcf-seek.h index 99f961bd..1bb7b7a9 100644 --- a/filters/krita/xcf/xcf/xcf-seek.h +++ b/filters/krita/xcf/xcf/xcf-seek.h @@ -21,7 +21,7 @@ bool xcf_seek_pos (XcfInfo *info, - Q_UINT32 pos, + TQ_UINT32 pos, GError **error); bool xcf_seek_end (XcfInfo *info, GError **error); diff --git a/filters/krita/xcf/xcf/xcf-write.cc b/filters/krita/xcf/xcf/xcf-write.cc index 89aa2889..4010ab18 100644 --- a/filters/krita/xcf/xcf/xcf-write.cc +++ b/filters/krita/xcf/xcf/xcf-write.cc @@ -33,17 +33,17 @@ #include "xcf-write.h" -Q_UINT32 xcf_write_int32 (FILE *fp, Q_INT32 *data, Q_INT32 count); +TQ_UINT32 xcf_write_int32 (FILE *fp, TQ_INT32 *data, TQ_INT32 count); { - Q_INT32 tmp; - Q_INT32 i; + TQ_INT32 tmp; + TQ_INT32 i; if (count > 0) { for (i = 0; i < count; i++) { tmp = htonl (data[i]); - xcf_write_int8 (fp, (Q_UINT8*) &tmp, 4); + xcf_write_int8 (fp, (TQ_UINT8*) &tmp, 4); if (fp->status() != IO_Ok) { @@ -55,24 +55,24 @@ Q_UINT32 xcf_write_int32 (FILE *fp, Q_INT32 *data, Q_INT32 count); return count * 4; } -Q_UINT32 xcf_write_float (FILE *fp, float *data, Q_INT32 count); +TQ_UINT32 xcf_write_float (FILE *fp, float *data, TQ_INT32 count); { - return xcf_write_int32 (fp, (Q_INT32 *)((void *)data), count, error); + return xcf_write_int32 (fp, (TQ_INT32 *)((void *)data), count, error); } -Q_UINT32 xcf_write_int8 (FILE *fp, Q_UINT8 *data, Q_INT32 count); +TQ_UINT32 xcf_write_int8 (FILE *fp, TQ_UINT8 *data, TQ_INT32 count); { - Q_INT32 bytes; + TQ_INT32 bytes; bytes = fp->writeBlock( data, count ); return bytes; } -Q_UINT32 xcf_write_string (FILE *fp, QCString *data, Q_INT32 count); +TQ_UINT32 xcf_write_string (FILE *fp, TQCString *data, TQ_INT32 count); { GError *tmp_error = NULL; - Q_INT32 tmp; - Q_UINT32 total; - Q_INT32 i; + TQ_INT32 tmp; + TQ_UINT32 total; + TQ_INT32 i; total = 0; for (i = 0; i < count; i++) @@ -90,7 +90,7 @@ Q_UINT32 xcf_write_string (FILE *fp, QCString *data, Q_INT32 count); } if (tmp > 0) - xcf_write_int8 (fp, (Q_UINT8*) data[i], tmp, &tmp_error); + xcf_write_int8 (fp, (TQ_UINT8*) data[i], tmp, &tmp_error); if (tmp_error) { g_propagate_error (error, tmp_error); diff --git a/filters/krita/xcf/xcf/xcf-write.h b/filters/krita/xcf/xcf/xcf-write.h index 5e470d45..8e21a08e 100644 --- a/filters/krita/xcf/xcf/xcf-write.h +++ b/filters/krita/xcf/xcf/xcf-write.h @@ -19,21 +19,21 @@ #ifndef __XCF_WRITE_H__ #define __XCF_WRITE_H__ -#include <qstring.h> -#include <qstringlist.h> -#include <qfile.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqfile.h> // Write count integers to the file -Q_UINT32 xcf_write_int32 (QFile *fp, Q_INT32 *data, Q_INT32 count); +TQ_UINT32 xcf_write_int32 (TQFile *fp, TQ_INT32 *data, TQ_INT32 count); // Write count of floats to the file -Q_UINT32 xcf_write_float (QFile *fp, float *data, Q_INT32 count); +TQ_UINT32 xcf_write_float (TQFile *fp, float *data, TQ_INT32 count); // Write count chars to the file -Q_UINT32 xcf_write_int8 (QFile *fp, Q_UINT8 *data, Q_INT32 count); +TQ_UINT32 xcf_write_int8 (TQFile *fp, TQ_UINT8 *data, TQ_INT32 count); // Write count zero-terminated strings to the file, each string preceded by its length as an integer -Q_UINT32 xcf_write_string (QFile *fp, QCString *data, Q_INT32 count); +TQ_UINT32 xcf_write_string (TQFile *fp, TQCString *data, TQ_INT32 count); #endif /* __XCF_WRITE_H__ */ diff --git a/filters/krita/xcf/xcfexport.cpp b/filters/krita/xcf/xcfexport.cpp index 8274e2b2..99aaa556 100644 --- a/filters/krita/xcf/xcfexport.cpp +++ b/filters/krita/xcf/xcfexport.cpp @@ -33,7 +33,7 @@ typedef KGenericFactory<XCFExport, KoFilter> XCFExportFactory; K_EXPORT_COMPONENT_FACTORY(libkritaxcfexport, XCFExportFactory("kofficefilters")) -XCFExport::XCFExport(KoFilter *, const char *, const QStringList&) : KoFilter() +XCFExport::XCFExport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -41,7 +41,7 @@ XCFExport::~XCFExport() { } -KoFilter::ConversionStatus XCFExport::convert(const QCString& from, const QCString& to) +KoFilter::ConversiontqStatus XCFExport::convert(const TQCString& from, const TQCString& to) { kdDebug(41008) << "xcf export! From: " << from << ", To: " << to << "\n"; @@ -49,7 +49,7 @@ KoFilter::ConversionStatus XCFExport::convert(const QCString& from, const QCStri return KoFilter::NotImplemented; KisDoc *output = dynamic_cast<KisDoc*>(m_chain->inputDocument()); - QString filename = m_chain->outputFile(); + TQString filename = m_chain->outputFile(); if (!output) return KoFilter::CreationError; diff --git a/filters/krita/xcf/xcfexport.h b/filters/krita/xcf/xcfexport.h index e2efe6af..b6acf737 100644 --- a/filters/krita/xcf/xcfexport.h +++ b/filters/krita/xcf/xcfexport.h @@ -23,13 +23,14 @@ class XCFExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - XCFExport(KoFilter *parent, const char *name, const QStringList&); + XCFExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~XCFExport(); public: - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; #endif // XCFEXPORT_H_ diff --git a/filters/krita/xcf/xcfimport.cpp b/filters/krita/xcf/xcfimport.cpp index da63f041..1a7d7947 100644 --- a/filters/krita/xcf/xcfimport.cpp +++ b/filters/krita/xcf/xcfimport.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ -#include <qstring.h> +#include <tqstring.h> #include <xcfimport.h> #include <kgenericfactory.h> @@ -31,7 +31,7 @@ typedef KGenericFactory<XCFImport, KoFilter> XCFImportFactory; K_EXPORT_COMPONENT_FACTORY(libkritaxcfimport, XCFImportFactory("kofficefilters")) -XCFImport::XCFImport(KoFilter *, const char *, const QStringList&) : KoFilter() +XCFImport::XCFImport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -39,7 +39,7 @@ XCFImport::~XCFImport() { } -KoFilter::ConversionStatus XCFImport::convert(const QCString&, const QCString& to) +KoFilter::ConversiontqStatus XCFImport::convert(const TQCString&, const TQCString& to) { kdDebug(41008) << "Importing using XCFImport!\n"; @@ -49,7 +49,7 @@ KoFilter::ConversionStatus XCFImport::convert(const QCString&, const QCString& t KisDoc * doc = dynamic_cast<KisDoc*>(m_chain -> outputDocument()); KisView * view = static_cast<KisView*>(doc -> views().getFirst()); - QString filename = m_chain -> inputFile(); + TQString filename = m_chain -> inputFile(); if (!doc) return KoFilter::CreationError; diff --git a/filters/krita/xcf/xcfimport.h b/filters/krita/xcf/xcfimport.h index 22ef6a8f..038e7604 100644 --- a/filters/krita/xcf/xcfimport.h +++ b/filters/krita/xcf/xcfimport.h @@ -23,13 +23,14 @@ class XCFImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - XCFImport(KoFilter *parent, const char *name, const QStringList&); + XCFImport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~XCFImport(); public: - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; #endif // XCFIMPORT_H_ diff --git a/filters/kspread/applixspread/applixspreadimport.cc b/filters/kspread/applixspread/applixspreadimport.cc index 57baedeb..16ea0d8f 100644 --- a/filters/kspread/applixspread/applixspreadimport.cc +++ b/filters/kspread/applixspread/applixspreadimport.cc @@ -23,10 +23,10 @@ #include <unistd.h> #endif -#include <qmessagebox.h> -#include <qstringlist.h> -#include <qregexp.h> -#include <qptrlist.h> +#include <tqmessagebox.h> +#include <tqstringlist.h> +#include <tqregexp.h> +#include <tqptrlist.h> #include <applixspreadimport.h> #include <kdebug.h> #include <math.h> @@ -37,14 +37,14 @@ typedef KGenericFactory<APPLIXSPREADImport, KoFilter> APPLIXSPREADImportFactory; K_EXPORT_COMPONENT_FACTORY( libapplixspreadimport, APPLIXSPREADImportFactory( "kofficefilters" ) ) -APPLIXSPREADImport::APPLIXSPREADImport ( QObject */*parent*/, const char* /*name*/, const QStringList& ) +APPLIXSPREADImport::APPLIXSPREADImport ( TQObject */*tqparent*/, const char* /*name*/, const TQStringList& ) : KoFilter() { } -QString APPLIXSPREADImport::nextLine( QTextStream & stream ) +TQString APPLIXSPREADImport::nextLine( TQTextStream & stream ) { - QString s = stream.readLine(); + TQString s = stream.readLine(); m_instep += s.length(); if (m_instep > m_stepsize) { @@ -55,13 +55,13 @@ QString APPLIXSPREADImport::nextLine( QTextStream & stream ) return s; } -KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus APPLIXSPREADImport::convert( const TQCString& from, const TQCString& to ) { if (to != "application/x-kspread" || from != "application/x-applixspread") return KoFilter::NotImplemented; - QFile in (m_chain->inputFile()); + TQFile in (m_chain->inputFile()); if (!in.open(IO_ReadOnly)) { kdError(30502) << "Unable to open input file!" << endl; @@ -69,8 +69,8 @@ KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, co return KoFilter::FileNotFound; } - QString str; - QPtrList<t_mycolor> mcol; + TQString str; + TQPtrList<t_mycolor> mcol; str += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; str += "<!DOCTYPE spreadsheet>\n"; @@ -85,19 +85,19 @@ KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, co // str += " <table columnnumber=\"0\" borders=\"0\" hide=\"0\" hidezero=\"0\" firstletterupper=\"0\" grid=\"1\" formular=\"0\" lcmode=\"0\" name=\"Tabelle1\" >\n"; - // QTextStream - QTextStream stream (&in); + // TQTextStream + TQTextStream stream (&in); m_stepsize = in.size()/50; m_instep = 0; m_progress = 0; int pos; char ccol; int irow, icol; - QString tabctr ; // Tab control - QString mystr, typestr, cellnostr, tabnostr; - QStringList typefacetab; + TQString tabctr ; // Tab control + TQString mystr, typestr, cellnostr, tabnostr; + TQStringList typefacetab; - // QStringList rclist; + // TQStringList rclist; t_rc my_rc; @@ -152,7 +152,7 @@ KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, co mystr.remove (0, 1); int alllenght; - QString mystrn; + TQString mystrn; // Remember lenght of the string alllenght = mystr.length (); @@ -181,7 +181,7 @@ KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, co // Search for ')' - pos = mystr.find (')'); + pos = mystr.tqfind (')'); typestr = mystr.left (pos); @@ -190,7 +190,7 @@ KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, co // alllenght = alllenght - pos - 1; // Search for ':' - pos = mystr.find (':'); + pos = mystr.tqfind (':'); // Copy cellnumber informations cellnostr = mystr.left (pos); @@ -201,7 +201,7 @@ KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, co // Split Table and Cell Number - pos = cellnostr.find ('!'); + pos = cellnostr.tqfind ('!'); // Copy tabnumber informations tabnostr = cellnostr.left (pos); @@ -215,12 +215,12 @@ KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, co - pos = cellnostr.find (QRegExp ("[0-9]")); + pos = cellnostr.tqfind (TQRegExp ("[0-9]")); kdDebug()<<" findpos :"<<pos<<endl; - QString rowstr; + TQString rowstr; bool ok; int bla; rowstr = cellnostr.mid (pos, cellnostr.length()-pos); @@ -230,7 +230,7 @@ KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, co sscanf (cellnostr.latin1(), "%299s%d",tmp, &bla); sprintf (tmp1, "%d", irow); leni = strlen (tmp1); - QString cellcolstr; + TQString cellcolstr; cellcolstr = cellnostr; cellcolstr.remove (cellcolstr.length()-leni, leni); @@ -251,21 +251,21 @@ KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, co // Replace part for this characters: <, >, & - mystr.replace (QRegExp ("&"), "&"); - mystr.replace (QRegExp ("<"), "<"); - mystr.replace (QRegExp (">"), ">"); + mystr.tqreplace (TQRegExp ("&"), "&"); + mystr.tqreplace (TQRegExp ("<"), "<"); + mystr.tqreplace (TQRegExp (">"), ">"); // Replace part for Applix Characters int foundSpecialCharakter; - QChar newchar; + TQChar newchar; do { // initialize foundSpecialCharakter = false; - pos = mystr.find ("^"); + pos = mystr.tqfind ("^"); // is there a special character ? if (pos > -1 ) @@ -277,7 +277,7 @@ KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, co newchar = specCharfind (mystr[pos+1], mystr[pos+2]); // replace the character - mystr.replace (pos, 3, newchar); + mystr.tqreplace (pos, 3, newchar); } } @@ -286,12 +286,12 @@ KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, co // examine the typestring // splitt typestring in 3 parts by an | - QString typeFormStr; - QString typeCharStr; - QString typeCellStr; + TQString typeFormStr; + TQString typeCharStr; + TQString typeCellStr; - int pos1 = typestr.find ("|"); - int pos2 = typestr.findRev ("|"); + int pos1 = typestr.tqfind ("|"); + int pos2 = typestr.tqfindRev ("|"); typeFormStr = typestr.left (pos1); @@ -313,7 +313,7 @@ KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, co tabctr = tabnostr; // Searching for the rowcol part and adding to the hole string - pos = my_rc.tabname.findIndex (tabnostr); + pos = my_rc.tabname.tqfindIndex (tabnostr); if (pos > -1) str += my_rc.rc[pos]; } @@ -323,12 +323,12 @@ KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, co /******************************************************************** * examine charakter format String, splitt it up in basic parts * ********************************************************************/ - QStringList typeCharList; + TQStringList typeCharList; int bold=0, italic=0, underline=0, nn=0, fontsize=12, fontnr=-1; - typeCharList = QStringList::split (',', typeCharStr); + typeCharList = TQStringList::split (',', typeCharStr); - for (QStringList::Iterator it = typeCharList.begin(); + for (TQStringList::Iterator it = typeCharList.begin(); it != typeCharList.end(); ++it ) { // Output @@ -379,18 +379,18 @@ KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, co /******************************************************************** * examine pos format String, splitt it up in basic parts * ********************************************************************/ - QStringList typeFormList; + TQStringList typeFormList; int align = 0, valign=0; - typeFormList = QStringList::split (',', typeFormStr); + typeFormList = TQStringList::split (',', typeFormStr); nn=0; - for (QStringList::Iterator it = typeFormList.begin(); it != typeFormList.end(); ++it ) + for (TQStringList::Iterator it = typeFormList.begin(); it != typeFormList.end(); ++it ) { // Output //kdDebug()<< " Type (%2d) >%s< ", // nn, (*it).latin1() ); nn++; - // Grep horizontal alignment + // Grep horizontal tqalignment if ( (*it) == "1") { kdDebug()<< " = left align\n"; @@ -407,7 +407,7 @@ KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, co align = 2; // center } - // Grep verticale alignment + // Grep verticale tqalignment else if ( (*it) == "VT") { kdDebug()<<" = top valign\n"; @@ -433,7 +433,7 @@ KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, co /******************************************************************** * examine cell format String, splitt it up in basic parts * ********************************************************************/ - QStringList typeCellList; + TQStringList typeCellList; int topPenWidth=0, bottomPenWidth=0, leftPenWidth = 0, rightPenWidth = 0, fg_bg=-1; int topPenStyle=0, bottomPenStyle=0, leftPenStyle = 0, rightPenStyle = 0; int brushstyle=0, brushcolor=1; @@ -442,9 +442,9 @@ KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, co int rightbrushstyle=0, rightbrushcolor=1, rightfg_bg=1; int bottombrushstyle=0, bottombrushcolor=1, bottomfg_bg=1; - typeCellList = QStringList::split (',', typeCellStr); + typeCellList = TQStringList::split (',', typeCellStr); nn=0; - for ( QStringList::Iterator it = typeCellList.begin(); it != typeCellList.end(); ++it ) + for ( TQStringList::Iterator it = typeCellList.begin(); it != typeCellList.end(); ++it ) { // Output printf (" Cell (%2d) >%s< ", @@ -518,11 +518,11 @@ KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, co - QString col; + TQString col; // create kspread fileformat output - str += " <cell row=\"" + QString::number (irow) + "\""; - str += " column=\"" + QString::number (icol) + "\">\n"; + str += " <cell row=\"" + TQString::number (irow) + "\""; + str += " column=\"" + TQString::number (icol) + "\">\n"; if (bold == 1 || italic == 1 || underline == 1 || align != 0 || valign != 0 || topPenStyle != 0 || bottomPenStyle != 0 || @@ -532,14 +532,14 @@ KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, co str += " <format"; if (brushstyle != 0) { - str += " brushstyle=\"" + QString::number(brushstyle) + "\" "; + str += " brushstyle=\"" + TQString::number(brushstyle) + "\" "; str += " brushcolor=\""; str += writeColor (mcol.at(brushcolor)); str += "\""; } - if (align != 0) str += " align=\"" + QString::number(align) + "\" "; - if (valign != 0) str += " alignY=\"" + QString::number(valign) + "\" "; + if (align != 0) str += " align=\"" + TQString::number(align) + "\" "; + if (valign != 0) str += " alignY=\"" + TQString::number(valign) + "\" "; if (fg_bg != -1) { str += " bgcolor=\""; @@ -600,7 +600,7 @@ KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, co if (fontsize != 12) { str += "size=\""; - str += QString::number (fontsize); + str += TQString::number (fontsize); str += "\" "; } // Fontfamily @@ -643,7 +643,7 @@ KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, co return KoFilter::StorageCreationError; } - QCString cstring = str.utf8(); + TQCString cstring = str.utf8(); out->writeBlock ( cstring, cstring.length() ); in.close (); @@ -656,174 +656,174 @@ KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, co /****************************************************************************** * function: specCharfind * ******************************************************************************/ -QChar -APPLIXSPREADImport::specCharfind (QChar a, QChar b) +TQChar +APPLIXSPREADImport::specCharfind (TQChar a, TQChar b) { - QChar chr; + TQChar chr; - if ( (a == 'n') && (b == 'p') ) chr = 'ß'; + if ( (a == 'n') && (b == 'p') ) chr = '�'; - else if ( (a == 'n') && (b == 'c') ) chr = 'Ò'; - else if ( (a == 'p') && (b == 'c') ) chr = 'ò'; + else if ( (a == 'n') && (b == 'c') ) chr = '�'; + else if ( (a == 'p') && (b == 'c') ) chr = '�'; - else if ( (a == 'n') && (b == 'd') ) chr = 'Ó'; - else if ( (a == 'p') && (b == 'd') ) chr = 'ó'; + else if ( (a == 'n') && (b == 'd') ) chr = '�'; + else if ( (a == 'p') && (b == 'd') ) chr = '�'; - else if ( (a == 'n') && (b == 'e') ) chr = 'Ô'; - else if ( (a == 'p') && (b == 'e') ) chr = 'ô'; + else if ( (a == 'n') && (b == 'e') ) chr = '�'; + else if ( (a == 'p') && (b == 'e') ) chr = '�'; - else if ( (a == 'n') && (b == 'f') ) chr = 'Õ'; - else if ( (a == 'p') && (b == 'f') ) chr = 'õ'; + else if ( (a == 'n') && (b == 'f') ) chr = '�'; + else if ( (a == 'p') && (b == 'f') ) chr = '�'; - else if ( (a == 'p') && (b == 'g') ) chr = 'ö'; - else if ( (a == 'n') && (b == 'g') ) chr = 'Ö'; + else if ( (a == 'p') && (b == 'g') ) chr = '�'; + else if ( (a == 'n') && (b == 'g') ) chr = '�'; - else if ( (a == 'n') && (b == 'j') ) chr = 'Ù'; - else if ( (a == 'p') && (b == 'j') ) chr = 'ù'; + else if ( (a == 'n') && (b == 'j') ) chr = '�'; + else if ( (a == 'p') && (b == 'j') ) chr = '�'; - else if ( (a == 'n') && (b == 'k') ) chr = 'Ú'; - else if ( (a == 'p') && (b == 'k') ) chr = 'ú'; + else if ( (a == 'n') && (b == 'k') ) chr = '�'; + else if ( (a == 'p') && (b == 'k') ) chr = '�'; - else if ( (a == 'n') && (b == 'l') ) chr = 'Û'; - else if ( (a == 'p') && (b == 'l') ) chr = 'û'; + else if ( (a == 'n') && (b == 'l') ) chr = '�'; + else if ( (a == 'p') && (b == 'l') ) chr = '�'; - else if ( (a == 'p') && (b == 'm') ) chr = 'ü'; - else if ( (a == 'n') && (b == 'm') ) chr = 'Ü'; + else if ( (a == 'p') && (b == 'm') ) chr = '�'; + else if ( (a == 'n') && (b == 'm') ) chr = '�'; - else if ( (a == 'm') && (b == 'a') ) chr = 'À'; - else if ( (a == 'o') && (b == 'a') ) chr = 'à'; + else if ( (a == 'm') && (b == 'a') ) chr = '�'; + else if ( (a == 'o') && (b == 'a') ) chr = '�'; - else if ( (a == 'm') && (b == 'b') ) chr = 'Á'; - else if ( (a == 'o') && (b == 'b') ) chr = 'á'; + else if ( (a == 'm') && (b == 'b') ) chr = '�'; + else if ( (a == 'o') && (b == 'b') ) chr = '�'; - else if ( (a == 'm') && (b == 'c') ) chr = 'Â'; - else if ( (a == 'o') && (b == 'c') ) chr = 'â'; + else if ( (a == 'm') && (b == 'c') ) chr = '�'; + else if ( (a == 'o') && (b == 'c') ) chr = '�'; - else if ( (a == 'm') && (b == 'd') ) chr = 'Ã'; - else if ( (a == 'o') && (b == 'd') ) chr = 'ã'; + else if ( (a == 'm') && (b == 'd') ) chr = '�'; + else if ( (a == 'o') && (b == 'd') ) chr = '�'; - else if ( (a == 'm') && (b == 'e') ) chr = 'Ä'; - else if ( (a == 'o') && (b == 'e') ) chr = 'ä'; + else if ( (a == 'm') && (b == 'e') ) chr = '�'; + else if ( (a == 'o') && (b == 'e') ) chr = '�'; - else if ( (a == 'm') && (b == 'f') ) chr = 'Å'; - else if ( (a == 'o') && (b == 'f') ) chr = 'å'; + else if ( (a == 'm') && (b == 'f') ) chr = '�'; + else if ( (a == 'o') && (b == 'f') ) chr = '�'; - else if ( (a == 'm') && (b == 'g') ) chr = 'Æ'; - else if ( (a == 'o') && (b == 'g') ) chr = 'æ'; + else if ( (a == 'm') && (b == 'g') ) chr = '�'; + else if ( (a == 'o') && (b == 'g') ) chr = '�'; - else if ( (a == 'm') && (b == 'i') ) chr = 'È'; - else if ( (a == 'o') && (b == 'i') ) chr = 'è'; + else if ( (a == 'm') && (b == 'i') ) chr = '�'; + else if ( (a == 'o') && (b == 'i') ) chr = '�'; - else if ( (a == 'm') && (b == 'j') ) chr = 'É'; - else if ( (a == 'o') && (b == 'j') ) chr = 'é'; + else if ( (a == 'm') && (b == 'j') ) chr = '�'; + else if ( (a == 'o') && (b == 'j') ) chr = '�'; - else if ( (a == 'm') && (b == 'k') ) chr = 'Ê'; - else if ( (a == 'o') && (b == 'k') ) chr = 'ê'; + else if ( (a == 'm') && (b == 'k') ) chr = '�'; + else if ( (a == 'o') && (b == 'k') ) chr = '�'; - else if ( (a == 'm') && (b == 'l') ) chr = 'Ë'; - else if ( (a == 'o') && (b == 'l') ) chr = 'ë'; + else if ( (a == 'm') && (b == 'l') ) chr = '�'; + else if ( (a == 'o') && (b == 'l') ) chr = '�'; - else if ( (a == 'm') && (b == 'm') ) chr = 'Ì'; - else if ( (a == 'o') && (b == 'm') ) chr = 'ì'; + else if ( (a == 'm') && (b == 'm') ) chr = '�'; + else if ( (a == 'o') && (b == 'm') ) chr = '�'; - else if ( (a == 'm') && (b == 'n') ) chr = 'Í'; - else if ( (a == 'o') && (b == 'n') ) chr = 'í'; + else if ( (a == 'm') && (b == 'n') ) chr = '�'; + else if ( (a == 'o') && (b == 'n') ) chr = '�'; - else if ( (a == 'm') && (b == 'o') ) chr = 'Î'; - else if ( (a == 'o') && (b == 'o') ) chr = 'î'; + else if ( (a == 'm') && (b == 'o') ) chr = '�'; + else if ( (a == 'o') && (b == 'o') ) chr = '�'; - else if ( (a == 'm') && (b == 'p') ) chr = 'Ï'; - else if ( (a == 'o') && (b == 'p') ) chr = 'ï'; + else if ( (a == 'm') && (b == 'p') ) chr = '�'; + else if ( (a == 'o') && (b == 'p') ) chr = '�'; - else if ( (a == 'n') && (b == 'b') ) chr = 'Ñ'; - else if ( (a == 'p') && (b == 'b') ) chr = 'ñ'; + else if ( (a == 'n') && (b == 'b') ) chr = '�'; + else if ( (a == 'p') && (b == 'b') ) chr = '�'; - else if ( (a == 'k') && (b == 'c') ) chr = '¢'; - else if ( (a == 'k') && (b == 'j') ) chr = '©'; - else if ( (a == 'l') && (b == 'f') ) chr = 'µ'; - else if ( (a == 'n') && (b == 'i') ) chr = 'Ø'; - else if ( (a == 'p') && (b == 'i') ) chr = 'ø'; + else if ( (a == 'k') && (b == 'c') ) chr = '�'; + else if ( (a == 'k') && (b == 'j') ) chr = '�'; + else if ( (a == 'l') && (b == 'f') ) chr = '�'; + else if ( (a == 'n') && (b == 'i') ) chr = '�'; + else if ( (a == 'p') && (b == 'i') ) chr = '�'; - else if ( (a == 'l') && (b == 'j') ) chr = '¹'; - else if ( (a == 'l') && (b == 'c') ) chr = '²'; - else if ( (a == 'l') && (b == 'd') ) chr = '³'; + else if ( (a == 'l') && (b == 'j') ) chr = '�'; + else if ( (a == 'l') && (b == 'c') ) chr = '�'; + else if ( (a == 'l') && (b == 'd') ) chr = '�'; - else if ( (a == 'l') && (b == 'm') ) chr = '¼'; - else if ( (a == 'l') && (b == 'n') ) chr = '½'; - else if ( (a == 'l') && (b == 'o') ) chr = '¾'; + else if ( (a == 'l') && (b == 'm') ) chr = '�'; + else if ( (a == 'l') && (b == 'n') ) chr = '�'; + else if ( (a == 'l') && (b == 'o') ) chr = '�'; - else if ( (a == 'l') && (b == 'a') ) chr = '°'; + else if ( (a == 'l') && (b == 'a') ) chr = '�'; - else if ( (a == 'k') && (b == 'o') ) chr = '®'; - else if ( (a == 'k') && (b == 'h') ) chr = '§'; - else if ( (a == 'k') && (b == 'd') ) chr = '£'; + else if ( (a == 'k') && (b == 'o') ) chr = '�'; + else if ( (a == 'k') && (b == 'h') ) chr = '�'; + else if ( (a == 'k') && (b == 'd') ) chr = '�'; - else if ( (a == 'p') && (b == 'a') ) chr = 'ð'; - else if ( (a == 'n') && (b == 'a') ) chr = 'Ð'; + else if ( (a == 'p') && (b == 'a') ) chr = '�'; + else if ( (a == 'n') && (b == 'a') ) chr = '�'; - else if ( (a == 'l') && (b == 'l') ) chr = '»'; - else if ( (a == 'k') && (b == 'l') ) chr = '«'; + else if ( (a == 'l') && (b == 'l') ) chr = '�'; + else if ( (a == 'k') && (b == 'l') ) chr = '�'; - else if ( (a == 'l') && (b == 'k') ) chr = 'º'; + else if ( (a == 'l') && (b == 'k') ) chr = '�'; - else if ( (a == 'l') && (b == 'h') ) chr = '·'; + else if ( (a == 'l') && (b == 'h') ) chr = '�'; - else if ( (a == 'k') && (b == 'b') ) chr = '¡'; + else if ( (a == 'k') && (b == 'b') ) chr = '�'; - else if ( (a == 'k') && (b == 'e') ) chr = '¤'; + else if ( (a == 'k') && (b == 'e') ) chr = '�'; - else if ( (a == 'l') && (b == 'b') ) chr = '±'; + else if ( (a == 'l') && (b == 'b') ) chr = '�'; - else if ( (a == 'l') && (b == 'p') ) chr = '¿'; + else if ( (a == 'l') && (b == 'p') ) chr = '�'; - else if ( (a == 'k') && (b == 'f') ) chr = '¥'; + else if ( (a == 'k') && (b == 'f') ) chr = '�'; - else if ( (a == 'p') && (b == 'o') ) chr = 'þ'; - else if ( (a == 'n') && (b == 'o') ) chr = 'Þ'; + else if ( (a == 'p') && (b == 'o') ) chr = '�'; + else if ( (a == 'n') && (b == 'o') ) chr = '�'; - else if ( (a == 'n') && (b == 'n') ) chr = 'Ý'; - else if ( (a == 'p') && (b == 'n') ) chr = 'ý'; - else if ( (a == 'p') && (b == 'p') ) chr = 'ÿ'; + else if ( (a == 'n') && (b == 'n') ) chr = '�'; + else if ( (a == 'p') && (b == 'n') ) chr = '�'; + else if ( (a == 'p') && (b == 'p') ) chr = '�'; - else if ( (a == 'k') && (b == 'k') ) chr = 'ª'; + else if ( (a == 'k') && (b == 'k') ) chr = '�'; - else if ( (a == 'k') && (b == 'm') ) chr = '¬'; - else if ( (a == 'p') && (b == 'h') ) chr = '÷'; + else if ( (a == 'k') && (b == 'm') ) chr = '�'; + else if ( (a == 'p') && (b == 'h') ) chr = '�'; else if ( (a == 'k') && (b == 'g') ) chr = '|'; else if ( (a == 'l') && (b == 'e') ) chr = '\''; - else if ( (a == 'k') && (b == 'i') ) chr = '¨'; + else if ( (a == 'k') && (b == 'i') ) chr = '�'; - else if ( (a == 'k') && (b == 'n') ) chr = ''; + else if ( (a == 'k') && (b == 'n') ) chr = '�'; - else if ( (a == 'k') && (b == 'p') ) chr = '¯'; + else if ( (a == 'k') && (b == 'p') ) chr = '�'; - else if ( (a == 'l') && (b == 'g') ) chr = '¶'; + else if ( (a == 'l') && (b == 'g') ) chr = '�'; - else if ( (a == 'l') && (b == 'i') ) chr = '¸'; + else if ( (a == 'l') && (b == 'i') ) chr = '�'; - else if ( (a == 'm') && (b == 'h') ) chr = 'Ç'; - else if ( (a == 'o') && (b == 'h') ) chr = 'ç'; + else if ( (a == 'm') && (b == 'h') ) chr = '�'; + else if ( (a == 'o') && (b == 'h') ) chr = '�'; - else if ( (a == 'n') && (b == 'h') ) chr = '×'; + else if ( (a == 'n') && (b == 'h') ) chr = '�'; - else if ( (a == 'k') && (b == 'a') ) chr = ' '; + else if ( (a == 'k') && (b == 'a') ) chr = '�'; else if ( (a == 'a') && (b == 'j') ) chr = '!'; @@ -838,16 +838,16 @@ APPLIXSPREADImport::specCharfind (QChar a, QChar b) * function: writePen * ******************************************************************************/ void -APPLIXSPREADImport::writePen (QString &str, int penwidth, int penstyle, QString framecolor) +APPLIXSPREADImport::writePen (TQString &str, int penwidth, int penstyle, TQString framecolor) { str += " <pen width=\""; // width of the pen - str += QString::number (penwidth); + str += TQString::number (penwidth); str += "\" style=\""; // style of the pen - str += QString::number (penstyle); + str += TQString::number (penstyle); str += "\" color=\""; // color of the pen @@ -861,7 +861,7 @@ APPLIXSPREADImport::writePen (QString &str, int penwidth, int penstyle, QString /****************************************************************************** * function: writeColor * ******************************************************************************/ -QString +TQString APPLIXSPREADImport::writeColor (t_mycolor *mc) { char rgb[20]; @@ -871,7 +871,7 @@ APPLIXSPREADImport::writeColor (t_mycolor *mc) // mc->c, mc->m, mc->y, mc->k); sprintf (rgb, "#%02X%02X%02X", mc->r, mc->g, mc->b); - QString bla = rgb; + TQString bla = rgb; return bla; @@ -884,10 +884,10 @@ APPLIXSPREADImport::writeColor (t_mycolor *mc) * function: readTypefaceTable * ******************************************************************************/ void -APPLIXSPREADImport::readTypefaceTable (QTextStream &stream, QStringList &typefacetab) +APPLIXSPREADImport::readTypefaceTable (TQTextStream &stream, TQStringList &typefacetab) { int tftabCounter=0, ok; - QString mystr; + TQString mystr; // Read the colormap kdDebug()<<"Reading typeface table: \n"; @@ -915,11 +915,11 @@ APPLIXSPREADImport::readTypefaceTable (QTextStream &stream, QStringList &typefa * function: readColormap * ******************************************************************************/ void -APPLIXSPREADImport::readColormap (QTextStream &stream, QPtrList<t_mycolor> &mcol) +APPLIXSPREADImport::readColormap (TQTextStream &stream, TQPtrList<t_mycolor> &mcol) { int contcount, ok, pos; - QString colstr, mystr; + TQString colstr, mystr; kdDebug ()<<"Reading colormap: \n"; ok = true; @@ -936,12 +936,12 @@ APPLIXSPREADImport::readColormap (QTextStream &stream, QPtrList<t_mycolor> &mco kdDebug()<<" -> "<< mystr<<endl; // Count the number of whitespaces - contcount = mystr.contains (' '); + contcount = mystr.tqcontains (' '); kdDebug()<< "contcount: "<< contcount<<endl; contcount -= 5; // Begin off interest - pos = mystr.find (" 0 "); + pos = mystr.tqfind (" 0 "); // get colorname colstr = mystr.left (pos); @@ -993,10 +993,10 @@ APPLIXSPREADImport::readColormap (QTextStream &stream, QPtrList<t_mycolor> &mco * function: readColormap * ******************************************************************************/ void -APPLIXSPREADImport::readView (QTextStream &stream, QString instr, t_rc &rc) +APPLIXSPREADImport::readView (TQTextStream &stream, TQString instr, t_rc &rc) { - QString rowcolstr; - QString mystr, tabname; + TQString rowcolstr; + TQString mystr, tabname; int ok; kdDebug()<<"Reading View\n"; @@ -1027,15 +1027,15 @@ APPLIXSPREADImport::readView (QTextStream &stream, QString instr, t_rc &rc) char ccolumn; // loop - QStringList ColumnList; - ColumnList = QStringList::split (' ', mystr); + TQStringList ColumnList; + ColumnList = TQStringList::split (' ', mystr); - for ( QStringList::Iterator it = ColumnList.begin(); it != ColumnList.end(); ++it ) + for ( TQStringList::Iterator it = ColumnList.begin(); it != ColumnList.end(); ++it ) { sscanf ((*it).latin1(), "%c:%d", &ccolumn, &colwidth); int len = (*it).length (); - int pos = (*it).find (":"); + int pos = (*it).tqfind (":"); (*it).remove (pos, len-pos); printf( " >%s<- -<%c><%d> \n", (*it).latin1(), ccolumn, colwidth); @@ -1049,9 +1049,9 @@ APPLIXSPREADImport::readView (QTextStream &stream, QString instr, t_rc &rc) rowcolstr += " <column width=\""; - rowcolstr += QString::number (colwidth); + rowcolstr += TQString::number (colwidth); rowcolstr += "\" column=\""; - rowcolstr += QString::number (icolumn); + rowcolstr += TQString::number (icolumn); rowcolstr += "\" >\n"; rowcolstr += " <format/>\n"; rowcolstr += " </column>\n"; @@ -1068,10 +1068,10 @@ APPLIXSPREADImport::readView (QTextStream &stream, QString instr, t_rc &rc) int irow, rowheight; // loop - QStringList RowList; - RowList = QStringList::split (' ', mystr); + TQStringList RowList; + RowList = TQStringList::split (' ', mystr); - for ( QStringList::Iterator it = RowList.begin(); it != RowList.end(); ++it ) + for ( TQStringList::Iterator it = RowList.begin(); it != RowList.end(); ++it ) { sscanf ((*it).latin1(), " %d:%d", &irow, &rowheight); @@ -1079,9 +1079,9 @@ APPLIXSPREADImport::readView (QTextStream &stream, QString instr, t_rc &rc) if (rowheight > 32768) rowheight -= 32768; printf (" height: %2d\n", rowheight); rowcolstr += " <row row=\""; - rowcolstr += QString::number (irow); + rowcolstr += TQString::number (irow); rowcolstr += "\" height=\""; - rowcolstr += QString::number (rowheight); + rowcolstr += TQString::number (rowheight); rowcolstr += "\" >\n"; rowcolstr += " <format/>\n"; rowcolstr += " </row>\n"; @@ -1112,15 +1112,15 @@ APPLIXSPREADImport::readView (QTextStream &stream, QString instr, t_rc &rc) * function: filterSHFGBG * ******************************************************************************/ void -APPLIXSPREADImport::filterSHFGBG (QString it, int *style, int *bgcolor, +APPLIXSPREADImport::filterSHFGBG (TQString it, int *style, int *bgcolor, int *fgcolor) { - QString tmpstr; + TQString tmpstr; int pos; int m2=0, m3=0; // filter SH = Brushstyle Background - pos = it.find ("SH"); + pos = it.tqfind ("SH"); if (pos > -1) { tmpstr = it; @@ -1134,7 +1134,7 @@ APPLIXSPREADImport::filterSHFGBG (QString it, int *style, int *bgcolor, // filter FG = FGCOLOR - pos = it.find ("FG"); + pos = it.tqfind ("FG"); if (pos > -1) { tmpstr = it; @@ -1148,7 +1148,7 @@ APPLIXSPREADImport::filterSHFGBG (QString it, int *style, int *bgcolor, // filter BG = BGCOLOR - pos = it.find ("BG"); + pos = it.tqfind ("BG"); if (pos > -1) { tmpstr = it; @@ -1202,7 +1202,7 @@ APPLIXSPREADImport::filterSHFGBG (QString it, int *style, int *bgcolor, * function: filterSHFGBG * ******************************************************************************/ void -APPLIXSPREADImport::transPenFormat (QString it, int *PenWidth, int *PenStyle) +APPLIXSPREADImport::transPenFormat (TQString it, int *PenWidth, int *PenStyle) { if ( it[1] == '1' ) @@ -1245,9 +1245,9 @@ APPLIXSPREADImport::transPenFormat (QString it, int *PenWidth, int *PenStyle) * function: readHeader * ******************************************************************************/ int -APPLIXSPREADImport::readHeader (QTextStream &stream) +APPLIXSPREADImport::readHeader (TQTextStream &stream) { - QString mystr; + TQString mystr; int vers[3] = { 0, 0, 0 }; int rueck; @@ -1265,10 +1265,10 @@ APPLIXSPREADImport::readHeader (QTextStream &stream) printf ("Header not correkt - May be it is not an applixspreadsheet file\n"); printf ("Headerline: <%s>\n", mystr.latin1()); - QMessageBox::critical (0L, "Applix spreadsheet header problem", - QString ("The Applix Spreadsheet header is not correct. " + TQMessageBox::critical (0L, "Applix spreadsheet header problem", + TQString ("The Applix Spreadsheet header is not correct. " "May be it is not an applix spreadsheet file! <BR>" - "This is the header line I did read:<BR><B>%1</B>").arg(mystr.latin1()), + "This is the header line I did read:<BR><B>%1</B>").tqarg(mystr.latin1()), "Okay"); @@ -1286,7 +1286,7 @@ APPLIXSPREADImport::readHeader (QTextStream &stream) * function: translateRowNumber * ******************************************************************************/ int -APPLIXSPREADImport::translateColumnNumber (QString colstr) +APPLIXSPREADImport::translateColumnNumber (TQString colstr) { int icol=0; int p, x, len; diff --git a/filters/kspread/applixspread/applixspreadimport.h b/filters/kspread/applixspread/applixspreadimport.h index 31452e00..048a22e7 100644 --- a/filters/kspread/applixspread/applixspreadimport.h +++ b/filters/kspread/applixspread/applixspreadimport.h @@ -20,11 +20,11 @@ #ifndef APPLIXSPREADIMPORT_H #define APPLIXSPREADIMPORT_H -#include <qstring.h> -#include <qfile.h> -#include <qobject.h> -#include <qtextstream.h> -#include <qptrlist.h> +#include <tqstring.h> +#include <tqfile.h> +#include <tqobject.h> +#include <tqtextstream.h> +#include <tqptrlist.h> #include <KoFilter.h> #include <KoStore.h> @@ -43,33 +43,34 @@ typedef struct typedef struct { - QStringList tabname; - QStringList rc; + TQStringList tabname; + TQStringList rc; } t_rc; class APPLIXSPREADImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - APPLIXSPREADImport ( QObject *parent, const char* name, const QStringList& ); + APPLIXSPREADImport ( TQObject *tqparent, const char* name, const TQStringList& ); virtual ~APPLIXSPREADImport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); protected: - QString nextLine (QTextStream &); - QChar specCharfind (QChar , QChar ); - void writePen (QString &, int, int, QString); - QString writeColor (t_mycolor *); - void readTypefaceTable (QTextStream &, QStringList &); - void readColormap (QTextStream &, QPtrList<t_mycolor> &); - void readView (QTextStream &, QString, t_rc &); - void filterSHFGBG (QString, int *, int *, int *); - void transPenFormat (QString, int *, int *); - int readHeader (QTextStream &); - int translateColumnNumber (QString); + TQString nextLine (TQTextStream &); + TQChar specCharfind (TQChar , TQChar ); + void writePen (TQString &, int, int, TQString); + TQString writeColor (t_mycolor *); + void readTypefaceTable (TQTextStream &, TQStringList &); + void readColormap (TQTextStream &, TQPtrList<t_mycolor> &); + void readView (TQTextStream &, TQString, t_rc &); + void filterSHFGBG (TQString, int *, int *, int *); + void transPenFormat (TQString, int *, int *); + int readHeader (TQTextStream &); + int translateColumnNumber (TQString); private: int m_stepsize; diff --git a/filters/kspread/applixspread/status.html b/filters/kspread/applixspread/status.html index c944ef5c..968bf333 100644 --- a/filters/kspread/applixspread/status.html +++ b/filters/kspread/applixspread/status.html @@ -53,7 +53,7 @@ - tests the headline of the document<br> - converts <, >, &, to &lt; &gt; &amp;<br> - converts all applix special characters<br> - - converts fontsize, fontcolor, horizontal and vertical alignment, bold, italic, underline<br> + - converts fontsize, fontcolor, horizontal and vertical tqalignment, bold, italic, underline<br> - eats long text strings (more than one row in inputfile)<br> - converts different tables inside of one document<br> - cellformat: background color, brushstyles, brushcolor<br> @@ -352,43 +352,43 @@ <spacer size="20"><U>6.1.1. Part 1 - Alignment format</U><BR> - <spacer size="30">This is the alignment format for vertical, horizontal alignment<BR> + <spacer size="30">This is the tqalignment format for vertical, horizontal tqalignment<BR> <spacer size="30"> <TABLE CELLPADDING="0" BORDER="0"> <TR> <TD>6.1.1.1 </TD> <TD><B>1</B></TD> - <TD>horizontal alignment</TD> + <TD>horizontal tqalignment</TD> <TD>left</TD> </TR> <TR> <TD>6.1.1.2 </TD> <TD><B>2</B></TD> - <TD>horizontal alignment</TD> + <TD>horizontal tqalignment</TD> <TD>right</TD> </TR> <TR> <TD>6.1.1.3 </TD> <TD><B>3</B></TD> - <TD>horizontal alignment</TD> + <TD>horizontal tqalignment</TD> <TD>center</TD> </TR> <TR> <TD>6.1.1.4 </TD> <TD><B>VT</B></TD> - <TD>vertical alignment</TD> + <TD>vertical tqalignment</TD> <TD>top</TD> </TR> <TR> <TD>6.1.1.5 </TD> <TD><B>VC</B></TD> - <TD>vertical alignment</TD> + <TD>vertical tqalignment</TD> <TD>center</TD> </TR> <TR> <TD>6.1.1.5 </TD> <TD><B>VB</B></TD> - <TD>vertical alignment</TD> + <TD>vertical tqalignment</TD> <TD>bottom</TD> </TR> <TR> @@ -402,7 +402,7 @@ <spacer size="20"><U>6.1.2. Part 2 - Text format</U><BR> - <spacer size="30">This is the alignment format for the text<BR> + <spacer size="30">This is the tqalignment format for the text<BR> <spacer size="30"> <TABLE CELLPADDING="0" BORDER="0"> <TR> @@ -441,7 +441,7 @@ <spacer size="20"><U>6.1.3. Part 3 - Cell format</U><BR> - <spacer size="30">This is the alignment format for the text<BR> + <spacer size="30">This is the tqalignment format for the text<BR> <spacer size="30"> <TABLE CELLPADDING="0" BORDER="0"> <TR> diff --git a/filters/kspread/csv/csvdialog.cpp b/filters/kspread/csv/csvdialog.cpp index 2757e72b..f6fae839 100644 --- a/filters/kspread/csv/csvdialog.cpp +++ b/filters/kspread/csv/csvdialog.cpp @@ -21,17 +21,17 @@ #include <dialogui.h> #include <csvdialog.h> -#include <qtable.h> -#include <qcheckbox.h> -#include <qcursor.h> -#include <qlineedit.h> -#include <qcombobox.h> -#include <qspinbox.h> -#include <qtextstream.h> -#include <qbuttongroup.h> -#include <qpushbutton.h> -#include <qradiobutton.h> -#include <qtextcodec.h> +#include <tqtable.h> +#include <tqcheckbox.h> +#include <tqcursor.h> +#include <tqlineedit.h> +#include <tqcombobox.h> +#include <tqspinbox.h> +#include <tqtextstream.h> +#include <tqbuttongroup.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> +#include <tqtextcodec.h> #include <kapplication.h> #include <kconfig.h> @@ -41,8 +41,8 @@ #include <kmessagebox.h> #include <kcharsets.h> -CSVDialog::CSVDialog(QWidget* parent, QByteArray& fileArray, const QString /*seperator*/) - : KDialogBase(parent, 0, true, QString::null, Ok|Cancel, No, true), +CSVDialog::CSVDialog(TQWidget* tqparent, TQByteArray& fileArray, const TQString /*seperator*/) + : KDialogBase(tqparent, 0, true, TQString(), Ok|Cancel, No, true), m_adjustRows(false), m_adjustCols(false), m_startRow(0), @@ -54,20 +54,20 @@ CSVDialog::CSVDialog(QWidget* parent, QByteArray& fileArray, const QString /*sep m_ignoreDups(false), m_fileArray(fileArray), m_dialog(new DialogUI(this)), - m_codec( QTextCodec::codecForName( "UTF-8" ) ) + m_codec( TQTextCodec::codecForName( "UTF-8" ) ) { setCaption( i18n( "Import" ) ); kapp->restoreOverrideCursor(); - QStringList encodings; - encodings << i18n( "Descriptive encoding name", "Recommended ( %1 )" ).arg( "UTF-8" ); - encodings << i18n( "Descriptive encoding name", "Locale ( %1 )" ).arg( QTextCodec::codecForLocale()->name() ); + TQStringList encodings; + encodings << i18n( "Descriptive encoding name", "Recommended ( %1 )" ).tqarg( "UTF-8" ); + encodings << i18n( "Descriptive encoding name", "Locale ( %1 )" ).tqarg( TQTextCodec::codecForLocale()->name() ); encodings += KGlobal::charsets()->descriptiveEncodingNames(); // Add a few non-standard encodings, which might be useful for text files - const QString description(i18n("Descriptive encoding name","Other ( %1 )")); - encodings << description.arg("Apple Roman"); // Apple - encodings << description.arg("IBM 850") << description.arg("IBM 866"); // MS DOS - encodings << description.arg("CP 1258"); // Windows + const TQString description(i18n("Descriptive encoding name","Other ( %1 )")); + encodings << description.tqarg("Apple Roman"); // Apple + encodings << description.tqarg("IBM 850") << description.tqarg("IBM 866"); // MS DOS + encodings << description.tqarg("CP 1258"); // Windows m_dialog->comboBoxEncoding->insertStringList(encodings); m_formatList << i18n( "Text" ); @@ -84,36 +84,36 @@ CSVDialog::CSVDialog(QWidget* parent, QByteArray& fileArray, const QString /*sep fillTable(); - //resize(sizeHint()); + //resize(tqsizeHint()); resize( 600, 400 ); // Try to show as much as possible of the table view setMainWidget(m_dialog); - m_dialog->m_sheet->setSelectionMode( QTable::Multi ); - - connect(m_dialog->m_formatComboBox, SIGNAL(activated( const QString& )), - this, SLOT(formatChanged( const QString& ))); - connect(m_dialog->m_delimiterBox, SIGNAL(clicked(int)), - this, SLOT(delimiterClicked(int))); - connect(m_dialog->m_delimiterEdit, SIGNAL(returnPressed()), - this, SLOT(returnPressed())); - connect(m_dialog->m_delimiterEdit, SIGNAL(textChanged ( const QString & )), - this, SLOT(formatChanged ( const QString & ) )); - connect(m_dialog->m_comboQuote, SIGNAL(activated(const QString &)), - this, SLOT(textquoteSelected(const QString &))); - connect(m_dialog->m_sheet, SIGNAL(currentChanged(int, int)), - this, SLOT(currentCellChanged(int, int))); - connect(m_dialog->m_ignoreDuplicates, SIGNAL(stateChanged(int)), - this, SLOT(ignoreDuplicatesChanged(int))); - connect(m_dialog->m_updateButton, SIGNAL(clicked()), - this, SLOT(updateClicked())); - connect(m_dialog->comboBoxEncoding, SIGNAL(textChanged ( const QString & )), - this, SLOT(encodingChanged ( const QString & ) )); + m_dialog->m_sheet->setSelectionMode( TQTable::Multi ); + + connect(m_dialog->m_formatComboBox, TQT_SIGNAL(activated( const TQString& )), + this, TQT_SLOT(formatChanged( const TQString& ))); + connect(m_dialog->m_delimiterBox, TQT_SIGNAL(clicked(int)), + this, TQT_SLOT(delimiterClicked(int))); + connect(m_dialog->m_delimiterEdit, TQT_SIGNAL(returnPressed()), + this, TQT_SLOT(returnPressed())); + connect(m_dialog->m_delimiterEdit, TQT_SIGNAL(textChanged ( const TQString & )), + this, TQT_SLOT(formatChanged ( const TQString & ) )); + connect(m_dialog->m_comboQuote, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(textquoteSelected(const TQString &))); + connect(m_dialog->m_sheet, TQT_SIGNAL(currentChanged(int, int)), + this, TQT_SLOT(currentCellChanged(int, int))); + connect(m_dialog->m_ignoreDuplicates, TQT_SIGNAL(stateChanged(int)), + this, TQT_SLOT(ignoreDuplicatesChanged(int))); + connect(m_dialog->m_updateButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(updateClicked())); + connect(m_dialog->comboBoxEncoding, TQT_SIGNAL(textChanged ( const TQString & )), + this, TQT_SLOT(encodingChanged ( const TQString & ) )); } CSVDialog::~CSVDialog() { saveSettings(); - kapp->setOverrideCursor(Qt::waitCursor); + kapp->setOverrideCursor(TQt::waitCursor); } void CSVDialog::loadSettings() @@ -123,7 +123,7 @@ void CSVDialog::loadSettings() m_textquote = config->readEntry("textquote", "\"")[0]; m_delimiter = config->readEntry("delimiter", ","); m_ignoreDups = config->readBoolEntry("ignoreDups", false); - const QString codecText = config->readEntry("codec", ""); + const TQString codecText = config->readEntry("codec", ""); // update widgets if (!codecText.isEmpty()) { @@ -147,7 +147,7 @@ void CSVDialog::saveSettings() { KConfig *config = kapp->config(); config->setGroup("CSVDialog Settings"); - QString q = m_textquote; + TQString q = m_textquote; config->writeEntry("textquote", q); config->writeEntry("delimiter", m_delimiter); config->writeEntry("ignoreDups", m_ignoreDups); @@ -159,13 +159,13 @@ void CSVDialog::fillTable( ) { int row, column; bool lastCharDelimiter = false; - enum { S_START, S_QUOTED_FIELD, S_MAYBE_END_OF_QUOTED_FIELD, S_END_OF_QUOTED_FIELD, + enum { S_START, S_TQUOTED_FIELD, S_MAYBE_END_OF_TQUOTED_FIELD, S_END_OF_TQUOTED_FIELD, S_MAYBE_NORMAL_FIELD, S_NORMAL_FIELD } state = S_START; - QChar x; - QString field; + TQChar x; + TQString field; - kapp->setOverrideCursor(Qt::waitCursor); + kapp->setOverrideCursor(TQt::waitCursor); for (row = 0; row < m_dialog->m_sheet->numRows(); ++row) for (column = 0; column < m_dialog->m_sheet->numCols(); ++column) @@ -173,7 +173,7 @@ void CSVDialog::fillTable( ) int maxColumn = 1; row = column = 1; - QTextStream inputStream(m_fileArray, IO_ReadOnly); + TQTextStream inputStream(m_fileArray, IO_ReadOnly); kdDebug(30501) << "Encoding: " << m_codec->name() << endl; inputStream.setCodec( m_codec ); @@ -195,7 +195,7 @@ void CSVDialog::fillTable( ) lastCharWasCr = false; continue; } - else if ( x == QChar( 0xc ) ) + else if ( x == TQChar( 0xc ) ) { // We have a FormFeed, skip it lastCharWasCr = false; @@ -214,7 +214,7 @@ void CSVDialog::fillTable( ) case S_START : if (x == m_textquote) { - state = S_QUOTED_FIELD; + state = S_TQUOTED_FIELD; } else if (x == m_delimiter) { @@ -235,26 +235,26 @@ void CSVDialog::fillTable( ) state = S_MAYBE_NORMAL_FIELD; } break; - case S_QUOTED_FIELD : + case S_TQUOTED_FIELD : if (x == m_textquote) { - state = S_MAYBE_END_OF_QUOTED_FIELD; + state = S_MAYBE_END_OF_TQUOTED_FIELD; } else { field += x; } break; - case S_MAYBE_END_OF_QUOTED_FIELD : + case S_MAYBE_END_OF_TQUOTED_FIELD : if (x == m_textquote) { field += x; - state = S_QUOTED_FIELD; + state = S_TQUOTED_FIELD; } else if (x == m_delimiter || x == '\n') { setText(row - m_startRow, column - m_startCol, field); - field = QString::null; + field = TQString(); if (x == '\n') { ++row; @@ -272,14 +272,14 @@ void CSVDialog::fillTable( ) } else { - state = S_END_OF_QUOTED_FIELD; + state = S_END_OF_TQUOTED_FIELD; } break; - case S_END_OF_QUOTED_FIELD : + case S_END_OF_TQUOTED_FIELD : if (x == m_delimiter || x == '\n') { setText(row - m_startRow, column - m_startCol, field); - field = QString::null; + field = TQString(); if (x == '\n') { ++row; @@ -299,15 +299,15 @@ void CSVDialog::fillTable( ) case S_MAYBE_NORMAL_FIELD : if (x == m_textquote) { - field = QString::null; - state = S_QUOTED_FIELD; + field = TQString(); + state = S_TQUOTED_FIELD; break; } case S_NORMAL_FIELD : if (x == m_delimiter || x == '\n') { setText(row - m_startRow, column - m_startCol, field); - field = QString::null; + field = TQString(); if (x == '\n') { ++row; @@ -337,7 +337,7 @@ void CSVDialog::fillTable( ) // the last line of the file had not any line end setText(row - m_startRow, column - m_startCol, field); ++row; - field = QString::null; + field = TQString(); } m_adjustCols = true; @@ -350,8 +350,8 @@ void CSVDialog::fillTable( ) for (column = 0; column < m_dialog->m_sheet->numCols(); ++column) { - const QString header = m_dialog->m_sheet->horizontalHeader()->label(column); - if ( m_formatList.find( header ) == m_formatList.end() ) + const TQString header = m_dialog->m_sheet->horizontalHeader()->label(column); + if ( m_formatList.tqfind( header ) == m_formatList.end() ) m_dialog->m_sheet->horizontalHeader()->setLabel(column, i18n("Text")); m_dialog->m_sheet->adjustColumn(column); @@ -410,7 +410,7 @@ int CSVDialog::getCols() int CSVDialog::getHeader(int col) { - QString header = m_dialog->m_sheet->horizontalHeader()->label(col); + TQString header = m_dialog->m_sheet->horizontalHeader()->label(col); if (header == i18n("Text")) return TEXT; @@ -428,12 +428,12 @@ int CSVDialog::getHeader(int col) return TEXT; // Should not happen } -QString CSVDialog::getText(int row, int col) +TQString CSVDialog::getText(int row, int col) { return m_dialog->m_sheet->text( row, col ); } -void CSVDialog::setText(int row, int col, const QString& text) +void CSVDialog::setText(int row, int col, const TQString& text) { if ( row < 1 || col < 1 ) // skipped by the user return; @@ -494,18 +494,18 @@ void CSVDialog::returnPressed() fillTable(); } -void CSVDialog::textChanged ( const QString & ) +void CSVDialog::textChanged ( const TQString & ) { m_dialog->m_radioOther->setChecked ( true ); delimiterClicked(4); // other } -void CSVDialog::formatChanged( const QString& newValue ) +void CSVDialog::formatChanged( const TQString& newValue ) { //kdDebug(30501) << "CSVDialog::formatChanged:" << newValue << endl; for ( int i = 0; i < m_dialog->m_sheet->numSelections(); ++i ) { - QTableSelection select ( m_dialog->m_sheet->selection( i ) ); + TQTableSelection select ( m_dialog->m_sheet->selection( i ) ); for ( int j = select.leftCol(); j <= select.rightCol() ; ++j ) { m_dialog->m_sheet->horizontalHeader()->setLabel( j, newValue ); @@ -538,7 +538,7 @@ void CSVDialog::delimiterClicked(int id) fillTable(); } -void CSVDialog::textquoteSelected(const QString& mark) +void CSVDialog::textquoteSelected(const TQString& mark) { if (mark == i18n("None")) m_textquote = 0; @@ -576,7 +576,7 @@ bool CSVDialog::checkUpdateRange() void CSVDialog::currentCellChanged(int, int col) { - const QString header = m_dialog->m_sheet->horizontalHeader()->label(col); + const TQString header = m_dialog->m_sheet->horizontalHeader()->label(col); m_dialog->m_formatComboBox->setCurrentText( header ); } @@ -589,15 +589,15 @@ void CSVDialog::ignoreDuplicatesChanged(int) fillTable(); } -QTextCodec* CSVDialog::getCodec(void) const +TQTextCodec* CSVDialog::getCodec(void) const { - const QString strCodec( KGlobal::charsets()->encodingForName( m_dialog->comboBoxEncoding->currentText() ) ); + const TQString strCodec( KGlobal::charsets()->encodingForName( m_dialog->comboBoxEncoding->currentText() ) ); kdDebug(30502) << "Encoding: " << strCodec << endl; bool ok = false; - QTextCodec* codec = QTextCodec::codecForName( strCodec.utf8() ); + TQTextCodec* codec = TQTextCodec::codecForName( strCodec.utf8() ); - // If QTextCodec has not found a valid encoding, so try with KCharsets. + // If TQTextCodec has not found a valid encoding, so try with KCharsets. if ( codec ) { ok = true; @@ -612,17 +612,17 @@ QTextCodec* CSVDialog::getCodec(void) const { // Default: UTF-8 kdWarning(30502) << "Cannot find encoding:" << strCodec << endl; - // ### TODO: what parent to use? - KMessageBox::error( 0, i18n("Cannot find encoding: %1").arg( strCodec ) ); + // ### TODO: what tqparent to use? + KMessageBox::error( 0, i18n("Cannot find encoding: %1").tqarg( strCodec ) ); return 0; } return codec; } -void CSVDialog::encodingChanged ( const QString & ) +void CSVDialog::encodingChanged ( const TQString & ) { - QTextCodec* codec = getCodec(); + TQTextCodec* codec = getCodec(); if ( codec ) { diff --git a/filters/kspread/csv/csvdialog.h b/filters/kspread/csv/csvdialog.h index e73976e6..685bbf37 100644 --- a/filters/kspread/csv/csvdialog.h +++ b/filters/kspread/csv/csvdialog.h @@ -21,7 +21,7 @@ #ifndef CSVDIALOG_H #define CSVDIALOG_H -#include <qstringlist.h> +#include <tqstringlist.h> #include <kdialogbase.h> @@ -30,6 +30,7 @@ class DialogUI; class CSVDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: enum Header { @@ -41,24 +42,24 @@ public: POINTNUMBER ///< Number, which decimal symbol is a point/dot }; - CSVDialog(QWidget* parent, QByteArray& fileArray, const QString seperator); + CSVDialog(TQWidget* tqparent, TQByteArray& fileArray, const TQString seperator); ~CSVDialog(); int getRows(); int getCols(); int getHeader(int col); - QString getText(int row, int col); + TQString getText(int row, int col); private: void loadSettings(); void saveSettings(); void fillTable(); void fillComboBox(); - void setText(int row, int col, const QString& text); + void setText(int row, int col, const TQString& text); void adjustRows(int iRows); void adjustCols(int iCols); bool checkUpdateRange(); - QTextCodec* getCodec(void) const; + TQTextCodec* getCodec(void) const; bool m_adjustRows; bool m_adjustCols; @@ -66,24 +67,24 @@ private: int m_startCol; int m_endRow; int m_endCol; - QChar m_textquote; - QString m_delimiter; + TQChar m_textquote; + TQString m_delimiter; bool m_ignoreDups; - QByteArray m_fileArray; + TQByteArray m_fileArray; DialogUI * m_dialog; - QTextCodec* m_codec; - QStringList m_formatList; ///< List of the column formats + TQTextCodec* m_codec; + TQStringList m_formatList; ///< List of the column formats private slots: void returnPressed(); - void formatChanged( const QString& ); + void formatChanged( const TQString& ); void delimiterClicked(int id); - void textquoteSelected(const QString& mark); + void textquoteSelected(const TQString& mark); void currentCellChanged(int, int col); - void textChanged ( const QString & ); + void textChanged ( const TQString & ); void ignoreDuplicatesChanged( int ); void updateClicked(); - void encodingChanged ( const QString & ); + void encodingChanged ( const TQString & ); }; #endif diff --git a/filters/kspread/csv/csvexport.cc b/filters/kspread/csv/csvexport.cc index c2b99c2b..4e54a071 100644 --- a/filters/kspread/csv/csvexport.cc +++ b/filters/kspread/csv/csvexport.cc @@ -20,8 +20,8 @@ #include <csvexport.h> -#include <qfile.h> -#include <qtextcodec.h> +#include <tqfile.h> +#include <tqtextcodec.h> #include <kdebug.h> #include <kmessagebox.h> @@ -46,7 +46,7 @@ class Cell { public: int row, col; - QString text; + TQString text; bool operator < ( const Cell & c ) const { @@ -59,12 +59,12 @@ class Cell }; -CSVExport::CSVExport( KoFilter *, const char *, const QStringList & ) +CSVExport::CSVExport( KoFilter *, const char *, const TQStringList & ) : KoFilter(), m_eol("\n") { } -QString CSVExport::exportCSVCell( Sheet const * const sheet, int col, int row, QChar const & textQuote, QChar csvDelimiter ) +TQString CSVExport::exportCSVCell( Sheet const * const sheet, int col, int row, TQChar const & textQuote, TQChar csvDelimiter ) { // This function, given a cell, returns a string corresponding to its export in CSV format // It proceeds by: @@ -73,7 +73,7 @@ QString CSVExport::exportCSVCell( Sheet const * const sheet, int col, int row, Q // - enclosing the cell in quotes if the cell is non empty KSpread::Cell const * const cell = sheet->cellAt( col, row ); - QString text; + TQString text; if ( !cell->isDefault() && !cell->isEmpty() ) { @@ -93,18 +93,18 @@ QString CSVExport::exportCSVCell( Sheet const * const sheet, int col, int row, Q bool quote = false; if ( !text.isEmpty() ) { - if ( text.find( textQuote ) != -1 ) + if ( text.tqfind( textQuote ) != -1 ) { - QString doubleTextQuote(textQuote); + TQString doubleTextQuote(textQuote); doubleTextQuote.append(textQuote); - text.replace(textQuote, doubleTextQuote); + text.tqreplace(textQuote, doubleTextQuote); quote = true; } else if ( text[0].isSpace() || text[text.length()-1].isSpace() ) quote = true; - else if ( text.find( csvDelimiter ) != -1 ) + else if ( text.tqfind( csvDelimiter ) != -1 ) quote = true; - else if ( text.find( "\n" ) != -1 || text.find( "\r" ) != -1 ) + else if ( text.tqfind( "\n" ) != -1 || text.tqfind( "\r" ) != -1 ) quote = true; } @@ -116,9 +116,9 @@ QString CSVExport::exportCSVCell( Sheet const * const sheet, int col, int row, Q return text; } -// The reason why we use the KoDocument* approach and not the QDomDocument +// The reason why we use the KoDocument* approach and not the TQDomDocument // approach is because we don't want to export formulas but values ! -KoFilter::ConversionStatus CSVExport::convert( const QCString & from, const QCString & to ) +KoFilter::ConversiontqStatus CSVExport::convert( const TQCString & from, const TQCString & to ) { kdDebug(30501) << "CSVExport::convert" << endl; KoDocument* document = m_chain->inputDocument(); @@ -126,7 +126,7 @@ KoFilter::ConversionStatus CSVExport::convert( const QCString & from, const QCSt if ( !document ) return KoFilter::StupidError; - if ( !::qt_cast<const KSpread::Doc *>( document ) ) + if ( !::tqqt_cast<const KSpread::Doc *>( document ) ) { kdWarning(30501) << "document isn't a KSpread::Doc but a " << document->className() << endl; return KoFilter::NotImplemented; @@ -164,8 +164,8 @@ KoFilter::ConversionStatus CSVExport::convert( const QCString & from, const QCSt } } - QTextCodec* codec = 0; - QChar csvDelimiter; + TQTextCodec* codec = 0; + TQChar csvDelimiter; if (expDialog) { codec = expDialog->getCodec(); @@ -179,7 +179,7 @@ KoFilter::ConversionStatus CSVExport::convert( const QCString & from, const QCSt } else { - codec = QTextCodec::codecForName("UTF-8"); + codec = TQTextCodec::codecForName("UTF-8"); csvDelimiter = ','; } @@ -190,8 +190,8 @@ KoFilter::ConversionStatus CSVExport::convert( const QCString & from, const QCSt // Ok, for now we'll use the first sheet - my document has only one sheet anyway ;-))) bool first = true; - QString str; - QChar textQuote; + TQString str; + TQChar textQuote; if (expDialog) textQuote = expDialog->getTextQuote(); else @@ -210,7 +210,7 @@ KoFilter::ConversionStatus CSVExport::convert( const QCString & from, const QCSt Sheet const * const sheet = view->activeSheet(); - QRect selection = view->selectionInfo()->lastRange(); + TQRect selection = view->selectionInfo()->lastRange(); // Compute the highest row and column indexes (within the selection) // containing non-empty cells, respectively called CSVMaxRow CSVMaxCol. // The CSV will have CSVMaxRow rows, all with CSVMaxCol columns @@ -257,7 +257,7 @@ KoFilter::ConversionStatus CSVExport::convert( const QCString & from, const QCSt else { kdDebug(30501) << "Export as full mode" << endl; - QPtrListIterator<Sheet> it( ksdoc->map()->sheetList() ); + TQPtrListIterator<Sheet> it( ksdoc->map()->sheetList() ); for( ; it.current(); ++it ) { Sheet const * const sheet = it.current(); @@ -302,16 +302,16 @@ KoFilter::ConversionStatus CSVExport::convert( const QCString & from, const QCSt if ( !first) str += m_eol; - QString name; + TQString name; if (expDialog) name = expDialog->getSheetDelimiter(); else name = "********<SHEETNAME>********"; - const QString tname( i18n("<SHEETNAME>") ); - int pos = name.find( tname ); + const TQString tname( i18n("<SHEETNAME>") ); + int pos = name.tqfind( tname ); if ( pos != -1 ) { - name.replace( pos, tname.length(), sheet->sheetName() ); + name.tqreplace( pos, tname.length(), sheet->sheetName() ); } str += name; str += m_eol; @@ -336,16 +336,16 @@ KoFilter::ConversionStatus CSVExport::convert( const QCString & from, const QCSt i = 0; } - QString collect; // buffer delimiters while reading empty cells + TQString collect; // buffer delimiters while reading empty cells for ( int col = 1 ; col <= CSVMaxCol ; col++ ) { - const QString txt = exportCSVCell( sheet, col, row, textQuote, csvDelimiter ); + const TQString txt = exportCSVCell( sheet, col, row, textQuote, csvDelimiter ); // if we encounter a non-empty cell, commit the buffered delimiters if (!txt.isEmpty()) { str += collect + txt; - collect = QString(); + collect = TQString(); } collect += csvDelimiter; @@ -360,7 +360,7 @@ KoFilter::ConversionStatus CSVExport::convert( const QCString & from, const QCSt emit sigProgress(100); - QFile out(m_chain->outputFile()); + TQFile out(m_chain->outputFile()); if ( !out.open( IO_WriteOnly ) ) { kdError(30501) << "Unable to open output file!" << endl; @@ -369,7 +369,7 @@ KoFilter::ConversionStatus CSVExport::convert( const QCString & from, const QCSt return KoFilter::StupidError; } - QTextStream outStream( &out ); + TQTextStream outStream( &out ); outStream.setCodec( codec ); outStream << str; diff --git a/filters/kspread/csv/csvexport.h b/filters/kspread/csv/csvexport.h index 05ce65a0..53fd9efe 100644 --- a/filters/kspread/csv/csvexport.h +++ b/filters/kspread/csv/csvexport.h @@ -21,7 +21,7 @@ #ifndef CSVEXPORT_H #define CSVEXPORT_H -#include <qstring.h> +#include <tqstring.h> #include <KoFilter.h> namespace KSpread @@ -32,18 +32,19 @@ class Sheet; class CSVExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - CSVExport(KoFilter * parent, const char * name, const QStringList &); + CSVExport(KoFilter * tqparent, const char * name, const TQStringList &); virtual ~CSVExport() {} - virtual KoFilter::ConversionStatus convert( const QCString & from, const QCString & to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString & from, const TQCString & to ); private: - QString exportCSVCell( KSpread::Sheet const * const sheet, int col, int row, QChar const & textQuote, QChar delimiter ); + TQString exportCSVCell( KSpread::Sheet const * const sheet, int col, int row, TQChar const & textQuote, TQChar delimiter ); private: - QString m_eol; ///< End of line (LF, CR or CRLF) + TQString m_eol; ///< End of line (LF, CR or CRLF) }; #endif // CSVEXPORT_H diff --git a/filters/kspread/csv/csvexportdialog.cpp b/filters/kspread/csv/csvexportdialog.cpp index d095a9af..268f322b 100644 --- a/filters/kspread/csv/csvexportdialog.cpp +++ b/filters/kspread/csv/csvexportdialog.cpp @@ -24,19 +24,19 @@ #include <kspread_map.h> #include <kspread_sheet.h> -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qcursor.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qlistview.h> -#include <qptrlist.h> -#include <qradiobutton.h> -#include <qtextstream.h> -#include <qtabwidget.h> -#include <qtextcodec.h> -#include <qvalidator.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqcursor.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqlistview.h> +#include <tqptrlist.h> +#include <tqradiobutton.h> +#include <tqtextstream.h> +#include <tqtabwidget.h> +#include <tqtextcodec.h> +#include <tqvalidator.h> #include <kapplication.h> #include <kconfig.h> @@ -48,47 +48,47 @@ using namespace KSpread; -CSVExportDialog::CSVExportDialog( QWidget * parent ) - : KDialogBase( parent, 0, true, QString::null, Ok | Cancel, No, true ), +CSVExportDialog::CSVExportDialog( TQWidget * tqparent ) + : KDialogBase( tqparent, 0, true, TQString(), Ok | Cancel, No, true ), m_dialog( new ExportDialogUI( this ) ), m_delimiter( "," ), m_textquote('"') { kapp->restoreOverrideCursor(); - QStringList encodings; - encodings << i18n( "Descriptive encoding name", "Recommended ( %1 )" ).arg( "UTF-8" ); - encodings << i18n( "Descriptive encoding name", "Locale ( %1 )" ).arg( QTextCodec::codecForLocale()->name() ); + TQStringList encodings; + encodings << i18n( "Descriptive encoding name", "Recommended ( %1 )" ).tqarg( "UTF-8" ); + encodings << i18n( "Descriptive encoding name", "Locale ( %1 )" ).tqarg( TQTextCodec::codecForLocale()->name() ); encodings += KGlobal::charsets()->descriptiveEncodingNames(); // Add a few non-standard encodings, which might be useful for text files - const QString description(i18n("Descriptive encoding name","Other ( %1 )")); - encodings << description.arg("Apple Roman"); // Apple - encodings << description.arg("IBM 850") << description.arg("IBM 866"); // MS DOS - encodings << description.arg("CP 1258"); // Windows + const TQString description(i18n("Descriptive encoding name","Other ( %1 )")); + encodings << description.tqarg("Apple Roman"); // Apple + encodings << description.tqarg("IBM 850") << description.tqarg("IBM 866"); // MS DOS + encodings << description.tqarg("CP 1258"); // Windows m_dialog->comboBoxEncoding->insertStringList(encodings); - setButtonBoxOrientation ( Vertical ); + setButtonBoxOrientation (Qt::Vertical ); setMainWidget(m_dialog); // Invalid 'Other' delimiters // - Quotes // - CR,LF,Vetical-tab,Formfeed,ASCII bel - QRegExp rx( "^[^\"'\r\n\v\f\a]{0,1}$" ); - m_delimiterValidator = new QRegExpValidator( rx, m_dialog->m_delimiterBox ); + TQRegExp rx( "^[^\"'\r\n\v\f\a]{0,1}$" ); + m_delimiterValidator = new TQRegExpValidator( rx, TQT_TQOBJECT(m_dialog->m_delimiterBox) ); m_dialog->m_delimiterEdit->setValidator( m_delimiterValidator ); - connect( m_dialog->m_delimiterBox, SIGNAL( clicked(int) ), - this, SLOT( delimiterClicked( int ) ) ); - connect( m_dialog->m_delimiterEdit, SIGNAL( returnPressed() ), - this, SLOT( returnPressed() ) ); - connect( m_dialog->m_delimiterEdit, SIGNAL( textChanged ( const QString & ) ), - this, SLOT(textChanged ( const QString & ) ) ); - connect( m_dialog->m_comboQuote, SIGNAL( activated( const QString & ) ), - this, SLOT( textquoteSelected( const QString & ) ) ); - connect( m_dialog->m_selectionOnly, SIGNAL( toggled( bool ) ), - this, SLOT( selectionOnlyChanged( bool ) ) ); + connect( m_dialog->m_delimiterBox, TQT_SIGNAL( clicked(int) ), + this, TQT_SLOT( delimiterClicked( int ) ) ); + connect( m_dialog->m_delimiterEdit, TQT_SIGNAL( returnPressed() ), + this, TQT_SLOT( returnPressed() ) ); + connect( m_dialog->m_delimiterEdit, TQT_SIGNAL( textChanged ( const TQString & ) ), + this, TQT_SLOT(textChanged ( const TQString & ) ) ); + connect( m_dialog->m_comboQuote, TQT_SIGNAL( activated( const TQString & ) ), + this, TQT_SLOT( textquoteSelected( const TQString & ) ) ); + connect( m_dialog->m_selectionOnly, TQT_SIGNAL( toggled( bool ) ), + this, TQT_SLOT( selectionOnlyChanged( bool ) ) ); loadSettings(); } @@ -96,7 +96,7 @@ CSVExportDialog::CSVExportDialog( QWidget * parent ) CSVExportDialog::~CSVExportDialog() { saveSettings(); - kapp->setOverrideCursor(Qt::waitCursor); + kapp->setOverrideCursor(TQt::waitCursor); delete m_delimiterValidator; } @@ -106,11 +106,11 @@ void CSVExportDialog::loadSettings() config->setGroup("CSVDialog Settings"); m_textquote = config->readEntry("textquote", "\"")[0]; m_delimiter = config->readEntry("delimiter", ","); - const QString codecText = config->readEntry("codec", ""); + const TQString codecText = config->readEntry("codec", ""); bool selectionOnly = config->readBoolEntry("selectionOnly", false); - const QString sheetDelim = config->readEntry("sheetDelimiter", m_dialog->m_sheetDelimiter->text()); + const TQString sheetDelim = config->readEntry("sheetDelimiter", m_dialog->m_sheetDelimiter->text()); bool delimAbove = config->readBoolEntry("sheetDelimiterAbove", false); - const QString eol = config->readEntry("eol", "\r\n"); + const TQString eol = config->readEntry("eol", "\r\n"); // update widgets if (!codecText.isEmpty()) { @@ -138,7 +138,7 @@ void CSVExportDialog::saveSettings() { KConfig *config = kapp->config(); config->setGroup("CSVDialog Settings"); - QString q = m_textquote; + TQString q = m_textquote; config->writeEntry("textquote", q); config->writeEntry("delimiter", m_delimiter); config->writeEntry("codec", m_dialog->comboBoxEncoding->currentText()); @@ -152,14 +152,14 @@ void CSVExportDialog::saveSettings() void CSVExportDialog::fillSheet( Map * map ) { m_dialog->m_sheetList->clear(); - QCheckListItem * item; + TQCheckListItem * item; - QPtrListIterator<Sheet> it( map->sheetList() ); + TQPtrListIterator<Sheet> it( map->sheetList() ); for( ; it.current(); ++it ) { - item = new QCheckListItem( m_dialog->m_sheetList, + item = new TQCheckListItem( m_dialog->m_sheetList, it.current()->sheetName(), - QCheckListItem::CheckBox ); + TQCheckListItem::CheckBox ); item->setOn(true); m_dialog->m_sheetList->insertItem( item ); } @@ -169,12 +169,12 @@ void CSVExportDialog::fillSheet( Map * map ) m_dialog->m_sheetList->setSorting( -1 ); } -QChar CSVExportDialog::getDelimiter() const +TQChar CSVExportDialog::getDelimiter() const { return m_delimiter[0]; } -QChar CSVExportDialog::getTextQuote() const +TQChar CSVExportDialog::getTextQuote() const { return m_textquote; } @@ -184,18 +184,18 @@ bool CSVExportDialog::printAlwaysSheetDelimiter() const return m_dialog->m_delimiterAboveAll->isChecked(); } -QString CSVExportDialog::getSheetDelimiter() const +TQString CSVExportDialog::getSheetDelimiter() const { return m_dialog->m_sheetDelimiter->text(); } -bool CSVExportDialog::exportSheet(QString const & sheetName) const +bool CSVExportDialog::exportSheet(TQString const & sheetName) const { - for (QListViewItem * item = m_dialog->m_sheetList->firstChild(); item; item = item->nextSibling()) + for (TQListViewItem * item = m_dialog->m_sheetList->firstChild(); item; item = item->nextSibling()) { - if (((QCheckListItem * ) item)->isOn()) + if (((TQCheckListItem * ) item)->isOn()) { - if ( ((QCheckListItem * ) item)->text() == sheetName ) + if ( ((TQCheckListItem * ) item)->text() == sheetName ) return true; } } @@ -220,7 +220,7 @@ void CSVExportDialog::returnPressed() m_delimiter = m_dialog->m_delimiterEdit->text(); } -void CSVExportDialog::textChanged ( const QString & ) +void CSVExportDialog::textChanged ( const TQString & ) { if ( m_dialog->m_delimiterEdit->text().isEmpty() ) @@ -263,7 +263,7 @@ void CSVExportDialog::delimiterClicked( int id ) } } -void CSVExportDialog::textquoteSelected( const QString & mark ) +void CSVExportDialog::textquoteSelected( const TQString & mark ) { m_textquote = mark[0]; } @@ -282,15 +282,15 @@ bool CSVExportDialog::exportSelectionOnly() const return m_dialog->m_selectionOnly->isChecked(); } -QTextCodec* CSVExportDialog::getCodec(void) const +TQTextCodec* CSVExportDialog::getCodec(void) const { - const QString strCodec( KGlobal::charsets()->encodingForName( m_dialog->comboBoxEncoding->currentText() ) ); + const TQString strCodec( KGlobal::charsets()->encodingForName( m_dialog->comboBoxEncoding->currentText() ) ); kdDebug(30502) << "Encoding: " << strCodec << endl; bool ok = false; - QTextCodec* codec = QTextCodec::codecForName( strCodec.utf8() ); + TQTextCodec* codec = TQTextCodec::codecForName( strCodec.utf8() ); - // If QTextCodec has not found a valid encoding, so try with KCharsets. + // If TQTextCodec has not found a valid encoding, so try with KCharsets. if ( codec ) { ok = true; @@ -305,17 +305,17 @@ QTextCodec* CSVExportDialog::getCodec(void) const { // Default: UTF-8 kdWarning(30502) << "Cannot find encoding:" << strCodec << endl; - // ### TODO: what parent to use? - KMessageBox::error( 0, i18n("Cannot find encoding: %1").arg( strCodec ) ); + // ### TODO: what tqparent to use? + KMessageBox::error( 0, i18n("Cannot find encoding: %1").tqarg( strCodec ) ); return 0; } return codec; } -QString CSVExportDialog::getEndOfLine(void) const +TQString CSVExportDialog::getEndOfLine(void) const { - QString strReturn; + TQString strReturn; if (m_dialog->radioEndOfLineLF==m_dialog->buttonGroupEndOfLine->selected()) strReturn="\n"; else if (m_dialog->radioEndOfLineCRLF==m_dialog->buttonGroupEndOfLine->selected()) diff --git a/filters/kspread/csv/csvexportdialog.h b/filters/kspread/csv/csvexportdialog.h index 0ca1f5ba..aa350f01 100644 --- a/filters/kspread/csv/csvexportdialog.h +++ b/filters/kspread/csv/csvexportdialog.h @@ -24,7 +24,7 @@ #include <kdialogbase.h> class ExportDialogUI; -class QValidator; +class TQValidator; namespace KSpread { @@ -34,29 +34,30 @@ class Map; class CSVExportDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - CSVExportDialog(QWidget * parent); + CSVExportDialog(TQWidget * tqparent); ~CSVExportDialog(); - QChar getDelimiter() const; - QChar getTextQuote() const; - bool exportSheet( QString const & sheetName ) const; + TQChar getDelimiter() const; + TQChar getTextQuote() const; + bool exportSheet( TQString const & sheetName ) const; bool printAlwaysSheetDelimiter() const; - QString getSheetDelimiter() const; + TQString getSheetDelimiter() const; bool exportSelectionOnly() const; void fillSheet( KSpread::Map * map ); - QString getEndOfLine(void) const; - QTextCodec* getCodec(void) const; + TQString getEndOfLine(void) const; + TQTextCodec* getCodec(void) const; private: void loadSettings(); void saveSettings(); ExportDialogUI * m_dialog; - QValidator* m_delimiterValidator; - QString m_delimiter; - QChar m_textquote; + TQValidator* m_delimiterValidator; + TQString m_delimiter; + TQChar m_textquote; private slots: void slotOk(); @@ -64,8 +65,8 @@ class CSVExportDialog : public KDialogBase void returnPressed(); void delimiterClicked( int id ); - void textChanged ( const QString & ); - void textquoteSelected( const QString & mark ); + void textChanged ( const TQString & ); + void textquoteSelected( const TQString & mark ); void selectionOnlyChanged( bool ); }; diff --git a/filters/kspread/csv/csvimport.cc b/filters/kspread/csv/csvimport.cc index 49792406..c05c075c 100644 --- a/filters/kspread/csv/csvimport.cc +++ b/filters/kspread/csv/csvimport.cc @@ -20,8 +20,8 @@ #include <csvimport.h> -#include <qfile.h> -#include <qregexp.h> +#include <tqfile.h> +#include <tqregexp.h> #include <kapplication.h> #include <kmessagebox.h> @@ -53,13 +53,13 @@ using namespace KSpread; typedef KGenericFactory<CSVFilter, KoFilter> CSVImportFactory; K_EXPORT_COMPONENT_FACTORY( libcsvimport, CSVImportFactory( "kofficefilters" ) ) -CSVFilter::CSVFilter(KoFilter *, const char*, const QStringList&) : +CSVFilter::CSVFilter(KoFilter *, const char*, const TQStringList&) : KoFilter() { } -KoFilter::ConversionStatus CSVFilter::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus CSVFilter::convert( const TQCString& from, const TQCString& to ) { - QString file( m_chain->inputFile() ); + TQString file( m_chain->inputFile() ); KoDocument* document = m_chain->outputDocument(); if ( !document ) @@ -67,7 +67,7 @@ KoFilter::ConversionStatus CSVFilter::convert( const QCString& from, const QCStr kdDebug(30501) << "here we go... " << document->className() << endl; - if ( !::qt_cast<const KSpread::Doc *>( document ) ) + if ( !::tqqt_cast<const KSpread::Doc *>( document ) ) { kdWarning(30501) << "document isn't a KSpread::Doc but a " << document->className() << endl; return KoFilter::NotImplemented; @@ -88,19 +88,19 @@ KoFilter::ConversionStatus CSVFilter::convert( const QCString& from, const QCStr return KoFilter::NotImplemented; } - QFile in(file); + TQFile in(file); if(!in.open(IO_ReadOnly)) { KMessageBox::sorry( 0L, i18n("CSV filter cannot open input file - please report.") ); in.close(); return KoFilter::FileNotFound; } - QString csv_delimiter; + TQString csv_delimiter; // ###### FIXME: disabled for now //if (!config.isNull()) // csv_delimiter = config[0]; - QByteArray inputFile( in.readAll() ); + TQByteArray inputFile( in.readAll() ); in.close(); CSVDialog *dialog = new CSVDialog(0L, inputFile, csv_delimiter ); @@ -123,16 +123,16 @@ KoFilter::ConversionStatus CSVFilter::convert( const QCString& from, const QCStr int value = 0; emit sigProgress(value); - QApplication::setOverrideCursor(Qt::waitCursor); + TQApplication::setOverrideCursor(TQt::waitCursor); int i; double init = sheet->nonDefaultColumnFormat( 1 )->dblWidth(); - QMemArray<double> widths( numCols ); + TQMemArray<double> widths( numCols ); for ( i = 0; i < numCols; ++i ) widths[i] = init; Cell* c = sheet->nonDefaultCell( 1, 1 ); - QFontMetrics fm( c->format()->textFont( 1, 1 ) ); + TQFontMetrics fm( c->format()->textFont( 1, 1 ) ); Style * s = ksdoc->styleManager()->defaultStyle(); @@ -142,7 +142,7 @@ KoFilter::ConversionStatus CSVFilter::convert( const QCString& from, const QCStr { value += step; emit sigProgress(value); - const QString text( dialog->getText( row, col ) ); + const TQString text( dialog->getText( row, col ) ); // ### FIXME: how to calculate the width of numbers (as they might not be in the right format) const double len = fm.width( text ); @@ -191,9 +191,9 @@ KoFilter::ConversionStatus CSVFilter::convert( const QCString& from, const QCStr case CSVDialog::COMMANUMBER: { bool ok = false; - QString tmp ( text ); - tmp.remove ( QRegExp( "[^0-9,Ee+-]" ) ); // Keep only 0 to 9, comma, E, e, plus, minus - tmp.replace ( ',', '.' ); + TQString tmp ( text ); + tmp.remove ( TQRegExp( "[^0-9,Ee+-]" ) ); // Keep only 0 to 9, comma, E, e, plus, minus + tmp.tqreplace ( ',', '.' ); kdDebug(30501) << "Comma: " << text << " => " << tmp << endl; const double d = tmp.toDouble( &ok ); if ( !ok ) @@ -212,9 +212,9 @@ KoFilter::ConversionStatus CSVFilter::convert( const QCString& from, const QCStr case CSVDialog::POINTNUMBER: { bool ok = false; - QString tmp ( text ); - tmp.remove ( QRegExp( "[^0-9\\.EeD+-]" ) ); // Keep only 0 to 9, dot, E, e, D, plus, minus - tmp.replace ( 'D', 'E' ); // double from FORTRAN use D instead of E + TQString tmp ( text ); + tmp.remove ( TQRegExp( "[^0-9\\.EeD+-]" ) ); // Keep only 0 to 9, dot, E, e, D, plus, minus + tmp.tqreplace ( 'D', 'E' ); // double from FORTRAN use D instead of E kdDebug(30501) << "Point: " << text << " => " << tmp << endl; const double d = tmp.toDouble( &ok ); if ( !ok ) @@ -255,7 +255,7 @@ KoFilter::ConversionStatus CSVFilter::convert( const QCString& from, const QCStr } emit sigProgress( 100 ); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); delete dialog; return KoFilter::OK; diff --git a/filters/kspread/csv/csvimport.h b/filters/kspread/csv/csvimport.h index f89f16e6..6f01a734 100644 --- a/filters/kspread/csv/csvimport.h +++ b/filters/kspread/csv/csvimport.h @@ -25,11 +25,12 @@ class CSVFilter : public KoFilter { Q_OBJECT + TQ_OBJECT public: - CSVFilter(KoFilter *parent, const char *name, const QStringList&); + CSVFilter(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~CSVFilter() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; #endif // CSVFILTER_H diff --git a/filters/kspread/csv/dialogui.ui b/filters/kspread/csv/dialogui.ui index 9381676c..7cf0d28c 100644 --- a/filters/kspread/csv/dialogui.ui +++ b/filters/kspread/csv/dialogui.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>DialogUI</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>DialogUI</cstring> </property> @@ -30,7 +30,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QTable" row="1" column="0"> + <widget class="TQTable" row="1" column="0"> <property name="name"> <cstring>m_sheet</cstring> </property> @@ -49,11 +49,11 @@ <number>0</number> </property> </widget> - <widget class="QTabWidget" row="0" column="0"> + <widget class="TQTabWidget" row="0" column="0"> <property name="name"> <cstring>tabWidget2</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>TabPage</cstring> </property> @@ -64,15 +64,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_3</cstring> </property> @@ -104,7 +104,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>106</width> <height>20</height> @@ -123,7 +123,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>60</height> @@ -132,7 +132,7 @@ </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -143,7 +143,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup" row="0" column="0" rowspan="2" colspan="1"> + <widget class="TQButtonGroup" row="0" column="0" rowspan="2" colspan="1"> <property name="name"> <cstring>m_delimiterBox</cstring> </property> @@ -168,7 +168,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QRadioButton" row="0" column="0"> + <widget class="TQRadioButton" row="0" column="0"> <property name="name"> <cstring>m_radioComma</cstring> </property> @@ -179,7 +179,7 @@ <bool>true</bool> </property> </widget> - <widget class="QRadioButton" row="0" column="1"> + <widget class="TQRadioButton" row="0" column="1"> <property name="name"> <cstring>m_radioSemicolon</cstring> </property> @@ -187,7 +187,7 @@ <string>Semicolon</string> </property> </widget> - <widget class="QRadioButton" row="1" column="0"> + <widget class="TQRadioButton" row="1" column="0"> <property name="name"> <cstring>m_radioTab</cstring> </property> @@ -195,7 +195,7 @@ <string>Tabulator</string> </property> </widget> - <widget class="QRadioButton" row="1" column="1"> + <widget class="TQRadioButton" row="1" column="1"> <property name="name"> <cstring>m_radioSpace</cstring> </property> @@ -203,7 +203,7 @@ <string>Space</string> </property> </widget> - <widget class="QRadioButton" row="0" column="2"> + <widget class="TQRadioButton" row="0" column="2"> <property name="name"> <cstring>m_radioOther</cstring> </property> @@ -211,7 +211,7 @@ <string>Other</string> </property> </widget> - <widget class="QLineEdit" row="1" column="2"> + <widget class="TQLineEdit" row="1" column="2"> <property name="name"> <cstring>m_delimiterEdit</cstring> </property> @@ -223,7 +223,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>30</width> <height>32767</height> @@ -232,7 +232,7 @@ </widget> </grid> </widget> - <widget class="QCheckBox" row="2" column="0"> + <widget class="TQCheckBox" row="2" column="0"> <property name="name"> <cstring>m_ignoreDuplicates</cstring> </property> @@ -240,7 +240,7 @@ <string>Ignore duplicate delimiters</string> </property> </widget> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>TextLabel2</cstring> </property> @@ -259,7 +259,7 @@ <cstring>m_comboQuote</cstring> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>textLabel1_4</cstring> </property> @@ -275,7 +275,7 @@ <cstring>m_formatComboBox</cstring> </property> </widget> - <widget class="QComboBox" row="1" column="2"> + <widget class="TQComboBox" row="1" column="2"> <item> <property name="text"> <string>"</string> @@ -313,7 +313,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>51</width> <height>21</height> @@ -330,7 +330,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>51</width> <height>21</height> @@ -339,7 +339,7 @@ </spacer> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -350,7 +350,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QFrame" row="0" column="0"> + <widget class="TQFrame" row="0" column="0"> <property name="name"> <cstring>frame3</cstring> </property> @@ -364,12 +364,12 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QSpinBox" row="0" column="3"> + <widget class="TQSpinBox" row="0" column="3"> <property name="name"> <cstring>m_rowEnd</cstring> </property> </widget> - <widget class="QLabel" row="0" column="2"> + <widget class="TQLabel" row="0" column="2"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -379,11 +379,11 @@ <property name="textFormat"> <enum>AutoText</enum> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignCenter</set> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel3</cstring> </property> @@ -405,12 +405,12 @@ <string>Import lines:</string> </property> </widget> - <widget class="QSpinBox" row="1" column="3"> + <widget class="TQSpinBox" row="1" column="3"> <property name="name"> <cstring>m_colEnd</cstring> </property> </widget> - <widget class="QSpinBox" row="1" column="1"> + <widget class="TQSpinBox" row="1" column="1"> <property name="name"> <cstring>m_colStart</cstring> </property> @@ -418,7 +418,7 @@ <number>1</number> </property> </widget> - <widget class="QLabel" row="1" column="2"> + <widget class="TQLabel" row="1" column="2"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -428,11 +428,11 @@ <property name="textFormat"> <enum>AutoText</enum> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignCenter</set> </property> </widget> - <widget class="QSpinBox" row="0" column="1"> + <widget class="TQSpinBox" row="0" column="1"> <property name="name"> <cstring>m_rowStart</cstring> </property> @@ -440,7 +440,7 @@ <number>1</number> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel3_2</cstring> </property> @@ -472,7 +472,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>468</width> <height>20</height> @@ -489,7 +489,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>468</width> <height>20</height> @@ -506,7 +506,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>611</width> <height>20</height> @@ -523,14 +523,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>71</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton" row="2" column="6"> + <widget class="TQPushButton" row="2" column="6"> <property name="name"> <cstring>m_updateButton</cstring> </property> @@ -545,7 +545,7 @@ </widget> </grid> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kcombobox.h</includehint> <includehint>klineedit.h</includehint> diff --git a/filters/kspread/csv/exportdialogui.ui b/filters/kspread/csv/exportdialogui.ui index 5bb78dea..9b38a41f 100644 --- a/filters/kspread/csv/exportdialogui.ui +++ b/filters/kspread/csv/exportdialogui.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>ExportDialogUI</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>ExportDialogUI</cstring> </property> @@ -22,7 +22,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QTabWidget" row="1" column="0"> + <widget class="TQTabWidget" row="1" column="0"> <property name="name"> <cstring>m_tabWidget</cstring> </property> @@ -34,7 +34,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>encodingPage</cstring> </property> @@ -45,15 +45,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -85,7 +85,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>106</width> <height>20</height> @@ -94,7 +94,7 @@ </spacer> </hbox> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroupEndOfLine</cstring> </property> @@ -111,7 +111,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioEndOfLineLF</cstring> </property> @@ -122,7 +122,7 @@ <bool>true</bool> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioEndOfLineCRLF</cstring> </property> @@ -133,7 +133,7 @@ <bool>false</bool> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioEndOfLineCR</cstring> </property> @@ -156,7 +156,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>96</height> @@ -165,7 +165,7 @@ </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -182,7 +182,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QListView" row="2" column="0"> + <widget class="TQListView" row="2" column="0"> <column> <property name="text"> <string>Available Sheets</string> @@ -198,7 +198,7 @@ <cstring>m_sheetList</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel4</cstring> </property> @@ -206,7 +206,7 @@ <string>Select sheets to export:</string> </property> </widget> - <widget class="QGroupBox" row="0" column="0"> + <widget class="TQGroupBox" row="0" column="0"> <property name="name"> <cstring>m_delimiterLineBox</cstring> </property> @@ -231,7 +231,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLineEdit" row="0" column="0"> + <widget class="TQLineEdit" row="0" column="0"> <property name="name"> <cstring>m_sheetDelimiter</cstring> </property> @@ -239,7 +239,7 @@ <string>********<SHEETNAME>********</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel6</cstring> </property> @@ -254,11 +254,11 @@ <property name="text"> <string><SHEETNAME> gets replaced by the name of the next sheet.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> - <widget class="QCheckBox" row="2" column="0"> + <widget class="TQCheckBox" row="2" column="0"> <property name="name"> <cstring>m_delimiterAboveAll</cstring> </property> @@ -278,7 +278,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab2</cstring> </property> @@ -295,7 +295,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QButtonGroup" row="0" column="0"> + <widget class="TQButtonGroup" row="0" column="0"> <property name="name"> <cstring>m_delimiterBox</cstring> </property> @@ -320,7 +320,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QRadioButton" row="0" column="0"> + <widget class="TQRadioButton" row="0" column="0"> <property name="name"> <cstring>m_radioComma</cstring> </property> @@ -331,7 +331,7 @@ <bool>true</bool> </property> </widget> - <widget class="QRadioButton" row="0" column="1"> + <widget class="TQRadioButton" row="0" column="1"> <property name="name"> <cstring>m_radioSemicolon</cstring> </property> @@ -339,7 +339,7 @@ <string>Semicolon</string> </property> </widget> - <widget class="QRadioButton" row="1" column="0"> + <widget class="TQRadioButton" row="1" column="0"> <property name="name"> <cstring>m_radioTab</cstring> </property> @@ -347,7 +347,7 @@ <string>Tabulator</string> </property> </widget> - <widget class="QRadioButton" row="1" column="1"> + <widget class="TQRadioButton" row="1" column="1"> <property name="name"> <cstring>m_radioSpace</cstring> </property> @@ -355,7 +355,7 @@ <string>Space</string> </property> </widget> - <widget class="QRadioButton" row="0" column="2"> + <widget class="TQRadioButton" row="0" column="2"> <property name="name"> <cstring>m_radioOther</cstring> </property> @@ -363,7 +363,7 @@ <string>Other:</string> </property> </widget> - <widget class="QLineEdit" row="1" column="2"> + <widget class="TQLineEdit" row="1" column="2"> <property name="name"> <cstring>m_delimiterEdit</cstring> </property> @@ -375,7 +375,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>30</width> <height>32767</height> @@ -387,7 +387,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox" row="1" column="0"> + <widget class="TQGroupBox" row="1" column="0"> <property name="name"> <cstring>GroupBox1</cstring> </property> @@ -412,7 +412,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>m_quotesLabel</cstring> </property> @@ -431,7 +431,7 @@ <string>Quotes:</string> </property> </widget> - <widget class="QComboBox" row="1" column="1"> + <widget class="TQComboBox" row="1" column="1"> <item> <property name="text"> <string>"</string> @@ -469,7 +469,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>81</height> @@ -479,7 +479,7 @@ </grid> </widget> </widget> - <widget class="QButtonGroup" row="0" column="0"> + <widget class="TQButtonGroup" row="0" column="0"> <property name="name"> <cstring>buttonGroup2</cstring> </property> @@ -490,7 +490,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>m_selectionOnly</cstring> </property> @@ -502,7 +502,7 @@ </widget> </grid> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kcombobox.h</includehint> <includehint>klineedit.h</includehint> diff --git a/filters/kspread/csv/status.html b/filters/kspread/csv/status.html index c4379ade..497ee00a 100644 --- a/filters/kspread/csv/status.html +++ b/filters/kspread/csv/status.html @@ -98,11 +98,11 @@ Let's try to draw the graph of the state machine using ascii-art. /--\ | | | v " - /--[START]-------->[QUOTED_FIELD] (**) + /--[START]-------->[TQUOTED_FIELD] (**) other| ^ ^ | ^ (*) | | | DEL or | " | " (*) | | | EOL v | other - | | \----[MAYBE_END_OF_QUOTED_FIELD]--------> Error + | | \----[MAYBE_END_OF_TQUOTED_FIELD]--------> Error | | | | DEL or | | EOL diff --git a/filters/kspread/csv/xmltree.cc b/filters/kspread/csv/xmltree.cc index e6fdf124..f5c56373 100644 --- a/filters/kspread/csv/xmltree.cc +++ b/filters/kspread/csv/xmltree.cc @@ -19,13 +19,13 @@ #include <xmltree.h> -#include <qdatetime.h> +#include <tqdatetime.h> #include <kdebug.h> -XMLTree::XMLTree(QDomDocument &qdoc) : root(qdoc) +XMLTree::XMLTree(TQDomDocument &qdoc) : root(qdoc) { - root=QDomDocument("spreadsheet"); + root=TQDomDocument("spreadsheet"); root.appendChild( root.createProcessingInstruction( "xml", "version=\"1.0\" encoding=\"UTF-8\"" ) ); doc = root.createElement( "spreadsheet" ); @@ -33,10 +33,10 @@ XMLTree::XMLTree(QDomDocument &qdoc) : root(qdoc) doc.setAttribute("mime", "application/x-kspread"); root.appendChild(doc); - QDomElement paper = root.createElement("paper"); + TQDomElement paper = root.createElement("paper"); paper.setAttribute("format", "A4"); paper.setAttribute("orientation", "Portrait"); - QDomElement borders = root.createElement( "borders" ); + TQDomElement borders = root.createElement( "borders" ); borders.setAttribute( "left", 20 ); borders.setAttribute( "top", 20 ); borders.setAttribute( "right", 20 ); @@ -63,25 +63,25 @@ XMLTree::~XMLTree() } // Not needed anymore (Werner) -//const QString XMLTree::part() +//const TQString XMLTree::part() //{ -// QString s; -// QTextStream t(s, IO_WriteOnly); +// TQString s; +// TQTextStream t(s, IO_WriteOnly); -// QTime tmr; +// TQTime tmr; // tmr.start(); // kdDebug(30501) << "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" << endl; // root.save(t); // Why does this take sooooo long (approx. 8s on my Athlon 500 with a // quite small file :( ) -// David: gdb says that QString::replace calls itself recursively an enormous amount of time -// This is called by QStringBuffer::writeBlock (), called by QTextStream::writeBlock () -// called by QTextStream::operator<< () in QDOM_AttrPrivate::save (). +// David: gdb says that TQString::replace calls itself recursively an enormous amount of time +// This is called by TQStringBuffer::writeBlock (), called by TQTextStream::writeBlock () +// called by TQTextStream::operator<< () in TQDOM_AttrPrivate::save (). // // And this looks related to the UTF 8 encoding ... -// kdDebug(30501) << (const char*)QString::number((int)tmr.elapsed()) << endl; +// kdDebug(30501) << (const char*)TQString::number((int)tmr.elapsed()) << endl; // kdDebug(30501) << "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" << endl; // t << '\0'; @@ -89,16 +89,16 @@ XMLTree::~XMLTree() // return s; //} -bool XMLTree::cell( const QString & contents ) +bool XMLTree::cell( const TQString & contents ) { - QDomElement e = root.createElement("cell"); + TQDomElement e = root.createElement("cell"); //e.appendChild(getFormat(xf)); //e.appendChild(getFont(xf)); e.setAttribute("row", row); e.setAttribute("column", column++); - QDomElement format=root.createElement("format"); + TQDomElement format=root.createElement("format"); format.setAttribute("float", "3"); format.setAttribute("alignY", "2"); format.setAttribute("floatcolor", "2"); @@ -106,12 +106,12 @@ bool XMLTree::cell( const QString & contents ) format.setAttribute("precision", "-1"); format.setAttribute("align", "4"); - QDomElement pen=root.createElement("pen"); + TQDomElement pen=root.createElement("pen"); pen.setAttribute("width", "1"); pen.setAttribute("style", "0"); pen.setAttribute("color", "#000000"); - QDomElement lborder=root.createElement("left-border"); + TQDomElement lborder=root.createElement("left-border"); lborder.appendChild(pen); format.appendChild(lborder); @@ -120,7 +120,7 @@ bool XMLTree::cell( const QString & contents ) pen.setAttribute("style", "0"); pen.setAttribute("color", "#000000"); - QDomElement tborder=root.createElement("top-border"); + TQDomElement tborder=root.createElement("top-border"); tborder.appendChild(pen); format.appendChild(tborder); @@ -129,7 +129,7 @@ bool XMLTree::cell( const QString & contents ) pen.setAttribute("style", "0"); pen.setAttribute("color", "#000000"); - QDomElement fdia=root.createElement("fall-diagonal"); + TQDomElement fdia=root.createElement("fall-diagonal"); fdia.appendChild(pen); format.appendChild(fdia); @@ -138,13 +138,13 @@ bool XMLTree::cell( const QString & contents ) pen.setAttribute("style", "0"); pen.setAttribute("color", "#000000"); - QDomElement udia=root.createElement("up-diagonal"); + TQDomElement udia=root.createElement("up-diagonal"); udia.appendChild(pen); format.appendChild(udia); e.appendChild(format); - QDomElement text=root.createElement("text"); + TQDomElement text=root.createElement("text"); text.appendChild(root.createTextNode(contents)); e.appendChild(text); diff --git a/filters/kspread/csv/xmltree.h b/filters/kspread/csv/xmltree.h index 919acc8f..247af4e5 100644 --- a/filters/kspread/csv/xmltree.h +++ b/filters/kspread/csv/xmltree.h @@ -20,9 +20,9 @@ #ifndef XMLTREE_H #define XMLTREE_H -#include <qdom.h> -#include <qmemarray.h> -#include <qtextstream.h> +#include <tqdom.h> +#include <tqmemarray.h> +#include <tqtextstream.h> class XMLTree { @@ -30,14 +30,14 @@ class XMLTree public: // Create a tree. // inputFileName is only used in order to name the sheet - XMLTree(QDomDocument &qdoc); + XMLTree(TQDomDocument &qdoc); ~XMLTree(); - // Return the whole XML as QString - //const QString part(); + // Return the whole XML as TQString + //const TQString part(); // Create a new cell - bool cell( const QString & contents ); + bool cell( const TQString & contents ); // Tell about an empty cell (doesn't create it, just skips) void emptycell() { column ++; } // easy heh ? ;) @@ -47,7 +47,7 @@ public: private: int row, column; - QDomDocument &root; - QDomElement doc, map, sheet; + TQDomDocument &root; + TQDomElement doc, map, sheet; }; #endif // XMLTREE_H diff --git a/filters/kspread/dbase/dbase.cpp b/filters/kspread/dbase/dbase.cpp index 67780f33..acc1e27d 100644 --- a/filters/kspread/dbase/dbase.cpp +++ b/filters/kspread/dbase/dbase.cpp @@ -19,12 +19,12 @@ */ -#include <qdatetime.h> -#include <qdatastream.h> -#include <qfile.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qptrlist.h> +#include <tqdatetime.h> +#include <tqdatastream.h> +#include <tqfile.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqptrlist.h> #include <dbase.h> @@ -51,7 +51,7 @@ DBase::~DBase() // unsigned char reserved[20] 12-31 reserverd info from dBase // -bool DBase::load( const QString& filename ) +bool DBase::load( const TQString& filename ) { m_file.setName( filename ); @@ -59,12 +59,12 @@ bool DBase::load( const QString& filename ) return false; m_stream.setDevice( &m_file ); - m_stream.setByteOrder( QDataStream::LittleEndian ); + m_stream.setByteOrder( TQDataStream::LittleEndian ); unsigned filesize = m_file.size(); // read dBASE version - Q_UINT8 ver; + TQ_UINT8 ver; m_stream >> ver; m_version = ver & 0x7f; // bit 7: has memo ? @@ -73,7 +73,7 @@ bool DBase::load( const QString& filename ) return false; // date of last update - Q_UINT8 y, m, d; + TQ_UINT8 y, m, d; m_stream >> y >> m >> d; // because dBASE saves 102 instead of 2002 (very Y2K-save ;-) m_lastUpdate.setYMD( y+1900, m, d ); @@ -82,22 +82,22 @@ bool DBase::load( const QString& filename ) if( !m_lastUpdate.isValid() ) return false; // number of records - Q_UINT32 norec; + TQ_UINT32 norec; m_stream >> norec; m_recordCount = norec; // header-length - Q_UINT16 header_length; + TQ_UINT16 header_length; m_stream >> header_length; m_headerLength = header_length; // record-length - Q_UINT16 record_length; + TQ_UINT16 record_length; m_stream >> record_length; m_recordLength = record_length; // read the remaining chars - Q_UINT8 dummy; + TQ_UINT8 dummy; for (int foo = 0; foo < 20; ++foo) m_stream >> dummy; @@ -122,14 +122,14 @@ bool DBase::load( const QString& filename ) DBaseField* field = new DBaseField; // columnn-name - Q_UINT8 colname[12]; + TQ_UINT8 colname[12]; for ( int j = 0; j < 11; ++j) m_stream >> colname[j]; colname[11] = '\0'; - field->name = QString( (const char*) &colname[0] ); + field->name = TQString( (const char*) &colname[0] ); // type of column - Q_UINT8 coltype; + TQ_UINT8 coltype; m_stream >> coltype; switch( coltype ) { @@ -142,21 +142,21 @@ bool DBase::load( const QString& filename ) } // fileddataaddress - Q_UINT32 addr; + TQ_UINT32 addr; m_stream >> addr; // columnlength - Q_UINT8 colsize; + TQ_UINT8 colsize; m_stream >> colsize; field->length = colsize; // decimals - Q_UINT8 decimals; + TQ_UINT8 decimals; m_stream >> decimals; field->decimals = decimals; // read remaining chars - Q_UINT8 dummy; + TQ_UINT8 dummy; for ( int foo = 0; foo < 14; ++foo ) m_stream >> dummy; @@ -165,14 +165,14 @@ bool DBase::load( const QString& filename ) } // set the index to the first record - m_stream.device()->at( m_headerLength ); + m_stream.tqdevice()->at( m_headerLength ); return true; } -QStringList DBase::readRecord( unsigned recno ) +TQStringList DBase::readRecord( unsigned recno ) { - QStringList result; + TQStringList result; // out of range ? return empty strings if( recno >= m_recordCount ) @@ -184,11 +184,11 @@ QStringList DBase::readRecord( unsigned recno ) // seek to where the record is unsigned filepos = m_headerLength + recno * m_recordLength; - m_stream.device()->at( filepos ); + m_stream.tqdevice()->at( filepos ); // first char == '*' means the record is deleted // so we just skip it - Q_UINT8 delmarker; + TQ_UINT8 delmarker; m_stream >> delmarker; if( delmarker == 0x2a ) return result; @@ -201,17 +201,17 @@ QStringList DBase::readRecord( unsigned recno ) case DBaseField::Numeric: case DBaseField::Character: { - QString str; - Q_UINT8 ch; + TQString str; + TQ_UINT8 ch; for( unsigned j=0; j<fields.at(i)->length; j++ ) - { m_stream >> ch; str += QChar(ch); } + { m_stream >> ch; str += TQChar(ch); } result.append( str ); } break; // Logical case DBaseField::Logical: { - Q_UINT8 ch; + TQ_UINT8 ch; m_stream >> ch; switch( ch ) { @@ -225,10 +225,10 @@ QStringList DBase::readRecord( unsigned recno ) // Note: convert it to YYYY-MM-DD case DBaseField::Date: { - QString str; - Q_UINT8 ch; + TQString str; + TQ_UINT8 ch; for( unsigned j=0; j<fields.at(i)->length; j++ ) - { m_stream >> ch; str += QChar(ch); } + { m_stream >> ch; str += TQChar(ch); } str.insert( 6, '-' ); str.insert( 4, '-' ); result.append( str ); diff --git a/filters/kspread/dbase/dbase.h b/filters/kspread/dbase/dbase.h index 022d2ba1..efc909b4 100644 --- a/filters/kspread/dbase/dbase.h +++ b/filters/kspread/dbase/dbase.h @@ -21,16 +21,16 @@ #ifndef DBASE_H #define DBASE_H -#include <qdatastream.h> -#include <qdatetime.h> -#include <qfile.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqdatastream.h> +#include <tqdatetime.h> +#include <tqfile.h> +#include <tqstring.h> +#include <tqstringlist.h> class DBaseField { public: - QString name; + TQString name; enum { Unknown, Character, Date, Numeric, Logical, Memo } type; unsigned length; unsigned decimals; @@ -43,22 +43,22 @@ class DBase DBase(); ~DBase(); - QPtrList<DBaseField> fields; + TQPtrList<DBaseField> fields; - bool load( const QString& filename ); - QStringList readRecord( unsigned recno ); + bool load( const TQString& filename ); + TQStringList readRecord( unsigned recno ); void close(); unsigned recordCount(){ return m_recordCount; } int version(){ return m_version; } - QDate lastUpdate(){ return m_lastUpdate; } + TQDate lastUpdate(){ return m_lastUpdate; } private: - QFile m_file; - QDataStream m_stream; + TQFile m_file; + TQDataStream m_stream; int m_version; - QDate m_lastUpdate; + TQDate m_lastUpdate; unsigned m_recordCount; unsigned m_headerLength; unsigned m_recordLength; diff --git a/filters/kspread/dbase/dbaseimport.cc b/filters/kspread/dbase/dbaseimport.cc index 1c167cd0..bcbc98b8 100644 --- a/filters/kspread/dbase/dbaseimport.cc +++ b/filters/kspread/dbase/dbaseimport.cc @@ -27,10 +27,10 @@ #include <dbaseimport.moc> #include <dbase.h> -#include <qfile.h> -#include <qfont.h> -#include <qfontmetrics.h> -#include <qstring.h> +#include <tqfile.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqstring.h> #include <kdebug.h> #include <KoFilterChain.h> @@ -43,17 +43,17 @@ typedef KGenericFactory<DBaseImport, KoFilter> DBaseImportFactory; K_EXPORT_COMPONENT_FACTORY( libdbaseimport, DBaseImportFactory( "kofficefilters" ) ) -DBaseImport::DBaseImport ( QObject*, const char*, const QStringList& ) +DBaseImport::DBaseImport ( TQObject*, const char*, const TQStringList& ) : KoFilter() { } -KoFilter::ConversionStatus DBaseImport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus DBaseImport::convert( const TQCString& from, const TQCString& to ) { if (to != "application/x-kspread" || from != "application/x-dbase") return KoFilter::NotImplemented; - QString inputFile = m_chain->inputFile(); + TQString inputFile = m_chain->inputFile(); DBase dbase; bool result = dbase.load( inputFile ); @@ -70,7 +70,7 @@ KoFilter::ConversionStatus DBaseImport::convert( const QCString& from, const QCS return KoFilter::StupidError; } - QString root, documentInfo; + TQString root, documentInfo; root = "<!DOCTYPE spreadsheet >\n"; root += "<spreadsheet mime=\"application/x-kspread\" editor=\"KSpread\" >\n"; @@ -96,33 +96,33 @@ KoFilter::ConversionStatus DBaseImport::convert( const QCString& from, const QCS root += " formular=\"0\" lcmode=\"0\" >\n"; // KOffice default font - QFont font = KoGlobal::defaultFont(); + TQFont font = KoGlobal::defaultFont(); // define columns - QFontMetrics fm( font ); + TQFontMetrics fm( font ); for( unsigned i=0; i<dbase.fields.count(); i++ ) { - int mw = QMAX( dbase.fields.at(i)->length, dbase.fields.at(i)->name.length()); + int mw = TQMAX( dbase.fields.at(i)->length, dbase.fields.at(i)->name.length()); double w = POINT_TO_MM( fm.maxWidth() * mw ); - root += "<column column=\"" + QString::number(i+1) + "\""; - root += " width=\"" + QString::number( w ) + "\"><format/></column>\n"; + root += "<column column=\"" + TQString::number(i+1) + "\""; + root += " width=\"" + TQString::number( w ) + "\"><format/></column>\n"; } // define rows double h = POINT_TO_MM( 5 + fm.height() + fm.leading() ); for( unsigned j=0; j<dbase.recordCount(); j++ ) { - root += "<row row=\"" + QString::number(j+1) + "\""; - root += " height=\"" + QString::number( h ) + "\" ><format/></row>\n"; + root += "<row row=\"" + TQString::number(j+1) + "\""; + root += " height=\"" + TQString::number( h ) + "\" ><format/></row>\n"; } // field names come as first row for( unsigned i=0; i<dbase.fields.count(); i++ ) { - root += "<cell row=\"1\" column=\"" + QString::number(i+1) + "\" >\n"; + root += "<cell row=\"1\" column=\"" + TQString::number(i+1) + "\" >\n"; root += "<format><pen width=\"0\" style=\"1\" color=\"#000000\" />"; root += "<font family=\"" + font.family() + "\"" + - " size=\"" + QString::number(font.pointSizeFloat()) + "\"" + + " size=\"" + TQString::number(font.pointSizeFloat()) + "\"" + " weight=\"50\" />"; root += "</format>\n"; root += "<text>" + dbase.fields.at(i)->name + "</text></cell>\n"; @@ -132,17 +132,17 @@ KoFilter::ConversionStatus DBaseImport::convert( const QCString& from, const QCS unsigned row = 1; for( unsigned j=0; j<dbase.recordCount(); j++ ) { - QStringList rec = dbase.readRecord( j ); + TQStringList rec = dbase.readRecord( j ); if( rec.count() ) { row++; for( unsigned i=0; i<rec.count(); i++ ) { - root += "<cell row=\"" + QString::number(row) + "\"" + - "column=\"" + QString::number(i+1) + "\" >\n"; + root += "<cell row=\"" + TQString::number(row) + "\"" + + "column=\"" + TQString::number(i+1) + "\" >\n"; root += "<format><pen width=\"0\" style=\"1\" color=\"#000000\" />"; root += "<font family=\"" + font.family() + "\"" + - " size=\"" + QString::number(font.pointSizeFloat()) + "\"" + + " size=\"" + TQString::number(font.pointSizeFloat()) + "\"" + " weight=\"50\" />"; root += "</format>\n"; root += "<text>" + rec[i] + "</text></cell>\n"; @@ -162,7 +162,7 @@ KoFilter::ConversionStatus DBaseImport::convert( const QCString& from, const QCS // store output document if( out ) { - QCString cstring = root.utf8(); + TQCString cstring = root.utf8(); cstring.prepend( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" ); out->writeBlock( (const char*) cstring, cstring.length() ); } @@ -171,7 +171,7 @@ KoFilter::ConversionStatus DBaseImport::convert( const QCString& from, const QCS out = m_chain->storageFile( "documentinfo.xml", KoStore::Write ); if ( out ) { - QCString cstring = documentInfo.utf8(); + TQCString cstring = documentInfo.utf8(); cstring.prepend( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" ); out->writeBlock( (const char*) cstring, cstring.length() ); diff --git a/filters/kspread/dbase/dbaseimport.h b/filters/kspread/dbase/dbaseimport.h index b51a7138..8d074f1e 100644 --- a/filters/kspread/dbase/dbaseimport.h +++ b/filters/kspread/dbase/dbaseimport.h @@ -26,13 +26,14 @@ class DBaseImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - DBaseImport ( QObject *parent, const char* name, const QStringList& ); + DBaseImport ( TQObject *tqparent, const char* name, const TQStringList& ); virtual ~DBaseImport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; #endif // __DBASEIMPORT_H diff --git a/filters/kspread/excel/excelexport.cc b/filters/kspread/excel/excelexport.cc index 74ad7758..2e2c50e7 100644 --- a/filters/kspread/excel/excelexport.cc +++ b/filters/kspread/excel/excelexport.cc @@ -9,11 +9,11 @@ typedef KGenericFactory<ExcelExport, KoFilter> ExcelExportFactory; //K_EXPORT_COMPONENT_FACTORY(libkspreadexcelexport, ExcelExportFactory("excelexport")) -ExcelExport::ExcelExport(KoFilter *, const char *, const QStringList&) : KoFilter() { +ExcelExport::ExcelExport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } -KoFilter::ConversionStatus ExcelExport::convert(const QCString& from, const QCString& to) { +KoFilter::ConversiontqStatus ExcelExport::convert(const TQCString& from, const TQCString& to) { // Double check that's we really what we want to do if ( ( (to != "application/excel") && (to != "application/msexcel") ) || from != "application/x-kspread") { kdWarning(0) << "Invalid mimetypes " << to << ", " << from << endl; @@ -28,37 +28,37 @@ KoFilter::ConversionStatus ExcelExport::convert(const QCString& from, const QCSt /* -KoFilter::ConversionStatus ExcelWorker::startDocument(KSpreadFilterProperty property) { +KoFilter::ConversiontqStatus ExcelWorker::startDocument(KSpreadFilterProperty property) { return KoFilter::OK; } -KoFilter::ConversionStatus ExcelWorker::startInfoLog(KSpreadFilterProperty property) { +KoFilter::ConversiontqStatus ExcelWorker::startInfoLog(KSpreadFilterProperty property) { return KoFilter::OK; } -KoFilter::ConversionStatus ExcelWorker::startInfoAuthor(KSpreadFilterProperty property) { +KoFilter::ConversiontqStatus ExcelWorker::startInfoAuthor(KSpreadFilterProperty property) { return KoFilter::OK; } -KoFilter::ConversionStatus ExcelWorker::startInfoAbout(KSpreadFilterProperty property) { +KoFilter::ConversiontqStatus ExcelWorker::startInfoAbout(KSpreadFilterProperty property) { return KoFilter::OK; } -KoFilter::ConversionStatus ExcelWorker::startSpreadBook(KSpreadFilterProperty property) { +KoFilter::ConversiontqStatus ExcelWorker::startSpreadBook(KSpreadFilterProperty property) { return KoFilter::OK; } -KoFilter::ConversionStatus ExcelWorker::startSpreadSheet(KSpreadFilterProperty property) { +KoFilter::ConversiontqStatus ExcelWorker::startSpreadSheet(KSpreadFilterProperty property) { return KoFilter::OK; } -KoFilter::ConversionStatus ExcelWorker::startSpreadCell(KSpreadFilterProperty property) { +KoFilter::ConversiontqStatus ExcelWorker::startSpreadCell(KSpreadFilterProperty property) { return KoFilter::OK; } */ diff --git a/filters/kspread/excel/excelexport.h b/filters/kspread/excel/excelexport.h index 28e1b41e..946a1b09 100644 --- a/filters/kspread/excel/excelexport.h +++ b/filters/kspread/excel/excelexport.h @@ -10,25 +10,26 @@ class ExcelExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - ExcelExport(KoFilter *parent, const char*name, const QStringList&); + ExcelExport(KoFilter *tqparent, const char*name, const TQStringList&); virtual ~ExcelExport() {} - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; class ExcelWorker : public KSpreadBaseWorker { public: // Implement those - //KoFilter::ConversionStatus startDocument(KSpreadFilterProperty property); - //KoFilter::ConversionStatus startInfoLog(KSpreadFilterProperty property); - //KoFilter::ConversionStatus startInfoAuthor(KSpreadFilterProperty property); - //KoFilter::ConversionStatus startInfoAbout(KSpreadFilterProperty property); - //KoFilter::ConversionStatus startSpreadBook(KSpreadFilterProperty property); - //KoFilter::ConversionStatus startSpreadSheet(KSpreadFilterProperty property); - //KoFilter::ConversionStatus startSpreadCell(KSpreadFilterProperty property); + //KoFilter::ConversiontqStatus startDocument(KSpreadFilterProperty property); + //KoFilter::ConversiontqStatus startInfoLog(KSpreadFilterProperty property); + //KoFilter::ConversiontqStatus startInfoAuthor(KSpreadFilterProperty property); + //KoFilter::ConversiontqStatus startInfoAbout(KSpreadFilterProperty property); + //KoFilter::ConversiontqStatus startSpreadBook(KSpreadFilterProperty property); + //KoFilter::ConversiontqStatus startSpreadSheet(KSpreadFilterProperty property); + //KoFilter::ConversiontqStatus startSpreadCell(KSpreadFilterProperty property); }; #endif diff --git a/filters/kspread/excel/import/excelimport.cc b/filters/kspread/excel/import/excelimport.cc index 3ff38717..88a20e33 100644 --- a/filters/kspread/excel/import/excelimport.cc +++ b/filters/kspread/excel/import/excelimport.cc @@ -27,13 +27,13 @@ #include <excelimport.h> #include <excelimport.moc> -#include <qbuffer.h> -#include <qcstring.h> -#include <qdatetime.h> -#include <qfile.h> -#include <qmap.h> -#include <qstring.h> -#include <qtextstream.h> +#include <tqbuffer.h> +#include <tqcstring.h> +#include <tqdatetime.h> +#include <tqfile.h> +#include <tqmap.h> +#include <tqstring.h> +#include <tqtextstream.h> #include <kdebug.h> #include <KoFilterChain.h> @@ -51,11 +51,11 @@ typedef KGenericFactory<ExcelImport, KoFilter> ExcelImportFactory; K_EXPORT_COMPONENT_FACTORY( libexcelimport, ExcelImportFactory( "kofficefilters" ) ) -// UString -> QConstString conversion. Use .string() to get the QString. -// Always store the QConstString into a variable first, to avoid a deep copy. -inline QConstString string( const Swinder::UString& str ) { - // Let's hope there's no copying of the QConstString happening... - return QConstString( reinterpret_cast<const QChar*>( str.data() ), str.length() ); +// UString -> TQConstString conversion. Use .string() to get the TQString. +// Always store the TQConstString into a variable first, to avoid a deep copy. +inline TQConstString string( const Swinder::UString& str ) { + // Let's hope there's no copying of the TQConstString happening... + return TQConstString( reinterpret_cast<const TQChar*>( str.data() ), str.length() ); } using namespace Swinder; @@ -63,8 +63,8 @@ using namespace Swinder; class ExcelImport::Private { public: - QString inputFile; - QString outputFile; + TQString inputFile; + TQString outputFile; Workbook *workbook; @@ -76,10 +76,10 @@ public: int columnFormatIndex; int rowFormatIndex; - QMap<int,bool> styleFormats; - QMap<int,bool> isPercentageStyle; - QMap<int,bool> isDateStyle; - QMap<int,bool> isTimeStyle; + TQMap<int,bool> styleFormats; + TQMap<int,bool> isPercentageStyle; + TQMap<int,bool> isDateStyle; + TQMap<int,bool> isTimeStyle; void processWorkbookForBody( Workbook* workbook, KoXmlWriter* xmlWriter ); void processWorkbookForStyle( Workbook* workbook, KoXmlWriter* xmlWriter ); @@ -92,11 +92,11 @@ public: void processCellForBody( Cell* cell, KoXmlWriter* xmlWriter ); void processCellForStyle( Cell* cell, KoXmlWriter* xmlWriter ); void processFormat( const Format* format, KoXmlWriter* xmlWriter ); - void processValueFormat( QString valueFormat, QString refName, KoXmlWriter* xmlWriter ); + void processValueFormat( TQString valueFormat, TQString refName, KoXmlWriter* xmlWriter ); }; -ExcelImport::ExcelImport ( QObject*, const char*, const QStringList& ) +ExcelImport::ExcelImport ( TQObject*, const char*, const TQStringList& ) : KoFilter() { d = new Private; @@ -107,7 +107,7 @@ ExcelImport::~ExcelImport() delete d; } -KoFilter::ConversionStatus ExcelImport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus ExcelImport::convert( const TQCString& from, const TQCString& to ) { if ( from != "application/msexcel" ) return KoFilter::NotImplemented; @@ -118,7 +118,7 @@ KoFilter::ConversionStatus ExcelImport::convert( const QCString& from, const QCS d->inputFile = m_chain->inputFile(); d->outputFile = m_chain->outputFile(); - QTime time; + TQTime time; time.start(); // open inputFile @@ -194,8 +194,8 @@ KoFilter::ConversionStatus ExcelImport::convert( const QCString& from, const QCS // we are done! delete d->workbook; delete storeout; - d->inputFile = QString::null; - d->outputFile = QString::null; + d->inputFile = TQString(); + d->outputFile = TQString(); d->workbook = 0; @@ -348,7 +348,7 @@ void ExcelImport::Private::processSheetForBody( Sheet* sheet, KoXmlWriter* xmlWr xmlWriter->addAttribute( "table:name", string( sheet->name() ).string() ); xmlWriter->addAttribute( "table:print", "false" ); xmlWriter->addAttribute( "table:protected", "false" ); - xmlWriter->addAttribute( "table:style-name", QString("ta%1").arg(sheetFormatIndex)); + xmlWriter->addAttribute( "table:style-name", TQString("ta%1").tqarg(sheetFormatIndex)); sheetFormatIndex++; unsigned ci = 0; @@ -397,7 +397,7 @@ void ExcelImport::Private::processSheetForStyle( Sheet* sheet, KoXmlWriter* xmlW xmlWriter->startElement( "style:style" ); xmlWriter->addAttribute( "style:family", "table" ); xmlWriter->addAttribute( "style:master-page-name", "Default" ); - xmlWriter->addAttribute( "style:name", QString("ta%1").arg(sheetFormatIndex) ); + xmlWriter->addAttribute( "style:name", TQString("ta%1").tqarg(sheetFormatIndex) ); sheetFormatIndex++; xmlWriter->startElement( "style:table-properties" ); @@ -450,7 +450,7 @@ void ExcelImport::Private::processColumnForBody( Column* column, int repeat, KoX xmlWriter->addAttribute( "table:default-style-name", "Default" ); xmlWriter->addAttribute( "table:visibility", column->visible() ? "visible" : "collapse" ); if(repeat > 1) xmlWriter->addAttribute( "table:number-columns-repeated", repeat ); - xmlWriter->addAttribute( "table:style-name", QString("co%1").arg(columnFormatIndex) ); + xmlWriter->addAttribute( "table:style-name", TQString("co%1").tqarg(columnFormatIndex) ); columnFormatIndex++; xmlWriter->endElement(); // table:table-column @@ -463,12 +463,12 @@ void ExcelImport::Private::processColumnForStyle( Column* column, int /*repeat*/ xmlWriter->startElement( "style:style" ); xmlWriter->addAttribute( "style:family", "table-column" ); - xmlWriter->addAttribute( "style:name", QString("co%1").arg(columnFormatIndex) ); + xmlWriter->addAttribute( "style:name", TQString("co%1").tqarg(columnFormatIndex) ); columnFormatIndex++; xmlWriter->startElement( "style:table-column-properties" ); xmlWriter->addAttribute( "fo:break-before", "auto" ); - xmlWriter->addAttribute( "style:column-width", QString("%1in").arg(column->width()/27) ); + xmlWriter->addAttribute( "style:column-width", TQString("%1in").tqarg(column->width()/27) ); xmlWriter->endElement(); // style:table-column-properties xmlWriter->endElement(); // style:style @@ -494,7 +494,7 @@ void ExcelImport::Private::processRowForBody( Row* row, int /*repeat*/, KoXmlWri xmlWriter->startElement( "table:table-row" ); xmlWriter->addAttribute( "table:visibility", row->visible() ? "visible" : "collapse" ); - xmlWriter->addAttribute( "table:style-name", QString("ro%1").arg(rowFormatIndex) ); + xmlWriter->addAttribute( "table:style-name", TQString("ro%1").tqarg(rowFormatIndex) ); rowFormatIndex++; for( int i = 0; i <= lastCol; i++ ) @@ -530,12 +530,12 @@ void ExcelImport::Private::processRowForStyle( Row* row, int repeat, KoXmlWriter xmlWriter->startElement( "style:style" ); xmlWriter->addAttribute( "style:family", "table-row" ); if(repeat > 1) xmlWriter->addAttribute( "table:number-rows-repeated", repeat ); - xmlWriter->addAttribute( "style:name", QString("ro%1").arg(rowFormatIndex) ); + xmlWriter->addAttribute( "style:name", TQString("ro%1").tqarg(rowFormatIndex) ); rowFormatIndex++; xmlWriter->startElement( "style:table-row-properties" ); xmlWriter->addAttribute( "fo:break-before", "auto" ); - xmlWriter->addAttribute( "style:row-height", QString("%1pt").arg(row->height()) ); + xmlWriter->addAttribute( "style:row-height", TQString("%1pt").tqarg(row->height()) ); xmlWriter->endElement(); // style:table-row-properties xmlWriter->endElement(); // style:style @@ -548,16 +548,16 @@ void ExcelImport::Private::processRowForStyle( Row* row, int repeat, KoXmlWriter } } -static bool isPercentageFormat( const QString& valueFormat ) +static bool isPercentageFormat( const TQString& valueFormat ) { if( valueFormat.isEmpty() ) return false; if( valueFormat.length() < 1 ) return false; - return valueFormat[valueFormat.length()-1] == QChar('%'); + return valueFormat[valueFormat.length()-1] == TQChar('%'); } -static bool isDateFormat( const QString& valueFormat ) +static bool isDateFormat( const TQString& valueFormat ) { - QString vfu = valueFormat.upper(); + TQString vfu = valueFormat.upper(); if( vfu == "M/D/YY" ) return true; if( vfu == "M/D/YYYY" ) return true; @@ -587,9 +587,9 @@ static bool isDateFormat( const QString& valueFormat ) return false; } -static bool isTimeFormat( const QString& valueFormat ) +static bool isTimeFormat( const TQString& valueFormat ) { - QString vf = valueFormat; + TQString vf = valueFormat; if( vf == "h:mm AM/PM" ) return true; if( vf == "h:mm:ss AM/PM" ) return true; @@ -608,19 +608,19 @@ static bool isTimeFormat( const QString& valueFormat ) return false; } -static QString convertDate( double serialNo ) +static TQString convertDate( double serialNo ) { // reference is midnight 30 Dec 1899 - QDate dd( 1899, 12, 30 ); + TQDate dd( 1899, 12, 30 ); dd = dd.addDays( (int) serialNo ); return dd.toString( "yyyy-MM-dd" ); } -static QString convertTime( double serialNo ) +static TQString convertTime( double serialNo ) { // reference is midnight 30 Dec 1899 - QTime tt; - tt = tt.addMSecs( qRound( (serialNo-(int)serialNo) * 86400 * 1000 ) ); + TQTime tt; + tt = tt.addMSecs( tqRound( (serialNo-(int)serialNo) * 86400 * 1000 ) ); return tt.toString( "PThhHmmMss,zzz0S" ); } @@ -631,14 +631,14 @@ void ExcelImport::Private::processCellForBody( Cell* cell, KoXmlWriter* xmlWrite int formatIndex = cell->formatIndex(); - QString styleName("ce"); - styleName.append( QString::number( formatIndex ) ); + TQString styleName("ce"); + styleName.append( TQString::number( formatIndex ) ); xmlWriter->startElement( "table:table-cell" ); xmlWriter->addAttribute( "table:style-name", styleName ); if( !cell->formula().isEmpty() ) { - QString formula = string( cell->formula() ).string(); + TQString formula = string( cell->formula() ).string(); xmlWriter->addAttribute( "table:formula", formula.prepend("=") ); } @@ -654,7 +654,7 @@ void ExcelImport::Private::processCellForBody( Cell* cell, KoXmlWriter* xmlWrite if( isPercentageStyle[formatIndex] ) { xmlWriter->addAttribute( "office:value-type", "percentage" ); - xmlWriter->addAttribute( "office:value", QString::number( value.asFloat(), 'g', 15 ) ); + xmlWriter->addAttribute( "office:value", TQString::number( value.asFloat(), 'g', 15 ) ); } else if( isDateStyle[formatIndex] ) { @@ -670,12 +670,12 @@ void ExcelImport::Private::processCellForBody( Cell* cell, KoXmlWriter* xmlWrite { // fallback, just write as normal number xmlWriter->addAttribute( "office:value-type", "float" ); - xmlWriter->addAttribute( "office:value", QString::number( value.asFloat(), 'g', 15 ) ); + xmlWriter->addAttribute( "office:value", TQString::number( value.asFloat(), 'g', 15 ) ); } } else if( value.isString() ) { - QString str = string( value.asString() ).string(); + TQString str = string( value.asString() ).string(); xmlWriter->addAttribute( "office:value-type", "string" ); xmlWriter->addAttribute( "office:string-value", str ); xmlWriter->startElement( "text:p" ); @@ -692,24 +692,24 @@ void ExcelImport::Private::processCellForStyle( Cell* cell, KoXmlWriter* xmlWrit if( !xmlWriter ) return; // only IF automatic style for this format has not been already created yet - if( !styleFormats.contains( cell->formatIndex() ) ) + if( !styleFormats.tqcontains( cell->formatIndex() ) ) { styleFormats[ cell->formatIndex() ] = true; const Format& format = cell->sheet()->workbook()->format( cell->formatIndex() ); // handle data format, e.g. number style - QString refName; + TQString refName; const UString& valueFormat = format.valueFormat(); if( !valueFormat.isEmpty() ) { - refName = QString("N%1").arg(cell->formatIndex()); - QString numformat = string( valueFormat ).string(); + refName = TQString("N%1").tqarg(cell->formatIndex()); + TQString numformat = string( valueFormat ).string(); processValueFormat( numformat, refName, xmlWriter ); } // later for writing the value - QString numformat = string( valueFormat ).string(); + TQString numformat = string( valueFormat ).string(); isPercentageStyle[ cell->formatIndex() ] = isPercentageFormat( numformat ); isDateStyle[ cell->formatIndex() ] = isDateFormat( numformat ); isTimeStyle[ cell->formatIndex() ] = isTimeFormat( numformat ); @@ -717,7 +717,7 @@ void ExcelImport::Private::processCellForStyle( Cell* cell, KoXmlWriter* xmlWrit // now the real table-cell xmlWriter->startElement( "style:style" ); xmlWriter->addAttribute( "style:family", "table-cell" ); - xmlWriter->addAttribute( "style:name", QString("ce%1").arg( cell->formatIndex() ) ); + xmlWriter->addAttribute( "style:name", TQString("ce%1").tqarg( cell->formatIndex() ) ); if( !refName.isEmpty() ) xmlWriter->addAttribute( "style:data-style-name", refName ); @@ -727,18 +727,18 @@ void ExcelImport::Private::processCellForStyle( Cell* cell, KoXmlWriter* xmlWrit } } -QString convertColor( const Color& color ) +TQString convertColor( const Color& color ) { char buf[8]; sprintf( buf, "#%02x%02x%02x", color.red, color.green, color.blue ); - return QString( buf ); + return TQString( buf ); } -QString convertBorder( const Pen& pen ) +TQString convertBorder( const Pen& pen ) { if( pen.style == Pen::NoLine || pen.width == 0 ) return "none"; - QString result = QString::number( pen.width ); + TQString result = TQString::number( pen.width ); result += "pt "; switch( pen.style ) @@ -759,7 +759,7 @@ void ExcelImport::Private::processFormat( const Format* format, KoXmlWriter* xml if( !xmlWriter ) return; const FormatFont& font = format->font(); - const FormatAlignment& align = format->alignment(); + const FormatAlignment& align = format->tqalignment(); const FormatBackground& back = format->background(); const FormatBorders& borders = format->borders(); @@ -792,7 +792,7 @@ void ExcelImport::Private::processFormat( const Format* format, KoXmlWriter* xml if( !font.fontFamily().isEmpty() ) xmlWriter->addAttribute( "style:font-name", string(font.fontFamily()).string() ); - xmlWriter->addAttribute( "fo:font-size", QString("%1pt").arg(font.fontSize()) ); + xmlWriter->addAttribute( "fo:font-size", TQString("%1pt").tqarg(font.fontSize()) ); xmlWriter->addAttribute( "fo:color", convertColor( font.color() ) ); @@ -844,12 +844,12 @@ void ExcelImport::Private::processFormat( const Format* format, KoXmlWriter* xml } if( align.indentLevel() != 0 ) - xmlWriter->addAttribute( "fo:margin-left", QString::number( align.indentLevel() ) + "0pt" ); + xmlWriter->addAttribute( "fo:margin-left", TQString::number( align.indentLevel() ) + "0pt" ); } xmlWriter->endElement(); // style:paragraph-properties } -void ExcelImport::Private::processValueFormat( QString valueFormat, QString refName, +void ExcelImport::Private::processValueFormat( TQString valueFormat, TQString refName, KoXmlWriter* xmlWriter ) { /*int decimalPlaces = 2; diff --git a/filters/kspread/excel/import/excelimport.h b/filters/kspread/excel/import/excelimport.h index e3cc3f0e..77e7b747 100644 --- a/filters/kspread/excel/import/excelimport.h +++ b/filters/kspread/excel/import/excelimport.h @@ -23,18 +23,19 @@ #include <KoFilter.h> #include <KoStore.h> -#include <qcstring.h> +#include <tqcstring.h> class ExcelImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - ExcelImport ( QObject *parent, const char* name, const QStringList& ); + ExcelImport ( TQObject *tqparent, const char* name, const TQStringList& ); virtual ~ExcelImport(); - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); private: class Private; diff --git a/filters/kspread/excel/sidewinder/excel.cpp b/filters/kspread/excel/sidewinder/excel.cpp index e7c57972..99ac0eaa 100644 --- a/filters/kspread/excel/sidewinder/excel.cpp +++ b/filters/kspread/excel/sidewinder/excel.cpp @@ -185,7 +185,7 @@ static Value errorAsValue( int errorCode ) class EString::Private { public: - bool unicode; + bool tqunicode; bool richText; UString str; unsigned size; @@ -194,7 +194,7 @@ public: EString::EString() { d = new EString::Private(); - d->unicode = false; + d->tqunicode = false; d->richText = false; d->str = UString::null; d->size = 0; @@ -208,7 +208,7 @@ EString::EString( const EString& es ) EString& EString::operator=( const EString& es ) { - d->unicode = es.d->unicode; + d->tqunicode = es.d->tqunicode; d->richText = es.d->richText; d->size = es.d->size; d->str = es.d->str; @@ -220,14 +220,14 @@ EString::~EString() delete d; } -bool EString::unicode() const +bool EString::tqunicode() const { - return d->unicode; + return d->tqunicode; } void EString::setUnicode( bool u ) { - d->unicode = u; + d->tqunicode = u; } bool EString::richText() const @@ -271,7 +271,7 @@ EString EString::fromUnicodeString( const void* p, bool longString, unsigned /* unsigned char flag = data[ offset ]; offset++; // for flag (1 byte) - bool unicode = flag & 0x01; + bool tqunicode = flag & 0x01; bool richText = flag & 0x08; unsigned formatRuns = 0; @@ -283,10 +283,10 @@ EString EString::fromUnicodeString( const void* p, bool longString, unsigned /* // find out total bytes used in this string unsigned size = offset + len; // string data - if( unicode ) size += len; // because unicode takes 2-bytes char + if( tqunicode ) size += len; // because tqunicode takes 2-bytes char if( richText ) size += (formatRuns*4); - if( !unicode ) + if( !tqunicode ) { char* buffer = new char[ len+1 ]; memcpy( buffer, data + offset, len ); @@ -303,7 +303,7 @@ EString EString::fromUnicodeString( const void* p, bool longString, unsigned /* } EString result; - result.setUnicode( unicode ); + result.setUnicode( tqunicode ); result.setRichText( richText ); result.setSize( size ); result.setStr( str ); @@ -351,14 +351,14 @@ EString EString::fromSheetName( const void* p, unsigned datasize ) unsigned len = data[0]; unsigned flag = data[1]; - bool unicode = flag & 1; + bool tqunicode = flag & 1; if( len > datasize-2 ) len = datasize-2; if( len == 0 ) return EString(); unsigned offset = 2; - if( !unicode ) + if( !tqunicode ) { char* buffer = new char[ len+1 ]; memcpy( buffer, data + offset, len ); @@ -376,7 +376,7 @@ EString EString::fromSheetName( const void* p, unsigned datasize ) } EString result; - result.setUnicode( unicode ); + result.setUnicode( tqunicode ); result.setRichText( richText ); result.setSize( datasize ); result.setStr( str ); @@ -1005,7 +1005,7 @@ static const FunctionEntry FunctionEntries[] = { "ZTEST", 0 }, // 324 { "LARGE", 2 }, // 325 { "SMALL", 2 }, // 326 - { "QUARTILE", 2 }, // 327 + { "TQUARTILE", 2 }, // 327 { "PERCENTILE", 2 }, // 328 { "PERCENTRANK", 0 }, // 329 { "MODALVALUE", 0 }, // 330 @@ -2012,7 +2012,7 @@ void BoundSheetRecord::setData( unsigned size, const unsigned char* data ) d->visibility = data[4]; d->type = data[5]; - /* FIXME: it turned out that sheet name is not normal unicode string + /* FIXME: it turned out that sheet name is not normal tqunicode string where the first two bytes specifies string length, but instead only the first specifies it. the next byte could be correctly interpreted as flag. @@ -4175,7 +4175,7 @@ public: unsigned formatIndex; bool locked; bool formulaHidden; - unsigned parentStyle; + unsigned tqparentStyle; unsigned horizontalAlignment; unsigned verticalAlignment; bool textWrap; @@ -4207,7 +4207,7 @@ XFRecord::XFRecord(): Record() d->formatIndex = 0; d->locked = false; d->formulaHidden = false; - d->parentStyle = 0; + d->tqparentStyle = 0; d->horizontalAlignment = Left; d->verticalAlignment = VCentered; d->textWrap = false; @@ -4249,7 +4249,7 @@ XFRecord& XFRecord::operator=( const XFRecord& xf ) d->formatIndex = xf.formatIndex(); d->locked = xf.locked(); d->formulaHidden = xf.formulaHidden(); - d->parentStyle = xf.parentStyle(); + d->tqparentStyle = xf.tqparentStyle(); d->horizontalAlignment = xf.horizontalAlignment(); d->verticalAlignment = xf.verticalAlignment(); d->textWrap = xf.textWrap(); @@ -4315,14 +4315,14 @@ void XFRecord::setFormulaHidden( bool f ) d->formulaHidden = f; } -unsigned XFRecord::parentStyle() const +unsigned XFRecord::tqparentStyle() const { - return d->parentStyle; + return d->tqparentStyle; } void XFRecord::setParentStyle( unsigned p ) { - d->parentStyle = p; + d->tqparentStyle = p; } unsigned XFRecord::horizontalAlignment() const @@ -4657,13 +4657,13 @@ void XFRecord::setData( unsigned size, const unsigned char* data ) void XFRecord::dump( std::ostream& out ) const { out << "XF" << std::endl; - out << " Parent Style : " << parentStyle() << std::endl; + out << " Parent Style : " << tqparentStyle() << std::endl; out << " Font Index : " << fontIndex() << std::endl; out << " Format Index : " << formatIndex() << std::endl; out << " Locked : " << (locked()?"Yes":"No") << std::endl; out << " Formula Visibility : " << (formulaHidden()?"Hidden":"Visible") << std::endl; - out << " Horizontal Align : " << horizontalAlignmentAsString() << std::endl; - out << " Vertical Align : " << verticalAlignmentAsString() << std::endl; + out << " Qt::Horizontal Align : " << horizontalAlignmentAsString() << std::endl; + out << " Qt::Vertical Align : " << verticalAlignmentAsString() << std::endl; out << " Text Wrap : " << ( textWrap() ? "yes" : "no" ) << std::endl; out << " Rotation : " << rotationAngle() << std::endl; out << " Stacked Letters : " << ( stackedLetters() ? "yes" : "no" ) << std::endl; @@ -5113,31 +5113,31 @@ bool ExcelReader::load( Workbook* workbook, const char* filename ) format.setFont( convertFont( xf.fontIndex() ) ); - FormatAlignment alignment; + FormatAlignment tqalignment; switch( xf.horizontalAlignment() ) { case XFRecord::Left: - alignment.setAlignX( Format::Left ); break; + tqalignment.setAlignX( Format::Left ); break; case XFRecord::Right: - alignment.setAlignX( Format::Right ); break; + tqalignment.setAlignX( Format::Right ); break; case XFRecord::Centered: - alignment.setAlignX( Format::Center ); break; + tqalignment.setAlignX( Format::Center ); break; default: break; // FIXME still unsupported: Repeat, Justified, Filled, Distributed }; switch( xf.verticalAlignment() ) { case XFRecord::Top: - alignment.setAlignY( Format::Top ); break; + tqalignment.setAlignY( Format::Top ); break; case XFRecord::VCentered: - alignment.setAlignY( Format::Middle ); break; + tqalignment.setAlignY( Format::Middle ); break; case XFRecord::Bottom: - alignment.setAlignY( Format::Bottom ); break; + tqalignment.setAlignY( Format::Bottom ); break; default: break; // FIXME still unsupported: Justified, Distributed } - alignment.setWrap( xf.textWrap() ); - format.setAlignment( alignment ); + tqalignment.setWrap( xf.textWrap() ); + format.tqsetAlignment( tqalignment ); FormatBorders borders; @@ -5520,11 +5520,11 @@ void ExcelReader::handleFooter( FooterRecord* record ) int pos = -1, len = 0; // left part - pos = footer.find( UString("&L") ); + pos = footer.tqfind( UString("&L") ); if( pos >= 0 ) { pos += 2; - len = footer.find( UString("&C") ) - pos; + len = footer.tqfind( UString("&C") ) - pos; if( len > 0 ) { left = footer.substr( pos, len ); @@ -5533,11 +5533,11 @@ void ExcelReader::handleFooter( FooterRecord* record ) } // center part - pos = footer.find( UString("&C") ); + pos = footer.tqfind( UString("&C") ); if( pos >= 0 ) { pos += 2; - len = footer.find( UString("&R") ) - pos; + len = footer.tqfind( UString("&R") ) - pos; if( len > 0 ) { center = footer.substr( pos, len ); @@ -5546,7 +5546,7 @@ void ExcelReader::handleFooter( FooterRecord* record ) } // right part - pos = footer.find( UString("&R") ); + pos = footer.tqfind( UString("&R") ); if( pos >= 0 ) { pos += 2; @@ -5569,11 +5569,11 @@ void ExcelReader::handleHeader( HeaderRecord* record ) int pos = -1, len = 0; // left part of the header - pos = header.find( UString("&L") ); + pos = header.tqfind( UString("&L") ); if( pos >= 0 ) { pos += 2; - len = header.find( UString("&C") ) - pos; + len = header.tqfind( UString("&C") ) - pos; if( len > 0 ) { left = header.substr( pos, len ); @@ -5582,11 +5582,11 @@ void ExcelReader::handleHeader( HeaderRecord* record ) } // center part of the header - pos = header.find( UString("&C") ); + pos = header.tqfind( UString("&C") ); if( pos >= 0 ) { pos += 2; - len = header.find( UString("&R") ) - pos; + len = header.tqfind( UString("&R") ) - pos; if( len > 0 ) { center = header.substr( pos, len ); @@ -5595,7 +5595,7 @@ void ExcelReader::handleHeader( HeaderRecord* record ) } // right part of the header - pos = header.find( UString("&R") ); + pos = header.tqfind( UString("&R") ); if( pos >= 0 ) { pos += 2; @@ -5929,31 +5929,31 @@ Format ExcelReader::convertFormat( unsigned xfIndex ) format.setFont( convertFont( xf.fontIndex() ) ); - FormatAlignment alignment; + FormatAlignment tqalignment; switch( xf.horizontalAlignment() ) { case XFRecord::Left: - alignment.setAlignX( Format::Left ); break; + tqalignment.setAlignX( Format::Left ); break; case XFRecord::Right: - alignment.setAlignX( Format::Right ); break; + tqalignment.setAlignX( Format::Right ); break; case XFRecord::Centered: - alignment.setAlignX( Format::Center ); break; + tqalignment.setAlignX( Format::Center ); break; default: break; // FIXME still unsupported: Repeat, Justified, Filled, Distributed }; switch( xf.verticalAlignment() ) { case XFRecord::Top: - alignment.setAlignY( Format::Top ); break; + tqalignment.setAlignY( Format::Top ); break; case XFRecord::VCentered: - alignment.setAlignY( Format::Middle ); break; + tqalignment.setAlignY( Format::Middle ); break; case XFRecord::Bottom: - alignment.setAlignY( Format::Bottom ); break; + tqalignment.setAlignY( Format::Bottom ); break; default: break; // FIXME still unsupported: Justified, Distributed } - alignment.setWrap( xf.textWrap() ); - format.setAlignment( alignment ); + tqalignment.setWrap( xf.textWrap() ); + format.tqsetAlignment( tqalignment ); FormatBorders borders; diff --git a/filters/kspread/excel/sidewinder/excel.h b/filters/kspread/excel/sidewinder/excel.h index 5221b518..51c9efcd 100644 --- a/filters/kspread/excel/sidewinder/excel.h +++ b/filters/kspread/excel/sidewinder/excel.h @@ -36,7 +36,7 @@ enum { UnknownExcel = 0, Excel95, Excel97, Excel2000 }; class Record; -// rich-text, unicode, far-east support Excel string +// rich-text, tqunicode, far-east support Excel string class EString { @@ -50,7 +50,7 @@ public: ~EString(); - bool unicode() const; + bool tqunicode() const; void setUnicode( bool u ); @@ -1838,7 +1838,7 @@ private: /** - Class MergedCellsRecord represents MergedCells record, which contains + Class MergedCellsRecord represents MergedCells record, which tqcontains a list of all merged cells in the current sheets. Each entry in this list define the range of cells that should be merged, namely firstRow, lastRow, firstColumn and lastColumn. @@ -2777,20 +2777,20 @@ public: void setFormulaHidden( bool f ); /** - * Returns the index of the parent stlye of this format. + * Returns the index of the tqparent stlye of this format. * This refers to the index of the XFormat table which is constructed * from a series of XFormat records. * * \sa setParentStyle */ - unsigned parentStyle() const; + unsigned tqparentStyle() const; /** - * Sets the index of the parent stlye of this format. + * Sets the index of the tqparent stlye of this format. * This refers to the index of the XFormat table which is constructed * from a series of XFormat records. * - * \sa parentStyle + * \sa tqparentStyle */ void setParentStyle( unsigned ps ); @@ -2805,17 +2805,17 @@ public: Distributed }; /** - * Gets the horizontal alignment, e.g Left. + * Gets the horizontal tqalignment, e.g Left. */ unsigned horizontalAlignment() const; /** - * Sets the horizontal alignment, e.g Left. + * Sets the horizontal tqalignment, e.g Left. */ void setHorizontalAlignment( unsigned ha ); /** - * Returns human-readable string representation of the horizontal alignment. + * Returns human-readable string representation of the horizontal tqalignment. For example, XFRecord::Left will return "Left". */ const char* horizontalAlignmentAsString() const; @@ -2828,21 +2828,21 @@ public: VDistributed = 4 }; /** - * Gets the vertical alignment, e.g Bottom. + * Gets the vertical tqalignment, e.g Bottom. * * \sa setVerticalAlignment */ unsigned verticalAlignment() const; /** - * Sets the vertical alignment, e.g Top. + * Sets the vertical tqalignment, e.g Top. * * \sa verticalAlignment */ void setVerticalAlignment( unsigned va ); /** - * Returns human-readable string representation of the vertical alignment. + * Returns human-readable string representation of the vertical tqalignment. For example, XFRecord::Top will return "Top". */ const char* verticalAlignmentAsString() const; diff --git a/filters/kspread/excel/sidewinder/format.cpp b/filters/kspread/excel/sidewinder/format.cpp index 8ce69f24..29481fd0 100644 --- a/filters/kspread/excel/sidewinder/format.cpp +++ b/filters/kspread/excel/sidewinder/format.cpp @@ -271,7 +271,7 @@ FormatAlignment& FormatAlignment::operator=( const FormatAlignment& align ) return assign( align ); } -// assign from another alignment +// assign from another tqalignment FormatAlignment& FormatAlignment::assign( const FormatAlignment& align ) { d->null = align.isNull(); @@ -398,7 +398,7 @@ FormatBackground& FormatBackground::operator=( const FormatBackground& backgroun return assign( background ); } -// assign from another alignment +// assign from another tqalignment FormatBackground& FormatBackground::assign( const FormatBackground& background ) { d->null = background.isNull(); @@ -498,7 +498,7 @@ FormatBorders& FormatBorders::operator=( const FormatBorders& border ) return assign( border ); } -// assign from another alignment +// assign from another tqalignment FormatBorders& FormatBorders::assign( const FormatBorders& border ) { d->null = border.isNull(); @@ -581,7 +581,7 @@ class Format::Private { public: FormatFont font; - FormatAlignment alignment; + FormatAlignment tqalignment; FormatBorders borders; FormatBackground background; UString valueFormat; @@ -617,7 +617,7 @@ Format& Format::operator=( const Format& f ) Format& Format::assign( const Format& f ) { d->font = f.font(); - d->alignment = f.alignment(); + d->tqalignment = f.tqalignment(); d->borders = f.borders(); d->valueFormat = f.valueFormat(); d->background = f.background(); @@ -626,7 +626,7 @@ Format& Format::assign( const Format& f ) bool Format::isNull() const { - return d->font.isNull() && d->alignment.isNull() && d->borders.isNull(); + return d->font.isNull() && d->tqalignment.isNull() && d->borders.isNull(); } FormatFont& Format::font() const @@ -639,14 +639,14 @@ void Format::setFont( const FormatFont& font ) d->font = font; } -FormatAlignment& Format::alignment() const +FormatAlignment& Format::tqalignment() const { - return d->alignment; + return d->tqalignment; } -void Format::setAlignment( const FormatAlignment& alignment ) +void Format::tqsetAlignment( const FormatAlignment& tqalignment ) { - d->alignment = alignment; + d->tqalignment = tqalignment; } FormatBorders& Format::borders() const @@ -682,8 +682,8 @@ void Format::setValueFormat( const UString& valueFormat ) // merge f into current format Format& Format::apply( const Format& f ) { - if( !f.alignment().isNull() ) - alignment() = f.alignment(); + if( !f.tqalignment().isNull() ) + tqalignment() = f.tqalignment(); if( !f.font().isNull() ) font() = f.font(); if( !f.borders().isNull() ) @@ -700,7 +700,7 @@ bool Format::operator==(const Format& format) const { return d->font == format.d->font && - d->alignment == format.d->alignment && + d->tqalignment == format.d->tqalignment && d->borders == format.d->borders && d->background == format.d->background && d->valueFormat == format.d->valueFormat; @@ -710,7 +710,7 @@ bool Format::operator!=(const Format& format) const { return d->font != format.d->font || - d->alignment != format.d->alignment || + d->tqalignment != format.d->tqalignment || d->borders != format.d->borders || d->background != format.d->background || d->valueFormat != format.d->valueFormat; diff --git a/filters/kspread/excel/sidewinder/format.h b/filters/kspread/excel/sidewinder/format.h index 55fab762..dcadc1c2 100644 --- a/filters/kspread/excel/sidewinder/format.h +++ b/filters/kspread/excel/sidewinder/format.h @@ -266,9 +266,9 @@ private: /** - * Defines alignment information for cell format. + * Defines tqalignment information for cell format. * - * Class FormatAlignment defines the horizontal and vertical alignment + * Class FormatAlignment defines the horizontal and vertical tqalignment * for the text inside a cell. * */ @@ -278,37 +278,37 @@ class FormatAlignment public: /** - * Creates a default alignment information. + * Creates a default tqalignment information. */ FormatAlignment(); /** - * Destroys the alignment information + * Destroys the tqalignment information */ ~FormatAlignment(); /** - * Creates a copy of alignment information. + * Creates a copy of tqalignment information. */ FormatAlignment( const FormatAlignment& ); /** - * Assigns from another alignment information. + * Assigns from another tqalignment information. */ FormatAlignment& operator=( const FormatAlignment& ); /** - * Assigns from another alignment information. + * Assigns from another tqalignment information. */ FormatAlignment& assign( const FormatAlignment& ); /** - * Returns true if it is a default alignment information. + * Returns true if it is a default tqalignment information. */ bool isNull() const; /** - * Returns horizontal alignment. Possible values are + * Returns horizontal tqalignment. Possible values are * Format::Left, Format::Right and Format::Center. * * \sa setAlignX @@ -316,14 +316,14 @@ public: unsigned alignX() const; /** - * Sets the horizontal alignment. + * Sets the horizontal tqalignment. * * \sa alignX */ void setAlignX( unsigned xa ); /** - * Returns horizontal alignment. Possible values are + * Returns horizontal tqalignment. Possible values are * Format::Top, Format::Middle and Format::Bottom. * * \sa setAlignY @@ -331,7 +331,7 @@ public: unsigned alignY() const; /** - * Sets the horizontal alignment. + * Sets the horizontal tqalignment. * * \sa alignY */ @@ -380,12 +380,12 @@ public: void setRotationAngle( unsigned r ); /** - * Returns true if this alignment is equal to f; otherwise returns false. + * Returns true if this tqalignment is equal to f; otherwise returns false. */ bool operator==(const FormatAlignment& f) const; /** - * Returns true if this alignment is not equal to f; otherwise returns false. + * Returns true if this tqalignment is not equal to f; otherwise returns false. */ bool operator!=(const FormatAlignment& f) const; @@ -441,8 +441,8 @@ public: Dense6Pattern, Dense7Pattern, HorPattern, // Horizonatal lines - VerPattern, // Vertical lines - CrossPattern, // Horizontal and Vertical lines + VerPattern, //Qt::Vertical lines + CrossPattern, //Qt::Horizontal andQt::Vertical lines BDiagPattern, // Left-bottom to right-top diagonal lines FDiagPattern, // Left-top to right-bottom diagonal lines DiagCrossPattern, // Crossing diagonal lines @@ -683,14 +683,14 @@ public: void setFont( const FormatFont& font ); /** - * Returns a constant reference to the alignment information of this format. + * Returns a constant reference to the tqalignment information of this format. */ - FormatAlignment& alignment() const; + FormatAlignment& tqalignment() const; /** - * Sets new alignment information for this format. + * Sets new tqalignment information for this format. */ - void setAlignment( const FormatAlignment& alignment ); + void tqsetAlignment( const FormatAlignment& tqalignment ); /** * Returns a reference to the borders information of this format. diff --git a/filters/kspread/excel/sidewinder/pole.cpp b/filters/kspread/excel/sidewinder/pole.cpp index e4090cd9..fac4aa62 100644 --- a/filters/kspread/excel/sidewinder/pole.cpp +++ b/filters/kspread/excel/sidewinder/pole.cpp @@ -95,7 +95,7 @@ class DirEntry { public: bool valid; // false if invalid (should be skipped) - std::string name; // the name, not in unicode anymore + std::string name; // the name, not in tqunicode anymore bool dir; // true if directory unsigned long size; // size (not valid if directory) unsigned long start; // starting block @@ -114,9 +114,9 @@ class DirTree DirEntry* entry( unsigned index ); DirEntry* entry( const std::string& name, bool create=false ); int indexOf( DirEntry* e ); - int parent( unsigned index ); + int tqparent( unsigned index ); std::string fullName( unsigned index ); - std::vector<unsigned> children( unsigned index ); + std::vector<unsigned> tqchildren( unsigned index ); void load( unsigned char* buffer, unsigned len ); void save( unsigned char* buffer ); unsigned size(); @@ -507,13 +507,13 @@ int DirTree::indexOf( DirEntry* e ) return -1; } -int DirTree::parent( unsigned index ) +int DirTree::tqparent( unsigned index ) { - // brute-force, basically we iterate for each entries, find its children - // and check if one of the children is 'index' + // brute-force, basically we iterate for each entries, find its tqchildren + // and check if one of the tqchildren is 'index' for( unsigned j=0; j<entryCount(); j++ ) { - std::vector<unsigned> chi = children( j ); + std::vector<unsigned> chi = tqchildren( j ); for( unsigned i=0; i<chi.size();i++ ) if( chi[i] == index ) return j; @@ -529,7 +529,7 @@ std::string DirTree::fullName( unsigned index ) std::string result = entry( index )->name; result.insert( 0, "/" ); - int p = parent( index ); + int p = tqparent( index ); DirEntry * _entry = 0; while( p > 0 ) { @@ -577,8 +577,8 @@ DirEntry* DirTree::entry( const std::string& name, bool create ) for( it = names.begin(); it != names.end(); ++it ) { - // find among the children of index - std::vector<unsigned> chi = children( index ); + // find among the tqchildren of index + std::vector<unsigned> chi = tqchildren( index ); unsigned child = 0; for( unsigned i = 0; i < chi.size(); i++ ) { @@ -593,11 +593,11 @@ DirEntry* DirTree::entry( const std::string& name, bool create ) if( child > 0 ) index = child; else { - // not found among children + // not found among tqchildren if( !create ) return (DirEntry*)0; // create a new entry - unsigned parent = index; + unsigned tqparent = index; entries.push_back( DirEntry() ); index = entryCount()-1; DirEntry* e = entry( index ); @@ -608,8 +608,8 @@ DirEntry* DirTree::entry( const std::string& name, bool create ) e->start = 0; e->child = End; e->prev = End; - e->next = entry(parent)->child; - entry(parent)->child = index; + e->next = entry(tqparent)->child; + entry(tqparent)->child = index; } } @@ -650,7 +650,7 @@ void dirtree_find_siblings( DirTree* dirtree, std::vector<unsigned>& result, } } -std::vector<unsigned> DirTree::children( unsigned index ) +std::vector<unsigned> DirTree::tqchildren( unsigned index ) { std::vector<unsigned> result; @@ -1138,7 +1138,7 @@ StreamIO::StreamIO( StorageIO* s, DirEntry* e) updateCache(); } -// FIXME tell parent we're gone +// FIXME tell tqparent we're gone StreamIO::~StreamIO() { delete[] cache_data; @@ -1285,10 +1285,10 @@ std::list<std::string> Storage::entries( const std::string& path ) DirEntry* e = dt->entry( path, false ); if( e && e->dir ) { - unsigned parent = dt->indexOf( e ); - std::vector<unsigned> children = dt->children( parent ); - for( unsigned i = 0; i < children.size(); i++ ) - result.push_back( dt->entry( children[i] )->name ); + unsigned tqparent = dt->indexOf( e ); + std::vector<unsigned> tqchildren = dt->tqchildren( tqparent ); + for( unsigned i = 0; i < tqchildren.size(); i++ ) + result.push_back( dt->entry( tqchildren[i] )->name ); } return result; @@ -1307,7 +1307,7 @@ Stream::Stream( Storage* storage, const std::string& name ) io = storage->io->streamIO( name ); } -// FIXME tell parent we're gone +// FIXME tell tqparent we're gone Stream::~Stream() { delete io; diff --git a/filters/kspread/excel/sidewinder/ustring.cpp b/filters/kspread/excel/sidewinder/ustring.cpp index 304fed18..497bc586 100644 --- a/filters/kspread/excel/sidewinder/ustring.cpp +++ b/filters/kspread/excel/sidewinder/ustring.cpp @@ -39,7 +39,7 @@ UString UString::null; static char *statBuffer = 0L; UChar::UChar(const UCharReference &c) - : uc( c.unicode() ) + : uc( c.tqunicode() ) { } @@ -492,7 +492,7 @@ UString UString::substr(int pos, int len) const return result; } -int UString::find(const UString &f, int pos) const +int UString::tqfind(const UString &f, int pos) const { if (isNull()) return -1; @@ -579,7 +579,7 @@ bool Swinder::operator<(const UString& s1, const UString& s2) l++; } if (l < lmin) - return (c1->unicode() < c2->unicode()); + return (c1->tqunicode() < c2->tqunicode()); return (l1 < l2); } diff --git a/filters/kspread/excel/sidewinder/ustring.h b/filters/kspread/excel/sidewinder/ustring.h index 04600003..0643400d 100644 --- a/filters/kspread/excel/sidewinder/ustring.h +++ b/filters/kspread/excel/sidewinder/ustring.h @@ -32,8 +32,8 @@ namespace Swinder { * @short Unicode character. * * UChar represents a 16 bit Unicode character. It's internal data - * representation is compatible to XChar2b and QChar. It's therefore - * possible to exchange data with X and Qt with shallow copies. + * representation is compatible to XChar2b and TQChar. It's therefore + * possible to exchange data with X and TQt with shallow copies. */ struct UChar { /** @@ -68,7 +68,7 @@ namespace Swinder { /** * @return the 16 bit Unicode value of the character */ - unsigned short unicode() const { return uc; } + unsigned short tqunicode() const { return uc; } public: /** * A static instance of UChar(0). @@ -120,7 +120,7 @@ namespace Swinder { /** * @return Unicode value. */ - unsigned short unicode() const { return ref().uc; } + unsigned short tqunicode() const { return ref().uc; } /** * @return Lower byte. */ @@ -333,7 +333,7 @@ namespace Swinder { * @return Position of first occurence of f starting at position pos. * -1 if the search was not successful. */ - int find(const UString &f, int pos = 0) const; + int tqfind(const UString &f, int pos = 0) const; /** * Static instance of a null string. diff --git a/filters/kspread/gnumeric/gnumeric.xsd b/filters/kspread/gnumeric/gnumeric.xsd index 3ff04ff1..d9ab545b 100644 --- a/filters/kspread/gnumeric/gnumeric.xsd +++ b/filters/kspread/gnumeric/gnumeric.xsd @@ -427,8 +427,8 @@ </xsd:complexType> </xsd:element> </xsd:sequence> - <xsd:attribute name="HAlign" type="gmr:horizontal_alignment"/> - <xsd:attribute name="VAlign" type="gmr:vertical_alignment" /> + <xsd:attribute name="HAlign" type="gmr:horizontal_tqalignment"/> + <xsd:attribute name="VAlign" type="gmr:vertical_tqalignment" /> <xsd:attribute name="WrapText" type="xsd:boolean" /> <xsd:attribute name="ShrinkToFit" type="xsd:integer" /> <!-- should be bool, but some files have odd truth values --> <xsd:attribute name="Rotation" type="xsd:integer" use="optional"/> @@ -492,7 +492,7 @@ </xsd:restriction> </xsd:simpleType> - <xsd:simpleType name="horizontal_alignment"> + <xsd:simpleType name="horizontal_tqalignment"> <xsd:restriction base="xsd:integer"> <!-- this is a bit map as follows: 1 = GENERAL @@ -508,7 +508,7 @@ </xsd:restriction> </xsd:simpleType> - <xsd:simpleType name="vertical_alignment"> + <xsd:simpleType name="vertical_tqalignment"> <xsd:restriction base="xsd:integer"> <!-- this is a bit map as follows: 1 = TOP @@ -531,14 +531,14 @@ 4 = 25% 5 = 12.5% 6 = 6.25% - 7 = Horizontal Stripe - 8 = Vertical Stripe + 7 =Qt::Horizontal Stripe + 8 =Qt::Vertical Stripe 9 = Reverse Diagonal Stripe 10 = Diagonal Stripe 11 = Diagonal Crosshatch 12 = Thick Diagonal Crosshatch - 13 = Thin Horizontal Stripe - 14 = Thin Vertical Stripe + 13 = ThinQt::Horizontal Stripe + 14 = ThinQt::Vertical Stripe 15 = Thin Reverse Diagonal Stripe 16 = Thin Diagonal Stripe 17 = Thin Crosshatch @@ -644,7 +644,7 @@ <xsd:attribute name="FillColor" type="gmr:color" use="required"/> <xsd:attribute name="Type" type="gmr:objectfilled" use="required"/> <xsd:attribute name="Width" type="xsd:positiveInteger" use="required"/> - <!-- the arrow shape attributes are only used if the type is + <!-- the arrow tqshape attributes are only used if the type is arrow (type="gmr:2") --> <xsd:attribute name="ArrowShapeA" type="xsd:double" use="optional"/> @@ -801,7 +801,7 @@ <xsd:attribute name="ExprID" type="xsd:positiveInteger" use="optional"/> <!-- ValueType is not used if the cell contains an expression --> <xsd:attribute name="ValueType" type="gmr:cell_type" use="optional"/> - <!-- ValueFormat is apparently used only for cell-by-cell format + <!-- ValueFormat is aptqparently used only for cell-by-cell format overrides --> <xsd:attribute name="ValueFormat" type="xsd:string" use="optional"/> diff --git a/filters/kspread/gnumeric/gnumericexport.cc b/filters/kspread/gnumeric/gnumericexport.cc index 443353f4..beb78879 100644 --- a/filters/kspread/gnumeric/gnumericexport.cc +++ b/filters/kspread/gnumeric/gnumericexport.cc @@ -27,11 +27,11 @@ #include <kmessagebox.h> #include <kgenericfactory.h> #include <KoFilterChain.h> -#include <qapplication.h> -#include <qptrlist.h> -#include <qsortedlist.h> -#include <qfile.h> -#include <qtextstream.h> +#include <tqapplication.h> +#include <tqptrlist.h> +#include <tqsortedlist.h> +#include <tqfile.h> +#include <tqtextstream.h> #include <kspread_map.h> #include <kspread_sheet.h> @@ -46,7 +46,7 @@ using namespace KSpread; typedef KGenericFactory<GNUMERICExport, KoFilter> GNUMERICExportFactory; K_EXPORT_COMPONENT_FACTORY( libgnumericexport, GNUMERICExportFactory( "kofficefilters" ) ) -GNUMERICExport::GNUMERICExport(KoFilter *, const char *, const QStringList&) : +GNUMERICExport::GNUMERICExport(KoFilter *, const char *, const TQStringList&) : KoFilter() { isLink = false; @@ -60,39 +60,39 @@ KoFilter() bool GNUMERICExport::hasBorder(Cell *cell, int currentcolumn, int currentrow) { if ( ( (cell->format()->leftBorderWidth(currentcolumn, currentrow) != 0) && - (cell->format()->leftBorderStyle(currentcolumn, currentrow) != Qt::NoPen ) ) || + (cell->format()->leftBorderStyle(currentcolumn, currentrow) != TQt::NoPen ) ) || ( (cell->format()->rightBorderWidth(currentcolumn, currentrow) != 0) && - (cell->format()->rightBorderStyle(currentcolumn, currentrow) != Qt::NoPen ) ) || + (cell->format()->rightBorderStyle(currentcolumn, currentrow) != TQt::NoPen ) ) || ( (cell->format()->topBorderWidth(currentcolumn, currentrow) != 0) && - (cell->format()->topBorderStyle(currentcolumn, currentrow) != Qt::NoPen ) ) || + (cell->format()->topBorderStyle(currentcolumn, currentrow) != TQt::NoPen ) ) || ( (cell->format()->bottomBorderWidth(currentcolumn, currentrow) != 0) && - (cell->format()->bottomBorderStyle(currentcolumn, currentrow) != Qt::NoPen ) ) || + (cell->format()->bottomBorderStyle(currentcolumn, currentrow) != TQt::NoPen ) ) || ( (cell->format()->fallDiagonalWidth(currentcolumn, currentrow) != 0) && - (cell->format()->fallDiagonalStyle(currentcolumn, currentrow) != Qt::NoPen ) ) || + (cell->format()->fallDiagonalStyle(currentcolumn, currentrow) != TQt::NoPen ) ) || ( (cell->format()->goUpDiagonalWidth(currentcolumn, currentrow) != 0) && - (cell->format()->goUpDiagonalStyle(currentcolumn, currentrow) != Qt::NoPen ) ) ) + (cell->format()->goUpDiagonalStyle(currentcolumn, currentrow) != TQt::NoPen ) ) ) return true; else return false; } -const QString GNUMERICExport::ColorToString(int red, int green, int blue) +const TQString GNUMERICExport::ColorToString(int red, int green, int blue) { - return QString::number(red,16)+":"+QString::number(green,16)+":"+QString::number(blue,16); + return TQString::number(red,16)+":"+TQString::number(green,16)+":"+TQString::number(blue,16); } -QDomElement GNUMERICExport::GetBorderStyle(QDomDocument gnumeric_doc,Cell * cell, int currentcolumn, int currentrow) +TQDomElement GNUMERICExport::GetBorderStyle(TQDomDocument gnumeric_doc,Cell * cell, int currentcolumn, int currentrow) { - QDomElement border_style; - QDomElement border; + TQDomElement border_style; + TQDomElement border; int red, green, blue; - QColor color; + TQColor color; border_style = gnumeric_doc.createElement("gmr:StyleBorder"); if ( (cell->format()->leftBorderWidth(currentcolumn, currentrow) != 0) && - (cell->format()->leftBorderStyle(currentcolumn, currentrow) != Qt::NoPen ) ) + (cell->format()->leftBorderStyle(currentcolumn, currentrow) != TQt::NoPen ) ) { border = gnumeric_doc.createElement("gmr:Left"); border.setAttribute("Style","1"); @@ -102,7 +102,7 @@ QDomElement GNUMERICExport::GetBorderStyle(QDomDocument gnumeric_doc,Cell * cell green = color.green()<<8; blue = color.blue()<<8; - border.setAttribute("Color", QString::number(red,16)+":"+QString::number(green,16) +":"+QString::number(blue,16)); + border.setAttribute("Color", TQString::number(red,16)+":"+TQString::number(green,16) +":"+TQString::number(blue,16)); } else { @@ -113,7 +113,7 @@ QDomElement GNUMERICExport::GetBorderStyle(QDomDocument gnumeric_doc,Cell * cell border_style.appendChild(border); if ( (cell->format()->rightBorderWidth(currentcolumn, currentrow) != 0) && - (cell->format()->rightBorderStyle(currentcolumn, currentrow) != Qt::NoPen ) ) + (cell->format()->rightBorderStyle(currentcolumn, currentrow) != TQt::NoPen ) ) { border = gnumeric_doc.createElement("gmr:Right"); border.setAttribute("Style","1"); @@ -123,7 +123,7 @@ QDomElement GNUMERICExport::GetBorderStyle(QDomDocument gnumeric_doc,Cell * cell green = color.green()<<8; blue = color.blue()<<8; - border.setAttribute("Color", QString::number(red,16)+":"+QString::number(green,16) +":"+QString::number(blue,16)); + border.setAttribute("Color", TQString::number(red,16)+":"+TQString::number(green,16) +":"+TQString::number(blue,16)); } else { @@ -134,7 +134,7 @@ QDomElement GNUMERICExport::GetBorderStyle(QDomDocument gnumeric_doc,Cell * cell border_style.appendChild(border); if ( (cell->format()->topBorderWidth(currentcolumn, currentrow) != 0) && - (cell->format()->topBorderStyle(currentcolumn, currentrow) != Qt::NoPen ) ) + (cell->format()->topBorderStyle(currentcolumn, currentrow) != TQt::NoPen ) ) { border = gnumeric_doc.createElement("gmr:Top"); border.setAttribute("Style","1"); @@ -144,7 +144,7 @@ QDomElement GNUMERICExport::GetBorderStyle(QDomDocument gnumeric_doc,Cell * cell green = color.green()<<8; blue = color.blue()<<8; - border.setAttribute("Color", QString::number(red,16)+":"+QString::number(green,16) +":"+QString::number(blue,16)); + border.setAttribute("Color", TQString::number(red,16)+":"+TQString::number(green,16) +":"+TQString::number(blue,16)); } else { @@ -155,7 +155,7 @@ QDomElement GNUMERICExport::GetBorderStyle(QDomDocument gnumeric_doc,Cell * cell border_style.appendChild(border); if ( (cell->format()->bottomBorderWidth(currentcolumn, currentrow) != 0) && - (cell->format()->bottomBorderStyle(currentcolumn, currentrow) != Qt::NoPen ) ) + (cell->format()->bottomBorderStyle(currentcolumn, currentrow) != TQt::NoPen ) ) { border = gnumeric_doc.createElement("gmr:Bottom"); border.setAttribute("Style","1"); @@ -165,7 +165,7 @@ QDomElement GNUMERICExport::GetBorderStyle(QDomDocument gnumeric_doc,Cell * cell green = color.green()<<8; blue = color.blue()<<8; - border.setAttribute("Color", QString::number(red,16)+":"+QString::number(green,16) +":"+QString::number(blue,16)); + border.setAttribute("Color", TQString::number(red,16)+":"+TQString::number(green,16) +":"+TQString::number(blue,16)); } else { @@ -176,7 +176,7 @@ QDomElement GNUMERICExport::GetBorderStyle(QDomDocument gnumeric_doc,Cell * cell border_style.appendChild(border); if ( (cell->format()->fallDiagonalWidth(currentcolumn, currentrow) != 0) && - (cell->format()->fallDiagonalStyle(currentcolumn, currentrow) != Qt::NoPen ) ) + (cell->format()->fallDiagonalStyle(currentcolumn, currentrow) != TQt::NoPen ) ) { border = gnumeric_doc.createElement("gmr:Diagonal"); border.setAttribute("Style","1"); @@ -186,7 +186,7 @@ QDomElement GNUMERICExport::GetBorderStyle(QDomDocument gnumeric_doc,Cell * cell green = color.green()<<8; blue = color.blue()<<8; - border.setAttribute("Color", QString::number(red,16)+":"+QString::number(green,16) +":"+QString::number(blue,16)); + border.setAttribute("Color", TQString::number(red,16)+":"+TQString::number(green,16) +":"+TQString::number(blue,16)); } else { @@ -197,7 +197,7 @@ QDomElement GNUMERICExport::GetBorderStyle(QDomDocument gnumeric_doc,Cell * cell border_style.appendChild(border); if ( (cell->format()->goUpDiagonalWidth(currentcolumn, currentrow) != 0) && - (cell->format()->goUpDiagonalStyle(currentcolumn, currentrow) != Qt::NoPen ) ) + (cell->format()->goUpDiagonalStyle(currentcolumn, currentrow) != TQt::NoPen ) ) { border = gnumeric_doc.createElement("gmr:Rev-Diagonal"); border.setAttribute("Style","1"); @@ -207,7 +207,7 @@ QDomElement GNUMERICExport::GetBorderStyle(QDomDocument gnumeric_doc,Cell * cell green = color.green()<<8; blue = color.blue()<<8; - border.setAttribute("Color", QString::number(red,16)+":"+QString::number(green,16) +":"+QString::number(blue,16)); + border.setAttribute("Color", TQString::number(red,16)+":"+TQString::number(green,16) +":"+TQString::number(blue,16)); } else { @@ -220,13 +220,13 @@ QDomElement GNUMERICExport::GetBorderStyle(QDomDocument gnumeric_doc,Cell * cell return border_style; } -QDomElement GNUMERICExport::GetValidity( QDomDocument gnumeric_doc, Cell * cell ) +TQDomElement GNUMERICExport::GetValidity( TQDomDocument gnumeric_doc, Cell * cell ) { //<gmr:Validation Style="1" Type="1" Operator="7" AllowBlank="true" UseDropdown="false" Title="ghhg" Message="ghghhhjfhfghjfghj fg hjgf hj"> // <gmr:Expression0>45</gmr:Expression0> // </gmr:Validation> Validity *kspread_validity = cell->getValidity(); - QDomElement val = gnumeric_doc.createElement( "gmr:Validation" ); + TQDomElement val = gnumeric_doc.createElement( "gmr:Validation" ); val.setAttribute( "Title", kspread_validity->title ); val.setAttribute( "Message", kspread_validity->message ); val.setAttribute( "AllowBlank", kspread_validity->allowEmptyCell ? "true":"false" ); @@ -300,19 +300,19 @@ QDomElement GNUMERICExport::GetValidity( QDomDocument gnumeric_doc, Cell * cell case Conditional::InferiorEqual: case Conditional::Different: { - QDomElement tmp = gnumeric_doc.createElement( "gmr:Expression0" ); - tmp.appendChild( gnumeric_doc.createTextNode( QString::number( kspread_validity->valMin ) ) ); + TQDomElement tmp = gnumeric_doc.createElement( "gmr:Expression0" ); + tmp.appendChild( gnumeric_doc.createTextNode( TQString::number( kspread_validity->valMin ) ) ); val.appendChild( tmp ); } break; case Conditional::Between: case Conditional::DifferentTo: { - QDomElement tmp = gnumeric_doc.createElement( "gmr:Expression0" ); - tmp.appendChild( gnumeric_doc.createTextNode( QString::number(kspread_validity->valMin ) ) ); + TQDomElement tmp = gnumeric_doc.createElement( "gmr:Expression0" ); + tmp.appendChild( gnumeric_doc.createTextNode( TQString::number(kspread_validity->valMin ) ) ); val.appendChild( tmp ); tmp = gnumeric_doc.createElement( "gmr:Expression1" ); - tmp.appendChild( gnumeric_doc.createTextNode( QString::number(kspread_validity->valMax ) ) ); + tmp.appendChild( gnumeric_doc.createTextNode( TQString::number(kspread_validity->valMax ) ) ); val.appendChild( tmp ); } break; @@ -338,7 +338,7 @@ QDomElement GNUMERICExport::GetValidity( QDomDocument gnumeric_doc, Cell * cell case Conditional::InferiorEqual: case Conditional::Different: { - QDomElement tmp = gnumeric_doc.createElement( "gmr:Expression0" ); + TQDomElement tmp = gnumeric_doc.createElement( "gmr:Expression0" ); tmp.appendChild( gnumeric_doc.createTextNode( kspread_validity->timeMin.toString() ) ); val.appendChild( tmp ); } @@ -346,7 +346,7 @@ QDomElement GNUMERICExport::GetValidity( QDomDocument gnumeric_doc, Cell * cell case Conditional::Between: case Conditional::DifferentTo: { - QDomElement tmp = gnumeric_doc.createElement( "gmr:Expression0" ); + TQDomElement tmp = gnumeric_doc.createElement( "gmr:Expression0" ); tmp.appendChild( gnumeric_doc.createTextNode( kspread_validity->timeMin.toString() ) ); val.appendChild( tmp ); tmp = gnumeric_doc.createElement( "gmr:Expression1" ); @@ -371,7 +371,7 @@ QDomElement GNUMERICExport::GetValidity( QDomDocument gnumeric_doc, Cell * cell case Conditional::InferiorEqual: case Conditional::Different: { - QDomElement tmp = gnumeric_doc.createElement( "gmr:Expression0" ); + TQDomElement tmp = gnumeric_doc.createElement( "gmr:Expression0" ); tmp.appendChild( gnumeric_doc.createTextNode( kspread_validity->dateMin.toString() ) ); val.appendChild( tmp ); } @@ -379,7 +379,7 @@ QDomElement GNUMERICExport::GetValidity( QDomDocument gnumeric_doc, Cell * cell case Conditional::Between: case Conditional::DifferentTo: { - QDomElement tmp = gnumeric_doc.createElement( "gmr:Expression0" ); + TQDomElement tmp = gnumeric_doc.createElement( "gmr:Expression0" ); tmp.appendChild( gnumeric_doc.createTextNode( kspread_validity->dateMin.toString() ) ); val.appendChild( tmp ); tmp = gnumeric_doc.createElement( "gmr:Expression1" ); @@ -404,19 +404,19 @@ QDomElement GNUMERICExport::GetValidity( QDomDocument gnumeric_doc, Cell * cell case Conditional::InferiorEqual: case Conditional::Different: { - QDomElement tmp = gnumeric_doc.createElement( "gmr:Expression0" ); - tmp.appendChild( gnumeric_doc.createTextNode( QString::number(kspread_validity->valMin ) ) ); + TQDomElement tmp = gnumeric_doc.createElement( "gmr:Expression0" ); + tmp.appendChild( gnumeric_doc.createTextNode( TQString::number(kspread_validity->valMin ) ) ); val.appendChild( tmp ); } break; case Conditional::Between: case Conditional::DifferentTo: { - QDomElement tmp = gnumeric_doc.createElement( "gmr:Expression0" ); - tmp.appendChild( gnumeric_doc.createTextNode( QString::number(kspread_validity->valMin ) ) ); + TQDomElement tmp = gnumeric_doc.createElement( "gmr:Expression0" ); + tmp.appendChild( gnumeric_doc.createTextNode( TQString::number(kspread_validity->valMin ) ) ); val.appendChild( tmp ); tmp = gnumeric_doc.createElement( "gmr:Expression1" ); - tmp.appendChild( gnumeric_doc.createTextNode( QString::number(kspread_validity->valMax ) ) ); + tmp.appendChild( gnumeric_doc.createTextNode( TQString::number(kspread_validity->valMax ) ) ); val.appendChild( tmp ); } break; @@ -436,19 +436,19 @@ QDomElement GNUMERICExport::GetValidity( QDomDocument gnumeric_doc, Cell * cell case Conditional::InferiorEqual: case Conditional::Different: { - QDomElement tmp = gnumeric_doc.createElement( "gmr:Expression0" ); - tmp.appendChild( gnumeric_doc.createTextNode( QString::number(kspread_validity->valMin ) ) ); + TQDomElement tmp = gnumeric_doc.createElement( "gmr:Expression0" ); + tmp.appendChild( gnumeric_doc.createTextNode( TQString::number(kspread_validity->valMin ) ) ); val.appendChild( tmp ); } break; case Conditional::Between: case Conditional::DifferentTo: { - QDomElement tmp = gnumeric_doc.createElement( "gmr:Expression0" ); - tmp.appendChild( gnumeric_doc.createTextNode( QString::number(kspread_validity->valMin ) ) ); + TQDomElement tmp = gnumeric_doc.createElement( "gmr:Expression0" ); + tmp.appendChild( gnumeric_doc.createTextNode( TQString::number(kspread_validity->valMin ) ) ); val.appendChild( tmp ); tmp = gnumeric_doc.createElement( "gmr:Expression1" ); - tmp.appendChild( gnumeric_doc.createTextNode( QString::number(kspread_validity->valMax ) ) ); + tmp.appendChild( gnumeric_doc.createTextNode( TQString::number(kspread_validity->valMax ) ) ); val.appendChild( tmp ); } break; @@ -478,9 +478,9 @@ QDomElement GNUMERICExport::GetValidity( QDomDocument gnumeric_doc, Cell * cell return val; } -QDomElement GNUMERICExport::GetFontStyle( QDomDocument gnumeric_doc,Cell * cell, int currentcolumn, int currentrow) +TQDomElement GNUMERICExport::GetFontStyle( TQDomDocument gnumeric_doc,Cell * cell, int currentcolumn, int currentrow) { - QDomElement font_style; + TQDomElement font_style; kdDebug()<<" currentcolumn :"<<currentcolumn<<" currentrow :"<<currentrow<<endl; font_style = gnumeric_doc.createElement("gmr:Font"); font_style.appendChild(gnumeric_doc.createTextNode(cell->format()->textFontFamily(currentcolumn, currentrow))); @@ -503,19 +503,19 @@ QDomElement GNUMERICExport::GetFontStyle( QDomDocument gnumeric_doc,Cell * cell, } if (cell->format()->textFontSize(currentcolumn,currentrow)) { - font_style.setAttribute("Unit",QString::number(cell->format()->textFontSize(currentcolumn,currentrow))); + font_style.setAttribute("Unit",TQString::number(cell->format()->textFontSize(currentcolumn,currentrow))); } return font_style; } -QDomElement GNUMERICExport::GetLinkStyle(QDomDocument gnumeric_doc) +TQDomElement GNUMERICExport::GetLinkStyle(TQDomDocument gnumeric_doc) { - QDomElement link_style; + TQDomElement link_style; link_style = gnumeric_doc.createElement("gmr:HyperLink"); - QString path; + TQString path; path = linkUrl; @@ -538,93 +538,93 @@ QDomElement GNUMERICExport::GetLinkStyle(QDomDocument gnumeric_doc) return link_style; } -QDomElement GNUMERICExport::GetCellStyle(QDomDocument gnumeric_doc,Cell * cell, int currentcolumn, int currentrow) +TQDomElement GNUMERICExport::GetCellStyle(TQDomDocument gnumeric_doc,Cell * cell, int currentcolumn, int currentrow) { - QColorGroup defaultColorGroup = QApplication::palette().active(); + TQColorGroup defaultColorGroup = TQApplication::tqpalette().active(); - QDomElement cell_style; + TQDomElement cell_style; cell_style = gnumeric_doc.createElement("gmr:Style"); int red, green, blue; - QColor bgColor = cell->bgColor(currentcolumn, currentrow); + TQColor bgColor = cell->bgColor(currentcolumn, currentrow); red = bgColor.red()<<8; green = bgColor.green()<<8; blue = bgColor.blue()<<8; switch (cell->format()->backGroundBrushStyle(currentcolumn, currentrow)) { - case Qt::NoBrush: + case TQt::NoBrush: cell_style.setAttribute("Shade","0"); break; - case Qt::SolidPattern: + case TQt::SolidPattern: // 100% cell_style.setAttribute("Shade","1"); break; - case Qt::Dense1Pattern: + case TQt::Dense1Pattern: // 87.5% cell_style.setAttribute("Shade","25"); break; - case Qt::Dense2Pattern: + case TQt::Dense2Pattern: // 75% cell_style.setAttribute("Shade","2"); break; - case Qt::Dense3Pattern: + case TQt::Dense3Pattern: // 62.5% // Not supported by GNumeric // Fall back to 50% cell_style.setAttribute("Shade","3"); break; - case Qt::Dense4Pattern: + case TQt::Dense4Pattern: // 50% cell_style.setAttribute("Shade","3"); break; - case Qt::Dense5Pattern: + case TQt::Dense5Pattern: // 25% cell_style.setAttribute("Shade","4"); break; - case Qt::Dense6Pattern: + case TQt::Dense6Pattern: // 12.5% cell_style.setAttribute("Shade","5"); break; - case Qt::Dense7Pattern: + case TQt::Dense7Pattern: // 6.25% cell_style.setAttribute("Shade","6"); break; - case Qt::HorPattern: + case TQt::HorPattern: cell_style.setAttribute("Shade","13"); break; - case Qt::VerPattern: + case TQt::VerPattern: cell_style.setAttribute("Shade","14"); break; - case Qt::CrossPattern: + case TQt::CrossPattern: cell_style.setAttribute("Shade","17"); break; - case Qt::BDiagPattern: + case TQt::BDiagPattern: cell_style.setAttribute("Shade","16"); break; - case Qt::FDiagPattern: + case TQt::FDiagPattern: cell_style.setAttribute("Shade","15"); break; - case Qt::DiagCrossPattern: + case TQt::DiagCrossPattern: cell_style.setAttribute("Shade","18"); break; - case Qt::CustomPattern: + case TQt::CustomPattern: // Not supported by Gnumeric cell_style.setAttribute("Shade","0"); break; } - cell_style.setAttribute("Back",QString::number(red,16)+":"+QString::number(green,16) +":"+QString::number(blue,16) ); + cell_style.setAttribute("Back",TQString::number(red,16)+":"+TQString::number(green,16) +":"+TQString::number(blue,16) ); - QColor textColor = cell->format()->textColor(currentcolumn, currentrow); + TQColor textColor = cell->format()->textColor(currentcolumn, currentrow); red = textColor.red()<<8; green = textColor.green()<<8; blue = textColor.blue()<<8; - cell_style.setAttribute("Fore",QString::number(red,16)+":"+QString::number(green,16) +":"+QString::number(blue,16) ); + cell_style.setAttribute("Fore",TQString::number(red,16)+":"+TQString::number(green,16) +":"+TQString::number(blue,16) ); if (cell->format()->align(currentcolumn,currentrow) == Format::Undefined) { @@ -666,12 +666,12 @@ QDomElement GNUMERICExport::GetCellStyle(QDomDocument gnumeric_doc,Cell * cell, // I'm not sure about the rotation values. // I never got it to work in GNumeric. - cell_style.setAttribute("Rotation", QString::number(-1*cell->format()->getAngle(currentcolumn,currentrow))); + cell_style.setAttribute("Rotation", TQString::number(-1*cell->format()->getAngle(currentcolumn,currentrow))); // The indentation in GNumeric is an integer value. In KSpread, it's a double. // Save the double anyway, makes it even better when importing the document back in KSpread. // TODO verify if it's correct, in import we "* 10.0" - cell_style.setAttribute("Indent", QString::number(cell->format()->getIndent(currentcolumn,currentrow))); + cell_style.setAttribute("Indent", TQString::number(cell->format()->getIndent(currentcolumn,currentrow))); cell_style.setAttribute("Locked", !cell->format()->notProtected(currentcolumn,currentrow)); @@ -680,12 +680,12 @@ QDomElement GNUMERICExport::GetCellStyle(QDomDocument gnumeric_doc,Cell * cell, // Gnumeric hides everything or nothing. cell_style.setAttribute("Hidden", cell->format()->isHideAll(currentcolumn,currentrow)); - QColor patColor = cell->format()->backGroundBrushColor(currentcolumn, currentrow); + TQColor patColor = cell->format()->backGroundBrushColor(currentcolumn, currentrow); red = patColor.red()<<8; green = patColor.green()<<8; blue = patColor.blue()<<8; - cell_style.setAttribute("PatternColor", QString::number(red,16)+":"+QString::number(green,16) +":"+QString::number(blue,16)); + cell_style.setAttribute("PatternColor", TQString::number(red,16)+":"+TQString::number(green,16) +":"+TQString::number(blue,16)); if (isLink) cell_style.appendChild(GetLinkStyle(gnumeric_doc)); @@ -697,7 +697,7 @@ QDomElement GNUMERICExport::GetCellStyle(QDomDocument gnumeric_doc,Cell * cell, cell_style.appendChild( GetValidity( gnumeric_doc, cell ) ); } - QString stringFormat; + TQString stringFormat; Format::Currency c; Currency currency; @@ -722,11 +722,11 @@ QDomElement GNUMERICExport::GetCellStyle(QDomDocument gnumeric_doc,Cell * cell, stringFormat = "0.00"; else if (currency.getCurrencyCode(c.type) == "$") stringFormat = "$0.00"; - else if (currency.getCurrencyCode(c.type) == QString::fromUtf8("€")) + else if (currency.getCurrencyCode(c.type) == TQString::fromUtf8("€")) stringFormat = "[$€-2]0.00"; - else if (currency.getCurrencyCode(c.type) == QString::fromUtf8("£")) + else if (currency.getCurrencyCode(c.type) == TQString::fromUtf8("£")) stringFormat = "£0.00"; - else if (currency.getCurrencyCode(c.type) == QString::fromUtf8("Â¥")) + else if (currency.getCurrencyCode(c.type) == TQString::fromUtf8("Â¥")) stringFormat = "Â¥0.00"; else stringFormat="[$" + currency.getCurrencyCode(c.type) + "]0.00"; @@ -892,9 +892,9 @@ QDomElement GNUMERICExport::GetCellStyle(QDomDocument gnumeric_doc,Cell * cell, } -void GNUMERICExport::addAttributeItem(QDomDocument gnumeric_doc, QDomElement attributes, const QString& type, const QString& name, bool value) +void GNUMERICExport::addAttributeItem(TQDomDocument gnumeric_doc, TQDomElement attributes, const TQString& type, const TQString& name, bool value) { - QDomElement gmr_attribute, gmr_type, gmr_name, gmr_value; + TQDomElement gmr_attribute, gmr_type, gmr_name, gmr_value; gmr_attribute = gnumeric_doc.createElement("gmr:Attribute"); attributes.appendChild(gmr_attribute); @@ -907,7 +907,7 @@ void GNUMERICExport::addAttributeItem(QDomDocument gnumeric_doc, QDomElement att gmr_name.appendChild(gnumeric_doc.createTextNode(name)); gmr_attribute.appendChild(gmr_name); - QString txtValue; + TQString txtValue; if (value) txtValue = "true"; else @@ -918,11 +918,11 @@ void GNUMERICExport::addAttributeItem(QDomDocument gnumeric_doc, QDomElement att gmr_attribute.appendChild(gmr_value); } -void GNUMERICExport::addSummaryItem(QDomDocument gnumeric_doc, QDomElement summary, const QString& name, const QString& value) +void GNUMERICExport::addSummaryItem(TQDomDocument gnumeric_doc, TQDomElement summary, const TQString& name, const TQString& value) { if ( value.isEmpty() ) return; - QDomElement gmr_item, gmr_name, gmr_val_string; + TQDomElement gmr_item, gmr_name, gmr_val_string; gmr_item = gnumeric_doc.createElement("gmr:Item"); summary.appendChild(gmr_item); @@ -936,13 +936,13 @@ void GNUMERICExport::addSummaryItem(QDomDocument gnumeric_doc, QDomElement summa gmr_item.appendChild(gmr_val_string); } -// The reason why we use the KoDocument* approach and not the QDomDocument +// The reason why we use the KoDocument* approach and not the TQDomDocument // approach is because we don't want to export formulas but values ! -KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus GNUMERICExport::convert( const TQCString& from, const TQCString& to ) { kdDebug(30521) << "Exporting GNUmeric" << endl; - QDomDocument gnumeric_doc=QDomDocument(); + TQDomDocument gnumeric_doc=TQDomDocument(); Sheet* table; KoDocument* document = m_chain->inputDocument(); @@ -950,7 +950,7 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const if (!document) return KoFilter::StupidError; - if ( !::qt_cast<const KSpread::Doc *>( document ) ) // it's safer that way :) + if ( !::tqqt_cast<const KSpread::Doc *>( document ) ) // it's safer that way :) { kdWarning(30521) << "document isn't a KSpread::Doc but a " << document->className() << endl; return KoFilter::NotImplemented; @@ -973,7 +973,7 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const gnumeric_doc.appendChild( gnumeric_doc.createProcessingInstruction( "xml", "version=\"1.0\" encoding=\"UTF-8\"" ) ); - QDomElement workbook = gnumeric_doc.createElement("gmr:Workbook"); + TQDomElement workbook = gnumeric_doc.createElement("gmr:Workbook"); workbook.setAttribute("xmlns:gmr","http://www.gnumeric.org/v10.dtd"); workbook.setAttribute("xmlns:xsi","http://www.w3.org/2001/XMLSchema-instance"); workbook.setAttribute("xmlns:schemaLocation", "http://www.gnumeric.org/v8.xsd"); @@ -981,7 +981,7 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const /* End Made into a function */ - QDomElement sheets,sheet,tmp,cells,selections, cols,rows,styles,merged, margins, top, left, bottom, right, orientation, paper, header, footer, customSize, cellComment, objects, repeatColumns, repeatRows; + TQDomElement sheets,sheet,tmp,cells,selections, cols,rows,styles,merged, margins, top, left, bottom, right, orientation, paper, header, footer, customSize, cellComment, objects, repeatColumns, repeatRows; KoDocumentInfo *DocumentInfo = document->documentInfo(); KoDocumentInfoAbout *aboutPage = static_cast<KoDocumentInfoAbout *>(DocumentInfo->page( "about" )); @@ -991,7 +991,7 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const /* * Attributes */ - QDomElement attributes = gnumeric_doc.createElement("gmr:Attributes"); + TQDomElement attributes = gnumeric_doc.createElement("gmr:Attributes"); workbook.appendChild(attributes); addAttributeItem(gnumeric_doc, attributes, "4", "WorkbookView::show_horizontal_scrollbar", ksdoc->showHorizontalScrollBar()); @@ -1006,7 +1006,7 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const /* * Doccument summary */ - QDomElement summary = gnumeric_doc.createElement("gmr:Summary"); + TQDomElement summary = gnumeric_doc.createElement("gmr:Summary"); workbook.appendChild(summary); addSummaryItem(gnumeric_doc, summary, "title", aboutPage->title()); @@ -1020,12 +1020,12 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const /* * Sheet name index (necessary for the gnumeric xml_sax importer) */ - QDomElement sheetNameIndex = gnumeric_doc.createElement("gmr:SheetNameIndex"); + TQDomElement sheetNameIndex = gnumeric_doc.createElement("gmr:SheetNameIndex"); workbook.appendChild(sheetNameIndex); for (table = ksdoc->map()->firstSheet(); table != 0L; table =ksdoc->map()->nextSheet()) { - QDomElement sheetName = gnumeric_doc.createElement("gmr:SheetName"); + TQDomElement sheetName = gnumeric_doc.createElement("gmr:SheetName"); sheetName.appendChild(gnumeric_doc.createTextNode(table->tableName())); sheetNameIndex.appendChild(sheetName); } @@ -1049,17 +1049,17 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const */ if ( ksdoc->listArea().count()>0 ) { - QDomElement areaNames = gnumeric_doc.createElement("gmr:Names"); - const QValueList<Reference> &area = ksdoc->listArea(); // copying by value is slow! - QValueList<Reference>::ConstIterator it = area.begin(); - QValueList<Reference>::ConstIterator end = area.end(); + TQDomElement areaNames = gnumeric_doc.createElement("gmr:Names"); + const TQValueList<Reference> &area = ksdoc->listArea(); // copying by value is slow! + TQValueList<Reference>::ConstIterator it = area.begin(); + TQValueList<Reference>::ConstIterator end = area.end(); for ( ; it != end; ++it ) { - QDomElement areaName = gnumeric_doc.createElement("gmr:Name"); - QDomElement areaNameElement = gnumeric_doc.createElement("gmr:name"); + TQDomElement areaName = gnumeric_doc.createElement("gmr:Name"); + TQDomElement areaNameElement = gnumeric_doc.createElement("gmr:name"); areaNameElement.appendChild(gnumeric_doc.createTextNode(( *it ).ref_name) ); areaName.appendChild( areaNameElement ); - QDomElement areaNameValue = gnumeric_doc.createElement("gmr:value"); + TQDomElement areaNameValue = gnumeric_doc.createElement("gmr:value"); areaNameValue.appendChild(gnumeric_doc.createTextNode( convertRefToRange( ( *it ).sheet_name, ( *it ).rect ) ) ); areaName.appendChild( areaNameValue ); areaNames.appendChild( areaName ); @@ -1075,11 +1075,11 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const sheets = gnumeric_doc.createElement("gmr:Sheets"); workbook.appendChild(sheets); - QString str; + TQString str; View * view = static_cast<View*>( ksdoc->views().getFirst()); Canvas * canvas=0L; - QString activeTableName; + TQString activeTableName; if (view) { canvas = view->canvasWidget(); @@ -1123,19 +1123,19 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const sheet.appendChild(tmp); tmp = gnumeric_doc.createElement("gmr:MaxCol"); - tmp.appendChild(gnumeric_doc.createTextNode(QString::number(table->maxColumn()))); + tmp.appendChild(gnumeric_doc.createTextNode(TQString::number(table->maxColumn()))); sheet.appendChild(tmp); tmp = gnumeric_doc.createElement("gmr:MaxRow"); - tmp.appendChild(gnumeric_doc.createTextNode(QString::number(table->maxRow()))); + tmp.appendChild(gnumeric_doc.createTextNode(TQString::number(table->maxRow()))); sheet.appendChild(tmp); // Zoom value doesn't appear to be correct // KSpread 200% gives zoom() = 2.5, this in GNumeric = 250% tmp = gnumeric_doc.createElement("gmr:Zoom"); if (view) - tmp.appendChild(gnumeric_doc.createTextNode(QString::number(canvas->zoom()))); + tmp.appendChild(gnumeric_doc.createTextNode(TQString::number(canvas->zoom()))); else tmp.appendChild(gnumeric_doc.createTextNode("1.0")); sheet.appendChild(tmp); @@ -1168,7 +1168,7 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const sheet.appendChild(tmp); orientation = gnumeric_doc.createElement( "gmr:orientation" ); - QString orientString = table->print()->orientation() == PG_LANDSCAPE ? "landscape" : "portrait"; + TQString orientString = table->print()->orientation() == PG_LANDSCAPE ? "landscape" : "portrait"; orientation.appendChild( gnumeric_doc.createTextNode(orientString) ); tmp.appendChild( orientation ); @@ -1181,7 +1181,7 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const if ( _tmpRepeatColumnStart!=0 ) { repeatColumns = gnumeric_doc.createElement( "gmr:repeat_left" ); - QString value = Cell::columnName( _tmpRepeatColumnStart )+"1:"+Cell::columnName(_tmpRepeatColumnEnd )+"65536"; + TQString value = Cell::columnName( _tmpRepeatColumnStart )+"1:"+Cell::columnName(_tmpRepeatColumnEnd )+"65536"; repeatColumns.setAttribute( "value", value ); tmp.appendChild( repeatColumns ); } @@ -1190,7 +1190,7 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const if ( _tmpRepeatRowStart!=0 ) { repeatRows = gnumeric_doc.createElement( "gmr:repeat_top" ); - QString value = "A"+ QString::number(_tmpRepeatRowStart ) +":IV"+QString::number( _tmpRepeatRowEnd ); + TQString value = "A"+ TQString::number(_tmpRepeatRowStart ) +":IV"+TQString::number( _tmpRepeatRowEnd ); repeatRows.setAttribute( "value", value ); tmp.appendChild( repeatRows ); } @@ -1249,24 +1249,24 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const int step=iMaxRow > 50 ? iMaxRow/50 : 1; int i=1; - QString emptyLines; + TQString emptyLines; /* Save selection info. */ /* can't save selection anymore -- part of the view, not table */ /* - QDomElement selection = gnumeric_doc.createElement("gmr:Selection"); - QRect table_selection(table->selection()); + TQDomElement selection = gnumeric_doc.createElement("gmr:Selection"); + TQRect table_selection(table->selection()); selections.appendChild(selection); */ /* <gmr:Selection startCol="3" startRow="2" endCol="3" endRow="2"/>*/ /* - selection.setAttribute("startCol", QString::number(table_selection.left()-1)); - selection.setAttribute("startRow", QString::number(table_selection.top()-1)); + selection.setAttribute("startCol", TQString::number(table_selection.left()-1)); + selection.setAttribute("startRow", TQString::number(table_selection.top()-1)); - selection.setAttribute("endCol", QString::number(table_selection.right()-1)); - selection.setAttribute("endRow", QString::number(table_selection.bottom()-1)); + selection.setAttribute("endCol", TQString::number(table_selection.right()-1)); + selection.setAttribute("endRow", TQString::number(table_selection.bottom()-1)); */ /* End selection info. */ @@ -1275,11 +1275,11 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const ColumnFormat *cl=table->firstCol(); while (cl) { - QDomElement colinfo = gnumeric_doc.createElement("gmr:ColInfo"); + TQDomElement colinfo = gnumeric_doc.createElement("gmr:ColInfo"); cols.appendChild(colinfo); - colinfo.setAttribute("No", QString::number(cl->column()-1)); - colinfo.setAttribute("Hidden", QString::number(cl->isHide())); - colinfo.setAttribute("Unit", QString::number(cl->dblWidth())); + colinfo.setAttribute("No", TQString::number(cl->column()-1)); + colinfo.setAttribute("Hidden", TQString::number(cl->isHide())); + colinfo.setAttribute("Unit", TQString::number(cl->dblWidth())); cl=cl->next(); } @@ -1293,11 +1293,11 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const RowFormat *rl=table->firstRow(); while (rl) { - QDomElement rowinfo = gnumeric_doc.createElement("gmr:RowInfo"); + TQDomElement rowinfo = gnumeric_doc.createElement("gmr:RowInfo"); rows.appendChild(rowinfo); - rowinfo.setAttribute("No", QString::number(rl->row()-1)); - rowinfo.setAttribute("Hidden", QString::number(rl->isHide())); - rowinfo.setAttribute("Unit", QString::number(rl->dblHeight())); + rowinfo.setAttribute("No", TQString::number(rl->row()-1)); + rowinfo.setAttribute("Hidden", TQString::number(rl->isHide())); + rowinfo.setAttribute("Unit", TQString::number(rl->dblHeight())); rl=rl->next(); } @@ -1323,25 +1323,25 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const i=0; } - QString line; + TQString line; for (int currentcolumn = 1; currentcolumn <= iMaxColumn; currentcolumn++) { - QDomElement cell_contents; + TQDomElement cell_contents; Cell * cell = table->cellAt( currentcolumn, currentrow, false ); - QString text, style; - QDomDocument domLink; - QDomElement domRoot; - QDomNode domNode; - QDomNodeList childNodes; + TQString text, style; + TQDomDocument domLink; + TQDomElement domRoot; + TQDomNode domNode; + TQDomNodeList childNodes; if (!cell->isDefault() && !cell->isEmpty()) { if ( cell->isFormula() ) { - QString tmp = cell->text(); - if ( tmp.contains( "==" ) ) - tmp=tmp.replace( "==", "=" ); + TQString tmp = cell->text(); + if ( tmp.tqcontains( "==" ) ) + tmp=tmp.tqreplace( "==", "=" ); text = tmp; isLink = false; } @@ -1404,9 +1404,9 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const break; case Cell::Formula: isLink = false; - QString tmp = cell->text(); + TQString tmp = cell->text(); if ( tmp =="==" ) - tmp=replace( "==", "=" ); + tmp=tqreplace( "==", "=" ); /* cell->calc( TRUE ); // Incredible, cells are not calculated if the document was just opened text = cell->valueString(); */ text = tmp; break; @@ -1424,14 +1424,14 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const if (cell->doesMergeCells()) { // The cell is forced to occupy other cells - QDomElement merge = gnumeric_doc.createElement("gmr:Merge"); + TQDomElement merge = gnumeric_doc.createElement("gmr:Merge"); // Set up the range - QString fromCol, toCol, fromRow, toRow; + TQString fromCol, toCol, fromRow, toRow; fromCol = cell->columnName(currentcolumn); - fromRow = QString::number(currentrow); + fromRow = TQString::number(currentrow); toCol = cell->columnName(currentcolumn + cell->mergedXCells()); - toRow = QString::number(currentrow + cell->mergedYCells()); + toRow = TQString::number(currentrow + cell->mergedYCells()); merge.appendChild(gnumeric_doc.createTextNode(fromCol + fromRow + ":" + toCol + toRow)); mergedCells = true; @@ -1443,31 +1443,31 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const //<gmr:CellComment Author="" Text="cvbcvbxcvb cb xc vbxcv " ObjectBound="A1" ObjectOffset="0 0 0 0" ObjectAnchorType="17 16 17 16" Direction="17"/> cellComment = gnumeric_doc.createElement("gmr:CellComment"); cellComment.setAttribute( "Text", cell->format()->comment( currentcolumn, currentrow ) ); - QString sCell=QString( "%1%2" ).arg( Cell::columnName(currentcolumn ) ).arg( currentrow ); + TQString sCell=TQString( "%1%2" ).tqarg( Cell::columnName(currentcolumn ) ).tqarg( currentrow ); cellComment.setAttribute("ObjectBound", sCell ); objects.appendChild(cellComment); } - QDomElement gnumeric_cell = gnumeric_doc.createElement("gmr:Cell"); - QDomElement cell_style; + TQDomElement gnumeric_cell = gnumeric_doc.createElement("gmr:Cell"); + TQDomElement cell_style; - QDomElement style_region = gnumeric_doc.createElement("gmr:StyleRegion"); + TQDomElement style_region = gnumeric_doc.createElement("gmr:StyleRegion"); cells.appendChild(gnumeric_cell); - gnumeric_cell.setAttribute("Col", QString::number(currentcolumn-1)); - gnumeric_cell.setAttribute("Row", QString::number(currentrow-1)); + gnumeric_cell.setAttribute("Col", TQString::number(currentcolumn-1)); + gnumeric_cell.setAttribute("Row", TQString::number(currentrow-1)); /* Right now, we create a single region for each cell.. This is inefficient, * but the implementation is quicker.. Probably later we will have to * consolidate styles into style regions. */ - style_region.setAttribute("startCol", QString::number(currentcolumn-1)); - style_region.setAttribute("startRow", QString::number(currentrow-1)); - style_region.setAttribute("endCol", QString::number(currentcolumn-1)); - style_region.setAttribute("endRow", QString::number(currentrow-1)); + style_region.setAttribute("startCol", TQString::number(currentcolumn-1)); + style_region.setAttribute("startRow", TQString::number(currentrow-1)); + style_region.setAttribute("endCol", TQString::number(currentcolumn-1)); + style_region.setAttribute("endRow", TQString::number(currentrow-1)); cell_style = GetCellStyle(gnumeric_doc,cell,currentcolumn,currentrow); @@ -1488,7 +1488,7 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const if (mergedCells) sheet.appendChild(merged); } - QDomElement uidata = gnumeric_doc.createElement("gmr:UIData"); + TQDomElement uidata = gnumeric_doc.createElement("gmr:UIData"); uidata.setAttribute( "SelectedTab", indexActiveTable ); workbook.appendChild(uidata); @@ -1498,7 +1498,7 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const // Ok, now write to export file - QIODevice* out = KFilterDev::deviceForFile(m_chain->outputFile(),"application/x-gzip"); + TQIODevice* out = KFilterDev::deviceForFile(m_chain->outputFile(),"application/x-gzip"); if (!out) { @@ -1513,7 +1513,7 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const return KoFilter::FileNotFound; } - QTextStream streamOut(out); + TQTextStream streamOut(out); streamOut << str; @@ -1524,49 +1524,49 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const } -QString GNUMERICExport::convertRefToRange( const QString & table, const QRect & rect ) +TQString GNUMERICExport::convertRefToRange( const TQString & table, const TQRect & rect ) { - QPoint topLeft( rect.topLeft() ); - QPoint bottomRight( rect.bottomRight() ); + TQPoint topLeft( rect.topLeft() ); + TQPoint bottomRight( rect.bottomRight() ); if ( topLeft == bottomRight ) return convertRefToBase( table, rect ); - QString s; + TQString s; s += table; s += "!$"; s += Cell::columnName( topLeft.x() ); s += '$'; - s += QString::number( topLeft.y() ); + s += TQString::number( topLeft.y() ); s += ":$"; s += Cell::columnName( bottomRight.x() ); s += '$'; - s += QString::number( bottomRight.y() ); + s += TQString::number( bottomRight.y() ); return s; } -QString GNUMERICExport::convertRefToBase( const QString & table, const QRect & rect ) +TQString GNUMERICExport::convertRefToBase( const TQString & table, const TQRect & rect ) { - QPoint bottomRight( rect.bottomRight() ); + TQPoint bottomRight( rect.bottomRight() ); - QString s; + TQString s; s = table; s += "!$"; s += Cell::columnName( bottomRight.x() ); s += '$'; - s += QString::number( bottomRight.y() ); + s += TQString::number( bottomRight.y() ); return s; } -QString GNUMERICExport::convertVariable( QString headerFooter ) +TQString GNUMERICExport::convertVariable( TQString headerFooter ) { - headerFooter = headerFooter.replace( "<sheet>", "&[TAB]" ); - headerFooter = headerFooter.replace( "<date>", "&[DATE]" ); - headerFooter = headerFooter.replace( "<page>", "&[PAGE]" ); - headerFooter = headerFooter.replace( "<pages>", "&[PAGES]" ); - headerFooter = headerFooter.replace( "<time>", "&[TIME]" ); - headerFooter = headerFooter.replace( "<file>", "&[FILE]" ); + headerFooter = headerFooter.tqreplace( "<sheet>", "&[TAB]" ); + headerFooter = headerFooter.tqreplace( "<date>", "&[DATE]" ); + headerFooter = headerFooter.tqreplace( "<page>", "&[PAGE]" ); + headerFooter = headerFooter.tqreplace( "<pages>", "&[PAGES]" ); + headerFooter = headerFooter.tqreplace( "<time>", "&[TIME]" ); + headerFooter = headerFooter.tqreplace( "<file>", "&[FILE]" ); return headerFooter; } diff --git a/filters/kspread/gnumeric/gnumericexport.h b/filters/kspread/gnumeric/gnumericexport.h index a56c6482..8cd89e38 100644 --- a/filters/kspread/gnumeric/gnumericexport.h +++ b/filters/kspread/gnumeric/gnumericexport.h @@ -21,7 +21,7 @@ #define GNUMERICEXPORT_TEST_H #include <KoFilter.h> -#include <qdom.h> +#include <tqdom.h> namespace KSpread { @@ -31,30 +31,31 @@ namespace KSpread class GNUMERICExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - GNUMERICExport(KoFilter *parent, const char*name, const QStringList&); + GNUMERICExport(KoFilter *tqparent, const char*name, const TQStringList&); virtual ~GNUMERICExport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); private: - QDomElement GetCellStyle(QDomDocument gnumeric_doc, KSpread::Cell* cell, int currentcolumn, int currentrow); - QDomElement GetBorderStyle(QDomDocument gnumeric_doc, KSpread::Cell* cell, int currentcolumn, int currentrow); - QDomElement GetFontStyle(QDomDocument gnumeric_doc, KSpread::Cell* cell, int currentcolumn, int currentrow); - QDomElement GetLinkStyle(QDomDocument gnumeric_doc ); - QDomElement GetValidity( QDomDocument gnumeric_doc, KSpread::Cell* cell ); - - void addAttributeItem(QDomDocument gnumeric_doc, QDomElement attributes, const QString& type, const QString& name, bool value); - void addSummaryItem(QDomDocument gnumeric_doc, QDomElement summary, const QString& name, const QString& value); + TQDomElement GetCellStyle(TQDomDocument gnumeric_doc, KSpread::Cell* cell, int currentcolumn, int currentrow); + TQDomElement GetBorderStyle(TQDomDocument gnumeric_doc, KSpread::Cell* cell, int currentcolumn, int currentrow); + TQDomElement GetFontStyle(TQDomDocument gnumeric_doc, KSpread::Cell* cell, int currentcolumn, int currentrow); + TQDomElement GetLinkStyle(TQDomDocument gnumeric_doc ); + TQDomElement GetValidity( TQDomDocument gnumeric_doc, KSpread::Cell* cell ); + + void addAttributeItem(TQDomDocument gnumeric_doc, TQDomElement attributes, const TQString& type, const TQString& name, bool value); + void addSummaryItem(TQDomDocument gnumeric_doc, TQDomElement summary, const TQString& name, const TQString& value); bool hasBorder(KSpread::Cell*cell, int currentcolumn, int currentrow); - const QString ColorToString(int red, int green, int blue); - QString convertVariable( QString headerFooter ); - QString convertRefToRange( const QString & table, const QRect & rect ); - QString convertRefToBase( const QString & table, const QRect & rect ); + const TQString ColorToString(int red, int green, int blue); + TQString convertVariable( TQString headerFooter ); + TQString convertRefToRange( const TQString & table, const TQRect & rect ); + TQString convertRefToBase( const TQString & table, const TQRect & rect ); bool isLink; - QString linkText; - QString linkUrl; + TQString linkText; + TQString linkUrl; bool isLinkBold; bool isLinkItalic; diff --git a/filters/kspread/gnumeric/gnumericimport.cc b/filters/kspread/gnumeric/gnumericimport.cc index 6e114f37..4374d14a 100644 --- a/filters/kspread/gnumeric/gnumericimport.cc +++ b/filters/kspread/gnumeric/gnumericimport.cc @@ -22,9 +22,9 @@ /* phillipezolt@hotmail.com */ /* additions: Norbert Andres nandres@web.de */ -#include <qdict.h> -#include <qfile.h> -#include <qstringlist.h> +#include <tqdict.h> +#include <tqfile.h> +#include <tqstringlist.h> #include <gnumericimport.h> #include <kmessagebox.h> @@ -110,8 +110,8 @@ static char const * cell_format_time [] = { namespace gnumeric_import_LNS { - QStringList list1; - QStringList list2; + TQStringList list1; + TQStringList list2; } using namespace gnumeric_import_LNS; @@ -125,7 +125,7 @@ void GNUMERICFilter::dateInit() uint GNUMERICFilter::GnumericDate::greg2jul( int y, int m, int d ) { - return QDate::gregorianToJulian( y, m, d ); + return TQDate::gregorianToJulian( y, m, d ); } void GNUMERICFilter::GnumericDate::jul2greg( double num, int & y, int & m, int & d ) @@ -138,15 +138,15 @@ void GNUMERICFilter::GnumericDate::jul2greg( double num, int & y, int & m, int & kdDebug(30521) << "***** Num: " << num << ", i: " << i << endl; - QDate::julianToGregorian( i + g_dateOrigin, y, m, d ); + TQDate::julianToGregorian( i + g_dateOrigin, y, m, d ); kdDebug(30521) << "y: " << y << ", m: " << m << ", d: " << d << endl; } -QTime GNUMERICFilter::GnumericDate::getTime( double num ) +TQTime GNUMERICFilter::GnumericDate::getTime( double num ) { // idea copied from gnumeric: src/datetime.c num += HALF_SEC; - int secs = qRound( (num - floor(num)) * SECS_PER_DAY ); + int secs = tqRound( (num - floor(num)) * SECS_PER_DAY ); kdDebug(30521) << "***** Num: " << num << ", secs " << secs << endl; @@ -156,7 +156,7 @@ QTime GNUMERICFilter::GnumericDate::getTime( double num ) secs -= h * 60; kdDebug(30521) << "****** h: " << h << ", m: " << m << ", secs: " << secs << endl; - const QTime time( h, m, ( secs < 0 || secs > 59 ? 0 : secs ) ); + const TQTime time( h, m, ( secs < 0 || secs > 59 ? 0 : secs ) ); return time; } @@ -164,20 +164,20 @@ QTime GNUMERICFilter::GnumericDate::getTime( double num ) typedef KGenericFactory<GNUMERICFilter, KoFilter> GNUMERICFilterFactory; K_EXPORT_COMPONENT_FACTORY( libgnumericimport, GNUMERICFilterFactory( "kofficefilters" ) ) -GNUMERICFilter::GNUMERICFilter( KoFilter *, const char *, const QStringList & ) +GNUMERICFilter::GNUMERICFilter( KoFilter *, const char *, const TQStringList & ) : KoFilter() { } -/* This converts GNUmeric's color string "0:0:0" to a QColor. */ -void convert_string_to_qcolor(QString color_string, QColor * color) +/* This converts GNUmeric's color string "0:0:0" to a TQColor. */ +void convert_string_to_qcolor(TQString color_string, TQColor * color) { int red, green, blue, first_col_pos, second_col_pos; bool number_ok; - first_col_pos = color_string.find(":", 0); - second_col_pos = color_string.find(":", first_col_pos + 1); + first_col_pos = color_string.tqfind(":", 0); + second_col_pos = color_string.tqfind(":", first_col_pos + 1); /* Fore="0:0:FF00" */ /* If GNUmeric kicks out some invalid colors, we could crash. */ @@ -192,34 +192,34 @@ void convert_string_to_qcolor(QString color_string, QColor * color) color->setRgb(red, green, blue); } -void areaNames( Doc * ksdoc, const QString &_name, QString _zone ) +void areaNames( Doc * ksdoc, const TQString &_name, TQString _zone ) { //Sheet2!$A$2:$D$8 - QString tableName; - int pos = _zone.find( '!' ); + TQString tableName; + int pos = _zone.tqfind( '!' ); if ( pos != -1 ) { tableName = _zone.left( pos ); _zone = _zone.right( _zone.length()-pos-1 ); - pos = _zone.find( ':' ); - QRect rect; + pos = _zone.tqfind( ':' ); + TQRect rect; if ( pos != -1 ) { - QString left = _zone.mid( 1, pos-1 ); - QString right = _zone.mid( pos+2, _zone.length()-pos-2 ); - int pos = left.find( '$' ); + TQString left = _zone.mid( 1, pos-1 ); + TQString right = _zone.mid( pos+2, _zone.length()-pos-2 ); + int pos = left.tqfind( '$' ); rect.setLeft( util_decodeColumnLabelText(left.left(pos ) ) ); rect.setTop( left.right( left.length()-pos-1 ).toInt() ); - pos = right.find( '$' ); + pos = right.tqfind( '$' ); rect.setRight( util_decodeColumnLabelText(right.left(pos ) ) ); rect.setBottom( right.right( right.length()-pos-1 ).toInt() ); } else { - QString left = _zone; - int pos = left.find( '$' ); + TQString left = _zone; + int pos = left.tqfind( '$' ); int leftPos = util_decodeColumnLabelText(left.left(pos ) ); rect.setLeft( leftPos ); rect.setRight( leftPos ); @@ -233,17 +233,17 @@ void areaNames( Doc * ksdoc, const QString &_name, QString _zone ) } -void set_document_area_names( Doc * ksdoc, QDomElement * docElem ) +void set_document_area_names( Doc * ksdoc, TQDomElement * docElem ) { - QDomNode areaNamesElement = docElem->namedItem( "gmr:Names" ); + TQDomNode areaNamesElement = docElem->namedItem( "gmr:Names" ); if ( areaNamesElement.isNull() ) return; - QDomNode areaNameItem = areaNamesElement.namedItem( "gmr:Name" ); + TQDomNode areaNameItem = areaNamesElement.namedItem( "gmr:Name" ); while ( !areaNameItem.isNull() ) { - QDomNode gmr_name = areaNameItem.namedItem("gmr:name"); - QDomNode gmr_value = areaNameItem.namedItem("gmr:value"); - QString name = gmr_name.toElement().text(); + TQDomNode gmr_name = areaNameItem.namedItem("gmr:name"); + TQDomNode gmr_value = areaNameItem.namedItem("gmr:value"); + TQString name = gmr_name.toElement().text(); areaNames( ksdoc, name, gmr_value.toElement().text() ); areaNameItem = areaNameItem.nextSibling(); } @@ -251,18 +251,18 @@ void set_document_area_names( Doc * ksdoc, QDomElement * docElem ) -void set_document_attributes( Doc * ksdoc, QDomElement * docElem) +void set_document_attributes( Doc * ksdoc, TQDomElement * docElem) { ksdoc->loadConfigFromFile(); - QDomNode attributes = docElem->namedItem("gmr:Attributes"); + TQDomNode attributes = docElem->namedItem("gmr:Attributes"); if ( attributes.isNull() ) return; - QDomNode attributeItem = attributes.namedItem("gmr:Attribute"); + TQDomNode attributeItem = attributes.namedItem("gmr:Attribute"); while( !attributeItem.isNull() ) { - QDomNode gmr_name = attributeItem.namedItem("gmr:name"); - QDomNode gmr_value = attributeItem.namedItem("gmr:value"); + TQDomNode gmr_name = attributeItem.namedItem("gmr:name"); + TQDomNode gmr_value = attributeItem.namedItem("gmr:value"); if (gmr_name.toElement().text() == "WorkbookView::show_horizontal_scrollbar") { ksdoc->setShowHorizontalScrollBar( gmr_value.toElement().text().lower()=="true"? true : false ); @@ -292,16 +292,16 @@ void set_document_attributes( Doc * ksdoc, QDomElement * docElem) /* This sets the documentation information from the information stored in the GNUmeric file. Particularly in the "gmr:Summary" subcategory. */ -void set_document_info(KoDocument * document, QDomElement * docElem) +void set_document_info(KoDocument * document, TQDomElement * docElem) { /* Summary Handling START */ - QDomNode summary = docElem->namedItem("gmr:Summary"); - QDomNode gmr_item = summary.namedItem("gmr:Item"); + TQDomNode summary = docElem->namedItem("gmr:Summary"); + TQDomNode gmr_item = summary.namedItem("gmr:Item"); while( !gmr_item.isNull() ) { - QDomNode gmr_name = gmr_item.namedItem("gmr:name"); - QDomNode gmr_value = gmr_item.namedItem("gmr:val-string"); + TQDomNode gmr_name = gmr_item.namedItem("gmr:name"); + TQDomNode gmr_value = gmr_item.namedItem("gmr:val-string"); KoDocumentInfo * DocumentInfo = document->documentInfo(); KoDocumentInfoAbout * aboutPage = static_cast<KoDocumentInfoAbout *>(DocumentInfo->page( "about" )); @@ -348,12 +348,12 @@ void set_document_info(KoDocument * document, QDomElement * docElem) } -void setColInfo(QDomNode * sheet, Sheet * table) +void setColInfo(TQDomNode * sheet, Sheet * table) { - QDomNode columns = sheet->namedItem("gmr:Cols"); - QDomNode columninfo = columns.namedItem("gmr:ColInfo"); + TQDomNode columns = sheet->namedItem("gmr:Cols"); + TQDomNode columninfo = columns.namedItem("gmr:ColInfo"); - QDomElement def = columns.toElement(); + TQDomElement def = columns.toElement(); if ( def.hasAttribute( "DefaultSizePts" ) ) { bool ok = false; @@ -367,7 +367,7 @@ void setColInfo(QDomNode * sheet, Sheet * table) while( !columninfo.isNull() ) { - QDomElement e = columninfo.toElement(); // try to convert the node to an element. + TQDomElement e = columninfo.toElement(); // try to convert the node to an element. int column_number; column_number = e.attribute("No").toInt()+1; @@ -390,15 +390,15 @@ void setColInfo(QDomNode * sheet, Sheet * table) } } -void setRowInfo(QDomNode *sheet, Sheet *table) +void setRowInfo(TQDomNode *sheet, Sheet *table) { - QDomNode rows = sheet->namedItem("gmr:Rows"); - QDomNode rowinfo = rows.namedItem("gmr:RowInfo"); + TQDomNode rows = sheet->namedItem("gmr:Rows"); + TQDomNode rowinfo = rows.namedItem("gmr:RowInfo"); double d; bool ok = false; - QDomElement def = rows.toElement(); + TQDomElement def = rows.toElement(); if ( def.hasAttribute( "DefaultSizePts" ) ) { d = def.attribute( "DefaultSizePts" ).toDouble( &ok ); @@ -411,7 +411,7 @@ void setRowInfo(QDomNode *sheet, Sheet *table) while( !rowinfo.isNull() ) { - QDomElement e = rowinfo.toElement(); // try to convert the node to an element. + TQDomElement e = rowinfo.toElement(); // try to convert the node to an element. int row_number; row_number = e.attribute("No").toInt() + 1; RowFormat *rl = new RowFormat(table, row_number); @@ -434,18 +434,18 @@ void setRowInfo(QDomNode *sheet, Sheet *table) } } -void setSelectionInfo( QDomNode * sheet, Sheet * /* table */ ) +void setSelectionInfo( TQDomNode * sheet, Sheet * /* table */ ) { - QDomNode selections = sheet->namedItem("gmr:Selections"); - QDomNode selection = selections.namedItem("gmr:Selection"); + TQDomNode selections = sheet->namedItem("gmr:Selections"); + TQDomNode selection = selections.namedItem("gmr:Selection"); /* Kspread does not support mutiple selections.. */ /* This code will set the selection to the last one GNUmeric's multiple selections. */ while( !selection.isNull() ) { - QDomElement e = selection.toElement(); // try to convert the node to an element. - QRect kspread_selection; + TQDomElement e = selection.toElement(); // try to convert the node to an element. + TQRect kspread_selection; kspread_selection.setLeft((e.attribute("startCol").toInt() + 1)); kspread_selection.setTop((e.attribute("startRow").toInt() + 1)); @@ -460,13 +460,13 @@ void setSelectionInfo( QDomNode * sheet, Sheet * /* table */ ) } -void setObjectInfo(QDomNode * sheet, Sheet * table) +void setObjectInfo(TQDomNode * sheet, Sheet * table) { - QDomNode gmr_objects = sheet->namedItem("gmr:Objects"); - QDomNode gmr_cellcomment = gmr_objects.namedItem("gmr:CellComment"); + TQDomNode gmr_objects = sheet->namedItem("gmr:Objects"); + TQDomNode gmr_cellcomment = gmr_objects.namedItem("gmr:CellComment"); while( !gmr_cellcomment.isNull() ) { - QDomElement e = gmr_cellcomment.toElement(); // try to convert the node to an element. + TQDomElement e = gmr_cellcomment.toElement(); // try to convert the node to an element. if (e.hasAttribute("Text")) { if (e.hasAttribute("ObjectBound")) @@ -481,7 +481,7 @@ void setObjectInfo(QDomNode * sheet, Sheet * table) } } -void convertToPen( QPen & pen, int style ) +void convertToPen( TQPen & pen, int style ) { switch( style ) { @@ -549,17 +549,17 @@ void convertToPen( QPen & pen, int style ) } } -void GNUMERICFilter::ParseBorder( QDomElement & gmr_styleborder, Cell * kspread_cell ) +void GNUMERICFilter::ParseBorder( TQDomElement & gmr_styleborder, Cell * kspread_cell ) { - QDomNode gmr_diagonal = gmr_styleborder.namedItem("gmr:Diagonal"); - QDomNode gmr_rev_diagonal = gmr_styleborder.namedItem("gmr:Rev-Diagonal"); - QDomNode gmr_top = gmr_styleborder.namedItem("gmr:Top"); - QDomNode gmr_bottom = gmr_styleborder.namedItem("gmr:Bottom"); - QDomNode gmr_left = gmr_styleborder.namedItem("gmr:Left"); - QDomNode gmr_right = gmr_styleborder.namedItem("gmr:Right"); + TQDomNode gmr_diagonal = gmr_styleborder.namedItem("gmr:Diagonal"); + TQDomNode gmr_rev_diagonal = gmr_styleborder.namedItem("gmr:Rev-Diagonal"); + TQDomNode gmr_top = gmr_styleborder.namedItem("gmr:Top"); + TQDomNode gmr_bottom = gmr_styleborder.namedItem("gmr:Bottom"); + TQDomNode gmr_left = gmr_styleborder.namedItem("gmr:Left"); + TQDomNode gmr_right = gmr_styleborder.namedItem("gmr:Right"); // NoPen - no line at all. For example, - // QPainter::drawRect() fills but does not + // TQPainter::drawRect() fills but does not // draw any explicit boundary // line. SolidLine - a simple line. DashLine // - dashes, separated by a few @@ -569,54 +569,54 @@ void GNUMERICFilter::ParseBorder( QDomElement & gmr_styleborder, Cell * kspread_ if ( !gmr_left.isNull() ) { - QDomElement e = gmr_left.toElement(); // try to convert the node to an element. + TQDomElement e = gmr_left.toElement(); // try to convert the node to an element. importBorder( e, Left, kspread_cell); } if ( !gmr_right.isNull() ) { - QDomElement e = gmr_right.toElement(); // try to convert the node to an element. + TQDomElement e = gmr_right.toElement(); // try to convert the node to an element. importBorder( e, Right, kspread_cell); } if ( !gmr_top.isNull() ) { - QDomElement e = gmr_top.toElement(); // try to convert the node to an element. + TQDomElement e = gmr_top.toElement(); // try to convert the node to an element. importBorder( e, Top, kspread_cell); } if ( !gmr_bottom.isNull() ) { - QDomElement e = gmr_bottom.toElement(); // try to convert the node to an element. + TQDomElement e = gmr_bottom.toElement(); // try to convert the node to an element. importBorder( e, Bottom, kspread_cell); } if ( !gmr_diagonal.isNull() ) { - QDomElement e = gmr_diagonal.toElement(); // try to convert the node to an element. + TQDomElement e = gmr_diagonal.toElement(); // try to convert the node to an element. importBorder( e, Diagonal, kspread_cell); } if ( !gmr_rev_diagonal.isNull() ) { - QDomElement e = gmr_rev_diagonal.toElement(); // try to convert the node to an element. + TQDomElement e = gmr_rev_diagonal.toElement(); // try to convert the node to an element. importBorder( e, Revdiagonal, kspread_cell); } - // QDomElement gmr_styleborder_element = gmr_styleborder.toElement(); + // TQDomElement gmr_styleborder_element = gmr_styleborder.toElement(); } -void GNUMERICFilter::importBorder( QDomElement border, borderStyle _style, Cell *cell) +void GNUMERICFilter::importBorder( TQDomElement border, borderStyle _style, Cell *cell) { if ( !border.isNull() ) { - QDomElement e = border.toElement(); // try to convert the node to an element. + TQDomElement e = border.toElement(); // try to convert the node to an element. if ( e.hasAttribute( "Style" ) ) { int style = e.attribute( "Style" ).toInt(); - QPen pen; + TQPen pen; convertToPen( pen, style ); if ( style > 0 ) @@ -645,8 +645,8 @@ void GNUMERICFilter::importBorder( QDomElement border, borderStyle _style, Cell } if ( e.hasAttribute( "Color" ) ) { - QColor color; - QString colorString = e.attribute( "Color" ); + TQColor color; + TQString colorString = e.attribute( "Color" ); convert_string_to_qcolor( colorString, &color ); { switch( _style ) @@ -678,8 +678,8 @@ void GNUMERICFilter::importBorder( QDomElement border, borderStyle _style, Cell } bool GNUMERICFilter::setType( Cell * kspread_cell, - QString const & formatString, - QString & cell_content ) + TQString const & formatString, + TQString & cell_content ) { int i = 0; for ( i = 0; cell_format_date[i] ; ++i ) @@ -688,7 +688,7 @@ bool GNUMERICFilter::setType( Cell * kspread_cell, if ( ( formatString == "d/m/yy" ) || ( formatString == cell_format_date[i] ) ) { kdDebug(30521) << " FormatString: Date: " << formatString << ", CellContent: " << cell_content << endl; - QDate date; + TQDate date; if ( !kspread_cell->isDate() ) { // convert cell_content to date @@ -744,7 +744,7 @@ bool GNUMERICFilter::setType( Cell * kspread_cell, /* 12, 13, 14, 15, 20, 21 */ } - kdDebug(30521) << "i: " << i << ", Type: " << type << ", Date: " << date.toString() << endl; + kdDebug(30521) << "i: " << i << ", Type: " << type << ", Date: " << TQString(date.toString()) << endl; kspread_cell->setValue( date ); kspread_cell->format()->setFormatType( type ); @@ -757,7 +757,7 @@ bool GNUMERICFilter::setType( Cell * kspread_cell, { if (formatString == cell_format_time[i]) { - QTime time; + TQTime time; if ( !kspread_cell->isTime() ) { @@ -799,9 +799,9 @@ bool GNUMERICFilter::setType( Cell * kspread_cell, return false; // no date or time } -QString GNUMERICFilter::convertVars( QString const & str, Sheet * table ) const +TQString GNUMERICFilter::convertVars( TQString const & str, Sheet * table ) const { - QString result( str ); + TQString result( str ); uint count = list1.count(); if ( count == 0 ) { @@ -814,24 +814,24 @@ QString GNUMERICFilter::convertVars( QString const & str, Sheet * table ) const for ( uint i = 0; i < count; ++i ) { - int n = result.find( list1[i] ); + int n = result.tqfind( list1[i] ); if ( n != -1 ) { kdDebug(30521) << "Found var: " << list1[i] << endl; if ( i == 0 ) - result = result.replace( list1[i], table->tableName() ); + result = result.tqreplace( list1[i], table->tableName() ); else - result = result.replace( list1[i], list2[i] ); + result = result.tqreplace( list1[i], list2[i] ); } } return result; } -double GNUMERICFilter::parseAttribute( const QDomElement &_element ) +double GNUMERICFilter::parseAttribute( const TQDomElement &_element ) { - QString unit = _element.attribute( "PrefUnit" ); + TQString unit = _element.attribute( "PrefUnit" ); bool ok; double value = _element.attribute("Points").toFloat( &ok ); if ( !ok ) @@ -848,7 +848,7 @@ double GNUMERICFilter::parseAttribute( const QDomElement &_element ) return value; } -void GNUMERICFilter::ParsePrintInfo( QDomNode const & printInfo, Sheet * table ) +void GNUMERICFilter::ParsePrintInfo( TQDomNode const & printInfo, Sheet * table ) { kdDebug(30521) << "Parsing print info " << endl; @@ -857,32 +857,32 @@ void GNUMERICFilter::ParsePrintInfo( QDomNode const & printInfo, Sheet * table ) float ftop = 2.0; float fbottom = 2.0; - QString paperSize("A4"); - QString orientation("Portrait"); - QString footLeft, footMiddle, footRight; - QString headLeft, headMiddle, headRight; // no we are zombies :-) + TQString paperSize("A4"); + TQString orientation("Portrait"); + TQString footLeft, footMiddle, footRight; + TQString headLeft, headMiddle, headRight; // no we are zombies :-) - QDomNode margins( printInfo.namedItem("gmr:Margins") ); + TQDomNode margins( printInfo.namedItem("gmr:Margins") ); if ( !margins.isNull() ) { - QDomElement top( margins.namedItem( "gmr:top" ).toElement() ); + TQDomElement top( margins.namedItem( "gmr:top" ).toElement() ); if ( !top.isNull() ) ftop = parseAttribute( top ); - QDomElement bottom( margins.namedItem( "gmr:bottom" ).toElement() ); + TQDomElement bottom( margins.namedItem( "gmr:bottom" ).toElement() ); if ( !bottom.isNull() ) fbottom= parseAttribute( bottom ); - QDomElement left( margins.namedItem( "gmr:left" ).toElement() ); + TQDomElement left( margins.namedItem( "gmr:left" ).toElement() ); if ( !left.isNull() ) fleft = parseAttribute( left ); - QDomElement right( margins.namedItem( "gmr:right" ).toElement() ); + TQDomElement right( margins.namedItem( "gmr:right" ).toElement() ); if ( !right.isNull() ) fright = parseAttribute( right ); } - QDomElement foot( printInfo.namedItem("gmr:Footer").toElement() ); + TQDomElement foot( printInfo.namedItem("gmr:Footer").toElement() ); if ( !foot.isNull() ) { kdDebug(30521) << "Parsing footer: " << foot.attribute("Left") << ", " << foot.attribute("Middle") << ", " @@ -895,7 +895,7 @@ void GNUMERICFilter::ParsePrintInfo( QDomNode const & printInfo, Sheet * table ) footRight = convertVars( foot.attribute("Right"), table ); } - QDomElement head( printInfo.namedItem("gmr:Header").toElement() ); + TQDomElement head( printInfo.namedItem("gmr:Header").toElement() ); if ( !head.isNull() ) { kdDebug(30521) << "Parsing header: " << head.attribute("Left") << ", " << head.attribute("Middle") << ", " << head.attribute("Right") << ", "<< endl; @@ -907,37 +907,37 @@ void GNUMERICFilter::ParsePrintInfo( QDomNode const & printInfo, Sheet * table ) headRight = convertVars( head.attribute("Right"), table ); } - QDomElement repeateColumn( printInfo.namedItem("gmr:repeat_top").toElement() ); + TQDomElement repeateColumn( printInfo.namedItem("gmr:repeat_top").toElement() ); if ( !repeateColumn.isNull() ) { - QString repeate = repeateColumn.attribute( "value" ); + TQString repeate = repeateColumn.attribute( "value" ); if ( !repeate.isEmpty() ) { Range range(repeate); //kdDebug()<<" repeate :"<<repeate<<"range. ::start row : "<<range.startRow ()<<" start col :"<<range.startCol ()<<" end row :"<<range.endRow ()<<" end col :"<<range.endCol ()<<endl; - table->print()->setPrintRepeatRows( qMakePair( range.startRow (),range.endRow ()) ); + table->print()->setPrintRepeatRows( tqMakePair( range.startRow (),range.endRow ()) ); } } - QDomElement repeateRow( printInfo.namedItem("gmr:repeat_left").toElement() ); + TQDomElement repeateRow( printInfo.namedItem("gmr:repeat_left").toElement() ); if ( !repeateRow.isNull() ) { - QString repeate = repeateRow.attribute( "value" ); + TQString repeate = repeateRow.attribute( "value" ); if ( !repeate.isEmpty() ) { //fix row too high - repeate = repeate.replace( "65536", "32500" ); + repeate = repeate.tqreplace( "65536", "32500" ); Range range(repeate); //kdDebug()<<" repeate :"<<repeate<<"range. ::start row : "<<range.startRow ()<<" start col :"<<range.startCol ()<<" end row :"<<range.endRow ()<<" end col :"<<range.endCol ()<<endl; - table->print()->setPrintRepeatColumns( qMakePair( range.startCol (),range.endCol ()) ); + table->print()->setPrintRepeatColumns( tqMakePair( range.startCol (),range.endCol ()) ); } } - QDomElement orient( printInfo.namedItem("gmr:orientation").toElement() ); + TQDomElement orient( printInfo.namedItem("gmr:orientation").toElement() ); if ( !orient.isNull() ) orientation = orient.text(); - QDomElement size( printInfo.namedItem("gmr:paper").toElement() ); + TQDomElement size( printInfo.namedItem("gmr:paper").toElement() ); if ( !size.isNull() ) paperSize = size.text(); @@ -948,7 +948,7 @@ void GNUMERICFilter::ParsePrintInfo( QDomNode const & printInfo, Sheet * table ) footLeft, footMiddle, footRight ); } -void GNUMERICFilter::ParseFormat(QString const & formatString, Cell * kspread_cell) +void GNUMERICFilter::ParseFormat(TQString const & formatString, Cell * kspread_cell) { int l = formatString.length(); int lastPos = 0; @@ -961,50 +961,50 @@ void GNUMERICFilter::ParseFormat(QString const & formatString, Cell * kspread_ce kspread_cell->format()->setCurrency( 1, "$" ); lastPos = 1; } - else if (formatString[0] == '£') + else if (formatString[0] == '�') { kspread_cell->format()->setFormatType(Money_format); - kspread_cell->format()->setCurrency( 1, "£" ); + kspread_cell->format()->setCurrency( 1, "�" ); lastPos = 1; } - else if (formatString[0] == '¥') + else if (formatString[0] == '�') { kspread_cell->format()->setFormatType(Money_format); - kspread_cell->format()->setCurrency( 1, "¥" ); + kspread_cell->format()->setCurrency( 1, "�" ); lastPos = 1; } - else if (formatString[0] == '¤') + else if (formatString[0] == '�') { kspread_cell->format()->setFormatType(Money_format); - kspread_cell->format()->setCurrency( 1, "¤" ); + kspread_cell->format()->setCurrency( 1, "�" ); lastPos = 1; } else if (l > 1) { if ((formatString[0] == '[') && (formatString[1] == '$')) { - int n = formatString.find(']'); + int n = formatString.tqfind(']'); if (n != -1) { - QString currency = formatString.mid(2, n - 2); + TQString currency = formatString.mid(2, n - 2); kspread_cell->format()->setFormatType(Money_format); kspread_cell->format()->setCurrency( 1, currency ); } lastPos = ++n; } - else if (formatString.find("E+0") != -1) + else if (formatString.tqfind("E+0") != -1) { kspread_cell->format()->setFormatType(Scientific_format); } else { // do pattern matching with gnumeric formats - QString content(kspread_cell->value().asString()); + TQString content(kspread_cell->value().asString()); if ( setType(kspread_cell, formatString, content) ) return; - if (formatString.find("?/?") != -1) + if (formatString.tqfind("?/?") != -1) { // TODO: fixme! kspread_cell->format()->setFormatType( fraction_three_digits ); @@ -1035,7 +1035,7 @@ void GNUMERICFilter::ParseFormat(QString const & formatString, Cell * kspread_ce while (formatString[lastPos] == ' ') ++lastPos; - int n = formatString.find( '.', lastPos ); + int n = formatString.tqfind( '.', lastPos ); if ( n != -1) { lastPos = n + 1; @@ -1051,12 +1051,12 @@ void GNUMERICFilter::ParseFormat(QString const & formatString, Cell * kspread_ce } bool red = false; - if (formatString.find("[RED]", lastPos) != -1) + if (formatString.tqfind("[RED]", lastPos) != -1) { red = true; kspread_cell->format()->setFloatColor( Format::NegRed ); } - if ( formatString.find('(', lastPos) != -1 ) + if ( formatString.tqfind('(', lastPos) != -1 ) { if ( red ) kspread_cell->format()->setFloatColor( Format::NegRedBrackets ); @@ -1065,13 +1065,13 @@ void GNUMERICFilter::ParseFormat(QString const & formatString, Cell * kspread_ce } } -void GNUMERICFilter::convertFormula( QString & formula ) const +void GNUMERICFilter::convertFormula( TQString & formula ) const { - int n = formula.find( '=', 1 ); + int n = formula.tqfind( '=', 1 ); // TODO: check if we do not screw something up here... if ( n != -1 ) - formula = formula.replace( n, 1, "==" ); + formula = formula.tqreplace( n, 1, "==" ); bool inQuote1 = false; bool inQuote2 = false; @@ -1083,30 +1083,30 @@ void GNUMERICFilter::convertFormula( QString & formula ) const else if ( formula[i] == '"' ) inQuote2 = !inQuote2; else if ( formula[i] == ',' && !inQuote1 && !inQuote2 ) - formula = formula.replace( i, 1, ";" ); + formula = formula.tqreplace( i, 1, ";" ); } } -void GNUMERICFilter::setStyleInfo(QDomNode * sheet, Sheet * table) +void GNUMERICFilter::setStyleInfo(TQDomNode * sheet, Sheet * table) { kdDebug(30521) << "SetStyleInfo entered " << endl; int row, column; - QDomNode styles = sheet->namedItem( "gmr:Styles" ); + TQDomNode styles = sheet->namedItem( "gmr:Styles" ); if ( !styles.isNull() ) { // Get a style region within that sheet. - QDomNode style_region = styles.namedItem( "gmr:StyleRegion" ); + TQDomNode style_region = styles.namedItem( "gmr:StyleRegion" ); while ( !style_region.isNull() ) { - QDomElement e = style_region.toElement(); // try to convert the node to an element. + TQDomElement e = style_region.toElement(); // try to convert the node to an element. - QDomNode style = style_region.namedItem( "gmr:Style" ); - QDomNode font = style.namedItem( "gmr:Font" ); - QDomNode validation = style.namedItem( "gmr:Validation" ); - QDomNode gmr_styleborder = style.namedItem( "gmr:StyleBorder" ); - QDomNode hyperlink = style.namedItem( "gmr:HyperLink" ); + TQDomNode style = style_region.namedItem( "gmr:Style" ); + TQDomNode font = style.namedItem( "gmr:Font" ); + TQDomNode validation = style.namedItem( "gmr:Validation" ); + TQDomNode gmr_styleborder = style.namedItem( "gmr:StyleBorder" ); + TQDomNode hyperlink = style.namedItem( "gmr:HyperLink" ); int startCol = e.attribute( "startCol" ).toInt() + 1; int endCol = e.attribute( "endCol" ).toInt() + 1; int startRow = e.attribute( "startRow" ).toInt() + 1; @@ -1136,31 +1136,31 @@ void GNUMERICFilter::setStyleInfo(QDomNode * sheet, Sheet * table) continue; } - QDomElement style_element = style.toElement(); // try to convert the node to an element. + TQDomElement style_element = style.toElement(); // try to convert the node to an element. kdDebug(30521) << "Style valid for kspread" << endl; kspread_cell = table->nonDefaultCell( column, row, false ); if (style_element.hasAttribute("Fore")) { - QString color_string = style_element.attribute("Fore"); - QColor color; + TQString color_string = style_element.attribute("Fore"); + TQColor color; convert_string_to_qcolor(color_string, &color); kspread_cell->format()->setTextColor(color); } if (style_element.hasAttribute("Back")) { - QString color_string = style_element.attribute("Back"); - QColor color; + TQString color_string = style_element.attribute("Back"); + TQColor color; convert_string_to_qcolor(color_string, &color); kspread_cell->format()->setBgColor(color); } if (style_element.hasAttribute("PatternColor")) { - QString color_string = style_element.attribute("PatternColor"); - QColor color; + TQString color_string = style_element.attribute("PatternColor"); + TQColor color; convert_string_to_qcolor(color_string, &color); kspread_cell->format()->setBackGroundBrushColor( color ); } @@ -1170,7 +1170,7 @@ void GNUMERICFilter::setStyleInfo(QDomNode * sheet, Sheet * table) /* Pattern's taken from: gnumeric's pattern.c */ /* if "TODO" added: doesn't match exactly the gnumeric one */ - QString shade = style_element.attribute("Shade"); + TQString shade = style_element.attribute("Shade"); if (shade == "0") { // nothing to do @@ -1214,12 +1214,12 @@ void GNUMERICFilter::setStyleInfo(QDomNode * sheet, Sheet * table) else if (shade == "7") { kspread_cell->format()->setBackGroundBrushStyle(Qt::HorPattern); - /* 7 Horizontal Stripe */ + /* 7Qt::Horizontal Stripe */ } else if (shade == "8") { kspread_cell->format()->setBackGroundBrushStyle(Qt::VerPattern); - /* 8 Vertical Stripe */ + /* 8Qt::Vertical Stripe */ } else if (shade == "9") { @@ -1243,7 +1243,7 @@ void GNUMERICFilter::setStyleInfo(QDomNode * sheet, Sheet * table) } else if (shade == "13") { - /* 13 Thin Horizontal Stripe TODO: wrong: this is thick!*/ + /* 13 ThinQt::Horizontal Stripe TODO: wrong: this is thick!*/ kspread_cell->format()->setBackGroundBrushStyle(Qt::HorPattern); } else if (shade == "14") @@ -1313,7 +1313,7 @@ void GNUMERICFilter::setStyleInfo(QDomNode * sheet, Sheet * table) if (style_element.hasAttribute("HAlign")) { - QString halign_string=style_element.attribute("HAlign"); + TQString halign_string=style_element.attribute("HAlign"); if (halign_string == "1") { @@ -1348,7 +1348,7 @@ void GNUMERICFilter::setStyleInfo(QDomNode * sheet, Sheet * table) if (style_element.hasAttribute("VAlign")) { - QString valign_string=style_element.attribute("VAlign"); + TQString valign_string=style_element.attribute("VAlign"); if (valign_string == "1") { @@ -1371,7 +1371,7 @@ void GNUMERICFilter::setStyleInfo(QDomNode * sheet, Sheet * table) if (style_element.hasAttribute("WrapText")) { - QString multiRow = style_element.attribute("WrapText"); + TQString multiRow = style_element.attribute("WrapText"); if ( multiRow == "1" ) kspread_cell->format()->setMultiRow( true ); @@ -1379,7 +1379,7 @@ void GNUMERICFilter::setStyleInfo(QDomNode * sheet, Sheet * table) if (style_element.hasAttribute("Format")) { - QString formatString = style_element.attribute("Format"); + TQString formatString = style_element.attribute("Format"); kdDebug(30521) << "Format: " << formatString << endl; ParseFormat(formatString, kspread_cell); @@ -1388,12 +1388,12 @@ void GNUMERICFilter::setStyleInfo(QDomNode * sheet, Sheet * table) if (!gmr_styleborder.isNull()) { - QDomElement style_element = gmr_styleborder.toElement(); // try to convert the node to an element. + TQDomElement style_element = gmr_styleborder.toElement(); // try to convert the node to an element. ParseBorder( style_element, kspread_cell ); } if ( !validation.isNull() ) { - QDomElement validation_element = validation.toElement(); + TQDomElement validation_element = validation.toElement(); if ( !validation_element.isNull() ) { kdDebug(30521)<<" Cell validation \n"; @@ -1432,8 +1432,8 @@ void GNUMERICFilter::setStyleInfo(QDomNode * sheet, Sheet * table) break; } } - QDomNode expression0 = validation_element.namedItem( "gmr:Expression0" ); - QDomNode expression1 = validation_element.namedItem( "gmr:Expression1" ); + TQDomNode expression0 = validation_element.namedItem( "gmr:Expression0" ); + TQDomNode expression1 = validation_element.namedItem( "gmr:Expression1" ); //kdDebug()<<" expression0.isNull() "<<expression0.isNull()<<endl; //kdDebug()<<" expression1.isNull() "<<expression1.isNull()<<endl; if ( validation_element.hasAttribute( "Type" ) ) @@ -1574,46 +1574,46 @@ void GNUMERICFilter::setStyleInfo(QDomNode * sheet, Sheet * table) case 0: kspread_validity->m_cond=Conditional::Between; if ( !expression0.isNull() ) - kspread_validity->dateMin=QDate::fromString( expression0.toElement().text() ); + kspread_validity->dateMin=TQDate::fromString( expression0.toElement().text() ); if ( !expression1.isNull() ) - kspread_validity->dateMax=QDate::fromString( expression1.toElement().text() ); + kspread_validity->dateMax=TQDate::fromString( expression1.toElement().text() ); break; case 1: if ( !expression0.isNull() ) - kspread_validity->dateMin=QDate::fromString( expression0.toElement().text() ); + kspread_validity->dateMin=TQDate::fromString( expression0.toElement().text() ); if ( !expression1.isNull() ) - kspread_validity->dateMax=QDate::fromString( expression1.toElement().text() ); + kspread_validity->dateMax=TQDate::fromString( expression1.toElement().text() ); kspread_validity->m_cond=Conditional::DifferentTo; break; case 2: if ( !expression0.isNull() ) - kspread_validity->dateMin=QDate::fromString( expression0.toElement().text() ); + kspread_validity->dateMin=TQDate::fromString( expression0.toElement().text() ); kspread_validity->m_cond=Conditional::Equal; break; case 3: if ( !expression0.isNull() ) - kspread_validity->dateMin=QDate::fromString( expression0.toElement().text() ); + kspread_validity->dateMin=TQDate::fromString( expression0.toElement().text() ); kspread_validity->m_cond=Conditional::Different; break; case 4: if ( !expression0.isNull() ) - kspread_validity->dateMin=QDate::fromString( expression0.toElement().text() ); + kspread_validity->dateMin=TQDate::fromString( expression0.toElement().text() ); kspread_validity->m_cond=Conditional::Superior; break; case 5: if ( !expression0.isNull() ) - kspread_validity->dateMin=QDate::fromString( expression0.toElement().text() ); + kspread_validity->dateMin=TQDate::fromString( expression0.toElement().text() ); kspread_validity->m_cond=Conditional::Inferior; break; case 6: if ( !expression0.isNull() ) - kspread_validity->dateMin=QDate::fromString( expression0.toElement().text() ); + kspread_validity->dateMin=TQDate::fromString( expression0.toElement().text() ); kspread_validity->m_cond=Conditional::SuperiorEqual; break; case 7: if ( !expression0.isNull() ) - kspread_validity->dateMin=QDate::fromString( expression0.toElement().text() ); + kspread_validity->dateMin=TQDate::fromString( expression0.toElement().text() ); kspread_validity->m_cond=Conditional::InferiorEqual; break; default: @@ -1632,20 +1632,20 @@ void GNUMERICFilter::setStyleInfo(QDomNode * sheet, Sheet * table) case 0: kspread_validity->m_cond=Conditional::Between; if ( !expression0.isNull() ) - kspread_validity->timeMin=QTime::fromString( expression0.toElement().text() ); + kspread_validity->timeMin=TQTime::fromString( expression0.toElement().text() ); if ( !expression1.isNull() ) - kspread_validity->timeMax=QTime::fromString( expression1.toElement().text() ); + kspread_validity->timeMax=TQTime::fromString( expression1.toElement().text() ); break; case 1: if ( !expression0.isNull() ) - kspread_validity->timeMin=QTime::fromString( expression0.toElement().text() ); + kspread_validity->timeMin=TQTime::fromString( expression0.toElement().text() ); if ( !expression1.isNull() ) - kspread_validity->timeMax=QTime::fromString( expression1.toElement().text() ); + kspread_validity->timeMax=TQTime::fromString( expression1.toElement().text() ); kspread_validity->m_cond=Conditional::DifferentTo; break; case 2: if ( !expression0.isNull() ) - kspread_validity->timeMin=QTime::fromString( expression0.toElement().text() ); + kspread_validity->timeMin=TQTime::fromString( expression0.toElement().text() ); kspread_validity->m_cond=Conditional::Equal; break; case 3: @@ -1653,22 +1653,22 @@ void GNUMERICFilter::setStyleInfo(QDomNode * sheet, Sheet * table) break; case 4: if ( !expression0.isNull() ) - kspread_validity->timeMin=QTime::fromString( expression0.toElement().text() ); + kspread_validity->timeMin=TQTime::fromString( expression0.toElement().text() ); kspread_validity->m_cond=Conditional::Superior; break; case 5: kspread_validity->m_cond=Conditional::Inferior; if ( !expression0.isNull() ) - kspread_validity->timeMin=QTime::fromString( expression0.toElement().text() ); + kspread_validity->timeMin=TQTime::fromString( expression0.toElement().text() ); break; case 6: kspread_validity->m_cond=Conditional::SuperiorEqual; if ( !expression0.isNull() ) - kspread_validity->timeMin=QTime::fromString( expression0.toElement().text() ); + kspread_validity->timeMin=TQTime::fromString( expression0.toElement().text() ); break; case 7: if ( !expression0.isNull() ) - kspread_validity->timeMin=QTime::fromString( expression0.toElement().text() ); + kspread_validity->timeMin=TQTime::fromString( expression0.toElement().text() ); kspread_validity->m_cond=Conditional::InferiorEqual; break; default: @@ -1746,7 +1746,7 @@ void GNUMERICFilter::setStyleInfo(QDomNode * sheet, Sheet * table) } if (!font.isNull()) { - QDomElement font_element = font.toElement(); + TQDomElement font_element = font.toElement(); kspread_cell->format()->setTextFontFamily( font_element.text() ); @@ -1773,9 +1773,9 @@ void GNUMERICFilter::setStyleInfo(QDomNode * sheet, Sheet * table) //<gmr:HyperLink type="GnmHLinkURL" target="www.kde.org"/> if ( hyperlink.toElement().hasAttribute( "type" ) ) { - QString linkType= hyperlink.toElement().attribute( "type" ); - QString target = hyperlink.toElement().attribute( "target" ); - QString tip = hyperlink.toElement().attribute( "tip" ); + TQString linkType= hyperlink.toElement().attribute( "type" ); + TQString target = hyperlink.toElement().attribute( "target" ); + TQString tip = hyperlink.toElement().attribute( "tip" ); if ( !tip.isEmpty() ) kspread_cell->setCellText( tip ); if ( linkType=="GnmHLinkURL" ) @@ -1822,7 +1822,7 @@ void GNUMERICFilter::setStyleInfo(QDomNode * sheet, Sheet * table) */ -KoFilter::ConversionStatus GNUMERICFilter::convert( const QCString & from, const QCString & to ) +KoFilter::ConversiontqStatus GNUMERICFilter::convert( const TQCString & from, const TQCString & to ) { dateInit(); bool bSuccess=true; @@ -1835,7 +1835,7 @@ KoFilter::ConversionStatus GNUMERICFilter::convert( const QCString & from, const kdDebug(30521) << "here we go... " << document->className() << endl; - if ( !::qt_cast<const KSpread::Doc *>( document ) ) // it's safer that way :) + if ( !::tqqt_cast<const KSpread::Doc *>( document ) ) // it's safer that way :) { kdWarning(30521) << "document isn't a KSpread::Doc but a " << document->className() << endl; return KoFilter::NotImplemented; @@ -1848,7 +1848,7 @@ KoFilter::ConversionStatus GNUMERICFilter::convert( const QCString & from, const kdDebug(30521) << "...still here..." << endl; - // No need for a dynamic cast here, since we use Qt's moc magic + // No need for a dynamic cast here, since we use TQt's tqmoc magic Doc * ksdoc = ( Doc * ) document; if ( ksdoc->mimeType() != "application/x-kspread" ) @@ -1858,7 +1858,7 @@ KoFilter::ConversionStatus GNUMERICFilter::convert( const QCString & from, const } - QIODevice* in = KFilterDev::deviceForFile(m_chain->inputFile(),"application/x-gzip"); + TQIODevice* in = KFilterDev::deviceForFile(m_chain->inputFile(),"application/x-gzip"); if ( !in ) { @@ -1873,8 +1873,8 @@ KoFilter::ConversionStatus GNUMERICFilter::convert( const QCString & from, const return KoFilter::FileNotFound; } - QDomDocument doc; - QString errorMsg; + TQDomDocument doc; + TQString errorMsg; int errorLine, errorColumn; if ( !doc.setContent(in, &errorMsg, &errorLine, &errorColumn) ) { @@ -1894,8 +1894,8 @@ KoFilter::ConversionStatus GNUMERICFilter::convert( const QCString & from, const int selectedTab = 0; Sheet * selTable = 0; - QDomElement docElem = doc.documentElement(); - QDomElement uiData = docElem.namedItem("gmr:UIData").toElement(); + TQDomElement docElem = doc.documentElement(); + TQDomElement uiData = docElem.namedItem("gmr:UIData").toElement(); if ( !uiData.isNull() ) { if ( uiData.hasAttribute( "SelectedTab" ) ) @@ -1908,14 +1908,14 @@ KoFilter::ConversionStatus GNUMERICFilter::convert( const QCString & from, const } } } - QDomNode sheets = docElem.namedItem("gmr:Sheets"); + TQDomNode sheets = docElem.namedItem("gmr:Sheets"); if ( sheets.isNull() ) { //avoid crash with new file format. //TODO allow to load new file format return KoFilter::ParsingError; } - QDomNode sheet = sheets.namedItem("gmr:Sheet"); + TQDomNode sheet = sheets.namedItem("gmr:Sheet"); /* This sets the Document information. */ set_document_info( document, &docElem ); @@ -1930,7 +1930,7 @@ KoFilter::ConversionStatus GNUMERICFilter::convert( const QCString & from, const // This is a mapping of exprID to expressions. - QDict<char> exprID_dict( 17, FALSE ); + TQDict<char> exprID_dict( 17, FALSE ); int num = 1; while (!sheet.isNull()) @@ -1941,17 +1941,17 @@ KoFilter::ConversionStatus GNUMERICFilter::convert( const QCString & from, const if ( currentTab == selectedTab ) selTable = table; - QDomElement name = sheet.namedItem( "gmr:Name" ).toElement(); - QDomElement sheetElement = sheet.toElement(); + TQDomElement name = sheet.namedItem( "gmr:Name" ).toElement(); + TQDomElement sheetElement = sheet.toElement(); if ( !name.isNull() ) table->setSheetName( name.text(), false, false ); else - table->setSheetName( "Sheet" + QString::number( num ), false, false ); + table->setSheetName( "Sheet" + TQString::number( num ), false, false ); table->enableScrollBarUpdates( false ); //kdDebug()<<" sheetElement.hasAttribute( DisplayFormulas ) :"<<sheetElement.hasAttribute( "DisplayFormulas" )<<endl; - QString tmp; + TQString tmp; if ( sheetElement.hasAttribute( "DisplayFormulas" ) ) { tmp=sheetElement.attribute( "DisplayFormulas"); @@ -1985,17 +1985,17 @@ KoFilter::ConversionStatus GNUMERICFilter::convert( const QCString & from, const setSelectionInfo(&sheet, table); /* handling print information */ - QDomNode printInfo = sheet.namedItem("gmr:PrintInformation"); + TQDomNode printInfo = sheet.namedItem("gmr:PrintInformation"); if ( !printInfo.isNull() ) ParsePrintInfo( printInfo, table ); kdDebug(30521) << "Reading in cells" << endl; /* CELL handling START */ - QDomNode cells = sheet.namedItem( "gmr:Cells" ); - QDomNode cell = cells.namedItem( "gmr:Cell" ); - QDomNode mergedCells = sheet.namedItem( "gmr:MergedRegions" ); - QDomNode mergedRegion = mergedCells.namedItem( "gmr:Merge" ); + TQDomNode cells = sheet.namedItem( "gmr:Cells" ); + TQDomNode cell = cells.namedItem( "gmr:Cell" ); + TQDomNode mergedCells = sheet.namedItem( "gmr:MergedRegions" ); + TQDomNode mergedRegion = mergedCells.namedItem( "gmr:Merge" ); if ( cell.isNull() ) { kdWarning(30521) << "No cells" << endl; @@ -2006,22 +2006,22 @@ KoFilter::ConversionStatus GNUMERICFilter::convert( const QCString & from, const value += 2; emit sigProgress(value); - QDomElement e = cell.toElement(); // try to convert the node to an element. + TQDomElement e = cell.toElement(); // try to convert the node to an element. if ( !e.isNull() ) { // the node was really an element. kdDebug(30521) << "New Cell " << endl; - QDomNode content_node = cell.namedItem("gmr:Content"); + TQDomNode content_node = cell.namedItem("gmr:Content"); if (!content_node.isNull()) { - QDomElement content = content_node.toElement(); + TQDomElement content = content_node.toElement(); if( !content.isNull() ) { // the node was really an element. column = e.attribute( "Col" ).toInt() + 1; row = e.attribute( "Row" ).toInt() + 1; - QString cell_content( content.text() ); + TQString cell_content( content.text() ); //kdDebug()<<"cell_content :!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! :"<<cell_content<<endl; if ( cell_content[0] == '=' ) convertFormula( cell_content ); @@ -2039,7 +2039,7 @@ KoFilter::ConversionStatus GNUMERICFilter::convert( const QCString & from, const // <xsd:enumeration value="60"/> <!-- string --> // <xsd:enumeration value="70"/> <!-- cellrange --> // <xsd:enumeration value="80"/> <!-- array --> - QString valuetype = e.attribute( "ValueType" ); + TQString valuetype = e.attribute( "ValueType" ); if ( valuetype == "40" )//percentage { kspread_cell->format()->setFormatType( Percentage_format ); @@ -2054,7 +2054,7 @@ KoFilter::ConversionStatus GNUMERICFilter::convert( const QCString & from, const if (e.hasAttribute( "ValueFormat" )) { - QString formatString = e.attribute( "ValueFormat" ); + TQString formatString = e.attribute( "ValueFormat" ); if ( !setType( kspread_cell, formatString, cell_content ) ) table->setText(row, column, cell_content, false); } @@ -2063,8 +2063,8 @@ KoFilter::ConversionStatus GNUMERICFilter::convert( const QCString & from, const if (e.hasAttribute("ExprID")) { - // QString encoded_string(table->cellAt( column, row, false)->encodeFormula( row, column ).utf8()); - QString encoded_string(table->cellAt( column, row, false )->encodeFormula().latin1()); + // TQString encoded_string(table->cellAt( column, row, false)->encodeFormula( row, column ).utf8()); + TQString encoded_string(table->cellAt( column, row, false )->encodeFormula().latin1()); char * tmp_string = ( char * ) malloc( strlen( encoded_string.latin1() ) ); @@ -2075,7 +2075,7 @@ KoFilter::ConversionStatus GNUMERICFilter::convert( const QCString & from, const exprID_dict.insert(e.attribute("ExprID"), tmp_string); kdDebug(30521) << exprID_dict[e.attribute("ExprID")] << endl; - kdDebug(30521) << exprID_dict[QString("1")] << endl; + kdDebug(30521) << exprID_dict[TQString("1")] << endl; kdDebug(30521) << e.attribute("ExprID") << endl; } @@ -2087,7 +2087,7 @@ KoFilter::ConversionStatus GNUMERICFilter::convert( const QCString & from, const column = e.attribute( "Col" ).toInt() + 1; row = e.attribute( "Row" ).toInt() + 1; - QString cell_content( e.text() ); + TQString cell_content( e.text() ); //kdDebug()<<"cell_content :!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! :"<<cell_content<<endl; if ( cell_content[0] == '=' ) convertFormula( cell_content ); @@ -2107,7 +2107,7 @@ KoFilter::ConversionStatus GNUMERICFilter::convert( const QCString & from, const //<xsd:enumeration value="80"/> <!-- array --> //kspread_cell->setValue( date ); //kspread_cell->format()->setFormatType( type ); - QString valuetype = e.attribute( "ValueType" ); + TQString valuetype = e.attribute( "ValueType" ); if ( valuetype == "40" )//percentage { kspread_cell->format()->setFormatType( Percentage_format ); @@ -2123,7 +2123,7 @@ KoFilter::ConversionStatus GNUMERICFilter::convert( const QCString & from, const if (e.hasAttribute( "ValueFormat" )) { - QString formatString = e.attribute( "ValueFormat" ); + TQString formatString = e.attribute( "ValueFormat" ); if ( !setType( kspread_cell, formatString, cell_content ) ) table->setText(row, column, cell_content, false); } @@ -2137,7 +2137,7 @@ KoFilter::ConversionStatus GNUMERICFilter::convert( const QCString & from, const row = e.attribute("Row").toInt() + 1; char * expr; expr = exprID_dict[e.attribute("ExprID")]; - // expr = exprID_dict[QString("1")]; + // expr = exprID_dict[TQString("1")]; kdDebug(30521) << "FOO:" << column << row << endl; kdDebug(30521) << @@ -2161,8 +2161,8 @@ KoFilter::ConversionStatus GNUMERICFilter::convert( const QCString & from, const } while ( !mergedRegion.isNull() ) { - QDomElement e = mergedRegion.toElement(); // try to convert the node to an element. - QString cell_merge_area( e.text() ); + TQDomElement e = mergedRegion.toElement(); // try to convert the node to an element. + TQString cell_merge_area( e.text() ); Range range(cell_merge_area); //kdDebug()<<"text !!! :"<<cell_merge_area<< "range :start row : "<<range.startRow ()<<" start col :"<<range.startCol ()<<" end row :"<<range.endRow ()<<" end col :"<<range.endCol ()<<endl; Cell * cell = table->nonDefaultCell( range.startCol (), range.startRow () ); diff --git a/filters/kspread/gnumeric/gnumericimport.h b/filters/kspread/gnumeric/gnumericimport.h index fedd2368..f5a46d10 100644 --- a/filters/kspread/gnumeric/gnumericimport.h +++ b/filters/kspread/gnumeric/gnumericimport.h @@ -22,8 +22,8 @@ #include <KoFilter.h> -#include <qdatetime.h> -#include <qdom.h> +#include <tqdatetime.h> +#include <tqdom.h> namespace KSpread { @@ -34,33 +34,34 @@ class Sheet; class GNUMERICFilter : public KoFilter { Q_OBJECT + TQ_OBJECT public: - GNUMERICFilter(KoFilter *parent, const char *name, const QStringList&); + GNUMERICFilter(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~GNUMERICFilter() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); enum borderStyle { Left, Right, Top, Bottom, Diagonal, Revdiagonal}; private: - class GnumericDate : public QDate + class GnumericDate : public TQDate { public: static uint greg2jul( int y, int m, int d ); static void jul2greg( double num, int & y, int & m, int & d ); - static QTime getTime( double num ); + static TQTime getTime( double num ); }; void dateInit(); - QString convertVars( QString const & str, KSpread::Sheet * table ) const; - void ParsePrintInfo( QDomNode const & printInfo, KSpread::Sheet * table ); - void ParseFormat(QString const & formatString, KSpread::Cell* kspread_cell); - void setStyleInfo(QDomNode * sheet, KSpread::Sheet * table); - bool setType( KSpread::Cell* kspread_cell, QString const & formatString, QString & cell_content ); - void convertFormula( QString & formula ) const; - void importBorder( QDomElement border, borderStyle _style, KSpread::Cell*cell); - void ParseBorder( QDomElement & gmr_styleborder, KSpread::Cell* kspread_cell ); - double parseAttribute( const QDomElement &_element ); + TQString convertVars( TQString const & str, KSpread::Sheet * table ) const; + void ParsePrintInfo( TQDomNode const & printInfo, KSpread::Sheet * table ); + void ParseFormat(TQString const & formatString, KSpread::Cell* kspread_cell); + void setStyleInfo(TQDomNode * sheet, KSpread::Sheet * table); + bool setType( KSpread::Cell* kspread_cell, TQString const & formatString, TQString & cell_content ); + void convertFormula( TQString & formula ) const; + void importBorder( TQDomElement border, borderStyle _style, KSpread::Cell*cell); + void ParseBorder( TQDomElement & gmr_styleborder, KSpread::Cell* kspread_cell ); + double parseAttribute( const TQDomElement &_element ); }; #endif // GNUMERICFILTER_H diff --git a/filters/kspread/gnumeric/status.html b/filters/kspread/gnumeric/status.html index 3c92af2e..5089efa1 100644 --- a/filters/kspread/gnumeric/status.html +++ b/filters/kspread/gnumeric/status.html @@ -39,7 +39,7 @@ KOffice filters status: GNUmeric (GNOME spreadsheet)</h1></center> <tr BGCOLOR="#CCCCFF"> <td VALIGN=TOP><b><font size="+1">Features</font></b></td> -<td>Vertical & Horizontal Alignment, text wrapping, indention +<td>Vertical &Qt::Horizontal Alignment, text wrapping, indention <br>Background, Patter & Foreground color <br>Fonts: <br> @@ -61,7 +61,7 @@ Family <br>Page: size, orientation, borders, header and footer <br>Border: color, style, width for all 6 types <br>Background pattern: style, color -<br>Cell Size: Horizontal & Vertical +<br>Cell Size:Qt::Horizontal &Qt::Vertical <br>Hidden Columns <br>Default row heights and column widths <br>Area name @@ -81,7 +81,7 @@ Family <tr BGCOLOR="#EEEEFF"> <td VALIGN=TOP><b><font size="+1">Todo</font></b></td> -<td>Cell Size: Horizontal & Vertical (Export) (kspread doesn't +<td>Cell Size:Qt::Horizontal &Qt::Vertical (Export) (kspread doesn't support retriving the first "rowFormat" and colFormat".) <br> <br> @@ -128,7 +128,7 @@ support it.) <br>Jul 15, 2001 - Preliminary support for background patterns. <br>Aug 21, 2002 - text/number formats, border, patters, page/print info, comments <br>Aug 21, 2002 - font family, wrap text, number formating, precisions -<br>Sep 05, 2002 - bugfixes, default sizes, row and column layouts +<br>Sep 05, 2002 - bugfixes, default sizes, row and column tqlayouts <br>Sep 07, 2002 - bugfixes, preliminery date/time support <br>Feb 03, 2005 - export area name <br>Feb 06, 2005 - cells merged @@ -194,7 +194,7 @@ Faure</a> <a href="mailto:trobin@kde.org">Werner Trobin</a></td> <tr BGCOLOR="#CCCCFF"> <td VALIGN=TOP><b><font size="+1">Features</font></b></td> -<td>Vertical & Horizontal Alignment +<td>Vertical &Qt::Horizontal Alignment <br>Background & Foreground color <br>Fonts: <br> @@ -208,10 +208,10 @@ Bold <br>Multiple Sheets (Tables) <br>Formulas!!! (ExprID) <br>Selections -<br>Cell Size: Horizontal & Vertical +<br>Cell Size:Qt::Horizontal &Qt::Vertical <br>Hidden columns/rows <br>Selected Tab -<br>Paper layout +<br>Paper tqlayout <br>area name <br>Cell comment <br>Text Rotation diff --git a/filters/kspread/html/exportdialog.cc b/filters/kspread/html/exportdialog.cc index 78276def..37720d6e 100644 --- a/filters/kspread/html/exportdialog.cc +++ b/filters/kspread/html/exportdialog.cc @@ -17,12 +17,12 @@ * Boston, MA 02110-1301, USA. */ -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qlistbox.h> -#include <qradiobutton.h> -#include <qspinbox.h> -#include <qtextcodec.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqlistbox.h> +#include <tqradiobutton.h> +#include <tqspinbox.h> +#include <tqtextcodec.h> #include <kapplication.h> #include <kglobal.h> @@ -32,19 +32,19 @@ #include <exportdialog.h> #include <exportwidget.h> -ExportDialog::ExportDialog( QWidget *parent, const char *name ) - : KDialogBase( parent, name, true, i18n("Export Sheet to HTML"), Ok|Cancel, No, true ), m_mainwidget( new ExportWidget( this ) ) +ExportDialog::ExportDialog( TQWidget *tqparent, const char *name ) + : KDialogBase( tqparent, name, true, i18n("Export Sheet to HTML"), Ok|Cancel, No, true ), m_mainwidget( new ExportWidget( this ) ) { kapp->restoreOverrideCursor(); - connect( m_mainwidget->mCustomButton, SIGNAL( toggled( bool ) ), - m_mainwidget->mCustomURL, SLOT( setEnabled( bool ) ) ); - connect( m_mainwidget->mSelectAllButton, SIGNAL( clicked() ), SLOT( selectAll() ) ); - connect( m_mainwidget->mDeselectAllButton, SIGNAL( clicked() ), - m_mainwidget->mSheets, SLOT( clearSelection() ) ); + connect( m_mainwidget->mCustomButton, TQT_SIGNAL( toggled( bool ) ), + m_mainwidget->mCustomURL, TQT_SLOT( setEnabled( bool ) ) ); + connect( m_mainwidget->mSelectAllButton, TQT_SIGNAL( clicked() ), TQT_SLOT( selectAll() ) ); + connect( m_mainwidget->mDeselectAllButton, TQT_SIGNAL( clicked() ), + m_mainwidget->mSheets, TQT_SLOT( clearSelection() ) ); m_mainwidget->mEncodingBox->insertItem( i18n( "Recommended: UTF-8" ) ); - m_mainwidget->mEncodingBox->insertItem( i18n( "Locale (%1)" ).arg( KGlobal::locale()->codecForEncoding()->name() ) ); + m_mainwidget->mEncodingBox->insertItem( i18n( "Locale (%1)" ).tqarg( KGlobal::locale()->codecForEncoding()->name() ) ); m_mainwidget->mCustomURL->setMode( KFile::ExistingOnly ); @@ -58,15 +58,15 @@ void ExportDialog::selectAll() ExportDialog::~ExportDialog() { - kapp->setOverrideCursor(Qt::waitCursor); + kapp->setOverrideCursor(TQt::waitCursor); } -QTextCodec *ExportDialog::encoding() const +TQTextCodec *ExportDialog::encoding() const { if( m_mainwidget->mEncodingBox->currentItem() == 1 ) // locale selected return KGlobal::locale()->codecForEncoding(); - return QTextCodec::codecForName( "utf8" ); // utf8 is default + return TQTextCodec::codecForName( "utf8" ); // utf8 is default } bool ExportDialog::useBorders() const @@ -79,24 +79,24 @@ bool ExportDialog::separateFiles() const return m_mainwidget->mSeparateFiles->isChecked(); } -QString ExportDialog::customStyleURL() const +TQString ExportDialog::customStyleURL() const { - QString url = m_mainwidget->mCustomURL->url(); + TQString url = m_mainwidget->mCustomURL->url(); if( m_mainwidget->mCustomButton->isChecked() && KURL( url ).isValid() ) return url; - return QString::null; + return TQString(); } -void ExportDialog::setSheets( const QStringList &list ) +void ExportDialog::setSheets( const TQStringList &list ) { m_mainwidget->mSheets->insertStringList( list ); selectAll(); } -QStringList ExportDialog::sheets() const +TQStringList ExportDialog::sheets() const { - QStringList list; + TQStringList list; for( uint i = 0; i < m_mainwidget->mSheets->count() ; i++ ) { if( m_mainwidget->mSheets->isSelected( i ) ) diff --git a/filters/kspread/html/exportdialog.h b/filters/kspread/html/exportdialog.h index 4a460554..38cac112 100644 --- a/filters/kspread/html/exportdialog.h +++ b/filters/kspread/html/exportdialog.h @@ -27,23 +27,24 @@ class ExportWidget; class ExportDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - ExportDialog( QWidget *parent = 0, const char *name = 0 ); + ExportDialog( TQWidget *tqparent = 0, const char *name = 0 ); ~ExportDialog(); - void setSheets( const QStringList & ); - QStringList sheets() const; + void setSheets( const TQStringList & ); + TQStringList sheets() const; /** Returns preferred encoding. Defaults to UTF-8. */ - QTextCodec *encoding() const; + TQTextCodec *encoding() const; /** Returns a valid URL if the custom button was selected. - Else, it will return QString::null. + Else, it will return TQString(). */ - QString customStyleURL() const; + TQString customStyleURL() const; /** Returns true if borders should be shown, false if borders diff --git a/filters/kspread/html/exportwidget.ui b/filters/kspread/html/exportwidget.ui index d81ef40b..0c92ae60 100644 --- a/filters/kspread/html/exportwidget.ui +++ b/filters/kspread/html/exportwidget.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>ExportWidget</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>ExportWidget</cstring> </property> @@ -19,15 +19,15 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -38,7 +38,7 @@ <cstring>mEncodingBox</cstring> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <property name="name"> <cstring>mEncodingBox</cstring> </property> @@ -56,7 +56,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> @@ -65,7 +65,7 @@ </spacer> </hbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox3</cstring> </property> @@ -76,7 +76,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QListBox"> + <widget class="TQListBox"> <property name="name"> <cstring>mSheets</cstring> </property> @@ -84,15 +84,15 @@ <enum>Multi</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout7</cstring> + <cstring>tqlayout7</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>mSelectAllButton</cstring> </property> @@ -103,7 +103,7 @@ <string>Click here to select all sheets in the list.</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>mDeselectAllButton</cstring> </property> @@ -124,7 +124,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>330</width> <height>20</height> @@ -133,7 +133,7 @@ </spacer> </hbox> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>mSeparateFiles</cstring> </property> @@ -146,7 +146,7 @@ </widget> </vbox> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup4</cstring> </property> @@ -157,7 +157,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>mDefaultButton</cstring> </property> @@ -171,7 +171,7 @@ <string>Select this option to use the default fonts and colors for the HTML page.</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>mCustomButton</cstring> </property> @@ -195,7 +195,7 @@ </widget> </vbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox2</cstring> </property> @@ -206,7 +206,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>mUseBorders</cstring> </property> @@ -220,15 +220,15 @@ <string>Use this option to enable or disable borders around the cells.</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -242,7 +242,7 @@ <string>Use this option to define how many pixels there should be between the cells. This effect is better visible if you check <b>Use borders</b> too.</string> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>mPixelsBetweenCells</cstring> </property> @@ -271,7 +271,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> @@ -292,7 +292,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> @@ -301,7 +301,7 @@ </spacer> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kurlrequester.h</includehint> <includehint>klineedit.h</includehint> diff --git a/filters/kspread/html/htmlexport.cc b/filters/kspread/html/htmlexport.cc index 76c6ee83..3360c593 100644 --- a/filters/kspread/html/htmlexport.cc +++ b/filters/kspread/html/htmlexport.cc @@ -22,8 +22,8 @@ #include <htmlexport.h> #include <exportdialog.h> -#include <qfile.h> -#include <qtextcodec.h> +#include <tqfile.h> +#include <tqtextcodec.h> #include <kdebug.h> #include <kgenericfactory.h> @@ -41,24 +41,24 @@ using namespace KSpread; typedef KGenericFactory<HTMLExport, KoFilter> HTMLExportFactory; K_EXPORT_COMPONENT_FACTORY( libkspreadhtmlexport, HTMLExportFactory( "kofficefilters" ) ) -const QString html_table_tag = "table"; -const QString html_table_options = QString(" border=\"%1\" cellspacing=\"%2\""); -const QString html_row_tag = "tr"; -const QString html_row_options = ""; -const QString html_cell_tag = "td"; -const QString html_cell_options = ""; -const QString html_bold = "b"; -const QString html_italic = "i"; -const QString html_underline = "u"; -const QString html_right= "right"; -const QString html_left= "left"; -const QString html_center= "center"; -const QString html_top="top"; -const QString html_bottom="bottom"; -const QString html_middle="middle"; -const QString html_h1="h1"; - -HTMLExport::HTMLExport(KoFilter *, const char *, const QStringList&) : +const TQString html_table_tag = "table"; +const TQString html_table_options = TQString(" border=\"%1\" cellspacing=\"%2\""); +const TQString html_row_tag = "tr"; +const TQString html_row_options = ""; +const TQString html_cell_tag = "td"; +const TQString html_cell_options = ""; +const TQString html_bold = "b"; +const TQString html_italic = "i"; +const TQString html_underline = "u"; +const TQString html_right= "right"; +const TQString html_left= "left"; +const TQString html_center= "center"; +const TQString html_top="top"; +const TQString html_bottom="bottom"; +const TQString html_middle="middle"; +const TQString html_h1="h1"; + +HTMLExport::HTMLExport(KoFilter *, const char *, const TQStringList&) : KoFilter(), m_dialog( new ExportDialog() ) { } @@ -69,14 +69,14 @@ HTMLExport::~HTMLExport() } // HTML enitities, AFAIK we don't need to escape " to " (dnaber): -const QString strAmp ("&"); -const QString nbsp (" "); -const QString strLt ("<"); -const QString strGt (">"); +const TQString strAmp ("&"); +const TQString nbsp (" "); +const TQString strLt ("<"); +const TQString strGt (">"); -// The reason why we use the KoDocument* approach and not the QDomDocument +// The reason why we use the KoDocument* approach and not the TQDomDocument // approach is because we don't want to export formulas but values ! -KoFilter::ConversionStatus HTMLExport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus HTMLExport::convert( const TQCString& from, const TQCString& to ) { if(to!="text/html" || from!="application/x-kspread") { @@ -89,7 +89,7 @@ KoFilter::ConversionStatus HTMLExport::convert( const QCString& from, const QCSt if ( !document ) return KoFilter::StupidError; - if( !::qt_cast<const KSpread::Doc *>( document ) ) // it's safer that way :) + if( !::tqqt_cast<const KSpread::Doc *>( document ) ) // it's safer that way :) { kdWarning(30501) << "document isn't a KSpread::Doc but a " << document->className() << endl; return KoFilter::NotImplemented; @@ -104,10 +104,10 @@ KoFilter::ConversionStatus HTMLExport::convert( const QCString& from, const QCSt } Sheet *sheet = ksdoc->map()->firstSheet(); - QString filenameBase = m_chain->outputFile(); - filenameBase = filenameBase.left( filenameBase.findRev( '.' ) ); + TQString filenameBase = m_chain->outputFile(); + filenameBase = filenameBase.left( filenameBase.tqfindRev( '.' ) ); - QStringList sheets; + TQStringList sheets; while( sheet != 0 ) { int rows = 0; @@ -124,20 +124,20 @@ KoFilter::ConversionStatus HTMLExport::convert( const QCString& from, const QCSt } m_dialog->setSheets( sheets ); - if( m_dialog->exec() == QDialog::Rejected ) + if( m_dialog->exec() == TQDialog::Rejected ) return KoFilter::UserCancelled; sheets = m_dialog->sheets(); - QString str; + TQString str; for( uint i = 0; i < sheets.count() ; ++i ) { sheet = ksdoc->map()->findSheet( sheets[i] ); - QString file = fileName( filenameBase, sheet->sheetName(), sheets.count() > 1 ); + TQString file = fileName( filenameBase, sheet->sheetName(), sheets.count() > 1 ); if( m_dialog->separateFiles() || sheets[i] == sheets.first() ) { - str = QString::null; + str = TQString(); openPage( sheet, document, str ); writeTOC( sheets, filenameBase, str ); } @@ -147,13 +147,13 @@ KoFilter::ConversionStatus HTMLExport::convert( const QCString& from, const QCSt if( m_dialog->separateFiles() || sheets[i] == sheets.last() ) { closePage( str ); - QFile out(file); + TQFile out(file); if(!out.open(IO_WriteOnly)) { kdError(30501) << "Unable to open output file!" << endl; out.close(); return KoFilter::FileNotFound; } - QTextStream streamOut(&out); + TQTextStream streamOut(&out); streamOut.setCodec( m_dialog->encoding() ); streamOut << str << endl; out.close(); @@ -170,9 +170,9 @@ KoFilter::ConversionStatus HTMLExport::convert( const QCString& from, const QCSt return KoFilter::OK; } -void HTMLExport::openPage( Sheet *sheet, KoDocument *document, QString &str ) +void HTMLExport::openPage( Sheet *sheet, KoDocument *document, TQString &str ) { - QString title; + TQString title; KoDocumentInfo *info = document->documentInfo(); KoDocumentInfoAbout *aboutPage = static_cast<KoDocumentInfoAbout *>(info->page( "about" )); if ( aboutPage && !aboutPage->title().isEmpty() ) @@ -186,7 +186,7 @@ void HTMLExport::openPage( Sheet *sheet, KoDocument *document, QString &str ) str += "<html>\n"; str += "<head>\n"; str += "<meta http-equiv=\"Content-Type\" "; - str += QString("content=\"text/html; charset=%1\">\n").arg( m_dialog->encoding()->mimeName() ); + str += TQString("content=\"text/html; charset=%1\">\n").tqarg( m_dialog->encoding()->mimeName() ); str += "<meta name=\"Generator\" "; str += "content=\"KSpread HTML Export Filter Version = "; str += KOFFICE_VERSION_STRING; @@ -202,22 +202,22 @@ void HTMLExport::openPage( Sheet *sheet, KoDocument *document, QString &str ) str += "<title>" + title + "</title>\n"; str += "</head>\n"; - str += QString("<body bgcolor=\"#FFFFFF\" dir=\"%1\">\n").arg( + str += TQString("<body bgcolor=\"#FFFFFF\" dir=\"%1\">\n").tqarg( sheet->isRightToLeft()?"rtl":"ltr"); str += "<a name=\"__top\">\n"; } -void HTMLExport::closePage( QString &str ) +void HTMLExport::closePage( TQString &str ) { str += "<p align=\"" + html_center + "\"><a href=\"#__top\">" + i18n("Top") + "</a></p>\n"; str += "</body>\n"; str += "</html>\n\n"; } -void HTMLExport::convertSheet( Sheet *sheet, QString &str, int iMaxUsedRow, int iMaxUsedColumn ) +void HTMLExport::convertSheet( Sheet *sheet, TQString &str, int iMaxUsedRow, int iMaxUsedColumn ) { - QString emptyLines; + TQString emptyLines; // Either we get hold of KSpreadTable::m_dctCells and apply the old method below (for sorting) // or, cleaner and already sorted, we use KSpreadTable's API (slower probably, though) @@ -234,8 +234,8 @@ void HTMLExport::convertSheet( Sheet *sheet, QString &str, int iMaxUsedRow, int int step=iMaxRow > 50 ? iMaxRow/50 : 1; int i=1; - str += "<" + html_table_tag + html_table_options.arg( m_dialog->useBorders() ? "1" : "0" ).arg( m_dialog->pixelsBetweenCells() ) + - QString("dir=\"%1\">\n").arg(sheet->isRightToLeft()?"rtl":"ltr"); + str += "<" + html_table_tag + html_table_options.tqarg( m_dialog->useBorders() ? "1" : "0" ).tqarg( m_dialog->pixelsBetweenCells() ) + + TQString("dir=\"%1\">\n").tqarg(sheet->isRightToLeft()?"rtl":"ltr"); unsigned int nonempty_cells_prev=0; @@ -247,8 +247,8 @@ void HTMLExport::convertSheet( Sheet *sheet, QString &str, int iMaxUsedRow, int i=0; } - QString separators; - QString line; + TQString separators; + TQString line; unsigned int nonempty_cells=0; unsigned int colspan_cells=0; @@ -258,8 +258,8 @@ void HTMLExport::convertSheet( Sheet *sheet, QString &str, int iMaxUsedRow, int colspan_cells=cell->extraXCells(); if (cell->needsPrinting()) nonempty_cells++; - QString text; - QColor bgcolor = cell->bgColor(currentcolumn,currentrow); + TQString text; + TQColor bgcolor = cell->bgColor(currentcolumn,currentrow); // FIXME: some formatting seems to be missing with cell->text(), e.g. // "208.00" in KSpread will be "208" in HTML (not always?!) bool link = false; @@ -297,7 +297,7 @@ void HTMLExport::convertSheet( Sheet *sheet, QString &str, int iMaxUsedRow, int #endif line += " <" + html_cell_tag + html_cell_options; if (text.isRightToLeft() != sheet->isRightToLeft()) - line += QString(" dir=\"%1\" ").arg(text.isRightToLeft()?"rtl":"ltr"); + line += TQString(" dir=\"%1\" ").tqarg(text.isRightToLeft()?"rtl":"ltr"); if (bgcolor.isValid() && bgcolor.name()!="#ffffff") // change color only for non-white cells line += " bgcolor=\"" + bgcolor.name() + "\""; @@ -329,12 +329,12 @@ void HTMLExport::convertSheet( Sheet *sheet, QString &str, int iMaxUsedRow, int case Format::UndefinedY: break; } - line+=" width=\""+QString::number(cell->width())+"\""; - line+=" height=\""+QString::number(cell->height())+"\""; + line+=" width=\""+TQString::number(cell->width())+"\""; + line+=" height=\""+TQString::number(cell->height())+"\""; if (cell->extraXCells()>0) { - QString tmp; + TQString tmp; int extra_cells=cell->extraXCells(); line += " colspan=\"" + tmp.setNum(extra_cells+1) + "\""; currentcolumn += extra_cells; @@ -345,10 +345,10 @@ void HTMLExport::convertSheet( Sheet *sheet, QString &str, int iMaxUsedRow, int text = text.right(text.length()-1); } else if ( !link ) { // Escape HTML characters. - text.replace ('&' , strAmp) - .replace ('<' , strLt) - .replace ('>' , strGt) - .replace (' ' , nbsp); + text.tqreplace ('&' , strAmp) + .tqreplace ('<' , strLt) + .tqreplace ('>' , strGt) + .tqreplace (' ' , nbsp); } line += ">\n"; @@ -367,7 +367,7 @@ void HTMLExport::convertSheet( Sheet *sheet, QString &str, int iMaxUsedRow, int text.insert(0, "<" + html_underline + ">"); text.append("</" + html_underline + ">"); } - QColor textColor = cell->format()->textColor(currentcolumn,currentrow); + TQColor textColor = cell->format()->textColor(currentcolumn,currentrow); if (textColor.isValid() && textColor.name()!="#000000") // change color only for non-default text { text.insert(0, "<font color=\"" + textColor.name() + "\">"); @@ -387,7 +387,7 @@ void HTMLExport::convertSheet( Sheet *sheet, QString &str, int iMaxUsedRow, int str += "<" + html_row_tag + html_row_options + ">\n"; str += line; str += "</" + html_row_tag + ">"; - emptyLines = QString::null; + emptyLines = TQString(); // Append a CR, but in a temp string -> if no other real line, // then those will be dropped emptyLines += "\n"; @@ -396,13 +396,13 @@ void HTMLExport::convertSheet( Sheet *sheet, QString &str, int iMaxUsedRow, int str += "\n</" + html_table_tag + ">\n<br>\n"; } -void HTMLExport::createSheetSeparator( QString &str ) +void HTMLExport::createSheetSeparator( TQString &str ) { str += ("<p align=\"" + html_center + "\"><a href=\"#__top\">" + i18n("Top") + "</a></p>\n" ); str += "<hr width=\"80%\">\n"; } -void HTMLExport::writeTOC( const QStringList &sheets, const QString &base, QString &str ) +void HTMLExport::writeTOC( const TQStringList &sheets, const TQString &base, TQString &str ) { // don't create TOC for 1 sheet if( sheets.count() == 1 ) @@ -431,9 +431,9 @@ void HTMLExport::writeTOC( const QStringList &sheets, const QString &base, QStri str += "</p><hr width=\"80%\">\n"; } -QString HTMLExport::fileName( const QString &base, const QString &sheetName, bool multipleFiles ) +TQString HTMLExport::fileName( const TQString &base, const TQString &sheetName, bool multipleFiles ) { - QString fileName = base; + TQString fileName = base; if( m_dialog->separateFiles() && multipleFiles ) { fileName += "-" + sheetName; @@ -457,7 +457,7 @@ void HTMLExport::detectFilledCells( Sheet *sheet, int &rows, int &columns ) for ( int currentcolumn = 1 ; currentcolumn <= iMaxColumn ; currentcolumn++ ) { cell = sheet->cellAt( currentcolumn, currentrow, false ); - QString text; + TQString text; if ( !cell->isDefault() && !cell->isEmpty() ) { iUsedColumn = currentcolumn; diff --git a/filters/kspread/html/htmlexport.h b/filters/kspread/html/htmlexport.h index 1952c9af..afb20883 100644 --- a/filters/kspread/html/htmlexport.h +++ b/filters/kspread/html/htmlexport.h @@ -34,34 +34,35 @@ class Sheet; class HTMLExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - HTMLExport(KoFilter *parent, const char*name, const QStringList&); + HTMLExport(KoFilter *tqparent, const char*name, const TQStringList&); virtual ~HTMLExport(); - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); private: /** Writes the top of the page in HTML to @par str */ - void openPage( KSpread::Sheet *sheet,KoDocument *document, QString &str); + void openPage( KSpread::Sheet *sheet,KoDocument *document, TQString &str); /** Closes a page in HTML */ - void closePage( QString &); + void closePage( TQString &); /** Converts @par sheet to HTML and writes to @par str. */ - void convertSheet( KSpread::Sheet *sheet, QString &str, int, int); + void convertSheet( KSpread::Sheet *sheet, TQString &str, int, int); /** Writes a bar and a link to the top to @par str. */ - void createSheetSeparator( QString & ); + void createSheetSeparator( TQString & ); /** Writes the table of contents */ - void writeTOC( const QStringList &, const QString &, QString & ); + void writeTOC( const TQStringList &, const TQString &, TQString & ); /** Returns a filename based on the @par base filename and the options defined in the dialog. */ - QString fileName( const QString &base, const QString &, bool ); + TQString fileName( const TQString &base, const TQString &, bool ); /** Detects which rows and columsn of the given @par sheet are used and @@ -71,9 +72,9 @@ public: private: ExportDialog *m_dialog; - typedef QMap<QString,int> Rows; + typedef TQMap<TQString,int> Rows; Rows m_rowmap; - typedef QMap<QString,int> Columns; + typedef TQMap<TQString,int> Columns; Columns m_columnmap; }; diff --git a/filters/kspread/kexi/kspread_kexiimport.cc b/filters/kspread/kexi/kspread_kexiimport.cc index 11feea71..76a44e9a 100644 --- a/filters/kspread/kexi/kspread_kexiimport.cc +++ b/filters/kspread/kexi/kspread_kexiimport.cc @@ -53,7 +53,7 @@ #include <klocale.h> #include <kmessagebox.h> #include <klistview.h> -#include <qcolor.h> +#include <tqcolor.h> typedef KGenericFactory<KSpreadKexiImport, KoFilter> KSpreadKexiImportFactory; K_EXPORT_COMPONENT_FACTORY( libkspreadkexiimport, KSpreadKexiImportFactory( "kofficefilters" ) ) @@ -61,7 +61,7 @@ K_EXPORT_COMPONENT_FACTORY( libkspreadkexiimport, KSpreadKexiImportFactory( "kof //============================================================================= -KSpreadKexiImport::KSpreadKexiImport(KoFilter *parent, const char *name, const QStringList&) +KSpreadKexiImport::KSpreadKexiImport(KoFilter *tqparent, const char *name, const TQStringList&) { } @@ -74,10 +74,10 @@ KSpreadKexiImport::~KSpreadKexiImport() //============================================================================= -KoFilter::ConversionStatus KSpreadKexiImport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus KSpreadKexiImport::convert( const TQCString& from, const TQCString& to ) { - QPtrList<QListViewItem> objects; - QString file( m_chain->inputFile() ); + TQPtrList<TQListViewItem> objects; + TQString file( m_chain->inputFile() ); //Create dialog m_dialog = new KSpreadKexiImportDialog(); @@ -99,7 +99,7 @@ KoFilter::ConversionStatus KSpreadKexiImport::convert( const QCString& from, con kdDebug() << "here we go... " << document->className() << endl; - if ( !::qt_cast<const KSpread::Doc *>( document ) ) + if ( !::tqqt_cast<const KSpread::Doc *>( document ) ) { kdWarning() << "document isn't a KSpread::Doc but a " << document->className() << endl; return KoFilter::NotImplemented; @@ -120,7 +120,7 @@ KoFilter::ConversionStatus KSpreadKexiImport::convert( const QCString& from, con document->emitBeginOperation(); - QListViewItem *itm; + TQListViewItem *itm; for(itm = objects.first(); itm ; itm = objects.next()) { if (!insertObject(itm->text(1), itm->text(0))) @@ -141,9 +141,9 @@ KoFilter::ConversionStatus KSpreadKexiImport::convert( const QCString& from, con return KoFilter::OK; } -bool KSpreadKexiImport::insertObject(const QString& object, const QString& type) +bool KSpreadKexiImport::insertObject(const TQString& object, const TQString& type) { - QStringList fieldNames; + TQStringList fieldNames; KSpread::Sheet *sheet; KexiDB::Parser *parser; KexiDB::QuerySchema *query; @@ -189,13 +189,13 @@ bool KSpreadKexiImport::insertObject(const QString& object, const QString& type) } //Insert the field headings - QStringList::iterator it; + TQStringList::iterator it; int i = 1; for (it = fieldNames.begin(); it != fieldNames.end(); ++it, ++i) { KSpread::Cell *c = sheet->nonDefaultCell(i ,1); c->setCellText(*it, true); - c->format()->setBgColor(QColor(200,200,200)); + c->format()->setBgColor(TQColor(200,200,200)); c->format()->setTextFontBold(true); } diff --git a/filters/kspread/kexi/kspread_kexiimport.h b/filters/kspread/kexi/kspread_kexiimport.h index 8c03473f..7da8d20f 100644 --- a/filters/kspread/kexi/kspread_kexiimport.h +++ b/filters/kspread/kexi/kspread_kexiimport.h @@ -58,6 +58,7 @@ class KSpreadKexiImportDialog; class KSpreadKexiImport : public KoFilter { Q_OBJECT + TQ_OBJECT protected: @@ -68,18 +69,18 @@ class KSpreadKexiImport : public KoFilter /** * Constructor. This constructor is usable with KGenericFactory. */ - KSpreadKexiImport(KoFilter *parent, const char *name, const QStringList&); + KSpreadKexiImport(KoFilter *tqparent, const char *name, const TQStringList&); /** * Virtual destructor. */ virtual ~KSpreadKexiImport(); - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); private: KSpread::Doc *ksdoc; - bool insertObject(const QString&,const QString&); + bool insertObject(const TQString&,const TQString&); }; #endif diff --git a/filters/kspread/kexi/kspread_kexiimportdialog.cc b/filters/kspread/kexi/kspread_kexiimportdialog.cc index 1c2a912a..9d30ee38 100644 --- a/filters/kspread/kexi/kspread_kexiimportdialog.cc +++ b/filters/kspread/kexi/kspread_kexiimportdialog.cc @@ -34,9 +34,9 @@ #include <kpushbutton.h> #include <klistview.h> #include <kcombobox.h> -#include <qradiobutton.h> -#include <qtextedit.h> -#include <qcheckbox.h> +#include <tqradiobutton.h> +#include <tqtextedit.h> +#include <tqcheckbox.h> #include <klocale.h> //Kexi Includes @@ -54,15 +54,15 @@ /** * Constructor - * @param parent Pointer to kspread view + * @param tqparent Pointer to kspread view * @param name Name of the dialog * @return None */ - KSpreadKexiImportDialog::KSpreadKexiImportDialog(QWidget* parent, const char* name) - : KSpreadKexiImportDialogBase(parent,name) + KSpreadKexiImportDialog::KSpreadKexiImportDialog(TQWidget* tqparent, const char* name) + : KSpreadKexiImportDialogBase(tqparent,name) { - connect(this->m_insertButton,SIGNAL(clicked()),this,SLOT(accept())); - connect(this->m_cancelButton,SIGNAL(clicked()),this,SLOT(reject())); + connect(this->m_insertButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(accept())); + connect(this->m_cancelButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(reject())); } /** @@ -78,7 +78,7 @@ KSpreadKexiImportDialog::~KSpreadKexiImportDialog() void KSpreadKexiImportDialog::accept() { kdDebug() << "insert kexi data dialog accepted (insert button clicked)" << endl; - done(QDialog::Accepted); + done(TQDialog::Accepted); emit insertKexi(); } @@ -88,7 +88,7 @@ void KSpreadKexiImportDialog::accept() void KSpreadKexiImportDialog::reject() { kdDebug() << "insert kexi data dialog rejected (cancel button clicked)" << endl; - done(QDialog::Rejected); + done(TQDialog::Rejected); } /** @@ -96,7 +96,7 @@ void KSpreadKexiImportDialog::reject() * @param fileName name of file to open if cdata is null * @param cdata connection data to server based database...not implemented though */ -void KSpreadKexiImportDialog::openDatabase( QString fileName , KexiDB::ConnectionData *cdata) +void KSpreadKexiImportDialog::openDatabase( TQString fileName , KexiDB::ConnectionData *cdata) { kdDebug() << "openDatabase" << endl; KexiDB::Driver *dr; @@ -163,8 +163,8 @@ void KSpreadKexiImportDialog::openDatabase( QString fileName , KexiDB::Connectio */ void KSpreadKexiImportDialog::populateTables() { - QValueList<int> tids; - QValueList<int> qids; + TQValueList<int> tids; + TQValueList<int> qids; kdDebug() << "Getting Tables and Queries" << endl; tids = conn->objectIds(KexiDB::TableObjectType); @@ -172,7 +172,7 @@ void KSpreadKexiImportDialog::populateTables() kdDebug() << qids.count() << " queries " << tids.count() << " tables" << endl; - QValueList<int>::iterator it; + TQValueList<int>::iterator it; for ( it = tids.begin(); it != tids.end(); ++it ) { @@ -198,15 +198,15 @@ void KSpreadKexiImportDialog::populateTables() * * @return the custom query that has been entered */ -QString KSpreadKexiImportDialog::customQueryString() +TQString KSpreadKexiImportDialog::customQueryString() { return m_CustomQueryText->text(); } -QPtrList<QListViewItem> KSpreadKexiImportDialog::selectedItems() +TQPtrList<TQListViewItem> KSpreadKexiImportDialog::selectedItems() { - QPtrList<QListViewItem> lst; - QListViewItemIterator it( m_sourceList ); + TQPtrList<TQListViewItem> lst; + TQListViewItemIterator it( m_sourceList ); while ( it.current() ) { if ( it.current()->isSelected() ) diff --git a/filters/kspread/kexi/kspread_kexiimportdialog.h b/filters/kspread/kexi/kspread_kexiimportdialog.h index 12b7a740..81948f34 100644 --- a/filters/kspread/kexi/kspread_kexiimportdialog.h +++ b/filters/kspread/kexi/kspread_kexiimportdialog.h @@ -51,6 +51,7 @@ class KListViewItem; class KSpreadKexiImportDialog : public KSpreadKexiImportDialogBase { Q_OBJECT + TQ_OBJECT private: @@ -67,46 +68,46 @@ public: * The dates in the dialog initialize to a complete calendar for the * current month. */ - KSpreadKexiImportDialog(QWidget* parent = 0, const char* name = 0); + KSpreadKexiImportDialog(TQWidget* tqparent = 0, const char* name = 0); /** * Virtual destructor. */ virtual ~KSpreadKexiImportDialog(); - void openDatabase(QString,KexiDB::ConnectionData *cdata); + void openDatabase(TQString,KexiDB::ConnectionData *cdata); KexiDB::Connection *connection() { return conn; }; bool customQuery(); - QString customQueryString(); + TQString customQueryString(); int conversion(); //1: kspread 2: text ..... possibly add more option - QPtrList<QListViewItem> selectedItems(); + TQPtrList<TQListViewItem> selectedItems(); protected slots: /** - * This slot is reimplemented from QDialog and + * This slot is reimplemented from TQDialog and * is connected to the insert button. * It also emits a insertCalendar signal. * * The dialog is closed (not deleted) when * this slot is called. * - * @see insertCalendar, reject, QDialog::done + * @see insertCalendar, reject, TQDialog::done */ virtual void accept(); /** - * This slot is reimplemented from QDialog and + * This slot is reimplemented from TQDialog and * is connected to the cancel button. * * The dialog is closed (not deleted) when * this slot is called. * - * @see accept, QDialog::done + * @see accept, TQDialog::done */ virtual void reject(); diff --git a/filters/kspread/kexi/kspread_kexiimportdialogbase.ui b/filters/kspread/kexi/kspread_kexiimportdialogbase.ui index ad9756ef..043e3ce6 100644 --- a/filters/kspread/kexi/kspread_kexiimportdialogbase.ui +++ b/filters/kspread/kexi/kspread_kexiimportdialogbase.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KSpreadKexiImportDialogBase</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KSpreadKexiImportDialogBase</cstring> </property> @@ -26,22 +26,22 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QSplitter"> + <widget class="TQSplitter"> <property name="name"> <cstring>splitter4</cstring> </property> <property name="orientation"> <enum>Horizontal</enum> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -85,7 +85,7 @@ <bool>true</bool> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_customQueryCheck</cstring> </property> @@ -93,7 +93,7 @@ <string>Custom quer&y</string> </property> </widget> - <widget class="QTextEdit"> + <widget class="TQTextEdit"> <property name="name"> <cstring>m_CustomQueryText</cstring> </property> @@ -108,15 +108,15 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -132,7 +132,7 @@ <string>Data Conversion</string> </property> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>m_convGroup</cstring> </property> @@ -151,7 +151,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_convKSRadio</cstring> </property> @@ -162,7 +162,7 @@ <bool>true</bool> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_convTextRadio</cstring> </property> @@ -178,9 +178,9 @@ </vbox> </widget> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> @@ -196,14 +196,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>145</width> <height>0</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_insertButton</cstring> </property> @@ -219,7 +219,7 @@ <comment>What's this for the insert button of the insert calendar plugin</comment> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_cancelButton</cstring> </property> @@ -237,7 +237,7 @@ </widget> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klistview.h</includehint> </includehints> diff --git a/filters/kspread/latex/export/cell.cc b/filters/kspread/latex/export/cell.cc index 81e2e7fd..74eb95bb 100644 --- a/filters/kspread/latex/export/cell.cc +++ b/filters/kspread/latex/export/cell.cc @@ -44,7 +44,7 @@ Cell::~Cell() { } -void Cell::analyse(const QDomNode balise) +void Cell::analyse(const TQDomNode balise) { _row = getAttr(balise, "row").toLong(); _col = getAttr(balise, "column").toLong(); @@ -53,7 +53,7 @@ void Cell::analyse(const QDomNode balise) analyseText(balise); } -void Cell::analyseText(const QDomNode balise) +void Cell::analyseText(const TQDomNode balise) { setTextDataType( getAttr(getChild(balise, "text"), "dataType")); setText(getData(balise, "text")); @@ -63,7 +63,7 @@ void Cell::analyseText(const QDomNode balise) /*******************************************/ /* generate */ /*******************************************/ -void Cell::generate(QTextStream& out, Table* table) +void Cell::generate(TQTextStream& out, Table* table) { /*if(getMulticol() > 0) out << "\\multicol{" << getMulticol() << "}{"; diff --git a/filters/kspread/latex/export/cell.h b/filters/kspread/latex/export/cell.h index 96482978..fadf30a1 100644 --- a/filters/kspread/latex/export/cell.h +++ b/filters/kspread/latex/export/cell.h @@ -21,7 +21,7 @@ #ifndef __KSPREAD_LATEX_CELL_H__ #define __KSPREAD_LATEX_CELL_H__ -#include <qstring.h> +#include <tqstring.h> #include "config.h" #include "format.h" @@ -43,10 +43,10 @@ class Cell: public Format /* USEFULL DATA */ long _row; long _col; - QString _text; - QString _textDataType; - QString _result; - QString _resultDataType; + TQString _text; + TQString _textDataType; + TQString _result; + TQString _resultDataType; public: @@ -78,26 +78,26 @@ class Cell: public Format long getRow() const { return _row; } long getCol() const { return _col; } - QString getText() const { return _text; } - QString getTextDataType() const { return _textDataType; } - QString getResult() const { return _result; } - QString getResultDataType() const { return _resultDataType; } + TQString getText() const { return _text; } + TQString getTextDataType() const { return _textDataType; } + TQString getResult() const { return _result; } + TQString getResultDataType() const { return _resultDataType; } /* ==== setters ==== */ void setRow(int r) { _row = r; } void setCol(int c) { _col = c; } - void setText(QString text) { _text = text; } - void setTextDataType(QString dt) { _textDataType = dt; } - void setResult(QString result) { _result = result; } - void setResultDataType(QString dt) { _resultDataType = dt; } + void setText(TQString text) { _text = text; } + void setTextDataType(TQString dt) { _textDataType = dt; } + void setResult(TQString result) { _result = result; } + void setResultDataType(TQString dt) { _resultDataType = dt; } /** * Helpfull functions */ - void analyse (const QDomNode); - void analyseText (const QDomNode); - void analyseResult (const QDomNode); - void generate (QTextStream&, Table*); + void analyse (const TQDomNode); + void analyseText (const TQDomNode); + void analyseResult (const TQDomNode); + void generate (TQTextStream&, Table*); private: diff --git a/filters/kspread/latex/export/column.cc b/filters/kspread/latex/export/column.cc index 198f7595..fece8cb8 100644 --- a/filters/kspread/latex/export/column.cc +++ b/filters/kspread/latex/export/column.cc @@ -38,7 +38,7 @@ Column::~Column() { } -void Column::analyse(const QDomNode balise) +void Column::analyse(const TQDomNode balise) { _col = getAttr(balise, "column").toLong(); _width = getAttr(balise, "width").toDouble(); @@ -48,7 +48,7 @@ void Column::analyse(const QDomNode balise) /*******************************************/ /* generate */ /*******************************************/ -void Column::generate(QTextStream& out) +void Column::generate(TQTextStream& out) { //generateLeftBorder(out); if(getBrushStyle() >= 1) diff --git a/filters/kspread/latex/export/column.h b/filters/kspread/latex/export/column.h index 41b6386b..a591cc77 100644 --- a/filters/kspread/latex/export/column.h +++ b/filters/kspread/latex/export/column.h @@ -21,7 +21,7 @@ #ifndef __KSPREAD_LATEX_COLUMN_H__ #define __KSPREAD_LATEX_COLUMN_H__ -#include <qstring.h> +#include <tqstring.h> #include "config.h" #include "format.h" @@ -76,8 +76,8 @@ class Column: public Format /** * Helpfull functions */ - void analyse (const QDomNode); - void generate (QTextStream&); + void analyse (const TQDomNode); + void generate (TQTextStream&); private: diff --git a/filters/kspread/latex/export/config.cc b/filters/kspread/latex/export/config.cc index a79296ca..8460aae4 100644 --- a/filters/kspread/latex/export/config.cc +++ b/filters/kspread/latex/export/config.cc @@ -76,7 +76,7 @@ void Config::desindent() } } -void Config::writeIndent(QTextStream& out) +void Config::writeIndent(TQTextStream& out) { for(int index = 0; index < _tabulation; index++) { diff --git a/filters/kspread/latex/export/config.h b/filters/kspread/latex/export/config.h index 05eba575..6e35bd1c 100644 --- a/filters/kspread/latex/export/config.h +++ b/filters/kspread/latex/export/config.h @@ -22,8 +22,8 @@ #ifndef __LATEX_CONFIG_H__ #define __LATEX_CONFIG_H__ -#include <qtextstream.h> -#include <qstringlist.h> +#include <tqtextstream.h> +#include <tqstringlist.h> /***********************************************************************/ /* Class: Config */ @@ -39,20 +39,20 @@ class Config /* Document tab */ bool _useLatexStyle; bool _isEmbeded; - QString _class; - QString _quality; + TQString _class; + TQString _quality; unsigned int _defaultFontSize; /* Pictures tab */ bool _convertPictures; - QString _picturesDir; + TQString _picturesDir; /* Language tab */ //bool _useUnicode; //bool _useLatin1; - QString _encoding; - QStringList _languagesList; - QString _defaultLanguage; + TQString _encoding; + TQStringList _languagesList; + TQString _defaultLanguage; int _tabSize; /* Size of the para indentation. */ int _tabulation; /* Total size of the indentation. */ @@ -77,18 +77,18 @@ class Config */ bool isKwordStyleUsed() const { return (_useLatexStyle == false); } bool isEmbeded() const { return _isEmbeded; } - QString getClass() const { return _class; } - QString getQuality() const { return _quality; } + TQString getClass() const { return _class; } + TQString getQuality() const { return _quality; } unsigned int getDefaultFontSize() const { return _defaultFontSize; } bool convertPictures() const { return _convertPictures; } - QString getPicturesDir() const { return _picturesDir; } + TQString getPicturesDir() const { return _picturesDir; } - bool mustUseUnicode() const { return (_encoding == "unicode"); } - bool mustUseLatin1() const { return (_encoding != "unicode"); } - QString getEncoding() const { return _encoding; } - QStringList getLanguagesList() const { return _languagesList; } - QString getDefaultLanguage() const { return _defaultLanguage; } + bool mustUseUnicode() const { return (_encoding == "tqunicode"); } + bool mustUseLatin1() const { return (_encoding != "tqunicode"); } + TQString getEncoding() const { return _encoding; } + TQStringList getLanguagesList() const { return _languagesList; } + TQString getDefaultLanguage() const { return _defaultLanguage; } int getTabSize() const { return _tabSize; } int getIndentation() const { return _tabulation; } @@ -110,16 +110,16 @@ class Config void setEmbeded(bool emb) { _isEmbeded = emb; } /** The class can be article, book, letter, report or slides. It's the type of the * latex document. */ - void setClass(const QString &lclass) { _class = lclass; } - void setQuality(const QString &quality) { _quality = quality; } + void setClass(const TQString &lclass) { _class = lclass; } + void setQuality(const TQString &quality) { _quality = quality; } void setDefaultFontSize(int size) { _defaultFontSize = size; } void convertPictures(bool state) { _convertPictures = state; } - void setPicturesDir(const QString &dir) { _picturesDir = dir; } + void setPicturesDir(const TQString &dir) { _picturesDir = dir; } - void setEncoding(const QString &enc) { _encoding = enc; } - void addLanguage( const QString &l) { _languagesList.append(l); } - void setDefaultLanguage(const QString &l) { _defaultLanguage = l; } + void setEncoding(const TQString &enc) { _encoding = enc; } + void addLanguage( const TQString &l) { _languagesList.append(l); } + void setDefaultLanguage(const TQString &l) { _defaultLanguage = l; } void setIndentation(int indent) { _tabulation = indent; } @@ -127,7 +127,7 @@ class Config void indent(); void desindent(); - void writeIndent(QTextStream& out); + void writeIndent(TQTextStream& out); protected: /** diff --git a/filters/kspread/latex/export/document.cc b/filters/kspread/latex/export/document.cc index a992af2b..45cdbb73 100644 --- a/filters/kspread/latex/export/document.cc +++ b/filters/kspread/latex/export/document.cc @@ -25,7 +25,7 @@ #include "document.h" -Document::Document(const KoStore* in, QString fileOut): +Document::Document(const KoStore* in, TQString fileOut): XmlParser(in), _file(fileOut), _in( in ) { //kdDebug(30522) << fileIn.latin1() << endl; @@ -44,7 +44,7 @@ Document::~Document() void Document::analyse() { - QDomNode balise; + TQDomNode balise; balise = init(); kdDebug(30522) << "ANALYSE A DOC" << endl; _document.analyse(balise); @@ -56,7 +56,7 @@ void Document::generate() if(_file.open(IO_WriteOnly)) { kdDebug(30522) << "GENERATION" << endl; - _out.setDevice(&_file); + _out.setDevice(TQT_TQIODEVICE(&_file)); _document.generate(_out, !isEmbeded()); //_out << getDocument(); _file.close(); diff --git a/filters/kspread/latex/export/document.h b/filters/kspread/latex/export/document.h index cbe53087..b8f0296c 100644 --- a/filters/kspread/latex/export/document.h +++ b/filters/kspread/latex/export/document.h @@ -23,9 +23,9 @@ #ifndef __KSPREAD_LATEX_DOCUMENT_H__ #define __KSPREAD_LATEX_DOCUMENT_H__ -#include <qfile.h> /* for QFile class */ -#include <qtextstream.h> /* for QTextStream class */ -#include <qstring.h> /* for QString class */ +#include <tqfile.h> /* for TQFile class */ +#include <tqtextstream.h> /* for TQTextStream class */ +#include <tqstring.h> /* for TQString class */ #include "xmlparser.h" #include "config.h" @@ -33,9 +33,9 @@ class Document : public XmlParser, Config { - QFile _file; - QTextStream _out; - QString _filename; + TQFile _file; + TQTextStream _out; + TQString _filename; const KoStore* _in; //FileHeader _header; @@ -49,7 +49,7 @@ class Document : public XmlParser, Config * @param in tar file. * @param fileOut Output latex filename. */ - Document(const KoStore* in, QString fileOut); + Document(const KoStore* in, TQString fileOut); virtual ~Document(); diff --git a/filters/kspread/latex/export/fileheader.cc b/filters/kspread/latex/export/fileheader.cc index 57d30fed..8ee9eee0 100644 --- a/filters/kspread/latex/export/fileheader.cc +++ b/filters/kspread/latex/export/fileheader.cc @@ -56,7 +56,7 @@ FileHeader::~FileHeader() /*******************************************/ /* AnalysePaperParam */ /*******************************************/ -void FileHeader::analysePaperParam(const QDomNode balise) +void FileHeader::analysePaperParam(const TQDomNode balise) { setFormat(getAttr(balise, "format").toInt()); _width = getAttr(balise, "width").toInt(); @@ -74,13 +74,13 @@ void FileHeader::analysePaperParam(const QDomNode balise) /*******************************************/ /* AnalysePaper */ /*******************************************/ -void FileHeader::analysePaper(const QDomNode balise) +void FileHeader::analysePaper(const TQDomNode balise) { analysePaperParam(balise); //setTokenCurrent(balise_initiale->pContent); - // Analyse children markups --> PAPERBORDERS - QDomNode fils = getChild(balise, "PAPERSBORDERS"); + // Analyse tqchildren markups --> PAPERBORDERS + TQDomNode fils = getChild(balise, "PAPERSBORDERS"); _leftBorder = getAttr(fils, "left").toInt(); _rightBorder = getAttr(fils, "right").toInt(); _bottomBorder = getAttr(fils, "bottom").toInt(); @@ -90,7 +90,7 @@ void FileHeader::analysePaper(const QDomNode balise) /*******************************************/ /* AnalyseAttributs */ /*******************************************/ -void FileHeader::analyseAttributs(const QDomNode balise) +void FileHeader::analyseAttributs(const TQDomNode balise) { setProcessing(getAttr(balise, "processing").toInt()); setStandardPge(getAttr(balise, "standardpage").toInt()); @@ -103,7 +103,7 @@ void FileHeader::analyseAttributs(const QDomNode balise) /*******************************************/ /* Generate */ /*******************************************/ -void FileHeader::generate(QTextStream &out) +void FileHeader::generate(TQTextStream &out) { kdDebug(30522) << "GENERATION OF THE FILE HEADER" << endl; if(Config::instance()->mustUseLatin1()) @@ -120,9 +120,9 @@ void FileHeader::generate(QTextStream &out) /*******************************************/ /* GeneratePaper */ /*******************************************/ -void FileHeader::generatePaper(QTextStream &out) +void FileHeader::generatePaper(TQTextStream &out) { - QString unit; + TQString unit; out << "% Format of paper" << endl; kdDebug(30522) << "Generate custom size paper" << endl; @@ -141,7 +141,7 @@ void FileHeader::generatePaper(QTextStream &out) /*******************************************/ /* GenerateLatinPreambule */ /*******************************************/ -void FileHeader::generateLatinPreambule(QTextStream &out) +void FileHeader::generateLatinPreambule(TQTextStream &out) { out << "%% Generated by KSpread. Don't modify this file but the file *.ksp." << endl; out << "%% Send an email to rjacolin@ifrance.com for bugs, wishes, .... Thank you." << endl; @@ -207,7 +207,7 @@ void FileHeader::generateLatinPreambule(QTextStream &out) /*******************************************/ /* GenerateUnicodePreambule */ /*******************************************/ -void FileHeader::generateUnicodePreambule(QTextStream &out) +void FileHeader::generateUnicodePreambule(TQTextStream &out) { out << "%% Generated by KSpread. Don't modify this file but the file *.ksp." << endl; out << "%% Send an email to rjacolin@ifrance.com for bugs, wishes, .... Thank you." << endl; @@ -276,13 +276,13 @@ void FileHeader::generateUnicodePreambule(QTextStream &out) /*******************************************/ /* GeneratePackage */ /*******************************************/ -void FileHeader::generatePackage(QTextStream &out) +void FileHeader::generatePackage(TQTextStream &out) { out << "% Package(s) to include" << endl; if(Config::instance()->mustUseUnicode()) out << "\\usepackage{omega}" << endl; if(getFormat() == TF_A4) - out << "\\usepackage[a4paper]{geometry}" << endl; + out << "\\usepackage[a4paper]{tqgeometry}" << endl; if(hasFooter() || hasHeader()) out << "\\usepackage{fancyhdr}" << endl; if(hasColor()) @@ -298,7 +298,7 @@ void FileHeader::generatePackage(QTextStream &out) out << "\\usepackage{textcomp}" << endl; out << "\\usepackage{rotating}" << endl; out << endl; - QStringList langs = Config::instance()->getLanguagesList(); + TQStringList langs = Config::instance()->getLanguagesList(); if(langs.count() > 0) { out << "\\usepackage[" << langs.join( ", " ) << "]{babel}" << endl; diff --git a/filters/kspread/latex/export/fileheader.h b/filters/kspread/latex/export/fileheader.h index e5f5b51a..5c4e7774 100644 --- a/filters/kspread/latex/export/fileheader.h +++ b/filters/kspread/latex/export/fileheader.h @@ -22,7 +22,7 @@ #ifndef __KSPREAD_LATEX_FILEHEADER_H__ #define __KSPREAD_LATEX_FILEHEADER_H__ -#include <qtextstream.h> +#include <tqtextstream.h> #include "xmlparser.h" @@ -134,10 +134,10 @@ class FileHeader: public XmlParser void useGraphics () { _hasGraphics = true; } void useTable () { _hasTable = true; } - void analysePaper (const QDomNode); - void analyseAttributs (const QDomNode); + void analysePaper (const TQDomNode); + void analyseAttributs (const TQDomNode); - void generate (QTextStream &); + void generate (TQTextStream &); protected: /** @@ -149,12 +149,12 @@ class FileHeader: public XmlParser private: - void analysePaperParam(const QDomNode); + void analysePaperParam(const TQDomNode); - void generatePaper (QTextStream&); - void generateLatinPreambule(QTextStream&); - void generateUnicodePreambule(QTextStream&); - void generatePackage (QTextStream&); + void generatePaper (TQTextStream&); + void generateLatinPreambule(TQTextStream&); + void generateUnicodePreambule(TQTextStream&); + void generatePackage (TQTextStream&); }; diff --git a/filters/kspread/latex/export/format.cc b/filters/kspread/latex/export/format.cc index 473c63b4..96f2ad08 100644 --- a/filters/kspread/latex/export/format.cc +++ b/filters/kspread/latex/export/format.cc @@ -80,7 +80,7 @@ bool Format::hasRightBorder() const } /* Get the set of info. about a text format */ -void Format::analyse(const QDomNode balise) +void Format::analyse(const TQDomNode balise) { /* <format brushstyle="5" brushcolor="#a70bc3" bgcolor="#ffffff" alignY="2" align="4" > */ if( !getAttr(balise, "brushstyle").isEmpty() ) @@ -125,7 +125,7 @@ void Format::analyse(const QDomNode balise) } } -void Format::analysePen(const QDomNode balise) +void Format::analysePen(const TQDomNode balise) { /* <pen width="0" style="1" color="#000000" /> */ _isValidFormat = true; @@ -134,7 +134,7 @@ void Format::analysePen(const QDomNode balise) setPenColor(getAttr(balise, "color")); } -void Format::analyseFont(const QDomNode balise) +void Format::analyseFont(const TQDomNode balise) { /* <font size="18" family="Helvetica" weight="50" /> */ setFontSize(getAttr(balise, "size").toInt()); @@ -142,7 +142,7 @@ void Format::analyseFont(const QDomNode balise) setFontWeight(getAttr(balise, "weight").toInt()); } -void Format::generate(QTextStream& out, Column* col, Row* row) +void Format::generate(TQTextStream& out, Column* col, Row* row) { if(hasLeftBorder()) out << "|"; @@ -176,7 +176,7 @@ void Format::generate(QTextStream& out, Column* col, Row* row) out << "|"; } -void Format::generateTextFormat(QTextStream& out, QString text) +void Format::generateTextFormat(TQTextStream& out, TQString text) { if(getPenStyle() > 0) { @@ -189,7 +189,7 @@ void Format::generateTextFormat(QTextStream& out, QString text) } } -void Format::generateColor(QTextStream& out) +void Format::generateColor(TQTextStream& out) { if(getBrushStyle() >= 1) { diff --git a/filters/kspread/latex/export/format.h b/filters/kspread/latex/export/format.h index 5eb94eef..c0ab61aa 100644 --- a/filters/kspread/latex/export/format.h +++ b/filters/kspread/latex/export/format.h @@ -23,9 +23,9 @@ #ifndef __KSPREAD_LATEX_FORMAT_H__ #define __KSPREAD_LATEX_FORMAT_H__ -#include <qtextstream.h> -#include <qstring.h> -#include <qcolor.h> +#include <tqtextstream.h> +#include <tqstring.h> +#include <tqcolor.h> #include "xmlparser.h" #include "pen.h" @@ -43,11 +43,11 @@ class Format: public XmlParser { long _align; long _alignY; - QColor _bgColor; + TQColor _bgColor; long _multirow; bool _verticalText; double _angle; - QColor _brushColor; + TQColor _brushColor; int _brushStyle; int _indent; bool _dontprinttext; @@ -55,11 +55,11 @@ class Format: public XmlParser /* pen */ double _penWidth; int _penStyle; - QColor _penColor; + TQColor _penColor; /* font */ int _size; - QString _family; + TQString _family; int _weight; /* borders */ @@ -77,7 +77,7 @@ class Format: public XmlParser * * Creates a new instance of Format. * - * @param Para the parent class of the format. + * @param Para the tqparent class of the format. */ Format(); @@ -94,10 +94,10 @@ class Format: public XmlParser long getMultirow() const { return _multirow; } long getAlign() const { return _align; } long getAlignY() const { return _alignY; } - QColor getBgColor() const { return _bgColor; } + TQColor getBgColor() const { return _bgColor; } bool getVerticalText() const { return _verticalText; } double getAngle() const { return _angle; } - QColor getBrushColor() const { return _brushColor; } + TQColor getBrushColor() const { return _brushColor; } int getBrushStyle() const { return _brushStyle; } int getIndent() const { return _indent; } bool getDontPrintText() const { return _dontprinttext; } @@ -115,11 +115,11 @@ class Format: public XmlParser /* pen */ double getPenWidth() const { return _penWidth; } int getPenStyle() const { return _penStyle; } - QColor getPenColor() const { return _penColor; } + TQColor getPenColor() const { return _penColor; } /* font */ int getFontSize() const { return _size; } - QString getFontFamily() const { return _family; } + TQString getFontFamily() const { return _family; } int getFontWeight() const { return _weight; } bool isValidFormat() const { return _isValidFormat; } @@ -128,11 +128,11 @@ class Format: public XmlParser */ void setAlign(long a) { _align = a; } void setAlignY(long a) { _alignY = a; } - void setBgColor(QColor b) { _bgColor = b; } + void setBgColor(TQColor b) { _bgColor = b; } void setMultirow(long mr) { _multirow = mr; } void setVerticalText(bool vt) { _verticalText = vt; } void setAngle(double a) { _angle = a; } - void setBrushColor(QString bc) { _brushColor.setNamedColor(bc); } + void setBrushColor(TQString bc) { _brushColor.setNamedColor(bc); } void setBrushStyle(int bs) { _brushStyle = bs; } void setIndent(int indent) { _indent = indent; } void setDontPrintText(bool dpt) { _dontprinttext = dpt; } @@ -140,11 +140,11 @@ class Format: public XmlParser /* pen */ void setPenWidth(double pw) { _penWidth = pw; } void setPenStyle(int ps) { _penStyle = ps; } - void setPenColor(QString pc) { _penColor.setNamedColor(pc); } + void setPenColor(TQString pc) { _penColor.setNamedColor(pc); } /* font */ void setFontSize(int s) { _size = s; } - void setFontFamily(QString f) { _family = f; } + void setFontFamily(TQString f) { _family = f; } void setFontWeight(int w) { _weight = w; } /** @@ -154,9 +154,9 @@ class Format: public XmlParser /** * Get informations from a markup tree (only param of a format). */ - virtual void analyse(const QDomNode); - virtual void analysePen(const QDomNode); - virtual void analyseFont(const QDomNode); + virtual void analyse(const TQDomNode); + virtual void analysePen(const TQDomNode); + virtual void analyseFont(const TQDomNode); /** * Generate the cell format inherited from the row or the colum format or @@ -166,12 +166,12 @@ class Format: public XmlParser * @param col The column of this cell. * @param row The row of this cell. */ - void generate(QTextStream& out, Column* col = NULL, Row* row = NULL); + void generate(TQTextStream& out, Column* col = NULL, Row* row = NULL); /** * Generate the text cell format (color and font). */ - void generateTextFormat(QTextStream& out, QString text); + void generateTextFormat(TQTextStream& out, TQString text); /** * Generate the color format for a column or a row. @@ -180,7 +180,7 @@ class Format: public XmlParser * * @param out The output stream */ - void generateColor(QTextStream& out); + void generateColor(TQTextStream& out); }; #endif /* __KSPREAD_LATEX_FORMAT_H__ */ diff --git a/filters/kspread/latex/export/formula.cc b/filters/kspread/latex/export/formula.cc index 15a0af93..98af4251 100644 --- a/filters/kspread/latex/export/formula.cc +++ b/filters/kspread/latex/export/formula.cc @@ -21,8 +21,8 @@ #include <stdlib.h> /* for atoi function */ #include <kdebug.h> /* for kdDebug() stream */ -#include <qptrstack.h> /* for getFormula() */ -#include <qdom.h> +#include <tqptrstack.h> /* for getFormula() */ +#include <tqdom.h> #include "formula.h" #include <kapplication.h> @@ -48,7 +48,7 @@ Formula::Formula() /*******************************************/ /* analyse */ /*******************************************/ -void Formula::analyse(const QDomNode balise) +void Formula::analyse(const TQDomNode balise) { /* MARKUP TYPE : FRAMESET INFO = TEXTE, ENTETE CONNUE */ @@ -80,14 +80,14 @@ void Formula::analyse(const QDomNode balise) /*******************************************/ /* Get back the xml markup tree. */ /*******************************************/ -void Formula::getFormula(QDomNode p, int indent) +void Formula::getFormula(TQDomNode p, int indent) { /* while( p.) {*/ switch( p.nodeType() ) { - case QDomNode::TextNode: - _formula = _formula + QString(p.toText().data()) + " "; + case TQDomNode::TextNode: + _formula = _formula + TQString(p.toText().data()) + " "; break; /* case TT_Space: _formula = _formula + p->zText; @@ -97,9 +97,9 @@ void Formula::getFormula(QDomNode p, int indent) _formula = _formula + "\n"; //printf("%*s\n", indent, ""); break;*/ - case QDomNode::ElementNode: + case TQDomNode::ElementNode: _formula = _formula + "<" + p.nodeName(); - QDomNamedNodeMap attr = p.attributes(); + TQDomNamedNodeMap attr = p.attributes(); for(unsigned int index = 0; index < attr.length(); index++) { // The attributes _formula = _formula + " " + attr.item(index).nodeName(); @@ -110,7 +110,7 @@ void Formula::getFormula(QDomNode p, int indent) else { _formula = _formula + ">\n"; - QDomNodeList child = p.childNodes(); + TQDomNodeList child = p.childNodes(); for(unsigned int index = 0; index < child.length(); index++) { getFormula(child.item(index), indent+3); // The child elements @@ -129,7 +129,7 @@ void Formula::getFormula(QDomNode p, int indent) /*******************************************/ /* analyseParamFrame */ /*******************************************/ -void Formula::analyseParamFrame(const QDomNode balise) +void Formula::analyseParamFrame(const TQDomNode balise) { /*<FRAME left="28" top="42" right="566" bottom="798" runaround="1" />*/ @@ -147,10 +147,10 @@ void Formula::analyseParamFrame(const QDomNode balise) /*******************************************/ /* generate */ /*******************************************/ -void Formula::generate(QTextStream &out) +void Formula::generate(TQTextStream &out) { kdDebug(30522) << "FORMULA GENERATION" << endl; - QDomDocument doc; + TQDomDocument doc; doc.setContent(_formula); // a new KFormula::Document for every formula is not the best idea. diff --git a/filters/kspread/latex/export/formula.h b/filters/kspread/latex/export/formula.h index bc6dcfed..03ba4bd6 100644 --- a/filters/kspread/latex/export/formula.h +++ b/filters/kspread/latex/export/formula.h @@ -24,8 +24,8 @@ #define __KWORD_LATEXFORMULA__ #include "element.h" -#include <qstring.h> -#include <qtextstream.h> +#include <tqstring.h> +#include <tqtextstream.h> /***********************************************************************/ /* Class: Formula */ @@ -49,7 +49,7 @@ class Formula: public Element TSide _sheetSide; /* CHILDREN MARKUPS */ - QString _formula; + TQString _formula; public: /** @@ -78,7 +78,7 @@ class Formula: public Element TNFrame getNewFrame () const { return _newFrameBehaviour; } TSide getSheetSide () const { return _sheetSide; } - void getFormula(QDomNode, int); + void getFormula(TQDomNode, int); /** * Modifiers @@ -95,17 +95,17 @@ class Formula: public Element /** * Get informations from a markup tree and put the formula - * in a QString. + * in a TQString. */ - void analyse(const QDomNode); + void analyse(const TQDomNode); /** * Write the formula in a file. */ - void generate(QTextStream&); + void generate(TQTextStream&); private: - void analyseParamFrame(const QDomNode); + void analyseParamFrame(const TQDomNode); }; #endif /* __KWORD_LATEXFORMULA_H__ */ diff --git a/filters/kspread/latex/export/kspreadlatexexportdiaImpl.cc b/filters/kspread/latex/export/kspreadlatexexportdiaImpl.cc index 050c86ba..479bb547 100644 --- a/filters/kspread/latex/export/kspreadlatexexportdiaImpl.cc +++ b/filters/kspread/latex/export/kspreadlatexexportdiaImpl.cc @@ -20,11 +20,11 @@ #include <kspreadlatexexportdiaImpl.h> -#include <qdir.h> -#include <qcombobox.h> -#include <qbuttongroup.h> -#include <qradiobutton.h> -#include <qcheckbox.h> +#include <tqdir.h> +#include <tqcombobox.h> +#include <tqbuttongroup.h> +#include <tqradiobutton.h> +#include <tqcheckbox.h> #include <kapplication.h> #include <kglobal.h> @@ -49,15 +49,15 @@ #endif*/ /* - * Constructs a KSpreadLatexExportDiaImpl which is a child of 'parent', with the + * Constructs a KSpreadLatexExportDiaImpl which is a child of 'tqparent', with the * name 'name' and widget flags set to 'f'. * * The dialog will by default be modeless, unless you set 'modal' to * TRUE to construct a modal dialog. */ -KSpreadLatexExportDiaImpl::KSpreadLatexExportDiaImpl(KoStore* in, QWidget* parent, +KSpreadLatexExportDiaImpl::KSpreadLatexExportDiaImpl(KoStore* in, TQWidget* tqparent, const char* name_, bool modal, WFlags fl ) - : LatexExportDia( parent, name_, modal, fl ), _in( in ) + : LatexExportDia( tqparent, name_, modal, fl ), _in( in ) { int i = 0; @@ -66,10 +66,10 @@ KSpreadLatexExportDiaImpl::KSpreadLatexExportDiaImpl(KoStore* in, QWidget* paren /* Recent files */ _config = new KConfig("kspreadlatexexportdialog"); _config->setGroup( "KSpread latex export filter" ); - QString value; + TQString value; while(i < 10) { - /*value = _config->readPathEntry( QString("Recent%1").arg(i) ); + /*value = _config->readPathEntry( TQString("Recent%1").tqarg(i) ); kdDebug(30522) << "recent : " << value << endl; if(!value.isEmpty()) { @@ -99,7 +99,7 @@ KSpreadLatexExportDiaImpl::KSpreadLatexExportDiaImpl(KoStore* in, QWidget* paren classComboBox->insertItem("report"); classComboBox->insertItem("slides"); - encodingComboBox->insertItem("unicode"); + encodingComboBox->insertItem("tqunicode"); encodingComboBox->insertItem("ansinew"); encodingComboBox->insertItem("applemac"); encodingComboBox->insertItem("ascii"); @@ -166,7 +166,7 @@ KSpreadLatexExportDiaImpl::~KSpreadLatexExportDiaImpl() void KSpreadLatexExportDiaImpl::reject() { kdDebug(30522) << "Export cancelled" << endl; - QDialog::reject(); + TQDialog::reject(); } /** @@ -230,7 +230,7 @@ void KSpreadLatexExportDiaImpl::accept() void KSpreadLatexExportDiaImpl::addLanguage() { kdDebug(30522) << "add a new language supported" << languagesList->currentText() << endl; - QString text = languagesList->currentText(); + TQString text = languagesList->currentText(); languagesList->removeItem(languagesList->currentItem()); langUsedList->insertItem(text); } @@ -238,7 +238,7 @@ void KSpreadLatexExportDiaImpl::addLanguage() void KSpreadLatexExportDiaImpl::removeLanguage() { kdDebug(30522) << "remove a lanugage" << langUsedList->currentText() << endl; - QString text = langUsedList->currentText(); + TQString text = langUsedList->currentText(); langUsedList->removeItem(langUsedList->currentItem()); languagesList->insertItem(text); } diff --git a/filters/kspread/latex/export/kspreadlatexexportdiaImpl.h b/filters/kspread/latex/export/kspreadlatexexportdiaImpl.h index 4073c2ca..33bb6222 100644 --- a/filters/kspread/latex/export/kspreadlatexexportdiaImpl.h +++ b/filters/kspread/latex/export/kspreadlatexexportdiaImpl.h @@ -21,7 +21,7 @@ #define __KSPREADLATEXEXPORTDIA_H__ #include <latexexportdia.h> -#include <qstringlist.h> +#include <tqstringlist.h> #include <kurl.h> #include "latexexportIface.h" @@ -32,19 +32,20 @@ class KConfig; class KSpreadLatexExportDiaImpl : public LatexExportDia { Q_OBJECT + TQ_OBJECT private: - QString _fileOut; + TQString _fileOut; KoStore* _in; KConfig* _config; LatexExportIface* _iface; public: - KSpreadLatexExportDiaImpl( KoStore*, QWidget* parent = 0, + KSpreadLatexExportDiaImpl( KoStore*, TQWidget* tqparent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); virtual ~KSpreadLatexExportDiaImpl(); - void setOutputFile(QString file) { _fileOut = file; } + void setOutputFile(TQString file) { _fileOut = file; } public slots: virtual void reject(); diff --git a/filters/kspread/latex/export/latexexport.cc b/filters/kspread/latex/export/latexexport.cc index 37fb56d9..66927728 100644 --- a/filters/kspread/latex/export/latexexport.cc +++ b/filters/kspread/latex/export/latexexport.cc @@ -24,20 +24,20 @@ #include <kgenericfactory.h> #include <kglobal.h> #include <klocale.h> -#include <qtextcodec.h> +#include <tqtextcodec.h> #include "kspreadlatexexportdiaImpl.h" typedef KGenericFactory<LATEXExport, KoFilter> LATEXExportFactory; K_EXPORT_COMPONENT_FACTORY( libkspreadlatexexport, LATEXExportFactory( "kofficefilters" ) ) -LATEXExport::LATEXExport(KoFilter *, const char *, const QStringList&) : +LATEXExport::LATEXExport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } -KoFilter::ConversionStatus LATEXExport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus LATEXExport::convert( const TQCString& from, const TQCString& to ) { - QString config; + TQString config; if(to != "text/x-tex" || from != "application/x-kspread") return KoFilter::NotImplemented; diff --git a/filters/kspread/latex/export/latexexport.h b/filters/kspread/latex/export/latexexport.h index 3b743000..5812d316 100644 --- a/filters/kspread/latex/export/latexexport.h +++ b/filters/kspread/latex/export/latexexport.h @@ -20,10 +20,10 @@ #ifndef __LATEXEXPORT_H__ #define __LATEXEXPORT_H__ -#include <qstring.h> -#include <qtextstream.h> -#include <qfile.h> -#include <qobject.h> +#include <tqstring.h> +#include <tqtextstream.h> +#include <tqfile.h> +#include <tqobject.h> #include <KoFilter.h> #include <KoStore.h> @@ -32,12 +32,13 @@ class LATEXExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - LATEXExport(KoFilter *parent, const char *name, const QStringList&); + LATEXExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~LATEXExport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; #endif /* __LATEXExport_H__ */ diff --git a/filters/kspread/latex/export/latexexportIface.cc b/filters/kspread/latex/export/latexexportIface.cc index f99e6745..80ca013d 100644 --- a/filters/kspread/latex/export/latexexportIface.cc +++ b/filters/kspread/latex/export/latexexportIface.cc @@ -22,7 +22,7 @@ #include "kspreadlatexexportdiaImpl.h" /* - * Constructs a KWordLatexExportDia which is a child of 'parent', with the + * Constructs a KWordLatexExportDia which is a child of 'tqparent', with the * name 'name' and widget flags set to 'f'. * * The dialog will by default be modeless, unless you set 'modal' to diff --git a/filters/kspread/latex/export/latexexportdia.ui b/filters/kspread/latex/export/latexexportdia.ui index 3e62df55..677329da 100644 --- a/filters/kspread/latex/export/latexexportdia.ui +++ b/filters/kspread/latex/export/latexexportdia.ui @@ -2,7 +2,7 @@ <class>LatexExportDia</class> <comment>This dialog box is used for all latex filter in koffice.</comment> <author>Robert Jacolin <rjacolin@ifrance.com></author> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>LatexExportDia</cstring> </property> @@ -30,14 +30,14 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QTabWidget" row="0" column="1"> + <widget class="TQTabWidget" row="0" column="1"> <property name="name"> <cstring>_tab</cstring> </property> <property name="enabled"> <bool>true</bool> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>Widget2</cstring> </property> @@ -66,7 +66,7 @@ <number>1000</number> </property> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>styleGroup</cstring> </property> @@ -81,7 +81,7 @@ <property name="title"> <string>Document Style</string> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>kwordStyleButton</cstring> </property> @@ -100,7 +100,7 @@ <bool>true</bool> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>latexStyleButton</cstring> </property> @@ -117,7 +117,7 @@ </property> </widget> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>typeGroup</cstring> </property> @@ -132,7 +132,7 @@ <property name="title"> <string>Document Type</string> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>fullDocButton</cstring> </property> @@ -157,7 +157,7 @@ <string>The document will be generated as a full latex document since all the include will be generated before the \begin[document} and \end{document} commands.</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>embededButton</cstring> </property> @@ -180,7 +180,7 @@ </property> </widget> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel1_2</cstring> </property> @@ -196,7 +196,7 @@ <string>Document class:</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel2</cstring> </property> @@ -212,7 +212,7 @@ <string>Quality:</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>defaultFontSizeTextZone</cstring> </property> @@ -228,7 +228,7 @@ <string>Default font size:</string> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <property name="name"> <cstring>classComboBox</cstring> </property> @@ -265,7 +265,7 @@ </property> </widget> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>Widget3</cstring> </property> @@ -288,7 +288,7 @@ <string>This directory will contains the eps pictures of your document.</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>pictureCheckBox</cstring> </property> @@ -307,7 +307,7 @@ <bool>true</bool> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel1</cstring> </property> @@ -324,14 +324,14 @@ </property> </widget> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> <attribute name="title"> <string>Language</string> </attribute> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>ButtonGroup3</cstring> </property> @@ -360,7 +360,7 @@ </property> </widget> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>GroupBox4</cstring> </property> @@ -378,7 +378,7 @@ <property name="title"> <string>Language</string> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>rmLanguageBtn</cstring> </property> @@ -394,7 +394,7 @@ <string>Remove</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>addLanguageBtn</cstring> </property> @@ -438,14 +438,14 @@ </widget> </widget> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> <attribute name="title"> <string>Contents</string> </attribute> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>exportAuthor</cstring> </property> @@ -467,7 +467,7 @@ <bool>false</bool> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>tableContents</cstring> </property> @@ -486,7 +486,7 @@ <string>Add a table of content</string> </property> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>note</cstring> </property> @@ -504,7 +504,7 @@ <property name="title"> <string>Notes</string> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>RadioButton7</cstring> </property> @@ -520,7 +520,7 @@ <string>Don't export</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>RadioButton6</cstring> </property> @@ -536,7 +536,7 @@ <string>Export notes in comments</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>RadioButton5</cstring> </property> @@ -555,7 +555,7 @@ </widget> </widget> </widget> - <widget class="QLayoutWidget" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="1" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>Layout1</cstring> </property> @@ -569,7 +569,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonHelp</cstring> </property> @@ -593,14 +593,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>0</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonOk</cstring> </property> @@ -614,7 +614,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonCancel</cstring> </property> @@ -655,11 +655,11 @@ <slot>removeLanguage()</slot> </connection> </connections> -<slots> +<Q_SLOTS> <slot>addLanguage()</slot> <slot>removeLanguage()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>knuminput.h</includehint> <includehint>knuminput.h</includehint> diff --git a/filters/kspread/latex/export/map.cc b/filters/kspread/latex/export/map.cc index d0252d85..a2256d5e 100644 --- a/filters/kspread/latex/export/map.cc +++ b/filters/kspread/latex/export/map.cc @@ -41,12 +41,12 @@ Map::~Map() /*******************************************/ /* Analyse */ /*******************************************/ -void Map::analyse(const QDomNode balise) +void Map::analyse(const TQDomNode balise) { /* Analyse of the parameters */ kdDebug(30522) << "ANALYSE A MAP" << endl; - /* Analyse of the children markups */ + /* Analyse of the tqchildren markups */ for(int index = 0; index < getNbChild(balise); index++) { // Only tables @@ -63,11 +63,11 @@ void Map::analyse(const QDomNode balise) /* Generate each text zone with the parag. */ /* markup. */ /*******************************************/ -void Map::generate(QTextStream &out) +void Map::generate(TQTextStream &out) { Table *table = NULL; kdDebug(30522) << " MAP GENERATION" << endl; - QPtrListIterator<Table> it(_tables); + TQPtrListIterator<Table> it(_tables); while ( (table = it.current()) != 0 ) { ++it; diff --git a/filters/kspread/latex/export/map.h b/filters/kspread/latex/export/map.h index 5f6a38c0..a342bb24 100644 --- a/filters/kspread/latex/export/map.h +++ b/filters/kspread/latex/export/map.h @@ -22,9 +22,9 @@ #ifndef __KSPREAD_LATEX_MAP_H__ #define __KSPREAD_LATEX_MAP_H__ -#include <qstring.h> -#include <qptrstack.h> /* historic list */ -#include <qptrlist.h> /* for list of format */ +#include <tqstring.h> +#include <tqptrstack.h> /* historic list */ +#include <tqptrlist.h> /* for list of format */ #include "xmlparser.h" #include "config.h" @@ -41,7 +41,7 @@ */ class Map: public XmlParser, Config { - QPtrList<Table> _tables; + TQPtrList<Table> _tables; public: /** @@ -75,12 +75,12 @@ class Map: public XmlParser, Config /** * Get informations from a markup tree. */ - void analyse (const QDomNode); + void analyse (const TQDomNode); /** * Write the paragraph in a file. */ - void generate (QTextStream&); + void generate (TQTextStream&); private: diff --git a/filters/kspread/latex/export/pen.cc b/filters/kspread/latex/export/pen.cc index e005c31c..03a87bd8 100644 --- a/filters/kspread/latex/export/pen.cc +++ b/filters/kspread/latex/export/pen.cc @@ -31,7 +31,7 @@ Pen::Pen() } /* Get the set of info. about a text format */ -void Pen::analyse(const QDomNode balise) +void Pen::analyse(const TQDomNode balise) { /* <pen width="0" style="1" color="#000000" /> */ setWidth(getAttr(balise, "width").toDouble()); @@ -39,7 +39,7 @@ void Pen::analyse(const QDomNode balise) setColor(getAttr(balise, "color")); } -void Pen::generate(QTextStream&) +void Pen::generate(TQTextStream&) { } diff --git a/filters/kspread/latex/export/pen.h b/filters/kspread/latex/export/pen.h index d1fa8de6..49da17e0 100644 --- a/filters/kspread/latex/export/pen.h +++ b/filters/kspread/latex/export/pen.h @@ -23,9 +23,9 @@ #ifndef __KSPREAD_LATEX_PEN_H__ #define __KSPREAD_LATEX_PEN_H__ -#include <qtextstream.h> -#include <qstring.h> -#include <qcolor.h> +#include <tqtextstream.h> +#include <tqstring.h> +#include <tqcolor.h> #include "xmlparser.h" /***********************************************************************/ @@ -39,7 +39,7 @@ class Pen: public XmlParser { double _width; int _style; - QColor _color; + TQColor _color; public: /** @@ -61,14 +61,14 @@ class Pen: public XmlParser */ double getWidth() const { return _width; } int getStyle() const { return _style; } - QColor getColor() const { return _color; } + TQColor getColor() const { return _color; } /** * setters */ void setWidth(double w) { _width = w; } void setStyle(int s) { _style = s; } - void setColor(QString color) { _color.setNamedColor(color); } + void setColor(TQString color) { _color.setNamedColor(color); } /** * Helpfull functions @@ -77,9 +77,9 @@ class Pen: public XmlParser /** * Get informations from a markup tree (only param of a format). */ - virtual void analyse(const QDomNode); + virtual void analyse(const TQDomNode); - virtual void generate(QTextStream&); + virtual void generate(TQTextStream&); }; diff --git a/filters/kspread/latex/export/row.cc b/filters/kspread/latex/export/row.cc index 2ee05ac0..3aaaaaba 100644 --- a/filters/kspread/latex/export/row.cc +++ b/filters/kspread/latex/export/row.cc @@ -38,7 +38,7 @@ Row::~Row() { } -void Row::analyse(const QDomNode balise) +void Row::analyse(const TQDomNode balise) { _row = getAttr(balise, "row").toLong(); _height = getAttr(balise, "height").toDouble(); @@ -48,7 +48,7 @@ void Row::analyse(const QDomNode balise) /*******************************************/ /* generate */ /*******************************************/ -void Row::generate(QTextStream& out) +void Row::generate(TQTextStream& out) { //generateTopBorder(out); if(getBrushStyle() >= 1) diff --git a/filters/kspread/latex/export/row.h b/filters/kspread/latex/export/row.h index 1d6bf28e..bd183f0c 100644 --- a/filters/kspread/latex/export/row.h +++ b/filters/kspread/latex/export/row.h @@ -21,7 +21,7 @@ #ifndef __KSPREAD_LATEX_ROW_H__ #define __KSPREAD_LATEX_ROW_H__ -#include <qstring.h> +#include <tqstring.h> #include "config.h" #include "format.h" @@ -76,8 +76,8 @@ class Row: public Format /** * Helpfull functions */ - void analyse (const QDomNode); - void generate (QTextStream&); + void analyse (const TQDomNode); + void generate (TQTextStream&); private: diff --git a/filters/kspread/latex/export/spreadsheet.cc b/filters/kspread/latex/export/spreadsheet.cc index d40998fc..afb02cad 100644 --- a/filters/kspread/latex/export/spreadsheet.cc +++ b/filters/kspread/latex/export/spreadsheet.cc @@ -45,7 +45,7 @@ Spreadsheet::~Spreadsheet() /*******************************************/ /* Analyse */ /*******************************************/ -void Spreadsheet::analyse(const QDomNode balise) +void Spreadsheet::analyse(const TQDomNode balise) { kdDebug(30522) << getChildName(balise, 0) << endl; analyse_attr(balise); @@ -60,7 +60,7 @@ void Spreadsheet::analyse(const QDomNode balise) /*******************************************/ /* AnalysePixmaps */ /*******************************************/ -void Spreadsheet::analyse_attr(const QDomNode balise) +void Spreadsheet::analyse_attr(const TQDomNode balise) { } @@ -68,7 +68,7 @@ void Spreadsheet::analyse_attr(const QDomNode balise) /*******************************************/ /* Generate */ /*******************************************/ -void Spreadsheet::generate(QTextStream &out, bool hasPreambule) +void Spreadsheet::generate(TQTextStream &out, bool hasPreambule) { kdDebug(30522) << "DOC. GENERATION." << endl; @@ -95,7 +95,7 @@ void Spreadsheet::generate(QTextStream &out, bool hasPreambule) /*******************************************/ /* GeneratePreambule */ /*******************************************/ -void Spreadsheet::generatePreambule(QTextStream &out) +void Spreadsheet::generatePreambule(TQTextStream &out) { FileHeader::instance()->generate(out); /* For each header */ @@ -135,7 +135,7 @@ void Spreadsheet::generatePreambule(QTextStream &out) /*******************************************/ /* GenerateTypeHeader */ /*******************************************/ -void Spreadsheet::generateTypeHeader(QTextStream &out) +void Spreadsheet::generateTypeHeader(TQTextStream &out) { /*kdDebug(30522) << "generate header" << endl; if((_fileHeader->getHeadType() == TH_ALL || @@ -181,7 +181,7 @@ void Spreadsheet::generateTypeHeader(QTextStream &out) /*******************************************/ /* GenerateTypeFooter */ /*******************************************/ -void Spreadsheet::generateTypeFooter(QTextStream &out) +void Spreadsheet::generateTypeFooter(TQTextStream &out) { /*if(_fileHeader->getFootType() == TH_ALL && footer->getInfo() == SI_EVEN) { diff --git a/filters/kspread/latex/export/spreadsheet.h b/filters/kspread/latex/export/spreadsheet.h index 1a8b8f62..03984105 100644 --- a/filters/kspread/latex/export/spreadsheet.h +++ b/filters/kspread/latex/export/spreadsheet.h @@ -22,8 +22,8 @@ #ifndef __KSPREAD_LATEX_SPREADSHEET_H__ #define __KSPREAD_LATEX_SPREADSHEET_H__ -#include <qptrlist.h> -#include <qtextstream.h> +#include <tqptrlist.h> +#include <tqtextstream.h> #include "map.h" #include "config.h" @@ -70,26 +70,26 @@ class Spreadsheet: public XmlParser, Config * Accessors */ - void analyse(const QDomNode); - void analyse_attr(const QDomNode); + void analyse(const TQDomNode); + void analyse_attr(const TQDomNode); - void generate(QTextStream&, bool); + void generate(TQTextStream&, bool); private: /** * Generate the second part of the preambule */ - void generatePreambule(QTextStream&); + void generatePreambule(TQTextStream&); /** * Generate the header */ - void generateTypeHeader(QTextStream&); + void generateTypeHeader(TQTextStream&); /** * Generate the footer */ - void generateTypeFooter(QTextStream&); + void generateTypeFooter(TQTextStream&); }; #endif /* __KSPREAD_LATEX_SPREADSHEET_H__ */ diff --git a/filters/kspread/latex/export/table.cc b/filters/kspread/latex/export/table.cc index e7bcc14b..0f300356 100644 --- a/filters/kspread/latex/export/table.cc +++ b/filters/kspread/latex/export/table.cc @@ -20,7 +20,7 @@ */ #include <kdebug.h> /* for kdDebug stream */ -#include <qbitarray.h> +#include <tqbitarray.h> #include "cell.h" #include "column.h" #include "row.h" @@ -52,7 +52,7 @@ void Table::setMaxRow(int row) if(_maxRow < row) _maxRow = row; } -void Table::analyse(const QDomNode balise) +void Table::analyse(const TQDomNode balise) { kdDebug(30522) << "New table" << endl; if(getAttr(balise, "columnnumber") == "1") @@ -86,7 +86,7 @@ void Table::analyse(const QDomNode balise) int max = getNbChild(balise); for(int index = 0; index < max; index++) { - QString name = getChildName(balise, index); + TQString name = getChildName(balise, index); if(name == "cell") { kdDebug(30522) << "----- cell -----" << endl; @@ -115,13 +115,13 @@ void Table::analyse(const QDomNode balise) } } -void Table::analysePaper(const QDomNode balise) +void Table::analysePaper(const TQDomNode balise) { setFormat(getAttr(balise, "format")); setOrientation(getAttr(balise, "orientation")); /* borders */ - QDomNode border = getChild(balise, "borders"); + TQDomNode border = getChild(balise, "borders"); setBorderRight(getAttr(balise, "right").toLong()); setBorderLeft(getAttr(balise, "left").toLong()); setBorderBottom(getAttr(balise, "bottom").toLong()); @@ -130,7 +130,7 @@ void Table::analysePaper(const QDomNode balise) Cell* Table::searchCell(int col, int row) { - QPtrListIterator<Cell> it(_cells); + TQPtrListIterator<Cell> it(_cells); kdDebug(30522) << "search in list of " << _cells.count() << " cells" << endl; Cell *cell = 0; @@ -146,7 +146,7 @@ Cell* Table::searchCell(int col, int row) Column* Table::searchColumn(int col) { - QPtrListIterator<Column> it(_columns); + TQPtrListIterator<Column> it(_columns); Column *column; while ( (column = it.current()) != 0 ) @@ -160,7 +160,7 @@ Column* Table::searchColumn(int col) Row* Table::searchRow(int rowNumber) { - QPtrListIterator<Row> it(_rows); + TQPtrListIterator<Row> it(_rows); Row *row; while ( (row = it.current()) != 0 ) @@ -175,7 +175,7 @@ Row* Table::searchRow(int rowNumber) /*******************************************/ /* generate */ /*******************************************/ -void Table::generate(QTextStream& out) +void Table::generate(TQTextStream& out) { kdDebug(30522) << "GENERATION OF A TABLE " << getMaxRow() << " - " << getMaxColumn() << endl; @@ -266,11 +266,11 @@ void Table::generate(QTextStream& out) /*******************************************/ /* generateTopLineBorder */ /*******************************************/ -void Table::generateTopLineBorder(QTextStream& out, int row) +void Table::generateTopLineBorder(TQTextStream& out, int row) { Cell* cell = 0; - QBitArray border( getMaxColumn() ); + TQBitArray border( getMaxColumn() ); bool fullLine = true; for(int index = 1; index <= getMaxColumn(); index++) { @@ -323,10 +323,10 @@ void Table::generateTopLineBorder(QTextStream& out, int row) /*******************************************/ /* generateBottomLineBorder */ /*******************************************/ -void Table::generateBottomLineBorder(QTextStream& out, int row) +void Table::generateBottomLineBorder(TQTextStream& out, int row) { Cell* cell = 0; - QBitArray border( getMaxColumn() ); + TQBitArray border( getMaxColumn() ); bool fullLine = true; for(int index = 1; index <= getMaxColumn(); index++) @@ -374,7 +374,7 @@ void Table::generateBottomLineBorder(QTextStream& out, int row) /*******************************************/ /* generateCell */ /*******************************************/ -void Table::generateCell(QTextStream& out, int row, int col) +void Table::generateCell(TQTextStream& out, int row, int col) { kdDebug(30522) << "GENERATE CELL : " << row << "," << col << endl; @@ -392,7 +392,7 @@ void Table::generateCell(QTextStream& out, int row, int col) /*******************************************/ /* generateTableHeader */ /*******************************************/ -void Table::generateTableHeader(QTextStream& out) +void Table::generateTableHeader(TQTextStream& out) { Column* column = 0; diff --git a/filters/kspread/latex/export/table.h b/filters/kspread/latex/export/table.h index 3f1fa53e..b0e99f49 100644 --- a/filters/kspread/latex/export/table.h +++ b/filters/kspread/latex/export/table.h @@ -23,8 +23,8 @@ #ifndef __KSPREAD_LATEX_TABLE_H__ #define __KSPREAD_LATEX_TABLE_H__ -#include <qstring.h> -#include <qptrlist.h> +#include <tqstring.h> +#include <tqptrlist.h> #include "xmlparser.h" #include "config.h" @@ -45,9 +45,9 @@ class Row; */ class Table: public XmlParser, Config { - QPtrList<Row> _rows; - QPtrList<Column> _columns; - QPtrList<Cell> _cells; + TQPtrList<Row> _rows; + TQPtrList<Column> _columns; + TQPtrList<Cell> _cells; /* USEFULL DATA */ int _maxRow, _maxCol; /* Size of the table (nb of cell) */ @@ -63,11 +63,11 @@ class Table: public XmlParser, Config bool _showFormula; bool _showFormulaIndicator; bool _lcMode; - QString _name; + TQString _name; /** PAPER DATA */ - QString _format; - QString _orientation; + TQString _format; + TQString _orientation; long _borderRight; long _borderLeft; long _borderBottom; @@ -98,9 +98,9 @@ class Table: public XmlParser, Config int getMaxRow() const { return _maxRow; } int getMaxColumn() const { return _maxCol; } - QString getName() const { return _name; } - QString getFormat() const { return _format; } - QString getOrientation() const { return _orientation; } + TQString getName() const { return _name; } + TQString getFormat() const { return _format; } + TQString getOrientation() const { return _orientation; } long getBorderRight() const { return _borderRight; } long getBorderLeft() const { return _borderLeft; } long getBorderBottom() const { return _borderBottom; } @@ -124,9 +124,9 @@ class Table: public XmlParser, Config */ void setMaxRow(int r); void setMaxColumn(int c); - void setName(QString name) { _name = name; } - void setFormat(QString format) { _format = format; } - void setOrientation(QString orient) { _orientation = orient; } + void setName(TQString name) { _name = name; } + void setFormat(TQString format) { _format = format; } + void setOrientation(TQString orient) { _orientation = orient; } void setBorderRight(long br) { _borderRight = br; } void setBorderLeft(long bl) { _borderLeft = bl; } void setBorderBottom(long bb) { _borderBottom = bb; } @@ -171,15 +171,15 @@ class Table: public XmlParser, Config */ Row* searchRow(int row); - void analyse (const QDomNode); - void analysePaper (const QDomNode); - void generate (QTextStream&); + void analyse (const TQDomNode); + void analysePaper (const TQDomNode); + void generate (TQTextStream&); private: - void generateCell(QTextStream&, int, int); - void generateTableHeader(QTextStream&); - void generateTopLineBorder(QTextStream&, int); - void generateBottomLineBorder(QTextStream&, int); + void generateCell(TQTextStream&, int, int); + void generateTableHeader(TQTextStream&); + void generateTopLineBorder(TQTextStream&, int); + void generateBottomLineBorder(TQTextStream&, int); }; #endif /* __KSPREAD_LATEX_TABLE_H__ */ diff --git a/filters/kspread/latex/export/xmlparser.cc b/filters/kspread/latex/export/xmlparser.cc index e93160e6..6b85f243 100644 --- a/filters/kspread/latex/export/xmlparser.cc +++ b/filters/kspread/latex/export/xmlparser.cc @@ -23,16 +23,16 @@ #include <KoStore.h> #include "xmlparser.h" -#include "qfile.h" +#include "tqfile.h" /* Init static data */ FileHeader* XmlParser::_fileHeader = 0; Document* XmlParser::_root = 0; KoStore* XmlParser::_in = NULL; -XmlParser::XmlParser(QString filename): _filename(filename) +XmlParser::XmlParser(TQString filename): _filename(filename) { - QFile f(filename); + TQFile f(filename); if(!f.open(IO_ReadOnly)) return; if(!_document.setContent(&f)) @@ -44,7 +44,7 @@ XmlParser::XmlParser(QString filename): _filename(filename) //_eltCurrent = _document.documentElement(); } -XmlParser::XmlParser(QByteArray in) +XmlParser::XmlParser(TQByteArray in) { _document.setContent(in); } @@ -58,7 +58,7 @@ XmlParser::XmlParser(const KoStore* in) return; } /* input file Reading */ - QByteArray array = _in->read(_in->size()); + TQByteArray array = _in->read(_in->size()); _document.setContent(array); } @@ -72,68 +72,68 @@ XmlParser::~XmlParser() _in->close(); } -QDomNode XmlParser::getChild(QDomNode balise, QString name) +TQDomNode XmlParser::getChild(TQDomNode balise, TQString name) { - QDomNode node = getChild(balise, name, 0); + TQDomNode node = getChild(balise, name, 0); kdDebug(30522) << node.nodeName() << endl; return node; } -bool XmlParser::isChild(QDomNode balise, QString name) +bool XmlParser::isChild(TQDomNode balise, TQString name) { if(balise.isElement()) return balise.toElement().elementsByTagName(name).count(); return false; } -QDomNode XmlParser::getChild(QDomNode balise, QString name, int index) +TQDomNode XmlParser::getChild(TQDomNode balise, TQString name, int index) { if(balise.isElement()) { - QDomNodeList children = balise.toElement().elementsByTagName(name); - if ( children.count() ) - return children.item(index); + TQDomNodeList tqchildren = balise.toElement().elementsByTagName(name); + if ( tqchildren.count() ) + return tqchildren.item(index); } - return QDomNode(); + return TQDomNode(); } -QDomNode XmlParser::getChild(QDomNode balise, int index) +TQDomNode XmlParser::getChild(TQDomNode balise, int index) { - QDomNodeList children = balise.childNodes(); - if ( children.count() ) - return children.item(index); - return QDomNode(); + TQDomNodeList tqchildren = balise.childNodes(); + if ( tqchildren.count() ) + return tqchildren.item(index); + return TQDomNode(); } -QString XmlParser::getData(QDomNode balise, int index) +TQString XmlParser::getData(TQDomNode balise, int index) { return getChild(getChild(balise, index), 0).nodeValue(); } -QString XmlParser::getData(QDomNode balise, QString name) +TQString XmlParser::getData(TQDomNode balise, TQString name) { return getChild(getChild(balise, name), 0).nodeValue(); } -int XmlParser::getNbChild(QDomNode balise) +int XmlParser::getNbChild(TQDomNode balise) { return balise.childNodes().count(); } -int XmlParser::getNbChild(QDomNode balise, QString name) +int XmlParser::getNbChild(TQDomNode balise, TQString name) { if(balise.isElement()) return balise.toElement().elementsByTagName(name).count(); return -1; } -QString XmlParser::getChildName(QDomNode balise, int index) +TQString XmlParser::getChildName(TQDomNode balise, int index) { return balise.childNodes().item(index).nodeName(); } -QString XmlParser::getAttr(QDomNode balise, QString name) const +TQString XmlParser::getAttr(TQDomNode balise, TQString name) const { if(balise.isElement()) return balise.toElement().attributeNode(name).value(); - return QString(); + return TQString(); } diff --git a/filters/kspread/latex/export/xmlparser.h b/filters/kspread/latex/export/xmlparser.h index 10e2609d..7e6e2995 100644 --- a/filters/kspread/latex/export/xmlparser.h +++ b/filters/kspread/latex/export/xmlparser.h @@ -23,8 +23,8 @@ #ifndef __LATEX_XMLPARSER_H__ #define __LATEX_XMLPARSER_H__ -#include "qstring.h" -#include "qdom.h" +#include "tqstring.h" +#include "tqdom.h" class FileHeader; class Document; @@ -33,9 +33,9 @@ class KoStore; class XmlParser { /** Latex output file */ - QString _filename; + TQString _filename; /** The Koffice app document stored in a XML DOM Tree. */ - QDomDocument _document; + TQDomDocument _document; /** The koffice document (maindoc, picture, ...). */ static KoStore* _in; @@ -47,31 +47,31 @@ class XmlParser static Document *_root; public: - XmlParser(QString); - XmlParser(QByteArray); /* deprecated */ + XmlParser(TQString); + XmlParser(TQByteArray); /* deprecated */ XmlParser(const KoStore*); XmlParser(); virtual ~XmlParser(); - QString getFilename () const { return _filename; } - QString getDocument () const { return _document.toString(); } + TQString getFilename () const { return _filename; } + TQString getDocument () const { return _document.toString(); } Document* getRoot () const { return _root; } FileHeader* getFileHeader () const { return _fileHeader; } - QString getChildName(QDomNode, int); - QDomNode getChild(QDomNode, QString); - QDomNode getChild(QDomNode, QString, int); - QDomNode getChild(QDomNode, int); - QString getData(QDomNode, int); - QString getData(QDomNode, QString); - int getNbChild(QDomNode, QString); - int getNbChild(QDomNode); - QString getAttr(QDomNode, QString) const; - bool isChild(QDomNode, QString); + TQString getChildName(TQDomNode, int); + TQDomNode getChild(TQDomNode, TQString); + TQDomNode getChild(TQDomNode, TQString, int); + TQDomNode getChild(TQDomNode, int); + TQString getData(TQDomNode, int); + TQString getData(TQDomNode, TQString); + int getNbChild(TQDomNode, TQString); + int getNbChild(TQDomNode); + TQString getAttr(TQDomNode, TQString) const; + bool isChild(TQDomNode, TQString); void setFileHeader(FileHeader* h) { _fileHeader = h; } void setRoot (Document* r) { _root = r; } - QDomNode init() { return _document.documentElement(); } + TQDomNode init() { return _document.documentElement(); } }; diff --git a/filters/kspread/libkspreadexport/KSpreadBaseWorker.cc b/filters/kspread/libkspreadexport/KSpreadBaseWorker.cc index cc7b2b46..ba56c229 100644 --- a/filters/kspread/libkspreadexport/KSpreadBaseWorker.cc +++ b/filters/kspread/libkspreadexport/KSpreadBaseWorker.cc @@ -31,7 +31,7 @@ KSpreadBaseWorker::~KSpreadBaseWorker() { } -KoFilter::ConversionStatus KSpreadBaseWorker::startDocument(KSpreadFilterProperty property) { +KoFilter::ConversiontqStatus KSpreadBaseWorker::startDocument(KSpreadFilterProperty property) { KSpreadFilterProperty::Iterator it; for (it = property.begin(); it != property.end(); ++it) { kdDebug(30508) << "startDocument: " << it.key() << "->" << it.data() << endl; @@ -40,7 +40,7 @@ KoFilter::ConversionStatus KSpreadBaseWorker::startDocument(KSpreadFilterPropert } -KoFilter::ConversionStatus KSpreadBaseWorker::startInfoLog(KSpreadFilterProperty property) { +KoFilter::ConversiontqStatus KSpreadBaseWorker::startInfoLog(KSpreadFilterProperty property) { KSpreadFilterProperty::Iterator it; for (it = property.begin(); it != property.end(); ++it) { kdDebug(30508) << "startInfoLog: " << it.key() << "->" << it.data() << endl; @@ -49,7 +49,7 @@ KoFilter::ConversionStatus KSpreadBaseWorker::startInfoLog(KSpreadFilterProperty } -KoFilter::ConversionStatus KSpreadBaseWorker::startInfoAuthor(KSpreadFilterProperty property) { +KoFilter::ConversiontqStatus KSpreadBaseWorker::startInfoAuthor(KSpreadFilterProperty property) { KSpreadFilterProperty::Iterator it; for (it = property.begin(); it != property.end(); ++it) { kdDebug(30508) << "startInfoAuthor: " << it.key() << "->" << it.data() << endl; @@ -58,7 +58,7 @@ KoFilter::ConversionStatus KSpreadBaseWorker::startInfoAuthor(KSpreadFilterPrope } -KoFilter::ConversionStatus KSpreadBaseWorker::startInfoAbout(KSpreadFilterProperty property) { +KoFilter::ConversiontqStatus KSpreadBaseWorker::startInfoAbout(KSpreadFilterProperty property) { KSpreadFilterProperty::Iterator it; for (it = property.begin(); it != property.end(); ++it) { kdDebug(30508) << "startInfoAbout: " << it.key() << "->" << it.data() << endl; @@ -67,7 +67,7 @@ KoFilter::ConversionStatus KSpreadBaseWorker::startInfoAbout(KSpreadFilterProper } -KoFilter::ConversionStatus KSpreadBaseWorker::startSpreadBook(KSpreadFilterProperty property) { +KoFilter::ConversiontqStatus KSpreadBaseWorker::startSpreadBook(KSpreadFilterProperty property) { KSpreadFilterProperty::Iterator it; for (it = property.begin(); it != property.end(); ++it) { kdDebug(30508) << "startSpreadBook: " << it.key() << "->" << it.data() << endl; @@ -76,7 +76,7 @@ KoFilter::ConversionStatus KSpreadBaseWorker::startSpreadBook(KSpreadFilterPrope } -KoFilter::ConversionStatus KSpreadBaseWorker::startSpreadSheet(KSpreadFilterProperty property) { +KoFilter::ConversiontqStatus KSpreadBaseWorker::startSpreadSheet(KSpreadFilterProperty property) { KSpreadFilterProperty::Iterator it; for (it = property.begin(); it != property.end(); ++it) { kdDebug(30508) << "startSpreadSheet: " << it.key() << "->" << it.data() << endl; @@ -85,7 +85,7 @@ KoFilter::ConversionStatus KSpreadBaseWorker::startSpreadSheet(KSpreadFilterProp } -KoFilter::ConversionStatus KSpreadBaseWorker::startSpreadCell(KSpreadFilterProperty property) { +KoFilter::ConversiontqStatus KSpreadBaseWorker::startSpreadCell(KSpreadFilterProperty property) { KSpreadFilterProperty::Iterator it; for (it = property.begin(); it != property.end(); ++it) { kdDebug(30508) << "startSpreadCell: " << it.key() << "->" << it.data() << endl; diff --git a/filters/kspread/libkspreadexport/KSpreadBaseWorker.h b/filters/kspread/libkspreadexport/KSpreadBaseWorker.h index d2322402..4ba82383 100644 --- a/filters/kspread/libkspreadexport/KSpreadBaseWorker.h +++ b/filters/kspread/libkspreadexport/KSpreadBaseWorker.h @@ -22,10 +22,10 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, #define KSPREAD_BASE_WORKER_H #include <KoFilter.h> -#include <qmap.h> +#include <tqmap.h> -typedef QMap<QString, QString> KSpreadFilterProperty; +typedef TQMap<TQString, TQString> KSpreadFilterProperty; class KSpreadBaseWorker { @@ -33,13 +33,13 @@ public: KSpreadBaseWorker(); virtual ~KSpreadBaseWorker(); - virtual KoFilter::ConversionStatus startDocument(KSpreadFilterProperty property); - virtual KoFilter::ConversionStatus startInfoLog(KSpreadFilterProperty property); - virtual KoFilter::ConversionStatus startInfoAuthor(KSpreadFilterProperty property); - virtual KoFilter::ConversionStatus startInfoAbout(KSpreadFilterProperty property); - virtual KoFilter::ConversionStatus startSpreadBook(KSpreadFilterProperty property); - virtual KoFilter::ConversionStatus startSpreadSheet(KSpreadFilterProperty property); - virtual KoFilter::ConversionStatus startSpreadCell(KSpreadFilterProperty property); + virtual KoFilter::ConversiontqStatus startDocument(KSpreadFilterProperty property); + virtual KoFilter::ConversiontqStatus startInfoLog(KSpreadFilterProperty property); + virtual KoFilter::ConversiontqStatus startInfoAuthor(KSpreadFilterProperty property); + virtual KoFilter::ConversiontqStatus startInfoAbout(KSpreadFilterProperty property); + virtual KoFilter::ConversiontqStatus startSpreadBook(KSpreadFilterProperty property); + virtual KoFilter::ConversiontqStatus startSpreadSheet(KSpreadFilterProperty property); + virtual KoFilter::ConversiontqStatus startSpreadCell(KSpreadFilterProperty property); }; #endif /* KSPREAD_BASE_WORKER_H */ diff --git a/filters/kspread/libkspreadexport/KSpreadLeader.cc b/filters/kspread/libkspreadexport/KSpreadLeader.cc index c321a515..9ba2d874 100644 --- a/filters/kspread/libkspreadexport/KSpreadLeader.cc +++ b/filters/kspread/libkspreadexport/KSpreadLeader.cc @@ -48,8 +48,8 @@ void Leader::setWorker(KSpreadBaseWorker *newWorker) { } -KoFilter::ConversionStatus Leader::convert() { - KoFilter::ConversionStatus status; +KoFilter::ConversiontqStatus Leader::convert() { + KoFilter::ConversiontqStatus status; // Validate the filter chain and the worker if (!m_filterChain) { @@ -74,7 +74,7 @@ KoFilter::ConversionStatus Leader::convert() { kdWarning(30508) << "the KSpreadDoc is NULL!" << endl; return KoFilter::StupidError; } - if ( !::qt_cast<const KSpread::Doc *>( document ) ) { + if ( !::tqqt_cast<const KSpread::Doc *>( document ) ) { kdWarning(30508) << "the document is not a KSpreadDoc!" << endl; return KoFilter::StupidError; } @@ -122,8 +122,8 @@ KoFilter::ConversionStatus Leader::convert() { } -KoFilter::ConversionStatus Leader::doInfo(KoDocumentInfo *info) { - KoFilter::ConversionStatus status; +KoFilter::ConversiontqStatus Leader::doInfo(KoDocumentInfo *info) { + KoFilter::ConversiontqStatus status; #if 0 // this was never used, it's been removed now // Gather data about the document log @@ -164,9 +164,9 @@ KoFilter::ConversionStatus Leader::doInfo(KoDocumentInfo *info) { } -KoFilter::ConversionStatus Leader::doSpreadBook(KSpreadDoc *document) { +KoFilter::ConversiontqStatus Leader::doSpreadBook(KSpreadDoc *document) { KSpreadFilterProperty docSpreadBookProperty; - docSpreadBookProperty["spreadsheetcount"] = QString::number(document->map()->count()); + docSpreadBookProperty["spreadsheetcount"] = TQString::number(document->map()->count()); docSpreadBookProperty["decimalsymbol"] = document->locale()->decimalSymbol(); docSpreadBookProperty["thousandsseparator"] = document->locale()->thousandsSeparator(); docSpreadBookProperty["currencysymbol"] = document->locale()->currencySymbol(); @@ -174,12 +174,12 @@ KoFilter::ConversionStatus Leader::doSpreadBook(KSpreadDoc *document) { docSpreadBookProperty["monetarythousandsseparator"] = document->locale()->monetaryThousandsSeparator(); docSpreadBookProperty["positivesign"] = document->locale()->positiveSign(); docSpreadBookProperty["negativesign"] = document->locale()->negativeSign(); - docSpreadBookProperty["fracdigits"] = QString::number(document->locale()->fracDigits()); + docSpreadBookProperty["fracdigits"] = TQString::number(document->locale()->fracDigits()); docSpreadBookProperty["positiveprefixcurrencysymbol"] = (document->locale()->positivePrefixCurrencySymbol()==0?"false":"true"); docSpreadBookProperty["negativeprefixcurrencysymbol"] = (document->locale()->negativePrefixCurrencySymbol()==0?"false":"true"); docSpreadBookProperty["use12clock"] = (document->locale()->use12Clock()==0?"false":"true"); docSpreadBookProperty["weekstartsmonday"] = (document->locale()->weekStartsMonday()==0?"false":"true"); - docSpreadBookProperty["weekstartday"] = QString::number(document->locale()->weekStartDay()); + docSpreadBookProperty["weekstartday"] = TQString::number(document->locale()->weekStartDay()); docSpreadBookProperty["language"] = document->locale()->language(); docSpreadBookProperty["country"] = document->locale()->country(); docSpreadBookProperty["encoding"] = document->locale()->encoding(); @@ -189,38 +189,38 @@ KoFilter::ConversionStatus Leader::doSpreadBook(KSpreadDoc *document) { docSpreadBookProperty["defaultlanguage"] = KLocale::defaultLanguage(); docSpreadBookProperty["defaultcountry"] = KLocale::defaultCountry(); docSpreadBookProperty["defaultgridpencolorname"] = document->defaultGridPen().color().name(); - docSpreadBookProperty["defaultgridpencolorred"] = QString::number(document->defaultGridPen().color().red()); - docSpreadBookProperty["defaultgridpencolorgreen"] = QString::number(document->defaultGridPen().color().green()); - docSpreadBookProperty["defaultgridpencolorblue"] = QString::number(document->defaultGridPen().color().blue()); - docSpreadBookProperty["defaultgridpenwidth"] = QString::number(document->defaultGridPen().width()); + docSpreadBookProperty["defaultgridpencolorred"] = TQString::number(document->defaultGridPen().color().red()); + docSpreadBookProperty["defaultgridpencolorgreen"] = TQString::number(document->defaultGridPen().color().green()); + docSpreadBookProperty["defaultgridpencolorblue"] = TQString::number(document->defaultGridPen().color().blue()); + docSpreadBookProperty["defaultgridpenwidth"] = TQString::number(document->defaultGridPen().width()); docSpreadBookProperty["showverticalscrollbar"] = (document->getShowVerticalScrollBar()==0?"false":"true"); docSpreadBookProperty["showhorizontalscrollbar"] = (document->getShowHorizontalScrollBar()==0?"false":"true"); docSpreadBookProperty["showcolheader"] = (document->getShowColHeader()==0?"false":"true"); docSpreadBookProperty["showrowheader"] = (document->getShowRowHeader()==0?"false":"true"); - docSpreadBookProperty["indentvalue"] = QString::number(document->getIndentValue()); - docSpreadBookProperty["movetovalue"] = QString::number(document->getMoveToValue()); + docSpreadBookProperty["indentvalue"] = TQString::number(document->getIndentValue()); + docSpreadBookProperty["movetovalue"] = TQString::number(document->getMoveToValue()); docSpreadBookProperty["showmessageerror"] = (document->getShowMessageError()==0?"false":"true"); docSpreadBookProperty["showtabbar"] = (document->getShowTabBar()==0?"false":"true"); docSpreadBookProperty["pagebordercolorname"] = document->pageBorderColor().name(); - docSpreadBookProperty["pagebordercolorred"] = QString::number(document->pageBorderColor().red()); - docSpreadBookProperty["pagebordercolorgreen"] = QString::number(document->pageBorderColor().green()); - docSpreadBookProperty["pagebordercolorblue"] = QString::number(document->pageBorderColor().blue()); + docSpreadBookProperty["pagebordercolorred"] = TQString::number(document->pageBorderColor().red()); + docSpreadBookProperty["pagebordercolorgreen"] = TQString::number(document->pageBorderColor().green()); + docSpreadBookProperty["pagebordercolorblue"] = TQString::number(document->pageBorderColor().blue()); docSpreadBookProperty["showcommentindicator"] = (document->getShowCommentIndicator()==0?"false":"true"); docSpreadBookProperty["showformulabar"] = (document->getShowFormulaBar()==0?"false":"true"); docSpreadBookProperty["dontcheckupperword"] = (document->dontCheckUpperWord()==0?"false":"true"); docSpreadBookProperty["dontchecktitlecase"] = (document->dontCheckTitleCase()==0?"false":"true"); docSpreadBookProperty["showstatusbar"] = (document->getShowStatusBar()==0?"false":"true"); docSpreadBookProperty["unitname"] = document->getUnitName(); - docSpreadBookProperty["syntaxversion"] = QString::number(document->syntaxVersion()); + docSpreadBookProperty["syntaxversion"] = TQString::number(document->syntaxVersion()); return m_worker->startSpreadBook(docSpreadBookProperty); } -KoFilter::ConversionStatus Leader::doSpreadSheet(KSpreadSheet *spreadSheet) { +KoFilter::ConversiontqStatus Leader::doSpreadSheet(KSpreadSheet *spreadSheet) { KSpreadFilterProperty docSpreadSheetProperty; docSpreadSheetProperty["name"] = spreadSheet->tableName(); - docSpreadSheetProperty["sizemaxx"] = QString::number(spreadSheet->sizeMaxX()); - docSpreadSheetProperty["sizemaxy"] = QString::number(spreadSheet->sizeMaxY()); + docSpreadSheetProperty["sizemaxx"] = TQString::number(spreadSheet->sizeMaxX()); + docSpreadSheetProperty["sizemaxy"] = TQString::number(spreadSheet->sizeMaxY()); docSpreadSheetProperty["showgrid"] = (spreadSheet->getShowGrid()==0?"false":"true"); docSpreadSheetProperty["showformula"] = (spreadSheet->getShowFormula()==0?"false":"true"); docSpreadSheetProperty["showformulaindicator"] = (spreadSheet->getShowFormulaIndicator()==0?"false":"true"); @@ -231,14 +231,14 @@ KoFilter::ConversionStatus Leader::doSpreadSheet(KSpreadSheet *spreadSheet) { docSpreadSheetProperty["firstletterupper"] = (spreadSheet->getFirstLetterUpper()==0?"false":"true"); docSpreadSheetProperty["ishidden"] = (spreadSheet->isHidden()==0?"false":"true"); docSpreadSheetProperty["showpageborders"] = (spreadSheet->isShowPageBorders()==0?"false":"true"); - docSpreadSheetProperty["printablewidth"] = QString::number(spreadSheet->printableWidth()); - docSpreadSheetProperty["printableheight"] = QString::number(spreadSheet->printableHeight()); - docSpreadSheetProperty["paperwidth"] = QString::number(spreadSheet->paperWidth()); - docSpreadSheetProperty["paperheight"] = QString::number(spreadSheet->paperHeight()); - docSpreadSheetProperty["leftborder"] = QString::number(spreadSheet->leftBorder()); - docSpreadSheetProperty["rightborder"] = QString::number(spreadSheet->rightBorder()); - docSpreadSheetProperty["topborder"] = QString::number(spreadSheet->topBorder()); - docSpreadSheetProperty["bottomborder"] = QString::number(spreadSheet->bottomBorder()); + docSpreadSheetProperty["printablewidth"] = TQString::number(spreadSheet->printableWidth()); + docSpreadSheetProperty["printableheight"] = TQString::number(spreadSheet->printableHeight()); + docSpreadSheetProperty["paperwidth"] = TQString::number(spreadSheet->paperWidth()); + docSpreadSheetProperty["paperheight"] = TQString::number(spreadSheet->paperHeight()); + docSpreadSheetProperty["leftborder"] = TQString::number(spreadSheet->leftBorder()); + docSpreadSheetProperty["rightborder"] = TQString::number(spreadSheet->rightBorder()); + docSpreadSheetProperty["topborder"] = TQString::number(spreadSheet->topBorder()); + docSpreadSheetProperty["bottomborder"] = TQString::number(spreadSheet->bottomBorder()); docSpreadSheetProperty["headleft"] = spreadSheet->headLeft(); docSpreadSheetProperty["headmid"] = spreadSheet->headMid(); docSpreadSheetProperty["headright"] = spreadSheet->headRight(); @@ -251,18 +251,18 @@ KoFilter::ConversionStatus Leader::doSpreadSheet(KSpreadSheet *spreadSheet) { docSpreadSheetProperty["printcomment"] = (spreadSheet->getPrintCommentIndicator()==0?"false":"true"); docSpreadSheetProperty["printformula"] = (spreadSheet->getPrintFormulaIndicator()==0?"false":"true"); updateMaxCells(spreadSheet); - docSpreadSheetProperty["maxcellrow"] = QString::number(m_maxCellRow); - docSpreadSheetProperty["maxcellcolumn"] = QString::number(m_maxCellColumn); + docSpreadSheetProperty["maxcellrow"] = TQString::number(m_maxCellRow); + docSpreadSheetProperty["maxcellcolumn"] = TQString::number(m_maxCellColumn); return m_worker->startSpreadSheet(docSpreadSheetProperty); } -KoFilter::ConversionStatus Leader::doSpreadCell(Cell*spreadCell, int column, int row) { +KoFilter::ConversiontqStatus Leader::doSpreadCell(Cell*spreadCell, int column, int row) { KSpreadFilterProperty docSpreadCellProperty; - docSpreadCellProperty["column"] = QString::number(column); - docSpreadCellProperty["row"] = QString::number(row); - docSpreadCellProperty["width"] = QString::number(spreadCell->dblWidth()); - docSpreadCellProperty["height"] = QString::number(spreadCell->dblHeight()); + docSpreadCellProperty["column"] = TQString::number(column); + docSpreadCellProperty["row"] = TQString::number(row); + docSpreadCellProperty["width"] = TQString::number(spreadCell->dblWidth()); + docSpreadCellProperty["height"] = TQString::number(spreadCell->dblHeight()); docSpreadCellProperty["empty"] = (spreadCell->isEmpty()==0?"false":"true"); if (!spreadCell->isEmpty()) { docSpreadCellProperty["text"] = spreadCell->text(); @@ -270,49 +270,49 @@ KoFilter::ConversionStatus Leader::doSpreadCell(Cell*spreadCell, int column, int docSpreadCellProperty["action"] = spreadCell->action(); docSpreadCellProperty["date"] = (spreadCell->isDate()==0?"false":"true"); docSpreadCellProperty["time"] = (spreadCell->isTime()==0?"false":"true"); - docSpreadCellProperty["textwidth"] = QString::number(spreadCell->textWidth()); - docSpreadCellProperty["textheight"] = QString::number(spreadCell->textHeight()); + docSpreadCellProperty["textwidth"] = TQString::number(spreadCell->textWidth()); + docSpreadCellProperty["textheight"] = TQString::number(spreadCell->textHeight()); docSpreadCellProperty["forceextracells"] = (spreadCell->isForceExtraCells()==0?"false":"true"); - docSpreadCellProperty["mergedxcells"] = QString::number(spreadCell->mergedXCells()); - docSpreadCellProperty["mergedycells"] = QString::number(spreadCell->mergedYCells()); - docSpreadCellProperty["extraxcells"] = QString::number(spreadCell->extraXCells()); - docSpreadCellProperty["extraycells"] = QString::number(spreadCell->extraYCells()); - docSpreadCellProperty["extrawidth"] = QString::number(spreadCell->extraWidth()); - docSpreadCellProperty["extraheight"] = QString::number(spreadCell->extraHeight()); + docSpreadCellProperty["mergedxcells"] = TQString::number(spreadCell->mergedXCells()); + docSpreadCellProperty["mergedycells"] = TQString::number(spreadCell->mergedYCells()); + docSpreadCellProperty["extraxcells"] = TQString::number(spreadCell->extraXCells()); + docSpreadCellProperty["extraycells"] = TQString::number(spreadCell->extraYCells()); + docSpreadCellProperty["extrawidth"] = TQString::number(spreadCell->extraWidth()); + docSpreadCellProperty["extraheight"] = TQString::number(spreadCell->extraHeight()); docSpreadCellProperty["formula"] = (spreadCell->isFormula()==0?"false":"true"); docSpreadCellProperty["haserror"] = (spreadCell->hasError()==0?"false":"true"); - docSpreadCellProperty["alignx"] = QString::number(spreadCell->defineAlignX()); + docSpreadCellProperty["alignx"] = TQString::number(spreadCell->defineAlignX()); docSpreadCellProperty["name"] = spreadCell->name(); docSpreadCellProperty["fullname"] = spreadCell->fullName(); - docSpreadCellProperty["content"] = QString::number(spreadCell->content()); - docSpreadCellProperty["style"] = QString::number(spreadCell->style()); + docSpreadCellProperty["content"] = TQString::number(spreadCell->content()); + docSpreadCellProperty["style"] = TQString::number(spreadCell->style()); docSpreadCellProperty["valuedate"] = spreadCell->valueDate().toString(); docSpreadCellProperty["valuetime"] = spreadCell->valueTime().toString(); - docSpreadCellProperty["leftborderwidth"] = QString::number(spreadCell->leftBorderPen(column, row).width()); + docSpreadCellProperty["leftborderwidth"] = TQString::number(spreadCell->leftBorderPen(column, row).width()); docSpreadCellProperty["leftbordercolorname"] = spreadCell->leftBorderPen(column, row).color().name(); - docSpreadCellProperty["leftbordercolorred"] = QString::number(spreadCell->leftBorderPen(column, row).color().red()); - docSpreadCellProperty["leftbordercolorgreen"] = QString::number(spreadCell->leftBorderPen(column, row).color().green()); - docSpreadCellProperty["leftbordercolorblue"] = QString::number(spreadCell->leftBorderPen(column, row).color().blue()); - docSpreadCellProperty["topborderwidth"] = QString::number(spreadCell->topBorderPen(column, row).width()); + docSpreadCellProperty["leftbordercolorred"] = TQString::number(spreadCell->leftBorderPen(column, row).color().red()); + docSpreadCellProperty["leftbordercolorgreen"] = TQString::number(spreadCell->leftBorderPen(column, row).color().green()); + docSpreadCellProperty["leftbordercolorblue"] = TQString::number(spreadCell->leftBorderPen(column, row).color().blue()); + docSpreadCellProperty["topborderwidth"] = TQString::number(spreadCell->topBorderPen(column, row).width()); docSpreadCellProperty["topbordercolorname"] = spreadCell->topBorderPen(column, row).color().name(); - docSpreadCellProperty["topbordercolorred"] = QString::number(spreadCell->topBorderPen(column, row).color().red()); - docSpreadCellProperty["topbordercolorgreen"] = QString::number(spreadCell->topBorderPen(column, row).color().green()); - docSpreadCellProperty["topbordercolorblue"] = QString::number(spreadCell->topBorderPen(column, row).color().blue()); - docSpreadCellProperty["rightborderwidth"] = QString::number(spreadCell->rightBorderPen(column, row).width()); + docSpreadCellProperty["topbordercolorred"] = TQString::number(spreadCell->topBorderPen(column, row).color().red()); + docSpreadCellProperty["topbordercolorgreen"] = TQString::number(spreadCell->topBorderPen(column, row).color().green()); + docSpreadCellProperty["topbordercolorblue"] = TQString::number(spreadCell->topBorderPen(column, row).color().blue()); + docSpreadCellProperty["rightborderwidth"] = TQString::number(spreadCell->rightBorderPen(column, row).width()); docSpreadCellProperty["rightbordercolorname"] = spreadCell->rightBorderPen(column, row).color().name(); - docSpreadCellProperty["rightbordercolorred"] = QString::number(spreadCell->rightBorderPen(column, row).color().red()); - docSpreadCellProperty["rightbordercolorgreen"] = QString::number(spreadCell->rightBorderPen(column, row).color().green()); - docSpreadCellProperty["rightbordercolorblue"] = QString::number(spreadCell->rightBorderPen(column, row).color().blue()); - docSpreadCellProperty["bottomborderwidth"] = QString::number(spreadCell->bottomBorderPen(column, row).width()); + docSpreadCellProperty["rightbordercolorred"] = TQString::number(spreadCell->rightBorderPen(column, row).color().red()); + docSpreadCellProperty["rightbordercolorgreen"] = TQString::number(spreadCell->rightBorderPen(column, row).color().green()); + docSpreadCellProperty["rightbordercolorblue"] = TQString::number(spreadCell->rightBorderPen(column, row).color().blue()); + docSpreadCellProperty["bottomborderwidth"] = TQString::number(spreadCell->bottomBorderPen(column, row).width()); docSpreadCellProperty["bottombordercolorname"] = spreadCell->bottomBorderPen(column, row).color().name(); - docSpreadCellProperty["bottombordercolorred"] = QString::number(spreadCell->bottomBorderPen(column, row).color().red()); - docSpreadCellProperty["bottombordercolorgreen"] = QString::number(spreadCell->bottomBorderPen(column, row).color().green()); - docSpreadCellProperty["bottombordercolorblue"] = QString::number(spreadCell->bottomBorderPen(column, row).color().blue()); + docSpreadCellProperty["bottombordercolorred"] = TQString::number(spreadCell->bottomBorderPen(column, row).color().red()); + docSpreadCellProperty["bottombordercolorgreen"] = TQString::number(spreadCell->bottomBorderPen(column, row).color().green()); + docSpreadCellProperty["bottombordercolorblue"] = TQString::number(spreadCell->bottomBorderPen(column, row).color().blue()); docSpreadCellProperty["bgcolorname"] = spreadCell->bgColor(column, row).name(); - docSpreadCellProperty["bgcolorred"] = QString::number(spreadCell->bgColor(column, row).red()); - docSpreadCellProperty["bgcolorgreen"] = QString::number(spreadCell->bgColor(column, row).green()); - docSpreadCellProperty["bgcolorblue"] = QString::number(spreadCell->bgColor(column, row).blue()); - docSpreadCellProperty["bgbrushstyle"] = QString::number(spreadCell->backGroundBrush(column, row).style()); + docSpreadCellProperty["bgcolorred"] = TQString::number(spreadCell->bgColor(column, row).red()); + docSpreadCellProperty["bgcolorgreen"] = TQString::number(spreadCell->bgColor(column, row).green()); + docSpreadCellProperty["bgcolorblue"] = TQString::number(spreadCell->bgColor(column, row).blue()); + docSpreadCellProperty["bgbrushstyle"] = TQString::number(spreadCell->backGroundBrush(column, row).style()); docSpreadCellProperty["valueempty"] = (spreadCell->value().isEmpty()==0?"false":"true"); docSpreadCellProperty["valueboolean"] = (spreadCell->value().isBoolean()==0?"false":"true"); docSpreadCellProperty["valueinteger"] = (spreadCell->value().isInteger()==0?"false":"true"); @@ -321,8 +321,8 @@ KoFilter::ConversionStatus Leader::doSpreadCell(Cell*spreadCell, int column, int docSpreadCellProperty["valuestring"] = (spreadCell->value().isString()==0?"false":"true"); docSpreadCellProperty["valueerror"] = (spreadCell->value().isError()==0?"false":"true"); docSpreadCellProperty["valueasboolean"] = (spreadCell->value().asBoolean()==0?"false":"true"); - docSpreadCellProperty["valueasinteger"] = QString::number(spreadCell->value().asInteger()); - docSpreadCellProperty["valueasfloat"] = QString::number(spreadCell->value().asFloat()); + docSpreadCellProperty["valueasinteger"] = TQString::number(spreadCell->value().asInteger()); + docSpreadCellProperty["valueasfloat"] = TQString::number(spreadCell->value().asFloat()); docSpreadCellProperty["valueasstring"] = spreadCell->value().asString(); docSpreadCellProperty["valueasdatetime"] = spreadCell->value().asDateTime().toString(); docSpreadCellProperty["valueaserror"] = spreadCell->value().errorMessage(); diff --git a/filters/kspread/libkspreadexport/KSpreadLeader.h b/filters/kspread/libkspreadexport/KSpreadLeader.h index eee950b9..7e9abfed 100644 --- a/filters/kspread/libkspreadexport/KSpreadLeader.h +++ b/filters/kspread/libkspreadexport/KSpreadLeader.h @@ -78,10 +78,10 @@ private: protected: KSpreadBaseWorker *getWorker() const; - KoFilter::ConversionStatus doSpreadCell(Cell *spreadCell, int column, int row); - KoFilter::ConversionStatus doSpreadSheet(Sheet *spreadSheet); - KoFilter::ConversionStatus doSpreadBook(Doc *document); - KoFilter::ConversionStatus doInfo(KoDocumentInfo *info); + KoFilter::ConversiontqStatus doSpreadCell(Cell *spreadCell, int column, int row); + KoFilter::ConversiontqStatus doSpreadSheet(Sheet *spreadSheet); + KoFilter::ConversiontqStatus doSpreadBook(Doc *document); + KoFilter::ConversiontqStatus doInfo(KoDocumentInfo *info); public: /** @@ -97,7 +97,7 @@ public: * * @return status of the conversion. */ - KoFilter::ConversionStatus convert(); + KoFilter::ConversiontqStatus convert(); }; } // namespace KSpread diff --git a/filters/kspread/opencalc/opencalcexport.cc b/filters/kspread/opencalc/opencalcexport.cc index 20915b51..f38b0bb8 100644 --- a/filters/kspread/opencalc/opencalcexport.cc +++ b/filters/kspread/opencalc/opencalcexport.cc @@ -24,11 +24,11 @@ #include <opencalcexport.h> -#include <qdatetime.h> -#include <qdom.h> -#include <qfile.h> -#include <qregexp.h> -#include <qvaluelist.h> +#include <tqdatetime.h> +#include <tqdom.h> +#include <tqfile.h> +#include <tqregexp.h> +#include <tqvaluelist.h> #include <kdebug.h> #include <kmessagebox.h> @@ -55,7 +55,7 @@ using namespace KSpread; -typedef QValueList<Reference> AreaList; +typedef TQValueList<Reference> AreaList; class OpenCalcExportFactory : KGenericFactory<OpenCalcExport, KoFilter> { @@ -78,20 +78,20 @@ K_EXPORT_COMPONENT_FACTORY( libopencalcexport, OpenCalcExportFactory() ) return false; \ } while(0) -OpenCalcExport::OpenCalcExport( KoFilter *, const char *, const QStringList & ) +OpenCalcExport::OpenCalcExport( KoFilter *, const char *, const TQStringList & ) : KoFilter(), m_locale( 0 ) { } -KoFilter::ConversionStatus OpenCalcExport::convert( const QCString & from, - const QCString & to ) +KoFilter::ConversiontqStatus OpenCalcExport::convert( const TQCString & from, + const TQCString & to ) { /* later... KSpreadLeader * leader = new KSpreadLeader( m_chain ); OpenCalcWorker * worker = new OpenCalcWorker(); leader->setWorker( worker ); - KoFilter::ConversionStatus status = leader->convert(); + KoFilter::ConversiontqStatus status = leader->convert(); delete worker; delete leader; @@ -104,7 +104,7 @@ KoFilter::ConversionStatus OpenCalcExport::convert( const QCString & from, if ( !document ) return KoFilter::StupidError; - if ( !::qt_cast<const KSpread::Doc *>( document ) ) + if ( !::tqqt_cast<const KSpread::Doc *>( document ) ) { kdWarning(30518) << "document isn't a KSpread::Doc but a " << document->className() << endl; @@ -183,20 +183,20 @@ bool OpenCalcExport::exportDocInfo( KoStore * store, const Doc* ksdoc ) KoDocumentInfoAbout * aboutPage = static_cast<KoDocumentInfoAbout *>( docInfo->page( "about" ) ); KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor*>( docInfo->page( "author" ) ); - QDomDocument meta; + TQDomDocument meta; meta.appendChild( meta.createProcessingInstruction( "xml","version=\"1.0\" encoding=\"UTF-8\"" ) ); - QDomElement content = meta.createElement( "office:document-meta" ); + TQDomElement content = meta.createElement( "office:document-meta" ); content.setAttribute( "xmlns:office", "http://openoffice.org/2000/office"); content.setAttribute( "xmlns:xlink", "http://www.w3.org/1999/xlink" ); content.setAttribute( "xmlns:dc", "http://purl.org/dc/elements/1.1/" ); content.setAttribute( "xmlns:meta", "http://openoffice.org/2000/meta" ); content.setAttribute( "office:version", "1.0" ); - QDomNode officeMeta = meta.createElement( "office:meta" ); + TQDomNode officeMeta = meta.createElement( "office:meta" ); - QDomElement data = meta.createElement( "meta:generator" ); - QString app( "KSpread " ); + TQDomElement data = meta.createElement( "meta:generator" ); + TQString app( "KSpread " ); app += KSpread::version; data.appendChild( meta.createTextNode( app ) ); officeMeta.appendChild( data ); @@ -214,7 +214,7 @@ bool OpenCalcExport::exportDocInfo( KoStore * store, const Doc* ksdoc ) officeMeta.appendChild( data ); data = meta.createElement( "meta:keywords" ); - QDomElement dataItem = meta.createElement( "meta:keyword" ); + TQDomElement dataItem = meta.createElement( "meta:keyword" ); dataItem.appendChild( meta.createTextNode( aboutPage->keywords() ) ); data.appendChild( dataItem ); officeMeta.appendChild( data ); @@ -227,7 +227,7 @@ bool OpenCalcExport::exportDocInfo( KoStore * store, const Doc* ksdoc ) data.appendChild( meta.createTextNode( aboutPage->subject() ) ); officeMeta.appendChild( data ); - const QDateTime dt ( QDateTime::currentDateTime() ); + const TQDateTime dt ( TQDateTime::tqcurrentDateTime() ); if ( dt.isValid() ) { data = meta.createElement( "dc:date" ); @@ -245,14 +245,14 @@ bool OpenCalcExport::exportDocInfo( KoStore * store, const Doc* ksdoc ) */ data = meta.createElement( "meta:document-statistic" ); - data.setAttribute( "meta:table-count", QString::number( ksdoc->map()->count() ) ); + data.setAttribute( "meta:table-count", TQString::number( ksdoc->map()->count() ) ); // TODO: data.setAttribute( "meta:cell-count", ); officeMeta.appendChild( data ); content.appendChild( officeMeta ); meta.appendChild( content ); - QCString doc( meta.toCString() ); + TQCString doc( meta.toCString() ); kdDebug(30518) << "Meta: " << doc << endl; store->write( doc, doc.length() ); @@ -268,32 +268,32 @@ bool OpenCalcExport::exportSettings( KoStore * store, const Doc * ksdoc ) if ( !store->open( "settings.xml" ) ) return false; - QDomDocument doc; + TQDomDocument doc; doc.appendChild( doc.createProcessingInstruction( "xml","version=\"1.0\" encoding=\"UTF-8\"" ) ); - QDomElement settings = doc.createElement( "office:document-settings" ); + TQDomElement settings = doc.createElement( "office:document-settings" ); settings.setAttribute( "xmlns:office", "http://openoffice.org/2000/office"); settings.setAttribute( "xmlns:xlink", "http://www.w3.org/1999/xlink" ); settings.setAttribute( "xmlns:config", "http://openoffice.org/2001/config" ); settings.setAttribute( "office:version", "1.0" ); - QDomElement begin = doc.createElement( "office:settings" ); + TQDomElement begin = doc.createElement( "office:settings" ); - QDomElement configItem = doc.createElement("config:config-item-set" ); + TQDomElement configItem = doc.createElement("config:config-item-set" ); configItem.setAttribute( "config:name", "view-settings" ); - QDomElement mapIndexed = doc.createElement( "config:config-item-map-indexed" ); + TQDomElement mapIndexed = doc.createElement( "config:config-item-map-indexed" ); mapIndexed.setAttribute("config:name", "Views" ); configItem.appendChild( mapIndexed ); - QDomElement mapItem = doc.createElement("config:config-item-map-entry" ); + TQDomElement mapItem = doc.createElement("config:config-item-map-entry" ); - QDomElement attribute = doc.createElement("config:config-item" ); + TQDomElement attribute = doc.createElement("config:config-item" ); attribute.setAttribute( "config:name", "ActiveTable" ); attribute.setAttribute( "config:type", "string" ); View * view = static_cast<View*>( ksdoc->views().getFirst()); - QString activeTable; + TQString activeTable; if ( view ) // no view if embedded document { Canvas * canvas = view->canvasWidget(); @@ -304,30 +304,30 @@ bool OpenCalcExport::exportSettings( KoStore * store, const Doc * ksdoc ) attribute.appendChild( doc.createTextNode( activeTable ) ); mapItem.appendChild( attribute ); - QDomElement configmaped = doc.createElement( "config:config-item-map-named" ); + TQDomElement configmaped = doc.createElement( "config:config-item-map-named" ); configmaped.setAttribute( "config:name","Tables" ); - QPtrListIterator<Sheet> it( ksdoc->map()->sheetList() ); + TQPtrListIterator<Sheet> it( ksdoc->map()->sheetList() ); for( ; it.current(); ++it ) { - QPoint marker; + TQPoint marker; if ( view ) { marker = view->markerFromSheet( *it ); } - QDomElement tmpItemMapNamed = doc.createElement( "config:config-item-map-entry" ); + TQDomElement tmpItemMapNamed = doc.createElement( "config:config-item-map-entry" ); tmpItemMapNamed.setAttribute( "config:name", ( *it )->tableName() ); - QDomElement sheetAttribute = doc.createElement( "config:config-item" ); + TQDomElement sheetAttribute = doc.createElement( "config:config-item" ); sheetAttribute.setAttribute( "config:name", "CursorPositionX" ); sheetAttribute.setAttribute( "config:type", "int" ); - sheetAttribute.appendChild( doc.createTextNode( QString::number(marker.x() ) ) ); + sheetAttribute.appendChild( doc.createTextNode( TQString::number(marker.x() ) ) ); tmpItemMapNamed.appendChild( sheetAttribute ); sheetAttribute = doc.createElement( "config:config-item" ); sheetAttribute.setAttribute( "config:name", "CursorPositionY" ); sheetAttribute.setAttribute( "config:type", "int" ); - sheetAttribute.appendChild( doc.createTextNode( QString::number(marker.y() ) ) ); + sheetAttribute.appendChild( doc.createTextNode( TQString::number(marker.y() ) ) ); tmpItemMapNamed.appendChild( sheetAttribute ); configmaped.appendChild( tmpItemMapNamed ); @@ -344,7 +344,7 @@ bool OpenCalcExport::exportSettings( KoStore * store, const Doc * ksdoc ) doc.appendChild( settings ); - QCString f( doc.toCString() ); + TQCString f( doc.toCString() ); kdDebug(30518) << "Settings: " << (char const * ) f << endl; store->write( f, f.length() ); @@ -362,10 +362,10 @@ bool OpenCalcExport::exportContent( KoStore * store, const Doc * ksdoc ) createDefaultStyles(); - QDomDocument doc; + TQDomDocument doc; doc.appendChild( doc.createProcessingInstruction( "xml","version=\"1.0\" encoding=\"UTF-8\"" ) ); - QDomElement content = doc.createElement( "office:document-content" ); + TQDomElement content = doc.createElement( "office:document-content" ); content.setAttribute( "xmlns:office", "http://openoffice.org/2000/office"); content.setAttribute( "xmlns:style", "http://openoffice.org/2000/style" ); content.setAttribute( "xmlns:text", "http://openoffice.org/2000/text" ); @@ -383,7 +383,7 @@ bool OpenCalcExport::exportContent( KoStore * store, const Doc * ksdoc ) content.setAttribute( "office:class", "spreadsheet" ); content.setAttribute( "office:version", "1.0" ); - QDomElement data = doc.createElement( "office:script" ); + TQDomElement data = doc.createElement( "office:script" ); content.appendChild( data ); if ( !exportBody( doc, content, ksdoc ) ) @@ -391,7 +391,7 @@ bool OpenCalcExport::exportContent( KoStore * store, const Doc * ksdoc ) doc.appendChild( content ); - QCString f( doc.toCString() ); + TQCString f( doc.toCString() ); kdDebug(30518) << "Content: " << (char const * ) f << endl; store->write( f, f.length() ); @@ -402,7 +402,7 @@ bool OpenCalcExport::exportContent( KoStore * store, const Doc * ksdoc ) return true; } -void exportNamedExpr( QDomDocument & doc, QDomElement & parent, +void exportNamedExpr( TQDomDocument & doc, TQDomElement & tqparent, AreaList const & namedAreas ) { AreaList::const_iterator it = namedAreas.begin(); @@ -410,7 +410,7 @@ void exportNamedExpr( QDomDocument & doc, QDomElement & parent, while ( it != end ) { - QDomElement namedRange = doc.createElement( "table:named-range" ); + TQDomElement namedRange = doc.createElement( "table:named-range" ); Reference ref = *it; @@ -418,34 +418,34 @@ void exportNamedExpr( QDomDocument & doc, QDomElement & parent, namedRange.setAttribute( "table:base-cell-address", convertRefToBase( ref.sheet_name, ref.rect ) ); namedRange.setAttribute( "table:cell-range-address", convertRefToRange( ref.sheet_name, ref.rect ) ); - parent.appendChild( namedRange ); + tqparent.appendChild( namedRange ); ++it; } } -bool OpenCalcExport::exportBody( QDomDocument & doc, QDomElement & content, const Doc * ksdoc ) +bool OpenCalcExport::exportBody( TQDomDocument & doc, TQDomElement & content, const Doc * ksdoc ) { - QDomElement fontDecls = doc.createElement( "office:font-decls" ); - QDomElement autoStyles = doc.createElement( "office:automatic-styles" ); - QDomElement body = doc.createElement( "office:body" ); + TQDomElement fontDecls = doc.createElement( "office:font-decls" ); + TQDomElement autoStyles = doc.createElement( "office:automatic-styles" ); + TQDomElement body = doc.createElement( "office:body" ); if ( ksdoc->map()->isProtected() ) { body.setAttribute( "table:structure-protected", "true" ); - QCString passwd; + TQCString passwd; ksdoc->map()->password( passwd ); if ( passwd.length() > 0 ) { - QCString str( KCodecs::base64Encode( passwd ) ); - body.setAttribute( "table:protection-key", QString( str.data() ) ); + TQCString str( KCodecs::base64Encode( passwd ) ); + body.setAttribute( "table:protection-key", TQString( str.data() ) ); } } - QPtrListIterator<Sheet> it( ksdoc->map()->sheetList() ); + TQPtrListIterator<Sheet> it( ksdoc->map()->sheetList() ); for( it.toFirst(); it.current(); ++it ) { @@ -456,37 +456,37 @@ bool OpenCalcExport::exportBody( QDomDocument & doc, QDomElement & content, cons ts.visible = !sheet->isHidden(); - QDomElement tabElem = doc.createElement( "table:table" ); + TQDomElement tabElem = doc.createElement( "table:table" ); tabElem.setAttribute( "table:style-name", m_styles.sheetStyle( ts ) ); if ( sheet->isProtected() ) { tabElem.setAttribute( "table:protected", "true" ); - QCString passwd; + TQCString passwd; sheet->password( passwd ); if ( passwd.length() > 0 ) { - QCString str( KCodecs::base64Encode( passwd ) ); - tabElem.setAttribute( "table:protection-key", QString( str.data() ) ); + TQCString str( KCodecs::base64Encode( passwd ) ); + tabElem.setAttribute( "table:protection-key", TQString( str.data() ) ); } } - QString name( sheet->tableName() ); + TQString name( sheet->tableName() ); - int n = name.find( ' ' ); + int n = name.tqfind( ' ' ); if ( n != -1 ) { kdDebug(30518) << "Sheet name converting: " << name << endl; name[n] == '_'; kdDebug(30518) << "Sheet name converted: " << name << endl; } - name = name.replace( ' ', "_" ); + name = name.tqreplace( ' ', "_" ); - QRect _printRange = sheet->print()->printRange(); - if ( _printRange != ( QRect( QPoint( 1, 1 ), QPoint( KS_colMax, KS_rowMax ) ) ) ) + TQRect _printRange = sheet->print()->printRange(); + if ( _printRange != ( TQRect( TQPoint( 1, 1 ), TQPoint( KS_colMax, KS_rowMax ) ) ) ) { - QString range= convertRangeToRef( name, _printRange ); + TQString range= convertRangeToRef( name, _printRange ); //kdDebug(30518)<<" range : "<<range<<endl; tabElem.setAttribute( "table:print-ranges", range ); } @@ -507,7 +507,7 @@ bool OpenCalcExport::exportBody( QDomDocument & doc, QDomElement & content, cons AreaList namedAreas = kspreadDoc->listArea(); if ( namedAreas.count() > 0 ) { - QDomElement namedExpr = doc.createElement( "table:named-expressions" ); + TQDomElement namedExpr = doc.createElement( "table:named-expressions" ); exportNamedExpr( doc, namedExpr, namedAreas ); body.appendChild( namedExpr ); @@ -523,7 +523,7 @@ bool OpenCalcExport::exportBody( QDomDocument & doc, QDomElement & content, cons return true; } -void OpenCalcExport::exportSheet( QDomDocument & doc, QDomElement & tabElem, +void OpenCalcExport::exportSheet( TQDomDocument & doc, TQDomElement & tabElem, const Sheet * sheet, int maxCols, int maxRows ) { kdDebug(30518) << "exportSheet: " << sheet->tableName() << endl; @@ -553,14 +553,14 @@ void OpenCalcExport::exportSheet( QDomDocument & doc, QDomElement & tabElem, ++j; } - QDomElement colElem = doc.createElement( "table:table-column" ); + TQDomElement colElem = doc.createElement( "table:table-column" ); colElem.setAttribute( "table:style-name", m_styles.columnStyle( cs ) ); colElem.setAttribute( "table:default-cell-style-name", "Default" );//todo fixme create style from cell if ( hide ) colElem.setAttribute( "table:visibility", "collapse" ); if ( repeated > 1 ) - colElem.setAttribute( "table:number-columns-repeated", QString::number( repeated ) ); + colElem.setAttribute( "table:number-columns-repeated", TQString::number( repeated ) ); tabElem.appendChild( colElem ); i += repeated; @@ -573,7 +573,7 @@ void OpenCalcExport::exportSheet( QDomDocument & doc, QDomElement & tabElem, rs.breakB = ::Style::automatic; rs.size = row->mmHeight() / 10; - QDomElement rowElem = doc.createElement( "table:table-row" ); + TQDomElement rowElem = doc.createElement( "table:table-row" ); rowElem.setAttribute( "table:style-name", m_styles.rowStyle( rs ) ); if ( row->isHide() ) rowElem.setAttribute( "table:visibility", "collapse" ); @@ -584,7 +584,7 @@ void OpenCalcExport::exportSheet( QDomDocument & doc, QDomElement & tabElem, } } -void OpenCalcExport::exportCells( QDomDocument & doc, QDomElement & rowElem, +void OpenCalcExport::exportCells( TQDomDocument & doc, TQDomElement & rowElem, const Sheet *sheet, int row, int maxCols ) { int i = 1; @@ -593,14 +593,14 @@ void OpenCalcExport::exportCells( QDomDocument & doc, QDomElement & rowElem, int repeated = 1; bool hasComment = false; const Cell* cell = sheet->cellAt( i, row ); - QDomElement cellElem; + TQDomElement cellElem; if ( !cell->isPartOfMerged() ) cellElem = doc.createElement( "table:table-cell" ); else cellElem = doc.createElement( "table:covered-table-cell" ); - QFont font; + TQFont font; Value const value( cell->value() ); if ( !cell->isDefault() ) { @@ -635,7 +635,7 @@ void OpenCalcExport::exportCells( QDomDocument & doc, QDomElement & rowElem, ++j; } if ( repeated > 1 ) - cellElem.setAttribute( "table:number-columns-repeated", QString::number( repeated ) ); + cellElem.setAttribute( "table:number-columns-repeated", TQString::number( repeated ) ); } if ( value.isBoolean() ) @@ -654,7 +654,7 @@ void OpenCalcExport::exportCells( QDomDocument & doc, QDomElement & rowElem, else cellElem.setAttribute( "table:value-type", "float" ); - cellElem.setAttribute( "table:value", QString::number( value.asFloat() ) ); + cellElem.setAttribute( "table:value", TQString::number( value.asFloat() ) ); } else { @@ -665,15 +665,15 @@ void OpenCalcExport::exportCells( QDomDocument & doc, QDomElement & rowElem, { kdDebug(30518) << "Formula found" << endl; - QString formula( convertFormula( cell->text() ) ); + TQString formula( convertFormula( cell->text() ) ); cellElem.setAttribute( "table:formula", formula ); } else if ( !cell->link().isEmpty() ) { - QDomElement link = doc.createElement( "text:p" ); - QDomElement linkref = doc.createElement( "text:a" ); + TQDomElement link = doc.createElement( "text:p" ); + TQDomElement linkref = doc.createElement( "text:a" ); - QString tmp = cell->link(); + TQString tmp = cell->link(); if ( localReferenceAnchor( tmp ) ) linkref.setAttribute( "xlink:href", ( "#"+tmp ) ); else @@ -686,7 +686,7 @@ void OpenCalcExport::exportCells( QDomDocument & doc, QDomElement & rowElem, } else if ( !cell->isEmpty() ) { - QDomElement textElem = doc.createElement( "text:p" ); + TQDomElement textElem = doc.createElement( "text:p" ); textElem.appendChild( doc.createTextNode( cell->strOutText() ) ); cellElem.appendChild( textElem ); @@ -699,17 +699,17 @@ void OpenCalcExport::exportCells( QDomDocument & doc, QDomElement & rowElem, int rowSpan = cell->mergedYCells() + 1; if ( colSpan > 1 ) - cellElem.setAttribute( "table:number-columns-spanned", QString::number( colSpan ) ); + cellElem.setAttribute( "table:number-columns-spanned", TQString::number( colSpan ) ); if ( rowSpan > 1 ) - cellElem.setAttribute( "table:number-rows-spanned", QString::number( rowSpan ) ); + cellElem.setAttribute( "table:number-rows-spanned", TQString::number( rowSpan ) ); } if ( hasComment ) { - QString comment( cell->format()->comment( i, row ) ); - QDomElement annotation = doc.createElement( "office:annotation" ); - QDomElement text = doc.createElement( "text:p" ); + TQString comment( cell->format()->comment( i, row ) ); + TQDomElement annotation = doc.createElement( "office:annotation" ); + TQDomElement text = doc.createElement( "text:p" ); text.appendChild( doc.createTextNode( comment ) ); annotation.appendChild( text ); @@ -764,10 +764,10 @@ bool OpenCalcExport::exportStyles( KoStore * store, const Doc *ksdoc ) if ( !store->open( "styles.xml" ) ) return false; - QDomDocument doc; + TQDomDocument doc; doc.appendChild( doc.createProcessingInstruction( "xml","version=\"1.0\" encoding=\"UTF-8\"" ) ); - QDomElement content = doc.createElement( "office:document-styles" ); + TQDomElement content = doc.createElement( "office:document-styles" ); content.setAttribute( "xmlns:office", "http://openoffice.org/2000/office" ); content.setAttribute( "xmlns:style", "http://openoffice.org/2000/style" ); content.setAttribute( "xmlns:text", "http://openoffice.org/2000/text" ); @@ -785,24 +785,24 @@ bool OpenCalcExport::exportStyles( KoStore * store, const Doc *ksdoc ) content.setAttribute( "office:version", "1.0" ); // order important here! - QDomElement officeStyles = doc.createElement( "office:styles" ); + TQDomElement officeStyles = doc.createElement( "office:styles" ); exportDefaultCellStyle( doc, officeStyles ); - QDomElement fontDecls = doc.createElement( "office:font-decls" ); + TQDomElement fontDecls = doc.createElement( "office:font-decls" ); m_styles.writeFontDecl( doc, fontDecls ); // TODO: needs in new number/date/time parser... // exportDefaultNumberStyles( doc, officeStyles ); - QDomElement defaultStyle = doc.createElement( "style:style" ); + TQDomElement defaultStyle = doc.createElement( "style:style" ); defaultStyle.setAttribute( "style:name", "Default" ); defaultStyle.setAttribute( "style:family", "table-cell" ); officeStyles.appendChild( defaultStyle ); - QDomElement autoStyles = doc.createElement( "office:automatic-styles" ); + TQDomElement autoStyles = doc.createElement( "office:automatic-styles" ); exportPageAutoStyles( doc, autoStyles, ksdoc ); - QDomElement masterStyles = doc.createElement( "office:master-styles" ); + TQDomElement masterStyles = doc.createElement( "office:master-styles" ); exportMasterStyles( doc, masterStyles, ksdoc ); content.appendChild( fontDecls ); @@ -812,7 +812,7 @@ bool OpenCalcExport::exportStyles( KoStore * store, const Doc *ksdoc ) doc.appendChild( content ); - QCString f( doc.toCString() ); + TQCString f( doc.toCString() ); kdDebug(30518) << "Content: " << (char const * ) f << endl; store->write( f, f.length() ); @@ -823,9 +823,9 @@ bool OpenCalcExport::exportStyles( KoStore * store, const Doc *ksdoc ) return true; } -void OpenCalcExport::exportDefaultCellStyle( QDomDocument & doc, QDomElement & officeStyles ) +void OpenCalcExport::exportDefaultCellStyle( TQDomDocument & doc, TQDomElement & officeStyles ) { - QDomElement defStyle = doc.createElement( "style:default-style" ); + TQDomElement defStyle = doc.createElement( "style:default-style" ); defStyle.setAttribute( "style:family", "table-cell" ); KoDocument * document = m_chain->inputDocument(); @@ -833,19 +833,19 @@ void OpenCalcExport::exportDefaultCellStyle( QDomDocument & doc, QDomElement & o Format * format = new Format( 0, ksdoc->styleManager()->defaultStyle() ); const KLocale *locale = ksdoc->locale(); - QString language; - QString country; - QString charSet; + TQString language; + TQString country; + TQString charSet; - QString l( locale->language() ); + TQString l( locale->language() ); KLocale::splitLocale( l, language, country, charSet ); - QFont font( format->font() ); + TQFont font( format->font() ); m_styles.addFont( font, true ); - QDomElement style = doc.createElement( "style:properties" ); + TQDomElement style = doc.createElement( "style:properties" ); style.setAttribute( "style:font-name", font.family() ); - style.setAttribute( "fo:font-size", QString( "%1pt" ).arg( font.pointSize() ) ); - style.setAttribute( "style:decimal-places", QString::number( locale->fracDigits() ) ); + style.setAttribute( "fo:font-size", TQString( "%1pt" ).tqarg( font.pointSize() ) ); + style.setAttribute( "style:decimal-places", TQString::number( locale->fracDigits() ) ); style.setAttribute( "fo:language", language ); style.setAttribute( "fo:country", country ); style.setAttribute( "style:font-name-asian", "HG Mincho Light J" ); @@ -866,10 +866,10 @@ void OpenCalcExport::createDefaultStyles() // TODO: default number styles, currency styles,... } -void OpenCalcExport::exportPageAutoStyles( QDomDocument & doc, QDomElement & autoStyles, +void OpenCalcExport::exportPageAutoStyles( TQDomDocument & doc, TQDomElement & autoStyles, const Doc *ksdoc ) { - QPtrListIterator<Sheet> it( ksdoc->map()->sheetList() ); + TQPtrListIterator<Sheet> it( ksdoc->map()->sheetList() ); const Sheet * sheet = it.toFirst(); float width = 20.999; @@ -881,13 +881,13 @@ void OpenCalcExport::exportPageAutoStyles( QDomDocument & doc, QDomElement & aut height = sheet->print()->paperHeight() / 10; } - QString sWidth = QString( "%1cm" ).arg( width ); - QString sHeight = QString( "%1cm" ).arg( height ); + TQString sWidth = TQString( "%1cm" ).tqarg( width ); + TQString sHeight = TQString( "%1cm" ).tqarg( height ); - QDomElement pageMaster = doc.createElement( "style:page-master" ); + TQDomElement pageMaster = doc.createElement( "style:page-master" ); pageMaster.setAttribute( "style:name", "pm1" ); - QDomElement properties = doc.createElement( "style:properties" ); + TQDomElement properties = doc.createElement( "style:properties" ); properties.setAttribute( "fo:page-width", sWidth ); properties.setAttribute( "fo:page-height", sHeight ); properties.setAttribute( "fo:border", "0.002cm solid #000000" ); @@ -896,7 +896,7 @@ void OpenCalcExport::exportPageAutoStyles( QDomDocument & doc, QDomElement & aut pageMaster.appendChild( properties ); - QDomElement header = doc.createElement( "style:header-style" ); + TQDomElement header = doc.createElement( "style:header-style" ); properties = doc.createElement( "style:properties" ); properties.setAttribute( "fo:min-height", "0.75cm" ); properties.setAttribute( "fo:margin-left", "0cm" ); @@ -905,7 +905,7 @@ void OpenCalcExport::exportPageAutoStyles( QDomDocument & doc, QDomElement & aut header.appendChild( properties ); - QDomElement footer = doc.createElement( "style:header-style" ); + TQDomElement footer = doc.createElement( "style:header-style" ); properties = doc.createElement( "style:properties" ); properties.setAttribute( "fo:min-height", "0.75cm" ); properties.setAttribute( "fo:margin-left", "0cm" ); @@ -920,22 +920,22 @@ void OpenCalcExport::exportPageAutoStyles( QDomDocument & doc, QDomElement & aut autoStyles.appendChild( pageMaster ); } -void OpenCalcExport::exportMasterStyles( QDomDocument & doc, QDomElement & masterStyles, +void OpenCalcExport::exportMasterStyles( TQDomDocument & doc, TQDomElement & masterStyles, const Doc * ksdoc ) { - QDomElement masterPage = doc.createElement( "style:master-page" ); + TQDomElement masterPage = doc.createElement( "style:master-page" ); masterPage.setAttribute( "style:name", "Default" ); masterPage.setAttribute( "style:page-master-name", "pm1" ); - QPtrListIterator<Sheet> it( ksdoc->map()->sheetList() ); + TQPtrListIterator<Sheet> it( ksdoc->map()->sheetList() ); const Sheet * sheet = it.toFirst(); - QString headerLeft; - QString headerCenter; - QString headerRight; - QString footerLeft; - QString footerCenter; - QString footerRight; + TQString headerLeft; + TQString headerCenter; + TQString headerRight; + TQString footerLeft; + TQString footerCenter; + TQString footerRight; if ( sheet ) { @@ -950,19 +950,19 @@ void OpenCalcExport::exportMasterStyles( QDomDocument & doc, QDomElement & maste if ( ( headerLeft.length() > 0 ) || ( headerCenter.length() > 0 ) || ( headerRight.length() > 0 ) ) { - QDomElement header = doc.createElement( "style:header" ); - QDomElement left = doc.createElement( "style:region-left" ); - QDomElement text = doc.createElement( "text:p" ); + TQDomElement header = doc.createElement( "style:header" ); + TQDomElement left = doc.createElement( "style:region-left" ); + TQDomElement text = doc.createElement( "text:p" ); convertPart( headerLeft, doc, text, ksdoc ); left.appendChild( text ); - QDomElement center = doc.createElement( "style:region-center" ); - QDomElement text1 = doc.createElement( "text:p" ); + TQDomElement center = doc.createElement( "style:region-center" ); + TQDomElement text1 = doc.createElement( "text:p" ); convertPart( headerCenter, doc, text1, ksdoc ); center.appendChild( text1 ); - QDomElement right = doc.createElement( "style:region-right" ); - QDomElement text2 = doc.createElement( "text:p" ); + TQDomElement right = doc.createElement( "style:region-right" ); + TQDomElement text2 = doc.createElement( "text:p" ); convertPart( headerRight, doc, text2, ksdoc ); right.appendChild( text2 ); @@ -974,9 +974,9 @@ void OpenCalcExport::exportMasterStyles( QDomDocument & doc, QDomElement & maste } else { - QDomElement header = doc.createElement( "style:header" ); - QDomElement text = doc.createElement( "text:p" ); - QDomElement name = doc.createElement( "text:sheet-name" ); + TQDomElement header = doc.createElement( "style:header" ); + TQDomElement text = doc.createElement( "text:p" ); + TQDomElement name = doc.createElement( "text:sheet-name" ); name.appendChild( doc.createTextNode( "???" ) ); text.appendChild( name ); header.appendChild( text ); @@ -987,19 +987,19 @@ void OpenCalcExport::exportMasterStyles( QDomDocument & doc, QDomElement & maste if ( ( footerLeft.length() > 0 ) || ( footerCenter.length() > 0 ) || ( footerRight.length() > 0 ) ) { - QDomElement footer = doc.createElement( "style:footer" ); - QDomElement left = doc.createElement( "style:region-left" ); - QDomElement text = doc.createElement( "text:p" ); + TQDomElement footer = doc.createElement( "style:footer" ); + TQDomElement left = doc.createElement( "style:region-left" ); + TQDomElement text = doc.createElement( "text:p" ); convertPart( footerLeft, doc, text, ksdoc ); left.appendChild( text ); - QDomElement center = doc.createElement( "style:region-center" ); - QDomElement text1 = doc.createElement( "text:p" ); + TQDomElement center = doc.createElement( "style:region-center" ); + TQDomElement text1 = doc.createElement( "text:p" ); convertPart( footerCenter, doc, text1, ksdoc ); center.appendChild( text1 ); - QDomElement right = doc.createElement( "style:region-right" ); - QDomElement text2 = doc.createElement( "text:p" ); + TQDomElement right = doc.createElement( "style:region-right" ); + TQDomElement text2 = doc.createElement( "text:p" ); convertPart( footerRight, doc, text2, ksdoc ); right.appendChild( text2 ); @@ -1011,10 +1011,10 @@ void OpenCalcExport::exportMasterStyles( QDomDocument & doc, QDomElement & maste } else { - QDomElement footer = doc.createElement( "style:footer" ); - QDomElement text = doc.createElement( "text:p" ); + TQDomElement footer = doc.createElement( "style:footer" ); + TQDomElement text = doc.createElement( "text:p" ); text.appendChild( doc.createTextNode( i18n( "Page " ) ) ); - QDomElement number = doc.createElement( "text:page-number" ); + TQDomElement number = doc.createElement( "text:page-number" ); number.appendChild( doc.createTextNode( "1" ) ); text.appendChild( number ); footer.appendChild( text ); @@ -1025,18 +1025,18 @@ void OpenCalcExport::exportMasterStyles( QDomDocument & doc, QDomElement & maste masterStyles.appendChild( masterPage ); } -void OpenCalcExport::addText( QString const & text, QDomDocument & doc, - QDomElement & parent ) +void OpenCalcExport::addText( TQString const & text, TQDomDocument & doc, + TQDomElement & tqparent ) { if (text.length() > 0 ) - parent.appendChild( doc.createTextNode( text ) ); + tqparent.appendChild( doc.createTextNode( text ) ); } -void OpenCalcExport::convertPart( QString const & part, QDomDocument & doc, - QDomElement & parent, const Doc * ksdoc ) +void OpenCalcExport::convertPart( TQString const & part, TQDomDocument & doc, + TQDomElement & tqparent, const Doc * ksdoc ) { - QString text; - QString var; + TQString text; + TQString var; bool inVar = false; uint i = 0; @@ -1052,54 +1052,54 @@ void OpenCalcExport::convertPart( QString const & part, QDomDocument & doc, inVar = false; if ( var == "<page>" ) { - addText( text, doc, parent ); + addText( text, doc, tqparent ); - QDomElement page = doc.createElement( "text:page-number" ); + TQDomElement page = doc.createElement( "text:page-number" ); page.appendChild( doc.createTextNode( "1" ) ); - parent.appendChild( page ); + tqparent.appendChild( page ); } else if ( var == "<pages>" ) { - addText( text, doc, parent ); + addText( text, doc, tqparent ); - QDomElement page = doc.createElement( "text:page-count" ); + TQDomElement page = doc.createElement( "text:page-count" ); page.appendChild( doc.createTextNode( "99" ) ); - parent.appendChild( page ); + tqparent.appendChild( page ); } else if ( var == "<date>" ) { - addText( text, doc, parent ); + addText( text, doc, tqparent ); - QDomElement t = doc.createElement( "text:date" ); + TQDomElement t = doc.createElement( "text:date" ); t.setAttribute( "text:date-value", "0-00-00" ); // todo: "style:data-style-name", "N2" - t.appendChild( doc.createTextNode( QDate::currentDate().toString() ) ); - parent.appendChild( t ); + t.appendChild( doc.createTextNode( TQDate::tqcurrentDate().toString() ) ); + tqparent.appendChild( t ); } else if ( var == "<time>" ) { - addText( text, doc, parent ); + addText( text, doc, tqparent ); - QDomElement t = doc.createElement( "text:time" ); - t.appendChild( doc.createTextNode( QTime::currentTime().toString() ) ); - parent.appendChild( t ); + TQDomElement t = doc.createElement( "text:time" ); + t.appendChild( doc.createTextNode( TQTime::currentTime().toString() ) ); + tqparent.appendChild( t ); } else if ( var == "<file>" ) // filepath + name { - addText( text, doc, parent ); + addText( text, doc, tqparent ); - QDomElement t = doc.createElement( "text:file-name" ); + TQDomElement t = doc.createElement( "text:file-name" ); t.setAttribute( "text:display", "full" ); t.appendChild( doc.createTextNode( "???" ) ); - parent.appendChild( t ); + tqparent.appendChild( t ); } else if ( var == "<name>" ) // filename { - addText( text, doc, parent ); + addText( text, doc, tqparent ); - QDomElement t = doc.createElement( "text:title" ); + TQDomElement t = doc.createElement( "text:title" ); t.appendChild( doc.createTextNode( "???" ) ); - parent.appendChild( t ); + tqparent.appendChild( t ); } else if ( var == "<author>" ) { @@ -1108,7 +1108,7 @@ void OpenCalcExport::convertPart( QString const & part, QDomDocument & doc, text += authorPage->fullName(); - addText( text, doc, parent ); + addText( text, doc, tqparent ); } else if ( var == "<email>" ) { @@ -1117,7 +1117,7 @@ void OpenCalcExport::convertPart( QString const & part, QDomDocument & doc, text += authorPage->email(); - addText( text, doc, parent ); + addText( text, doc, tqparent ); } else if ( var == "<org>" ) { @@ -1126,21 +1126,21 @@ void OpenCalcExport::convertPart( QString const & part, QDomDocument & doc, text += authorPage->company(); - addText( text, doc, parent ); + addText( text, doc, tqparent ); } else if ( var == "<sheet>" ) { - addText( text, doc, parent ); + addText( text, doc, tqparent ); - QDomElement s = doc.createElement( "text:sheet-name" ); + TQDomElement s = doc.createElement( "text:sheet-name" ); s.appendChild( doc.createTextNode( "???" ) ); - parent.appendChild( s ); + tqparent.appendChild( s ); } else { // no known variable: text += var; - addText( text, doc, parent ); + addText( text, doc, tqparent ); } text = ""; @@ -1156,24 +1156,24 @@ void OpenCalcExport::convertPart( QString const & part, QDomDocument & doc, if ( !text.isEmpty() || !var.isEmpty() ) { //we don't have var at the end =>store it - addText( text+var, doc, parent ); + addText( text+var, doc, tqparent ); } } -QString OpenCalcExport::convertFormula( QString const & formula ) const +TQString OpenCalcExport::convertFormula( TQString const & formula ) const { - QChar decimalSymbol( '.' ); + TQChar decimalSymbol( '.' ); if ( m_locale ) { - const QString decimal ( m_locale->decimalSymbol() ); + const TQString decimal ( m_locale->decimalSymbol() ); if ( !decimal.isEmpty() ) { decimalSymbol = decimal.at( 0 ); } } - QString s; - QRegExp exp("(\\$?)([a-zA-Z]+)(\\$?)([0-9]+)"); + TQString s; + TQRegExp exp("(\\$?)([a-zA-Z]+)(\\$?)([0-9]+)"); int n = exp.search( formula, 0 ); kdDebug(30518) << "Exp: " << formula << ", n: " << n << ", Length: " << formula.length() << ", Matched length: " << exp.matchedLength() << endl; @@ -1264,16 +1264,16 @@ bool OpenCalcExport::writeMetaFile( KoStore * store, uint filesWritten ) if ( !store->open( "manifest.xml" ) ) return false; - QDomImplementation impl; - QDomDocumentType type( impl.createDocumentType( "manifest:manifest", "-//OpenOffice.org//DTD Manifest 1.0//EN", "Manifest.dtd" ) ); + TQDomImplementation impl; + TQDomDocumentType type( impl.createDocumentType( "manifest:manifest", "-//OpenOffice.org//DTD Manifest 1.0//EN", "Manifest.dtd" ) ); - QDomDocument meta( type ); + TQDomDocument meta( type ); meta.appendChild( meta.createProcessingInstruction( "xml","version=\"1.0\" encoding=\"UTF-8\"" ) ); - QDomElement content = meta.createElement( "manifest:manifest" ); + TQDomElement content = meta.createElement( "manifest:manifest" ); content.setAttribute( "xmlns:manifest", "http://openoffice.org/2001/manifest" ); - QDomElement entry = meta.createElement( "manifest:file-entry" ); + TQDomElement entry = meta.createElement( "manifest:file-entry" ); entry.setAttribute( "manifest:media-type", "application/vnd.sun.xml.calc" ); entry.setAttribute( "manifest:full-path", "/" ); content.appendChild( entry ); @@ -1315,7 +1315,7 @@ bool OpenCalcExport::writeMetaFile( KoStore * store, uint filesWritten ) meta.appendChild( content ); - QCString doc( meta.toCString() ); + TQCString doc( meta.toCString() ); kdDebug(30518) << "Manifest: " << doc << endl; store->write( doc, doc.length() ); diff --git a/filters/kspread/opencalc/opencalcexport.h b/filters/kspread/opencalc/opencalcexport.h index 6a265fce..54748144 100644 --- a/filters/kspread/opencalc/opencalcexport.h +++ b/filters/kspread/opencalc/opencalcexport.h @@ -24,10 +24,10 @@ #include "opencalcstyleexport.h" #include <KoFilter.h> -#include <qptrlist.h> +#include <tqptrlist.h> -class QDomDocument; -class QDomElement; +class TQDomDocument; +class TQDomElement; class KLocale; class KoStore; @@ -40,13 +40,14 @@ class Sheet; class OpenCalcExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - OpenCalcExport( KoFilter * parent, const char * name, const QStringList & ); + OpenCalcExport( KoFilter * tqparent, const char * name, const TQStringList & ); virtual ~OpenCalcExport() {} - virtual KoFilter::ConversionStatus convert( const QCString & from, - const QCString & to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString & from, + const TQCString & to ); private: enum files { metaXML = 0x01, contentXML = 0x02, stylesXML = 0x04, settingsXML = 0x08 }; @@ -59,28 +60,28 @@ class OpenCalcExport : public KoFilter bool exportContent( KoStore * store, const KSpread::Doc * ksdoc ); bool exportSettings( KoStore * store, const KSpread::Doc * ksdoc ); - bool exportBody( QDomDocument & doc, QDomElement & content, const KSpread::Doc * ksdoc ); - void exportSheet( QDomDocument & doc, QDomElement & tabElem, + bool exportBody( TQDomDocument & doc, TQDomElement & content, const KSpread::Doc * ksdoc ); + void exportSheet( TQDomDocument & doc, TQDomElement & tabElem, const KSpread::Sheet * sheet, int maxCols, int maxRows ); - void exportCells( QDomDocument & doc, QDomElement & rowElem, + void exportCells( TQDomDocument & doc, TQDomElement & rowElem, const KSpread::Sheet * sheet, int row, int maxCols ); - void exportDefaultCellStyle( QDomDocument & doc, QDomElement & officeStyles ); - void exportPageAutoStyles( QDomDocument & doc, QDomElement & autoStyles, + void exportDefaultCellStyle( TQDomDocument & doc, TQDomElement & officeStyles ); + void exportPageAutoStyles( TQDomDocument & doc, TQDomElement & autoStyles, const KSpread::Doc * ksdoc ); - void exportMasterStyles( QDomDocument & doc, QDomElement & masterStyles, + void exportMasterStyles( TQDomDocument & doc, TQDomElement & masterStyles, const KSpread::Doc *ksdoc ); bool writeMetaFile( KoStore * store, uint filesWritten ); void maxRowCols( const KSpread::Sheet * sheet, int & maxCols, int & maxRows ); - void convertPart( QString const & part, QDomDocument & doc, - QDomElement & parent, const KSpread::Doc * ksdoc ); - void addText( QString const & text, QDomDocument & doc, - QDomElement & parent ); + void convertPart( TQString const & part, TQDomDocument & doc, + TQDomElement & tqparent, const KSpread::Doc * ksdoc ); + void addText( TQString const & text, TQDomDocument & doc, + TQDomElement & tqparent ); void createDefaultStyles(); - QString convertFormula( QString const & formula ) const; + TQString convertFormula( TQString const & formula ) const; private: /// Pointer to the KSpread locale KLocale* m_locale; diff --git a/filters/kspread/opencalc/opencalcimport.cc b/filters/kspread/opencalc/opencalcimport.cc index 8330519f..1f8e6b50 100644 --- a/filters/kspread/opencalc/opencalcimport.cc +++ b/filters/kspread/opencalc/opencalcimport.cc @@ -21,11 +21,11 @@ #include <float.h> #include <math.h> -#include <qcolor.h> -#include <qfile.h> -#include <qfont.h> -#include <qpen.h> -#include <qxml.h> +#include <tqcolor.h> +#include <tqfile.h> +#include <tqfont.h> +#include <tqpen.h> +#include <tqxml.h> #include "opencalcimport.h" @@ -71,16 +71,16 @@ protected: K_EXPORT_COMPONENT_FACTORY( libopencalcimport, OpenCalcImportFactory() ) -OpenCalcImport::OpenCalcPoint::OpenCalcPoint( QString const & str ) +OpenCalcImport::OpenCalcPoint::OpenCalcPoint( TQString const & str ) : isRange( false ) { bool inQuote = false; int l = str.length(); int colonPos = -1; - QString range; + TQString range; - // replace '.' with '!' + // tqreplace '.' with '!' for ( int i = 0; i < l; ++i ) { if ( str[i] == '$' ) @@ -131,7 +131,7 @@ OpenCalcImport::OpenCalcPoint::OpenCalcPoint( QString const & str ) } -OpenCalcImport::OpenCalcImport( KoFilter *, const char *, const QStringList & ) +OpenCalcImport::OpenCalcImport( KoFilter *, const char *, const TQStringList & ) : KoFilter(), m_styles( 17, true ), m_defaultStyles( 17, true ), @@ -152,14 +152,14 @@ double timeToNum( int h, int m, int s ) return (double) secs / (double) SECSPERDAY; } -bool OpenCalcImport::readRowFormat( QDomElement & rowNode, QDomElement * rowStyle, +bool OpenCalcImport::readRowFormat( TQDomElement & rowNode, TQDomElement * rowStyle, Sheet * table, int & row, int & number, bool isLast ) { if ( rowNode.isNull() ) return false; - QDomNode node; + TQDomNode node; if ( rowStyle ) { node = rowStyle->firstChild(); @@ -168,29 +168,29 @@ bool OpenCalcImport::readRowFormat( QDomElement & rowNode, QDomElement * rowStyl double height = -1.0; bool insertPageBreak = false; - Format layout( table, table->doc()->styleManager()->defaultStyle() ); + Format tqlayout( table, table->doc()->styleManager()->defaultStyle() ); while( !node.isNull() ) { - QDomElement property = node.toElement(); + TQDomElement property = node.toElement(); kdDebug(30518) << "Row: Child exists: " << property.tagName() << endl; if ( !property.isNull() && property.localName() == "properties" && property.namespaceURI() == ooNS::style ) { if ( property.hasAttributeNS( ooNS::style, "row-height" ) ) { - height = KoUnit::parseValue( property.attributeNS( ooNS::style, "row-height", QString::null ) , -1 ); + height = KoUnit::parseValue( property.attributeNS( ooNS::style, "row-height", TQString() ) , -1 ); } if ( property.hasAttributeNS( ooNS::fo, "break-before" ) ) { - if ( property.attributeNS( ooNS::fo, "break-before", QString::null ) == "page" ) + if ( property.attributeNS( ooNS::fo, "break-before", TQString() ) == "page" ) { insertPageBreak = true; } } - loadStyleProperties( &layout, property ); + loadStyleProperties( &tqlayout, property ); } node = node.nextSibling(); @@ -199,7 +199,7 @@ bool OpenCalcImport::readRowFormat( QDomElement & rowNode, QDomElement * rowStyl if ( rowNode.hasAttributeNS( ooNS::table, "number-rows-repeated" ) ) { bool ok = true; - int n = rowNode.attributeNS( ooNS::table, "number-rows-repeated", QString::null ).toInt( &ok ); + int n = rowNode.attributeNS( ooNS::table, "number-rows-repeated", TQString() ).toInt( &ok ); if ( ok ) number = n; kdDebug(30518) << "Row repeated: " << number << endl; @@ -219,7 +219,7 @@ bool OpenCalcImport::readRowFormat( QDomElement & rowNode, QDomElement * rowStyl for ( int i = 0; i < number; ++i ) { RowFormat * rowL = table->nonDefaultRowFormat( row ); - rowL->copy( layout ); + rowL->copy( tqlayout ); if ( height != -1 ) { @@ -237,7 +237,7 @@ bool OpenCalcImport::readRowFormat( QDomElement & rowNode, QDomElement * rowStyl return true; } -QString OpenCalcImport::translatePar( QString & par ) const +TQString OpenCalcImport::translatePar( TQString & par ) const { OpenCalcPoint point( par ); kdDebug(30518) << " Parameter: " << par << ", Translation: " << point.translation << endl; @@ -245,11 +245,11 @@ QString OpenCalcImport::translatePar( QString & par ) const return point.translation; } -void OpenCalcImport::checkForNamedAreas( QString & formula ) const +void OpenCalcImport::checkForNamedAreas( TQString & formula ) const { int l = formula.length(); int i = 0; - QString word; + TQString word; int start = 0; while ( i < l ) { @@ -261,9 +261,9 @@ void OpenCalcImport::checkForNamedAreas( QString & formula ) const } if ( word.length() > 0 ) { - if ( m_namedAreas.find( word ) != m_namedAreas.end() ) + if ( m_namedAreas.tqfind( word ) != m_namedAreas.end() ) { - formula = formula.replace( start, word.length(), "'" + word + "'" ); + formula = formula.tqreplace( start, word.length(), "'" + word + "'" ); l = formula.length(); ++i; kdDebug(30518) << "Formula: " << formula << ", L: " << l << ", i: " << i + 1 <<endl; @@ -276,9 +276,9 @@ void OpenCalcImport::checkForNamedAreas( QString & formula ) const } if ( word.length() > 0 ) { - if ( m_namedAreas.find( word ) != m_namedAreas.end() ) + if ( m_namedAreas.tqfind( word ) != m_namedAreas.end() ) { - formula = formula.replace( start, word.length(), "'" + word + "'" ); + formula = formula.tqreplace( start, word.length(), "'" + word + "'" ); l = formula.length(); ++i; kdDebug(30518) << "Formula: " << formula << ", L: " << l << ", i: " << i + 1 <<endl; @@ -286,12 +286,12 @@ void OpenCalcImport::checkForNamedAreas( QString & formula ) const } } -void OpenCalcImport::convertFormula( QString & text, QString const & f ) const +void OpenCalcImport::convertFormula( TQString & text, TQString const & f ) const { kdDebug(30518) << "Parsing formula: " << f << endl; - QString formula; - QString parameter; + TQString formula; + TQString parameter; int l = f.length(); int p = 0; @@ -319,7 +319,7 @@ void OpenCalcImport::convertFormula( QString & text, QString const & f ) const if ( formula == "=MULTIPLE.OPERATIONS" ) formula = "=MULTIPLEOPERATIONS"; - QString par; + TQString par; bool isPar = false; bool inQuote = false; @@ -377,20 +377,20 @@ void OpenCalcImport::convertFormula( QString & text, QString const & f ) const kdDebug(30518) << "New formula: " << text << endl; } -bool OpenCalcImport::readCells( QDomElement & rowNode, Sheet * table, int row, int & columns ) +bool OpenCalcImport::readCells( TQDomElement & rowNode, Sheet * table, int row, int & columns ) { bool ok = true; int spanC = 1; int spanR = 1; //Cell* defCell = table->defaultCell(); - QDomNode cellNode = KoDom::namedItemNS( rowNode, ooNS::table, "table-cell" ); + TQDomNode cellNode = KoDom::namedItemNS( rowNode, ooNS::table, "table-cell" ); while ( !cellNode.isNull() ) { spanR = 1; spanC = 1; - QDomElement e = cellNode.toElement(); + TQDomElement e = cellNode.toElement(); if ( e.isNull() ) { ++columns; @@ -406,22 +406,22 @@ bool OpenCalcImport::readCells( QDomElement & rowNode, Sheet * table, int row, // ="3" table:number-rows-spanned="1" if ( e.hasAttributeNS( ooNS::table, "number-columns-spanned" ) ) { - int span = e.attributeNS( ooNS::table, "number-columns-spanned", QString::null ).toInt( &ok ); + int span = e.attributeNS( ooNS::table, "number-columns-spanned", TQString() ).toInt( &ok ); if ( ok ) spanC = span; } if ( e.hasAttributeNS( ooNS::table, "number-rows-spanned" ) ) { - int span = e.attributeNS( ooNS::table, "number-rows-spanned", QString::null ).toInt( &ok ); + int span = e.attributeNS( ooNS::table, "number-rows-spanned", TQString() ).toInt( &ok ); if ( ok ) spanR = span; } - QString text; - QDomElement textP = KoDom::namedItemNS( e, ooNS::text, "p" ); + TQString text; + TQDomElement textP = KoDom::namedItemNS( e, ooNS::text, "p" ); if ( !textP.isNull() ) { - QDomElement subText = textP.firstChild().toElement(); // ## wrong + TQDomElement subText = textP.firstChild().toElement(); // ## wrong if ( !subText.isNull() ) { // something in <text:p>, e.g. links @@ -429,7 +429,7 @@ bool OpenCalcImport::readCells( QDomElement & rowNode, Sheet * table, int row, if ( subText.hasAttributeNS( ooNS::xlink, "href" ) ) { - QString link = subText.attributeNS( ooNS::xlink, "href", QString::null ); + TQString link = subText.attributeNS( ooNS::xlink, "href", TQString() ); if ( link[0]=='#' ) link=link.remove( 0, 1 ); if ( !cell ) @@ -440,14 +440,14 @@ bool OpenCalcImport::readCells( QDomElement & rowNode, Sheet * table, int row, else text = textP.text(); // our text, could contain formating for value or result of formula } - QDomElement annotation = KoDom::namedItemNS( e, ooNS::office, "annotation" ); + TQDomElement annotation = KoDom::namedItemNS( e, ooNS::office, "annotation" ); if ( !annotation.isNull() ) { - QString comment; - QDomNode node = annotation.firstChild(); + TQString comment; + TQDomNode node = annotation.firstChild(); while( !node.isNull() ) { - QDomElement commentElement = node.toElement(); + TQDomElement commentElement = node.toElement(); if( !commentElement.isNull() ) if ( commentElement.localName() == "p" && e.namespaceURI()==ooNS::text) { @@ -475,30 +475,30 @@ bool OpenCalcImport::readCells( QDomElement & rowNode, Sheet * table, int row, if ( !cell ) cell = table->nonDefaultCell( columns, row ); - QString psName( "Default" ); - if ( e.hasAttributeNS( ooNS::style, "parent-style-name" ) ) - psName = e.attributeNS( ooNS::style, "parent-style-name", QString::null ); + TQString psName( "Default" ); + if ( e.hasAttributeNS( ooNS::style, "tqparent-style-name" ) ) + psName = e.attributeNS( ooNS::style, "tqparent-style-name", TQString() ); kdDebug(30518) << "Default style: " << psName << endl; - Format * layout = m_defaultStyles[psName]; + Format * tqlayout = m_defaultStyles[psName]; - if ( layout ) - cell->format()->copy( *layout ); + if ( tqlayout ) + cell->format()->copy( *tqlayout ); - QDomElement * st = 0; + TQDomElement * st = 0; if ( e.hasAttributeNS( ooNS::table, "style-name" ) ) { - kdDebug(30518) << "Style: " << e.attributeNS( ooNS::table, "style-name", QString::null ) << endl; - st = m_styles[ e.attributeNS( ooNS::table, "style-name", QString::null ) ]; + kdDebug(30518) << "Style: " << e.attributeNS( ooNS::table, "style-name", TQString() ) << endl; + st = m_styles[ e.attributeNS( ooNS::table, "style-name", TQString() ) ]; } if ( st ) { kdDebug(30518) << "Style: adapting " << endl; - QDomNode node = st->firstChild(); + TQDomNode node = st->firstChild(); bool foundValidation = false; while( !node.isNull() ) { - QDomElement property = node.toElement(); + TQDomElement property = node.toElement(); if ( !property.isNull() ) { kdDebug(30518)<<"property.tagName() :"<<property.tagName()<<endl; @@ -512,7 +512,7 @@ bool OpenCalcImport::readCells( QDomElement & rowNode, Sheet * table, int row, loadStyleProperties( cell->format(), property ); if ( cell->format()->getAngle( columns, row ) != 0 ) { - QFontMetrics fm( cell->format()->textFont( columns, row ) ); + TQFontMetrics fm( cell->format()->textFont( columns, row ) ); int tmpAngle = cell->format()->getAngle( columns, row ); int textHeight = static_cast<int>( cos( tmpAngle * M_PI / 180 ) * ( fm.ascent() + fm.descent() ) @@ -546,18 +546,18 @@ bool OpenCalcImport::readCells( QDomElement & rowNode, Sheet * table, int row, if ( !cell ) cell = table->nonDefaultCell( columns, row ); - QString psName( "Default" ); + TQString psName( "Default" ); kdDebug(30518) << "Default style: " << psName << endl; - Format * layout = m_defaultStyles[psName]; + Format * tqlayout = m_defaultStyles[psName]; - if ( layout ) - cell->format()->copy( *layout ); + if ( tqlayout ) + cell->format()->copy( *tqlayout ); } if ( e.hasAttributeNS( ooNS::table, "formula" ) ) { isFormula = true; - QString formula; - convertFormula( formula, e.attributeNS( ooNS::table, "formula", QString::null ) ); + TQString formula; + convertFormula( formula, e.attributeNS( ooNS::table, "formula", TQString() ) ); if ( !cell ) cell = table->nonDefaultCell( columns, row ); @@ -565,8 +565,8 @@ bool OpenCalcImport::readCells( QDomElement & rowNode, Sheet * table, int row, } if ( e.hasAttributeNS( ooNS::table, "validation-name" ) ) { - kdDebug(30518)<<" Celle has a validation :"<<e.attributeNS( ooNS::table, "validation-name", QString::null )<<endl; - loadOasisValidation( cell->getValidity(), e.attributeNS( ooNS::table, "validation-name", QString::null ) ); + kdDebug(30518)<<" Celle has a validation :"<<e.attributeNS( ooNS::table, "validation-name", TQString() )<<endl; + loadOasisValidation( cell->getValidity(), e.attributeNS( ooNS::table, "validation-name", TQString() ) ); } if ( e.hasAttributeNS( ooNS::table, "value-type" ) ) { @@ -575,8 +575,8 @@ bool OpenCalcImport::readCells( QDomElement & rowNode, Sheet * table, int row, cell->setCellText( text ); - QString value = e.attributeNS( ooNS::table, "value", QString::null ); - QString type = e.attributeNS( ooNS::table, "value-type", QString::null ); + TQString value = e.attributeNS( ooNS::table, "value", TQString() ); + TQString type = e.attributeNS( ooNS::table, "value-type", TQString() ); kdDebug(30518) << "Value: " << value << ", type: " << type << endl; @@ -593,7 +593,7 @@ bool OpenCalcImport::readCells( QDomElement & rowNode, Sheet * table, int row, if ( type == "currency" ) { - cell->format()->setCurrency( 1, e.attributeNS( ooNS::table, "currency", QString::null ) ); + cell->format()->setCurrency( 1, e.attributeNS( ooNS::table, "currency", TQString() ) ); cell->format()->setFormatType( Money_format ); } } @@ -615,7 +615,7 @@ bool OpenCalcImport::readCells( QDomElement & rowNode, Sheet * table, int row, else if ( type == "boolean" ) { if ( value.isEmpty() ) - value = e.attributeNS( ooNS::table, "boolean-value", QString::null ); + value = e.attributeNS( ooNS::table, "boolean-value", TQString() ); kdDebug(30518) << "Type: boolean" << endl; if ( value == "true" ) @@ -628,20 +628,20 @@ bool OpenCalcImport::readCells( QDomElement & rowNode, Sheet * table, int row, else if ( type == "date" ) { if ( value.isEmpty() ) - value = e.attributeNS( ooNS::table, "date-value", QString::null ); + value = e.attributeNS( ooNS::table, "date-value", TQString() ); kdDebug(30518) << "Type: date, value: " << value << endl; // "1980-10-15" int year=0, month=0, day=0; ok = false; - int p1 = value.find( '-' ); + int p1 = value.tqfind( '-' ); if ( p1 > 0 ) year = value.left( p1 ).toInt( &ok ); kdDebug(30518) << "year: " << value.left( p1 ) << endl; - int p2 = value.find( '-', ++p1 ); + int p2 = value.tqfind( '-', ++p1 ); if ( ok ) month = value.mid( p1, p2 - p1 ).toInt( &ok ); @@ -655,23 +655,23 @@ bool OpenCalcImport::readCells( QDomElement & rowNode, Sheet * table, int row, if ( ok ) { - QDateTime dt( QDate( year, month, day ) ); + TQDateTime dt( TQDate( year, month, day ) ); // KSpreadValue kval( dt ); // cell->setValue( kval ); - cell->setValue( QDate( year, month, day ) ); - kdDebug(30518) << "Set QDate: " << year << " - " << month << " - " << day << endl; + cell->setValue( TQDate( year, month, day ) ); + kdDebug(30518) << "Set TQDate: " << year << " - " << month << " - " << day << endl; } } else if ( type == "time" ) { if ( value.isEmpty() ) - value = e.attributeNS( ooNS::table, "time-value", QString::null ); + value = e.attributeNS( ooNS::table, "time-value", TQString() ); kdDebug(30518) << "Type: time: " << value << endl; // "PT15H10M12S" int hours=0, minutes=0, seconds=0; int l = value.length(); - QString num; + TQString num; for ( int i = 0; i < l; ++i ) { @@ -702,7 +702,7 @@ bool OpenCalcImport::readCells( QDomElement & rowNode, Sheet * table, int row, { // KSpreadValue kval( timeToNum( hours, minutes, seconds ) ); // cell->setValue( kval ); - cell->setValue( QTime( hours % 24, minutes, seconds ) ); + cell->setValue( TQTime( hours % 24, minutes, seconds ) ); cell->format()->setFormatType( Custom_format ); } } @@ -731,7 +731,7 @@ bool OpenCalcImport::readCells( QDomElement & rowNode, Sheet * table, int row, { // copy cell from left bool ok = false; - int number = e.attributeNS( ooNS::table, "number-columns-repeated", QString::null ).toInt( &ok ); + int number = e.attributeNS( ooNS::table, "number-columns-repeated", TQString() ).toInt( &ok ); Cell* cellDest = 0; // don't repeat more than 10 if it is the last cell and empty @@ -760,18 +760,18 @@ bool OpenCalcImport::readCells( QDomElement & rowNode, Sheet * table, int row, } -void OpenCalcImport::loadCondition( Cell*cell,const QDomElement &property ) +void OpenCalcImport::loadCondition( Cell*cell,const TQDomElement &property ) { - kdDebug(30518)<<"void OpenCalcImport::loadCondition( Cell*cell,const QDomElement &property )*******\n"; + kdDebug(30518)<<"void OpenCalcImport::loadCondition( Cell*cell,const TQDomElement &property )*******\n"; loadOasisCondition( cell, property ); } -void OpenCalcImport::loadOasisCondition(Cell*cell,const QDomElement &property ) +void OpenCalcImport::loadOasisCondition(Cell*cell,const TQDomElement &property ) { - QDomElement elementItem( property ); + TQDomElement elementItem( property ); StyleManager * manager = cell->sheet()->doc()->styleManager(); - QValueList<Conditional> cond; + TQValueList<Conditional> cond; while ( !elementItem.isNull() ) { kdDebug(30518)<<"elementItem.tagName() :"<<elementItem.tagName()<<endl; @@ -779,13 +779,13 @@ void OpenCalcImport::loadOasisCondition(Cell*cell,const QDomElement &property ) if ( elementItem.localName()== "map" && property.namespaceURI() == ooNS::style ) { bool ok = true; - kdDebug(30518)<<"elementItem.attribute(style:condition ) :"<<elementItem.attributeNS( ooNS::style, "condition", QString::null )<<endl; + kdDebug(30518)<<"elementItem.attribute(style:condition ) :"<<elementItem.attributeNS( ooNS::style, "condition", TQString() )<<endl; Conditional newCondition; - loadOasisConditionValue( elementItem.attributeNS( ooNS::style, "condition", QString::null ), newCondition ); + loadOasisConditionValue( elementItem.attributeNS( ooNS::style, "condition", TQString() ), newCondition ); if ( elementItem.hasAttributeNS( ooNS::style, "apply-style-name" ) ) { - kdDebug(30518)<<"elementItem.attribute( style:apply-style-name ) :"<<elementItem.attributeNS( ooNS::style, "apply-style-name", QString::null )<<endl; - newCondition.styleName = new QString( elementItem.attributeNS( ooNS::style, "apply-style-name", QString::null ) ); + kdDebug(30518)<<"elementItem.attribute( style:apply-style-name ) :"<<elementItem.attributeNS( ooNS::style, "apply-style-name", TQString() )<<endl; + newCondition.styleName = new TQString( elementItem.attributeNS( ooNS::style, "apply-style-name", TQString() ) ); newCondition.style = manager->style( *newCondition.styleName ); if ( !newCondition.style ) ok = false; @@ -804,29 +804,29 @@ void OpenCalcImport::loadOasisCondition(Cell*cell,const QDomElement &property ) cell->setConditionList( cond ); } -void OpenCalcImport::loadOasisConditionValue( const QString &styleCondition, Conditional &newCondition ) +void OpenCalcImport::loadOasisConditionValue( const TQString &styleCondition, Conditional &newCondition ) { - QString val( styleCondition ); - if ( val.contains( "cell-content()" ) ) + TQString val( styleCondition ); + if ( val.tqcontains( "cell-content()" ) ) { val = val.remove( "cell-content()" ); loadOasisCondition( val,newCondition ); } //GetFunction ::= cell-content-is-between(Value, Value) | cell-content-is-not-between(Value, Value) //for the moment we support just int/double value, not text/date/time :( - if ( val.contains( "cell-content-is-between(" ) ) + if ( val.tqcontains( "cell-content-is-between(" ) ) { val = val.remove( "cell-content-is-between(" ); val = val.remove( ")" ); - QStringList listVal = QStringList::split( "," , val ); + TQStringList listVal = TQStringList::split( "," , val ); loadOasisValidationValue( listVal, newCondition ); newCondition.cond = Conditional::Between; } - if ( val.contains( "cell-content-is-not-between(" ) ) + if ( val.tqcontains( "cell-content-is-not-between(" ) ) { val = val.remove( "cell-content-is-not-between(" ); val = val.remove( ")" ); - QStringList listVal = QStringList::split( ",", val ); + TQStringList listVal = TQStringList::split( ",", val ); loadOasisValidationValue( listVal,newCondition ); newCondition.cond = Conditional::Different; } @@ -834,36 +834,36 @@ void OpenCalcImport::loadOasisConditionValue( const QString &styleCondition, Con } -void OpenCalcImport::loadOasisCondition( QString &valExpression, Conditional &newCondition ) +void OpenCalcImport::loadOasisCondition( TQString &valExpression, Conditional &newCondition ) { - QString value; - if (valExpression.find( "<=" )==0 ) + TQString value; + if (valExpression.tqfind( "<=" )==0 ) { value = valExpression.remove( 0,2 ); newCondition.cond = Conditional::InferiorEqual; } - else if (valExpression.find( ">=" )==0 ) + else if (valExpression.tqfind( ">=" )==0 ) { value = valExpression.remove( 0,2 ); newCondition.cond = Conditional::SuperiorEqual; } - else if (valExpression.find( "!=" )==0 ) + else if (valExpression.tqfind( "!=" )==0 ) { //add Differentto attribute value = valExpression.remove( 0,2 ); newCondition.cond = Conditional::DifferentTo; } - else if ( valExpression.find( "<" )==0 ) + else if ( valExpression.tqfind( "<" )==0 ) { value = valExpression.remove( 0,1 ); newCondition.cond = Conditional::Inferior; } - else if(valExpression.find( ">" )==0 ) + else if(valExpression.tqfind( ">" )==0 ) { value = valExpression.remove( 0,1 ); newCondition.cond = Conditional::Superior; } - else if (valExpression.find( "=" )==0 ) + else if (valExpression.tqfind( "=" )==0 ) { value = valExpression.remove( 0,1 ); newCondition.cond = Conditional::Equal; @@ -878,7 +878,7 @@ void OpenCalcImport::loadOasisCondition( QString &valExpression, Conditional &ne newCondition.val1 = value.toInt(&ok); if ( !ok ) { - newCondition.strVal1 = new QString( value ); + newCondition.strVal1 = new TQString( value ); kdDebug(30518)<<" Try to parse this value :"<<value<<endl; } @@ -886,7 +886,7 @@ void OpenCalcImport::loadOasisCondition( QString &valExpression, Conditional &ne } -void OpenCalcImport::loadOasisValidationValue( const QStringList &listVal, Conditional &newCondition ) +void OpenCalcImport::loadOasisValidationValue( const TQStringList &listVal, Conditional &newCondition ) { bool ok = false; kdDebug(30518)<<" listVal[0] :"<<listVal[0]<<" listVal[1] :"<<listVal[1]<<endl; @@ -897,7 +897,7 @@ void OpenCalcImport::loadOasisValidationValue( const QStringList &listVal, Condi newCondition.val1 = listVal[0].toInt(&ok); if ( !ok ) { - newCondition.strVal1 = new QString( listVal[0] ); + newCondition.strVal1 = new TQString( listVal[0] ); kdDebug(30518)<<" Try to parse this value :"<<listVal[0]<<endl; } } @@ -908,14 +908,14 @@ void OpenCalcImport::loadOasisValidationValue( const QStringList &listVal, Condi newCondition.val2 = listVal[1].toInt(&ok); if ( !ok ) { - newCondition.strVal2 = new QString( listVal[1] ); + newCondition.strVal2 = new TQString( listVal[1] ); kdDebug(30518)<<" Try to parse this value :"<<listVal[1]<<endl; } } } -bool OpenCalcImport::readRowsAndCells( QDomElement & content, Sheet * table ) +bool OpenCalcImport::readRowsAndCells( TQDomElement & content, Sheet * table ) { kdDebug(30518) << endl << "Reading in rows " << endl; @@ -923,30 +923,30 @@ bool OpenCalcImport::readRowsAndCells( QDomElement & content, Sheet * table ) int row = 1; int columns = 1; int backupRow = 1; - QDomElement * rowStyle = 0; + TQDomElement * rowStyle = 0; //Cell* cell = 0; //Cell* cellDest = 0; //Cell* defCell = table->defaultCell(); - QDomNode rowNode = KoDom::namedItemNS( content, ooNS::table, "table-row" ); + TQDomNode rowNode = KoDom::namedItemNS( content, ooNS::table, "table-row" ); while ( !rowNode.isNull() ) { bool collapsed = false; int number = 1; - QDomElement r = rowNode.toElement(); + TQDomElement r = rowNode.toElement(); if ( r.isNull() ) return false; if ( r.hasAttributeNS( ooNS::table, "style-name" ) ) { - QString style = r.attributeNS( ooNS::table, "style-name", QString::null ); + TQString style = r.attributeNS( ooNS::table, "style-name", TQString() ); rowStyle = m_styles[ style ]; kdDebug(30518) << "Row style: " << style << endl; } - collapsed = ( r.attributeNS( ooNS::table, "visibility", QString::null ) == "collapse" ); + collapsed = ( r.attributeNS( ooNS::table, "visibility", TQString() ) == "collapse" ); backupRow = row; @@ -959,20 +959,20 @@ bool OpenCalcImport::readRowsAndCells( QDomElement & content, Sheet * table ) return false; RowFormat * srcLayout = table->nonDefaultRowFormat( backupRow ); - RowFormat * layout = 0; + RowFormat * tqlayout = 0; if ( collapsed ) srcLayout->setHide( true ); for ( i = 1; i < number; ++i ) { - layout = table->nonDefaultRowFormat( backupRow + i ); + tqlayout = table->nonDefaultRowFormat( backupRow + i ); - layout->copy( *srcLayout ); + tqlayout->copy( *srcLayout ); /* * TODO: Test: do we need to copy the cells, too? - * if so we will probably also need to copy them for repeated col layouts. + * if so we will probably also need to copy them for repeated col tqlayouts. for ( j = 1; j <= columns; ++j ) { Cell* cell = table->cellAt( j, backupRow ); @@ -996,11 +996,11 @@ bool OpenCalcImport::readRowsAndCells( QDomElement & content, Sheet * table ) return true; } -bool OpenCalcImport::readColLayouts( QDomElement & content, Sheet * table ) +bool OpenCalcImport::readColLayouts( TQDomElement & content, Sheet * table ) { kdDebug(30518) << endl << "Reading in columns..." << endl; - QDomNode colLayout = KoDom::namedItemNS( content, ooNS::table, "table-column" ); + TQDomNode colLayout = KoDom::namedItemNS( content, ooNS::table, "table-column" ); int column = 1; while ( !colLayout.isNull() ) @@ -1008,7 +1008,7 @@ bool OpenCalcImport::readColLayouts( QDomElement & content, Sheet * table ) if ( colLayout.nodeName() != "table:table-column" ) return true; // all cols read in. - QDomElement e = colLayout.toElement(); + TQDomElement e = colLayout.toElement(); if ( e.isNull() ) return false; // error, that's it... @@ -1017,7 +1017,7 @@ bool OpenCalcImport::readColLayouts( QDomElement & content, Sheet * table ) int number = 1; double width = -1.0; - bool collapsed = ( e.attributeNS( ooNS::table, "visibility", QString::null ) == "collapse" ); + bool collapsed = ( e.attributeNS( ooNS::table, "visibility", TQString() ) == "collapse" ); bool insertPageBreak = false; Format styleLayout( table, table->doc()->styleManager()->defaultStyle() ); @@ -1025,7 +1025,7 @@ bool OpenCalcImport::readColLayouts( QDomElement & content, Sheet * table ) if ( e.hasAttributeNS( ooNS::table, "number-columns-repeated" ) ) { bool ok = true; - number = e.attributeNS( ooNS::table, "number-columns-repeated", QString::null ).toInt( &ok ); + number = e.attributeNS( ooNS::table, "number-columns-repeated", TQString() ).toInt( &ok ); if ( !ok ) number = 1; @@ -1035,26 +1035,26 @@ bool OpenCalcImport::readColLayouts( QDomElement & content, Sheet * table ) kdDebug(30518) << "Checking table:default-cell-style-name" << endl; if ( e.hasAttributeNS( ooNS::table, "default-cell-style-name" ) ) { - QString n( e.attributeNS( ooNS::table, "default-cell-style-name", QString::null ) ); + TQString n( e.attributeNS( ooNS::table, "default-cell-style-name", TQString() ) ); kdDebug(30518) << "Has attribute default-cell-style-name: " << n << endl; Format * defaultStyle = m_defaultStyles[ n ]; if ( !defaultStyle ) { - QString name = e.attributeNS( ooNS::table, "default-cell-style-name", QString::null ); - QDomElement * st = m_styles[ name ]; + TQString name = e.attributeNS( ooNS::table, "default-cell-style-name", TQString() ); + TQDomElement * st = m_styles[ name ]; kdDebug(30518) << "Default cell style: " << name << endl; if ( st && !st->isNull() ) { - Format * layout = new Format( 0, m_doc->styleManager()->defaultStyle() ); + Format * tqlayout = new Format( 0, m_doc->styleManager()->defaultStyle() ); - readInStyle( layout, *st ); + readInStyle( tqlayout, *st ); - m_defaultStyles.insert( name, layout ); + m_defaultStyles.insert( name, tqlayout ); kdDebug(30518) << "Insert default cell style: " << name << endl; - defaultStyle = layout; + defaultStyle = tqlayout; } } @@ -1065,35 +1065,35 @@ bool OpenCalcImport::readColLayouts( QDomElement & content, Sheet * table ) } } - QDomElement * colStyle = 0; + TQDomElement * colStyle = 0; if ( e.hasAttributeNS( ooNS::table, "style-name" ) ) { - QString style = e.attributeNS( ooNS::table, "style-name", QString::null ); + TQString style = e.attributeNS( ooNS::table, "style-name", TQString() ); colStyle = m_styles[ style ]; kdDebug(30518) << "Col Style: " << style << endl; } - QDomNode node; + TQDomNode node; if ( colStyle ) node = colStyle->firstChild(); while( !node.isNull() ) { - QDomElement property = node.toElement(); + TQDomElement property = node.toElement(); if ( !property.isNull() && property.localName() == "properties" && property.namespaceURI() == ooNS::style ) { if ( property.hasAttributeNS( ooNS::style, "column-width" ) ) { - QString sWidth = property.attributeNS( ooNS::style, "column-width", QString::null ); - width = KoUnit::parseValue( property.attributeNS( ooNS::style, "column-width", QString::null ), width ); + TQString sWidth = property.attributeNS( ooNS::style, "column-width", TQString() ); + width = KoUnit::parseValue( property.attributeNS( ooNS::style, "column-width", TQString() ), width ); kdDebug(30518) << "Col Width: " << sWidth << endl; } if ( property.hasAttributeNS( ooNS::fo, "break-before" ) ) { - if ( property.attributeNS( ooNS::fo, "break-before", QString::null ) == "page" ) + if ( property.attributeNS( ooNS::fo, "break-before", TQString() ) == "page" ) { insertPageBreak = true; } @@ -1133,23 +1133,23 @@ bool OpenCalcImport::readColLayouts( QDomElement & content, Sheet * table ) return true; } -void replaceMacro( QString & text, QString const & old, QString const & newS ) +void replaceMacro( TQString & text, TQString const & old, TQString const & newS ) { - int n = text.find( old ); + int n = text.tqfind( old ); if ( n != -1 ) - text = text.replace( n, old.length(), newS ); + text = text.tqreplace( n, old.length(), newS ); } -QString getPart( QDomNode const & part ) +TQString getPart( TQDomNode const & part ) { - QString result; - QDomElement e = KoDom::namedItemNS( part, ooNS::text, "p" ); + TQString result; + TQDomElement e = KoDom::namedItemNS( part, ooNS::text, "p" ); while ( !e.isNull() ) { - QString text = e.text(); + TQString text = e.text(); kdDebug(30518) << "PART: " << text << endl; - QDomElement macro = KoDom::namedItemNS( e, ooNS::text, "time" ); + TQDomElement macro = KoDom::namedItemNS( e, ooNS::text, "time" ); if ( !macro.isNull() ) replaceMacro( text, macro.text(), "<time>" ); @@ -1187,11 +1187,11 @@ QString getPart( QDomNode const & part ) } void OpenCalcImport::loadTableMasterStyle( Sheet * table, - QString const & stylename ) + TQString const & stylename ) { kdDebug(30518) << "Loading table master style: " << stylename << endl; - QDomElement * style = m_styles[ stylename ]; + TQDomElement * style = m_styles[ stylename ]; if ( !style ) { @@ -1199,16 +1199,16 @@ void OpenCalcImport::loadTableMasterStyle( Sheet * table, return; } - QDomNode header = KoDom::namedItemNS( *style, ooNS::style, "header" ); + TQDomNode header = KoDom::namedItemNS( *style, ooNS::style, "header" ); kdDebug(30518) << "Style header " << endl; - QString hleft, hmiddle, hright; - QString fleft, fmiddle, fright; + TQString hleft, hmiddle, hright; + TQString fleft, fmiddle, fright; if ( !header.isNull() ) { kdDebug(30518) << "Header exists" << endl; - QDomNode part = KoDom::namedItemNS( header, ooNS::style, "region-left" ); + TQDomNode part = KoDom::namedItemNS( header, ooNS::style, "region-left" ); if ( !part.isNull() ) { hleft = getPart( part ); @@ -1230,11 +1230,11 @@ void OpenCalcImport::loadTableMasterStyle( Sheet * table, } } - QDomNode footer = KoDom::namedItemNS( *style, ooNS::style, "footer" ); + TQDomNode footer = KoDom::namedItemNS( *style, ooNS::style, "footer" ); if ( !footer.isNull() ) { - QDomNode part = KoDom::namedItemNS( footer, ooNS::style, "region-left" ); + TQDomNode part = KoDom::namedItemNS( footer, ooNS::style, "region-left" ); if ( !part.isNull() ) { fleft = getPart( part ); @@ -1258,9 +1258,9 @@ void OpenCalcImport::loadTableMasterStyle( Sheet * table, fleft, fmiddle, fright ); if ( style->hasAttributeNS( ooNS::style, "page-master-name" ) ) { - QString masterPageLayoutStyleName=style->attributeNS( ooNS::style, "page-master-name", QString::null ); + TQString masterPageLayoutStyleName=style->attributeNS( ooNS::style, "page-master-name", TQString() ); kdDebug(30518)<<"masterPageLayoutStyleName :"<<masterPageLayoutStyleName<<endl; - QDomElement *masterLayoutStyle = m_styles[masterPageLayoutStyleName]; + TQDomElement *masterLayoutStyle = m_styles[masterPageLayoutStyleName]; kdDebug(30518)<<"masterLayoutStyle :"<<masterLayoutStyle<<endl; if ( !masterLayoutStyle ) return; @@ -1278,10 +1278,10 @@ void OpenCalcImport::loadOasisMasterLayoutPage( Sheet * table,KoStyleStack &styl float bottom = 0.0; float width = 0.0; float height = 0.0; - QString orientation = "Portrait"; - QString format; + TQString orientation = "Portrait"; + TQString format; - // Laurent : Why we stored layout information as Millimeter ?!!!!! + // Laurent : Why we stored tqlayout information as Millimeter ?!!!!! // kspread used point for all other attribute // I don't understand :( if ( styleStack.hasAttributeNS( ooNS::fo, "page-width" ) ) @@ -1329,45 +1329,45 @@ void OpenCalcImport::loadOasisMasterLayoutPage( Sheet * table,KoStyleStack &styl if ( styleStack.hasAttributeNS( ooNS::style, "print" ) ) { //todo parsing - QString str = styleStack.attributeNS( ooNS::style, "print" ); + TQString str = styleStack.attributeNS( ooNS::style, "print" ); kdDebug(30518)<<" style:print :"<<str<<endl; - if (str.contains( "headers" ) ) + if (str.tqcontains( "headers" ) ) { //todo implement it into kspread } - if ( str.contains( "grid" ) ) + if ( str.tqcontains( "grid" ) ) { table->print()->setPrintGrid( true ); } - if ( str.contains( "annotations" ) ) + if ( str.tqcontains( "annotations" ) ) { //todo it's not implemented } - if ( str.contains( "objects" ) ) + if ( str.tqcontains( "objects" ) ) { //todo it's not implemented } - if ( str.contains( "charts" ) ) + if ( str.tqcontains( "charts" ) ) { //todo it's not implemented } - if ( str.contains( "drawings" ) ) + if ( str.tqcontains( "drawings" ) ) { //todo it's not implemented } - if ( str.contains( "formulas" ) ) + if ( str.tqcontains( "formulas" ) ) { table->setShowFormula(true); } - if ( str.contains( "zero-values" ) ) + if ( str.tqcontains( "zero-values" ) ) { //todo it's not implemented } } if ( styleStack.hasAttributeNS( ooNS::style, "table-centering" ) ) { - QString str = styleStack.attributeNS( ooNS::style, "table-centering" ); + TQString str = styleStack.attributeNS( ooNS::style, "table-centering" ); //not implemented into kspread kdDebug(30518)<<" styleStack.attribute( style:table-centering ) :"<<str<<endl; #if 0 @@ -1387,14 +1387,14 @@ void OpenCalcImport::loadOasisMasterLayoutPage( Sheet * table,KoStyleStack &styl kdDebug(30518)<<" table-centering unknown :"<<str<<endl; #endif } - format = QString( "%1x%2" ).arg( width ).arg( height ); + format = TQString( "%1x%2" ).tqarg( width ).tqarg( height ); kdDebug(30518)<<" format : "<<format<<endl; table->print()->setPaperLayout( left, top, right, bottom, format, orientation ); kdDebug(30518)<<" left margin :"<<left<<" right :"<<right<<" top :"<<top<<" bottom :"<<bottom<<endl; //<style:properties fo:page-width="21.8cm" fo:page-height="28.801cm" fo:margin-top="2cm" fo:margin-bottom="2.799cm" fo:margin-left="1.3cm" fo:margin-right="1.3cm" style:writing-mode="lr-tb"/> -// QString format = paper.attribute( "format" ); -// QString orientation = paper.attribute( "orientation" ); +// TQString format = paper.attribute( "format" ); +// TQString orientation = paper.attribute( "orientation" ); // m_pPrint->setPaperLayout( left, top, right, bottom, format, orientation ); // } } @@ -1402,8 +1402,8 @@ void OpenCalcImport::loadOasisMasterLayoutPage( Sheet * table,KoStyleStack &styl bool OpenCalcImport::parseBody( int numOfTables ) { - QDomElement content = m_content.documentElement(); - QDomNode body = KoDom::namedItemNS( content, ooNS::office, "body" ); + TQDomElement content = m_content.documentElement(); + TQDomNode body = KoDom::namedItemNS( content, ooNS::office, "body" ); if ( body.isNull() ) return false; @@ -1412,7 +1412,7 @@ bool OpenCalcImport::parseBody( int numOfTables ) loadOasisCellValidation( body.toElement() ); Sheet * table; - QDomNode sheet = KoDom::namedItemNS( body, ooNS::table, "table" ); + TQDomNode sheet = KoDom::namedItemNS( body, ooNS::table, "table" ); kdDebug()<<" sheet :"<<sheet.isNull()<<endl; if ( sheet.isNull() ) @@ -1420,7 +1420,7 @@ bool OpenCalcImport::parseBody( int numOfTables ) while ( !sheet.isNull() ) { - QDomElement t = sheet.toElement(); + TQDomElement t = sheet.toElement(); if ( t.isNull() ) { sheet = sheet.nextSibling(); @@ -1434,7 +1434,7 @@ bool OpenCalcImport::parseBody( int numOfTables ) table = m_doc->map()->addNewSheet(); - table->setSheetName( t.attributeNS( ooNS::table, "name", QString::null ), true, false ); + table->setSheetName( t.attributeNS( ooNS::table, "name", TQString() ), true, false ); kdDebug()<<" table->name()"<<table->name()<<endl; sheet = sheet.nextSibling(); } @@ -1450,7 +1450,7 @@ bool OpenCalcImport::parseBody( int numOfTables ) while ( !sheet.isNull() ) { - QDomElement t = sheet.toElement(); + TQDomElement t = sheet.toElement(); if ( t.isNull() ) { KMessageBox::sorry( 0, i18n( "The file seems to be corrupt. Skipping a table." ) ); @@ -1463,7 +1463,7 @@ bool OpenCalcImport::parseBody( int numOfTables ) continue; } - table = m_doc->map()->findSheet( t.attributeNS( ooNS::table, "name", QString::null ) ); + table = m_doc->map()->findSheet( t.attributeNS( ooNS::table, "name", TQString() ) ); if ( !table ) { KMessageBox::sorry( 0, i18n( "Skipping a table." ) ); @@ -1481,26 +1481,26 @@ bool OpenCalcImport::parseBody( int numOfTables ) table->setDefaultHeight( MM_TO_POINT( 4.3 ) ); table->setDefaultWidth( MM_TO_POINT( 22.7 ) ); - kdDebug(30518) << "Added table: " << t.attributeNS( ooNS::table, "name", QString::null ) << endl; + kdDebug(30518) << "Added table: " << t.attributeNS( ooNS::table, "name", TQString() ) << endl; if ( t.hasAttributeNS( ooNS::table, "style-name" ) ) { - QString style = t.attributeNS( ooNS::table, "style-name", QString::null ); - QDomElement * tableStyle = m_styles[ style ]; + TQString style = t.attributeNS( ooNS::table, "style-name", TQString() ); + TQDomElement * tableStyle = m_styles[ style ]; - QDomNode node; + TQDomNode node; if ( tableStyle ) node = tableStyle->firstChild(); while( !node.isNull() ) { - QDomElement property = node.toElement(); + TQDomElement property = node.toElement(); if ( property.localName() == "properties" && property.namespaceURI() == ooNS::style ) { if ( property.hasAttributeNS( ooNS::table, "display" ) ) { - bool visible = (property.attributeNS( ooNS::table, "display", QString::null ) == "true" ? true : false ); + bool visible = (property.attributeNS( ooNS::table, "display", TQString() ) == "true" ? true : false ); table->hideSheet( !visible ); kdDebug(30518) << "Table: " << table->tableName() << ", hidden: " << !visible << endl; } @@ -1511,7 +1511,7 @@ bool OpenCalcImport::parseBody( int numOfTables ) if ( tableStyle && tableStyle->hasAttributeNS( ooNS::style, "master-page-name" ) ) { - QString stylename = "pm" + tableStyle->attributeNS( ooNS::style, "master-page-name", QString::null ); + TQString stylename = "pm" + tableStyle->attributeNS( ooNS::style, "master-page-name", TQString() ); loadTableMasterStyle( table, stylename ); @@ -1520,7 +1520,7 @@ bool OpenCalcImport::parseBody( int numOfTables ) if ( t.hasAttributeNS( ooNS::table, "print-ranges" ) ) { // e.g.: Sheet4.A1:Sheet4.E28 - QString range = t.attributeNS( ooNS::table, "print-ranges", QString::null ); + TQString range = t.attributeNS( ooNS::table, "print-ranges", TQString() ); OpenCalcPoint point( range ); kdDebug(30518) << "Print range: " << point.translation << endl; @@ -1540,11 +1540,11 @@ bool OpenCalcImport::parseBody( int numOfTables ) if ( t.hasAttributeNS( ooNS::table, "protected" ) ) { - QCString passwd( "" ); + TQCString passwd( "" ); if ( t.hasAttributeNS( ooNS::table, "protection-key" ) ) { - QString p = t.attributeNS( ooNS::table, "protection-key", QString::null ); - QCString str( p.latin1() ); + TQString p = t.attributeNS( ooNS::table, "protection-key", TQString() ); + TQCString str( p.latin1() ); kdDebug(30518) << "Decoding password: " << str << endl; passwd = KCodecs::base64Decode( str ); } @@ -1557,14 +1557,14 @@ bool OpenCalcImport::parseBody( int numOfTables ) sheet = sheet.nextSibling(); } - QDomElement b = body.toElement(); + TQDomElement b = body.toElement(); if ( b.hasAttributeNS( ooNS::table, "structure-protected" ) ) { - QCString passwd( "" ); + TQCString passwd( "" ); if ( b.hasAttributeNS( ooNS::table, "protection-key" ) ) { - QString p = b.attributeNS( ooNS::table, "protection-key", QString::null ); - QCString str( p.latin1() ); + TQString p = b.attributeNS( ooNS::table, "protection-key", TQString() ); + TQCString str( p.latin1() ); kdDebug(30518) << "Decoding password: " << str << endl; passwd = KCodecs::base64Decode( str ); } @@ -1578,12 +1578,12 @@ bool OpenCalcImport::parseBody( int numOfTables ) return true; } -void OpenCalcImport::insertStyles( QDomElement const & element ) +void OpenCalcImport::insertStyles( TQDomElement const & element ) { if ( element.isNull() ) return; - QDomElement e; + TQDomElement e; forEachElement( e, element ) { if ( e.isNull() || !e.hasAttributeNS( ooNS::style, "name" ) ) @@ -1591,19 +1591,19 @@ void OpenCalcImport::insertStyles( QDomElement const & element ) continue; } - QString name = e.attributeNS( ooNS::style, "name", QString::null ); + TQString name = e.attributeNS( ooNS::style, "name", TQString() ); kdDebug(30518) << "Style: '" << name << "' loaded " << endl; - m_styles.insert( name, new QDomElement( e ) ); + m_styles.insert( name, new TQDomElement( e ) ); } } -void OpenCalcImport::loadOasisAreaName( const QDomElement&body ) +void OpenCalcImport::loadOasisAreaName( const TQDomElement&body ) { - QDomNode namedAreas = KoDom::namedItemNS( body, ooNS::table, "named-expressions" ); + TQDomNode namedAreas = KoDom::namedItemNS( body, ooNS::table, "named-expressions" ); if ( !namedAreas.isNull() ) { - QDomElement e; + TQDomElement e; forEachElement( e, namedAreas ) { if ( e.isNull() || !e.hasAttributeNS( ooNS::table, "name" ) || !e.hasAttributeNS( ooNS::table, "cell-range-address" ) ) @@ -1613,8 +1613,8 @@ void OpenCalcImport::loadOasisAreaName( const QDomElement&body ) } // TODO: what is: table:base-cell-address - QString name = e.attributeNS( ooNS::table, "name", QString::null ); - QString areaPoint = e.attributeNS( ooNS::table, "cell-range-address", QString::null ); + TQString name = e.attributeNS( ooNS::table, "name", TQString() ); + TQString areaPoint = e.attributeNS( ooNS::table, "cell-range-address", TQString() ); m_namedAreas.append( name ); kdDebug(30518) << "Reading in named area, name: " << name << ", area: " << areaPoint << endl; @@ -1622,13 +1622,13 @@ void OpenCalcImport::loadOasisAreaName( const QDomElement&body ) OpenCalcPoint point( areaPoint ); kdDebug(30518) << "Area: " << point.translation << endl; - QString range( point.translation ); + TQString range( point.translation ); - if ( point.translation.find( ':' ) == -1 ) + if ( point.translation.tqfind( ':' ) == -1 ) { Point p( point.translation ); - int n = range.find( '!' ); + int n = range.tqfind( '!' ); if ( n > 0 ) range = range + ":" + range.right( range.length() - n - 1); @@ -1643,17 +1643,17 @@ void OpenCalcImport::loadOasisAreaName( const QDomElement&body ) } } -void OpenCalcImport::loadOasisCellValidation( const QDomElement&body ) +void OpenCalcImport::loadOasisCellValidation( const TQDomElement&body ) { - QDomNode validation = KoDom::namedItemNS( body, ooNS::table, "content-validations" ); + TQDomNode validation = KoDom::namedItemNS( body, ooNS::table, "content-validations" ); if ( !validation.isNull() ) { - QDomElement element; + TQDomElement element; forEachElement( element, validation ) { if ( element.localName() == "content-validation" ) { - m_validationList.insert( element.attributeNS( ooNS::table, "name", QString::null ), element); - kdDebug(30518)<<" validation found :"<<element.attributeNS( ooNS::table, "name", QString::null )<<endl; + m_validationList.insert( element.attributeNS( ooNS::table, "name", TQString() ), element); + kdDebug(30518)<<" validation found :"<<element.attributeNS( ooNS::table, "name", TQString() )<<endl; } else { kdDebug(30518)<<" Tag not recognize :"<<element.tagName()<<endl; @@ -1663,9 +1663,9 @@ void OpenCalcImport::loadOasisCellValidation( const QDomElement&body ) } -QString * OpenCalcImport::loadFormat( QDomElement * element, +TQString * OpenCalcImport::loadFormat( TQDomElement * element, FormatType & formatType, - QString name ) + TQString name ) { if ( !element ) return 0; @@ -1673,8 +1673,8 @@ QString * OpenCalcImport::loadFormat( QDomElement * element, int i; bool ok; - QString * format = 0; - QDomElement e = element->firstChild( ).toElement(); + TQString * format = 0; + TQDomElement e = element->firstChild( ).toElement(); int precision = 0; int leadingZ = 1; bool thousandsSep = false; @@ -1694,7 +1694,7 @@ QString * OpenCalcImport::loadFormat( QDomElement * element, formatType = Custom_format; if ( !e.isNull() ) - format = new QString(); + format = new TQString(); // TODO (element): // number:automatic-order="true" @@ -1717,7 +1717,7 @@ QString * OpenCalcImport::loadFormat( QDomElement * element, } else if ( e.localName() == "currency-symbol" && e.namespaceURI()==ooNS::number) { - QString sym( e.text() ); + TQString sym( e.text() ); kdDebug(30518) << "Currency: " << sym << endl; format->append( sym ); // number:language="de" number:country="DE">€</number:currency-symbol> @@ -1726,7 +1726,7 @@ QString * OpenCalcImport::loadFormat( QDomElement * element, { if ( e.hasAttributeNS( ooNS::number, "style" ) ) { - if ( e.attributeNS( ooNS::number, "style", QString::null ) == "long" ) + if ( e.attributeNS( ooNS::number, "style", TQString() ) == "long" ) format->append( "dddd" ); else format->append( "ddd" ); @@ -1738,7 +1738,7 @@ QString * OpenCalcImport::loadFormat( QDomElement * element, { if ( e.hasAttributeNS( ooNS::number, "style" ) ) { - if ( e.attributeNS( ooNS::number, "style", QString::null ) == "long" ) + if ( e.attributeNS( ooNS::number, "style", TQString() ) == "long" ) format->append( "dd" ); else format->append( "d" ); @@ -1750,13 +1750,13 @@ QString * OpenCalcImport::loadFormat( QDomElement * element, { if ( e.hasAttributeNS( ooNS::number, "textual" ) ) { - if ( e.attributeNS( ooNS::number, "textual", QString::null ) == "true" ) + if ( e.attributeNS( ooNS::number, "textual", TQString() ) == "true" ) format->append( "mm" ); } if ( e.hasAttributeNS( ooNS::number, "style" ) ) { - if ( e.attributeNS( ooNS::number, "style", QString::null ) == "long" ) + if ( e.attributeNS( ooNS::number, "style", TQString() ) == "long" ) format->append( "mm" ); else format->append( "m" ); @@ -1768,7 +1768,7 @@ QString * OpenCalcImport::loadFormat( QDomElement * element, { if ( e.hasAttributeNS( ooNS::number, "style" ) ) { - if ( e.attributeNS( ooNS::number, "style", QString::null ) == "long" ) + if ( e.attributeNS( ooNS::number, "style", TQString() ) == "long" ) format->append( "yyyy" ); else format->append( "yy" ); @@ -1780,7 +1780,7 @@ QString * OpenCalcImport::loadFormat( QDomElement * element, { if ( e.hasAttributeNS( ooNS::number, "style" ) ) { - if ( e.attributeNS( ooNS::number, "style", QString::null ) == "long" ) + if ( e.attributeNS( ooNS::number, "style", TQString() ) == "long" ) format->append( "hh" ); else format->append( "h" ); @@ -1792,7 +1792,7 @@ QString * OpenCalcImport::loadFormat( QDomElement * element, { if ( e.hasAttributeNS( ooNS::number, "style" ) ) { - if ( e.attributeNS( ooNS::number, "style", QString::null ) == "long" ) + if ( e.attributeNS( ooNS::number, "style", TQString() ) == "long" ) format->append( "mm" ); else format->append( "m" ); @@ -1804,7 +1804,7 @@ QString * OpenCalcImport::loadFormat( QDomElement * element, { if ( e.hasAttributeNS( ooNS::number, "style" ) ) { - if ( e.attributeNS( ooNS::number, "style", QString::null ) == "long" ) + if ( e.attributeNS( ooNS::number, "style", TQString() ) == "long" ) format->append( "ss" ); else format->append( "s" ); @@ -1822,14 +1822,14 @@ QString * OpenCalcImport::loadFormat( QDomElement * element, if ( e.hasAttributeNS( ooNS::number, "decimal-places" ) ) { - int d = e.attributeNS( ooNS::number, "decimal-places", QString::null ).toInt( &ok ); + int d = e.attributeNS( ooNS::number, "decimal-places", TQString() ).toInt( &ok ); if ( ok ) precision = d; } if ( e.hasAttributeNS( ooNS::number, "min-integer-digits" ) ) { - int d = e.attributeNS( ooNS::number, "min-integer-digits", QString::null ).toInt( &ok ); + int d = e.attributeNS( ooNS::number, "min-integer-digits", TQString() ).toInt( &ok ); if ( ok ) leadingZ = d; } @@ -1858,21 +1858,21 @@ QString * OpenCalcImport::loadFormat( QDomElement * element, if ( e.hasAttributeNS( ooNS::number, "decimal-places" ) ) { - int d = e.attributeNS( ooNS::number, "decimal-places", QString::null ).toInt( &ok ); + int d = e.attributeNS( ooNS::number, "decimal-places", TQString() ).toInt( &ok ); if ( ok ) precision = d; } if ( e.hasAttributeNS( ooNS::number, "min-integer-digits" ) ) { - int d = e.attributeNS( ooNS::number, "min-integer-digits", QString::null ).toInt( &ok ); + int d = e.attributeNS( ooNS::number, "min-integer-digits", TQString() ).toInt( &ok ); if ( ok ) leadingZ = d; } if ( e.hasAttributeNS( ooNS::number, "min-exponent-digits" ) ) { - int d = e.attributeNS( ooNS::number, "min-exponent-digits", QString::null ).toInt( &ok ); + int d = e.attributeNS( ooNS::number, "min-exponent-digits", TQString() ).toInt( &ok ); if ( ok ) exp = d; if ( exp <= 0 ) @@ -1911,19 +1911,19 @@ QString * OpenCalcImport::loadFormat( QDomElement * element, if ( e.hasAttributeNS( ooNS::number, "min-integer-digits" ) ) { - int d = e.attributeNS( ooNS::number, "min-integer-digits", QString::null ).toInt( &ok ); + int d = e.attributeNS( ooNS::number, "min-integer-digits", TQString() ).toInt( &ok ); if ( ok ) integer = d; } if ( e.hasAttributeNS( ooNS::number, "min-numerator-digits" ) ) { - int d = e.attributeNS( ooNS::number, "min-numerator-digits", QString::null ).toInt( &ok ); + int d = e.attributeNS( ooNS::number, "min-numerator-digits", TQString() ).toInt( &ok ); if ( ok ) numerator = d; } if ( e.hasAttributeNS( ooNS::number, "min-denominator-digits" ) ) { - int d = e.attributeNS( ooNS::number, "min-denominator-digits", QString::null ).toInt( &ok ); + int d = e.attributeNS( ooNS::number, "min-denominator-digits", TQString() ).toInt( &ok ); if ( ok ) denominator = d; } @@ -1950,7 +1950,7 @@ QString * OpenCalcImport::loadFormat( QDomElement * element, if ( negRed ) { - QString f( *format ); + TQString f( *format ); format->append( ";[Red]" ); format->append( f ); } @@ -1962,32 +1962,32 @@ QString * OpenCalcImport::loadFormat( QDomElement * element, return format; } -void OpenCalcImport::loadFontStyle( Format * layout, QDomElement const * font ) const +void OpenCalcImport::loadFontStyle( Format * tqlayout, TQDomElement const * font ) const { - if ( !font || !layout ) + if ( !font || !tqlayout ) return; - kdDebug(30518) << "Copy font style from the layout " << font->tagName() << ", " << font->nodeName() << endl; + kdDebug(30518) << "Copy font style from the tqlayout " << font->tagName() << ", " << font->nodeName() << endl; if ( font->hasAttributeNS( ooNS::fo, "font-family" ) ) - layout->setTextFontFamily( font->attributeNS( ooNS::fo, "font-family", QString::null ) ); + tqlayout->setTextFontFamily( font->attributeNS( ooNS::fo, "font-family", TQString() ) ); if ( font->hasAttributeNS( ooNS::fo, "color" ) ) - layout->setTextColor( QColor( font->attributeNS( ooNS::fo, "color", QString::null ) ) ); + tqlayout->setTextColor( TQColor( font->attributeNS( ooNS::fo, "color", TQString() ) ) ); if ( font->hasAttributeNS( ooNS::fo, "font-size" ) ) - layout->setTextFontSize( int( KoUnit::parseValue( font->attributeNS( ooNS::fo, "font-size", QString::null ), 10 ) ) ); + tqlayout->setTextFontSize( int( KoUnit::parseValue( font->attributeNS( ooNS::fo, "font-size", TQString() ), 10 ) ) ); else - layout->setTextFontSize( 10 ); + tqlayout->setTextFontSize( 10 ); if ( font->hasAttributeNS( ooNS::fo, "font-style" ) ) { kdDebug(30518) << "italic" << endl; - layout->setTextFontItalic( true ); // only thing we support + tqlayout->setTextFontItalic( true ); // only thing we support } if ( font->hasAttributeNS( ooNS::fo, "font-weight" ) ) - layout->setTextFontBold( true ); // only thing we support + tqlayout->setTextFontBold( true ); // only thing we support if ( font->hasAttributeNS( ooNS::fo, "text-underline" ) || font->hasAttributeNS( ooNS::style, "text-underline" ) ) - layout->setTextFontUnderline( true ); // only thing we support + tqlayout->setTextFontUnderline( true ); // only thing we support if ( font->hasAttributeNS( ooNS::style, "text-crossing-out" ) ) - layout->setTextFontStrike( true ); // only thing we support + tqlayout->setTextFontStrike( true ); // only thing we support if ( font->hasAttributeNS( ooNS::style, "font-pitch" ) ) { // TODO: possible values: fixed, variable @@ -1996,23 +1996,23 @@ void OpenCalcImport::loadFontStyle( Format * layout, QDomElement const * font ) // text-underline-color } -void OpenCalcImport::loadBorder( Format * layout, QString const & borderDef, bPos pos ) const +void OpenCalcImport::loadBorder( Format * tqlayout, TQString const & borderDef, bPos pos ) const { if ( borderDef == "none" ) return; - int p = borderDef.find( ' ' ); + int p = borderDef.tqfind( ' ' ); if ( p < 0 ) return; - QPen pen; - QString w = borderDef.left( p ); + TQPen pen; + TQString w = borderDef.left( p ); pen.setWidth( (int) KoUnit::parseValue( w ) ); ++p; - int p2 = borderDef.find( ' ', p ); - QString s = borderDef.mid( p, p2 - p ); + int p2 = borderDef.tqfind( ' ', p ); + TQString s = borderDef.mid( p, p2 - p ); kdDebug(30518) << "Borderstyle: " << s << endl; @@ -2031,49 +2031,49 @@ void OpenCalcImport::loadBorder( Format * layout, QString const & borderDef, bPo } ++p2; - p = borderDef.find( ' ', p2 ); + p = borderDef.tqfind( ' ', p2 ); if ( p == -1 ) p = borderDef.length(); - pen.setColor( QColor( borderDef.right( p - p2 ) ) ); + pen.setColor( TQColor( borderDef.right( p - p2 ) ) ); if ( pos == Left ) - layout->setLeftBorderPen( pen ); + tqlayout->setLeftBorderPen( pen ); else if ( pos == Top ) - layout->setTopBorderPen( pen ); + tqlayout->setTopBorderPen( pen ); else if ( pos == Right ) - layout->setRightBorderPen( pen ); + tqlayout->setRightBorderPen( pen ); else if ( pos == Bottom ) - layout->setBottomBorderPen( pen ); + tqlayout->setBottomBorderPen( pen ); else if ( pos == Border ) { - layout->setLeftBorderPen( pen ); - layout->setTopBorderPen( pen ); - layout->setRightBorderPen( pen ); - layout->setBottomBorderPen( pen ); + tqlayout->setLeftBorderPen( pen ); + tqlayout->setTopBorderPen( pen ); + tqlayout->setRightBorderPen( pen ); + tqlayout->setBottomBorderPen( pen ); } // TODO Diagonals not supported by oocalc } -void OpenCalcImport::loadStyleProperties( Format * layout, QDomElement const & property ) const +void OpenCalcImport::loadStyleProperties( Format * tqlayout, TQDomElement const & property ) const { kdDebug(30518) << "*** Loading style properties *****" << endl; if ( property.hasAttributeNS( ooNS::style, "decimal-places" ) ) { bool ok = false; - int p = property.attributeNS( ooNS::style, "decimal-places", QString::null ).toInt( &ok ); + int p = property.attributeNS( ooNS::style, "decimal-places", TQString() ).toInt( &ok ); if (ok ) - layout->setPrecision( p ); + tqlayout->setPrecision( p ); } if ( property.hasAttributeNS( ooNS::style, "font-name" ) ) { - QDomElement * font = m_styles[ property.attributeNS( ooNS::style, "font-name", QString::null ) ]; - loadFontStyle( layout, font ); // generell font style + TQDomElement * font = m_styles[ property.attributeNS( ooNS::style, "font-name", TQString() ) ]; + loadFontStyle( tqlayout, font ); // generell font style } - loadFontStyle( layout, &property ); // specific font style + loadFontStyle( tqlayout, &property ); // specific font style // TODO: // diagonal: fall + goup @@ -2088,215 +2088,215 @@ void OpenCalcImport::loadStyleProperties( Format * layout, QDomElement const & p if ( property.hasAttributeNS( ooNS::style, "rotation-angle" ) ) { bool ok = false; - int a = property.attributeNS( ooNS::style, "rotation-angle", QString::null ).toInt( &ok ); + int a = property.attributeNS( ooNS::style, "rotation-angle", TQString() ).toInt( &ok ); if ( ok ) - layout->setAngle( -a + 1 ); + tqlayout->setAngle( -a + 1 ); } if ( property.hasAttributeNS( ooNS::fo, "direction" ) ) { - layout->setVerticalText( true ); + tqlayout->setVerticalText( true ); } if ( property.hasAttributeNS( ooNS::fo, "text-align" ) ) { - QString s = property.attributeNS( ooNS::fo, "text-align", QString::null ); + TQString s = property.attributeNS( ooNS::fo, "text-align", TQString() ); if ( s == "center" ) - layout->setAlign( Format::Center ); + tqlayout->setAlign( Format::Center ); else if ( s == "end" ) - layout->setAlign( Format::Right ); + tqlayout->setAlign( Format::Right ); else if ( s == "start" ) - layout->setAlign( Format::Left ); + tqlayout->setAlign( Format::Left ); else if ( s == "justify" ) // TODO in KSpread! - layout->setAlign( Format::Center ); + tqlayout->setAlign( Format::Center ); } if ( property.hasAttributeNS( ooNS::fo, "margin-left" ) ) { - kdDebug(30518)<<"margin-left :"<<KoUnit::parseValue( property.attributeNS( ooNS::fo, "margin-left", QString::null ),0.0 )<<endl; - layout->setIndent( KoUnit::parseValue( property.attributeNS( ooNS::fo, "margin-left", QString::null ),0.0 ) ); + kdDebug(30518)<<"margin-left :"<<KoUnit::parseValue( property.attributeNS( ooNS::fo, "margin-left", TQString() ),0.0 )<<endl; + tqlayout->setIndent( KoUnit::parseValue( property.attributeNS( ooNS::fo, "margin-left", TQString() ),0.0 ) ); } if ( property.hasAttributeNS( ooNS::fo, "background-color" ) ) - layout->setBgColor( QColor( property.attributeNS( ooNS::fo, "background-color", QString::null ) ) ); + tqlayout->setBgColor( TQColor( property.attributeNS( ooNS::fo, "background-color", TQString() ) ) ); if ( property.hasAttributeNS( ooNS::style, "print-content" ) ) { - if ( property.attributeNS( ooNS::style, "print-content", QString::null ) == "false" ) - layout->setDontPrintText( false ); + if ( property.attributeNS( ooNS::style, "print-content", TQString() ) == "false" ) + tqlayout->setDontPrintText( false ); } if ( property.hasAttributeNS( ooNS::style, "cell-protect" ) ) { - QString prot( property.attributeNS( ooNS::style, "cell-protect", QString::null ) ); + TQString prot( property.attributeNS( ooNS::style, "cell-protect", TQString() ) ); if ( prot == "none" ) { - layout->setNotProtected( true ); - layout->setHideFormula( false ); - layout->setHideAll( false ); + tqlayout->setNotProtected( true ); + tqlayout->setHideFormula( false ); + tqlayout->setHideAll( false ); } else if ( prot == "formula-hidden" ) { - layout->setNotProtected( true ); - layout->setHideFormula( true ); - layout->setHideAll( false ); + tqlayout->setNotProtected( true ); + tqlayout->setHideFormula( true ); + tqlayout->setHideAll( false ); } else if ( prot == "protected formula-hidden" ) { - layout->setNotProtected( false ); - layout->setHideFormula( true ); - layout->setHideAll( false ); + tqlayout->setNotProtected( false ); + tqlayout->setHideFormula( true ); + tqlayout->setHideAll( false ); } else if ( prot == "hidden-and-protected" ) { - layout->setNotProtected( false ); - layout->setHideFormula( false ); - layout->setHideAll( true ); + tqlayout->setNotProtected( false ); + tqlayout->setHideFormula( false ); + tqlayout->setHideAll( true ); } else if ( prot == "protected" ) { - layout->setNotProtected( false ); - layout->setHideFormula( false ); - layout->setHideAll( false ); + tqlayout->setNotProtected( false ); + tqlayout->setHideFormula( false ); + tqlayout->setHideAll( false ); } kdDebug(30518) << "Cell " << prot << endl; } if ( property.hasAttributeNS( ooNS::fo, "padding-left" ) ) - layout->setIndent( KoUnit::parseValue(property.attributeNS( ooNS::fo, "padding-left", QString::null ) ) ); + tqlayout->setIndent( KoUnit::parseValue(property.attributeNS( ooNS::fo, "padding-left", TQString() ) ) ); if ( property.hasAttributeNS( ooNS::fo, "vertical-align" ) ) { - QString s = property.attributeNS( ooNS::fo, "vertical-align", QString::null ); + TQString s = property.attributeNS( ooNS::fo, "vertical-align", TQString() ); if ( s == "middle" ) - layout->setAlignY( Format::Middle ); + tqlayout->setAlignY( Format::Middle ); else if ( s == "bottom" ) - layout->setAlignY( Format::Bottom ); + tqlayout->setAlignY( Format::Bottom ); else - layout->setAlignY( Format::Top ); + tqlayout->setAlignY( Format::Top ); } else - layout->setAlignY( Format::Bottom ); + tqlayout->setAlignY( Format::Bottom ); if ( property.hasAttributeNS( ooNS::fo, "wrap-option" ) ) { - layout->setMultiRow( true ); + tqlayout->setMultiRow( true ); /* we do not support anything else yet - QString s = property.attributeNS( ooNS::fo, "wrap-option", QString::null ); + TQString s = property.attributeNS( ooNS::fo, "wrap-option", TQString() ); if ( s == "wrap" ) - layout->setMultiRow( true ); + tqlayout->setMultiRow( true ); */ } if ( property.hasAttributeNS( ooNS::fo, "border-bottom" ) ) { - loadBorder( layout, property.attributeNS( ooNS::fo, "border-bottom", QString::null ), Bottom ); + loadBorder( tqlayout, property.attributeNS( ooNS::fo, "border-bottom", TQString() ), Bottom ); // TODO: style:border-line-width-bottom if double! } if ( property.hasAttributeNS( ooNS::fo, "border-right" ) ) { - loadBorder( layout, property.attributeNS( ooNS::fo, "border-right", QString::null ), Right ); + loadBorder( tqlayout, property.attributeNS( ooNS::fo, "border-right", TQString() ), Right ); // TODO: style:border-line-width-right } if ( property.hasAttributeNS( ooNS::fo, "border-top" ) ) { - loadBorder( layout, property.attributeNS( ooNS::fo, "border-top", QString::null ), Top ); + loadBorder( tqlayout, property.attributeNS( ooNS::fo, "border-top", TQString() ), Top ); // TODO: style:border-line-width-top } if ( property.hasAttributeNS( ooNS::fo, "border-left" ) ) { - loadBorder( layout, property.attributeNS( ooNS::fo, "border-left", QString::null ), Left ); + loadBorder( tqlayout, property.attributeNS( ooNS::fo, "border-left", TQString() ), Left ); // TODO: style:border-line-width-left } if ( property.hasAttributeNS( ooNS::fo, "border" ) ) { - loadBorder( layout, property.attributeNS( ooNS::fo, "border", QString::null ), Border ); + loadBorder( tqlayout, property.attributeNS( ooNS::fo, "border", TQString() ), Border ); // TODO: style:border-line-width-left } } -void OpenCalcImport::readInStyle( Format * layout, QDomElement const & style ) +void OpenCalcImport::readInStyle( Format * tqlayout, TQDomElement const & style ) { - kdDebug(30518) << "** Reading Style: " << style.tagName() << "; " << style.attributeNS( ooNS::style, "name", QString::null) << endl; + kdDebug(30518) << "** Reading Style: " << style.tagName() << "; " << style.attributeNS( ooNS::style, "name", TQString()) << endl; if ( style.localName() == "style" && style.namespaceURI()==ooNS::style) { - if ( style.hasAttributeNS( ooNS::style, "parent-style-name" ) ) + if ( style.hasAttributeNS( ooNS::style, "tqparent-style-name" ) ) { Format * cp - = m_defaultStyles.find( style.attributeNS( ooNS::style, "parent-style-name", QString::null ) ); - kdDebug(30518) << "Copying layout from " << style.attributeNS( ooNS::style, "parent-style-name", QString::null ) << endl; + = m_defaultStyles.tqfind( style.attributeNS( ooNS::style, "tqparent-style-name", TQString() ) ); + kdDebug(30518) << "Copying tqlayout from " << style.attributeNS( ooNS::style, "tqparent-style-name", TQString() ) << endl; if ( cp != 0 ) - layout->copy( *cp ); + tqlayout->copy( *cp ); } else if ( style.hasAttributeNS( ooNS::style, "family") ) { - QString name = style.attribute( "style-family" ) + "default"; - Format * cp = m_defaultStyles.find( name ); + TQString name = style.attribute( "style-family" ) + "default"; + Format * cp = m_defaultStyles.tqfind( name ); - kdDebug(30518) << "Copying layout from " << name << ", " << !cp << endl; + kdDebug(30518) << "Copying tqlayout from " << name << ", " << !cp << endl; if ( cp != 0 ) - layout->copy( *cp ); + tqlayout->copy( *cp ); } if ( style.hasAttributeNS( ooNS::style, "data-style-name" ) ) { - QString * format = m_formats[ style.attributeNS( ooNS::style, "data-style-name", QString::null ) ]; + TQString * format = m_formats[ style.attributeNS( ooNS::style, "data-style-name", TQString() ) ]; FormatType formatType; if ( !format ) { // load and convert it - QString name( style.attributeNS( ooNS::style, "data-style-name", QString::null ) ); + TQString name( style.attributeNS( ooNS::style, "data-style-name", TQString() ) ); format = loadFormat( m_styles[ name ], formatType, name ); } if ( format ) { - layout->setFormatString( *format ); - layout->setFormatType( formatType ); + tqlayout->setFormatString( *format ); + tqlayout->setFormatType( formatType ); } // <number:currency-symbol number:language="de" number:country="DE">€</number:currency-symbol> } } - QDomElement property; + TQDomElement property; forEachElement( property, style ) { if ( property.localName() == "properties" && property.namespaceURI() == ooNS::style ) - loadStyleProperties( layout, property ); + loadStyleProperties( tqlayout, property ); - kdDebug(30518) << layout->textFontFamily( 0, 0 ) << endl; + kdDebug(30518) << tqlayout->textFontFamily( 0, 0 ) << endl; } } -bool OpenCalcImport::createStyleMap( QDomDocument const & styles ) +bool OpenCalcImport::createStyleMap( TQDomDocument const & styles ) { - QDomElement content = styles.documentElement(); - QDomNode docStyles = KoDom::namedItemNS( content, ooNS::office, "document-styles" ); + TQDomElement content = styles.documentElement(); + TQDomNode docStyles = KoDom::namedItemNS( content, ooNS::office, "document-styles" ); if ( content.hasAttributeNS( ooNS::office, "version" ) ) { bool ok = true; - double d = content.attributeNS( ooNS::office, "version", QString::null ).toDouble( &ok ); + double d = content.attributeNS( ooNS::office, "version", TQString() ).toDouble( &ok ); if ( ok ) { kdDebug(30518) << "OpenCalc version: " << d << endl; if ( d > 1.0 ) { - QString message( i18n("This document was created with OpenOffice.org version '%1'. This filter was written for version 1.0. Reading this file could cause strange behavior, crashes or incorrect display of the data. Do you want to continue converting the document?") ); - message.arg( content.attributeNS( ooNS::office, "version", QString::null ) ); + TQString message( i18n("This document was created with OpenOffice.org version '%1'. This filter was written for version 1.0. Reading this file could cause strange behavior, crashes or incorrect display of the data. Do you want to continue converting the document?") ); + message.tqarg( content.attributeNS( ooNS::office, "version", TQString() ) ); if ( KMessageBox::warningYesNo( 0, message, i18n( "Unsupported document version" ) ) == KMessageBox::No ) return false; } } } - QDomNode fontStyles = KoDom::namedItemNS( content, ooNS::office, "font-decls" ); + TQDomNode fontStyles = KoDom::namedItemNS( content, ooNS::office, "font-decls" ); if ( !fontStyles.isNull() ) { @@ -2309,7 +2309,7 @@ bool OpenCalcImport::createStyleMap( QDomDocument const & styles ) kdDebug(30518) << "Starting reading in auto:styles" << endl; - QDomNode autoStyles = KoDom::namedItemNS( content, ooNS::office, "automatic-styles" ); + TQDomNode autoStyles = KoDom::namedItemNS( content, ooNS::office, "automatic-styles" ); if ( !autoStyles.isNull() ) insertStyles( autoStyles.toElement() ); else @@ -2318,20 +2318,20 @@ bool OpenCalcImport::createStyleMap( QDomDocument const & styles ) kdDebug(30518) << "Reading in master styles" << endl; - QDomNode masterStyles = KoDom::namedItemNS( content, ooNS::office, "master-styles" ); + TQDomNode masterStyles = KoDom::namedItemNS( content, ooNS::office, "master-styles" ); if ( masterStyles.isNull() ) { kdDebug(30518) << "Nothing found " << endl; } - QDomElement master = KoDom::namedItemNS( masterStyles, ooNS::style, "master-page"); + TQDomElement master = KoDom::namedItemNS( masterStyles, ooNS::style, "master-page"); if ( !master.isNull() ) { - QString name( "pm" ); - name += master.attributeNS( ooNS::style, "name", QString::null ); + TQString name( "pm" ); + name += master.attributeNS( ooNS::style, "name", TQString() ); kdDebug(30518) << "Master style: '" << name << "' loaded " << endl; - m_styles.insert( name, new QDomElement( master ) ); + m_styles.insert( name, new TQDomElement( master ) ); master = master.nextSibling().toElement(); } @@ -2339,15 +2339,15 @@ bool OpenCalcImport::createStyleMap( QDomDocument const & styles ) kdDebug(30518) << "Starting reading in office:styles" << endl; - QDomNode fixedStyles = KoDom::namedItemNS( content, ooNS::office, "styles" ); + TQDomNode fixedStyles = KoDom::namedItemNS( content, ooNS::office, "styles" ); kdDebug(30518) << "Reading in default styles" << endl; - QDomNode def = KoDom::namedItemNS( fixedStyles, ooNS::style, "default-style" ); + TQDomNode def = KoDom::namedItemNS( fixedStyles, ooNS::style, "default-style" ); kdDebug()<<" def !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! :"<<def.isNull()<<endl; while ( !def.isNull() ) { - QDomElement e = def.toElement(); + TQDomElement e = def.toElement(); kdDebug(30518) << "Style found " << e.nodeName() << ", tag: " << e.tagName() << endl; if ( e.nodeName() != "style:default-style" ) @@ -2358,20 +2358,20 @@ bool OpenCalcImport::createStyleMap( QDomDocument const & styles ) if ( !e.isNull() ) { - Format * layout = new Format( 0, m_doc->styleManager()->defaultStyle() ); + Format * tqlayout = new Format( 0, m_doc->styleManager()->defaultStyle() ); - readInStyle( layout, e ); - kdDebug(30518) << "Default style " << e.attributeNS( ooNS::style, "family", QString::null ) << "default" << " loaded " << endl; + readInStyle( tqlayout, e ); + kdDebug(30518) << "Default style " << e.attributeNS( ooNS::style, "family", TQString() ) << "default" << " loaded " << endl; - m_defaultStyles.insert( e.attributeNS( ooNS::style, "family", QString::null ) + "default", layout ); - // QFont font = layout->font(); + m_defaultStyles.insert( e.attributeNS( ooNS::style, "family", TQString() ) + "default", tqlayout ); + // TQFont font = tqlayout->font(); // kdDebug(30518) << "Font: " << font.family() << ", " << font.toString() << endl; } def = def.nextSibling(); } - QDomElement defs = KoDom::namedItemNS( fixedStyles, ooNS::style, "style" ); + TQDomElement defs = KoDom::namedItemNS( fixedStyles, ooNS::style, "style" ); while ( !defs.isNull() ) { if ( defs.nodeName() != "style:style" ) @@ -2384,12 +2384,12 @@ bool OpenCalcImport::createStyleMap( QDomDocument const & styles ) continue; } - Format * layout = new Format( 0, m_doc->styleManager()->defaultStyle() ); - readInStyle( layout, defs ); - kdDebug(30518) << "Default style " << defs.attributeNS( ooNS::style, "name", QString::null ) << " loaded " << endl; + Format * tqlayout = new Format( 0, m_doc->styleManager()->defaultStyle() ); + readInStyle( tqlayout, defs ); + kdDebug(30518) << "Default style " << defs.attributeNS( ooNS::style, "name", TQString() ) << " loaded " << endl; - m_defaultStyles.insert( defs.attributeNS( ooNS::style, "name", QString::null ), layout ); - // kdDebug(30518) << "Font: " << layout->font().family() << ", " << layout->font().toString() << endl; + m_defaultStyles.insert( defs.attributeNS( ooNS::style, "name", TQString() ), tqlayout ); + // kdDebug(30518) << "Font: " << tqlayout->font().family() << ", " << tqlayout->font().toString() << endl; defs = defs.nextSibling().toElement(); } @@ -2419,13 +2419,13 @@ bool OpenCalcImport::createStyleMap( QDomDocument const & styles ) return true; } -void OpenCalcImport::loadOasisValidation( Validity* val, const QString& validationName ) +void OpenCalcImport::loadOasisValidation( Validity* val, const TQString& validationName ) { kdDebug(30518)<<"validationName:"<<validationName<<endl; - QDomElement element = m_validationList[validationName]; + TQDomElement element = m_validationList[validationName]; if ( element.hasAttributeNS( ooNS::table, "condition" ) ) { - QString valExpression = element.attributeNS( ooNS::table, "condition", QString::null ); + TQString valExpression = element.attributeNS( ooNS::table, "condition", TQString() ); kdDebug(30518)<<" element.attribute( table:condition ) "<<valExpression<<endl; //Condition ::= ExtendedTrueCondition | TrueFunction 'and' TrueCondition //TrueFunction ::= cell-content-is-whole-number() | cell-content-is-decimal-number() | cell-content-is-date() | cell-content-is-time() @@ -2440,7 +2440,7 @@ void OpenCalcImport::loadOasisValidation( Validity* val, const QString& validati //A NumberValue is a whole or decimal number. It must not contain comma separators for numbers of 1000 or greater. //ExtendedTrueCondition - if ( valExpression.contains( "cell-content-text-length()" ) ) + if ( valExpression.tqcontains( "cell-content-text-length()" ) ) { //"cell-content-text-length()>45" valExpression = valExpression.remove("cell-content-text-length()" ); @@ -2450,17 +2450,17 @@ void OpenCalcImport::loadOasisValidation( Validity* val, const QString& validati loadOasisValidationCondition( val, valExpression ); } //cell-content-text-length-is-between(Value, Value) | cell-content-text-length-is-not-between(Value, Value) - else if ( valExpression.contains( "cell-content-text-length-is-between" ) ) + else if ( valExpression.tqcontains( "cell-content-text-length-is-between" ) ) { val->m_restriction = Restriction::TextLength; val->m_cond = Conditional::Between; valExpression = valExpression.remove( "cell-content-text-length-is-between(" ); kdDebug(30518)<<" valExpression :"<<valExpression<<endl; valExpression = valExpression.remove( ")" ); - QStringList listVal = QStringList::split( ",", valExpression ); + TQStringList listVal = TQStringList::split( ",", valExpression ); loadOasisValidationValue( val, listVal ); } - else if ( valExpression.contains( "cell-content-text-length-is-not-between" ) ) + else if ( valExpression.tqcontains( "cell-content-text-length-is-not-between" ) ) { val->m_restriction = Restriction::TextLength; val->m_cond = Conditional::Different; @@ -2468,56 +2468,56 @@ void OpenCalcImport::loadOasisValidation( Validity* val, const QString& validati kdDebug(30518)<<" valExpression :"<<valExpression<<endl; valExpression = valExpression.remove( ")" ); kdDebug(30518)<<" valExpression :"<<valExpression<<endl; - QStringList listVal = QStringList::split( ",", valExpression ); + TQStringList listVal = TQStringList::split( ",", valExpression ); loadOasisValidationValue( val, listVal ); } //TrueFunction ::= cell-content-is-whole-number() | cell-content-is-decimal-number() | cell-content-is-date() | cell-content-is-time() else { - if (valExpression.contains( "cell-content-is-whole-number()" ) ) + if (valExpression.tqcontains( "cell-content-is-whole-number()" ) ) { val->m_restriction = Restriction::Number; valExpression = valExpression.remove( "cell-content-is-whole-number() and " ); } - else if (valExpression.contains( "cell-content-is-decimal-number()" ) ) + else if (valExpression.tqcontains( "cell-content-is-decimal-number()" ) ) { val->m_restriction = Restriction::Integer; valExpression = valExpression.remove( "cell-content-is-decimal-number() and " ); } - else if (valExpression.contains( "cell-content-is-date()" ) ) + else if (valExpression.tqcontains( "cell-content-is-date()" ) ) { val->m_restriction = Restriction::Date; valExpression = valExpression.remove( "cell-content-is-date() and " ); } - else if (valExpression.contains( "cell-content-is-time()" ) ) + else if (valExpression.tqcontains( "cell-content-is-time()" ) ) { val->m_restriction = Restriction::Time; valExpression = valExpression.remove( "cell-content-is-time() and " ); } kdDebug(30518)<<"valExpression :"<<valExpression<<endl; - if ( valExpression.contains( "cell-content()" ) ) + if ( valExpression.tqcontains( "cell-content()" ) ) { valExpression = valExpression.remove( "cell-content()" ); loadOasisValidationCondition( val, valExpression ); } //GetFunction ::= cell-content-is-between(Value, Value) | cell-content-is-not-between(Value, Value) //for the moment we support just int/double value, not text/date/time :( - if ( valExpression.contains( "cell-content-is-between(" ) ) + if ( valExpression.tqcontains( "cell-content-is-between(" ) ) { valExpression = valExpression.remove( "cell-content-is-between(" ); valExpression = valExpression.remove( ")" ); - QStringList listVal = QStringList::split( "," , valExpression ); + TQStringList listVal = TQStringList::split( "," , valExpression ); loadOasisValidationValue( val, listVal ); val->m_cond = Conditional::Between; } - if ( valExpression.contains( "cell-content-is-not-between(" ) ) + if ( valExpression.tqcontains( "cell-content-is-not-between(" ) ) { valExpression = valExpression.remove( "cell-content-is-not-between(" ); valExpression = valExpression.remove( ")" ); - QStringList listVal = QStringList::split( ",", valExpression ); + TQStringList listVal = TQStringList::split( ",", valExpression ); loadOasisValidationValue( val, listVal ); val->m_cond = Conditional::Different; } @@ -2525,7 +2525,7 @@ void OpenCalcImport::loadOasisValidation( Validity* val, const QString& validati } if ( element.hasAttributeNS( ooNS::table, "allow-empty-cell" ) ) { - val->allowEmptyCell = ( ( element.attributeNS( ooNS::table, "allow-empty-cell", QString::null )=="true" ) ? true : false ); + val->allowEmptyCell = ( ( element.attributeNS( ooNS::table, "allow-empty-cell", TQString() )=="true" ) ? true : false ); } if ( element.hasAttributeNS( ooNS::table, "base-cell-address" ) ) @@ -2533,26 +2533,26 @@ void OpenCalcImport::loadOasisValidation( Validity* val, const QString& validati //todo what is it ? } - QDomElement help = KoDom::namedItemNS( element, ooNS::table, "help-message" ); + TQDomElement help = KoDom::namedItemNS( element, ooNS::table, "help-message" ); if ( !help.isNull() ) { if ( help.hasAttributeNS( ooNS::table, "title" ) ) - val->titleInfo = help.attributeNS( ooNS::table, "title", QString::null ); + val->titleInfo = help.attributeNS( ooNS::table, "title", TQString() ); if ( help.hasAttributeNS( ooNS::table, "display" ) ) - val->displayValidationInformation = ( ( help.attributeNS( ooNS::table, "display", QString::null )=="true" ) ? true : false ); - QDomElement attrText = KoDom::namedItemNS( help, ooNS::text, "p" ); + val->displayValidationInformation = ( ( help.attributeNS( ooNS::table, "display", TQString() )=="true" ) ? true : false ); + TQDomElement attrText = KoDom::namedItemNS( help, ooNS::text, "p" ); if ( !attrText.isNull() ) val->messageInfo = attrText.text(); } - QDomElement error = KoDom::namedItemNS( element, ooNS::table, "error-message" ); + TQDomElement error = KoDom::namedItemNS( element, ooNS::table, "error-message" ); if ( !error.isNull() ) { if ( error.hasAttributeNS( ooNS::table, "title" ) ) - val->title = error.attributeNS( ooNS::table, "title", QString::null ); + val->title = error.attributeNS( ooNS::table, "title", TQString() ); if ( error.hasAttributeNS( ooNS::table, "message-type" ) ) { - QString str = error.attributeNS( ooNS::table, "message-type", QString::null ); + TQString str = error.attributeNS( ooNS::table, "message-type", TQString() ); if ( str == "warning" ) val->m_action = Action::Warning; else if ( str == "information" ) @@ -2565,29 +2565,29 @@ void OpenCalcImport::loadOasisValidation( Validity* val, const QString& validati if ( error.hasAttributeNS( ooNS::table, "display" ) ) { - kdDebug(30518)<<" display message :"<<error.attributeNS( ooNS::table, "display", QString::null )<<endl; - val->displayMessage = (error.attributeNS( ooNS::table, "display", QString::null )=="true"); + kdDebug(30518)<<" display message :"<<error.attributeNS( ooNS::table, "display", TQString() )<<endl; + val->displayMessage = (error.attributeNS( ooNS::table, "display", TQString() )=="true"); } - QDomElement attrText = KoDom::namedItemNS( error, ooNS::text, "p" ); + TQDomElement attrText = KoDom::namedItemNS( error, ooNS::text, "p" ); if ( !attrText.isNull() ) val->message = attrText.text(); } } -void OpenCalcImport::loadOasisValidationValue( Validity* val, const QStringList &listVal ) +void OpenCalcImport::loadOasisValidationValue( Validity* val, const TQStringList &listVal ) { bool ok = false; kdDebug(30518)<<" listVal[0] :"<<listVal[0]<<" listVal[1] :"<<listVal[1]<<endl; if ( val->m_restriction == Restriction::Date ) { - val->dateMin = QDate::fromString( listVal[0] ); - val->dateMax = QDate::fromString( listVal[1] ); + val->dateMin = TQDate::fromString( listVal[0] ); + val->dateMax = TQDate::fromString( listVal[1] ); } else if ( val->m_restriction == Restriction::Time ) { - val->timeMin = QTime::fromString( listVal[0] ); - val->timeMax = QTime::fromString( listVal[1] ); + val->timeMin = TQTime::fromString( listVal[0] ); + val->timeMax = TQTime::fromString( listVal[1] ); } else { @@ -2620,36 +2620,36 @@ void OpenCalcImport::loadOasisValidationValue( Validity* val, const QStringList } -void OpenCalcImport::loadOasisValidationCondition( Validity* val,QString &valExpression ) +void OpenCalcImport::loadOasisValidationCondition( Validity* val,TQString &valExpression ) { - QString value; - if (valExpression.contains( "<=" ) ) + TQString value; + if (valExpression.tqcontains( "<=" ) ) { value = valExpression.remove( "<=" ); val->m_cond = Conditional::InferiorEqual; } - else if (valExpression.contains( ">=" ) ) + else if (valExpression.tqcontains( ">=" ) ) { value = valExpression.remove( ">=" ); val->m_cond = Conditional::SuperiorEqual; } - else if (valExpression.contains( "!=" ) ) + else if (valExpression.tqcontains( "!=" ) ) { //add Differentto attribute value = valExpression.remove( "!=" ); val->m_cond = Conditional::DifferentTo; } - else if ( valExpression.contains( "<" ) ) + else if ( valExpression.tqcontains( "<" ) ) { value = valExpression.remove( "<" ); val->m_cond = Conditional::Inferior; } - else if(valExpression.contains( ">" ) ) + else if(valExpression.tqcontains( ">" ) ) { value = valExpression.remove( ">" ); val->m_cond = Conditional::Superior; } - else if (valExpression.contains( "=" ) ) + else if (valExpression.tqcontains( "=" ) ) { value = valExpression.remove( "=" ); val->m_cond = Conditional::Equal; @@ -2659,11 +2659,11 @@ void OpenCalcImport::loadOasisValidationCondition( Validity* val,QString &valExp kdDebug(30518)<<" value :"<<value<<endl; if ( val->m_restriction == Restriction::Date ) { - val->dateMin = QDate::fromString( value ); + val->dateMin = TQDate::fromString( value ); } else if ( val->m_restriction == Restriction::Date ) { - val->timeMin = QTime::fromString( value ); + val->timeMin = TQTime::fromString( value ); } else { @@ -2691,13 +2691,13 @@ int OpenCalcImport::readMetaData() KoDocumentInfoAbout * aboutPage = static_cast<KoDocumentInfoAbout *>(docInfo->page( "about" )); KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor*>(docInfo->page( "author" )); - QDomNode meta = KoDom::namedItemNS( m_meta, ooNS::office, "document-meta" ); - QDomNode office = KoDom::namedItemNS( meta, ooNS::office, "meta" ); + TQDomNode meta = KoDom::namedItemNS( m_meta, ooNS::office, "document-meta" ); + TQDomNode office = KoDom::namedItemNS( meta, ooNS::office, "meta" ); if ( office.isNull() ) return 2; - QDomElement e = KoDom::namedItemNS( office, ooNS::dc, "creator" ); + TQDomElement e = KoDom::namedItemNS( office, ooNS::dc, "creator" ); if ( !e.isNull() && !e.text().isEmpty() ) authorPage->setFullName( e.text() ); @@ -2725,7 +2725,7 @@ int OpenCalcImport::readMetaData() if ( !e.isNull() && e.hasAttributeNS( ooNS::meta, "table-count" ) ) { bool ok = false; - result = e.attributeNS( ooNS::meta, "table-count", QString::null ).toInt( &ok ); + result = e.attributeNS( ooNS::meta, "table-count", TQString() ).toInt( &ok ); if ( !ok ) result = 5; } @@ -2735,7 +2735,7 @@ int OpenCalcImport::readMetaData() return result; } -KoFilter::ConversionStatus OpenCalcImport::convert( QCString const & from, QCString const & to ) +KoFilter::ConversiontqStatus OpenCalcImport::convert( TQCString const & from, TQCString const & to ) { kdDebug(30518) << "Entering OpenCalc Import filter: " << from << " - " << to << endl; @@ -2743,7 +2743,7 @@ KoFilter::ConversionStatus OpenCalcImport::convert( QCString const & from, QCStr if ( !document ) return KoFilter::StupidError; - if ( !::qt_cast<const KSpread::Doc *>( document ) ) // it's safer that way :) + if ( !::tqqt_cast<const KSpread::Doc *>( document ) ) // it's safer that way :) { kdWarning(30518) << "document isn't a KSpread::Doc but a " << document->className() << endl; return KoFilter::NotImplemented; @@ -2765,10 +2765,10 @@ KoFilter::ConversionStatus OpenCalcImport::convert( QCString const & from, QCStr kdDebug(30518) << "Opening file " << endl; - KoFilter::ConversionStatus preStatus = openFile(); + KoFilter::ConversiontqStatus pretqStatus = openFile(); - if ( preStatus != KoFilter::OK ) - return preStatus; + if ( pretqStatus != KoFilter::OK ) + return pretqStatus; emit sigProgress( 13 ); int tables = readMetaData(); @@ -2782,7 +2782,7 @@ KoFilter::ConversionStatus OpenCalcImport::convert( QCString const & from, QCStr return KoFilter::OK; } -KoFilter::ConversionStatus OpenCalcImport::openFile() +KoFilter::ConversiontqStatus OpenCalcImport::openFile() { KoStore * store = KoStore::createStore( m_chain->inputFile(), KoStore::Read); @@ -2795,11 +2795,11 @@ KoFilter::ConversionStatus OpenCalcImport::openFile() } kdDebug(30518) << "Trying to open content.xml" << endl; - QString messageError; + TQString messageError; loadAndParse( m_content, "content.xml", store); kdDebug(30518) << "Opened" << endl; - QDomDocument styles; + TQDomDocument styles; kdDebug(30518) << "file content.xml loaded " << endl; loadAndParse( styles, "styles.xml", store); @@ -2817,7 +2817,7 @@ KoFilter::ConversionStatus OpenCalcImport::openFile() return KoFilter::OK; } -KoFilter::ConversionStatus OpenCalcImport::loadAndParse( QDomDocument& doc, const QString& fileName,KoStore *m_store ) +KoFilter::ConversiontqStatus OpenCalcImport::loadAndParse( TQDomDocument& doc, const TQString& fileName,KoStore *m_store ) { return OoUtils::loadAndParse( fileName, doc, m_store); } diff --git a/filters/kspread/opencalc/opencalcimport.h b/filters/kspread/opencalc/opencalcimport.h index 57379796..b7dca822 100644 --- a/filters/kspread/opencalc/opencalcimport.h +++ b/filters/kspread/opencalc/opencalcimport.h @@ -24,8 +24,8 @@ #include <KoFilter.h> #include "kspread_format.h" -#include <qdict.h> -#include <qdom.h> +#include <tqdict.h> +#include <tqdom.h> class KoStyleStack; class KoStore; @@ -42,11 +42,12 @@ class Validity; class OpenCalcImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - OpenCalcImport( KoFilter * parent, const char * name, const QStringList & ); + OpenCalcImport( KoFilter * tqparent, const char * name, const TQStringList & ); virtual ~OpenCalcImport(); - virtual KoFilter::ConversionStatus convert( QCString const & from, QCString const & to ); + virtual KoFilter::ConversiontqStatus convert( TQCString const & from, TQCString const & to ); private: @@ -54,12 +55,12 @@ class OpenCalcImport : public KoFilter class OpenCalcPoint { public: - OpenCalcPoint( QString const & str ); + OpenCalcPoint( TQString const & str ); - QString table; - QString translation; - QPoint topLeft; - QPoint botRight; + TQString table; + TQString translation; + TQPoint topLeft; + TQPoint botRight; bool isRange; }; @@ -68,51 +69,51 @@ class OpenCalcImport : public KoFilter KSpread::Doc * m_doc; KSpread::Format * m_defaultLayout; - QDomDocument m_content; - QDomDocument m_meta; - QDomDocument m_settings; + TQDomDocument m_content; + TQDomDocument m_meta; + TQDomDocument m_settings; - QDict<QDomElement> m_styles; - QDict<KSpread::Format> m_defaultStyles; - QDict<QString> m_formats; - QMap<QString,QDomElement> m_validationList; + TQDict<TQDomElement> m_styles; + TQDict<KSpread::Format> m_defaultStyles; + TQDict<TQString> m_formats; + TQMap<TQString,TQDomElement> m_validationList; - QStringList m_namedAreas; + TQStringList m_namedAreas; int readMetaData(); bool parseBody( int numOfTables ); - void insertStyles( QDomElement const & element ); - bool createStyleMap( QDomDocument const & styles ); - bool readRowFormat( QDomElement & rowNode, QDomElement * rowStyle, + void insertStyles( TQDomElement const & element ); + bool createStyleMap( TQDomDocument const & styles ); + bool readRowFormat( TQDomElement & rowNode, TQDomElement * rowStyle, KSpread::Sheet * table, int & row, int & number, bool last ); - bool readColLayouts( QDomElement & content, KSpread::Sheet * table ); - bool readRowsAndCells( QDomElement & content, KSpread::Sheet * table ); - bool readCells( QDomElement & rowNode, KSpread::Sheet * table, int row, int & columns ); - void convertFormula( QString & text, QString const & f ) const; - void loadFontStyle( KSpread::Format * layout, QDomElement const * font ) const; - void readInStyle( KSpread::Format * layout, QDomElement const & style ); - void loadStyleProperties( KSpread::Format * layout, QDomElement const & property ) const; - void loadBorder( KSpread::Format * layout, QString const & borderDef, bPos pos ) const; - void loadTableMasterStyle( KSpread::Sheet * table, QString const & stylename ); - QString * loadFormat( QDomElement * element, + bool readColLayouts( TQDomElement & content, KSpread::Sheet * table ); + bool readRowsAndCells( TQDomElement & content, KSpread::Sheet * table ); + bool readCells( TQDomElement & rowNode, KSpread::Sheet * table, int row, int & columns ); + void convertFormula( TQString & text, TQString const & f ) const; + void loadFontStyle( KSpread::Format * tqlayout, TQDomElement const * font ) const; + void readInStyle( KSpread::Format * tqlayout, TQDomElement const & style ); + void loadStyleProperties( KSpread::Format * tqlayout, TQDomElement const & property ) const; + void loadBorder( KSpread::Format * tqlayout, TQString const & borderDef, bPos pos ) const; + void loadTableMasterStyle( KSpread::Sheet * table, TQString const & stylename ); + TQString * loadFormat( TQDomElement * element, KSpread::FormatType & formatType, - QString name ); - void checkForNamedAreas( QString & formula ) const; - void loadOasisCellValidation( const QDomElement&body ); - void loadOasisValidation( KSpread::Validity* val, const QString& validationName ); - void loadOasisValidationCondition( KSpread::Validity* val,QString &valExpression ); - void loadOasisAreaName( const QDomElement&body ); + TQString name ); + void checkForNamedAreas( TQString & formula ) const; + void loadOasisCellValidation( const TQDomElement&body ); + void loadOasisValidation( KSpread::Validity* val, const TQString& validationName ); + void loadOasisValidationCondition( KSpread::Validity* val,TQString &valExpression ); + void loadOasisAreaName( const TQDomElement&body ); void loadOasisMasterLayoutPage( KSpread::Sheet * table,KoStyleStack &styleStack ); - void loadOasisValidationValue( KSpread::Validity* val, const QStringList &listVal ); - QString translatePar( QString & par ) const; - void loadCondition( KSpread::Cell*cell,const QDomElement &property ); - void loadOasisCondition(KSpread::Cell*cell,const QDomElement &property ); - void loadOasisConditionValue( const QString &styleCondition, KSpread::Conditional &newCondition ); - void loadOasisCondition( QString &valExpression, KSpread::Conditional &newCondition ); - void loadOasisValidationValue( const QStringList &listVal, KSpread::Conditional &newCondition ); - KoFilter::ConversionStatus loadAndParse( QDomDocument& doc, const QString& fileName,KoStore *m_store ); - - KoFilter::ConversionStatus openFile(); + void loadOasisValidationValue( KSpread::Validity* val, const TQStringList &listVal ); + TQString translatePar( TQString & par ) const; + void loadCondition( KSpread::Cell*cell,const TQDomElement &property ); + void loadOasisCondition(KSpread::Cell*cell,const TQDomElement &property ); + void loadOasisConditionValue( const TQString &styleCondition, KSpread::Conditional &newCondition ); + void loadOasisCondition( TQString &valExpression, KSpread::Conditional &newCondition ); + void loadOasisValidationValue( const TQStringList &listVal, KSpread::Conditional &newCondition ); + KoFilter::ConversiontqStatus loadAndParse( TQDomDocument& doc, const TQString& fileName,KoStore *m_store ); + + KoFilter::ConversiontqStatus openFile(); }; #endif // OpenCalc_IMPORT_H__ diff --git a/filters/kspread/opencalc/opencalcstyleexport.cc b/filters/kspread/opencalc/opencalcstyleexport.cc index 34d574be..2c81a2cc 100644 --- a/filters/kspread/opencalc/opencalcstyleexport.cc +++ b/filters/kspread/opencalc/opencalcstyleexport.cc @@ -28,7 +28,7 @@ #include <kspread_style.h> #include <kspread_style_manager.h> -#include <qdom.h> +#include <tqdom.h> using namespace KSpread; @@ -47,7 +47,7 @@ OpenCalcStyles::~OpenCalcStyles() { } -void OpenCalcStyles::writeStyles( QDomDocument & doc, QDomElement & autoStyles ) +void OpenCalcStyles::writeStyles( TQDomDocument & doc, TQDomElement & autoStyles ) { addColumnStyles( doc, autoStyles ); addRowStyles( doc, autoStyles ); @@ -56,12 +56,12 @@ void OpenCalcStyles::writeStyles( QDomDocument & doc, QDomElement & autoStyles ) addCellStyles( doc, autoStyles ); } -void OpenCalcStyles::writeFontDecl( QDomDocument & doc, QDomElement & fontDecls ) +void OpenCalcStyles::writeFontDecl( TQDomDocument & doc, TQDomElement & fontDecls ) { - QFont * f = m_fontList.first(); + TQFont * f = m_fontList.first(); while ( f ) { - QDomElement fontDecl = doc.createElement( "style:font-decl" ); + TQDomElement fontDecl = doc.createElement( "style:font-decl" ); fontDecl.setAttribute( "style:name", f->family() ); fontDecl.setAttribute( "fo:font-family", f->family() ); @@ -77,12 +77,12 @@ void OpenCalcStyles::writeFontDecl( QDomDocument & doc, QDomElement & fontDecls } } -void OpenCalcStyles::addFont( QFont const & font, bool def ) +void OpenCalcStyles::addFont( TQFont const & font, bool def ) { if ( def ) m_defaultFont = font; - QFont * f = m_fontList.first(); + TQFont * f = m_fontList.first(); while ( f ) { if ( f->family() == font.family() ) @@ -91,11 +91,11 @@ void OpenCalcStyles::addFont( QFont const & font, bool def ) f = m_fontList.next(); } - f = new QFont( font ); + f = new TQFont( font ); m_fontList.append( f ); } -QString OpenCalcStyles::cellStyle( CellStyle const & cs ) +TQString OpenCalcStyles::cellStyle( CellStyle const & cs ) { CellStyle * t = m_cellStyles.first(); while ( t ) @@ -111,12 +111,12 @@ QString OpenCalcStyles::cellStyle( CellStyle const & cs ) m_cellStyles.append( t ); - t->name = QString( "ce%1" ).arg( m_cellStyles.count() ); + t->name = TQString( "ce%1" ).tqarg( m_cellStyles.count() ); return t->name; } -QString OpenCalcStyles::columnStyle( ColumnStyle const & cs ) +TQString OpenCalcStyles::columnStyle( ColumnStyle const & cs ) { ColumnStyle * t = m_columnStyles.first(); while ( t ) @@ -132,17 +132,17 @@ QString OpenCalcStyles::columnStyle( ColumnStyle const & cs ) m_columnStyles.append( t ); - t->name = QString( "co%1" ).arg( m_columnStyles.count() ); + t->name = TQString( "co%1" ).tqarg( m_columnStyles.count() ); return t->name; } -QString OpenCalcStyles::numberStyle( NumberStyle const & ) +TQString OpenCalcStyles::numberStyle( NumberStyle const & ) { return ""; } -QString OpenCalcStyles::rowStyle( RowStyle const & rs ) +TQString OpenCalcStyles::rowStyle( RowStyle const & rs ) { RowStyle * t = m_rowStyles.first(); while ( t ) @@ -158,12 +158,12 @@ QString OpenCalcStyles::rowStyle( RowStyle const & rs ) m_rowStyles.append( t ); - t->name = QString( "ro%1" ).arg( m_rowStyles.count() ); + t->name = TQString( "ro%1" ).tqarg( m_rowStyles.count() ); return t->name; } -QString OpenCalcStyles::sheetStyle( SheetStyle const & ts ) +TQString OpenCalcStyles::sheetStyle( SheetStyle const & ts ) { SheetStyle * t = m_sheetStyles.first(); while ( t ) @@ -179,32 +179,32 @@ QString OpenCalcStyles::sheetStyle( SheetStyle const & ts ) m_sheetStyles.append( t ); - t->name = QString( "ta%1" ).arg( m_sheetStyles.count() ); + t->name = TQString( "ta%1" ).tqarg( m_sheetStyles.count() ); return t->name; } -QString convertPenToString( QPen const & pen ) +TQString convertPenToString( TQPen const & pen ) { - QString s( QString( "%1cm solid " ).arg( pen.width() * 0.035 ) ); + TQString s( TQString( "%1cm solid " ).tqarg( pen.width() * 0.035 ) ); s += pen.color().name(); return s; } -void OpenCalcStyles::addCellStyles( QDomDocument & doc, QDomElement & autoStyles ) +void OpenCalcStyles::addCellStyles( TQDomDocument & doc, TQDomElement & autoStyles ) { CellStyle * t = m_cellStyles.first(); while ( t ) { - QDomElement ts = doc.createElement( "style:style" ); + TQDomElement ts = doc.createElement( "style:style" ); ts.setAttribute( "style:name", t->name ); ts.setAttribute( "style:family", "table-cell" ); - ts.setAttribute( "style:parent-style-name", "Default" ); + ts.setAttribute( "style:tqparent-style-name", "Default" ); if ( t->numberStyle.length() > 0 ) ts.setAttribute( "style:data-style-name", t->numberStyle ); - QDomElement prop = doc.createElement( "style:properties" ); + TQDomElement prop = doc.createElement( "style:properties" ); if ( t->font.family() != m_defaultFont.family() ) prop.setAttribute( "style:font-name", t->font.family() ); @@ -212,7 +212,7 @@ void OpenCalcStyles::addCellStyles( QDomDocument & doc, QDomElement & autoStyles if ( t->font.bold() != m_defaultFont.bold() ) prop.setAttribute( "fo:font-weight", ( t->font.bold() ? "bold" : "light" ) ); - prop.setAttribute( "fo:font-size", QString( "%1pt" ).arg( t->font.pointSize() ) ); + prop.setAttribute( "fo:font-size", TQString( "%1pt" ).tqarg( t->font.pointSize() ) ); if ( t->font.underline() != m_defaultFont.underline() ) { @@ -235,7 +235,7 @@ void OpenCalcStyles::addCellStyles( QDomDocument & doc, QDomElement & autoStyles if ( t->alignX != Format::Undefined ) { - QString value; + TQString value; if ( t->alignX == Format::Center ) value = "center"; else if ( t->alignX == Format::Right ) @@ -250,7 +250,7 @@ void OpenCalcStyles::addCellStyles( QDomDocument & doc, QDomElement & autoStyles if ( t->indent > 0.0 ) { - prop.setAttribute( "fo:margin-left", QString( "%1pt" ).arg( t->indent ) ); + prop.setAttribute( "fo:margin-left", TQString( "%1pt" ).tqarg( t->indent ) ); if ( t->alignX == Format::Undefined ) prop.setAttribute( "fo:text-align", "start" ); } @@ -265,7 +265,7 @@ void OpenCalcStyles::addCellStyles( QDomDocument & doc, QDomElement & autoStyles } if ( t->angle != 0 ) - prop.setAttribute( "style:rotation-angle", QString::number( t->angle ) ); + prop.setAttribute( "style:rotation-angle", TQString::number( t->angle ) ); if ( !t->print ) prop.setAttribute( "style:print-content", "false" ); @@ -286,21 +286,21 @@ void OpenCalcStyles::addCellStyles( QDomDocument & doc, QDomElement & autoStyles if ( ( t->left == t->right ) && ( t->left == t->top ) && ( t->left == t->bottom ) ) { - if ( ( t->left.width() != 0 ) && ( t->left.style() != Qt::NoPen ) ) + if ( ( t->left.width() != 0 ) && ( t->left.style() != TQt::NoPen ) ) prop.setAttribute( "fo:border", convertPenToString( t->left ) ); } else { - if ( ( t->left.width() != 0 ) && ( t->left.style() != Qt::NoPen ) ) + if ( ( t->left.width() != 0 ) && ( t->left.style() != TQt::NoPen ) ) prop.setAttribute( "fo:border-left", convertPenToString( t->left ) ); - if ( ( t->right.width() != 0 ) && ( t->right.style() != Qt::NoPen ) ) + if ( ( t->right.width() != 0 ) && ( t->right.style() != TQt::NoPen ) ) prop.setAttribute( "fo:border-right", convertPenToString( t->right ) ); - if ( ( t->top.width() != 0 ) && ( t->top.style() != Qt::NoPen ) ) + if ( ( t->top.width() != 0 ) && ( t->top.style() != TQt::NoPen ) ) prop.setAttribute( "fo:border-top", convertPenToString( t->top ) ); - if ( ( t->bottom.width() != 0 ) && ( t->bottom.style() != Qt::NoPen ) ) + if ( ( t->bottom.width() != 0 ) && ( t->bottom.style() != TQt::NoPen ) ) prop.setAttribute( "fo:border-bottom", convertPenToString( t->bottom ) ); } @@ -311,19 +311,19 @@ void OpenCalcStyles::addCellStyles( QDomDocument & doc, QDomElement & autoStyles } } -void OpenCalcStyles::addColumnStyles( QDomDocument & doc, QDomElement & autoStyles ) +void OpenCalcStyles::addColumnStyles( TQDomDocument & doc, TQDomElement & autoStyles ) { ColumnStyle * t = m_columnStyles.first(); while ( t ) { - QDomElement ts = doc.createElement( "style:style" ); + TQDomElement ts = doc.createElement( "style:style" ); ts.setAttribute( "style:name", t->name ); ts.setAttribute( "style:family", "table-column" ); - QDomElement prop = doc.createElement( "style:properties" ); + TQDomElement prop = doc.createElement( "style:properties" ); if ( t->breakB != ::Style::none ) prop.setAttribute( "fo:break-before", ( t->breakB == ::Style::automatic ? "auto" : "page" ) ); - prop.setAttribute( "style:column-width", QString( "%1cm" ).arg( t->size ) ); + prop.setAttribute( "style:column-width", TQString( "%1cm" ).tqarg( t->size ) ); ts.appendChild( prop ); autoStyles.appendChild( ts ); @@ -332,21 +332,21 @@ void OpenCalcStyles::addColumnStyles( QDomDocument & doc, QDomElement & autoStyl } } -void OpenCalcStyles::addNumberStyles( QDomDocument & /*doc*/, QDomElement & /*autoStyles*/ ) +void OpenCalcStyles::addNumberStyles( TQDomDocument & /*doc*/, TQDomElement & /*autoStyles*/ ) { } -void OpenCalcStyles::addRowStyles( QDomDocument & doc, QDomElement & autoStyles ) +void OpenCalcStyles::addRowStyles( TQDomDocument & doc, TQDomElement & autoStyles ) { RowStyle * t = m_rowStyles.first(); while ( t ) { - QDomElement ts = doc.createElement( "style:style" ); + TQDomElement ts = doc.createElement( "style:style" ); ts.setAttribute( "style:name", t->name ); ts.setAttribute( "style:family", "table-row" ); - QDomElement prop = doc.createElement( "style:properties" ); - prop.setAttribute( "style:row-height", QString( "%1cm" ).arg( t->size ) ); + TQDomElement prop = doc.createElement( "style:properties" ); + prop.setAttribute( "style:row-height", TQString( "%1cm" ).tqarg( t->size ) ); if ( t->breakB != ::Style::none ) prop.setAttribute( "fo:break-before", ( t->breakB == ::Style::automatic ? "auto" : "page" ) ); @@ -357,17 +357,17 @@ void OpenCalcStyles::addRowStyles( QDomDocument & doc, QDomElement & autoStyles } } -void OpenCalcStyles::addSheetStyles( QDomDocument & doc, QDomElement & autoStyles ) +void OpenCalcStyles::addSheetStyles( TQDomDocument & doc, TQDomElement & autoStyles ) { SheetStyle * t = m_sheetStyles.first(); while ( t ) { - QDomElement ts = doc.createElement( "style:style" ); + TQDomElement ts = doc.createElement( "style:style" ); ts.setAttribute( "style:name", t->name ); ts.setAttribute( "style:family", "table" ); ts.setAttribute( "style:master-page-name", "Default" ); - QDomElement prop = doc.createElement( "style:properties" ); + TQDomElement prop = doc.createElement( "style:properties" ); prop.setAttribute( "table:display", ( t->visible ? "true" : "false" ) ); ts.appendChild( prop ); @@ -386,17 +386,17 @@ bool SheetStyle::isEqual( SheetStyle const * const t1, SheetStyle const & t2 ) } CellStyle::CellStyle() - : color( Qt::black ), - bgColor( Qt::white ), + : color( TQt::black ), + bgColor( TQt::white ), indent( -1.0 ), wrap( false ), vertical( false ), angle( 0 ), print( true ), - left ( Qt::black, 0, Qt::NoPen ), - right( Qt::black, 0, Qt::NoPen ), - top ( Qt::black, 0, Qt::NoPen ), - bottom( Qt::black, 0, Qt::NoPen ), + left ( TQt::black, 0, TQt::NoPen ), + right( TQt::black, 0, TQt::NoPen ), + top ( TQt::black, 0, TQt::NoPen ), + bottom( TQt::black, 0, TQt::NoPen ), hideAll( false ), hideFormula( false ), notProtected ( false ), @@ -452,15 +452,15 @@ void CellStyle::loadData( CellStyle & cs, Cell const * const cell ) Format * f = new Format( 0, cell->sheet()->doc()->styleManager()->defaultStyle() ); - QFont font = cell->format()->textFont( col, row ); + TQFont font = cell->format()->textFont( col, row ); if ( font != f->font() ) cs.font = font; - QColor color = cell->format()->textColor( col, row ); + TQColor color = cell->format()->textColor( col, row ); if ( color != f->textColor( col, row ) ) cs.color = color; - QColor bgColor = cell->bgColor( col, row ); + TQColor bgColor = cell->bgColor( col, row ); if ( bgColor != f->bgColor( col, row ) ) cs.bgColor = bgColor; diff --git a/filters/kspread/opencalc/opencalcstyleexport.h b/filters/kspread/opencalc/opencalcstyleexport.h index 2321b529..e5dfde94 100644 --- a/filters/kspread/opencalc/opencalcstyleexport.h +++ b/filters/kspread/opencalc/opencalcstyleexport.h @@ -23,18 +23,18 @@ #include "kspread_format.h" -#include <qcolor.h> -#include <qfont.h> -#include <qptrlist.h> -#include <qstring.h> +#include <tqcolor.h> +#include <tqfont.h> +#include <tqptrlist.h> +#include <tqstring.h> namespace KSpread { class Cell; } -class QDomDocument; -class QDomElement; +class TQDomDocument; +class TQDomElement; typedef enum T1 { Boolean, Date, Number, Percentage, Time } NumberType; @@ -45,7 +45,7 @@ class Style Style() : breakB( none ), size( 0.0 ) {} - QString name; + TQString name; uint breakB; double size; }; @@ -58,7 +58,7 @@ class SheetStyle void copyData( SheetStyle const & ts ) { visible = ts.visible; } static bool isEqual( SheetStyle const * const t1, SheetStyle const & t2 ); - QString name; + TQString name; bool visible; }; @@ -70,10 +70,10 @@ class NumberStyle void copyData( NumberStyle const & ts ) { type = ts.type; } static bool isEqual( NumberStyle const * const t1, NumberStyle const & t2 ); - QString name; + TQString name; NumberType type; - QString pattern; + TQString pattern; }; class CellStyle @@ -87,21 +87,21 @@ class CellStyle // all except the number style static void loadData( CellStyle & cs, KSpread::Cell const * const cell ); - QString name; + TQString name; - QFont font; - QString numberStyle; - QColor color; - QColor bgColor; + TQFont font; + TQString numberStyle; + TQColor color; + TQColor bgColor; double indent; bool wrap; bool vertical; int angle; bool print; - QPen left; - QPen right; - QPen top; - QPen bottom; + TQPen left; + TQPen right; + TQPen top; + TQPen bottom; bool hideAll; bool hideFormula; bool notProtected; @@ -134,32 +134,32 @@ class OpenCalcStyles OpenCalcStyles(); ~OpenCalcStyles(); - void writeStyles ( QDomDocument & doc, QDomElement & autoStyles ); - void writeFontDecl( QDomDocument & doc, QDomElement & content ); + void writeStyles ( TQDomDocument & doc, TQDomElement & autoStyles ); + void writeFontDecl( TQDomDocument & doc, TQDomElement & content ); - void addFont( QFont const & font, bool def = false ); + void addFont( TQFont const & font, bool def = false ); - QString cellStyle( CellStyle const & cs ); - QString columnStyle( ColumnStyle const & cs ); - QString numberStyle( NumberStyle const & ns ); - QString rowStyle( RowStyle const & rs ); - QString sheetStyle( SheetStyle const & ts ); + TQString cellStyle( CellStyle const & cs ); + TQString columnStyle( ColumnStyle const & cs ); + TQString numberStyle( NumberStyle const & ns ); + TQString rowStyle( RowStyle const & rs ); + TQString sheetStyle( SheetStyle const & ts ); private: - QPtrList<CellStyle> m_cellStyles; - QPtrList<ColumnStyle> m_columnStyles; - QPtrList<NumberStyle> m_numberStyles; - QPtrList<RowStyle> m_rowStyles; - QPtrList<SheetStyle> m_sheetStyles; - QPtrList<QFont> m_fontList; - - QFont m_defaultFont; - - void addCellStyles( QDomDocument & doc, QDomElement & autoStyles ); - void addColumnStyles( QDomDocument & doc, QDomElement & autoStyles ); - void addNumberStyles( QDomDocument & doc, QDomElement & autoStyles ); - void addRowStyles( QDomDocument & doc, QDomElement & autoStyles ); - void addSheetStyles( QDomDocument & doc, QDomElement & autoStyles ); + TQPtrList<CellStyle> m_cellStyles; + TQPtrList<ColumnStyle> m_columnStyles; + TQPtrList<NumberStyle> m_numberStyles; + TQPtrList<RowStyle> m_rowStyles; + TQPtrList<SheetStyle> m_sheetStyles; + TQPtrList<TQFont> m_fontList; + + TQFont m_defaultFont; + + void addCellStyles( TQDomDocument & doc, TQDomElement & autoStyles ); + void addColumnStyles( TQDomDocument & doc, TQDomElement & autoStyles ); + void addNumberStyles( TQDomDocument & doc, TQDomElement & autoStyles ); + void addRowStyles( TQDomDocument & doc, TQDomElement & autoStyles ); + void addSheetStyles( TQDomDocument & doc, TQDomElement & autoStyles ); }; diff --git a/filters/kspread/opencalc/status.html b/filters/kspread/opencalc/status.html index b23f6ae9..e2d667ad 100644 --- a/filters/kspread/opencalc/status.html +++ b/filters/kspread/opencalc/status.html @@ -47,11 +47,11 @@ KOffice filters status: OpenOffice.org Calc</h1></center> Links (e-mail, files, web)<br> cell content<br> Datatypes: float, percentage, (date), times, booleans (miss some kspread support) <br> - Formating: indents, bold, italic, alignments, colors...<br> + Formating: indents, bold, italic, tqalignments, colors...<br> Borders, background colors<br> column width, row width<br> - column layouts, row layouts<br> - page layout (size, border)<br> + column tqlayouts, row tqlayouts<br> + page tqlayout (size, border)<br> OpenCalc style import, default style<br> format string translating (not supported by KSpread yet, but this filter produces these strings => needs enhancements in KSpread)<br> header, footer (including macros)<br> @@ -139,7 +139,7 @@ KOffice filters status: OpenOffice.org Calc</h1></center> Page sizes, header and footer (including variable converting)<br> Font (sizes, attributes, color)<br> Background color<br> - Text alignment, angle, vertical text, text wrap and indents<br> + Text tqalignment, angle, vertical text, text wrap and indents<br> Merged Cells<br> DontPrint flag<br> Comments<br> @@ -169,10 +169,10 @@ KOffice filters status: OpenOffice.org Calc</h1></center> <td> Jan 12, 2003 - Initial Revision<br> - Jan 18, 2003 - page layout, header, footer<br> + Jan 18, 2003 - page tqlayout, header, footer<br> Jan 19, 2003 - Added support for fonts, text color, background color, formula conversion<br> - Jan 19, 2003 - text alignment, indents, comments, NoPrint, Merged Cells<br> + Jan 19, 2003 - text tqalignment, indents, comments, NoPrint, Merged Cells<br> Jan 19, 2003 - angle, vertical text, text wrap<br> Jan 19, 2003 - named area, hidden columns and rows<br> Jan 20, 2003 - cell borders<br> diff --git a/filters/kspread/qpro/libqpro/qpro/common.h b/filters/kspread/qpro/libqpro/qpro/common.h index a312d632..644ab1ce 100644 --- a/filters/kspread/qpro/libqpro/qpro/common.h +++ b/filters/kspread/qpro/libqpro/qpro/common.h @@ -1,11 +1,11 @@ -#ifndef QPRO_COMMON_H -#define QPRO_COMMON_H +#ifndef TQPRO_COMMON_H +#define TQPRO_COMMON_H -#ifdef QP_TRACE -#define QP_DEBUG(x) cerr << x +#ifdef TQP_TRACE +#define TQP_DEBUG(x) cerr << x #else -#define QP_DEBUG(x) +#define TQP_DEBUG(x) #endif -#endif // QPRO_COMMON_H +#endif // TQPRO_COMMON_H diff --git a/filters/kspread/qpro/libqpro/qpro/formula.h b/filters/kspread/qpro/libqpro/qpro/formula.h index 6edd52b5..a0af2af6 100644 --- a/filters/kspread/qpro/libqpro/qpro/formula.h +++ b/filters/kspread/qpro/libqpro/qpro/formula.h @@ -1,5 +1,5 @@ -#ifndef QPRO_FORMULA_H -#define QPRO_FORMULA_H +#ifndef TQPRO_FORMULA_H +#define TQPRO_FORMULA_H #include <qpro/tablenames.h> #include <qpro/stream.h> @@ -35,7 +35,7 @@ protected: struct QpFormulaConv { - QP_INT8 cOperand; + TQP_INT8 cOperand; void (*cFunc)(QpFormula& pThis, const char* pArg); const char* cArg; }; @@ -125,4 +125,4 @@ protected: void unaryOperandReal(const char* pOper); }; -#endif // QPRO_FORMULA_H +#endif // TQPRO_FORMULA_H diff --git a/filters/kspread/qpro/libqpro/qpro/record.h b/filters/kspread/qpro/libqpro/qpro/record.h index a7aeb505..37321d30 100644 --- a/filters/kspread/qpro/libqpro/qpro/record.h +++ b/filters/kspread/qpro/libqpro/qpro/record.h @@ -1,5 +1,5 @@ -#ifndef QPRO_RECORD_H -#define QPRO_RECORD_H +#ifndef TQPRO_RECORD_H +#define TQPRO_RECORD_H #include <qpro/tablenames.h> #include <qpro/stream.h> @@ -29,28 +29,28 @@ public: QpRec(QpRecType pType); ~QpRec(); - QP_INT16 type(); + TQP_INT16 type(); protected: - QP_INT16 cType; + TQP_INT16 cType; }; // ----------------------------------------------------------------------- -//class QP_CELL_REF +//class TQP_CELL_REF //{ //public: -// QP_CELL_REF(QpIStream& pIn); -// ~QP_CELL_REF(); +// TQP_CELL_REF(QpIStream& pIn); +// ~TQP_CELL_REF(); // -// QP_UINT8 Column(); -// QP_INT16 Row(); +// TQP_UINT8 Column(); +// TQP_INT16 Row(); // //protected: -// QP_UINT8 cColumn; -// QP_INT16 cNoteBook; -// QP_INT8 cPage; -// QP_INT16 cRow; +// TQP_UINT8 cColumn; +// TQP_INT16 cNoteBook; +// TQP_INT8 cPage; +// TQP_INT16 cRow; //}; // ----------------------------------------------------------------------- @@ -61,26 +61,26 @@ public: QpRecCell(QpRecType pType); ~QpRecCell(); - void attributes(QP_INT16 pAttributes); - QP_INT16 attributes(); + void attributes(TQP_INT16 pAttributes); + TQP_INT16 attributes(); // const char* cellRef(); - void cellRef(char* pText, QpTableNames& pTable, QP_INT16 pNoteBook, QP_UINT8 pPage, QP_UINT8 pColumn, QP_INT16 pRow); + void cellRef(char* pText, QpTableNames& pTable, TQP_INT16 pNoteBook, TQP_UINT8 pPage, TQP_UINT8 pColumn, TQP_INT16 pRow); void cellRef(char* pText, QpTableNames& pTable, QpIStream& pFormulaRef); - void column(QP_UINT8 pColumn); - QP_UINT8 column(); + void column(TQP_UINT8 pColumn); + TQP_UINT8 column(); - void row(QP_INT16 pRow); - QP_INT16 row(); + void row(TQP_INT16 pRow); + TQP_INT16 row(); protected: int loadCellInfo(QpIStream& pIn); - QP_INT16 cAttributes; - QP_UINT8 cColumn; - QP_UINT8 cPage; - QP_INT16 cRow; + TQP_INT16 cAttributes; + TQP_UINT8 cColumn; + TQP_UINT8 cPage; + TQP_INT16 cRow; char* cCellRef; }; @@ -89,14 +89,14 @@ protected: class QpRecBof : public QpRec { public: - QpRecBof(QP_INT16 pLen, QpIStream& pIn); + QpRecBof(TQP_INT16 pLen, QpIStream& pIn); ~QpRecBof(); - void fileFormat(QP_INT16 pFileFormat); - QP_INT16 fileFormat(); + void fileFormat(TQP_INT16 pFileFormat); + TQP_INT16 fileFormat(); protected: - QP_INT16 cFileFormat; + TQP_INT16 cFileFormat; }; // ----------------------------------------------------------------------- @@ -104,7 +104,7 @@ protected: class QpRecEof : public QpRec { public: - QpRecEof(QP_INT16 pLen, QpIStream& pIn); + QpRecEof(TQP_INT16 pLen, QpIStream& pIn); ~QpRecEof(); }; @@ -116,7 +116,7 @@ class QpRecRecalcMode : public QpRec public: enum MODE{Manual=0, Background=1, Automatic=255}; - QpRecRecalcMode(QP_INT16 pLen, QpIStream& pIn); + QpRecRecalcMode(TQP_INT16 pLen, QpIStream& pIn); ~QpRecRecalcMode(); void mode(MODE pMode); @@ -134,7 +134,7 @@ class QpRecRecalcOrder : public QpRec public: enum ORDER { Natural=0, Column=1, Row=255 }; - QpRecRecalcOrder(QP_INT16 pLen, QpIStream& pIn); + QpRecRecalcOrder(TQP_INT16 pLen, QpIStream& pIn); ~QpRecRecalcOrder(); void order(ORDER pOrder); @@ -157,7 +157,7 @@ protected: class QpRecEmptyCell : public QpRecCell { public: - QpRecEmptyCell(QP_INT16 pLen, QpIStream& pIn); + QpRecEmptyCell(TQP_INT16 pLen, QpIStream& pIn); ~QpRecEmptyCell(); }; @@ -167,13 +167,13 @@ public: class QpRecIntegerCell : public QpRecCell { public: - QpRecIntegerCell(QP_INT16 pLen, QpIStream& pIn); + QpRecIntegerCell(TQP_INT16 pLen, QpIStream& pIn); ~QpRecIntegerCell(); - QP_INT16 integer(); + TQP_INT16 integer(); protected: - QP_INT16 cInt; + TQP_INT16 cInt; }; // ----------------------------------------------------------------------- @@ -181,12 +181,12 @@ protected: class QpRecFloatingPointCell : public QpRecCell { public: - QpRecFloatingPointCell(QP_INT16 pLen, QpIStream& pIn); + QpRecFloatingPointCell(TQP_INT16 pLen, QpIStream& pIn); ~QpRecFloatingPointCell(); - QP_INT64 value(); + TQP_INT64 value(); protected: - QP_INT64 cValue; + TQP_INT64 cValue; }; // ----------------------------------------------------------------------- @@ -194,19 +194,19 @@ protected: class QpRecFormulaCell : public QpRecCell { public: - QpRecFormulaCell(QP_INT16 pLen, QpIStream& pIn); + QpRecFormulaCell(TQP_INT16 pLen, QpIStream& pIn); ~QpRecFormulaCell(); const char* formula(); - QP_INT16 formulaReferences(); - QP_INT16 formulaLen(); + TQP_INT16 formulaReferences(); + TQP_INT16 formulaLen(); protected: - QP_INT16 cCellRef; + TQP_INT16 cCellRef; char* cFormula; - QP_INT64 cLastValue; - QP_INT16 cLen; - QP_INT16 cState; + TQP_INT64 cLastValue; + TQP_INT16 cLen; + TQP_INT16 cState; }; // ----------------------------------------------------------------------- @@ -214,7 +214,7 @@ protected: class QpRecLabelCell : public QpRecCell { public: - QpRecLabelCell(QP_INT16 pLen, QpIStream& pIn); + QpRecLabelCell(TQP_INT16 pLen, QpIStream& pIn); ~QpRecLabelCell(); char labelPrefix(); @@ -230,7 +230,7 @@ protected: class QpRecUnknown : public QpRec { public: - QpRecUnknown(QP_INT16 pType, QP_INT16 pLen, QpIStream& pIn); + QpRecUnknown(TQP_INT16 pType, TQP_INT16 pLen, QpIStream& pIn); ~QpRecUnknown(); }; @@ -239,13 +239,13 @@ public: class QpRecBop : public QpRec { public: - QpRecBop(QP_INT16 pLen, QpIStream& pIn); + QpRecBop(TQP_INT16 pLen, QpIStream& pIn); ~QpRecBop(); - QP_UINT8 pageIndex(); + TQP_UINT8 pageIndex(); protected: - QP_UINT8 cPageIndex; + TQP_UINT8 cPageIndex; }; // ----------------------------------------------------------------------- @@ -253,7 +253,7 @@ protected: class QpRecPageName : public QpRec { public: - QpRecPageName(QP_INT16 pLen, QpIStream& pIn); + QpRecPageName(TQP_INT16 pLen, QpIStream& pIn); ~QpRecPageName(); const char* pageName(); @@ -267,14 +267,14 @@ protected: class QpRecPassword : public QpRec { public: - QpRecPassword(QP_INT16 pLen, QpIStream& pIn); + QpRecPassword(TQP_INT16 pLen, QpIStream& pIn); ~QpRecPassword(); - const QP_UINT8* password(); + const TQP_UINT8* password(); protected: - QP_UINT8* cPassword; + TQP_UINT8* cPassword; }; -#endif // QPRO_RECORD_H +#endif // TQPRO_RECORD_H diff --git a/filters/kspread/qpro/libqpro/qpro/record_factory.h b/filters/kspread/qpro/libqpro/qpro/record_factory.h index b6f9cc23..ea567d52 100644 --- a/filters/kspread/qpro/libqpro/qpro/record_factory.h +++ b/filters/kspread/qpro/libqpro/qpro/record_factory.h @@ -1,5 +1,5 @@ -#ifndef QPRO_RECORD_FACTORY_H -#define QPRO_RECORD_FACTORY_H +#ifndef TQPRO_RECORD_FACTORY_H +#define TQPRO_RECORD_FACTORY_H #include <qpro/stream.h> #include <qpro/record.h> @@ -15,5 +15,5 @@ protected: QpIStream& cIn; }; -#endif // QPRO_RECORD_FACTORY_H +#endif // TQPRO_RECORD_FACTORY_H diff --git a/filters/kspread/qpro/libqpro/qpro/stream.h b/filters/kspread/qpro/libqpro/qpro/stream.h index a112bdb6..0b101268 100644 --- a/filters/kspread/qpro/libqpro/qpro/stream.h +++ b/filters/kspread/qpro/libqpro/qpro/stream.h @@ -1,27 +1,27 @@ -#ifndef QPRO_STREAM_H -#define QPRO_STREAM_H +#ifndef TQPRO_STREAM_H +#define TQPRO_STREAM_H //#define USE_QT #ifdef USE_QT -#include <qdatastream.h> -#include <qbuffer.h> +#include <tqdatastream.h> +#include <tqbuffer.h> -typedef Q_UINT8 QP_UINT8; -typedef Q_INT8 QP_INT8; -typedef Q_INT16 QP_INT16; -typedef Q_INT32 QP_INT32; +typedef TQ_UINT8 TQP_UINT8; +typedef TQ_INT8 TQP_INT8; +typedef TQ_INT16 TQP_INT16; +typedef TQ_INT32 TQP_INT32; -class QpStream : public QDataStream +class QpStream : public TQDataStream { public: QpStream(unsigned char* pBuffer, unsigned int pLen); ~QpStream(); protected: - QBuffer cBuf; - QByteArray cByteArray; + TQBuffer cBuf; + TQByteArray cByteArray; unsigned char* cBuffer; unsigned int cLen; @@ -34,11 +34,11 @@ using namespace std; // ??? sort out how to do sizes -typedef char QP_INT8 ; -typedef unsigned char QP_UINT8 ; -typedef short QP_INT16 ; -typedef int QP_INT32 ; -typedef double QP_INT64 ; +typedef char TQP_INT8 ; +typedef unsigned char TQP_UINT8 ; +typedef short TQP_INT16 ; +typedef int TQP_INT32 ; +typedef double TQP_INT64 ; class QpIStream { @@ -49,16 +49,16 @@ public: int get(); - QpIStream& read(char* pBuf, QP_INT16 pLen); + QpIStream& read(char* pBuf, TQP_INT16 pLen); operator void* (); int operator !(); - QpIStream& operator >> (QP_INT8 &pI8); - QpIStream& operator >> (QP_UINT8 &pI8); - QpIStream& operator >> (QP_INT16 &pI16); - QpIStream& operator >> (QP_INT32 &pI32); - QpIStream& operator >> (QP_INT64 &pI64); + QpIStream& operator >> (TQP_INT8 &pI8); + QpIStream& operator >> (TQP_UINT8 &pI8); + QpIStream& operator >> (TQP_INT16 &pI16); + QpIStream& operator >> (TQP_INT32 &pI32); + QpIStream& operator >> (TQP_INT64 &pI64); QpIStream& operator >> (char*& pStr); protected: @@ -69,4 +69,4 @@ protected: #endif -#endif // QPRO_STREAM_H +#endif // TQPRO_STREAM_H diff --git a/filters/kspread/qpro/libqpro/qpro/tablenames.h b/filters/kspread/qpro/libqpro/qpro/tablenames.h index 286cbb64..d8208f64 100644 --- a/filters/kspread/qpro/libqpro/qpro/tablenames.h +++ b/filters/kspread/qpro/libqpro/qpro/tablenames.h @@ -1,5 +1,5 @@ -#ifndef QPRO_TABLENAMES_H -#define QPRO_TABLENAMES_H +#ifndef TQPRO_TABLENAMES_H +#define TQPRO_TABLENAMES_H // ----------------------------------------------------------------------- @@ -19,5 +19,5 @@ protected: char* cName[cNameCnt]; }; -#endif // QPRO_TABLENAMES_H +#endif // TQPRO_TABLENAMES_H diff --git a/filters/kspread/qpro/libqpro/src/formula.cc b/filters/kspread/qpro/libqpro/src/formula.cc index 14630a50..bd250048 100644 --- a/filters/kspread/qpro/libqpro/src/formula.cc +++ b/filters/kspread/qpro/libqpro/src/formula.cc @@ -214,7 +214,7 @@ static const QpFormulaConv gConv[] = {73, QpFormula::func3, "@mid("}, {74, QpFormula::func1, "@char("}, {75, QpFormula::func1, "@code("}, - {76, QpFormula::func3, "@find("}, + {76, QpFormula::func3, "@tqfind("}, {77, QpFormula::func1, "@dateVal("}, {78, QpFormula::func1, "@timeVal("}, {79, QpFormula::func1, "@cellPtr("}, @@ -244,7 +244,7 @@ static const QpFormulaConv gConv[] = {103, QpFormula::func1, "@lower("}, {104, QpFormula::func2, "@left("}, {105, QpFormula::func2, "@right("}, - {106, QpFormula::func4, "@replace("}, + {106, QpFormula::func4, "@tqreplace("}, {107, QpFormula::func1, "@proper("}, {108, QpFormula::func2, "@cell("}, {109, QpFormula::func1, "@trim("}, @@ -329,7 +329,7 @@ QpFormula::argSeparator(const char* pArg) char* QpFormula::formula() { - QP_INT8 lOperand; + TQP_INT8 lOperand; cStack.push(cFormulaStart); @@ -349,7 +349,7 @@ QpFormula::formula() if( cReplaceFunc[lIdx].cOperand == lOperand ) { lFound = -1; - QP_DEBUG("Processing " << (int)lOperand << endl); + TQP_DEBUG("Processing " << (int)lOperand << endl); (*cReplaceFunc[lIdx].cFunc)(*this, cReplaceFunc[lIdx].cArg); } } @@ -364,17 +364,17 @@ QpFormula::formula() if( gConv[lIdx].cOperand == lOperand ) { lFound = -1; - QP_DEBUG("Processing " << (int)lOperand << endl); + TQP_DEBUG("Processing " << (int)lOperand << endl); (*gConv[lIdx].cFunc)(*this, gConv[lIdx].cArg); } } - QP_DEBUG("Top = " << cStack.top() << endl); + TQP_DEBUG("Top = " << cStack.top() << endl); } cStack.join(2, ""); - QP_DEBUG("Formula = " << cStack.top() << endl); + TQP_DEBUG("Formula = " << cStack.top() << endl); return strcpy(new char[strlen(cStack.top())+1], cStack.top()); } @@ -461,7 +461,7 @@ QpFormula::func4Real(const char* pFunc) void QpFormula::funcVReal(const char* pFunc) { - QP_INT8 lCnt; + TQP_INT8 lCnt; const char* lFunc = (cDropLeadingAt && pFunc[0] == '@' ? &pFunc[1] : pFunc); cFormula >> lCnt; @@ -473,7 +473,7 @@ QpFormula::funcVReal(const char* pFunc) void QpFormula::floatFuncReal(const char*) { - QP_INT64 lFloat; + TQP_INT64 lFloat; std::ostrstream lNum; cFormula >> lFloat; @@ -488,7 +488,7 @@ QpFormula::floatFuncReal(const char*) void QpFormula::intFuncReal(const char*) { - QP_INT16 lInt; + TQP_INT16 lInt; std::ostrstream lNum; cFormula >> lInt; diff --git a/filters/kspread/qpro/libqpro/src/record.cc b/filters/kspread/qpro/libqpro/src/record.cc index 5d26df7b..8aa877c6 100644 --- a/filters/kspread/qpro/libqpro/src/record.cc +++ b/filters/kspread/qpro/libqpro/src/record.cc @@ -77,7 +77,7 @@ QpRec::~QpRec() { } -QP_INT16 +TQP_INT16 QpRec::type() { return cType; @@ -90,7 +90,7 @@ QpRec::type() //{ // pIn >> cNoteBook >> cColumn >> cPage >> cRow; // -//QP_DEBUG("CellRef: NoteBook" << cNoteBook << ", col " +//TQP_DEBUG("CellRef: NoteBook" << cNoteBook << ", col " // << cColumn << ", Page " << (int)cPage << ", Row " // << cRow << endl // ); @@ -100,13 +100,13 @@ QpRec::type() //{ //} // -//QP_UINT8 +//TQP_UINT8 //QpCellRef::column() //{ // return cColumn; //} // -//QP_INT16 +//TQP_INT16 //QpCellRef::row() //{ // return cRow; @@ -132,36 +132,36 @@ QpRecCell::~QpRecCell() void -QpRecCell::attributes(QP_INT16 pAttributes) +QpRecCell::attributes(TQP_INT16 pAttributes) { cAttributes = pAttributes; } -QP_INT16 +TQP_INT16 QpRecCell::attributes() { return cAttributes; } void -QpRecCell::column(QP_UINT8 pColumn) +QpRecCell::column(TQP_UINT8 pColumn) { cColumn = pColumn; } -QP_UINT8 +TQP_UINT8 QpRecCell::column() { return cColumn; } void -QpRecCell::row(QP_INT16 pRow) +QpRecCell::row(TQP_INT16 pRow) { cRow = pRow; } -QP_INT16 +TQP_INT16 QpRecCell::row() { return cRow; @@ -172,7 +172,7 @@ QpRecCell::loadCellInfo(QpIStream& pIn) { pIn >> cColumn >> cPage >> cRow >> cAttributes; - QP_DEBUG(" col " << (unsigned)cColumn << ", Page " << (unsigned)cPage + TQP_DEBUG(" col " << (unsigned)cColumn << ", Page " << (unsigned)cPage << ", Row " << cRow << ", Ref " << /*???cellRef() <<*/ ", Attr " << cAttributes @@ -196,7 +196,7 @@ QpRecCell::loadCellInfo(QpIStream& pIn) // void -QpRecCell::cellRef(char* pText, QpTableNames& pTable, QP_INT16 /*pNoteBook*/, QP_UINT8 pPage, QP_UINT8 pColumn, QP_INT16 pRow) +QpRecCell::cellRef(char* pText, QpTableNames& pTable, TQP_INT16 /*pNoteBook*/, TQP_UINT8 pPage, TQP_UINT8 pColumn, TQP_INT16 pRow) { //??? cope with relative/absolute references @@ -204,10 +204,10 @@ QpRecCell::cellRef(char* pText, QpTableNames& pTable, QP_INT16 /*pNoteBook*/, QP int lPageRelative = pRow & 0x8000; int lColRelative = pRow & 0x4000; int lRowRelative = pRow & 0x2000; - QP_UINT8 lCol = (lColRelative ? cColumn + pColumn : pColumn); + TQP_UINT8 lCol = (lColRelative ? cColumn + pColumn : pColumn); // Sign bit for row is in bit 0x1000, so either set all top bits or lose all top bits - QP_INT16 lRow = (lRowRelative ? cRow + (pRow & 0x1000 ? pRow | 0xE000 : pRow & 0x1FFF) + TQP_INT16 lRow = (lRowRelative ? cRow + (pRow & 0x1000 ? pRow | 0xE000 : pRow & 0x1FFF) : pRow & 0x1FFF ); @@ -222,11 +222,11 @@ QpRecCell::cellRef(char* pText, QpTableNames& pTable, QP_INT16 /*pNoteBook*/, QP { // yes - not relative & page is a different one - QP_UINT8 lPage = ( lPageRelative ? pPage + cPage : pPage ); + TQP_UINT8 lPage = ( lPageRelative ? pPage + cPage : pPage ); - QP_DEBUG("pTable.name((unsigned)lPage) = " << pTable.name((unsigned)lPage) << endl); + TQP_DEBUG("pTable.name((unsigned)lPage) = " << pTable.name((unsigned)lPage) << endl); - lOut << pTable.name((unsigned)lPage) << '!'; // is '!' compat with QPRO??? + lOut << pTable.name((unsigned)lPage) << '!'; // is '!' compat with TQPRO??? } if( !lColRelative ) @@ -254,19 +254,19 @@ QpRecCell::cellRef(char* pText, QpTableNames& pTable, QP_INT16 /*pNoteBook*/, QP void QpRecCell::cellRef(char* pText, QpTableNames& pTable, QpIStream& pFormulaRef) { - QP_INT16 lNoteBook; + TQP_INT16 lNoteBook; pFormulaRef >> lNoteBook; // block references (eg. A1..A9) have bit 0x1000 set if( lNoteBook & 0x1000 ) { - QP_UINT8 lFirstColumn; - QP_UINT8 lFirstPage; - QP_INT16 lFirstRow; - QP_UINT8 lLastColumn; - QP_UINT8 lLastPage; - QP_INT16 lLastRow; + TQP_UINT8 lFirstColumn; + TQP_UINT8 lFirstPage; + TQP_INT16 lFirstRow; + TQP_UINT8 lLastColumn; + TQP_UINT8 lLastPage; + TQP_INT16 lLastRow; pFormulaRef >> lFirstColumn >> lFirstPage @@ -275,7 +275,7 @@ QpRecCell::cellRef(char* pText, QpTableNames& pTable, QpIStream& pFormulaRef) >> lLastPage >> lLastRow; - QP_DEBUG("BlockRef: NoteBook " << lNoteBook + TQP_DEBUG("BlockRef: NoteBook " << lNoteBook << ", 1st col " << lFirstColumn << ", 1st page " << (unsigned)lFirstPage << ", 1st row " << lFirstRow @@ -292,13 +292,13 @@ QpRecCell::cellRef(char* pText, QpTableNames& pTable, QpIStream& pFormulaRef) } else { - QP_UINT8 lColumn; - QP_UINT8 lPage; - QP_INT16 lRow; + TQP_UINT8 lColumn; + TQP_UINT8 lPage; + TQP_INT16 lRow; pFormulaRef >> lColumn >> lPage >> lRow; - QP_DEBUG("FormulaRef: NoteBook " << lNoteBook << ", Col " << (unsigned)lColumn + TQP_DEBUG("FormulaRef: NoteBook " << lNoteBook << ", Col " << (unsigned)lColumn << ", Page " << (unsigned)lPage << ", Row " << lRow << endl ); @@ -310,12 +310,12 @@ QpRecCell::cellRef(char* pText, QpTableNames& pTable, QpIStream& pFormulaRef) // ----------------------------------------------------------------------- -QpRecBof::QpRecBof(QP_INT16, QpIStream& pIn) +QpRecBof::QpRecBof(TQP_INT16, QpIStream& pIn) : QpRec( QpBof ) { pIn >> cFileFormat; - QP_DEBUG("BOF fileformat=" << cFileFormat << endl); + TQP_DEBUG("BOF fileformat=" << cFileFormat << endl); } QpRecBof::~QpRecBof() @@ -324,10 +324,10 @@ QpRecBof::~QpRecBof() // ----------------------------------------------------------------------- -QpRecEof::QpRecEof(QP_INT16, QpIStream&) +QpRecEof::QpRecEof(TQP_INT16, QpIStream&) : QpRec( QpEof ) { - QP_DEBUG("EOF" << endl); + TQP_DEBUG("EOF" << endl); } QpRecEof::~QpRecEof() @@ -337,16 +337,16 @@ QpRecEof::~QpRecEof() // ----------------------------------------------------------------------- -QpRecRecalcMode::QpRecRecalcMode(QP_INT16, QpIStream& pIn) +QpRecRecalcMode::QpRecRecalcMode(TQP_INT16, QpIStream& pIn) : QpRec( QpRecalcMode ) { - QP_INT8 lMode; + TQP_INT8 lMode; pIn >> lMode; cMode = (MODE)(unsigned char) lMode; - QP_DEBUG("Recalc Mode = " + TQP_DEBUG("Recalc Mode = " << (int)lMode << ( cMode == Manual ? " (Manual)" : cMode == Background ? " (Background)" : cMode == Automatic ? " (Automatic)" @@ -376,16 +376,16 @@ QpRecRecalcMode::mode() // ----------------------------------------------------------------------- -QpRecRecalcOrder::QpRecRecalcOrder(QP_INT16, QpIStream& pIn) +QpRecRecalcOrder::QpRecRecalcOrder(TQP_INT16, QpIStream& pIn) : QpRec( QpRecalcOrder ) { - QP_INT8 lOrder; + TQP_INT8 lOrder; pIn >> lOrder; cOrder = (ORDER)(unsigned char) lOrder; - QP_DEBUG("Recalc Order = " + TQP_DEBUG("Recalc Order = " << (int)lOrder << ( cOrder == Natural ? " (Natural)" : cOrder == Column ? " (Column)" : cOrder == Row ? " (Row)" @@ -415,14 +415,14 @@ QpRecRecalcOrder::order() // ----------------------------------------------------------------------- -QpRecEmptyCell::QpRecEmptyCell(QP_INT16, QpIStream& pIn) +QpRecEmptyCell::QpRecEmptyCell(TQP_INT16, QpIStream& pIn) : QpRecCell( QpEmptyCell ) { - QP_DEBUG("Empty Cell - "); + TQP_DEBUG("Empty Cell - "); loadCellInfo(pIn); - QP_DEBUG(endl); + TQP_DEBUG(endl); } QpRecEmptyCell::~QpRecEmptyCell() @@ -432,23 +432,23 @@ QpRecEmptyCell::~QpRecEmptyCell() // ----------------------------------------------------------------------- -QpRecIntegerCell::QpRecIntegerCell(QP_INT16, QpIStream& pIn) +QpRecIntegerCell::QpRecIntegerCell(TQP_INT16, QpIStream& pIn) : QpRecCell( QpIntegerCell ) { - QP_DEBUG("Integer Cell - "); + TQP_DEBUG("Integer Cell - "); loadCellInfo(pIn); pIn >> cInt; - QP_DEBUG(", Int " << cInt << endl); + TQP_DEBUG(", Int " << cInt << endl); } QpRecIntegerCell::~QpRecIntegerCell() { } -QP_INT16 +TQP_INT16 QpRecIntegerCell::integer() { return cInt; @@ -456,23 +456,23 @@ QpRecIntegerCell::integer() // ----------------------------------------------------------------------- -QpRecFloatingPointCell::QpRecFloatingPointCell(QP_INT16, QpIStream& pIn) +QpRecFloatingPointCell::QpRecFloatingPointCell(TQP_INT16, QpIStream& pIn) : QpRecCell( QpFloatingPointCell ) { - QP_DEBUG("Float Cell - "); + TQP_DEBUG("Float Cell - "); loadCellInfo(pIn); pIn >> cValue; - QP_DEBUG(", Value " << cValue << endl); + TQP_DEBUG(", Value " << cValue << endl); } QpRecFloatingPointCell::~QpRecFloatingPointCell() { } -QP_INT64 +TQP_INT64 QpRecFloatingPointCell::value() { return cValue; @@ -480,10 +480,10 @@ QpRecFloatingPointCell::value() // ----------------------------------------------------------------------- -QpRecLabelCell::QpRecLabelCell(QP_INT16 pLen, QpIStream& pIn) +QpRecLabelCell::QpRecLabelCell(TQP_INT16 pLen, QpIStream& pIn) : QpRecCell( QpLabelCell ) { - QP_DEBUG("Label Cell - "); + TQP_DEBUG("Label Cell - "); int lLabelLen = pLen - loadCellInfo(pIn) - 1; pIn >> cLabelPrefix; @@ -492,7 +492,7 @@ QpRecLabelCell::QpRecLabelCell(QP_INT16 pLen, QpIStream& pIn) pIn.read( cLabel, lLabelLen ); - QP_DEBUG(", Prefix " << cLabelPrefix << ", Label " << cLabel << endl); + TQP_DEBUG(", Prefix " << cLabelPrefix << ", Label " << cLabel << endl); } QpRecLabelCell::~QpRecLabelCell() @@ -515,11 +515,11 @@ QpRecLabelCell::label() // ----------------------------------------------------------------------- -QpRecFormulaCell::QpRecFormulaCell(QP_INT16 pLen, QpIStream& pIn) +QpRecFormulaCell::QpRecFormulaCell(TQP_INT16 pLen, QpIStream& pIn) : QpRecCell( QpFormulaCell ) , cFormula(0) { - QP_DEBUG("Formula Cell - "); + TQP_DEBUG("Formula Cell - "); int lFormulaLen = pLen - loadCellInfo(pIn); @@ -539,12 +539,12 @@ QpRecFormulaCell::QpRecFormulaCell(QP_INT16 pLen, QpIStream& pIn) pIn.read( cFormula, lFormulaLen ); - QP_DEBUG(", LastValue " << cLastValue << ", State " << cState << endl); - QP_DEBUG(" FormulaLen " << cLen << ", CellRef " << cCellRef << ", Formula" << endl); -#ifdef QP_TRACE + TQP_DEBUG(", LastValue " << cLastValue << ", State " << cState << endl); + TQP_DEBUG(" FormulaLen " << cLen << ", CellRef " << cCellRef << ", Formula" << endl); +#ifdef TQP_TRACE Hexout( cFormula, lFormulaLen ); #endif - QP_DEBUG(endl); + TQP_DEBUG(endl); } QpRecFormulaCell::~QpRecFormulaCell() @@ -559,13 +559,13 @@ QpRecFormulaCell::formula() return cFormula; } -QP_INT16 +TQP_INT16 QpRecFormulaCell::formulaLen() { return cLen; } -QP_INT16 +TQP_INT16 QpRecFormulaCell::formulaReferences() { return cCellRef; @@ -573,10 +573,10 @@ QpRecFormulaCell::formulaReferences() // ----------------------------------------------------------------------- -QpRecUnknown::QpRecUnknown(QP_INT16 /*pType*/, QP_INT16 pLen, QpIStream& pIn) +QpRecUnknown::QpRecUnknown(TQP_INT16 /*pType*/, TQP_INT16 pLen, QpIStream& pIn) : QpRec( QpUnknown ) { - QP_DEBUG("Unknown Type " << pType << ", len " << pLen << endl); + TQP_DEBUG("Unknown Type " << pType << ", len " << pLen << endl); if( pLen > 0 ) { @@ -595,11 +595,11 @@ QpRecUnknown::~QpRecUnknown() // ----------------------------------------------------------------------- -QpRecBop::QpRecBop(QP_INT16, QpIStream& pIn) +QpRecBop::QpRecBop(TQP_INT16, QpIStream& pIn) : QpRec( QpBop ) { pIn >> cPageIndex; - QP_DEBUG("BOP: " << (unsigned)cPageIndex << endl); + TQP_DEBUG("BOP: " << (unsigned)cPageIndex << endl); } QpRecBop::~QpRecBop() @@ -607,7 +607,7 @@ QpRecBop::~QpRecBop() } -QP_UINT8 +TQP_UINT8 QpRecBop::pageIndex() { return cPageIndex; @@ -616,12 +616,12 @@ QpRecBop::pageIndex() // ----------------------------------------------------------------------- -QpRecPageName::QpRecPageName(QP_INT16, QpIStream& pIn) +QpRecPageName::QpRecPageName(TQP_INT16, QpIStream& pIn) : QpRec( QpPageName ) { pIn >> cPageName; - QP_DEBUG("Page Name: " << cPageName << endl); + TQP_DEBUG("Page Name: " << cPageName << endl); } QpRecPageName::~QpRecPageName() @@ -635,20 +635,20 @@ QpRecPageName::pageName() } // ----------------------------------------------------------------------- -QpRecPassword::QpRecPassword(QP_INT16 pLen, QpIStream& pIn) +QpRecPassword::QpRecPassword(TQP_INT16 pLen, QpIStream& pIn) : QpRec( QpPassword ) { - QP_DEBUG("Password len = " << pLen << endl); + TQP_DEBUG("Password len = " << pLen << endl); - cPassword = new QP_UINT8[pLen]; + cPassword = new TQP_UINT8[pLen]; pIn.read( (char*)cPassword, pLen ); - QP_DEBUG("Password(Hex) = "); -#ifdef QP_TRACE + TQP_DEBUG("Password(Hex) = "); +#ifdef TQP_TRACE Hexout( (char*)cPassword, pLen ); #endif - QP_DEBUG(endl); + TQP_DEBUG(endl); } QpRecPassword::~QpRecPassword() @@ -657,7 +657,7 @@ QpRecPassword::~QpRecPassword() cPassword = 0; } -const QP_UINT8* +const TQP_UINT8* QpRecPassword::password() { return cPassword; diff --git a/filters/kspread/qpro/libqpro/src/record_factory.cc b/filters/kspread/qpro/libqpro/src/record_factory.cc index cec01dd4..ed6e8617 100644 --- a/filters/kspread/qpro/libqpro/src/record_factory.cc +++ b/filters/kspread/qpro/libqpro/src/record_factory.cc @@ -4,7 +4,7 @@ #include <qpro/record_factory.h> -#define NEWFUNC(x) static QpRec* NEW_##x (QP_INT16 pLen, QpIStream& pIn) { return new x (pLen, pIn); } +#define NEWFUNC(x) static QpRec* NEW_##x (TQP_INT16 pLen, QpIStream& pIn) { return new x (pLen, pIn); } NEWFUNC(QpRecBof) NEWFUNC(QpRecBop) @@ -21,9 +21,9 @@ NEWFUNC(QpRecRecalcOrder) struct Record { - QP_INT16 Type; - QP_INT16 Len; - QpRec* (*Func)(QP_INT16, QpIStream&); + TQP_INT16 Type; + TQP_INT16 Len; + QpRec* (*Func)(TQP_INT16, QpIStream&); }; @@ -59,8 +59,8 @@ QpRecFactory::~QpRecFactory() QpRec* QpRecFactory::nextRecord() { - QP_INT16 lType; - QP_INT16 lLen; + TQP_INT16 lType; + TQP_INT16 lLen; QpRec* lResult=0; cIn >> lType >> lLen; diff --git a/filters/kspread/qpro/libqpro/src/stream.cc b/filters/kspread/qpro/libqpro/src/stream.cc index 3142a272..5b96eb8a 100644 --- a/filters/kspread/qpro/libqpro/src/stream.cc +++ b/filters/kspread/qpro/libqpro/src/stream.cc @@ -10,7 +10,7 @@ #ifdef USE_QT -#include <qbuffer.h> +#include <tqbuffer.h> QpIStream::QpIStream(unsigned char* pBuffer, unsigned int pLen) : cBuffer(pBuffer), cLen(pLen) @@ -21,7 +21,7 @@ QpIStream::QpIStream(unsigned char* pBuffer, unsigned int pLen) cBuf.open( IO_ReadOnly ); setDevice( &cBuf ); - setByteOrder(QDataStream::LittleEndian); + setByteOrder(TQDataStream::LittleEndian); } QpIStream::~QpIStream() @@ -99,7 +99,7 @@ QpIStream::get() } QpIStream& -QpIStream::read(char* pBuf, QP_INT16 pLen) +QpIStream::read(char* pBuf, TQP_INT16 pLen) { if( cIn ) { @@ -125,7 +125,7 @@ QpIStream::operator !() QpIStream& -QpIStream::operator >> (QP_INT8 &pI8) +QpIStream::operator >> (TQP_INT8 &pI8) { pI8 = get(); @@ -133,7 +133,7 @@ QpIStream::operator >> (QP_INT8 &pI8) } QpIStream& -QpIStream::operator >> (QP_UINT8 &pI8) +QpIStream::operator >> (TQP_UINT8 &pI8) { pI8 = get(); @@ -141,7 +141,7 @@ QpIStream::operator >> (QP_UINT8 &pI8) } QpIStream& -QpIStream::operator >> (QP_INT16 &pI16) +QpIStream::operator >> (TQP_INT16 &pI16) { pI16 = get(); pI16 = pI16 | (get() << 8); @@ -150,7 +150,7 @@ QpIStream::operator >> (QP_INT16 &pI16) } QpIStream& -QpIStream::operator >> (QP_INT32 &pI32) +QpIStream::operator >> (TQP_INT32 &pI32) { pI32 = get(); pI32 = pI32 | (get() << 8); @@ -161,7 +161,7 @@ QpIStream::operator >> (QP_INT32 &pI32) } QpIStream& -QpIStream::operator >> (QP_INT64 &pI64) +QpIStream::operator >> (TQP_INT64 &pI64) { // ??? sort out this /****** diff --git a/filters/kspread/qpro/qproformula.h b/filters/kspread/qpro/qproformula.h index bc115a80..77380e08 100644 --- a/filters/kspread/qpro/qproformula.h +++ b/filters/kspread/qpro/qproformula.h @@ -1,5 +1,5 @@ -#ifndef QPROFORMULA_H -#define QPROFORMULA_H +#ifndef TQPROFORMULA_H +#define TQPROFORMULA_H #include <qpro/formula.h> @@ -15,4 +15,4 @@ public: } -#endif // QPROFORMULA_H +#endif // TQPROFORMULA_H diff --git a/filters/kspread/qpro/qproimport.cc b/filters/kspread/qpro/qproimport.cc index 72309275..31a3ac43 100644 --- a/filters/kspread/qpro/qproimport.cc +++ b/filters/kspread/qpro/qproimport.cc @@ -33,12 +33,12 @@ #include <qproformula.h> #include <qpro/stream.h> #include <qpro/record_factory.h> -#include <qfile.h> +#include <tqfile.h> using namespace KSpread; -typedef KGenericFactory<QpImport, KoFilter> QPROImportFactory; -K_EXPORT_COMPONENT_FACTORY( libqproimport, QPROImportFactory( "kofficefilters" ) ) +typedef KGenericFactory<QpImport, KoFilter> TQPROImportFactory; +K_EXPORT_COMPONENT_FACTORY( libqproimport, TQPROImportFactory( "kofficefilters" ) ) // --------------------------------------------------------------- @@ -74,14 +74,14 @@ QpTableList::table(unsigned pIdx) // --------------------------------------------------------------- -QpImport::QpImport( KoFilter*, const char*, const QStringList& ) +QpImport::QpImport( KoFilter*, const char*, const TQStringList& ) : KoFilter() { //cout << "Hooray - in QpImport::QpImport" << endl; // ??? } void -QpImport::InitTableName(int pIdx, QString& pResult) +QpImport::InitTableName(int pIdx, TQString& pResult) { if( pIdx < 26 ) { @@ -94,7 +94,7 @@ QpImport::InitTableName(int pIdx, QString& pResult) } } -KoFilter::ConversionStatus QpImport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus QpImport::convert( const TQCString& from, const TQCString& to ) { bool bSuccess=true; @@ -104,7 +104,7 @@ KoFilter::ConversionStatus QpImport::convert( const QCString& from, const QCStri kdDebug(30523) << "here we go... " << document->className() << endl; - if( !::qt_cast<const KSpread::Doc *>( document ) ) // it's safer that way :) + if( !::tqqt_cast<const KSpread::Doc *>( document ) ) // it's safer that way :) { kdWarning(30501) << "document isn't a KSpread::Doc but a " << document->className() << endl; return KoFilter::NotImplemented; @@ -117,7 +117,7 @@ KoFilter::ConversionStatus QpImport::convert( const QCString& from, const QCStri kdDebug(30523) << "...still here..." << endl; - // No need for a dynamic cast here, since we use Qt's moc magic + // No need for a dynamic cast here, since we use TQt's tqmoc magic Doc *ksdoc=(Doc*)document; if(ksdoc->mimeType()!="application/x-kspread") @@ -126,23 +126,23 @@ KoFilter::ConversionStatus QpImport::convert( const QCString& from, const QCStri return KoFilter::NotImplemented; } - QpIStream lIn( QFile::encodeName(m_chain->inputFile()) ); + QpIStream lIn( TQFile::encodeName(m_chain->inputFile()) ); if( !lIn ) { - KMessageBox::sorry( 0L, i18n("QPRO filter cannot open input file - please report.") ); + KMessageBox::sorry( 0L, i18n("TQPRO filter cannot open input file - please report.") ); return KoFilter::FileNotFound; } Sheet *table=0; - QString field; + TQString field; int value=0; emit sigProgress(value); QpRecFactory lFactory(lIn); QpTableList lTableNames; - QP_UINT8 lPageIdx = 0; + TQP_UINT8 lPageIdx = 0; QpRec* lRec = 0; QpRecBop* lRecBop = 0; diff --git a/filters/kspread/qpro/qproimport.h b/filters/kspread/qpro/qproimport.h index b0ba0fc8..031f5cdf 100644 --- a/filters/kspread/qpro/qproimport.h +++ b/filters/kspread/qpro/qproimport.h @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#ifndef QPROIMPORT_H -#define QPROIMPORT_H +#ifndef TQPROIMPORT_H +#define TQPROIMPORT_H #include <KoFilter.h> #include <qpro/tablenames.h> @@ -31,13 +31,14 @@ class Sheet; class QpImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - QpImport(KoFilter* parent, const char* name, const QStringList&); + QpImport(KoFilter* tqparent, const char* name, const TQStringList&); virtual ~QpImport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); - void InitTableName(int pIdx, QString& pResult); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); + void InitTableName(int pIdx, TQString& pResult); }; class QpTableList : public QpTableNames @@ -52,4 +53,4 @@ protected: KSpread::Sheet* cTable[cNameCnt]; }; -#endif // QPROIMPORT_H +#endif // TQPROIMPORT_H diff --git a/filters/kugar/kugarnop/kugarnopimport.cpp b/filters/kugar/kugarnop/kugarnopimport.cpp index 43efc2a5..f8ad242c 100644 --- a/filters/kugar/kugarnop/kugarnopimport.cpp +++ b/filters/kugar/kugarnop/kugarnopimport.cpp @@ -18,23 +18,23 @@ #include <KoFilterChain.h> #include <kgenericfactory.h> #include <kdebug.h> -#include <qfile.h> +#include <tqfile.h> #include "KoDocument.h" -#include <qdom.h> +#include <tqdom.h> typedef KGenericFactory<KugarNOPImport, KoFilter> KugarNOPImportFactory; K_EXPORT_COMPONENT_FACTORY( libkugarnopimport, KugarNOPImportFactory( "kugarnopimport" ) ) -KugarNOPImport::KugarNOPImport( KoFilter *, const char *, const QStringList& ) +KugarNOPImport::KugarNOPImport( KoFilter *, const char *, const TQStringList& ) : KoFilter() { } -KoFilter::ConversionStatus KugarNOPImport::convert( const QCString& /*from*/, const QCString& /*to*/ ) +KoFilter::ConversiontqStatus KugarNOPImport::convert( const TQCString& /*from*/, const TQCString& /*to*/ ) { - QFile in( m_chain->inputFile()); + TQFile in( m_chain->inputFile()); if (!in.open( IO_ReadOnly )) { kdError() << "Unable to open input file!" << endl; @@ -43,7 +43,7 @@ KoFilter::ConversionStatus KugarNOPImport::convert( const QCString& /*from*/, co } KoDocument *doc=m_chain->outputDocument(); - doc->loadXML(&in,QDomDocument()); + doc->loadXML(TQT_TQIODEVICE(&in),TQDomDocument()); in.close(); doc->resetURL(); diff --git a/filters/kugar/kugarnop/kugarnopimport.h b/filters/kugar/kugarnop/kugarnopimport.h index de2c84bf..acb77e95 100644 --- a/filters/kugar/kugarnop/kugarnopimport.h +++ b/filters/kugar/kugarnop/kugarnopimport.h @@ -17,17 +17,18 @@ #define __KUGARNOPIMPORT_H__ #include <KoFilter.h> -#include <qcstring.h> -#include <qstringlist.h> +#include <tqcstring.h> +#include <tqstringlist.h> class KugarNOPImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - KugarNOPImport( KoFilter *parent, const char *name, const QStringList& ); + KugarNOPImport( KoFilter *tqparent, const char *name, const TQStringList& ); - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; diff --git a/filters/kword/abiword/ImportField.cc b/filters/kword/abiword/ImportField.cc index bfcc5a8c..dfba826d 100644 --- a/filters/kword/abiword/ImportField.cc +++ b/filters/kword/abiword/ImportField.cc @@ -17,27 +17,27 @@ * Boston, MA 02110-1301, USA. */ -#include <qstring.h> -#include <qdom.h> +#include <tqstring.h> +#include <tqdom.h> #include <klocale.h> #include "ImportField.h" -QString getFootnoteFramesetName(const QString& id) +TQString getFootnoteFramesetName(const TQString& id) { - return i18n("Frameset name","Footnote %1").arg(id); + return i18n("Frameset name","Footnote %1").tqarg(id); } -static void InsertTimeVariable(QDomDocument& mainDocument, - QDomElement& variableElement, QString strKey) +static void InsertTimeVariable(TQDomDocument& mainDocument, + TQDomElement& variableElement, TQString strKey) { - QDomElement typeElement=mainDocument.createElement("TYPE"); + TQDomElement typeElement=mainDocument.createElement("TYPE"); typeElement.setAttribute("key",strKey); typeElement.setAttribute("type",2); // Time typeElement.setAttribute("text","-"); // Dummy, we let KWord do the work! variableElement.appendChild(typeElement); //Append to <VARIABLE> - QDomElement timeElement=mainDocument.createElement("TIME"); + TQDomElement timeElement=mainDocument.createElement("TIME"); // We cannot calculate the time, so default to midnight timeElement.setAttribute("hour",0); timeElement.setAttribute("minute",0); @@ -46,15 +46,15 @@ static void InsertTimeVariable(QDomDocument& mainDocument, variableElement.appendChild(timeElement); //Append to <VARIABLE> } -static void InsertDateVariable(QDomDocument& mainDocument, - QDomElement& variableElement, QString strKey) +static void InsertDateVariable(TQDomDocument& mainDocument, + TQDomElement& variableElement, TQString strKey) { - QDomElement typeElement=mainDocument.createElement("TYPE"); + TQDomElement typeElement=mainDocument.createElement("TYPE"); typeElement.setAttribute("key",strKey); typeElement.setAttribute("type",0); // date typeElement.setAttribute("text","-"); // Just a dummy, KWord will do the work variableElement.appendChild(typeElement); //Append to <VARIABLE> - QDomElement dateElement=mainDocument.createElement("DATE"); + TQDomElement dateElement=mainDocument.createElement("DATE"); // As we have no idea about the current date, use the *nix epoch 1970-01-01 dateElement.setAttribute("year",1970); dateElement.setAttribute("month",1); @@ -63,8 +63,8 @@ static void InsertDateVariable(QDomDocument& mainDocument, variableElement.appendChild(dateElement); //Append to <VARIABLE> } -static bool ProcessTimeField(QDomDocument& mainDocument, - QDomElement& variableElement, QString strType) +static bool ProcessTimeField(TQDomDocument& mainDocument, + TQDomElement& variableElement, TQString strType) // strType: AbiWord's type { if (strType=="time") @@ -89,8 +89,8 @@ static bool ProcessTimeField(QDomDocument& mainDocument, return true; } -static bool ProcessDateField(QDomDocument& mainDocument, - QDomElement& variableElement, QString strType) +static bool ProcessDateField(TQDomDocument& mainDocument, + TQDomElement& variableElement, TQString strType) // strType: AbiWord's type // Help for the % formats: // man date @@ -137,8 +137,8 @@ static bool ProcessDateField(QDomDocument& mainDocument, return true; } -bool ProcessField(QDomDocument& mainDocument, - QDomElement& variableElement, QString strType, const QXmlAttributes& attributes) +bool ProcessField(TQDomDocument& mainDocument, + TQDomElement& variableElement, TQString strType, const TQXmlAttributes& attributes) { // In AbiWord: // field names are in the file: src/text/fmt/xp/fp_Fields.h @@ -155,12 +155,12 @@ bool ProcessField(QDomDocument& mainDocument, } else if ((strType=="page_number")||(strType=="page_count")) { - QDomElement typeElement=mainDocument.createElement("TYPE"); + TQDomElement typeElement=mainDocument.createElement("TYPE"); typeElement.setAttribute("key","NUMBER"); typeElement.setAttribute("type",4); // page number/count typeElement.setAttribute("text",1); // We cannot count the pages, so give a default value variableElement.appendChild(typeElement); //Append to <VARIABLE> - QDomElement pgnumElement=mainDocument.createElement("PGNUM"); + TQDomElement pgnumElement=mainDocument.createElement("PGNUM"); pgnumElement.setAttribute("subtype",(strType=="page_count")?1:0); pgnumElement.setAttribute("value",1); variableElement.appendChild(pgnumElement); //Append to <VARIABLE> @@ -168,12 +168,12 @@ bool ProcessField(QDomDocument& mainDocument, } else if (strType=="file_name") { - QDomElement typeElement=mainDocument.createElement("TYPE"); + TQDomElement typeElement=mainDocument.createElement("TYPE"); typeElement.setAttribute("key","STRING"); typeElement.setAttribute("type",8); typeElement.setAttribute("text","?"); // TODO: do we need this information right now? variableElement.appendChild(typeElement); //Append to <VARIABLE> - QDomElement fieldElement=mainDocument.createElement("FIELD"); + TQDomElement fieldElement=mainDocument.createElement("FIELD"); fieldElement.setAttribute("subtype",0); fieldElement.setAttribute("value","?"); // Should be the same as the text attribute variableElement.appendChild(fieldElement); //Append to <VARIABLE> @@ -181,15 +181,15 @@ bool ProcessField(QDomDocument& mainDocument, } else if (strType=="endnote_ref") { - QDomElement typeElement=mainDocument.createElement("TYPE"); + TQDomElement typeElement=mainDocument.createElement("TYPE"); typeElement.setAttribute("key","STRING"); typeElement.setAttribute("type",11); typeElement.setAttribute("text","?"); // ### TODO: do we need this information right now? variableElement.appendChild(typeElement); //Append to <VARIABLE> - QDomElement element=mainDocument.createElement("FOOTNOTE"); + TQDomElement element=mainDocument.createElement("FOOTNOTE"); element.setAttribute("numberingtype","auto"); // ### TODO: support other types element.setAttribute("notetype","footnote"); - QString reference(attributes.value("endnote-id").stripWhiteSpace()); + TQString reference(attributes.value("endnote-id").stripWhiteSpace()); element.setAttribute("frameset", getFootnoteFramesetName(reference)); // ### TODO: better name element.setAttribute("value","?"); // Should be the same as the text attribute variableElement.appendChild(element); //Append to <VARIABLE> diff --git a/filters/kword/abiword/ImportField.h b/filters/kword/abiword/ImportField.h index e357754d..2e660d41 100644 --- a/filters/kword/abiword/ImportField.h +++ b/filters/kword/abiword/ImportField.h @@ -20,11 +20,11 @@ #ifndef IMPORTFIELD_H #define IMPORTFIELD_H -#include <qxml.h> +#include <tqxml.h> -QString getFootnoteFramesetName(const QString& id); -bool ProcessField(QDomDocument& mainDocument, - QDomElement& variableElement, QString strType, const QXmlAttributes& attributes); +TQString getFootnoteFramesetName(const TQString& id); +bool ProcessField(TQDomDocument& mainDocument, + TQDomElement& variableElement, TQString strType, const TQXmlAttributes& attributes); #endif /* IMPORTFIELD_H */ diff --git a/filters/kword/abiword/ImportFormatting.cc b/filters/kword/abiword/ImportFormatting.cc index 950d41cc..14a059eb 100644 --- a/filters/kword/abiword/ImportFormatting.cc +++ b/filters/kword/abiword/ImportFormatting.cc @@ -32,14 +32,14 @@ StackItem::~StackItem() { } -void PopulateProperties(StackItem* stackItem, const QString& strStyleProps, - const QXmlAttributes& attributes, AbiPropsMap& abiPropsMap, +void PopulateProperties(StackItem* stackItem, const TQString& strStyleProps, + const TQXmlAttributes& attributes, AbiPropsMap& abiPropsMap, const bool allowInit) // TODO: find a better name for this function { if (allowInit) { - // Initialize the QStrings with the previous values of the properties + // Initialize the TQStrings with the previous values of the properties // TODO: any others needed? if (stackItem->italic) { @@ -71,11 +71,11 @@ void PopulateProperties(StackItem* stackItem, const QString& strStyleProps, stackItem->italic=(abiPropsMap["font-style"].getValue()=="italic"); stackItem->bold=(abiPropsMap["font-weight"].getValue()=="bold"); - QString strDecoration=abiPropsMap["text-decoration"].getValue(); + TQString strDecoration=abiPropsMap["text-decoration"].getValue(); stackItem->underline=(strDecoration=="underline"); stackItem->strikeout=(strDecoration=="line-through"); - QString strTextPosition=abiPropsMap["text-position"].getValue(); + TQString strTextPosition=abiPropsMap["text-position"].getValue(); if (strTextPosition=="subscript") { stackItem->textPosition=1; @@ -90,14 +90,14 @@ void PopulateProperties(StackItem* stackItem, const QString& strStyleProps, stackItem->textPosition=0; } - QString strColour=abiPropsMap["color"].getValue(); + TQString strColour=abiPropsMap["color"].getValue(); if (!strColour.isEmpty()) { // The colour information is *not* lead by a hash (#) stackItem->fgColor.setNamedColor("#"+strColour); } - QString strBackgroundTextColor=abiPropsMap["bgcolor"].getValue(); + TQString strBackgroundTextColor=abiPropsMap["bgcolor"].getValue(); if (strBackgroundTextColor=="transparent") { // KWord has no idea what transparency is, so we use white @@ -109,7 +109,7 @@ void PopulateProperties(StackItem* stackItem, const QString& strStyleProps, stackItem->bgColor.setNamedColor("#"+strBackgroundTextColor); } - QString strFontSize=abiPropsMap["font-size"].getValue(); + TQString strFontSize=abiPropsMap["font-size"].getValue(); if (!strFontSize.isEmpty()) { const int size=int(ValueWithLengthUnit(strFontSize)); @@ -119,7 +119,7 @@ void PopulateProperties(StackItem* stackItem, const QString& strStyleProps, } } - QString strFontFamily=abiPropsMap["font-family"].getValue(); + TQString strFontFamily=abiPropsMap["font-family"].getValue(); if (!strFontFamily.isEmpty() && (strFontFamily!="(null)")) { // TODO: transform the font-family in a font that we have on the system on which KWord runs. @@ -127,9 +127,9 @@ void PopulateProperties(StackItem* stackItem, const QString& strStyleProps, } } -void AddFormat(QDomElement& formatElementOut, StackItem* stackItem, QDomDocument& mainDocument) +void AddFormat(TQDomElement& formatElementOut, StackItem* stackItem, TQDomDocument& mainDocument) { - QDomElement element; + TQDomElement element; if (!stackItem->fontName.isEmpty()) { element=mainDocument.createElement("FONT"); @@ -186,17 +186,17 @@ void AddFormat(QDomElement& formatElementOut, StackItem* stackItem, QDomDocument } } -void AddLayout(const QString& strStyleName, QDomElement& layoutElement, - StackItem* stackItem, QDomDocument& mainDocument, +void AddLayout(const TQString& strStyleName, TQDomElement& tqlayoutElement, + StackItem* stackItem, TQDomDocument& mainDocument, const AbiPropsMap& abiPropsMap, const int level, const bool isStyle) { - QDomElement element; + TQDomElement element; element=mainDocument.createElement("NAME"); element.setAttribute("value",strStyleName); - layoutElement.appendChild(element); + tqlayoutElement.appendChild(element); - QString strFollowing=abiPropsMap["followedby"].getValue(); - QDomElement followingElement=mainDocument.createElement("FOLLOWING"); + TQString strFollowing=abiPropsMap["followedby"].getValue(); + TQDomElement followingElement=mainDocument.createElement("FOLLOWING"); followingElement.setAttribute("name",strFollowing); if ((strFollowing.isEmpty()) || (strFollowing=="Current Settings")) // "Current Settings" is only a pseudo-style! @@ -206,18 +206,18 @@ void AddLayout(const QString& strStyleName, QDomElement& layoutElement, { // We are a style, so we need a default followingElement.setAttribute("name","Normal"); - layoutElement.appendChild(followingElement); + tqlayoutElement.appendChild(followingElement); } - // Else: we are a layout, so we leave the work to KWord (from the style) + // Else: we are a tqlayout, so we leave the work to KWord (from the style) } else { // Following style is defined // TODO: we should be sure that this style is defined! - layoutElement.appendChild(followingElement); + tqlayoutElement.appendChild(followingElement); } - QString strFlow=abiPropsMap["text-align"].getValue(); + TQString strFlow=abiPropsMap["text-align"].getValue(); element=mainDocument.createElement("FLOW"); if ((strFlow=="left") || (strFlow=="center") || (strFlow=="right") || (strFlow=="justify")) { @@ -227,12 +227,12 @@ void AddLayout(const QString& strStyleName, QDomElement& layoutElement, { element.setAttribute("align","left"); } - layoutElement.appendChild(element); + tqlayoutElement.appendChild(element); int kwordDepth; int kwordNumberingType; int kwordType; - QString kwordRightText; + TQString kwordRightText; // level is 1 based like AbiWord, any value lower than 1 means no level! if ((level<=0) || (level>=15)) { @@ -258,11 +258,11 @@ void AddLayout(const QString& strStyleName, QDomElement& layoutElement, element.setAttribute("bullet",64); element.setAttribute("bulletfont","Symbol"); element.setAttribute("customdef",""); - layoutElement.appendChild(element); + tqlayoutElement.appendChild(element); - QString strLeftMargin=abiPropsMap["margin-left"].getValue(); - QString strRightMargin=abiPropsMap["margin-right"].getValue(); - QString strTextIndent=abiPropsMap["text-indent"].getValue(); + TQString strLeftMargin=abiPropsMap["margin-left"].getValue(); + TQString strRightMargin=abiPropsMap["margin-right"].getValue(); + TQString strTextIndent=abiPropsMap["text-indent"].getValue(); if ( !strLeftMargin.isEmpty() || !strRightMargin.isEmpty() @@ -275,11 +275,11 @@ void AddLayout(const QString& strStyleName, QDomElement& layoutElement, element.setAttribute("right",ValueWithLengthUnit(strRightMargin)); if (!strTextIndent.isEmpty()) element.setAttribute("first",ValueWithLengthUnit(strTextIndent)); - layoutElement.appendChild(element); + tqlayoutElement.appendChild(element); } - QString strTopMargin=abiPropsMap["margin-top"].getValue(); - QString strBottomMargin=abiPropsMap["margin-bottom"].getValue(); + TQString strTopMargin=abiPropsMap["margin-top"].getValue(); + TQString strBottomMargin=abiPropsMap["margin-bottom"].getValue(); if (!strTopMargin.isEmpty() || !strBottomMargin.isEmpty() ) { element=mainDocument.createElement("OFFSETS"); @@ -290,10 +290,10 @@ void AddLayout(const QString& strStyleName, QDomElement& layoutElement, element.setAttribute("after",margin_bottom); if (!strTopMargin.isEmpty()) element.setAttribute("before",margin_top); - layoutElement.appendChild(element); + tqlayoutElement.appendChild(element); } - QString strLineHeight=abiPropsMap["line-height"].getValue(); + TQString strLineHeight=abiPropsMap["line-height"].getValue(); if(!strLineHeight.isEmpty()) { element=mainDocument.createElement("LINESPACING"); @@ -351,18 +351,18 @@ void AddLayout(const QString& strStyleName, QDomElement& layoutElement, element.setAttribute( "spacingvalue", lineHeight ); } } - layoutElement.appendChild(element); + tqlayoutElement.appendChild(element); } - QString strTab=abiPropsMap["tabstops"].getValue(); + TQString strTab=abiPropsMap["tabstops"].getValue(); if(!strTab.isEmpty()) { - QStringList listTab=QStringList::split(",",strTab); - for ( QStringList::Iterator it = listTab.begin(); it != listTab.end(); ++it ) + TQStringList listTab=TQStringList::split(",",strTab); + for ( TQStringList::Iterator it = listTab.begin(); it != listTab.end(); ++it ) { - QStringList tab=QStringList::split("/",*it); - const QChar tabType=tab[1].at(0); - const QChar tabFilling=tab[1].at(1); // Might be empty in old AbiWord files + TQStringList tab=TQStringList::split("/",*it); + const TQChar tabType=tab[1].at(0); + const TQChar tabFilling=tab[1].at(1); // Might be empty in old AbiWord files int type; if (tabType=='L') // left type=0; @@ -376,7 +376,7 @@ void AddLayout(const QString& strStyleName, QDomElement& layoutElement, type=0; else { - kdWarning(30506)<<"Unknown tabulator type: " << QString(tabType) << endl; + kdWarning(30506)<<"Unknown tabulator type: " << TQString(tabType) << endl; type=0; } int filling; @@ -397,23 +397,23 @@ void AddLayout(const QString& strStyleName, QDomElement& layoutElement, element.setAttribute("type",type); element.setAttribute("filling",filling); element.setAttribute("width",width); - layoutElement.appendChild(element); + tqlayoutElement.appendChild(element); } } - QDomElement formatElementOut=mainDocument.createElement("FORMAT"); - layoutElement.appendChild(formatElementOut); + TQDomElement formatElementOut=mainDocument.createElement("FORMAT"); + tqlayoutElement.appendChild(formatElementOut); AddFormat(formatElementOut, stackItem, mainDocument); } -void AddStyle(QDomElement& styleElement, const QString& strStyleName, - const StyleData& styleData, QDomDocument& mainDocument) +void AddStyle(TQDomElement& styleElement, const TQString& strStyleName, + const StyleData& styleData, TQDomDocument& mainDocument) { // NOTE; styleElement is <STYLE> (singular), not <STYLES> (plural) StackItem stackItem; - QXmlAttributes attributes; // This is just a dummy for reusing already existing functions (TODO) + TQXmlAttributes attributes; // This is just a dummy for reusing already existing functions (TODO) AbiPropsMap abiPropsMap; PopulateProperties(&stackItem, styleData.m_props, attributes, abiPropsMap, false); diff --git a/filters/kword/abiword/ImportFormatting.h b/filters/kword/abiword/ImportFormatting.h index e7f9e000..31b26b3f 100644 --- a/filters/kword/abiword/ImportFormatting.h +++ b/filters/kword/abiword/ImportFormatting.h @@ -20,11 +20,11 @@ #ifndef _IMPORT_FORMATTING_H #define _IMPORT_FORMATTING_H -#include <qptrstack.h> -#include <qstring.h> -#include <qcolor.h> -#include <qxml.h> -#include <qdom.h> +#include <tqptrstack.h> +#include <tqstring.h> +#include <tqcolor.h> +#include <tqxml.h> +#include <tqdom.h> #include "ImportHelpers.h" @@ -74,28 +74,28 @@ public: StackItem(); ~StackItem(); public: - QString itemName; ///< Name of the tag (only for error purposes) + TQString itemName; ///< Name of the tag (only for error purposes) StackItemElementType elementType; - QDomElement m_frameset; ///< current \<FRAMESET\> - QDomElement stackElementParagraph; ///< \<PARAGRAPH\> - QDomElement stackElementText; ///< \<TEXT\> - QDomElement stackElementFormatsPlural; ///< \<FORMATS\> - QString fontName; ///< font name but for \<d\>: name + TQDomElement m_frameset; ///< current \<FRAMESET\> + TQDomElement stackElementParagraph; ///< \<PARAGRAPH\> + TQDomElement stackElementText; ///< \<TEXT\> + TQDomElement stackElementFormatsPlural; ///< \<FORMATS\> + TQString fontName; ///< font name but for \<d\>: name int fontSize; int pos; ///< Position bool italic; bool bold; ///< bold but for \<d\>: is base64 coded? bool underline; bool strikeout; - QColor fgColor; - QColor bgColor; + TQColor fgColor; + TQColor bgColor; int textPosition; ///< Normal (0), subscript(1), superscript (2) - QString strTemp1; /**< for \<d\>: mime type + TQString strTemp1; /**< for \<d\>: mime type * for \<a\>: link reference * for \<m\>: key * for \<table\>: KWord's table name */ - QString strTemp2; /**< for \<d\>: collecting the data + TQString strTemp2; /**< for \<d\>: collecting the data * for \<a\>: link name * for \<iw\>: collecting the data (i.e. word to ignore) * for \<m\>: value of the meta data @@ -103,12 +103,12 @@ public: */ /** * for tables (\<table\>, \<cell\>): defines the widths of the columns. - * Be careful: we are using the shallow copy mechanism of Qt. Use QMemArray::detach when needed to avoid modifying the parents + * Be careful: we are using the shallow copy mechanism of TQt. Use TQMemArray::detach when needed to avoid modifying the tqparents */ - QMemArray<double> m_doubleArray; + TQMemArray<double> m_doubleArray; }; -class StackItemStack : public QPtrStack<StackItem> +class StackItemStack : public TQPtrStack<StackItem> { public: StackItemStack(void) { } @@ -117,16 +117,16 @@ public: class StyleData; -void PopulateProperties(StackItem* stackItem, const QString& strStyleProps, - const QXmlAttributes& attributes, AbiPropsMap& abiPropsMap, +void PopulateProperties(StackItem* stackItem, const TQString& strStyleProps, + const TQXmlAttributes& attributes, AbiPropsMap& abiPropsMap, const bool allowInit); -void AddFormat(QDomElement& formatElementOut, StackItem* stackItem, - QDomDocument& mainDocument); -void AddLayout(const QString& strStyleName, QDomElement& layoutElement, - StackItem* stackItem, QDomDocument& mainDocument, +void AddFormat(TQDomElement& formatElementOut, StackItem* stackItem, + TQDomDocument& mainDocument); +void AddLayout(const TQString& strStyleName, TQDomElement& tqlayoutElement, + StackItem* stackItem, TQDomDocument& mainDocument, const AbiPropsMap& abiPropsMap, const int level, const bool isStyle); -void AddStyle(QDomElement& styleElement, const QString& strStyleName, - const StyleData& styleData, QDomDocument& mainDocument); +void AddStyle(TQDomElement& styleElement, const TQString& strStyleName, + const StyleData& styleData, TQDomDocument& mainDocument); #endif // _IMPORT_FORMATTING_H diff --git a/filters/kword/abiword/ImportHelpers.cc b/filters/kword/abiword/ImportHelpers.cc index 19b4bac4..d37b078c 100644 --- a/filters/kword/abiword/ImportHelpers.cc +++ b/filters/kword/abiword/ImportHelpers.cc @@ -17,37 +17,37 @@ * Boston, MA 02110-1301, USA. */ -#include <qstringlist.h> -#include <qregexp.h> +#include <tqstringlist.h> +#include <tqregexp.h> #include <kdebug.h> #include "ImportHelpers.h" -bool AbiPropsMap::setProperty(const QString& newName, const QString& newValue) +bool AbiPropsMap::setProperty(const TQString& newName, const TQString& newValue) { - replace(newName,AbiProps(newValue)); + tqreplace(newName,AbiProps(newValue)); return true; } // Treat the "props" attribute of AbiWord's tags and split it in separates names and values -void AbiPropsMap::splitAndAddAbiProps(const QString& strProps) +void AbiPropsMap::splitAndAddAbiProps(const TQString& strProps) { if (strProps.isEmpty()) return; // Split the properties (we do not want empty ones) - QStringList list=QStringList::split(';',strProps,false); - QString name,value; + TQStringList list=TQStringList::split(';',strProps,false); + TQString name,value; - QStringList::ConstIterator it; - QStringList::ConstIterator end(list.end()); + TQStringList::ConstIterator it; + TQStringList::ConstIterator end(list.end()); for (it=list.begin();it!=end;++it) { - const int result=(*it).find(':'); + const int result=(*it).tqfind(':'); if (result==-1) { name=(*it); - value=QString::null; + value=TQString(); kdWarning(30506) << "Property without value: " << name << endl; } else @@ -61,14 +61,14 @@ void AbiPropsMap::splitAndAddAbiProps(const QString& strProps) } } -double ValueWithLengthUnit( const QString& _str, bool* atleast ) +double ValueWithLengthUnit( const TQString& _str, bool* atleast ) { if ( atleast ) *atleast = false; double result; // We search an unit (defined by a sequence of lower case characters), with possibly a + sign after it - QRegExp unitExp("([a-z]+)\\s*(\\+?)"); + TQRegExp unitExp("([a-z]+)\\s*(\\+?)"); const int pos=unitExp.search(_str); if (pos==-1) { @@ -80,7 +80,7 @@ double ValueWithLengthUnit( const QString& _str, bool* atleast ) else { const double rawValue=_str.left(pos).toDouble(); - const QString strUnit ( unitExp.cap(1) ); + const TQString strUnit ( unitExp.cap(1) ); if (strUnit=="cm") result=CentimetresToPoints(rawValue); else if (strUnit=="in") diff --git a/filters/kword/abiword/ImportHelpers.h b/filters/kword/abiword/ImportHelpers.h index bc72c4ab..04419b90 100644 --- a/filters/kword/abiword/ImportHelpers.h +++ b/filters/kword/abiword/ImportHelpers.h @@ -20,37 +20,37 @@ #ifndef _IMPORT_HELPERS_H #define _IMPORT_HELPERS_H -#include <qstring.h> -#include <qmap.h> +#include <tqstring.h> +#include <tqmap.h> /** * \file ImportHelpers.h * Helpers for the AbiWord import filter * * Rough rule for including code in this file: - * use nothing of QT except QMap, QValueList and QString + * use nothing of QT except TQMap, TQValueList and TQString */ class AbiProps { public: AbiProps() {}; - AbiProps(QString newValue) : m_value(newValue) {}; + AbiProps(TQString newValue) : m_value(newValue) {}; virtual ~AbiProps() {}; public: - inline QString getValue(void) const { return m_value; } + inline TQString getValue(void) const { return m_value; } private: - QString m_value; + TQString m_value; }; -class AbiPropsMap : public QMap<QString,AbiProps> +class AbiPropsMap : public TQMap<TQString,AbiProps> { public: AbiPropsMap() {}; virtual ~AbiPropsMap() {}; public: - bool setProperty(const QString& newName, const QString& newValue); - void splitAndAddAbiProps(const QString& strProps); + bool setProperty(const TQString& newName, const TQString& newValue); + void splitAndAddAbiProps(const TQString& strProps); }; inline double CentimetresToPoints(const double d) @@ -80,6 +80,6 @@ inline double PicaToPoints(const double d) * @param atleast was there a + character after the unit to denote an "at-least" property * @return the value as double (in points) */ -double ValueWithLengthUnit( const QString& _str, bool* atleast = NULL ); +double ValueWithLengthUnit( const TQString& _str, bool* atleast = NULL ); #endif // _IMPORT_HELPERS_H diff --git a/filters/kword/abiword/ImportStyle.cc b/filters/kword/abiword/ImportStyle.cc index e5d371de..62d951e5 100644 --- a/filters/kword/abiword/ImportStyle.cc +++ b/filters/kword/abiword/ImportStyle.cc @@ -17,7 +17,7 @@ * Boston, MA 02110-1301, USA. */ -#include <qfontinfo.h> +#include <tqfontinfo.h> #include <kglobalsettings.h> #include <kdebug.h> @@ -34,11 +34,11 @@ StyleDataMap::StyleDataMap(void) { } -QString StyleDataMap::getDefaultStyle(void) +TQString StyleDataMap::getDefaultStyle(void) { - // We use QFontInfo, as it return real values - QFontInfo fontInfo(KoGlobal::defaultFont()); - QString strReturn; + // We use TQFontInfo, as it return real values + TQFontInfo fontInfo(KoGlobal::defaultFont()); + TQString strReturn; strReturn += "font-family:"; strReturn += fontInfo.family(); // TODO: should be "Times New Roman" @@ -48,8 +48,8 @@ QString StyleDataMap::getDefaultStyle(void) return strReturn; } -void StyleDataMap::defineNewStyleFromOld(const QString& strName, const QString& strOld, - const int level, const QString& strProps) +void StyleDataMap::defineNewStyleFromOld(const TQString& strName, const TQString& strOld, + const int level, const TQString& strProps) { if (strOld.isEmpty()) { @@ -57,26 +57,26 @@ void StyleDataMap::defineNewStyleFromOld(const QString& strName, const QString& return; } - StyleDataMap::Iterator it=find(strOld); + StyleDataMap::Iterator it=tqfind(strOld); if (it==end()) { defineNewStyle(strName,level,strProps); } else { - QString strAllProps=it.data().m_props; + TQString strAllProps=it.data().m_props; strAllProps+=strProps; defineNewStyle(strName,level,strAllProps); } } -void StyleDataMap::defineNewStyle(const QString& strName, const int level, - const QString& strProps) +void StyleDataMap::defineNewStyle(const TQString& strName, const int level, + const TQString& strProps) { // Despite its name, this method can be called multiple times // We must take care that KWord just gets it only one time. - StyleDataMap::Iterator it=find(strName); + StyleDataMap::Iterator it=tqfind(strName); if (it==end()) { // The style does not exist yet, so we must define it. @@ -92,10 +92,10 @@ void StyleDataMap::defineNewStyle(const QString& strName, const int level, } } -StyleDataMap::Iterator StyleDataMap::useOrCreateStyle(const QString& strName) +StyleDataMap::Iterator StyleDataMap::useOrCreateStyle(const TQString& strName) { // We are using a style but we are not sure if it is defined - StyleDataMap::Iterator it=find(strName); + StyleDataMap::Iterator it=tqfind(strName); if (it==end()) { // The style is not yet defined! @@ -111,17 +111,17 @@ void StyleDataMap::defineDefaultStyles(void) { // Add a few of AbiWord predefined style sheets // AbiWord file: src/text/ptbl/xp/pt_PT_Styles.cpp - defineNewStyle("Normal",-1,QString::null); + defineNewStyle("Normal",-1,TQString()); // TODO: font should be "Arial" // TODO: "keep with next" - QString strHeading("font-weight: bold; margin-top: 22pt; margin-bottom: 3pt; "); + TQString strHeading("font-weight: bold; margin-top: 22pt; margin-bottom: 3pt; "); defineNewStyle("Heading 1",1,strHeading+"font-size: 17pt"); defineNewStyle("Heading 2",2,strHeading+"font-size: 14pt"); defineNewStyle("Heading 3",3,strHeading+"font-size: 12pt"); defineNewStyle("Block Text",-1,"margin-left: 1in; margin-right: 1in; margin-bottom: 6pt"); - QFontInfo fixedInfo(KGlobalSettings::fixedFont()); - QString strPlainText=QString("font-family: %1") - .arg(fixedInfo.family()); // TODO: should be "Courier New" + TQFontInfo fixedInfo(KGlobalSettings::fixedFont()); + TQString strPlainText=TQString("font-family: %1") + .tqarg(fixedInfo.family()); // TODO: should be "Courier New" kdDebug(30506) << "Plain Text: " << strPlainText << endl; defineNewStyle("Plain Text",-1,strPlainText); // TODO: all list and numbered types diff --git a/filters/kword/abiword/ImportStyle.h b/filters/kword/abiword/ImportStyle.h index b812640a..dfa91028 100644 --- a/filters/kword/abiword/ImportStyle.h +++ b/filters/kword/abiword/ImportStyle.h @@ -20,9 +20,9 @@ #ifndef _IMPORT_STYLE_H #define _IMPORT_STYLE_H -#include <qvaluelist.h> -#include <qstring.h> -#include <qmap.h> +#include <tqvaluelist.h> +#include <tqstring.h> +#include <tqmap.h> class StyleData { @@ -30,21 +30,21 @@ public: StyleData(void); public: int m_level; // Depth of heading (as defined by AbiWord!) - QString m_props; // properties + TQString m_props; // properties }; -class StyleDataMap : public QMap<QString,StyleData> +class StyleDataMap : public TQMap<TQString,StyleData> { public: StyleDataMap(void); public: - void defineNewStyle(const QString& strName, const int level, const QString& strProps); - void defineNewStyleFromOld(const QString& strName, const QString& strOld, - const int level, const QString& strProps); - StyleDataMap::Iterator useOrCreateStyle(const QString& strName); + void defineNewStyle(const TQString& strName, const int level, const TQString& strProps); + void defineNewStyleFromOld(const TQString& strName, const TQString& strOld, + const int level, const TQString& strProps); + StyleDataMap::Iterator useOrCreateStyle(const TQString& strName); void defineDefaultStyles(void); private: - QString getDefaultStyle(void); + TQString getDefaultStyle(void); }; #endif // _IMPORT_STYLE_H diff --git a/filters/kword/abiword/abiwordexport.cc b/filters/kword/abiword/abiwordexport.cc index 31733bd6..281f5d7e 100644 --- a/filters/kword/abiword/abiwordexport.cc +++ b/filters/kword/abiword/abiwordexport.cc @@ -30,10 +30,10 @@ License version 2. */ -#include <qmap.h> -#include <qiodevice.h> -#include <qtextstream.h> -#include <qdom.h> +#include <tqmap.h> +#include <tqiodevice.h> +#include <tqtextstream.h> +#include <tqdom.h> #include <kdebug.h> #include <kmdcodec.h> @@ -67,7 +67,7 @@ protected: K_EXPORT_COMPONENT_FACTORY( libabiwordexport, ABIWORDExportFactory() ) -class StyleMap : public QMap<QString,LayoutData> +class StyleMap : public TQMap<TQString,LayoutData> { public: StyleMap(void) {} @@ -80,11 +80,11 @@ public: AbiWordWorker(void); virtual ~AbiWordWorker(void) { delete m_streamOut; delete m_ioDevice; } public: - virtual bool doOpenFile(const QString& filenameOut, const QString& to); + virtual bool doOpenFile(const TQString& filenameOut, const TQString& to); virtual bool doCloseFile(void); // Close file in normal conditions virtual bool doOpenDocument(void); virtual bool doCloseDocument(void); - virtual bool doFullParagraph(const QString& paraText, const LayoutData& layout, + virtual bool doFullParagraph(const TQString& paraText, const LayoutData& tqlayout, const ValueListFormatData& paraFormatDataList); virtual bool doOpenTextFrameSet(void); // AbiWord's <section> virtual bool doCloseTextFrameSet(void); // AbiWord's </section> @@ -95,39 +95,39 @@ public: virtual bool doCloseHead(void); // Write <papersize> virtual bool doOpenStyles(void); // AbiWord's <styles> virtual bool doCloseStyles(void); // AbiWord's </styles> - virtual bool doFullDefineStyle(LayoutData& layout); // AbiWord's <s></s> + virtual bool doFullDefineStyle(LayoutData& tqlayout); // AbiWord's <s></s> virtual bool doOpenSpellCheckIgnoreList (void); // AbiWord's <ignorewords> virtual bool doCloseSpellCheckIgnoreList (void); // AbiWord's </ignorewords> - virtual bool doFullSpellCheckIgnoreWord (const QString& ignoreword); // AbiWord's <iw> + virtual bool doFullSpellCheckIgnoreWord (const TQString& ignoreword); // AbiWord's <iw> virtual bool doFullDocumentInfo(const KWEFDocumentInfo& docInfo); // AbiWord's <metadata> private: - void processParagraphData (const QString& paraText, + void processParagraphData (const TQString& paraText, const TextFormatting& formatLayout, const ValueListFormatData& paraFormatDataList); - void processNormalText ( const QString& paraText, + void processNormalText ( const TQString& paraText, const TextFormatting& formatLayout, const FormatData& formatData); - void processVariable ( const QString& paraText, + void processVariable ( const TQString& paraText, const TextFormatting& formatLayout, const FormatData& formatData); - void processAnchor ( const QString& paraText, + void processAnchor ( const TQString& paraText, const TextFormatting& formatLayout, const FormatData& formatData); - QString textFormatToAbiProps(const TextFormatting& formatOrigin, + TQString textFormatToAbiProps(const TextFormatting& formatOrigin, const TextFormatting& formatData, const bool force) const; - QString layoutToCss(const LayoutData& layoutOrigin, - const LayoutData& layout, const bool force) const; - QString escapeAbiWordText(const QString& strText) const; + TQString tqlayoutToCss(const LayoutData& tqlayoutOrigin, + const LayoutData& tqlayout, const bool force) const; + TQString escapeAbiWordText(const TQString& strText) const; bool makeTable(const FrameAnchor& anchor); bool makePicture(const FrameAnchor& anchor); void writeAbiProps(const TextFormatting& formatLayout, const TextFormatting& format); - void writePictureData(const QString& koStoreName, const QString& keyName); - QString transformToTextDate(const QDateTime& dt); + void writePictureData(const TQString& koStoreName, const TQString& keyName); + TQString transformToTextDate(const TQDateTime& dt); private: - QIODevice* m_ioDevice; - QTextStream* m_streamOut; - QString m_pagesize; // Buffer for the <pagesize> tag - QMap<QString,KoPictureKey> m_mapPictureData; + TQIODevice* m_ioDevice; + TQTextStream* m_streamOut; + TQString m_pagesize; // Buffer for the <pagesize> tag + TQMap<TQString,KoPictureKey> m_mapPictureData; StyleMap m_styleMap; double m_paperBorderTop,m_paperBorderLeft,m_paperBorderBottom,m_paperBorderRight; bool m_inIgnoreWords; // true if <ignorewords> has been written @@ -140,26 +140,26 @@ AbiWordWorker::AbiWordWorker(void) : m_ioDevice(NULL), m_streamOut(NULL), { } -QString AbiWordWorker::escapeAbiWordText(const QString& strText) const +TQString AbiWordWorker::escapeAbiWordText(const TQString& strText) const { // Escape quotes (needed in attributes) // Escape apostrophs (allowed by XML) return KWEFUtil::EscapeSgmlText(NULL,strText,true,true); } -bool AbiWordWorker::doOpenFile(const QString& filenameOut, const QString& ) +bool AbiWordWorker::doOpenFile(const TQString& filenameOut, const TQString& ) { kdDebug(30506) << "Opening file: " << filenameOut << " (in AbiWordWorker::doOpenFile)" << endl; //Find the last extension - QString strExt; - const int result=filenameOut.findRev('.'); + TQString strExt; + const int result=filenameOut.tqfindRev('.'); if (result>=0) { strExt=filenameOut.mid(result); } - QString strMimeType; // Mime type of the compressor + TQString strMimeType; // Mime type of the compressor if ((strExt==".gz")||(strExt==".GZ") //in case of .abw.gz (logical extension) ||(strExt==".zabw")||(strExt==".ZABW")) //in case of .zabw (extension used prioritary with AbiWord) @@ -195,10 +195,10 @@ bool AbiWordWorker::doOpenFile(const QString& filenameOut, const QString& ) return false; } - m_streamOut=new QTextStream(m_ioDevice); + m_streamOut=new TQTextStream(m_ioDevice); // We only export in UTF-8 (are there AbiWord ports that cannot read UTF-8? Be careful SVG uses UTF-8 too!) - m_streamOut->setEncoding( QTextStream::UnicodeUTF8 ); + m_streamOut->setEncoding( TQTextStream::UnicodeUTF8 ); return true; } @@ -246,14 +246,14 @@ bool AbiWordWorker::doOpenDocument(void) return true; } -void AbiWordWorker::writePictureData(const QString& koStoreName, const QString& keyName) +void AbiWordWorker::writePictureData(const TQString& koStoreName, const TQString& keyName) { kdDebug(30506) << "AbiWordWorker::writeImageData" << endl; - QByteArray image; + TQByteArray image; - QString strExtension(koStoreName.lower()); - const int result=koStoreName.findRev("."); + TQString strExtension(koStoreName.lower()); + const int result=koStoreName.tqfindRev("."); if (result>=0) { strExtension=koStoreName.mid(result+1); @@ -278,9 +278,9 @@ void AbiWordWorker::writePictureData(const QString& koStoreName, const QString& << " base64=\"yes\"" << " mime=\"image/png\">\n"; - QCString base64=KCodecs::base64Encode(image,true); + TQCString base64=KCodecs::base64Encode(image,true); - *m_streamOut << base64 << "\n"; // QCString is taken as Latin1 by QTextStream + *m_streamOut << base64 << "\n"; // TQCString is taken as Latin1 by TQTextStream *m_streamOut << "</d>\n"; } @@ -299,8 +299,8 @@ bool AbiWordWorker::doCloseDocument(void) { *m_streamOut << "<data>\n"; - QMap<QString,KoPictureKey>::ConstIterator it; - QMap<QString,KoPictureKey>::ConstIterator end(m_mapPictureData.end()); + TQMap<TQString,KoPictureKey>::ConstIterator it; + TQMap<TQString,KoPictureKey>::ConstIterator end(m_mapPictureData.end()); // all images first for (it=m_mapPictureData.begin(); it!=end; ++it) { @@ -352,14 +352,14 @@ bool AbiWordWorker::doCloseStyles(void) return true; } -QString AbiWordWorker::textFormatToAbiProps(const TextFormatting& formatOrigin, +TQString AbiWordWorker::textFormatToAbiProps(const TextFormatting& formatOrigin, const TextFormatting& formatData, const bool force) const { // TODO: rename variable formatData - QString strElement; // TODO: rename this variable + TQString strElement; // TODO: rename this variable // Font name - QString fontName = formatData.fontName; + TQString fontName = formatData.fontName; if ( !fontName.isEmpty() && (force || (formatOrigin.fontName!=formatData.fontName))) { @@ -404,7 +404,7 @@ QString AbiWordWorker::textFormatToAbiProps(const TextFormatting& formatOrigin, { // We use absolute font sizes. strElement+="font-size: "; - strElement+=QString::number(size,10); + strElement+=TQString::number(size,10); strElement+="pt; "; } } @@ -419,16 +419,16 @@ QString AbiWordWorker::textFormatToAbiProps(const TextFormatting& formatOrigin, // No leading # (unlike CSS2) // We must have two hex digits for each colour channel! const int red=formatData.fgColor.red(); - strElement += QString::number((red&0xf0)>>4,16); - strElement += QString::number(red&0x0f,16); + strElement += TQString::number((red&0xf0)>>4,16); + strElement += TQString::number(red&0x0f,16); const int green=formatData.fgColor.green(); - strElement += QString::number((green&0xf0)>>4,16); - strElement += QString::number(green&0x0f,16); + strElement += TQString::number((green&0xf0)>>4,16); + strElement += TQString::number(green&0x0f,16); const int blue=formatData.fgColor.blue(); - strElement += QString::number((blue&0xf0)>>4,16); - strElement += QString::number(blue&0x0f,16); + strElement += TQString::number((blue&0xf0)>>4,16); + strElement += TQString::number(blue&0x0f,16); strElement+="; "; } @@ -444,16 +444,16 @@ QString AbiWordWorker::textFormatToAbiProps(const TextFormatting& formatOrigin, // No leading # (unlike CSS2) // We must have two hex digits for each colour channel! const int red=formatData.bgColor.red(); - strElement += QString::number((red&0xf0)>>4,16); - strElement += QString::number(red&0x0f,16); + strElement += TQString::number((red&0xf0)>>4,16); + strElement += TQString::number(red&0x0f,16); const int green=formatData.bgColor.green(); - strElement += QString::number((green&0xf0)>>4,16); - strElement += QString::number(green&0x0f,16); + strElement += TQString::number((green&0xf0)>>4,16); + strElement += TQString::number(green&0x0f,16); const int blue=formatData.bgColor.blue(); - strElement += QString::number((blue&0xf0)>>4,16); - strElement += QString::number(blue&0x0f,16); + strElement += TQString::number((blue&0xf0)>>4,16); + strElement += TQString::number(blue&0x0f,16); strElement+="; "; } @@ -488,7 +488,7 @@ bool AbiWordWorker::makeTable(const FrameAnchor& anchor) *m_streamOut << "<table>\n"; #endif - QValueList<TableCell>::ConstIterator itCell; + TQValueList<TableCell>::ConstIterator itCell; for (itCell=anchor.table.cellList.begin(); itCell!=anchor.table.cellList.end(); itCell++) { @@ -540,10 +540,10 @@ bool AbiWordWorker::makePicture(const FrameAnchor& anchor) void AbiWordWorker::writeAbiProps (const TextFormatting& formatLayout, const TextFormatting& format) { - QString abiprops=textFormatToAbiProps(formatLayout,format,false); + TQString abiprops=textFormatToAbiProps(formatLayout,format,false); // Erase the last semi-comma (as in CSS2, semi-commas only separate instructions and do not terminate them) - const int result=abiprops.findRev(";"); + const int result=abiprops.tqfindRev(";"); if (result>=0) { @@ -557,18 +557,18 @@ void AbiWordWorker::writeAbiProps (const TextFormatting& formatLayout, const Tex } } -void AbiWordWorker::processNormalText ( const QString ¶Text, +void AbiWordWorker::processNormalText ( const TQString ¶Text, const TextFormatting& formatLayout, const FormatData& formatData) { // Retrieve text and escape it - QString partialText=escapeAbiWordText(paraText.mid(formatData.pos,formatData.len)); + TQString partialText=escapeAbiWordText(paraText.mid(formatData.pos,formatData.len)); // Replace line feeds by line breaks int pos; - while ((pos=partialText.find(QChar(10)))>-1) + while ((pos=partialText.tqfind(TQChar(10)))>-1) { - partialText.replace(pos,1,"<br/>"); + partialText.tqreplace(pos,1,"<br/>"); } if (formatData.text.missing) @@ -584,7 +584,7 @@ void AbiWordWorker::processNormalText ( const QString ¶Text, } } -void AbiWordWorker::processVariable ( const QString&, +void AbiWordWorker::processVariable ( const TQString&, const TextFormatting& formatLayout, const FormatData& formatData) { @@ -605,7 +605,7 @@ void AbiWordWorker::processVariable ( const QString&, else if (4==formatData.variable.m_type) { // As AbiWord's field is inflexible, we cannot make the time custom - QString strFieldType; + TQString strFieldType; if (formatData.variable.isPageNumber()) { strFieldType="page_number"; @@ -641,15 +641,15 @@ void AbiWordWorker::processVariable ( const QString&, else if (11==(*paraFormatDataIt).variable.m_type) { // Footnote - QString value = (*paraFormatDataIt).variable.getFootnoteValue(); + TQString value = (*paraFormatDataIt).variable.getFootnoteValue(); bool automatic = (*paraFormatDataIt).variable.getFootnoteAuto(); - QValueList<ParaData> *paraList = (*paraFormatDataIt).variable.getFootnotePara(); + TQValueList<ParaData> *paraList = (*paraFormatDataIt).variable.getFootnotePara(); if( paraList ) { - QString fstr; - QValueList<ParaData>::ConstIterator it; + TQString fstr; + TQValueList<ParaData>::ConstIterator it; for (it=paraList->begin();it!=paraList->end();it++) - fstr += ProcessParagraphData( (*it).text, (*it).layout,(*it).formattingList); + fstr += ProcessParagraphData( (*it).text, (*it).tqlayout,(*it).formattingList); str += "{\\super "; str += automatic ? "\\chftn " : value; str += "{\\footnote "; @@ -669,7 +669,7 @@ void AbiWordWorker::processVariable ( const QString&, } } -void AbiWordWorker::processAnchor ( const QString&, +void AbiWordWorker::processAnchor ( const TQString&, const TextFormatting& /*formatLayout*/, //TODO const FormatData& formatData) { @@ -690,7 +690,7 @@ void AbiWordWorker::processAnchor ( const QString&, } } -void AbiWordWorker::processParagraphData ( const QString ¶Text, +void AbiWordWorker::processParagraphData ( const TQString ¶Text, const TextFormatting& formatLayout, const ValueListFormatData ¶FormatDataList) { @@ -718,51 +718,51 @@ void AbiWordWorker::processParagraphData ( const QString ¶Text, } } -QString AbiWordWorker::layoutToCss(const LayoutData& layoutOrigin, - const LayoutData& layout, const bool force) const +TQString AbiWordWorker::tqlayoutToCss(const LayoutData& tqlayoutOrigin, + const LayoutData& tqlayout, const bool force) const { - QString props; + TQString props; - if (force || (layoutOrigin.alignment!=layout.alignment)) + if (force || (tqlayoutOrigin.tqalignment!=tqlayout.tqalignment)) { - // Check if the current alignment is a valid one for AbiWord. - if ((layout.alignment == "left") || (layout.alignment == "right") - || (layout.alignment == "center") || (layout.alignment == "justify")) + // Check if the current tqalignment is a valid one for AbiWord. + if ((tqlayout.tqalignment == "left") || (tqlayout.tqalignment == "right") + || (tqlayout.tqalignment == "center") || (tqlayout.tqalignment == "justify")) { props += "text-align:"; - props += layout.alignment; + props += tqlayout.tqalignment; props += "; "; } - else if (layout.alignment == "auto") + else if (tqlayout.tqalignment == "auto") { - // We assume a left alignment as AbiWord is not really bi-di (and this filter even less.) + // We assume a left tqalignment as AbiWord is not really bi-di (and this filter even less.) props += "text-align:left; "; } else { - kdWarning(30506) << "Unknown alignment: " << layout.alignment << endl; + kdWarning(30506) << "Unknown tqalignment: " << tqlayout.tqalignment << endl; } } // TODO/FIXME: what if all tabulators must be erased? #if 0 // DEPRECATED! - if (!layout.tabulator.isEmpty() - && (force || (layoutOrigin.tabulator!=layout.tabulator))) + if (!tqlayout.tabulator.isEmpty() + && (force || (tqlayoutOrigin.tabulator!=tqlayout.tabulator))) { props += "tabstops:"; - props += layout.tabulator; + props += tqlayout.tabulator; props += "; "; } #endif - if (!layout.tabulatorList.isEmpty() - && (force || (layoutOrigin.tabulatorList!=layout.tabulatorList) )) + if (!tqlayout.tabulatorList.isEmpty() + && (force || (tqlayoutOrigin.tabulatorList!=tqlayout.tabulatorList) )) { props += "tabstops:"; bool first=true; TabulatorList::ConstIterator it; - TabulatorList::ConstIterator end(layout.tabulatorList.end()); - for (it=layout.tabulatorList.begin();it!=end;++it) + TabulatorList::ConstIterator end(tqlayout.tabulatorList.end()); + for (it=tqlayout.tabulatorList.begin();it!=end;++it) { if (first) { @@ -772,7 +772,7 @@ QString AbiWordWorker::layoutToCss(const LayoutData& layoutOrigin, { props += ","; } - props += QString::number((*it).m_ptpos); + props += TQString::number((*it).m_ptpos); props += "pt"; switch ((*it).m_type) @@ -789,48 +789,48 @@ QString AbiWordWorker::layoutToCss(const LayoutData& layoutOrigin, props += "; "; } - if ((layout.indentLeft>=0.0) - && (force || (layoutOrigin.indentLeft!=layout.indentLeft))) + if ((tqlayout.indentLeft>=0.0) + && (force || (tqlayoutOrigin.indentLeft!=tqlayout.indentLeft))) { - props += QString("margin-left:%1pt; ").arg(layout.indentLeft); + props += TQString("margin-left:%1pt; ").tqarg(tqlayout.indentLeft); } - if ((layout.indentRight>=0.0) - && (force || (layoutOrigin.indentRight!=layout.indentRight))) + if ((tqlayout.indentRight>=0.0) + && (force || (tqlayoutOrigin.indentRight!=tqlayout.indentRight))) { - props += QString("margin-right:%1pt; ").arg(layout.indentRight); + props += TQString("margin-right:%1pt; ").tqarg(tqlayout.indentRight); } - if (force || (layoutOrigin.indentLeft!=layout.indentLeft)) + if (force || (tqlayoutOrigin.indentLeft!=tqlayout.indentLeft)) { props += "text-indent: "; - props += QString::number(layout.indentFirst); + props += TQString::number(tqlayout.indentFirst); props += "pt; "; } - if ((layout.marginBottom>=0.0) - && ( force || ( layoutOrigin.marginBottom != layout.marginBottom ) ) ) + if ((tqlayout.marginBottom>=0.0) + && ( force || ( tqlayoutOrigin.marginBottom != tqlayout.marginBottom ) ) ) { - props += QString("margin-bottom:%1pt; ").arg(layout.marginBottom); + props += TQString("margin-bottom:%1pt; ").tqarg(tqlayout.marginBottom); } - if ((layout.marginTop>=0.0) - && ( force || ( layoutOrigin.marginTop != layout.marginTop ) ) ) + if ((tqlayout.marginTop>=0.0) + && ( force || ( tqlayoutOrigin.marginTop != tqlayout.marginTop ) ) ) { - props += QString("margin-top:%1pt; ").arg(layout.marginTop); + props += TQString("margin-top:%1pt; ").tqarg(tqlayout.marginTop); } if (force - || ( layoutOrigin.lineSpacingType != layout.lineSpacingType ) - || ( layoutOrigin.lineSpacing != layout.lineSpacing ) ) + || ( tqlayoutOrigin.lineSpacingType != tqlayout.lineSpacingType ) + || ( tqlayoutOrigin.lineSpacing != tqlayout.lineSpacing ) ) { - switch ( layout.lineSpacingType ) + switch ( tqlayout.lineSpacingType ) { case LayoutData::LS_CUSTOM: { // We have a custom line spacing (in points). However AbiWord cannot do it, so transform in "at-least" props += "line-height=:"; - props += QString::number( layout.lineSpacing ); // ### TODO: rounding? + props += TQString::number( tqlayout.lineSpacing ); // ### TODO: rounding? props += "pt+; "; break; } @@ -852,7 +852,7 @@ QString AbiWordWorker::layoutToCss(const LayoutData& layoutOrigin, case LayoutData::LS_MULTIPLE: { props += "line-height:"; - props += QString::number( layout.lineSpacing ); // ### TODO: rounding? + props += TQString::number( tqlayout.lineSpacing ); // ### TODO: rounding? props += "; "; break; } @@ -860,7 +860,7 @@ QString AbiWordWorker::layoutToCss(const LayoutData& layoutOrigin, { // We have a fixed line height (in points) props += "line-height:"; - props += QString::number( layout.lineSpacing ); // ### TODO: rounding? + props += TQString::number( tqlayout.lineSpacing ); // ### TODO: rounding? props += "pt; "; break; } @@ -868,32 +868,32 @@ QString AbiWordWorker::layoutToCss(const LayoutData& layoutOrigin, { // We have an "at-least" line height (in points) props += "line-height=:"; - props += QString::number( layout.lineSpacing ); // ### TODO: rounding? + props += TQString::number( tqlayout.lineSpacing ); // ### TODO: rounding? props += "pt+; "; // The + makes the difference break; } default: { - kdWarning(30506) << "Unsupported lineSpacingType: " << layout.lineSpacingType << " (Ignoring!)" << endl; + kdWarning(30506) << "Unsupported lineSpacingType: " << tqlayout.lineSpacingType << " (Ignoring!)" << endl; break; } } } // Add all AbiWord properties collected in the <FORMAT> element - props += textFormatToAbiProps(layoutOrigin.formatData.text,layout.formatData.text,force); + props += textFormatToAbiProps(tqlayoutOrigin.formatData.text,tqlayout.formatData.text,force); return props; } -bool AbiWordWorker::doFullParagraph(const QString& paraText, const LayoutData& layout, +bool AbiWordWorker::doFullParagraph(const TQString& paraText, const LayoutData& tqlayout, const ValueListFormatData& paraFormatDataList) { - QString style=layout.styleName; + TQString style=tqlayout.styleName; const LayoutData& styleLayout=m_styleMap[style]; - QString props=layoutToCss(styleLayout,layout,false); + TQString props=tqlayoutToCss(styleLayout,tqlayout,false); *m_streamOut << "<p"; if (!style.isEmpty()) @@ -904,7 +904,7 @@ bool AbiWordWorker::doFullParagraph(const QString& paraText, const LayoutData& l { // Find the last semi-comma // Note: as in CSS2, semi-commas only separates instructions (like in PASCAL) and do not terminate them (like in C) - const int result=props.findRev(";"); + const int result=props.tqfindRev(";"); if (result>=0) { // Remove the last semi-comma and the space thereafter @@ -916,16 +916,16 @@ bool AbiWordWorker::doFullParagraph(const QString& paraText, const LayoutData& l *m_streamOut << ">"; //Warning: No trailing white space or else it's in the text!!! // Before processing the text, test if we have a page break - if (layout.pageBreakBefore) + if (tqlayout.pageBreakBefore) { // We have a page break before the paragraph *m_streamOut << "<pbr/>"; } - processParagraphData(paraText, layout.formatData.text, paraFormatDataList); + processParagraphData(paraText, tqlayout.formatData.text, paraFormatDataList); // Before closing the paragraph, test if we have a page break - if (layout.pageBreakAfter) + if (tqlayout.pageBreakAfter) { // We have a page break after the paragraph *m_streamOut << "<pbr/>"; @@ -935,28 +935,28 @@ bool AbiWordWorker::doFullParagraph(const QString& paraText, const LayoutData& l return true; } -bool AbiWordWorker::doFullDefineStyle(LayoutData& layout) +bool AbiWordWorker::doFullDefineStyle(LayoutData& tqlayout) { //Register style in the style map - m_styleMap[layout.styleName]=layout; + m_styleMap[tqlayout.styleName]=tqlayout; *m_streamOut << "<s"; // TODO: cook the style name to the standard style names in AbiWord - *m_streamOut << " name=\"" << EscapeXmlText(layout.styleName,true,true) << "\""; - *m_streamOut << " followedby=\"" << EscapeXmlText(layout.styleFollowing,true,true) << "\""; + *m_streamOut << " name=\"" << EscapeXmlText(tqlayout.styleName,true,true) << "\""; + *m_streamOut << " followedby=\"" << EscapeXmlText(tqlayout.styleFollowing,true,true) << "\""; - if ( (layout.counter.numbering == CounterData::NUM_CHAPTER) - && (layout.counter.depth<10) ) + if ( (tqlayout.counter.numbering == CounterData::NUM_CHAPTER) + && (tqlayout.counter.depth<10) ) { *m_streamOut << " level=\""; - *m_streamOut << QString::number(layout.counter.depth+1,10); + *m_streamOut << TQString::number(tqlayout.counter.depth+1,10); *m_streamOut << "\""; } - QString abiprops=layoutToCss(layout,layout,true); + TQString abiprops=tqlayoutToCss(tqlayout,tqlayout,true); - const int result=abiprops.findRev(";"); + const int result=abiprops.tqfindRev(";"); if (result>=0) { // Remove the last semi-comma and the space thereafter @@ -973,7 +973,7 @@ bool AbiWordWorker::doFullDefineStyle(LayoutData& layout) bool AbiWordWorker::doFullPaperFormat(const int format, const double width, const double height, const int orientation) { - QString outputText = "<pagesize "; + TQString outputText = "<pagesize "; switch (format) { @@ -997,11 +997,11 @@ bool AbiWordWorker::doFullPaperFormat(const int format, case PG_US_LETTER: // US Letter case PG_US_LEGAL: // US Legal { - QString pagetype=KoPageFormat::formatString(KoFormat(format)); + TQString pagetype=KoPageFormat::formatString(KoFormat(format)); outputText+="pagetype=\""; outputText+=pagetype; - QString strWidth, strHeight, strUnits; + TQString strWidth, strHeight, strUnits; KWEFUtil::GetNativePaperFormat(format, strWidth, strHeight, strUnits); outputText+="\" width=\""; outputText+=strWidth; @@ -1041,7 +1041,7 @@ bool AbiWordWorker::doFullPaperFormat(const int format, } else { // We prefer to use inches, as to limit rounding errors (page size is in points!) - outputText += QString("pagetype=\"Custom\" width=\"%1\" height=\"%2\" units=\"inch\" ").arg(width/72.0).arg(height/72.0); + outputText += TQString("pagetype=\"Custom\" width=\"%1\" height=\"%2\" units=\"inch\" ").tqarg(width/72.0).tqarg(height/72.0); } break; } @@ -1098,7 +1098,7 @@ bool AbiWordWorker::doCloseSpellCheckIgnoreList (void) return true; } -bool AbiWordWorker::doFullSpellCheckIgnoreWord (const QString& ignoreword) +bool AbiWordWorker::doFullSpellCheckIgnoreWord (const TQString& ignoreword) { kdDebug(30506) << "AbiWordWorker::doFullSpellCheckIgnoreWord: " << ignoreword << endl; if (!m_inIgnoreWords) @@ -1110,14 +1110,14 @@ bool AbiWordWorker::doFullSpellCheckIgnoreWord (const QString& ignoreword) return true; } -// Similar to QDateTime::toString, but guaranteed *not* to be translated -QString AbiWordWorker::transformToTextDate(const QDateTime& dt) +// Similar to TQDateTime::toString, but guaranteed *not* to be translated +TQString AbiWordWorker::transformToTextDate(const TQDateTime& dt) { if (dt.isValid()) { - QString result; + TQString result; - const QDate date(dt.date()); + const TQDate date(dt.date()); const char* dayName[7] = { "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun" }; const int dow = date.dayOfWeek() - 1; @@ -1135,32 +1135,32 @@ QString AbiWordWorker::transformToTextDate(const QDateTime& dt) result += monthName[month]; result += ' '; - QString temp; + TQString temp; temp = "00"; - temp += QString::number(date.day(), 10); + temp += TQString::number(date.day(), 10); result += temp.right(2); result += ' '; - const QTime time(dt.time()); + const TQTime time(dt.time()); temp = "00"; - temp += QString::number(time.hour(), 10); + temp += TQString::number(time.hour(), 10); result += temp.right(2); result += ':'; temp = "00"; - temp += QString::number(time.minute(), 10); + temp += TQString::number(time.minute(), 10); result += temp.right(2); result += ':'; temp = "00"; - temp += QString::number(time.second(), 10); + temp += TQString::number(time.second(), 10); result += temp.right(2); result += ' '; temp = "0000"; - temp += QString::number(date.year(), 10); + temp += TQString::number(date.year(), 10); result += temp.right(4); return result; @@ -1201,14 +1201,14 @@ bool AbiWordWorker::doFullDocumentInfo(const KWEFDocumentInfo& docInfo) // Say who we are (with the CVS revision number) in case we have a bug in our filter output! *m_streamOut << "<m key=\"abiword.generator\">KWord Export Filter"; - QString strVersion("$Revision: 508787 $"); + TQString strVersion("$Revision: 508787 $"); // Remove the dollar signs // (We don't want that the version number changes if the AbiWord file is itself put in a CVS storage.) *m_streamOut << strVersion.mid(10).remove('$'); *m_streamOut << "</m>\n"; - QDateTime now (QDateTime::currentDateTime(Qt::UTC)); // current time in UTC + TQDateTime now (TQDateTime::tqcurrentDateTime(Qt::UTC)); // current time in UTC *m_streamOut << "<m key=\"abiword.date_last_changed\">" << escapeAbiWordText(transformToTextDate(now)) << "</m>\n"; @@ -1221,11 +1221,11 @@ bool AbiWordWorker::doFullDocumentInfo(const KWEFDocumentInfo& docInfo) // ========================================================================================== -ABIWORDExport::ABIWORDExport(KoFilter */*parent*/, const char */*name*/, const QStringList &) : +ABIWORDExport::ABIWORDExport(KoFilter */*tqparent*/, const char */*name*/, const TQStringList &) : KoFilter() { } -KoFilter::ConversionStatus ABIWORDExport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus ABIWORDExport::convert( const TQCString& from, const TQCString& to ) { if ( to != "application/x-abiword" || from != "application/x-kword" ) { @@ -1252,7 +1252,7 @@ KoFilter::ConversionStatus ABIWORDExport::convert( const QCString& from, const Q return KoFilter::StupidError; } - KoFilter::ConversionStatus result=leader->convert(m_chain,from,to); + KoFilter::ConversiontqStatus result=leader->convert(m_chain,from,to); delete leader; delete worker; diff --git a/filters/kword/abiword/abiwordexport.h b/filters/kword/abiword/abiwordexport.h index a373f5e4..85203f8b 100644 --- a/filters/kword/abiword/abiwordexport.h +++ b/filters/kword/abiword/abiwordexport.h @@ -32,8 +32,8 @@ #ifndef ABIWORDEXPORT_H #define ABIWORDEXPORT_H -#include <qstring.h> -#include <qcstring.h> +#include <tqstring.h> +#include <tqcstring.h> #include <KoFilter.h> @@ -41,11 +41,12 @@ class ABIWORDExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - ABIWORDExport(KoFilter *parent, const char *name, const QStringList &); + ABIWORDExport(KoFilter *tqparent, const char *name, const TQStringList &); virtual ~ABIWORDExport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; #endif // ABIWORDEXPORT_H diff --git a/filters/kword/abiword/abiwordimport.cc b/filters/kword/abiword/abiwordimport.cc index b872e875..9533d5df 100644 --- a/filters/kword/abiword/abiwordimport.cc +++ b/filters/kword/abiword/abiwordimport.cc @@ -23,12 +23,12 @@ #include <unistd.h> #endif -#include <qmap.h> -#include <qbuffer.h> -#include <qpicture.h> -#include <qxml.h> -#include <qdom.h> -#include <qdatetime.h> +#include <tqmap.h> +#include <tqbuffer.h> +#include <tqpicture.h> +#include <tqxml.h> +#include <tqdom.h> +#include <tqdatetime.h> #include <kdebug.h> #include <kmdcodec.h> @@ -67,12 +67,12 @@ K_EXPORT_COMPONENT_FACTORY( libabiwordimport, ABIWORDImportFactory() ) // enum StackItemElementType is now in the file ImportFormatting.h -class StructureParser : public QXmlDefaultHandler +class StructureParser : public TQXmlDefaultHandler { public: StructureParser(KoFilterChain* chain) : m_chain(chain), m_pictureNumber(0), m_pictureFrameNumber(0), m_tableGroupNumber(0), - m_timepoint(QDateTime::currentDateTime(Qt::UTC)), m_fatalerror(false) + m_timepoint(TQDateTime::tqcurrentDateTime(Qt::UTC)), m_fatalerror(false) { createDocument(); structureStack.setAutoDelete(true); @@ -89,15 +89,15 @@ public: public: virtual bool startDocument(void); virtual bool endDocument(void); - virtual bool startElement( const QString&, const QString&, const QString& name, const QXmlAttributes& attributes); - virtual bool endElement( const QString&, const QString& , const QString& qName); - virtual bool characters ( const QString & ch ); - virtual bool warning(const QXmlParseException& exception); - virtual bool error(const QXmlParseException& exception); - virtual bool fatalError(const QXmlParseException& exception); + virtual bool startElement( const TQString&, const TQString&, const TQString& name, const TQXmlAttributes& attributes); + virtual bool endElement( const TQString&, const TQString& , const TQString& qName); + virtual bool characters ( const TQString & ch ); + virtual bool warning(const TQXmlParseException& exception); + virtual bool error(const TQXmlParseException& exception); + virtual bool fatalError(const TQXmlParseException& exception); public: - inline QDomDocument getDocInfo(void) const { return m_info; } - inline QDomDocument getDocument(void) const { return mainDocument; } + inline TQDomDocument getDocInfo(void) const { return m_info; } + inline TQDomDocument getDocument(void) const { return mainDocument; } inline bool wasFatalError(void) const { return m_fatalerror; } protected: bool clearStackUntilParagraph(StackItemStack& auxilaryStack); @@ -105,45 +105,45 @@ protected: private: // The methods that would need too much parameters are private instead of being static outside the class bool StartElementC(StackItem* stackItem, StackItem* stackCurrent, - const QXmlAttributes& attributes); + const TQXmlAttributes& attributes); bool StartElementA(StackItem* stackItem, StackItem* stackCurrent, - const QXmlAttributes& attributes); + const TQXmlAttributes& attributes); bool StartElementImage(StackItem* stackItem, StackItem* stackCurrent, - const QXmlAttributes& attributes); + const TQXmlAttributes& attributes); bool EndElementD (StackItem* stackItem); bool EndElementM (StackItem* stackItem); bool StartElementSection(StackItem* stackItem, StackItem* stackCurrent, - const QXmlAttributes& attributes); + const TQXmlAttributes& attributes); bool StartElementFoot(StackItem* stackItem, StackItem* stackCurrent, - const QXmlAttributes& attributes); - bool StartElementTable(StackItem* stackItem, StackItem* stackCurrent, const QXmlAttributes& attributes); - bool StartElementCell(StackItem* stackItem, StackItem* stackCurrent,const QXmlAttributes& attributes); + const TQXmlAttributes& attributes); + bool StartElementTable(StackItem* stackItem, StackItem* stackCurrent, const TQXmlAttributes& attributes); + bool StartElementCell(StackItem* stackItem, StackItem* stackCurrent,const TQXmlAttributes& attributes); private: void createDocument(void); void createDocInfo(void); - QString indent; //DEBUG + TQString indent; //DEBUG StackItemStack structureStack; - QDomDocument mainDocument; - QDomDocument m_info; - QDomElement framesetsPluralElement; // <FRAMESETS> - QDomElement mainFramesetElement; // The main <FRAMESET> where the body text will be under. - QDomElement m_picturesElement; // <PICTURES> - QDomElement m_paperElement; // <PAPER> - QDomElement m_paperBordersElement; // <PAPERBORDER> - QDomElement m_ignoreWordsElement; // <SPELLCHECKIGNORELIST> + TQDomDocument mainDocument; + TQDomDocument m_info; + TQDomElement framesetsPluralElement; // <FRAMESETS> + TQDomElement mainFramesetElement; // The main <FRAMESET> where the body text will be under. + TQDomElement m_picturesElement; // <PICTURES> + TQDomElement m_paperElement; // <PAPER> + TQDomElement m_paperBordersElement; // <PAPERBORDER> + TQDomElement m_ignoreWordsElement; // <SPELLCHECKIGNORELIST> StyleDataMap styleDataMap; KoFilterChain* m_chain; uint m_pictureNumber; // unique: increment *before* use uint m_pictureFrameNumber; // unique: increment *before* use uint m_tableGroupNumber; // unique: increment *before* use - QMap<QString,QString> m_metadataMap; // Map for <m> elements - QDateTime m_timepoint; // Date/time (for pictures) + TQMap<TQString,TQString> m_metadataMap; // Map for <m> elements + TQDateTime m_timepoint; // Date/time (for pictures) bool m_fatalerror; // Did a XML parsing fatal error happened? }; // Element <c> -bool StructureParser::StartElementC(StackItem* stackItem, StackItem* stackCurrent, const QXmlAttributes& attributes) +bool StructureParser::StartElementC(StackItem* stackItem, StackItem* stackCurrent, const TQXmlAttributes& attributes) { // <c> elements can be nested in <p> elements, in <a> elements or in other <c> elements // AbiWord does not nest <c> elements in other <c> elements, but explicitly allows external programs to do it! @@ -153,11 +153,11 @@ bool StructureParser::StartElementC(StackItem* stackItem, StackItem* stackCurren { // Contents can have styles, however KWord cannot have character style. // Therefore we use the style if it exist, but we do not create it if not. - QString strStyleProps; - QString strStyleName=attributes.value("style").stripWhiteSpace(); + TQString strStyleProps; + TQString strStyleName=attributes.value("style").stripWhiteSpace(); if (!strStyleName.isEmpty()) { - StyleDataMap::Iterator it=styleDataMap.find(strStyleName); + StyleDataMap::Iterator it=styleDataMap.tqfind(strStyleName); if (it!=styleDataMap.end()) { strStyleProps=it.data().m_props; @@ -187,15 +187,15 @@ bool StructureParser::StartElementC(StackItem* stackItem, StackItem* stackCurren return true; } -bool charactersElementC (StackItem* stackItem, QDomDocument& mainDocument, const QString & ch) +bool charactersElementC (StackItem* stackItem, TQDomDocument& mainDocument, const TQString & ch) { if (stackItem->elementType==ElementTypeContent) { // Normal <c> - QDomElement elementText=stackItem->stackElementText; - QDomElement elementFormatsPlural=stackItem->stackElementFormatsPlural; + TQDomElement elementText=stackItem->stackElementText; + TQDomElement elementFormatsPlural=stackItem->stackElementFormatsPlural; elementText.appendChild(mainDocument.createTextNode(ch)); - QDomElement formatElementOut=mainDocument.createElement("FORMAT"); + TQDomElement formatElementOut=mainDocument.createElement("FORMAT"); formatElementOut.setAttribute("id",1); // Normal text! formatElementOut.setAttribute("pos",stackItem->pos); // Start position formatElementOut.setAttribute("len",ch.length()); // Start position @@ -223,11 +223,11 @@ bool EndElementC (StackItem* stackItem, StackItem* stackCurrent) if (stackItem->elementType==ElementTypeContent) { stackItem->stackElementText.normalize(); - stackCurrent->pos=stackItem->pos; //Propagate the position back to the parent element + stackCurrent->pos=stackItem->pos; //Propagate the position back to the tqparent element } else if (stackItem->elementType==ElementTypeAnchorContent) { - stackCurrent->strTemp2+=stackItem->strTemp2; //Propagate the link name back to the parent element + stackCurrent->strTemp2+=stackItem->strTemp2; //Propagate the link name back to the tqparent element } else { @@ -238,14 +238,14 @@ bool EndElementC (StackItem* stackItem, StackItem* stackCurrent) } // Element <a> -bool StructureParser::StartElementA(StackItem* stackItem, StackItem* stackCurrent, const QXmlAttributes& attributes) +bool StructureParser::StartElementA(StackItem* stackItem, StackItem* stackCurrent, const TQXmlAttributes& attributes) { // <a> elements can be nested in <p> elements if (stackCurrent->elementType==ElementTypeParagraph) { //AbiPropsMap abiPropsMap; - //PopulateProperties(stackItem,QString::null,attributes,abiPropsMap,true); + //PopulateProperties(stackItem,TQString(),attributes,abiPropsMap,true); stackItem->elementType=ElementTypeAnchor; stackItem->stackElementParagraph=stackCurrent->stackElementParagraph; // <PARAGRAPH> @@ -253,7 +253,7 @@ bool StructureParser::StartElementA(StackItem* stackItem, StackItem* stackCurren stackItem->stackElementFormatsPlural=stackCurrent->stackElementFormatsPlural; // <FORMATS> stackItem->pos=stackCurrent->pos; //Propagate the position stackItem->strTemp1=attributes.value("xlink:href").stripWhiteSpace(); // link reference - stackItem->strTemp2=QString::null; // link name + stackItem->strTemp2=TQString(); // link name // We must be careful: AbiWord permits anchors to bookmarks. // However, KWord does not know what a bookmark is. @@ -274,14 +274,14 @@ bool StructureParser::StartElementA(StackItem* stackItem, StackItem* stackCurren return true; } -static bool charactersElementA (StackItem* stackItem, const QString & ch) +static bool charactersElementA (StackItem* stackItem, const TQString & ch) { // Add characters to the link name stackItem->strTemp2+=ch; return true; } -static bool EndElementA (StackItem* stackItem, StackItem* stackCurrent, QDomDocument& mainDocument) +static bool EndElementA (StackItem* stackItem, StackItem* stackCurrent, TQDomDocument& mainDocument) { if (!stackItem->elementType==ElementTypeAnchor) { @@ -289,31 +289,31 @@ static bool EndElementA (StackItem* stackItem, StackItem* stackCurrent, QDomDocu return false; } - QDomElement elementText=stackItem->stackElementText; + TQDomElement elementText=stackItem->stackElementText; elementText.appendChild(mainDocument.createTextNode("#")); - QDomElement formatElement=mainDocument.createElement("FORMAT"); + TQDomElement formatElement=mainDocument.createElement("FORMAT"); formatElement.setAttribute("id",4); // Variable formatElement.setAttribute("pos",stackItem->pos); // Start position formatElement.setAttribute("len",1); // Start position - QDomElement variableElement=mainDocument.createElement("VARIABLE"); + TQDomElement variableElement=mainDocument.createElement("VARIABLE"); formatElement.appendChild(variableElement); - QDomElement typeElement=mainDocument.createElement("TYPE"); + TQDomElement typeElement=mainDocument.createElement("TYPE"); typeElement.setAttribute("key","STRING"); typeElement.setAttribute("type",9); // link typeElement.setAttribute("text",stackItem->strTemp2); variableElement.appendChild(typeElement); //Append to <VARIABLE> - QDomElement linkElement=mainDocument.createElement("LINK"); + TQDomElement linkElement=mainDocument.createElement("LINK"); linkElement.setAttribute("hrefName",stackItem->strTemp1); linkElement.setAttribute("linkName",stackItem->strTemp2); variableElement.appendChild(linkElement); //Append to <VARIABLE> // Now work on stackCurrent stackCurrent->stackElementFormatsPlural.appendChild(formatElement); - stackCurrent->pos++; //Propagate the position back to the parent element + stackCurrent->pos++; //Propagate the position back to the tqparent element return true; } @@ -321,18 +321,18 @@ static bool EndElementA (StackItem* stackItem, StackItem* stackCurrent, QDomDocu // Element <p> bool StartElementP(StackItem* stackItem, StackItem* stackCurrent, - QDomDocument& mainDocument, - StyleDataMap& styleDataMap, const QXmlAttributes& attributes) + TQDomDocument& mainDocument, + StyleDataMap& styleDataMap, const TQXmlAttributes& attributes) { // We must prepare the style - QString strStyle=attributes.value("style"); + TQString strStyle=attributes.value("style"); if (strStyle.isEmpty()) { strStyle="Normal"; } StyleDataMap::ConstIterator it=styleDataMap.useOrCreateStyle(strStyle); - QString strLevel=attributes.value("level"); + TQString strLevel=attributes.value("level"); int level; if (strLevel.isEmpty()) { @@ -345,13 +345,13 @@ bool StartElementP(StackItem* stackItem, StackItem* stackCurrent, level=strStyle.toInt(); } - QDomElement elementText=stackCurrent->stackElementText; - QDomElement paragraphElementOut=mainDocument.createElement("PARAGRAPH"); + TQDomElement elementText=stackCurrent->stackElementText; + TQDomElement paragraphElementOut=mainDocument.createElement("PARAGRAPH"); stackCurrent->m_frameset.appendChild(paragraphElementOut); - QDomElement textElementOut=mainDocument.createElement("TEXT"); + TQDomElement textElementOut=mainDocument.createElement("TEXT"); paragraphElementOut.appendChild(textElementOut); - QDomElement formatsPluralElementOut=mainDocument.createElement("FORMATS"); + TQDomElement formatsPluralElementOut=mainDocument.createElement("FORMATS"); paragraphElementOut.appendChild(formatsPluralElementOut); AbiPropsMap abiPropsMap; @@ -363,18 +363,18 @@ bool StartElementP(StackItem* stackItem, StackItem* stackCurrent, stackItem->stackElementFormatsPlural=formatsPluralElementOut; // <FORMATS> stackItem->pos=0; // No text characters yet - // Now we populate the layout - QDomElement layoutElement=mainDocument.createElement("LAYOUT"); - paragraphElementOut.appendChild(layoutElement); + // Now we populate the tqlayout + TQDomElement tqlayoutElement=mainDocument.createElement("LAYOUT"); + paragraphElementOut.appendChild(tqlayoutElement); - AddLayout(strStyle,layoutElement, stackItem, mainDocument, abiPropsMap, level, false); + AddLayout(strStyle,tqlayoutElement, stackItem, mainDocument, abiPropsMap, level, false); return true; } -bool charactersElementP (StackItem* stackItem, QDomDocument& mainDocument, const QString & ch) +bool charactersElementP (StackItem* stackItem, TQDomDocument& mainDocument, const TQString & ch) { - QDomElement elementText=stackItem->stackElementText; + TQDomElement elementText=stackItem->stackElementText; elementText.appendChild(mainDocument.createTextNode(ch)); @@ -395,28 +395,28 @@ bool EndElementP (StackItem* stackItem) } static bool StartElementField(StackItem* stackItem, StackItem* stackCurrent, - QDomDocument& mainDocument, const QXmlAttributes& attributes) + TQDomDocument& mainDocument, const TQXmlAttributes& attributes) { // <field> element elements can be nested in <p> if (stackCurrent->elementType==ElementTypeParagraph) { - QString strType=attributes.value("type").stripWhiteSpace(); + TQString strType=attributes.value("type").stripWhiteSpace(); kdDebug(30506)<<"<field> type:"<<strType<<endl; AbiPropsMap abiPropsMap; - PopulateProperties(stackItem,QString::null,attributes,abiPropsMap,true); + PopulateProperties(stackItem,TQString(),attributes,abiPropsMap,true); stackItem->elementType=ElementTypeEmpty; // We create a format element - QDomElement variableElement=mainDocument.createElement("VARIABLE"); + TQDomElement variableElement=mainDocument.createElement("VARIABLE"); if (!ProcessField(mainDocument, variableElement, strType, attributes)) { // The field type was not recognised, // therefore write the field type in red as normal text kdWarning(30506) << "Unknown <field> type: " << strType << endl; - QDomElement formatElement=mainDocument.createElement("FORMAT"); + TQDomElement formatElement=mainDocument.createElement("FORMAT"); formatElement.setAttribute("id",1); // Variable formatElement.setAttribute("pos",stackItem->pos); // Start position formatElement.setAttribute("len",strType.length()); @@ -435,7 +435,7 @@ static bool StartElementField(StackItem* stackItem, StackItem* stackCurrent, } // We create a format element - QDomElement formatElement=mainDocument.createElement("FORMAT"); + TQDomElement formatElement=mainDocument.createElement("FORMAT"); formatElement.setAttribute("id",4); // Variable formatElement.setAttribute("pos",stackItem->pos); // Start position formatElement.setAttribute("len",1); @@ -462,13 +462,13 @@ static bool StartElementField(StackItem* stackItem, StackItem* stackCurrent, // <s> (style) static bool StartElementS(StackItem* stackItem, StackItem* /*stackCurrent*/, - const QXmlAttributes& attributes, StyleDataMap& styleDataMap) + const TQXmlAttributes& attributes, StyleDataMap& styleDataMap) { // We do not assume when we are called. // We also do not care if a style is defined multiple times. stackItem->elementType=ElementTypeEmpty; - QString strStyleName=attributes.value("name").stripWhiteSpace(); + TQString strStyleName=attributes.value("name").stripWhiteSpace(); if (strStyleName.isEmpty()) { @@ -476,13 +476,13 @@ static bool StartElementS(StackItem* stackItem, StackItem* /*stackCurrent*/, } else { - QString strLevel=attributes.value("level"); + TQString strLevel=attributes.value("level"); int level; if (strLevel.isEmpty()) level=-1; //TODO/FIXME: might be wrong if the style is based on another else level=strLevel.toInt(); - QString strBasedOn=attributes.value("basedon").simplifyWhiteSpace(); + TQString strBasedOn=attributes.value("basedon").simplifyWhiteSpace(); styleDataMap.defineNewStyleFromOld(strStyleName,strBasedOn,level,attributes.value("props")); kdDebug(30506) << " Style name: " << strStyleName << endl << " Based on: " << strBasedOn << endl @@ -495,7 +495,7 @@ static bool StartElementS(StackItem* stackItem, StackItem* /*stackCurrent*/, // <image> bool StructureParser::StartElementImage(StackItem* stackItem, StackItem* stackCurrent, - const QXmlAttributes& attributes) + const TQXmlAttributes& attributes) { // <image> elements can be nested in <p> or <c> elements if ((stackCurrent->elementType!=ElementTypeParagraph) && (stackCurrent->elementType!=ElementTypeContent)) @@ -506,7 +506,7 @@ bool StructureParser::StartElementImage(StackItem* stackItem, StackItem* stackCu } stackItem->elementType=ElementTypeEmpty; - QString strDataId=attributes.value("dataid").stripWhiteSpace(); + TQString strDataId=attributes.value("dataid").stripWhiteSpace(); AbiPropsMap abiPropsMap; abiPropsMap.splitAndAddAbiProps(attributes.value("props")); @@ -527,18 +527,18 @@ bool StructureParser::StartElementImage(StackItem* stackItem, StackItem* stackCu kdDebug(30506) << "Image: " << strDataId << endl; } - QString strPictureFrameName(i18n("Frameset name","Picture %1").arg(++m_pictureFrameNumber)); + TQString strPictureFrameName(i18n("Frameset name","Picture %1").tqarg(++m_pictureFrameNumber)); // Create the frame set of the image - QDomElement framesetElement=mainDocument.createElement("FRAMESET"); + TQDomElement framesetElement=mainDocument.createElement("FRAMESET"); framesetElement.setAttribute("frameType",2); framesetElement.setAttribute("frameInfo",0); framesetElement.setAttribute("visible",1); framesetElement.setAttribute("name",strPictureFrameName); framesetsPluralElement.appendChild(framesetElement); - QDomElement frameElementOut=mainDocument.createElement("FRAME"); + TQDomElement frameElementOut=mainDocument.createElement("FRAME"); frameElementOut.setAttribute("left",0); frameElementOut.setAttribute("top",0); frameElementOut.setAttribute("bottom",height); @@ -547,12 +547,12 @@ bool StructureParser::StartElementImage(StackItem* stackItem, StackItem* stackCu // TODO: a few attributes are missing framesetElement.appendChild(frameElementOut); - QDomElement element=mainDocument.createElement("PICTURE"); + TQDomElement element=mainDocument.createElement("PICTURE"); element.setAttribute("keepAspectRatio","true"); framesetElement.setAttribute("frameType",2); // Picture framesetElement.appendChild(element); - QDomElement key=mainDocument.createElement("KEY"); + TQDomElement key=mainDocument.createElement("KEY"); key.setAttribute("filename",strDataId); key.setAttribute("year",m_timepoint.date().year()); key.setAttribute("month",m_timepoint.date().month()); @@ -564,11 +564,11 @@ bool StructureParser::StartElementImage(StackItem* stackItem, StackItem* stackCu element.appendChild(key); // Now use the image's frame set - QDomElement elementText=stackItem->stackElementText; - QDomElement elementFormatsPlural=stackItem->stackElementFormatsPlural; + TQDomElement elementText=stackItem->stackElementText; + TQDomElement elementFormatsPlural=stackItem->stackElementFormatsPlural; elementText.appendChild(mainDocument.createTextNode("#")); - QDomElement formatElementOut=mainDocument.createElement("FORMAT"); + TQDomElement formatElementOut=mainDocument.createElement("FORMAT"); formatElementOut.setAttribute("id",6); // Normal text! formatElementOut.setAttribute("pos",stackItem->pos); // Start position formatElementOut.setAttribute("len",1); // Start position @@ -577,7 +577,7 @@ bool StructureParser::StartElementImage(StackItem* stackItem, StackItem* stackCu // WARNING: we must change the position in stackCurrent! stackCurrent->pos++; // Adapt new starting position - QDomElement anchor=mainDocument.createElement("ANCHOR"); + TQDomElement anchor=mainDocument.createElement("ANCHOR"); // No name attribute! anchor.setAttribute("type","frameset"); anchor.setAttribute("instance",strPictureFrameName); @@ -588,17 +588,17 @@ bool StructureParser::StartElementImage(StackItem* stackItem, StackItem* stackCu // <d> static bool StartElementD(StackItem* stackItem, StackItem* /*stackCurrent*/, - const QXmlAttributes& attributes) + const TQXmlAttributes& attributes) { // We do not assume when we are called or if we are or not a child of <data> // However, we assume that we are after all <image> elements stackItem->elementType=ElementTypeRealData; - QString strName=attributes.value("name").stripWhiteSpace(); + TQString strName=attributes.value("name").stripWhiteSpace(); kdDebug(30506) << "Data: " << strName << endl; - QString strBase64=attributes.value("base64").stripWhiteSpace(); - QString strMime=attributes.value("mime").stripWhiteSpace(); + TQString strBase64=attributes.value("base64").stripWhiteSpace(); + TQString strMime=attributes.value("mime").stripWhiteSpace(); if (strName.isEmpty()) { @@ -617,12 +617,12 @@ static bool StartElementD(StackItem* stackItem, StackItem* /*stackCurrent*/, stackItem->fontName=strName; // Store the data name as font name. stackItem->bold=(strBase64=="yes"); // Store base64-coded as bold stackItem->strTemp1=strMime; // Mime type - stackItem->strTemp2=QString::null; // Image data + stackItem->strTemp2=TQString(); // Image data return true; } -static bool CharactersElementD (StackItem* stackItem, QDomDocument& /*mainDocument*/, const QString & ch) +static bool CharactersElementD (StackItem* stackItem, TQDomDocument& /*mainDocument*/, const TQString & ch) { // As we have no guarantee to have the whole stream in one call, we must store the data. stackItem->strTemp2+=ch; @@ -644,7 +644,7 @@ bool StructureParser::EndElementD (StackItem* stackItem) bool isSvg=false; // SVG ? - QString extension; + TQString extension; // stackItem->strTemp1 contains the mime type if (stackItem->strTemp1=="image/png") @@ -667,13 +667,13 @@ bool StructureParser::EndElementD (StackItem* stackItem) return true; } - QString strStoreName; + TQString strStoreName; strStoreName="pictures/picture"; - strStoreName+=QString::number(++m_pictureNumber); + strStoreName+=TQString::number(++m_pictureNumber); strStoreName+=extension; - QString strDataId=stackItem->fontName; // AbiWord's data id - QDomElement key=mainDocument.createElement("KEY"); + TQString strDataId=stackItem->fontName; // AbiWord's data id + TQDomElement key=mainDocument.createElement("KEY"); key.setAttribute("filename",strDataId); key.setAttribute("year",m_timepoint.date().year()); key.setAttribute("month",m_timepoint.date().month()); @@ -696,9 +696,9 @@ bool StructureParser::EndElementD (StackItem* stackItem) { kdDebug(30506) << "Decode and write base64 stream: " << stackItem->fontName << endl; // We need to decode the base64 stream - // However KCodecs has no QString to QByteArray decoder! - QByteArray base64Stream=stackItem->strTemp2.utf8(); // Use utf8 to avoid corruption of data - QByteArray binaryStream; + // However KCodecs has no TQString to TQByteArray decoder! + TQByteArray base64Stream=stackItem->strTemp2.utf8(); // Use utf8 to avoid corruption of data + TQByteArray binaryStream; KCodecs::base64Decode(base64Stream, binaryStream); out->writeBlock(binaryStream, binaryStream.count()); } @@ -707,7 +707,7 @@ bool StructureParser::EndElementD (StackItem* stackItem) // Unknown text format! kdDebug(30506) << "Write character stream: " << stackItem->fontName << endl; // We strip the white space in front to avoid white space before a XML declaration - QCString strOut=stackItem->strTemp2.stripWhiteSpace().utf8(); + TQCString strOut=stackItem->strTemp2.stripWhiteSpace().utf8(); out->writeBlock(strOut,strOut.length()); } @@ -716,12 +716,12 @@ bool StructureParser::EndElementD (StackItem* stackItem) // <m> static bool StartElementM(StackItem* stackItem, StackItem* /*stackCurrent*/, - const QXmlAttributes& attributes) + const TQXmlAttributes& attributes) { // We do not assume when we are called or if we are or not a child of <metadata> stackItem->elementType=ElementTypeRealMetaData; - QString strKey=attributes.value("key").stripWhiteSpace(); + TQString strKey=attributes.value("key").stripWhiteSpace(); kdDebug(30506) << "Metadata key: " << strKey << endl; if (strKey.isEmpty()) @@ -732,12 +732,12 @@ static bool StartElementM(StackItem* stackItem, StackItem* /*stackCurrent*/, } stackItem->strTemp1=strKey; // Key - stackItem->strTemp2=QString::null; // Meta data + stackItem->strTemp2=TQString(); // Meta data return true; } -static bool CharactersElementM (StackItem* stackItem, const QString & ch) +static bool CharactersElementM (StackItem* stackItem, const TQString & ch) { // As we have no guarantee to have the whole data in one call, we must store the data. stackItem->strTemp2+=ch; @@ -767,7 +767,7 @@ bool StructureParser::EndElementM (StackItem* stackItem) // <br> (forced line break) static bool StartElementBR(StackItem* stackItem, StackItem* stackCurrent, - QDomDocument& mainDocument) + TQDomDocument& mainDocument) { // <br> elements are mostly in <c> but can also be in <p> if ((stackCurrent->elementType==ElementTypeParagraph) @@ -780,15 +780,15 @@ static bool StartElementBR(StackItem* stackItem, StackItem* stackCurrent, if (stackCurrent->elementType==ElementTypeContent) { // Child <c>, so we have to add formating of <c> - QDomElement formatElement=mainDocument.createElement("FORMAT"); + TQDomElement formatElement=mainDocument.createElement("FORMAT"); formatElement.setAttribute("id",1); // Normal text! formatElement.setAttribute("pos",stackCurrent->pos); // Start position formatElement.setAttribute("len",1); - AddFormat(formatElement, stackCurrent, mainDocument); // Add the format of the parent <c> + AddFormat(formatElement, stackCurrent, mainDocument); // Add the format of the tqparent <c> stackCurrent->stackElementFormatsPlural.appendChild(formatElement); //Append to <FORMATS> } - stackCurrent->stackElementText.appendChild(mainDocument.createTextNode(QChar(10))); // Add a LINE FEED + stackCurrent->stackElementText.appendChild(mainDocument.createTextNode(TQChar(10))); // Add a LINE FEED stackCurrent->pos++; // Adjust position } @@ -804,31 +804,31 @@ static bool StartElementBR(StackItem* stackItem, StackItem* stackCurrent, // <cbr> (forced column break, not supported) // <pbr> (forced page break) static bool StartElementPBR(StackItem* /*stackItem*/, StackItem* stackCurrent, - QDomDocument& mainDocument) + TQDomDocument& mainDocument) { // We are sure to be the child of a <p> element // The following code is similar to the one in StartElementP // We use mainFramesetElement here not to be dependant that <section> has happened before - QDomElement paragraphElementOut=mainDocument.createElement("PARAGRAPH"); + TQDomElement paragraphElementOut=mainDocument.createElement("PARAGRAPH"); stackCurrent->m_frameset.appendChild(paragraphElementOut); - QDomElement textElementOut=mainDocument.createElement("TEXT"); + TQDomElement textElementOut=mainDocument.createElement("TEXT"); paragraphElementOut.appendChild(textElementOut); - QDomElement formatsPluralElementOut=mainDocument.createElement("FORMATS"); + TQDomElement formatsPluralElementOut=mainDocument.createElement("FORMATS"); paragraphElementOut.appendChild(formatsPluralElementOut); - // We must now copy/clone the layout of elementText. + // We must now copy/clone the tqlayout of elementText. - QDomNodeList nodeList=stackCurrent->stackElementParagraph.elementsByTagName("LAYOUT"); + TQDomNodeList nodeList=stackCurrent->stackElementParagraph.elementsByTagName("LAYOUT"); if (!nodeList.count()) { - kdError(30506) << "Unable to find <LAYOUT> element! Aborting! (in StartElementPBR)" <<endl; + kdError(30506) << "Unable to tqfind <LAYOUT> element! Aborting! (in StartElementPBR)" <<endl; return false; } // Now clone it - QDomNode newNode=nodeList.item(0).cloneNode(true); // We make a deep cloning of the first element/node + TQDomNode newNode=nodeList.item(0).cloneNode(true); // We make a deep cloning of the first element/node if (newNode.isNull()) { kdError(30506) << "Unable to clone <LAYOUT> element! Aborting! (in StartElementPBR)" <<endl; @@ -837,7 +837,7 @@ static bool StartElementPBR(StackItem* /*stackItem*/, StackItem* stackCurrent, paragraphElementOut.appendChild(newNode); // We need a page break! - QDomElement oldLayoutElement=nodeList.item(0).toElement(); + TQDomElement oldLayoutElement=nodeList.item(0).toElement(); if (oldLayoutElement.isNull()) { kdError(30506) << "Cannot find old <LAYOUT> element! Aborting! (in StartElementPBR)" <<endl; @@ -845,7 +845,7 @@ static bool StartElementPBR(StackItem* /*stackItem*/, StackItem* stackCurrent, } // We have now to add a element <PAGEBREAKING> // TODO/FIXME: what if there is already one? - QDomElement pagebreakingElement=mainDocument.createElement("PAGEBREAKING"); + TQDomElement pagebreakingElement=mainDocument.createElement("PAGEBREAKING"); pagebreakingElement.setAttribute("linesTogether","false"); pagebreakingElement.setAttribute("hardFrameBreak","false"); pagebreakingElement.setAttribute("hardFrameBreakAfter","true"); @@ -864,7 +864,7 @@ static bool StartElementPBR(StackItem* /*stackItem*/, StackItem* stackCurrent, } // <pagesize> -static bool StartElementPageSize(QDomElement& paperElement, const QXmlAttributes& attributes) +static bool StartElementPageSize(TQDomElement& paperElement, const TQXmlAttributes& attributes) { if (attributes.value("page-scale").toDouble()!=1.0) { @@ -872,7 +872,7 @@ static bool StartElementPageSize(QDomElement& paperElement, const QXmlAttributes } int kwordOrientation; - QString strOrientation=attributes.value("orientation").stripWhiteSpace(); + TQString strOrientation=attributes.value("orientation").stripWhiteSpace(); if (strOrientation=="portrait") { @@ -891,7 +891,7 @@ static bool StartElementPageSize(QDomElement& paperElement, const QXmlAttributes double kwordHeight; double kwordWidth; - QString strPageType=attributes.value("pagetype").stripWhiteSpace(); + TQString strPageType=attributes.value("pagetype").stripWhiteSpace(); // Do we know the page size or do we need to measure? // For page formats that KWord knows, use our own values in case the values in the file would be wrong. @@ -905,7 +905,7 @@ static bool StartElementPageSize(QDomElement& paperElement, const QXmlAttributes double height = attributes.value("height").toDouble(); double width = attributes.value("width" ).toDouble(); - QString strUnits = attributes.value("units").stripWhiteSpace(); + TQString strUnits = attributes.value("units").stripWhiteSpace(); kdDebug(30506) << "Explicit page size: " << height << " " << strUnits << " x " << width << " " << strUnits @@ -1006,7 +1006,7 @@ bool StructureParser::complexForcedPageBreak(StackItem* stackItem) // <section> bool StructureParser::StartElementSection(StackItem* stackItem, StackItem* /*stackCurrent*/, - const QXmlAttributes& attributes) + const TQXmlAttributes& attributes) { //TODO: non main text sections (e.g. footers) stackItem->elementType=ElementTypeSection; @@ -1021,7 +1021,7 @@ bool StructureParser::StartElementSection(StackItem* stackItem, StackItem* /*sta // TODO; (as KWord does not allow different page sizes/margins for the same document) if (true && (!m_paperBordersElement.isNull())) { - QString str; + TQString str; str=abiPropsMap["page-margin-top"].getValue(); if (!str.isEmpty()) { @@ -1049,14 +1049,14 @@ bool StructureParser::StartElementSection(StackItem* stackItem, StackItem* /*sta // <iw> static bool EndElementIW(StackItem* stackItem, StackItem* /*stackCurrent*/, - QDomDocument& mainDocument, QDomElement& m_ignoreWordsElement) + TQDomDocument& mainDocument, TQDomElement& m_ignoreWordsElement) { if (!stackItem->elementType==ElementTypeIgnoreWord) { kdError(30506) << "Wrong element type!! Aborting! (in endElementIW)" << endl; return false; } - QDomElement wordElement=mainDocument.createElement("SPELLCHECKIGNOREWORD"); + TQDomElement wordElement=mainDocument.createElement("SPELLCHECKIGNOREWORD"); wordElement.setAttribute("word",stackItem->strTemp2.stripWhiteSpace()); m_ignoreWordsElement.appendChild(wordElement); return true; @@ -1064,12 +1064,12 @@ static bool EndElementIW(StackItem* stackItem, StackItem* /*stackCurrent*/, // <foot> bool StructureParser::StartElementFoot(StackItem* stackItem, StackItem* /*stackCurrent*/, - const QXmlAttributes& /*attributes*/) + const TQXmlAttributes& /*attributes*/) { #if 0 stackItem->elementType=ElementTypeFoot; - const QString id(attributes.value("endnote-id").stripWhiteSpace()); + const TQString id(attributes.value("endnote-id").stripWhiteSpace()); kdDebug(30506) << "Foot note id: " << id << endl; if (id.isEmpty()) @@ -1080,14 +1080,14 @@ bool StructureParser::StartElementFoot(StackItem* stackItem, StackItem* /*stackC } // We need to create a frameset for the foot note. - QDomElement framesetElement(mainDocument.createElement("FRAMESET")); + TQDomElement framesetElement(mainDocument.createElement("FRAMESET")); framesetElement.setAttribute("frameType",1); framesetElement.setAttribute("frameInfo",7); framesetElement.setAttribute("visible",1); framesetElement.setAttribute("name",getFootnoteFramesetName(id)); framesetsPluralElement.appendChild(framesetElement); - QDomElement frameElementOut(mainDocument.createElement("FRAME")); + TQDomElement frameElementOut(mainDocument.createElement("FRAME")); //frameElementOut.setAttribute("left",28); //frameElementOut.setAttribute("top",42); //frameElementOut.setAttribute("bottom",566); @@ -1105,19 +1105,19 @@ bool StructureParser::StartElementFoot(StackItem* stackItem, StackItem* /*stackC // Element <table> bool StructureParser::StartElementTable(StackItem* stackItem, StackItem* stackCurrent, - const QXmlAttributes& attributes) + const TQXmlAttributes& attributes) { #if 1 // In KWord, inline tables are inside a paragraph. // In AbiWord, tables are outside any paragraph. - QStringList widthList; + TQStringList widthList; widthList.split('/', attributes.value("table-column-props"), false); const uint columns = widthList.size(); - stackItem->m_doubleArray.detach(); // Be sure not to modify parents + stackItem->m_doubleArray.detach(); // Be sure not to modify tqparents stackItem->m_doubleArray.resize(columns+1); // All left positions but the last right one stackItem->m_doubleArray[0] = 0.0; - QStringList::ConstIterator it; + TQStringList::ConstIterator it; uint i; for ( i=0, it=widthList.begin(); i<columns; ++i, ++it ) { @@ -1127,26 +1127,26 @@ bool StructureParser::StartElementTable(StackItem* stackItem, StackItem* stackCu // ### TODO: in case of automatic column widths, we have not any width given by AbiWord const uint tableNumber(++m_tableGroupNumber); - const QString tableName(i18n("Table %1").arg(tableNumber)); + const TQString tableName(i18n("Table %1").tqarg(tableNumber)); - QDomElement elementText=stackCurrent->stackElementText; - QDomElement paragraphElementOut=mainDocument.createElement("PARAGRAPH"); + TQDomElement elementText=stackCurrent->stackElementText; + TQDomElement paragraphElementOut=mainDocument.createElement("PARAGRAPH"); stackCurrent->m_frameset.appendChild(paragraphElementOut); - QDomElement textElementOut(mainDocument.createElement("TEXT")); + TQDomElement textElementOut(mainDocument.createElement("TEXT")); textElementOut.appendChild(mainDocument.createTextNode("#")); paragraphElementOut.appendChild(textElementOut); - QDomElement formatsPluralElementOut=mainDocument.createElement("FORMATS"); + TQDomElement formatsPluralElementOut=mainDocument.createElement("FORMATS"); paragraphElementOut.appendChild(formatsPluralElementOut); - QDomElement elementFormat(mainDocument.createElement("FORMAT")); + TQDomElement elementFormat(mainDocument.createElement("FORMAT")); elementFormat.setAttribute("id",6); elementFormat.setAttribute("pos",0); elementFormat.setAttribute("len",1); formatsPluralElementOut.appendChild(elementFormat); - QDomElement elementAnchor(mainDocument.createElement("ANCHOR")); + TQDomElement elementAnchor(mainDocument.createElement("ANCHOR")); elementAnchor.setAttribute("type","frameset"); elementAnchor.setAttribute("instance",tableName); elementFormat.appendChild(elementAnchor); @@ -1156,16 +1156,16 @@ bool StructureParser::StartElementTable(StackItem* stackItem, StackItem* stackCu stackItem->stackElementText=textElementOut; // <TEXT> stackItem->stackElementFormatsPlural=formatsPluralElementOut; // <FORMATS> stackItem->strTemp1=tableName; - stackItem->strTemp2=QString::number(tableNumber); // needed as I18N does not allow adding phrases + stackItem->strTemp2=TQString::number(tableNumber); // needed as I18N does not allow adding phrases stackItem->pos=1; // Just # - // Now we populate the layout - QDomElement layoutElement=mainDocument.createElement("LAYOUT"); - paragraphElementOut.appendChild(layoutElement); + // Now we populate the tqlayout + TQDomElement tqlayoutElement=mainDocument.createElement("LAYOUT"); + paragraphElementOut.appendChild(tqlayoutElement); AbiPropsMap abiPropsMap; styleDataMap.useOrCreateStyle("Normal"); // We might have to create the "Normal" style. - AddLayout("Normal", layoutElement, stackItem, mainDocument, abiPropsMap, 0, false); + AddLayout("Normal", tqlayoutElement, stackItem, mainDocument, abiPropsMap, 0, false); #else stackItem->elementType=ElementTypeIgnore; #endif @@ -1174,7 +1174,7 @@ bool StructureParser::StartElementTable(StackItem* stackItem, StackItem* stackCu // <cell> bool StructureParser::StartElementCell(StackItem* stackItem, StackItem* stackCurrent, - const QXmlAttributes& attributes) + const TQXmlAttributes& attributes) { #if 1 if (stackCurrent->elementType!=ElementTypeTable) @@ -1185,7 +1185,7 @@ bool StructureParser::StartElementCell(StackItem* stackItem, StackItem* stackCur stackItem->elementType=ElementTypeCell; - const QString tableName(stackCurrent->strTemp1); + const TQString tableName(stackCurrent->strTemp1); kdDebug(30506) << "Table name: " << tableName << endl; if (tableName.isEmpty()) @@ -1204,17 +1204,17 @@ bool StructureParser::StartElementCell(StackItem* stackItem, StackItem* stackCur if ( col >= stackItem->m_doubleArray.size() ) { // We do not know the right position of this column, so improvise. (### TODO) - // We play on the fact that QByteArray uses shallow copies by default. + // We play on the fact that TQByteArray uses shallow copies by default. // (We do want that the change is known at <table> level) - stackItem->m_doubleArray.resize( stackItem->m_doubleArray.size() + 1, QGArray::SpeedOptim ); + stackItem->m_doubleArray.resize( stackItem->m_doubleArray.size() + 1, TQGArray::SpeedOptim ); stackItem->m_doubleArray[col+1] = stackItem->m_doubleArray[col] + 72; // Try 1 inch } - const QString frameName(i18n("Frameset name","Table %3, row %1, column %2") - .arg(row).arg(col).arg(stackCurrent->strTemp2)); // As the stack could be wrong, be careful and use the string as last! + const TQString frameName(i18n("Frameset name","Table %3, row %1, column %2") + .tqarg(row).tqarg(col).tqarg(stackCurrent->strTemp2)); // As the stack could be wrong, be careful and use the string as last! // We need to create a frameset for the cell - QDomElement framesetElement(mainDocument.createElement("FRAMESET")); + TQDomElement framesetElement(mainDocument.createElement("FRAMESET")); framesetElement.setAttribute("frameType",1); framesetElement.setAttribute("frameInfo",0); framesetElement.setAttribute("visible",1); @@ -1226,7 +1226,7 @@ bool StructureParser::StartElementCell(StackItem* stackItem, StackItem* stackCur framesetElement.setAttribute("grpMgr",tableName); framesetsPluralElement.appendChild(framesetElement); - QDomElement frameElementOut(mainDocument.createElement("FRAME")); + TQDomElement frameElementOut(mainDocument.createElement("FRAME")); frameElementOut.setAttribute( "left", stackItem->m_doubleArray[col] ); frameElementOut.setAttribute( "right", stackItem->m_doubleArray[col+1] ); frameElementOut.setAttribute("top",0); @@ -1237,7 +1237,7 @@ bool StructureParser::StartElementCell(StackItem* stackItem, StackItem* stackCur framesetElement.appendChild(frameElementOut); stackItem->m_frameset=framesetElement; - QDomElement nullDummy; + TQDomElement nullDummy; stackItem->stackElementParagraph=nullDummy; // <PARAGRAPH> stackItem->stackElementText=nullDummy; // <TEXT> stackItem->stackElementFormatsPlural=nullDummy; // <FORMATS> @@ -1250,7 +1250,7 @@ bool StructureParser::StartElementCell(StackItem* stackItem, StackItem* stackCur // Parser for SAX2 -bool StructureParser :: startElement( const QString&, const QString&, const QString& name, const QXmlAttributes& attributes) +bool StructureParser :: startElement( const TQString&, const TQString&, const TQString& name, const TQXmlAttributes& attributes) { //Warning: be careful that some element names can be lower case or upper case (not very XML) kdDebug(30506) << indent << " <" << name << ">" << endl; //DEBUG @@ -1403,7 +1403,7 @@ bool StructureParser :: startElement( const QString&, const QString&, const QStr return success; } -bool StructureParser :: endElement( const QString&, const QString& , const QString& name) +bool StructureParser :: endElement( const TQString&, const TQString& , const TQString& name) { indent.remove( 0, 1 ); // DEBUG kdDebug(30506) << indent << " </" << name << ">" << endl; @@ -1464,7 +1464,7 @@ bool StructureParser :: endElement( const QString&, const QString& , const QStri return success; } -bool StructureParser :: characters ( const QString & ch ) +bool StructureParser :: characters ( const TQString & ch ) { // DEBUG start if (ch=="\n") @@ -1536,15 +1536,15 @@ bool StructureParser :: characters ( const QString & ch ) bool StructureParser::startDocument(void) { - indent = QString::null; //DEBUG + indent = TQString(); //DEBUG styleDataMap.defineDefaultStyles(); return true; } void StructureParser::createDocInfo(void) { - QDomImplementation implementation; - QDomDocument doc(implementation.createDocumentType("document-info", + TQDomImplementation implementation; + TQDomDocument doc(implementation.createDocumentType("document-info", "-//KDE//DTD document-info 1.2//EN", "http://www.koffice.org/DTD/document-info-1.2.dtd")); m_info=doc; @@ -1553,33 +1553,33 @@ void StructureParser::createDocInfo(void) mainDocument.createProcessingInstruction( "xml","version=\"1.0\" encoding=\"UTF-8\"")); - QDomElement elementDoc(mainDocument.createElement("document-info")); + TQDomElement elementDoc(mainDocument.createElement("document-info")); elementDoc.setAttribute("xmlns","http://www.koffice.org/DTD/document-info"); m_info.appendChild(elementDoc); - QDomElement about(mainDocument.createElement("about")); + TQDomElement about(mainDocument.createElement("about")); elementDoc.appendChild(about); - QDomElement abstract(mainDocument.createElement("abstract")); + TQDomElement abstract(mainDocument.createElement("abstract")); about.appendChild(abstract); abstract.appendChild(mainDocument.createTextNode(m_metadataMap["dc.description"])); - QDomElement title(mainDocument.createElement("title")); + TQDomElement title(mainDocument.createElement("title")); about.appendChild(title); title.appendChild(mainDocument.createTextNode(m_metadataMap["dc.title"])); - QDomElement keyword(mainDocument.createElement("keyword")); + TQDomElement keyword(mainDocument.createElement("keyword")); about.appendChild(keyword); keyword.appendChild(mainDocument.createTextNode(m_metadataMap["abiword.keywords"])); - QDomElement subject(mainDocument.createElement("subject")); + TQDomElement subject(mainDocument.createElement("subject")); about.appendChild(subject); subject.appendChild(mainDocument.createTextNode(m_metadataMap["dc.subject"])); } bool StructureParser::endDocument(void) { - QDomElement stylesPluralElement=mainDocument.createElement("STYLES"); + TQDomElement stylesPluralElement=mainDocument.createElement("STYLES"); // insert before <PICTURES>, as <PICTURES> must remain last. mainDocument.documentElement().insertBefore(stylesPluralElement,m_picturesElement); @@ -1587,11 +1587,11 @@ bool StructureParser::endDocument(void) StyleDataMap::ConstIterator it; // At first, we put the Normal style - it=styleDataMap.find("Normal"); + it=styleDataMap.tqfind("Normal"); if (it!=styleDataMap.end()) { kdDebug(30506) << "\"" << it.key() << "\" => " << it.data().m_props << endl; - QDomElement styleElement=mainDocument.createElement("STYLE"); + TQDomElement styleElement=mainDocument.createElement("STYLE"); stylesPluralElement.appendChild(styleElement); AddStyle(styleElement, it.key(),it.data(),mainDocument); } @@ -1605,7 +1605,7 @@ bool StructureParser::endDocument(void) kdDebug(30506) << "\"" << it.key() << "\" => " << it.data().m_props << endl; - QDomElement styleElement=mainDocument.createElement("STYLE"); + TQDomElement styleElement=mainDocument.createElement("STYLE"); stylesPluralElement.appendChild(styleElement); AddStyle(styleElement, it.key(),it.data(),mainDocument); @@ -1617,14 +1617,14 @@ bool StructureParser::endDocument(void) return true; } -bool StructureParser::warning(const QXmlParseException& exception) +bool StructureParser::warning(const TQXmlParseException& exception) { kdWarning(30506) << "XML parsing warning: line " << exception.lineNumber() << " col " << exception.columnNumber() << " message: " << exception.message() << endl; return true; } -bool StructureParser::error(const QXmlParseException& exception) +bool StructureParser::error(const TQXmlParseException& exception) { // A XML error is recoverable, so it is only a KDE warning kdWarning(30506) << "XML parsing error: line " << exception.lineNumber() @@ -1632,22 +1632,22 @@ bool StructureParser::error(const QXmlParseException& exception) return true; } -bool StructureParser::fatalError (const QXmlParseException& exception) +bool StructureParser::fatalError (const TQXmlParseException& exception) { kdError(30506) << "XML parsing fatal error: line " << exception.lineNumber() << " col " << exception.columnNumber() << " message: " << exception.message() << endl; m_fatalerror=true; KMessageBox::error(NULL, i18n("An error has occurred while parsing the AbiWord file.\nAt line: %1, column %2\nError message: %3") - .arg(exception.lineNumber()).arg(exception.columnNumber()) - .arg( i18n( "QXml", exception.message().utf8() ) ), + .tqarg(exception.lineNumber()).tqarg(exception.columnNumber()) + .tqarg( i18n( "TQXml", exception.message().utf8() ) ), i18n("AbiWord Import Filter"),0); return false; // Stop parsing now, we do not need further errors. } void StructureParser :: createDocument(void) { - QDomImplementation implementation; - QDomDocument doc(implementation.createDocumentType("DOC", + TQDomImplementation implementation; + TQDomDocument doc(implementation.createDocumentType("DOC", "-//KDE//DTD kword 1.2//EN", "http://www.koffice.org/DTD/kword-1.2.dtd")); mainDocument=doc; @@ -1656,7 +1656,7 @@ void StructureParser :: createDocument(void) mainDocument.createProcessingInstruction( "xml","version=\"1.0\" encoding=\"UTF-8\"")); - QDomElement elementDoc; + TQDomElement elementDoc; elementDoc=mainDocument.createElement("DOC"); elementDoc.setAttribute("xmlns","http://www.koffice.org/DTD/kword"); elementDoc.setAttribute("editor","AbiWord Import Filter"); @@ -1664,7 +1664,7 @@ void StructureParser :: createDocument(void) elementDoc.setAttribute( "syntaxVersion", 3 ); mainDocument.appendChild(elementDoc); - QDomElement element; + TQDomElement element; element=mainDocument.createElement("ATTRIBUTES"); element.setAttribute("processing",0); element.setAttribute("standardpage",1); @@ -1707,7 +1707,7 @@ void StructureParser :: createDocument(void) mainFramesetElement.setAttribute("name",i18n("Frameset name","Main Text Frameset")); framesetsPluralElement.appendChild(mainFramesetElement); - QDomElement frameElementOut=mainDocument.createElement("FRAME"); + TQDomElement frameElementOut=mainDocument.createElement("FRAME"); frameElementOut.setAttribute("left",28); frameElementOut.setAttribute("top",42); frameElementOut.setAttribute("bottom",566); @@ -1753,11 +1753,11 @@ bool StructureParser::clearStackUntilParagraph(StackItemStack& auxilaryStack) } } -ABIWORDImport::ABIWORDImport(KoFilter */*parent*/, const char */*name*/, const QStringList &) : +ABIWORDImport::ABIWORDImport(KoFilter */*tqparent*/, const char */*name*/, const TQStringList &) : KoFilter() { } -KoFilter::ConversionStatus ABIWORDImport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus ABIWORDImport::convert( const TQCString& from, const TQCString& to ) { if ((to != "application/x-kword") || (from != "application/x-abiword")) return KoFilter::NotImplemented; @@ -1766,15 +1766,15 @@ KoFilter::ConversionStatus ABIWORDImport::convert( const QCString& from, const Q StructureParser handler(m_chain); - //We arbitrarily decide that Qt can handle the encoding in which the file was written!! - QXmlSimpleReader reader; + //We arbitrarily decide that TQt can handle the encoding in which the file was written!! + TQXmlSimpleReader reader; reader.setContentHandler( &handler ); reader.setErrorHandler( &handler ); //Find the last extension - QString strExt; - QString fileIn = m_chain->inputFile(); - const int result=fileIn.findRev('.'); + TQString strExt; + TQString fileIn = m_chain->inputFile(); + const int result=fileIn.tqfindRev('.'); if (result>=0) { strExt=fileIn.mid(result); @@ -1782,7 +1782,7 @@ KoFilter::ConversionStatus ABIWORDImport::convert( const QCString& from, const Q kdDebug(30506) << "File extension: -" << strExt << "-" << endl; - QString strMime; // Mime type of the compressor (default: unknown) + TQString strMime; // Mime type of the compressor (default: unknown) if ((strExt==".gz")||(strExt==".GZ") //in case of .abw.gz (logical extension) ||(strExt==".zabw")||(strExt==".ZABW")) //in case of .zabw (extension used prioritary with AbiWord) @@ -1799,7 +1799,7 @@ KoFilter::ConversionStatus ABIWORDImport::convert( const QCString& from, const Q kdDebug(30506) << "Compression: bzip2" << endl; } - QIODevice* in = KFilterDev::deviceForFile(fileIn,strMime); + TQIODevice* in = KFilterDev::deviceForFile(fileIn,strMime); if ( !in ) { @@ -1814,7 +1814,7 @@ KoFilter::ConversionStatus ABIWORDImport::convert( const QCString& from, const Q return KoFilter::FileNotFound; } - QXmlInputSource source(in); // Read the file + TQXmlInputSource source(in); // Read the file in->close(); @@ -1825,14 +1825,14 @@ KoFilter::ConversionStatus ABIWORDImport::convert( const QCString& from, const Q if (!handler.wasFatalError()) { // As the parsing was stopped for something else than a fatal error, we have not yet get an error message. (Can it really happen?) - KMessageBox::error(NULL, i18n("An error occurred during the load of the AbiWord file: %1").arg(from), + KMessageBox::error(NULL, i18n("An error occurred during the load of the AbiWord file: %1").tqarg(from.data()), i18n("AbiWord Import Filter"),0); } return KoFilter::ParsingError; } delete in; - QCString strOut; + TQCString strOut; KoStoreDevice* out; kdDebug(30506) << "Creating documentinfo.xml" << endl; @@ -1846,7 +1846,7 @@ KoFilter::ConversionStatus ABIWORDImport::convert( const QCString& from, const Q //Write the document information! strOut=handler.getDocInfo().toCString(); // UTF-8 - // WARNING: we cannot use KoStore::write(const QByteArray&) because it writes an extra NULL character at the end. + // WARNING: we cannot use KoStore::write(const TQByteArray&) because it writes an extra NULL character at the end. out->writeBlock(strOut,strOut.length()); kdDebug(30506) << "Creating maindoc.xml" << endl; @@ -1860,7 +1860,7 @@ KoFilter::ConversionStatus ABIWORDImport::convert( const QCString& from, const Q //Write the document! strOut=handler.getDocument().toCString(); // UTF-8 - // WARNING: we cannot use KoStore::write(const QByteArray&) because it writes an extra NULL character at the end. + // WARNING: we cannot use KoStore::write(const TQByteArray&) because it writes an extra NULL character at the end. out->writeBlock(strOut,strOut.length()); #if 0 diff --git a/filters/kword/abiword/abiwordimport.h b/filters/kword/abiword/abiwordimport.h index 3ead0283..c48ac362 100644 --- a/filters/kword/abiword/abiwordimport.h +++ b/filters/kword/abiword/abiwordimport.h @@ -33,9 +33,9 @@ #ifndef ABIWORDIMPORT_H #define ABIWORDIMPORT_H -#include <qstring.h> -#include <qfile.h> -#include <qobject.h> +#include <tqstring.h> +#include <tqfile.h> +#include <tqobject.h> #include <KoFilter.h> #include <KoStore.h> @@ -43,12 +43,13 @@ class ABIWORDImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - ABIWORDImport(KoFilter *parent, const char *name, const QStringList &); + ABIWORDImport(KoFilter *tqparent, const char *name, const TQStringList &); ABIWORDImport(); virtual ~ABIWORDImport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; #endif // ABIWORDIMPORT_H diff --git a/filters/kword/amipro/FileFormat.txt b/filters/kword/amipro/FileFormat.txt index 15f20037..f795b56c 100644 --- a/filters/kword/amipro/FileFormat.txt +++ b/filters/kword/amipro/FileFormat.txt @@ -43,9 +43,9 @@ Note: Word underline is just like underline, except that spaces between words are not underlined. Paragraph align is also encoded using tag, here it the list: - <+@> left alignment - <+A> right alignment - <+B> center alignment + <+@> left tqalignment + <+A> right tqalignment + <+B> center tqalignment <+C> justified Linespacing is encoded using tag: @@ -81,7 +81,7 @@ example below: 0 font color (see below) 16385 formatting flag (see below) [algn] - 4 alignment flag (see below) + 4 tqalignment flag (see below) 1 216 indent, 216/20 = 10.8 pt 144 first line indent, 144/20 = 7.2 pt @@ -185,7 +185,7 @@ Normally this appears in beginning of paragraph. 5 Page Layout ------------- -Page layout is defined in section [lay]. Here is the format, +Page tqlayout is defined in section [lay]. Here is the format, along with an example: [lay] diff --git a/filters/kword/amipro/amiproexport.cc b/filters/kword/amipro/amiproexport.cc index fcf93914..dd4550b8 100644 --- a/filters/kword/amipro/amiproexport.cc +++ b/filters/kword/amipro/amiproexport.cc @@ -23,10 +23,10 @@ #include <unistd.h> #endif -#include <qtextcodec.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qtextstream.h> +#include <tqtextcodec.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqtextstream.h> #include <kdebug.h> #include <KoFilterChain.h> @@ -46,20 +46,20 @@ class AmiProWorker : public KWEFBaseWorker public: AmiProWorker(void) { } virtual ~AmiProWorker(void) { } - virtual bool doOpenFile(const QString& filenameOut, const QString& to); + virtual bool doOpenFile(const TQString& filenameOut, const TQString& to); virtual bool doCloseFile(void); virtual bool doOpenDocument(void); virtual bool doCloseDocument(void); - virtual bool doFullParagraph(const QString& paraText, const LayoutData& layout, + virtual bool doFullParagraph(const TQString& paraText, const LayoutData& tqlayout, const ValueListFormatData& paraFormatDataList); private: - QString filename; - QString result; + TQString filename; + TQString result; bool m_bold, m_italic, m_underline, m_underlineDouble; bool m_strike, m_subscript, m_superscript; }; -bool AmiProWorker::doOpenFile(const QString& filenameOut, const QString& /*to*/) +bool AmiProWorker::doOpenFile(const TQString& filenameOut, const TQString& /*to*/) { filename = filenameOut; @@ -68,11 +68,11 @@ bool AmiProWorker::doOpenFile(const QString& filenameOut, const QString& /*to*/) bool AmiProWorker::doCloseFile(void) { - QFile out( filename ); + TQFile out( filename ); if( !out.open( IO_WriteOnly ) ) return FALSE; - QTextStream stream; - stream.setDevice( &out ); + TQTextStream stream; + stream.setDevice( TQT_TQIODEVICE(&out) ); stream << result; return TRUE; } @@ -92,7 +92,7 @@ bool AmiProWorker::doOpenDocument(void) 1, 2160, 1, 2880, 1, 3600, 1, 4320, 1, 5040, 1, 5760, 1, 6480, 1, 7200, 1, 7920, 1, 8640 }; for( uint i=0; i<sizeof(magic)/sizeof(magic[0]); i++ ) - result += "\t\t" + QString::number(magic[i]) + "\n"; + result += "\t\t" + TQString::number(magic[i]) + "\n"; result += "[elay]\n"; result += "[edoc]\n"; @@ -109,14 +109,14 @@ bool AmiProWorker::doCloseDocument(void) return TRUE; } -static QString AmiProEscape( const QString& text ) +static TQString AmiProEscape( const TQString& text ) { - QString result; + TQString result; for( unsigned i=0; i<text.length(); i++ ) { - QChar ch = text[i]; - switch( ch.unicode() ) + TQChar ch = text[i]; + switch( ch.tqunicode() ) { case '<': result += "<<"; break; case '>': result += "<;>"; break; @@ -130,11 +130,11 @@ static QString AmiProEscape( const QString& text ) return result; } -bool AmiProWorker::doFullParagraph(const QString& paraText, - const LayoutData& /*layout*/, const ValueListFormatData& paraFormatDataList) +bool AmiProWorker::doFullParagraph(const TQString& paraText, + const LayoutData& /*tqlayout*/, const ValueListFormatData& paraFormatDataList) { - QString amiproText = ""; - QString text = paraText; + TQString amiproText = ""; + TQString text = paraText; ValueListFormatData::ConstIterator it; for( it = paraFormatDataList.begin(); it!=paraFormatDataList.end(); ++it ) @@ -144,7 +144,7 @@ bool AmiProWorker::doFullParagraph(const QString& paraText, // only if the format is for text (id==1) if( formatData.id == 1 ) { - QString partialText; + TQString partialText; partialText = text.mid( formatData.pos, formatData.len ); partialText = AmiProEscape( partialText ); @@ -175,14 +175,14 @@ bool AmiProWorker::doFullParagraph(const QString& paraText, return TRUE; } -AmiProExport::AmiProExport( KoFilter *, const char *, const QStringList& ): +AmiProExport::AmiProExport( KoFilter *, const char *, const TQStringList& ): KoFilter() { } -KoFilter::ConversionStatus -AmiProExport::convert( const QCString& from, - const QCString& to ) +KoFilter::ConversiontqStatus +AmiProExport::convert( const TQCString& from, + const TQCString& to ) { // check for proper conversion if( to!= "application/x-amipro" || from != "application/x-kword" ) @@ -191,7 +191,7 @@ AmiProExport::convert( const QCString& from, AmiProWorker* worker = new AmiProWorker(); KWEFKWordLeader* leader = new KWEFKWordLeader( worker ); - KoFilter::ConversionStatus result; + KoFilter::ConversiontqStatus result; result = leader->convert( m_chain, from, to ); delete worker; diff --git a/filters/kword/amipro/amiproexport.h b/filters/kword/amipro/amiproexport.h index 12461309..d4a0603e 100644 --- a/filters/kword/amipro/amiproexport.h +++ b/filters/kword/amipro/amiproexport.h @@ -26,15 +26,16 @@ class AmiProExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - AmiProExport(KoFilter *parent, const char *name, const QStringList&); + AmiProExport(KoFilter *tqparent, const char *name, const TQStringList&); AmiProExport(); virtual ~AmiProExport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; #endif // __AMIPROEXPORT_H diff --git a/filters/kword/amipro/amiproimport.cc b/filters/kword/amipro/amiproimport.cc index f2fcb72c..7f37746c 100644 --- a/filters/kword/amipro/amiproimport.cc +++ b/filters/kword/amipro/amiproimport.cc @@ -23,10 +23,10 @@ #include <unistd.h> #endif -#include <qregexp.h> -#include <qfileinfo.h> -#include <qvaluelist.h> -#include <qfont.h> +#include <tqregexp.h> +#include <tqfileinfo.h> +#include <tqvaluelist.h> +#include <tqfont.h> #include <kdebug.h> #include <KoFilterChain.h> @@ -39,7 +39,7 @@ typedef KGenericFactory<AmiProImport, KoFilter> AmiProImportFactory; K_EXPORT_COMPONENT_FACTORY( libamiproimport, AmiProImportFactory( "kofficefilters" ) ) -AmiProImport::AmiProImport( KoFilter *, const char *, const QStringList& ): +AmiProImport::AmiProImport( KoFilter *, const char *, const TQStringList& ): KoFilter() { } @@ -48,49 +48,49 @@ class AmiProConverter: public AmiProListener { public: AmiProConverter(); - QString root, documentInfo; + TQString root, documentInfo; virtual bool doOpenDocument(); virtual bool doCloseDocument(); virtual bool doDefineStyle( const AmiProStyle& style ); - virtual bool doParagraph( const QString& text, AmiProFormatList formatList, + virtual bool doParagraph( const TQString& text, AmiProFormatList formatList, AmiProLayout& l ); private: AmiProStyleList styleList; }; // helper function to escape string for XML-ness -static QString XMLEscape( const QString& str ) +static TQString XMLEscape( const TQString& str ) { - QString result; + TQString result; for( unsigned i=0; i<str.length(); i++ ) if( str[i] == '&' ) result += "&"; else if( str[i] == '<' ) result += "<"; else if( str[i] == '>' ) result += ">"; else if( str[i] == '"' ) result += """; - else if( str[i] == QChar(39) ) result += "'"; + else if( str[i] == TQChar(39) ) result += "'"; else result += str[i]; return result; } // helper function to convert AmiPro format to KWord's FORMAT -static QString AmiProFormatAsXML( AmiProFormat format ) +static TQString AmiProFormatAsXML( AmiProFormat format ) { - QString result; + TQString result; - QString fontname = format.fontFamily; + TQString fontname = format.fontFamily; if( fontname.isEmpty() ) fontname = KoGlobal::defaultFont().family(); - QString fontsize = QString::number( format.fontSize ); - QString boldness = format.bold ? "75" : "50"; - QString italic = format.italic ? "1" : "0"; - QString strikeout = format.strikethrough ? "1" : "0"; - QString vertalign = format.superscript ? "2" : format.subscript ? "1" : "0"; - QString underline = format.double_underline ? "double" : + TQString fontsize = TQString::number( format.fontSize ); + TQString boldness = format.bold ? "75" : "50"; + TQString italic = format.italic ? "1" : "0"; + TQString strikeout = format.strikethrough ? "1" : "0"; + TQString vertalign = format.superscript ? "2" : format.subscript ? "1" : "0"; + TQString underline = format.double_underline ? "double" : format.underline|format.word_underline ? "1" : "0"; - result = "<FORMAT id=\"1\" pos=\"" + QString::number(format.pos) + - "\" len=\"" + QString::number(format.len) + "\">\n"; + result = "<FORMAT id=\"1\" pos=\"" + TQString::number(format.pos) + + "\" len=\"" + TQString::number(format.len) + "\">\n"; result.append( " <FONT name=\"" + fontname + "\" />\n" ); result.append( " <SIZE value=\"" + fontsize + "\" />\n" ); result.append( " <WEIGHT value=\"" + boldness + "\" />\n" ); @@ -104,9 +104,9 @@ static QString AmiProFormatAsXML( AmiProFormat format ) } // helper function to convert AmiPro list of formats to KWord FORMATS -static QString AmiProFormatListAsXML( AmiProFormatList& formatList ) +static TQString AmiProFormatListAsXML( AmiProFormatList& formatList ) { - QString result; + TQString result; AmiProFormatList::iterator it; for( it=formatList.begin(); it!=formatList.end(); ++it ) @@ -124,43 +124,43 @@ static QString AmiProFormatListAsXML( AmiProFormatList& formatList ) return result; } -// helper function to convert AmiPro paragraph layout to KWord's LAYOUT -static QString AmiProLayoutAsXML( const AmiProLayout& layout ) +// helper function to convert AmiPro paragraph tqlayout to KWord's LAYOUT +static TQString AmiProLayoutAsXML( const AmiProLayout& tqlayout ) { - QString result; + TQString result; - QString referredStyle = layout.name; + TQString referredStyle = tqlayout.name; if( referredStyle.isEmpty() ) referredStyle = "Standard"; - QString fontname = layout.fontFamily; + TQString fontname = tqlayout.fontFamily; if( fontname.isEmpty() ) fontname = KoGlobal::defaultFont().family(); - QString fontsize = QString::number( layout.fontSize ); - QString fontcolor = "red=\"" + QString::number( layout.fontColor.red() ) + - "\" green=\"" + QString::number( layout.fontColor.green() ) + - "\" blue=\"" + QString::number( layout.fontColor.blue() ) + "\""; - QString boldness = layout.bold ? "75" : "50"; - QString italic = layout.italic ? "1" : "0"; - QString strikeout = layout.strikethrough ? "1" : "0"; - QString vertalign = layout.superscript ? "2" : layout.subscript ? "1" : "0"; - QString underline = layout.double_underline ? "double" : - layout.underline|layout.word_underline ? "1" : "0"; - - QString align; - align = layout.align==Qt::AlignLeft ? "left" : - layout.align==Qt::AlignRight ? "right" : - layout.align==Qt::AlignCenter ? "center" : - layout.align==Qt::AlignJustify ? "justify" : + TQString fontsize = TQString::number( tqlayout.fontSize ); + TQString fontcolor = "red=\"" + TQString::number( tqlayout.fontColor.red() ) + + "\" green=\"" + TQString::number( tqlayout.fontColor.green() ) + + "\" blue=\"" + TQString::number( tqlayout.fontColor.blue() ) + "\""; + TQString boldness = tqlayout.bold ? "75" : "50"; + TQString italic = tqlayout.italic ? "1" : "0"; + TQString strikeout = tqlayout.strikethrough ? "1" : "0"; + TQString vertalign = tqlayout.superscript ? "2" : tqlayout.subscript ? "1" : "0"; + TQString underline = tqlayout.double_underline ? "double" : + tqlayout.underline|tqlayout.word_underline ? "1" : "0"; + + TQString align; + align = tqlayout.align==TQt::AlignLeft ? "left" : + tqlayout.align==TQt::AlignRight ? "right" : + tqlayout.align==TQt::AlignCenter ? "center" : + tqlayout.align==TQt::AlignJustify ? "justify" : "left"; - QString offsets; - offsets = "before=\"" + QString::number(layout.spaceBefore) + - "\" after=\"" + QString::number(layout.spaceAfter) + "\""; + TQString offsets; + offsets = "before=\"" + TQString::number(tqlayout.spaceBefore) + + "\" after=\"" + TQString::number(tqlayout.spaceAfter) + "\""; - QString linespacing; - linespacing = layout.linespace==AmiPro::LS_Single ? QString::fromLatin1( "0" ) : - layout.linespace==AmiPro::LS_OneAndHalf ? QString::fromLatin1( "oneandhalf" ) : - layout.linespace==AmiPro::LS_Double ? QString::fromLatin1( "double" ) : - QString::number( layout.linespace ); + TQString linespacing; + linespacing = tqlayout.linespace==AmiPro::LS_Single ? TQString::tqfromLatin1( "0" ) : + tqlayout.linespace==AmiPro::LS_OneAndHalf ? TQString::tqfromLatin1( "oneandhalf" ) : + tqlayout.linespace==AmiPro::LS_Double ? TQString::tqfromLatin1( "double" ) : + TQString::number( tqlayout.linespace ); result.append( "<LAYOUT>\n" ); result.append( " <NAME value=\"" + XMLEscape( referredStyle ) + "\" />\n" ); @@ -191,36 +191,36 @@ static QString AmiProLayoutAsXML( const AmiProLayout& layout ) } // helper function to convert AmiPro style to KWord STYLE -static QString AmiProStyleAsXML( const AmiProStyle& style ) +static TQString AmiProStyleAsXML( const AmiProStyle& style ) { - QString result; + TQString result; - QString fontname = style.fontFamily; + TQString fontname = style.fontFamily; if( fontname.isEmpty() ) fontname = KoGlobal::defaultFont().family(); - QString fontsize = QString::number( style.fontSize ); - QString boldness = style.bold ? "75" : "50"; - QString italic = style.italic ? "1" : "0"; - QString strikeout = style.strikethrough ? "1" : "0"; - QString vertalign = style.superscript ? "2" : style.subscript ? "1" : "0"; - QString underline = style.double_underline ? "double" : + TQString fontsize = TQString::number( style.fontSize ); + TQString boldness = style.bold ? "75" : "50"; + TQString italic = style.italic ? "1" : "0"; + TQString strikeout = style.strikethrough ? "1" : "0"; + TQString vertalign = style.superscript ? "2" : style.subscript ? "1" : "0"; + TQString underline = style.double_underline ? "double" : style.underline|style.word_underline ? "1" : "0"; - QString align; - align = style.align==Qt::AlignLeft ? "left" : - style.align==Qt::AlignRight ? "right" : - style.align==Qt::AlignCenter ? "center" : - style.align==Qt::AlignJustify ? "justify" : + TQString align; + align = style.align==TQt::AlignLeft ? "left" : + style.align==TQt::AlignRight ? "right" : + style.align==TQt::AlignCenter ? "center" : + style.align==TQt::AlignJustify ? "justify" : "left"; - QString linespacing; - linespacing = style.linespace==AmiPro::LS_Single ? QString::fromLatin1( "0" ) : - style.linespace==AmiPro::LS_OneAndHalf ? QString::fromLatin1( "oneandhalf" ) : - style.linespace==AmiPro::LS_Double ? QString::fromLatin1( "double" ) : - QString::number( style.linespace ); + TQString linespacing; + linespacing = style.linespace==AmiPro::LS_Single ? TQString::tqfromLatin1( "0" ) : + style.linespace==AmiPro::LS_OneAndHalf ? TQString::tqfromLatin1( "oneandhalf" ) : + style.linespace==AmiPro::LS_Double ? TQString::tqfromLatin1( "double" ) : + TQString::number( style.linespace ); - QString offsets; - offsets = "before=\"" + QString::number(style.spaceBefore) + - "\" after=\"" + QString::number(style.spaceAfter) + "\""; + TQString offsets; + offsets = "before=\"" + TQString::number(style.spaceBefore) + + "\" after=\"" + TQString::number(style.spaceAfter) + "\""; result.append( "<STYLE>\n" ); result.append( " <NAME value=\"" + XMLEscape( style.name ) + "\" />\n" ); @@ -247,9 +247,9 @@ static QString AmiProStyleAsXML( const AmiProStyle& style ) } // helper function to convert AmiPro styles to KWord STYLES -static QString AmiProStyleListAsXML( AmiProStyleList& styleList ) +static TQString AmiProStyleListAsXML( AmiProStyleList& styleList ) { - QString result; + TQString result; AmiProStyleList::iterator it; for( it=styleList.begin(); it!=styleList.end(); ++it ) @@ -274,7 +274,7 @@ AmiProConverter::AmiProConverter() bool AmiProConverter::doOpenDocument() { - QString prolog = "<!DOCTYPE DOC>\n"; + TQString prolog = "<!DOCTYPE DOC>\n"; prolog.append( "<DOC mime=\"application/x-kword\" syntaxVersion=\"2\" editor=\"KWord\">\n"); prolog.append( "<PAPER width=\"595\" height=\"841\" format=\"1\" fType=\"0\" orientation=\"0\" hType=\"0\" columns=\"1\">\n" ); @@ -291,7 +291,7 @@ bool AmiProConverter::doOpenDocument() bool AmiProConverter::doCloseDocument() { - QString epilog = "</FRAMESET>\n"; + TQString epilog = "</FRAMESET>\n"; epilog.append( "</FRAMESETS>\n" ); epilog.append( AmiProStyleListAsXML( styleList ) ); epilog.append( "</DOC>\n" ); @@ -307,19 +307,19 @@ bool AmiProConverter::doDefineStyle( const AmiProStyle& style ) return true; } -bool AmiProConverter::doParagraph( const QString& text, AmiProFormatList formatList, - AmiProLayout& layout ) +bool AmiProConverter::doParagraph( const TQString& text, AmiProFormatList formatList, + AmiProLayout& tqlayout ) { root.append( "<PARAGRAPH>\n" ); root.append( "<TEXT>" + XMLEscape( text ) + "</TEXT>\n" ); root.append( AmiProFormatListAsXML( formatList ) ); - root.append( AmiProLayoutAsXML( layout ) ); + root.append( AmiProLayoutAsXML( tqlayout ) ); root.append( "</PARAGRAPH>\n" ); return true; } -KoFilter::ConversionStatus AmiProImport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus AmiProImport::convert( const TQCString& from, const TQCString& to ) { // check for proper conversion if( to!= "application/x-kword" || from != "application/x-amipro" ) @@ -335,8 +335,8 @@ KoFilter::ConversionStatus AmiProImport::convert( const QCString& from, const QC if( converter->root.isEmpty() ) return KoFilter::StupidError; - QString root = converter->root; - QString documentInfo = converter->documentInfo; + TQString root = converter->root; + TQString documentInfo = converter->documentInfo; delete converter; delete parser; @@ -347,7 +347,7 @@ KoFilter::ConversionStatus AmiProImport::convert( const QCString& from, const QC // store output document if( out ) { - QCString cstring = root.utf8(); + TQCString cstring = root.utf8(); cstring.prepend( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" ); out->writeBlock( (const char*) cstring, cstring.length() ); } @@ -356,7 +356,7 @@ KoFilter::ConversionStatus AmiProImport::convert( const QCString& from, const QC out = m_chain->storageFile( "documentinfo.xml", KoStore::Write ); if ( out ) { - QCString cstring = documentInfo.utf8(); + TQCString cstring = documentInfo.utf8(); cstring.prepend( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" ); out->writeBlock( (const char*) cstring, cstring.length() ); diff --git a/filters/kword/amipro/amiproimport.h b/filters/kword/amipro/amiproimport.h index d1b6cb7e..8d22270f 100644 --- a/filters/kword/amipro/amiproimport.h +++ b/filters/kword/amipro/amiproimport.h @@ -20,7 +20,7 @@ #ifndef __AMIPROIMPORT_H #define __AMIPROIMPORT_H -#include <qstring.h> +#include <tqstring.h> #include <KoFilter.h> #include <KoStore.h> @@ -28,15 +28,16 @@ class AmiProImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - AmiProImport(KoFilter *parent, const char *name, const QStringList&); + AmiProImport(KoFilter *tqparent, const char *name, const TQStringList&); AmiProImport(); virtual ~AmiProImport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; #endif // __AMIPROIMPORT_H diff --git a/filters/kword/amipro/amiproparser.cpp b/filters/kword/amipro/amiproparser.cpp index 12311417..fdae97e6 100644 --- a/filters/kword/amipro/amiproparser.cpp +++ b/filters/kword/amipro/amiproparser.cpp @@ -19,23 +19,23 @@ #include "amiproparser.h" -#include <qfile.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qtextstream.h> +#include <tqfile.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqtextstream.h> const float AmiPro::LS_Single = -1; const float AmiPro::LS_OneAndHalf = -1.5; const float AmiPro::LS_Double = -2; // helper function to "unescape" AmiPro string -static QString AmiProUnescape( const QString& str ) +static TQString AmiProUnescape( const TQString& str ) { - QString result; + TQString result; for( unsigned i=0; i< str.length(); i++ ) { - QChar c = str[i]; + TQChar c = str[i]; result.append( c ); // check for "@@", decoded as '@' @@ -83,7 +83,7 @@ static QString AmiProUnescape( const QString& str ) else { result.truncate( result.length() - 1 ); // remove the '<' - result.append( QChar(str[i+2].unicode() + 0x40 ) ); + result.append( TQChar(str[i+2].tqunicode() + 0x40 ) ); i += 3; } } @@ -92,7 +92,7 @@ static QString AmiProUnescape( const QString& str ) if( str[i+1] == '\\' ) { result.truncate( result.length() - 1 ); // remove the '<' - result.append( QChar(str[i+2].unicode() | 0x80 ) ); + result.append( TQChar(str[i+2].tqunicode() | 0x80 ) ); i += 3; } @@ -124,17 +124,17 @@ void AmiProParser::setListener( AmiProListener *listener ) m_listener = listener; } -bool AmiProParser::process( const QString& filename ) +bool AmiProParser::process( const TQString& filename ) { - QString line; + TQString line; // open input file - QFile in( filename ); + TQFile in( filename ); if( !in.open( IO_ReadOnly)) return setResult( FileError ); - QTextStream stream; - stream.setDevice( &in ); + TQTextStream stream; + stream.setDevice( TQT_TQIODEVICE(&in) ); // the first should be "[ver]" line = stream.readLine(); @@ -155,7 +155,7 @@ bool AmiProParser::process( const QString& filename ) m_formatList.clear(); m_styleList.clear(); m_currentSection = ""; - QStringList lines; + TQStringList lines; // parse line-by-line for( ;; ) @@ -164,7 +164,7 @@ bool AmiProParser::process( const QString& filename ) line = stream.readLine(); if( line.isNull() ) break; - QString old_section = m_currentSection; + TQString old_section = m_currentSection; bool enter_new_section = false; // new main section ? @@ -244,19 +244,19 @@ bool AmiProParser::processCloseDocument() return true; } -bool AmiProParser::parseParagraph( const QStringList& lines ) +bool AmiProParser::parseParagraph( const TQStringList& lines ) { m_text = ""; m_formatList.clear(); m_layout = AmiProLayout(); // join the lines, up until first char in a line is '>' - QString partext = ""; + TQString partext = ""; for( unsigned i=0; i<lines.count(); i++ ) if( lines[i][0] == '>' ) break; else partext.append( lines[i] + "\n" ); - QChar ch = partext[partext.length()-1]; + TQChar ch = partext[partext.length()-1]; while( ( ch == '\n' ) || ( ch == '\r' ) ) { partext.remove( partext.length()-1, 1 ); @@ -264,19 +264,19 @@ bool AmiProParser::parseParagraph( const QStringList& lines ) } // "unescape", process special chars and such - QString text = AmiProUnescape( partext ); + TQString text = AmiProUnescape( partext ); // apply default style first m_layout.applyStyle( findStyle( "Body Text" ) ); for( unsigned i=0; i<text.length(); i++ ) { - QChar ch = text[i]; + TQChar ch = text[i]; // handle a tag if( ch == '<' ) { - QString tag = ""; + TQString tag = ""; for( i++; (i < text.length()) && (text[i] != '>'); i++) tag.append( text[i] ); handleTag( tag ); @@ -287,7 +287,7 @@ bool AmiProParser::parseParagraph( const QStringList& lines ) // handle style change if( ch == '@' ) { - QString styleName; + TQString styleName; for( i++; (i < partext.length()) && (partext[i] != '@'); i++) styleName += partext[i]; m_layout.name = styleName; @@ -322,7 +322,7 @@ bool AmiProParser::parseParagraph( const QStringList& lines ) return true; } -bool AmiProParser::parseStyle( const QStringList& lines ) +bool AmiProParser::parseStyle( const TQStringList& lines ) { AmiProStyle style; @@ -344,13 +344,13 @@ bool AmiProParser::parseStyle( const QStringList& lines ) style.word_underline = flag & 8; style.double_underline = flag & 64; - // alignment + // tqalignment if( lines[7].stripWhiteSpace() != "[algn]" ) return true; unsigned align_flag = lines[8].stripWhiteSpace().toUInt(); - if( align_flag & 1 ) style.align = Qt::AlignLeft; - if( align_flag & 2 ) style.align = Qt::AlignRight; - if( align_flag & 4 ) style.align = Qt::AlignCenter; - if( align_flag & 8 ) style.align = Qt::AlignJustify; + if( align_flag & 1 ) style.align = TQt::AlignLeft; + if( align_flag & 2 ) style.align = TQt::AlignRight; + if( align_flag & 4 ) style.align = TQt::AlignCenter; + if( align_flag & 8 ) style.align = TQt::AlignJustify; // linespace if( lines[13].stripWhiteSpace() != "[spc]" ) return true; @@ -373,7 +373,7 @@ bool AmiProParser::parseStyle( const QStringList& lines ) return true; } -AmiProStyle AmiProParser::findStyle( const QString& name ) +AmiProStyle AmiProParser::findStyle( const TQString& name ) { AmiProStyleList::iterator it; for( it=m_styleList.begin(); it!=m_styleList.end(); ++it ) @@ -385,7 +385,7 @@ AmiProStyle AmiProParser::findStyle( const QString& name ) return AmiProStyle(); } -bool AmiProParser::handleTag( const QString& tag ) +bool AmiProParser::handleTag( const TQString& tag ) { // > (actually encoded as <;>) if( tag == ";" ) @@ -525,19 +525,19 @@ bool AmiProParser::handleTag( const QString& tag ) // paragraph left-align if( tag == "+@" ) - m_layout.align = Qt::AlignLeft; + m_layout.align = TQt::AlignLeft; // paragraph right-align if( tag == "+A" ) - m_layout.align = Qt::AlignRight; + m_layout.align = TQt::AlignRight; // paragraph center if( tag == "+B" ) - m_layout.align = Qt::AlignCenter; + m_layout.align = TQt::AlignCenter; // paragraph justify if( tag == "+C" ) - m_layout.align = Qt::AlignJustify; + m_layout.align = TQt::AlignJustify; // linespace if( tag.left( 3 ) == ":S+" ) @@ -551,12 +551,12 @@ bool AmiProParser::handleTag( const QString& tag ) // font if( tag.left( 2 ) == ":f" ) { - QString fontdesc = tag.right( tag.length()-2 ); - QStringList desc = QStringList::split( ",", fontdesc ); + TQString fontdesc = tag.right( tag.length()-2 ); + TQStringList desc = TQStringList::split( ",", fontdesc ); if( desc.count() > 0 ) m_currentFormat.fontSize = desc[0].toFloat() / 20.0; if( desc.count() > 1 ) { - QString fontFamily = desc[1]; + TQString fontFamily = desc[1]; if( fontFamily[0].isDigit() ) fontFamily.remove( 0, 1 ); m_currentFormat.fontFamily = fontFamily; } @@ -582,7 +582,7 @@ AmiProFormat::AmiProFormat() subscript = superscript = strikethrough = FALSE; fontFamily = ""; fontSize = 12; - fontColor = Qt::black; + fontColor = TQt::black; } void AmiProFormat::assign( const AmiProFormat& f ) @@ -628,17 +628,17 @@ void AmiProFormat::applyStyle( const AmiProStyle& style ) strikethrough = style.strikethrough; } -// paragraph layout +// paragraph tqlayout AmiProLayout::AmiProLayout() { name = ""; fontFamily = ""; fontSize = 12; - fontColor = Qt::black; + fontColor = TQt::black; bold = italic = underline = word_underline = double_underline = subscript = superscript = strikethrough = FALSE; - align = Qt::AlignLeft; + align = TQt::AlignLeft; linespace = AmiPro::LS_Single; spaceBefore = spaceAfter = 0; } @@ -699,7 +699,7 @@ AmiProStyle::AmiProStyle() name = "Unnamed"; fontFamily = ""; fontSize = 12; - fontColor = Qt::black; + fontColor = TQt::black; bold = italic = underline = word_underline = double_underline = subscript = superscript = strikethrough = FALSE; @@ -756,5 +756,5 @@ AmiProListener::~AmiProListener() DO_TRUE_DEFINITION(doOpenDocument()) DO_TRUE_DEFINITION(doCloseDocument()) DO_TRUE_DEFINITION(doDefineStyle(const AmiProStyle& style)) -DO_TRUE_DEFINITION(doParagraph(const QString& text, AmiProFormatList formatList, +DO_TRUE_DEFINITION(doParagraph(const TQString& text, AmiProFormatList formatList, AmiProLayout& )) diff --git a/filters/kword/amipro/amiproparser.h b/filters/kword/amipro/amiproparser.h index 0f2015bf..40a8f82b 100644 --- a/filters/kword/amipro/amiproparser.h +++ b/filters/kword/amipro/amiproparser.h @@ -20,10 +20,10 @@ #ifndef __AMIPROPARSER_H #define __AMIPROPARSER_H -class QString; -class QStringList; -#include <qvaluelist.h> -#include <qcolor.h> +class TQString; +class TQStringList; +#include <tqvaluelist.h> +#include <tqcolor.h> class AmiPro { @@ -40,9 +40,9 @@ class AmiProFormat bool bold, italic, underline; bool word_underline, double_underline; bool subscript, superscript, strikethrough; - QString fontFamily; + TQString fontFamily; float fontSize; - QColor fontColor; + TQColor fontColor; enum { Left, Right, Center, Justified } align; AmiProFormat(); AmiProFormat( const AmiProFormat& ); @@ -51,20 +51,20 @@ class AmiProFormat void applyStyle( const AmiProStyle& ); }; -typedef QValueList<AmiProFormat> AmiProFormatList; +typedef TQValueList<AmiProFormat> AmiProFormatList; class AmiProLayout { public: - QString name; - QString fontFamily; + TQString name; + TQString fontFamily; float fontSize; - QColor fontColor; + TQColor fontColor; bool bold, italic, underline; bool word_underline, double_underline; bool subscript, superscript, strikethrough; - Qt::AlignmentFlags align; + TQt::AlignmentFlags align; float linespace; float spaceBefore, spaceAfter; AmiProLayout(); @@ -77,14 +77,14 @@ class AmiProLayout class AmiProStyle { public: - QString name; - QString fontFamily; + TQString name; + TQString fontFamily; float fontSize; - QColor fontColor; + TQColor fontColor; bool bold, italic, underline; bool word_underline, double_underline; bool subscript, superscript, strikethrough; - Qt::AlignmentFlags align; + TQt::AlignmentFlags align; float linespace; float spaceBefore, spaceAfter; AmiProStyle(); @@ -93,7 +93,7 @@ class AmiProStyle void assign( const AmiProStyle& ); }; -typedef QValueList<AmiProStyle> AmiProStyleList; +typedef TQValueList<AmiProStyle> AmiProStyleList; class AmiProListener { @@ -103,8 +103,8 @@ class AmiProListener virtual bool doOpenDocument(); virtual bool doCloseDocument(); virtual bool doDefineStyle( const AmiProStyle& style ); - virtual bool doParagraph( const QString& text, AmiProFormatList formatList, - AmiProLayout& layout ); + virtual bool doParagraph( const TQString& text, AmiProFormatList formatList, + AmiProLayout& tqlayout ); }; class AmiProParser @@ -116,7 +116,7 @@ class AmiProParser enum { OK, UnknownError, FileError, InvalidFormat } Error; - bool process( const QString& filename ); + bool process( const TQString& filename ); int result(){ return m_result; } void setListener( AmiProListener * ); @@ -124,7 +124,7 @@ class AmiProParser private: int m_result; - QString m_text; + TQString m_text; AmiProFormat m_currentFormat; AmiProFormatList m_formatList; AmiProLayout m_layout; @@ -133,18 +133,18 @@ class AmiProParser AmiProListener *m_listener; - QString m_currentSection; + TQString m_currentSection; bool setResult( int ); - bool parseParagraph( const QStringList& lines ); - bool parseStyle( const QStringList& line ); - AmiProStyle findStyle( const QString& name ); + bool parseParagraph( const TQStringList& lines ); + bool parseStyle( const TQStringList& line ); + AmiProStyle findStyle( const TQString& name ); - bool handleTag( const QString& tag ); + bool handleTag( const TQString& tag ); bool processOpenDocument(); bool processCloseDocument(); - bool processParagraph( const QString& text, AmiProFormatList formatList, - AmiProLayout& layout ); + bool processParagraph( const TQString& text, AmiProFormatList formatList, + AmiProLayout& tqlayout ); }; diff --git a/filters/kword/applixword/applixwordimport.cc b/filters/kword/applixword/applixwordimport.cc index d172af50..17af6d88 100644 --- a/filters/kword/applixword/applixwordimport.cc +++ b/filters/kword/applixword/applixwordimport.cc @@ -23,8 +23,8 @@ #include <unistd.h> #endif -#include <qmessagebox.h> -#include <qptrlist.h> +#include <tqmessagebox.h> +#include <tqptrlist.h> #include <applixwordimport.h> #include <applixwordimport.moc> #include <kdebug.h> @@ -43,7 +43,7 @@ K_EXPORT_COMPONENT_FACTORY( libapplixwordimport, APPLIXWORDImportFactory( "koffi * * * * ******************************************************************************/ -APPLIXWORDImport::APPLIXWORDImport (KoFilter *, const char *, const QStringList& ) : +APPLIXWORDImport::APPLIXWORDImport (KoFilter *, const char *, const TQStringList& ) : KoFilter() { } @@ -56,10 +56,10 @@ APPLIXWORDImport::APPLIXWORDImport (KoFilter *, const char *, const QStringList& * * * * ******************************************************************************/ -QString -APPLIXWORDImport::nextLine (QTextStream & stream) +TQString +APPLIXWORDImport::nextLine (TQTextStream & stream) { - QString s; + TQString s; // Read one Line s = stream.readLine(); @@ -85,13 +85,13 @@ APPLIXWORDImport::nextLine (QTextStream & stream) * * * * ******************************************************************************/ -KoFilter::ConversionStatus APPLIXWORDImport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus APPLIXWORDImport::convert( const TQCString& from, const TQCString& to ) { if (to!="application/x-kword" || from!="application/x-applixword") return KoFilter::NotImplemented; - QFile in(m_chain->inputFile()); + TQFile in(m_chain->inputFile()); if (!in.open (IO_ReadOnly)) { kdError(30517) << "Unable to open input file!" << endl; @@ -100,7 +100,7 @@ KoFilter::ConversionStatus APPLIXWORDImport::convert( const QCString& from, cons } - QString str; + TQString str; str += "<?xml version=\"1.0\"?>\n"; str += "<DOC author=\"Reginald Stadlbauer and Torben Weis\" email=\"reggie@kde.org and weis@kde.org\" editor=\"KWord\" mime=\"application/x-kword\">\n"; @@ -113,7 +113,7 @@ KoFilter::ConversionStatus APPLIXWORDImport::convert( const QCString& from, cons str += " <FRAME left=\"28\" top=\"42\" right=\"566\" bottom=\"798\" runaround=\"1\" runaGapPT=\"2\" runaGapMM=\"1\" runaGapINCH=\"0.0393701\" lWidth=\"1\" lRed=\"255\" lGreen=\"255\" lBlue=\"255\" lStyle=\"0\" rWidth=\"1\" rRed=\"255\" rGreen=\"255\" rBlue=\"255\" rStyle=\"0\" tWidth=\"1\" tRed=\"255\" tGreen=\"255\" tBlue=\"255\" tStyle=\"0\" bWidth=\"1\" bRed=\"255\" bGreen=\"255\" bBlue=\"255\" bStyle=\"0\" bkRed=\"255\" bkGreen=\"255\" bkBlue=\"255\" bleftpt=\"0\" bleftmm=\"0\" bleftinch=\"0\" brightpt=\"0\" brightmm=\"0\" brightinch=\"0\" btoppt=\"0\" btopmm=\"0\" btopinch=\"0\" bbottompt=\"0\" bbottommm=\"0\" bbottominch=\"0\"/>\n"; - QTextStream stream (&in); + TQTextStream stream (&in); m_stepsize = in.size()/50; m_instep = 0; @@ -122,9 +122,9 @@ KoFilter::ConversionStatus APPLIXWORDImport::convert( const QCString& from, cons int rueck; int pos, ok; char stylename[100]; - QString mystr, textstr; - QPtrList<t_mycolor> mcol; - QStringList mcoltxt; + TQString mystr, textstr; + TQPtrList<t_mycolor> mcol; + TQStringList mcoltxt; /************************************************************************** * Read header * @@ -145,7 +145,7 @@ KoFilter::ConversionStatus APPLIXWORDImport::convert( const QCString& from, cons { printf ("Start styles\n"); t_mycolor *col = new t_mycolor; // delete is in place - QString coltxt ; + TQString coltxt ; int zaehler = 0; // Note: "zaehler" means "counter" in English do { @@ -160,7 +160,7 @@ KoFilter::ConversionStatus APPLIXWORDImport::convert( const QCString& from, cons if (mystr.startsWith ("<color ")) { mystr.remove (0, 8); - pos = mystr.find ("\""); + pos = mystr.tqfind ("\""); coltxt = mystr.left (pos); mystr.remove (0,pos+1); rueck = sscanf ((const char *) mystr.latin1() , @@ -239,7 +239,7 @@ KoFilter::ConversionStatus APPLIXWORDImport::convert( const QCString& from, cons **********************************************************************/ else if (mystr.startsWith ("<T ")) { - QString colname; + TQString colname; // Remove starting tab info mystr.remove (0, 4); @@ -252,13 +252,13 @@ KoFilter::ConversionStatus APPLIXWORDImport::convert( const QCString& from, cons int y=0; do { - pos = mystr.find ("\"", y); + pos = mystr.tqfind ("\"", y); kdDebug(30517)<<"POS:"<<pos<<" length:"<< mystr.length()<<" y:"<<y <<endl; kdDebug(30517)<<"< "<<mystr<<" >\n"; if( (pos-1 > -1) && (mystr[pos-1] == '\\')) { - kdDebug(30517)<<" No string end - but Gänsefüsschen\n"; + kdDebug(30517)<<" No string end - but G�nsef�sschen\n"; y=pos+1; } else @@ -275,13 +275,13 @@ KoFilter::ConversionStatus APPLIXWORDImport::convert( const QCString& from, cons kdDebug(30517) <<"Text:<" <<textstr <<" > "<< pos<<" Rest:<"<< mystr<<"> \n"; // split format - QStringList typeList; - typeList = QStringList::split (' ', mystr); + TQStringList typeList; + typeList = TQStringList::split (' ', mystr); int fontsize=12, bold=0, italic=0, underline=0, colpos=-1; - QString fontname; + TQString fontname; int nn=0; - for (QStringList::Iterator it = typeList.begin(); it != typeList.end(); ++it ) + for (TQStringList::Iterator it = typeList.begin(); it != typeList.end(); ++it ) { kdDebug(30517) <<" No: "<< nn<< " > "<< (*it)<< "< = \n"; @@ -334,7 +334,7 @@ KoFilter::ConversionStatus APPLIXWORDImport::convert( const QCString& from, cons (*it).remove (0, 7); (*it).remove ((*it).length()-1, 1); colname = *it; - colpos = mcoltxt.findIndex (colname); + colpos = mcoltxt.tqfindIndex (colname); kdDebug(30517) <<" Color: "<< colname<<" "<< colpos <<" \n"; } else @@ -371,7 +371,7 @@ KoFilter::ConversionStatus APPLIXWORDImport::convert( const QCString& from, cons if (fontsize != 1) { str += " <SIZE value=\""; - str += QString::number (fontsize); + str += TQString::number (fontsize); str += "\" />\n"; } @@ -396,11 +396,11 @@ KoFilter::ConversionStatus APPLIXWORDImport::convert( const QCString& from, cons mc = mcol.at(colpos); str += " <COLOR red=\""; - str += QString::number (mc->r); + str += TQString::number (mc->r); str += "\" green=\""; - str += QString::number (mc->g); + str += TQString::number (mc->g); str += "\" blue=\""; - str += QString::number (mc->b); + str += TQString::number (mc->b); str += "\" />\n"; delete mc; } @@ -427,7 +427,7 @@ KoFilter::ConversionStatus APPLIXWORDImport::convert( const QCString& from, cons return KoFilter::StorageCreationError; } - QCString cstring = str.utf8 (); + TQCString cstring = str.utf8 (); out->writeBlock ((const char*) cstring, cstring.length()); @@ -439,174 +439,174 @@ KoFilter::ConversionStatus APPLIXWORDImport::convert( const QCString& from, cons /****************************************************************************** * function: specCharfind * ******************************************************************************/ -QChar -APPLIXWORDImport::specCharfind (QChar a, QChar b) +TQChar +APPLIXWORDImport::specCharfind (TQChar a, TQChar b) { - QChar chr; + TQChar chr; - if ( (a == 'n') && (b == 'p') ) chr = 'ß'; + if ( (a == 'n') && (b == 'p') ) chr = '�'; - else if ( (a == 'n') && (b == 'c') ) chr = 'Ò'; - else if ( (a == 'p') && (b == 'c') ) chr = 'ò'; + else if ( (a == 'n') && (b == 'c') ) chr = '�'; + else if ( (a == 'p') && (b == 'c') ) chr = '�'; - else if ( (a == 'n') && (b == 'd') ) chr = 'Ó'; - else if ( (a == 'p') && (b == 'd') ) chr = 'ó'; + else if ( (a == 'n') && (b == 'd') ) chr = '�'; + else if ( (a == 'p') && (b == 'd') ) chr = '�'; - else if ( (a == 'n') && (b == 'e') ) chr = 'Ô'; - else if ( (a == 'p') && (b == 'e') ) chr = 'ô'; + else if ( (a == 'n') && (b == 'e') ) chr = '�'; + else if ( (a == 'p') && (b == 'e') ) chr = '�'; - else if ( (a == 'n') && (b == 'f') ) chr = 'Õ'; - else if ( (a == 'p') && (b == 'f') ) chr = 'õ'; + else if ( (a == 'n') && (b == 'f') ) chr = '�'; + else if ( (a == 'p') && (b == 'f') ) chr = '�'; - else if ( (a == 'p') && (b == 'g') ) chr = 'ö'; - else if ( (a == 'n') && (b == 'g') ) chr = 'Ö'; + else if ( (a == 'p') && (b == 'g') ) chr = '�'; + else if ( (a == 'n') && (b == 'g') ) chr = '�'; - else if ( (a == 'n') && (b == 'j') ) chr = 'Ù'; - else if ( (a == 'p') && (b == 'j') ) chr = 'ù'; + else if ( (a == 'n') && (b == 'j') ) chr = '�'; + else if ( (a == 'p') && (b == 'j') ) chr = '�'; - else if ( (a == 'n') && (b == 'k') ) chr = 'Ú'; - else if ( (a == 'p') && (b == 'k') ) chr = 'ú'; + else if ( (a == 'n') && (b == 'k') ) chr = '�'; + else if ( (a == 'p') && (b == 'k') ) chr = '�'; - else if ( (a == 'n') && (b == 'l') ) chr = 'Û'; - else if ( (a == 'p') && (b == 'l') ) chr = 'û'; + else if ( (a == 'n') && (b == 'l') ) chr = '�'; + else if ( (a == 'p') && (b == 'l') ) chr = '�'; - else if ( (a == 'p') && (b == 'm') ) chr = 'ü'; - else if ( (a == 'n') && (b == 'm') ) chr = 'Ü'; + else if ( (a == 'p') && (b == 'm') ) chr = '�'; + else if ( (a == 'n') && (b == 'm') ) chr = '�'; - else if ( (a == 'm') && (b == 'a') ) chr = 'À'; - else if ( (a == 'o') && (b == 'a') ) chr = 'à'; + else if ( (a == 'm') && (b == 'a') ) chr = '�'; + else if ( (a == 'o') && (b == 'a') ) chr = '�'; - else if ( (a == 'm') && (b == 'b') ) chr = 'Á'; - else if ( (a == 'o') && (b == 'b') ) chr = 'á'; + else if ( (a == 'm') && (b == 'b') ) chr = '�'; + else if ( (a == 'o') && (b == 'b') ) chr = '�'; - else if ( (a == 'm') && (b == 'c') ) chr = 'Â'; - else if ( (a == 'o') && (b == 'c') ) chr = 'â'; + else if ( (a == 'm') && (b == 'c') ) chr = '�'; + else if ( (a == 'o') && (b == 'c') ) chr = '�'; - else if ( (a == 'm') && (b == 'd') ) chr = 'Ã'; - else if ( (a == 'o') && (b == 'd') ) chr = 'ã'; + else if ( (a == 'm') && (b == 'd') ) chr = '�'; + else if ( (a == 'o') && (b == 'd') ) chr = '�'; - else if ( (a == 'm') && (b == 'e') ) chr = 'Ä'; - else if ( (a == 'o') && (b == 'e') ) chr = 'ä'; + else if ( (a == 'm') && (b == 'e') ) chr = '�'; + else if ( (a == 'o') && (b == 'e') ) chr = '�'; - else if ( (a == 'm') && (b == 'f') ) chr = 'Å'; - else if ( (a == 'o') && (b == 'f') ) chr = 'å'; + else if ( (a == 'm') && (b == 'f') ) chr = '�'; + else if ( (a == 'o') && (b == 'f') ) chr = '�'; - else if ( (a == 'm') && (b == 'g') ) chr = 'Æ'; - else if ( (a == 'o') && (b == 'g') ) chr = 'æ'; + else if ( (a == 'm') && (b == 'g') ) chr = '�'; + else if ( (a == 'o') && (b == 'g') ) chr = '�'; - else if ( (a == 'm') && (b == 'i') ) chr = 'È'; - else if ( (a == 'o') && (b == 'i') ) chr = 'è'; + else if ( (a == 'm') && (b == 'i') ) chr = '�'; + else if ( (a == 'o') && (b == 'i') ) chr = '�'; - else if ( (a == 'm') && (b == 'j') ) chr = 'É'; - else if ( (a == 'o') && (b == 'j') ) chr = 'é'; + else if ( (a == 'm') && (b == 'j') ) chr = '�'; + else if ( (a == 'o') && (b == 'j') ) chr = '�'; - else if ( (a == 'm') && (b == 'k') ) chr = 'Ê'; - else if ( (a == 'o') && (b == 'k') ) chr = 'ê'; + else if ( (a == 'm') && (b == 'k') ) chr = '�'; + else if ( (a == 'o') && (b == 'k') ) chr = '�'; - else if ( (a == 'm') && (b == 'l') ) chr = 'Ë'; - else if ( (a == 'o') && (b == 'l') ) chr = 'ë'; + else if ( (a == 'm') && (b == 'l') ) chr = '�'; + else if ( (a == 'o') && (b == 'l') ) chr = '�'; - else if ( (a == 'm') && (b == 'm') ) chr = 'Ì'; - else if ( (a == 'o') && (b == 'm') ) chr = 'ì'; + else if ( (a == 'm') && (b == 'm') ) chr = '�'; + else if ( (a == 'o') && (b == 'm') ) chr = '�'; - else if ( (a == 'm') && (b == 'n') ) chr = 'Í'; - else if ( (a == 'o') && (b == 'n') ) chr = 'í'; + else if ( (a == 'm') && (b == 'n') ) chr = '�'; + else if ( (a == 'o') && (b == 'n') ) chr = '�'; - else if ( (a == 'm') && (b == 'o') ) chr = 'Î'; - else if ( (a == 'o') && (b == 'o') ) chr = 'î'; + else if ( (a == 'm') && (b == 'o') ) chr = '�'; + else if ( (a == 'o') && (b == 'o') ) chr = '�'; - else if ( (a == 'm') && (b == 'p') ) chr = 'Ï'; - else if ( (a == 'o') && (b == 'p') ) chr = 'ï'; + else if ( (a == 'm') && (b == 'p') ) chr = '�'; + else if ( (a == 'o') && (b == 'p') ) chr = '�'; - else if ( (a == 'n') && (b == 'b') ) chr = 'Ñ'; - else if ( (a == 'p') && (b == 'b') ) chr = 'ñ'; + else if ( (a == 'n') && (b == 'b') ) chr = '�'; + else if ( (a == 'p') && (b == 'b') ) chr = '�'; - else if ( (a == 'k') && (b == 'c') ) chr = '¢'; - else if ( (a == 'k') && (b == 'j') ) chr = '©'; - else if ( (a == 'l') && (b == 'f') ) chr = 'µ'; - else if ( (a == 'n') && (b == 'i') ) chr = 'Ø'; - else if ( (a == 'p') && (b == 'i') ) chr = 'ø'; + else if ( (a == 'k') && (b == 'c') ) chr = '�'; + else if ( (a == 'k') && (b == 'j') ) chr = '�'; + else if ( (a == 'l') && (b == 'f') ) chr = '�'; + else if ( (a == 'n') && (b == 'i') ) chr = '�'; + else if ( (a == 'p') && (b == 'i') ) chr = '�'; - else if ( (a == 'l') && (b == 'j') ) chr = '¹'; - else if ( (a == 'l') && (b == 'c') ) chr = '²'; - else if ( (a == 'l') && (b == 'd') ) chr = '³'; + else if ( (a == 'l') && (b == 'j') ) chr = '�'; + else if ( (a == 'l') && (b == 'c') ) chr = '�'; + else if ( (a == 'l') && (b == 'd') ) chr = '�'; - else if ( (a == 'l') && (b == 'm') ) chr = '¼'; - else if ( (a == 'l') && (b == 'n') ) chr = '½'; - else if ( (a == 'l') && (b == 'o') ) chr = '¾'; + else if ( (a == 'l') && (b == 'm') ) chr = '�'; + else if ( (a == 'l') && (b == 'n') ) chr = '�'; + else if ( (a == 'l') && (b == 'o') ) chr = '�'; - else if ( (a == 'l') && (b == 'a') ) chr = '°'; + else if ( (a == 'l') && (b == 'a') ) chr = '�'; - else if ( (a == 'k') && (b == 'o') ) chr = '®'; - else if ( (a == 'k') && (b == 'h') ) chr = '§'; - else if ( (a == 'k') && (b == 'd') ) chr = '£'; + else if ( (a == 'k') && (b == 'o') ) chr = '�'; + else if ( (a == 'k') && (b == 'h') ) chr = '�'; + else if ( (a == 'k') && (b == 'd') ) chr = '�'; - else if ( (a == 'p') && (b == 'a') ) chr = 'ð'; - else if ( (a == 'n') && (b == 'a') ) chr = 'Ð'; + else if ( (a == 'p') && (b == 'a') ) chr = '�'; + else if ( (a == 'n') && (b == 'a') ) chr = '�'; - else if ( (a == 'l') && (b == 'l') ) chr = '»'; - else if ( (a == 'k') && (b == 'l') ) chr = '«'; + else if ( (a == 'l') && (b == 'l') ) chr = '�'; + else if ( (a == 'k') && (b == 'l') ) chr = '�'; - else if ( (a == 'l') && (b == 'k') ) chr = 'º'; + else if ( (a == 'l') && (b == 'k') ) chr = '�'; - else if ( (a == 'l') && (b == 'h') ) chr = '·'; + else if ( (a == 'l') && (b == 'h') ) chr = '�'; - else if ( (a == 'k') && (b == 'b') ) chr = '¡'; + else if ( (a == 'k') && (b == 'b') ) chr = '�'; - else if ( (a == 'k') && (b == 'e') ) chr = '¤'; + else if ( (a == 'k') && (b == 'e') ) chr = '�'; - else if ( (a == 'l') && (b == 'b') ) chr = '±'; + else if ( (a == 'l') && (b == 'b') ) chr = '�'; - else if ( (a == 'l') && (b == 'p') ) chr = '¿'; + else if ( (a == 'l') && (b == 'p') ) chr = '�'; - else if ( (a == 'k') && (b == 'f') ) chr = '¥'; + else if ( (a == 'k') && (b == 'f') ) chr = '�'; - else if ( (a == 'p') && (b == 'o') ) chr = 'þ'; - else if ( (a == 'n') && (b == 'o') ) chr = 'Þ'; + else if ( (a == 'p') && (b == 'o') ) chr = '�'; + else if ( (a == 'n') && (b == 'o') ) chr = '�'; - else if ( (a == 'n') && (b == 'n') ) chr = 'Ý'; - else if ( (a == 'p') && (b == 'n') ) chr = 'ý'; - else if ( (a == 'p') && (b == 'p') ) chr = 'ÿ'; + else if ( (a == 'n') && (b == 'n') ) chr = '�'; + else if ( (a == 'p') && (b == 'n') ) chr = '�'; + else if ( (a == 'p') && (b == 'p') ) chr = '�'; - else if ( (a == 'k') && (b == 'k') ) chr = 'ª'; + else if ( (a == 'k') && (b == 'k') ) chr = '�'; - else if ( (a == 'k') && (b == 'm') ) chr = '¬'; - else if ( (a == 'p') && (b == 'h') ) chr = '÷'; + else if ( (a == 'k') && (b == 'm') ) chr = '�'; + else if ( (a == 'p') && (b == 'h') ) chr = '�'; else if ( (a == 'k') && (b == 'g') ) chr = '|'; else if ( (a == 'l') && (b == 'e') ) chr = '\''; - else if ( (a == 'k') && (b == 'i') ) chr = '¨'; + else if ( (a == 'k') && (b == 'i') ) chr = '�'; - else if ( (a == 'k') && (b == 'n') ) chr = ''; + else if ( (a == 'k') && (b == 'n') ) chr = '�'; - else if ( (a == 'k') && (b == 'p') ) chr = '¯'; + else if ( (a == 'k') && (b == 'p') ) chr = '�'; - else if ( (a == 'l') && (b == 'g') ) chr = '¶'; + else if ( (a == 'l') && (b == 'g') ) chr = '�'; - else if ( (a == 'l') && (b == 'i') ) chr = '¸'; + else if ( (a == 'l') && (b == 'i') ) chr = '�'; - else if ( (a == 'm') && (b == 'h') ) chr = 'Ç'; - else if ( (a == 'o') && (b == 'h') ) chr = 'ç'; + else if ( (a == 'm') && (b == 'h') ) chr = '�'; + else if ( (a == 'o') && (b == 'h') ) chr = '�'; - else if ( (a == 'n') && (b == 'h') ) chr = '×'; + else if ( (a == 'n') && (b == 'h') ) chr = '�'; - else if ( (a == 'k') && (b == 'a') ) chr = ' '; + else if ( (a == 'k') && (b == 'a') ) chr = '�'; else if ( (a == 'a') && (b == 'j') ) chr = '!'; @@ -625,10 +625,10 @@ APPLIXWORDImport::specCharfind (QChar a, QChar b) * * * * ******************************************************************************/ -QString -APPLIXWORDImport::readTagLine (QTextStream &stream, QFile &in) +TQString +APPLIXWORDImport::readTagLine (TQTextStream &stream, TQFile &in) { - QString mystrn, mystr; + TQString mystrn, mystr; int ok, pos; // Read one line @@ -686,14 +686,14 @@ APPLIXWORDImport::readTagLine (QTextStream &stream, QFile &in) * * ******************************************************************************/ void -APPLIXWORDImport::replaceSpecial (QString &textstr) +APPLIXWORDImport::replaceSpecial (TQString &textstr) { int ok, pos; // 1. Replace Part for this characters: <, >, & - textstr.replace ('&', "&"); - textstr.replace ('<', "<"); - textstr.replace ('>', ">"); + textstr.tqreplace ('&', "&"); + textstr.tqreplace ('<', "<"); + textstr.tqreplace ('>', ">"); // 2. Replace part for this characters: applixwear qoutes @@ -702,12 +702,12 @@ APPLIXWORDImport::replaceSpecial (QString &textstr) do { // Searching for an quote - pos = textstr.find ('\"', pos); + pos = textstr.tqfind ('\"', pos); // Is it an textqoute ? if ((pos > -1) && (textstr[pos-1] == '\\')) { - textstr.replace (pos-1, 2,"\""); + textstr.tqreplace (pos-1, 2,"\""); } else { @@ -720,14 +720,14 @@ APPLIXWORDImport::replaceSpecial (QString &textstr) // 3. Replace part for Applix Characters int foundSpecialCharakter; - QChar newchar; + TQChar newchar; do { // initialize foundSpecialCharakter = false; - pos = textstr.find ("^"); + pos = textstr.tqfind ("^"); // is there a special character ? if (pos > -1 ) @@ -739,7 +739,7 @@ APPLIXWORDImport::replaceSpecial (QString &textstr) newchar = specCharfind (textstr[pos+1], textstr[pos+2]); // replace the character - textstr.replace (pos, 3, newchar); + textstr.tqreplace (pos, 3, newchar); } } while (foundSpecialCharakter == true); @@ -756,9 +756,9 @@ APPLIXWORDImport::replaceSpecial (QString &textstr) * * ******************************************************************************/ int -APPLIXWORDImport::readHeader (QTextStream &stream, QFile &in) +APPLIXWORDImport::readHeader (TQTextStream &stream, TQFile &in) { - QString mystr; + TQString mystr; int rueck; int vers[3] = { 0, 0, 0 }; @@ -777,13 +777,13 @@ APPLIXWORDImport::readHeader (QTextStream &stream, QFile &in) printf ("Header not correkt - May be it is not an applixword file\n"); printf ("Headerline: <%s>\n", (const char *) mystr.latin1()); - QMessageBox::critical (0L, "Applixword header problem", - QString ("The Applixword header is not correct. " + TQMessageBox::critical (0L, "Applixword header problem", + TQString ("The Applixword header is not correct. " "May be it is not an applixword file! <BR>" - "This is the header line I did read:<BR><B>%1</B>").arg(mystr.latin1()), + "This is the header line I did read:<BR><B>%1</B>").tqarg(mystr.latin1()), "Okay"); - // i18n( "What is the separator used in this file ? First line is \n%1" ).arg(firstLine), + // i18n( "What is the separator used in this file ? First line is \n%1" ).tqarg(firstLine), return false; } else return true; diff --git a/filters/kword/applixword/applixwordimport.h b/filters/kword/applixword/applixwordimport.h index 50532fa5..f82066ec 100644 --- a/filters/kword/applixword/applixwordimport.h +++ b/filters/kword/applixword/applixwordimport.h @@ -20,11 +20,11 @@ #ifndef APPLIXWORDIMPORT_H #define APPLIXWORDIMPORT_H -#include <qstring.h> -#include <qstringlist.h> -#include <qfile.h> -#include <qobject.h> -#include <qtextstream.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqfile.h> +#include <tqobject.h> +#include <tqtextstream.h> #include <KoFilter.h> #include <KoStore.h> @@ -44,19 +44,20 @@ typedef struct class APPLIXWORDImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - APPLIXWORDImport(KoFilter *parent, const char *name, const QStringList&); + APPLIXWORDImport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~APPLIXWORDImport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); protected: - QChar specCharfind (QChar , QChar ); - QString readTagLine (QTextStream &, QFile &); - void replaceSpecial (QString &); - QString nextLine (QTextStream &); - int readHeader (QTextStream &stream, QFile &); + TQChar specCharfind (TQChar , TQChar ); + TQString readTagLine (TQTextStream &, TQFile &); + void replaceSpecial (TQString &); + TQString nextLine (TQTextStream &); + int readHeader (TQTextStream &stream, TQFile &); private: int m_stepsize; diff --git a/filters/kword/ascii/ExportDialog.cc b/filters/kword/ascii/ExportDialog.cc index 8e758282..1d408b18 100644 --- a/filters/kword/ascii/ExportDialog.cc +++ b/filters/kword/ascii/ExportDialog.cc @@ -18,9 +18,9 @@ * Boston, MA 02110-1301, USA. */ -#include <qtextcodec.h> -#include <qradiobutton.h> -#include <qbuttongroup.h> +#include <tqtextcodec.h> +#include <tqradiobutton.h> +#include <tqbuttongroup.h> #include <kdebug.h> #include <klocale.h> @@ -33,22 +33,22 @@ #include <ExportDialogUI.h> #include <ExportDialog.h> -AsciiExportDialog :: AsciiExportDialog(QWidget* parent) - : KDialogBase(parent, 0, true, i18n("KWord's Plain Text Export Filter"), Ok|Cancel, No, true), +AsciiExportDialog :: AsciiExportDialog(TQWidget* tqparent) + : KDialogBase(tqparent, 0, true, i18n("KWord's Plain Text Export Filter"), Ok|Cancel, No, true), m_dialog(new ExportDialogUI(this)) { kapp->restoreOverrideCursor(); - QStringList encodings; - encodings << i18n( "Descriptive encoding name", "Recommended ( %1 )" ).arg( "UTF-8" ); - encodings << i18n( "Descriptive encoding name", "Locale ( %1 )" ).arg( QTextCodec::codecForLocale()->name() ); + TQStringList encodings; + encodings << i18n( "Descriptive encoding name", "Recommended ( %1 )" ).tqarg( "UTF-8" ); + encodings << i18n( "Descriptive encoding name", "Locale ( %1 )" ).tqarg( TQTextCodec::codecForLocale()->name() ); encodings += KGlobal::charsets()->descriptiveEncodingNames(); // Add a few non-standard encodings, which might be useful for text files - const QString description(i18n("Descriptive encoding name","Other ( %1 )")); - encodings << description.arg("Apple Roman"); // Apple - encodings << description.arg("IBM 850") << description.arg("IBM 866"); // MS DOS - encodings << description.arg("CP 1258"); // Windows + const TQString description(i18n("Descriptive encoding name","Other ( %1 )")); + encodings << description.tqarg("Apple Roman"); // Apple + encodings << description.tqarg("IBM 850") << description.tqarg("IBM 866"); // MS DOS + encodings << description.tqarg("CP 1258"); // Windows m_dialog->comboBoxEncoding->insertStringList(encodings); @@ -58,18 +58,18 @@ AsciiExportDialog :: AsciiExportDialog(QWidget* parent) AsciiExportDialog :: ~AsciiExportDialog(void) { - kapp->setOverrideCursor(Qt::waitCursor); + kapp->setOverrideCursor(TQt::waitCursor); } -QTextCodec* AsciiExportDialog::getCodec(void) const +TQTextCodec* AsciiExportDialog::getCodec(void) const { - const QString strCodec( KGlobal::charsets()->encodingForName( m_dialog->comboBoxEncoding->currentText() ) ); + const TQString strCodec( KGlobal::charsets()->encodingForName( m_dialog->comboBoxEncoding->currentText() ) ); kdDebug(30502) << "Encoding: " << strCodec << endl; bool ok = false; - QTextCodec* codec = QTextCodec::codecForName( strCodec.utf8() ); + TQTextCodec* codec = TQTextCodec::codecForName( strCodec.utf8() ); - // If QTextCodec has not found a valid encoding, so try with KCharsets. + // If TQTextCodec has not found a valid encoding, so try with KCharsets. if ( codec ) { ok = true; @@ -84,17 +84,17 @@ QTextCodec* AsciiExportDialog::getCodec(void) const { // Default: UTF-8 kdWarning(30502) << "Cannot find encoding:" << strCodec << endl; - // ### TODO: what parent to use? - KMessageBox::error( 0, i18n("Cannot find encoding: %1").arg( strCodec ) ); + // ### TODO: what tqparent to use? + KMessageBox::error( 0, i18n("Cannot find encoding: %1").tqarg( strCodec ) ); return 0; } return codec; } -QString AsciiExportDialog::getEndOfLine(void) const +TQString AsciiExportDialog::getEndOfLine(void) const { - QString strReturn; + TQString strReturn; if (m_dialog->radioEndOfLineLF==m_dialog->buttonGroupEndOfLine->selected()) strReturn="\n"; else if (m_dialog->radioEndOfLineCRLF==m_dialog->buttonGroupEndOfLine->selected()) diff --git a/filters/kword/ascii/ExportDialog.h b/filters/kword/ascii/ExportDialog.h index 6405cb88..2d75df8e 100644 --- a/filters/kword/ascii/ExportDialog.h +++ b/filters/kword/ascii/ExportDialog.h @@ -21,7 +21,7 @@ #ifndef EXPORT_DIALOG_H #define EXPORT_DIALOG_H -#include <qwidget.h> +#include <tqwidget.h> #include <kdialogbase.h> @@ -30,12 +30,13 @@ class ExportDialogUI; class AsciiExportDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - AsciiExportDialog(QWidget* parent=NULL); + AsciiExportDialog(TQWidget* tqparent=NULL); ~AsciiExportDialog(void); - QString getEndOfLine(void) const; - QTextCodec* getCodec(void) const; + TQString getEndOfLine(void) const; + TQTextCodec* getCodec(void) const; private: ExportDialogUI* m_dialog; }; diff --git a/filters/kword/ascii/ExportDialogUI.ui b/filters/kword/ascii/ExportDialogUI.ui index 3e3a45f4..2cef87d5 100644 --- a/filters/kword/ascii/ExportDialogUI.ui +++ b/filters/kword/ascii/ExportDialogUI.ui @@ -2,7 +2,7 @@ <class>ExportDialogUI</class> <comment>Export dialog for KWord's plain text export filter</comment> <author>Nicolas GOUTTE <goutte@kde.org></author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>ExportDialogUI</cstring> </property> @@ -27,15 +27,15 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -67,7 +67,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>106</width> <height>20</height> @@ -76,7 +76,7 @@ </spacer> </hbox> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroupEndOfLine</cstring> </property> @@ -93,7 +93,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioEndOfLineLF</cstring> </property> @@ -104,7 +104,7 @@ <bool>true</bool> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioEndOfLineCRLF</cstring> </property> @@ -115,7 +115,7 @@ <bool>false</bool> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioEndOfLineCR</cstring> </property> @@ -138,7 +138,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -152,7 +152,7 @@ <tabstop>radioEndOfLineCRLF</tabstop> <tabstop>radioEndOfLineCR</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kcombobox.h</includehint> <includehint>klineedit.h</includehint> diff --git a/filters/kword/ascii/ImportDialog.cc b/filters/kword/ascii/ImportDialog.cc index ae20409a..4bcccc58 100644 --- a/filters/kword/ascii/ImportDialog.cc +++ b/filters/kword/ascii/ImportDialog.cc @@ -18,9 +18,9 @@ * Boston, MA 02110-1301, USA. */ -#include <qtextcodec.h> -#include <qradiobutton.h> -#include <qbuttongroup.h> +#include <tqtextcodec.h> +#include <tqradiobutton.h> +#include <tqbuttongroup.h> #include <klocale.h> #include <kcharsets.h> @@ -33,22 +33,22 @@ #include <ImportDialogUI.h> #include <ImportDialog.h> -AsciiImportDialog :: AsciiImportDialog(QWidget* parent) - : KDialogBase(parent, 0, true, i18n("KWord's Plain Text Import Filter"), Ok|Cancel, No, true), +AsciiImportDialog :: AsciiImportDialog(TQWidget* tqparent) + : KDialogBase(tqparent, 0, true, i18n("KWord's Plain Text Import Filter"), Ok|Cancel, No, true), m_dialog(new ImportDialogUI(this)) { kapp->restoreOverrideCursor(); - QStringList encodings; - encodings << i18n( "Descriptive encoding name", "Recommended ( %1 )" ).arg( "UTF-8" ); - encodings << i18n( "Descriptive encoding name", "Locale ( %1 )" ).arg( QTextCodec::codecForLocale()->name() ); + TQStringList encodings; + encodings << i18n( "Descriptive encoding name", "Recommended ( %1 )" ).tqarg( "UTF-8" ); + encodings << i18n( "Descriptive encoding name", "Locale ( %1 )" ).tqarg( TQTextCodec::codecForLocale()->name() ); encodings += KGlobal::charsets()->descriptiveEncodingNames(); // Add a few non-standard encodings, which might be useful for text files - const QString description(i18n("Descriptive encoding name","Other ( %1 )")); - encodings << description.arg("Apple Roman"); // Apple - encodings << description.arg("IBM 850") << description.arg("IBM 866"); // MS DOS - encodings << description.arg("CP 1258"); // Windows + const TQString description(i18n("Descriptive encoding name","Other ( %1 )")); + encodings << description.tqarg("Apple Roman"); // Apple + encodings << description.tqarg("IBM 850") << description.tqarg("IBM 866"); // MS DOS + encodings << description.tqarg("CP 1258"); // Windows m_dialog->comboBoxEncoding->insertStringList(encodings); @@ -57,18 +57,18 @@ AsciiImportDialog :: AsciiImportDialog(QWidget* parent) AsciiImportDialog :: ~AsciiImportDialog(void) { - kapp->setOverrideCursor(Qt::waitCursor); + kapp->setOverrideCursor(TQt::waitCursor); } -QTextCodec* AsciiImportDialog::getCodec(void) const +TQTextCodec* AsciiImportDialog::getCodec(void) const { - const QString strCodec( KGlobal::charsets()->encodingForName( m_dialog->comboBoxEncoding->currentText() ) ); + const TQString strCodec( KGlobal::charsets()->encodingForName( m_dialog->comboBoxEncoding->currentText() ) ); kdDebug(30502) << "Encoding: " << strCodec << endl; bool ok = false; - QTextCodec* codec = QTextCodec::codecForName( strCodec.utf8() ); + TQTextCodec* codec = TQTextCodec::codecForName( strCodec.utf8() ); - // If QTextCodec has not found a valid encoding, so try with KCharsets. + // If TQTextCodec has not found a valid encoding, so try with KCharsets. if ( codec ) { ok = true; @@ -83,8 +83,8 @@ QTextCodec* AsciiImportDialog::getCodec(void) const { // Default: UTF-8 kdWarning(30502) << "Cannot find encoding:" << strCodec << endl; - // ### TODO: what parent to use? - KMessageBox::error( 0, i18n("Cannot find encoding: %1").arg( strCodec ) ); + // ### TODO: what tqparent to use? + KMessageBox::error( 0, i18n("Cannot find encoding: %1").tqarg( strCodec ) ); return 0; } diff --git a/filters/kword/ascii/ImportDialog.h b/filters/kword/ascii/ImportDialog.h index 22bbaa57..929aa8fc 100644 --- a/filters/kword/ascii/ImportDialog.h +++ b/filters/kword/ascii/ImportDialog.h @@ -21,7 +21,7 @@ #ifndef _IMPORT_DIALOG_H #define _IMPORT_DIALOG_H -#include <qwidget.h> +#include <tqwidget.h> #include <kdialogbase.h> @@ -30,10 +30,11 @@ class ImportDialogUI; class AsciiImportDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - AsciiImportDialog(QWidget* parent=NULL); + AsciiImportDialog(TQWidget* tqparent=NULL); ~AsciiImportDialog(void); - QTextCodec* getCodec(void) const; + TQTextCodec* getCodec(void) const; int getParagraphStrategy(void) const; private: ImportDialogUI* m_dialog; diff --git a/filters/kword/ascii/ImportDialogUI.ui b/filters/kword/ascii/ImportDialogUI.ui index cbfe1cd4..a67a43c2 100644 --- a/filters/kword/ascii/ImportDialogUI.ui +++ b/filters/kword/ascii/ImportDialogUI.ui @@ -2,7 +2,7 @@ <class>ImportDialogUI</class> <comment>Import dialog for KWord's plain text import filter</comment> <author>Nicolas GOUTTE <goutte@kde.org></author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>ImportDialogUI</cstring> </property> @@ -27,15 +27,15 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -67,7 +67,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>106</width> <height>20</height> @@ -76,7 +76,7 @@ </spacer> </hbox> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroupParagraph</cstring> </property> @@ -93,7 +93,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioParagraphAsIs</cstring> </property> @@ -104,7 +104,7 @@ <bool>true</bool> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioParagraphSentence</cstring> </property> @@ -112,7 +112,7 @@ <string>&Sentence: If the end of line is the end of a sentence</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioParagraphOldWay</cstring> </property> @@ -132,7 +132,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -141,7 +141,7 @@ </spacer> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kcombobox.h</includehint> <includehint>klineedit.h</includehint> diff --git a/filters/kword/ascii/asciiexport.cc b/filters/kword/ascii/asciiexport.cc index 09b22dec..04b7f451 100644 --- a/filters/kword/ascii/asciiexport.cc +++ b/filters/kword/ascii/asciiexport.cc @@ -24,12 +24,12 @@ #include <limits.h> -#include <qcstring.h> -#include <qfile.h> -#include <qiodevice.h> -#include <qstring.h> -#include <qtextcodec.h> -#include <qtextstream.h> +#include <tqcstring.h> +#include <tqfile.h> +#include <tqiodevice.h> +#include <tqstring.h> +#include <tqtextcodec.h> +#include <tqtextstream.h> #include <kdebug.h> #include <kgenericfactory.h> @@ -77,38 +77,38 @@ public: } public: - virtual bool doOpenFile(const QString& filenameOut, const QString& to); + virtual bool doOpenFile(const TQString& filenameOut, const TQString& to); virtual bool doCloseFile(void); // Close file in normal conditions virtual bool doOpenDocument(void); virtual bool doCloseDocument(void); - virtual bool doFullParagraphList(const QValueList<ParaData>& paraList); + virtual bool doFullParagraphList(const TQValueList<ParaData>& paraList); virtual bool doFullParagraph(const ParaData& para); - virtual bool doFullParagraph(const QString& paraText, - const LayoutData& layout, + virtual bool doFullParagraph(const TQString& paraText, + const LayoutData& tqlayout, const ValueListFormatData& paraFormatDataList); public: - QString getEndOfLine(void) const { return m_eol; } - void setEndOfLine(const QString& str) { m_eol = str; } + TQString getEndOfLine(void) const { return m_eol; } + void setEndOfLine(const TQString& str) { m_eol = str; } - QTextCodec* getCodec(void) const { return m_codec; } - void setCodec(QTextCodec* codec) { m_codec = codec; } + TQTextCodec* getCodec(void) const { return m_codec; } + void setCodec(TQTextCodec* codec) { m_codec = codec; } private: virtual bool ProcessTable(const Table& table); - virtual bool ProcessParagraphData (const QString& paraText, + virtual bool ProcessParagraphData (const TQString& paraText, const ValueListFormatData& paraFormatDataList); private: - QIODevice* m_ioDevice; - QTextStream* m_streamOut; + TQIODevice* m_ioDevice; + TQTextStream* m_streamOut; - QTextCodec* m_codec; // QTextCodec in which the file will be written - QString m_eol; // End of line character(s) - QStringList m_automaticNotes; // Automatic foot-/endnotes - QString m_manualNotes; // Manual foot-/endnotes + TQTextCodec* m_codec; // TQTextCodec in which the file will be written + TQString m_eol; // End of line character(s) + TQStringList m_automaticNotes; // Automatic foot-/endnotes + TQString m_manualNotes; // Manual foot-/endnotes #if 0 CounterData::Style m_typeList; // What is the style of the current list (undefined, if we are not in a list) @@ -118,9 +118,9 @@ private: #endif }; -bool ASCIIWorker::doOpenFile(const QString& filenameOut, const QString& /*to*/) +bool ASCIIWorker::doOpenFile(const TQString& filenameOut, const TQString& /*to*/) { - m_ioDevice = new QFile(filenameOut); + m_ioDevice = TQT_TQIODEVICE(new TQFile(filenameOut)); if (!m_ioDevice) { @@ -134,7 +134,7 @@ bool ASCIIWorker::doOpenFile(const QString& filenameOut, const QString& /*to*/) return false; } - m_streamOut = new QTextStream(m_ioDevice); + m_streamOut = new TQTextStream(m_ioDevice); if (!m_streamOut) { kdError(30502) << "Could not create output stream! Aborting!" << endl; @@ -146,7 +146,7 @@ bool ASCIIWorker::doOpenFile(const QString& filenameOut, const QString& /*to*/) if (!getCodec()) { - kdError(30502) << "Could not create QTextCodec! Aborting" << endl; + kdError(30502) << "Could not create TQTextCodec! Aborting" << endl; return false; } @@ -177,7 +177,7 @@ bool ASCIIWorker::doCloseDocument(void) { *m_streamOut << m_eol; int noteNumber = 1; - for (QStringList::Iterator it = m_automaticNotes.begin(); it != m_automaticNotes.end(); ++it) + for (TQStringList::Iterator it = m_automaticNotes.begin(); it != m_automaticNotes.end(); ++it) { *m_streamOut << "[" << noteNumber << "] " << *it; noteNumber++; @@ -190,9 +190,9 @@ bool ASCIIWorker::doCloseDocument(void) return true; } -bool ASCIIWorker::doFullParagraphList(const QValueList<ParaData>& paraList) +bool ASCIIWorker::doFullParagraphList(const TQValueList<ParaData>& paraList) { - for (QValueList<ParaData>::ConstIterator it = paraList.begin(); + for (TQValueList<ParaData>::ConstIterator it = paraList.begin(); it != paraList.end(); it++) { @@ -204,10 +204,10 @@ bool ASCIIWorker::doFullParagraphList(const QValueList<ParaData>& paraList) bool ASCIIWorker::doFullParagraph(const ParaData& para) { - return doFullParagraph(para.text, para.layout, para.formattingList); + return doFullParagraph(para.text, para.tqlayout, para.formattingList); } -bool ASCIIWorker::doFullParagraph(const QString& paraText, const LayoutData& layout, +bool ASCIIWorker::doFullParagraph(const TQString& paraText, const LayoutData& tqlayout, const ValueListFormatData& paraFormatDataList) { kdDebug(30502) << "Entering ASCIIWorker::doFullParagraph" << endl; @@ -216,15 +216,15 @@ bool ASCIIWorker::doFullParagraph(const QString& paraText, const LayoutData& lay // As KWord has only one depth of lists, we can process lists very simply. // -- // Not anymore - Clarence - if ( layout.counter.numbering == CounterData::NUM_LIST ) + if ( tqlayout.counter.numbering == CounterData::NUM_LIST ) { // Are we still in a list of the right type? - if (!m_inList || (layout.counter.style!=m_typeList)) + if (!m_inList || (tqlayout.counter.style!=m_typeList)) { // We are not yet part of a list m_inList=true; m_counterList=1; // Start numbering - m_typeList=layout.counter.style; + m_typeList=tqlayout.counter.style; } switch (m_typeList) @@ -265,24 +265,24 @@ bool ASCIIWorker::doFullParagraph(const QString& paraText, const LayoutData& lay case CounterData::STYLE_CUSTOM: { m_orderedList=true; - *m_streamOut << QString::number(m_counterList,10); + *m_streamOut << TQString::number(m_counterList,10); break; } case CounterData::STYLE_ALPHAB_L: { m_orderedList=true; - QString strTemp; + TQString strTemp; for (int i=m_counterList;i>0;i/=26) - strTemp=QChar(0x40+i%26)+strTemp; // Lower alpha + strTemp=TQChar(0x40+i%26)+strTemp; // Lower alpha *m_streamOut << strTemp; break; } case CounterData::STYLE_ALPHAB_U: { m_orderedList=true; - QString strTemp; + TQString strTemp; for (int i=m_counterList;i>0;i/=26) - strTemp=QChar(0x40+i%26)+strTemp; // Lower alpha + strTemp=TQChar(0x40+i%26)+strTemp; // Lower alpha *m_streamOut << strTemp; break; } @@ -290,14 +290,14 @@ bool ASCIIWorker::doFullParagraph(const QString& paraText, const LayoutData& lay { // For now, we do not support lower-case Roman numbering (TODO) m_orderedList=true; - *m_streamOut << QString::number(m_counterList,10); + *m_streamOut << TQString::number(m_counterList,10); break; } case CounterData::STYLE_ROM_NUM_U: { // For now, we do not support upper-case Roman numbering (TODO) m_orderedList=true; - *m_streamOut << QString::number(m_counterList,10); + *m_streamOut << TQString::number(m_counterList,10); break; } } @@ -307,26 +307,26 @@ bool ASCIIWorker::doFullParagraph(const QString& paraText, const LayoutData& lay else { m_inList=false; // Close an eventual list - if ( layout.counter.numbering == CounterData::NUM_CHAPTER ) + if ( tqlayout.counter.numbering == CounterData::NUM_CHAPTER ) { - if (!layout.counter.depth) + if (!tqlayout.counter.depth) { // HEAD 1 *m_streamOut << "###################################" << m_eol; *m_streamOut << "# "; ProcessParagraphData ( paraText, paraFormatDataList); *m_streamOut << "###################################" << m_eol; } - else if (layout.counter.depth==1) + else if (tqlayout.counter.depth==1) { // HEAD 2 *m_streamOut << "#### "; ProcessParagraphData ( paraText, paraFormatDataList); } - else if (layout.counter.depth==2) + else if (tqlayout.counter.depth==2) { // HEAD 3 *m_streamOut << "## "; ProcessParagraphData ( paraText, paraFormatDataList); } - else if (layout.counter.depth==3) + else if (tqlayout.counter.depth==3) { // HEAD 4 *m_streamOut << "# "; ProcessParagraphData ( paraText, paraFormatDataList); @@ -342,8 +342,8 @@ bool ASCIIWorker::doFullParagraph(const QString& paraText, const LayoutData& lay } } #else - if (!layout.counter.text.isEmpty()) - *m_streamOut << layout.counter.text << " "; + if (!tqlayout.counter.text.isEmpty()) + *m_streamOut << tqlayout.counter.text << " "; if (!ProcessParagraphData(paraText, paraFormatDataList)) return false; #endif @@ -357,8 +357,8 @@ bool ASCIIWorker::ProcessTable(const Table& table) { kdDebug(30502) << "processTable CALLED!" << endl; - // just dump the table out (no layout for now) - for (QValueList<TableCell>::ConstIterator it = table.cellList.begin(); + // just dump the table out (no tqlayout for now) + for (TQValueList<TableCell>::ConstIterator it = table.cellList.begin(); it != table.cellList.end(); it++) { @@ -371,7 +371,7 @@ bool ASCIIWorker::ProcessTable(const Table& table) // ProcessParagraphData () mangles the pure text through the // formatting information stored in the FormatData list and prints it // out to the export file. -bool ASCIIWorker::ProcessParagraphData(const QString& paraText, +bool ASCIIWorker::ProcessParagraphData(const TQString& paraText, const ValueListFormatData& paraFormatDataList) { bool lastSegmentWasText = true; @@ -390,8 +390,8 @@ bool ASCIIWorker::ProcessParagraphData(const QString& paraText, { case 1: // Normal text { - QString strText(paraText.mid((*paraFormatDataIt).pos,(*paraFormatDataIt).len)); - strText = strText.replace(QChar(10), m_eol, true); + TQString strText(paraText.mid((*paraFormatDataIt).pos,(*paraFormatDataIt).len)); + strText = strText.tqreplace(TQChar(10), m_eol, true); *m_streamOut << strText; break; } @@ -400,16 +400,16 @@ bool ASCIIWorker::ProcessParagraphData(const QString& paraText, if (11==(*paraFormatDataIt).variable.m_type) { // Footnote - QString value = (*paraFormatDataIt).variable.getFootnoteValue(); + TQString value = (*paraFormatDataIt).variable.getFootnoteValue(); bool automatic = (*paraFormatDataIt).variable.getFootnoteAuto(); - QValueList<ParaData> *paraList = (*paraFormatDataIt).variable.getFootnotePara(); + TQValueList<ParaData> *paraList = (*paraFormatDataIt).variable.getFootnotePara(); if (paraList) { - QString notestr; - QValueList<ParaData>::ConstIterator it; - QValueList<ParaData>::ConstIterator end(paraList->end()); + TQString notestr; + TQValueList<ParaData>::ConstIterator it; + TQValueList<ParaData>::ConstIterator end(paraList->end()); for (it=paraList->begin();it!=end;++it) - notestr += (*it).text.stripWhiteSpace().replace(QChar(10), m_eol, true) + m_eol; + notestr += (*it).text.stripWhiteSpace().tqreplace(TQChar(10), m_eol, true) + m_eol; *m_streamOut << "["; if (automatic) { @@ -469,12 +469,12 @@ bool ASCIIWorker::ProcessParagraphData(const QString& paraText, } -ASCIIExport::ASCIIExport(KoFilter*, const char*, const QStringList&) +ASCIIExport::ASCIIExport(KoFilter*, const char*, const TQStringList&) : KoFilter() { } -KoFilter::ConversionStatus ASCIIExport::convert(const QCString& from, const QCString& to) +KoFilter::ConversiontqStatus ASCIIExport::convert(const TQCString& from, const TQCString& to) { if (to != "text/plain" || from != "application/x-kword") { @@ -504,11 +504,11 @@ KoFilter::ConversionStatus ASCIIExport::convert(const QCString& from, const QCSt delete dialog; return KoFilter::StupidError; } - QTextCodec* codec; + TQTextCodec* codec; if (dialog) codec = dialog->getCodec(); else - codec = QTextCodec::codecForName("UTF-8"); + codec = TQTextCodec::codecForName("UTF-8"); if ( !codec ) { @@ -534,7 +534,7 @@ KoFilter::ConversionStatus ASCIIExport::convert(const QCString& from, const QCSt return KoFilter::StupidError; } - KoFilter::ConversionStatus result = leader->convert(m_chain,from,to); + KoFilter::ConversiontqStatus result = leader->convert(m_chain,from,to); delete leader; delete worker; diff --git a/filters/kword/ascii/asciiexport.h b/filters/kword/ascii/asciiexport.h index 7259c1d8..88db0c8f 100644 --- a/filters/kword/ascii/asciiexport.h +++ b/filters/kword/ascii/asciiexport.h @@ -25,12 +25,13 @@ class ASCIIExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - ASCIIExport(KoFilter* parent, const char* name, const QStringList&); + ASCIIExport(KoFilter* tqparent, const char* name, const TQStringList&); virtual ~ASCIIExport() {} - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; #endif // ASCIIEXPORT_H diff --git a/filters/kword/ascii/asciiimport.cc b/filters/kword/ascii/asciiimport.cc index 561daf1e..ceb93582 100644 --- a/filters/kword/ascii/asciiimport.cc +++ b/filters/kword/ascii/asciiimport.cc @@ -25,14 +25,14 @@ #include <unistd.h> #endif -#include <qobject.h> -#include <qstring.h> -// #include <qregexp.h> // Currently not needed (due to disabled code) -#include <qtextcodec.h> -#include <qfile.h> -#include <qtextstream.h> -#include <qdom.h> -#include <qfontinfo.h> +#include <tqobject.h> +#include <tqstring.h> +// #include <tqregexp.h> // Currently not needed (due to disabled code) +#include <tqtextcodec.h> +#include <tqfile.h> +#include <tqtextstream.h> +#include <tqdom.h> +#include <tqfontinfo.h> #include <kdebug.h> #include <kglobal.h> @@ -62,11 +62,11 @@ protected: K_EXPORT_COMPONENT_FACTORY( libasciiimport, ASCIIImportFactory() ) -ASCIIImport::ASCIIImport(KoFilter *, const char *, const QStringList &) : +ASCIIImport::ASCIIImport(KoFilter *, const char *, const TQStringList &) : KoFilter() { } -void ASCIIImport::prepareDocument(QDomDocument& mainDocument, QDomElement& mainFramesetElement) +void ASCIIImport::prepareDocument(TQDomDocument& mainDocument, TQDomElement& mainFramesetElement) { // TODO: other paper formats KoFormat paperFormat=PG_DIN_A4; // ISO A4 @@ -76,7 +76,7 @@ void ASCIIImport::prepareDocument(QDomDocument& mainDocument, QDomElement& mainF mainDocument.createProcessingInstruction( "xml","version=\"1.0\" encoding=\"UTF-8\"")); - QDomElement elementDoc; + TQDomElement elementDoc; elementDoc=mainDocument.createElement("DOC"); elementDoc.setAttribute("editor","KWord's Plain Text Import Filter"); elementDoc.setAttribute("mime","application/x-kword"); @@ -84,7 +84,7 @@ void ASCIIImport::prepareDocument(QDomDocument& mainDocument, QDomElement& mainF elementDoc.setAttribute("syntaxVersion",2); mainDocument.appendChild(elementDoc); - QDomElement element; + TQDomElement element; element=mainDocument.createElement("ATTRIBUTES"); element.setAttribute("processing",0); element.setAttribute("standardpage",1); @@ -93,7 +93,7 @@ void ASCIIImport::prepareDocument(QDomDocument& mainDocument, QDomElement& mainF //element.setAttribute("unit","mm"); // use KWord default instead elementDoc.appendChild(element); - QDomElement elementPaper=mainDocument.createElement("PAPER"); + TQDomElement elementPaper=mainDocument.createElement("PAPER"); elementPaper.setAttribute("format",paperFormat); elementPaper.setAttribute("width" ,KoPageFormat::width (paperFormat,paperOrientation) * 72.0 / 25.4); elementPaper.setAttribute("height",KoPageFormat::height(paperFormat,paperOrientation) * 72.0 / 25.4); @@ -114,7 +114,7 @@ void ASCIIImport::prepareDocument(QDomDocument& mainDocument, QDomElement& mainF element.setAttribute("bottom",42); elementPaper.appendChild(element); - QDomElement framesetsPluralElementOut=mainDocument.createElement("FRAMESETS"); + TQDomElement framesetsPluralElementOut=mainDocument.createElement("FRAMESETS"); mainDocument.documentElement().appendChild(framesetsPluralElementOut); mainFramesetElement=mainDocument.createElement("FRAMESET"); @@ -125,7 +125,7 @@ void ASCIIImport::prepareDocument(QDomDocument& mainDocument, QDomElement& mainF // TODO: "name" attribute (needs I18N) framesetsPluralElementOut.appendChild(mainFramesetElement); - QDomElement frameElementOut=mainDocument.createElement("FRAME"); + TQDomElement frameElementOut=mainDocument.createElement("FRAME"); frameElementOut.setAttribute("left",28); frameElementOut.setAttribute("top",42); frameElementOut.setAttribute("bottom",566); @@ -133,10 +133,10 @@ void ASCIIImport::prepareDocument(QDomDocument& mainDocument, QDomElement& mainF frameElementOut.setAttribute("runaround",1); mainFramesetElement.appendChild(frameElementOut); - QDomElement elementStylesPlural=mainDocument.createElement("STYLES"); + TQDomElement elementStylesPlural=mainDocument.createElement("STYLES"); elementDoc.appendChild(elementStylesPlural); - QDomElement elementStyleStandard=mainDocument.createElement("STYLE"); + TQDomElement elementStyleStandard=mainDocument.createElement("STYLE"); elementStylesPlural.appendChild(elementStyleStandard); element=mainDocument.createElement("NAME"); @@ -147,11 +147,11 @@ void ASCIIImport::prepareDocument(QDomDocument& mainDocument, QDomElement& mainF element.setAttribute("name","Standard"); elementStyleStandard.appendChild(element); - QDomElement elementFormat=mainDocument.createElement("FORMAT"); + TQDomElement elementFormat=mainDocument.createElement("FORMAT"); elementStyleStandard.appendChild(elementFormat); - // Use QFontInfo, as it does not give back -1 as point size. - QFontInfo defaultFontInfo(KoGlobal::defaultFont()); + // Use TQFontInfo, as it does not give back -1 as point size. + TQFontInfo defaultFontInfo(KoGlobal::defaultFont()); element=mainDocument.createElement("FONT"); element.setAttribute("name",defaultFontInfo.family()); @@ -195,7 +195,7 @@ void ASCIIImport::prepareDocument(QDomDocument& mainDocument, QDomElement& mainF } -KoFilter::ConversionStatus ASCIIImport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus ASCIIImport::convert( const TQCString& from, const TQCString& to ) { if (to!="application/x-kword" || from!="text/plain") return KoFilter::NotImplemented; @@ -216,7 +216,7 @@ KoFilter::ConversionStatus ASCIIImport::convert( const QCString& from, const QCS } } - QTextCodec* codec; + TQTextCodec* codec; int paragraphStrategy; if (dialog) { @@ -226,29 +226,29 @@ KoFilter::ConversionStatus ASCIIImport::convert( const QCString& from, const QCS } else { - codec = QTextCodec::codecForName("UTF-8"); + codec = TQTextCodec::codecForName("UTF-8"); paragraphStrategy=0; } - QFile in(m_chain->inputFile()); + TQFile in(m_chain->inputFile()); if(!in.open(IO_ReadOnly)) { kdError(30502) << "Unable to open input file!" << endl; in.close(); return KoFilter::FileNotFound; } - QString tbl; // string for table XML + TQString tbl; // string for table XML - QDomDocument mainDocument; - QDomElement mainFramesetElement; + TQDomDocument mainDocument; + TQDomElement mainFramesetElement; prepareDocument(mainDocument,mainFramesetElement); - QTextStream stream(&in); + TQTextStream stream(&in); if (!codec) { - kdError(30502) << "Could not create QTextCodec! Aborting" << endl; + kdError(30502) << "Could not create TQTextCodec! Aborting" << endl; in.close(); return KoFilter::StupidError; } @@ -275,24 +275,24 @@ KoFilter::ConversionStatus ASCIIImport::convert( const QCString& from, const QCS in.close(); return KoFilter::StorageCreationError; } - QCString cstr=mainDocument.toCString(); - // WARNING: we cannot use KoStore::write(const QByteArray&) because it gives an extra NULL character at the end. + TQCString cstr=mainDocument.toCString(); + // WARNING: we cannot use KoStore::write(const TQByteArray&) because it gives an extra NULL character at the end. out->writeBlock(cstr,cstr.length()); in.close(); return KoFilter::OK; } -void ASCIIImport::oldWayConvert(QTextStream& stream, QDomDocument& mainDocument, - QDomElement& mainFramesetElement) +void ASCIIImport::oldWayConvert(TQTextStream& stream, TQDomDocument& mainDocument, + TQDomElement& mainFramesetElement) { kdDebug(30502) << "Entering: ASCIIImport::oldWayConvert" << endl; - QStringList paragraph; // lines of the paragraph + TQStringList paragraph; // lines of the paragraph int linecount = 0; // line counter used to position tables //int table_no = 0; // used for table identifiers int numLines; // Number of lines of the paragraph bool lastCharWasCr=false; // Was the previous character a Carriage Return? - QString strLine; + TQString strLine; while(!stream.atEnd()) { paragraph.clear(); @@ -300,19 +300,19 @@ void ASCIIImport::oldWayConvert(QTextStream& stream, QDomDocument& mainDocument, for(int line_no = numLines = 0; line_no < MAXLINES; line_no++, numLines++) { // We need to read a line - // NOTE: we cannot use QStreamText::readLine, + // NOTE: we cannot use TQStreamText::readLine, // as it does not know anything about Carriage Returns strLine=readLine(stream,lastCharWasCr); if (strLine.isEmpty()) { - paragraph.append(QString::null); + paragraph.append(TQString()); break; } const int length = strLine.length(); - if (strLine.at(length-1) == '-') + if (strLine.tqat(length-1) == '-') // replace the hard hyphen - at line end by a soft hyphen - strLine.at(length-1)=QChar(173); + strLine.tqat(length-1)=TQChar(173); else strLine += ' '; // add space to end of line @@ -350,13 +350,13 @@ void ASCIIImport::oldWayConvert(QTextStream& stream, QDomDocument& mainDocument, #endif } -void ASCIIImport::asIsConvert(QTextStream& stream, QDomDocument& mainDocument, - QDomElement& mainFramesetElement) +void ASCIIImport::asIsConvert(TQTextStream& stream, TQDomDocument& mainDocument, + TQDomElement& mainFramesetElement) // Paragraph strategy: one line, one paragraph { kdDebug(30502) << "Entering: ASCIIImport::asIsConvert" << endl; bool lastCharWasCr=false; // Was the previous character a Carriage Return? - QString strLine; + TQString strLine; while(!stream.atEnd()) { // Read one line and consider it being a paragraph @@ -366,27 +366,27 @@ void ASCIIImport::asIsConvert(QTextStream& stream, QDomDocument& mainDocument, } } -void ASCIIImport::sentenceConvert(QTextStream& stream, QDomDocument& mainDocument, - QDomElement& mainFramesetElement) +void ASCIIImport::sentenceConvert(TQTextStream& stream, TQDomDocument& mainDocument, + TQDomElement& mainFramesetElement) // Strategy: // - end a paragraph when a line ends with a point or similar punctuation. -// - search the punctuation at the end of the line, even if the sentence is quoted or in parentheses. +// - search the punctuation at the end of the line, even if the sentence is quoted or in tqparentheses. // - an empty line also ends the paragraph // TODO/FIXME: we have a little problem with empty lines. Perhaps we should not allow empty paragraphs! { kdDebug(30502) << "Entering: ASCIIImport::sentenceConvert" << endl; - QStringList paragraph; // lines of the paragraph + TQStringList paragraph; // lines of the paragraph bool lastCharWasCr=false; // Was the previous character a Carriage Return? - QString strLine; - QString stoppingPunctuation(".!?"); - QString skippingQuotes("\"')"); + TQString strLine; + TQString stoppingPunctuation(".!?"); + TQString skippingQuotes("\"')"); while (!stream.atEnd()) { paragraph.clear(); for(;;) { // We need to read a line - // NOTE: we cannot use QStreamText::readLine, + // NOTE: we cannot use TQStreamText::readLine, // as it does not know anything about Carriage Returns strLine=readLine(stream,lastCharWasCr); if (strLine.isEmpty()) @@ -397,14 +397,14 @@ void ASCIIImport::sentenceConvert(QTextStream& stream, QDomDocument& mainDocumen paragraph.append(strLine); uint lastPos=strLine.length()-1; - QChar lastChar; + TQChar lastChar; // Skip a maximum of 10 quotes (or similar) at the end of the line for (int i=0;i<10;i++) { lastChar=strLine[lastPos]; if (lastChar.isNull()) break; - else if (skippingQuotes.find(lastChar)==-1) + else if (skippingQuotes.tqfind(lastChar)==-1) break; else lastPos--; @@ -413,7 +413,7 @@ void ASCIIImport::sentenceConvert(QTextStream& stream, QDomDocument& mainDocumen lastChar=strLine[lastPos]; if (lastChar.isNull()) continue; - else if (stoppingPunctuation.find(lastChar)!=-1) + else if (stoppingPunctuation.tqfind(lastChar)!=-1) break; } #if 1 @@ -426,13 +426,13 @@ void ASCIIImport::sentenceConvert(QTextStream& stream, QDomDocument& mainDocumen } // while(!eof) } -void ASCIIImport::processParagraph(QDomDocument& mainDocument, - QDomElement& mainFramesetElement, const QStringList& paragraph) +void ASCIIImport::processParagraph(TQDomDocument& mainDocument, + TQDomElement& mainFramesetElement, const TQStringList& paragraph) { // Paragraph with no tables or lists - QString text; - QStringList::ConstIterator it=paragraph.begin(); // Current line (at start, the first one) - QStringList::ConstIterator previousLine=it; // The previous one (at start, also the first one) + TQString text; + TQStringList::ConstIterator it=paragraph.begin(); // Current line (at start, the first one) + TQStringList::ConstIterator previousLine=it; // The previous one (at start, also the first one) int firstindent=Indent(*it); // We work with one line in advance (therefore the two it++) @@ -450,7 +450,7 @@ void ASCIIImport::processParagraph(QDomDocument& mainDocument, "Standard", text.simplifyWhiteSpace(), firstindent, secondindent); firstindent = Indent(*it); - text = QString::null; // reinitialize paragraph text + text = TQString(); // reinitialize paragraph text } } previousLine=it; @@ -461,32 +461,32 @@ void ASCIIImport::processParagraph(QDomDocument& mainDocument, "Standard", text.simplifyWhiteSpace(), firstindent, secondindent); } -void ASCIIImport::writeOutParagraph(QDomDocument& mainDocument, - QDomElement& mainFramesetElement, const QString& name, - const QString& text, const int firstindent, const int secondindent) +void ASCIIImport::writeOutParagraph(TQDomDocument& mainDocument, + TQDomElement& mainFramesetElement, const TQString& name, + const TQString& text, const int firstindent, const int secondindent) { - QDomElement paragraphElementOut=mainDocument.createElement("PARAGRAPH"); + TQDomElement paragraphElementOut=mainDocument.createElement("PARAGRAPH"); mainFramesetElement.appendChild(paragraphElementOut); - QDomElement textElement=mainDocument.createElement("TEXT"); + TQDomElement textElement=mainDocument.createElement("TEXT"); paragraphElementOut.appendChild(textElement); - //QDomElement formatsPluralElementOut=mainDocument.createElement("FORMATS"); + //TQDomElement formatsPluralElementOut=mainDocument.createElement("FORMATS"); //paragraphElementOut.appendChild(formatsPluralElementOut); - QDomElement layoutElement=mainDocument.createElement("LAYOUT"); - paragraphElementOut.appendChild(layoutElement); + TQDomElement tqlayoutElement=mainDocument.createElement("LAYOUT"); + paragraphElementOut.appendChild(tqlayoutElement); - QDomElement element; + TQDomElement element; element=mainDocument.createElement("NAME"); element.setAttribute("value",name); - layoutElement.appendChild(element); + tqlayoutElement.appendChild(element); double size; element=mainDocument.createElement("INDENTS"); size = firstindent-secondindent; size *= ptsperchar; // convert indent spaces to points - element.setAttribute("first",QString::number(size)); + element.setAttribute("first",TQString::number(size)); size = secondindent; size *= ptsperchar; // convert indent spaces to points - element.setAttribute("left",QString::number(size)); + element.setAttribute("left",TQString::number(size)); element.setAttribute("right",0); textElement.appendChild(mainDocument.createTextNode(text)); @@ -518,18 +518,18 @@ void ASCIIImport::writeOutParagraph(QDomDocument& mainDocument, /* The Indent method determines the equivalent number of spaces at the beginning of a line */ -int ASCIIImport::Indent(const QString& line) const +int ASCIIImport::Indent(const TQString& line) const { - QChar c; // for reading string a character at a time + TQChar c; // for reading string a character at a time int count=0; // amount of white space at the begining of the line for( uint i = 0; i < line.length(); i++ ) { c = line.at(i); - if( c == QChar(' ')) + if( c == TQChar(' ')) count++; - else if( c == QChar('\t')) + else if( c == TQChar('\t')) count += spacespertab; else break; @@ -547,52 +547,52 @@ int ASCIIImport::Indent(const QString& line) const int row - row number int col - column number Position *pos - pointer to the table position - QString str - the output string. + TQString str - the output string. Returns - void */ #if 0 void ASCIIImport::WriteOutTableCell( int table_no, int row, - int col, Position *pos, QString &str) + int col, Position *pos, TQString &str) { str += "<FRAMESET frameType=\"1\" frameInfo=\"0\" grpMgr=\"grpmgr_"; - QString buf = QString::number(table_no); // convert int to string + TQString buf = TQString::number(table_no); // convert int to string str += buf; str += "\" row=\""; - buf = QString::number(row); // convert row to string + buf = TQString::number(row); // convert row to string str += buf; str += "\" col=\""; - buf = QString::number(col); // convert col to string + buf = TQString::number(col); // convert col to string str += buf; str += "\" rows=\"1\" cols=\"1\" removable=\"0\" visible=\"1\" name=\"Cell "; - buf = QString::number(row); // convert row to string + buf = TQString::number(row); // convert row to string str += buf; str += ","; - buf = QString::number(col); // convert col to string + buf = TQString::number(col); // convert col to string str += buf; str += "\">\n"; str += "<FRAME left=\""; - buf = QString::number(pos->left); // convert left coordinate to string + buf = TQString::number(pos->left); // convert left coordinate to string str += buf; str += "\" top=\""; - buf = QString::number(pos->top); // convert top coordinate to string + buf = TQString::number(pos->top); // convert top coordinate to string str += buf; str += "\" right=\""; - buf = QString::number(pos->right); // convert right coordinate to string + buf = TQString::number(pos->right); // convert right coordinate to string str += buf; str += "\" bottom=\""; - buf = QString::number(pos->bottom); // convert bottom coordinate to string + buf = TQString::number(pos->bottom); // convert bottom coordinate to string str += buf; str += "\" runaround=\"0\" autoCreateNewFrame=\"0\" newFrameBehavior=\"1\" />\n"; @@ -604,8 +604,8 @@ int ASCIIImport::Indent(const QString& line) const -bool ASCIIImport::Table( QString *Line, int *linecount, int no_lines, - int table_no, QString &tbl, QString &str ) +bool ASCIIImport::Table( TQString *Line, int *linecount, int no_lines, + int table_no, TQString &tbl, TQString &str ) { return false; // this method is disabled @@ -615,22 +615,22 @@ bool ASCIIImport::Table( QString *Line, int *linecount, int no_lines, check for embedded bullet or dash lists which is a seperate method. Arguments - QString *Line - pointer to the array of text lines in the paragraph. + TQString *Line - pointer to the array of text lines in the paragraph. int *linecount - pointer to the line counter used to position tables int no_lines - the number of lines in the paragraph int *table_no - pointer to the table number counter - QString str - the output string + TQString str - the output string Returns - enum value indicating wheterer a table was processed. */ enum LiType{paragraph, table} linetype[MAXLINES]; struct Tabs tabs[MAXLINES]; // array of structures for tables struct Position pos; // struct to pass cell position int width[MAXCOLUMNS]; // array of column widths - QString *currentline; // pointer to the current line - QString *beginline; // pointer to the beginning line - QString text; // text buffer - QString text1; // another text buffer - QString No_indents; // Line with leading white space removed + TQString *currentline; // pointer to the current line + TQString *beginline; // pointer to the beginning line + TQString text; // text buffer + TQString text1; // another text buffer + TQString No_indents; // Line with leading white space removed int index, index1, index2, index3; // used to define column positions in a line int no_cols; // column counter @@ -639,7 +639,7 @@ bool ASCIIImport::Table( QString *Line, int *linecount, int no_lines, int i; // counter int j; // counter int k; // counter - QString *firstline; + TQString *firstline; firstline = Line; int begin = 0; // beginning line number int tabcount = 0; // counts tab characters @@ -655,16 +655,16 @@ bool ASCIIImport::Table( QString *Line, int *linecount, int no_lines, { // save and remove tabs at beginning of the line text = *Line; // copy - Line->remove(QRegExp("^[\\ \t]*")); + Line->remove(TQRegExp("^[\\ \t]*")); } // find column positions and record text fields - while((index2 = Line->find( QRegExp("\t"),index)) > index + while((index2 = Line->tqfind( TQRegExp("\t"),index)) > index || (index3 = MultSpaces( *Line, index)) > index ) { index1 = kMax(index2, index3); if( index2 > index3) - index1 = Line->find( QRegExp("[^\t]"), index1); + index1 = Line->tqfind( TQRegExp("[^\t]"), index1); tabcount++; tabs[i].field[no_cols] = Line->mid(index, (index1 - index -1)); tabs[i].width[no_cols] = index1 - index + spacespertab - 1; @@ -733,7 +733,7 @@ bool ASCIIImport::Table( QString *Line, int *linecount, int no_lines, beginline++; // increment pointer } // process the white space to eliminate unwanted spaces - QString text1 = text.simplifyWhiteSpace(); + TQString text1 = text.simplifyWhiteSpace(); WriteOutParagraph( "Standard", "", text1 , firstindent, secondindent, str); *linecount += (i - begin); @@ -786,11 +786,11 @@ bool ASCIIImport::Table( QString *Line, int *linecount, int no_lines, #endif // the following method finds the location of multiple spaces in a string -int ASCIIImport::MultSpaces(const QString& text, const int index) const +int ASCIIImport::MultSpaces(const TQString& text, const int index) const { - QChar c; - QChar lastchar = 'c'; // previous character - initialize non blank + TQChar c; + TQChar lastchar = 'c'; // previous character - initialize non blank bool found = false; // kdDebug(30502) << "length = " << text.length() << endl; for (uint i = index; i < text.length(); i++) @@ -807,25 +807,25 @@ int ASCIIImport::MultSpaces(const QString& text, const int index) const } // MultSpaces #if 0 - bool ASCIIImport::ListItem( QString *Line, int no_lines, - QString &str ) + bool ASCIIImport::ListItem( TQString *Line, int no_lines, + TQString &str ) { /* This method examines a paragraph for embedded lists. If none are found, it returns. If lists are found then it writes out the paragraph including the lists. Arguments - QString *Line - pointer to the array of text lines in the paragraph. + TQString *Line - pointer to the array of text lines in the paragraph. int *linecount - pointer to the line counter used to position tables int no_lines - the number of lines in the paragraph - QString &str - the output string + TQString &str - the output string Returns - bool value indicating whether a list item was processed. */ - QString *currentline; // pointer to the current line + TQString *currentline; // pointer to the current line enum Listtype{none, bullet, dash} listtype[MAXLINES]; - QString type; // type of list - bullet or dash - QString *firstline; + TQString type; // type of list - bullet or dash + TQString *firstline; int i; // counter int firstindent; int secondindent; @@ -839,13 +839,13 @@ int ASCIIImport::MultSpaces(const QString& text, const int index) const listtype[i] = none; // initialize // check for a bullet list item - if( IsListItem( *Line, QChar('*'))) + if( IsListItem( *Line, TQChar('*'))) { listtype[i] = bullet; listcount++; } // check for a dash list item - if( IsListItem( *Line, QChar('-'))) + if( IsListItem( *Line, TQChar('-'))) { listtype[i] = dash; listcount++; @@ -858,7 +858,7 @@ int ASCIIImport::MultSpaces(const QString& text, const int index) const // check for at least one list if( listcount == 0) return false; - QString text = ""; // initialize a null string for paragraph text + TQString text = ""; // initialize a null string for paragraph text Line = firstline; // reset the line pointer for( i = 0; i < no_lines; i++) @@ -872,13 +872,13 @@ int ASCIIImport::MultSpaces(const QString& text, const int index) const { type = "6"; // delete * at beginning of line - text.remove( QRegExp("^[ \t]*\\* ") ); + text.remove( TQRegExp("^[ \t]*\\* ") ); } else if( listtype[begin] == dash) // write out a dash list { type = "7"; // delete - at beginning of line - text.remove( QRegExp("^[ \t]*\\- ") ); + text.remove( TQRegExp("^[ \t]*\\- ") ); } else if( listtype[begin] == none) // write out a paragraph type = ""; @@ -894,7 +894,7 @@ int ASCIIImport::MultSpaces(const QString& text, const int index) const else secondindent = 0; // process the white space to eliminate unwanted spaces - QString text1 = text.simplifyWhiteSpace(); + TQString text1 = text.simplifyWhiteSpace(); WriteOutParagraph( "Standard", type, text1 , firstindent, secondindent, str); begin = i; @@ -916,13 +916,13 @@ int ASCIIImport::MultSpaces(const QString& text, const int index) const { type = "6"; // delete * at beginning of line - text.replace( QRegExp("^[ \t]*\\* "), ""); + text.tqreplace( TQRegExp("^[ \t]*\\* "), ""); } else if( listtype[begin] == dash) // write out a dash list { type = "7"; // delete - at beginning of line - text.replace( QRegExp("^[ \t]*\\- "), ""); + text.tqreplace( TQRegExp("^[ \t]*\\- "), ""); } else if( listtype[begin] == none) // write out a paragraph type = ""; @@ -938,7 +938,7 @@ int ASCIIImport::MultSpaces(const QString& text, const int index) const else secondindent = 0; // process the white space to eliminate unwanted spaces - QString text1 = text.simplifyWhiteSpace(); + TQString text1 = text.simplifyWhiteSpace(); WriteOutParagraph( "Standard", type, text1 , firstindent, secondindent, str); @@ -951,21 +951,21 @@ int ASCIIImport::MultSpaces(const QString& text, const int index) const the text appears to be a list item (bullet or dash). Arguments - QString FirstLine the first line of text in a paragraph - QChar mark the mark - or * that indicates a list item + TQString FirstLine the first line of text in a paragraph + TQChar mark the mark - or * that indicates a list item Return true if the line appears as a list item, false if not. */ -bool ASCIIImport::IsListItem( QString FirstLine, QChar mark ) +bool ASCIIImport::IsListItem( TQString FirstLine, TQChar mark ) { int i; // counter - QChar c; // to stream into one character at a time + TQChar c; // to stream into one character at a time - int k = FirstLine.find(mark); + int k = FirstLine.tqfind(mark); if( k < 0) return false; // list item mark not on line @@ -981,21 +981,21 @@ bool ASCIIImport::IsListItem( QString FirstLine, QChar mark ) } // IsListItem -bool ASCIIImport::IsWhiteSpace(const QChar& c) const +bool ASCIIImport::IsWhiteSpace(const TQChar& c) const { - if ( c == QChar(' ') || c == QChar('\t') ) + if ( c == TQChar(' ') || c == TQChar('\t') ) return true; else return false; } // IsWhiteSpace -QString ASCIIImport::readLine(QTextStream& textstream, bool& lastCharWasCr) +TQString ASCIIImport::readLine(TQTextStream& textstream, bool& lastCharWasCr) { // We need to read a line, character by character - // NOTE: we cannot use QStreamText::readLine, + // NOTE: we cannot use TQStreamText::readLine, // as it does not know anything about Carriage Returns - QString strLine; - QChar ch; + TQString strLine; + TQChar ch; while (!textstream.atEnd()) { textstream >> ch; // Read one character diff --git a/filters/kword/ascii/asciiimport.h b/filters/kword/ascii/asciiimport.h index c8746eed..6d315879 100644 --- a/filters/kword/ascii/asciiimport.h +++ b/filters/kword/ascii/asciiimport.h @@ -24,10 +24,10 @@ #include <KoFilter.h> -class QString; -class QTextStream; -class QDomDocument; -class QDomElement; +class TQString; +class TQTextStream; +class TQDomDocument; +class TQDomElement; #define MAXLINES 1000 #define MAXCOLUMNS 15 @@ -43,7 +43,7 @@ class QDomElement; { int columns; int indent; - QString field[MAXCOLUMNS]; + TQString field[MAXCOLUMNS]; int width[MAXCOLUMNS]; }; @@ -58,45 +58,46 @@ class QDomElement; class ASCIIImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - ASCIIImport(KoFilter *parent, const char *name, const QStringList &); + ASCIIImport(KoFilter *tqparent, const char *name, const TQStringList &); ASCIIImport(); virtual ~ASCIIImport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); private: // not yet changed #if 0 void WriteOutTableCell( int table_no, int row, int col, Position *pos, - QString &str); + TQString &str); - bool Table( QString *Line, int *linecount, int no_lines, - int table_no, QString &tbl, QString &str ); + bool Table( TQString *Line, int *linecount, int no_lines, + int table_no, TQString &tbl, TQString &str ); - bool ListItem( QString *Line, int no_lines, - QString &str ); + bool ListItem( TQString *Line, int no_lines, + TQString &str ); #endif - bool IsListItem( QString FirstLine, QChar mark ); + bool IsListItem( TQString FirstLine, TQChar mark ); private: - void prepareDocument(QDomDocument& mainDocument, QDomElement& mainFramesetElement); - void processParagraph(QDomDocument& mainDocument, - QDomElement& mainFramesetElement, const QStringList& paragraph); - void writeOutParagraph(QDomDocument& mainDocument, - QDomElement& mainFramesetElement, const QString& name, - const QString& text, const int firstindent, const int secondindent); - int Indent(const QString& line) const; - int MultSpaces(const QString& text, const int index) const; - bool IsWhiteSpace(const QChar& c) const; - QString readLine(QTextStream& textstream, bool& lastCharWasCr); + void prepareDocument(TQDomDocument& mainDocument, TQDomElement& mainFramesetElement); + void processParagraph(TQDomDocument& mainDocument, + TQDomElement& mainFramesetElement, const TQStringList& paragraph); + void writeOutParagraph(TQDomDocument& mainDocument, + TQDomElement& mainFramesetElement, const TQString& name, + const TQString& text, const int firstindent, const int secondindent); + int Indent(const TQString& line) const; + int MultSpaces(const TQString& text, const int index) const; + bool IsWhiteSpace(const TQChar& c) const; + TQString readLine(TQTextStream& textstream, bool& lastCharWasCr); private: // converting functions - void oldWayConvert(QTextStream& stream, QDomDocument& mainDocument, - QDomElement& mainFramesetElement); - void asIsConvert(QTextStream& stream, QDomDocument& mainDocument, - QDomElement& mainFramesetElement); - void sentenceConvert(QTextStream& stream, QDomDocument& mainDocument, - QDomElement& mainFramesetElement); + void oldWayConvert(TQTextStream& stream, TQDomDocument& mainDocument, + TQDomElement& mainFramesetElement); + void asIsConvert(TQTextStream& stream, TQDomDocument& mainDocument, + TQDomElement& mainFramesetElement); + void sentenceConvert(TQTextStream& stream, TQDomDocument& mainDocument, + TQDomElement& mainFramesetElement); }; #endif // ASCIIIMPORT_H diff --git a/filters/kword/ascii/status.html b/filters/kword/ascii/status.html index 6b53717d..e8af7c5d 100644 --- a/filters/kword/ascii/status.html +++ b/filters/kword/ascii/status.html @@ -98,7 +98,7 @@ (Recommended strategy)<br> <b>Sentence:</b><br> - a paragraph ends when a line ends with a point or similar punctuation.<br> - - the punctuation is searched at the end of the line, even if the sentence is quoted or in parentheses.<br> + - the punctuation is searched at the end of the line, even if the sentence is quoted or in tqparentheses.<br> - an empty line also ends the paragraph.<br> <b>Old Way: (similar to KOffice 1.1.x)</b><br> - a paragraph ends at an empty line.<br> diff --git a/filters/kword/docbook/docbookexport.cc b/filters/kword/docbook/docbookexport.cc index 617c2d13..db9c754a 100644 --- a/filters/kword/docbook/docbookexport.cc +++ b/filters/kword/docbook/docbookexport.cc @@ -26,8 +26,8 @@ #include <docbookexport.moc> #include <kdebug.h> #include <kgenericfactory.h> -#include <qdir.h> -#include <qdom.h> +#include <tqdir.h> +#include <tqdom.h> #include <KoFilterChain.h> #include <KWEFStructures.h> @@ -41,7 +41,7 @@ K_EXPORT_COMPONENT_FACTORY( libdocbookexport, DocBookExportFactory( "kofficefilt DocBookExport::DocBookExport ( KoFilter *, const char *, - const QStringList & ) : KoFilter () + const TQStringList & ) : KoFilter () { } @@ -71,7 +71,7 @@ class DocBookWorker : public KWEFBaseWorker bool doOpenDocument ( void ); bool doCloseDocument ( void ); - bool doOpenFile ( const QString &, const QString & ); + bool doOpenFile ( const TQString &, const TQString & ); bool doCloseFile ( void ); bool doOpenBody ( void ); @@ -79,7 +79,7 @@ class DocBookWorker : public KWEFBaseWorker bool doFullDocumentInfo ( const KWEFDocumentInfo & ); - bool doFullDocument ( const QValueList<ParaData> ¶List ); + bool doFullDocument ( const TQValueList<ParaData> ¶List ); private: void ProcessPictureData ( const Picture &picture ); @@ -87,7 +87,7 @@ class DocBookWorker : public KWEFBaseWorker void ProcessTableData ( const Table &table ); void ProcessParagraphData ( const ParaData ¶, - QString tag ); + TQString tag ); void CloseItemizedList ( void ); void CloseEnumeratedList ( void ); @@ -101,10 +101,10 @@ class DocBookWorker : public KWEFBaseWorker void OpenArticleUnlessHead1 ( void ); - QString outputText; + TQString outputText; DocData docData; - QFile *fileOut; - QString exportFileName; + TQFile *fileOut; + TQString exportFileName; }; @@ -114,13 +114,13 @@ class DocBookWorker : public KWEFBaseWorker void DocBookWorker::ProcessPictureData ( const Picture &picture ) { - QByteArray byteArray; + TQByteArray byteArray; if ( loadSubFile ( picture.koStoreName,byteArray ) ) { - QFileInfo fileInfo (exportFileName); - QDir dir ( fileInfo.dirPath () ); - QString subDirName = fileInfo.fileName () + ".d"; + TQFileInfo fileInfo (exportFileName); + TQDir dir ( fileInfo.dirPath () ); + TQString subDirName = fileInfo.fileName () + ".d"; if ( !dir.exists (subDirName) ) { @@ -134,15 +134,15 @@ void DocBookWorker::ProcessPictureData ( const Picture &picture ) dir.mkdir ("pictures"); } - QString pictureFileName = dir.filePath (picture.koStoreName); + TQString pictureFileName = dir.filePath (picture.koStoreName); - QFile pictureFile (pictureFileName); + TQFile pictureFile (pictureFileName); if ( pictureFile.open (IO_WriteOnly) ) { pictureFile.writeBlock ( byteArray, byteArray.size () ); - QString pictureText; + TQString pictureText; #if TABLES_WITH_TITLES pictureText += "<FIGURE>\n"; @@ -191,7 +191,7 @@ void DocBookWorker::ProcessTableData ( const Table &table ) kdError (30507) << "DEBUG: ProcessTableData ()" << endl; #endif - QString tableText; + TQString tableText; #if TABLES_WITH_TITLES tableText += "<TABLE>\n"; @@ -205,12 +205,12 @@ void DocBookWorker::ProcessTableData ( const Table &table ) tableText += "<INFORMALTABLE>\n"; #endif - tableText += " <TGROUP COLS=\"" + QString::number (table.cols) + "\">\n"; + tableText += " <TGROUP COLS=\"" + TQString::number (table.cols) + "\">\n"; tableText += " <TBODY>\n"; int currentRow = -1; - QValueList<TableCell>::ConstIterator cellIt; + TQValueList<TableCell>::ConstIterator cellIt; for ( cellIt = table.cellList.begin (); cellIt != table.cellList.end (); @@ -228,7 +228,7 @@ void DocBookWorker::ProcessTableData ( const Table &table ) tableText += " <ROW>\n"; } - QString tmpBuf; + TQString tmpBuf; tmpBuf = outputText; outputText = ""; @@ -266,10 +266,10 @@ void DocBookWorker::ProcessTableData ( const Table &table ) // out to the export file. void DocBookWorker::ProcessParagraphData ( const ParaData ¶, - QString tag ) + TQString tag ) { #if !INSERT_TABLE_IN_PARA - QValueList<AnchoredInsert> tmpAnchoredInsertList; + TQValueList<AnchoredInsert> tmpAnchoredInsertList; #endif outputText += "<" + tag + ">"; @@ -296,12 +296,12 @@ void DocBookWorker::ProcessParagraphData ( const ParaData ¶, fixedFont = true; } - if ( (*formattingIt).text.italic && !para.layout.formatData.text.italic ) + if ( (*formattingIt).text.italic && !para.tqlayout.formatData.text.italic ) { outputText += "<EMPHASIS>"; } - if ( (*formattingIt).text.weight > para.layout.formatData.text.weight ) + if ( (*formattingIt).text.weight > para.tqlayout.formatData.text.weight ) { outputText += "<EMPHASIS ROLE=bold>"; } @@ -318,12 +318,12 @@ void DocBookWorker::ProcessParagraphData ( const ParaData ¶, outputText += "</LITERAL>"; } - if ( (*formattingIt).text.weight > para.layout.formatData.text.weight ) + if ( (*formattingIt).text.weight > para.tqlayout.formatData.text.weight ) { outputText += "</EMPHASIS>"; } - if ( (*formattingIt).text.italic && !para.layout.formatData.text.italic ) + if ( (*formattingIt).text.italic && !para.tqlayout.formatData.text.italic ) { outputText += "</EMPHASIS>"; } @@ -391,7 +391,7 @@ void DocBookWorker::ProcessParagraphData ( const ParaData ¶, outputText += "</" + tag + ">\n"; #if !INSERT_TABLE_IN_PARA - QValueList<AnchoredInsert>::Iterator anchoredInsert; + TQValueList<AnchoredInsert>::Iterator anchoredInsert; for ( anchoredInsert = tmpAnchoredInsertList.begin (); anchoredInsert != tmpAnchoredInsertList.end (); @@ -506,20 +506,20 @@ void DocBookWorker::OpenArticleUnlessHead1 ( void ) } -bool DocBookWorker::doFullDocument ( const QValueList<ParaData> ¶List ) +bool DocBookWorker::doFullDocument ( const TQValueList<ParaData> ¶List ) { #if 0 kdError (30507) << "doFullDocument () - Begin" << endl; #endif - QValueList<ParaData>::ConstIterator paraIt; - QValueList<ParaData>::ConstIterator end(paraList.end ()); + TQValueList<ParaData>::ConstIterator paraIt; + TQValueList<ParaData>::ConstIterator end(paraList.end ()); for ( paraIt = paraList.begin (); paraIt != end ; ++paraIt ) { - switch ( (*paraIt).layout.counter.numbering ) + switch ( (*paraIt).tqlayout.counter.numbering ) { case CounterData::NUM_LIST: - switch ( (*paraIt).layout.counter.style ) + switch ( (*paraIt).tqlayout.counter.style ) { case CounterData::STYLE_CUSTOMBULLET: case CounterData::STYLE_CIRCLEBULLET: @@ -581,7 +581,7 @@ bool DocBookWorker::doFullDocument ( const QValueList<ParaData> ¶List ) break; default: - kdError (30507) << "Unknown counter style " << (*paraIt).layout.counter.style << "!" << endl; + kdError (30507) << "Unknown counter style " << (*paraIt).tqlayout.counter.style << "!" << endl; CloseLists (); OpenArticleUnlessHead1 (); ProcessParagraphData (*paraIt, "PARA" ); @@ -590,7 +590,7 @@ bool DocBookWorker::doFullDocument ( const QValueList<ParaData> ¶List ) break; case CounterData::NUM_CHAPTER: - switch ( (*paraIt).layout.counter.depth ) + switch ( (*paraIt).tqlayout.counter.depth ) { case 0: CloseHead1AndArticle (); @@ -629,7 +629,7 @@ bool DocBookWorker::doFullDocument ( const QValueList<ParaData> ¶List ) break; default: - kdError (30507) << "Unexpected chapter depth " << (*paraIt).layout.counter.depth << "!" << endl; + kdError (30507) << "Unexpected chapter depth " << (*paraIt).tqlayout.counter.depth << "!" << endl; CloseLists (); OpenArticleUnlessHead1 (); ProcessParagraphData (*paraIt, "PARA" ); @@ -691,9 +691,9 @@ bool DocBookWorker::doCloseDocument ( void ) } -bool DocBookWorker::doOpenFile ( const QString &filenameOut, const QString & /*to*/ ) +bool DocBookWorker::doOpenFile ( const TQString &filenameOut, const TQString & /*to*/ ) { - fileOut = new QFile(filenameOut); + fileOut = new TQFile(filenameOut); if ( !fileOut ) { @@ -722,9 +722,9 @@ bool DocBookWorker::doCloseFile ( void ) { if ( !fileOut ) return true; - // As a QChar can be transformed into many bytes, - // we need to use QCString::length instead of QString::length - QCString cstr = outputText.local8Bit (); + // As a TQChar can be transformed into many bytes, + // we need to use TQCString::length instead of TQString::length + TQCString cstr = outputText.local8Bit (); fileOut->writeBlock ( cstr, cstr.length () ); fileOut->close (); @@ -740,9 +740,9 @@ bool DocBookWorker::doCloseFile ( void ) // the current tag level. It is used by ProcessDocumentIntoTag () to // assemble the diverse levels of information of the BOOKINFO tag. -static void ProcessInfoData ( const QString &tagName, - const QString & tagText, - QString &outputText) +static void ProcessInfoData ( const TQString &tagName, + const TQString & tagText, + TQString &outputText) { if ( tagText.length () ) { @@ -753,11 +753,11 @@ static void ProcessInfoData ( const QString &tagName, bool DocBookWorker::doFullDocumentInfo ( const KWEFDocumentInfo &docInfo ) { - QString bookInfoText; - QString abstractText; - QString authorText; - QString affiliationText; - QString addressText; + TQString bookInfoText; + TQString abstractText; + TQString authorText; + TQString affiliationText; + TQString addressText; ProcessInfoData ( "TITLE", docInfo.title, bookInfoText ); ProcessInfoData ( "PARA", docInfo.abstract, abstractText ); @@ -782,7 +782,7 @@ bool DocBookWorker::doFullDocumentInfo ( const KWEFDocumentInfo &docInfo ) } -KoFilter::ConversionStatus DocBookExport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus DocBookExport::convert( const TQCString& from, const TQCString& to ) { #if 0 kdError (30507) << "to = " << to << ", from = " << from << endl; diff --git a/filters/kword/docbook/docbookexport.h b/filters/kword/docbook/docbookexport.h index f6cf0494..9a1611c8 100644 --- a/filters/kword/docbook/docbookexport.h +++ b/filters/kword/docbook/docbookexport.h @@ -20,10 +20,10 @@ #ifndef DOCBOOKEXPORT_H #define DOCBOOKEXPORT_H -#include <qstring.h> -#include <qcstring.h> -#include <qfile.h> -#include <qobject.h> +#include <tqstring.h> +#include <tqcstring.h> +#include <tqfile.h> +#include <tqobject.h> #include <KoFilter.h> #include <KoStore.h> @@ -32,11 +32,12 @@ class DocBookExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - DocBookExport (KoFilter *parent, const char *name, const QStringList & ); + DocBookExport (KoFilter *tqparent, const char *name, const TQStringList & ); virtual ~DocBookExport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; #endif // DOCBOOKEXPORT_H diff --git a/filters/kword/hancomword/hancomwordimport.cpp b/filters/kword/hancomword/hancomwordimport.cpp index 0e72355b..41244247 100644 --- a/filters/kword/hancomword/hancomwordimport.cpp +++ b/filters/kword/hancomword/hancomwordimport.cpp @@ -26,12 +26,12 @@ #include <hancomwordimport.h> #include <hancomwordimport.moc> -#include <qbuffer.h> -#include <qcstring.h> -#include <qfile.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qtextstream.h> +#include <tqbuffer.h> +#include <tqcstring.h> +#include <tqfile.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqtextstream.h> #include <kdebug.h> #include <KoFilterChain.h> @@ -50,17 +50,17 @@ K_EXPORT_COMPONENT_FACTORY( libhancomwordimport, HancomWordImportFactory( "koffi class HancomWordImport::Private { public: - QString inputFile; - QString outputFile; + TQString inputFile; + TQString outputFile; - QStringList paragraphs; + TQStringList paragraphs; - QByteArray createStyles(); - QByteArray createContent(); - QByteArray createManifest(); + TQByteArray createStyles(); + TQByteArray createContent(); + TQByteArray createManifest(); }; -HancomWordImport::HancomWordImport ( QObject*, const char*, const QStringList& ) +HancomWordImport::HancomWordImport ( TQObject*, const char*, const TQStringList& ) : KoFilter() { d = new Private; @@ -82,7 +82,7 @@ static inline unsigned long readU16( const void* p ) } -KoFilter::ConversionStatus HancomWordImport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus HancomWordImport::convert( const TQCString& from, const TQCString& to ) { if ( from != "application/x-hancomword" ) return KoFilter::NotImplemented; @@ -107,18 +107,18 @@ KoFilter::ConversionStatus HancomWordImport::convert( const QCString& from, cons } int len = stream->size() / 2; - QString plaindoc; + TQString plaindoc; plaindoc.reserve( len ); unsigned char* buf = new unsigned char [stream->size()]; stream->read( buf, stream->size()); for(int i = 0; i < len; i++ ) - plaindoc.append( QChar((int)readU16(buf + i*2) ) ); + plaindoc.append( TQChar((int)readU16(buf + i*2) ) ); delete[] buf; delete stream; // split into paragraphs - d->paragraphs = QStringList::split( "\n", plaindoc, true ); + d->paragraphs = TQStringList::split( "\n", plaindoc, true ); // create output store KoStore* storeout; @@ -158,21 +158,21 @@ KoFilter::ConversionStatus HancomWordImport::convert( const QCString& from, cons storeout->close(); // we are done! - d->inputFile = QString::null; - d->outputFile = QString::null; + d->inputFile = TQString(); + d->outputFile = TQString(); delete storeout; return KoFilter::OK; } -QByteArray HancomWordImport::Private::createContent() +TQByteArray HancomWordImport::Private::createContent() { KoXmlWriter* contentWriter; - QByteArray contentData; - QBuffer contentBuffer( contentData ); + TQByteArray contentData; + TQBuffer contentBuffer( contentData ); contentBuffer.open( IO_WriteOnly ); - contentWriter = new KoXmlWriter( &contentBuffer ); + contentWriter = new KoXmlWriter( TQT_TQIODEVICE(&contentBuffer) ); contentWriter->startDocument( "office:document-content" ); contentWriter->startElement( "office:document-content" ); @@ -199,8 +199,8 @@ QByteArray HancomWordImport::Private::createContent() for( uint i = 0; i < paragraphs.count(); i++ ) { - QString text = paragraphs[i]; - text.replace( '\r', ' ' ); + TQString text = paragraphs[i]; + text.tqreplace( '\r', ' ' ); contentWriter->startElement( "text:p" ); contentWriter->addTextNode( text ); contentWriter->endElement(); // text:p @@ -217,14 +217,14 @@ QByteArray HancomWordImport::Private::createContent() return contentData; } -QByteArray HancomWordImport::Private::createStyles() +TQByteArray HancomWordImport::Private::createStyles() { KoXmlWriter* stylesWriter; - QByteArray stylesData; - QBuffer stylesBuffer( stylesData ); + TQByteArray stylesData; + TQBuffer stylesBuffer( stylesData ); stylesBuffer.open( IO_WriteOnly ); - stylesWriter = new KoXmlWriter( &stylesBuffer ); + stylesWriter = new KoXmlWriter( TQT_TQIODEVICE(&stylesBuffer) ); stylesWriter->startDocument( "office:document-styles" ); stylesWriter->startElement( "office:document-styles" ); @@ -273,14 +273,14 @@ QByteArray HancomWordImport::Private::createStyles() return stylesData; } -QByteArray HancomWordImport::Private::createManifest() +TQByteArray HancomWordImport::Private::createManifest() { KoXmlWriter* manifestWriter; - QByteArray manifestData; - QBuffer manifestBuffer( manifestData ); + TQByteArray manifestData; + TQBuffer manifestBuffer( manifestData ); manifestBuffer.open( IO_WriteOnly ); - manifestWriter = new KoXmlWriter( &manifestBuffer ); + manifestWriter = new KoXmlWriter( TQT_TQIODEVICE(&manifestBuffer) ); manifestWriter->startDocument( "manifest:manifest" ); manifestWriter->startElement( "manifest:manifest" ); diff --git a/filters/kword/hancomword/hancomwordimport.h b/filters/kword/hancomword/hancomwordimport.h index 7f3fc7cf..7cacd668 100644 --- a/filters/kword/hancomword/hancomwordimport.h +++ b/filters/kword/hancomword/hancomwordimport.h @@ -23,18 +23,19 @@ #include <KoFilter.h> #include <KoStore.h> -#include <qcstring.h> +#include <tqcstring.h> class HancomWordImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - HancomWordImport ( QObject *parent, const char* name, const QStringList& ); + HancomWordImport ( TQObject *tqparent, const char* name, const TQStringList& ); virtual ~HancomWordImport(); - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); private: class Private; diff --git a/filters/kword/hancomword/pole.cpp b/filters/kword/hancomword/pole.cpp index cb3771f5..dfcb31f5 100644 --- a/filters/kword/hancomword/pole.cpp +++ b/filters/kword/hancomword/pole.cpp @@ -96,7 +96,7 @@ class DirEntry { public: bool valid; // false if invalid (should be skipped) - std::string name; // the name, not in unicode anymore + std::string name; // the name, not in tqunicode anymore bool dir; // true if directory unsigned long size; // size (not valid if directory) unsigned long start; // starting block @@ -115,9 +115,9 @@ class DirTree DirEntry* entry( unsigned index ); DirEntry* entry( const std::string& name, bool create=false ); int indexOf( DirEntry* e ); - int parent( unsigned index ); + int tqparent( unsigned index ); std::string fullName( unsigned index ); - std::vector<unsigned> children( unsigned index ); + std::vector<unsigned> tqchildren( unsigned index ); void load( unsigned char* buffer, unsigned len ); void save( unsigned char* buffer ); unsigned size(); @@ -505,13 +505,13 @@ int DirTree::indexOf( DirEntry* e ) return -1; } -int DirTree::parent( unsigned index ) +int DirTree::tqparent( unsigned index ) { - // brute-force, basically we iterate for each entries, find its children - // and check if one of the children is 'index' + // brute-force, basically we iterate for each entries, find its tqchildren + // and check if one of the tqchildren is 'index' for( unsigned j=0; j<entryCount(); j++ ) { - std::vector<unsigned> chi = children( j ); + std::vector<unsigned> chi = tqchildren( j ); for( unsigned i=0; i<chi.size();i++ ) if( chi[i] == index ) return j; @@ -527,7 +527,7 @@ std::string DirTree::fullName( unsigned index ) std::string result = entry( index )->name; result.insert( 0, "/" ); - int p = parent( index ); + int p = tqparent( index ); DirEntry * _entry = 0; while( p > 0 ) { @@ -575,8 +575,8 @@ DirEntry* DirTree::entry( const std::string& name, bool create ) for( it = names.begin(); it != names.end(); ++it ) { - // find among the children of index - std::vector<unsigned> chi = children( index ); + // find among the tqchildren of index + std::vector<unsigned> chi = tqchildren( index ); unsigned child = 0; for( unsigned i = 0; i < chi.size(); i++ ) { @@ -591,11 +591,11 @@ DirEntry* DirTree::entry( const std::string& name, bool create ) if( child > 0 ) index = child; else { - // not found among children + // not found among tqchildren if( !create ) return (DirEntry*)0; // create a new entry - unsigned parent = index; + unsigned tqparent = index; entries.push_back( DirEntry() ); index = entryCount()-1; DirEntry* e = entry( index ); @@ -606,8 +606,8 @@ DirEntry* DirTree::entry( const std::string& name, bool create ) e->start = 0; e->child = End; e->prev = End; - e->next = entry(parent)->child; - entry(parent)->child = index; + e->next = entry(tqparent)->child; + entry(tqparent)->child = index; } } @@ -648,7 +648,7 @@ void dirtree_find_siblings( DirTree* dirtree, std::vector<unsigned>& result, } } -std::vector<unsigned> DirTree::children( unsigned index ) +std::vector<unsigned> DirTree::tqchildren( unsigned index ) { std::vector<unsigned> result; @@ -1102,7 +1102,7 @@ StreamIO::StreamIO( StorageIO* s, DirEntry* e) updateCache(); } -// FIXME tell parent we're gone +// FIXME tell tqparent we're gone StreamIO::~StreamIO() { delete[] cache_data; @@ -1248,10 +1248,10 @@ std::list<std::string> Storage::entries( const std::string& path ) DirEntry* e = dt->entry( path, false ); if( e && e->dir ) { - unsigned parent = dt->indexOf( e ); - std::vector<unsigned> children = dt->children( parent ); - for( unsigned i = 0; i < children.size(); i++ ) - result.push_back( dt->entry( children[i] )->name ); + unsigned tqparent = dt->indexOf( e ); + std::vector<unsigned> tqchildren = dt->tqchildren( tqparent ); + for( unsigned i = 0; i < tqchildren.size(); i++ ) + result.push_back( dt->entry( tqchildren[i] )->name ); } return result; @@ -1270,7 +1270,7 @@ Stream::Stream( Storage* storage, const std::string& name ) io = storage->io->streamIO( name ); } -// FIXME tell parent we're gone +// FIXME tell tqparent we're gone Stream::~Stream() { delete io; diff --git a/filters/kword/html/export/ExportBasic.cc b/filters/kword/html/export/ExportBasic.cc index 35d1e399..13864d7a 100644 --- a/filters/kword/html/export/ExportBasic.cc +++ b/filters/kword/html/export/ExportBasic.cc @@ -18,9 +18,9 @@ * Boston, MA 02110-1301, USA. */ -#include <qstring.h> -#include <qtextcodec.h> -#include <qfile.h> +#include <tqstring.h> +#include <tqtextcodec.h> +#include <tqfile.h> #include <klocale.h> #include <kdebug.h> @@ -30,17 +30,17 @@ #include "ExportFilter.h" #include "ExportBasic.h" -HtmlBasicWorker::HtmlBasicWorker( const QString &cssURL ) +HtmlBasicWorker::HtmlBasicWorker( const TQString &cssURL ) { m_cssURL = cssURL; } -QString HtmlBasicWorker::textFormatToCss(const TextFormatting& formatData) const +TQString HtmlBasicWorker::textFormatToCss(const TextFormatting& formatData) const {// PROVISORY - QString strElement; + TQString strElement; // Font name - QString fontName = formatData.fontName; + TQString fontName = formatData.fontName; if ( !fontName.isEmpty() ) { strElement+="font-family: "; @@ -53,7 +53,7 @@ QString HtmlBasicWorker::textFormatToCss(const TextFormatting& formatData) const { // We use absolute font sizes. strElement+="font-size: "; - strElement+=QString::number(size,10); + strElement+=TQString::number(size,10); strElement+="pt; "; } @@ -67,9 +67,9 @@ QString HtmlBasicWorker::textFormatToCss(const TextFormatting& formatData) const return strElement; } -QString HtmlBasicWorker::getStartOfListOpeningTag(const CounterData::Style typeList, bool& ordered) +TQString HtmlBasicWorker::getStartOfListOpeningTag(const CounterData::Style typeList, bool& ordered) { - QString strResult; + TQString strResult; switch (typeList) { case CounterData::STYLE_CUSTOMBULLET: // We cannot keep the custom type/style @@ -165,7 +165,7 @@ void HtmlBasicWorker::openFormatData(const FormatData& formatOrigin, const FormatData& format, const bool force,const bool allowBold) { bool useCSS = !m_cssURL.isEmpty(); - QString attr; + TQString attr; if( !useCSS && ( force || formatOrigin.text.fontName != format.text.fontName ) && !format.text.fontName.isEmpty() ) { @@ -183,7 +183,7 @@ void HtmlBasicWorker::openFormatData(const FormatData& formatOrigin, if (size<1) size=1; if (size>7) size=7; attr += " size=\""; // in XML numbers must be quoted! - attr += QString::number(size,10); + attr += TQString::number(size,10); attr += "\""; } @@ -307,38 +307,38 @@ void HtmlBasicWorker::closeFormatData(const FormatData& formatOrigin, } -void HtmlBasicWorker::openParagraph(const QString& strTag, - const LayoutData& layout, QChar::Direction direction) +void HtmlBasicWorker::openParagraph(const TQString& strTag, + const LayoutData& tqlayout, TQChar::Direction direction) { *m_streamOut << '<' << strTag; - if ( (layout.alignment=="left") || (layout.alignment== "right") - || (layout.alignment=="center") || (layout.alignment=="justify")) + if ( (tqlayout.tqalignment=="left") || (tqlayout.tqalignment== "right") + || (tqlayout.tqalignment=="center") || (tqlayout.tqalignment=="justify")) { - *m_streamOut << " align=\"" << layout.alignment << "\""; - if ( (direction == QChar::DirRLE) || (direction == QChar::DirRLO) ) + *m_streamOut << " align=\"" << tqlayout.tqalignment << "\""; + if ( (direction == TQChar::DirRLE) || (direction == TQChar::DirRLO) ) *m_streamOut << " dir=\"rtl\""; } - else if ( layout.alignment=="auto") + else if ( tqlayout.tqalignment=="auto") { // Do nothing, the user-agent should be more intelligent than us. } else { - kdWarning(30503) << "Unknown alignment: " << layout.alignment << endl; + kdWarning(30503) << "Unknown tqalignment: " << tqlayout.tqalignment << endl; } *m_streamOut << ">"; // Allow bold only if tag is not a heading! - openFormatData(layout.formatData,layout.formatData,true,(strTag[0]!='h')); + openFormatData(tqlayout.formatData,tqlayout.formatData,true,(strTag[0]!='h')); } -void HtmlBasicWorker::closeParagraph(const QString& strTag, - const LayoutData& layout) +void HtmlBasicWorker::closeParagraph(const TQString& strTag, + const LayoutData& tqlayout) { // Allow bold only if tag is not a heading! - closeFormatData(layout.formatData,layout.formatData,true,(strTag[0]!='h')); + closeFormatData(tqlayout.formatData,tqlayout.formatData,true,(strTag[0]!='h')); *m_streamOut << "</" << strTag << ">\n"; } @@ -360,7 +360,7 @@ bool HtmlBasicWorker::doOpenBody(void) return true; } -QString HtmlBasicWorker::customCSSURL(void) const +TQString HtmlBasicWorker::customCSSURL(void) const { return m_cssURL; } diff --git a/filters/kword/html/export/ExportBasic.h b/filters/kword/html/export/ExportBasic.h index fd573f82..a6de0082 100644 --- a/filters/kword/html/export/ExportBasic.h +++ b/filters/kword/html/export/ExportBasic.h @@ -27,29 +27,29 @@ class HtmlBasicWorker : public HtmlWorker { public: - HtmlBasicWorker( const QString &cssURL = QString::null ); + HtmlBasicWorker( const TQString &cssURL = TQString() ); virtual ~HtmlBasicWorker(void) { } public: protected: - virtual QString getStartOfListOpeningTag(const CounterData::Style typeList, bool& ordered); - virtual void openParagraph(const QString& strTag, - const LayoutData& layout,QChar::Direction direction=QChar::DirL); - virtual void closeParagraph(const QString& strTag, - const LayoutData& layout); + virtual TQString getStartOfListOpeningTag(const CounterData::Style typeList, bool& ordered); + virtual void openParagraph(const TQString& strTag, + const LayoutData& tqlayout,TQChar::Direction direction=TQChar::DirL); + virtual void closeParagraph(const TQString& strTag, + const LayoutData& tqlayout); virtual void openSpan(const FormatData& formatOrigin, const FormatData& format); virtual void closeSpan(const FormatData& formatOrigin, const FormatData& format); virtual bool doOpenBody(void); ///< HTML's \<body\> virtual void writeDocType(void); - virtual QString customCSSURL(void) const; + virtual TQString customCSSURL(void) const; private: void openFormatData(const FormatData& formatOrigin, const FormatData& format, const bool force, const bool allowBold); void closeFormatData(const FormatData& formatOrigin, const FormatData& format, const bool force, const bool allowBold); - QString textFormatToCss(const TextFormatting& formatData) const; + TQString textFormatToCss(const TextFormatting& formatData) const; private: - QString m_cssURL; + TQString m_cssURL; }; #endif /* EXPORTBASIC_H */ diff --git a/filters/kword/html/export/ExportCss.cc b/filters/kword/html/export/ExportCss.cc index 0278510d..51c4da91 100644 --- a/filters/kword/html/export/ExportCss.cc +++ b/filters/kword/html/export/ExportCss.cc @@ -18,9 +18,9 @@ * Boston, MA 02110-1301, USA. */ -#include <qstring.h> -#include <qtextcodec.h> -#include <qfile.h> +#include <tqstring.h> +#include <tqtextcodec.h> +#include <tqfile.h> #include <klocale.h> #include <kdebug.h> @@ -31,18 +31,18 @@ #include "ExportFilter.h" #include "ExportCss.h" -QString HtmlCssWorker::escapeCssIdentifier(const QString& strText) const +TQString HtmlCssWorker::escapeCssIdentifier(const TQString& strText) const { // Reference: section 4.1.3 of the CSS2 recommendation // However most HTML user agents support this section only in a restrictive way, so we cannot use any CSS escape // NOTE: we do not guarantee anymore that the style name is unique! (### FIXME) - QString strReturn; + TQString strReturn; // Taken in the restrictive way, an identifier can only start with a letter. - const QChar qch0(strText[0]); - if ((qch0<'a' || qch0>'z') && (qch0<'A' || qch0>'Z')) + const TQChar qch0(strText[0]); + if (((int)qch0<'a' || (int)qch0>'z') && ((int)qch0<'A' || (int)qch0>'Z')) { // Not a letter, so we have to add a prefix strReturn+="kWoRd_"; // The curious spelling is for allowing a HTML import to identfy it and to remove it. @@ -51,8 +51,8 @@ QString HtmlCssWorker::escapeCssIdentifier(const QString& strText) const for (uint i=0; i<strText.length(); i++) { - const QChar qch(strText.at(i)); - const ushort ch=qch.unicode(); + const TQChar qch(strText.at(i)); + const ushort ch=qch.tqunicode(); if (((ch>='a') && (ch<='z')) || ((ch>='A') && (ch<='Z')) @@ -79,29 +79,29 @@ QString HtmlCssWorker::escapeCssIdentifier(const QString& strText) const // but a CSS escape would break some HTML user agents (e.g. Mozilla 1.4) // So we have to do our own incompatible cooking. :-( strReturn+="--"; // start our private escape - strReturn+=QString::number(ch,16); + strReturn+=TQString::number(ch,16); strReturn+="--"; // end our private escape } } return strReturn; } -QString HtmlCssWorker::textFormatToCss(const TextFormatting& formatOrigin, +TQString HtmlCssWorker::textFormatToCss(const TextFormatting& formatOrigin, const TextFormatting& formatData, const bool force) const { // TODO: as this method comes from the AbiWord filter, // TODO: verify that it is working for HTML // TODO: rename variable formatData - QString strElement; // TODO: rename this variable + TQString strElement; // TODO: rename this variable // Font name - QString fontName = formatData.fontName; + TQString fontName = formatData.fontName; if (!fontName.isEmpty() && (force || (formatOrigin.fontName!=formatData.fontName))) { strElement+="font-family: "; - if (fontName.find(' ')==-1) + if (fontName.tqfind(' ')==-1) strElement+=escapeHtmlText(fontName); else { // If the font name contains a space, it should be quoted. @@ -149,7 +149,7 @@ QString HtmlCssWorker::textFormatToCss(const TextFormatting& formatOrigin, { // We use absolute font sizes. strElement+="font-size: "; - strElement+=QString::number(size,10); + strElement+=TQString::number(size,10); strElement+="pt; "; } } @@ -231,9 +231,9 @@ QString HtmlCssWorker::textFormatToCss(const TextFormatting& formatOrigin, return strElement; } -QString HtmlCssWorker::getStartOfListOpeningTag(const CounterData::Style typeList, bool& ordered) +TQString HtmlCssWorker::getStartOfListOpeningTag(const CounterData::Style typeList, bool& ordered) { - QString strResult; + TQString strResult; switch (typeList) { case CounterData::STYLE_CUSTOMBULLET: // We cannot keep the custom type/style @@ -308,69 +308,69 @@ QString HtmlCssWorker::getStartOfListOpeningTag(const CounterData::Style typeLis return strResult; } -QString HtmlCssWorker::layoutToCss(const LayoutData& layoutOrigin, - const LayoutData& layout, const bool force) const +TQString HtmlCssWorker::tqlayoutToCss(const LayoutData& tqlayoutOrigin, + const LayoutData& tqlayout, const bool force) const { - QString strLayout; + TQString strLayout; - if (force || (layoutOrigin.alignment!=layout.alignment)) + if (force || (tqlayoutOrigin.tqalignment!=tqlayout.tqalignment)) { - if ( (layout.alignment=="left") || (layout.alignment== "right") - || (layout.alignment=="center") || (layout.alignment=="justify")) + if ( (tqlayout.tqalignment=="left") || (tqlayout.tqalignment== "right") + || (tqlayout.tqalignment=="center") || (tqlayout.tqalignment=="justify")) { - strLayout += QString("text-align:%1; ").arg(layout.alignment); + strLayout += TQString("text-align:%1; ").tqarg(tqlayout.tqalignment); } - else if ( layout.alignment=="auto") + else if ( tqlayout.tqalignment=="auto") { // Do nothing, the user-agent should be more intelligent than us. } else { - kdWarning(30503) << "Unknown alignment: " << layout.alignment << endl; + kdWarning(30503) << "Unknown tqalignment: " << tqlayout.tqalignment << endl; } } - if ((layout.indentLeft>=0.0) - && (force || (layoutOrigin.indentLeft!=layout.indentLeft))) + if ((tqlayout.indentLeft>=0.0) + && (force || (tqlayoutOrigin.indentLeft!=tqlayout.indentLeft))) { - strLayout += QString("margin-left:%1pt; ").arg(layout.indentLeft); + strLayout += TQString("margin-left:%1pt; ").tqarg(tqlayout.indentLeft); } - if ((layout.indentRight>=0.0) - && (force || (layoutOrigin.indentRight!=layout.indentRight))) + if ((tqlayout.indentRight>=0.0) + && (force || (tqlayoutOrigin.indentRight!=tqlayout.indentRight))) { - strLayout += QString("margin-right:%1pt; ").arg(layout.indentRight); + strLayout += TQString("margin-right:%1pt; ").tqarg(tqlayout.indentRight); } - if (force || (layoutOrigin.indentLeft!=layout.indentLeft)) + if (force || (tqlayoutOrigin.indentLeft!=tqlayout.indentLeft)) { - strLayout += QString("text-indent:%1pt; ").arg(layout.indentFirst); + strLayout += TQString("text-indent:%1pt; ").tqarg(tqlayout.indentFirst); } - if ((layout.marginBottom>=0.0) - && ( force || ( layoutOrigin.marginBottom != layout.marginBottom ) ) ) + if ((tqlayout.marginBottom>=0.0) + && ( force || ( tqlayoutOrigin.marginBottom != tqlayout.marginBottom ) ) ) { - strLayout += QString("margin-bottom:%1pt; ").arg(layout.marginBottom); + strLayout += TQString("margin-bottom:%1pt; ").tqarg(tqlayout.marginBottom); } - if ((layout.marginTop>=0.0) - && ( force || ( layoutOrigin.marginTop != layout.marginTop ) ) ) + if ((tqlayout.marginTop>=0.0) + && ( force || ( tqlayoutOrigin.marginTop != tqlayout.marginTop ) ) ) { - strLayout += QString("margin-top:%1pt; ").arg(layout.marginTop); + strLayout += TQString("margin-top:%1pt; ").tqarg(tqlayout.marginTop); } if (force - || ( layoutOrigin.lineSpacingType != layout.lineSpacingType ) - || ( layoutOrigin.lineSpacing != layout.lineSpacing ) ) + || ( tqlayoutOrigin.lineSpacingType != tqlayout.lineSpacingType ) + || ( tqlayoutOrigin.lineSpacing != tqlayout.lineSpacing ) ) { - switch ( layout.lineSpacingType ) + switch ( tqlayout.lineSpacingType ) { case LayoutData::LS_CUSTOM: { // ### TODO: CSS 2 does not known "at-least". #if 0 // We have a custom line spacing (in points) - const QString height ( QString::number(layout.lineSpacing) ); // ### TODO: rounding? + const TQString height ( TQString::number(tqlayout.lineSpacing) ); // ### TODO: rounding? strLayout += "style:line-spacing:"; strLayout += height; strLayout += "pt; "; @@ -394,7 +394,7 @@ QString HtmlCssWorker::layoutToCss(const LayoutData& layoutOrigin, } case LayoutData::LS_MULTIPLE: { - const QString mult ( QString::number( qRound( layout.lineSpacing * 100 ) ) ); + const TQString mult ( TQString::number( tqRound( tqlayout.lineSpacing * 100 ) ) ); strLayout += "line-height:"; strLayout += mult; strLayout += "%; "; @@ -403,7 +403,7 @@ QString HtmlCssWorker::layoutToCss(const LayoutData& layoutOrigin, case LayoutData::LS_FIXED: { // We have a fixed line height (in points) - const QString height ( QString::number(layout.lineSpacing) ); // ### TODO: rounding? + const TQString height ( TQString::number(tqlayout.lineSpacing) ); // ### TODO: rounding? strLayout += "line-height:"; strLayout += height; strLayout += "pt; "; @@ -414,7 +414,7 @@ QString HtmlCssWorker::layoutToCss(const LayoutData& layoutOrigin, // ### TODO: CSS 2 does not known "at-least". // ### TODO: however draft CCS3 (module 'line') has 'line-stacking-strategy' to tweak this behaviour // We have a at-least line height (in points) - const QString height ( QString::number(layout.lineSpacing) ); // ### TODO: rounding? + const TQString height ( TQString::number(tqlayout.lineSpacing) ); // ### TODO: rounding? strLayout += "line-height:"; strLayout += height; strLayout += "pt; "; @@ -422,7 +422,7 @@ QString HtmlCssWorker::layoutToCss(const LayoutData& layoutOrigin, } default: { - kdWarning(30503) << "Unsupported lineSpacingType: " << layout.lineSpacingType << " (Ignoring!)" << endl; + kdWarning(30503) << "Unsupported lineSpacingType: " << tqlayout.lineSpacingType << " (Ignoring!)" << endl; break; } } @@ -430,12 +430,12 @@ QString HtmlCssWorker::layoutToCss(const LayoutData& layoutOrigin, // TODO: Konqueror/KHTML does not support "text-shadow" if (!force - && ( layoutOrigin.shadowDirection == layout.shadowDirection ) - && ( layoutOrigin.shadowDistance == layout.shadowDistance ) ) + && ( tqlayoutOrigin.shadowDirection == tqlayout.shadowDirection ) + && ( tqlayoutOrigin.shadowDistance == tqlayout.shadowDistance ) ) { // Do nothing! } - else if ((!layout.shadowDirection) || (!layout.shadowDistance)) + else if ((!tqlayout.shadowDirection) || (!tqlayout.shadowDistance)) { strLayout += "text-shadow:"; strLayout+="none; "; @@ -443,8 +443,8 @@ QString HtmlCssWorker::layoutToCss(const LayoutData& layoutOrigin, else { double xDistance,yDistance; - const double distance=layout.shadowDistance; - switch (layout.shadowDirection) + const double distance=tqlayout.shadowDistance; + switch (tqlayout.shadowDirection) { case 1: // SD_LEFT_UP { @@ -509,8 +509,8 @@ QString HtmlCssWorker::layoutToCss(const LayoutData& layoutOrigin, else { strLayout += "text-shadow:"; - strLayout+=QString("%1 %2pt %3pt; ").arg(layout.shadowColor.name()) - .arg(xDistance,0,'f',0).arg(yDistance,0,'f',0); + strLayout+=TQString("%1 %2pt %3pt; ").tqarg(tqlayout.shadowColor.name()) + .tqarg(xDistance,0,'f',0).tqarg(yDistance,0,'f',0); // We do not want any scientific notation or any decimal } } @@ -518,61 +518,61 @@ QString HtmlCssWorker::layoutToCss(const LayoutData& layoutOrigin, // TODO: borders // This must remain last, as the last property does not have a semi-colon - strLayout+=textFormatToCss(layoutOrigin.formatData.text, - layout.formatData.text,force); + strLayout+=textFormatToCss(tqlayoutOrigin.formatData.text, + tqlayout.formatData.text,force); return strLayout; } -void HtmlCssWorker::openParagraph(const QString& strTag, - const LayoutData& layout, QChar::Direction direction) +void HtmlCssWorker::openParagraph(const TQString& strTag, + const LayoutData& tqlayout, TQChar::Direction direction) { - const LayoutData& styleLayout=m_styleMap[layout.styleName]; + const LayoutData& styleLayout=m_styleMap[tqlayout.styleName]; *m_streamOut << '<' << strTag; // Opening elements - *m_streamOut << " class=\"" << escapeCssIdentifier(layout.styleName); + *m_streamOut << " class=\"" << escapeCssIdentifier(tqlayout.styleName); *m_streamOut << "\""; - QString strStyle=layoutToCss(styleLayout,layout,false); + TQString strStyle=tqlayoutToCss(styleLayout,tqlayout,false); if (!strStyle.isEmpty()) { *m_streamOut << " style=\"" << strStyle; - if (direction == QChar::DirRLE) { - *m_streamOut << "direction: rtl; unicode-bidi: embed; "; - } else if (direction == QChar::DirRLO) { - *m_streamOut << "direction: rtl; unicode-bidi: override; "; + if (direction == TQChar::DirRLE) { + *m_streamOut << "direction: rtl; tqunicode-bidi: embed; "; + } else if (direction == TQChar::DirRLO) { + *m_streamOut << "direction: rtl; tqunicode-bidi: override; "; } *m_streamOut<< "\""; } *m_streamOut << ">"; - if ( 1==layout.formatData.text.verticalAlignment ) + if ( 1==tqlayout.formatData.text.verticalAlignment ) { *m_streamOut << "<sub>"; //Subscript } - else if ( 2==layout.formatData.text.verticalAlignment ) + else if ( 2==tqlayout.formatData.text.verticalAlignment ) { *m_streamOut << "<sup>"; //Superscript } - if ( layout.alignment == "center" ) *m_streamOut << "<center>"; + if ( tqlayout.tqalignment == "center" ) *m_streamOut << "<center>"; } -void HtmlCssWorker::closeParagraph(const QString& strTag, - const LayoutData& layout) +void HtmlCssWorker::closeParagraph(const TQString& strTag, + const LayoutData& tqlayout) { - if ( 2==layout.formatData.text.verticalAlignment ) + if ( 2==tqlayout.formatData.text.verticalAlignment ) { *m_streamOut << "</sup>"; //Superscript } - else if ( 1==layout.formatData.text.verticalAlignment ) + else if ( 1==tqlayout.formatData.text.verticalAlignment ) { *m_streamOut << "</sub>"; //Subscript } - if ( layout.alignment == "center" ) *m_streamOut << "</center>"; + if ( tqlayout.tqalignment == "center" ) *m_streamOut << "</center>"; *m_streamOut << "</" << strTag << ">\n"; } @@ -609,20 +609,20 @@ void HtmlCssWorker::closeSpan(const FormatData& formatOrigin, const FormatData& bool HtmlCssWorker::doFullPaperFormat(const int format, const double width, const double height, const int orientation) { - QString strWidth, strHeight, strUnits; + TQString strWidth, strHeight, strUnits; KWEFUtil::GetNativePaperFormat(format, strWidth, strHeight, strUnits); if ((strWidth.isEmpty())||(strHeight.isEmpty())||(strUnits.isEmpty())) { // page format is unknown, so we need the size information strUnits="pt"; - strWidth=QString::number(width); - strHeight=QString::number(height); + strWidth=TQString::number(width); + strHeight=TQString::number(height); } if (orientation==1) { // Landscape, so we must swap the sizes - QString strTemp(strWidth); + TQString strTemp(strWidth); strWidth=strHeight; strHeight=strTemp; } @@ -641,16 +641,16 @@ bool HtmlCssWorker::doFullPaperBorders (const double top, const double left, const double bottom, const double right) { m_strPaperBorders=" margin-top: "; - m_strPaperBorders+=QString::number(top); + m_strPaperBorders+=TQString::number(top); m_strPaperBorders+="pt;\n"; m_strPaperBorders+=" margin-left: "; - m_strPaperBorders+=QString::number(left); + m_strPaperBorders+=TQString::number(left); m_strPaperBorders+="pt;\n"; m_strPaperBorders+=" margin-bottom: "; - m_strPaperBorders+=QString::number(bottom); + m_strPaperBorders+=TQString::number(bottom); m_strPaperBorders+="pt;\n"; m_strPaperBorders+=" margin-right: "; - m_strPaperBorders+=QString::number(right); + m_strPaperBorders+=TQString::number(right); m_strPaperBorders+="pt;\n"; return true; @@ -667,7 +667,7 @@ bool HtmlCssWorker::doOpenStyles(void) } // Say who we are (with the CVS revision number) - const QString strVersion("$Revision: 483471 $"); + const TQString strVersion("$Revision: 483471 $"); // Eliminate the dollar signs // (We don't want that the version number changes if the HTML file is itself put in a CVS storage.) *m_streamOut << "/* KWORD_CSS_EXPORT =" @@ -680,16 +680,16 @@ bool HtmlCssWorker::doOpenStyles(void) return true; } -bool HtmlCssWorker::doFullDefineStyle(LayoutData& layout) +bool HtmlCssWorker::doFullDefineStyle(LayoutData& tqlayout) { //Register style in the style map - m_styleMap[layout.styleName]=layout; + m_styleMap[tqlayout.styleName]=tqlayout; // We do not limit (anymore) any style to <h1> ... <h6>, because - // the style could be forced on <p> by the layout. + // the style could be forced on <p> by the tqlayout. - *m_streamOut << "." << escapeCssIdentifier(layout.styleName); - *m_streamOut << "\n{\n " << layoutToCss(layout,layout,true) << "\n}\n"; + *m_streamOut << "." << escapeCssIdentifier(tqlayout.styleName); + *m_streamOut << "\n{\n " << tqlayoutToCss(tqlayout,tqlayout,true) << "\n}\n"; return true; } diff --git a/filters/kword/html/export/ExportCss.h b/filters/kword/html/export/ExportCss.h index 82121128..acbf20cc 100644 --- a/filters/kword/html/export/ExportCss.h +++ b/filters/kword/html/export/ExportCss.h @@ -21,12 +21,12 @@ #ifndef EXPORTCSS_H #define EXPORTCSS_H -#include <qmap.h> +#include <tqmap.h> #include <KWEFBaseWorker.h> #include "ExportFilter.h" -class StyleMap : public QMap<QString,LayoutData> +class StyleMap : public TQMap<TQString,LayoutData> { public: StyleMap(void) {} @@ -41,27 +41,27 @@ public: public: virtual bool doOpenStyles(void); ///< HTML's \<style\> virtual bool doCloseStyles(void); ///< HTML's \</style\> - virtual bool doFullDefineStyle(LayoutData& layout); + virtual bool doFullDefineStyle(LayoutData& tqlayout); virtual bool doFullPaperFormat(const int format, const double width, const double height, const int orientation); virtual bool doFullPaperBorders (const double top, const double left, const double bottom, const double right); ///< Like KWord's \<PAPERBORDERS\> protected: - virtual QString getStartOfListOpeningTag(const CounterData::Style typeList, bool& ordered); - virtual void openParagraph(const QString& strTag, const LayoutData& layout, - QChar::Direction direction=QChar::DirL); - virtual void closeParagraph(const QString& strTag, const LayoutData& layout); + virtual TQString getStartOfListOpeningTag(const CounterData::Style typeList, bool& ordered); + virtual void openParagraph(const TQString& strTag, const LayoutData& tqlayout, + TQChar::Direction direction=TQChar::DirL); + virtual void closeParagraph(const TQString& strTag, const LayoutData& tqlayout); virtual void openSpan(const FormatData& formatOrigin, const FormatData& format); virtual void closeSpan(const FormatData& formatOrigin, const FormatData& format); private: - QString layoutToCss(const LayoutData& layoutOrigin,const LayoutData& layout, + TQString tqlayoutToCss(const LayoutData& tqlayoutOrigin,const LayoutData& tqlayout, const bool force) const; - QString escapeCssIdentifier(const QString& strText) const; - QString textFormatToCss(const TextFormatting& formatOrigin, + TQString escapeCssIdentifier(const TQString& strText) const; + TQString textFormatToCss(const TextFormatting& formatOrigin, const TextFormatting& formatData, const bool force) const; private: - QString m_strPageSize; - QString m_strPaperBorders; + TQString m_strPageSize; + TQString m_strPaperBorders; StyleMap m_styleMap; }; diff --git a/filters/kword/html/export/ExportDialog.cc b/filters/kword/html/export/ExportDialog.cc index 81e126ae..3f1d0b3e 100644 --- a/filters/kword/html/export/ExportDialog.cc +++ b/filters/kword/html/export/ExportDialog.cc @@ -18,7 +18,7 @@ * Boston, MA 02110-1301, USA. */ -#include <qtextcodec.h> +#include <tqtextcodec.h> #include <klocale.h> #include <kcharsets.h> @@ -27,44 +27,44 @@ #include <kapplication.h> #include <kcombobox.h> #include <kmessagebox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qradiobutton.h> -#include <qvbuttongroup.h> -#include <qcheckbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqradiobutton.h> +#include <tqvbuttongroup.h> +#include <tqcheckbox.h> #include <kurlrequester.h> #include <ExportDialogUI.h> #include <ExportDialog.h> -HtmlExportDialog :: HtmlExportDialog(QWidget* parent) - : KDialogBase(parent, 0, true, i18n("KWord's HTML Export Filter"), Ok|Cancel, No, true), +HtmlExportDialog :: HtmlExportDialog(TQWidget* tqparent) + : KDialogBase(tqparent, 0, true, i18n("KWord's HTML Export Filter"), Ok|Cancel, No, true), m_dialog(new ExportDialogUI(this)) { kapp->restoreOverrideCursor(); - QStringList encodingList; + TQStringList encodingList; - encodingList += i18n( "Descriptive encoding name", "Recommended ( %1 )" ).arg( "UTF-8" ); - encodingList += i18n( "Descriptive encoding name", "Locale ( %1 )" ).arg( QTextCodec::codecForLocale()->name() ); + encodingList += i18n( "Descriptive encoding name", "Recommended ( %1 )" ).tqarg( "UTF-8" ); + encodingList += i18n( "Descriptive encoding name", "Locale ( %1 )" ).tqarg( TQTextCodec::codecForLocale()->name() ); encodingList += KGlobal::charsets()->descriptiveEncodingNames(); m_dialog->comboBoxEncoding->insertStringList( encodingList ); m_dialog->KURL_ExternalCSS->setMode( KFile::ExistingOnly ); - connect(m_dialog->radioModeEnhanced, SIGNAL( toggled( bool ) ), - SLOT( setCSSEnabled( bool ) ) ); - connect(m_dialog->checkExternalCSS, SIGNAL( toggled( bool ) ), - m_dialog->KURL_ExternalCSS, SLOT( setEnabled( bool ) ) ); + connect(m_dialog->radioModeEnhanced, TQT_SIGNAL( toggled( bool ) ), + TQT_SLOT( setCSSEnabled( bool ) ) ); + connect(m_dialog->checkExternalCSS, TQT_SIGNAL( toggled( bool ) ), + m_dialog->KURL_ExternalCSS, TQT_SLOT( setEnabled( bool ) ) ); setMainWidget(m_dialog); } HtmlExportDialog :: ~HtmlExportDialog(void) { - kapp->setOverrideCursor(Qt::waitCursor); + kapp->setOverrideCursor(TQt::waitCursor); } void HtmlExportDialog::setCSSEnabled( bool b ) @@ -82,15 +82,15 @@ bool HtmlExportDialog::isXHtml(void) const return true; } -QTextCodec* HtmlExportDialog::getCodec(void) const +TQTextCodec* HtmlExportDialog::getCodec(void) const { - const QString strCodec( KGlobal::charsets()->encodingForName( m_dialog->comboBoxEncoding->currentText() ) ); + const TQString strCodec( KGlobal::charsets()->encodingForName( m_dialog->comboBoxEncoding->currentText() ) ); kdDebug(30503) << "Encoding: " << strCodec << endl; bool ok = false; - QTextCodec* codec = QTextCodec::codecForName( strCodec.utf8() ); + TQTextCodec* codec = TQTextCodec::codecForName( strCodec.utf8() ); - // If QTextCodec has not found a valid encoding, so try with KCharsets. + // If TQTextCodec has not found a valid encoding, so try with KCharsets. if ( codec ) { ok = true; @@ -105,8 +105,8 @@ QTextCodec* HtmlExportDialog::getCodec(void) const { // Default: UTF-8 kdWarning(30503) << "Cannot find encoding:" << strCodec << endl; - // ### TODO: what parent to use? - KMessageBox::error( 0, i18n("Cannot find encoding: %1").arg( strCodec ) ); + // ### TODO: what tqparent to use? + KMessageBox::error( 0, i18n("Cannot find encoding: %1").tqarg( strCodec ) ); return 0; } @@ -137,7 +137,7 @@ HtmlExportDialog::Mode HtmlExportDialog::getMode(void) const return DefaultCSS;//Our default } -QString HtmlExportDialog::cssURL(void) const +TQString HtmlExportDialog::cssURL(void) const { return m_dialog->KURL_ExternalCSS->url(); } diff --git a/filters/kword/html/export/ExportDialog.h b/filters/kword/html/export/ExportDialog.h index 2a85c1c2..978f6e6b 100644 --- a/filters/kword/html/export/ExportDialog.h +++ b/filters/kword/html/export/ExportDialog.h @@ -21,7 +21,7 @@ #ifndef EXPORT_DIALOG_H #define EXPORT_DIALOG_H -#include <qwidget.h> +#include <tqwidget.h> #include <kdialogbase.h> class ExportDialogUI; @@ -29,6 +29,7 @@ class ExportDialogUI; class HtmlExportDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: enum Mode { @@ -38,12 +39,12 @@ public: CustomCSS }; - HtmlExportDialog(QWidget* parent=NULL); + HtmlExportDialog(TQWidget* tqparent=NULL); ~HtmlExportDialog(void); bool isXHtml(void) const; - QTextCodec* getCodec(void) const; + TQTextCodec* getCodec(void) const; Mode getMode(void) const; - QString cssURL(void) const; + TQString cssURL(void) const; protected slots: void setCSSEnabled( bool ); diff --git a/filters/kword/html/export/ExportDialogUI.ui b/filters/kword/html/export/ExportDialogUI.ui index 090024f9..474d2912 100644 --- a/filters/kword/html/export/ExportDialogUI.ui +++ b/filters/kword/html/export/ExportDialogUI.ui @@ -2,7 +2,7 @@ <class>ExportDialogUI</class> <comment>Export dialog for KWord's HTML export filter</comment> <author>Nicolas GOUTTE <goutte@kde.org></author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>ExportDialogUI</cstring> </property> @@ -27,15 +27,15 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -67,7 +67,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>106</width> <height>20</height> @@ -76,7 +76,7 @@ </spacer> </hbox> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup1</cstring> </property> @@ -93,7 +93,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioDocType1</cstring> </property> @@ -110,7 +110,7 @@ <string>HTML 4.01 (For older HTML user agents) </string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioDocType2</cstring> </property> @@ -126,7 +126,7 @@ </widget> </vbox> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroupMode</cstring> </property> @@ -143,7 +143,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioModeLight</cstring> </property> @@ -160,7 +160,7 @@ <string>Convert mainly the document structure (Recommended for exporting to browsers with limited capabilities)</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioModeBasic</cstring> </property> @@ -180,7 +180,7 @@ <string>Convert most of the document (Recommended for re-importing in KWord or for exporting to older browsers)</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioModeEnhanced</cstring> </property> @@ -194,9 +194,9 @@ <string>Convert as much as possible of the KWord document (Recommended for exporting to other modern word processors or to modern browsers)</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <hbox> <property name="name"> @@ -212,22 +212,22 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>checkExternalCSS</cstring> </property> @@ -262,7 +262,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>90</height> @@ -279,7 +279,7 @@ <tabstop>radioModeLight</tabstop> <tabstop>radioModeEnhanced</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kcombobox.h</includehint> <includehint>klineedit.h</includehint> diff --git a/filters/kword/html/export/ExportDocStruct.cc b/filters/kword/html/export/ExportDocStruct.cc index 5f0fc53c..545d3e31 100644 --- a/filters/kword/html/export/ExportDocStruct.cc +++ b/filters/kword/html/export/ExportDocStruct.cc @@ -18,9 +18,9 @@ * Boston, MA 02110-1301, USA. */ -#include <qstring.h> -#include <qtextcodec.h> -#include <qfile.h> +#include <tqstring.h> +#include <tqtextcodec.h> +#include <tqfile.h> #include <klocale.h> #include <kdebug.h> @@ -30,9 +30,9 @@ #include "ExportFilter.h" #include "ExportDocStruct.h" -QString HtmlDocStructWorker::getStartOfListOpeningTag(const CounterData::Style typeList, bool& ordered) +TQString HtmlDocStructWorker::getStartOfListOpeningTag(const CounterData::Style typeList, bool& ordered) { - QString strResult; + TQString strResult; switch (typeList) { case CounterData::STYLE_CUSTOMBULLET: @@ -66,7 +66,7 @@ void HtmlDocStructWorker::openFormatData(const FormatData& formatOrigin, { // TODO/FIXME: find another way to find fixed fonts // TODO/FIXME: (leaves out "Typewriter", "Monospace", "Mono") - if (format.text.fontName.contains("ourier")) + if (format.text.fontName.tqcontains("ourier")) { *m_streamOut << "<tt>"; // teletype } @@ -133,23 +133,23 @@ void HtmlDocStructWorker::closeFormatData(const FormatData& formatOrigin, } } - if (format.text.fontName.contains("ourier")) // Courier? + if (format.text.fontName.tqcontains("ourier")) // Courier? { *m_streamOut << "</tt>"; // teletype } } -void HtmlDocStructWorker::openParagraph(const QString& strTag, - const LayoutData& layout,QChar::Direction /*direction*/) +void HtmlDocStructWorker::openParagraph(const TQString& strTag, + const LayoutData& tqlayout,TQChar::Direction /*direction*/) { *m_streamOut << '<' << strTag << ">"; - openFormatData(layout.formatData,layout.formatData,true,(strTag[0]!='h')); + openFormatData(tqlayout.formatData,tqlayout.formatData,true,(strTag[0]!='h')); } -void HtmlDocStructWorker::closeParagraph(const QString& strTag, - const LayoutData& layout) +void HtmlDocStructWorker::closeParagraph(const TQString& strTag, + const LayoutData& tqlayout) { - closeFormatData(layout.formatData,layout.formatData,true,(strTag[0]!='h')); + closeFormatData(tqlayout.formatData,tqlayout.formatData,true,(strTag[0]!='h')); *m_streamOut << "</" << strTag << ">\n"; } diff --git a/filters/kword/html/export/ExportDocStruct.h b/filters/kword/html/export/ExportDocStruct.h index 507afd08..43b1e76a 100644 --- a/filters/kword/html/export/ExportDocStruct.h +++ b/filters/kword/html/export/ExportDocStruct.h @@ -31,11 +31,11 @@ public: virtual ~HtmlDocStructWorker(void) { } public: protected: - virtual QString getStartOfListOpeningTag(const CounterData::Style typeList, bool& ordered); - virtual void openParagraph(const QString& strTag, - const LayoutData& layout,QChar::Direction direction=QChar::DirL); - virtual void closeParagraph(const QString& strTag, - const LayoutData& layout); + virtual TQString getStartOfListOpeningTag(const CounterData::Style typeList, bool& ordered); + virtual void openParagraph(const TQString& strTag, + const LayoutData& tqlayout,TQChar::Direction direction=TQChar::DirL); + virtual void closeParagraph(const TQString& strTag, + const LayoutData& tqlayout); virtual void openSpan(const FormatData& formatOrigin, const FormatData& format); virtual void closeSpan(const FormatData& formatOrigin, const FormatData& format); private: diff --git a/filters/kword/html/export/ExportFilter.cc b/filters/kword/html/export/ExportFilter.cc index 87bd811f..225a51ea 100644 --- a/filters/kword/html/export/ExportFilter.cc +++ b/filters/kword/html/export/ExportFilter.cc @@ -18,12 +18,12 @@ * Boston, MA 02110-1301, USA. */ -#include <qstring.h> -#include <qtextcodec.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qdir.h> -#include <qpicture.h> +#include <tqstring.h> +#include <tqtextcodec.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqdir.h> +#include <tqpicture.h> #include <klocale.h> #include <kdebug.h> @@ -33,7 +33,7 @@ #include "ExportFilter.h" -QString HtmlWorker::escapeHtmlText(const QString& strText) const +TQString HtmlWorker::escapeHtmlText(const TQString& strText) const { // Escape quotes (needed in attributes) // Do not escape apostrophs (only allowed in XHTML!) @@ -45,7 +45,7 @@ bool HtmlWorker::makeTable(const FrameAnchor& anchor) *m_streamOut << "<table>\n"; *m_streamOut << "<tbody>\n"; - QValueList<TableCell>::ConstIterator itCell; + TQValueList<TableCell>::ConstIterator itCell; int rowCurrent=0; *m_streamOut << "<tr>\n"; @@ -82,11 +82,11 @@ bool HtmlWorker::makeTable(const FrameAnchor& anchor) return true; } -QString HtmlWorker::getAdditionalFileName(const QString& additionalName) +TQString HtmlWorker::getAdditionalFileName(const TQString& additionalName) { kdDebug(30503) << "HtmlWorker::getAdditionalFileName " << additionalName << endl; - QDir dir(m_strFileDir); + TQDir dir(m_strFileDir); kdDebug(30503) << "Base directory: " << m_strFileDir << endl; if (!dir.exists(m_strSubDirectoryName)) @@ -96,9 +96,9 @@ QString HtmlWorker::getAdditionalFileName(const QString& additionalName) dir.mkdir(m_strSubDirectoryName); } - QString strFileName(m_strSubDirectoryName); + TQString strFileName(m_strSubDirectoryName); strFileName+="/"; - const int result=additionalName.findRev("/"); + const int result=additionalName.tqfindRev("/"); if (result>=0) { strFileName+=additionalName.mid(result+1); @@ -110,7 +110,7 @@ QString HtmlWorker::getAdditionalFileName(const QString& additionalName) // Now, we have to create a backup file. - QString strBackupName(strFileName); + TQString strBackupName(strFileName); strBackupName+="~"; kdDebug(30503) << "Remove backup file: " << strBackupName << endl; // We need to remove the backup file, as not all filesystems or ports can do it themselves on a rename. @@ -123,13 +123,13 @@ QString HtmlWorker::getAdditionalFileName(const QString& additionalName) bool HtmlWorker::makeImage(const FrameAnchor& anchor) { - const QString strImageName(getAdditionalFileName(anchor.picture.koStoreName)); + const TQString strImageName(getAdditionalFileName(anchor.picture.koStoreName)); - QString strImagePath(m_strFileDir); + TQString strImagePath(m_strFileDir); strImagePath+='/'; strImagePath+=strImageName; - QByteArray image; + TQByteArray image; kdDebug(30503) << "Image " << anchor.picture.koStoreName << " will be written in " << strImageName << endl; @@ -140,8 +140,8 @@ bool HtmlWorker::makeImage(const FrameAnchor& anchor) const double height = anchor.frame.bottom - anchor.frame.top; const double width = anchor.frame.right - anchor.frame.left; - const int pos = anchor.picture.koStoreName.findRev( '.' ); - QString extension; + const int pos = anchor.picture.koStoreName.tqfindRev( '.' ); + TQString extension; if ( pos > -1 ) extension = anchor.picture.koStoreName.mid( pos+1 ).lower(); @@ -166,16 +166,16 @@ bool HtmlWorker::makeImage(const FrameAnchor& anchor) else if ( extension == "qpic" ) { - QPicture picture; + TQPicture picture; - QIODevice* io=getSubFileDevice(anchor.picture.koStoreName); + TQIODevice* io=getSubFileDevice(anchor.picture.koStoreName); if (!io) { // NO message error, as there must be already one return false; } - // TODO: if we have alreasy SVG, do *not* go through QPicture! + // TODO: if we have alreasy SVG, do *not* go through TQPicture! if (picture.load(io)) { @@ -215,7 +215,7 @@ bool HtmlWorker::makeImage(const FrameAnchor& anchor) // Do we still need to write the original picture? if ( writePicture ) { - QFile file(strImagePath); + TQFile file(strImagePath); if ( !file.open (IO_WriteOnly) ) { @@ -235,17 +235,17 @@ bool HtmlWorker::makeImage(const FrameAnchor& anchor) return true; } -void HtmlWorker::formatTextParagraph(const QString& strText, +void HtmlWorker::formatTextParagraph(const TQString& strText, const FormatData& formatOrigin, const FormatData& format) { - QString strEscaped(escapeHtmlText(strText)); + TQString strEscaped(escapeHtmlText(strText)); // Replace line feeds by line breaks int pos; - QString strBr(isXML()?QString("<br />"):QString("<br>")); - while ((pos=strEscaped.find(QChar(10)))>-1) + TQString strBr(isXML()?TQString("<br />"):TQString("<br>")); + while ((pos=strEscaped.tqfind(TQChar(10)))>-1) { - strEscaped.replace(pos,1,strBr); + strEscaped.tqreplace(pos,1,strBr); } if (!format.text.missing) @@ -274,14 +274,14 @@ void HtmlWorker::formatTextParagraph(const QString& strText, } } -void HtmlWorker::ProcessParagraphData (const QString& strTag, const QString ¶Text, - const LayoutData& layout, const ValueListFormatData ¶FormatDataList) +void HtmlWorker::ProcessParagraphData (const TQString& strTag, const TQString ¶Text, + const LayoutData& tqlayout, const ValueListFormatData ¶FormatDataList) { if (paraText.isEmpty() && paraFormatDataList.first().id != 6) { - openParagraph(strTag,layout); + openParagraph(strTag,tqlayout); *m_streamOut << " " ; // A paragraph can never be empty in HTML - closeParagraph(strTag,layout); + closeParagraph(strTag,tqlayout); } else { @@ -289,7 +289,7 @@ void HtmlWorker::ProcessParagraphData (const QString& strTag, const QString &par ValueListFormatData::ConstIterator paraFormatDataIt; - QString partialText; + TQString partialText; for ( paraFormatDataIt = paraFormatDataList.begin (); paraFormatDataIt != paraFormatDataList.end (); @@ -302,17 +302,17 @@ void HtmlWorker::ProcessParagraphData (const QString& strTag, const QString &par // For normal text, we need an opened paragraph if (paragraphNotOpened) { - openParagraph(strTag,layout,partialText.ref(0).direction()); + openParagraph(strTag,tqlayout,partialText.ref(0).direction()); paragraphNotOpened=false; } - formatTextParagraph(partialText,layout.formatData,*paraFormatDataIt); + formatTextParagraph(partialText,tqlayout.formatData,*paraFormatDataIt); } else if (4==(*paraFormatDataIt).id) { // For variables, we need an opened paragraph if (paragraphNotOpened) { - openParagraph(strTag,layout); + openParagraph(strTag,tqlayout); paragraphNotOpened=false; } if (9==(*paraFormatDataIt).variable.m_type) @@ -341,7 +341,7 @@ void HtmlWorker::ProcessParagraphData (const QString& strTag, const QString &par if (!paragraphNotOpened) { // The paragraph was opened, so close it. - closeParagraph(strTag,layout); + closeParagraph(strTag,tqlayout); } makeTable((*paraFormatDataIt).frameAnchor); // The paragraph will need to be opened again @@ -355,7 +355,7 @@ void HtmlWorker::ProcessParagraphData (const QString& strTag, const QString &par // <img> and <object> need to be in a paragraph if (paragraphNotOpened) { - openParagraph( strTag, layout,partialText.ref(0). direction() ); + openParagraph( strTag, tqlayout,partialText.ref(0). direction() ); paragraphNotOpened=false; } makeImage((*paraFormatDataIt).frameAnchor); @@ -370,36 +370,36 @@ void HtmlWorker::ProcessParagraphData (const QString& strTag, const QString &par if (!paragraphNotOpened) { // The paragraph was opened, so close it. - closeParagraph(strTag,layout); + closeParagraph(strTag,tqlayout); } } } -bool HtmlWorker::doFullParagraph(const QString& paraText, - const LayoutData& layout, const ValueListFormatData& paraFormatDataList) +bool HtmlWorker::doFullParagraph(const TQString& paraText, + const LayoutData& tqlayout, const ValueListFormatData& paraFormatDataList) { kdDebug(30503) << "Entering HtmlWorker::doFullParagraph" << endl << paraText << endl; - QString strParaText=paraText; - QString strTag; // Tag that will be written. + TQString strParaText=paraText; + TQString strTag; // Tag that will be written. - if ( layout.counter.numbering == CounterData::NUM_LIST ) + if ( tqlayout.counter.numbering == CounterData::NUM_LIST ) { - const uint layoutDepth=layout.counter.depth+1; // Word's depth starts at 0! + const uint tqlayoutDepth=tqlayout.counter.depth+1; // Word's depth starts at 0! const uint listDepth=m_listStack.size(); // We are in a list, but has it the right depth? - if (layoutDepth>listDepth) + if (tqlayoutDepth>listDepth) { ListInfo newList; - newList.m_typeList=layout.counter.style; - for (uint i=listDepth; i<layoutDepth; i++) + newList.m_typeList=tqlayout.counter.style; + for (uint i=listDepth; i<tqlayoutDepth; i++) { - *m_streamOut << getStartOfListOpeningTag(layout.counter.style,newList.m_orderedList); + *m_streamOut << getStartOfListOpeningTag(tqlayout.counter.style,newList.m_orderedList); m_listStack.push(newList); } } - else if (layoutDepth<listDepth) + else if (tqlayoutDepth<listDepth) { - for (uint i=listDepth; i>layoutDepth; i--) + for (uint i=listDepth; i>tqlayoutDepth; i--) { ListInfo oldList=m_listStack.pop(); if (oldList.m_orderedList) @@ -414,7 +414,7 @@ bool HtmlWorker::doFullParagraph(const QString& paraText, } // We have a list but does it have the right type? - if ( layout.counter.style!=m_listStack.top().m_typeList) + if ( tqlayout.counter.style!=m_listStack.top().m_typeList) { // No, then close the previous list ListInfo oldList=m_listStack.pop(); @@ -427,8 +427,8 @@ bool HtmlWorker::doFullParagraph(const QString& paraText, *m_streamOut << "</ul>\n"; } ListInfo newList; - *m_streamOut << getStartOfListOpeningTag(layout.counter.style,newList.m_orderedList); - newList.m_typeList=layout.counter.style; + *m_streamOut << getStartOfListOpeningTag(tqlayout.counter.style,newList.m_orderedList); + newList.m_typeList=tqlayout.counter.style; m_listStack.push(newList); } @@ -453,10 +453,10 @@ bool HtmlWorker::doFullParagraph(const QString& paraText, } } } - if ( (layout.counter.numbering == CounterData::NUM_CHAPTER) - && (layout.counter.depth<6) ) + if ( (tqlayout.counter.numbering == CounterData::NUM_CHAPTER) + && (tqlayout.counter.depth<6) ) { - strTag=QString("h%1").arg(layout.counter.depth + 1); // H1 ... H6 + strTag=TQString("h%1").tqarg(tqlayout.counter.depth + 1); // H1 ... H6 } else { @@ -464,15 +464,15 @@ bool HtmlWorker::doFullParagraph(const QString& paraText, } } - ProcessParagraphData(strTag, strParaText, layout, paraFormatDataList); + ProcessParagraphData(strTag, strParaText, tqlayout, paraFormatDataList); kdDebug(30503) << "Quiting HtmlWorker::doFullParagraph" << endl; return true; } -bool HtmlWorker::doOpenFile(const QString& filenameOut, const QString& /*to*/) +bool HtmlWorker::doOpenFile(const TQString& filenameOut, const TQString& /*to*/) { - m_ioDevice=new QFile(filenameOut); + m_ioDevice=TQT_TQIODEVICE(new TQFile(filenameOut)); if (!m_ioDevice) { @@ -486,11 +486,11 @@ bool HtmlWorker::doOpenFile(const QString& filenameOut, const QString& /*to*/) return false; } - m_streamOut=new QTextStream(m_ioDevice); + m_streamOut=new TQTextStream(m_ioDevice); if (!getCodec()) { - kdError(30503) << "Could not create QTextCodec! Aborting" << endl; + kdError(30503) << "Could not create TQTextCodec! Aborting" << endl; return false; } @@ -499,7 +499,7 @@ bool HtmlWorker::doOpenFile(const QString& filenameOut, const QString& /*to*/) m_streamOut->setCodec( getCodec() ); m_fileName=filenameOut; - QFileInfo base(m_fileName); + TQFileInfo base(m_fileName); m_strFileDir=base.dirPath(); m_strTitle=base.fileName(); m_strSubDirectoryName=base.fileName(); @@ -565,7 +565,7 @@ bool HtmlWorker::doCloseDocument(void) bool HtmlWorker::doFullDocumentInfo(const KWEFDocumentInfo& docInfo) { - QString strText=docInfo.title; + TQString strText=docInfo.title; if (!strText.isEmpty()) { m_strTitle=strText; // Set title only if it is not empty! @@ -584,7 +584,7 @@ bool HtmlWorker::doOpenHead(void) *m_streamOut << (isXML()?" /":"") << ">\n" ; // Say who we are (with the CVS revision number) in case we have a bug in our filter output! - QString strVersion("$Revision: 466447 $"); + TQString strVersion("$Revision: 466447 $"); // Eliminate the dollar signs // (We don't want that the version number changes if the HTML file is itself put in a CVS storage.) *m_streamOut << "<meta name=\"Generator\" content=\"KWord HTML Export Filter Version" diff --git a/filters/kword/html/export/ExportFilter.h b/filters/kword/html/export/ExportFilter.h index b1a939d0..f8446c1b 100644 --- a/filters/kword/html/export/ExportFilter.h +++ b/filters/kword/html/export/ExportFilter.h @@ -21,7 +21,7 @@ #ifndef EXPORTFILTERFULLPOWER_H #define EXPORTFILTERFULLPOWER_H -#include <qvaluestack.h> +#include <tqvaluestack.h> #include <KWEFBaseWorker.h> @@ -38,11 +38,11 @@ public: HtmlWorker(void) : m_ioDevice(NULL), m_streamOut(NULL) { } virtual ~HtmlWorker(void) { delete m_streamOut; delete m_ioDevice; } public: - virtual bool doOpenFile(const QString& filenameOut, const QString& to); + virtual bool doOpenFile(const TQString& filenameOut, const TQString& to); virtual bool doCloseFile(void); // Close file in normal conditions virtual bool doOpenDocument(void); virtual bool doCloseDocument(void); - virtual bool doFullParagraph(const QString& paraText, const LayoutData& layout, + virtual bool doFullParagraph(const TQString& paraText, const LayoutData& tqlayout, const ValueListFormatData& paraFormatDataList); virtual bool doFullDocumentInfo(const KWEFDocumentInfo& docInfo); virtual bool doOpenTextFrameSet(void); @@ -52,27 +52,27 @@ public: virtual bool doOpenBody(void); ///< HTML's \<body\> virtual bool doCloseBody(void); ///< HTML's \</body\> protected: - virtual QString getStartOfListOpeningTag(const CounterData::Style typeList, bool& ordered)=0; + virtual TQString getStartOfListOpeningTag(const CounterData::Style typeList, bool& ordered)=0; /** - * \note QChar::Direction is needed because the text flow can only + * \note TQChar::Direction is needed because the text flow can only * be detected from the actual string data */ - virtual void openParagraph(const QString& strTag, - const LayoutData& layout, QChar::Direction direction=QChar::DirL)=0; - virtual void closeParagraph(const QString& strTag, - const LayoutData& layout)=0; + virtual void openParagraph(const TQString& strTag, + const LayoutData& tqlayout, TQChar::Direction direction=TQChar::DirL)=0; + virtual void closeParagraph(const TQString& strTag, + const LayoutData& tqlayout)=0; virtual void openSpan(const FormatData& formatOrigin, const FormatData& format)=0; virtual void closeSpan(const FormatData& formatOrigin, const FormatData& format)=0; virtual void writeDocType(void); - virtual QString customCSSURL(void) const { return QString::null; } + virtual TQString customCSSURL(void) const { return TQString(); } public: inline bool isXML (void) const { return m_xml; } inline void setXML (const bool flag ) { m_xml=flag; } - inline QTextCodec* getCodec(void) const { return m_codec; } - inline void setCodec(QTextCodec* codec) { m_codec=codec; } + inline TQTextCodec* getCodec(void) const { return m_codec; } + inline void setCodec(TQTextCodec* codec) { m_codec=codec; } protected: - QString escapeHtmlText(const QString& strText) const; + TQString escapeHtmlText(const TQString& strText) const; /** * \brief Get file name for an additional file * @@ -81,23 +81,23 @@ protected: * \param additionalName is the wanted name * \return the path where the file has to be written */ - QString getAdditionalFileName(const QString& additionalName); + TQString getAdditionalFileName(const TQString& additionalName); private: - void ProcessParagraphData ( const QString& strTag, const QString ¶Text, - const LayoutData& layout, const ValueListFormatData ¶FormatDataList); - void formatTextParagraph(const QString& strText, + void ProcessParagraphData ( const TQString& strTag, const TQString ¶Text, + const LayoutData& tqlayout, const ValueListFormatData ¶FormatDataList); + void formatTextParagraph(const TQString& strText, const FormatData& formatOrigin, const FormatData& format); bool makeTable(const FrameAnchor& anchor); bool makeImage(const FrameAnchor& anchor); protected: - QIODevice* m_ioDevice; - QTextStream* m_streamOut; - QTextCodec* m_codec; ///< QTextCodec in which the file will be written - QString m_strTitle; - QString m_fileName; ///< Name of the output file - QString m_strFileDir; ///< Directory of the output file - QString m_strSubDirectoryName; ///< Name of the sub directory for the additional files - QValueStack<ListInfo> m_listStack; ///< Stack for list information + TQIODevice* m_ioDevice; + TQTextStream* m_streamOut; + TQTextCodec* m_codec; ///< TQTextCodec in which the file will be written + TQString m_strTitle; + TQString m_fileName; ///< Name of the output file + TQString m_strFileDir; ///< Directory of the output file + TQString m_strSubDirectoryName; ///< Name of the sub directory for the additional files + TQValueStack<ListInfo> m_listStack; ///< Stack for list information bool m_xml; }; diff --git a/filters/kword/html/export/htmlexport.cc b/filters/kword/html/export/htmlexport.cc index 3bc660c7..f8af8e3e 100644 --- a/filters/kword/html/export/htmlexport.cc +++ b/filters/kword/html/export/htmlexport.cc @@ -31,7 +31,7 @@ License version 2. */ -#include <qtextcodec.h> +#include <tqtextcodec.h> #include <kdebug.h> #include <kgenericfactory.h> @@ -57,11 +57,11 @@ K_EXPORT_COMPONENT_FACTORY( libhtmlexport, HTMLExportFactory( "kofficefilters" ) // HTMLExport // -HTMLExport::HTMLExport(KoFilter *, const char *, const QStringList &) : +HTMLExport::HTMLExport(KoFilter *, const char *, const TQStringList &) : KoFilter() { } -KoFilter::ConversionStatus HTMLExport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus HTMLExport::convert( const TQCString& from, const TQCString& to ) { if ((from != "application/x-kword") || (to != "text/html")) { @@ -78,7 +78,7 @@ KoFilter::ConversionStatus HTMLExport::convert( const QCString& from, const QCSt { worker=new HtmlCssWorker(); worker->setXML(true); - worker->setCodec(QTextCodec::codecForName("UTF-8")); + worker->setCodec(TQTextCodec::codecForName("UTF-8")); } else { @@ -118,7 +118,7 @@ KoFilter::ConversionStatus HTMLExport::convert( const QCString& from, const QCSt delete worker; return KoFilter::StupidError; } - KoFilter::ConversionStatus result=leader->convert(m_chain,from,to); + KoFilter::ConversiontqStatus result=leader->convert(m_chain,from,to); delete leader; delete worker; diff --git a/filters/kword/html/export/htmlexport.h b/filters/kword/html/export/htmlexport.h index cbaefb58..c4e73292 100644 --- a/filters/kword/html/export/htmlexport.h +++ b/filters/kword/html/export/htmlexport.h @@ -21,10 +21,10 @@ #ifndef HTMLEXPORT_H #define HTMLEXPORT_H -#include <qstring.h> -#include <qtextstream.h> -#include <qfile.h> -#include <qobject.h> +#include <tqstring.h> +#include <tqtextstream.h> +#include <tqfile.h> +#include <tqobject.h> #include <KoFilter.h> #include <KoStore.h> @@ -33,12 +33,13 @@ class HTMLExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - HTMLExport(KoFilter *parent, const char *name, const QStringList &); + HTMLExport(KoFilter *tqparent, const char *name, const TQStringList &); virtual ~HTMLExport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; #endif // HTMLEXPORT_H diff --git a/filters/kword/html/import/htmlimport.cpp b/filters/kword/html/import/htmlimport.cpp index afd8430c..2c403b2f 100644 --- a/filters/kword/html/import/htmlimport.cpp +++ b/filters/kword/html/import/htmlimport.cpp @@ -34,12 +34,12 @@ typedef KGenericFactory<HTMLImport, KoFilter> HTMLImportFactory; K_EXPORT_COMPONENT_FACTORY( libhtmlimport, HTMLImportFactory( "kofficefilters" ) ) -HTMLImport::HTMLImport(KoFilter *, const char*, const QStringList &) : +HTMLImport::HTMLImport(KoFilter *, const char*, const TQStringList &) : KoFilter() { // 123 } -KoFilter::ConversionStatus HTMLImport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus HTMLImport::convert( const TQCString& from, const TQCString& to ) { if(to!="application/x-kword" || from!="text/html") return KoFilter::NotImplemented; diff --git a/filters/kword/html/import/htmlimport.h b/filters/kword/html/import/htmlimport.h index a1ef5302..b383665b 100644 --- a/filters/kword/html/import/htmlimport.h +++ b/filters/kword/html/import/htmlimport.h @@ -20,9 +20,9 @@ #ifndef HTMLIMPORT_H #define HTMLIMPORT_H -#include <qstring.h> -#include <qfile.h> -#include <qobject.h> +#include <tqstring.h> +#include <tqfile.h> +#include <tqobject.h> #include <KoFilter.h> #include <KoStore.h> @@ -31,12 +31,13 @@ class HTMLImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - HTMLImport(KoFilter *parent, const char *name, const QStringList &); + HTMLImport(KoFilter *tqparent, const char *name, const TQStringList &); virtual ~HTMLImport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; #endif // HTMLIMPORT_H diff --git a/filters/kword/html/import/khtmlreader.cpp b/filters/kword/html/import/khtmlreader.cpp index a3d22356..1df58edf 100644 --- a/filters/kword/html/import/khtmlreader.cpp +++ b/filters/kword/html/import/khtmlreader.cpp @@ -23,14 +23,14 @@ #include <dom/dom_text.h> #include <dom/dom2_views.h> #include <dom/dom_doc.h> -#include <qcolor.h> +#include <tqcolor.h> #include <dom/dom_element.h> #include <dom/html_table.h> #include <khtmlview.h> -#include <qwidget.h> +#include <tqwidget.h> #include <kapplication.h> #include <dom/html_misc.h> -#include <qregexp.h> +#include <tqregexp.h> KHTMLReader::KHTMLReader(KWDWriter *w) { @@ -40,14 +40,14 @@ KHTMLReader::KHTMLReader(KWDWriter *w) } // if a troll ever sees this, he can't kill me anyway. (and he should kill dfaure first) -void qt_enter_modal( QWidget *widget ); -void qt_leave_modal( QWidget *widget ); +void qt_enter_modal( TQWidget *widget ); +void qt_leave_modal( TQWidget *widget ); bool KHTMLReader::filter(KURL url) { kdDebug(30503) << "KHTMLReader::filter" << endl; - QObject::connect(_html,SIGNAL(completed()),this,SLOT(completed())); + TQObject::connect(_html,TQT_SIGNAL(completed()),this,TQT_SLOT(completed())); _state.clear(); _list_depth=0; @@ -65,9 +65,9 @@ bool KHTMLReader::filter(KURL url) } //FIXME use synchronous IO instead of this hack if possible. - QWidget dummy(0,0,WType_Dialog | WShowModal); + TQWidget dummy(0,0,WType_Dialog | WShowModal); qt_enter_modal(&dummy); - qApp->enter_loop(); + tqApp->enter_loop(); qt_leave_modal(&dummy); return _it_worked; } @@ -80,7 +80,7 @@ HTMLReader_state *KHTMLReader::state() s->frameset=_writer->mainFrameset(); s->paragraph = _writer->addParagraph(s->frameset); s->format=_writer->currentFormat(s->paragraph,true); - s->layout=_writer->currentLayout(s->paragraph); + s->tqlayout=_writer->currentLayout(s->paragraph); s->in_pre_mode = false; _state.push(s); } @@ -93,7 +93,7 @@ HTMLReader_state *KHTMLReader::pushNewState() s->frameset=state()->frameset; s->paragraph=state()->paragraph; s->format=state()->format; - s->layout=state()->layout; + s->tqlayout=state()->tqlayout; s->in_pre_mode=state()->in_pre_mode; _writer->cleanUpParagraph(s->paragraph); _state.push(s); @@ -118,9 +118,9 @@ void KHTMLReader::popState() if (s->frameset == state()->frameset) { state()->paragraph=s->paragraph; - if ((state()->layout != s->layout)) + if ((state()->tqlayout != s->tqlayout)) { - if (_writer->getText(state()->paragraph).length()!=0) startNewLayout(false,state()->layout); + if (_writer->getText(state()->paragraph).length()!=0) startNewLayout(false,state()->tqlayout); } state()->format=_writer->startFormat(state()->paragraph, state()->format); } @@ -129,21 +129,21 @@ void KHTMLReader::popState() void KHTMLReader::startNewLayout(bool startNewFormat) { - QDomElement layout; - startNewLayout(startNewFormat,layout); + TQDomElement tqlayout; + startNewLayout(startNewFormat,tqlayout); } -void KHTMLReader::startNewLayout(bool startNewFormat, QDomElement layout) +void KHTMLReader::startNewLayout(bool startNewFormat, TQDomElement tqlayout) { kdDebug() << "entering startNewLayout" << endl; startNewParagraph(startNewFormat,true); - state()->layout=_writer->setLayout(state()->paragraph,layout); + state()->tqlayout=_writer->setLayout(state()->paragraph,tqlayout); } void KHTMLReader::completed() { kdDebug(30503) << "KHTMLReader::completed" << endl; - qApp->exit_loop(); + tqApp->exit_loop(); DOM::Document doc=_html->document(); // FIXME parse <HEAD> too DOM::NodeList list=doc.getElementsByTagName("body"); DOM::Node docbody=list.item(0); @@ -178,12 +178,12 @@ void KHTMLReader::parseNode(DOM::Node node) if (!t.isNull()) { _writer->addText(state()->paragraph,t.data().string(),1,state()->in_pre_mode); - return; // no children anymore... + return; // no tqchildren anymore... } // is this really needed ? it can't do harm anyway. state()->format=_writer->currentFormat(state()->paragraph,true); - state()->layout=_writer->currentLayout(state()->paragraph); + state()->tqlayout=_writer->currentLayout(state()->paragraph); pushNewState(); DOM::Element e=node; @@ -227,16 +227,16 @@ void KHTMLReader::parse_head(DOM::Element e) } \ } -// the state->layout=_writer->setLayout is meant to tell popState something changed in the layout, and a new -// layout should probably be started after closing. +// the state->tqlayout=_writer->setLayout is meant to tell popState something changed in the tqlayout, and a new +// tqlayout should probably be started after closing. #define _PL(x,a,b,c) { \ if (e.tagName().lower() == #x) \ { \ - state()->layout=_writer->setLayout(state()->paragraph,state()->layout);\ + state()->tqlayout=_writer->setLayout(state()->paragraph,state()->tqlayout);\ if (!(_writer->getText(state()->paragraph).isEmpty())) \ startNewParagraph(false,false); \ - _writer->layoutAttribute(state()->paragraph, #a,#b,#c); \ + _writer->tqlayoutAttribute(state()->paragraph, #a,#b,#c); \ return true; \ } \ } @@ -283,20 +283,20 @@ bool KHTMLReader::parseTag(DOM::Element e) return true; } -void KHTMLReader::startNewParagraph(bool startnewformat, bool startnewlayout) +void KHTMLReader::startNewParagraph(bool startnewformat, bool startnewtqlayout) { kdDebug() << "Entering startNewParagraph" << endl; - QDomElement qf=state()->format; - QDomElement ql=state()->layout; + TQDomElement qf=state()->format; + TQDomElement ql=state()->tqlayout; _writer->cleanUpParagraph(state()->paragraph); - if ((startnewlayout==true) || ql.isNull()) + if ((startnewtqlayout==true) || ql.isNull()) {state()->paragraph=_writer->addParagraph(state()->frameset);} else {state()->paragraph= - _writer->addParagraph(state()->frameset,state()->layout);} + _writer->addParagraph(state()->frameset,state()->tqlayout);} @@ -314,14 +314,14 @@ void KHTMLReader::startNewParagraph(bool startnewformat, bool startnewlayout) we don't want to start a new item, but we want to retain the list state. we do this by incrementing the 'environment depth' and changing the numbering type to 'no numbering' **/ - QString ct=_writer->getLayoutAttribute(state()->paragraph,"COUNTER","type"); + TQString ct=_writer->getLayoutAttribute(state()->paragraph,"COUNTER","type"); if ((!ct.isNull()) && (ct != "0")) { - _writer->layoutAttribute(state()->paragraph,"COUNTER","type","0"); - _writer->layoutAttribute(state()->paragraph,"COUNTER","numberingtype","0"); - _writer->layoutAttribute(state()->paragraph,"COUNTER","righttext",""); + _writer->tqlayoutAttribute(state()->paragraph,"COUNTER","type","0"); + _writer->tqlayoutAttribute(state()->paragraph,"COUNTER","numberingtype","0"); + _writer->tqlayoutAttribute(state()->paragraph,"COUNTER","righttext",""); int currdepth=(_writer->getLayoutAttribute(state()->paragraph,"COUNTER","depth")).toInt(); - _writer->layoutAttribute(state()->paragraph,"COUNTER","depth",QString("%1").arg(currdepth+1)); + _writer->tqlayoutAttribute(state()->paragraph,"COUNTER","depth",TQString("%1").tqarg(currdepth+1)); } } @@ -343,32 +343,32 @@ bool KHTMLReader::parse_CommonAttributes(DOM::Element e) { kdDebug(30503) << "entering KHTMLReader::parse_CommonAttributes" << endl; kdDebug(30503) << "tagName is " << e.tagName().string() << endl; - QString s=e.getAttribute("align").string(); + TQString s=e.getAttribute("align").string(); if (!s.isEmpty()) { _writer->formatAttribute(state()->paragraph,"FLOW","align",s); } - QRegExp rx( "h[0-9]+" ); + TQRegExp rx( "h[0-9]+" ); if ( 0 == rx.search( e.getAttribute("class").string() ) ) // example: <p class="h1" style="text-align:left; "> { kdDebug(30503) << "laying out with " << e.getAttribute("class").string() << endl; - _writer->layoutAttribute(state()->paragraph,"NAME","value",e.getAttribute("class").string()); + _writer->tqlayoutAttribute(state()->paragraph,"NAME","value",e.getAttribute("class").string()); } if ( e.getAttribute("class").string()=="Standard" ) { kdDebug(30503) << "laying out with " << e.getAttribute("class").string() << endl; - _writer->layoutAttribute(state()->paragraph,"NAME","value",e.getAttribute("class").string()); + _writer->tqlayoutAttribute(state()->paragraph,"NAME","value",e.getAttribute("class").string()); } kdDebug(30503) << "leaving parse_CommonAttributes" << endl; return true; } bool KHTMLReader::parse_a(DOM::Element e) { - QString url = e.getAttribute("href").string(); + TQString url = e.getAttribute("href").string(); if (!url.isEmpty()) { - QString linkName; + TQString linkName; DOM::Text t = e.firstChild(); if (t.isNull()) { /* Link without text -> just drop it*/ @@ -403,13 +403,13 @@ bool KHTMLReader::parse_hr(DOM::Element /*e*/) bool KHTMLReader::parse_br(DOM::Element /*e*/) { - startNewParagraph(false,false); //keep the current format and layout + startNewParagraph(false,false); //keep the current format and tqlayout return false; // a BR tag has no childs. } -static const QColor parsecolor(const QString& colorstring) +static const TQColor parsecolor(const TQString& colorstring) { - QColor color; + TQColor color; if (colorstring[0]=='#') { color.setRgb( @@ -420,7 +420,7 @@ static const QColor parsecolor(const QString& colorstring) } else { - QString colorlower=colorstring.lower(); + TQString colorlower=colorstring.lower(); // Grays if (colorlower=="black") color.setRgb(0,0,0); @@ -486,18 +486,18 @@ void KHTMLReader::parseStyle(DOM::Element e) } // process e.g. <style="color: #ffffff"> - if ( s1.getPropertyValue("color").string() != QString() ) + if ( s1.getPropertyValue("color").string() != TQString() ) { - QColor c=parsecolor(s1.getPropertyValue("color").string()); - _writer->formatAttribute(state()->paragraph,"COLOR","red",QString::number(c.red())); - _writer->formatAttribute(state()->paragraph,"COLOR","green",QString::number(c.green())); - _writer->formatAttribute(state()->paragraph,"COLOR","blue",QString::number(c.blue())); + TQColor c=parsecolor(s1.getPropertyValue("color").string()); + _writer->formatAttribute(state()->paragraph,"COLOR","red",TQString::number(c.red())); + _writer->formatAttribute(state()->paragraph,"COLOR","green",TQString::number(c.green())); + _writer->formatAttribute(state()->paragraph,"COLOR","blue",TQString::number(c.blue())); } // done // process e.g. <style="font-size: 42"> - if ( s1.getPropertyValue("font-size").string() != QString() ) + if ( s1.getPropertyValue("font-size").string() != TQString() ) { - QString size=s1.getPropertyValue("font-size").string(); + TQString size=s1.getPropertyValue("font-size").string(); if (size.endsWith("pt")) { size=size.left(size.length()-2); @@ -506,10 +506,10 @@ void KHTMLReader::parseStyle(DOM::Element e) } // done // process e.g. <style="text-align: center">this is in the center</style> - if ( s1.getPropertyValue("text-align").string() != QString() && s1.getPropertyValue("text-align").string() != QString("left") ) + if ( s1.getPropertyValue("text-align").string() != TQString() && s1.getPropertyValue("text-align").string() != TQString("left") ) { - state()->layout=_writer->setLayout(state()->paragraph,state()->layout); - _writer->layoutAttribute(state()->paragraph, "FLOW","align",s1.getPropertyValue("text-align").string()); + state()->tqlayout=_writer->setLayout(state()->paragraph,state()->tqlayout); + _writer->tqlayoutAttribute(state()->paragraph, "FLOW","align",s1.getPropertyValue("text-align").string()); } // done @@ -520,11 +520,11 @@ void KHTMLReader::parseStyle(DOM::Element e) // debugging code. kdDebug(30503) << "e.style()" << endl; for (unsigned int i=0;i<s1.length();i++) { - kdDebug(30503) << QString("%1: %2").arg(s1.item(i).string()).arg(s1.getPropertyValue(s1.item(i)).string()) << endl; + kdDebug(30503) << TQString("%1: %2").tqarg(s1.item(i).string()).tqarg(s1.getPropertyValue(s1.item(i)).string()) << endl; } kdDebug(30503) << "override style" << endl; for (unsigned int i=0;i<s2.length();i++) { - kdDebug(30503) << QString("%1: %2").arg(s2.item(i).string()).arg(s2.getPropertyValue(s2.item(i)).string()) << endl; + kdDebug(30503) << TQString("%1: %2").tqarg(s2.item(i).string()).tqarg(s2.getPropertyValue(s2.item(i)).string()) << endl; } */ } @@ -554,7 +554,7 @@ bool KHTMLReader::parse_table(DOM::Element e) int nrow=0; int ncol=0; bool has_borders=false; - QColor bgcolor=parsecolor("#FFFFFF"); + TQColor bgcolor=parsecolor("#FFFFFF"); if (!table_body.getAttribute("bgcolor").string().isEmpty()) bgcolor=parsecolor(table_body.getAttribute("bgcolor").string()); @@ -566,21 +566,21 @@ bool KHTMLReader::parse_table(DOM::Element e) for (DOM::Node rowsnode=table_body.firstChild();!rowsnode.isNull();rowsnode=rowsnode.nextSibling()) { DOM::Element rows = rowsnode; if (!rows.isNull() && rows.tagName().string().lower() == "tr") { - QColor obgcolor=bgcolor; + TQColor obgcolor=bgcolor; if (!rows.getAttribute("bgcolor").string().isEmpty()) bgcolor=parsecolor(rows.getAttribute("bgcolor").string()); ncol=0; for (DOM::Node colsnode=rows.firstChild();!colsnode.isNull();colsnode=colsnode.nextSibling()) { DOM::Element cols = colsnode; - const QString nodename = cols.isNull() ? QString::null : cols.nodeName().string().lower(); + const TQString nodename = cols.isNull() ? TQString() : cols.nodeName().string().lower(); if (nodename == "td" || nodename == "th") { - QColor bbgcolor=bgcolor; + TQColor bbgcolor=bgcolor; if (!cols.getAttribute("bgcolor").string().isEmpty()) bgcolor=parsecolor(cols.getAttribute("bgcolor").string()); pushNewState(); - QRect colrect=cols.getRect(); + TQRect colrect=cols.getRect(); state()->frameset=_writer->createTableCell(tableno,nrow,ncol,1,colrect); state()->frameset.firstChild().toElement().setAttribute("bkRed",bgcolor.red()); state()->frameset.firstChild().toElement().setAttribute("bkGreen",bgcolor.green()); @@ -614,7 +614,7 @@ bool KHTMLReader::parse_table(DOM::Element e) bool KHTMLReader::parse_img(DOM::Element /*e*/) { - //QRect e=e.getRect(); + //TQRect e=e.getRect(); return true; } @@ -628,19 +628,19 @@ bool KHTMLReader::parse_pre(DOM::Element e) _writer->addText(state()->paragraph,htmlelement.innerHTML().string(),1); startNewParagraph(); //popState(); - return false; // children are already handled. + return false; // tqchildren are already handled. #else pushNewState(); state()->in_pre_mode=true; - QString face=e.getAttribute("face").string(); - _writer->formatAttribute(state()->paragraph,"FONT","name",QString("Courier")); + TQString face=e.getAttribute("face").string(); + _writer->formatAttribute(state()->paragraph,"FONT","name",TQString("Courier")); for (DOM::Node q=e.firstChild(); !q.isNull(); q=q.nextSibling()) { parseNode(q); // parse everything... } popState(); _writer->formatAttribute(state()->paragraph,"FONT","name",face); - return false; // children are already handled. + return false; // tqchildren are already handled. #endif } @@ -653,11 +653,11 @@ bool KHTMLReader::parse_font(DOM::Element e) { kdDebug(30503) << "Entering parse_font" << endl; // fixme don't hardcode 12 font size ... - QString face=e.getAttribute("face").string(); - QColor color=parsecolor("#000000"); + TQString face=e.getAttribute("face").string(); + TQColor color=parsecolor("#000000"); if (!e.getAttribute("color").string().isEmpty()) color=parsecolor(e.getAttribute("color").string()); - QString size=e.getAttribute("size").string(); + TQString size=e.getAttribute("size").string(); int isize=-1; if (size.startsWith("+")) isize=12+size.right(size.length()-1).toInt(); @@ -668,11 +668,11 @@ bool KHTMLReader::parse_font(DOM::Element e) _writer->formatAttribute(state()->paragraph,"FONT","name",face); if ((isize>=0) && (isize != 12)) - _writer->formatAttribute(state()->paragraph,"SIZE","value",QString("%1").arg(isize)); + _writer->formatAttribute(state()->paragraph,"SIZE","value",TQString("%1").tqarg(isize)); - _writer->formatAttribute(state()->paragraph,"COLOR","red",QString("%1").arg(color.red())); - _writer->formatAttribute(state()->paragraph,"COLOR","green",QString("%1").arg(color.green())); - _writer->formatAttribute(state()->paragraph,"COLOR","blue",QString("%1").arg(color.blue())); + _writer->formatAttribute(state()->paragraph,"COLOR","red",TQString("%1").tqarg(color.red())); + _writer->formatAttribute(state()->paragraph,"COLOR","green",TQString("%1").tqarg(color.green())); + _writer->formatAttribute(state()->paragraph,"COLOR","blue",TQString("%1").tqarg(color.blue())); return true; } @@ -684,7 +684,7 @@ bool KHTMLReader::parse_ul(DOM::Element e) _list_depth++; if (e.firstChild().nodeName().string().lower() == "#text") // e.g. <ul>this is indented<li>first listitem</li></ul> { - _writer->layoutAttribute(state()->paragraph,"COUNTER","depth",QString("%1").arg(_list_depth-1)); // indent + _writer->tqlayoutAttribute(state()->paragraph,"COUNTER","depth",TQString("%1").tqarg(_list_depth-1)); // indent startNewLayout(); } for (DOM::Node items=e.firstChild();!items.isNull();items=items.nextSibling()) @@ -692,21 +692,21 @@ bool KHTMLReader::parse_ul(DOM::Element e) if (items.nodeName().string().lower() == "li") { if (!(_writer->getText(state()->paragraph).isEmpty())) startNewLayout(); - _writer->layoutAttribute(state()->paragraph,"COUNTER","numberingtype","1"); - _writer->layoutAttribute(state()->paragraph,"COUNTER","righttext","."); + _writer->tqlayoutAttribute(state()->paragraph,"COUNTER","numberingtype","1"); + _writer->tqlayoutAttribute(state()->paragraph,"COUNTER","righttext","."); if (e.tagName().string().lower() == "ol") { - _writer->layoutAttribute(state()->paragraph,"COUNTER","type","1"); - _writer->layoutAttribute(state()->paragraph,"COUNTER","numberingtype","1"); - _writer->layoutAttribute(state()->paragraph,"COUNTER","righttext","."); + _writer->tqlayoutAttribute(state()->paragraph,"COUNTER","type","1"); + _writer->tqlayoutAttribute(state()->paragraph,"COUNTER","numberingtype","1"); + _writer->tqlayoutAttribute(state()->paragraph,"COUNTER","righttext","."); } else { - _writer->layoutAttribute(state()->paragraph,"COUNTER","type","10"); - _writer->layoutAttribute(state()->paragraph,"COUNTER","numberingtype",""); - _writer->layoutAttribute(state()->paragraph,"COUNTER","righttext",""); + _writer->tqlayoutAttribute(state()->paragraph,"COUNTER","type","10"); + _writer->tqlayoutAttribute(state()->paragraph,"COUNTER","numberingtype",""); + _writer->tqlayoutAttribute(state()->paragraph,"COUNTER","righttext",""); } - _writer->layoutAttribute(state()->paragraph,"COUNTER","depth",QString("%1").arg(_list_depth-1)); // indent + _writer->tqlayoutAttribute(state()->paragraph,"COUNTER","depth",TQString("%1").tqarg(_list_depth-1)); // indent } parseNode(items); } diff --git a/filters/kword/html/import/khtmlreader.h b/filters/kword/html/import/khtmlreader.h index c5b4c6b6..9987a589 100644 --- a/filters/kword/html/import/khtmlreader.h +++ b/filters/kword/html/import/khtmlreader.h @@ -20,11 +20,11 @@ #define KHTMLREADER_H #include <khtml_part.h> // fixme speedup compile time by moving these into the cpp file. -#include <qdom.h> -#include <qptrstack.h> +#include <tqdom.h> +#include <tqptrstack.h> #include <kwdwriter.h> -//#include <qstack.h> +//#include <tqstack.h> /** *@author Frank Dekervel @@ -36,16 +36,17 @@ namespace DOM { } struct HTMLReader_state { - QDomElement format; - QDomElement frameset; - QDomElement paragraph; - QDomElement layout; + TQDomElement format; + TQDomElement frameset; + TQDomElement paragraph; + TQDomElement tqlayout; bool in_pre_mode; // keep formatting as is. }; -class KHTMLReader: public QObject { +class KHTMLReader: public TQObject { Q_OBJECT + TQ_OBJECT public: KHTMLReader(KWDWriter *writer); @@ -66,18 +67,18 @@ private: void popState(); - /* void stateSetFormat(QDomElement f); - void stateSetFrameset(QDomElement f); - void stateSetLayout(QDomElement l); - void stateSetParagraph(QDomElement p);*/ + /* void stateSetFormat(TQDomElement f); + void stateSetFrameset(TQDomElement f); + void stateSetLayout(TQDomElement l); + void stateSetParagraph(TQDomElement p);*/ - QPtrStack<HTMLReader_state> _state; + TQPtrStack<HTMLReader_state> _state; KHTMLPart *_html; KWDWriter *_writer; void startNewLayout(bool startNewFormat=false); - void startNewLayout(bool startNewFormat, QDomElement layout); - void startNewParagraph(bool startnewformat=true, bool startnewlayout=true); + void startNewLayout(bool startNewFormat, TQDomElement tqlayout); + void startNewParagraph(bool startnewformat=true, bool startnewtqlayout=true); bool _it_worked; // ----------------------------------------------------- int _list_depth; diff --git a/filters/kword/html/import/kwdwriter.cpp b/filters/kword/html/import/kwdwriter.cpp index 3a7e0aea..d2e4c450 100644 --- a/filters/kword/html/import/kwdwriter.cpp +++ b/filters/kword/html/import/kwdwriter.cpp @@ -18,32 +18,32 @@ #include "kwdwriter.h" #include <stdlib.h> -#include "qrect.h" +#include "tqrect.h" #include <KoTextZoomHandler.h> -#include <qpaintdevice.h> +#include <tqpaintdevice.h> KWDWriter::KWDWriter(KoStore *store){ _zoomhandler = new KoTextZoomHandler(); _store=store; - _doc= new QDomDocument("DOC"); - _docinfo = new QDomDocument("document-info"); + _doc= new TQDomDocument("DOC"); + _docinfo = new TQDomDocument("document-info"); _doc->appendChild( _doc->createProcessingInstruction( "xml", "version=\"1.0\" encoding=\"UTF-8\"" ) ); _docinfo->appendChild( _docinfo->createProcessingInstruction( "xml", "version=\"1.0\" encoding=\"UTF-8\"" ) ); - QDomElement infodoc = _docinfo->createElement( "document-info" ); + TQDomElement infodoc = _docinfo->createElement( "document-info" ); _docinfoMain=infodoc; _docinfo->appendChild(infodoc); tableNo=1; insidetable = false; - QDomElement kwdoc = _doc->createElement( "DOC" ); + TQDomElement kwdoc = _doc->createElement( "DOC" ); kwdoc.setAttribute( "editor", "HTML Import Filter" ); kwdoc.setAttribute( "mime", "application/x-kword" ); _doc->appendChild( kwdoc ); - QDomElement paper = _doc->createElement( "PAPER" ); + TQDomElement paper = _doc->createElement( "PAPER" ); kwdoc.appendChild( paper ); paper.setAttribute( "format", 1 ); paper.setAttribute( "width", 595 ); @@ -54,14 +54,14 @@ KWDWriter::KWDWriter(KoStore *store){ paper.setAttribute( "hType", 0 ); paper.setAttribute( "fType", 0 ); - QDomElement borders = _doc->createElement( "PAPERBORDERS" ); + TQDomElement borders = _doc->createElement( "PAPERBORDERS" ); paper.appendChild( borders ); borders.setAttribute( "left", 20 ); borders.setAttribute( "top", 10 ); borders.setAttribute( "right", 10 ); borders.setAttribute( "bottom", 10 ); - QDomElement docattrs = _doc->createElement( "ATTRIBUTES" ); + TQDomElement docattrs = _doc->createElement( "ATTRIBUTES" ); kwdoc.appendChild( docattrs ); docattrs.setAttribute( "processing", 0 ); docattrs.setAttribute( "standardpage", 1 ); @@ -69,19 +69,19 @@ KWDWriter::KWDWriter(KoStore *store){ docattrs.setAttribute( "hasFooter", 0 ); //docattrs.setAttribute( "unit", "mm" ); // use KWord default instead - QDomElement framesets = _doc->createElement("FRAMESETS"); + TQDomElement framesets = _doc->createElement("FRAMESETS"); kwdoc.appendChild(framesets); - QDomElement rootframeset = addFrameSet(framesets); + TQDomElement rootframeset = addFrameSet(framesets); _mainFrameset=rootframeset; - QDomElement mainframe= addFrame(rootframeset,QRect(28,28,539,757)); + TQDomElement mainframe= addFrame(rootframeset,TQRect(28,28,539,757)); - QDomElement styles=_doc->createElement("STYLES"); + TQDomElement styles=_doc->createElement("STYLES"); kwdoc.appendChild(styles); - QDomElement standard=_doc->createElement("STYLE"); + TQDomElement standard=_doc->createElement("STYLE"); styles.appendChild(standard); - QDomElement tmp; + TQDomElement tmp; tmp=_doc->createElement("NAME"); tmp.setAttribute("value","Standard"); standard.appendChild(tmp); @@ -89,7 +89,7 @@ KWDWriter::KWDWriter(KoStore *store){ tmp=_doc->createElement("FOLLOWING"); tmp.setAttribute("name","Standard"); standard.appendChild(tmp); - QDomElement fmt; + TQDomElement fmt; fmt=_doc->createElement("FORMAT"); fmt.setAttribute("id","1"); @@ -134,15 +134,15 @@ int KWDWriter::createTable() { return tableNo++; } -void KWDWriter::createDocInfo(QString author, QString title) { - QDomElement authorTag=_docinfo->createElement("author"); - QDomElement aboutTag=_docinfo->createElement("about"); - QDomElement fullNameTag=_docinfo->createElement("full-name"); - QDomText titleText=_docinfo->createTextNode(title); - QDomText authorText=_docinfo->createTextNode(author); +void KWDWriter::createDocInfo(TQString author, TQString title) { + TQDomElement authorTag=_docinfo->createElement("author"); + TQDomElement aboutTag=_docinfo->createElement("about"); + TQDomElement fullNameTag=_docinfo->createElement("full-name"); + TQDomText titleText=_docinfo->createTextNode(title); + TQDomText authorText=_docinfo->createTextNode(author); fullNameTag.appendChild(authorText); authorTag.appendChild(fullNameTag); - QDomElement titleTag=_docinfo->createElement("title"); + TQDomElement titleTag=_docinfo->createElement("title"); titleTag.appendChild(titleText); aboutTag.appendChild(titleTag); _docinfoMain.appendChild(authorTag); @@ -150,7 +150,7 @@ void KWDWriter::createDocInfo(QString author, QString title) { } -void KWDWriter::createInline(QDomElement paragraph, QDomElement toInline) { +void KWDWriter::createInline(TQDomElement paragraph, TQDomElement toInline) { if (toInline.tagName() == "FRAMESET") { formatAttribute(paragraph,"ANCHOR","type","frameset"); // fixme: support other kinds of inlines. @@ -162,20 +162,20 @@ void KWDWriter::createInline(QDomElement paragraph, QDomElement toInline) { } -QDomElement KWDWriter::currentLayout(QDomElement paragraph) { +TQDomElement KWDWriter::currentLayout(TQDomElement paragraph) { return paragraph.elementsByTagName("LAYOUT").item(0).toElement(); } -QDomElement KWDWriter::createTableCell(int tableno, int nrow, - int ncol, int colspan, QRect rect) { - QDomElement parent=docroot().elementsByTagName("FRAMESETS").item(0).toElement(); +TQDomElement KWDWriter::createTableCell(int tableno, int nrow, + int ncol, int colspan, TQRect rect) { + TQDomElement tqparent=docroot().elementsByTagName("FRAMESETS").item(0).toElement(); - QDomElement fs=addFrameSet(parent,1,0, - QString("Table %1 - %2,%3").arg(tableno).arg(nrow).arg(ncol), + TQDomElement fs=addFrameSet(tqparent,1,0, + TQString("Table %1 - %2,%3").tqarg(tableno).tqarg(nrow).tqarg(ncol), 1); - fs.setAttribute("grpMgr",QString("Table %1").arg(tableno)); + fs.setAttribute("grpMgr",TQString("Table %1").tqarg(tableno)); fs.setAttribute("row",nrow); fs.setAttribute("col",ncol); fs.setAttribute("cols",colspan); // FIXME do colspan in finishTable @@ -185,16 +185,16 @@ QDomElement KWDWriter::createTableCell(int tableno, int nrow, return fs; } -QDomElement KWDWriter::fetchTableCell(int tableno, int rowno, int colno) { - QDomNodeList e=docroot().elementsByTagName("FRAMESET"); +TQDomElement KWDWriter::fetchTableCell(int tableno, int rowno, int colno) { + TQDomNodeList e=docroot().elementsByTagName("FRAMESET"); for (unsigned int i=0;i<e.count();i++) { - QDomElement k=e.item(i).toElement(); - if (k.attribute("grpMgr") == QString("Table %1").arg(tableno)) - if (k.attribute("row") == QString("%1").arg(rowno)) - if (k.attribute("col") == QString("%1").arg(colno)) + TQDomElement k=e.item(i).toElement(); + if (k.attribute("grpMgr") == TQString("Table %1").tqarg(tableno)) + if (k.attribute("row") == TQString("%1").tqarg(rowno)) + if (k.attribute("col") == TQString("%1").tqarg(colno)) return k; } - QDomElement dummy; + TQDomElement dummy; return dummy; } @@ -202,15 +202,15 @@ QDomElement KWDWriter::fetchTableCell(int tableno, int rowno, int colno) { #define MIN(x,y) ((x < y) ? x : y) void KWDWriter::finishTable(int tableno) { - finishTable(tableno,QRect(-1,-1,-1,-1)); + finishTable(tableno,TQRect(-1,-1,-1,-1)); } -void KWDWriter::createHR(QDomElement paragraph, int width) { - layoutAttribute(paragraph,"BOTTOMBORDER","width",QString("%1").arg(width)); +void KWDWriter::createHR(TQDomElement paragraph, int width) { + tqlayoutAttribute(paragraph,"BOTTOMBORDER","width",TQString("%1").tqarg(width)); } -void KWDWriter::finishTable(int tableno,QRect rect) { +void KWDWriter::finishTable(int tableno,TQRect rect) { int ncols=0; int nrows=0; insidetable = false; @@ -220,14 +220,14 @@ void KWDWriter::finishTable(int tableno,QRect rect) { int w=rect.width(); int h=rect.height(); - QDomNodeList nl=docroot().elementsByTagName("FRAMESET"); + TQDomNodeList nl=docroot().elementsByTagName("FRAMESET"); //FIXME calculate nrows and stuff. //and add empty cells for missing ones. // first, see how big the table is (cols & rows) for (unsigned i=0;i<nl.count();i++) { - QDomElement k=nl.item(i).toElement(); - if (k.attribute("grpMgr") == QString("Table %1").arg(tableno)) { + TQDomElement k=nl.item(i).toElement(); + if (k.attribute("grpMgr") == TQString("Table %1").tqarg(tableno)) { ncols=MAX(ncols,k.attribute("col").toInt()+1); nrows=MAX(nrows,k.attribute("row").toInt()+1); } @@ -248,23 +248,23 @@ void KWDWriter::finishTable(int tableno,QRect rect) { while (currow < nrows) { curcol=0; while (curcol < ncols) { - QDomElement e=fetchTableCell(tableno,currow,curcol); + TQDomElement e=fetchTableCell(tableno,currow,curcol); if (e.isNull()) { // a missing cell ! - kdDebug(30503) << QString("creating %1 %2").arg(currow).arg(curcol).latin1() << endl; + kdDebug(30503) << TQString("creating %1 %2").tqarg(currow).tqarg(curcol).latin1() << endl; createTableCell(tableno,currow,curcol,1, - QRect(x+step_x*curcol,y+step_y*currow,step_x,step_y) + TQRect(x+step_x*curcol,y+step_y*currow,step_x,step_y) ); // fixme: what to do if we don't have to resize ? } // resize this one FIXME optimize this routine if (must_resize == true) { - QDomElement ee=e.firstChild().toElement(); // the frame in the frameset + TQDomElement ee=e.firstChild().toElement(); // the frame in the frameset int cs=e.attribute("cols").toInt(); int rs=e.attribute("rows").toInt(); kdDebug(30503) << "resizing" << endl; - addRect(ee,QRect(x+step_x*curcol,0,step_x*cs,step_y*rs)); + addRect(ee,TQRect(x+step_x*curcol,0,step_x*cs,step_y*rs)); } if (curcol==0) currow_inc=e.attribute("rows").toInt(); curcol +=e.attribute("cols").toInt(); @@ -278,11 +278,11 @@ void KWDWriter::finishTable(int tableno,QRect rect) { } -QDomElement KWDWriter::addFrameSet(QDomElement parent, int frametype, - int frameinfo, QString name, int visible) { +TQDomElement KWDWriter::addFrameSet(TQDomElement tqparent, int frametype, + int frameinfo, TQString name, int visible) { - QDomElement frameset=_doc->createElement("FRAMESET"); - parent.appendChild(frameset); + TQDomElement frameset=_doc->createElement("FRAMESET"); + tqparent.appendChild(frameset); frameset.setAttribute("frameType",frametype); frameset.setAttribute("frameInfo",frameinfo); @@ -295,17 +295,17 @@ QDomElement KWDWriter::addFrameSet(QDomElement parent, int frametype, return frameset; } -QDomElement KWDWriter::addParagraph(QDomElement parent) { - QDomElement k; - return addParagraph(parent,k); +TQDomElement KWDWriter::addParagraph(TQDomElement tqparent) { + TQDomElement k; + return addParagraph(tqparent,k); } -void KWDWriter::appendKWordVariable(QDomDocument& doc, QDomElement& format, - const QString& text, const QString& key, int type, QDomElement& child) { +void KWDWriter::appendKWordVariable(TQDomDocument& doc, TQDomElement& format, + const TQString& text, const TQString& key, int type, TQDomElement& child) { - QDomElement variableElement ( doc.createElement("VARIABLE") ); + TQDomElement variableElement ( doc.createElement("VARIABLE") ); - QDomElement typeElement ( doc.createElement("TYPE") ); + TQDomElement typeElement ( doc.createElement("TYPE") ); typeElement.setAttribute("key",key); typeElement.setAttribute("type",type); typeElement.setAttribute("text",text); @@ -316,11 +316,11 @@ void KWDWriter::appendKWordVariable(QDomDocument& doc, QDomElement& format, format.appendChild(variableElement); } -QDomElement KWDWriter::createLink(QDomElement paragraph, QString linkName, QString hrefName) { - QDomElement linkElement = _doc->createElement("LINK"); +TQDomElement KWDWriter::createLink(TQDomElement paragraph, TQString linkName, TQString hrefName) { + TQDomElement linkElement = _doc->createElement("LINK"); linkElement.setAttribute( "linkName", linkName ); linkElement.setAttribute( "hrefName", hrefName ); - QDomElement format = currentFormat(paragraph,true); + TQDomElement format = currentFormat(paragraph,true); format.setAttribute("id", 4); // change Variable appendKWordVariable(*_doc, format, linkName, "STRING", 9, linkElement); @@ -328,23 +328,23 @@ QDomElement KWDWriter::createLink(QDomElement paragraph, QString linkName, QStri } -QDomElement KWDWriter::setLayout(QDomElement paragraph, QDomElement layout) { - QDomElement theLayout; - if (layout.isNull()) +TQDomElement KWDWriter::setLayout(TQDomElement paragraph, TQDomElement tqlayout) { + TQDomElement theLayout; + if (tqlayout.isNull()) theLayout=_doc->createElement("LAYOUT"); else - theLayout=layout.cloneNode().toElement(); - QDomElement oldLayout=currentLayout(paragraph); + theLayout=tqlayout.cloneNode().toElement(); + TQDomElement oldLayout=currentLayout(paragraph); paragraph.removeChild(oldLayout); paragraph.appendChild(theLayout); return theLayout; } -QRect getRect(QDomElement frameset) { +TQRect getRect(TQDomElement frameset) { // returns the rect of the first frame. - QDomElement frame=frameset.elementsByTagName("FRAME").item(0).toElement(); - return QRect(frame.attribute("left").toInt(), + TQDomElement frame=frameset.elementsByTagName("FRAME").item(0).toElement(); + return TQRect(frame.attribute("left").toInt(), frame.attribute("top").toInt(), frame.attribute("right").toInt()-frame.attribute("left").toInt(), frame.attribute("bottom").toInt()-frame.attribute("top").toInt() @@ -353,39 +353,39 @@ QRect getRect(QDomElement frameset) { } -QDomElement KWDWriter::addParagraph(QDomElement parent, QDomElement layoutToClone) { +TQDomElement KWDWriter::addParagraph(TQDomElement tqparent, TQDomElement tqlayoutToClone) { - QDomElement paragraph=_doc->createElement("PARAGRAPH"); - QDomElement formats=_doc->createElement("FORMATS"); - QDomElement layout; - if (layoutToClone.isNull()) { - layout=_doc->createElement("LAYOUT"); + TQDomElement paragraph=_doc->createElement("PARAGRAPH"); + TQDomElement formats=_doc->createElement("FORMATS"); + TQDomElement tqlayout; + if (tqlayoutToClone.isNull()) { + tqlayout=_doc->createElement("LAYOUT"); } else { - layout=layoutToClone.cloneNode().toElement(); + tqlayout=tqlayoutToClone.cloneNode().toElement(); } - QDomElement text=_doc->createElement("TEXT"); - QDomText t=_doc->createTextNode(QString("")); + TQDomElement text=_doc->createElement("TEXT"); + TQDomText t=_doc->createTextNode(TQString("")); text.appendChild(t); paragraph.appendChild(formats); paragraph.appendChild(text); - parent.appendChild(paragraph); - paragraph.appendChild(layout); - layoutAttribute(paragraph,"NAME","value","Standard"); + tqparent.appendChild(paragraph); + paragraph.appendChild(tqlayout); + tqlayoutAttribute(paragraph,"NAME","value","Standard"); return paragraph; } -QDomElement KWDWriter::formatAttribute(QDomElement paragraph, QString name, QString attrName, QString attr) { +TQDomElement KWDWriter::formatAttribute(TQDomElement paragraph, TQString name, TQString attrName, TQString attr) { kdDebug() << "Entering KWDWriter::formatAttribute" << endl; - QDomElement lastformat=currentFormat(paragraph,true); - QDomNodeList qdnl= lastformat.elementsByTagName(name); + TQDomElement lastformat=currentFormat(paragraph,true); + TQDomNodeList qdnl= lastformat.elementsByTagName(name); if (qdnl.length()) { - QDomElement el; + TQDomElement el; el=qdnl.item(0).toElement(); el.setAttribute(attrName,attr); return el; } else { - QDomElement al=_doc->createElement(name); + TQDomElement al=_doc->createElement(name); lastformat.appendChild(al); al.setAttribute(attrName,attr); return al; @@ -393,43 +393,43 @@ QDomElement KWDWriter::formatAttribute(QDomElement paragraph, QString name, QStr } -QString KWDWriter::getLayoutAttribute(QDomElement paragraph, QString name, QString attrName) { - QDomElement currentLayout=paragraph.elementsByTagName("LAYOUT").item(0).toElement(); - QDomNodeList qdnl= currentLayout.elementsByTagName(name); +TQString KWDWriter::getLayoutAttribute(TQDomElement paragraph, TQString name, TQString attrName) { + TQDomElement currentLayout=paragraph.elementsByTagName("LAYOUT").item(0).toElement(); + TQDomNodeList qdnl= currentLayout.elementsByTagName(name); if (qdnl.length()) { - QDomElement el=qdnl.item(0).toElement(); + TQDomElement el=qdnl.item(0).toElement(); return el.attribute(attrName); } - return QString::null; + return TQString(); } -QDomElement KWDWriter::layoutAttribute(QDomElement paragraph, QString name, QString attrName, QString attr) +TQDomElement KWDWriter::tqlayoutAttribute(TQDomElement paragraph, TQString name, TQString attrName, TQString attr) { - kdDebug() << "Entering KWDWriter::layoutAttribute name=" << name << " attrName=" << attrName << " attr=" << attr << endl; - QDomElement currentLayout=paragraph.elementsByTagName("LAYOUT").item(0).toElement(); - QDomNodeList qdnl= currentLayout.elementsByTagName(name); + kdDebug() << "Entering KWDWriter::tqlayoutAttribute name=" << name << " attrName=" << attrName << " attr=" << attr << endl; + TQDomElement currentLayout=paragraph.elementsByTagName("LAYOUT").item(0).toElement(); + TQDomNodeList qdnl= currentLayout.elementsByTagName(name); if (qdnl.length()) { - QDomElement el; + TQDomElement el; el=qdnl.item(0).toElement(); el.setAttribute(attrName,attr); return el; } else { - QDomElement al=_doc->createElement(name); + TQDomElement al=_doc->createElement(name); currentLayout.appendChild(al); al.setAttribute(attrName,attr); return al; } } -void KWDWriter::addText(QDomElement paragraph, QString text, int format_id, bool keep_formatting) { - QDomNode temp=paragraph.elementsByTagName("TEXT").item(0).firstChild(); - QDomText currentText=temp.toText(); +void KWDWriter::addText(TQDomElement paragraph, TQString text, int format_id, bool keep_formatting) { + TQDomNode temp=paragraph.elementsByTagName("TEXT").item(0).firstChild(); + TQDomText currentText=temp.toText(); if (temp.isNull()) { kdDebug(30503) << "no text" << endl; return; } - QString oldtext=currentText.data(); + TQString oldtext=currentText.data(); int oldLength=oldtext.length(); if (keep_formatting) { @@ -445,7 +445,7 @@ void KWDWriter::addText(QDomElement paragraph, QString text, int format_id, bool ++oldLength; // add new trailing space char text=text.simplifyWhiteSpace(); // drop all unprintable chars } - QString newtext; + TQString newtext; if (keep_formatting) newtext=oldtext + text; else @@ -457,38 +457,38 @@ void KWDWriter::addText(QDomElement paragraph, QString text, int format_id, bool } currentText.setData(newtext); int newLength=text.length(); - QDomElement lastformat=currentFormat(paragraph,true); + TQDomElement lastformat=currentFormat(paragraph,true); if (lastformat.attribute("id").isEmpty()) // keep old id value, e.g. for LINK URL lastformat.setAttribute("id",format_id); - lastformat.setAttribute("pos",QString("%1").arg(oldLength)); - lastformat.setAttribute("len",QString("%1").arg(newLength)); + lastformat.setAttribute("pos",TQString("%1").tqarg(oldLength)); + lastformat.setAttribute("len",TQString("%1").tqarg(newLength)); } -QString KWDWriter::getText(QDomElement paragraph) { - QDomNode temp=paragraph.elementsByTagName("TEXT").item(0).firstChild(); - QDomText currentText=temp.toText(); +TQString KWDWriter::getText(TQDomElement paragraph) { + TQDomNode temp=paragraph.elementsByTagName("TEXT").item(0).firstChild(); + TQDomText currentText=temp.toText(); if (temp.isNull()) { kdWarning(30503) << "no text" << endl; } return currentText.data(); } -QDomElement KWDWriter::startFormat(QDomElement paragraph) { +TQDomElement KWDWriter::startFormat(TQDomElement paragraph) { if (paragraph.isNull()) { kdWarning(30503) << "startFormat on empty paragraph" << endl; } - QDomElement format=_doc->createElement("FORMAT"); + TQDomElement format=_doc->createElement("FORMAT"); paragraph.elementsByTagName("FORMATS").item(0).appendChild(format); return format; } -QDomElement KWDWriter::startFormat(QDomElement paragraph, QDomElement formatToClone) { - QDomElement format=formatToClone.cloneNode().toElement(); +TQDomElement KWDWriter::startFormat(TQDomElement paragraph, TQDomElement formatToClone) { + TQDomElement format=formatToClone.cloneNode().toElement(); if (format.isNull()) { kdWarning(30503) << "startFormat: null format cloned" << endl; } if (paragraph.isNull()) { kdWarning(30503) << "startFormat on empty paragraph" << endl; } format.removeAttribute("len"); format.removeAttribute("pos"); format.removeAttribute("id"); - for (QDomElement a=format.firstChild().toElement();!a.isNull();a=a.nextSibling().toElement()) { + for (TQDomElement a=format.firstChild().toElement();!a.isNull();a=a.nextSibling().toElement()) { if (a.tagName() == "ANCHOR") { format.removeChild(a); } @@ -497,9 +497,9 @@ QDomElement KWDWriter::startFormat(QDomElement paragraph, QDomElement formatToCl return format; } -QDomElement KWDWriter::currentFormat(QDomElement paragraph, bool start_new_one) { +TQDomElement KWDWriter::currentFormat(TQDomElement paragraph, bool start_new_one) { - QDomElement e=paragraph.elementsByTagName("FORMATS").item(0).lastChild().toElement(); + TQDomElement e=paragraph.elementsByTagName("FORMATS").item(0).lastChild().toElement(); if (e.isNull()) { // no current format, start a new one if (start_new_one) return startFormat(paragraph); @@ -513,11 +513,11 @@ QDomElement KWDWriter::currentFormat(QDomElement paragraph, bool start_new_one) } -void KWDWriter::cleanUpParagraph(QDomElement paragraph) { - QDomElement e=paragraph.elementsByTagName("FORMATS").item(0).toElement(); +void KWDWriter::cleanUpParagraph(TQDomElement paragraph) { + TQDomElement e=paragraph.elementsByTagName("FORMATS").item(0).toElement(); if (e.isNull()) { kdWarning(30503) << "cleanup : no valid paragraph" << endl; return; } - for (QDomElement k=e.firstChild().toElement();!k.isNull();k=k.nextSibling().toElement()) { - if (k.attribute("len",QString::null).isNull()) { + for (TQDomElement k=e.firstChild().toElement();!k.isNull();k=k.nextSibling().toElement()) { + if (k.attribute("len",TQString()).isNull()) { e.removeChild(k); cleanUpParagraph(paragraph); return; @@ -526,10 +526,10 @@ void KWDWriter::cleanUpParagraph(QDomElement paragraph) { } -QDomElement KWDWriter::addFrame(QDomElement frameset, QRect rect, int runaround, int copy, +TQDomElement KWDWriter::addFrame(TQDomElement frameset, TQRect rect, int runaround, int copy, int newFrameBehaviour, int runaroundGap ) { - QDomElement frame = _doc->createElement("FRAME"); + TQDomElement frame = _doc->createElement("FRAME"); frameset.appendChild(frame); frame.setAttribute("runaround",runaround); frame.setAttribute("copy",copy); @@ -539,12 +539,12 @@ QDomElement KWDWriter::addFrame(QDomElement frameset, QRect rect, int runaround, return frame; } -QDomElement KWDWriter::docroot() { +TQDomElement KWDWriter::docroot() { return _doc->elementsByTagName("DOC").item(0).toElement(); } bool KWDWriter::writeDoc() { - QCString str=_doc->toCString(); + TQCString str=_doc->toCString(); kdWarning(30503) << str << endl; if (!_store->open("root")) { @@ -566,12 +566,12 @@ bool KWDWriter::writeDoc() { } -QDomElement KWDWriter::mainFrameset() { +TQDomElement KWDWriter::mainFrameset() { return _mainFrameset; } -void KWDWriter::addRect(QDomElement e,QRect rect) { +void KWDWriter::addRect(TQDomElement e,TQRect rect) { e.setAttribute("top",_zoomhandler->pixelYToPt( rect.top())); e.setAttribute("left",_zoomhandler->pixelXToPt(rect.left())); e.setAttribute("bottom",_zoomhandler->pixelYToPt(rect.bottom())); diff --git a/filters/kword/html/import/kwdwriter.h b/filters/kword/html/import/kwdwriter.h index 5b800c7a..2fc888c4 100644 --- a/filters/kword/html/import/kwdwriter.h +++ b/filters/kword/html/import/kwdwriter.h @@ -20,9 +20,9 @@ #define KWDWRITER_H -#include <qrect.h> +#include <tqrect.h> #include <KoStore.h> -#include <qdom.h> +#include <tqdom.h> /** *@author Frank Dekervel @@ -44,10 +44,10 @@ public: /** - * adds a frameset to parent FIXME + * adds a frameset to tqparent FIXME **/ - QDomElement addFrameSet(QDomElement parent, int frametype=1, - int frameinfo=0, QString name=QString::null, + TQDomElement addFrameSet(TQDomElement tqparent, int frametype=1, + int frameinfo=0, TQString name=TQString(), int visible=1); /** @@ -65,15 +65,15 @@ public: /** * creates a table cell **/ - QDomElement createTableCell(int tableno, int nrow, - int ncol, int colspan, QRect rect); + TQDomElement createTableCell(int tableno, int nrow, + int ncol, int colspan, TQRect rect); /** * fetches the cell of a table **/ - QDomElement fetchTableCell(int tableno, int rowno, int colno); + TQDomElement fetchTableCell(int tableno, int rowno, int colno); /** @@ -81,7 +81,7 @@ public: * if the arguments x,y,w,h are given, each cell is resized to have a 'right' * table. otherwise, the cell sizes are not touched. **/ - void finishTable(int tableno, QRect rect); + void finishTable(int tableno, TQRect rect); void finishTable(int tableno); /** @@ -89,23 +89,23 @@ public: * @param paragraph: the paragraph the anchor should be placed in * @param toInLline: the element that should be inlined **/ - void createInline(QDomElement paragraph, QDomElement toInline); + void createInline(TQDomElement paragraph, TQDomElement toInline); /** - * create a horizontal ruler layout + * create a horizontal ruler tqlayout **/ - void createHR(QDomElement paragraph, int width=1); + void createHR(TQDomElement paragraph, int width=1); /** * **/ - QDomElement currentLayout(QDomElement paragraph); + TQDomElement currentLayout(TQDomElement paragraph); /** * adds a frame to frameset FIXME **/ - QDomElement addFrame(QDomElement frameset, QRect rect, int runaround=0, int copy=0, + TQDomElement addFrame(TQDomElement frameset, TQRect rect, int runaround=0, int copy=0, //int top=42, int left=28, int bottom=799, int right=567, int newFrameBehaviour=0, int runaroundGap=2 ); @@ -114,104 +114,104 @@ public: /** * adds a paragraph **/ - QDomElement addParagraph(QDomElement parent); - QDomElement addParagraph(QDomElement parent, QDomElement layout); + TQDomElement addParagraph(TQDomElement tqparent); + TQDomElement addParagraph(TQDomElement tqparent, TQDomElement tqlayout); /** * adds/changes an attribute to/of the current format **/ - QDomElement formatAttribute(QDomElement paragraph, QString name, QString attrName, QString attr); + TQDomElement formatAttribute(TQDomElement paragraph, TQString name, TQString attrName, TQString attr); /** - * get a layout attribute + * get a tqlayout attribute **/ - QString getLayoutAttribute(QDomElement paragraph, QString name, QString attrName); + TQString getLayoutAttribute(TQDomElement paragraph, TQString name, TQString attrName); /** - * adds/changes an attribute to/of the current layout + * adds/changes an attribute to/of the current tqlayout **/ - QDomElement layoutAttribute(QDomElement paragraph, QString name, QString attrName, QString attr); + TQDomElement tqlayoutAttribute(TQDomElement paragraph, TQString name, TQString attrName, TQString attr); /** * creates a new format in the current paragraph. do this before adding text * FIXME: you can only do addText once per format **/ - QDomElement startFormat(QDomElement paragraph); - QDomElement startFormat(QDomElement paragraph, QDomElement formatToClone); + TQDomElement startFormat(TQDomElement paragraph); + TQDomElement startFormat(TQDomElement paragraph, TQDomElement formatToClone); /** * cleans up the current paragraph (throw away unused formats) * FIXME: find a better solution **/ - void cleanUpParagraph(QDomElement paragraph); + void cleanUpParagraph(TQDomElement paragraph); /** * adds some text to the current format in this paragraph **/ - void addText(QDomElement paragraph, QString text, int format_id, bool keep_formatting=false); + void addText(TQDomElement paragraph, TQString text, int format_id, bool keep_formatting=false); /** * returns the current format * if start_new_one is true, a new format will be started if needed **/ - QDomElement currentFormat(QDomElement paragraph, bool start_new_one=false); + TQDomElement currentFormat(TQDomElement paragraph, bool start_new_one=false); /** * create a Link (URL) **/ - QDomElement createLink(QDomElement paragraph, QString linkName, QString hrefName); + TQDomElement createLink(TQDomElement paragraph, TQString linkName, TQString hrefName); /** - * copy the given layout, and set it as layout of the given paragraph + * copy the given tqlayout, and set it as tqlayout of the given paragraph **/ - QDomElement setLayout(QDomElement paragraph, QDomElement layout); + TQDomElement setLayout(TQDomElement paragraph, TQDomElement tqlayout); /** * returns the text of this paragraph. **/ - QString getText(QDomElement paragraph); + TQString getText(TQDomElement paragraph); /** * returns the rectangle of the first frame of this frameset **/ - QRect getRect(QDomElement frameset); + TQRect getRect(TQDomElement frameset); /** * returns the 'main' frameset of this document. **/ - QDomElement mainFrameset(); + TQDomElement mainFrameset(); /** * mark document as being written by author, and having title title **/ - void createDocInfo(QString author, QString title); + void createDocInfo(TQString author, TQString title); /** * returns the document root **/ - QDomElement docroot(); + TQDomElement docroot(); /** * creates a KWord Variable (Link, ...) **/ - void appendKWordVariable(QDomDocument& doc, QDomElement& format, - const QString& text, const QString& key, int type, QDomElement& child); + void appendKWordVariable(TQDomDocument& doc, TQDomElement& format, + const TQString& text, const TQString& key, int type, TQDomElement& child); private: /** * creates a rectangle **/ - void addRect(QDomElement e, QRect rect); + void addRect(TQDomElement e, TQRect rect); protected: KoStore *_store; - QDomElement _mainFrameset; - QDomDocument *_doc; - QDomDocument *_docinfo; - QDomElement _docinfoMain; + TQDomElement _mainFrameset; + TQDomDocument *_doc; + TQDomDocument *_docinfo; + TQDomElement _docinfoMain; KoTextZoomHandler *_zoomhandler; int tableNo; bool insidetable; diff --git a/filters/kword/kword1.3/import/kword13document.cpp b/filters/kword/kword1.3/import/kword13document.cpp index 697bb366..fcf8e60c 100644 --- a/filters/kword/kword1.3/import/kword13document.cpp +++ b/filters/kword/kword1.3/import/kword13document.cpp @@ -18,7 +18,7 @@ * Boston, MA 02110-1301, USA. */ -#include <qiodevice.h> +#include <tqiodevice.h> #include <kdebug.h> #include <ktempfile.h> @@ -44,15 +44,15 @@ KWord13Document::~KWord13Document( void ) delete m_previewFile; } -void KWord13Document::xmldump( QIODevice* io ) +void KWord13Document::xmldump( TQIODevice* io ) { - QTextStream iostream( io ); - iostream.setEncoding( QTextStream::UnicodeUTF8 ); + TQTextStream iostream( io ); + iostream.setEncoding( TQTextStream::UnicodeUTF8 ); iostream << "<?xml encoding='UTF-8'?>\n"; iostream << "<kworddocument>\n"; - for ( QMap<QString,QString>::ConstIterator it = m_documentProperties.begin(); + for ( TQMap<TQString,TQString>::ConstIterator it = m_documentProperties.begin(); it != m_documentProperties.end(); ++it) { @@ -60,7 +60,7 @@ void KWord13Document::xmldump( QIODevice* io ) } iostream << " <documentinfo>\n"; - for ( QMap<QString,QString>::ConstIterator it11 = m_documentInfo.begin(); + for ( TQMap<TQString,TQString>::ConstIterator it11 = m_documentInfo.begin(); it11 != m_documentInfo.end(); ++it11) { @@ -124,7 +124,7 @@ void KWord13Document::xmldump( QIODevice* io ) iostream << " <styles>\n"; - for ( QValueList<KWord13Layout>::Iterator it2 = m_styles.begin(); + for ( TQValueList<KWord13Layout>::Iterator it2 = m_styles.begin(); it2 != m_styles.end(); ++it2) { @@ -135,7 +135,7 @@ void KWord13Document::xmldump( QIODevice* io ) iostream << " <pictures>\n"; - for ( QDictIterator<KWord13Picture> it3( m_pictureDict ) ; it3.current(); ++it3 ) + for ( TQDictIterator<KWord13Picture> it3( m_pictureDict ) ; it3.current(); ++it3 ) { iostream << " <key>" << it3.currentKey() << "</key>" << endl; } @@ -145,13 +145,13 @@ void KWord13Document::xmldump( QIODevice* io ) iostream << "</kworddocument>\n"; } -QString KWord13Document::getDocumentInfo( const QString& name ) const +TQString KWord13Document::getDocumentInfo( const TQString& name ) const { - QMap<QString,QString>::ConstIterator it ( m_documentInfo.find( name ) ); + TQMap<TQString,TQString>::ConstIterator it ( m_documentInfo.tqfind( name ) ); if ( it == m_documentInfo.end() ) { // Property does not exist - return QString::null; + return TQString(); } else { @@ -159,9 +159,9 @@ QString KWord13Document::getDocumentInfo( const QString& name ) const } } -QString KWord13Document::getProperty( const QString& name, const QString& oldName ) const +TQString KWord13Document::getProperty( const TQString& name, const TQString& oldName ) const { - const QString result ( getPropertyInternal( name ) ); + const TQString result ( getPropertyInternal( name ) ); if ( result.isEmpty() && !oldName.isEmpty() ) { @@ -174,13 +174,13 @@ QString KWord13Document::getProperty( const QString& name, const QString& oldNam } } -QString KWord13Document::getPropertyInternal( const QString& name ) const +TQString KWord13Document::getPropertyInternal( const TQString& name ) const { - QMap<QString,QString>::ConstIterator it ( m_documentProperties.find( name ) ); + TQMap<TQString,TQString>::ConstIterator it ( m_documentProperties.tqfind( name ) ); if ( it == m_documentProperties.end() ) { // Property does not exist - return QString::null; + return TQString(); } else { @@ -188,11 +188,11 @@ QString KWord13Document::getPropertyInternal( const QString& name ) const } } -QDateTime KWord13Document::lastPrintingDate( void ) const +TQDateTime KWord13Document::lastPrintingDate( void ) const { - const QString strDate( getPropertyInternal( "VARIABLESETTINGS:lastPrintingDate" ) ); + const TQString strDate( getPropertyInternal( "VARIABLESETTINGS:lastPrintingDate" ) ); - QDateTime dt; + TQDateTime dt; if ( strDate.isEmpty() ) { @@ -201,16 +201,16 @@ QDateTime KWord13Document::lastPrintingDate( void ) const } else { - dt = QDateTime::fromString( strDate, Qt::ISODate ); + dt = TQDateTime::fromString( strDate, Qt::ISODate ); } return dt; } -QDateTime KWord13Document::creationDate( void ) const +TQDateTime KWord13Document::creationDate( void ) const { - const QString strDate( getPropertyInternal( "VARIABLESETTINGS:creationDate" ) ); + const TQString strDate( getPropertyInternal( "VARIABLESETTINGS:creationDate" ) ); - QDateTime dt; + TQDateTime dt; if ( strDate.isEmpty() ) { @@ -219,9 +219,9 @@ QDateTime KWord13Document::creationDate( void ) const const int month = getPropertyInternal( "VARIABLESETTINGS:createFileMonth" ).toInt(); const int day = getPropertyInternal( "VARIABLESETTINGS:createFileDay" ).toInt(); - if ( QDate::isValid( year, month, day) ) + if ( TQDate::isValid( year, month, day) ) { - dt.setDate( QDate ( year, month, day) ); + dt.setDate( TQDate ( year, month, day) ); } else { @@ -230,16 +230,16 @@ QDateTime KWord13Document::creationDate( void ) const } else { - dt = QDateTime::fromString( strDate, Qt::ISODate ); + dt = TQDateTime::fromString( strDate, Qt::ISODate ); } return dt; } -QDateTime KWord13Document::modificationDate( void ) const +TQDateTime KWord13Document::modificationDate( void ) const { - const QString strDate( getPropertyInternal( "VARIABLESETTINGS:modificationDate" ) ); + const TQString strDate( getPropertyInternal( "VARIABLESETTINGS:modificationDate" ) ); - QDateTime dt; + TQDateTime dt; if ( strDate.isEmpty() ) { @@ -247,9 +247,9 @@ QDateTime KWord13Document::modificationDate( void ) const const int year = getPropertyInternal( "VARIABLESETTINGS:modifyFileYear" ).toInt(); const int month = getPropertyInternal( "VARIABLESETTINGS:modifyFileMonth" ).toInt(); const int day = getPropertyInternal( "VARIABLESETTINGS:modifyFileDay" ).toInt(); - if ( QDate::isValid( year, month, day) ) + if ( TQDate::isValid( year, month, day) ) { - dt.setDate( QDate ( year, month, day) ); + dt.setDate( TQDate ( year, month, day) ); } else { @@ -258,7 +258,7 @@ QDateTime KWord13Document::modificationDate( void ) const } else { - dt = QDateTime::fromString( strDate, Qt::ISODate ); + dt = TQDateTime::fromString( strDate, Qt::ISODate ); } return dt; } diff --git a/filters/kword/kword1.3/import/kword13document.h b/filters/kword/kword1.3/import/kword13document.h index dad59be9..79d4d971 100644 --- a/filters/kword/kword1.3/import/kword13document.h +++ b/filters/kword/kword1.3/import/kword13document.h @@ -21,16 +21,16 @@ #ifndef KWORD_1_3_DOCUMENT_H #define KWORD_1_3_DOCUMENT_H -class QIODevice; +class TQIODevice; class KTempFile; class KWord13Picture; -#include <qstring.h> -#include <qmap.h> -#include <qptrlist.h> -#include <qdatetime.h> -#include <qdict.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqmap.h> +#include <tqptrlist.h> +#include <tqdatetime.h> +#include <tqdict.h> +#include <tqstringlist.h> #include "kword13frameset.h" @@ -41,40 +41,40 @@ public: ~KWord13Document( void ); public: - void xmldump( QIODevice* io ); + void xmldump( TQIODevice* io ); /// Get the "last printed" date/time - QDateTime lastPrintingDate( void ) const; + TQDateTime lastPrintingDate( void ) const; /// Get the "creation" date/time - QDateTime creationDate( void ) const; + TQDateTime creationDate( void ) const; /// Get the "modification" date/time - QDateTime modificationDate( void ) const; + TQDateTime modificationDate( void ) const; /** * Get a document info * \param name name of the document info */ - QString getDocumentInfo( const QString& name ) const; + TQString getDocumentInfo( const TQString& name ) const; /** * Get a document property * \param name name of the property * \param oldName alternative name of the property (in old KWord syntax) */ - QString getProperty( const QString& name, const QString& oldName = QString::null ) const; + TQString getProperty( const TQString& name, const TQString& oldName = TQString() ) const; protected: /// Get a document property \internal - QString getPropertyInternal( const QString& name ) const; + TQString getPropertyInternal( const TQString& name ) const; public: - QMap<QString, QString> m_documentProperties; - QMap<QString, QString> m_documentInfo; ///< From documentinfo.xml - QValueList<KWord13Layout> m_styles; - QPtrList<KWordTextFrameset> m_normalTextFramesetList; ///< List of \<FRAMESET\> having normal text - QPtrList<KWordTextFrameset> m_tableFramesetList; ///< List of \<FRAMESET\> being part of tables - QPtrList<KWordTextFrameset> m_headerFooterFramesetList; ///< List of \<FRAMESET\> having footer/header - QPtrList<KWordTextFrameset> m_footEndNoteFramesetList; ///< List of \<FRAMESET\> having footnotes or endnotes - QPtrList<KWord13PictureFrameset> m_pictureFramesetList; ///< List of \<FRAMESET\> having pictures - QPtrList<KWord13Frameset> m_otherFramesetList; ///< List of \<FRAMESET\> of other types - QDict<KWord13Picture> m_pictureDict; ///< "Dictionnary" of all pictures' data + TQMap<TQString, TQString> m_documentProperties; + TQMap<TQString, TQString> m_documentInfo; ///< From documentinfo.xml + TQValueList<KWord13Layout> m_styles; + TQPtrList<KWordTextFrameset> m_normalTextFramesetList; ///< List of \<FRAMESET\> having normal text + TQPtrList<KWordTextFrameset> m_tableFramesetList; ///< List of \<FRAMESET\> being part of tables + TQPtrList<KWordTextFrameset> m_headerFooterFramesetList; ///< List of \<FRAMESET\> having footer/header + TQPtrList<KWordTextFrameset> m_footEndNoteFramesetList; ///< List of \<FRAMESET\> having footnotes or endnotes + TQPtrList<KWord13PictureFrameset> m_pictureFramesetList; ///< List of \<FRAMESET\> having pictures + TQPtrList<KWord13Frameset> m_otherFramesetList; ///< List of \<FRAMESET\> of other types + TQDict<KWord13Picture> m_pictureDict; ///< "Dictionnary" of all pictures' data KTempFile* m_previewFile; - QStringList m_anchoredFramesetNames; ///< List of framesets that are anchored + TQStringList m_anchoredFramesetNames; ///< List of framesets that are anchored }; #endif // KWORD_1_3_DOCUMENT_H diff --git a/filters/kword/kword1.3/import/kword13formatone.cpp b/filters/kword/kword1.3/import/kword13formatone.cpp index 00a7d173..5f4dca5f 100644 --- a/filters/kword/kword1.3/import/kword13formatone.cpp +++ b/filters/kword/kword1.3/import/kword13formatone.cpp @@ -1,4 +1,4 @@ -#include <qtextstream.h> +#include <tqtextstream.h> #include "kword13utils.h" #include "kword13formatone.h" @@ -11,11 +11,11 @@ KWord13FormatOneData::~KWord13FormatOneData( void ) { } -void KWord13FormatOneData::xmldump( QTextStream& iostream ) +void KWord13FormatOneData::xmldump( TQTextStream& iostream ) { iostream << " <formatone>" << "\">\n"; - for ( QMap<QString,QString>::ConstIterator it = m_properties.begin(); + for ( TQMap<TQString,TQString>::ConstIterator it = m_properties.begin(); it != m_properties.end(); ++it) { @@ -25,16 +25,16 @@ void KWord13FormatOneData::xmldump( QTextStream& iostream ) iostream << " </formatone>\n"; } -QString KWord13FormatOneData::key( void ) const +TQString KWord13FormatOneData::key( void ) const { - QString strKey; + TQString strKey; // At first, use the number of properties as it is an easy sorting value - strKey += QString::number( m_properties.count(), 16 ); + strKey += TQString::number( m_properties.count(), 16 ); strKey += ':'; - // use the worst key: the whole QMap (### FIXME) - for ( QMap<QString,QString>::const_iterator it = m_properties.constBegin() ; + // use the worst key: the whole TQMap (### FIXME) + for ( TQMap<TQString,TQString>::const_iterator it = m_properties.constBegin() ; it != m_properties.constEnd(); ++it ) { strKey += it.key(); @@ -46,13 +46,13 @@ QString KWord13FormatOneData::key( void ) const return strKey; } -QString KWord13FormatOneData::getProperty( const QString& name ) const +TQString KWord13FormatOneData::getProperty( const TQString& name ) const { - QMap<QString,QString>::ConstIterator it ( m_properties.find( name ) ); + TQMap<TQString,TQString>::ConstIterator it ( m_properties.tqfind( name ) ); if ( it == m_properties.end() ) { // Property does not exist - return QString::null; + return TQString(); } else { diff --git a/filters/kword/kword1.3/import/kword13formatone.h b/filters/kword/kword1.3/import/kword13formatone.h index 9f2e16d1..e4cc7f38 100644 --- a/filters/kword/kword1.3/import/kword13formatone.h +++ b/filters/kword/kword1.3/import/kword13formatone.h @@ -21,16 +21,16 @@ #ifndef KWORD_1_3_FORMAT_ONE #define KWORD_1_3_FORMAT_ONE -class QTextStream; +class TQTextStream; -#include <qstring.h> -#include <qmap.h> +#include <tqstring.h> +#include <tqmap.h> #include "kword13format.h" /** - * Contains the data of the \<FORMAT id="1"\> children - * also the grand-children of \<STYLE\> and \<LAYOUT\> + * Contains the data of the \<FORMAT id="1"\> tqchildren + * also the grand-tqchildren of \<STYLE\> and \<LAYOUT\> */ class KWord13FormatOneData { @@ -39,21 +39,21 @@ public: ~KWord13FormatOneData( void ); public: - void xmldump( QTextStream& iostream ); + void xmldump( TQTextStream& iostream ); /** * @brief Get a key representating the properties * * This key helps to categorize the automatic styles */ - QString key( void ) const; + TQString key( void ) const; - QString getProperty( const QString& name ) const; + TQString getProperty( const TQString& name ) const; public: - QMap<QString,QString> m_properties; + TQMap<TQString,TQString> m_properties; public: // OASIS-specific - QString m_autoStyleName; ///< Name of the OASIS automatic style + TQString m_autoStyleName; ///< Name of the OASIS automatic style }; /** @@ -75,7 +75,7 @@ public: virtual KWord13FormatOneData* getFormatOneData(void); public: int m_length; ///< Length of format - KWord13FormatOneData m_formatOne; ///< Data of children of \<FORMAT id="1"\> + KWord13FormatOneData m_formatOne; ///< Data of tqchildren of \<FORMAT id="1"\> }; #endif // KWORD_1_3_FORMAT_ONE diff --git a/filters/kword/kword1.3/import/kword13formatother.cpp b/filters/kword/kword1.3/import/kword13formatother.cpp index 2ed48f6f..f1ee8cf0 100644 --- a/filters/kword/kword1.3/import/kword13formatother.cpp +++ b/filters/kword/kword1.3/import/kword13formatother.cpp @@ -18,7 +18,7 @@ * Boston, MA 02110-1301, USA. */ -#include <qstring.h> +#include <tqstring.h> #include "kword13formatother.h" diff --git a/filters/kword/kword1.3/import/kword13formatother.h b/filters/kword/kword1.3/import/kword13formatother.h index 66eb1356..01181363 100644 --- a/filters/kword/kword1.3/import/kword13formatother.h +++ b/filters/kword/kword1.3/import/kword13formatother.h @@ -34,7 +34,7 @@ public: KWord13FormatFour(void); virtual ~KWord13FormatFour(void); public: - QString m_text; ///< replacement text + TQString m_text; ///< replacement text }; /** @@ -48,7 +48,7 @@ public: KWord13FormatSix(void); virtual ~KWord13FormatSix(void); public: - QString m_anchorName; ///< name of anchor + TQString m_anchorName; ///< name of anchor }; diff --git a/filters/kword/kword1.3/import/kword13frameset.cpp b/filters/kword/kword1.3/import/kword13frameset.cpp index 783546d4..6ab0f99c 100644 --- a/filters/kword/kword1.3/import/kword13frameset.cpp +++ b/filters/kword/kword1.3/import/kword13frameset.cpp @@ -24,7 +24,7 @@ #include "kword13frameset.h" -KWord13Frameset::KWord13Frameset( int frameType, int frameInfo, const QString& name ) +KWord13Frameset::KWord13Frameset( int frameType, int frameInfo, const TQString& name ) : m_numFrames(0), m_frameType( frameType ), m_frameInfo( frameInfo ), m_name( name ) { } @@ -39,13 +39,13 @@ bool KWord13Frameset::addParagraph(const KWord13Paragraph&) return false; } -bool KWord13Frameset::setKey(const QString&) +bool KWord13Frameset::setKey(const TQString&) { kdWarning(30520) << "Cannot set a key! Not a picture frameset!" << endl; return false; } -void KWord13Frameset::xmldump( QTextStream& iostream ) +void KWord13Frameset::xmldump( TQTextStream& iostream ) { iostream << " <frameset variant=\"None\" type=\"" << m_frameType << "\" info=\"" << m_frameInfo @@ -53,7 +53,7 @@ void KWord13Frameset::xmldump( QTextStream& iostream ) } -KWordTextFrameset::KWordTextFrameset( int frameType, int frameInfo, const QString& name ) +KWordTextFrameset::KWordTextFrameset( int frameType, int frameInfo, const TQString& name ) : KWord13Frameset( frameType, frameInfo, name ) { } @@ -68,7 +68,7 @@ bool KWordTextFrameset::addParagraph(const KWord13Paragraph& para) return true; } -void KWordTextFrameset::xmldump( QTextStream& iostream ) +void KWordTextFrameset::xmldump( TQTextStream& iostream ) { iostream << " <frameset variant=\"Text\" type=\"" << m_frameType << "\" info=\"" << m_frameInfo @@ -77,7 +77,7 @@ void KWordTextFrameset::xmldump( QTextStream& iostream ) iostream << " </frameset>\n"; } -KWord13PictureFrameset::KWord13PictureFrameset( int frameType, int frameInfo, const QString& name ) +KWord13PictureFrameset::KWord13PictureFrameset( int frameType, int frameInfo, const TQString& name ) : KWord13Frameset( frameType, frameInfo, name ) { } @@ -86,13 +86,13 @@ KWord13PictureFrameset::~KWord13PictureFrameset( void ) { } -bool KWord13PictureFrameset::setKey(const QString& key) +bool KWord13PictureFrameset::setKey(const TQString& key) { m_pictureKey = key; return true; } -void KWord13PictureFrameset::xmldump( QTextStream& iostream ) +void KWord13PictureFrameset::xmldump( TQTextStream& iostream ) { iostream << " <frameset variant=\"Picture\" type=\"" << m_frameType << "\" info=\"" << m_frameInfo diff --git a/filters/kword/kword1.3/import/kword13frameset.h b/filters/kword/kword1.3/import/kword13frameset.h index 94b6acd9..e5ea5e26 100644 --- a/filters/kword/kword1.3/import/kword13frameset.h +++ b/filters/kword/kword1.3/import/kword13frameset.h @@ -21,40 +21,40 @@ #ifndef _FILTER_KWORD_1_3__KWORDFRAMESET_H #define _FILTER_KWORD_1_3__KWORDFRAMESET_H -class QString; -class QTextStream; +class TQString; +class TQTextStream; -#include <qstring.h> -#include <qmap.h> +#include <tqstring.h> +#include <tqmap.h> #include "kword13paragraph.h" class KWord13Frameset { public: - KWord13Frameset( int frameType, int frameInfo, const QString& name ); + KWord13Frameset( int frameType, int frameInfo, const TQString& name ); virtual ~KWord13Frameset( void ); public: virtual bool addParagraph(const KWord13Paragraph& para); - virtual bool setKey( const QString& key ); - virtual void xmldump( QTextStream& iostream ); + virtual bool setKey( const TQString& key ); + virtual void xmldump( TQTextStream& iostream ); public: int m_numFrames; ///< Number of frames - QMap<QString,QString> m_frameData; ///< Data of frames (### TODO: do better!) + TQMap<TQString,TQString> m_frameData; ///< Data of frames (### TODO: do better!) protected: int m_frameType; int m_frameInfo; - QString m_name; ///< Name of frameset + TQString m_name; ///< Name of frameset }; class KWordTextFrameset : public KWord13Frameset { public: - KWordTextFrameset( int frameType, int frameInfo, const QString& name ); + KWordTextFrameset( int frameType, int frameInfo, const TQString& name ); virtual ~KWordTextFrameset( void ); public: virtual bool addParagraph(const KWord13Paragraph& para); - virtual void xmldump( QTextStream& iostream ); + virtual void xmldump( TQTextStream& iostream ); public: KWord13ParagraphGroup m_paragraphGroup; }; @@ -62,13 +62,13 @@ public: class KWord13PictureFrameset : public KWord13Frameset { public: - KWord13PictureFrameset( int frameType, int frameInfo, const QString& name ); + KWord13PictureFrameset( int frameType, int frameInfo, const TQString& name ); virtual ~KWord13PictureFrameset( void ); public: - virtual bool setKey( const QString& key ); - virtual void xmldump( QTextStream& iostream ); + virtual bool setKey( const TQString& key ); + virtual void xmldump( TQTextStream& iostream ); public: - QString m_pictureKey; + TQString m_pictureKey; }; #endif // _FILTER_KWORD_1_3__KWORDFRAMESET_H diff --git a/filters/kword/kword1.3/import/kword13import.cpp b/filters/kword/kword1.3/import/kword13import.cpp index a27a39c3..58349af8 100644 --- a/filters/kword/kword1.3/import/kword13import.cpp +++ b/filters/kword/kword1.3/import/kword13import.cpp @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include <qxml.h> -#include <qdom.h> +#include <tqxml.h> +#include <tqdom.h> #include <kdebug.h> #include <kgenericfactory.h> @@ -38,17 +38,17 @@ typedef KGenericFactory<KWord13Import, KoFilter> KWord13ImportFactory; K_EXPORT_COMPONENT_FACTORY( libkwordkword1dot3import, KWord13ImportFactory( "kofficefilters" ) ) -KWord13Import::KWord13Import(KoFilter */*parent*/, const char */*name*/, const QStringList &) +KWord13Import::KWord13Import(KoFilter */*tqparent*/, const char */*name*/, const TQStringList &) : KoFilter() { } -bool KWord13Import::parseInfo( QIODevice* io, KWord13Document& kwordDocument ) +bool KWord13Import::parseInfo( TQIODevice* io, KWord13Document& kwordDocument ) { kdDebug(30520) << "Starting KWord13Import::parseInfo" << endl; - QDomDocument doc; - // Error variables for QDomDocument::setContent - QString errorMsg; + TQDomDocument doc; + // Error variables for TQDomDocument::setContent + TQString errorMsg; int errorLine, errorColumn; if ( ! doc.setContent( io, &errorMsg, &errorLine, &errorColumn ) ) { @@ -58,21 +58,21 @@ bool KWord13Import::parseInfo( QIODevice* io, KWord13Document& kwordDocument ) // ### TODO: user message return false; } - QDomElement docElement( doc.documentElement() ); - // In documentinfo.xml, the text data is in the grand-children of the document element - for ( QDomNode node = docElement.firstChild(); !node.isNull(); node = node.nextSibling() ) + TQDomElement docElement( doc.documentElement() ); + // In documentinfo.xml, the text data is in the grand-tqchildren of the document element + for ( TQDomNode node = docElement.firstChild(); !node.isNull(); node = node.nextSibling() ) { kdDebug(30520) << "Child " << node.nodeName() << endl; if ( !node.isElement() ) continue; // Comment, PI... - const QString nodeName( node.nodeName() ); - for ( QDomNode node2 = node.firstChild(); !node2.isNull(); node2 = node2.nextSibling() ) + const TQString nodeName( node.nodeName() ); + for ( TQDomNode node2 = node.firstChild(); !node2.isNull(); node2 = node2.nextSibling() ) { kdDebug(30520) << "Grand-child " << node2.nodeName() << endl; if ( !node2.isElement() ) continue; - const QString nodeName2 ( nodeName + ':' + node2.nodeName() ); - QDomElement element( node2.toElement() ); + const TQString nodeName2 ( nodeName + ':' + node2.nodeName() ); + TQDomElement element( node2.toElement() ); kwordDocument.m_documentInfo[ nodeName2 ] = element.text(); } } @@ -80,15 +80,15 @@ bool KWord13Import::parseInfo( QIODevice* io, KWord13Document& kwordDocument ) return true; } -bool KWord13Import::parseRoot( QIODevice* io, KWord13Document& kwordDocument ) +bool KWord13Import::parseRoot( TQIODevice* io, KWord13Document& kwordDocument ) { KWord13Parser handler( &kwordDocument ); - QXmlSimpleReader reader; + TQXmlSimpleReader reader; reader.setContentHandler( &handler ); reader.setErrorHandler( &handler ); - QXmlInputSource source( io ); // Read the file + TQXmlInputSource source( io ); // Read the file if (!reader.parse( source )) { @@ -104,7 +104,7 @@ bool KWord13Import::postParse( KoStore* store, KWord13Document& doc ) return post.postParse( store, doc ); } -KoFilter::ConversionStatus KWord13Import::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus KWord13Import::convert( const TQCString& from, const TQCString& to ) { if ( to != "application/vnd.oasis.opendocument.text" || from != "application/x-kword" ) @@ -117,7 +117,7 @@ KoFilter::ConversionStatus KWord13Import::convert( const QCString& from, const Q KWord13Document kwordDocument; - const QString fileName( m_chain->inputFile() ); + const TQString fileName( m_chain->inputFile() ); if ( fileName.isEmpty() ) { kdError(30520) << "No input file name!" << endl; @@ -166,17 +166,17 @@ KoFilter::ConversionStatus KWord13Import::convert( const QCString& from, const Q kdDebug(30520) << "Preview found!" << endl; KoStoreDevice ioPreview( store ); ioPreview.open( IO_ReadOnly ); - const QByteArray image ( ioPreview.readAll() ); + const TQByteArray image ( ioPreview.readAll() ); if ( image.isNull() ) { kdWarning(30520) << "Loading of preview failed! Ignoring!" << endl; } else { - kwordDocument.m_previewFile = new KTempFile( QString::null, ".png" ); + kwordDocument.m_previewFile = new KTempFile( TQString(), ".png" ); // ### TODO check KTempFile kwordDocument.m_previewFile->setAutoDelete( true ); - QFile file( kwordDocument.m_previewFile->name() ); + TQFile file( kwordDocument.m_previewFile->name() ); // ### TODO: check if file is correctly written file.open( IO_WriteOnly ); file.writeBlock( image ); @@ -197,9 +197,9 @@ KoFilter::ConversionStatus KWord13Import::convert( const QCString& from, const Q delete store; store = 0; - QFile file( fileName ); + TQFile file( fileName ); file.open( IO_ReadOnly ); - if ( ! parseRoot( &file, kwordDocument ) ) + if ( ! parseRoot( TQT_TQIODEVICE(&file), kwordDocument ) ) { kdError(30520) << "Could not process document! Aborting!" << endl; file.close(); @@ -230,7 +230,7 @@ KoFilter::ConversionStatus KWord13Import::convert( const QCString& from, const Q return KoFilter::StupidError; } - const QString filenameOut ( m_chain->outputFile() ); + const TQString filenameOut ( m_chain->outputFile() ); if ( filenameOut.isEmpty() ) { diff --git a/filters/kword/kword1.3/import/kword13import.h b/filters/kword/kword1.3/import/kword13import.h index bf58a7d7..d5bebeb3 100644 --- a/filters/kword/kword1.3/import/kword13import.h +++ b/filters/kword/kword1.3/import/kword13import.h @@ -21,27 +21,28 @@ #ifndef KWORD_1_3_IMPORT_H #define KWORD_1_3_IMPORT_H -#include <qstring.h> -#include <qcstring.h> +#include <tqstring.h> +#include <tqcstring.h> #include <KoFilter.h> -class QIODevice; +class TQIODevice; class KoStore; class KWord13Document; class KWord13Import : public KoFilter { Q_OBJECT + TQ_OBJECT public: - KWord13Import(KoFilter *parent, const char *name, const QStringList &); + KWord13Import(KoFilter *tqparent, const char *name, const TQStringList &); virtual ~KWord13Import() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); protected: - bool parseInfo( QIODevice* io, KWord13Document& kwordDocument ); - bool parseRoot( QIODevice* io, KWord13Document& kwordDocument ); + bool parseInfo( TQIODevice* io, KWord13Document& kwordDocument ); + bool parseRoot( TQIODevice* io, KWord13Document& kwordDocument ); bool postParse( KoStore* store, KWord13Document& doc ); }; #endif // KWORD_1_3_IMPORT_H diff --git a/filters/kword/kword1.3/import/kword13layout.cpp b/filters/kword/kword1.3/import/kword13layout.cpp index b6344f9c..4ec4c59d 100644 --- a/filters/kword/kword1.3/import/kword13layout.cpp +++ b/filters/kword/kword1.3/import/kword13layout.cpp @@ -1,4 +1,4 @@ -#include <qtextstream.h> +#include <tqtextstream.h> #include "kword13utils.h" #include "kword13layout.h" @@ -11,12 +11,12 @@ KWord13Layout::~KWord13Layout( void ) { } -void KWord13Layout::xmldump( QTextStream& iostream ) +void KWord13Layout::xmldump( TQTextStream& iostream ) { - iostream << " <layout name=\"" << EscapeXmlDump( m_name ) - << "\" outline=\"" << ( m_outline ? QString("true") : QString("false") ) << "\">\n"; + iostream << " <tqlayout name=\"" << EscapeXmlDump( m_name ) + << "\" outline=\"" << ( m_outline ? TQString("true") : TQString("false") ) << "\">\n"; - for ( QMap<QString,QString>::ConstIterator it = m_layoutProperties.begin(); + for ( TQMap<TQString,TQString>::ConstIterator it = m_layoutProperties.begin(); it != m_layoutProperties.end(); ++it) { @@ -25,18 +25,18 @@ void KWord13Layout::xmldump( QTextStream& iostream ) m_format.xmldump( iostream ); - iostream << " </layout>\n"; + iostream << " </tqlayout>\n"; } -QString KWord13Layout::key( void ) const +TQString KWord13Layout::key( void ) const { - QString strKey; + TQString strKey; strKey += m_name; strKey += '@'; // Use the number of properties as it is an easy sorting value - strKey += QString::number( m_layoutProperties.count(), 16 ); + strKey += TQString::number( m_layoutProperties.count(), 16 ); strKey += ':'; if ( m_outline ) @@ -44,8 +44,8 @@ QString KWord13Layout::key( void ) const else strKey += "O0,"; - // use the worst key: the whole QMap (### FIXME) - for ( QMap<QString,QString>::const_iterator it = m_layoutProperties.constBegin() ; + // use the worst key: the whole TQMap (### FIXME) + for ( TQMap<TQString,TQString>::const_iterator it = m_layoutProperties.constBegin() ; it != m_layoutProperties.constEnd(); ++it ) { strKey += it.key(); @@ -61,13 +61,13 @@ QString KWord13Layout::key( void ) const return strKey; } -QString KWord13Layout::getProperty( const QString& name ) const +TQString KWord13Layout::getProperty( const TQString& name ) const { - QMap<QString,QString>::ConstIterator it ( m_layoutProperties.find( name ) ); + TQMap<TQString,TQString>::ConstIterator it ( m_layoutProperties.tqfind( name ) ); if ( it == m_layoutProperties.end() ) { // Property does not exist - return QString::null; + return TQString(); } else { diff --git a/filters/kword/kword1.3/import/kword13layout.h b/filters/kword/kword1.3/import/kword13layout.h index ee8a2010..2ca1a8b1 100644 --- a/filters/kword/kword1.3/import/kword13layout.h +++ b/filters/kword/kword1.3/import/kword13layout.h @@ -2,10 +2,10 @@ #ifndef _KWORD13LAYOUT #define _KWORD13LAYOUT -class QTextStream; +class TQTextStream; -#include <qstring.h> -#include <qmap.h> +#include <tqstring.h> +#include <tqmap.h> #include "kword13formatone.h" @@ -19,25 +19,25 @@ public: ~KWord13Layout( void ); public: - void xmldump( QTextStream& iostream ); + void xmldump( TQTextStream& iostream ); /** * @brief Get a key representating the properties * * This key helps to categorize the automatic styles */ - QString key( void ) const; + TQString key( void ) const; - QString getProperty( const QString& name ) const; + TQString getProperty( const TQString& name ) const; public: KWord13FormatOneData m_format; ///< Character format properties - QMap<QString,QString> m_layoutProperties; + TQMap<TQString,TQString> m_layoutProperties; bool m_outline; - QString m_name; ///< Name of the style (either the used one or the one currently being defined) + TQString m_name; ///< Name of the style (either the used one or the one currently being defined) public: // OASIS-specific - QString m_autoStyleName; ///< Name of the OASIS automatic style + TQString m_autoStyleName; ///< Name of the OASIS automatic style }; #endif // _KWORD13LAYOUT diff --git a/filters/kword/kword1.3/import/kword13oasisgenerator.cpp b/filters/kword/kword1.3/import/kword13oasisgenerator.cpp index 58ef032e..00b899f9 100644 --- a/filters/kword/kword1.3/import/kword13oasisgenerator.cpp +++ b/filters/kword/kword1.3/import/kword13oasisgenerator.cpp @@ -17,12 +17,12 @@ * Boston, MA 02110-1301, USA. */ -#include <qstring.h> -#include <qdict.h> -#include <qfile.h> -#include <qbuffer.h> -#include <qcolor.h> -#include <qimage.h> +#include <tqstring.h> +#include <tqdict.h> +#include <tqfile.h> +#include <tqbuffer.h> +#include <tqcolor.h> +#include <tqimage.h> #include <kdebug.h> #include <ktempfile.h> @@ -57,7 +57,7 @@ void KWord13OasisGenerator::prepareTextFrameset( KWordTextFrameset* frameset ) return; } - for ( QValueList<KWord13Paragraph>::Iterator it = frameset->m_paragraphGroup.begin(); + for ( TQValueList<KWord13Paragraph>::Iterator it = frameset->m_paragraphGroup.begin(); it != frameset->m_paragraphGroup.end(); ++it) { declareLayout( (*it).m_layout ); @@ -105,9 +105,9 @@ void KWord13OasisGenerator::preparePageLayout( void ) if ( ok && columns > 1 ) { // ### TODO: test - QBuffer buffer; + TQBuffer buffer; buffer.open( IO_WriteOnly ); - KoXmlWriter element ( &buffer ); + KoXmlWriter element ( TQT_TQIODEVICE(&buffer) ); element.startElement("style:columns"); element.addAttribute( "fo:column-count", columns ); element.addAttributePt( "fo:column-gap", positiveNumberOrNull( m_kwordDocument->getProperty( "PAPER:columnspacing", "PAPER:ptColumnspc" ) ) ); @@ -123,10 +123,10 @@ void KWord13OasisGenerator::preparePageLayout( void ) element.endElement(); buffer.close(); - const QString strElement( QString::fromUtf8( buffer.buffer(), buffer.buffer().size() ) ); + const TQString strElement( TQString::fromUtf8( buffer.buffer(), buffer.buffer().size() ) ); style.addChildElement( "style:columns", strElement ); } - const QString automaticPageStyle ( m_oasisGenStyles.lookup( style, "pm" ) ); + const TQString automaticPageStyle ( m_oasisGenStyles.lookup( style, "pm" ) ); kdDebug(30520) << "Automatic page style: " << automaticPageStyle << endl; } @@ -143,7 +143,7 @@ bool KWord13OasisGenerator::prepare( KWord13Document& kwordDocument ) preparePageLayout(); // Declare styles - for ( QValueList<KWord13Layout>::Iterator it = m_kwordDocument->m_styles.begin(); + for ( TQValueList<KWord13Layout>::Iterator it = m_kwordDocument->m_styles.begin(); it != m_kwordDocument->m_styles.end(); ++it) { declareStyle( *it ); @@ -157,7 +157,7 @@ bool KWord13OasisGenerator::prepare( KWord13Document& kwordDocument ) return true; } -double KWord13OasisGenerator::numberOrNull( const QString& str ) const +double KWord13OasisGenerator::numberOrNull( const TQString& str ) const { bool ok = false; const double d = str.toDouble( &ok ); @@ -167,7 +167,7 @@ double KWord13OasisGenerator::numberOrNull( const QString& str ) const return 0.0; } -double KWord13OasisGenerator::positiveNumberOrNull( const QString& str ) const +double KWord13OasisGenerator::positiveNumberOrNull( const TQString& str ) const { bool ok = false; const double d = str.toDouble( &ok ); @@ -178,11 +178,11 @@ double KWord13OasisGenerator::positiveNumberOrNull( const QString& str ) const } // Inspired by KoParagStyle::saveStyle -void KWord13OasisGenerator::declareLayout( KWord13Layout& layout ) +void KWord13OasisGenerator::declareLayout( KWord13Layout& tqlayout ) { - KoGenStyle gs( KoGenStyle::STYLE_AUTO, "paragraph", layout.m_name ); + KoGenStyle gs( KoGenStyle::STYLE_AUTO, "paragraph", tqlayout.m_name ); - // ### TODO: any display name? gs.addAttribute( "style:display-name", layout.m_name ); + // ### TODO: any display name? gs.addAttribute( "style:display-name", tqlayout.m_name ); #if 0 // TODO: check that this is correct if ( m_paragLayout.counter && m_paragLayout.counter->depth() ) { @@ -192,21 +192,21 @@ void KWord13OasisGenerator::declareLayout( KWord13Layout& layout ) gs.addAttribute( "style:default-level", (int)m_paragLayout.counter->depth() + 1 ); } #endif - fillGenStyleWithLayout( layout, gs, false ); - fillGenStyleWithFormatOne( layout.m_format , gs, false ); + fillGenStyleWithLayout( tqlayout, gs, false ); + fillGenStyleWithFormatOne( tqlayout.m_format , gs, false ); - layout.m_autoStyleName = m_oasisGenStyles.lookup( gs, "P", true ); + tqlayout.m_autoStyleName = m_oasisGenStyles.lookup( gs, "P", true ); - kdDebug(30520) << "Layout: Parent " << layout.m_name << " => " << layout.m_autoStyleName << endl; + kdDebug(30520) << "Layout: Parent " << tqlayout.m_name << " => " << tqlayout.m_autoStyleName << endl; } // Inspired by KoParagStyle::saveStyle -void KWord13OasisGenerator::declareStyle( KWord13Layout& layout ) +void KWord13OasisGenerator::declareStyle( KWord13Layout& tqlayout ) { - KoGenStyle gs( KoGenStyle::STYLE_USER, "paragraph", QString::null ); + KoGenStyle gs( KoGenStyle::STYLE_USER, "paragraph", TQString() ); - gs.addAttribute( "style:display-name", layout.m_name ); + gs.addAttribute( "style:display-name", tqlayout.m_name ); #if 0 // TODO: check that this is correct if ( m_paragLayout.counter && m_paragLayout.counter->depth() ) { @@ -216,23 +216,23 @@ void KWord13OasisGenerator::declareStyle( KWord13Layout& layout ) gs.addAttribute( "style:default-level", (int)m_paragLayout.counter->depth() + 1 ); } #endif - fillGenStyleWithLayout( layout, gs, true ); - fillGenStyleWithFormatOne( layout.m_format , gs, true ); + fillGenStyleWithLayout( tqlayout, gs, true ); + fillGenStyleWithFormatOne( tqlayout.m_format , gs, true ); - layout.m_autoStyleName = m_oasisGenStyles.lookup( gs, layout.m_name, false ); + tqlayout.m_autoStyleName = m_oasisGenStyles.lookup( gs, tqlayout.m_name, false ); - kdDebug(30520) << "Style: " << layout.m_name << " => " << layout.m_autoStyleName << endl; + kdDebug(30520) << "Style: " << tqlayout.m_name << " => " << tqlayout.m_autoStyleName << endl; } // Inspired from KoTextFormat::save but we have not the same data to start with. void KWord13OasisGenerator::fillGenStyleWithFormatOne( const KWord13FormatOneData& one, KoGenStyle& gs, const bool style ) const { - QString str; // helper string + TQString str; // helper string KoGenStyle::PropertyType tt = KoGenStyle::TextType; bool redok = false, greenok = false, blueok = false, ok = false; - const QColor color( + const TQColor color( one.getProperty( "COLOR:red" ).toInt( &redok ), one.getProperty( "COLOR:green" ).toInt( &greenok ), one.getProperty( "COLOR:blue" ).toInt( &blueok ) ); @@ -273,7 +273,7 @@ void KWord13OasisGenerator::fillGenStyleWithFormatOne( const KWord13FormatOneDat } else { - gs.addProperty( "fo:font-weight", QString::number( weight * 10 ), tt ); + gs.addProperty( "fo:font-weight", TQString::number( weight * 10 ), tt ); } } else if ( style ) @@ -298,7 +298,7 @@ void KWord13OasisGenerator::fillGenStyleWithFormatOne( const KWord13FormatOneDat gs.addProperty( "style:text-underline-mode", d->m_bWordByWord ? "skip-white-space" : "continuous", tt ); gs.addProperty( "style:text-underline-type", m_underlineType == U_NONE ? "none" : m_underlineType == U_DOUBLE ? "double" : "single", tt ); - QString styleline; + TQString styleline; if ( m_underlineType == U_WAVE ) styleline = "wave"; else @@ -314,14 +314,14 @@ void KWord13OasisGenerator::fillGenStyleWithFormatOne( const KWord13FormatOneDat gs.addProperty( "style:text-line-through-style", styleline, tt ); //gs.addProperty( "style:text-line-through-color", ...) TODO in kotext - QString textPos; + TQString textPos; if ( d->m_offsetFromBaseLine != 0 ) - textPos = QString::number( 100 * d->m_offsetFromBaseLine / fn.pointSizeFloat() ) + '%'; + textPos = TQString::number( 100 * d->m_offsetFromBaseLine / fn.pointSizeFloat() ) + '%'; else if ( va == AlignSuperScript ) textPos = "super"; else if ( va == AlignSubScript ) textPos = "sub"; else textPos = "0%"; textPos += ' '; - textPos += QString::number( d->m_relativeTextSize * 100 ); + textPos += TQString::number( d->m_relativeTextSize * 100 ); textPos += '%'; gs.addProperty( "style:text-position", textPos, tt ); @@ -332,7 +332,7 @@ void KWord13OasisGenerator::fillGenStyleWithFormatOne( const KWord13FormatOneDat else if ( m_attributeFont == ATT_LOWER ) gs.addProperty( "fo:text-transform", "lowercase", tt ); - gs.addProperty( "fo:language", m_language == "en_US" ? QString("en") : m_language, tt ); + gs.addProperty( "fo:language", m_language == "en_US" ? TQString("en") : m_language, tt ); gs.addProperty( "fo:background-color", m_textBackColor.isValid() ? m_textBackColor.name() : "transparent", tt ); gs.addProperty( "fo:text-shadow", shadowAsCss(), tt ); @@ -341,13 +341,13 @@ void KWord13OasisGenerator::fillGenStyleWithFormatOne( const KWord13FormatOneDat } // Inspired from KoParagLayout::saveOasis but we have not the same data to start with. -void KWord13OasisGenerator::fillGenStyleWithLayout( const KWord13Layout& layout, KoGenStyle& gs, const bool style ) const +void KWord13OasisGenerator::fillGenStyleWithLayout( const KWord13Layout& tqlayout, KoGenStyle& gs, const bool style ) const { // ### TODO syntaxVersion < 3 - QString str; // Help string to store each KWord 1.3 layout property + TQString str; // Help string to store each KWord 1.3 tqlayout property - str = layout.getProperty( "FLOW:align" ); + str = tqlayout.getProperty( "FLOW:align" ); if ( str.isEmpty() && ! style) { // Nothing to do! @@ -361,7 +361,7 @@ void KWord13OasisGenerator::fillGenStyleWithLayout( const KWord13Layout& layout, gs.addProperty( "fo:text-align", "start" ); // i.e. direction-dependent } - str = layout.getProperty( "FLOW:dir" ); + str = tqlayout.getProperty( "FLOW:dir" ); if ( str == "R" ) // ### TODO: check the right value { gs.addProperty( "style:writing-mode", "rl-tb" ); // right-to-left, top-to-bottom @@ -372,11 +372,11 @@ void KWord13OasisGenerator::fillGenStyleWithLayout( const KWord13Layout& layout, } // ### TODO: do not define if it does not exist and ! style - gs.addPropertyPt( "fo:margin-left", numberOrNull( layout.getProperty( "INDENTS:left" ) ) ); - gs.addPropertyPt( "fo:margin-right", numberOrNull( layout.getProperty( "INDENTS:right" ) ) ); - gs.addPropertyPt( "fo:text-indent", numberOrNull( layout.getProperty( "INDENTS:first" ) ) ); - gs.addPropertyPt( "fo:margin-top", numberOrNull( layout.getProperty( "OFFSETS:before" ) ) ); - gs.addPropertyPt( "fo:margin-bottom", numberOrNull( layout.getProperty( "OFFSETS:after" ) ) ); + gs.addPropertyPt( "fo:margin-left", numberOrNull( tqlayout.getProperty( "INDENTS:left" ) ) ); + gs.addPropertyPt( "fo:margin-right", numberOrNull( tqlayout.getProperty( "INDENTS:right" ) ) ); + gs.addPropertyPt( "fo:text-indent", numberOrNull( tqlayout.getProperty( "INDENTS:first" ) ) ); + gs.addPropertyPt( "fo:margin-top", numberOrNull( tqlayout.getProperty( "OFFSETS:before" ) ) ); + gs.addPropertyPt( "fo:margin-bottom", numberOrNull( tqlayout.getProperty( "OFFSETS:after" ) ) ); #if 0 switch ( lineSpacingType ) { @@ -390,7 +390,7 @@ void KWord13OasisGenerator::fillGenStyleWithLayout( const KWord13Layout& layout, gs.addProperty( "fo:line-height", "200%" ); break; case KoParagLayout::LS_MULTIPLE: - gs.addProperty( "fo:line-height", QString::number( lineSpacing * 100.0 ) + '%' ); + gs.addProperty( "fo:line-height", TQString::number( lineSpacing * 100.0 ) + '%' ); break; case KoParagLayout::LS_FIXED: gs.addPropertyPt( "fo:line-height", lineSpacing ); @@ -405,7 +405,7 @@ void KWord13OasisGenerator::fillGenStyleWithLayout( const KWord13Layout& layout, #endif #if 0 - QBuffer buffer; + TQBuffer buffer; buffer.open( IO_WriteOnly ); KoXmlWriter tabsWriter( &buffer, 4 ); // indent==4: root,autostyle,style,parag-props tabsWriter.startElement( "style:tab-stops" ); @@ -425,9 +425,9 @@ void KWord13OasisGenerator::fillGenStyleWithLayout( const KWord13Layout& layout, case T_RIGHT: tabsWriter.addAttribute( "style:type", "right" ); break; - case T_DEC_PNT: // "alignment on decimal point" + case T_DEC_PNT: // "tqalignment on decimal point" tabsWriter.addAttribute( "style:type", "char" ); - tabsWriter.addAttribute( "style:char", QString( (*it).alignChar ) ); + tabsWriter.addAttribute( "style:char", TQString( (*it).alignChar ) ); break; case T_INVALID: // keep compiler happy, this can't happen break; @@ -474,7 +474,7 @@ void KWord13OasisGenerator::fillGenStyleWithLayout( const KWord13Layout& layout, } tabsWriter.endElement(); buffer.close(); - QString elementContents = QString::fromUtf8( buffer.buffer(), buffer.buffer().size() ); + TQString elementContents = TQString::fromUtf8( buffer.buffer(), buffer.buffer().size() ); gs.addChildElement( "style:tab-stops", elementContents ); #endif @@ -516,14 +516,14 @@ void KWord13OasisGenerator::generateTextFrameset( KoXmlWriter& writer, KWordText return; } - for ( QValueList<KWord13Paragraph>::Iterator it = frameset->m_paragraphGroup.begin(); + for ( TQValueList<KWord13Paragraph>::Iterator it = frameset->m_paragraphGroup.begin(); it != frameset->m_paragraphGroup.end(); ++it) { // Write rawly the paragrapgh (see KoTextParag::saveOasis) writer.startElement( "text:p", false ); // No indent inside! writer.addAttribute( "text:style-name", (*it).m_layout.m_autoStyleName ); #if 1 - const QString paragraphText( (*it).text() ); + const TQString paragraphText( (*it).text() ); int currentPos = 0; // Current position where the next character has to be written for ( KWord13Format* format = (*it).m_formats.first(); format; format = (*it).m_formats.next() ) @@ -553,7 +553,7 @@ void KWord13OasisGenerator::generateTextFrameset( KoXmlWriter& writer, KWordText else if ( format->m_id == 4 ) { // Variable // ### TEMPORARY - const QString text ( ( (KWord13FormatFour*) format ) -> m_text ); + const TQString text ( ( (KWord13FormatFour*) format ) -> m_text ); if ( text.isEmpty() ) writer.addTextNode( "#" ); // Placeholder else @@ -567,7 +567,7 @@ void KWord13OasisGenerator::generateTextFrameset( KoXmlWriter& writer, KWordText currentPos += length; } // We might have still something to write out - const QString tailText( paragraphText.mid( currentPos ) ); + const TQString tailText( paragraphText.mid( currentPos ) ); if ( ! tailText.isEmpty() ) writer.addTextSpan( tailText ); #else @@ -593,8 +593,8 @@ void KWord13OasisGenerator::writeStylesXml( void ) KoXmlWriter *stylesWriter = KoDocument::createOasisXmlWriter( &io, "office:document-styles" ); stylesWriter->startElement( "office:styles" ); - QValueList<KoGenStyles::NamedStyle> styles = m_oasisGenStyles.styles( KoGenStyle::STYLE_USER ); - QValueList<KoGenStyles::NamedStyle>::const_iterator it = styles.begin(); + TQValueList<KoGenStyles::NamedStyle> styles = m_oasisGenStyles.styles( KoGenStyle::STYLE_USER ); + TQValueList<KoGenStyles::NamedStyle>::const_iterator it = styles.begin(); for ( ; it != styles.end() ; ++it ) { (*it).style->writeStyle( stylesWriter, m_oasisGenStyles, "style:style", (*it).name, "style:paragraph-properties" ); } @@ -609,12 +609,12 @@ void KWord13OasisGenerator::writeStylesXml( void ) } #endif - QString pageLayoutName; + TQString pageLayoutName; styles = m_oasisGenStyles.styles( KoGenStyle::STYLE_PAGELAYOUT ); Q_ASSERT( styles.count() == 1 ); it = styles.begin(); for ( ; it != styles.end() ; ++it ) { - (*it).style->writeStyle( stylesWriter, m_oasisGenStyles, "style:page-layout", (*it).name, "style:page-layout-properties", false /*don't close*/ ); + (*it).style->writeStyle( stylesWriter, m_oasisGenStyles, "style:page-tqlayout", (*it).name, "style:page-tqlayout-properties", false /*don't close*/ ); //if ( m_pageLayout.columns > 1 ) TODO add columns element. This is a bit of a hack, // which only works as long as we have only one page master stylesWriter->endElement(); @@ -629,7 +629,7 @@ void KWord13OasisGenerator::writeStylesXml( void ) 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 ); stylesWriter->endElement(); stylesWriter->endElement(); // office:master-styles @@ -664,8 +664,8 @@ void KWord13OasisGenerator::writeContentXml(void) // Automatic styles writer->startElement( "office:automatic-styles" ); - QValueList<KoGenStyles::NamedStyle> styles = m_oasisGenStyles.styles( KoGenStyle::STYLE_AUTO ); - QValueList<KoGenStyles::NamedStyle>::const_iterator it; + TQValueList<KoGenStyles::NamedStyle> styles = m_oasisGenStyles.styles( KoGenStyle::STYLE_AUTO ); + TQValueList<KoGenStyles::NamedStyle>::const_iterator it; for ( it = styles.begin(); it != styles.end() ; ++it ) { (*it).style->writeStyle( writer, m_oasisGenStyles, "style:style", (*it).name, "style:paragraph-properties" ); } @@ -718,15 +718,15 @@ void KWord13OasisGenerator::writeMetaXml(void) // Tell who we are in case that we have a bug in our filter output! // According to OASIS spec section 3.1.1, it has to follow section 14.43 of RFC 2616 writer->startElement( "meta:generator" ); - QString strVersion; + TQString strVersion; strVersion += "KWord-OneDotThree-Import-Filter/"; - strVersion += QString( "$Revision: 515673 $" ).mid( 10 ).remove( '$' ).stripWhiteSpace(); + strVersion += TQString( "$Revision: 515673 $" ).mid( 10 ).remove( '$' ).stripWhiteSpace(); strVersion += " KOffice/"; strVersion += KOFFICE_VERSION_STRING; writer->addTextSpan( strVersion ); writer->endElement(); - QString str; // Helper string + TQString str; // Helper string str = m_kwordDocument->getDocumentInfo( "about:title" ); if ( !str.isEmpty() ) @@ -754,7 +754,7 @@ void KWord13OasisGenerator::writeMetaXml(void) // ### TODO: what about the other document info of KWord 1.3? - QDateTime dt; + TQDateTime dt; dt = m_kwordDocument->creationDate(); if ( dt.isValid() ) @@ -794,7 +794,7 @@ void KWord13OasisGenerator::writeMetaXml(void) #if 1 zipWriteData( "0" ); // ### TODO #else - zipWriteData( QString::number ( m_pictureNumber ) ); + zipWriteData( TQString::number ( m_pictureNumber ) ); #endif zipWriteData( "\"" ); @@ -802,7 +802,7 @@ void KWord13OasisGenerator::writeMetaXml(void) #if 1 zipWriteData( "0" ); // ### TODO #else - zipWriteData( QString::number ( m_tableNumber ) ); + zipWriteData( TQString::number ( m_tableNumber ) ); #endif zipWriteData( "\"" ); #endif @@ -831,7 +831,7 @@ void KWord13OasisGenerator::writePreviewFile(void) } // Load image - QImage image( m_kwordDocument->m_previewFile->name() ); + TQImage image( m_kwordDocument->m_previewFile->name() ); if ( image.isNull() ) { kdWarning(30520) << "Could not re-read preview from temp file!" << endl; @@ -839,7 +839,7 @@ void KWord13OasisGenerator::writePreviewFile(void) } // We have a 256x256x8 preview and we need a 128x128x32 preview with alpha channel - QImage preview( image.convertDepth( 32, Qt::ColorOnly ).smoothScale( 128, 128 ) ); + TQImage preview( image.convertDepth( 32, Qt::ColorOnly ).smoothScale( 128, 128 ) ); if ( preview.isNull() ) { kdWarning(30520) << "Could not create preview!" << endl; @@ -867,23 +867,23 @@ void KWord13OasisGenerator::writePictures( void ) return; } - for ( QDictIterator<KWord13Picture> it( m_kwordDocument->m_pictureDict ) ; it.current(); ++it ) + for ( TQDictIterator<KWord13Picture> it( m_kwordDocument->m_pictureDict ) ; it.current(); ++it ) { if ( !it.current()->m_valid || !it.current()->m_tempFile ) { kdDebug(30520) << "No data for picture: " << it.currentKey() << endl; continue; } - const QString fileName( it.current()->m_tempFile->name() ); - const QString oasisName( it.current()->getOasisPictureName() ); + const TQString fileName( it.current()->m_tempFile->name() ); + const TQString oasisName( it.current()->getOasisPictureName() ); kdDebug(30520) << "Copying... " << it.currentKey() << endl << " => " << oasisName << endl; - QFile file( fileName ); + TQFile file( fileName ); if ( !file.open( IO_ReadOnly ) ) { kdWarning(30520) << "Cannot open: " << fileName << endl; continue; } - QByteArray array( file.readAll() ); + TQByteArray array( file.readAll() ); if ( array.isNull() ) { kdWarning(30520) << "Null picture for " << fileName << endl; @@ -898,7 +898,7 @@ void KWord13OasisGenerator::writePictures( void ) if ( m_manifestWriter ) { - const QString mimeType ( KMimeType::findByContent( array, 0 )->name() ); + const TQString mimeType ( KMimeType::findByContent( array, 0 )->name() ); if ( mimeType == "application/octet-stream" ) { kdWarning(30520) << "Generic mime type for " << it.currentKey() << endl; @@ -911,7 +911,7 @@ void KWord13OasisGenerator::writePictures( void ) } -bool KWord13OasisGenerator::generate ( const QString& fileName, KWord13Document& kwordDocument ) +bool KWord13OasisGenerator::generate ( const TQString& fileName, KWord13Document& kwordDocument ) { if ( m_kwordDocument && ( (void*) m_kwordDocument ) != ( (void*) &kwordDocument ) ) { @@ -929,10 +929,10 @@ bool KWord13OasisGenerator::generate ( const QString& fileName, KWord13Document& m_store->disallowNameExpansion(); // Prepare manifest file - in memory (inspired by KoDocument::saveNativeFormat) - QByteArray manifestData; - QBuffer manifestBuffer( manifestData ); + TQByteArray manifestData; + TQBuffer manifestBuffer( manifestData ); manifestBuffer.open( IO_WriteOnly ); - m_manifestWriter = new KoXmlWriter( &manifestBuffer ); + m_manifestWriter = new KoXmlWriter( TQT_TQIODEVICE(&manifestBuffer) ); m_manifestWriter->startDocument( "manifest:manifest" ); m_manifestWriter->startElement( "manifest:manifest" ); m_manifestWriter->addAttribute( "xmlns:manifest", "urn:oasis:names:tc:openoffice:xmlns:manifest:1.0" ); diff --git a/filters/kword/kword1.3/import/kword13oasisgenerator.h b/filters/kword/kword1.3/import/kword13oasisgenerator.h index 3c9ae245..39bc232a 100644 --- a/filters/kword/kword1.3/import/kword13oasisgenerator.h +++ b/filters/kword/kword1.3/import/kword13oasisgenerator.h @@ -22,8 +22,8 @@ #define STRICT_OOWRITER_VERSION_1 -class QString; -class QTextStream; +class TQString; +class TQTextStream; class KZip; class KoStore; class KoGenStyle; @@ -39,7 +39,7 @@ public: ~KWord13OasisGenerator( void ); bool prepare( KWord13Document& kwordDocument ); - bool generate( const QString& fileName, KWord13Document& kwordDocument ); + bool generate( const TQString& fileName, KWord13Document& kwordDocument ); protected: // Generating phase /// @param main Is it the main frameset? void generateTextFrameset( KoXmlWriter& writer, KWordTextFrameset* frameset, bool main ); @@ -49,21 +49,21 @@ protected: // Generating phase void writePreviewFile(void); void writePictures( void ); protected: // Preparing phase - /// Preparing page layout + /// Preparing page tqlayout void preparePageLayout( void ); void prepareTextFrameset( KWordTextFrameset* frameset ); /// Also sets the name of the automatical style - void declareLayout( KWord13Layout& layout ); + void declareLayout( KWord13Layout& tqlayout ); /// Also sets the name of the automatical style - void declareStyle( KWord13Layout& layout ); - double numberOrNull( const QString& str ) const; - double positiveNumberOrNull( const QString& str ) const; + void declareStyle( KWord13Layout& tqlayout ); + double numberOrNull( const TQString& str ) const; + double positiveNumberOrNull( const TQString& str ) const; void fillGenStyleWithFormatOne( const KWord13FormatOneData& one, KoGenStyle& gs, const bool style ) const; - void fillGenStyleWithLayout( const KWord13Layout& layout, KoGenStyle& gs, const bool style ) const; + void fillGenStyleWithLayout( const KWord13Layout& tqlayout, KoGenStyle& gs, const bool style ) const; protected: KWord13Document* m_kwordDocument; KoStore* m_store; - QString m_contentAutomaticStyles; ///< Automatic styles for content.xml (in OO format) + TQString m_contentAutomaticStyles; ///< Automatic styles for content.xml (in OO format) KoGenStyles m_oasisGenStyles; ///< OASIS styles KoXmlWriter* m_manifestWriter; ///< Manifest file writer }; diff --git a/filters/kword/kword1.3/import/kword13paragraph.cpp b/filters/kword/kword1.3/import/kword13paragraph.cpp index d22372b3..f26bee46 100644 --- a/filters/kword/kword1.3/import/kword13paragraph.cpp +++ b/filters/kword/kword1.3/import/kword13paragraph.cpp @@ -10,7 +10,7 @@ KWord13Paragraph::~KWord13Paragraph( void ) { } -void KWord13Paragraph::xmldump( QTextStream& iostream ) +void KWord13Paragraph::xmldump( TQTextStream& iostream ) { iostream << " <paragraph>\n"; iostream << " <text>" << m_text << "</text>\n"; @@ -18,27 +18,27 @@ void KWord13Paragraph::xmldump( QTextStream& iostream ) iostream << " </paragraph>\n"; } -void KWord13Paragraph::setText( const QString& str) +void KWord13Paragraph::setText( const TQString& str) { m_text = str; } -void KWord13Paragraph::appendText( const QString& str) +void KWord13Paragraph::appendText( const TQString& str) { m_text += str; } -QString KWord13Paragraph::text( void ) const +TQString KWord13Paragraph::text( void ) const { return m_text; } -void KWord13ParagraphGroup::xmldump( QTextStream& iostream ) +void KWord13ParagraphGroup::xmldump( TQTextStream& iostream ) { iostream << " <paragraphgroup>\n"; - for( QValueList <KWord13Paragraph>::Iterator it = begin(); + for( TQValueList <KWord13Paragraph>::Iterator it = begin(); it != end(); ++it ) { (*it).xmldump( iostream ); diff --git a/filters/kword/kword1.3/import/kword13paragraph.h b/filters/kword/kword1.3/import/kword13paragraph.h index 269e4821..0855aaec 100644 --- a/filters/kword/kword1.3/import/kword13paragraph.h +++ b/filters/kword/kword1.3/import/kword13paragraph.h @@ -2,9 +2,9 @@ #ifndef _FILTER_KWORD_1_3__KWORDPARAGRAPH_H #define _FILTER_KWORD_1_3__KWORDPARAGRAPH_H -#include <qstring.h> -#include <qvaluelist.h> -#include <qptrlist.h> +#include <tqstring.h> +#include <tqvaluelist.h> +#include <tqptrlist.h> #include "kword13layout.h" @@ -19,27 +19,27 @@ public: KWord13Paragraph( void ); ~KWord13Paragraph( void ); public: - void xmldump( QTextStream& iostream ); - void setText( const QString& str); - void appendText( const QString& str); - QString text( void ) const; + void xmldump( TQTextStream& iostream ); + void setText( const TQString& str); + void appendText( const TQString& str); + TQString text( void ) const; public: /// \<LAYOUT\> KWord13Layout m_layout; /// \<FORMATS\> - QPtrList<KWord13Format> m_formats; + TQPtrList<KWord13Format> m_formats; private: - QString m_text; ///< Text + TQString m_text; ///< Text }; /** * Group of paragraphs * (Mostly all paragraphs of a text frameset) */ -class KWord13ParagraphGroup : public QValueList <KWord13Paragraph> +class KWord13ParagraphGroup : public TQValueList <KWord13Paragraph> { public: - void xmldump( QTextStream& iostream ); + void xmldump( TQTextStream& iostream ); }; #endif // _FILTER_KWORD_1_3__KWORDPARAGRAPH_H diff --git a/filters/kword/kword1.3/import/kword13parser.cpp b/filters/kword/kword1.3/import/kword13parser.cpp index 61dd9d00..c6dce3d5 100644 --- a/filters/kword/kword1.3/import/kword13parser.cpp +++ b/filters/kword/kword1.3/import/kword13parser.cpp @@ -53,7 +53,7 @@ KWord13Parser::~KWord13Parser( void ) delete m_currentFormat; } -bool KWord13Parser::startElementFormatOneProperty( const QString& name, const QXmlAttributes& attributes, KWord13StackItem *stackItem) +bool KWord13Parser::startElementFormatOneProperty( const TQString& name, const TQXmlAttributes& attributes, KWord13StackItem *stackItem) { // ### TODO: check status if ( stackItem->elementType == KWord13TypeLayoutFormatOne ) @@ -65,7 +65,7 @@ bool KWord13Parser::startElementFormatOneProperty( const QString& name, const QX } for (int i = 0; i < attributes.count(); ++i ) { - QString attrName ( name ); + TQString attrName ( name ); attrName += ':'; attrName += attributes.qName( i ); m_currentLayout->m_format.m_properties[ attrName ] = attributes.value( i ); @@ -91,7 +91,7 @@ bool KWord13Parser::startElementFormatOneProperty( const QString& name, const QX for (int i = 0; i < attributes.count(); ++i ) { - QString attrName ( name ); + TQString attrName ( name ); attrName += ':'; attrName += attributes.qName( i ); data->m_properties[ attrName ] = attributes.value( i ); @@ -106,12 +106,12 @@ bool KWord13Parser::startElementFormatOneProperty( const QString& name, const QX } else { - kdError(30520) << "Wrong parents for FORMAT property: " << name << endl; + kdError(30520) << "Wrong tqparents for FORMAT property: " << name << endl; return false; } } -bool KWord13Parser::startElementLayoutProperty( const QString& name, const QXmlAttributes& attributes, KWord13StackItem *stackItem) +bool KWord13Parser::startElementLayoutProperty( const TQString& name, const TQXmlAttributes& attributes, KWord13StackItem *stackItem) { // ### TODO: check status if ( stackItem->elementType == KWord13TypeIgnore ) @@ -122,7 +122,7 @@ bool KWord13Parser::startElementLayoutProperty( const QString& name, const QXmlA { for (int i = 0; i < attributes.count(); ++i ) { - QString attrName ( name ); + TQString attrName ( name ); attrName += ':'; attrName += attributes.qName( i ); m_currentLayout->m_layoutProperties[ attrName ] = attributes.value( i ); @@ -133,12 +133,12 @@ bool KWord13Parser::startElementLayoutProperty( const QString& name, const QXmlA } else { - kdError(30520) << "No current layout for storing property: " << name << endl; + kdError(30520) << "No current tqlayout for storing property: " << name << endl; return false; } } -bool KWord13Parser::startElementName( const QString&, const QXmlAttributes& attributes, KWord13StackItem *stackItem ) +bool KWord13Parser::startElementName( const TQString&, const TQXmlAttributes& attributes, KWord13StackItem *stackItem ) { if ( stackItem->elementType != KWord13TypeLayout ) { @@ -156,9 +156,9 @@ bool KWord13Parser::startElementName( const QString&, const QXmlAttributes& attr return true; } -bool KWord13Parser::startElementFormat( const QString&, const QXmlAttributes& attributes, KWord13StackItem *stackItem ) +bool KWord13Parser::startElementFormat( const TQString&, const TQXmlAttributes& attributes, KWord13StackItem *stackItem ) { - // ### TODO: check parent? + // ### TODO: check tqparent? if ( stackItem->elementType == KWord13TypeIgnore ) { return true; @@ -166,7 +166,7 @@ bool KWord13Parser::startElementFormat( const QString&, const QXmlAttributes& at else if ( stackItem->elementType == KWord13TypeLayout ) { stackItem->elementType = KWord13TypeLayoutFormatOne; - return true; // Everything is done directly on the layout + return true; // Everything is done directly on the tqlayout } else if ( stackItem->elementType != KWord13TypeFormatsPlural ) { @@ -228,9 +228,9 @@ bool KWord13Parser::startElementFormat( const QString&, const QXmlAttributes& at return true; } -bool KWord13Parser::startElementLayout( const QString&, const QXmlAttributes& attributes, KWord13StackItem *stackItem ) +bool KWord13Parser::startElementLayout( const TQString&, const TQXmlAttributes& attributes, KWord13StackItem *stackItem ) { - // ### TODO: check parent? + // ### TODO: check tqparent? if ( stackItem->elementType == KWord13TypeIgnore ) { return true; @@ -247,7 +247,7 @@ bool KWord13Parser::startElementLayout( const QString&, const QXmlAttributes& at if ( m_currentLayout ) { // Delete an eventually already existing paragraph (should not happen) - kdWarning(30520) << "Current layout already defined!" << endl; + kdWarning(30520) << "Current tqlayout already defined!" << endl; delete m_currentLayout; } @@ -257,7 +257,7 @@ bool KWord13Parser::startElementLayout( const QString&, const QXmlAttributes& at return true; } -bool KWord13Parser::startElementParagraph( const QString&, const QXmlAttributes&, KWord13StackItem *stackItem ) +bool KWord13Parser::startElementParagraph( const TQString&, const TQXmlAttributes&, KWord13StackItem *stackItem ) { if ( stackItem->elementType == KWord13TypeUnknownFrameset ) { @@ -279,7 +279,7 @@ bool KWord13Parser::startElementParagraph( const QString&, const QXmlAttributes& return true; } -bool KWord13Parser::startElementFrame( const QString& name, const QXmlAttributes& attributes, KWord13StackItem *stackItem ) +bool KWord13Parser::startElementFrame( const TQString& name, const TQXmlAttributes& attributes, KWord13StackItem *stackItem ) { if ( stackItem->elementType == KWord13TypeFrameset || stackItem->elementType == KWord13TypePictureFrameset ) { @@ -289,9 +289,9 @@ bool KWord13Parser::startElementFrame( const QString& name, const QXmlAttributes const int num = ++stackItem->m_currentFrameset->m_numFrames; for (int i = 0; i < attributes.count(); ++i ) { - QString attrName ( name ); + TQString attrName ( name ); attrName += ':'; - attrName += QString::number( num ); + attrName += TQString::number( num ); attrName += ':'; attrName += attributes.qName( i ); stackItem->m_currentFrameset->m_frameData[ attrName ] = attributes.value( i ); @@ -313,10 +313,10 @@ bool KWord13Parser::startElementFrame( const QString& name, const QXmlAttributes return true; } -bool KWord13Parser::startElementFrameset( const QString& name, const QXmlAttributes& attributes, KWord13StackItem *stackItem ) +bool KWord13Parser::startElementFrameset( const TQString& name, const TQXmlAttributes& attributes, KWord13StackItem *stackItem ) { - const QString frameTypeStr( attributes.value( "frameType" ) ); - const QString frameInfoStr( attributes.value( "frameInfo" ) ); + const TQString frameTypeStr( attributes.value( "frameType" ) ); + const TQString frameInfoStr( attributes.value( "frameInfo" ) ); if ( frameTypeStr.isEmpty() || frameInfoStr.isEmpty() ) { @@ -390,7 +390,7 @@ bool KWord13Parser::startElementFrameset( const QString& name, const QXmlAttribu } -bool KWord13Parser::startElementDocumentAttributes( const QString& name, const QXmlAttributes& attributes, KWord13StackItem *stackItem, +bool KWord13Parser::startElementDocumentAttributes( const TQString& name, const TQXmlAttributes& attributes, KWord13StackItem *stackItem, const KWord13StackItemType& allowedParentType, const KWord13StackItemType& newType ) { if ( parserStack.current()->elementType == allowedParentType ) @@ -398,7 +398,7 @@ bool KWord13Parser::startElementDocumentAttributes( const QString& name, const Q stackItem->elementType = newType; for (int i = 0; i < attributes.count(); ++i ) { - QString attrName ( name ); + TQString attrName ( name ); attrName += ':'; attrName += attributes.qName( i ); m_kwordDocument->m_documentProperties[ attrName ] = attributes.value( i ); @@ -408,14 +408,14 @@ bool KWord13Parser::startElementDocumentAttributes( const QString& name, const Q } else { - kdError(30520) << "Wrong parent!" << endl; + kdError(30520) << "Wrong tqparent!" << endl; return false; } } -bool KWord13Parser::startElementKey( const QString& name, const QXmlAttributes& attributes, KWord13StackItem *stackItem ) +bool KWord13Parser::startElementKey( const TQString& name, const TQXmlAttributes& attributes, KWord13StackItem *stackItem ) { - const QString key( calculatePictureKey( attributes.value( "filename" ), + const TQString key( calculatePictureKey( attributes.value( "filename" ), attributes.value( "year" ), attributes.value( "month" ), attributes.value( "day" ), attributes.value( "hour" ), attributes.value( "minute" ), attributes.value( "second" ), attributes.value( "msec" ) ) ); @@ -450,11 +450,11 @@ bool KWord13Parser::startElementKey( const QString& name, const QXmlAttributes& return true; } -bool KWord13Parser::startElementAnchor( const QString& name, const QXmlAttributes& attributes, KWord13StackItem *stackItem ) +bool KWord13Parser::startElementAnchor( const TQString& name, const TQXmlAttributes& attributes, KWord13StackItem *stackItem ) { if ( stackItem->elementType == KWord13TypeAnchor ) { - const QString anchorType ( attributes.value( "type" ) ); + const TQString anchorType ( attributes.value( "type" ) ); if ( anchorType == "grpMgr" ) kdWarning(30520) << "Anchor of type grpMgr! Not tested!" << endl; // ### TODO else if ( anchorType != "frameset" ) @@ -462,7 +462,7 @@ bool KWord13Parser::startElementAnchor( const QString& name, const QXmlAttribute kdError(30520) << "Unsupported anchor type: " << anchorType << endl; return false; } - const QString frameset ( attributes.value( "instance" ) ); + const TQString frameset ( attributes.value( "instance" ) ); if ( frameset.isEmpty() ) { kdError(30520) << "Anchor to an empty frameset name! Aborting!" << endl; @@ -474,7 +474,7 @@ bool KWord13Parser::startElementAnchor( const QString& name, const QXmlAttribute six->m_anchorName = frameset; } // add frameset name to the list of anchored framesets - if ( m_kwordDocument->m_anchoredFramesetNames.find( frameset ) == m_kwordDocument->m_anchoredFramesetNames.end() ) + if ( m_kwordDocument->m_anchoredFramesetNames.tqfind( frameset ) == m_kwordDocument->m_anchoredFramesetNames.end() ) { m_kwordDocument->m_anchoredFramesetNames.append( frameset ); } @@ -488,7 +488,7 @@ bool KWord13Parser::startElementAnchor( const QString& name, const QXmlAttribute } -bool KWord13Parser::startElement( const QString&, const QString&, const QString& name, const QXmlAttributes& attributes ) +bool KWord13Parser::startElement( const TQString&, const TQString&, const TQString& name, const TQXmlAttributes& attributes ) { kdDebug(30520) << indent << "<" << name << ">" << endl; // DEBUG indent += "*"; //DEBUG @@ -532,7 +532,7 @@ bool KWord13Parser::startElement( const QString&, const QString&, const QString& if ( stackItem->elementType == KWord13TypeParagraph && m_currentParagraph ) { stackItem->elementType = KWord13TypeText; - m_currentParagraph->setText( QString::null ); + m_currentParagraph->setText( TQString() ); } else { @@ -625,13 +625,13 @@ bool KWord13Parser::startElement( const QString&, const QString&, const QString& } else if ( name == "FRAMESTYLE" ) { - // ### TODO, but some of the <STYLE> children are also children of <FRAMESTYLE>, so we have to set it to "ignore" + // ### TODO, but some of the <STYLE> tqchildren are also tqchildren of <FRAMESTYLE>, so we have to set it to "ignore" stackItem->elementType = KWord13TypeIgnore; success = true; } else if ( name == "PICTURES" || name == "PIXMAPS" || name == "CLIPARTS" ) { - // We just need a separate "type" for the <KEY> children + // We just need a separate "type" for the <KEY> tqchildren stackItem->elementType = KWord13TypePicturesPlural; success = true; } @@ -653,7 +653,7 @@ bool KWord13Parser::startElement( const QString&, const QString&, const QString& return success; } -bool KWord13Parser :: endElement( const QString&, const QString& , const QString& name) +bool KWord13Parser :: endElement( const TQString&, const TQString& , const TQString& name) { indent.remove( 0, 1 ); // DEBUG //kdDebug(30520) << indent << "</" << name << ">" << endl; // DEBUG @@ -756,7 +756,7 @@ bool KWord13Parser :: endElement( const QString&, const QString& , const QString return success; } -bool KWord13Parser :: characters ( const QString & ch ) +bool KWord13Parser :: characters ( const TQString & ch ) { #if 0 // DEBUG start @@ -795,14 +795,14 @@ bool KWord13Parser :: characters ( const QString & ch ) const uint length = ch.length(); for ( uint i = 0; i < length; ++i ) { - const ushort uni = ch.at(i).unicode(); + const ushort uni = ch.tqat(i).tqunicode(); if ( uni >= 32 ) continue; // Normal character else if ( uni == 9 || uni == 10 || uni == 13) continue; // Tabulator, Line Feed, Carriage Return else if ( uni == 1 ) { - // Old KWord documents have a QChar(1) as anchor character + // Old KWord documents have a TQChar(1) as anchor character // So replace it with the anchor character of recent KWord versions ch[i]='#'; } @@ -840,14 +840,14 @@ bool KWord13Parser :: characters ( const QString & ch ) return success; } -bool KWord13Parser::warning(const QXmlParseException& exception) +bool KWord13Parser::warning(const TQXmlParseException& exception) { kdWarning(30520) << "XML parsing warning: line " << exception.lineNumber() << " col " << exception.columnNumber() << " message: " << exception.message() << endl; return true; } -bool KWord13Parser::error(const QXmlParseException& exception) +bool KWord13Parser::error(const TQXmlParseException& exception) { // A XML error is recoverable, so it is only a KDE warning kdWarning(30520) << "XML parsing error: line " << exception.lineNumber() @@ -855,7 +855,7 @@ bool KWord13Parser::error(const QXmlParseException& exception) return true; } -bool KWord13Parser::fatalError (const QXmlParseException& exception) +bool KWord13Parser::fatalError (const TQXmlParseException& exception) { kdError(30520) << "XML parsing fatal error: line " << exception.lineNumber() << " col " << exception.columnNumber() << " message: " << exception.message() << endl; @@ -863,10 +863,10 @@ bool KWord13Parser::fatalError (const QXmlParseException& exception) return false; // Stop parsing now, we do not need further errors. } -QString KWord13Parser::calculatePictureKey( const QString& filename, - const QString& year, const QString& month, const QString& day, - const QString& hour, const QString& minute, const QString& second, - const QString& microsecond ) const +TQString KWord13Parser::calculatePictureKey( const TQString& filename, + const TQString& year, const TQString& month, const TQString& day, + const TQString& hour, const TQString& minute, const TQString& second, + const TQString& microsecond ) const { bool ok; bool globalOk = true; @@ -902,27 +902,27 @@ QString KWord13Parser::calculatePictureKey( const QString& filename, if ( globalOk ) { // No error until then, so check if the date/time is valid at all - globalOk = globalOk && QDate::isValid( iYear, iMonth, iDay ); - globalOk = globalOk && QTime::isValid( iHour, iMinute, iSecond, iMicrosecond ); + globalOk = globalOk && TQDate::isValid( iYear, iMonth, iDay ); + globalOk = globalOk && TQTime::isValid( iHour, iMinute, iSecond, iMicrosecond ); } - QDateTime dt; + TQDateTime dt; if ( globalOk ) { // The date/time seems correct - dt = QDateTime( QDate( iYear, iMonth, iDay ), QTime( iHour, iMinute, iSecond, iMicrosecond ) ); + dt = TQDateTime( TQDate( iYear, iMonth, iDay ), TQTime( iHour, iMinute, iSecond, iMicrosecond ) ); } else { // *NIX epoch (We do not really care if it is UTC or local time) - dt = QDateTime( QDate( 1970, 1, 1 ), QTime( 0, 0, 0, 0 ) ); + dt = TQDateTime( TQDate( 1970, 1, 1 ), TQTime( 0, 0, 0, 0 ) ); } // We put the date/time first, as if the date is useful, it will have faster a difference than a path // where the common pth might be very long. // Output the date/time as compact as possible - QString result ( dt.toString( "yyyyMMddhhmmsszzz" ) ); + TQString result ( dt.toString( "yyyyMMddhhmmsszzz" ) ); result += '@'; // A separator result += filename; return result; diff --git a/filters/kword/kword1.3/import/kword13parser.h b/filters/kword/kword1.3/import/kword13parser.h index 87f3ccad..7dc81d42 100644 --- a/filters/kword/kword1.3/import/kword13parser.h +++ b/filters/kword/kword1.3/import/kword13parser.h @@ -21,8 +21,8 @@ #ifndef KWORD_1_3_PARSER_H #define KWORD_1_3_PARSER_H -#include <qxml.h> -#include <qptrstack.h> +#include <tqxml.h> +#include <tqptrstack.h> class KWord13Paragraph; class KWord13Document; @@ -64,72 +64,72 @@ public: KWord13StackItem(); ~KWord13StackItem(); public: - QString itemName; ///< Name of the tag (only for error purposes) + TQString itemName; ///< Name of the tag (only for error purposes) KWord13StackItemType elementType; KWord13Frameset* m_currentFrameset; }; -class KWord13StackItemStack : public QPtrStack<KWord13StackItem> +class KWord13StackItemStack : public TQPtrStack<KWord13StackItem> { public: KWord13StackItemStack(void) { } ~KWord13StackItemStack(void) { } }; -class KWord13Parser : public QXmlDefaultHandler +class KWord13Parser : public TQXmlDefaultHandler { public: KWord13Parser( KWord13Document* kwordDocument ); virtual ~KWord13Parser( void ); -protected: //QXml +protected: //TQXml /// Process opening tag - virtual bool startElement( const QString&, const QString&, const QString& name, const QXmlAttributes& attributes); + virtual bool startElement( const TQString&, const TQString&, const TQString& name, const TQXmlAttributes& attributes); /// Process closing tag - virtual bool endElement( const QString&, const QString& , const QString& qName); + virtual bool endElement( const TQString&, const TQString& , const TQString& qName); /// Process element's characters (between opening and closing tags) - virtual bool characters ( const QString & ch ); - virtual bool warning(const QXmlParseException& exception); - virtual bool error(const QXmlParseException& exception); - virtual bool fatalError(const QXmlParseException& exception); + virtual bool characters ( const TQString & ch ); + virtual bool warning(const TQXmlParseException& exception); + virtual bool error(const TQXmlParseException& exception); + virtual bool fatalError(const TQXmlParseException& exception); protected: - /// Process children of \<FORMAT id="1"\> - bool startElementFormatOneProperty( const QString& name, const QXmlAttributes& attributes, KWord13StackItem *stackItem); - /// Process children of \<LAYOUT\> (with exceptions) - bool startElementLayoutProperty( const QString& name, const QXmlAttributes& attributes, KWord13StackItem *stackItem); + /// Process tqchildren of \<FORMAT id="1"\> + bool startElementFormatOneProperty( const TQString& name, const TQXmlAttributes& attributes, KWord13StackItem *stackItem); + /// Process tqchildren of \<LAYOUT\> (with exceptions) + bool startElementLayoutProperty( const TQString& name, const TQXmlAttributes& attributes, KWord13StackItem *stackItem); /// Process \<NAME\> - bool startElementName( const QString&, const QXmlAttributes& attributes, KWord13StackItem *stackItem ); + bool startElementName( const TQString&, const TQXmlAttributes& attributes, KWord13StackItem *stackItem ); /// Process \<FORMAT\> - bool startElementFormat( const QString&, const QXmlAttributes& attributes, KWord13StackItem *stackItem ); + bool startElementFormat( const TQString&, const TQXmlAttributes& attributes, KWord13StackItem *stackItem ); /// Process \<LAYOUT\> and \<STYLE\> - bool startElementLayout( const QString&, const QXmlAttributes&, KWord13StackItem *stackItem ); + bool startElementLayout( const TQString&, const TQXmlAttributes&, KWord13StackItem *stackItem ); /// Process \<PARAGRAPH\> - bool startElementParagraph( const QString& name, const QXmlAttributes& attributes, KWord13StackItem *stackItem ); + bool startElementParagraph( const TQString& name, const TQXmlAttributes& attributes, KWord13StackItem *stackItem ); /// Process \<FRAME\> - bool startElementFrame( const QString& name, const QXmlAttributes& attributes, KWord13StackItem *stackItem ); + bool startElementFrame( const TQString& name, const TQXmlAttributes& attributes, KWord13StackItem *stackItem ); /// Process \<FRAMESET\> - bool startElementFrameset( const QString& name, const QXmlAttributes& attributes, KWord13StackItem *stackItem ); - /// Process opening tag of some elements that are children of \<DOC\> and which only define document properties - bool startElementDocumentAttributes( const QString& name, const QXmlAttributes& attributes, + bool startElementFrameset( const TQString& name, const TQXmlAttributes& attributes, KWord13StackItem *stackItem ); + /// Process opening tag of some elements that are tqchildren of \<DOC\> and which only define document properties + bool startElementDocumentAttributes( const TQString& name, const TQXmlAttributes& attributes, KWord13StackItem *stackItem, const KWord13StackItemType& allowedParentType, const KWord13StackItemType& newType ); /// Process \<KEY\> - bool startElementKey( const QString& name, const QXmlAttributes& attributes, KWord13StackItem *stackItem ); + bool startElementKey( const TQString& name, const TQXmlAttributes& attributes, KWord13StackItem *stackItem ); /// Process \<ANCHOR\> - bool startElementAnchor( const QString& name, const QXmlAttributes& attributes, KWord13StackItem *stackItem ); + bool startElementAnchor( const TQString& name, const TQXmlAttributes& attributes, KWord13StackItem *stackItem ); /** * Get a picture key out of the individual \<KEY\> attributes * * \note The generated key is different that one of the class KoPictureKey */ - QString calculatePictureKey( const QString& filename, - const QString& year, const QString& month, const QString& day, - const QString& hour, const QString& minute, const QString& second, - const QString& microsecond ) const; + TQString calculatePictureKey( const TQString& filename, + const TQString& year, const TQString& month, const TQString& day, + const TQString& hour, const TQString& minute, const TQString& second, + const TQString& microsecond ) const; protected: - QString indent; //DEBUG + TQString indent; //DEBUG KWord13StackItemStack parserStack; KWord13Document* m_kwordDocument; KWord13Paragraph* m_currentParagraph; ///< Current paragraph - KWord13Layout* m_currentLayout; ///< Current layout (or style) + KWord13Layout* m_currentLayout; ///< Current tqlayout (or style) KWord13Format* m_currentFormat; ///< Current format }; diff --git a/filters/kword/kword1.3/import/kword13picture.cpp b/filters/kword/kword1.3/import/kword13picture.cpp index 6067d8b5..13437d6c 100644 --- a/filters/kword/kword1.3/import/kword13picture.cpp +++ b/filters/kword/kword1.3/import/kword13picture.cpp @@ -18,7 +18,7 @@ * Boston, MA 02110-1301, USA. */ -#include <qfile.h> +#include <tqfile.h> #include <kdebug.h> #include <ktempfile.h> @@ -42,7 +42,7 @@ bool KWord13Picture::loadPicture( KoStore* store ) { kdDebug(30520) << "Loading picture: " << m_storeName << endl; - m_tempFile = new KTempFile( QString::null, ".bin" ); + m_tempFile = new KTempFile( TQString(), ".bin" ); m_tempFile->setAutoDelete( true ); if ( ! store->extractFile( m_storeName, m_tempFile->name() ) ) @@ -59,26 +59,26 @@ bool KWord13Picture::loadPicture( KoStore* store ) return m_valid; } -QString KWord13Picture::getOasisPictureName( void ) const +TQString KWord13Picture::getOasisPictureName( void ) const { if ( ! m_valid || ! m_tempFile ) - return QString::null; + return TQString(); // We need a 32 digit hex value of the picture number // Please note: it is an exact 32 digit value, truncated if the value is more than 512 bits wide. :-) - QString number; + TQString number; number.fill('0',32); // ### TODO: have a real counter instead of using the pointers - number += QString::number( (long long)( (void*) m_tempFile ) , 16 ); // in hex + number += TQString::number( (long long)( (void*) m_tempFile ) , 16 ); // in hex - QString strExtension( m_storeName.lower() ); - const int result = m_storeName.findRev( '.' ); + TQString strExtension( m_storeName.lower() ); + const int result = m_storeName.tqfindRev( '.' ); if ( result >= 0 ) { strExtension = m_storeName.mid( result ); } - QString ooName( "Pictures/" ); + TQString ooName( "Pictures/" ); ooName += number.right( 32 ); ooName += strExtension; diff --git a/filters/kword/kword1.3/import/kword13picture.h b/filters/kword/kword1.3/import/kword13picture.h index b8a18a0c..e6a1951f 100644 --- a/filters/kword/kword1.3/import/kword13picture.h +++ b/filters/kword/kword1.3/import/kword13picture.h @@ -24,7 +24,7 @@ class KTempFile; class KoStore; -#include <qstring.h> +#include <tqstring.h> class KWord13Picture { @@ -33,9 +33,9 @@ public: ~KWord13Picture( void ); public: bool loadPicture( KoStore* store ); - QString getOasisPictureName( void ) const; + TQString getOasisPictureName( void ) const; public: - QString m_storeName; ///< Name of the file in store + TQString m_storeName; ///< Name of the file in store KTempFile* m_tempFile; ///< Temporary file bool m_valid; ///< Is the picture valid? }; diff --git a/filters/kword/kword1.3/import/kword13postparsing.cpp b/filters/kword/kword1.3/import/kword13postparsing.cpp index a3dcd162..ff48b794 100644 --- a/filters/kword/kword1.3/import/kword13postparsing.cpp +++ b/filters/kword/kword1.3/import/kword13postparsing.cpp @@ -18,8 +18,8 @@ * Boston, MA 02110-1301, USA. */ -#include <qstring.h> -#include <qdict.h> +#include <tqstring.h> +#include <tqdict.h> #include <kdebug.h> @@ -42,7 +42,7 @@ bool KWord13PostParsing::postParsePictures( KoStore* store ) if ( ! m_kwordDocument ) return false; - for ( QDictIterator<KWord13Picture> it( m_kwordDocument->m_pictureDict ) ; it.current(); ++it ) + for ( TQDictIterator<KWord13Picture> it( m_kwordDocument->m_pictureDict ) ; it.current(); ++it ) { kdDebug(30520) << "Loading... " << it.currentKey() << endl; if ( ! it.current()->loadPicture( store ) ) diff --git a/filters/kword/kword1.3/import/kword13utils.cpp b/filters/kword/kword1.3/import/kword13utils.cpp index 0ac9272e..d870f484 100644 --- a/filters/kword/kword1.3/import/kword13utils.cpp +++ b/filters/kword/kword1.3/import/kword13utils.cpp @@ -1,14 +1,14 @@ #include "kword13utils.h" -QString EscapeXmlDump( const QString& strIn ) +TQString EscapeXmlDump( const TQString& strIn ) { - QString strReturn; - QChar ch; + TQString strReturn; + TQChar ch; for (uint i=0; i<strIn.length(); i++) { ch=strIn[i]; - switch (ch.unicode()) + switch (ch.tqunicode()) { case 38: // & { diff --git a/filters/kword/kword1.3/import/kword13utils.h b/filters/kword/kword1.3/import/kword13utils.h index 41365c6d..ef9eb94e 100644 --- a/filters/kword/kword1.3/import/kword13utils.h +++ b/filters/kword/kword1.3/import/kword13utils.h @@ -1,4 +1,4 @@ -#include <qstring.h> +#include <tqstring.h> -QString EscapeXmlDump( const QString& strIn ); +TQString EscapeXmlDump( const TQString& strIn ); diff --git a/filters/kword/latex/export/anchor.cc b/filters/kword/latex/export/anchor.cc index a66c8cd0..99915384 100644 --- a/filters/kword/latex/export/anchor.cc +++ b/filters/kword/latex/export/anchor.cc @@ -35,7 +35,7 @@ Anchor::~Anchor() kdDebug(30522) << "Destruction of an anchor." << endl; } -void Anchor::analyse(const QDomNode balise) +void Anchor::analyse(const TQDomNode balise) { /* MARKUPS FORMAT id="1" pos="0" len="17">...</FORMAT> */ Format::analyse(balise); @@ -51,7 +51,7 @@ void Anchor::analyse(const QDomNode balise) kdDebug(30522) << "END OF AN ANCHOR" << endl; } -void Anchor::generate(QTextStream &out) +void Anchor::generate(TQTextStream &out) { Element *elt = 0; diff --git a/filters/kword/latex/export/anchor.h b/filters/kword/latex/export/anchor.h index 9adc4641..4e666669 100644 --- a/filters/kword/latex/export/anchor.h +++ b/filters/kword/latex/export/anchor.h @@ -25,7 +25,7 @@ #ifndef __KWORD_LATEX_ANCHOR_H__ #define __KWORD_LATEX_ANCHOR_H__ -#include <qstring.h> +#include <tqstring.h> #include "format.h" /***********************************************************************/ @@ -38,8 +38,8 @@ */ class Anchor: public Format { - QString _type; - QString _instance; + TQString _type; + TQString _instance; public: @@ -50,7 +50,7 @@ class Anchor: public Format /** * Creates a new instances of Anchor. * - * @param para the parent class. + * @param para the tqparent class. */ Anchor(Para* para = 0); //Anchor(TextZone); @@ -65,22 +65,22 @@ class Anchor: public Format /** * Accessors */ - QString getType () const { return _type; } - QString getInstance() const { return _instance; } + TQString getType () const { return _type; } + TQString getInstance() const { return _instance; } /** * Modifiers */ - void setType (QString type) { _type = type; } - void setInstance(QString inst) { _instance = inst; } + void setType (TQString type) { _type = type; } + void setInstance(TQString inst) { _instance = inst; } /** * Helpfull functions */ - void analyse (const QDomNode); + void analyse (const TQDomNode); - void generate(QTextStream&); + void generate(TQTextStream&); //private: }; diff --git a/filters/kword/latex/export/border.h b/filters/kword/latex/export/border.h index 7f966819..b63065ca 100644 --- a/filters/kword/latex/export/border.h +++ b/filters/kword/latex/export/border.h @@ -178,7 +178,7 @@ class Border /** * Write a border frame */ - void generate(QTextStream&); + void generate(TQTextStream&); private: }; diff --git a/filters/kword/latex/export/config.cc b/filters/kword/latex/export/config.cc index a79296ca..8460aae4 100644 --- a/filters/kword/latex/export/config.cc +++ b/filters/kword/latex/export/config.cc @@ -76,7 +76,7 @@ void Config::desindent() } } -void Config::writeIndent(QTextStream& out) +void Config::writeIndent(TQTextStream& out) { for(int index = 0; index < _tabulation; index++) { diff --git a/filters/kword/latex/export/config.h b/filters/kword/latex/export/config.h index 56580bda..7a81b168 100644 --- a/filters/kword/latex/export/config.h +++ b/filters/kword/latex/export/config.h @@ -22,8 +22,8 @@ #ifndef __LATEX_CONFIG_H__ #define __LATEX_CONFIG_H__ -#include <qtextstream.h> -#include <qstringlist.h> +#include <tqtextstream.h> +#include <tqstringlist.h> /***********************************************************************/ /* Class: Config */ @@ -39,20 +39,20 @@ class Config /* Document tab */ bool _useLatexStyle; bool _isEmbeded; - QString _class; - QString _quality; + TQString _class; + TQString _quality; unsigned int _defaultFontSize; /* Pictures tab */ bool _convertPictures; - QString _picturesDir; + TQString _picturesDir; /* Language tab */ //bool _useUnicode; //bool _useLatin1; - QString _encoding; - QStringList _languagesList; - QString _defaultLanguage; + TQString _encoding; + TQStringList _languagesList; + TQString _defaultLanguage; int _tabSize; /* Size of the para indentation. */ int _tabulation; /* Total size of the indentation. */ @@ -77,18 +77,18 @@ class Config */ bool isKwordStyleUsed() const { return (_useLatexStyle == false); } bool isEmbeded() const { return _isEmbeded; } - QString getClass() const { return _class; } - QString getQuality() const { return _quality; } + TQString getClass() const { return _class; } + TQString getQuality() const { return _quality; } unsigned int getDefaultFontSize() const { return _defaultFontSize; } bool convertPictures() const { return _convertPictures; } - QString getPicturesDir() const { return _picturesDir; } + TQString getPicturesDir() const { return _picturesDir; } - bool mustUseUnicode() const { return (_encoding == "unicode"); } - bool mustUseLatin1() const { return (_encoding != "unicode"); } - QString getEncoding() const { return _encoding; } - QStringList getLanguagesList() const { return _languagesList; } - QString getDefaultLanguage() const { return _defaultLanguage; } + bool mustUseUnicode() const { return (_encoding == "tqunicode"); } + bool mustUseLatin1() const { return (_encoding != "tqunicode"); } + TQString getEncoding() const { return _encoding; } + TQStringList getLanguagesList() const { return _languagesList; } + TQString getDefaultLanguage() const { return _defaultLanguage; } int getTabSize() const { return _tabSize; } int getIndentation() const { return _tabulation; } @@ -110,16 +110,16 @@ class Config void setEmbeded(bool emb) { _isEmbeded = emb; } /** The class can be article, book, letter, report or slides. It's the type of the * latex document. */ - void setClass(const QString &lclass) { _class = lclass; } - void setQuality(const QString &quality) { _quality = quality; } + void setClass(const TQString &lclass) { _class = lclass; } + void setQuality(const TQString &quality) { _quality = quality; } void setDefaultFontSize(int size) { _defaultFontSize = size; } void convertPictures(bool state) { _convertPictures = state; } - void setPicturesDir(const QString &dir) { _picturesDir = dir; } + void setPicturesDir(const TQString &dir) { _picturesDir = dir; } - void setEncoding(const QString &enc) { _encoding = enc; } - void addLanguage(const QString &l) { _languagesList.append(l); } - void setDefaultLanguage(const QString &l) { _defaultLanguage = l; } + void setEncoding(const TQString &enc) { _encoding = enc; } + void addLanguage(const TQString &l) { _languagesList.append(l); } + void setDefaultLanguage(const TQString &l) { _defaultLanguage = l; } void setIndentation(int indent) { _tabulation = indent; } @@ -127,7 +127,7 @@ class Config void indent(); void desindent(); - void writeIndent(QTextStream& out); + void writeIndent(TQTextStream& out); protected: /** diff --git a/filters/kword/latex/export/document.cc b/filters/kword/latex/export/document.cc index 5d2e1c91..410e7b7f 100644 --- a/filters/kword/latex/export/document.cc +++ b/filters/kword/latex/export/document.cc @@ -25,7 +25,7 @@ #include <ktempfile.h> #include <KoStore.h> -#include <qdir.h> +#include <tqdir.h> #include "fileheader.h" #include "document.h" @@ -51,9 +51,9 @@ Document::~Document() /*******************************************/ /* Analyse */ /*******************************************/ -void Document::analyse(const QDomNode balise) +void Document::analyse(const TQDomNode balise) { - //QDomNode balise = getChild(balise_initial, "FRAMESET"); + //TQDomNode balise = getChild(balise_initial, "FRAMESET"); kdDebug(30522) << getChildName(balise, 0) << endl; for(int index= 0; index < getNbChild(balise); index++) { @@ -82,7 +82,7 @@ void Document::analyse(const QDomNode balise) //elt->analyse(getChild(balise, index)); break; case ST_FORMULA: - /* Just save the frameset in a QString input + /* Just save the frameset in a TQString input * call the formula latex export filter * save in output * generate : write the output @@ -159,9 +159,9 @@ void Document::analyse(const QDomNode balise) /*******************************************/ /* AnalysePixmaps */ /*******************************************/ -void Document::analysePixmaps(const QDomNode balise) +void Document::analysePixmaps(const TQDomNode balise) { - //QDomNode balise = getChild(balise_initial, "FRAMESET"); + //TQDomNode balise = getChild(balise_initial, "FRAMESET"); for(int index= 0; index < getNbChild(balise); index++) { Key *key = 0; @@ -176,7 +176,7 @@ void Document::analysePixmaps(const QDomNode balise) /*******************************************/ /* getTypeFrameset */ /*******************************************/ -SType Document::getTypeFrameset(const QDomNode balise) +SType Document::getTypeFrameset(const TQDomNode balise) { SType type = ST_NONE; type = (SType) getAttr(balise, "frameType").toInt(); @@ -186,7 +186,7 @@ SType Document::getTypeFrameset(const QDomNode balise) /*******************************************/ /* Generate */ /*******************************************/ -void Document::generate(QTextStream &out, bool hasPreambule) +void Document::generate(TQTextStream &out, bool hasPreambule) { kdDebug(30522) << "DOC. GENERATION." << endl; @@ -202,7 +202,7 @@ void Document::generate(QTextStream &out, bool hasPreambule) out << "\\begin{document}" << endl; Config::instance()->indent(); } - QString dir = ""; + TQString dir = ""; if( !Config::instance()->getPicturesDir().isEmpty() && Config::instance()->getPicturesDir() != NULL && FileHeader::instance()->hasGraphics()) @@ -228,7 +228,7 @@ void Document::generate(QTextStream &out, bool hasPreambule) /*******************************************/ /* GeneratePreambule */ /*******************************************/ -void Document::generatePreambule(QTextStream &out) +void Document::generatePreambule(TQTextStream &out) { Element* header; Element* footer; @@ -270,7 +270,7 @@ void Document::generatePreambule(QTextStream &out) /*******************************************/ /* GenerateTypeHeader */ /*******************************************/ -void Document::generateTypeHeader(QTextStream &out, Element *header) +void Document::generateTypeHeader(TQTextStream &out, Element *header) { kdDebug(30522) << "generate header" << endl; if((FileHeader::instance()->getHeadType() == FileHeader::TH_ALL || @@ -316,7 +316,7 @@ void Document::generateTypeHeader(QTextStream &out, Element *header) /*******************************************/ /* GenerateTypeFooter */ /*******************************************/ -void Document::generateTypeFooter(QTextStream &out, Element *footer) +void Document::generateTypeFooter(TQTextStream &out, Element *footer) { if(FileHeader::instance()->getFootType() == FileHeader::TH_ALL && footer->getInfo() == SI_EVEN) @@ -356,7 +356,7 @@ void Document::generateTypeFooter(QTextStream &out, Element *footer) } } -Element* Document::searchAnchor(QString anchor) +Element* Document::searchAnchor(TQString anchor) { Element *elt = _tables.first(); while(elt != 0) @@ -386,7 +386,7 @@ Element* Document::searchAnchor(QString anchor) } -Element* Document::searchFootnote(QString footnote) +Element* Document::searchFootnote(TQString footnote) { Element* elt = _footnotes.first(); while(elt != 0) @@ -399,7 +399,7 @@ Element* Document::searchFootnote(QString footnote) } -Key* Document::searchKey(QString keyName) +Key* Document::searchKey(TQString keyName) { Key* key = _keys.first(); while(key != 0) @@ -413,27 +413,27 @@ Key* Document::searchKey(QString keyName) } -QString Document::extractData(QString key) +TQString Document::extractData(TQString key) { - QString data = searchKey(key)->getName(); + TQString data = searchKey(key)->getName(); kdDebug(30522) << "Opening " << data << endl; if(!getStorage()->isOpen()) { if(!getStorage()->open(data)) { kdError(30522) << "Unable to open " << data << endl; - return QString(""); + return TQString(""); } } /* Temp file with the default name in the default temp dir */ KTempFile temp; //temp.setAutoDelete(true); - QFile* tempFile = temp.file(); + TQFile* tempFile = temp.file(); - const Q_LONG buflen = 4096; + const TQ_LONG buflen = 4096; char buffer[ buflen ]; - Q_LONG readBytes = getStorage()->read( buffer, buflen ); + TQ_LONG readBytes = getStorage()->read( buffer, buflen ); while ( readBytes > 0 ) { @@ -444,7 +444,7 @@ QString Document::extractData(QString key) if(!getStorage()->close()) { kdError(30522) << "Unable to close " << data << endl; - return QString(""); + return TQString(""); } kdDebug(30522) << "temp filename : " << temp.name() << endl; return temp.name(); diff --git a/filters/kword/latex/export/document.h b/filters/kword/latex/export/document.h index afa7fb4c..b2844127 100644 --- a/filters/kword/latex/export/document.h +++ b/filters/kword/latex/export/document.h @@ -22,8 +22,8 @@ #ifndef __KWORD_LATEX_DOCUMENT_H__ #define __KWORD_LATEX_DOCUMENT_H__ -#include <qptrlist.h> -#include <qtextstream.h> +#include <tqptrlist.h> +#include <tqtextstream.h> #include "listtable.h" /* list of tables (another kind of list of elements). */ #include "key.h" @@ -43,16 +43,16 @@ class Document: public XmlParser enum EGenerate { E_LATEX, E_KWORD, E_CONFIG }; private: - QPtrList<Element> _headers; - QPtrList<Element> _footers; - QPtrList<Element> _footnotes; - QPtrList<Element> _formulas; - QPtrList<Element> _corps; - QPtrList<Element> _pixmaps; - QPtrList<Key> _keys; + TQPtrList<Element> _headers; + TQPtrList<Element> _footers; + TQPtrList<Element> _footnotes; + TQPtrList<Element> _formulas; + TQPtrList<Element> _corps; + TQPtrList<Element> _pixmaps; + TQPtrList<Key> _keys; ListTable _tables; - //QPtrList<Element> _parts; + //TQPtrList<Element> _parts; EGenerate _generation; public: @@ -77,37 +77,37 @@ class Document: public XmlParser /** * @return the next frame type (header, footer, body, footnote). */ - SType getTypeFrameset(const QDomNode); + SType getTypeFrameset(const TQDomNode); //FileHeader* getFileHeader() const { return _fileHeader; } //void setFileHeader(FileHeader *h) { _fileHeader = h; } - void analyse(const QDomNode); - void analysePixmaps(const QDomNode); + void analyse(const TQDomNode); + void analysePixmaps(const TQDomNode); - void generate(QTextStream&, bool); - Element* searchAnchor(QString); - Element* searchFootnote(QString); - Key* searchKey(QString keyName); + void generate(TQTextStream&, bool); + Element* searchAnchor(TQString); + Element* searchFootnote(TQString); + Key* searchKey(TQString keyName); /** Save the file in a temp file. */ - QString extractData(QString key); + TQString extractData(TQString key); /** Build a DOM tree (e.g. a KOffice part) */ - //QDomNode extractKoData(QString key); - //Pixmap* searchPixmap(QString); + //TQDomNode extractKoData(TQString key); + //Pixmap* searchPixmap(TQString); private: /** * Generate the second part of the preambule */ - void generatePreambule(QTextStream&); + void generatePreambule(TQTextStream&); /** * Generate the header */ - void generateTypeHeader(QTextStream&, Element*); + void generateTypeHeader(TQTextStream&, Element*); /** * Generate the footer */ - void generateTypeFooter(QTextStream&, Element*); + void generateTypeFooter(TQTextStream&, Element*); }; #endif /* __KWORD_LATEX_DOCUMENT_H__ */ diff --git a/filters/kword/latex/export/element.cc b/filters/kword/latex/export/element.cc index 7525d929..99229324 100644 --- a/filters/kword/latex/export/element.cc +++ b/filters/kword/latex/export/element.cc @@ -52,7 +52,7 @@ Element::~Element() /*******************************************/ /* Analyse */ /*******************************************/ -void Element::analyse(const QDomNode balise_initiale) +void Element::analyse(const TQDomNode balise_initiale) { /* ANALYSE A FRAMESET MARKUP */ @@ -64,7 +64,7 @@ void Element::analyse(const QDomNode balise_initiale) /*******************************************/ /* AnalyseParam */ /*******************************************/ -void Element::analyseParam(const QDomNode balise) +void Element::analyseParam(const TQDomNode balise) { /* <FRAMESET frameType="1" frameInfo="0" removable="0" * visible="1" name="Supercadre 1"> diff --git a/filters/kword/latex/export/element.h b/filters/kword/latex/export/element.h index 2abe77cf..9374620d 100644 --- a/filters/kword/latex/export/element.h +++ b/filters/kword/latex/export/element.h @@ -23,7 +23,7 @@ #ifndef __KWORD_ELEMENT_H__ #define __KWORD_ELEMENT_H__ -#include <qtextstream.h> +#include <tqtextstream.h> #include "xmlparser.h" #include "border.h" @@ -100,10 +100,10 @@ class Element: public XmlParser, public Border SType _type; SSect _section; SInfo _hinfo; - QString _name; + TQString _name; bool _removable; bool _visible; - QString _grpMgr; + TQString _grpMgr; int _row, _col, _rows, @@ -134,10 +134,10 @@ class Element: public XmlParser, public Border SSect getSection () const { return _section; } SType getType () const { return _type; } SInfo getInfo () const { return _hinfo; } - QString getName () const { return _name; } + TQString getName () const { return _name; } bool isVisible () const { return _visible; } bool isRemovable() const { return _removable; } - QString getGrpMgr () const { return _grpMgr; } + TQString getGrpMgr () const { return _grpMgr; } int getRow () const { return _row; } int getCol () const { return _col; } int getRows () const { return _rows; } @@ -151,7 +151,7 @@ class Element: public XmlParser, public Border void setSection (SSect s) { _section = s; } void setVisible (bool v) { _visible = v; } void setRemovable(bool r) { _removable = r; } - void setGrpMgr (QString g) { _grpMgr = g; } + void setGrpMgr (TQString g) { _grpMgr = g; } void setRow (int r) { _row = r; } void setCol (int c) { _col = c; } void setRows (int r) { _rows = r; } @@ -165,11 +165,11 @@ class Element: public XmlParser, public Border * Get informations about frameset markupt only from a * markup tree. */ - virtual void analyse(const QDomNode); - virtual void generate(QTextStream&) = 0; + virtual void analyse(const TQDomNode); + virtual void generate(TQTextStream&) = 0; private: - void analyseParam(const QDomNode); + void analyseParam(const TQDomNode); }; #endif /* __KWORD_ELEMENT_H__ */ diff --git a/filters/kword/latex/export/fileheader.cc b/filters/kword/latex/export/fileheader.cc index de3d2ae7..96b4be4e 100644 --- a/filters/kword/latex/export/fileheader.cc +++ b/filters/kword/latex/export/fileheader.cc @@ -55,7 +55,7 @@ FileHeader::~FileHeader() /*******************************************/ /* AnalysePaperParam */ /*******************************************/ -void FileHeader::analysePaperParam(const QDomNode balise) +void FileHeader::analysePaperParam(const TQDomNode balise) { setFormat(getAttr(balise, "format").toInt()); _width = getAttr(balise, "width").toInt(); @@ -73,13 +73,13 @@ void FileHeader::analysePaperParam(const QDomNode balise) /*******************************************/ /* AnalysePaper */ /*******************************************/ -void FileHeader::analysePaper(const QDomNode balise) +void FileHeader::analysePaper(const TQDomNode balise) { analysePaperParam(balise); //setTokenCurrent(balise_initiale->pContent); - // Analyse children markups --> PAPERBORDERS - QDomNode fils = getChild(balise, "PAPERSBORDERS"); + // Analyse tqchildren markups --> PAPERBORDERS + TQDomNode fils = getChild(balise, "PAPERSBORDERS"); _leftBorder = getAttr(fils, "left").toInt(); _rightBorder = getAttr(fils, "right").toInt(); _bottomBorder = getAttr(fils, "bottom").toInt(); @@ -89,7 +89,7 @@ void FileHeader::analysePaper(const QDomNode balise) /*******************************************/ /* AnalyseAttributs */ /*******************************************/ -void FileHeader::analyseAttributs(const QDomNode balise) +void FileHeader::analyseAttributs(const TQDomNode balise) { setProcessing(getAttr(balise, "processing").toInt()); setStandardPge(getAttr(balise, "standardpage").toInt()); @@ -102,7 +102,7 @@ void FileHeader::analyseAttributs(const QDomNode balise) /*******************************************/ /* Generate */ /*******************************************/ -void FileHeader::generate(QTextStream &out) +void FileHeader::generate(TQTextStream &out) { kdDebug(30522) << "GENERATION OF THE FILE HEADER" << endl; if(Config::instance()->mustUseLatin1()) @@ -119,9 +119,9 @@ void FileHeader::generate(QTextStream &out) /*******************************************/ /* GeneratePaper */ /*******************************************/ -void FileHeader::generatePaper(QTextStream &out) +void FileHeader::generatePaper(TQTextStream &out) { - QString unit; + TQString unit; out << "% Format of paper" << endl; kdDebug(30522) << "Generate custom size paper" << endl; @@ -140,7 +140,7 @@ void FileHeader::generatePaper(QTextStream &out) /*******************************************/ /* GenerateLatinPreambule */ /*******************************************/ -void FileHeader::generateLatinPreambule(QTextStream &out) +void FileHeader::generateLatinPreambule(TQTextStream &out) { out << "%% Generated by KWord. Don't modify this file but the file *.kwd." << endl; out << "%% Send an email to rjacolin@ifrance.com for bugs, wishes, .... Thank you." << endl; @@ -209,7 +209,7 @@ void FileHeader::generateLatinPreambule(QTextStream &out) /*******************************************/ /* GenerateUnicodePreambule */ /*******************************************/ -void FileHeader::generateUnicodePreambule(QTextStream &out) +void FileHeader::generateUnicodePreambule(TQTextStream &out) { out << "%% Generated by KWord. Don't modify this file but the file *.kwd." << endl; out << "%% Send an email to rjacolin@ifrance.com for bugs, wishes, .... Thank you." << endl; @@ -281,13 +281,13 @@ void FileHeader::generateUnicodePreambule(QTextStream &out) /*******************************************/ /* GeneratePackage */ /*******************************************/ -void FileHeader::generatePackage(QTextStream &out) +void FileHeader::generatePackage(TQTextStream &out) { out << "% Package(s) to include" << endl; if(Config::instance()->mustUseUnicode()) out << "\\usepackage{omega}" << endl; if(getFormat() == TF_A4) - out << "\\usepackage[a4paper]{geometry}" << endl; + out << "\\usepackage[a4paper]{tqgeometry}" << endl; if(hasFooter() || hasHeader()) out << "\\usepackage{fancyhdr}" << endl; if(hasColor()) @@ -303,7 +303,7 @@ void FileHeader::generatePackage(QTextStream &out) out << "\\usepackage{array}" << endl; out << "\\usepackage{multirow}" << endl; } - QStringList langs = Config::instance()->getLanguagesList(); + TQStringList langs = Config::instance()->getLanguagesList(); if(langs.count() > 0) { out << "\\usepackage[" << langs.join( ", " ) << "]{babel}" << endl; diff --git a/filters/kword/latex/export/fileheader.h b/filters/kword/latex/export/fileheader.h index d11b0a0f..d837c828 100644 --- a/filters/kword/latex/export/fileheader.h +++ b/filters/kword/latex/export/fileheader.h @@ -22,7 +22,7 @@ #ifndef __KWORD_FILEHEADER_H__ #define __KWORD_FILEHEADER_H__ -#include <qtextstream.h> +#include <tqtextstream.h> #include "xmlparser.h" @@ -134,10 +134,10 @@ class FileHeader: public XmlParser void useGraphics () { _hasGraphics = true; } void useTable () { _hasTable = true; } - void analysePaper (const QDomNode); - void analyseAttributs (const QDomNode); + void analysePaper (const TQDomNode); + void analyseAttributs (const TQDomNode); - void generate (QTextStream &); + void generate (TQTextStream &); protected: /** @@ -149,12 +149,12 @@ class FileHeader: public XmlParser private: - void analysePaperParam(const QDomNode); + void analysePaperParam(const TQDomNode); - void generatePaper (QTextStream&); - void generateLatinPreambule(QTextStream&); - void generateUnicodePreambule(QTextStream&); - void generatePackage (QTextStream&); + void generatePaper (TQTextStream&); + void generateLatinPreambule(TQTextStream&); + void generateUnicodePreambule(TQTextStream&); + void generatePackage (TQTextStream&); }; diff --git a/filters/kword/latex/export/footnote.cc b/filters/kword/latex/export/footnote.cc index 85f83658..fbfba354 100644 --- a/filters/kword/latex/export/footnote.cc +++ b/filters/kword/latex/export/footnote.cc @@ -35,28 +35,28 @@ Footnote::~Footnote() } /* Modifiers */ -void Footnote::setSpace (QString new_space) +void Footnote::setSpace (TQString new_space) { _space = new_space; } -void Footnote::setBefore(QString new_before) +void Footnote::setBefore(TQString new_before) { _before = new_before; } -void Footnote::setAfter(QString new_after) +void Footnote::setAfter(TQString new_after) { _after = new_after; } -void Footnote::setRef(QString new_ref) +void Footnote::setRef(TQString new_ref) { _ref = new_ref; } -void Footnote::analyse(const QDomNode balise) +void Footnote::analyse(const TQDomNode balise) { /* MARKUPS FORMAT id="1" pos="0" len="17">...</FORMAT> */ @@ -95,9 +95,9 @@ void Footnote::analyse(const QDomNode balise) kdDebug(30522) << "END OF FOOTNOTE" << endl; } -void Footnote::analyseInternal(const QDomNode balise) +void Footnote::analyseInternal(const TQDomNode balise) { - QDomNode fils; + TQDomNode fils; /* MARKUPS <INTERNAL> <PART from="1" to="-1" space="-"/> */ /* Children Markups Analyse */ @@ -115,27 +115,27 @@ void Footnote::analyseInternal(const QDomNode balise) } } -void Footnote::analyseRange(const QDomNode balise) +void Footnote::analyseRange(const TQDomNode balise) { kdDebug(30522) << "PARAM" << endl; setStart(getAttr(balise, "START").toInt()); setEnd(getAttr(balise, "END").toInt()); } -void Footnote::analyseText(const QDomNode balise) +void Footnote::analyseText(const TQDomNode balise) { kdDebug(30522) << "PARAM" << endl; setBefore(getAttr(balise, "BEFORE")); setAfter(getAttr(balise, "AFTER")); } -void Footnote::analyseDescript(const QDomNode balise) +void Footnote::analyseDescript(const TQDomNode balise) { kdDebug(30522) << "PARAM" << endl; setRef(getAttr(balise, "REF")); } -void Footnote::generate(QTextStream &out) +void Footnote::generate(TQTextStream &out) { Element *footnote = 0; diff --git a/filters/kword/latex/export/footnote.h b/filters/kword/latex/export/footnote.h index 6ed72b91..468de523 100644 --- a/filters/kword/latex/export/footnote.h +++ b/filters/kword/latex/export/footnote.h @@ -25,7 +25,7 @@ #ifndef __KWORD_LATEX_FOOTNOTE_H__ #define __KWORD_LATEX_FOOTNOTE_H__ -#include <qstring.h> +#include <tqstring.h> #include "format.h" /***********************************************************************/ @@ -40,8 +40,8 @@ class Footnote: public Format { int _from, _to; int _start, _end; - QString _before, _after, _space; // TODO: Change in QChar - QString _ref; + TQString _before, _after, _space; // TODO: Change in TQChar + TQString _ref; public: /** @@ -49,7 +49,7 @@ class Footnote: public Format * * Creates a new instances of Footnote. * - * @param Para is the parent class + * @param Para is the tqparent class */ Footnote(Para* para = 0); //Footnote(TextZone); @@ -70,23 +70,23 @@ class Footnote: public Format */ void setFrom (int f) { _from = f; } void setTo (int t) { _to = t; } - void setSpace (QString); + void setSpace (TQString); void setStart (int s) { _start = s; } void setEnd (int e) { _end = e; } - void setBefore(QString); - void setAfter (QString); - void setRef (QString); + void setBefore(TQString); + void setAfter (TQString); + void setRef (TQString); /** * Helpfull functions */ - void analyse (const QDomNode); - void analyseInternal(const QDomNode); - void analyseRange(const QDomNode); - void analyseText(const QDomNode); - void analyseDescript(const QDomNode); + void analyse (const TQDomNode); + void analyseInternal(const TQDomNode); + void analyseRange(const TQDomNode); + void analyseText(const TQDomNode); + void analyseDescript(const TQDomNode); - void generate(QTextStream&); + void generate(TQTextStream&); //private: }; diff --git a/filters/kword/latex/export/format.cc b/filters/kword/latex/export/format.cc index 262dd6f0..d2e7d4a2 100644 --- a/filters/kword/latex/export/format.cc +++ b/filters/kword/latex/export/format.cc @@ -27,7 +27,7 @@ #include "format.h" /* Get the set of info. about a text format */ -void Format::analyse(const QDomNode balise) +void Format::analyse(const TQDomNode balise) { /* <FORMAT id="1" pos="0" len="17"> */ setId(getAttr(balise, "id").toInt()); @@ -35,6 +35,6 @@ void Format::analyse(const QDomNode balise) setLength(getAttr(balise, "len").toInt()); } -/*void Format::generate(QTextStream&, int) +/*void Format::generate(TQTextStream&, int) { }*/ diff --git a/filters/kword/latex/export/format.h b/filters/kword/latex/export/format.h index eb70e787..c7551767 100644 --- a/filters/kword/latex/export/format.h +++ b/filters/kword/latex/export/format.h @@ -23,9 +23,9 @@ #ifndef __KWORD_FORMAT_H__ #define __KWORD_FORMAT_H__ -#include <qtextstream.h> -#include <qstring.h> -#include <qcolor.h> +#include <tqtextstream.h> +#include <tqstring.h> +#include <tqcolor.h> #include "xmlparser.h" enum _EFormat @@ -68,7 +68,7 @@ class Format: public XmlParser * * Creates a new instance of Format. * - * @param Para the parent class of the format. + * @param Para the tqparent class of the format. */ Format(Para *para= 0): _id((EFormat) 0), _para(para) {} @@ -104,10 +104,10 @@ class Format: public XmlParser /** * Get informations from a markup tree (only param of a format). */ - virtual void analyse(const QDomNode); + virtual void analyse(const TQDomNode); - virtual void generate(QTextStream&) = 0; - //virtual void generate(QTextStream&, int = 0); + virtual void generate(TQTextStream&) = 0; + //virtual void generate(TQTextStream&, int = 0); }; diff --git a/filters/kword/latex/export/formula.cc b/filters/kword/latex/export/formula.cc index 31621acc..f461a6f0 100644 --- a/filters/kword/latex/export/formula.cc +++ b/filters/kword/latex/export/formula.cc @@ -21,8 +21,8 @@ #include <stdlib.h> /* for atoi function */ #include <kdebug.h> /* for kdDebug() stream */ -#include <qptrstack.h> /* for getFormula() */ -#include <qdom.h> +#include <tqptrstack.h> /* for getFormula() */ +#include <tqdom.h> #include "formula.h" #include <kapplication.h> @@ -48,7 +48,7 @@ Formula::Formula() /*******************************************/ /* analyse */ /*******************************************/ -void Formula::analyse(const QDomNode balise) +void Formula::analyse(const TQDomNode balise) { /* MARKUP TYPE : FRAMESET INFO = TEXTE, ENTETE CONNUE */ @@ -80,12 +80,12 @@ void Formula::analyse(const QDomNode balise) /*******************************************/ /* Get back the xml markup tree. */ /*******************************************/ -void Formula::getFormula(QDomNode p, int indent) +void Formula::getFormula(TQDomNode p, int indent) { switch( p.nodeType() ) { - case QDomNode::TextNode: - _formula = _formula + QString(p.toText().data()) + " "; + case TQDomNode::TextNode: + _formula = _formula + TQString(p.toText().data()) + " "; break; /* case TT_Space: _formula = _formula + p->zText; @@ -95,9 +95,9 @@ void Formula::getFormula(QDomNode p, int indent) _formula = _formula + "\n"; //printf("%*s\n", indent, ""); break;*/ - case QDomNode::ElementNode: + case TQDomNode::ElementNode: _formula = _formula + "<" + p.nodeName(); - QDomNamedNodeMap attr = p.attributes(); + TQDomNamedNodeMap attr = p.attributes(); for(unsigned int index = 0; index < attr.length(); index++) { // The attributes _formula = _formula + " " + attr.item(index).nodeName(); @@ -108,7 +108,7 @@ void Formula::getFormula(QDomNode p, int indent) else { _formula = _formula + ">\n"; - QDomNodeList child = p.childNodes(); + TQDomNodeList child = p.childNodes(); for(unsigned int index = 0; index < child.length(); index++) { getFormula(child.item(index), indent + 3); // The child elements @@ -116,18 +116,18 @@ void Formula::getFormula(QDomNode p, int indent) _formula = _formula + "</" + p.nodeName() + ">\n"; } break; - /*case QDomNode::AttributeNode: - case QDomNode::CDATASectionNode: - case QDomNode::EntityReferenceNode: - case QDomNode::EntityNode: - case QDomNode::ProcessingInstructionNode: - case QDomNode::CommentNode: - case QDomNode::DocumentNode: - case QDomNode::DocumentTypeNode: - case QDomNode::DocumentFragmentNode: - case QDomNode::NotationNode: - case QDomNode::BaseNode: - case QDomNode::CharacterDataNode: + /*case TQDomNode::AttributeNode: + case TQDomNode::CDATASectionNode: + case TQDomNode::EntityReferenceNode: + case TQDomNode::EntityNode: + case TQDomNode::ProcessingInstructionNode: + case TQDomNode::CommentNode: + case TQDomNode::DocumentNode: + case TQDomNode::DocumentTypeNode: + case TQDomNode::DocumentFragmentNode: + case TQDomNode::NotationNode: + case TQDomNode::BaseNode: + case TQDomNode::CharacterDataNode: break;*/ //default: //kdError(30522) << "Can't happen" << endl; @@ -139,7 +139,7 @@ void Formula::getFormula(QDomNode p, int indent) /*******************************************/ /* analyseParamFrame */ /*******************************************/ -void Formula::analyseParamFrame(const QDomNode balise) +void Formula::analyseParamFrame(const TQDomNode balise) { /*<FRAME left="28" top="42" right="566" bottom="798" runaround="1" />*/ @@ -157,10 +157,10 @@ void Formula::analyseParamFrame(const QDomNode balise) /*******************************************/ /* generate */ /*******************************************/ -void Formula::generate(QTextStream &out) +void Formula::generate(TQTextStream &out) { kdDebug(30522) << "FORMULA GENERATION" << endl; - QDomDocument doc; + TQDomDocument doc; doc.setContent(_formula); // a new KFormula::Document for every formula is not the best idea. diff --git a/filters/kword/latex/export/formula.h b/filters/kword/latex/export/formula.h index bc6dcfed..03ba4bd6 100644 --- a/filters/kword/latex/export/formula.h +++ b/filters/kword/latex/export/formula.h @@ -24,8 +24,8 @@ #define __KWORD_LATEXFORMULA__ #include "element.h" -#include <qstring.h> -#include <qtextstream.h> +#include <tqstring.h> +#include <tqtextstream.h> /***********************************************************************/ /* Class: Formula */ @@ -49,7 +49,7 @@ class Formula: public Element TSide _sheetSide; /* CHILDREN MARKUPS */ - QString _formula; + TQString _formula; public: /** @@ -78,7 +78,7 @@ class Formula: public Element TNFrame getNewFrame () const { return _newFrameBehaviour; } TSide getSheetSide () const { return _sheetSide; } - void getFormula(QDomNode, int); + void getFormula(TQDomNode, int); /** * Modifiers @@ -95,17 +95,17 @@ class Formula: public Element /** * Get informations from a markup tree and put the formula - * in a QString. + * in a TQString. */ - void analyse(const QDomNode); + void analyse(const TQDomNode); /** * Write the formula in a file. */ - void generate(QTextStream&); + void generate(TQTextStream&); private: - void analyseParamFrame(const QDomNode); + void analyseParamFrame(const TQDomNode); }; #endif /* __KWORD_LATEXFORMULA_H__ */ diff --git a/filters/kword/latex/export/key.cc b/filters/kword/latex/export/key.cc index 33da485d..dccf89c6 100644 --- a/filters/kword/latex/export/key.cc +++ b/filters/kword/latex/export/key.cc @@ -42,7 +42,7 @@ Key::~Key() /*******************************************/ /* Analyse */ /*******************************************/ -void Key::analyse(const QDomNode balise) +void Key::analyse(const TQDomNode balise) { /* MARKUP TYPE : PARAGRAPH */ @@ -66,7 +66,7 @@ void Key::analyse(const QDomNode balise) /* Generate each text zone with the parag. */ /* markup. */ /*******************************************/ -void Key::generate(QTextStream &out) +void Key::generate(TQTextStream &out) { kdDebug(30522) << " GENERATION KEY" << endl; diff --git a/filters/kword/latex/export/key.h b/filters/kword/latex/export/key.h index 6f3b1ccf..7d873466 100644 --- a/filters/kword/latex/export/key.h +++ b/filters/kword/latex/export/key.h @@ -22,7 +22,7 @@ #ifndef __KWORD_LATEX_EXPORT_KEY_H__ #define __KWORD_LATEX_EXPORT_KEY_H__ -#include <qstring.h> +#include <tqstring.h> #include "xmlparser.h" @@ -41,8 +41,8 @@ class Key: public XmlParser enum eKeyType { PIXMAP, PICTURE }; private: /* MARKUP DATA */ - QString _filename; - QString _name; + TQString _filename; + TQString _name; int _hour; int _minute; int _second; @@ -77,8 +77,8 @@ class Key: public XmlParser /** * @return the paragraph's name. */ - QString getName() const { return _name; } - QString getFilename() const { return _filename; } + TQString getName() const { return _name; } + TQString getFilename() const { return _filename; } int getHour() const { return _hour; } int getMSec() const { return _msec; } int getDay() const { return _day; } @@ -91,8 +91,8 @@ class Key: public XmlParser /** * Modifiers */ - void setName(QString name) { _name = name; } - void setFilename(QString filename) { _filename = filename; } + void setName(TQString name) { _name = name; } + void setFilename(TQString filename) { _filename = filename; } void setHour(int hour) { _hour = hour; } void setMSec(int msec) { _msec = msec; } void setDay(int day) { _day = day; } @@ -108,12 +108,12 @@ class Key: public XmlParser /** * Get informations from a markup tree. */ - void analyse (const QDomNode); + void analyse (const TQDomNode); /** * Write the paragraph in a file. */ - void generate (QTextStream&); + void generate (TQTextStream&); private: diff --git a/filters/kword/latex/export/kwordlatexexportdia.cc b/filters/kword/latex/export/kwordlatexexportdia.cc index beafbe10..b5904248 100644 --- a/filters/kword/latex/export/kwordlatexexportdia.cc +++ b/filters/kword/latex/export/kwordlatexexportdia.cc @@ -20,11 +20,11 @@ #include <kwordlatexexportdia.h> -#include <qdir.h> -#include <qcombobox.h> -#include <qbuttongroup.h> -#include <qradiobutton.h> -#include <qcheckbox.h> +#include <tqdir.h> +#include <tqcombobox.h> +#include <tqbuttongroup.h> +#include <tqradiobutton.h> +#include <tqcheckbox.h> #include <kapplication.h> #include <kglobal.h> @@ -50,15 +50,15 @@ #endif*/ /* - * Constructs a KWordLatexExportDia which is a child of 'parent', with the + * Constructs a KWordLatexExportDia which is a child of 'tqparent', with the * name 'name' and widget flags set to 'f'. * * The dialog will by default be modeless, unless you set 'modal' to * TRUE to construct a modal dialog. */ -KWordLatexExportDia::KWordLatexExportDia(KoStore* in, QWidget* parent, +KWordLatexExportDia::KWordLatexExportDia(KoStore* in, TQWidget* tqparent, const char* name_, bool modal, WFlags fl ) - : LatexExportDia( parent, name_, modal, fl ),_in( in ) + : LatexExportDia( tqparent, name_, modal, fl ),_in( in ) { int i = 0; @@ -68,10 +68,10 @@ KWordLatexExportDia::KWordLatexExportDia(KoStore* in, QWidget* parent, /* Recent files */ _config = new KConfig("kwordlatexexportdialog"); _config->setGroup( "KWord latex export filter" ); - QString value; + TQString value; while(i < 10) { - /*value = _config->readPathEntry( QString("Recent%1").arg(i) ); + /*value = _config->readPathEntry( TQString("Recent%1").tqarg(i) ); kdDebug(30522) << "recent : " << value << endl; if(!value.isEmpty()) { @@ -101,7 +101,7 @@ KWordLatexExportDia::KWordLatexExportDia(KoStore* in, QWidget* parent, classComboBox->insertItem("report"); classComboBox->insertItem("slides"); - encodingComboBox->insertItem("unicode"); + encodingComboBox->insertItem("tqunicode"); encodingComboBox->insertItem("ansinew"); encodingComboBox->insertItem("applemac"); encodingComboBox->insertItem("ascii"); @@ -169,7 +169,7 @@ KWordLatexExportDia::~KWordLatexExportDia() void KWordLatexExportDia::reject() { kdDebug(30522) << "Export cancelled" << endl; - QDialog::reject(); + TQDialog::reject(); } /** @@ -231,7 +231,7 @@ void KWordLatexExportDia::accept() void KWordLatexExportDia::addLanguage() { kdDebug(30522) << "add a new language supported" << languagesList->currentText() << endl; - QString text = languagesList->currentText(); + TQString text = languagesList->currentText(); languagesList->removeItem(languagesList->currentItem()); langUsedList->insertItem(text); } @@ -239,7 +239,7 @@ void KWordLatexExportDia::addLanguage() void KWordLatexExportDia::removeLanguage() { kdDebug(30522) << "remove the language" << langUsedList->currentText() << endl; - QString text = langUsedList->currentText(); + TQString text = langUsedList->currentText(); langUsedList->removeItem(langUsedList->currentItem()); languagesList->insertItem(text); } diff --git a/filters/kword/latex/export/kwordlatexexportdia.h b/filters/kword/latex/export/kwordlatexexportdia.h index 9cc90287..8aca29ed 100644 --- a/filters/kword/latex/export/kwordlatexexportdia.h +++ b/filters/kword/latex/export/kwordlatexexportdia.h @@ -21,7 +21,7 @@ #define __KWORDLATEXEXPORTDIA_H__ #include <latexexportdia.h> -#include <qstringlist.h> +#include <tqstringlist.h> #include <kurl.h> class KoStore; @@ -31,19 +31,20 @@ class LatexExportIface; class KWordLatexExportDia : public LatexExportDia { Q_OBJECT + TQ_OBJECT private: - QString _fileOut; + TQString _fileOut; KoStore* _in; KConfig* _config; LatexExportIface* _iface; public: - KWordLatexExportDia( KoStore*, QWidget* parent = 0, + KWordLatexExportDia( KoStore*, TQWidget* tqparent = 0, const char* name = 0, bool modal = true, WFlags fl = 0 ); virtual ~KWordLatexExportDia(); - void setOutputFile(QString file) { _fileOut = file; } + void setOutputFile(TQString file) { _fileOut = file; } public slots: virtual void reject(); diff --git a/filters/kword/latex/export/latexexport.cc b/filters/kword/latex/export/latexexport.cc index de4cf72a..f521ec9d 100644 --- a/filters/kword/latex/export/latexexport.cc +++ b/filters/kword/latex/export/latexexport.cc @@ -25,20 +25,20 @@ #include <kgenericfactory.h> #include <kglobal.h> #include <klocale.h> -#include <qtextcodec.h> +#include <tqtextcodec.h> #include "kwordlatexexportdia.h" typedef KGenericFactory<LATEXExport, KoFilter> LATEXExportFactory; K_EXPORT_COMPONENT_FACTORY( libkwordlatexexport, LATEXExportFactory( "kofficefilters" ) ) -LATEXExport::LATEXExport(KoFilter *, const char *, const QStringList&) : +LATEXExport::LATEXExport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } -KoFilter::ConversionStatus LATEXExport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus LATEXExport::convert( const TQCString& from, const TQCString& to ) { - QString config; + TQString config; if(to != "text/x-tex" || from != "application/x-kword") return KoFilter::NotImplemented; diff --git a/filters/kword/latex/export/latexexport.h b/filters/kword/latex/export/latexexport.h index 3b743000..5812d316 100644 --- a/filters/kword/latex/export/latexexport.h +++ b/filters/kword/latex/export/latexexport.h @@ -20,10 +20,10 @@ #ifndef __LATEXEXPORT_H__ #define __LATEXEXPORT_H__ -#include <qstring.h> -#include <qtextstream.h> -#include <qfile.h> -#include <qobject.h> +#include <tqstring.h> +#include <tqtextstream.h> +#include <tqfile.h> +#include <tqobject.h> #include <KoFilter.h> #include <KoStore.h> @@ -32,12 +32,13 @@ class LATEXExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - LATEXExport(KoFilter *parent, const char *name, const QStringList&); + LATEXExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~LATEXExport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; #endif /* __LATEXExport_H__ */ diff --git a/filters/kword/latex/export/latexexportIface.cc b/filters/kword/latex/export/latexexportIface.cc index 102845b1..a50d7c61 100644 --- a/filters/kword/latex/export/latexexportIface.cc +++ b/filters/kword/latex/export/latexexportIface.cc @@ -22,7 +22,7 @@ #include "kwordlatexexportdia.h" /* - * Constructs a KWordLatexExportDia which is a child of 'parent', with the + * Constructs a KWordLatexExportDia which is a child of 'tqparent', with the * name 'name' and widget flags set to 'f'. * * The dialog will by default be modeless, unless you set 'modal' to diff --git a/filters/kword/latex/export/latexexportdia.ui b/filters/kword/latex/export/latexexportdia.ui index 3e62df55..677329da 100644 --- a/filters/kword/latex/export/latexexportdia.ui +++ b/filters/kword/latex/export/latexexportdia.ui @@ -2,7 +2,7 @@ <class>LatexExportDia</class> <comment>This dialog box is used for all latex filter in koffice.</comment> <author>Robert Jacolin <rjacolin@ifrance.com></author> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>LatexExportDia</cstring> </property> @@ -30,14 +30,14 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QTabWidget" row="0" column="1"> + <widget class="TQTabWidget" row="0" column="1"> <property name="name"> <cstring>_tab</cstring> </property> <property name="enabled"> <bool>true</bool> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>Widget2</cstring> </property> @@ -66,7 +66,7 @@ <number>1000</number> </property> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>styleGroup</cstring> </property> @@ -81,7 +81,7 @@ <property name="title"> <string>Document Style</string> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>kwordStyleButton</cstring> </property> @@ -100,7 +100,7 @@ <bool>true</bool> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>latexStyleButton</cstring> </property> @@ -117,7 +117,7 @@ </property> </widget> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>typeGroup</cstring> </property> @@ -132,7 +132,7 @@ <property name="title"> <string>Document Type</string> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>fullDocButton</cstring> </property> @@ -157,7 +157,7 @@ <string>The document will be generated as a full latex document since all the include will be generated before the \begin[document} and \end{document} commands.</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>embededButton</cstring> </property> @@ -180,7 +180,7 @@ </property> </widget> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel1_2</cstring> </property> @@ -196,7 +196,7 @@ <string>Document class:</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel2</cstring> </property> @@ -212,7 +212,7 @@ <string>Quality:</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>defaultFontSizeTextZone</cstring> </property> @@ -228,7 +228,7 @@ <string>Default font size:</string> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <property name="name"> <cstring>classComboBox</cstring> </property> @@ -265,7 +265,7 @@ </property> </widget> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>Widget3</cstring> </property> @@ -288,7 +288,7 @@ <string>This directory will contains the eps pictures of your document.</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>pictureCheckBox</cstring> </property> @@ -307,7 +307,7 @@ <bool>true</bool> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel1</cstring> </property> @@ -324,14 +324,14 @@ </property> </widget> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> <attribute name="title"> <string>Language</string> </attribute> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>ButtonGroup3</cstring> </property> @@ -360,7 +360,7 @@ </property> </widget> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>GroupBox4</cstring> </property> @@ -378,7 +378,7 @@ <property name="title"> <string>Language</string> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>rmLanguageBtn</cstring> </property> @@ -394,7 +394,7 @@ <string>Remove</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>addLanguageBtn</cstring> </property> @@ -438,14 +438,14 @@ </widget> </widget> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> <attribute name="title"> <string>Contents</string> </attribute> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>exportAuthor</cstring> </property> @@ -467,7 +467,7 @@ <bool>false</bool> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>tableContents</cstring> </property> @@ -486,7 +486,7 @@ <string>Add a table of content</string> </property> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>note</cstring> </property> @@ -504,7 +504,7 @@ <property name="title"> <string>Notes</string> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>RadioButton7</cstring> </property> @@ -520,7 +520,7 @@ <string>Don't export</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>RadioButton6</cstring> </property> @@ -536,7 +536,7 @@ <string>Export notes in comments</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>RadioButton5</cstring> </property> @@ -555,7 +555,7 @@ </widget> </widget> </widget> - <widget class="QLayoutWidget" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="1" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>Layout1</cstring> </property> @@ -569,7 +569,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonHelp</cstring> </property> @@ -593,14 +593,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>0</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonOk</cstring> </property> @@ -614,7 +614,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonCancel</cstring> </property> @@ -655,11 +655,11 @@ <slot>removeLanguage()</slot> </connection> </connections> -<slots> +<Q_SLOTS> <slot>addLanguage()</slot> <slot>removeLanguage()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>knuminput.h</includehint> <includehint>knuminput.h</includehint> diff --git a/filters/kword/latex/export/layout.cc b/filters/kword/latex/export/layout.cc index 0701a3a0..2615b852 100644 --- a/filters/kword/latex/export/layout.cc +++ b/filters/kword/latex/export/layout.cc @@ -24,10 +24,10 @@ #include <kdebug.h> /* for kdDebug() stream */ #include "fileheader.h" /* for _header use */ -#include "layout.h" +#include "tqlayout.h" /* Static Datas */ -QString Layout::_last_name; +TQString Layout::_last_name; EType Layout::_last_counter; /*******************************************/ @@ -51,14 +51,14 @@ Layout::Layout() /*******************************************/ /* analyseLAyout */ /*******************************************/ -void Layout::analyseLayout(const QDomNode balise) +void Layout::analyseLayout(const TQDomNode balise) { /* Markup type : FORMAT id="1" pos="0" len="17">...</FORMAT> */ /* No parameters for this markup */ kdDebug(30522) << "ANALYSE OF THE BEGINING OF A LAYOUT" << endl; - /* Analyse children markups */ + /* Analyse tqchildren markups */ for(int index= 0; index < getNbChild(balise); index++) { if(getChildName(balise, index).compare("NAME")== 0) @@ -95,7 +95,7 @@ void Layout::analyseLayout(const QDomNode balise) kdDebug(30522) << "END OF THE BEGINING OF A LAYOUT" << endl; } -void Layout::analyseName(const QDomNode balise) +void Layout::analyseName(const TQDomNode balise) { /* <NAME value="times"> */ kdDebug(30522) << "PARAM" << endl; @@ -107,7 +107,7 @@ void Layout::analyseName(const QDomNode balise) /*******************************************/ /* Get info about folowing. Ununsefull. */ /*******************************************/ -void Layout::analyseFollowing(const QDomNode balise) +void Layout::analyseFollowing(const TQDomNode balise) { /* <FOLLOWING name="times"> */ kdDebug(30522) << "PARAM" << endl; @@ -119,7 +119,7 @@ void Layout::analyseFollowing(const QDomNode balise) /*******************************************/ /* Get informations about environment. */ /*******************************************/ -void Layout::analyseEnv(const QDomNode balise) +void Layout::analyseEnv(const TQDomNode balise) { /* <FLOW align="0"> */ // ERROR: Enter first in flow ???? @@ -134,7 +134,7 @@ void Layout::analyseEnv(const QDomNode balise) setEnv(ENV_CENTER); } -void Layout::analyseBreakLine(const QDomNode balise) +void Layout::analyseBreakLine(const TQDomNode balise) { /* <NAME hardFrameBreakAfter="true"> */ kdDebug(30522) << "PARAM" << endl; @@ -153,7 +153,7 @@ void Layout::analyseBreakLine(const QDomNode balise) /* If I use a counter, I must include a tex*/ /* package. */ /*******************************************/ -void Layout::analyseCounter(const QDomNode balise) +void Layout::analyseCounter(const TQDomNode balise) { /* <COUNTER type="1"> */ kdDebug(30522) << "PARAM" << endl; diff --git a/filters/kword/latex/export/layout.h b/filters/kword/latex/export/layout.h index 9db1fe61..298b08ff 100644 --- a/filters/kword/latex/export/layout.h +++ b/filters/kword/latex/export/layout.h @@ -23,8 +23,8 @@ #ifndef __KWORD_LAYOUT_H__ #define __KWORD_LAYOUT_H__ -#include <qtextstream.h> -#include <qstring.h> +#include <tqtextstream.h> +#include <tqstring.h> #include <kdebug.h> #include "textformat.h" @@ -65,15 +65,15 @@ typedef enum _EEnv EEnv; */ class Layout: public TextFormat { - QString _name; - QString _following; + TQString _name; + TQString _following; EType _counterType; int _counterDepth; int _counterBullet; int _counterStart; int _numberingType; EEnv _env; - static QString _last_name; + static TQString _last_name; static EType _last_counter; bool _useHardBreakAfter; bool _useHardBreak; @@ -93,7 +93,7 @@ class Layout: public TextFormat * Nothing to do. */ virtual ~Layout() { - kdDebug(30522) << "Destruction of a layout." << endl; + kdDebug(30522) << "Destruction of a tqlayout." << endl; } /** @@ -104,7 +104,7 @@ class Layout: public TextFormat bool isEnum () const { return (_counterType != TL_NONE); } bool isLastSame () const { return (_name == _last_name); } bool isNextSame () const { return (_following == _name); } - QString getLastName () const { return _last_name; } + TQString getLastName () const { return _last_name; } EType getLastCounter () const { return _last_counter; } EType getCounterType () const { return _counterType; } int getCounterDepth () const { return _counterDepth; } @@ -119,10 +119,10 @@ class Layout: public TextFormat /** * Modifiers */ - void setName (QString name) { _name = name; } + void setName (TQString name) { _name = name; } void setLastName () { _last_name = _name; } void setLastCounter () { _last_counter= _counterType; } - void setFollowing (QString name) { _following = name; } + void setFollowing (TQString name) { _following = name; } void setCounterType (int ct) { _counterType = (EType) ct; } void setCounterDepth (int cd) { _counterDepth = cd; } void setCounterBullet(int cb) { _counterBullet = cb; } @@ -137,14 +137,14 @@ class Layout: public TextFormat * Helpfull functions */ - void analyseLayout (const QDomNode); + void analyseLayout (const TQDomNode); private: - void analyseCounter (const QDomNode); - void analyseFollowing(const QDomNode); - void analyseName (const QDomNode); - void analyseEnv (const QDomNode); - void analyseBreakLine(const QDomNode); + void analyseCounter (const TQDomNode); + void analyseFollowing(const TQDomNode); + void analyseName (const TQDomNode); + void analyseEnv (const TQDomNode); + void analyseBreakLine(const TQDomNode); }; #endif /* __KWORD_LAYOUT_H__ */ diff --git a/filters/kword/latex/export/listeformat.h b/filters/kword/latex/export/listeformat.h index 5107d4cd..29dec6bc 100644 --- a/filters/kword/latex/export/listeformat.h +++ b/filters/kword/latex/export/listeformat.h @@ -96,7 +96,7 @@ class FormatElt class ListeFormat { - //QString _texte; + //TQString _texte; private: FormatElt* _first; diff --git a/filters/kword/latex/export/listtable.cc b/filters/kword/latex/export/listtable.cc index df49385d..e5d29725 100644 --- a/filters/kword/latex/export/listtable.cc +++ b/filters/kword/latex/export/listtable.cc @@ -35,13 +35,13 @@ ListTable::ListTable() /*******************************************/ ListTable::~ListTable() { - /* Just call the parent destructor */ + /* Just call the tqparent destructor */ } /*******************************************/ /* IsNewTable */ /*******************************************/ -Table* ListTable::isNewTable(QString grpMgr) +Table* ListTable::isNewTable(TQString grpMgr) { Table *current = 0; diff --git a/filters/kword/latex/export/listtable.h b/filters/kword/latex/export/listtable.h index 7a307fe8..01009f7d 100644 --- a/filters/kword/latex/export/listtable.h +++ b/filters/kword/latex/export/listtable.h @@ -25,10 +25,10 @@ #include "table.h" /** - * This class hold a list of tables. It just a wrapper for \verbatim QPtrList<Table> \endverbatim + * This class hold a list of tables. It just a wrapper for \verbatim TQPtrList<Table> \endverbatim * to add a frame in a table if the table exists else to create a new table. */ -class ListTable: public QPtrList<Table> +class ListTable: public TQPtrList<Table> { public: /** @@ -47,7 +47,7 @@ class ListTable: public QPtrList<Table> * Accessors */ - Table* isNewTable(QString); + Table* isNewTable(TQString); /** * Modifiers diff --git a/filters/kword/latex/export/para.cc b/filters/kword/latex/export/para.cc index 4fe645f9..6003a075 100644 --- a/filters/kword/latex/export/para.cc +++ b/filters/kword/latex/export/para.cc @@ -23,7 +23,7 @@ #include <kdebug.h> /* for kdDebug() stream */ #include "para.h" #include "textFrame.h" /* father class. */ -#include "format.h" /* children classes. */ +#include "format.h" /* tqchildren classes. */ //#include "picturezone.h" #include "fileheader.h" #include "textzone.h" @@ -32,7 +32,7 @@ #include "anchor.h" /* static data */ -QPtrStack<EType> Para::_historicList; +TQPtrStack<EType> Para::_historicList; int Para::_tabulation = 0; /*******************************************/ @@ -77,7 +77,7 @@ SSect Para::getFrameType() const /* To know if the zone is a textzone, a */ /* footnote, a picture, a variable. */ /*******************************************/ -EFormat Para::getTypeFormat(const QDomNode balise) const +EFormat Para::getTypeFormat(const TQDomNode balise) const { //<FORMAT id="1" ...> @@ -126,13 +126,13 @@ int Para::getNbCharPara() const /*******************************************/ /* Analyse */ /*******************************************/ -void Para::analyse(const QDomNode balise) +void Para::analyse(const TQDomNode balise) { /* MARKUP TYPE : PARAGRAPH */ kdDebug(30522) << "**** PARAGRAPH ****" << endl; - /* Analyse of the children markups */ + /* Analyse of the tqchildren markups */ for(int index = 0; index < getNbChild(balise); index++) { if(getChildName(balise, index).compare("TEXT")== 0) @@ -174,11 +174,11 @@ void Para::analyse(const QDomNode balise) /* If a footnote have a name : it's a */ /* footnote/endnote. */ /*******************************************/ -void Para::analyseName(const QDomNode balise) +void Para::analyseName(const TQDomNode balise) { /* <NAME name="Footnote/Endnote_1"> */ - _name = new QString(getAttr(balise, "NAME")); + _name = new TQString(getAttr(balise, "NAME")); } /*******************************************/ @@ -187,7 +187,7 @@ void Para::analyseName(const QDomNode balise) /* Type of the parag. : if info is 1, it's */ /* a footnote/endnote (so it have a name). */ /*******************************************/ -void Para::analyseInfo(const QDomNode balise) +void Para::analyseInfo(const TQDomNode balise) { /* <INFO info="1"> */ @@ -200,7 +200,7 @@ void Para::analyseInfo(const QDomNode balise) /* There is a new page before this */ /* paragraph. */ /*******************************************/ -/*void Para::analyseBrk(const QDomNode balise) +/*void Para::analyseBrk(const TQDomNode balise) { //<NAME name="Footnote/Endnote_1"> @@ -210,12 +210,12 @@ void Para::analyseInfo(const QDomNode balise) /*******************************************/ /* AnalyseLayoutPara */ /*******************************************/ -/* Analyse the layout of a para. */ +/* Analyse the tqlayout of a para. */ /* For each format, keep the type (picture,*/ /* text, variable, footnote) and put the */ /* zone in a list. */ /*******************************************/ -void Para::analyseLayoutPara(const QDomNode balise) +void Para::analyseLayoutPara(const TQDomNode balise) { Format* zone = 0; @@ -233,7 +233,7 @@ void Para::analyseLayoutPara(const QDomNode balise) ((TextZone*) zone)->setLength(_currentPos - _text.length()); ((TextZone*) zone)->analyse(); if(_lines == 0) - _lines = new QPtrList<Format>; + _lines = new TQPtrList<Format>; /* add the text */ _lines->append(zone); _currentPos = _currentPos + ((TextZone*) zone)->getLength(); @@ -252,7 +252,7 @@ void Para::analyseLayoutPara(const QDomNode balise) /* keep the type (picture, text, variable,*/ /* footnote) and put the zone in a list. */ /*******************************************/ -void Para::analyseFormats(const QDomNode balise) +void Para::analyseFormats(const TQDomNode balise) { for(int index= 0; index < getNbChild(balise, "FORMAT"); index++) { @@ -273,7 +273,7 @@ void Para::analyseFormats(const QDomNode balise) /* keep the type (picture, text, variable,*/ /* footnote) and put the zone in a list. */ /*******************************************/ -void Para::analyseFormat(const QDomNode balise) +void Para::analyseFormat(const TQDomNode balise) { Format *zone = 0; Format *zoneFirst = 0; @@ -291,7 +291,7 @@ void Para::analyseFormat(const QDomNode balise) if(zone->getPos() != _currentPos) { if(_lines == 0) - _lines = new QPtrList<Format>; + _lines = new TQPtrList<Format>; /* Create first a default format */ zoneFirst = new TextZone(_text, this); zoneFirst->setPos(_currentPos); @@ -327,7 +327,7 @@ void Para::analyseFormat(const QDomNode balise) if(zone->getPos() != _currentPos) { if(_lines == 0) - _lines = new QPtrList<Format>; + _lines = new TQPtrList<Format>; /* Create first a default format */ zoneFirst = new TextZone(_text, this); zoneFirst->setPos(_currentPos); @@ -342,7 +342,7 @@ void Para::analyseFormat(const QDomNode balise) if(zone != 0) { if(_lines == 0) - _lines = new QPtrList<Format>; + _lines = new TQPtrList<Format>; /* add the text */ _lines->append(zone); @@ -356,7 +356,7 @@ void Para::analyseFormat(const QDomNode balise) /* Generate each text zone with the parag. */ /* markup. */ /*******************************************/ -void Para::generate(QTextStream &out) +void Para::generate(TQTextStream &out) { kdDebug(30522) << " GENERATION PARA" << endl; @@ -406,7 +406,7 @@ void Para::generate(QTextStream &out) /*******************************************/ /* Generate the begining paragraph markup. */ /*******************************************/ -void Para::generateDebut(QTextStream &out) +void Para::generateDebut(TQTextStream &out) { /* Be careful we are in a table ! * You can't use directly environment, ... @@ -444,7 +444,7 @@ void Para::generateDebut(QTextStream &out) Config::instance()->writeIndent(out); } -void Para::generateBeginEnv(QTextStream &out) +void Para::generateBeginEnv(TQTextStream &out) { kdDebug(30522) << "Begin new Env : " << getEnv() << endl; @@ -473,7 +473,7 @@ void Para::generateBeginEnv(QTextStream &out) /* Generate the markup to begin a list and */ /* push the type in the historic stack. */ /*******************************************/ -void Para::openList(QTextStream &out) +void Para::openList(TQTextStream &out) { EType *type_temp = 0; @@ -530,7 +530,7 @@ void Para::openList(QTextStream &out) /*******************************************/ /* Generate the closing paragraph markup. */ /*******************************************/ -void Para::generateFin(QTextStream &out) +void Para::generateFin(TQTextStream &out) { /* Close a title of chapter */ if(isChapter()) @@ -542,7 +542,7 @@ void Para::generateFin(QTextStream &out) /*******************************************/ /* Generate the closing environment markup.*/ /*******************************************/ -void Para::generateEndEnv(QTextStream &out) +void Para::generateEndEnv(TQTextStream &out) { kdDebug(30522) << "end of an environment : " << getEnv() << endl; @@ -581,7 +581,7 @@ void Para::generateEndEnv(QTextStream &out) /* list type (letter, custom, ...) and */ /* remove the last list saved. */ /*******************************************/ -void Para::closeList(QTextStream &out, Para* next) +void Para::closeList(TQTextStream &out, Para* next) { closeList(getCounterType(), out); @@ -608,7 +608,7 @@ void Para::closeList(QTextStream &out, Para* next) /* list type (letter, custom, ...) and */ /* remove the last list saved. */ /*******************************************/ -void Para::closeList(EType type, QTextStream &out) +void Para::closeList(EType type, TQTextStream &out) { //out << endl; kdDebug(30522) << " type list to close : " << type << endl; @@ -654,7 +654,7 @@ void Para::closeList(EType type, QTextStream &out) /*******************************************/ /* GenerateTitle */ /*******************************************/ -void Para::generateTitle(QTextStream &out) +void Para::generateTitle(TQTextStream &out) { switch(getCounterDepth()) { diff --git a/filters/kword/latex/export/para.h b/filters/kword/latex/export/para.h index c5f40520..75c41b3a 100644 --- a/filters/kword/latex/export/para.h +++ b/filters/kword/latex/export/para.h @@ -22,11 +22,11 @@ #ifndef __KWORD_PARA_H__ #define __KWORD_PARA_H__ -#include <qstring.h> -#include <qptrstack.h> /* historic list */ -#include <qptrlist.h> /* for list of format */ +#include <tqstring.h> +#include <tqptrstack.h> /* historic list */ +#include <tqptrlist.h> /* for list of format */ -/*#include "listeformat.h"*/ /* children class contents the zone (italic, footnote, +/*#include "listeformat.h"*/ /* tqchildren class contents the zone (italic, footnote, variable. */ #include "layout.h" /* set of informations about the paragraph style. */ #include "element.h" /* to use the father class. */ @@ -58,18 +58,18 @@ class TextFrame; class Para: public Layout { /* MARKUP DATA */ - QString _text; - QString* _name; + TQString _text; + TQString* _name; EP_INFO _info; //EP_HARDBRK _hardbrk; - QPtrList<Format>* _lines; + TQPtrList<Format>* _lines; /* TO MANAGE THE LIST */ /* USEFULL DATA */ TextFrame* _element; /* Father frame */ unsigned int _currentPos; /* Begining of the text to use the good format */ - static QPtrStack<EType> _historicList; /* opened lists but not closed */ + static TQPtrStack<EType> _historicList; /* opened lists but not closed */ int _nbLines; /* Nb of lines in a cell (table) */ static int _tabulation; /* Size of the para tabulation (for lists). */ @@ -107,7 +107,7 @@ class Para: public Layout /** * @return the paragraph's name. */ - QString* getName () const { return _name; } + TQString* getName () const { return _name; } /** * @return the paragraph's type (contents or footnote). */ @@ -123,7 +123,7 @@ class Para: public Layout /** * @return the next format type (picture, text, variable, footnote). */ - EFormat getTypeFormat(const QDomNode) const; + EFormat getTypeFormat(const TQDomNode) const; /** * @return count the number of characters in the paragraph. */ @@ -143,57 +143,57 @@ class Para: public Layout /** * Get informations from a markup tree. */ - void analyse (const QDomNode); + void analyse (const TQDomNode); /** * Write the paragraph in a file. */ - void generate (QTextStream&); + void generate (TQTextStream&); /** * If the paragraph has a different environment, change it */ - void generateBeginEnv(QTextStream&); + void generateBeginEnv(TQTextStream&); /** * If the next paragraph has a different environment, close it */ - void generateEndEnv(QTextStream&); + void generateEndEnv(TQTextStream&); /** * If the paragraph is a title, generate the command. */ - void generateTitle (QTextStream&); + void generateTitle (TQTextStream&); /** * Write the markup to begin a list */ - void openList (QTextStream&); + void openList (TQTextStream&); /** * Write the markup to close a list */ - void closeList (QTextStream&, Para*); + void closeList (TQTextStream&, Para*); private: - void analyseParam (const QDomNode); - void analyseName (const QDomNode); - void analyseInfo (const QDomNode); - //void analyseBrk (const QDomNode); - void analyseLayoutPara(const QDomNode); - void analyseFormat (const QDomNode); - void analyseFormats (const QDomNode); + void analyseParam (const TQDomNode); + void analyseName (const TQDomNode); + void analyseInfo (const TQDomNode); + //void analyseBrk (const TQDomNode); + void analyseLayoutPara(const TQDomNode); + void analyseFormat (const TQDomNode); + void analyseFormats (const TQDomNode); /** * Write the paragraph style, format. */ - void generateDebut (QTextStream&); - void generateFin (QTextStream&); + void generateDebut (TQTextStream&); + void generateFin (TQTextStream&); /** * Write the markup to close a list */ - void closeList (EType, QTextStream&); + void closeList (EType, TQTextStream&); }; diff --git a/filters/kword/latex/export/pixmapFrame.cc b/filters/kword/latex/export/pixmapFrame.cc index 7a34a77c..bbd0430b 100644 --- a/filters/kword/latex/export/pixmapFrame.cc +++ b/filters/kword/latex/export/pixmapFrame.cc @@ -19,7 +19,7 @@ ** */ -#include <qdir.h> +#include <tqdir.h> #include <kdebug.h> /* for kdDebug() stream */ #include <config.h> /* Needed to convert picture in eps file. Use ImageMagick. */ @@ -48,7 +48,7 @@ PixmapFrame::~PixmapFrame() { kdDebug(30522) << "Destruction of a pixmap" << endl; } -void PixmapFrame::setKeepAspectRatio(const QString ratio) +void PixmapFrame::setKeepAspectRatio(const TQString ratio) { if(ratio == "true") _keepAspectRatio = true; @@ -62,7 +62,7 @@ void PixmapFrame::setKeepAspectRatio(const QString ratio) /* Get informations about a pixmap stored */ /* in the tared file. */ /*******************************************/ -void PixmapFrame::analyse(const QDomNode balise) +void PixmapFrame::analyse(const TQDomNode balise) { /* MARKUP TYPE : FRAMESET INFO = TEXTE, ENTETE CONNUE */ @@ -93,16 +93,16 @@ void PixmapFrame::analyse(const QDomNode balise) /* Get informations about a pixmap stored */ /* in the tared file. */ /*******************************************/ -void PixmapFrame::getPixmap(const QDomNode balise_initiale) +void PixmapFrame::getPixmap(const TQDomNode balise_initiale) { kdDebug(30522) << "PIXMAP" << endl; setKeepAspectRatio(getAttr(balise_initiale, "keepAspectRatio")); - QDomNode balise = getChild(balise_initiale, "KEY"); + TQDomNode balise = getChild(balise_initiale, "KEY"); setKey(getAttr(balise, "filename")); FileHeader::instance()->useGraphics(); - QString file = getKey(); + TQString file = getKey(); /* Remove the extension */ - int posExt = file.findRev('.'); + int posExt = file.tqfindRev('.'); file.truncate(posExt); /* Remove the path */ file = file.section('/', -1); @@ -114,7 +114,7 @@ void PixmapFrame::getPixmap(const QDomNode balise_initiale) /*******************************************/ /* analyseParamFrame */ /*******************************************/ -void PixmapFrame::analyseParamFrame(const QDomNode balise) +void PixmapFrame::analyseParamFrame(const TQDomNode balise) { /*<FRAME left="28" top="42" right="566" bottom="798" runaround="1" />*/ @@ -150,7 +150,7 @@ void PixmapFrame::convert() GetExceptionInfo(&exception); image_info = CloneImageInfo((ImageInfo *) NULL); // 8 characters are deleted when readign the file picture name - QString filename = "file:///" + getRoot()->extractData(getKey()); + TQString filename = "file:///" + getRoot()->extractData(getKey()); strncpy(image_info->filename, filename.latin1(), filename.length()); image = ReadImage(image_info, &exception); if (image == (Image *) NULL) @@ -161,12 +161,12 @@ void PixmapFrame::convert() Write the image as EPS and destroy it. Copy image file in the same directory than the tex file. */ - QString dir = ""; + TQString dir = ""; if( Config::instance()->getPicturesDir().isEmpty() || Config::instance()->getPicturesDir() == NULL) { dir = getFilename(); - dir.truncate(getFilename().findRev('/')); + dir.truncate(getFilename().tqfindRev('/')); } else dir = Config::instance()->getPicturesDir(); @@ -188,7 +188,7 @@ void PixmapFrame::convert() /*******************************************/ /* Generate the text formated (if needed). */ /*******************************************/ -void PixmapFrame::generate(QTextStream &out) +void PixmapFrame::generate(TQTextStream &out) { if(Config::instance()->convertPictures()) convert(); diff --git a/filters/kword/latex/export/pixmapFrame.h b/filters/kword/latex/export/pixmapFrame.h index 9095138e..01e5c642 100644 --- a/filters/kword/latex/export/pixmapFrame.h +++ b/filters/kword/latex/export/pixmapFrame.h @@ -51,12 +51,12 @@ class PixmapFrame : public Element bool _keepAspectRatio; /* TEXT MARKUP */ - QString _key; - QString _filenamePS; + TQString _key; + TQString _filenamePS; public: PixmapFrame(); - PixmapFrame(QString, QString); + PixmapFrame(TQString, TQString); virtual ~PixmapFrame(); /** @@ -68,9 +68,9 @@ class PixmapFrame : public Element TNFrame getNewFrame () const { return _newFrameBehaviour; } TSide getSheetSide () const { return _sheetSide; } - void getPixmap(QDomNode); - QString getKey () const { return _key; } - QString getFilenamePS() const { return _filenamePS; } + void getPixmap(TQDomNode); + TQString getKey () const { return _key; } + TQString getFilenamePS() const { return _filenamePS; } /** * Modifiers @@ -80,23 +80,23 @@ class PixmapFrame : public Element void setAutoCreate(const int a) { _autoCreate = (TCreate) a; } void setNewFrame (const int n) { _newFrameBehaviour = (TNFrame) n; } void setSheetSide (const int s) { _sheetSide = (TSide) s; } - void setKeepAspectRatio(const QString); + void setKeepAspectRatio(const TQString); - void setKey (QString k) { _key = k; } - void setFilenamePS (QString f) { _filenamePS = f; } + void setKey (TQString k) { _key = k; } + void setFilenamePS (TQString f) { _filenamePS = f; } /** * Helpfull functions */ - void analyse(const QDomNode); + void analyse(const TQDomNode); void convert(); - void generate(QTextStream&); - /*void generate_format_begin(QTextStream &); - void generate_format_end(QTextStream &);*/ + void generate(TQTextStream&); + /*void generate_format_begin(TQTextStream &); + void generate_format_end(TQTextStream &);*/ private: - void analyseParamFrame(const QDomNode); + void analyseParamFrame(const TQDomNode); }; #endif /* __KWORD_LATEX_EXPORT_PIXMAPFRAME_H__ */ diff --git a/filters/kword/latex/export/table.cc b/filters/kword/latex/export/table.cc index 7d6567fa..90fdc378 100644 --- a/filters/kword/latex/export/table.cc +++ b/filters/kword/latex/export/table.cc @@ -20,7 +20,7 @@ */ #include <kdebug.h> /* for kdDebug stream */ -#include <qbitarray.h> +#include <tqbitarray.h> #include "listtable.h" #include "textFrame.h" @@ -33,7 +33,7 @@ Table::Table() setMaxRow(0); } -Table::Table(QString grpMgr) +Table::Table(TQString grpMgr) { setGrpMgr(grpMgr); setMaxCol(0); @@ -113,13 +113,13 @@ void Table::append(Element* elt) if(elt->getCol() > getMaxCol()) setMaxCol(elt->getCol()); - QPtrList<Element>::append(elt); + TQPtrList<Element>::append(elt); } /*******************************************/ /* generate */ /*******************************************/ -void Table::generate(QTextStream& out) +void Table::generate(TQTextStream& out) { Element* elt = 0; kdDebug(30522) << "GENERATION OF A TABLE " << count() << endl; @@ -166,10 +166,10 @@ void Table::generate(QTextStream& out) /*******************************************/ /* generateTopLineBorder */ /*******************************************/ -void Table::generateTopLineBorder(QTextStream& out, int row) +void Table::generateTopLineBorder(TQTextStream& out, int row) { Element* elt = 0; - QBitArray border(getMaxCol()); + TQBitArray border(getMaxCol()); bool fullLine = true; for(int index = 0; index <= getMaxCol(); index++) @@ -220,10 +220,10 @@ void Table::generateTopLineBorder(QTextStream& out, int row) /*******************************************/ /* generateBottomLineBorder */ /*******************************************/ -void Table::generateBottomLineBorder(QTextStream& out, int row) +void Table::generateBottomLineBorder(TQTextStream& out, int row) { Element* elt = 0; - QBitArray border(getMaxCol()); + TQBitArray border(getMaxCol()); bool fullLine = true; for(int index = 0; index <= getMaxCol(); index++) @@ -273,7 +273,7 @@ void Table::generateBottomLineBorder(QTextStream& out, int row) /*******************************************/ /* generateCell */ /*******************************************/ -void Table::generateCell(QTextStream& out, int row, int col) +void Table::generateCell(TQTextStream& out, int row, int col) { Element* elt = 0; @@ -291,7 +291,7 @@ void Table::generateCell(QTextStream& out, int row, int col) /*******************************************/ /* generateTableHeader */ /*******************************************/ -void Table::generateTableHeader(QTextStream& out) +void Table::generateTableHeader(TQTextStream& out) { Element* elt = 0; bool fullRightBorder = true; diff --git a/filters/kword/latex/export/table.h b/filters/kword/latex/export/table.h index 5ad1ba4e..a0a9ff32 100644 --- a/filters/kword/latex/export/table.h +++ b/filters/kword/latex/export/table.h @@ -23,8 +23,8 @@ #ifndef __KWORD_TABLE_H__ #define __KWORD_TABLE_H__ -#include <qstring.h> -#include <qptrlist.h> +#include <tqstring.h> +#include <tqptrlist.h> #include "element.h" /* Child class */ #include "layout.h" /* Cell flow */ @@ -37,11 +37,11 @@ * frame, ...). It use a special latex package. * The color table of the tables is not yet supported. */ -class Table: public QPtrList<Element>, public Element +class Table: public TQPtrList<Element>, public Element { /* MARKUP DATA */ - //QString _name; - //QString _grpMgr; + //TQString _name; + //TQString _grpMgr; /* USEFULL DATA */ int _maxRow, _maxCol; /* Size of the table (nb of cell) */ @@ -61,7 +61,7 @@ class Table: public QPtrList<Element>, public Element * * @param grpMng The group manager. */ - Table(QString grpMng); + Table(TQString grpMng); /* * Destructor @@ -75,8 +75,8 @@ class Table: public QPtrList<Element>, public Element * Accessors */ - //QString getName () const { return _name; } - //QString getGrpMgr() const { return _grpMgr; } + //TQString getName () const { return _name; } + //TQString getGrpMgr() const { return _grpMgr; } int getMaxRow() const { return _maxRow; } int getMaxCol() const { return _maxCol; } @@ -94,13 +94,13 @@ class Table: public QPtrList<Element>, public Element */ Element* searchCell(int, int); void append (Element*); - void generate (QTextStream&); + void generate (TQTextStream&); private: - void generateCell(QTextStream&, int, int); - void generateTableHeader(QTextStream&); - void generateTopLineBorder(QTextStream&, int); - void generateBottomLineBorder(QTextStream&, int); + void generateCell(TQTextStream&, int, int); + void generateTableHeader(TQTextStream&); + void generateTopLineBorder(TQTextStream&, int); + void generateBottomLineBorder(TQTextStream&, int); }; #endif /* __KWORD_TABLE_H__ */ diff --git a/filters/kword/latex/export/texlauncher.cc b/filters/kword/latex/export/texlauncher.cc index e55b16d7..b67a7385 100644 --- a/filters/kword/latex/export/texlauncher.cc +++ b/filters/kword/latex/export/texlauncher.cc @@ -6,7 +6,7 @@ #include <klocale.h> #include <KoFilter.h> #include <KoStore.h> -#include<qtextstream.h> +#include<tqtextstream.h> int main(int argc, char* argv[]) @@ -14,8 +14,8 @@ int main(int argc, char* argv[]) kdDebug(30522) << argv[1] << endl; kdDebug(30522) << argv[2] << endl; - QString fileIn = argv[1]; - QString fileOut = argv[2]; + TQString fileIn = argv[1]; + TQString fileOut = argv[2]; kdDebug(30522) << "TEXGRAPH FILTER --> BEGIN" << endl; Xml2LatexParser parser(fileIn, fileOut); diff --git a/filters/kword/latex/export/textFrame.cc b/filters/kword/latex/export/textFrame.cc index 9d6599ba..cdcbba6a 100644 --- a/filters/kword/latex/export/textFrame.cc +++ b/filters/kword/latex/export/textFrame.cc @@ -45,11 +45,11 @@ TextFrame::TextFrame() /*******************************************/ /* searchFootnote */ /*******************************************/ -/*Para* TextFrame::searchFootnote(const QString name) +/*Para* TextFrame::searchFootnote(const TQString name) { for(Para* current = _footnotes.first(); current!= 0; current = _footnotes.next()) { - QString* string = current->getName(); + TQString* string = current->getName(); kdDebug(30522) << *string << endl; if(*string == name) return current; @@ -61,7 +61,7 @@ TextFrame::TextFrame() /*******************************************/ /* analyse */ /*******************************************/ -void TextFrame::analyse(const QDomNode balise) +void TextFrame::analyse(const TQDomNode balise) { /* MARKUP TYPE : FRAMESET INFO = TEXTE, ENTETE CONNUE */ @@ -103,7 +103,7 @@ void TextFrame::analyse(const QDomNode balise) /*******************************************/ /* analyseParamFrame */ /*******************************************/ -void TextFrame::analyseParamFrame(const QDomNode balise) +void TextFrame::analyseParamFrame(const TQDomNode balise) { /*<FRAME left="28" top="42" right="566" bottom="798" runaround="1" />*/ setLeft(getAttr(balise, "left").toDouble()); @@ -169,7 +169,7 @@ void TextFrame::analyseParamFrame(const QDomNode balise) /*******************************************/ /* generate */ /*******************************************/ -void TextFrame::generate(QTextStream &out) +void TextFrame::generate(TQTextStream &out) { Para * lastPara = 0; @@ -217,7 +217,7 @@ void TextFrame::generate(QTextStream &out) lastPara->closeList(out, currentPara); _lastTypeEnum = TL_NONE; } - /* layout management (left, center, justify, right) */ + /* tqlayout management (left, center, justify, right) */ if((!lastPara->isChapter() && _lastEnv != getNextEnv(_parags, _parags.at()) && lastPara->notEmpty()) || _lastEnv != getNextEnv(_parags, _parags.at())) @@ -238,7 +238,7 @@ void TextFrame::generate(QTextStream &out) } } -EEnv TextFrame::getNextEnv(QPtrList<Para> liste, const int pos) +EEnv TextFrame::getNextEnv(TQPtrList<Para> liste, const int pos) { if ( pos < 0 ) return ENV_NONE; diff --git a/filters/kword/latex/export/textFrame.h b/filters/kword/latex/export/textFrame.h index b43650c0..da51b7f2 100644 --- a/filters/kword/latex/export/textFrame.h +++ b/filters/kword/latex/export/textFrame.h @@ -23,7 +23,7 @@ #ifndef __KWORD_LATEX_FRAMETEXT_H__ #define __KWORD_LATEX_FRAMETEXT_H__ -#include <qptrlist.h> +#include <tqptrlist.h> #include "element.h" //#include "border.h" #include "para.h" @@ -50,8 +50,8 @@ class TextFrame: public Element TSide _sheetSide; /* CHILD MARKUP */ - QPtrList<Para> _parags; - //QPtrList<Para> _footnotes; + TQPtrList<Para> _parags; + //TQPtrList<Para> _footnotes; /* USEFULL DATA */ EEnv _lastEnv; @@ -92,7 +92,7 @@ class TextFrame: public Element TNFrame getNewFrame () const { return _newFrameBehaviour; } TSide getSheetSide () const { return _sheetSide; } Para* getFirstPara () const { return _parags.getFirst(); } - EEnv getNextEnv (QPtrList<Para>, const int); + EEnv getNextEnv (TQPtrList<Para>, const int); bool isBeginEnum (Para*, Para*); bool isCloseEnum (Para*, Para*); @@ -110,24 +110,24 @@ class TextFrame: public Element void setNewFrame (const int n) { _newFrameBehaviour = (TNFrame) n; } void setSheetSide (const int s) { _sheetSide = (TSide) s; } - //Para* searchFootnote(const QString); + //Para* searchFootnote(const TQString); /** * Get informations from a markup tree. */ - void analyse(const QDomNode); + void analyse(const TQDomNode); /** * Write the text in a file. */ - void generate(QTextStream&); + void generate(TQTextStream&); private: /** * Get informations from a markup tree (only parameters * in a frame. */ - void analyseParamFrame(const QDomNode); + void analyseParamFrame(const TQDomNode); }; diff --git a/filters/kword/latex/export/textformat.cc b/filters/kword/latex/export/textformat.cc index 74ec905e..02576354 100644 --- a/filters/kword/latex/export/textformat.cc +++ b/filters/kword/latex/export/textformat.cc @@ -86,7 +86,7 @@ int TextFormat::getBkColorRed () const void TextFormat::setColor (const int r, const int g, const int b) { if(_textcolor == 0) - _textcolor = new QColor(r, g, b); + _textcolor = new TQColor(r, g, b); else _textcolor->setRgb(r, g, b); } @@ -97,7 +97,7 @@ void TextFormat::setColor (const int r, const int g, const int b) void TextFormat::setBkColor (const int r, const int g, const int b) { if(_backcolor == 0) - _backcolor = new QColor(r, g, b); + _backcolor = new TQColor(r, g, b); else _backcolor->setRgb(r, g, b); } @@ -107,7 +107,7 @@ void TextFormat::setBkColor (const int r, const int g, const int b) /*******************************************/ /* Get the set of info. about a text format*/ /*******************************************/ -void TextFormat::analyseFormat(const QDomNode balise) +void TextFormat::analyseFormat(const TQDomNode balise) { /* MARKUPS FORMAT id="1" pos="0" len="17">...</FORMAT> */ @@ -138,7 +138,7 @@ void TextFormat::analyseFormat(const QDomNode balise) kdDebug(30522) << "END OF A FORMAT" << endl; } -void TextFormat::analyseBackgroundColor(const QDomNode balise) +void TextFormat::analyseBackgroundColor(const TQDomNode balise) { /* <TEXTBACKGROUNDCOLOR red="0" green="0" blue="0"/> */ int red = 0, @@ -163,7 +163,7 @@ void TextFormat::analyseBackgroundColor(const QDomNode balise) /*******************************************/ /* Get the zone where the format is applied*/ /*******************************************/ -void TextFormat::analyseParam(const QDomNode balise) +void TextFormat::analyseParam(const TQDomNode balise) { /* <FORMAT id="1" pos="0" len="17"> */ @@ -178,7 +178,7 @@ void TextFormat::analyseParam(const QDomNode balise) /*******************************************/ /* Get the text font! */ /*******************************************/ -void TextFormat::analyseFont(const QDomNode balise) +void TextFormat::analyseFont(const TQDomNode balise) { /* <FONT name="times"> */ setPolice(getAttr(balise, "name")); @@ -189,7 +189,7 @@ void TextFormat::analyseFont(const QDomNode balise) /*******************************************/ /* Verify if it's a italic text. */ /*******************************************/ -void TextFormat::analyseItalic(const QDomNode balise) +void TextFormat::analyseItalic(const TQDomNode balise) { /* <ITALIC value="1"> */ setItalic(getAttr(balise, "value").toInt()); @@ -200,7 +200,7 @@ void TextFormat::analyseItalic(const QDomNode balise) /*******************************************/ /* Verify if it's a underlined text. */ /*******************************************/ -void TextFormat::analyseUnderlined(const QDomNode balise) +void TextFormat::analyseUnderlined(const TQDomNode balise) { /* <UNDERLINE value="1"> */ @@ -215,7 +215,7 @@ void TextFormat::analyseUnderlined(const QDomNode balise) /*******************************************/ /* Verify if it's a strikeout text. */ /*******************************************/ -void TextFormat::analyseStrikeout(const QDomNode balise) +void TextFormat::analyseStrikeout(const TQDomNode balise) { /* <STRIKEOUT value="1" /> */ setStrikeout(getAttr(balise, "value").toInt()); @@ -229,7 +229,7 @@ void TextFormat::analyseStrikeout(const QDomNode balise) /*******************************************/ /* Get the text weigth. */ /*******************************************/ -void TextFormat::analyseWeight(const QDomNode balise) +void TextFormat::analyseWeight(const TQDomNode balise) { /* <WEIGHT value="75" /> */ setWeight(getAttr(balise, "value").toInt()); @@ -241,7 +241,7 @@ void TextFormat::analyseWeight(const QDomNode balise) /*******************************************/ /* Get the text align. */ /*******************************************/ -void TextFormat::analyseAlign(const QDomNode balise) +void TextFormat::analyseAlign(const TQDomNode balise) { /* <VERTALIGN value="0"> */ @@ -253,7 +253,7 @@ void TextFormat::analyseAlign(const QDomNode balise) /*******************************************/ /* Get the text color. */ /*******************************************/ -void TextFormat::analyseColor(const QDomNode balise) +void TextFormat::analyseColor(const TQDomNode balise) { /* <COLOR red="0" green="0" blue="0"/> */ int red = 0, @@ -278,7 +278,7 @@ void TextFormat::analyseColor(const QDomNode balise) /*******************************************/ /* Get the text size. */ /*******************************************/ -void TextFormat::analyseSize(const QDomNode balise) +void TextFormat::analyseSize(const TQDomNode balise) { /* <SIZE value="11"> */ setSize(getAttr(balise, "value").toInt()); diff --git a/filters/kword/latex/export/textformat.h b/filters/kword/latex/export/textformat.h index defc5925..e982fc08 100644 --- a/filters/kword/latex/export/textformat.h +++ b/filters/kword/latex/export/textformat.h @@ -23,8 +23,8 @@ #ifndef __KWORD_TEXTFORMAT_H__ #define __KWORD_TEXTFORMAT_H__ -#include <qstring.h> -#include <qcolor.h> +#include <tqstring.h> +#include <tqcolor.h> #include "format.h" enum _EAlign @@ -68,15 +68,15 @@ typedef enum _ETypeLinespacing ETypeLinespacing; */ class TextFormat: public Format { - QString _police; + TQString _police; unsigned int _size; /* Size of the police */ unsigned int _weight; /* bold */ bool _italic; ETypeUnderline _underline; bool _strikeout; EAlign _vertalign; - QColor* _textcolor; - QColor* _backcolor; + TQColor* _textcolor; + TQColor* _backcolor; ETypeLinespacing _linespacingType; int _spacingValue; @@ -130,7 +130,7 @@ class TextFormat: public Format void setWeight (const unsigned int w) { _weight = w; } void setItalic (bool i) { _italic = i; } void setUnderlined (ETypeUnderline u) { _underline = u; } - void setUnderlined (QString u) + void setUnderlined (TQString u) { if(u == "double") _underline = UNDERLINE_DOUBLE; @@ -142,23 +142,23 @@ class TextFormat: public Format _underline = UNDERLINE_NONE; } void setStrikeout (bool s) { _strikeout = s; } - void setPolice (QString p) { _police = p; } + void setPolice (TQString p) { _police = p; } void setAlign (const int a) { _vertalign = (EAlign) a; } void setColor (const int, const int, const int); void setBkColor (const int, const int, const int); /* ==== Helpfull functions ==== */ - void analyseFormat (const QDomNode); - void analyseParam (const QDomNode); - void analyseFont (const QDomNode); - void analyseItalic (const QDomNode); - void analyseUnderlined(const QDomNode); - void analyseStrikeout (const QDomNode); - void analyseWeight (const QDomNode); - void analyseAlign (const QDomNode); - void analyseColor (const QDomNode); - void analyseSize (const QDomNode); - void analyseBackgroundColor(const QDomNode); + void analyseFormat (const TQDomNode); + void analyseParam (const TQDomNode); + void analyseFont (const TQDomNode); + void analyseItalic (const TQDomNode); + void analyseUnderlined(const TQDomNode); + void analyseStrikeout (const TQDomNode); + void analyseWeight (const TQDomNode); + void analyseAlign (const TQDomNode); + void analyseColor (const TQDomNode); + void analyseSize (const TQDomNode); + void analyseBackgroundColor(const TQDomNode); }; #endif /* __KWORD_TEXTFORMAT_H__ */ diff --git a/filters/kword/latex/export/textzone.cc b/filters/kword/latex/export/textzone.cc index 5495de5d..476babb3 100644 --- a/filters/kword/latex/export/textzone.cc +++ b/filters/kword/latex/export/textzone.cc @@ -1,4 +1,4 @@ -/* MEMO: to see the unicode table +/* MEMO: to see the tqunicode table * xset +fp /usr/X11R6/lib/X11/fonts/ucs/ * xfd -fn '-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1' */ @@ -24,7 +24,7 @@ */ #include <kdebug.h> /* for kdDebug() stream */ -#include <qregexp.h> /* for QRegExp() --> escapeLatin1 */ +#include <tqregexp.h> /* for TQRegExp() --> escapeLatin1 */ #include "textzone.h" #include "para.h" @@ -50,7 +50,7 @@ TextZone::TextZone(Para *para) /*******************************************/ /* TextZone */ /*******************************************/ -TextZone::TextZone(QString texte, Para *para): _texte(texte) +TextZone::TextZone(TQString texte, Para *para): _texte(texte) { setPara(para); if(para != NULL) @@ -85,10 +85,10 @@ bool TextZone::useFormat() const /*******************************************/ /* escapeLatin1 */ /*******************************************/ -/* Convert special caracters (unicode) in */ +/* Convert special caracters (tqunicode) in */ /* latex usable caracters. */ /*******************************************/ -QString TextZone::escapeLatin1(QString text) +TQString TextZone::escapeLatin1(TQString text) { static const char *escapes[64] = { @@ -113,8 +113,8 @@ QString TextZone::escapeLatin1(QString text) "\\\"{u}", "\\'{y}", "\\th{}", "\\\"{y}" }; - QString escapedText; - int unicode; /* the character to be escaped */ + TQString escapedText; + int tqunicode; /* the character to be escaped */ escapedText = text; /* copy input text */ @@ -185,8 +185,8 @@ QString TextZone::escapeLatin1(QString text) for(int index = 0; index < 64; index++) { - unicode = CSTART + index; - convert(escapedText, unicode, escapes[index]); + tqunicode = CSTART + index; + convert(escapedText, tqunicode, escapes[index]); } convert(escapedText, 0X2020, "\\textdied{}"); /* textcomp */ @@ -259,17 +259,17 @@ QString TextZone::escapeLatin1(QString text) /* Convert all the instance of one */ /* character in latex usable caracter. */ /*******************************************/ -void TextZone::convert(QString& text, int unicode, const char* escape) +void TextZone::convert(TQString& text, int tqunicode, const char* escape) { - QString expression; - QString value; + TQString expression; + TQString value; - expression = QString("\\x") + value.setNum(unicode, 16); + expression = TQString("\\x") + value.setNum(tqunicode, 16); - if( !QString(escape).isEmpty() ) + if( !TQString(escape).isEmpty() ) { /*1. translate special characters with a space after. */ - text = text.replace( QRegExp( expression), QString(escape)); + text = text.tqreplace( TQRegExp( expression), TQString(escape)); } } @@ -279,7 +279,7 @@ void TextZone::convert(QString& text, int unicode, const char* escape) /* Analyse a text format, get the text used*/ /* by this format. */ /*******************************************/ -void TextZone::analyse(const QDomNode balise) +void TextZone::analyse(const TQDomNode balise) { kdDebug(30522) << "FORMAT" << endl; /* Get header information (size, position) @@ -319,7 +319,7 @@ void TextZone::analyse() /*******************************************/ /* Generate the text formated (if needed). */ /*******************************************/ -void TextZone::generate(QTextStream &out) +void TextZone::generate(TQTextStream &out) { if(useFormat()) @@ -343,11 +343,11 @@ void TextZone::generate(QTextStream &out) /* Trunc the text in about 80 caracters of */ /* width except if there are not spaces. */ /*******************************************/ -void TextZone::display(QString texte, QTextStream& out) +void TextZone::display(TQString texte, TQTextStream& out) { - QString line; + TQString line; int index = 0, end = 0; - end = texte.find(' ', 60, false); + end = texte.tqfind(' ', 60, false); if(end != -1) line = texte.mid(index, end - index); else @@ -361,7 +361,7 @@ void TextZone::display(QString texte, QTextStream& out) out << line << endl; Config::instance()->writeIndent(out); index = end; - end = texte.find(' ', index + 60, false); + end = texte.tqfind(' ', index + 60, false); line = texte.mid(index, end - index); } kdDebug(30522) << line << endl; @@ -378,7 +378,7 @@ void TextZone::display(QString texte, QTextStream& out) /*******************************************/ /* Write the begining format markup. */ /*******************************************/ -void TextZone::generate_format_begin(QTextStream & out) +void TextZone::generate_format_begin(TQTextStream & out) { kdDebug(30522) << "GENERATE FORMAT BEGIN" << endl; @@ -451,7 +451,7 @@ void TextZone::generate_format_begin(QTextStream & out) /*******************************************/ /* Write the format end markup. */ /*******************************************/ -void TextZone::generate_format_end(QTextStream & out) +void TextZone::generate_format_end(TQTextStream & out) { kdDebug(30522) << "GENERATE FORMAT END" << endl; @@ -485,9 +485,9 @@ void TextZone::generate_format_end(QTextStream & out) out << "}"; } -QString convertSpecialChar(int c) +TQString convertSpecialChar(int c) { - QString output; + TQString output; switch(c) { diff --git a/filters/kword/latex/export/textzone.h b/filters/kword/latex/export/textzone.h index 21548c1d..a9f5ff07 100644 --- a/filters/kword/latex/export/textzone.h +++ b/filters/kword/latex/export/textzone.h @@ -26,8 +26,8 @@ #ifndef __KWORD_LATEX_TEXTZONE_H__ #define __KWORD_LATEX_TEXTZONE_H__ -#include <qtextstream.h> -#include <qstring.h> +#include <tqtextstream.h> +#include <tqstring.h> #include "textformat.h" /***********************************************************************/ @@ -40,7 +40,7 @@ class TextZone: public TextFormat { /* TEXT MARKUP */ - QString _texte; + TQString _texte; public: /* === Constructors ==== */ @@ -48,7 +48,7 @@ class TextZone: public TextFormat /** * Creates a new instance of TextZone. * - * @param para which is the parent class. + * @param para which is the tqparent class. */ TextZone(Para *para = 0); /** @@ -56,9 +56,9 @@ class TextZone: public TextFormat * Creates a new instance of TextZOne. * * @param text the text in this zone. - * @param para which is the parent class. + * @param para which is the tqparent class. */ - TextZone(QString text, Para *para = 0); + TextZone(TQString text, Para *para = 0); /* * Destructor @@ -72,37 +72,37 @@ class TextZone: public TextFormat * */ bool useFormat() const; - QString getTexte() const { return _texte; } + TQString getTexte() const { return _texte; } /* ==== Setters ==== */ - void setTexte(QString texte) { _texte = texte; } + void setTexte(TQString texte) { _texte = texte; } /* ==== Helpfull functions ==== */ /** - * convert a unicode text in latin1 enconding ala latex. + * convert a tqunicode text in latin1 enconding ala latex. */ - QString escapeLatin1(QString); + TQString escapeLatin1(TQString); - void analyse(const QDomNode); + void analyse(const TQDomNode); void analyse(); - virtual void generate(QTextStream&); + virtual void generate(TQTextStream&); - void generate_format_begin(QTextStream &); - void generate_format_end(QTextStream &); + void generate_format_begin(TQTextStream &); + void generate_format_end(TQTextStream &); protected: - void display(QString, QTextStream&); + void display(TQString, TQTextStream&); private: /** * convert a special character in a latex command. */ - void convert(QString&, int, const char*); + void convert(TQString&, int, const char*); }; -QString convertSpecialChar(int); +TQString convertSpecialChar(int); #endif /* __KWORD_LATEX_TEXTZONE_H__ */ diff --git a/filters/kword/latex/export/variableformat.cc b/filters/kword/latex/export/variableformat.cc index 32c7a39c..5c6f9f40 100644 --- a/filters/kword/latex/export/variableformat.cc +++ b/filters/kword/latex/export/variableformat.cc @@ -65,7 +65,7 @@ /*void VariableFormat::setColor (const int r, const int g, const int b) { if(_textcolor == 0) - _textcolor = new QColor(r, g, b); + _textcolor = new TQColor(r, g, b); else _textcolor->setRgb(r, g, b); }*/ @@ -75,7 +75,7 @@ /*******************************************/ /* Get the set of info. about a text format*/ /*******************************************/ -void VariableFormat::analyseFormat(const QDomNode balise) +void VariableFormat::analyseFormat(const TQDomNode balise) { /* MARKUPS FORMAT id="1" pos="0" len="17">...</FORMAT> */ @@ -116,7 +116,7 @@ void VariableFormat::analyseFormat(const QDomNode balise) /*******************************************/ /* Get the date. */ /*******************************************/ -void VariableFormat::analyseDate(const QDomNode balise) +void VariableFormat::analyseDate(const TQDomNode balise) { setDay(getAttr(balise, "day").toInt()); setMonth(getAttr(balise, "month").toInt()); @@ -129,7 +129,7 @@ void VariableFormat::analyseDate(const QDomNode balise) /*******************************************/ /* Get the time. */ /*******************************************/ -void VariableFormat::analyseTime(const QDomNode balise) +void VariableFormat::analyseTime(const TQDomNode balise) { setHour(getAttr(balise, "day").toInt()); setMinute(getAttr(balise, "month").toInt()); @@ -137,7 +137,7 @@ void VariableFormat::analyseTime(const QDomNode balise) setFix(getAttr(balise, "fix").toInt()); } -void VariableFormat::analyseFootnote(const QDomNode balise) +void VariableFormat::analyseFootnote(const TQDomNode balise) { setNumberingtype(getAttr(balise, "numberingtype")); setNotetype(getAttr(balise, "notetype")); @@ -145,7 +145,7 @@ void VariableFormat::analyseFootnote(const QDomNode balise) setValue(getAttr(balise, "value")); } -void VariableFormat::analyseNote(const QDomNode balise) +void VariableFormat::analyseNote(const TQDomNode balise) { setNote(getAttr(balise, "note")); } @@ -155,7 +155,7 @@ void VariableFormat::analyseNote(const QDomNode balise) /*******************************************/ /* Get information about variable. */ /*******************************************/ -void VariableFormat::analyseType(const QDomNode balise) +void VariableFormat::analyseType(const TQDomNode balise) { setKey(getAttr(balise, "key")); setType(getAttr(balise, "type").toInt()); diff --git a/filters/kword/latex/export/variableformat.h b/filters/kword/latex/export/variableformat.h index 05b5a2d1..68810ca0 100644 --- a/filters/kword/latex/export/variableformat.h +++ b/filters/kword/latex/export/variableformat.h @@ -22,8 +22,8 @@ #ifndef __KWORD_VARIABLEFORMAT_H__ #define __KWORD_VARIABLEFORMAT_H__ -#include <qstring.h> -#include <qcolor.h> +#include <tqstring.h> +#include <tqcolor.h> #include "textzone.h" enum _EVarType @@ -54,19 +54,19 @@ typedef enum _EVarType EVarType; */ class VariableFormat: public TextZone { - /*QString _police; + /*TQString _police; unsigned int _size;*/ /* Size of the police */ //unsigned int _weight; /* bold */ /*bool _italic; bool _underline; bool _strikeout; EAlign _vertalign; - QColor* _textcolor;*/ + TQColor* _textcolor;*/ /* VARIABLE */ - QString _key; + TQString _key; EVarType _varType; - QString _text; + TQString _text; /* DATE */ int _day; @@ -80,13 +80,13 @@ class VariableFormat: public TextZone int _seconde; /* FOOTNOTE */ - QString _numberingtype; - QString _notetype; - QString _frameset; - QString _value; + TQString _numberingtype; + TQString _notetype; + TQString _frameset; + TQString _value; /* NOTE */ - QString _note; + TQString _note; public: /** @@ -115,8 +115,8 @@ class VariableFormat: public TextZone virtual ~VariableFormat() {} /* ==== Getters ==== */ - QString getKey () const { return _key; } - QString getText () const { return _text; } + TQString getKey () const { return _key; } + TQString getText () const { return _text; } EVarType getType () const { return _varType; } int getDay () const { return _day; } int getMonth () const { return _month; } @@ -124,18 +124,18 @@ class VariableFormat: public TextZone int getHour () const { return _hour; } int getMinute () const { return _minute; } int getSeconde () const { return _seconde; } - QString getNumberingtype() const { return _numberingtype; } - QString getNotetype () const { return _notetype; } - QString getFrameset () const { return _frameset; } - QString getValue () const { return _value; } - QString getNote () const { return _note; } + TQString getNumberingtype() const { return _numberingtype; } + TQString getNotetype () const { return _notetype; } + TQString getFrameset () const { return _frameset; } + TQString getValue () const { return _value; } + TQString getNote () const { return _note; } bool isFix () const { return (_fix == true); } /* ==== Setters ==== */ void setType (const int t) { _varType = (EVarType) t; } - void setKey (QString k) { _key = k; } - void setText (QString t) { _text = t; } + void setKey (TQString k) { _key = k; } + void setText (TQString t) { _text = t; } void setFix (bool f) { _fix = f; } void setDay (const int d) { _day = d; } void setMonth (const int m) { _year = m; } @@ -144,19 +144,19 @@ class VariableFormat: public TextZone void setMinute (const int m) { _minute = m; } void setSeconde (const int s) { _seconde = s; } void setColor (const int, const int, const int); - void setNumberingtype(const QString nt) { _numberingtype = nt; } - void setNotetype (const QString nt) { _notetype = nt; } - void setFrameset (const QString fs) { _frameset = fs; } - void setValue (const QString val) { _value = val; } - void setNote (const QString note) { _note = note; } + void setNumberingtype(const TQString nt) { _numberingtype = nt; } + void setNotetype (const TQString nt) { _notetype = nt; } + void setFrameset (const TQString fs) { _frameset = fs; } + void setValue (const TQString val) { _value = val; } + void setNote (const TQString note) { _note = note; } /* ==== Helpfull functions ==== */ - void analyseFormat(const QDomNode); - void analyseDate (const QDomNode); - void analyseTime (const QDomNode); - void analyseFootnote (const QDomNode); - void analyseNote (const QDomNode); - void analyseType (const QDomNode); + void analyseFormat(const TQDomNode); + void analyseDate (const TQDomNode); + void analyseTime (const TQDomNode); + void analyseFootnote (const TQDomNode); + void analyseNote (const TQDomNode); + void analyseType (const TQDomNode); }; #endif /* __KWORD_VARIABLEFORMAT_H__ */ diff --git a/filters/kword/latex/export/variablezone.cc b/filters/kword/latex/export/variablezone.cc index 92ebd06a..09a16635 100644 --- a/filters/kword/latex/export/variablezone.cc +++ b/filters/kword/latex/export/variablezone.cc @@ -1,4 +1,4 @@ -/* MEMO: to see the unicode table +/* MEMO: to see the tqunicode table * xset +fp /usr/X11R6/lib/X11/fonts/ucs/ * xfd -fn '-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1' */ @@ -45,7 +45,7 @@ VariableZone::VariableZone(Para* para): VariableFormat(para) /*******************************************/ /* VariableZone */ /*******************************************/ -VariableZone::VariableZone(QString text, Para* para): VariableFormat(para) +VariableZone::VariableZone(TQString text, Para* para): VariableFormat(para) { setTexte(text); /*setPara(para); @@ -70,7 +70,7 @@ VariableZone::~VariableZone() /* Analyse a text format, get the text used*/ /* by this format. */ /*******************************************/ -void VariableZone::analyse(const QDomNode balise) +void VariableZone::analyse(const TQDomNode balise) { kdDebug(30522) << "FORMAT" << endl; /* Get header information (size, position) @@ -92,7 +92,7 @@ void VariableZone::analyse(const QDomNode balise) /*******************************************/ /* Generate the text formated (if needed). */ /*******************************************/ -void VariableZone::generate(QTextStream &out) +void VariableZone::generate(TQTextStream &out) { if(useFormat()) diff --git a/filters/kword/latex/export/variablezone.h b/filters/kword/latex/export/variablezone.h index 2204fc12..bb3c2ba9 100644 --- a/filters/kword/latex/export/variablezone.h +++ b/filters/kword/latex/export/variablezone.h @@ -26,8 +26,8 @@ #ifndef __KWORD_VARIABLEZONE_H__ #define __KWORD_VARIABLEZONE_H__ -#include <qtextstream.h> -#include <qstring.h> +#include <tqtextstream.h> +#include <tqstring.h> #include "variableformat.h" /***********************************************************************/ @@ -46,7 +46,7 @@ class VariableZone: public VariableFormat /** * Creates a new instance of VariableZone. * - * @param Para which is the parent class. + * @param Para which is the tqparent class. */ VariableZone(Para* para); @@ -54,9 +54,9 @@ class VariableZone: public VariableFormat * Creates a new instance of TextZOne. * * @param text the text in this zone. - * @param para which is the parent class. + * @param para which is the tqparent class. */ - VariableZone(QString text, Para* para); + VariableZone(TQString text, Para* para); /* ==== Destructor ==== */ virtual ~VariableZone(); @@ -67,8 +67,8 @@ class VariableZone: public VariableFormat /* ==== Helpfull functions ==== */ - void analyse(const QDomNode); - void generate(QTextStream&); + void analyse(const TQDomNode); + void generate(TQTextStream&); }; diff --git a/filters/kword/latex/export/xml2latexparser.cc b/filters/kword/latex/export/xml2latexparser.cc index 4d01634e..88936c9a 100644 --- a/filters/kword/latex/export/xml2latexparser.cc +++ b/filters/kword/latex/export/xml2latexparser.cc @@ -25,7 +25,7 @@ #include "xml2latexparser.h" -Xml2LatexParser::Xml2LatexParser(const KoStore* in, QString fileOut, Config* config): +Xml2LatexParser::Xml2LatexParser(const KoStore* in, TQString fileOut, Config* config): XmlParser(config, in), _file(fileOut), _in( in ) { //kdDebug(30522) << fileIn.latin1() << endl; @@ -37,7 +37,7 @@ Xml2LatexParser::Xml2LatexParser(const KoStore* in, QString fileOut, Config* con void Xml2LatexParser::analyse() { - QDomNode balise; + TQDomNode balise; balise = init(); //balise = getChild(balise, "DOC"); kdDebug(30522) <<"HEADER -> PAPER" << endl; @@ -60,7 +60,7 @@ void Xml2LatexParser::generate() if(_file.open(IO_WriteOnly)) { kdDebug(30522) << "GENERATION" << endl; - _out.setDevice(&_file); + _out.setDevice(TQT_TQIODEVICE(&_file)); if(!Config::instance()->isEmbeded()) FileHeader::instance()->generate(_out); _document.generate(_out, !Config::instance()->isEmbeded()); diff --git a/filters/kword/latex/export/xml2latexparser.h b/filters/kword/latex/export/xml2latexparser.h index fc7e577d..38adc123 100644 --- a/filters/kword/latex/export/xml2latexparser.h +++ b/filters/kword/latex/export/xml2latexparser.h @@ -22,18 +22,18 @@ #ifndef __XML2LATEXPARSER_H__ #define __XML2LATEXPARSER_H__ -#include <qfile.h> /* for QFile class */ -#include <qtextstream.h> /* for QTextStream class */ -#include <qstring.h> /* for QString class */ +#include <tqfile.h> /* for TQFile class */ +#include <tqtextstream.h> /* for TQTextStream class */ +#include <tqstring.h> /* for TQString class */ #include "fileheader.h" #include "document.h" class Xml2LatexParser : public XmlParser { - QFile _file; - QTextStream _out; + TQFile _file; + TQTextStream _out; /** Name of the latex file. */ - //QString _filename; + //TQString _filename; /** The KWord document exported. */ const KoStore* _in; @@ -47,7 +47,7 @@ class Xml2LatexParser : public XmlParser * @param in The document from kword. * @param fileOut Output latex filename. */ - Xml2LatexParser(const KoStore* in, QString fileOut, Config* config); + Xml2LatexParser(const KoStore* in, TQString fileOut, Config* config); virtual ~Xml2LatexParser() {} diff --git a/filters/kword/latex/export/xmlparser.cc b/filters/kword/latex/export/xmlparser.cc index 4c66efc0..9c4c07e4 100644 --- a/filters/kword/latex/export/xmlparser.cc +++ b/filters/kword/latex/export/xmlparser.cc @@ -23,19 +23,19 @@ #include <KoStore.h> #include "xmlparser.h" -#include "qfile.h" +#include "tqfile.h" /* Init static data */ //FileHeader* XmlParser::_fileHeader = 0; Document* XmlParser::_root = 0; KoStore* XmlParser::_in = NULL; -QString XmlParser::_filename = ""; +TQString XmlParser::_filename = ""; -XmlParser::XmlParser(Config* config, QString filename):_config(config) +XmlParser::XmlParser(Config* config, TQString filename):_config(config) { //_filename = filename; - QFile f(filename); + TQFile f(filename); if(!f.open(IO_ReadOnly)) return; if(!_document.setContent(&f)) @@ -48,7 +48,7 @@ XmlParser::XmlParser(Config* config, QString filename):_config(config) //_eltCurrent = _document.documentElement(); } -XmlParser::XmlParser(Config* config, QByteArray in): _config(config) +XmlParser::XmlParser(Config* config, TQByteArray in): _config(config) { _document.setContent(in); } @@ -62,7 +62,7 @@ XmlParser::XmlParser(Config* config, const KoStore* in): _config(config) return; } /* input file Reading */ - QByteArray array = _in->read(_in->size()); + TQByteArray array = _in->read(_in->size()); _document.setContent(array); if(!_in->close()) { @@ -87,63 +87,63 @@ XmlParser::~XmlParser() _in->close();*/ } -QDomNode XmlParser::getChild(QDomNode balise, QString name) +TQDomNode XmlParser::getChild(TQDomNode balise, TQString name) { - QDomNode node = getChild(balise, name, 0); + TQDomNode node = getChild(balise, name, 0); kdDebug(30522) << node.nodeName() << endl; return node; } -bool XmlParser::isChild(QDomNode balise, QString name) +bool XmlParser::isChild(TQDomNode balise, TQString name) { if(balise.isElement()) return balise.toElement().elementsByTagName(name).count(); return false; } -QDomNode XmlParser::getChild(QDomNode balise, QString name, int index) +TQDomNode XmlParser::getChild(TQDomNode balise, TQString name, int index) { if(balise.isElement()) { - QDomNodeList children = balise.toElement().elementsByTagName(name); - if ( children.count() ) - return children.item(index); + TQDomNodeList tqchildren = balise.toElement().elementsByTagName(name); + if ( tqchildren.count() ) + return tqchildren.item(index); } - return QDomNode(); + return TQDomNode(); } -QDomNode XmlParser::getChild(QDomNode balise, int index) +TQDomNode XmlParser::getChild(TQDomNode balise, int index) { - QDomNodeList children = balise.childNodes(); - if ( children.count() ) - return children.item(index); - return QDomNode(); + TQDomNodeList tqchildren = balise.childNodes(); + if ( tqchildren.count() ) + return tqchildren.item(index); + return TQDomNode(); } -QString XmlParser::getData(QDomNode balise, int index) +TQString XmlParser::getData(TQDomNode balise, int index) { return getChild(getChild(balise, index), 0).nodeValue(); } -int XmlParser::getNbChild(QDomNode balise) +int XmlParser::getNbChild(TQDomNode balise) { return balise.childNodes().count(); } -int XmlParser::getNbChild(QDomNode balise, QString name) +int XmlParser::getNbChild(TQDomNode balise, TQString name) { if(balise.isElement()) return balise.toElement().elementsByTagName(name).count(); return -1; } -QString XmlParser::getChildName(QDomNode balise, int index) +TQString XmlParser::getChildName(TQDomNode balise, int index) { return balise.childNodes().item(index).nodeName(); } -QString XmlParser::getAttr(QDomNode balise, QString name) const +TQString XmlParser::getAttr(TQDomNode balise, TQString name) const { if(balise.isElement()) return balise.toElement().attributeNode(name).value(); - return QString(); + return TQString(); } diff --git a/filters/kword/latex/export/xmlparser.h b/filters/kword/latex/export/xmlparser.h index 09edbac1..a96d3a59 100644 --- a/filters/kword/latex/export/xmlparser.h +++ b/filters/kword/latex/export/xmlparser.h @@ -23,8 +23,8 @@ #ifndef __LATEX_XMLPARSER_H__ #define __LATEX_XMLPARSER_H__ -#include "qstring.h" -#include "qdom.h" +#include "tqstring.h" +#include "tqdom.h" #include "config.h" class FileHeader; @@ -40,7 +40,7 @@ class KoStore; class XmlParser { /** The Koffice app document stored in a XML DOM Tree. */ - QDomDocument _document; + TQDomDocument _document; /** The koffice document (maindoc, picture, ...). */ static KoStore* _in; /** Configuration */ @@ -53,34 +53,34 @@ class XmlParser //static FileHeader *_fileHeader; static Document *_root; /** Latex output file */ - static QString _filename; + static TQString _filename; public: - XmlParser(Config*, QString); - XmlParser(Config*, QByteArray); /* deprecated */ + XmlParser(Config*, TQString); + XmlParser(Config*, TQByteArray); /* deprecated */ XmlParser(Config*, const KoStore*); XmlParser(); virtual ~XmlParser(); - QString getFilename () const { return _filename; } - QString getDocument () const { return _document.toString(); } + TQString getFilename () const { return _filename; } + TQString getDocument () const { return _document.toString(); } Document* getRoot () const { return _root; } //FileHeader* getFileHeader () const { return _fileHeader; } KoStore* getStorage () const { return _in; } - QString getChildName(QDomNode, int); - QDomNode getChild(QDomNode, QString); - QDomNode getChild(QDomNode, QString, int); - QDomNode getChild(QDomNode, int); - QString getData(QDomNode, int); - int getNbChild(QDomNode, QString); - int getNbChild(QDomNode); - QString getAttr(QDomNode, QString) const; - bool isChild(QDomNode, QString); + TQString getChildName(TQDomNode, int); + TQDomNode getChild(TQDomNode, TQString); + TQDomNode getChild(TQDomNode, TQString, int); + TQDomNode getChild(TQDomNode, int); + TQString getData(TQDomNode, int); + int getNbChild(TQDomNode, TQString); + int getNbChild(TQDomNode); + TQString getAttr(TQDomNode, TQString) const; + bool isChild(TQDomNode, TQString); //void setFileHeader(FileHeader* h) { _fileHeader = h; } void setRoot (Document* r) { _root = r; } - QDomNode init() { return _document.documentElement(); } + TQDomNode init() { return _document.documentElement(); } }; diff --git a/filters/kword/latex/import/generator/body.cc b/filters/kword/latex/import/generator/body.cc index b69f159d..fcf5e534 100644 --- a/filters/kword/latex/import/generator/body.cc +++ b/filters/kword/latex/import/generator/body.cc @@ -19,17 +19,17 @@ #include "body.h" #include <element.h> -#include <qdom.h> +#include <tqdom.h> bool Body::analyse(Element* body) { } -bool Body::generate(QDomElement& framesetsNode, QDomDocument& doc) +bool Body::generate(TQDomElement& framesetsNode, TQDomDocument& doc) { /* FRAMESET */ - QDomElement framesetNode = doc.createElement("FRAMESET"); + TQDomElement framesetNode = doc.createElement("FRAMESET"); /* required attributes */ framesetNode.setAttribute("frameType", TEXTFRAME); @@ -38,7 +38,7 @@ bool Body::generate(QDomElement& framesetsNode, QDomDocument& doc) framesetsNode.appendChild(framesetNode); /* FRAME */ - QDomElement frameNode = doc.createElement("FRAME"); + TQDomElement frameNode = doc.createElement("FRAME"); /* required attributes */ frameNode.setAttribute("newFrameBehavior", "0"); diff --git a/filters/kword/latex/import/generator/body.h b/filters/kword/latex/import/generator/body.h index 73a12c92..e06db774 100644 --- a/filters/kword/latex/import/generator/body.h +++ b/filters/kword/latex/import/generator/body.h @@ -20,12 +20,12 @@ #ifndef __KWORD_LATEX_IMPORT_BODY_H__ #define __KWORD_LATEX_IMPORT_BODY_H__ -#include <qptrlist.h> +#include <tqptrlist.h> #include "paragraph.h" class Element; -class QDomDocument; -class QDomElement; +class TQDomDocument; +class TQDomElement; #define NORMALTEXT 0 #define TEXTFRAME 1 @@ -61,7 +61,7 @@ class Body * * @return <code>true</code> if the generation success. */ - bool generate(QDomElement& framesets, QDomDocument& doc); + bool generate(TQDomElement& framesets, TQDomDocument& doc); private: /** Left margin in pt. */ @@ -73,7 +73,7 @@ class Body /** Botoom margin in pt. */ int _bottomMargin; /** The body of a document is a list of paragraphs. */ - QPtrList<Paragraph> _paragraphs; + TQPtrList<Paragraph> _paragraphs; }; #endif /* __KWORD_LATEX_IMPORT_BODY_H__ */ diff --git a/filters/kword/latex/import/generator/document.cc b/filters/kword/latex/import/generator/document.cc index d7f0bae8..13685e02 100644 --- a/filters/kword/latex/import/generator/document.cc +++ b/filters/kword/latex/import/generator/document.cc @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include <qdom.h> -#include <qtextstream.h> +#include <tqdom.h> +#include <tqtextstream.h> #include "kdebug.h" #include <KoStore.h> @@ -27,7 +27,7 @@ #include <param.h> #include <command.h> -bool Document::analyse(QPtrList<Element>* root) +bool Document::analyse(TQPtrList<Element>* root) { bool error = true; error &= analyseDocumentClass((Command*) Latex::instance()->getCommand(root, "documentclass")); @@ -40,7 +40,7 @@ bool Document::analyse(QPtrList<Element>* root) bool Document::analyseDocumentClass(Command* documentclass) { kdWarning(documentclass != NULL) << "no documentclass found !" << endl; - QPtrList<Param> params = documentclass->getOptions(); + TQPtrList<Param> params = documentclass->getOptions(); Param* param; for ( param = params.first(); param; param = params.next() ) { @@ -55,12 +55,12 @@ bool Document::analyseDocumentClass(Command* documentclass) bool Document::generate(KoStore* store) { - QDomDocument doc("KWORD"); + TQDomDocument doc("KWORD"); doc.appendChild(doc.createProcessingInstruction("xml", "version=\"1.0\" encoding=\"UTF-8\"")); /* DOC */ - QDomElement root = doc.createElement("DOC"); + TQDomElement root = doc.createElement("DOC"); root.setAttribute("editor", "LaTex Import Filter"); root.setAttribute("mime", "application/x-kword"); root.setAttribute("syntaxVersion", "1"); @@ -71,7 +71,7 @@ bool Document::generate(KoStore* store) /* ATTRIBUTES */ /* FRAMESETS */ - QDomElement body = doc.createElement("FRAMESETS"); + TQDomElement body = doc.createElement("FRAMESETS"); root.appendChild(body); /* generate body */ @@ -82,9 +82,9 @@ bool Document::generate(KoStore* store) return true; } -void Document::serialize(KoStore* store, QDomDocument doc) +void Document::serialize(KoStore* store, TQDomDocument doc) { - QCString str = doc.toCString(); + TQCString str = doc.toCString(); qWarning(str); if(store->open("root")) { diff --git a/filters/kword/latex/import/generator/document.h b/filters/kword/latex/import/generator/document.h index 897b829a..c02d61dc 100644 --- a/filters/kword/latex/import/generator/document.h +++ b/filters/kword/latex/import/generator/document.h @@ -21,11 +21,11 @@ #define __KWORD_LATEX_IMPORT_DOCUMENT__ #include <element.h> -#include <qptrlist.h> +#include <tqptrlist.h> #include "body.h" class KoStore; -class QDomNode; +class TQDomNode; class Command; class Document @@ -46,7 +46,7 @@ class Document * * @return <code>false/code> if the analyse failed. */ - bool analyse(QPtrList<Element>* elt); + bool analyse(TQPtrList<Element>* elt); /** * Analyse and get all information in a documentclass command. @@ -69,7 +69,7 @@ class Document * @param tree The tree to copy. * @param indent The tabulation to indent the XML tree. */ - void serialize(KoStore* store, QDomDocument tree); + void serialize(KoStore* store, TQDomDocument tree); private: Body _body; diff --git a/filters/kword/latex/import/generator/kwordgenerator.cc b/filters/kword/latex/import/generator/kwordgenerator.cc index 208029ad..0b0e7aa3 100644 --- a/filters/kword/latex/import/generator/kwordgenerator.cc +++ b/filters/kword/latex/import/generator/kwordgenerator.cc @@ -19,9 +19,9 @@ #include <kdebug.h> #include <ktempfile.h> -#include <qfile.h> +#include <tqfile.h> -#include <qdom.h> +#include <tqdom.h> #include "kwordgenerator.h" #include "document.h" @@ -30,12 +30,12 @@ void KwordGenerator::convert(KoStore* out) { //KTempFile temp("lateximport", ".kwd"); //temp.setAutoDelete(true); - //QFile* tempFile = temp.file(); + //TQFile* tempFile = temp.file(); /*if(out->open("root")) {*/ Document document; document.analyse(_root); - //QTextStream output(tempFile); + //TQTextStream output(tempFile); document.generate(out); //tempFile->close(); //out->write(tempFile->readAll()); diff --git a/filters/kword/latex/import/generator/kwordgenerator.h b/filters/kword/latex/import/generator/kwordgenerator.h index 534a7b56..68d6fb51 100644 --- a/filters/kword/latex/import/generator/kwordgenerator.h +++ b/filters/kword/latex/import/generator/kwordgenerator.h @@ -27,7 +27,7 @@ class KwordGenerator { - QPtrList<Element>* _root; + TQPtrList<Element>* _root; //Document _doc; public: @@ -35,7 +35,7 @@ class KwordGenerator { } - KwordGenerator(QPtrList<Element>* root) + KwordGenerator(TQPtrList<Element>* root) { _root = root; } diff --git a/filters/kword/latex/import/generator/latex.cc b/filters/kword/latex/import/generator/latex.cc index 639845b8..22c773d8 100644 --- a/filters/kword/latex/import/generator/latex.cc +++ b/filters/kword/latex/import/generator/latex.cc @@ -21,7 +21,7 @@ Latex* Latex::_instance = 0; -Element* Latex::getEnv(QPtrList<Element>* root, const char* name) +Element* Latex::getEnv(TQPtrList<Element>* root, const char* name) { Element* elt; for ( elt = root->first(); elt; elt = root->next() ) @@ -32,7 +32,7 @@ Element* Latex::getEnv(QPtrList<Element>* root, const char* name) return 0; } -Element* Latex::getCommand(QPtrList<Element>* root, const char* name) +Element* Latex::getCommand(TQPtrList<Element>* root, const char* name) { Element* elt; for ( elt = root->first(); elt; elt = root->next() ) diff --git a/filters/kword/latex/import/generator/latex.h b/filters/kword/latex/import/generator/latex.h index b8a1774a..ae86c98a 100644 --- a/filters/kword/latex/import/generator/latex.h +++ b/filters/kword/latex/import/generator/latex.h @@ -19,7 +19,7 @@ #ifndef __LATEX_IMPORT_LATEXUTILS__ #define __LATEX_IMPORT_LATEXUTILS__ -#include <qptrlist.h> +#include <tqptrlist.h> class Element; @@ -34,8 +34,8 @@ class Latex return _instance; } - Element* getEnv(QPtrList<Element>* root, const char* name); - Element* getCommand(QPtrList<Element>* root, const char* name); + Element* getEnv(TQPtrList<Element>* root, const char* name); + Element* getCommand(TQPtrList<Element>* root, const char* name); private: static Latex* _instance; diff --git a/filters/kword/latex/import/generator/paragraph.cc b/filters/kword/latex/import/generator/paragraph.cc index c574ab22..c25ab994 100644 --- a/filters/kword/latex/import/generator/paragraph.cc +++ b/filters/kword/latex/import/generator/paragraph.cc @@ -19,17 +19,17 @@ #include "paragraph.h" #include <element.h> -#include <qdom.h> +#include <tqdom.h> -bool Paragraph::analyse(QPtrList<Element>* body) +bool Paragraph::analyse(TQPtrList<Element>* body) { } -bool Paragraph::generate(QDomElement& paragraphNode, QDomDocument& doc) +bool Paragraph::generate(TQDomElement& paragraphNode, TQDomDocument& doc) { /* FRAMESET */ - QDomElement textNode = doc.createElement("TEXT"); + TQDomElement textNode = doc.createElement("TEXT"); /* required attributes */ /*framesetNode.setAttribute("frameType", TEXTFRAME); @@ -38,7 +38,7 @@ bool Paragraph::generate(QDomElement& paragraphNode, QDomDocument& doc) paragraphNode.appendChild(textNode); /* FRAME */ - //QDomElement frameNode = doc.createElement("FRAME"); + //TQDomElement frameNode = doc.createElement("FRAME"); /* required attributes */ /*frameNode.setAttribute("newFrameBehavior", "0"); diff --git a/filters/kword/latex/import/generator/paragraph.h b/filters/kword/latex/import/generator/paragraph.h index 9b32cf8b..6db1b4ed 100644 --- a/filters/kword/latex/import/generator/paragraph.h +++ b/filters/kword/latex/import/generator/paragraph.h @@ -20,11 +20,11 @@ #ifndef __KWORD_LATEX_IMPORT_PARAGRAPH_H__ #define __KWORD_LATEX_IMPORT_PARAGRAPH_H__ -#include <qptrlist.h> +#include <tqptrlist.h> class Element; -class QDomDocument; -class QDomElement; +class TQDomDocument; +class TQDomElement; //class TextZone; /** @@ -47,7 +47,7 @@ class Paragraph * * @return <code>false/code> if the analyse failed. */ - bool analyse(QPtrList<Element>* elt); + bool analyse(TQPtrList<Element>* elt); /** * Generate a kword document. @@ -56,11 +56,11 @@ class Paragraph * * @return <code>true</code> if the generation success. */ - bool generate(QDomElement& paragraph, QDomDocument& doc); + bool generate(TQDomElement& paragraph, TQDomDocument& doc); private: /** A paragraph is a list of text zones. */ - //QPtrList<TextZone> _textzones; + //TQPtrList<TextZone> _textzones; }; #endif /* __KWORD_LATEX_IMPORT_PARAGRAPH_H__ */ diff --git a/filters/kword/latex/import/lateximport.cc b/filters/kword/latex/import/lateximport.cc index 6986bc06..f644910a 100644 --- a/filters/kword/latex/import/lateximport.cc +++ b/filters/kword/latex/import/lateximport.cc @@ -24,25 +24,25 @@ #include <kgenericfactory.h> #include <kglobal.h> #include <klocale.h> -#include <qtextcodec.h> +#include <tqtextcodec.h> #include "lateximportdia.h" typedef KGenericFactory<LATEXImport, KoFilter> LATEXImportFactory; K_EXPORT_COMPONENT_FACTORY( libkwordlateximport, LATEXImportFactory( "kofficefilters" ) ) -LATEXImport::LATEXImport(KoFilter *, const char *, const QStringList&) : +LATEXImport::LATEXImport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } -KoFilter::ConversionStatus LATEXImport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus LATEXImport::convert( const TQCString& from, const TQCString& to ) { - QString config; + TQString config; if(from != "text/x-tex" || to != "application/x-kword") return KoFilter::NotImplemented; - KoStore* out = KoStore::createStore(QString(m_chain->outputFile()), + KoStore* out = KoStore::createStore(TQString(m_chain->outputFile()), KoStore::Write, "application/x-kword"); /*if(!out || !out->open("root")) { kdError(30503) << "Unable to open output file!" << endl; diff --git a/filters/kword/latex/import/lateximport.h b/filters/kword/latex/import/lateximport.h index 6186120a..a3cba4d0 100644 --- a/filters/kword/latex/import/lateximport.h +++ b/filters/kword/latex/import/lateximport.h @@ -20,10 +20,10 @@ #ifndef __LATEXIMPORT_H__ #define __LATEXIMPORT_H__ -#include <qstring.h> -#include <qtextstream.h> -#include <qfile.h> -#include <qobject.h> +#include <tqstring.h> +#include <tqtextstream.h> +#include <tqfile.h> +#include <tqobject.h> #include <KoFilter.h> #include <KoStore.h> @@ -32,12 +32,13 @@ class LATEXImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - LATEXImport(KoFilter *parent, const char *name, const QStringList&); + LATEXImport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~LATEXImport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; #endif /* __LATEXIMPORT_H__ */ diff --git a/filters/kword/latex/import/lateximportdia.cc b/filters/kword/latex/import/lateximportdia.cc index 09fd39d0..c6c28a77 100644 --- a/filters/kword/latex/import/lateximportdia.cc +++ b/filters/kword/latex/import/lateximportdia.cc @@ -37,15 +37,15 @@ #include <lateximportdia.moc> #include <dcopclient.h> #include <ktempfile.h> -#include <qptrlist.h> +#include <tqptrlist.h> #include "latexparser.h" #include "config.h" #include "generator/kwordgenerator.h" -LATEXImportDia::LATEXImportDia(KoStore* out, QWidget *parent, const char *name) : - KDialogBase(parent, name, true, i18n("Latex Import Filter Parameters"), +LATEXImportDia::LATEXImportDia(KoStore* out, TQWidget *tqparent, const char *name) : + KDialogBase(tqparent, name, true, i18n("Latex Import Filter Parameters"), Ok|Cancel), DCOPObject("FilterConfigDia"), _out(out) { @@ -62,19 +62,19 @@ LATEXImportDia::LATEXImportDia(KoStore* out, QWidget *parent, const char *name) void LATEXImportDia::createDialog() { resize(size()); - QWidget *page = new QWidget( this ); + TQWidget *page = new TQWidget( this ); setMainWidget(page); - QBoxLayout *mainLayout = new QVBoxLayout(page, KDialog::marginHint(), KDialog::spacingHint()); - styleBox = new QVButtonGroup(i18n("Document Style"), page); + TQBoxLayout *mainLayout = new TQVBoxLayout(page, KDialog::marginHint(), KDialog::spacingHint()); + styleBox = new TQVButtonGroup(i18n("Document Style"), page); mainLayout->addWidget(styleBox); /* First part */ - QBoxLayout *styleLayout = new QVBoxLayout(page); + TQBoxLayout *styleLayout = new TQVBoxLayout(page); - latexStyleRBtn = new QRadioButton(i18n("Latex style"), styleBox); + latexStyleRBtn = new TQRadioButton(i18n("Latex style"), styleBox); styleLayout->addWidget(latexStyleRBtn); - kwordStyleRBtn = new QRadioButton(i18n("KWord style"), styleBox); + kwordStyleRBtn = new TQRadioButton(i18n("KWord style"), styleBox); styleLayout->addWidget(kwordStyleRBtn); /*typeLabel = new ... @@ -87,15 +87,15 @@ void LATEXImportDia::createDialog() styleLayout->activate(); /* Second part */ - langBox = new QVButtonGroup(i18n("Language"), page); + langBox = new TQVButtonGroup(i18n("Language"), page); mainLayout->addWidget(langBox); - QBoxLayout *langLayout = new QVBoxLayout(langBox); + TQBoxLayout *langLayout = new TQVBoxLayout(langBox); - unicodeRBtn = new QRadioButton(i18n("Unicode"), langBox); - langLayout->addWidget(unicodeRBtn); + tqunicodeRBtn = new TQRadioButton(i18n("Unicode"), langBox); + langLayout->addWidget(tqunicodeRBtn); - latin1RBtn = new QRadioButton(i18n("latin1"), langBox); + latin1RBtn = new TQRadioButton(i18n("latin1"), langBox); langLayout->addWidget(latin1RBtn); /*babelCheckBox = new ... @@ -109,22 +109,22 @@ void LATEXImportDia::createDialog() langLayout->activate(); /* Third part */ - docBox = new QVButtonGroup(i18n("Document Type"), page); + docBox = new TQVButtonGroup(i18n("Document Type"), page); mainLayout->addWidget(docBox); - QBoxLayout *docLayout = new QVBoxLayout(docBox); + TQBoxLayout *docLayout = new TQVBoxLayout(docBox); - newDocRBtn = new QRadioButton(i18n("New document"), docBox); + newDocRBtn = new TQRadioButton(i18n("New document"), docBox); docLayout->addWidget(newDocRBtn); - embededRBtn = new QRadioButton(i18n("Embedded document"), docBox); + embededRBtn = new TQRadioButton(i18n("Embedded document"), docBox); docLayout->addWidget(embededRBtn); docBox->setExclusive(true); docBox->setButton(0); /* NEW DOC IS THE DEFAULT. */ docLayout->activate(); - /* Display the main layout */ + /* Display the main tqlayout */ mainLayout->addStretch(5); mainLayout->activate(); } @@ -138,7 +138,7 @@ void LATEXImportDia::state() else if(embededRBtn == docBox->selected()) config.setType(TYPE_EMBEDED); - if(unicodeRBtn == langBox->selected()) + if(tqunicodeRBtn == langBox->selected()) config.setEncoding(ENC_UNICODE); else if(latin1RBtn == langBox->selected()) config.setEncoding(ENC_LATIN1); @@ -155,7 +155,7 @@ void LATEXImportDia::slotOk() state(); kdDebug(30522) << "LATEX FILTER --> BEGIN" << endl; LatexParser parser(_fileIn); - QPtrList<Element>* root = parser.parse(); + TQPtrList<Element>* root = parser.parse(); kdDebug(30522) << "---------- generate file -------------" << endl; kdDebug(30522) << "command: " << root->count() << endl; Element* elt; diff --git a/filters/kword/latex/import/lateximportdia.h b/filters/kword/latex/import/lateximportdia.h index 58819a51..4f4c8c39 100644 --- a/filters/kword/latex/import/lateximportdia.h +++ b/filters/kword/latex/import/lateximportdia.h @@ -35,11 +35,11 @@ #ifndef __LATEXIMPORTDIA_H__ #define __LATEXIMPORTDIA_H__ -#include <qwidget.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qradiobutton.h> -#include <qvbuttongroup.h> +#include <tqwidget.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqradiobutton.h> +#include <tqvbuttongroup.h> #include <klocale.h> #include <dcopobject.h> @@ -53,26 +53,27 @@ class LATEXImportDia : public KDialogBase, public DCOPObject K_DCOP Q_OBJECT + TQ_OBJECT - QString _fileIn; - QByteArray _arrayIn; + TQString _fileIn; + TQByteArray _arrayIn; KoStore* _out; /* the zipped file containing all pictures, part, ... */ public: - LATEXImportDia(KoStore*, QWidget *parent=0L, const char *name=0L); + LATEXImportDia(KoStore*, TQWidget *tqparent=0L, const char *name=0L); virtual ~LATEXImportDia() {} void createDialog(); virtual void state(); - void setInputFile(QString file) { _fileIn = file; } - //void setOutputFile(QString file) { _fileOut = file; } + void setInputFile(TQString file) { _fileIn = file; } + //void setOutputFile(TQString file) { _fileOut = file; } private: - QVButtonGroup* styleBox, *langBox, *docBox; - QRadioButton* latexStyleRBtn, *kwordStyleRBtn; /* Document style */ - QRadioButton* unicodeRBtn, *latin1RBtn; /* Language */ - QRadioButton* newDocRBtn, *embededRBtn; /* Latex file */ + TQVButtonGroup* styleBox, *langBox, *docBox; + TQRadioButton* latexStyleRBtn, *kwordStyleRBtn; /* Document style */ + TQRadioButton* tqunicodeRBtn, *latin1RBtn; /* Language */ + TQRadioButton* newDocRBtn, *embededRBtn; /* Latex file */ k_dcop: void useDefaultConfig() { slotOk(); } diff --git a/filters/kword/latex/import/parser/command.cc b/filters/kword/latex/import/parser/command.cc index bd00141a..9b7d1979 100644 --- a/filters/kword/latex/import/parser/command.cc +++ b/filters/kword/latex/import/parser/command.cc @@ -37,7 +37,7 @@ Command::Command(const char* name) _name = _name.stripWhiteSpace(); } -Command::Command(const char* name, QPtrList<QPtrList<Element> >* groups) +Command::Command(const char* name, TQPtrList<TQPtrList<Element> >* groups) { setType(Element::LATEX_COMMAND); _options.setAutoDelete(true); @@ -48,8 +48,8 @@ Command::Command(const char* name, QPtrList<QPtrList<Element> >* groups) _name = _name.stripWhiteSpace(); } -Command::Command(const char* name, QPtrList<QPtrList<Param> >* params, - QPtrList<QPtrList<Element> >* groups) +Command::Command(const char* name, TQPtrList<TQPtrList<Param> >* params, + TQPtrList<TQPtrList<Element> >* groups) { setType(Element::LATEX_COMMAND); _options.setAutoDelete(true); @@ -62,8 +62,8 @@ Command::Command(const char* name, QPtrList<QPtrList<Param> >* params, _name = _name.stripWhiteSpace(); } -Command::Command(const char* name, QPtrList<QPtrList<Param> >* params, QPtrList<Param>* options, - QPtrList<QPtrList<Element> >* groups) +Command::Command(const char* name, TQPtrList<TQPtrList<Param> >* params, TQPtrList<Param>* options, + TQPtrList<TQPtrList<Element> >* groups) { setType(Element::LATEX_COMMAND); _options.setAutoDelete(true); @@ -85,24 +85,24 @@ Command::~Command() void Command::addParam(const char* ) { - /*QString test = QString(name); - QString key = test.left(test.find("=")); - QString value = test.right(test.find("=")); + /*TQString test = TQString(name); + TQString key = test.left(test.tqfind("=")); + TQString value = test.right(test.tqfind("=")); addParam(key, value);*/ } void Command::addOption(const char* ) { - /*QString test = QString(name); - QString key = test.left(test.find("=")); - QString value = test.right(test.find("=")); + /*TQString test = TQString(name); + TQString key = test.left(test.tqfind("=")); + TQString value = test.right(test.tqfind("=")); addOption(key, value);*/ } void Command::print(int tab) { cout << _name.latin1(); - QPtrList<Param>* params; + TQPtrList<Param>* params; for ( params = _params.first(); params; params = _params.next() ) { cout << "["; @@ -128,7 +128,7 @@ void Command::print(int tab) cout << "]"; } - QPtrList<Element>* group; + TQPtrList<Element>* group; for(group = _elements.first(); group; group = _elements.next() ) { cout << " {"; diff --git a/filters/kword/latex/import/parser/command.h b/filters/kword/latex/import/parser/command.h index f7079d37..41f44ed6 100644 --- a/filters/kword/latex/import/parser/command.h +++ b/filters/kword/latex/import/parser/command.h @@ -24,9 +24,9 @@ //#include "option.h" #include "element.h" -#include <qstring.h> -#include <qmap.h> -#include <qptrlist.h> +#include <tqstring.h> +#include <tqmap.h> +#include <tqptrlist.h> class Command: public Element { @@ -40,50 +40,50 @@ class Command: public Element /** * Create a command which match to \\renewcommand{\\headrulewidth}{opt} */ - Command(const char* name, QPtrList<QPtrList<Element> >* groups); + Command(const char* name, TQPtrList<TQPtrList<Element> >* groups); /** * Create a command which match to * \\put(1,1){\\circle[}}. */ - Command(const char* name, QPtrList<QPtrList<Param> >* options, - QPtrList<QPtrList<Element> >* groups); + Command(const char* name, TQPtrList<TQPtrList<Param> >* options, + TQPtrList<TQPtrList<Element> >* groups); /** * Create a command which match to \\parpic(3cm,3cm)[f]{text} or * \\documentclass[11pt]{guidepra} */ - Command(const char* name, QPtrList<QPtrList<Param> >* params, QPtrList<Param>* options, QPtrList<QPtrList<Element> >* groups); + Command(const char* name, TQPtrList<TQPtrList<Param> >* params, TQPtrList<Param>* options, TQPtrList<TQPtrList<Element> >* groups); ~Command(); - QString getName() const { return _name; } + TQString getName() const { return _name; } - QPtrList<QPtrList<Param> > getParams() const { return _params; } + TQPtrList<TQPtrList<Param> > getParams() const { return _params; } - QPtrList<Param> getOptions() const { return _options; } + TQPtrList<Param> getOptions() const { return _options; } - QPtrList<QPtrList<Element> > getChildren() const { return _elements; } + TQPtrList<TQPtrList<Element> > getChildren() const { return _elements; } void setName(const char* name) { _name = name; } void addParam(const char* param); - //void addParam(QString key, QString value) { _params.append(new Param(key, value)); } - //void addParams(QPtrList<Param> params) { _params = params; } - void addGroups(QPtrList<QPtrList<Element> >* elts) { _elements = *elts; } + //void addParam(TQString key, TQString value) { _params.append(new Param(key, value)); } + //void addParams(TQPtrList<Param> params) { _params = params; } + void addGroups(TQPtrList<TQPtrList<Element> >* elts) { _elements = *elts; } void addOption(const char* option); - void addOption(QString key, QString value) { _options.append(new Param(key, value)); } + void addOption(TQString key, TQString value) { _options.append(new Param(key, value)); } - void addChild(QPtrList<Element>* elt) { _elements.append(elt); } + void addChild(TQPtrList<Element>* elt) { _elements.append(elt); } /* useful method */ void print(int tab = 0); private: - QString _name; - QPtrList<QPtrList<Param> > _params; - QPtrList<Param> _options; - QPtrList<QPtrList<Element> > _elements; + TQString _name; + TQPtrList<TQPtrList<Param> > _params; + TQPtrList<Param> _options; + TQPtrList<TQPtrList<Element> > _elements; }; diff --git a/filters/kword/latex/import/parser/comment.h b/filters/kword/latex/import/parser/comment.h index eeccf963..dfaf08e2 100644 --- a/filters/kword/latex/import/parser/comment.h +++ b/filters/kword/latex/import/parser/comment.h @@ -22,7 +22,7 @@ #include "element.h" -#include <qstring.h> +#include <tqstring.h> class Comment: public Element { @@ -32,14 +32,14 @@ class Comment: public Element Comment(const char* comment); ~Comment(); - QString getComment() const { return _comment; } + TQString getComment() const { return _comment; } - void setComment(QString comment) { _comment = comment; } + void setComment(TQString comment) { _comment = comment; } void print(int tab = 0); private: - QString _comment; + TQString _comment; }; diff --git a/filters/kword/latex/import/parser/element.h b/filters/kword/latex/import/parser/element.h index 43b1cbc0..bec4975b 100644 --- a/filters/kword/latex/import/parser/element.h +++ b/filters/kword/latex/import/parser/element.h @@ -20,7 +20,7 @@ #ifndef __LATEXPARSER_ELEMENT_H__ #define __LATEXPARSER_ELEMENT_H__ -#include <qstring.h> +#include <tqstring.h> class Element { @@ -40,14 +40,14 @@ class Element /* getters */ EType getType() const { return _type; } - virtual QString getName() const { return ""; } + virtual TQString getName() const { return ""; } /* setters */ void setType(EType t) { _type = t; } /* useful methods */ - //void addParams(QPtrList<Param> params) { } - //void addGroups(QPtrList<QPtrList<Element> >* elts) { } + //void addParams(TQPtrList<Param> params) { } + //void addGroups(TQPtrList<TQPtrList<Element> >* elts) { } virtual void print(int tab = 0) = 0; private: diff --git a/filters/kword/latex/import/parser/env.cc b/filters/kword/latex/import/parser/env.cc index df5637a6..a490d328 100644 --- a/filters/kword/latex/import/parser/env.cc +++ b/filters/kword/latex/import/parser/env.cc @@ -29,15 +29,15 @@ Env::Env(const char* command) { setType(Element::LATEX_ENV); /* Parse the command name */ - QString pattern = QString(command); - int pos = pattern.find("{"); + TQString pattern = TQString(command); + int pos = pattern.tqfind("{"); /* Remove \begin{ at the begining and the } at the end. */ if(pos != -1) _name = pattern.mid(pos + 1, pattern.length() - pos - 2); _name = _name.stripWhiteSpace(); } -Env::Env(QString name) : _name(name) +Env::Env(TQString name) : _name(name) { setType(Element::LATEX_ENV); _name = _name.stripWhiteSpace(); @@ -47,10 +47,10 @@ Env::~Env() { } -void Env::setChildren(QPtrList<Element>* children) +void Env::setChildren(TQPtrList<Element>* tqchildren) { - if(children != NULL) - _children = *children; + if(tqchildren != NULL) + _tqchildren = *tqchildren; } void Env::print(int tab) @@ -58,7 +58,7 @@ void Env::print(int tab) cout << "ENV " << getName().latin1() << "{" << endl; Element* elt; - for ( elt = _children.first(); elt; elt = _children.next() ) + for ( elt = _tqchildren.first(); elt; elt = _tqchildren.next() ) { elt->print(tab); } diff --git a/filters/kword/latex/import/parser/env.h b/filters/kword/latex/import/parser/env.h index eb36ef9d..cef56b29 100644 --- a/filters/kword/latex/import/parser/env.h +++ b/filters/kword/latex/import/parser/env.h @@ -22,27 +22,27 @@ #include "element.h" -#include <qstring.h> -#include <qptrlist.h> +#include <tqstring.h> +#include <tqptrlist.h> class Env: public Element { - QPtrList<Element> _children; - QString _name; + TQPtrList<Element> _tqchildren; + TQString _name; public: Env(); Env(const char*); - Env(QString); + Env(TQString); ~Env(); - QString getName() const { return _name; } + TQString getName() const { return _name; } - void setName(QString name) { _name = name; } - void setChildren(QPtrList<Element>*); + void setName(TQString name) { _name = name; } + void setChildren(TQPtrList<Element>*); void print(int tab = 0); }; diff --git a/filters/kword/latex/import/parser/group.h b/filters/kword/latex/import/parser/group.h index af50cf6d..891305f2 100644 --- a/filters/kword/latex/import/parser/group.h +++ b/filters/kword/latex/import/parser/group.h @@ -2,11 +2,11 @@ #ifndef __LATEXPARSER_GROUP_H__ #define __LATEXPARSER_GROUP_H__ -#include <qptrlist.h> +#include <tqptrlist.h> #include "element.h" -class Group: public Element, public QPtrList<Element> +class Group: public Element, public TQPtrList<Element> { public: Group(); diff --git a/filters/kword/latex/import/parser/latexparser.cc b/filters/kword/latex/import/parser/latexparser.cc index c4f8b6f9..a5b3a822 100644 --- a/filters/kword/latex/import/parser/latexparser.cc +++ b/filters/kword/latex/import/parser/latexparser.cc @@ -5,14 +5,14 @@ #include <iostream.h> //extern void yylex(); -extern QPtrList<Element>* _root; -extern bool texparse(QString); +extern TQPtrList<Element>* _root; +extern bool texparse(TQString); LatexParser::LatexParser() { } -LatexParser::LatexParser(QString fileIn) +LatexParser::LatexParser(TQString fileIn) { _filename= fileIn; } @@ -21,7 +21,7 @@ LatexParser::~LatexParser() { } -QPtrList<Element>* LatexParser::parse() +TQPtrList<Element>* LatexParser::parse() { texparse(_filename); return _root; diff --git a/filters/kword/latex/import/parser/latexparser.h b/filters/kword/latex/import/parser/latexparser.h index 4768b537..3a584c8d 100644 --- a/filters/kword/latex/import/parser/latexparser.h +++ b/filters/kword/latex/import/parser/latexparser.h @@ -22,27 +22,27 @@ #include "element.h" -#include <qstring.h> -#include <qptrlist.h> +#include <tqstring.h> +#include <tqptrlist.h> class LatexParser { public: LatexParser(); - LatexParser(QString fileIn); + LatexParser(TQString fileIn); ~LatexParser(); - QString getInputFile() const { return _filename; } + TQString getInputFile() const { return _filename; } - void setInputFile(QString filename) { _filename = filename; } + void setInputFile(TQString filename) { _filename = filename; } - QPtrList<Element>* parse(); + TQPtrList<Element>* parse(); void convert(); private: - QString _filename; + TQString _filename; }; diff --git a/filters/kword/latex/import/parser/option.h b/filters/kword/latex/import/parser/option.h index 5f93336d..a1725f8c 100644 --- a/filters/kword/latex/import/parser/option.h +++ b/filters/kword/latex/import/parser/option.h @@ -2,7 +2,7 @@ #ifndef __LATEXPARSER_OPTION_H__ #define __LATEXPARSER_OPTION_H__ -#include <qstring.h> +#include <tqstring.h> class Option { @@ -11,17 +11,17 @@ class Option ~Option() { } - QString getKey() const { return _key; } + TQString getKey() const { return _key; } - QString getValue() const { return _value; } + TQString getValue() const { return _value; } - void setKey(QString key) { _key = key; } + void setKey(TQString key) { _key = key; } - void setValue(QString value) { _value = value; } + void setValue(TQString value) { _value = value; } private: - QString _key; - QString _value; + TQString _key; + TQString _value; }; #endif /* __LATEXPARSER_OPTION_H__ */ diff --git a/filters/kword/latex/import/parser/param.cc b/filters/kword/latex/import/parser/param.cc index c7311c67..66bb7fff 100644 --- a/filters/kword/latex/import/parser/param.cc +++ b/filters/kword/latex/import/parser/param.cc @@ -33,7 +33,7 @@ Param::Param(const char* key, const char* value) _value = _value.stripWhiteSpace(); } -Param::Param(QString key, QString value) +Param::Param(TQString key, TQString value) { _key = key; _key = _key.stripWhiteSpace(); diff --git a/filters/kword/latex/import/parser/param.h b/filters/kword/latex/import/parser/param.h index 95eb5ee0..3555e2f1 100644 --- a/filters/kword/latex/import/parser/param.h +++ b/filters/kword/latex/import/parser/param.h @@ -20,30 +20,30 @@ #ifndef __LATEXPARSER_PARAM_H__ #define __LATEXPARSER_PARAM_H__ -#include <qstring.h> +#include <tqstring.h> class Param { public: Param(); Param(const char* key, const char* value); - Param(QString key, QString value); + Param(TQString key, TQString value); virtual ~Param(); - QString getKey() const { return _key; } + TQString getKey() const { return _key; } - QString getValue() const { return _value; } + TQString getValue() const { return _value; } - void setKey(QString key) { _key = key; } + void setKey(TQString key) { _key = key; } - void setValue(QString value) { _value = value; } + void setValue(TQString value) { _value = value; } void print(int tab = 0); private: - QString _key; - QString _value; + TQString _key; + TQString _value; }; #endif /* __LATEXPARSER_PARAM_H__ */ diff --git a/filters/kword/latex/import/parser/stack.h b/filters/kword/latex/import/parser/stack.h index c73f8dd7..2b0bbf7e 100644 --- a/filters/kword/latex/import/parser/stack.h +++ b/filters/kword/latex/import/parser/stack.h @@ -22,8 +22,8 @@ -#include <qptrlist.h> -#include <qptrstack.h> +#include <tqptrlist.h> +#include <tqptrstack.h> #define GROUP_STACK_SIZE 10 @@ -37,6 +37,6 @@ static int stack_size = GROUP_STACK_SIZE; static int stackp = 0; static Element * _currentElement = 0; static Group* _tree = 0; -static QPtrStack<Element> _stackElement;*/ +static TQPtrStack<Element> _stackElement;*/ #endif /* __STACK_H__ */ diff --git a/filters/kword/latex/import/parser/text.h b/filters/kword/latex/import/parser/text.h index 880dcd22..504b3038 100644 --- a/filters/kword/latex/import/parser/text.h +++ b/filters/kword/latex/import/parser/text.h @@ -22,7 +22,7 @@ #include "element.h" -#include <qstring.h> +#include <tqstring.h> class Text: public Element { @@ -32,14 +32,14 @@ class Text: public Element ~Text(); - QString getText() const { return _text; } + TQString getText() const { return _text; } - void setText(QString text) { _text = text; } + void setText(TQString text) { _text = text; } void print(int tab = 0); private: - QString _text; + TQString _text; }; diff --git a/filters/kword/latex/status.html b/filters/kword/latex/status.html index 6f06bdb3..ea2a527c 100644 --- a/filters/kword/latex/status.html +++ b/filters/kword/latex/status.html @@ -131,14 +131,14 @@ <B>VERSION 1:</B> <table BORDER="0" WIDTH="100%"> <tr><td>text with accent</td> <td>DONE</td></tr> -<tr><td>text with special characters</td> <td>A LOT OF SPECIAL CHARS SUPPORTED for latin1 (all for unicode)!</td></tr> -<tr><td>layout</td> <td>DONE</td></tr> +<tr><td>text with special characters</td> <td>A LOT OF SPECIAL CHARS SUPPORTED for latin1 (all for tqunicode)!</td></tr> +<tr><td>tqlayout</td> <td>DONE</td></tr> <tr><td>title</td> <td>DONE</td></tr> <tr><td>list</td> <td>DONE</td></tr> <tr><td>paper</td> <td>DONE</td></tr> <tr><td>footnote, head</td> <td>DONE (still a little bug for first foot/header and a line is added)</td></tr> <tr><td>comments with kdoc</td> <td>STARTED</td></tr> -<tr><td>unicode support</td> <td>DONE (omega package)</td></tr> +<tr><td>tqunicode support</td> <td>DONE (omega package)</td></tr> <tr><td>break (line, page)</td> <td>STARTED</td></tr> <tr><td>indent list</td> <td></td></tr> </table> @@ -209,7 +209,7 @@ <ul> <li>features <ul> - <li>support of unicode with omega</li> + <li>support of tqunicode with omega</li> </ul> </li> </ul> @@ -264,7 +264,7 @@ <li>features <ul> <li>generate embedable file</li> - <li>new xml parser = QDom</li> + <li>new xml parser = TQDom</li> </ul> </li> </ul> @@ -281,7 +281,7 @@ </ul> </li> <li>clean code generated</li> - <li>use QList for all lists</li> + <li>use TQList for all lists</li> <li>improve the table generation. Now it is pretty good.</li> <li>new features <ul> diff --git a/filters/kword/libexport/KWEFBaseWorker.cc b/filters/kword/libexport/KWEFBaseWorker.cc index 96de938b..d3d41ff3 100644 --- a/filters/kword/libexport/KWEFBaseWorker.cc +++ b/filters/kword/libexport/KWEFBaseWorker.cc @@ -18,8 +18,8 @@ * Boston, MA 02110-1301, USA. */ -#include <qbuffer.h> -#include <qimage.h> +#include <tqbuffer.h> +#include <tqimage.h> #include <kdebug.h> @@ -44,7 +44,7 @@ bool KWEFBaseWorker::doAbortFile(void) return doCloseFile(); } -bool KWEFBaseWorker::doFullDocument (const QValueList<ParaData>& paraList) +bool KWEFBaseWorker::doFullDocument (const TQValueList<ParaData>& paraList) { if (!doOpenTextFrameSet()) return false; @@ -56,19 +56,19 @@ bool KWEFBaseWorker::doFullDocument (const QValueList<ParaData>& paraList) return true; } -bool KWEFBaseWorker::doFullAllParagraphs (const QValueList<ParaData>& paraList) +bool KWEFBaseWorker::doFullAllParagraphs (const TQValueList<ParaData>& paraList) { - QValueList<ParaData>::ConstIterator it; - QValueList<ParaData>::ConstIterator end(paraList.end()); + TQValueList<ParaData>::ConstIterator it; + TQValueList<ParaData>::ConstIterator end(paraList.end()); for (it=paraList.begin();it!=end;++it) { - if (!doFullParagraph((*it).text,(*it).layout,(*it).formattingList)) + if (!doFullParagraph((*it).text,(*it).tqlayout,(*it).formattingList)) return false; } return true; } -bool KWEFBaseWorker::loadSubFile(const QString& fileName, QByteArray& array) const +bool KWEFBaseWorker::loadSubFile(const TQString& fileName, TQByteArray& array) const // return value: // true if the file is not empty // false if the file is empty or if an error occurred @@ -85,7 +85,7 @@ bool KWEFBaseWorker::loadSubFile(const QString& fileName, QByteArray& array) con return flag; } -QIODevice* KWEFBaseWorker::getSubFileDevice(const QString& fileName) const +TQIODevice* KWEFBaseWorker::getSubFileDevice(const TQString& fileName) const { if (!m_kwordLeader) { @@ -95,13 +95,13 @@ QIODevice* KWEFBaseWorker::getSubFileDevice(const QString& fileName) const return m_kwordLeader->getSubFileDevice(fileName); } -QImage KWEFBaseWorker::loadAndConvertToImage(const QString& strName, const QString& inExtension) const +TQImage KWEFBaseWorker::loadAndConvertToImage(const TQString& strName, const TQString& inExtension) const { - QIODevice* io=getSubFileDevice(strName); + TQIODevice* io=getSubFileDevice(strName); if (!io) { // NO message error, as there must be already one - return QImage(); + return TQImage(); } kdDebug(30508) << "Picture " << strName << " has size: " << io->size() << endl; @@ -110,15 +110,15 @@ QImage KWEFBaseWorker::loadAndConvertToImage(const QString& strName, const QStri if (!picture.load(io, inExtension)) // we do not care about KoPictureKey { kdWarning(30508) << "Could not read picture: " << strName << " (KWEFBaseWorker::loadAndConvertToImage)" << endl; - return QImage(); + return TQImage(); } return picture.generateImage(picture.getOriginalSize()); // ### TODO: KoPicture::getOriginalSize is bad for cliparts } -bool KWEFBaseWorker::loadAndConvertToImage(const QString& strName, const QString& inExtension, const QString& outExtension, QByteArray& image) const +bool KWEFBaseWorker::loadAndConvertToImage(const TQString& strName, const TQString& inExtension, const TQString& outExtension, TQByteArray& image) const { - QImage qimage(loadAndConvertToImage(strName,inExtension)); + TQImage qimage(loadAndConvertToImage(strName,inExtension)); if (qimage.isNull()) { @@ -126,17 +126,17 @@ bool KWEFBaseWorker::loadAndConvertToImage(const QString& strName, const QString return false; } - QImageIO imageIO; + TQImageIO imageIO; imageIO.setImage(qimage); - QBuffer buffer(image); // A QBuffer is a QIODevice + TQBuffer buffer(image); // A TQBuffer is a TQIODevice if (!buffer.open(IO_WriteOnly)) { kdWarning(30508) << "Could not open buffer! (KWEFBaseWorker::loadAndConvertToImage)" << endl; return false; } - imageIO.setIODevice(&buffer); + imageIO.setIODevice(TQT_TQIODEVICE(&buffer)); imageIO.setFormat(outExtension.utf8()); if (!imageIO.write()) @@ -161,13 +161,13 @@ bool KWEFBaseWorker::loadAndConvertToImage(const QString& strName, const QString return false;\ } -DO_FALSE_DEFINITION (doOpenFile (const QString& , const QString& )) +DO_FALSE_DEFINITION (doOpenFile (const TQString& , const TQString& )) DO_FALSE_DEFINITION (doCloseFile (void)) DO_FALSE_DEFINITION (doOpenDocument (void)) DO_FALSE_DEFINITION (doCloseDocument (void)) // The following is not generated by the leader -DO_FALSE_DEFINITION (doFullParagraph(const QString&, const LayoutData&, const ValueListFormatData&)) +DO_FALSE_DEFINITION (doFullParagraph(const TQString&, const LayoutData&, const ValueListFormatData&)) // // Thirdly, define all methods returning true @@ -194,10 +194,10 @@ DO_TRUE_DEFINITION (doCloseStyles (void)) DO_TRUE_DEFINITION (doFullDefineStyle (LayoutData&)) DO_TRUE_DEFINITION (doOpenSpellCheckIgnoreList (void)) DO_TRUE_DEFINITION (doCloseSpellCheckIgnoreList (void)) -DO_TRUE_DEFINITION (doFullSpellCheckIgnoreWord (const QString&)) +DO_TRUE_DEFINITION (doFullSpellCheckIgnoreWord (const TQString&)) DO_TRUE_DEFINITION (doHeader(const HeaderData&)) DO_TRUE_DEFINITION (doFooter(const FooterData&)) -DO_TRUE_DEFINITION ( doDeclareNonInlinedFramesets( QValueList<FrameAnchor>&, QValueList<FrameAnchor>& ) ) +DO_TRUE_DEFINITION ( doDeclareNonInlinedFramesets( TQValueList<FrameAnchor>&, TQValueList<FrameAnchor>& ) ) // The following are not generated by the leader DO_TRUE_DEFINITION (doOpenTextFrameSet (void)) diff --git a/filters/kword/libexport/KWEFBaseWorker.h b/filters/kword/libexport/KWEFBaseWorker.h index 9a1f43ca..e2046913 100644 --- a/filters/kword/libexport/KWEFBaseWorker.h +++ b/filters/kword/libexport/KWEFBaseWorker.h @@ -21,8 +21,8 @@ #ifndef KWEF_BASEWORKER_H #define KWEF_BASEWORKER_H -#include <qstring.h> -#include <qiodevice.h> +#include <tqstring.h> +#include <tqiodevice.h> #include <KWEFStructures.h> #include <koffice_export.h> @@ -40,13 +40,13 @@ class KOFFICEFILTER_EXPORT KWEFBaseWorker public: void registerKWordLeader(KWEFKWordLeader* leader); public: // callbacks to Leader - bool loadSubFile(const QString& fileName, QByteArray& array) const; - QIODevice* getSubFileDevice(const QString& fileName) const; + bool loadSubFile(const TQString& fileName, TQByteArray& array) const; + TQIODevice* getSubFileDevice(const TQString& fileName) const; public: // indirect callbacks to Leader: - QImage loadAndConvertToImage(const QString& strName, const QString& inExtension) const; - bool loadAndConvertToImage(const QString& strName, const QString& inExtension, const QString& outExtension, QByteArray& image) const; + TQImage loadAndConvertToImage(const TQString& strName, const TQString& inExtension) const; + bool loadAndConvertToImage(const TQString& strName, const TQString& inExtension, const TQString& outExtension, TQByteArray& image) const; public: // leader/worker functions - virtual bool doOpenFile (const QString& filenameOut, const QString& to); + virtual bool doOpenFile (const TQString& filenameOut, const TQString& to); virtual bool doCloseFile (void); // Close file in normal conditions virtual bool doAbortFile (void); // Close file after errors virtual bool doOpenDocument (void); // Like HTML's <html> @@ -55,9 +55,9 @@ class KOFFICEFILTER_EXPORT KWEFBaseWorker virtual bool doCloseTextFrameSet (void); // Like AbiWord's </section> virtual bool doFullDocumentInfo (const KWEFDocumentInfo &docInfo); virtual bool doVariableSettings (const VariableSettingsData &varSettings); - virtual bool doFullDocument (const QValueList<ParaData> &); - virtual bool doFullAllParagraphs (const QValueList<ParaData>& paraList); - virtual bool doFullParagraph(const QString& paraText, const LayoutData& layout, + virtual bool doFullDocument (const TQValueList<ParaData> &); + virtual bool doFullAllParagraphs (const TQValueList<ParaData>& paraList); + virtual bool doFullParagraph(const TQString& paraText, const LayoutData& tqlayout, const ValueListFormatData& paraFormatDataList); virtual bool doFullPaperFormat (const int format, const double width, const double height, const int orientation); ///< Like AbiWord's \<papersize\> @@ -77,11 +77,11 @@ class KOFFICEFILTER_EXPORT KWEFBaseWorker virtual bool doCloseBody (void); ///< Like HTML's \</BODY\> virtual bool doOpenStyles (void); ///< Like HTML's \<style\> virtual bool doCloseStyles (void); ///< Like HTML's \</style\> - virtual bool doFullDefineStyle (LayoutData& layout); ///< Defines a single style + virtual bool doFullDefineStyle (LayoutData& tqlayout); ///< Defines a single style virtual bool doOpenSpellCheckIgnoreList (void); ///< like AbiWord's \<ignorewords\> and KWord's \<SPELLCHECKIGNORELIST\> virtual bool doCloseSpellCheckIgnoreList (void); ///< like AbiWord's \</ignorewords\> and Kwords \</SPELLCHECKIGNORELIST\> - virtual bool doFullSpellCheckIgnoreWord (const QString& ignoreword); ///< like AbiWord's \<iw\> and Kwords \</SPELLCHECKIGNOREWORD\> - virtual bool doDeclareNonInlinedFramesets( QValueList<FrameAnchor>& pictureAnchors, QValueList<FrameAnchor>& tableAnchors ); ///< @since 1.4 + virtual bool doFullSpellCheckIgnoreWord (const TQString& ignoreword); ///< like AbiWord's \<iw\> and Kwords \</SPELLCHECKIGNOREWORD\> + virtual bool doDeclareNonInlinedFramesets( TQValueList<FrameAnchor>& pictureAnchors, TQValueList<FrameAnchor>& tableAnchors ); ///< @since 1.4 protected: KWEFKWordLeader* m_kwordLeader; }; diff --git a/filters/kword/libexport/KWEFKWordLeader.cc b/filters/kword/libexport/KWEFKWordLeader.cc index 2d3c0547..4a966dad 100644 --- a/filters/kword/libexport/KWEFKWordLeader.cc +++ b/filters/kword/libexport/KWEFKWordLeader.cc @@ -33,8 +33,8 @@ License version 2. */ -#include <qfile.h> -#include <qdom.h> +#include <tqfile.h> +#include <tqdom.h> #include <kdebug.h> #include <klocale.h> @@ -65,10 +65,10 @@ KWEFKWordLeader::~KWEFKWordLeader(void) } static FrameAnchor *findAnchor ( const KoPictureKey& key, - QValueList<ParaData>& paraList ) + TQValueList<ParaData>& paraList ) { kdDebug(30508) << "findAnchor " << key.toString() << endl; - QValueList<ParaData>::Iterator paraIt; + TQValueList<ParaData>::Iterator paraIt; for ( paraIt = paraList.begin (); paraIt != paraList.end (); ++paraIt ) { @@ -91,18 +91,18 @@ static FrameAnchor *findAnchor ( const KoPictureKey& key, return NULL; } -static void ProcessHardBrkTag ( QDomNode myNode, void* tagData, KWEFKWordLeader* ) +static void ProcessHardBrkTag ( TQDomNode myNode, void* tagData, KWEFKWordLeader* ) { // <HARDBRK> bool* flag = (bool*) tagData; - QValueList<AttrProcessing> attrProcessingList; + TQValueList<AttrProcessing> attrProcessingList; attrProcessingList << AttrProcessing ( "frame", *flag ); ProcessAttributes (myNode, attrProcessingList); if (*flag) kdDebug(30508) << "<HARDBRK frame=\"1\"> found" << endl; } -static void InsertBookmarkFormatData (const int pos, const QString& name, const bool start, +static void InsertBookmarkFormatData (const int pos, const TQString& name, const bool start, ValueListFormatData ¶FormatDataList) { ValueListFormatData::Iterator paraFormatDataIt; @@ -143,7 +143,7 @@ void KWEFKWordLeader::createBookmarkFormatData( ParaData& paraData ) { const int paraCount = m_paraCountMap[ m_currentFramesetName ]; - QValueList<Bookmark>::ConstIterator it; + TQValueList<Bookmark>::ConstIterator it; for (it = m_bookmarkList.begin(); it != m_bookmarkList.end(); ++it ) { if ( (*(it)).m_frameset != m_currentFramesetName ) @@ -165,7 +165,7 @@ void KWEFKWordLeader::createBookmarkFormatData( ParaData& paraData ) } } -static void ProcessParagraphTag ( QDomNode myNode, +static void ProcessParagraphTag ( TQDomNode myNode, void *tagData, KWEFKWordLeader *leader ) { @@ -173,12 +173,12 @@ static void ProcessParagraphTag ( QDomNode myNode, kdDebug (30508) << "ProcessParagraphTag () - Begin" << endl; #endif - QValueList<ParaData> *paraList = (QValueList<ParaData> *) tagData; + TQValueList<ParaData> *paraList = (TQValueList<ParaData> *) tagData; AllowNoAttributes (myNode); // We need to adjust the paragraph number (0 if first) - QMap<QString,int>::Iterator it = leader->m_paraCountMap.find( leader->m_currentFramesetName ); + TQMap<TQString,int>::Iterator it = leader->m_paraCountMap.tqfind( leader->m_currentFramesetName ); if ( it == leader->m_paraCountMap.end() ) leader->m_paraCountMap.insert( leader->m_currentFramesetName, 0 ); else @@ -186,14 +186,14 @@ static void ProcessParagraphTag ( QDomNode myNode, ParaData paraData; - QValueList<TagProcessing> tagProcessingList; + TQValueList<TagProcessing> tagProcessingList; tagProcessingList << TagProcessing ( "TEXT", ProcessTextTag, ¶Data.text ) << TagProcessing ( "FORMATS", ProcessFormatsTag, ¶Data.formattingList ) - << TagProcessing ( "LAYOUT", ProcessLayoutTag, ¶Data.layout ); + << TagProcessing ( "LAYOUT", ProcessLayoutTag, ¶Data.tqlayout ); if ( leader->m_oldSyntax ) { - tagProcessingList.append( TagProcessing( "HARDBRK", ProcessHardBrkTag, ¶Data.layout.pageBreakBefore ) ); + tagProcessingList.append( TagProcessing( "HARDBRK", ProcessHardBrkTag, ¶Data.tqlayout.pageBreakBefore ) ); } ProcessSubtags (myNode, tagProcessingList, leader); @@ -203,9 +203,9 @@ static void ProcessParagraphTag ( QDomNode myNode, // TODO/FIXME: why !paraData.text.isEmpty() if ( paraData.formattingList.isEmpty () && !paraData.text.isEmpty () ) { - if ( paraData.layout.formatData.id == 1 ) + if ( paraData.tqlayout.formatData.id == 1 ) { - paraData.formattingList << paraData.layout.formatData; + paraData.formattingList << paraData.tqlayout.formatData; } else { @@ -222,7 +222,7 @@ static void ProcessParagraphTag ( QDomNode myNode, } -static void ProcessFrameTag ( QDomNode myNode, void *tagData, +static void ProcessFrameTag ( TQDomNode myNode, void *tagData, KWEFKWordLeader *leader ) { FrameAnchor* frameAnchor= (FrameAnchor*) tagData; @@ -238,7 +238,7 @@ static void ProcessFrameTag ( QDomNode myNode, void *tagData, frameAnchor->frame.tWidth=0.0; frameAnchor->frame.bWidth=0.0; - QValueList<AttrProcessing> attrProcessingList; + TQValueList<AttrProcessing> attrProcessingList; attrProcessingList << AttrProcessing ( "right", frameAnchor->frame.right ) << AttrProcessing ( "left", frameAnchor->frame.left ) @@ -321,11 +321,11 @@ static void ProcessFrameTag ( QDomNode myNode, void *tagData, AllowNoSubtags (myNode, leader); } -static void ProcessPictureAnchor( QDomNode myNode, KWEFKWordLeader *leader, FrameAnchor* frameAnchor, const int frameType ) +static void ProcessPictureAnchor( TQDomNode myNode, KWEFKWordLeader *leader, FrameAnchor* frameAnchor, const int frameType ) { frameAnchor->type = frameType; - QValueList<TagProcessing> tagProcessingList; + TQValueList<TagProcessing> tagProcessingList; tagProcessingList << TagProcessing ( "FRAME", ProcessFrameTag, frameAnchor ) << TagProcessing ( "PICTURE", ProcessImageTag, &frameAnchor->picture.key ) @@ -339,13 +339,13 @@ static void ProcessPictureAnchor( QDomNode myNode, KWEFKWordLeader *leader, Fram frameAnchor->key = frameAnchor->picture.key; } -static void ProcessTableAnchor( QDomNode myNode, KWEFKWordLeader *leader, FrameAnchor* frameAnchor, +static void ProcessTableAnchor( TQDomNode myNode, KWEFKWordLeader *leader, FrameAnchor* frameAnchor, const int col, const int row, const int cols, const int rows ) { frameAnchor->type = 6; // Table - QValueList<ParaData> cellParaList; - QValueList<TagProcessing> tagProcessingList; + TQValueList<ParaData> cellParaList; + TQValueList<TagProcessing> tagProcessingList; tagProcessingList << TagProcessing ( "FRAME", ProcessFrameTag, frameAnchor ) << TagProcessing ( "PARAGRAPH", ProcessParagraphTag, &cellParaList ); ProcessSubtags (myNode, tagProcessingList, leader); @@ -353,7 +353,7 @@ static void ProcessTableAnchor( QDomNode myNode, KWEFKWordLeader *leader, FrameA frameAnchor->table.addCell (col, row, cols, rows, cellParaList, frameAnchor->frame); } -static void ProcessFramesetTag ( QDomNode myNode, +static void ProcessFramesetTag ( TQDomNode myNode, void *tagData, KWEFKWordLeader *leader ) { @@ -361,7 +361,7 @@ static void ProcessFramesetTag ( QDomNode myNode, kdDebug (30508) << "ProcessFramesetTag () - Begin" << endl; #endif - QValueList<ParaData> *paraList = (QValueList<ParaData> *) tagData; + TQValueList<ParaData> *paraList = (TQValueList<ParaData> *) tagData; int frameType = -1; int frameInfo = -1; @@ -369,11 +369,11 @@ static void ProcessFramesetTag ( QDomNode myNode, int row = -1; int cols = -1; int rows = -1; - QString grpMgr; + TQString grpMgr; - const QString oldName ( leader->m_currentFramesetName ); + const TQString oldName ( leader->m_currentFramesetName ); - QValueList<AttrProcessing> attrProcessingList; + TQValueList<AttrProcessing> attrProcessingList; attrProcessingList << AttrProcessing ( "name", leader->m_currentFramesetName ) << AttrProcessing ( "frameType", frameType ) << AttrProcessing ( "frameInfo", frameInfo ) @@ -399,7 +399,7 @@ static void ProcessFramesetTag ( QDomNode myNode, { // Normal Text kdDebug(30508) << "Processing Frameset: " << leader->m_currentFramesetName << endl; - QValueList<TagProcessing> tagProcessingList; + TQValueList<TagProcessing> tagProcessingList; tagProcessingList.append(TagProcessing ( "FRAME" )); tagProcessingList.append(TagProcessing ( "PARAGRAPH", ProcessParagraphTag, paraList )); ProcessSubtags (myNode, tagProcessingList, leader); @@ -409,7 +409,7 @@ static void ProcessFramesetTag ( QDomNode myNode, // header for first page HeaderData header; header.page = HeaderData::PAGE_FIRST; - QValueList<TagProcessing> tagProcessingList; + TQValueList<TagProcessing> tagProcessingList; tagProcessingList.append(TagProcessing ( "FRAME" )); tagProcessingList.append(TagProcessing ( "PARAGRAPH", ProcessParagraphTag, &header.para )); @@ -421,7 +421,7 @@ static void ProcessFramesetTag ( QDomNode myNode, // header for even page HeaderData header; header.page = HeaderData::PAGE_EVEN; - QValueList<TagProcessing> tagProcessingList; + TQValueList<TagProcessing> tagProcessingList; tagProcessingList.append(TagProcessing ( "FRAME" )); tagProcessingList.append(TagProcessing ( "PARAGRAPH", ProcessParagraphTag, &header.para )); ProcessSubtags (myNode, tagProcessingList, leader); @@ -432,7 +432,7 @@ static void ProcessFramesetTag ( QDomNode myNode, // header for odd page (or all page, if hType=0) HeaderData header; header.page = (leader->headerType() != 0 ) ? HeaderData::PAGE_ODD : HeaderData::PAGE_ALL; - QValueList<TagProcessing> tagProcessingList; + TQValueList<TagProcessing> tagProcessingList; tagProcessingList.append(TagProcessing ( "FRAME" )); tagProcessingList.append(TagProcessing ( "PARAGRAPH", ProcessParagraphTag, &header.para )); ProcessSubtags (myNode, tagProcessingList, leader); @@ -443,7 +443,7 @@ static void ProcessFramesetTag ( QDomNode myNode, // footer for first page FooterData footer; footer.page = FooterData::PAGE_FIRST; - QValueList<TagProcessing> tagProcessingList; + TQValueList<TagProcessing> tagProcessingList; tagProcessingList.append(TagProcessing ( "FRAME" )); tagProcessingList.append(TagProcessing ( "PARAGRAPH", ProcessParagraphTag, &footer.para )); ProcessSubtags (myNode, tagProcessingList, leader); @@ -454,7 +454,7 @@ static void ProcessFramesetTag ( QDomNode myNode, // footer for even page FooterData footer; footer.page = FooterData::PAGE_EVEN; - QValueList<TagProcessing> tagProcessingList; + TQValueList<TagProcessing> tagProcessingList; tagProcessingList.append(TagProcessing ( "FRAME" )); tagProcessingList.append(TagProcessing ( "PARAGRAPH", ProcessParagraphTag, &footer.para )); ProcessSubtags (myNode, tagProcessingList, leader); @@ -465,7 +465,7 @@ static void ProcessFramesetTag ( QDomNode myNode, // footer for odd page (or all page, if fType=0) FooterData footer; footer.page = (leader->footerType() != 0) ? FooterData::PAGE_ODD : FooterData::PAGE_ALL; - QValueList<TagProcessing> tagProcessingList; + TQValueList<TagProcessing> tagProcessingList; tagProcessingList.append(TagProcessing ( "FRAME" )); tagProcessingList.append(TagProcessing ( "PARAGRAPH", ProcessParagraphTag, &footer.para )); ProcessSubtags (myNode, tagProcessingList, leader); @@ -491,7 +491,7 @@ static void ProcessFramesetTag ( QDomNode myNode, { bool found = false; KoPictureKey key( grpMgr ); - QValueList<FrameAnchor>::Iterator it; + TQValueList<FrameAnchor>::Iterator it; for ( it = leader->m_nonInlinedTableAnchors.begin(); it != leader->m_nonInlinedTableAnchors.end(); ++it ) { if ( (*it).key == key ) @@ -578,34 +578,34 @@ static void ProcessFramesetTag ( QDomNode myNode, } -static void ProcessFramesetsTag ( QDomNode myNode, +static void ProcessFramesetsTag ( TQDomNode myNode, void *tagData, KWEFKWordLeader *leader ) { AllowNoAttributes (myNode); - QValueList<TagProcessing> tagProcessingList; + TQValueList<TagProcessing> tagProcessingList; tagProcessingList << TagProcessing ( "FRAMESET", ProcessFramesetTag, tagData ); ProcessSubtags (myNode, tagProcessingList, leader); } -static void ProcessStyleTag (QDomNode myNode, void *, KWEFKWordLeader *leader ) +static void ProcessStyleTag (TQDomNode myNode, void *, KWEFKWordLeader *leader ) { - LayoutData layout; + LayoutData tqlayout; - ProcessLayoutTag (myNode, &layout, leader); + ProcessLayoutTag (myNode, &tqlayout, leader); - leader->doFullDefineStyle (layout); + leader->doFullDefineStyle (tqlayout); } -static void ProcessStylesPluralTag (QDomNode myNode, void *, KWEFKWordLeader *leader ) +static void ProcessStylesPluralTag (TQDomNode myNode, void *, KWEFKWordLeader *leader ) { AllowNoAttributes (myNode); leader->doOpenStyles (); - QValueList<TagProcessing> tagProcessingList; + TQValueList<TagProcessing> tagProcessingList; tagProcessingList << TagProcessing ( "STYLE", ProcessStyleTag, leader ); ProcessSubtags (myNode, tagProcessingList, leader); @@ -613,7 +613,7 @@ static void ProcessStylesPluralTag (QDomNode myNode, void *, KWEFKWordLeader *le } -static void ProcessPaperBordersTag (QDomNode myNode, void*, KWEFKWordLeader* leader) +static void ProcessPaperBordersTag (TQDomNode myNode, void*, KWEFKWordLeader* leader) { double left = 0.0; @@ -621,7 +621,7 @@ static void ProcessPaperBordersTag (QDomNode myNode, void*, KWEFKWordLeader* lea double top = 0.0; double bottom = 0.0; - QValueList<AttrProcessing> attrProcessingList; + TQValueList<AttrProcessing> attrProcessingList; if ( leader->m_oldSyntax ) { attrProcessingList @@ -655,7 +655,7 @@ static void ProcessPaperBordersTag (QDomNode myNode, void*, KWEFKWordLeader* lea AllowNoSubtags (myNode, leader); } -static void ProcessPaperTag (QDomNode myNode, void *, KWEFKWordLeader *leader) +static void ProcessPaperTag (TQDomNode myNode, void *, KWEFKWordLeader *leader) { int format = -1; @@ -668,7 +668,7 @@ static void ProcessPaperTag (QDomNode myNode, void *, KWEFKWordLeader *leader) double columnspacing = 36.0; // Half-inch int numPages = -1; - QValueList<AttrProcessing> attrProcessingList; + TQValueList<AttrProcessing> attrProcessingList; attrProcessingList << AttrProcessing ( "format", format ) << AttrProcessing ( "width", width ) << AttrProcessing ( "height", height ) @@ -711,7 +711,7 @@ static void ProcessPaperTag (QDomNode myNode, void *, KWEFKWordLeader *leader) leader->doFullPaperFormat (format, width, height, orientation); leader->doFullPaperFormatOther( columns, columnspacing, numPages ); - QValueList<TagProcessing> tagProcessingList; + TQValueList<TagProcessing> tagProcessingList; tagProcessingList << TagProcessing ( "PAPERBORDERS", ProcessPaperBordersTag, NULL ) ; @@ -719,10 +719,10 @@ static void ProcessPaperTag (QDomNode myNode, void *, KWEFKWordLeader *leader) ProcessSubtags (myNode, tagProcessingList, leader); } -static void ProcessVariableSettingsTag (QDomNode myNode, void *, KWEFKWordLeader *leader) +static void ProcessVariableSettingsTag (TQDomNode myNode, void *, KWEFKWordLeader *leader) { VariableSettingsData vs; - QString print, creation, modification; // Dates (in ISO 8601 format) + TQString print, creation, modification; // Dates (in ISO 8601 format) int creationYear = -1; int creationMonth = -1; int creationDay = -1; @@ -730,7 +730,7 @@ static void ProcessVariableSettingsTag (QDomNode myNode, void *, KWEFKWordLeader int modificationMonth = -1; int modificationDay = -1; - QValueList<AttrProcessing> attrProcessingList; + TQValueList<AttrProcessing> attrProcessingList; attrProcessingList << AttrProcessing ( "startingPageNumber", vs.startingPageNumber ) << AttrProcessing ( "displaylink", vs.displaylink ) << AttrProcessing ( "underlinelink", vs.underlinelink ) @@ -761,38 +761,38 @@ static void ProcessVariableSettingsTag (QDomNode myNode, void *, KWEFKWordLeader if ( creation.isEmpty() ) { - if ( ( creationYear >= 1970 ) && QDate::isValid( creationYear, creationMonth, creationDay ) ) + if ( ( creationYear >= 1970 ) && TQDate::isValid( creationYear, creationMonth, creationDay ) ) { - vs.creationTime = QDateTime( QDate( creationYear, creationMonth, creationDay ) ); + vs.creationTime = TQDateTime( TQDate( creationYear, creationMonth, creationDay ) ); } } else - vs.creationTime=QDateTime::fromString(creation, Qt::ISODate); + vs.creationTime=TQDateTime::fromString(creation, Qt::ISODate); //kdDebug(30508) << "Creation time: " << vs.creationTime.toString( Qt::ISODate ) << endl; if ( modification.isEmpty() ) { - if ( ( modificationYear >= 1970 ) && QDate::isValid( modificationYear, modificationMonth, modificationDay ) ) + if ( ( modificationYear >= 1970 ) && TQDate::isValid( modificationYear, modificationMonth, modificationDay ) ) { - vs.modificationTime = QDateTime( QDate( modificationYear, modificationMonth, modificationDay ) ); + vs.modificationTime = TQDateTime( TQDate( modificationYear, modificationMonth, modificationDay ) ); } } else - vs.modificationTime=QDateTime::fromString(modification, Qt::ISODate); + vs.modificationTime=TQDateTime::fromString(modification, Qt::ISODate); //kdDebug(30508) << "Modification time: " << vs.modificationTime.toString( Qt::ISODate ) << endl; if (!print.isEmpty()) - vs.printTime=QDateTime::fromString(print, Qt::ISODate); + vs.printTime=TQDateTime::fromString(print, Qt::ISODate); //kdDebug(30508) << "Print time: " << vs.printTime.toString( Qt::ISODate ) << endl; leader->doVariableSettings (vs); } -static void ProcessSpellCheckIgnoreWordTag (QDomNode myNode, void *, KWEFKWordLeader *leader ) +static void ProcessSpellCheckIgnoreWordTag (TQDomNode myNode, void *, KWEFKWordLeader *leader ) { - QString ignoreword; + TQString ignoreword; - QValueList<AttrProcessing> attrProcessingList; + TQValueList<AttrProcessing> attrProcessingList; attrProcessingList << AttrProcessing ( "word", ignoreword ) ; @@ -804,13 +804,13 @@ static void ProcessSpellCheckIgnoreWordTag (QDomNode myNode, void *, KWEFKWordLe } -static void ProcessSpellCheckIgnoreListTag (QDomNode myNode, void *, KWEFKWordLeader *leader ) +static void ProcessSpellCheckIgnoreListTag (TQDomNode myNode, void *, KWEFKWordLeader *leader ) { AllowNoAttributes (myNode); leader->doOpenSpellCheckIgnoreList (); - QValueList<TagProcessing> tagProcessingList; + TQValueList<TagProcessing> tagProcessingList; tagProcessingList << TagProcessing ( "SPELLCHECKIGNOREWORD", ProcessSpellCheckIgnoreWordTag, leader ); ProcessSubtags (myNode, tagProcessingList, leader); @@ -818,17 +818,17 @@ static void ProcessSpellCheckIgnoreListTag (QDomNode myNode, void *, KWEFKWordLe } -static void ProcessPixmapsKeyTag ( QDomNode myNode, +static void ProcessPixmapsKeyTag ( TQDomNode myNode, void *tagData, KWEFKWordLeader *leader ) { - QValueList<ParaData> *paraList = (QValueList<ParaData> *) tagData; + TQValueList<ParaData> *paraList = (TQValueList<ParaData> *) tagData; KoPictureKey key; // Let KoPictureKey do most of the loading key.loadAttributes(myNode.toElement()); - const QString name(myNode.toElement().attribute("name")); + const TQString name(myNode.toElement().attribute("name")); kdDebug(30508) << "search anchors: " << key.toString() << endl; bool found = false; @@ -836,7 +836,7 @@ static void ProcessPixmapsKeyTag ( QDomNode myNode, // NOTE: we must always search in both inlined and non-inlined pictures. A picture can be used in both ways and a few times in each! // Process inlined pictures - QValueList<ParaData>::Iterator paraIt; + TQValueList<ParaData>::Iterator paraIt; for ( paraIt = paraList->begin(); paraIt != paraList->end(); ++paraIt ) { @@ -855,7 +855,7 @@ static void ProcessPixmapsKeyTag ( QDomNode myNode, } } // Process non-inline pictures - QValueList<FrameAnchor>::Iterator it; + TQValueList<FrameAnchor>::Iterator it; for ( it = leader->m_nonInlinedPictureAnchors.begin(); it != leader->m_nonInlinedPictureAnchors.end(); ++it ) { if ( (*it).key == key ) @@ -875,21 +875,21 @@ static void ProcessPixmapsKeyTag ( QDomNode myNode, } -static void ProcessPixmapsTag ( QDomNode myNode, +static void ProcessPixmapsTag ( TQDomNode myNode, void *tagData, KWEFKWordLeader *leader ) { AllowNoAttributes (myNode); - QValueList<TagProcessing> tagProcessingList; + TQValueList<TagProcessing> tagProcessingList; tagProcessingList << TagProcessing ( "KEY", ProcessPixmapsKeyTag, tagData ); ProcessSubtags (myNode, tagProcessingList, leader); } -static void FreeCellParaLists ( QValueList<ParaData> ¶List ) +static void FreeCellParaLists ( TQValueList<ParaData> ¶List ) { - QValueList<ParaData>::Iterator paraIt; + TQValueList<ParaData>::Iterator paraIt; for ( paraIt = paraList.begin (); paraIt != paraList.end (); ++paraIt ) { @@ -901,7 +901,7 @@ static void FreeCellParaLists ( QValueList<ParaData> ¶List ) { if ( (*formattingIt).id == 6 && (*formattingIt).frameAnchor.type == 6 ) { - QValueList<TableCell>::Iterator cellIt; + TQValueList<TableCell>::Iterator cellIt; for ( cellIt = (*formattingIt).frameAnchor.table.cellList.begin (); cellIt != (*formattingIt).frameAnchor.table.cellList.end (); @@ -916,13 +916,13 @@ static void FreeCellParaLists ( QValueList<ParaData> ¶List ) } // like ProcessFramesetTag, but only handle footnotes -static void ProcessFootnoteFramesetTag ( QDomNode myNode, void *tagData, KWEFKWordLeader *leader ) +static void ProcessFootnoteFramesetTag ( TQDomNode myNode, void *tagData, KWEFKWordLeader *leader ) { - QString frameName; + TQString frameName; int frameType = -1, frameInfo = -1; bool visible = false; - QValueList<AttrProcessing> attrProcessingList; + TQValueList<AttrProcessing> attrProcessingList; attrProcessingList << AttrProcessing ( "name", frameName ) << AttrProcessing ( "frameType", frameType ) @@ -943,7 +943,7 @@ static void ProcessFootnoteFramesetTag ( QDomNode myNode, void *tagData, KWEFKWo { FootnoteData footnote; footnote.frameName = frameName; - QValueList<TagProcessing> tagProcessingList; + TQValueList<TagProcessing> tagProcessingList; tagProcessingList.append(TagProcessing ( "FRAME" )); tagProcessingList.append(TagProcessing ( "PARAGRAPH", ProcessParagraphTag, &footnote.para )); ProcessSubtags (myNode, tagProcessingList, leader); @@ -952,22 +952,22 @@ static void ProcessFootnoteFramesetTag ( QDomNode myNode, void *tagData, KWEFKWo } // like ProcessFramesetsTag, but only handle footnotes -static void ProcessFootnoteFramesetsTag ( QDomNode myNode, void *tagData, KWEFKWordLeader *leader ) +static void ProcessFootnoteFramesetsTag ( TQDomNode myNode, void *tagData, KWEFKWordLeader *leader ) { AllowNoAttributes (myNode); - QValueList<TagProcessing> tagProcessingList; + TQValueList<TagProcessing> tagProcessingList; tagProcessingList << TagProcessing ( "FRAMESET", ProcessFootnoteFramesetTag, tagData ); ProcessSubtags (myNode, tagProcessingList, leader); } -static void ProcessBookmarkItemTag ( QDomNode myNode, void* tag, KWEFKWordLeader *leader ) +static void ProcessBookmarkItemTag ( TQDomNode myNode, void* tag, KWEFKWordLeader *leader ) { - QValueList<Bookmark> * bookmarkList = static_cast< QValueList<Bookmark> * > ( tag ); + TQValueList<Bookmark> * bookmarkList = static_cast< TQValueList<Bookmark> * > ( tag ); Bookmark bookmark; - QValueList<AttrProcessing> attrProcessingList; + TQValueList<AttrProcessing> attrProcessingList; attrProcessingList << AttrProcessing ( "name", bookmark.m_name ) << AttrProcessing ( "cursorIndexStart", bookmark.m_cursorIndexStart ) @@ -988,23 +988,23 @@ static void ProcessBookmarkItemTag ( QDomNode myNode, void* tag, KWEFKWordLeader bookmarkList->append( bookmark ); } -static void ProcessBookmarksTag ( QDomNode myNode, void* tag, KWEFKWordLeader *leader ) +static void ProcessBookmarksTag ( TQDomNode myNode, void* tag, KWEFKWordLeader *leader ) { AllowNoAttributes (myNode); - QValueList<TagProcessing> tagProcessingList; + TQValueList<TagProcessing> tagProcessingList; tagProcessingList << TagProcessing ( "BOOKMARKITEM", ProcessBookmarkItemTag, tag ); ProcessSubtags (myNode, tagProcessingList, leader); } -void ProcessDocTag ( QDomNode myNode, +void ProcessDocTag ( TQDomNode myNode, void* /*tagData*/, KWEFKWordLeader* leader ) { //kdDebug (30508) << "Entering ProcessDocTag" << endl; - QString editor, author; + TQString editor, author; - QValueList<AttrProcessing> attrProcessingList; + TQValueList<AttrProcessing> attrProcessingList; attrProcessingList << AttrProcessing ( "xmlns" ) @@ -1042,42 +1042,42 @@ void ProcessDocTag ( QDomNode myNode, leader->doOpenHead(); // At first, process <SPELLCHECKIGNORELIST>, even if mostly it will not be needed - QDomNode nodeIgnoreList=myNode.namedItem("SPELLCHECKIGNORELIST"); + TQDomNode nodeIgnoreList=myNode.namedItem("SPELLCHECKIGNORELIST"); if ( nodeIgnoreList.isNull () ) kdDebug (30508) << "No <SPELLCHECKIGNORELIST>" << endl; // Most files will not have it! else ProcessSpellCheckIgnoreListTag (nodeIgnoreList, NULL, leader); // Process <PAPER> now, even if mostly the output will need to be delayed. - QDomNode nodePaper=myNode.namedItem("PAPER"); + TQDomNode nodePaper=myNode.namedItem("PAPER"); if ( nodePaper.isNull () ) kdWarning (30508) << "No <PAPER>" << endl; else ProcessPaperTag (nodePaper, NULL, leader); // Process <VARIABLESETTINGS> - QDomNode nodeVariableSettings=myNode.namedItem("VARIABLESETTINGS"); + TQDomNode nodeVariableSettings=myNode.namedItem("VARIABLESETTINGS"); if ( nodeVariableSettings.isNull () ) kdWarning (30508) << "No <VARIABLESETTINGS>" << endl; else ProcessVariableSettingsTag (nodeVariableSettings, NULL, leader); // Then we process the styles - QDomNode nodeStyles=myNode.namedItem("STYLES"); + TQDomNode nodeStyles=myNode.namedItem("STYLES"); if ( nodeStyles.isNull () ) kdWarning (30508) << "No <STYLES>" << endl; else ProcessStylesPluralTag (nodeStyles, NULL, leader); // Process framesets, but only to find and extract footnotes (also endnotes) - QValueList<FootnoteData> footnotes; - QDomNode nodeFramesets=myNode.namedItem("FRAMESETS"); + TQValueList<FootnoteData> footnotes; + TQDomNode nodeFramesets=myNode.namedItem("FRAMESETS"); if ( !nodeFramesets.isNull() ) ProcessFootnoteFramesetsTag(nodeFramesets, &footnotes, leader ); // Process all framesets and pictures - QValueList<TagProcessing> tagProcessingList; - QValueList<ParaData> paraList; + TQValueList<TagProcessing> tagProcessingList; + TQValueList<ParaData> paraList; tagProcessingList << TagProcessing ( "PAPER" ) // Already done @@ -1104,7 +1104,7 @@ void ProcessDocTag ( QDomNode myNode, leader->doFullDocument (paraList); kdDebug(30508) << "Unachored Framesets : START" << endl; - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for ( it = leader->m_unanchoredFramesets.begin(); it != leader->m_unanchoredFramesets.end(); ++it ) { kdDebug(30508) << (*it) << endl; @@ -1144,7 +1144,7 @@ KWEFBaseWorker *KWEFKWordLeader::getWorker(void) const } -bool KWEFKWordLeader::doOpenFile ( const QString &filenameOut, const QString &to ) +bool KWEFKWordLeader::doOpenFile ( const TQString &filenameOut, const TQString &to ) { if ( m_worker ) return m_worker->doOpenFile (filenameOut, to); @@ -1187,7 +1187,7 @@ bool KWEFKWordLeader::doVariableSettings (const VariableSettingsData &varSetting } -bool KWEFKWordLeader::doFullDocument (const QValueList<ParaData> ¶List) +bool KWEFKWordLeader::doFullDocument (const TQValueList<ParaData> ¶List) { if ( m_worker ) return m_worker->doFullDocument (paraList); @@ -1227,15 +1227,15 @@ bool KWEFKWordLeader::doFullPaperFormatOther ( const int columns, const double c return false; } -bool KWEFKWordLeader::doFullDefineStyle ( LayoutData &layout ) +bool KWEFKWordLeader::doFullDefineStyle ( LayoutData &tqlayout ) { if ( m_worker ) - return m_worker->doFullDefineStyle (layout); + return m_worker->doFullDefineStyle (tqlayout); return false; } -bool KWEFKWordLeader::doFullSpellCheckIgnoreWord (const QString& ignoreword) +bool KWEFKWordLeader::doFullSpellCheckIgnoreWord (const TQString& ignoreword) { if ( m_worker ) return m_worker->doFullSpellCheckIgnoreWord (ignoreword); @@ -1259,7 +1259,7 @@ bool KWEFKWordLeader::doFooter ( const FooterData& footer ) return false; } -bool KWEFKWordLeader::doDeclareNonInlinedFramesets( QValueList<FrameAnchor>& pictureAnchors, QValueList<FrameAnchor>& tableAnchors ) +bool KWEFKWordLeader::doDeclareNonInlinedFramesets( TQValueList<FrameAnchor>& pictureAnchors, TQValueList<FrameAnchor>& tableAnchors ) { if ( m_worker ) return m_worker->doDeclareNonInlinedFramesets( pictureAnchors, tableAnchors ); @@ -1267,9 +1267,9 @@ bool KWEFKWordLeader::doDeclareNonInlinedFramesets( QValueList<FrameAnchor>& pic return false; } -static bool ParseFile ( QIODevice* subFile, QDomDocument& doc) +static bool ParseFile ( TQIODevice* subFile, TQDomDocument& doc) { - QString errorMsg; + TQString errorMsg; int errorLine; int errorColumn; @@ -1280,15 +1280,15 @@ static bool ParseFile ( QIODevice* subFile, QDomDocument& doc) << " Message: " << errorMsg << endl; // ### TODO: the error is in which sub-file? KMessageBox::error( 0L, i18n("An error has occurred while parsing the KWord file.\nAt line: %1, column %2\nError message: %3") - .arg( errorLine ).arg( errorColumn ).arg(i18n( "QXml", errorMsg.utf8() ) ), + .tqarg( errorLine ).tqarg( errorColumn ).tqarg(i18n( "TQXml", errorMsg.utf8() ) ), i18n("KWord Export Filter Library"), 0 ); return false; } return true; } -static bool ProcessStoreFile ( QIODevice* subFile, - void (*processor) (QDomNode, void *, KWEFKWordLeader *), +static bool ProcessStoreFile ( TQIODevice* subFile, + void (*processor) (TQDomNode, void *, KWEFKWordLeader *), KWEFKWordLeader* leader) { if (!subFile) @@ -1298,7 +1298,7 @@ static bool ProcessStoreFile ( QIODevice* subFile, else if ( subFile->open ( IO_ReadOnly ) ) { kdDebug (30508) << "Processing Document..." << endl; - QDomDocument doc; + TQDomDocument doc; if (!ParseFile(subFile, doc)) { subFile->close(); @@ -1309,7 +1309,7 @@ static bool ProcessStoreFile ( QIODevice* subFile, // However, it would crash if two sub files are opened together subFile->close(); - QDomNode docNode = doc.documentElement(); + TQDomNode docNode = doc.documentElement(); processor (docNode, NULL, leader); return true; } @@ -1321,7 +1321,7 @@ static bool ProcessStoreFile ( QIODevice* subFile, return false; } -QIODevice* KWEFKWordLeader::getSubFileDevice(const QString& fileName) +TQIODevice* KWEFKWordLeader::getSubFileDevice(const TQString& fileName) { KoStoreDevice* subFile; @@ -1336,7 +1336,7 @@ QIODevice* KWEFKWordLeader::getSubFileDevice(const QString& fileName) } -bool KWEFKWordLeader::loadSubFile(const QString& fileName, QByteArray& array) +bool KWEFKWordLeader::loadSubFile(const TQString& fileName, TQByteArray& array) { KoStoreDevice* subFile; @@ -1361,8 +1361,8 @@ bool KWEFKWordLeader::loadSubFile(const QString& fileName, QByteArray& array) return true; } -KoFilter::ConversionStatus KWEFKWordLeader::convert( KoFilterChain* chain, - const QCString& from, const QCString& to) +KoFilter::ConversiontqStatus KWEFKWordLeader::convert( KoFilterChain* chain, + const TQCString& from, const TQCString& to) { if ( from != "application/x-kword" ) { @@ -1403,7 +1403,7 @@ KoFilter::ConversionStatus KWEFKWordLeader::convert( KoFilterChain* chain, { kdWarning(30508) << "Opening root has failed. Trying raw XML file!" << endl; - const QString filename( chain->inputFile() ); + const TQString filename( chain->inputFile() ); if (filename.isEmpty() ) { kdError(30508) << "Could not open document as raw XML! Aborting!" << endl; @@ -1412,8 +1412,8 @@ KoFilter::ConversionStatus KWEFKWordLeader::convert( KoFilterChain* chain, } else { - QFile file( filename ); - if ( ! ProcessStoreFile( &file, ProcessDocTag, this ) ) + TQFile file( filename ); + if ( ! ProcessStoreFile( TQT_TQIODEVICE(&file), ProcessDocTag, this ) ) { kdError(30508) << "Could not process document! Aborting!" << endl; doAbortFile(); diff --git a/filters/kword/libexport/KWEFKWordLeader.h b/filters/kword/libexport/KWEFKWordLeader.h index 1aef9274..78ce1348 100644 --- a/filters/kword/libexport/KWEFKWordLeader.h +++ b/filters/kword/libexport/KWEFKWordLeader.h @@ -21,7 +21,7 @@ #ifndef KWEF_KWORDLEADER_H #define KWEF_KWORDLEADER_H -#include <qiodevice.h> +#include <tqiodevice.h> #include <KoFilterChain.h> @@ -38,17 +38,17 @@ class KOFFICEFILTER_EXPORT KWEFKWordLeader public: void setWorker ( KWEFBaseWorker *newWorker ); KWEFBaseWorker *getWorker(void) const; - KoFilter::ConversionStatus convert( KoFilterChain* chain, - const QCString& from, const QCString& to); + KoFilter::ConversiontqStatus convert( KoFilterChain* chain, + const TQCString& from, const TQCString& to); public: // ### TODO: where to put in the end? void createBookmarkFormatData( ParaData& paraData ); public: // callbacks - bool loadSubFile(const QString& fileName, QByteArray& array); - QIODevice* getSubFileDevice(const QString& fileName); + bool loadSubFile(const TQString& fileName, TQByteArray& array); + TQIODevice* getSubFileDevice(const TQString& fileName); public: // public leader/worker functions (DO NOT use in your own code!) bool doFullDocumentInfo (const KWEFDocumentInfo &docInfo); bool doVariableSettings (const VariableSettingsData &varSettings); - bool doFullDocument (const QValueList<ParaData> &); + bool doFullDocument (const TQValueList<ParaData> &); bool doPageInfo (const int headerType, const int footerType); bool doFullPaperFormat (const int format, const double width, const double height, const int orientation); bool doFullPaperBorders (const double top, const double left, const double bottom, const double right); @@ -63,15 +63,15 @@ class KOFFICEFILTER_EXPORT KWEFKWordLeader bool doCloseBody (void); bool doOpenStyles (void); bool doCloseStyles (void); - bool doFullDefineStyle (LayoutData& layout); + bool doFullDefineStyle (LayoutData& tqlayout); bool doOpenSpellCheckIgnoreList (void); bool doCloseSpellCheckIgnoreList (void); - bool doFullSpellCheckIgnoreWord (const QString& ignoreword); + bool doFullSpellCheckIgnoreWord (const TQString& ignoreword); bool doHeader(const HeaderData&); bool doFooter(const FooterData&); - bool doDeclareNonInlinedFramesets( QValueList<FrameAnchor>& pictureAnchors, QValueList<FrameAnchor>& tableAnchors ); ///< @since 1.4 + bool doDeclareNonInlinedFramesets( TQValueList<FrameAnchor>& pictureAnchors, TQValueList<FrameAnchor>& tableAnchors ); ///< @since 1.4 - QValueList<FootnoteData> footnoteList; + TQValueList<FootnoteData> footnoteList; void setHeaderType(int hType) { m_hType = hType; } void setFooterType(int fType) { m_fType = fType; } @@ -79,7 +79,7 @@ class KOFFICEFILTER_EXPORT KWEFKWordLeader int footerType() { return m_fType; } protected: // leader/worker functions - bool doOpenFile (const QString& filenameOut, const QString& to); + bool doOpenFile (const TQString& filenameOut, const TQString& to); bool doCloseFile (void); bool doAbortFile (void); bool doOpenDocument (void); @@ -90,14 +90,14 @@ class KOFFICEFILTER_EXPORT KWEFKWordLeader /// true if oldSyntax (KWord 0.8) bool m_oldSyntax; /// Name of the current frame set - QString m_currentFramesetName; + TQString m_currentFramesetName; /// Number of paragraph in each frameset (for bookmarks) - QMap<QString,int> m_paraCountMap; + TQMap<TQString,int> m_paraCountMap; /// List of bookmarks - QValueList<Bookmark> m_bookmarkList; - QStringList m_unanchoredFramesets; ///< List of framesets where an anchor was searched but not found (DEBUG) @since 1.4 - QValueList<FrameAnchor> m_nonInlinedPictureAnchors; ///< Pseudo-anchors for non-inlined anchors @since 1.4 - QValueList<FrameAnchor> m_nonInlinedTableAnchors; ///< Pseudo-anchors for non-inlined tables @since 1.4 + TQValueList<Bookmark> m_bookmarkList; + TQStringList m_unanchoredFramesets; ///< List of framesets where an anchor was searched but not found (DEBUG) @since 1.4 + TQValueList<FrameAnchor> m_nonInlinedPictureAnchors; ///< Pseudo-anchors for non-inlined anchors @since 1.4 + TQValueList<FrameAnchor> m_nonInlinedTableAnchors; ///< Pseudo-anchors for non-inlined tables @since 1.4 private: KWEFBaseWorker *m_worker; KoFilterChain* m_chain; diff --git a/filters/kword/libexport/KWEFStructures.cc b/filters/kword/libexport/KWEFStructures.cc index 36c1859c..6c9c301f 100644 --- a/filters/kword/libexport/KWEFStructures.cc +++ b/filters/kword/libexport/KWEFStructures.cc @@ -38,14 +38,14 @@ TableCell::~TableCell ( void ) #endif } -void Table::addCell ( int c, int r, int _cols, int _rows, QValueList<ParaData> &p, FrameData &frameData ) +void Table::addCell ( int c, int r, int _cols, int _rows, TQValueList<ParaData> &p, FrameData &frameData ) { if ( c + _cols > cols ) { cols = c + _cols; } - cellList << TableCell ( c, r, _cols, _rows, new QValueList<ParaData> (p), frameData ); + cellList << TableCell ( c, r, _cols, _rows, new TQValueList<ParaData> (p), frameData ); } bool TabulatorData::operator == (const TabulatorData& other) const @@ -56,23 +56,23 @@ bool TabulatorData::operator == (const TabulatorData& other) const && (m_width==other.m_width)); } -void VariableData::setLink(const QString& linkName, const QString& hrefName) +void VariableData::setLink(const TQString& linkName, const TQString& hrefName) { propertyMap["link:linkName"]=linkName; propertyMap["link:hrefName"]=hrefName; } -QString VariableData::getLinkName(void) const +TQString VariableData::getLinkName(void) const { return propertyMap["link:linkName"]; } -QString VariableData::getHrefName(void) const +TQString VariableData::getHrefName(void) const { return propertyMap["link:hrefName"]; } -void VariableData::setPgNum(const QString& subtype, const QString& value) +void VariableData::setPgNum(const TQString& subtype, const TQString& value) { propertyMap["pgnum:subtype"]=subtype; propertyMap["pgnum:value"]=value; @@ -90,23 +90,23 @@ bool VariableData::isPageCount(void) const return (num==1); } -void VariableData::setField(const QString& name, const QString& value) +void VariableData::setField(const TQString& name, const TQString& value) { propertyMap["field:name"]=name; propertyMap["field:value"]=value; } -QString VariableData::getFieldName(void) const +TQString VariableData::getFieldName(void) const { return propertyMap["field:name"]; } -QString VariableData::getFieldValue(void) const +TQString VariableData::getFieldValue(void) const { return propertyMap["field:value"]; } -void VariableData::setFootnote( const QString& notetype, const QString& automatic,const QString& value, QValueList<ParaData>* para) +void VariableData::setFootnote( const TQString& notetype, const TQString& automatic,const TQString& value, TQValueList<ParaData>* para) { propertyMap["footnote:value"] = value; propertyMap["footnote:auto"] = automatic; @@ -119,7 +119,7 @@ bool VariableData::getFootnoteAuto(void) const return propertyMap["footnote:auto"]=="auto"; } -QString VariableData::getFootnoteValue(void) const +TQString VariableData::getFootnoteValue(void) const { return propertyMap["footnote:value"]; } @@ -129,17 +129,17 @@ bool VariableData::getFootnoteType( void ) const return propertyMap["footnote:notetype"] == "footnote"; } -QValueList<ParaData>* VariableData::getFootnotePara(void) const +TQValueList<ParaData>* VariableData::getFootnotePara(void) const { return footnotePara; } -void VariableData::setGenericData( const QString& key, const QString& data ) +void VariableData::setGenericData( const TQString& key, const TQString& data ) { propertyMap[ key ] = data ; } -QString VariableData::getGenericData( const QString& key ) const +TQString VariableData::getGenericData( const TQString& key ) const { return propertyMap[ key ]; } @@ -149,7 +149,7 @@ Bookmark::Bookmark() { } -void CreateMissingFormatData (QString ¶Text, ValueListFormatData ¶FormatDataList) +void CreateMissingFormatData (TQString ¶Text, ValueListFormatData ¶FormatDataList) { ValueListFormatData::Iterator paraFormatDataIt; int lastPos=0; // last position diff --git a/filters/kword/libexport/KWEFStructures.h b/filters/kword/libexport/KWEFStructures.h index d9efe278..dbee22d0 100644 --- a/filters/kword/libexport/KWEFStructures.h +++ b/filters/kword/libexport/KWEFStructures.h @@ -40,12 +40,12 @@ #ifndef EXPORTFILTERSSTRUCTURES_H #define EXPORTFILTERSSTRUCTURES_H -#include <qvaluelist.h> -#include <qstring.h> -#include <qmap.h> -#include <qcolor.h> -#include <qdom.h> -#include <qdatetime.h> +#include <tqvaluelist.h> +#include <tqstring.h> +#include <tqmap.h> +#include <tqcolor.h> +#include <tqdom.h> +#include <tqdatetime.h> #include <KoPictureKey.h> #include <koffice_export.h> @@ -65,48 +65,48 @@ class TextFormatting weight (50), fontSize (0), verticalAlignment (0), missing (newMissing) {} - TextFormatting ( QString f, + TextFormatting ( TQString f, bool i, bool u, bool s, int w, int sz, - QColor fg, - QColor bg, + TQColor fg, + TQColor bg, int v) : fontName (f), italic (i), underline (u), underlineWord(false), strikeout(s), strikeoutWord( false ), weight (w), fontSize (sz), fgColor (fg), bgColor (bg), verticalAlignment (v), missing (false) {} - QString fontName; + TQString fontName; bool italic; bool underline; ///< Any underline? (If true, we do not know if simple or double or what else) - QString underlineValue; ///< "value" of the underline: single, double, bold-single... - QString underlineStyle; ///< underline style: solid, dash, dot dash, .... + TQString underlineValue; ///< "value" of the underline: single, double, bold-single... + TQString underlineStyle; ///< underline style: solid, dash, dot dash, .... bool underlineWord; ///< true if word-by-word (i.e spaces are not underlined) - QColor underlineColor; ///< color of the line + TQColor underlineColor; ///< color of the line bool strikeout; ///< true if strikeout - QString strikeoutType; ///< type of strikeout: single, bold, double - QString strikeoutLineStyle; ///< type of the strikeout line: solid, dash, dot, .... + TQString strikeoutType; ///< type of strikeout: single, bold, double + TQString strikeoutLineStyle; ///< type of the strikeout line: solid, dash, dot, .... bool strikeoutWord; ///< \todo: not finished ### int weight; int fontSize; - QColor fgColor; - QColor bgColor; + TQColor fgColor; + TQColor bgColor; int verticalAlignment; - QString fontAttribute; + TQString fontAttribute; /** * Language code * @note the test language "xx" in converted to "en_US" */ - QString language; + TQString language; bool missing; ///< true if this TextFormatting object does not correspond to a real \<FORMAT\> element }; @@ -118,7 +118,7 @@ class Picture Picture () {} KoPictureKey key; ///< Picture key: where the picture came from - QString koStoreName; ///< Picture store name: filename within KWord archive + TQString koStoreName; ///< Picture store name: filename within KWord archive }; /** @@ -135,7 +135,7 @@ public: double bottom; double minHeight; int runaround; - QString runaroundSide; + TQString runaroundSide; double runaroundGap; int autoCreateNewFrame; int newFrameBehavior; @@ -144,14 +144,14 @@ public: double lWidth, rWidth, tWidth, bWidth; - QColor lColor; - QColor rColor; - QColor tColor; - QColor bColor; + TQColor lColor; + TQColor rColor; + TQColor tColor; + TQColor bColor; int lStyle, rStyle, tStyle, bStyle; - QColor bkColor; + TQColor bkColor; int bkStyle; double bleftpt, brightpt, btoppt, bbottompt; }; @@ -165,7 +165,7 @@ class KOFFICEFILTER_EXPORT TableCell TableCell (): col( 0 ), row( 0 ), m_cols( 0 ), m_rows( 0 ), paraList( 0 ) {} /// \since 1.4 (changes of parameters) - TableCell ( int c, int r, int _cols, int _rows, QValueList<ParaData> *p, FrameData &frameData ) + TableCell ( int c, int r, int _cols, int _rows, TQValueList<ParaData> *p, FrameData &frameData ) : col (c), row (r), m_cols( _cols ), m_rows( _rows ), paraList (p), frame (frameData) {} ~TableCell (); @@ -174,7 +174,7 @@ class KOFFICEFILTER_EXPORT TableCell int row; int m_cols; ///< \since 1.4 int m_rows; ///< \since 1.4 - QValueList<ParaData> *paraList; + TQValueList<ParaData> *paraList; FrameData frame; }; @@ -185,10 +185,10 @@ class Table Table () : cols (0) {} /// \since 1.4 (change of parameters) - void addCell ( int c, int r, int _cols, int _rows, QValueList<ParaData> &p, FrameData &frameData ); + void addCell ( int c, int r, int _cols, int _rows, TQValueList<ParaData> &p, FrameData &frameData ); int cols; - QValueList<TableCell> cellList; + TQValueList<TableCell> cellList; }; @@ -216,7 +216,7 @@ class KOFFICEFILTER_EXPORT VariableData { public: VariableData (): m_type(-1), footnotePara(0) {} - VariableData ( const QString& text ) : m_text(text), m_type(-1) {} + VariableData ( const TQString& text ) : m_text(text), m_type(-1) {} VariableData ( const VariableData& other ) : m_key(other.m_key), m_text(other.m_text), m_type(other.m_type), propertyMap(other.propertyMap), @@ -225,33 +225,33 @@ public: /** * Set parameters of a LINK element */ - void setLink(const QString& linkName, const QString& hrefName); - QString getLinkName(void) const; ///< Name of link (attribute "linkName" of \<LINK\>) - QString getHrefName(void) const; ///< Reference of link (attribute "hrefName" of \<LINK\>) + void setLink(const TQString& linkName, const TQString& hrefName); + TQString getLinkName(void) const; ///< Name of link (attribute "linkName" of \<LINK\>) + TQString getHrefName(void) const; ///< Reference of link (attribute "hrefName" of \<LINK\>) /** * Set parameters of a PGNUM element */ - void setPgNum(const QString& subtype, const QString& value); + void setPgNum(const TQString& subtype, const TQString& value); bool isPageNumber(void) const; bool isPageCount(void) const; /** * Set parameters of a FIELD element */ - void setField(const QString& subtype, const QString& value); - QString getFieldName(void) const; - QString getFieldValue(void) const; + void setField(const TQString& subtype, const TQString& value); + TQString getFieldName(void) const; + TQString getFieldValue(void) const; /** * Set parameters of a \<FOOTNOTE\> element * @since 1.4 (change of parameters) */ - void setFootnote( const QString& notetype, const QString& automatic, const QString& value, QValueList<ParaData>* para ); + void setFootnote( const TQString& notetype, const TQString& automatic, const TQString& value, TQValueList<ParaData>* para ); /** * Is the footnote an automatic one? * @return true for an automatical foornote, false for a manual footnote */ bool getFootnoteAuto(void) const; /// Get the value (counter) of the footnote - QString getFootnoteValue(void) const; + TQString getFootnoteValue(void) const; /** * Get type of footnote * @return true for footnote, false for endnote @@ -259,26 +259,26 @@ public: */ bool getFootnoteType( void ) const; /// Paragrapgh of the footnote - QValueList<ParaData>* getFootnotePara(void) const; + TQValueList<ParaData>* getFootnotePara(void) const; /** * Set generic variable data * @since 1.3.1, 1.4 */ - void setGenericData( const QString& key, const QString& data ); + void setGenericData( const TQString& key, const TQString& data ); /** * Get generic variable data * @since 1.3.1, 1.4 */ - QString getGenericData( const QString& key ) const; + TQString getGenericData( const TQString& key ) const; - QString m_key; - QString m_text; + TQString m_key; + TQString m_text; int m_type; protected: - QMap<QString,QString> propertyMap; - QValueList<ParaData>* footnotePara; + TQMap<TQString,TQString> propertyMap; + TQValueList<ParaData>* footnotePara; }; class FormatData @@ -310,7 +310,7 @@ public: }; -class ValueListFormatData : public QValueList<FormatData> +class ValueListFormatData : public TQValueList<FormatData> { public: ValueListFormatData (void) { } @@ -353,14 +353,14 @@ public: Style style; /*unsigned*/ int depth; int start; - QString lefttext; - QString righttext; + TQString lefttext; + TQString righttext; - int /*QChar*/ customCharacter; - QString customFont; - //QString custom; + int /*TQChar*/ customCharacter; + TQString customFont; + //TQString custom; - QString text; ///< text at the time of saving (no formatting info though) + TQString text; ///< text at the time of saving (no formatting info though) }; @@ -370,7 +370,7 @@ class BorderData public: BorderData() : style(0), width(0.0) {} public: - QColor color; + TQColor color; int style; double width; }; @@ -405,14 +405,14 @@ public: /** * List of tabulators */ -class TabulatorList : public QValueList<TabulatorData> +class TabulatorList : public TQValueList<TabulatorData> { public: TabulatorList(void) {} virtual ~TabulatorList(void) {} }; -/// Paragraph layout +/// Paragraph tqlayout class LayoutData { public: @@ -426,9 +426,9 @@ public: enum { LS_CUSTOM = 0, LS_SINGLE = 10, LS_ONEANDHALF = 15, LS_DOUBLE = 20, LS_ATLEAST = 30, LS_MULTIPLE = 40, LS_FIXED = 50 }; - QString styleName; - QString styleFollowing; - QString alignment; ///< left, right, center, justify + TQString styleName; + TQString styleFollowing; + TQString tqalignment; ///< left, right, center, justify CounterData counter; FormatData formatData; double indentFirst; ///< indentation correction of first line (can be negative!) @@ -446,7 +446,7 @@ public: double shadowDistance; ///< distance of \<SHADOW\> int shadowDirection;///< direction of \<SHADOW\> - QColor shadowColor; ///< red, green, blue of \<SHADOW\> + TQColor shadowColor; ///< red, green, blue of \<SHADOW\> BorderData leftBorder; BorderData rightBorder; BorderData topBorder; @@ -457,9 +457,9 @@ public: struct ParaData { - QString text; + TQString text; ValueListFormatData formattingList; - LayoutData layout; + LayoutData tqlayout; }; struct HeaderFooterData @@ -473,7 +473,7 @@ struct HeaderFooterData }; HeaderFooterPage page; - QValueList<ParaData> para; + TQValueList<ParaData> para; }; typedef HeaderFooterData HeaderData; @@ -482,8 +482,8 @@ typedef HeaderFooterData FooterData; /// data for \<FRAMESET\> which holds footnotes struct FootnoteData { - QString frameName; - QValueList<ParaData> para; + TQString frameName; + TQValueList<ParaData> para; }; /// see \<VARIABLESETTINGS\> in the KWord DTD @@ -503,35 +503,35 @@ public: bool underlinelink; bool displaycomment; bool displayfieldcode; - QDateTime creationTime; - QDateTime modificationTime; - QDateTime printTime; + TQDateTime creationTime; + TQDateTime modificationTime; + TQDateTime printTime; }; class KWEFDocumentInfo { public: - KWEFDocumentInfo(void) { } // Initiate all QString + KWEFDocumentInfo(void) { } // Initiate all TQString public: // <ABOUT> - QString title; - QString abstract; - QString keywords; - QString subject; + TQString title; + TQString abstract; + TQString keywords; + TQString subject; // <AUTHOR> - QString fullName; - QString jobTitle; - QString company; - QString email; - QString telephone; - QString fax; - QString country; - QString postalCode; - QString city; - QString street; - QString initial; - QString position; - QString telephonework; + TQString fullName; + TQString jobTitle; + TQString company; + TQString email; + TQString telephone; + TQString fax; + TQString country; + TQString postalCode; + TQString city; + TQString street; + TQString initial; + TQString position; + TQString telephonework; }; /// \since 1.4 @@ -540,9 +540,9 @@ class Bookmark public: Bookmark(); /// Bookmark name - QString m_name; + TQString m_name; /// Name of the frameset where the bookmark is - QString m_frameset; + TQString m_frameset; /// Number of the paragrapgh where the booksmark starts int m_startparag; /// Number of the paragrapgh where the booksmark starts @@ -555,6 +555,6 @@ public: // Helper functions -void CreateMissingFormatData ( QString ¶Text, ValueListFormatData ¶FormatDataList ); +void CreateMissingFormatData ( TQString ¶Text, ValueListFormatData ¶FormatDataList ); #endif /* EXPORTFILTERSSTRUCTURES_H */ diff --git a/filters/kword/libexport/KWEFUtil.cc b/filters/kword/libexport/KWEFUtil.cc index 6dc80de6..56e2b669 100644 --- a/filters/kword/libexport/KWEFUtil.cc +++ b/filters/kword/libexport/KWEFUtil.cc @@ -18,25 +18,25 @@ * Boston, MA 02110-1301, USA. */ -#include <qstring.h> -#include <qtextcodec.h> +#include <tqstring.h> +#include <tqtextcodec.h> #include <KoPageLayout.h> #include "KWEFUtil.h" -QString KWEFUtil::EscapeSgmlText(const QTextCodec* codec, - const QString& strIn, +TQString KWEFUtil::EscapeSgmlText(const TQTextCodec* codec, + const TQString& strIn, const bool quot /* = false */ , const bool apos /* = false */ ) { - QString strReturn; - QChar ch; + TQString strReturn; + TQChar ch; for (uint i=0; i<strIn.length(); i++) { ch=strIn[i]; - switch (ch.unicode()) + switch (ch.tqunicode()) { case 38: // & { @@ -78,7 +78,7 @@ QString KWEFUtil::EscapeSgmlText(const QTextCodec* codec, { if (!codec->canEncode(ch)) { - strReturn+=QString("&#%1;").arg(ch.unicode()); + strReturn+=TQString("&#%1;").tqarg(ch.tqunicode()); break; } } @@ -92,7 +92,7 @@ QString KWEFUtil::EscapeSgmlText(const QTextCodec* codec, } void KWEFUtil::GetNativePaperFormat(const int format, - QString& width, QString& height, QString& units) + TQString& width, TQString& height, TQString& units) // Find data for paper format, as needed for AbiWord and CSS { switch (format) @@ -196,9 +196,9 @@ void KWEFUtil::GetNativePaperFormat(const int format, default: { // TODO - width=QString::null; - height=QString::null; - units=QString::null; + width=TQString(); + height=TQString(); + units=TQString(); break; } } diff --git a/filters/kword/libexport/KWEFUtil.h b/filters/kword/libexport/KWEFUtil.h index 0ec2feb1..2876c3c3 100644 --- a/filters/kword/libexport/KWEFUtil.h +++ b/filters/kword/libexport/KWEFUtil.h @@ -25,14 +25,14 @@ namespace KWEFUtil { -KOFFICEFILTER_EXPORT QString EscapeSgmlText(const QTextCodec* codec, const QString& strIn, +KOFFICEFILTER_EXPORT TQString EscapeSgmlText(const TQTextCodec* codec, const TQString& strIn, const bool quot = false, const bool apos = false ); KOFFICEFILTER_EXPORT void GetNativePaperFormat(const int format, - QString& width, QString& height, QString& units); + TQString& width, TQString& height, TQString& units); } // Deprecated! Use KWEFUtil::EscapeSgmlText -static inline QString EscapeXmlText(const QString& strIn, +static inline TQString EscapeXmlText(const TQString& strIn, const bool quot = false, const bool apos = false ) { return KWEFUtil::EscapeSgmlText(NULL,strIn,quot,apos); diff --git a/filters/kword/libexport/ProcessDocument.cc b/filters/kword/libexport/ProcessDocument.cc index 345dba2f..ed5a7bfc 100644 --- a/filters/kword/libexport/ProcessDocument.cc +++ b/filters/kword/libexport/ProcessDocument.cc @@ -39,8 +39,8 @@ Copyright 2001 Michael Johnson <mikej@xnet.com> */ -#include <qdom.h> -#include <qvaluelist.h> +#include <tqdom.h> +#include <tqvaluelist.h> #include <kdebug.h> @@ -54,20 +54,20 @@ // TODO: verify that all document info is read! -void ProcessTextTag ( QDomNode myNode, void *tagData, KWEFKWordLeader *leader ) +void ProcessTextTag ( TQDomNode myNode, void *tagData, KWEFKWordLeader *leader ) { - QString *tagText = (QString *) tagData; + TQString *tagText = (TQString *) tagData; *tagText = myNode.toElement().text(); // Get the text, also from a CDATA section - QValueList<TagProcessing> tagProcessingList; + TQValueList<TagProcessing> tagProcessingList; tagProcessingList.append ( TagProcessing ( "xml:space" ) ); ProcessSubtags (myNode, tagProcessingList, leader); AllowNoSubtags (myNode, leader); } -static void ProcessAboutTag ( QDomNode myNode, +static void ProcessAboutTag ( TQDomNode myNode, void *tagData, KWEFKWordLeader *leader ) { @@ -75,7 +75,7 @@ static void ProcessAboutTag ( QDomNode myNode, AllowNoAttributes (myNode); - QValueList<TagProcessing> tagProcessingList; + TQValueList<TagProcessing> tagProcessingList; tagProcessingList.append ( TagProcessing ( "title", ProcessTextTag, &docInfo->title ) ); tagProcessingList.append ( TagProcessing ( "abstract", ProcessTextTag, &docInfo->abstract ) ); tagProcessingList.append ( TagProcessing ( "keyword", ProcessTextTag, &docInfo->keywords ) ); @@ -84,7 +84,7 @@ static void ProcessAboutTag ( QDomNode myNode, } -static void ProcessAuthorTag ( QDomNode myNode, +static void ProcessAuthorTag ( TQDomNode myNode, void *tagData, KWEFKWordLeader *leader ) { @@ -92,7 +92,7 @@ static void ProcessAuthorTag ( QDomNode myNode, AllowNoAttributes (myNode); - QValueList<TagProcessing> tagProcessingList; + TQValueList<TagProcessing> tagProcessingList; tagProcessingList.append ( TagProcessing ( "full-name", ProcessTextTag, &docInfo->fullName ) ); tagProcessingList.append ( TagProcessing ( "title", ProcessTextTag, &docInfo->jobTitle ) ); tagProcessingList.append ( TagProcessing ( "company", ProcessTextTag, &docInfo->company ) ); @@ -110,7 +110,7 @@ static void ProcessAuthorTag ( QDomNode myNode, } -void ProcessDocumentInfoTag ( QDomNode myNode, +void ProcessDocumentInfoTag ( TQDomNode myNode, void *, KWEFKWordLeader *leader ) { @@ -118,7 +118,7 @@ void ProcessDocumentInfoTag ( QDomNode myNode, KWEFDocumentInfo docInfo; - QValueList<TagProcessing> tagProcessingList; + TQValueList<TagProcessing> tagProcessingList; tagProcessingList.append ( TagProcessing ( "log" ) ); tagProcessingList.append ( TagProcessing ( "author", ProcessAuthorTag, &docInfo ) ); tagProcessingList.append ( TagProcessing ( "about", ProcessAboutTag, &docInfo ) ); @@ -134,7 +134,7 @@ void ProcessDocumentInfoTag ( QDomNode myNode, // have the same parameters since the functions are passed to // ProcessSubtags throuch the TagProcessing class. The top level // function is ProcessDocTag and can be called with the node returned -// by QDomDocument::documentElement (). The tagData argument can be +// by TQDomDocument::documentElement (). The tagData argument can be // used to either pass variables down to the subtags or to allow // subtags to return values. As a bare minimum the tag processing // functions must handle the tag's attributes and the tag's subtags @@ -157,13 +157,13 @@ void ProcessDocumentInfoTag ( QDomNode myNode, // -------------------------------------------------------------------------------- -static void ProcessOneAttrTag ( QDomNode myNode, - QString attrName, - QString attrType, +static void ProcessOneAttrTag ( TQDomNode myNode, + TQString attrName, + TQString attrType, void *attrData, KWEFKWordLeader *leader ) { - QValueList<AttrProcessing> attrProcessingList; + TQValueList<AttrProcessing> attrProcessingList; attrProcessingList << AttrProcessing (attrName, attrType, attrData); ProcessAttributes (myNode, attrProcessingList); @@ -171,13 +171,13 @@ static void ProcessOneAttrTag ( QDomNode myNode, } -static void ProcessColorAttrTag ( QDomNode myNode, void *tagData, KWEFKWordLeader * ) +static void ProcessColorAttrTag ( TQDomNode myNode, void *tagData, KWEFKWordLeader * ) { - QColor *attrValue = (QColor *) tagData; + TQColor *attrValue = (TQColor *) tagData; int red, green, blue; - QValueList<AttrProcessing> attrProcessingList; + TQValueList<AttrProcessing> attrProcessingList; attrProcessingList << AttrProcessing ( "red", red ); attrProcessingList << AttrProcessing ( "green", green ); attrProcessingList << AttrProcessing ( "blue", blue ); @@ -187,8 +187,8 @@ static void ProcessColorAttrTag ( QDomNode myNode, void *tagData, KWEFKWordLeade } -static void ProcessBoolIntAttrTag ( QDomNode myNode, - QString attrName, +static void ProcessBoolIntAttrTag ( TQDomNode myNode, + TQString attrName, void *attrData, KWEFKWordLeader *leader ) { @@ -199,35 +199,35 @@ static void ProcessBoolIntAttrTag ( QDomNode myNode, // -------------------------------------------------------------------------------- -static void ProcessIntValueTag (QDomNode myNode, void *tagData, KWEFKWordLeader *leader ) +static void ProcessIntValueTag (TQDomNode myNode, void *tagData, KWEFKWordLeader *leader ) { ProcessOneAttrTag (myNode, "value", "int", tagData, leader); } -static void ProcessBoolIntValueTag ( QDomNode myNode, void *tagData, KWEFKWordLeader *leader ) +static void ProcessBoolIntValueTag ( TQDomNode myNode, void *tagData, KWEFKWordLeader *leader ) { ProcessBoolIntAttrTag (myNode, "value", tagData, leader); } -static void ProcessStringValueTag ( QDomNode myNode, void *tagData, KWEFKWordLeader *leader ) +static void ProcessStringValueTag ( TQDomNode myNode, void *tagData, KWEFKWordLeader *leader ) { - ProcessOneAttrTag (myNode, "value", "QString", tagData, leader); + ProcessOneAttrTag (myNode, "value", TQSTRING_OBJECT_NAME_STRING, tagData, leader); } -static void ProcessStringNameTag (QDomNode myNode, void *tagData, KWEFKWordLeader *leader ) +static void ProcessStringNameTag (TQDomNode myNode, void *tagData, KWEFKWordLeader *leader ) { - ProcessOneAttrTag (myNode, "name", "QString", tagData, leader); + ProcessOneAttrTag (myNode, "name", TQSTRING_OBJECT_NAME_STRING, tagData, leader); } // -------------------------------------------------------------------------------- -static void ProcessOldLayoutChildTag (QDomNode myNode, void *tagData, KWEFKWordLeader* /*leader*/) +static void ProcessOldLayoutChildTag (TQDomNode myNode, void *tagData, KWEFKWordLeader* /*leader*/) { - QValueList<AttrProcessing> attrProcessingList; + TQValueList<AttrProcessing> attrProcessingList; double* d = (double*) ( tagData ); *d = 0.0; // Put a sensible default @@ -240,15 +240,15 @@ static void ProcessOldLayoutChildTag (QDomNode myNode, void *tagData, KWEFKWordL ProcessAttributes (myNode, attrProcessingList); } -static void ProcessUnderlineTag (QDomNode myNode, void *tagData, KWEFKWordLeader* /*leader*/ ) +static void ProcessUnderlineTag (TQDomNode myNode, void *tagData, KWEFKWordLeader* /*leader*/ ) { TextFormatting* text=(TextFormatting*) tagData; - QString str,style; - QString strColor; + TQString str,style; + TQString strColor; text->underlineWord = false; - QValueList<AttrProcessing> attrProcessingList; + TQValueList<AttrProcessing> attrProcessingList; attrProcessingList << AttrProcessing ( "value", str ) @@ -273,14 +273,14 @@ static void ProcessUnderlineTag (QDomNode myNode, void *tagData, KWEFKWordLeader } } -static void ProcessStrikeoutTag (QDomNode myNode, void *tagData, KWEFKWordLeader* /*leader*/ ) +static void ProcessStrikeoutTag (TQDomNode myNode, void *tagData, KWEFKWordLeader* /*leader*/ ) { TextFormatting* text=(TextFormatting*) tagData; - QString type, linestyle; + TQString type, linestyle; text->strikeoutWord = false; - QValueList<AttrProcessing> attrProcessingList; + TQValueList<AttrProcessing> attrProcessingList; attrProcessingList << AttrProcessing ("value" , type ); attrProcessingList << AttrProcessing ("styleline" , linestyle ); attrProcessingList << AttrProcessing ( "wordbyword", text->strikeoutWord ); @@ -301,17 +301,17 @@ static void ProcessStrikeoutTag (QDomNode myNode, void *tagData, KWEFKWordLeader } -void ProcessAnchorTag ( QDomNode myNode, +void ProcessAnchorTag ( TQDomNode myNode, void *tagData, KWEFKWordLeader *leader ) { - QString *instance = (QString *) tagData; + TQString *instance = (TQString *) tagData; - QString type; - *instance = QString::null; - QValueList<AttrProcessing> attrProcessingList; + TQString type; + *instance = TQString(); + TQValueList<AttrProcessing> attrProcessingList; attrProcessingList << AttrProcessing ( "type", type ) - << AttrProcessing ( "instance", "QString", instance ); + << AttrProcessing ( "instance", TQSTRING_OBJECT_NAME_STRING, instance ); ProcessAttributes (myNode, attrProcessingList); if ( type != "frameset" ) @@ -328,13 +328,13 @@ void ProcessAnchorTag ( QDomNode myNode, } -static void ProcessLinkTag (QDomNode myNode, void *tagData, KWEFKWordLeader *) +static void ProcessLinkTag (TQDomNode myNode, void *tagData, KWEFKWordLeader *) { VariableData *variable = (VariableData *) tagData; - QString linkName, hrefName; + TQString linkName, hrefName; - QValueList<AttrProcessing> attrProcessingList; + TQValueList<AttrProcessing> attrProcessingList; attrProcessingList.append ( AttrProcessing ("linkName", linkName) ); attrProcessingList.append ( AttrProcessing ("hrefName", hrefName) ); ProcessAttributes (myNode, attrProcessingList); @@ -343,13 +343,13 @@ static void ProcessLinkTag (QDomNode myNode, void *tagData, KWEFKWordLeader *) } -static void ProcessPgNumTag (QDomNode myNode, void *tagData, KWEFKWordLeader *) +static void ProcessPgNumTag (TQDomNode myNode, void *tagData, KWEFKWordLeader *) { VariableData *variable = (VariableData *) tagData; - QString subtype, value; + TQString subtype, value; - QValueList<AttrProcessing> attrProcessingList; + TQValueList<AttrProcessing> attrProcessingList; attrProcessingList.append ( AttrProcessing ("subtype", subtype) ); attrProcessingList.append ( AttrProcessing ("value", value ) ); ProcessAttributes (myNode, attrProcessingList); @@ -358,24 +358,24 @@ static void ProcessPgNumTag (QDomNode myNode, void *tagData, KWEFKWordLeader *) } -static void ProcessTypeTag (QDomNode myNode, void *tagData, KWEFKWordLeader *) +static void ProcessTypeTag (TQDomNode myNode, void *tagData, KWEFKWordLeader *) { VariableData *variable = (VariableData *) tagData; - QValueList<AttrProcessing> attrProcessingList; + TQValueList<AttrProcessing> attrProcessingList; attrProcessingList.append ( AttrProcessing ("key", variable->m_key ) ); attrProcessingList.append ( AttrProcessing ("text", variable->m_text) ); attrProcessingList.append ( AttrProcessing ("type", variable->m_type) ); ProcessAttributes (myNode, attrProcessingList); } -static void ProcessFieldTag (QDomNode myNode, void *tagData, KWEFKWordLeader *) +static void ProcessFieldTag (TQDomNode myNode, void *tagData, KWEFKWordLeader *) { VariableData *variable = (VariableData *) tagData; int subtype; - QString name, value; + TQString name, value; - QValueList<AttrProcessing> attrProcessingList; + TQValueList<AttrProcessing> attrProcessingList; attrProcessingList.append ( AttrProcessing ("subtype", subtype) ); attrProcessingList.append ( AttrProcessing ("value", value ) ); ProcessAttributes (myNode, attrProcessingList); @@ -397,12 +397,12 @@ static void ProcessFieldTag (QDomNode myNode, void *tagData, KWEFKWordLeader *) variable->setField(name, value); } -static void ProcessFootnoteTag (QDomNode myNode, void *tagData, KWEFKWordLeader *leader) +static void ProcessFootnoteTag (TQDomNode myNode, void *tagData, KWEFKWordLeader *leader) { VariableData *variable = (VariableData *) tagData; - QString frameset, value, numberingtype, notetype; + TQString frameset, value, numberingtype, notetype; - QValueList<AttrProcessing> attrProcessingList; + TQValueList<AttrProcessing> attrProcessingList; attrProcessingList << AttrProcessing ( "value", value ) << AttrProcessing ( "numberingtype", numberingtype ) @@ -422,13 +422,13 @@ static void ProcessFootnoteTag (QDomNode myNode, void *tagData, KWEFKWordLeader } } -static void ProcessNoteTag (QDomNode myNode, void *tagData, KWEFKWordLeader *leader) +static void ProcessNoteTag (TQDomNode myNode, void *tagData, KWEFKWordLeader *leader) { VariableData *variable = (VariableData *) tagData; - QString note; + TQString note; - QValueList<AttrProcessing> attrProcessingList; + TQValueList<AttrProcessing> attrProcessingList; attrProcessingList << AttrProcessing ( "note", note ) ; @@ -438,12 +438,12 @@ static void ProcessNoteTag (QDomNode myNode, void *tagData, KWEFKWordLeader *lea variable->setGenericData( "note", note ); } -// ### TODO: some files have not a <VARIABLE> tag but its supposed children are directly children of <FORMAT id="4"> -static void ProcessVariableTag (QDomNode myNode, void* tagData, KWEFKWordLeader* leader) +// ### TODO: some files have not a <VARIABLE> tag but its supposed tqchildren are directly tqchildren of <FORMAT id="4"> +static void ProcessVariableTag (TQDomNode myNode, void* tagData, KWEFKWordLeader* leader) { VariableData *variable = (VariableData *) tagData; - QValueList<TagProcessing> tagProcessingList; + TQValueList<TagProcessing> tagProcessingList; // "TYPE|PGNUM|DATE|TIME|CUSTOM|SERIALLETTER|FIELD|LINK|NOTE" tagProcessingList << TagProcessing ( "TYPE", ProcessTypeTag, variable ) @@ -460,7 +460,7 @@ static void ProcessVariableTag (QDomNode myNode, void* tagData, KWEFKWordLeader* ProcessSubtags (myNode, tagProcessingList, leader); } -static void AppendTagProcessingFormatOne(QValueList<TagProcessing>& tagProcessingList, FormatData& formatData) +static void AppendTagProcessingFormatOne(TQValueList<TagProcessing>& tagProcessingList, FormatData& formatData) { tagProcessingList << TagProcessing ( "COLOR", ProcessColorAttrTag, &formatData.text.fgColor ) @@ -492,7 +492,7 @@ static void AppendTagProcessingFormatOne(QValueList<TagProcessing>& tagProcessin } -static void SubProcessFormatOneTag(QDomNode myNode, +static void SubProcessFormatOneTag(TQDomNode myNode, ValueListFormatData *formatDataList, int formatPos, int formatLen, KWEFKWordLeader *leader) { @@ -513,7 +513,7 @@ static void SubProcessFormatOneTag(QDomNode myNode, } FormatData formatData(1, formatPos, formatLen); - QValueList<TagProcessing> tagProcessingList; + TQValueList<TagProcessing> tagProcessingList; AppendTagProcessingFormatOne(tagProcessingList,formatData); ProcessSubtags (myNode, tagProcessingList, leader); @@ -521,7 +521,7 @@ static void SubProcessFormatOneTag(QDomNode myNode, } -static void SubProcessFormatTwoTag(QDomNode myNode, +static void SubProcessFormatTwoTag(TQDomNode myNode, ValueListFormatData *formatDataList, int formatPos, int formatLen, KWEFKWordLeader *leader) { @@ -536,9 +536,9 @@ static void SubProcessFormatTwoTag(QDomNode myNode, formatLen = 1; FormatData formatData(2, formatPos, formatLen); - QValueList<TagProcessing> tagProcessingList; + TQValueList<TagProcessing> tagProcessingList; - QString fileName; // KWord 0.8 + TQString fileName; // KWord 0.8 KoPictureKey key; // Re-saved by KWord 1.2 or KWord 1.3 tagProcessingList.append(TagProcessing( "FILENAME", ProcessStringValueTag, &fileName)); tagProcessingList.append(TagProcessing( "PICTURE", ProcessImageTag, &key )); @@ -561,7 +561,7 @@ static void SubProcessFormatTwoTag(QDomNode myNode, } -static void SubProcessFormatThreeTag(QDomNode myNode, +static void SubProcessFormatThreeTag(TQDomNode myNode, ValueListFormatData *formatDataList, int formatPos, int /*formatLen*/, KWEFKWordLeader *leader) { @@ -577,7 +577,7 @@ static void SubProcessFormatThreeTag(QDomNode myNode, (*formatDataList) << formatData; } -static void SubProcessFormatFourTag(QDomNode myNode, +static void SubProcessFormatFourTag(TQDomNode myNode, ValueListFormatData *formatDataList, int formatPos, int formatLen, KWEFKWordLeader *leader) { @@ -588,7 +588,7 @@ static void SubProcessFormatFourTag(QDomNode myNode, return; } FormatData formatData(4, formatPos, formatLen); - QValueList<TagProcessing> tagProcessingList; + TQValueList<TagProcessing> tagProcessingList; tagProcessingList.append(TagProcessing("VARIABLE", ProcessVariableTag, &formatData.variable)); // As variables can have a formating too, we have to process formating AppendTagProcessingFormatOne(tagProcessingList,formatData); @@ -598,16 +598,16 @@ static void SubProcessFormatFourTag(QDomNode myNode, } -static void SubProcessFormatSixTag(QDomNode myNode, +static void SubProcessFormatSixTag(TQDomNode myNode, ValueListFormatData *formatDataList, int formatPos, int formatLen, KWEFKWordLeader *leader) { if ( formatPos != -1 && formatLen != -1 ) { - QString instance; + TQString instance; - QValueList<TagProcessing> tagProcessingList; - // TODO: We can have all layout information as in regular texts + TQValueList<TagProcessing> tagProcessingList; + // TODO: We can have all tqlayout information as in regular texts // They simply apply to the table frames // FONT is just the first that we've come across so far tagProcessingList << TagProcessing ( "FONT" ) @@ -625,14 +625,14 @@ static void SubProcessFormatSixTag(QDomNode myNode, } } -static void ProcessFormatTag (QDomNode myNode, void *tagData, KWEFKWordLeader *leader) +static void ProcessFormatTag (TQDomNode myNode, void *tagData, KWEFKWordLeader *leader) { ValueListFormatData *formatDataList = (ValueListFormatData *) tagData; int formatId = -1; int formatPos = -1; int formatLen = -1; - QValueList<AttrProcessing> attrProcessingList; + TQValueList<AttrProcessing> attrProcessingList; attrProcessingList << AttrProcessing ( "id", formatId ); attrProcessingList << AttrProcessing ( "pos", formatPos ); attrProcessingList << AttrProcessing ( "len", formatLen ); @@ -685,14 +685,14 @@ static void ProcessFormatTag (QDomNode myNode, void *tagData, KWEFKWordLeader *l } -void ProcessFormatsTag ( QDomNode myNode, void *tagData, KWEFKWordLeader *leader ) +void ProcessFormatsTag ( TQDomNode myNode, void *tagData, KWEFKWordLeader *leader ) { ValueListFormatData *formatDataList = (ValueListFormatData *) tagData; AllowNoAttributes (myNode); (*formatDataList).clear (); - QValueList<TagProcessing> tagProcessingList; + TQValueList<TagProcessing> tagProcessingList; tagProcessingList << TagProcessing ( "FORMAT", ProcessFormatTag, formatDataList ); ProcessSubtags (myNode, tagProcessingList, leader); } @@ -701,7 +701,7 @@ void ProcessFormatsTag ( QDomNode myNode, void *tagData, KWEFKWordLeader *leader // -------------------------------------------------------------------------------- -static void ProcessCounterTag ( QDomNode myNode, void *tagData, KWEFKWordLeader *leader ) +static void ProcessCounterTag ( TQDomNode myNode, void *tagData, KWEFKWordLeader *leader ) { CounterData *counter = (CounterData *) tagData; @@ -709,7 +709,7 @@ static void ProcessCounterTag ( QDomNode myNode, void *tagData, KWEFKWordLeader int counterStyle = counter->style; int counterNumbering = counter->numbering; - QValueList<AttrProcessing> attrProcessingList; + TQValueList<AttrProcessing> attrProcessingList; attrProcessingList << AttrProcessing ( "type", counterStyle ); attrProcessingList << AttrProcessing ( "depth", counter->depth ); attrProcessingList << AttrProcessing ( "bullet", counter->customCharacter ); @@ -731,13 +731,13 @@ static void ProcessCounterTag ( QDomNode myNode, void *tagData, KWEFKWordLeader } -static void ProcessLayoutTabulatorTag ( QDomNode myNode, void *tagData, KWEFKWordLeader *leader ) +static void ProcessLayoutTabulatorTag ( TQDomNode myNode, void *tagData, KWEFKWordLeader *leader ) { TabulatorList* tabulatorList = (TabulatorList*) tagData; TabulatorData tabulator; - QValueList<AttrProcessing> attrProcessingList; + TQValueList<AttrProcessing> attrProcessingList; attrProcessingList << AttrProcessing ( "ptpos", tabulator.m_ptpos ) @@ -763,43 +763,43 @@ static void ProcessLayoutTabulatorTag ( QDomNode myNode, void *tagData, KWEFKWor } -static void ProcessIndentsTag (QDomNode myNode, void *tagData, KWEFKWordLeader *leader ) +static void ProcessIndentsTag (TQDomNode myNode, void *tagData, KWEFKWordLeader *leader ) { - LayoutData *layout = (LayoutData *) tagData; + LayoutData *tqlayout = (LayoutData *) tagData; - QValueList<AttrProcessing> attrProcessingList; - attrProcessingList << AttrProcessing ("first" , layout->indentFirst ); - attrProcessingList << AttrProcessing ("left" , layout->indentLeft ); - attrProcessingList << AttrProcessing ("right" , layout->indentRight ); + TQValueList<AttrProcessing> attrProcessingList; + attrProcessingList << AttrProcessing ("first" , tqlayout->indentFirst ); + attrProcessingList << AttrProcessing ("left" , tqlayout->indentLeft ); + attrProcessingList << AttrProcessing ("right" , tqlayout->indentRight ); ProcessAttributes (myNode, attrProcessingList); AllowNoSubtags (myNode, leader); } -static void ProcessLayoutOffsetTag ( QDomNode myNode, void *tagData, KWEFKWordLeader *leader ) +static void ProcessLayoutOffsetTag ( TQDomNode myNode, void *tagData, KWEFKWordLeader *leader ) { - LayoutData *layout = (LayoutData *) tagData; + LayoutData *tqlayout = (LayoutData *) tagData; - QValueList<AttrProcessing> attrProcessingList; - attrProcessingList << AttrProcessing ("after" , layout->marginBottom ); - attrProcessingList << AttrProcessing ("before" , layout->marginTop ); + TQValueList<AttrProcessing> attrProcessingList; + attrProcessingList << AttrProcessing ("after" , tqlayout->marginBottom ); + attrProcessingList << AttrProcessing ("before" , tqlayout->marginTop ); ProcessAttributes (myNode, attrProcessingList); AllowNoSubtags (myNode, leader); } -static void ProcessLineBreakingTag ( QDomNode myNode, void *tagData, KWEFKWordLeader *leader ) +static void ProcessLineBreakingTag ( TQDomNode myNode, void *tagData, KWEFKWordLeader *leader ) { - LayoutData *layout = (LayoutData *) tagData; + LayoutData *tqlayout = (LayoutData *) tagData; - QString strBefore, strAfter; + TQString strBefore, strAfter; - QValueList<AttrProcessing> attrProcessingList; - attrProcessingList << AttrProcessing ( "linesTogether", layout->keepLinesTogether ); - attrProcessingList << AttrProcessing ( "hardFrameBreak", layout->pageBreakBefore ); - attrProcessingList << AttrProcessing ( "hardFrameBreakAfter", layout->pageBreakAfter ); + TQValueList<AttrProcessing> attrProcessingList; + attrProcessingList << AttrProcessing ( "linesTogether", tqlayout->keepLinesTogether ); + attrProcessingList << AttrProcessing ( "hardFrameBreak", tqlayout->pageBreakBefore ); + attrProcessingList << AttrProcessing ( "hardFrameBreakAfter", tqlayout->pageBreakAfter ); attrProcessingList << AttrProcessing ( "keepWithNext" ); // RTF import filter ProcessAttributes (myNode, attrProcessingList); @@ -807,28 +807,28 @@ static void ProcessLineBreakingTag ( QDomNode myNode, void *tagData, KWEFKWordLe } -static void ProcessShadowTag ( QDomNode myNode, void *tagData, KWEFKWordLeader *leader) +static void ProcessShadowTag ( TQDomNode myNode, void *tagData, KWEFKWordLeader *leader) { - LayoutData *layout = (LayoutData *) tagData; + LayoutData *tqlayout = (LayoutData *) tagData; int red=0; int green=0; int blue=0; - QValueList<AttrProcessing> attrProcessingList; - attrProcessingList << AttrProcessing ( "distance", layout->shadowDistance ); - attrProcessingList << AttrProcessing ( "direction", layout->shadowDirection ); + TQValueList<AttrProcessing> attrProcessingList; + attrProcessingList << AttrProcessing ( "distance", tqlayout->shadowDistance ); + attrProcessingList << AttrProcessing ( "direction", tqlayout->shadowDirection ); attrProcessingList << AttrProcessing ( "red", red ); attrProcessingList << AttrProcessing ( "green", green ); attrProcessingList << AttrProcessing ( "blue", blue ); ProcessAttributes (myNode, attrProcessingList); - layout->shadowColor.setRgb(red,green,blue); + tqlayout->shadowColor.setRgb(red,green,blue); AllowNoSubtags (myNode, leader); } -static void ProcessAnyBorderTag ( QDomNode myNode, void *tagData, KWEFKWordLeader *leader ) +static void ProcessAnyBorderTag ( TQDomNode myNode, void *tagData, KWEFKWordLeader *leader ) { BorderData *border = static_cast <BorderData*> (tagData); @@ -836,7 +836,7 @@ static void ProcessAnyBorderTag ( QDomNode myNode, void *tagData, KWEFKWordLeade int green=0; int blue=0; - QValueList<AttrProcessing> attrProcessingList; + TQValueList<AttrProcessing> attrProcessingList; attrProcessingList << AttrProcessing ( "red", red ); attrProcessingList << AttrProcessing ( "green", green ); attrProcessingList << AttrProcessing ( "blue", blue ); @@ -849,18 +849,18 @@ static void ProcessAnyBorderTag ( QDomNode myNode, void *tagData, KWEFKWordLeade AllowNoSubtags (myNode, leader); } -static void ProcessFollowingTag ( QDomNode myNode, void *tagData, KWEFKWordLeader *leader ) +static void ProcessFollowingTag ( TQDomNode myNode, void *tagData, KWEFKWordLeader *leader ) { - ProcessOneAttrTag (myNode, "name", "QString", tagData, leader); + ProcessOneAttrTag (myNode, "name", TQSTRING_OBJECT_NAME_STRING, tagData, leader); } -static void ProcessLinespacingTag (QDomNode myNode, void *tagData, KWEFKWordLeader* /*leader*/ ) +static void ProcessLinespacingTag (TQDomNode myNode, void *tagData, KWEFKWordLeader* /*leader*/ ) { - LayoutData *layout = (LayoutData *) tagData; - QString oldValue, spacingType; + LayoutData *tqlayout = (LayoutData *) tagData; + TQString oldValue, spacingType; double spacingValue; - QValueList<AttrProcessing> attrProcessingList; + TQValueList<AttrProcessing> attrProcessingList; attrProcessingList << AttrProcessing ("value" , oldValue ); attrProcessingList << AttrProcessing ("type" , spacingType ); attrProcessingList << AttrProcessing ("spacingvalue" , spacingValue ); @@ -873,9 +873,9 @@ static void ProcessLinespacingTag (QDomNode myNode, void *tagData, KWEFKWordLead { // for old format if( oldValue == "oneandhalf" ) - layout->lineSpacingType = LayoutData::LS_ONEANDHALF; + tqlayout->lineSpacingType = LayoutData::LS_ONEANDHALF; else if ( oldValue == "double" ) - layout->lineSpacingType = LayoutData::LS_DOUBLE; + tqlayout->lineSpacingType = LayoutData::LS_DOUBLE; else { bool ok = false; @@ -883,57 +883,57 @@ static void ProcessLinespacingTag (QDomNode myNode, void *tagData, KWEFKWordLead if ( ok && ( size >= 0.0 ) ) // 0 is allowed but negative values are not { // We have a valid size - layout->lineSpacingType = LayoutData::LS_CUSTOM; // set to custom - layout->lineSpacing = size; + tqlayout->lineSpacingType = LayoutData::LS_CUSTOM; // set to custom + tqlayout->lineSpacing = size; } else - layout->lineSpacingType = LayoutData::LS_SINGLE; // assume single linespace + tqlayout->lineSpacingType = LayoutData::LS_SINGLE; // assume single linespace } } else { // for new format if( spacingType == "oneandhalf" ) - layout->lineSpacingType = LayoutData::LS_ONEANDHALF; + tqlayout->lineSpacingType = LayoutData::LS_ONEANDHALF; else if ( spacingType == "double" ) - layout->lineSpacingType = LayoutData::LS_DOUBLE; + tqlayout->lineSpacingType = LayoutData::LS_DOUBLE; else if ( spacingType == "custom" ) - layout->lineSpacingType = LayoutData::LS_CUSTOM; + tqlayout->lineSpacingType = LayoutData::LS_CUSTOM; else if ( spacingType == "atleast" ) - layout->lineSpacingType = LayoutData::LS_ATLEAST; + tqlayout->lineSpacingType = LayoutData::LS_ATLEAST; else if ( spacingType == "multiple" ) - layout->lineSpacingType = LayoutData::LS_MULTIPLE; + tqlayout->lineSpacingType = LayoutData::LS_MULTIPLE; else if ( spacingType == "fixed" ) - layout->lineSpacingType = LayoutData::LS_FIXED; + tqlayout->lineSpacingType = LayoutData::LS_FIXED; else - layout->lineSpacingType = LayoutData::LS_SINGLE; // assume single linespace - layout->lineSpacing = spacingValue; + tqlayout->lineSpacingType = LayoutData::LS_SINGLE; // assume single linespace + tqlayout->lineSpacing = spacingValue; } } -static void ProcessLineSpaceTag (QDomNode myNode, void *tagData, KWEFKWordLeader* /*leader*/ ) +static void ProcessLineSpaceTag (TQDomNode myNode, void *tagData, KWEFKWordLeader* /*leader*/ ) { // <LINESPACE> is an old tag, of before syntax 1 - LayoutData *layout = (LayoutData *) tagData; + LayoutData *tqlayout = (LayoutData *) tagData; double spacingValue = 0.0; - QValueList<AttrProcessing> attrProcessingList; + TQValueList<AttrProcessing> attrProcessingList; attrProcessingList << AttrProcessing ( "pt", spacingValue ); attrProcessingList << AttrProcessing ( "mm" ); attrProcessingList << AttrProcessing ( "inch" ); ProcessAttributes (myNode, attrProcessingList); - layout->lineSpacingType = LayoutData::LS_CUSTOM; // set to custom - layout->lineSpacing = spacingValue; + tqlayout->lineSpacingType = LayoutData::LS_CUSTOM; // set to custom + tqlayout->lineSpacing = spacingValue; } -static void ProcessFlowTag ( QDomNode myNode, void *tagData, KWEFKWordLeader *leader ) +static void ProcessFlowTag ( TQDomNode myNode, void *tagData, KWEFKWordLeader *leader ) { - LayoutData *layout = (LayoutData *) tagData; + LayoutData *tqlayout = (LayoutData *) tagData; - QString oldAlign, normalAlign; + TQString oldAlign, normalAlign; - QValueList<AttrProcessing> attrProcessingList; + TQValueList<AttrProcessing> attrProcessingList; if ( leader->m_oldSyntax ) { // KWord 0.8 @@ -948,7 +948,7 @@ static void ProcessFlowTag ( QDomNode myNode, void *tagData, KWEFKWordLeader *le { if ( oldAlign.isEmpty() ) { - layout->alignment = "left"; // KWord 0.8 did not support right-to-left + tqlayout->tqalignment = "left"; // KWord 0.8 did not support right-to-left } else { @@ -956,61 +956,61 @@ static void ProcessFlowTag ( QDomNode myNode, void *tagData, KWEFKWordLeader *le if ( ( align < 0 ) || ( align > 3) ) { kdWarning(30508) << "KWord 0.8 flow unknown: " << oldAlign << endl; - layout->alignment = "left"; // Unknown, so assume left + tqlayout->tqalignment = "left"; // Unknown, so assume left } else { const char* flows[]={"left", "right", "center", "justify" }; - layout->alignment = flows[ align ]; + tqlayout->tqalignment = flows[ align ]; } } - kdDebug(30508) << "KWord 0.8 flow: " << oldAlign << " corrected: " << layout->alignment << endl; + kdDebug(30508) << "KWord 0.8 flow: " << oldAlign << " corrected: " << tqlayout->tqalignment << endl; } else { - layout->alignment = normalAlign; + tqlayout->tqalignment = normalAlign; } } -void ProcessLayoutTag ( QDomNode myNode, void *tagData, KWEFKWordLeader *leader ) +void ProcessLayoutTag ( TQDomNode myNode, void *tagData, KWEFKWordLeader *leader ) // Processes <LAYOUT> and <STYLE> { - QValueList<AttrProcessing> attrProcessingList; + TQValueList<AttrProcessing> attrProcessingList; attrProcessingList << AttrProcessing ( "outline" ); // Only in <STYLE> ProcessAttributes (myNode, attrProcessingList); - LayoutData *layout = (LayoutData *) tagData; + LayoutData *tqlayout = (LayoutData *) tagData; ValueListFormatData formatDataList; - QValueList<TagProcessing> tagProcessingList; - tagProcessingList << TagProcessing ( "NAME", ProcessStringValueTag, &layout->styleName ); - tagProcessingList << TagProcessing ( "FOLLOWING", ProcessFollowingTag, &layout->styleFollowing ); - tagProcessingList << TagProcessing ( "FLOW", ProcessFlowTag, layout ); - tagProcessingList << TagProcessing ( "INDENTS", ProcessIndentsTag, layout ); - tagProcessingList << TagProcessing ( "OFFSETS", ProcessLayoutOffsetTag, layout ); - tagProcessingList << TagProcessing ( "LINESPACING", ProcessLinespacingTag, layout ); - tagProcessingList << TagProcessing ( "PAGEBREAKING", ProcessLineBreakingTag, layout ); - tagProcessingList << TagProcessing ( "LEFTBORDER", ProcessAnyBorderTag, &layout->leftBorder ); - tagProcessingList << TagProcessing ( "RIGHTBORDER", ProcessAnyBorderTag, &layout->rightBorder ); - tagProcessingList << TagProcessing ( "TOPBORDER", ProcessAnyBorderTag, &layout->topBorder ); - tagProcessingList << TagProcessing ( "BOTTOMBORDER", ProcessAnyBorderTag, &layout->bottomBorder ); - tagProcessingList << TagProcessing ( "COUNTER", ProcessCounterTag, &layout->counter ); + TQValueList<TagProcessing> tagProcessingList; + tagProcessingList << TagProcessing ( "NAME", ProcessStringValueTag, &tqlayout->styleName ); + tagProcessingList << TagProcessing ( "FOLLOWING", ProcessFollowingTag, &tqlayout->styleFollowing ); + tagProcessingList << TagProcessing ( "FLOW", ProcessFlowTag, tqlayout ); + tagProcessingList << TagProcessing ( "INDENTS", ProcessIndentsTag, tqlayout ); + tagProcessingList << TagProcessing ( "OFFSETS", ProcessLayoutOffsetTag, tqlayout ); + tagProcessingList << TagProcessing ( "LINESPACING", ProcessLinespacingTag, tqlayout ); + tagProcessingList << TagProcessing ( "PAGEBREAKING", ProcessLineBreakingTag, tqlayout ); + tagProcessingList << TagProcessing ( "LEFTBORDER", ProcessAnyBorderTag, &tqlayout->leftBorder ); + tagProcessingList << TagProcessing ( "RIGHTBORDER", ProcessAnyBorderTag, &tqlayout->rightBorder ); + tagProcessingList << TagProcessing ( "TOPBORDER", ProcessAnyBorderTag, &tqlayout->topBorder ); + tagProcessingList << TagProcessing ( "BOTTOMBORDER", ProcessAnyBorderTag, &tqlayout->bottomBorder ); + tagProcessingList << TagProcessing ( "COUNTER", ProcessCounterTag, &tqlayout->counter ); tagProcessingList << TagProcessing ( "FORMAT", ProcessFormatTag, &formatDataList ); - tagProcessingList << TagProcessing ( "TABULATOR", ProcessLayoutTabulatorTag, &layout->tabulatorList ); - tagProcessingList << TagProcessing ( "SHADOW", ProcessShadowTag, layout ); + tagProcessingList << TagProcessing ( "TABULATOR", ProcessLayoutTabulatorTag, &tqlayout->tabulatorList ); + tagProcessingList << TagProcessing ( "SHADOW", ProcessShadowTag, tqlayout ); if ( leader->m_oldSyntax ) { - layout->indentLeft = 0.0; // ### TODO: needed or not? + tqlayout->indentLeft = 0.0; // ### TODO: needed or not? tagProcessingList - << TagProcessing ( "OHEAD", ProcessOldLayoutChildTag, &layout->marginTop ) - << TagProcessing ( "OFOOT", ProcessOldLayoutChildTag, &layout->marginBottom ) - << TagProcessing ( "ILEFT", ProcessOldLayoutChildTag, &layout->indentLeft ) - << TagProcessing ( "IFIRST", ProcessOldLayoutChildTag, &layout->indentFirst ) - << TagProcessing ( "LINESPACE", ProcessLineSpaceTag, layout ) + << TagProcessing ( "OHEAD", ProcessOldLayoutChildTag, &tqlayout->marginTop ) + << TagProcessing ( "OFOOT", ProcessOldLayoutChildTag, &tqlayout->marginBottom ) + << TagProcessing ( "ILEFT", ProcessOldLayoutChildTag, &tqlayout->indentLeft ) + << TagProcessing ( "IFIRST", ProcessOldLayoutChildTag, &tqlayout->indentFirst ) + << TagProcessing ( "LINESPACE", ProcessLineSpaceTag, tqlayout ) ; } @@ -1023,7 +1023,7 @@ void ProcessLayoutTag ( QDomNode myNode, void *tagData, KWEFKWordLeader *leader } else { - layout->formatData = formatDataList.first (); + tqlayout->formatData = formatDataList.first (); if ( formatDataList.count () > 1 ) { @@ -1031,16 +1031,16 @@ void ProcessLayoutTag ( QDomNode myNode, void *tagData, KWEFKWordLeader *leader } } - if ( layout->styleName.isEmpty () ) + if ( tqlayout->styleName.isEmpty () ) { - layout->styleName = "Standard"; - kdWarning (30508) << "Empty layout name!" << endl; + tqlayout->styleName = "Standard"; + kdWarning (30508) << "Empty tqlayout name!" << endl; } } -static void ProcessImageKeyTag ( QDomNode myNode, +static void ProcessImageKeyTag ( TQDomNode myNode, void *tagData, KWEFKWordLeader *) { KoPictureKey *key = (KoPictureKey*) tagData; @@ -1049,14 +1049,14 @@ static void ProcessImageKeyTag ( QDomNode myNode, key->loadAttributes(myNode.toElement()); } -void ProcessImageTag ( QDomNode myNode, +void ProcessImageTag ( TQDomNode myNode, void *tagData, KWEFKWordLeader *leader ) { // <PICTURE> - QValueList<AttrProcessing> attrProcessingList; + TQValueList<AttrProcessing> attrProcessingList; attrProcessingList << AttrProcessing ( "keepAspectRatio" ); ProcessAttributes (myNode, attrProcessingList); - QValueList<TagProcessing> tagProcessingList; + TQValueList<TagProcessing> tagProcessingList; tagProcessingList << TagProcessing ( "KEY", ProcessImageKeyTag, tagData ); ProcessSubtags (myNode, tagProcessingList, leader); } diff --git a/filters/kword/libexport/ProcessDocument.h b/filters/kword/libexport/ProcessDocument.h index cde4dfdc..cb0b74d6 100644 --- a/filters/kword/libexport/ProcessDocument.h +++ b/filters/kword/libexport/ProcessDocument.h @@ -21,31 +21,31 @@ #ifndef PROCESS_DOCUMENT_H #define PROCESS_DOCUMENT_H -#include <qdom.h> +#include <tqdom.h> class KWEFKWordLeader; /** * @internal */ -void ProcessLayoutTag ( QDomNode myNode, void *tagData, KWEFKWordLeader *leader ); +void ProcessLayoutTag ( TQDomNode myNode, void *tagData, KWEFKWordLeader *leader ); /** * @internal */ -void ProcessFormatsTag ( QDomNode myNode, void *tagData, KWEFKWordLeader *leader ); +void ProcessFormatsTag ( TQDomNode myNode, void *tagData, KWEFKWordLeader *leader ); /** * @internal */ -void ProcessTextTag ( QDomNode myNode, void *tagData, KWEFKWordLeader *leader ); +void ProcessTextTag ( TQDomNode myNode, void *tagData, KWEFKWordLeader *leader ); /** * @internal */ -void ProcessDocumentInfoTag ( QDomNode myNode, void *tagData, KWEFKWordLeader *leader ); +void ProcessDocumentInfoTag ( TQDomNode myNode, void *tagData, KWEFKWordLeader *leader ); /** * @internal * @since 1.4 (made public) */ -void ProcessImageTag ( QDomNode myNode, void *tagData, KWEFKWordLeader *leader ); +void ProcessImageTag ( TQDomNode myNode, void *tagData, KWEFKWordLeader *leader ); #endif /* PROCESS_DOCUMENT_H */ diff --git a/filters/kword/libexport/TagProcessing.cc b/filters/kword/libexport/TagProcessing.cc index a640255e..ca47f1ef 100644 --- a/filters/kword/libexport/TagProcessing.cc +++ b/filters/kword/libexport/TagProcessing.cc @@ -34,7 +34,7 @@ */ #include <kdebug.h> -#include <qdom.h> +#include <tqdom.h> #include "TagProcessing.h" @@ -42,21 +42,21 @@ // #define DEBUG_KWORD_IGNORED_TAGS -void ProcessSubtags ( const QDomNode &parentNode, - QValueList<TagProcessing> &tagProcessingList, +void ProcessSubtags ( const TQDomNode &tqparentNode, + TQValueList<TagProcessing> &tagProcessingList, KWEFKWordLeader *leader) { - //kdDebug(30508) << "Starting ProcessSubtags for node: " << parentNode.nodeName() << endl; + //kdDebug(30508) << "Starting ProcessSubtags for node: " << tqparentNode.nodeName() << endl; - QDomNode childNode; + TQDomNode childNode; - for ( childNode = parentNode.firstChild (); !childNode.isNull (); childNode = childNode.nextSibling () ) + for ( childNode = tqparentNode.firstChild (); !childNode.isNull (); childNode = childNode.nextSibling () ) { if ( childNode.isElement () ) { bool found = false; - QValueList<TagProcessing>::Iterator tagProcessingIt; + TQValueList<TagProcessing>::Iterator tagProcessingIt; for ( tagProcessingIt = tagProcessingList.begin (); tagProcessingIt != tagProcessingList.end (); @@ -74,7 +74,7 @@ void ProcessSubtags ( const QDomNode &parentNode, else { kdDebug(30508) << "Ignoring " << childNode.nodeName () - << " tag in " << parentNode.nodeName () << endl; + << " tag in " << tqparentNode.nodeName () << endl; } #endif break; @@ -84,31 +84,31 @@ void ProcessSubtags ( const QDomNode &parentNode, if ( !found ) { kdDebug(30508) << "Unexpected tag " << childNode.nodeName () - << " in " << parentNode.nodeName () << "!" << endl; + << " in " << tqparentNode.nodeName () << "!" << endl; } } } - //kdDebug(30508) << "Ending ProcessSubtags for node: " << parentNode.nodeName() << endl; + //kdDebug(30508) << "Ending ProcessSubtags for node: " << tqparentNode.nodeName() << endl; } -void AllowNoSubtags ( const QDomNode& myNode, KWEFKWordLeader *leader ) +void AllowNoSubtags ( const TQDomNode& myNode, KWEFKWordLeader *leader ) { #ifdef DEBUG_KWORD_TAGS - QString outputText; - QValueList<TagProcessing> tagProcessingList; + TQString outputText; + TQValueList<TagProcessing> tagProcessingList; ProcessSubtags (myNode, tagProcessingList, leader); #else @_UNUSED( leader ): #endif } -AttrProcessing::AttrProcessing ( const QString& n, const QString& t, void *d ) +AttrProcessing::AttrProcessing ( const TQString& n, const TQString& t, void *d ) : name (n), data (d) { if ( t == "int" ) type = AttrInt; - else if ( t == "QString" ) - type = AttrQString; + else if ( t == TQSTRING_OBJECT_NAME_STRING ) + type = AttrTQString; else if ( t == "double" ) type = AttrDouble; else if ( t == "bool" ) @@ -123,22 +123,22 @@ AttrProcessing::AttrProcessing ( const QString& n, const QString& t, void *d ) } -void ProcessAttributes ( const QDomNode &myNode, - QValueList<AttrProcessing> &attrProcessingList ) +void ProcessAttributes ( const TQDomNode &myNode, + TQValueList<AttrProcessing> &attrProcessingList ) { //kdDebug(30508) << "Starting ProcessAttributes for node: " << myNode.nodeName() << endl; - QDomNamedNodeMap myAttribs ( myNode.attributes () ); + TQDomNamedNodeMap myAttribs ( myNode.attributes () ); //kdDebug(30508) << "Attributes = " << myAttribs.length () <<endl; for ( uint i = 0; i < myAttribs.length (); i++ ) { - QDomAttr myAttrib ( myAttribs.item (i).toAttr () ); + TQDomAttr myAttrib ( myAttribs.item (i).toAttr () ); if ( !myAttrib.isNull () ) { bool found = false; - QValueList<AttrProcessing>::Iterator attrProcessingIt; + TQValueList<AttrProcessing>::Iterator attrProcessingIt; for ( attrProcessingIt = attrProcessingList.begin (); attrProcessingIt != attrProcessingList.end (); @@ -153,9 +153,9 @@ void ProcessAttributes ( const QDomNode &myNode, { switch ( (*attrProcessingIt).type ) { - case AttrProcessing::AttrQString: + case AttrProcessing::AttrTQString: { - *((QString *) (*attrProcessingIt).data) = myAttrib.value (); + *((TQString *) (*attrProcessingIt).data) = myAttrib.value (); break; } case AttrProcessing::AttrInt: @@ -170,7 +170,7 @@ void ProcessAttributes ( const QDomNode &myNode, } case AttrProcessing::AttrBool: { - const QString strAttr ( myAttrib.value().simplifyWhiteSpace() ); + const TQString strAttr ( myAttrib.value().simplifyWhiteSpace() ); bool flag; if ((strAttr=="yes")||(strAttr=="1")||(strAttr=="true")) { @@ -224,10 +224,10 @@ void ProcessAttributes ( const QDomNode &myNode, //kdDebug(30508) << "Ending ProcessAttributes for node: " << myNode.nodeName() << endl; } -void AllowNoAttributes ( const QDomNode & myNode ) +void AllowNoAttributes ( const TQDomNode & myNode ) { #ifdef DEBUG_KWORD_TAGS - QValueList<AttrProcessing> attrProcessingList; + TQValueList<AttrProcessing> attrProcessingList; ProcessAttributes (myNode, attrProcessingList); #else Q_UNUSED( myNode ); diff --git a/filters/kword/libexport/TagProcessing.h b/filters/kword/libexport/TagProcessing.h index 85cfa37d..01080d50 100644 --- a/filters/kword/libexport/TagProcessing.h +++ b/filters/kword/libexport/TagProcessing.h @@ -34,8 +34,8 @@ #ifndef EXPORTTAGPROCESSING_H #define EXPORTTAGPROCESSING_H -#include <qdom.h> -#include <qvaluelist.h> +#include <tqdom.h> +#include <tqvaluelist.h> #include <kdemacros.h> #include <kdebug.h> @@ -47,7 +47,7 @@ class KWEFKWordLeader; * AllowNoSubtags () allow for easing parsing of subtags in the * current tag. If don't expect any subtags you call AllowNoSubtags (). * Otherwise you create a list of TagProcessing elements and pass that - * to ProcessSubtags () which will go through all subtags it can find, + * to ProcessSubtags () which will go through all subtags it can tqfind, * call the corresponding processing function, and do all the * necessary error handling. */ @@ -58,8 +58,8 @@ class TagProcessing TagProcessing () {} - TagProcessing (const QString& n, - void (*p)(QDomNode, void *, KWEFKWordLeader*), + TagProcessing (const TQString& n, + void (*p)(TQDomNode, void *, KWEFKWordLeader*), void *d) : name (n), processor (p), data (d) {} @@ -68,19 +68,19 @@ class TagProcessing * * Avoids a warning that a tag is unknown. */ - TagProcessing (const QString& _name) : name(_name), processor(0), data(0) + TagProcessing (const TQString& _name) : name(_name), processor(0), data(0) {} - QString name; - void (*processor)(QDomNode, void *, KWEFKWordLeader*); + TQString name; + void (*processor)(TQDomNode, void *, KWEFKWordLeader*); void *data; }; -void ProcessSubtags ( const QDomNode &parentNode, - QValueList<TagProcessing> &tagProcessingList, +void ProcessSubtags ( const TQDomNode &tqparentNode, + TQValueList<TagProcessing> &tagProcessingList, KWEFKWordLeader *leader); -void AllowNoSubtags ( const QDomNode& myNode, KWEFKWordLeader *leader ); +void AllowNoSubtags ( const TQDomNode& myNode, KWEFKWordLeader *leader ); /** @@ -89,7 +89,7 @@ void AllowNoSubtags ( const QDomNode& myNode, KWEFKWordLeader *leader ); * attributes. If don't expect any attributes you call AllowNoAttributes (). * Otherwise you create a list of AttrProcessing elements and pass * that to ProcessAttributes () which will go through all attributes - * it can find, retrieve the value in the datatype defined, and do all + * it can tqfind, retrieve the value in the datatype defined, and do all * the necessary error handling. */ @@ -98,7 +98,7 @@ class AttrProcessing public: enum AttrType - { AttrNull = 0, AttrInt, AttrDouble, AttrBool, AttrQString }; + { AttrNull = 0, AttrInt, AttrDouble, AttrBool, AttrTQString }; /** * @brief Default constructor @@ -109,14 +109,14 @@ public: * @brief Old constructor (without type checking) * @deprecated do not use for new code */ - AttrProcessing ( const QString& n, const QString& t, void *d ) KDE_DEPRECATED; + AttrProcessing ( const TQString& n, const TQString& t, void *d ) KDE_DEPRECATED; /** * @brief No-op constructor * * This just avoids that a warning is triggered that an attribute is not known */ - AttrProcessing ( const QString& _name ) + AttrProcessing ( const TQString& _name ) : name( _name ), type( AttrNull ), data( 0 ) {} /** @@ -124,7 +124,7 @@ public: * * Get the attribute value as an integer */ - AttrProcessing ( const QString& _name, int& i ) + AttrProcessing ( const TQString& _name, int& i ) : name( _name ), type( AttrInt ), data( &i ) {} /** @@ -132,7 +132,7 @@ public: * * Get the attribute value as a double */ - AttrProcessing ( const QString& _name, double& d ) + AttrProcessing ( const TQString& _name, double& d ) : name( _name ), type( AttrDouble ), data( &d ) {} /** @@ -141,27 +141,27 @@ public: * Get the attribute value as a bool * (The values "yes,", "no", "true", "false", "0" and "1" are supported) */ - AttrProcessing ( const QString& _name, bool& flag ) + AttrProcessing ( const TQString& _name, bool& flag ) : name( _name ), type( AttrBool ), data( &flag ) {} /** * @brief String constructor * - * Get the attribute value as a QString + * Get the attribute value as a TQString */ - AttrProcessing ( const QString& _name, QString& str ) - : name( _name ), type( AttrQString ), data( &str ) {} + AttrProcessing ( const TQString& _name, TQString& str ) + : name( _name ), type( AttrTQString ), data( &str ) {} public: - QString name; + TQString name; AttrType type; void *data; }; -void ProcessAttributes ( const QDomNode &myNode, - QValueList<AttrProcessing> &attrProcessingList ); +void ProcessAttributes ( const TQDomNode &myNode, + TQValueList<AttrProcessing> &attrProcessingList ); -void AllowNoAttributes ( const QDomNode& myNode ); +void AllowNoAttributes ( const TQDomNode& myNode ); #endif diff --git a/filters/kword/msword/conversion.cpp b/filters/kword/msword/conversion.cpp index 18153b36..4b221051 100644 --- a/filters/kword/msword/conversion.cpp +++ b/filters/kword/msword/conversion.cpp @@ -24,54 +24,54 @@ #include <wv2/fields.h> #include <kdebug.h> -#include <qregexp.h> -#include <qdom.h> +#include <tqregexp.h> +#include <tqdom.h> #include <klocale.h> -QColor Conversion::color(int number, int defaultcolor, bool defaultWhite) +TQColor Conversion::color(int number, int defaultcolor, bool defaultWhite) { switch(number) { case 0: if(defaultWhite) - return Qt::white; + return TQt::white; case 1: - return Qt::black; + return TQt::black; case 2: - return Qt::blue; + return TQt::blue; case 3: - return Qt::cyan; + return TQt::cyan; case 4: - return Qt::green; + return TQt::green; case 5: - return Qt::magenta; + return TQt::magenta; case 6: - return Qt::red; + return TQt::red; case 7: - return Qt::yellow; + return TQt::yellow; case 8: - return Qt::white; + return TQt::white; case 9: - return Qt::darkBlue; + return TQt::darkBlue; case 10: - return Qt::darkCyan; + return TQt::darkCyan; case 11: - return Qt::darkGreen; + return TQt::darkGreen; case 12: - return Qt::darkMagenta; + return TQt::darkMagenta; case 13: - return Qt::darkRed; + return TQt::darkRed; case 14: - return Qt::darkYellow; + return TQt::darkYellow; case 15: - return Qt::darkGray; + return TQt::darkGray; case 16: - return Qt::lightGray; + return TQt::lightGray; default: kdDebug(30513) << "Conversion::color: unknown color: " << number << endl; if(defaultcolor == -1) - return QColor("black"); + return TQColor("black"); else return color(defaultcolor, -1); } @@ -79,21 +79,21 @@ QColor Conversion::color(int number, int defaultcolor, bool defaultWhite) int Conversion::fillPatternStyle( int ipat ) { - // See $QTDIR/doc/html/qbrush.html#setStyle + // See $TQTDIR/doc/html/qbrush.html#setStyle switch( ipat ) { - case 0: // Automatic (Apparently it means Solid from background color instead of foreground) + case 0: // Automatic (Aptqparently it means Solid from background color instead of foreground) case 1: // Solid - return Qt::SolidPattern; + return TQt::SolidPattern; case 2: // 5% case 35: // 2.5 Percent case 36: // 7.5 Percent - return Qt::Dense7Pattern; + return TQt::Dense7Pattern; case 3: // 10% case 37: // 12.5 Percent case 38: // 15 Percent case 39: // 17.5 Percent case 4: // 20% - return Qt::Dense6Pattern; + return TQt::Dense6Pattern; case 40: // 22.5 Percent case 5: // 25% case 41: // 27.5 Percent @@ -102,14 +102,14 @@ int Conversion::fillPatternStyle( int ipat ) case 43: // 35 Percent case 44: // 37.5 Percent case 7: // 40% - return Qt::Dense5Pattern; + return TQt::Dense5Pattern; case 45: // 42.5 Percent case 46: // 45 Percent case 47: // 47.5 Percent case 8: // 50% case 48: // 52.5 Percent case 49: // 55 Percent - return Qt::Dense4Pattern; + return TQt::Dense4Pattern; case 50: // 57.5 Percent case 9: // 60% case 51: // 62.5 Percent @@ -117,7 +117,7 @@ int Conversion::fillPatternStyle( int ipat ) case 53: // 67.5 Percent case 10: // 70% case 54: // 72.5 Percent - return Qt::Dense3Pattern; + return TQt::Dense3Pattern; case 11: // 75% case 55: // 77.5 Percent case 12: // 80% @@ -125,33 +125,33 @@ int Conversion::fillPatternStyle( int ipat ) case 57: // 85 Percent case 58: // 87.5 Percent case 13: // 90% - return Qt::Dense2Pattern; + return TQt::Dense2Pattern; case 59: // 92.5 Percent case 60: // 95 Percent case 61: // 97.5 Percent case 62: // 97 Percent - return Qt::Dense1Pattern; - case 14: // Dark Horizontal - case 20: // Horizontal - return Qt::HorPattern; - case 15: // Dark Vertical - case 21: // Vertical - return Qt::VerPattern; + return TQt::Dense1Pattern; + case 14: // DarkQt::Horizontal + case 20: //Qt::Horizontal + return TQt::HorPattern; + case 15: // DarkQt::Vertical + case 21: //Qt::Vertical + return TQt::VerPattern; case 16: // Dark Forward Diagonal case 22: // Forward Diagonal - return Qt::FDiagPattern; + return TQt::FDiagPattern; case 17: // Dark Backward Diagonal case 23: // Backward Diagonal - return Qt::BDiagPattern; + return TQt::BDiagPattern; case 18: // Dark Cross case 24: // Cross - return Qt::CrossPattern; + return TQt::CrossPattern; case 19: // Dark Diagonal Cross case 25: // Diagonal Cross - return Qt::DiagCrossPattern; + return TQt::DiagCrossPattern; default: kdWarning(30513) << "Unhandled undocumented SHD ipat value: " << ipat << endl; - return Qt::NoBrush; + return TQt::NoBrush; } } @@ -161,93 +161,93 @@ int Conversion::ditheringToGray( int ipat, bool* ok ) *ok = true; // optimistic ;) switch( ipat ) { case 2: // 5% - return 255 - qRound(0.05 * 255); + return 255 - tqRound(0.05 * 255); case 35: // 2.5 Percent - return 255 - qRound(0.025 * 255); + return 255 - tqRound(0.025 * 255); case 36: // 7.5 Percent - return 255 - qRound(0.075 * 255); + return 255 - tqRound(0.075 * 255); case 3: // 10% - return 255 - qRound(0.1 * 255); + return 255 - tqRound(0.1 * 255); case 37: // 12.5 Percent - return 255 - qRound(0.125 * 255); + return 255 - tqRound(0.125 * 255); case 38: // 15 Percent - return 255 - qRound(0.15 * 255); + return 255 - tqRound(0.15 * 255); case 39: // 17.5 Percent - return 255 - qRound(0.175 * 255); + return 255 - tqRound(0.175 * 255); case 4: // 20% - return 255 - qRound(0.2 * 255); + return 255 - tqRound(0.2 * 255); case 40: // 22.5 Percent - return 255 - qRound(0.225 * 255); + return 255 - tqRound(0.225 * 255); case 5: // 25% - return 255 - qRound(0.25 * 255); + return 255 - tqRound(0.25 * 255); case 41: // 27.5 Percent - return 255 - qRound(0.275 * 255); + return 255 - tqRound(0.275 * 255); case 6: // 30% - return 255 - qRound(0.3 * 255); + return 255 - tqRound(0.3 * 255); case 42: // 32.5 Percent - return 255 - qRound(0.325 * 255); + return 255 - tqRound(0.325 * 255); case 43: // 35 Percent - return 255 - qRound(0.35 * 255); + return 255 - tqRound(0.35 * 255); case 44: // 37.5 Percent - return 255 - qRound(0.375 * 255); + return 255 - tqRound(0.375 * 255); case 7: // 40% - return 255 - qRound(0.4 * 255); + return 255 - tqRound(0.4 * 255); case 45: // 42.5 Percent - return 255 - qRound(0.425 * 255); + return 255 - tqRound(0.425 * 255); case 46: // 45 Percent - return 255 - qRound(0.45 * 255); + return 255 - tqRound(0.45 * 255); case 47: // 47.5 Percent - return 255 - qRound(0.475 * 255); + return 255 - tqRound(0.475 * 255); case 8: // 50% - return 255 - qRound(0.5 * 255); + return 255 - tqRound(0.5 * 255); case 48: // 52.5 Percent - return 255 - qRound(0.525 * 255); + return 255 - tqRound(0.525 * 255); case 49: // 55 Percent - return 255 - qRound(0.55 * 255); + return 255 - tqRound(0.55 * 255); case 50: // 57.5 Percent - return 255 - qRound(0.575 * 255); + return 255 - tqRound(0.575 * 255); case 9: // 60% - return 255 - qRound(0.6 * 255); + return 255 - tqRound(0.6 * 255); case 51: // 62.5 Percent - return 255 - qRound(0.625 * 255); + return 255 - tqRound(0.625 * 255); case 52: // 65 Percent - return 255 - qRound(0.65 * 255); + return 255 - tqRound(0.65 * 255); case 53: // 67.5 Percent - return 255 - qRound(0.675 * 255); + return 255 - tqRound(0.675 * 255); case 10: // 70% - return 255 - qRound(0.7 * 255); + return 255 - tqRound(0.7 * 255); case 54: // 72.5 Percent - return 255 - qRound(0.725 * 255); + return 255 - tqRound(0.725 * 255); case 11: // 75% - return 255 - qRound(0.75 * 255); + return 255 - tqRound(0.75 * 255); case 55: // 77.5 Percent - return 255 - qRound(0.775 * 255); + return 255 - tqRound(0.775 * 255); case 12: // 80% - return 255 - qRound(0.8 * 255); + return 255 - tqRound(0.8 * 255); case 56: // 82.5 Percent - return 255 - qRound(0.825 * 255); + return 255 - tqRound(0.825 * 255); case 57: // 85 Percent - return 255 - qRound(0.85 * 255); + return 255 - tqRound(0.85 * 255); case 58: // 87.5 Percent - return 255 - qRound(0.875 * 255); + return 255 - tqRound(0.875 * 255); case 13: // 90% - return 255 - qRound(0.9 * 255); + return 255 - tqRound(0.9 * 255); case 59: // 92.5 Percent - return 255 - qRound(0.925 * 255); + return 255 - tqRound(0.925 * 255); case 60: // 95 Percent - return 255 - qRound(0.95 * 255); + return 255 - tqRound(0.95 * 255); case 61: // 97.5 Percent - return 255 - qRound(0.975 * 255); + return 255 - tqRound(0.975 * 255); case 62: // 97 Percent - return 255 - qRound(0.97 * 255); + return 255 - tqRound(0.97 * 255); default: *ok = false; return 0; } } -QString Conversion::alignment( int jc ) { - QString value( "left" ); +TQString Conversion::tqalignment( int jc ) { + TQString value( "left" ); if ( jc == 1 ) value = "center"; else if ( jc == 2 ) @@ -257,14 +257,14 @@ QString Conversion::alignment( int jc ) { return value; } -QString Conversion::lineSpacing( const wvWare::Word97::LSPD& lspd ) +TQString Conversion::lineSpacing( const wvWare::Word97::LSPD& lspd ) { - QString value( "0" ); + TQString value( "0" ); if ( lspd.fMultLinespace == 1 ) { // This will be e.g. 1.5 for a 1.5 linespacing. float proportionalLineSpacing = (float)lspd.dyaLine / 240.0; - if ( QABS(proportionalLineSpacing - 1.5) <= 0.25 ) // close to 1.5? + if ( TQABS(proportionalLineSpacing - 1.5) <= 0.25 ) // close to 1.5? value = "oneandhalf"; else if ( proportionalLineSpacing > 1.75) // close to 2.0, or more? value = "double"; @@ -272,7 +272,7 @@ QString Conversion::lineSpacing( const wvWare::Word97::LSPD& lspd ) else if ( lspd.fMultLinespace == 0 ) { // see sprmPDyaLine in generator_wword8.htm - //float value = QABS((float)lspd.dyaLine / 20.0); // twip -> pt + //float value = TQABS((float)lspd.dyaLine / 20.0); // twip -> pt // lspd.dyaLine > 0 means "at least", < 0 means "exactly" // "at least" is now possible in kword, but here it's the size of the whole // line, not the spacing between the line (!) @@ -285,22 +285,22 @@ QString Conversion::lineSpacing( const wvWare::Word97::LSPD& lspd ) return value; } -void Conversion::setColorAttributes( QDomElement& element, int ico, const QString& prefix, bool defaultWhite ) +void Conversion::setColorAttributes( TQDomElement& element, int ico, const TQString& prefix, bool defaultWhite ) { - QColor color = Conversion::color( ico, -1, defaultWhite ); + TQColor color = Conversion::color( ico, -1, defaultWhite ); element.setAttribute( prefix.isNull() ? "red" : prefix+"Red", color.red() ); element.setAttribute( prefix.isNull() ? "blue" : prefix+"Blue", color.blue() ); element.setAttribute( prefix.isNull() ? "green" : prefix+"Green", color.green() ); } -void Conversion::setBorderAttributes( QDomElement& borderElement, const wvWare::Word97::BRC& brc, const QString& prefix ) +void Conversion::setBorderAttributes( TQDomElement& borderElement, const wvWare::Word97::BRC& brc, const TQString& prefix ) { setColorAttributes( borderElement, brc.cv, prefix, false ); borderElement.setAttribute( prefix.isNull() ? "width" : prefix+"Width", (double)brc.dptLineWidth / 8.0 ); - QString style = "0"; // KWord: solid + TQString style = "0"; // KWord: solid switch ( brc.brcType ) { case 0: // none Q_ASSERT( brc.dptLineWidth == 0 ); // otherwise kword will show a border! @@ -373,7 +373,7 @@ int Conversion::headerTypeToFrameInfo( unsigned char type ) return 0; } -QString Conversion::headerTypeToFramesetName( unsigned char type ) +TQString Conversion::headerTypeToFramesetName( unsigned char type ) { switch (type) { case wvWare::HeaderData::HeaderEven: @@ -389,7 +389,7 @@ QString Conversion::headerTypeToFramesetName( unsigned char type ) case wvWare::HeaderData::FooterFirst: return i18n("First Page Footer"); } - return QString::null; + return TQString(); } bool Conversion::isHeader( unsigned char type ) @@ -403,21 +403,21 @@ bool Conversion::isHeader( unsigned char type ) return false; } -int Conversion::headerMaskToHType( unsigned char mask ) +int Conversion::headerMaskToHType( unsigned char tqmask ) { - bool hasFirst = ( mask & wvWare::HeaderData::HeaderFirst ); + bool hasFirst = ( tqmask & wvWare::HeaderData::HeaderFirst ); // Odd is always there. We have even!=odd only if Even is there too. - bool hasEvenOdd = ( mask & wvWare::HeaderData::HeaderEven ); + bool hasEvenOdd = ( tqmask & wvWare::HeaderData::HeaderEven ); //kdDebug(30513) << k_funcinfo << " hasEvenOdd=" << hasEvenOdd << endl; if ( hasFirst ) return hasEvenOdd ? 1 : 2; return hasEvenOdd ? 3 : 0; } -int Conversion::headerMaskToFType( unsigned char mask ) +int Conversion::headerMaskToFType( unsigned char tqmask ) { - bool hasFirst = ( mask & wvWare::HeaderData::FooterFirst ); - bool hasEvenOdd = ( mask & wvWare::HeaderData::FooterEven ); + bool hasFirst = ( tqmask & wvWare::HeaderData::FooterFirst ); + bool hasEvenOdd = ( tqmask & wvWare::HeaderData::FooterEven ); // Odd is always there. We have even!=odd only if Even is there too. kdDebug(30513) << k_funcinfo << " hasEvenOdd=" << hasEvenOdd << endl; if ( hasFirst ) diff --git a/filters/kword/msword/conversion.h b/filters/kword/msword/conversion.h index 868b42e7..8a9781ce 100644 --- a/filters/kword/msword/conversion.h +++ b/filters/kword/msword/conversion.h @@ -21,10 +21,10 @@ #define CONVERSION_H #include <wv2/ustring.h> -#include <qstring.h> -#include <qcolor.h> +#include <tqstring.h> +#include <tqcolor.h> -class QDomElement; +class TQDomElement; namespace wvWare { namespace Word97 { class LSPD; @@ -38,30 +38,30 @@ namespace wvWare { namespace Conversion { - // UString -> QConstString conversion. Use .string() to get the QString. - // Always store the QConstString into a variable first, to avoid a deep copy. - inline QConstString string( const wvWare::UString& str ) { - // Let's hope there's no copying of the QConstString happening... - return QConstString( reinterpret_cast<const QChar*>( str.data() ), str.length() ); + // UString -> TQConstString conversion. Use .string() to get the TQString. + // Always store the TQConstString into a variable first, to avoid a deep copy. + inline TQConstString string( const wvWare::UString& str ) { + // Let's hope there's no copying of the TQConstString happening... + return TQConstString( reinterpret_cast<const TQChar*>( str.data() ), str.length() ); } // Prepare text for inclusion in XML - void encodeText(QString &text); + void encodeText(TQString &text); - // Convert color code (ico) to QColor - QColor color(int number, int defaultcolor, bool defaultWhite = false); + // Convert color code (ico) to TQColor + TQColor color(int number, int defaultcolor, bool defaultWhite = false); - // Convert pattern style (ipat) to QBrush::BrushStyle + // Convert pattern style (ipat) to TQBrush::BrushStyle int fillPatternStyle( int ipat ); // Hackery for gray levels int ditheringToGray( int ipat, bool* ok ); - // Convert alignment code to string - QString alignment( int jc ); + // Convert tqalignment code to string + TQString tqalignment( int jc ); // Convert linespacing struct to string - QString lineSpacing( const wvWare::Word97::LSPD& lspd ); + TQString lineSpacing( const wvWare::Word97::LSPD& lspd ); // Convert number format code to KWord's COUNTER.type code int numberFormatCode( int nfc ); @@ -69,24 +69,24 @@ namespace Conversion // Set the 3 color attributes in the XML element, from a color code (ico) // prefix: if empty, the attribute names will be red/blue/green // if not empty, they will be xRed/xBlue/xGreen - void setColorAttributes( QDomElement& element, int ico, const QString& prefix = QString::null, bool defaultWhite = false ); + void setColorAttributes( TQDomElement& element, int ico, const TQString& prefix = TQString(), bool defaultWhite = false ); // Set all border attributes in the XML element, from a BRC structure // prefix: if empty, the attribute names will be red/blue/green/width/style // if not empty, they will be xRed/xBlue/xGreen/xWidth/xStyle - void setBorderAttributes( QDomElement& borderElement, const wvWare::Word97::BRC& brc, const QString& prefix = QString::null ); + void setBorderAttributes( TQDomElement& borderElement, const wvWare::Word97::BRC& brc, const TQString& prefix = TQString() ); // Convert wv2's Header Type to a KWord frameInfo value int headerTypeToFrameInfo( unsigned char type ); // Convert wv2's Header Type to a KWord frameset name - QString headerTypeToFramesetName( unsigned char type ); + TQString headerTypeToFramesetName( unsigned char type ); - // Convert a mask of Header Types to the hType value for KWord - int headerMaskToHType( unsigned char mask ); + // Convert a tqmask of Header Types to the hType value for KWord + int headerMaskToHType( unsigned char tqmask ); - // Convert a mask of Header Types to the fType value for KWord - int headerMaskToFType( unsigned char mask ); + // Convert a tqmask of Header Types to the fType value for KWord + int headerMaskToFType( unsigned char tqmask ); // Convert wv2's FLD to KWord FIELD.subtype (or -1 if can't be handled) int fldToFieldType( const wvWare::FLD* fld ); diff --git a/filters/kword/msword/document.cpp b/filters/kword/msword/document.cpp index 9d2eab18..f5737200 100644 --- a/filters/kword/msword/document.cpp +++ b/filters/kword/msword/document.cpp @@ -40,7 +40,7 @@ #include <KoFilterChain.h> -Document::Document( const std::string& fileName, QDomDocument& mainDocument, QDomDocument& documentInfo, QDomElement& framesetsElement, KoFilterChain* chain ) +Document::Document( const std::string& fileName, TQDomDocument& mainDocument, TQDomDocument& documentInfo, TQDomElement& framesetsElement, KoFilterChain* chain ) : m_mainDocument( mainDocument ), m_documentInfo ( documentInfo ), m_framesetsElement( framesetsElement ), m_replacementHandler( new KWordReplacementHandler ), m_tableHandler( new KWordTableHandler ), @@ -52,12 +52,12 @@ Document::Document( const std::string& fileName, QDomDocument& mainDocument, QDo if ( m_parser ) // 0 in case of major error (e.g. unsupported format) { m_textHandler = new KWordTextHandler( m_parser ); - connect( m_textHandler, SIGNAL( subDocFound( const wvWare::FunctorBase*, int ) ), - this, SLOT( slotSubDocFound( const wvWare::FunctorBase*, int ) ) ); - connect( m_textHandler, SIGNAL( tableFound( const KWord::Table& ) ), - this, SLOT( slotTableFound( const KWord::Table& ) ) ); - connect( m_textHandler, SIGNAL( pictureFound( const QString&, const QString&, const wvWare::FunctorBase* ) ), - this, SLOT( slotPictureFound( const QString&, const QString&, const wvWare::FunctorBase* ) ) ); + connect( m_textHandler, TQT_SIGNAL( subDocFound( const wvWare::FunctorBase*, int ) ), + this, TQT_SLOT( slotSubDocFound( const wvWare::FunctorBase*, int ) ) ); + connect( m_textHandler, TQT_SIGNAL( tableFound( const KWord::Table& ) ), + this, TQT_SLOT( slotTableFound( const KWord::Table& ) ) ); + connect( m_textHandler, TQT_SIGNAL( pictureFound( const TQString&, const TQString&, const wvWare::FunctorBase* ) ), + this, TQT_SLOT( slotPictureFound( const TQString&, const TQString&, const wvWare::FunctorBase* ) ) ); m_parser->setSubDocumentHandler( this ); m_parser->setTextHandler( m_textHandler ); m_parser->setTableHandler( m_tableHandler ); @@ -67,10 +67,10 @@ Document::Document( const std::string& fileName, QDomDocument& mainDocument, QDo m_parser->setInlineReplacementHandler( m_replacementHandler ); processStyles(); processAssociatedStrings(); - connect( m_tableHandler, SIGNAL( sigTableCellStart( int, int, int, int, const KoRect&, const QString&, const wvWare::Word97::BRC&, const wvWare::Word97::BRC&, const wvWare::Word97::BRC&, const wvWare::Word97::BRC&, const wvWare::Word97::SHD& ) ), - this, SLOT( slotTableCellStart( int, int, int, int, const KoRect&, const QString&, const wvWare::Word97::BRC&, const wvWare::Word97::BRC&, const wvWare::Word97::BRC&, const wvWare::Word97::BRC&, const wvWare::Word97::SHD& ) ) ); - connect( m_tableHandler, SIGNAL( sigTableCellEnd() ), - this, SLOT( slotTableCellEnd() ) ); + connect( m_tableHandler, TQT_SIGNAL( sigTableCellStart( int, int, int, int, const KoRect&, const TQString&, const wvWare::Word97::BRC&, const wvWare::Word97::BRC&, const wvWare::Word97::BRC&, const wvWare::Word97::BRC&, const wvWare::Word97::SHD& ) ), + this, TQT_SLOT( slotTableCellStart( int, int, int, int, const KoRect&, const TQString&, const wvWare::Word97::BRC&, const wvWare::Word97::BRC&, const wvWare::Word97::BRC&, const wvWare::Word97::BRC&, const wvWare::Word97::SHD& ) ) ); + connect( m_tableHandler, TQT_SIGNAL( sigTableCellEnd() ), + this, TQT_SLOT( slotTableCellEnd() ) ); } } @@ -86,9 +86,9 @@ void Document::finishDocument() { const wvWare::Word97::DOP& dop = m_parser->dop(); - QDomElement elementDoc = m_mainDocument.documentElement(); + TQDomElement elementDoc = m_mainDocument.documentElement(); - QDomElement element; + TQDomElement element; element = m_mainDocument.createElement("ATTRIBUTES"); element.setAttribute("processing",0); // WP char allHeaders = ( wvWare::HeaderData::HeaderEven | @@ -116,7 +116,7 @@ void Document::finishDocument() // Done at the end: write the type of headers/footers, // depending on which kind of headers and footers we received. - QDomElement paperElement = elementDoc.namedItem("PAPER").toElement(); + TQDomElement paperElement = elementDoc.namedItem("PAPER").toElement(); Q_ASSERT ( !paperElement.isNull() ); // slotFirstSectionFound should have been called! if ( !paperElement.isNull() ) { @@ -126,10 +126,10 @@ void Document::finishDocument() } // Write out <PICTURES> tag - QDomElement picturesElem = m_mainDocument.createElement("PICTURES"); + TQDomElement picturesElem = m_mainDocument.createElement("PICTURES"); elementDoc.appendChild( picturesElem ); - for( QStringList::Iterator it = m_pictureList.begin(); it != m_pictureList.end(); ++it ) { - QDomElement keyElem = m_mainDocument.createElement("KEY"); + for( TQStringList::Iterator it = m_pictureList.begin(); it != m_pictureList.end(); ++it ) { + TQDomElement keyElem = m_mainDocument.createElement("KEY"); picturesElem.appendChild( keyElem ); keyElem.setAttribute( "filename", *it ); keyElem.setAttribute( "name", *it ); @@ -139,11 +139,11 @@ void Document::finishDocument() void Document::processAssociatedStrings() { wvWare::AssociatedStrings strings( m_parser->associatedStrings() ); - QDomElement infodoc = m_documentInfo.createElement( "document-info" ); - QDomElement author = m_documentInfo.createElement( "author" ); - QDomElement fullname = m_documentInfo.createElement( "full-name" ); - QDomElement title = m_documentInfo.createElement( "title" ); - QDomElement about = m_documentInfo.createElement( "about" ); + TQDomElement infodoc = m_documentInfo.createElement( "document-info" ); + TQDomElement author = m_documentInfo.createElement( "author" ); + TQDomElement fullname = m_documentInfo.createElement( "full-name" ); + TQDomElement title = m_documentInfo.createElement( "title" ); + TQDomElement about = m_documentInfo.createElement( "about" ); m_documentInfo.appendChild(infodoc); @@ -171,7 +171,7 @@ void Document::processAssociatedStrings() { void Document::processStyles() { - QDomElement stylesElem = m_mainDocument.createElement( "STYLES" ); + TQDomElement stylesElem = m_mainDocument.createElement( "STYLES" ); m_mainDocument.documentElement().appendChild( stylesElem ); m_textHandler->setFrameSetElement( stylesElem ); /// ### naming! @@ -185,11 +185,11 @@ void Document::processStyles() //kdDebug(30513) << k_funcinfo << "style " << i << " " << style << endl; if ( style && style->type() == wvWare::Style::sgcPara ) { - QDomElement styleElem = m_mainDocument.createElement("STYLE"); + TQDomElement styleElem = m_mainDocument.createElement("STYLE"); stylesElem.appendChild( styleElem ); - QConstString name = Conversion::string( style->name() ); - QDomElement element = m_mainDocument.createElement("NAME"); + TQConstString name = Conversion::string( style->name() ); + TQDomElement element = m_mainDocument.createElement("NAME"); element.setAttribute( "value", name.string() ); styleElem.appendChild( element ); @@ -198,7 +198,7 @@ void Document::processStyles() const wvWare::Style* followingStyle = styles.styleByID( style->followingStyle() ); if ( followingStyle && followingStyle != style ) { - QConstString followingName = Conversion::string( followingStyle->name() ); + TQConstString followingName = Conversion::string( followingStyle->name() ); element = m_mainDocument.createElement("FOLLOWING"); element.setAttribute( "name", followingName.string() ); styleElem.appendChild( element ); @@ -226,7 +226,7 @@ void Document::bodyStart() { kdDebug(30513) << k_funcinfo << endl; - QDomElement mainFramesetElement = m_mainDocument.createElement("FRAMESET"); + TQDomElement mainFramesetElement = m_mainDocument.createElement("FRAMESET"); mainFramesetElement.setAttribute("frameType",1); mainFramesetElement.setAttribute("frameInfo",0); // TODO: "name" attribute (needs I18N) @@ -236,25 +236,25 @@ void Document::bodyStart() createInitialFrame( mainFramesetElement, 29, 798, 42, 566, false, Reconnect ); m_textHandler->setFrameSetElement( mainFramesetElement ); - connect( m_textHandler, SIGNAL( firstSectionFound( wvWare::SharedPtr<const wvWare::Word97::SEP> ) ), - this, SLOT( slotFirstSectionFound( wvWare::SharedPtr<const wvWare::Word97::SEP> ) ) ); + connect( m_textHandler, TQT_SIGNAL( firstSectionFound( wvWare::SharedPtr<const wvWare::Word97::SEP> ) ), + this, TQT_SLOT( slotFirstSectionFound( wvWare::SharedPtr<const wvWare::Word97::SEP> ) ) ); m_bodyFound = true; } void Document::bodyEnd() { kdDebug(30513) << k_funcinfo << endl; - disconnect( m_textHandler, SIGNAL( firstSectionFound( wvWare::SharedPtr<const wvWare::Word97::SEP> ) ), - this, SLOT( slotFirstSectionFound( wvWare::SharedPtr<const wvWare::Word97::SEP> ) ) ); + disconnect( m_textHandler, TQT_SIGNAL( firstSectionFound( wvWare::SharedPtr<const wvWare::Word97::SEP> ) ), + this, TQT_SLOT( slotFirstSectionFound( wvWare::SharedPtr<const wvWare::Word97::SEP> ) ) ); } void Document::slotFirstSectionFound( wvWare::SharedPtr<const wvWare::Word97::SEP> sep ) { kdDebug(30513) << k_funcinfo << endl; - QDomElement elementDoc = m_mainDocument.documentElement(); + TQDomElement elementDoc = m_mainDocument.documentElement(); - QDomElement elementPaper = m_mainDocument.createElement("PAPER"); + TQDomElement elementPaper = m_mainDocument.createElement("PAPER"); bool landscape = (sep->dmOrientPage == 2); double width = (double)sep->xaPage / 20.0; double height = (double)sep->yaPage / 20.0; @@ -275,7 +275,7 @@ void Document::slotFirstSectionFound( wvWare::SharedPtr<const wvWare::Word97::SE // elementPaper.setAttribute("zoom",100); // not a doc property in kword elementDoc.appendChild(elementPaper); - QDomElement element = m_mainDocument.createElement("PAPERBORDERS"); + TQDomElement element = m_mainDocument.createElement("PAPERBORDERS"); element.setAttribute("left", (double)sep->dxaLeft / 20.0); element.setAttribute("top",(double)sep->dyaTop / 20.0); element.setAttribute("right", (double)sep->dxaRight / 20.0); @@ -291,7 +291,7 @@ void Document::headerStart( wvWare::HeaderData::Type type ) kdDebug(30513) << "startHeader type=" << type << " (" << Conversion::headerTypeToFramesetName( type ) << ")" << endl; // Werner says the headers are always emitted in the order of the Type enum. - QDomElement framesetElement = m_mainDocument.createElement("FRAMESET"); + TQDomElement framesetElement = m_mainDocument.createElement("FRAMESET"); framesetElement.setAttribute( "frameType", 1 ); framesetElement.setAttribute( "frameInfo", Conversion::headerTypeToFrameInfo( type ) ); framesetElement.setAttribute( "name", Conversion::headerTypeToFramesetName( type ) ); @@ -313,7 +313,7 @@ void Document::headerStart( wvWare::HeaderData::Type type ) void Document::headerEnd() { - m_textHandler->setFrameSetElement( QDomElement() ); + m_textHandler->setFrameSetElement( TQDomElement() ); } void Document::footnoteStart() @@ -323,15 +323,15 @@ void Document::footnoteStart() int type = subdoc.data; // Create footnote/endnote frameset - QDomElement framesetElement = m_mainDocument.createElement("FRAMESET"); + TQDomElement framesetElement = m_mainDocument.createElement("FRAMESET"); framesetElement.setAttribute( "frameType", 1 /* text */ ); framesetElement.setAttribute( "frameInfo", 7 /* footnote/endnote */ ); if ( type == wvWare::FootnoteData::Endnote ) // Keep name in sync with KWordTextHandler::footnoteFound - framesetElement.setAttribute("name", i18n("Endnote %1").arg( ++m_endNoteNumber ) ); + framesetElement.setAttribute("name", i18n("Endnote %1").tqarg( ++m_endNoteNumber ) ); else // Keep name in sync with KWordTextHandler::footnoteFound - framesetElement.setAttribute("name", i18n("Footnote %1").arg( ++m_footNoteNumber ) ); + framesetElement.setAttribute("name", i18n("Footnote %1").tqarg( ++m_footNoteNumber ) ); m_framesetsElement.appendChild(framesetElement); createInitialFrame( framesetElement, 29, 798, 567, 567+41, true, NoFollowup ); @@ -342,17 +342,17 @@ void Document::footnoteStart() void Document::footnoteEnd() { kdDebug(30513) << k_funcinfo << endl; - m_textHandler->setFrameSetElement( QDomElement() ); + m_textHandler->setFrameSetElement( TQDomElement() ); } -void Document::slotTableCellStart( int row, int column, int rowSpan, int columnSpan, const KoRect& cellRect, const QString& tableName, const wvWare::Word97::BRC& brcTop, const wvWare::Word97::BRC& brcBottom, const wvWare::Word97::BRC& brcLeft, const wvWare::Word97::BRC& brcRight, const wvWare::Word97::SHD& shd ) +void Document::slotTableCellStart( int row, int column, int rowSpan, int columnSpan, const KoRect& cellRect, const TQString& tableName, const wvWare::Word97::BRC& brcTop, const wvWare::Word97::BRC& brcBottom, const wvWare::Word97::BRC& brcLeft, const wvWare::Word97::BRC& brcRight, const wvWare::Word97::SHD& shd ) { // Create footnote/endnote frameset - QDomElement framesetElement = m_mainDocument.createElement("FRAMESET"); + TQDomElement framesetElement = m_mainDocument.createElement("FRAMESET"); framesetElement.setAttribute( "frameType", 1 /* text */ ); framesetElement.setAttribute( "frameInfo", 0 /* normal text */ ); framesetElement.setAttribute( "grpMgr", tableName ); - QString name = i18n("Table_Name Cell row,column", "%1 Cell %2,%3").arg(tableName).arg(row).arg(column); + TQString name = i18n("Table_Name Cell row,column", "%1 Cell %2,%3").tqarg(tableName).tqarg(row).tqarg(column); framesetElement.setAttribute( "name", name ); framesetElement.setAttribute( "row", row ); framesetElement.setAttribute( "col", column ); @@ -360,7 +360,7 @@ void Document::slotTableCellStart( int row, int column, int rowSpan, int columnS framesetElement.setAttribute( "cols", columnSpan ); m_framesetsElement.appendChild(framesetElement); - QDomElement frameElem = createInitialFrame( framesetElement, cellRect.left(), cellRect.right(), cellRect.top(), cellRect.bottom(), true, NoFollowup ); + TQDomElement frameElem = createInitialFrame( framesetElement, cellRect.left(), cellRect.right(), cellRect.top(), cellRect.bottom(), true, NoFollowup ); generateFrameBorder( frameElem, brcTop, brcBottom, brcLeft, brcRight, shd ); m_textHandler->setFrameSetElement( framesetElement ); @@ -368,12 +368,12 @@ void Document::slotTableCellStart( int row, int column, int rowSpan, int columnS void Document::slotTableCellEnd() { - m_textHandler->setFrameSetElement( QDomElement() ); + m_textHandler->setFrameSetElement( TQDomElement() ); } -QDomElement Document::createInitialFrame( QDomElement& parentFramesetElem, double left, double right, double top, double bottom, bool autoExtend, NewFrameBehavior nfb ) +TQDomElement Document::createInitialFrame( TQDomElement& tqparentFramesetElem, double left, double right, double top, double bottom, bool autoExtend, NewFrameBehavior nfb ) { - QDomElement frameElementOut = parentFramesetElem.ownerDocument().createElement("FRAME"); + TQDomElement frameElementOut = tqparentFramesetElem.ownerDocument().createElement("FRAME"); frameElementOut.setAttribute( "left", left ); frameElementOut.setAttribute( "right", right ); frameElementOut.setAttribute( "top", top ); @@ -382,11 +382,11 @@ QDomElement Document::createInitialFrame( QDomElement& parentFramesetElem, doubl // AutoExtendFrame for header/footer/footnote/endnote, AutoCreateNewFrame for body text frameElementOut.setAttribute( "autoCreateNewFrame", autoExtend ? 0 : 1 ); frameElementOut.setAttribute( "newFrameBehavior", nfb ); - parentFramesetElem.appendChild( frameElementOut ); + tqparentFramesetElem.appendChild( frameElementOut ); return frameElementOut; } -void Document::generateFrameBorder( QDomElement& frameElementOut, const wvWare::Word97::BRC& brcTop, const wvWare::Word97::BRC& brcBottom, const wvWare::Word97::BRC& brcLeft, const wvWare::Word97::BRC& brcRight, const wvWare::Word97::SHD& shd ) +void Document::generateFrameBorder( TQDomElement& frameElementOut, const wvWare::Word97::BRC& brcTop, const wvWare::Word97::BRC& brcBottom, const wvWare::Word97::BRC& brcLeft, const wvWare::Word97::BRC& brcRight, const wvWare::Word97::SHD& shd ) { // Frame borders @@ -405,12 +405,12 @@ void Document::generateFrameBorder( QDomElement& frameElementOut, const wvWare:: // If ipat = 0 (solid fill), icoBack is the background color. // But otherwise, icoFore is the one we need to set as bkColor // (and icoBack is usually white; it's the other colour of the pattern, - // something that we can't set in Qt apparently). + // something that we can't set in TQt aptqparently). int bkColor = shd.ipat ? shd.cvFore : shd.cvBack; kdDebug(30513) << "generateFrameBorder: " << " icoFore=" << shd.cvFore << " icoBack=" << shd.cvBack << " ipat=" << shd.ipat << " -> bkColor=" << bkColor << endl; // Reverse-engineer MSWord's own hackery: it models various gray levels - // using dithering. But this looks crappy with Qt. So we go back to a QColor. + // using dithering. But this looks crappy with TQt. So we go back to a TQColor. bool grayHack = ( shd.ipat && shd.cvFore == 1 && shd.cvBack == 8 ); if ( grayHack ) { @@ -418,8 +418,8 @@ void Document::generateFrameBorder( QDomElement& frameElementOut, const wvWare:: int grayLevel = Conversion::ditheringToGray( shd.ipat, &ok ); if ( ok ) { - QColor color( 0, 0, grayLevel, QColor::Hsv ); - QString prefix = "bk"; + TQColor color( 0, 0, grayLevel, TQColor::Hsv ); + TQString prefix = "bk"; frameElementOut.setAttribute( "bkRed", color.red() ); frameElementOut.setAttribute( "bkBlue", color.blue() ); frameElementOut.setAttribute( "bkGreen", color.green() ); @@ -438,7 +438,7 @@ void Document::generateFrameBorder( QDomElement& frameElementOut, const wvWare:: void Document::slotSubDocFound( const wvWare::FunctorBase* functor, int data ) { - SubDocument subdoc( functor, data, QString::null, QString::null ); + SubDocument subdoc( functor, data, TQString(), TQString() ); m_subdocQueue.push( subdoc ); } @@ -447,7 +447,7 @@ void Document::slotTableFound( const KWord::Table& table ) m_tableQueue.push( table ); } -void Document::slotPictureFound( const QString& frameName, const QString& pictureName, +void Document::slotPictureFound( const TQString& frameName, const TQString& pictureName, const wvWare::FunctorBase* pictureFunctor ) { SubDocument subdoc( pictureFunctor, 0, frameName, pictureName ); @@ -472,8 +472,8 @@ void Document::processSubDocQueue() { KWord::Table& table = m_tableQueue.front(); m_tableHandler->tableStart( &table ); - QValueList<KWord::Row> &rows = table.rows; - for( QValueList<KWord::Row>::Iterator it = rows.begin(); it != rows.end(); ++it ) { + TQValueList<KWord::Row> &rows = table.rows; + for( TQValueList<KWord::Row>::Iterator it = rows.begin(); it != rows.end(); ++it ) { KWord::TableRowFunctorPtr f = (*it).functorPtr; Q_ASSERT( f ); (*f)(); // call it @@ -490,7 +490,7 @@ KoStoreDevice* Document::createPictureFrameSet( const KoSize& size ) // Grab data that was stored with the functor, that triggered this parsing SubDocument subdoc( m_subdocQueue.front() ); - QDomElement framesetElement = m_mainDocument.createElement("FRAMESET"); + TQDomElement framesetElement = m_mainDocument.createElement("FRAMESET"); framesetElement.setAttribute( "frameType", 2 /*picture*/ ); framesetElement.setAttribute( "frameInfo", 0 ); framesetElement.setAttribute( "name", subdoc.name ); @@ -503,10 +503,10 @@ KoStoreDevice* Document::createPictureFrameSet( const KoSize& size ) // if (aPic.dxaGoal == 1000 && aPic.mx == 1) //100% hack ? (from ww8graf2.cxx) createInitialFrame( framesetElement, 0, size.width(), 0, size.height(), false, NoFollowup ); - QDomElement pictureElem = m_mainDocument.createElement("PICTURE"); + TQDomElement pictureElem = m_mainDocument.createElement("PICTURE"); framesetElement.appendChild( pictureElem ); - QDomElement keyElem = m_mainDocument.createElement("KEY"); + TQDomElement keyElem = m_mainDocument.createElement("KEY"); pictureElem.appendChild( keyElem ); keyElem.setAttribute( "filename", subdoc.extraName ); m_pictureList.append( subdoc.extraName ); diff --git a/filters/kword/msword/document.h b/filters/kword/msword/document.h index f779f35d..0e79065a 100644 --- a/filters/kword/msword/document.h +++ b/filters/kword/msword/document.h @@ -25,10 +25,10 @@ #include <wv2/handlers.h> #include <wv2/functor.h> -#include <qstring.h> -#include <qdom.h> -#include <qobject.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqdom.h> +#include <tqobject.h> +#include <tqstringlist.h> #include <queue> #include <string> @@ -49,11 +49,12 @@ class KWordTableHandler; class KWordPictureHandler; class KWordTextHandler; -class Document : public QObject, public wvWare::SubDocumentHandler +class Document : public TQObject, public wvWare::SubDocumentHandler { Q_OBJECT + TQ_OBJECT public: - Document( const std::string& fileName, QDomDocument& mainDocument, QDomDocument &documentInfo, QDomElement& framesetsElement, KoFilterChain* chain ); + Document( const std::string& fileName, TQDomDocument& mainDocument, TQDomDocument &documentInfo, TQDomElement& framesetsElement, KoFilterChain* chain ); virtual ~Document(); bool hasParser() const { return m_parser != 0L; } @@ -77,13 +78,13 @@ public: typedef const wvWare::FunctorBase* FunctorPtr; struct SubDocument { - SubDocument( FunctorPtr ptr, int d, const QString& n, const QString& extra ) + SubDocument( FunctorPtr ptr, int d, const TQString& n, const TQString& extra ) : functorPtr(ptr), data(d), name(n), extraName(extra) {} ~SubDocument() {} FunctorPtr functorPtr; int data; - QString name; - QString extraName; + TQString name; + TQString extraName; }; // Called by PictureHandler @@ -101,23 +102,23 @@ protected slots: void slotTableFound( const KWord::Table& table ); // Write out the frameset and add the key to the PICTURES tag - void slotPictureFound( const QString& frameName, const QString& pictureName, const wvWare::FunctorBase* ); + void slotPictureFound( const TQString& frameName, const TQString& pictureName, const wvWare::FunctorBase* ); // Similar to footnoteStart/footnoteEnd but for cells. // This is connected to KWordTableHandler - void slotTableCellStart( int row, int column, int rowSize, int columnSize, const KoRect& cellRect, const QString& tableName, const wvWare::Word97::BRC& brcTop, const wvWare::Word97::BRC& brcBottom, const wvWare::Word97::BRC& brcLeft, const wvWare::Word97::BRC& brcRight, const wvWare::Word97::SHD& shd ); + void slotTableCellStart( int row, int column, int rowSize, int columnSize, const KoRect& cellRect, const TQString& tableName, const wvWare::Word97::BRC& brcTop, const wvWare::Word97::BRC& brcBottom, const wvWare::Word97::BRC& brcLeft, const wvWare::Word97::BRC& brcRight, const wvWare::Word97::SHD& shd ); void slotTableCellEnd(); private: void processStyles(); void processAssociatedStrings(); enum NewFrameBehavior { Reconnect=0, NoFollowup=1, Copy=2 }; - QDomElement createInitialFrame( QDomElement& parentFramesetElem, double left, double right, double top, double bottom, bool autoExtend, NewFrameBehavior nfb ); - void generateFrameBorder( QDomElement& frameElementOut, const wvWare::Word97::BRC& brcTop, const wvWare::Word97::BRC& brcBottom, const wvWare::Word97::BRC& brcLeft, const wvWare::Word97::BRC& brcRight, const wvWare::Word97::SHD& shd ); + TQDomElement createInitialFrame( TQDomElement& tqparentFramesetElem, double left, double right, double top, double bottom, bool autoExtend, NewFrameBehavior nfb ); + void generateFrameBorder( TQDomElement& frameElementOut, const wvWare::Word97::BRC& brcTop, const wvWare::Word97::BRC& brcBottom, const wvWare::Word97::BRC& brcLeft, const wvWare::Word97::BRC& brcRight, const wvWare::Word97::SHD& shd ); - QDomDocument& m_mainDocument; - QDomDocument& m_documentInfo; - QDomElement& m_framesetsElement; + TQDomDocument& m_mainDocument; + TQDomDocument& m_documentInfo; + TQDomElement& m_framesetsElement; KWordReplacementHandler* m_replacementHandler; KWordTableHandler* m_tableHandler; KWordPictureHandler* m_pictureHandler; @@ -126,8 +127,8 @@ private: wvWare::SharedPtr<wvWare::Parser> m_parser; std::queue<SubDocument> m_subdocQueue; std::queue<KWord::Table> m_tableQueue; - QStringList m_pictureList; // for <PICTURES> - unsigned char m_headerFooters; // a mask of HeaderData::Type bits + TQStringList m_pictureList; // for <PICTURES> + unsigned char m_headerFooters; // a tqmask of HeaderData::Type bits bool m_bodyFound; int m_footNoteNumber; // number of footnote _framesets_ written out int m_endNoteNumber; // number of endnote _framesets_ written out diff --git a/filters/kword/msword/graphicshandler.cpp b/filters/kword/msword/graphicshandler.cpp index c31d5d8c..efcef0e7 100644 --- a/filters/kword/msword/graphicshandler.cpp +++ b/filters/kword/msword/graphicshandler.cpp @@ -28,7 +28,7 @@ using namespace wvWare; -KWordPictureHandler::KWordPictureHandler( Document* doc ) : QObject(), m_doc(doc) +KWordPictureHandler::KWordPictureHandler( Document* doc ) : TQObject(), m_doc(doc) { } @@ -57,10 +57,10 @@ void KWordPictureHandler::wmfData( OLEImageReader& reader, SharedPtr<const Word9 #define IMG_BUF_SIZE 2048 wvWare::U8 buf[IMG_BUF_SIZE]; - Q_LONG len = reader.size(); + TQ_LONG len = reader.size(); while ( len > 0 ) { - size_t n = reader.read( buf, QMIN( len, IMG_BUF_SIZE ) ); - Q_LONG n1 = dev->writeBlock( (const char*)buf, n ); + size_t n = reader.read( buf, TQMIN( len, IMG_BUF_SIZE ) ); + TQ_LONG n1 = dev->writeBlock( (const char*)buf, n ); Q_ASSERT( (size_t)n1 == n ); if ( (size_t)n1 != n ) return; // ouch diff --git a/filters/kword/msword/graphicshandler.h b/filters/kword/msword/graphicshandler.h index b740ddec..341ebbb5 100644 --- a/filters/kword/msword/graphicshandler.h +++ b/filters/kword/msword/graphicshandler.h @@ -23,7 +23,7 @@ #include <wv2/functor.h> #include <wv2/handlers.h> -#include <qobject.h> +#include <tqobject.h> #include "document.h" #include "versionmagic.h" @@ -36,9 +36,10 @@ namespace wvWare } #endif // IMAGE_IMPORT -class KWordPictureHandler : public QObject, public wvWare::PictureHandler +class KWordPictureHandler : public TQObject, public wvWare::PictureHandler { Q_OBJECT + TQ_OBJECT public: KWordPictureHandler( Document* doc ); diff --git a/filters/kword/msword/mswordimport.cpp b/filters/kword/msword/mswordimport.cpp index 1f6df6af..3be95f7a 100644 --- a/filters/kword/msword/mswordimport.cpp +++ b/filters/kword/msword/mswordimport.cpp @@ -19,9 +19,9 @@ #include "mswordimport.h" -#include <qdom.h> -#include <qfontinfo.h> -#include <qfile.h> +#include <tqdom.h> +#include <tqfontinfo.h> +#include <tqfile.h> #include <kdebug.h> #include <kgenericfactory.h> @@ -33,7 +33,7 @@ typedef KGenericFactory<MSWordImport, KoFilter> MSWordImportFactory; K_EXPORT_COMPONENT_FACTORY( libmswordimport, MSWordImportFactory( "kofficefilters" ) ) -MSWordImport::MSWordImport( KoFilter *, const char *, const QStringList& ) : KoFilter() +MSWordImport::MSWordImport( KoFilter *, const char *, const TQStringList& ) : KoFilter() { } @@ -41,7 +41,7 @@ MSWordImport::~MSWordImport() { } -KoFilter::ConversionStatus MSWordImport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus MSWordImport::convert( const TQCString& from, const TQCString& to ) { // check for proper conversion if ( to != "application/x-kword" || from != "application/msword" ) @@ -49,14 +49,14 @@ KoFilter::ConversionStatus MSWordImport::convert( const QCString& from, const QC kdDebug(30513) << "######################## MSWordImport::convert ########################" << endl; - QDomDocument mainDocument; - QDomElement framesetsElem; + TQDomDocument mainDocument; + TQDomElement framesetsElem; prepareDocument( mainDocument, framesetsElem ); - QDomDocument documentInfo; + TQDomDocument documentInfo; documentInfo.appendChild (documentInfo.createProcessingInstruction( "xml", "version=\"1.0\" encoding=\"UTF-8\"" ) ); - Document document( QFile::encodeName( m_chain->inputFile() ).data(), mainDocument, documentInfo, framesetsElem, m_chain ); + Document document( TQFile::encodeName( m_chain->inputFile() ).data(), mainDocument, documentInfo, framesetsElem, m_chain ); if ( !document.hasParser() ) return KoFilter::WrongFormat; @@ -72,8 +72,8 @@ KoFilter::ConversionStatus MSWordImport::convert( const QCString& from, const QC kdError(30502) << "Unable to open output file!" << endl; return KoFilter::StorageCreationError; } - QCString cstr = mainDocument.toCString(); - // WARNING: we cannot use KoStore::write(const QByteArray&) because it gives an extra NULL character at the end. + TQCString cstr = mainDocument.toCString(); + // WARNING: we cannot use KoStore::write(const TQByteArray&) because it gives an extra NULL character at the end. out->writeBlock( cstr, cstr.length() ); out->close(); @@ -90,11 +90,11 @@ KoFilter::ConversionStatus MSWordImport::convert( const QCString& from, const QC return KoFilter::OK; } -void MSWordImport::prepareDocument( QDomDocument& mainDocument, QDomElement& framesetsElem ) +void MSWordImport::prepareDocument( TQDomDocument& mainDocument, TQDomElement& framesetsElem ) { mainDocument.appendChild( mainDocument.createProcessingInstruction( "xml","version=\"1.0\" encoding=\"UTF-8\"" ) ); - QDomElement elementDoc; + TQDomElement elementDoc; elementDoc=mainDocument.createElement("DOC"); elementDoc.setAttribute("editor","KWord's MS Word Import Filter"); elementDoc.setAttribute("mime","application/x-kword"); diff --git a/filters/kword/msword/mswordimport.h b/filters/kword/msword/mswordimport.h index e41959a9..a961e071 100644 --- a/filters/kword/msword/mswordimport.h +++ b/filters/kword/msword/mswordimport.h @@ -22,20 +22,21 @@ #include <KoFilter.h> -class QDomDocument; -class QDomElement; +class TQDomDocument; +class TQDomElement; class MSWordImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - MSWordImport( KoFilter* parent, const char* name, const QStringList& ); + MSWordImport( KoFilter* tqparent, const char* name, const TQStringList& ); virtual ~MSWordImport(); - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); private: - void prepareDocument( QDomDocument& mainDocument, QDomElement& framesetsElem ); + void prepareDocument( TQDomDocument& mainDocument, TQDomElement& framesetsElem ); }; #endif // MSWORDIMPORT_H diff --git a/filters/kword/msword/tablehandler.cpp b/filters/kword/msword/tablehandler.cpp index d62644b8..9e933249 100644 --- a/filters/kword/msword/tablehandler.cpp +++ b/filters/kword/msword/tablehandler.cpp @@ -23,7 +23,7 @@ #include <kdebug.h> #include <KoRect.h> -#include <qtl.h> +#include <tqtl.h> KWordTableHandler::KWordTableHandler() { @@ -112,15 +112,15 @@ void KWordTableHandler::tableCellStart() //kdDebug(30513) << "fVertRestart is set!" << endl; // This cell is the first one of a series of vertically merged cells -> // we want to find out its size. - QValueList<KWord::Row>::Iterator it = m_currentTable->rows.at( m_row + 1 ); + TQValueList<KWord::Row>::Iterator it = m_currentTable->rows.at( m_row + 1 ); for( ; it != m_currentTable->rows.end(); ++it ) { // Find cell right below us in row (*it), if any KWord::TAPptr tapBelow = (*it).tap; const wvWare::Word97::TC* tcBelow = 0L; for ( int c = 0; !tcBelow && c < tapBelow->itcMac ; ++c ) { - if ( QABS( tapBelow->rgdxaCenter[ c ] - left ) <= 3 - && QABS( tapBelow->rgdxaCenter[ c + 1 ] - right ) <= 3 ) { + if ( TQABS( tapBelow->rgdxaCenter[ c ] - left ) <= 3 + && TQABS( tapBelow->rgdxaCenter[ c + 1 ] - right ) <= 3 ) { tcBelow = &tapBelow->rgtc[ c ]; //kdDebug(30513) << "found cell below, at (Word) column " << c << " fVertMerge:" << tcBelow->fVertMerge << endl; } @@ -201,7 +201,7 @@ void KWord::Table::cacheCellEdge(int cellEdge) } // Add the edge to the array. - m_cellEdges.resize(size + 1, QGArray::SpeedOptim); + m_cellEdges.resize(size + 1, TQGArray::SpeedOptim); m_cellEdges[size] = cellEdge; kdDebug(30513) << k_funcinfo << cellEdge << " -> added. Size=" << size+1 << endl; } @@ -222,7 +222,7 @@ int KWord::Table::columnNumber(int cellEdge) const double KWordTableHandler::rowHeight() const { - return QMAX( m_tap->dyaRowHeight / 20.0, 20); + return TQMAX( m_tap->dyaRowHeight / 20.0, 20); } #include "tablehandler.moc" diff --git a/filters/kword/msword/tablehandler.h b/filters/kword/msword/tablehandler.h index 3164cf1f..95fbdba9 100644 --- a/filters/kword/msword/tablehandler.h +++ b/filters/kword/msword/tablehandler.h @@ -23,9 +23,9 @@ #include <wv2/functor.h> #include <wv2/word97_generated.h> // for TAP #include <wv2/handlers.h> -#include <qstring.h> -#include <qvaluelist.h> -#include <qobject.h> +#include <tqstring.h> +#include <tqvaluelist.h> +#include <tqobject.h> #include <deque> namespace wvWare { @@ -44,7 +44,7 @@ namespace KWord // Data for a given row table. This struct is used by the Table struct. struct Row { - Row() : functorPtr( 0L ), tap( 0L ) {} // QValueList wants that one + Row() : functorPtr( 0L ), tap( 0L ) {} // TQValueList wants that one Row( TableRowFunctorPtr ptr, TAPptr _tap ) : functorPtr(ptr), tap(_tap) {} ~Row() {} @@ -57,8 +57,8 @@ namespace KWord // during text parsing and the final generation of table cells. struct Table { - QString name; // kword's grpMgr attribute - QValueList<Row> rows; // need to use QValueList to benefit from implicit sharing + TQString name; // kword's grpMgr attribute + TQValueList<Row> rows; // need to use TQValueList to benefit from implicit sharing // Word has a very flexible concept of columns: each row can vary the // edges of each column. We must map this onto a set of fixed-width columns @@ -66,16 +66,17 @@ namespace KWord // the original Word cells. We accumulate all the known edges for a given // table in an array. // Important: don't use unsigned int. Value can be negative (relative to margin...). - QMemArray<int> m_cellEdges; + TQMemArray<int> m_cellEdges; void cacheCellEdge( int cellEdge ); int columnNumber( int cellEdge ) const; }; } -class KWordTableHandler : public QObject, public wvWare::TableHandler +class KWordTableHandler : public TQObject, public wvWare::TableHandler { Q_OBJECT + TQ_OBJECT public: KWordTableHandler(); @@ -91,7 +92,7 @@ public: signals: // Tells Document to create frameset for cell - void sigTableCellStart( int row, int column, int rowSpan, int columnSpan, const KoRect& cellRect, const QString& tableName, const wvWare::Word97::BRC& brcTop, const wvWare::Word97::BRC& brcBottom, const wvWare::Word97::BRC& brcLeft, const wvWare::Word97::BRC& brcRight, const wvWare::Word97::SHD& shd ); + void sigTableCellStart( int row, int column, int rowSpan, int columnSpan, const KoRect& cellRect, const TQString& tableName, const wvWare::Word97::BRC& brcTop, const wvWare::Word97::BRC& brcBottom, const wvWare::Word97::BRC& brcLeft, const wvWare::Word97::BRC& brcRight, const wvWare::Word97::SHD& shd ); void sigTableCellEnd(); protected: diff --git a/filters/kword/msword/texthandler.cpp b/filters/kword/msword/texthandler.cpp index c9586da4..0dcffdbb 100644 --- a/filters/kword/msword/texthandler.cpp +++ b/filters/kword/msword/texthandler.cpp @@ -29,8 +29,8 @@ #include <wv2/parser.h> #include <wv2/fields.h> -#include <qfont.h> -#include <qfontinfo.h> +#include <tqfont.h> +#include <tqfontinfo.h> #include <kdebug.h> #include <klocale.h> @@ -90,7 +90,7 @@ void KWordTextHandler::sectionEnd() void KWordTextHandler::pageBreak() { // Check if PAGEBREAKING already exists (e.g. due to linesTogether) - QDomElement pageBreak = m_oldLayout.namedItem( "PAGEBREAKING" ).toElement(); + TQDomElement pageBreak = m_oldLayout.namedItem( "PAGEBREAKING" ).toElement(); if ( pageBreak.isNull() ) { pageBreak = mainDocument().createElement( "PAGEBREAKING" ); @@ -113,37 +113,37 @@ void KWordTextHandler::footnoteFound( wvWare::FootnoteData::Type type, const wvWare::FootnoteFunctor& parseFootnote ) { bool autoNumbered = (character.unicode() == 2); - QDomElement varElem = insertVariable( 11 /*KWord code for footnotes*/, chp, "STRI" ); - QDomElement footnoteElem = varElem.ownerDocument().createElement( "FOOTNOTE" ); + TQDomElement varElem = insertVariable( 11 /*KWord code for footnotes*/, chp, "STRI" ); + TQDomElement footnoteElem = varElem.ownerDocument().createElement( "FOOTNOTE" ); if ( autoNumbered ) footnoteElem.setAttribute( "value", 1 ); // KWord will renumber anyway else - footnoteElem.setAttribute( "value", QString(QChar(character.unicode())) ); + footnoteElem.setAttribute( "value", TQString(TQChar(character.unicode())) ); footnoteElem.setAttribute( "notetype", type == wvWare::FootnoteData::Endnote ? "endnote" : "footnote" ); footnoteElem.setAttribute( "numberingtype", autoNumbered ? "auto" : "manual" ); if ( type == wvWare::FootnoteData::Endnote ) // Keep name in sync with Document::startFootnote - footnoteElem.setAttribute( "frameset", i18n("Endnote %1").arg( ++m_endNoteNumber ) ); + footnoteElem.setAttribute( "frameset", i18n("Endnote %1").tqarg( ++m_endNoteNumber ) ); else // Keep name in sync with Document::startFootnote - footnoteElem.setAttribute( "frameset", i18n("Footnote %1").arg( ++m_footNoteNumber ) ); + footnoteElem.setAttribute( "frameset", i18n("Footnote %1").tqarg( ++m_footNoteNumber ) ); varElem.appendChild( footnoteElem ); // Remember to parse the footnote text later emit subDocFound( new wvWare::FootnoteFunctor( parseFootnote ), type ); } -QDomElement KWordTextHandler::insertVariable( int type, wvWare::SharedPtr<const wvWare::Word97::CHP> chp, const QString& format ) +TQDomElement KWordTextHandler::insertVariable( int type, wvWare::SharedPtr<const wvWare::Word97::CHP> chp, const TQString& format ) { m_paragraph += '#'; - QDomElement formatElem; + TQDomElement formatElem; writeFormat( m_formats, chp, m_currentStyle ? &m_currentStyle->chp() : 0, m_index, 1, 4 /*id*/, &formatElem ); m_index += 1; - QDomElement varElem = m_formats.ownerDocument().createElement( "VARIABLE" ); - QDomElement typeElem = m_formats.ownerDocument().createElement( "TYPE" ); + TQDomElement varElem = m_formats.ownerDocument().createElement( "VARIABLE" ); + TQDomElement typeElem = m_formats.ownerDocument().createElement( "TYPE" ); typeElem.setAttribute( "type", type ); typeElem.setAttribute( "key", format ); varElem.appendChild( typeElem ); @@ -160,7 +160,7 @@ void KWordTextHandler::tableRowFound( const wvWare::TableRowFunctor& functor, wv paragraphStart( 0L ); static int s_tableNumber = 0; m_currentTable = new KWord::Table(); - m_currentTable->name = i18n("Table %1").arg( ++s_tableNumber ); + m_currentTable->name = i18n("Table %1").tqarg( ++s_tableNumber ); insertAnchor( m_currentTable->name ); } @@ -178,10 +178,10 @@ void KWordTextHandler::pictureFound( const wvWare::PictureFunctor& pictureFuncto wvWare::SharedPtr<const wvWare::Word97::CHP> /*chp*/ ) { static unsigned int s_pictureNumber = 0; - QString pictureName = "pictures/picture"; - pictureName += QString::number( s_pictureNumber ); // filenames start at 0 + TQString pictureName = "pictures/picture"; + pictureName += TQString::number( s_pictureNumber ); // filenames start at 0 // looks better to the user if frame names start at 1 - QString frameName = i18n("Picture %1").arg( ++s_pictureNumber ); + TQString frameName = i18n("Picture %1").tqarg( ++s_pictureNumber ); insertAnchor( frameName ); switch ( picf->mfp.mm ) { @@ -200,21 +200,21 @@ void KWordTextHandler::pictureFound( const wvWare::PictureFunctor& pictureFuncto } #endif // IMAGE_IMPORT -QDomElement KWordTextHandler::insertAnchor( const QString& fsname ) +TQDomElement KWordTextHandler::insertAnchor( const TQString& fsname ) { m_paragraph += '#'; // Can't call writeFormat, we have no chp. - QDomElement format( mainDocument().createElement( "FORMAT" ) ); + TQDomElement format( mainDocument().createElement( "FORMAT" ) ); format.setAttribute( "id", 6 ); format.setAttribute( "pos", m_index ); format.setAttribute( "len", 1 ); m_formats.appendChild( format ); - QDomElement formatElem = format; + TQDomElement formatElem = format; m_index += 1; - QDomElement anchorElem = m_formats.ownerDocument().createElement( "ANCHOR" ); + TQDomElement anchorElem = m_formats.ownerDocument().createElement( "ANCHOR" ); anchorElem.setAttribute( "type", "frameset" ); anchorElem.setAttribute( "instance", fsname ); formatElem.appendChild( anchorElem ); @@ -253,7 +253,7 @@ void KWordTextHandler::paragraphEnd() m_currentTable = 0L; } if ( m_currentStyle ) { - QConstString styleName = Conversion::string( m_currentStyle->name() ); + TQConstString styleName = Conversion::string( m_currentStyle->name() ); writeOutParagraph( styleName.string(), m_paragraph ); } else writeOutParagraph( "Standard", m_paragraph ); @@ -278,8 +278,8 @@ void KWordTextHandler::fieldEnd( const wvWare::FLD* /*fld*/, wvWare::SharedPtr<c // only for handled field type if( m_fieldType >= 0 ) { - QDomElement varElem = insertVariable( 8, chp, "STRING" ); - QDomElement fieldElem = varElem.ownerDocument().createElement( "FIELD" ); + TQDomElement varElem = insertVariable( 8, chp, "STRING" ); + TQDomElement fieldElem = varElem.ownerDocument().createElement( "FIELD" ); fieldElem.setAttribute( "subtype", m_fieldType ); fieldElem.setAttribute( "value", m_fieldValue ); varElem.appendChild( fieldElem ); @@ -294,7 +294,7 @@ void KWordTextHandler::fieldEnd( const wvWare::FLD* /*fld*/, wvWare::SharedPtr<c void KWordTextHandler::runOfText( const wvWare::UString& text, wvWare::SharedPtr<const wvWare::Word97::CHP> chp ) { - QConstString newText( Conversion::string( text ) ); + TQConstString newText( Conversion::string( text ) ); //kdDebug(30513) << "runOfText: " << newText.string() << endl; // text after fieldStart and before fieldSeparator is useless @@ -315,17 +315,17 @@ void KWordTextHandler::runOfText( const wvWare::UString& text, wvWare::SharedPtr } -void KWordTextHandler::writeFormat( QDomElement& parentElement, const wvWare::Word97::CHP* chp, const wvWare::Word97::CHP* refChp, int pos, int len, int formatId, QDomElement* pChildElement ) +void KWordTextHandler::writeFormat( TQDomElement& tqparentElement, const wvWare::Word97::CHP* chp, const wvWare::Word97::CHP* refChp, int pos, int len, int formatId, TQDomElement* pChildElement ) { - QDomElement format( mainDocument().createElement( "FORMAT" ) ); + TQDomElement format( mainDocument().createElement( "FORMAT" ) ); format.setAttribute( "id", formatId ); format.setAttribute( "pos", pos ); format.setAttribute( "len", len ); if ( !refChp || refChp->cv != chp->cv ) { - QColor color = Conversion::color( chp->cv, -1 ); - QDomElement colorElem( mainDocument().createElement( "COLOR" ) ); + TQColor color = Conversion::color( chp->cv, -1 ); + TQDomElement colorElem( mainDocument().createElement( "COLOR" ) ); colorElem.setAttribute( "red", color.red() ); colorElem.setAttribute( "blue", color.blue() ); colorElem.setAttribute( "green", color.green() ); @@ -336,11 +336,11 @@ void KWordTextHandler::writeFormat( QDomElement& parentElement, const wvWare::Wo // TBD: We only use the Ascii font code. We should work out how/when to use the FE and Other font codes. if ( !refChp || refChp->ftcAscii != chp->ftcAscii ) { - QString fontName = getFont( chp->ftcAscii ); + TQString fontName = getFont( chp->ftcAscii ); if ( !fontName.isEmpty() ) { - QDomElement fontElem( mainDocument().createElement( "FONT" ) ); + TQDomElement fontElem( mainDocument().createElement( "FONT" ) ); fontElem.setAttribute( "name", fontName ); format.appendChild( fontElem ); } @@ -349,24 +349,24 @@ void KWordTextHandler::writeFormat( QDomElement& parentElement, const wvWare::Wo if ( !refChp || refChp->hps != chp->hps ) { //kdDebug(30513) << " font size: " << chp->hps/2 << endl; - QDomElement fontSize( mainDocument().createElement( "SIZE" ) ); + TQDomElement fontSize( mainDocument().createElement( "SIZE" ) ); fontSize.setAttribute( "value", (int)(chp->hps / 2) ); // hps is in half points format.appendChild( fontSize ); } if ( !refChp || refChp->fBold != chp->fBold ) { - QDomElement weight( mainDocument().createElement( "WEIGHT" ) ); + TQDomElement weight( mainDocument().createElement( "WEIGHT" ) ); weight.setAttribute( "value", chp->fBold ? 75 : 50 ); format.appendChild( weight ); } if ( !refChp || refChp->fItalic != chp->fItalic ) { - QDomElement italic( mainDocument().createElement( "ITALIC" ) ); + TQDomElement italic( mainDocument().createElement( "ITALIC" ) ); italic.setAttribute( "value", chp->fItalic ? 1 : 0 ); format.appendChild( italic ); } if ( !refChp || refChp->kul != chp->kul ) { - QDomElement underline( mainDocument().createElement( "UNDERLINE" ) ); - QString val = (chp->kul == 0) ? "0" : "1"; + TQDomElement underline( mainDocument().createElement( "UNDERLINE" ) ); + TQString val = (chp->kul == 0) ? "0" : "1"; switch ( chp->kul ) { case 3: // double underline.setAttribute( "styleline", "solid" ); @@ -404,7 +404,7 @@ void KWordTextHandler::writeFormat( QDomElement& parentElement, const wvWare::Wo format.appendChild( underline ); } if ( !refChp || refChp->fStrike != chp->fStrike || refChp->fDStrike != chp->fDStrike ) { - QDomElement strikeout( mainDocument().createElement( "STRIKEOUT" ) ); + TQDomElement strikeout( mainDocument().createElement( "STRIKEOUT" ) ); if ( chp->fDStrike ) // double strikethrough { strikeout.setAttribute( "value", "double" ); @@ -423,12 +423,12 @@ void KWordTextHandler::writeFormat( QDomElement& parentElement, const wvWare::Wo // font attribute (uppercase, lowercase (not in MSWord), small caps) if ( !refChp || refChp->fCaps != chp->fCaps || refChp->fSmallCaps != chp->fSmallCaps ) { - QDomElement fontAttrib( mainDocument().createElement( "FONTATTRIBUTE" ) ); + TQDomElement fontAttrib( mainDocument().createElement( "FONTATTRIBUTE" ) ); fontAttrib.setAttribute( "value", chp->fSmallCaps ? "smallcaps" : chp->fCaps ? "uppercase" : "none" ); format.appendChild( fontAttrib ); } if ( !refChp || refChp->iss != chp->iss ) { // superscript/subscript - QDomElement vertAlign( mainDocument().createElement( "VERTALIGN" ) ); + TQDomElement vertAlign( mainDocument().createElement( "VERTALIGN" ) ); // Obviously the values are reversed between the two file formats :) int kwordVAlign = (chp->iss==1 ? 2 : chp->iss==2 ? 1 : 0); vertAlign.setAttribute( "value", kwordVAlign ); @@ -437,10 +437,10 @@ void KWordTextHandler::writeFormat( QDomElement& parentElement, const wvWare::Wo // background color is known as "highlight" in msword if ( !refChp || refChp->fHighlight != chp->fHighlight || refChp->icoHighlight != chp->icoHighlight ) { - QDomElement bgcolElem( mainDocument().createElement( "TEXTBACKGROUNDCOLOR" ) ); + TQDomElement bgcolElem( mainDocument().createElement( "TEXTBACKGROUNDCOLOR" ) ); if ( chp->fHighlight ) { - QColor color = Conversion::color( chp->icoHighlight, -1 ); + TQColor color = Conversion::color( chp->icoHighlight, -1 ); bgcolElem.setAttribute( "red", color.red() ); bgcolElem.setAttribute( "blue", color.blue() ); bgcolElem.setAttribute( "green", color.green() ); @@ -454,8 +454,8 @@ void KWordTextHandler::writeFormat( QDomElement& parentElement, const wvWare::Wo // Shadow text. Only on/off. The properties are defined at the paragraph level (in KWord). if ( !refChp || refChp->fShadow != chp->fShadow || refChp->fImprint != chp->fImprint ) { - QDomElement shadowElem( mainDocument().createElement( "SHADOW" ) ); - QString css = "none"; + TQDomElement shadowElem( mainDocument().createElement( "SHADOW" ) ); + TQString css = "none"; // Generate a shadow with hardcoded values that make it look like in MSWord. // We need to make the distance depend on the font size though, to look good if (chp->fShadow || chp->fImprint) @@ -464,14 +464,14 @@ void KWordTextHandler::writeFormat( QDomElement& parentElement, const wvWare::Wo int dist = fontSize > 20 ? 2 : 1; if (chp->fImprint) // ## no real support for imprint, we use a topleft shadow dist = -dist; - css = QString::fromLatin1("#bebebe %1pt %1pt").arg(dist).arg(dist); + css = TQString::tqfromLatin1("#bebebe %1pt %1pt").tqarg(dist).tqarg(dist); } shadowElem.setAttribute( "text-shadow", css ); format.appendChild( shadowElem ); } if ( pChildElement || !format.firstChild().isNull() ) // Don't save an empty format tag, unless the caller asked for it - parentElement.appendChild( format ); + tqparentElement.appendChild( format ); if ( pChildElement ) *pChildElement = format; } @@ -480,15 +480,15 @@ void KWordTextHandler::writeFormat( QDomElement& parentElement, const wvWare::Wo // Return the name of a font. We have to convert the Microsoft font names to // something that might just be present under X11. -QString KWordTextHandler::getFont(unsigned fc) const +TQString KWordTextHandler::getFont(unsigned fc) const { Q_ASSERT( m_parser ); if ( !m_parser ) - return QString::null; + return TQString(); const wvWare::Word97::FFN& ffn ( m_parser->font( fc ) ); - QConstString fontName( Conversion::string( ffn.xszFfn ) ); - QString font = fontName.string(); + TQConstString fontName( Conversion::string( ffn.xszFfn ) ); + TQString font = fontName.string(); #ifdef FONT_DEBUG kdDebug(30513) << " MS-FONT: " << font << endl; @@ -497,7 +497,7 @@ QString KWordTextHandler::getFont(unsigned fc) const static const unsigned ENTRIES = 6; static const char* const fuzzyLookup[ENTRIES][2] = { - // MS contains X11 font family + // MS tqcontains X11 font family // substring. non-Xft name. { "times", "times" }, { "courier", "courier" }, @@ -507,7 +507,7 @@ QString KWordTextHandler::getFont(unsigned fc) const { "helvetica", "helvetica" } }; - // When Xft is available, Qt will do a good job of looking up our local + // When Xft is available, TQt will do a good job of looking up our local // equivalent of the MS font. But, we want to work even without Xft. // So, first, we do a fuzzy match of some common MS font names. unsigned i; @@ -515,7 +515,7 @@ QString KWordTextHandler::getFont(unsigned fc) const for (i = 0; i < ENTRIES; i++) { // The loop will leave unchanged any MS font name not fuzzy-matched. - if (font.find(fuzzyLookup[i][0], 0, FALSE) != -1) + if (font.tqfind(fuzzyLookup[i][0], 0, FALSE) != -1) { font = fuzzyLookup[i][1]; break; @@ -526,9 +526,9 @@ QString KWordTextHandler::getFont(unsigned fc) const kdDebug(30513) << " FUZZY-FONT: " << font << endl; #endif - // Use Qt to look up our canonical equivalent of the font name. - QFont xFont( font ); - QFontInfo info( xFont ); + // Use TQt to look up our canonical equivalent of the font name. + TQFont xFont( font ); + TQFontInfo info( xFont ); #ifdef FONT_DEBUG kdDebug(30513) << " QT-FONT: " << info.family() << endl; @@ -537,7 +537,7 @@ QString KWordTextHandler::getFont(unsigned fc) const return info.family(); } -void KWordTextHandler::writeOutParagraph( const QString& styleName, const QString& text ) +void KWordTextHandler::writeOutParagraph( const TQString& styleName, const TQString& text ) { if ( m_framesetElement.isNull() ) { @@ -545,105 +545,105 @@ void KWordTextHandler::writeOutParagraph( const QString& styleName, const QStrin kdWarning(30513) << "KWordTextHandler: no frameset element to write to! text=" << text << endl; return; } - QDomElement paragraphElementOut=mainDocument().createElement("PARAGRAPH"); + TQDomElement paragraphElementOut=mainDocument().createElement("PARAGRAPH"); m_framesetElement.appendChild(paragraphElementOut); - QDomElement textElement=mainDocument().createElement("TEXT"); + TQDomElement textElement=mainDocument().createElement("TEXT"); textElement.setAttribute( "xml:space", "preserve" ); paragraphElementOut.appendChild(textElement); paragraphElementOut.appendChild( m_formats ); - QDomElement layoutElement=mainDocument().createElement("LAYOUT"); - paragraphElementOut.appendChild(layoutElement); + TQDomElement tqlayoutElement=mainDocument().createElement("LAYOUT"); + paragraphElementOut.appendChild(tqlayoutElement); - QDomElement nameElement = mainDocument().createElement("NAME"); + TQDomElement nameElement = mainDocument().createElement("NAME"); nameElement.setAttribute("value", styleName); - layoutElement.appendChild(nameElement); + tqlayoutElement.appendChild(nameElement); if ( m_paragraphProperties ) { // Write out the properties of the paragraph - writeLayout( layoutElement, *m_paragraphProperties, m_currentStyle ); + writeLayout( tqlayoutElement, *m_paragraphProperties, m_currentStyle ); } textElement.appendChild(mainDocument().createTextNode(text)); - m_paragraph = QString( "" ); + m_paragraph = TQString( "" ); m_index = 0; - m_oldLayout = layoutElement; // Keep a reference to the old layout for some hacks + m_oldLayout = tqlayoutElement; // Keep a reference to the old tqlayout for some hacks } -void KWordTextHandler::writeLayout( QDomElement& parentElement, const wvWare::ParagraphProperties& paragraphProperties, const wvWare::Style* style ) +void KWordTextHandler::writeLayout( TQDomElement& tqparentElement, const wvWare::ParagraphProperties& paragraphProperties, const wvWare::Style* style ) { const wvWare::Word97::PAP& pap = paragraphProperties.pap(); - // Always write out the alignment, it's required - QDomElement flowElement = mainDocument().createElement("FLOW"); - QString alignment = Conversion::alignment( pap.jc ); - flowElement.setAttribute( "align", alignment ); - parentElement.appendChild( flowElement ); + // Always write out the tqalignment, it's required + TQDomElement flowElement = mainDocument().createElement("FLOW"); + TQString tqalignment = Conversion::tqalignment( pap.jc ); + flowElement.setAttribute( "align", tqalignment ); + tqparentElement.appendChild( flowElement ); //kdDebug(30513) << k_funcinfo << " dxaLeft1=" << pap.dxaLeft1 << " dxaLeft=" << pap.dxaLeft << " dxaRight=" << pap.dxaRight << " dyaBefore=" << pap.dyaBefore << " dyaAfter=" << pap.dyaAfter << " lspd=" << pap.lspd.dyaLine << "/" << pap.lspd.fMultLinespace << endl; if ( pap.dxaLeft1 || pap.dxaLeft || pap.dxaRight ) { - QDomElement indentsElement = mainDocument().createElement("INDENTS"); + TQDomElement indentsElement = mainDocument().createElement("INDENTS"); // 'first' is relative to 'left' in both formats indentsElement.setAttribute( "first", (double)pap.dxaLeft1 / 20.0 ); indentsElement.setAttribute( "left", (double)pap.dxaLeft / 20.0 ); indentsElement.setAttribute( "right", (double)pap.dxaRight / 20.0 ); - parentElement.appendChild( indentsElement ); + tqparentElement.appendChild( indentsElement ); } if ( pap.dyaBefore || pap.dyaAfter ) { - QDomElement offsetsElement = mainDocument().createElement("OFFSETS"); + TQDomElement offsetsElement = mainDocument().createElement("OFFSETS"); offsetsElement.setAttribute( "before", (double)pap.dyaBefore / 20.0 ); offsetsElement.setAttribute( "after", (double)pap.dyaAfter / 20.0 ); - parentElement.appendChild( offsetsElement ); + tqparentElement.appendChild( offsetsElement ); } // Linespacing - QString lineSpacing = Conversion::lineSpacing( pap.lspd ); + TQString lineSpacing = Conversion::lineSpacing( pap.lspd ); if ( lineSpacing != "0" ) { - QDomElement lineSpacingElem = mainDocument().createElement( "LINESPACING" ); + TQDomElement lineSpacingElem = mainDocument().createElement( "LINESPACING" ); lineSpacingElem.setAttribute("value", lineSpacing ); - parentElement.appendChild( lineSpacingElem ); + tqparentElement.appendChild( lineSpacingElem ); } if ( pap.fKeep || pap.fKeepFollow || pap.fPageBreakBefore ) { - QDomElement pageBreak = mainDocument().createElement( "PAGEBREAKING" ); + TQDomElement pageBreak = mainDocument().createElement( "PAGEBREAKING" ); if ( pap.fKeep ) pageBreak.setAttribute("linesTogether", "true"); if ( pap.fPageBreakBefore ) pageBreak.setAttribute("hardFrameBreak", "true" ); if ( pap.fKeepFollow ) pageBreak.setAttribute("keepWithNext", "true" ); - parentElement.appendChild( pageBreak ); + tqparentElement.appendChild( pageBreak ); } // Borders if ( pap.brcTop.brcType ) { - QDomElement borderElement = mainDocument().createElement( "TOPBORDER" ); + TQDomElement borderElement = mainDocument().createElement( "TOPBORDER" ); Conversion::setBorderAttributes( borderElement, pap.brcTop ); - parentElement.appendChild( borderElement ); + tqparentElement.appendChild( borderElement ); } if ( pap.brcBottom.brcType ) { - QDomElement borderElement = mainDocument().createElement( "BOTTOMBORDER" ); + TQDomElement borderElement = mainDocument().createElement( "BOTTOMBORDER" ); Conversion::setBorderAttributes( borderElement, pap.brcBottom ); - parentElement.appendChild( borderElement ); + tqparentElement.appendChild( borderElement ); } if ( pap.brcLeft.brcType ) { - QDomElement borderElement = mainDocument().createElement( "LEFTBORDER" ); + TQDomElement borderElement = mainDocument().createElement( "LEFTBORDER" ); Conversion::setBorderAttributes( borderElement, pap.brcLeft ); - parentElement.appendChild( borderElement ); + tqparentElement.appendChild( borderElement ); } if ( pap.brcRight.brcType ) { - QDomElement borderElement = mainDocument().createElement( "RIGHTBORDER" ); + TQDomElement borderElement = mainDocument().createElement( "RIGHTBORDER" ); Conversion::setBorderAttributes( borderElement, pap.brcRight ); - parentElement.appendChild( borderElement ); + tqparentElement.appendChild( borderElement ); } // Tabulators @@ -652,14 +652,14 @@ void KWordTextHandler::writeLayout( QDomElement& parentElement, const wvWare::Pa for ( int i = 0 ; i < pap.itbdMac ; ++i ) { const wvWare::Word97::TabDescriptor &td = pap.rgdxaTab[i]; - QDomElement tabElement = mainDocument().createElement( "TABULATOR" ); + TQDomElement tabElement = mainDocument().createElement( "TABULATOR" ); tabElement.setAttribute( "ptpos", (double)td.dxaTab / 20.0 ); //kdDebug(30513) << "ptpos=" << (double)td.dxaTab / 20.0 << endl; // Wow, lucky here. The type enum matches. Only, MSWord has 4=bar, // which kword doesn't support. We map it to 0 with a clever '%4' :) tabElement.setAttribute( "type", td.tbd.jc % 4 ); int filling = 0; - double width = 0.5; // default kword value, see koparaglayout.cc + double width = 0.5; // default kword value, see koparagtqlayout.cc switch ( td.tbd.tlc ) { case 1: // dots case 2: // hyphenated @@ -674,17 +674,17 @@ void KWordTextHandler::writeLayout( QDomElement& parentElement, const wvWare::Pa } tabElement.setAttribute( "filling", filling ); tabElement.setAttribute( "width", width ); - parentElement.appendChild( tabElement ); + tqparentElement.appendChild( tabElement ); } } if ( pap.ilfo > 0 ) { - writeCounter( parentElement, paragraphProperties, style ); + writeCounter( tqparentElement, paragraphProperties, style ); } } -void KWordTextHandler::writeCounter( QDomElement& parentElement, const wvWare::ParagraphProperties& paragraphProperties, const wvWare::Style* style ) +void KWordTextHandler::writeCounter( TQDomElement& tqparentElement, const wvWare::ParagraphProperties& paragraphProperties, const wvWare::Style* style ) { const wvWare::ListInfo* listInfo = paragraphProperties.listInfo(); if ( !listInfo ) @@ -694,7 +694,7 @@ void KWordTextHandler::writeCounter( QDomElement& parentElement, const wvWare::P listInfo->dump(); #endif - QDomElement counterElement = mainDocument().createElement( "COUNTER" ); + TQDomElement counterElement = mainDocument().createElement( "COUNTER" ); // numbering type: 0==list 1==chapter. First we determine it for word6 docs. // But we can also activate it if the text() looks that way int numberingType = listInfo->isWord6() && listInfo->prev() ? 1 : 0; @@ -717,10 +717,10 @@ void KWordTextHandler::writeCounter( QDomElement& parentElement, const wvWare::P counterElement.setAttribute( "type", 11 ); // Box. We have no triangle. } else { // Map all other bullets to a "custom bullet" in kword. - kdDebug(30513) << "custom bullet, code=" << QString::number(code,16) << endl; + kdDebug(30513) << "custom bullet, code=" << TQString::number(code,16) << endl; counterElement.setAttribute( "type", 6 ); // custom counterElement.setAttribute( "bullet", code ); - QString paragFont = getFont( style->chp().ftcAscii ); + TQString paragFont = getFont( style->chp().ftcAscii ); counterElement.setAttribute( "bulletfont", paragFont ); } } else @@ -744,7 +744,7 @@ void KWordTextHandler::writeCounter( QDomElement& parentElement, const wvWare::P // Now we need to parse the text, to try and convert msword's powerful list template // stuff, into what KWord can do right now. - QString prefix, suffix; + TQString prefix, suffix; bool depthFound = false; int displayLevels = 1; // We parse <0>.<2>.<1>. as "level 2 with suffix='.'" (no prefix) @@ -760,18 +760,18 @@ void KWordTextHandler::writeCounter( QDomElement& parentElement, const wvWare::P kdWarning(30513) << "ilvl " << pap.ilvl << " found twice in listInfo text..." << endl; else depthFound = true; - suffix = QString::null; + suffix = TQString(); } else { Q_ASSERT( ch < pap.ilvl ); // Can't see how level 1 would have a <0> in it... if ( ch < pap.ilvl ) - ++displayLevels; // we found a 'parent level', to be displayed - prefix = QString::null; // get rid of previous prefixes + ++displayLevels; // we found a 'tqparent level', to be displayed + prefix = TQString(); // get rid of previous prefixes } } else { // Normal character if ( depthFound ) - suffix += QChar(ch); + suffix += TQChar(ch); else - prefix += QChar(ch); + prefix += TQChar(ch); } } if ( displayLevels > 1 ) @@ -779,10 +779,10 @@ void KWordTextHandler::writeCounter( QDomElement& parentElement, const wvWare::P // This is a hierarchical list numbering e.g. <0>.<1>. // (unless this is about a heading, in which case we've set numberingtype to 1 already // so it will indeed look like that). - // The question is whether the '.' is the suffix of the parent level already.. + // The question is whether the '.' is the suffix of the tqparent level already.. if ( depth > 0 && !prefix.isEmpty() && m_listSuffixes[ depth - 1 ] == prefix ) { - prefix = QString::null; // it's already the parent's suffix -> remove it - kdDebug(30513) << "depth=" << depth << " parent suffix is " << prefix << " -> clearing" << endl; + prefix = TQString(); // it's already the tqparent's suffix -> remove it + kdDebug(30513) << "depth=" << depth << " tqparent suffix is " << prefix << " -> clearing" << endl; } } if ( isHeading ) @@ -810,7 +810,7 @@ void KWordTextHandler::writeCounter( QDomElement& parentElement, const wvWare::P ( numberingType == 0 &&m_previousEnumLSID != 0 && m_previousEnumLSID != listInfo->lsid() ) ) counterElement.setAttribute( "restart", "true" ); - // listInfo->alignment() is not supported in KWord + // listInfo->tqalignment() is not supported in KWord // listInfo->isLegal() hmm // listInfo->notRestarted() [by higher level of lists] not supported // listInfo->followingchar() ignored, it's always a space in KWord currently @@ -820,17 +820,17 @@ void KWordTextHandler::writeCounter( QDomElement& parentElement, const wvWare::P else m_previousEnumLSID = listInfo->lsid(); counterElement.setAttribute( "numberingtype", numberingType ); - parentElement.appendChild( counterElement ); + tqparentElement.appendChild( counterElement ); } -void KWordTextHandler::setFrameSetElement( const QDomElement& frameset ) +void KWordTextHandler::setFrameSetElement( const TQDomElement& frameset ) { m_framesetElement = frameset; for ( uint i = 0 ; i < 9 ; ++i ) - m_listSuffixes[i] = QString::null; + m_listSuffixes[i] = TQString(); } -QDomDocument KWordTextHandler::mainDocument() const +TQDomDocument KWordTextHandler::mainDocument() const { return m_framesetElement.ownerDocument(); } diff --git a/filters/kword/msword/texthandler.h b/filters/kword/msword/texthandler.h index 7a68138f..3075803b 100644 --- a/filters/kword/msword/texthandler.h +++ b/filters/kword/msword/texthandler.h @@ -24,9 +24,9 @@ #include "versionmagic.h" #include <wv2/handlers.h> -#include <qstring.h> -#include <qobject.h> -#include <qdom.h> +#include <tqstring.h> +#include <tqobject.h> +#include <tqdom.h> #include <string> @@ -48,13 +48,14 @@ public: }; -class KWordTextHandler : public QObject, public wvWare::TextHandler +class KWordTextHandler : public TQObject, public wvWare::TextHandler { Q_OBJECT + TQ_OBJECT public: KWordTextHandler( wvWare::SharedPtr<wvWare::Parser> parser ); - void setFrameSetElement( const QDomElement& frameset ); + void setFrameSetElement( const TQDomElement& frameset ); //////// TextHandler interface @@ -85,30 +86,30 @@ public: // Write a <FORMAT> tag from the given CHP // Returns that element into pChildElement if set (in that case even an empty FORMAT can be appended) - void writeFormat( QDomElement& parentElement, const wvWare::Word97::CHP* chp, const wvWare::Word97::CHP* refChp, int pos, int len, int formatId, QDomElement* pChildElement ); + void writeFormat( TQDomElement& tqparentElement, const wvWare::Word97::CHP* chp, const wvWare::Word97::CHP* refChp, int pos, int len, int formatId, TQDomElement* pChildElement ); - // Write the _contents_ (children) of a <LAYOUT> or <STYLE> tag, from the given parag props - void writeLayout( QDomElement& parentElement, const wvWare::ParagraphProperties& paragraphProperties, const wvWare::Style* style ); + // Write the _contents_ (tqchildren) of a <LAYOUT> or <STYLE> tag, from the given parag props + void writeLayout( TQDomElement& tqparentElement, const wvWare::ParagraphProperties& paragraphProperties, const wvWare::Style* style ); // Communication with Document, without having to know about Document signals: void firstSectionFound( wvWare::SharedPtr<const wvWare::Word97::SEP> ); void subDocFound( const wvWare::FunctorBase* parsingFunctor, int data ); void tableFound( const KWord::Table& table ); - void pictureFound( const QString& frameName, const QString& pictureName, const wvWare::FunctorBase* pictureFunctor ); + void pictureFound( const TQString& frameName, const TQString& pictureName, const wvWare::FunctorBase* pictureFunctor ); protected: - void writeOutParagraph( const QString& styleName, const QString& text ); - void writeCounter( QDomElement& parentElement, const wvWare::ParagraphProperties& paragraphProperties, const wvWare::Style* style ); - QDomElement insertVariable( int type, wvWare::SharedPtr<const wvWare::Word97::CHP> chp, const QString& format ); - QDomElement insertAnchor( const QString& fsname ); - QString getFont(unsigned fc) const; - QDomDocument mainDocument() const; + void writeOutParagraph( const TQString& styleName, const TQString& text ); + void writeCounter( TQDomElement& tqparentElement, const wvWare::ParagraphProperties& paragraphProperties, const wvWare::Style* style ); + TQDomElement insertVariable( int type, wvWare::SharedPtr<const wvWare::Word97::CHP> chp, const TQString& format ); + TQDomElement insertAnchor( const TQString& fsname ); + TQString getFont(unsigned fc) const; + TQDomDocument mainDocument() const; private: wvWare::SharedPtr<wvWare::Parser> m_parser; - QString m_listSuffixes[9]; // The suffix for every list level seen so far - QDomElement m_framesetElement; + TQString m_listSuffixes[9]; // The suffix for every list level seen so far + TQDomElement m_framesetElement; int m_sectionNumber; int m_footNoteNumber; // number of footnote _vars_ written out int m_endNoteNumber; // number of endnote _vars_ written out @@ -116,18 +117,18 @@ private: int m_previousEnumLSID; // The list id of the previous enum-list item // Current paragraph - QString m_paragraph; + TQString m_paragraph; const wvWare::Style* m_currentStyle; wvWare::SharedPtr<const wvWare::ParagraphProperties> m_paragraphProperties; enum { NoShadow, Shadow, Imprint } m_shadowTextFound; int m_index; - QDomElement m_formats; - QDomElement m_oldLayout; + TQDomElement m_formats; + TQDomElement m_oldLayout; KWord::Table* m_currentTable; bool m_bInParagraph; - QString m_fieldValue; + TQString m_fieldValue; bool m_insideField; bool m_fieldAfterSeparator; int m_fieldType; // 0 for no field diff --git a/filters/kword/mswrite/ImportDialog.cc b/filters/kword/mswrite/ImportDialog.cc index e6b81555..de8fece1 100644 --- a/filters/kword/mswrite/ImportDialog.cc +++ b/filters/kword/mswrite/ImportDialog.cc @@ -18,7 +18,7 @@ * Boston, MA 02110-1301, USA. */ -#include <qtextcodec.h> +#include <tqtextcodec.h> #include <klocale.h> #include <kcharsets.h> @@ -28,15 +28,15 @@ #include <ImportDialogUI.h> #include <ImportDialog.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qradiobutton.h> -#include <qvbuttongroup.h> -#include <qcombobox.h> -#include <qcheckbox.h> - -MSWriteImportDialog :: MSWriteImportDialog(QWidget* parent) - : KDialogBase(parent, 0, true, i18n("KWord's MS Write Import Filter"), Ok|Cancel, No, true), +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqradiobutton.h> +#include <tqvbuttongroup.h> +#include <tqcombobox.h> +#include <tqcheckbox.h> + +MSWriteImportDialog :: MSWriteImportDialog(TQWidget* tqparent) + : KDialogBase(tqparent, 0, true, i18n("KWord's MS Write Import Filter"), Ok|Cancel, No, true), m_dialog(new ImportDialogUI(this)) { kapp->restoreOverrideCursor(); @@ -48,40 +48,40 @@ MSWriteImportDialog :: MSWriteImportDialog(QWidget* parent) setMainWidget(m_dialog); - connect(m_dialog->comboBoxEncoding, SIGNAL(activated(int)), this, - SLOT(comboBoxEncodingActivated(int))); + connect(m_dialog->comboBoxEncoding, TQT_SIGNAL(activated(int)), this, + TQT_SLOT(comboBoxEncodingActivated(int))); } MSWriteImportDialog :: ~MSWriteImportDialog(void) { - kapp->setOverrideCursor(Qt::waitCursor); + kapp->setOverrideCursor(TQt::waitCursor); } -QTextCodec* MSWriteImportDialog::getCodec(void) const +TQTextCodec* MSWriteImportDialog::getCodec(void) const { - QTextCodec* codec=NULL; + TQTextCodec* codec=NULL; if (m_dialog->radioEncodingDefault==m_dialog->buttonGroupEncoding->selected()) { kdDebug(30509) << "Encoding: CP 1252" << endl; - codec=QTextCodec::codecForName("CP 1252"); + codec=TQTextCodec::codecForName("CP 1252"); } /*else if (m_dialog->radioEncodingLocal==m_dialog->buttonGroupEncoding->selected()) { kdDebug(30503) << "Encoding: Locale" << endl; - codec=QTextCodec::codecForLocale(); + codec=TQTextCodec::codecForLocale(); }*/ else if (m_dialog->radioEncodingOther==m_dialog->buttonGroupEncoding->selected()) { - QString strCodec=m_dialog->comboBoxEncoding->currentText(); + TQString strCodec=m_dialog->comboBoxEncoding->currentText(); kdDebug(30509) << "Encoding: " << strCodec << endl; if (strCodec.isEmpty()) { - codec=QTextCodec::codecForLocale(); + codec=TQTextCodec::codecForLocale(); } else { - // We do not use QTextCodec::codecForName here + // We do not use TQTextCodec::codecForName here // because we fear subtle problems codec=KGlobal::charsets()->codecForName(strCodec); } @@ -91,7 +91,7 @@ QTextCodec* MSWriteImportDialog::getCodec(void) const { // Default: UTF-8 kdWarning(30509) << "No codec set, assuming UTF-8" << endl; - codec=QTextCodec::codecForName("UTF-8"); + codec=TQTextCodec::codecForName("UTF-8"); } return codec; diff --git a/filters/kword/mswrite/ImportDialog.h b/filters/kword/mswrite/ImportDialog.h index abcece8c..29cd2e6f 100644 --- a/filters/kword/mswrite/ImportDialog.h +++ b/filters/kword/mswrite/ImportDialog.h @@ -21,7 +21,7 @@ #ifndef _IMPORT_DIALOG_H #define _IMPORT_DIALOG_H -#include <qwidget.h> +#include <tqwidget.h> #include <kdialogbase.h> @@ -29,11 +29,12 @@ class ImportDialogUI; class MSWriteImportDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - MSWriteImportDialog(QWidget* parent=NULL); + MSWriteImportDialog(TQWidget* tqparent=NULL); ~MSWriteImportDialog(void); - QTextCodec* getCodec(void) const; + TQTextCodec* getCodec(void) const; bool getSimulateLinespacing(void) const; bool getSimulateImageOffset (void) const; private: diff --git a/filters/kword/mswrite/ImportDialogUI.ui b/filters/kword/mswrite/ImportDialogUI.ui index 2767210f..953caac6 100644 --- a/filters/kword/mswrite/ImportDialogUI.ui +++ b/filters/kword/mswrite/ImportDialogUI.ui @@ -2,7 +2,7 @@ <class>ImportDialogUI</class> <comment>Import dialog for KWord's MS Write import filter</comment> <author>Nicolas GOUTTE <goutte@kde.org></author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>ImportDialogUI</cstring> </property> @@ -27,7 +27,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroupEncoding</cstring> </property> @@ -55,7 +55,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QComboBox" row="1" column="1" rowspan="1" colspan="2"> + <widget class="TQComboBox" row="1" column="1" rowspan="1" colspan="2"> <property name="name"> <cstring>comboBoxEncoding</cstring> </property> @@ -68,7 +68,7 @@ </sizepolicy> </property> </widget> - <widget class="QRadioButton" row="1" column="0"> + <widget class="TQRadioButton" row="1" column="0"> <property name="name"> <cstring>radioEncodingOther</cstring> </property> @@ -92,14 +92,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QRadioButton" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQRadioButton" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>radioEncodingDefault</cstring> </property> @@ -126,7 +126,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -135,7 +135,7 @@ </spacer> </grid> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupAdvanced</cstring> </property> @@ -155,7 +155,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>checkBoxLinespacing</cstring> </property> @@ -187,14 +187,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QCheckBox" row="1" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> <cstring>checkBoxImageOffset</cstring> </property> @@ -218,7 +218,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -237,7 +237,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -252,5 +252,5 @@ <tabstop>checkBoxLinespacing</tabstop> <tabstop>checkBoxImageOffset</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/filters/kword/mswrite/mswriteexport.cc b/filters/kword/mswrite/mswriteexport.cc index 21f9ac2d..efc4020c 100644 --- a/filters/kword/mswrite/mswriteexport.cc +++ b/filters/kword/mswrite/mswriteexport.cc @@ -21,14 +21,14 @@ #include <stdlib.h> #include <string.h> -#include <qbuffer.h> -#include <qcstring.h> -#include <qfile.h> -#include <qfont.h> -#include <qimage.h> -#include <qtextcodec.h> -#include <qvaluelist.h> -#include <qvaluestack.h> +#include <tqbuffer.h> +#include <tqcstring.h> +#include <tqfile.h> +#include <tqfont.h> +#include <tqimage.h> +#include <tqtextcodec.h> +#include <tqvaluelist.h> +#include <tqvaluestack.h> #include <kdebug.h> #include <kgenericfactory.h> @@ -232,11 +232,11 @@ private: MSWrite::Word m_pageNumberStart; // for charset conversion - QTextCodec *m_codec; - QTextEncoder *m_encoder; + TQTextCodec *m_codec; + TQTextEncoder *m_encoder; - QValueList <HeaderData> m_headerData; - QValueList <FooterData> m_footerData; + TQValueList <HeaderData> m_headerData; + TQValueList <FooterData> m_footerData; int m_headerType, m_footerType; bool m_hasHeader, m_isHeaderOnFirstPage; @@ -260,7 +260,7 @@ public: m_inWhat (Nothing) { // just select windows-1252 until the "Select Encoding" dialog works - m_codec = QTextCodec::codecForName ("CP 1252"); + m_codec = TQTextCodec::codecForName ("CP 1252"); if (m_codec) m_encoder = m_codec->makeEncoder(); @@ -296,13 +296,13 @@ public: return m_device->bad (); } - bool doOpenFile (const QString &outFileName, const QString &) + bool doOpenFile (const TQString &outFileName, const TQString &) { // constructor failed? if (!m_device || !m_generator) return false; - if (!m_device->openFile (QFile::encodeName (outFileName))) return false; + if (!m_device->openFile (TQFile::encodeName (outFileName))) return false; return true; } @@ -456,7 +456,7 @@ public: return true; } - bool isParaListEmpty (const QValueList <ParaData> ¶) + bool isParaListEmpty (const TQValueList <ParaData> ¶) { if (para.count () == 1) { @@ -560,7 +560,7 @@ public: bool wroteFooter = false; m_inWhat = Footer; - for (QValueList <FooterData>::Iterator it = m_footerData.begin (); + for (TQValueList <FooterData>::Iterator it = m_footerData.begin (); it != m_footerData.end (); it++) { @@ -582,7 +582,7 @@ public: bool wroteHeader = false; m_inWhat = Header; - for (QValueList <HeaderData>::Iterator it = m_headerData.begin (); + for (TQValueList <HeaderData>::Iterator it = m_headerData.begin (); it != m_headerData.end (); it++) { @@ -614,7 +614,7 @@ public: #if 0 // dump remaining header paragraphs at the start of the body - for (QValueList <HeaderData>::Iterator it = m_headerData.begin (); + for (TQValueList <HeaderData>::Iterator it = m_headerData.begin (); it != m_headerData.end (); it++) { @@ -624,7 +624,7 @@ public: } // dump remaining footer paragraphs too - for (QValueList <FooterData>::Iterator it = m_footerData.begin (); + for (TQValueList <FooterData>::Iterator it = m_footerData.begin (); it != m_footerData.end (); it++) { @@ -646,24 +646,24 @@ public: return true; } - // device that can either read from or write to a QBuffer + // device that can either read from or write to a TQBuffer // (but not both at the same time, please :)) - class QBufferDevice : public MSWrite::Device + class TQBufferDevice : public MSWrite::Device { private: - QBuffer *m_buffer; + TQBuffer *m_buffer; public: - QBufferDevice (QBuffer *buffer) + TQBufferDevice (TQBuffer *buffer) { m_buffer = buffer; } bool read (MSWrite::Byte *buf, const MSWrite::DWord numBytes) { - if (m_buffer->readBlock ((char *) buf, (Q_ULONG) numBytes) != Q_LONG (numBytes)) + if (m_buffer->readBlock ((char *) buf, (TQ_ULONG) numBytes) != TQ_LONG (numBytes)) { - error (MSWrite::Error::FileError, "could not read from QBuffer (not really a FileError)\n"); + error (MSWrite::Error::FileError, "could not read from TQBuffer (not really a FileError)\n"); return false; } else @@ -672,9 +672,9 @@ public: bool write (const MSWrite::Byte *buf, const MSWrite::DWord numBytes) { - if (m_buffer->writeBlock ((char *) buf, (Q_ULONG) numBytes) != Q_LONG (numBytes)) + if (m_buffer->writeBlock ((char *) buf, (TQ_ULONG) numBytes) != TQ_LONG (numBytes)) { - error (MSWrite::Error::FileError, "could not write to QBuffer (not really a FileError)\n"); + error (MSWrite::Error::FileError, "could not write to TQBuffer (not really a FileError)\n"); return false; } else @@ -710,7 +710,7 @@ public: if (!m_buffer->at (absoffset)) { - error (MSWrite::Error::FileError, "QBuffer could not seek (not really a FileError)\n"); + error (MSWrite::Error::FileError, "TQBuffer could not seek (not really a FileError)\n"); return false; } @@ -1027,12 +1027,12 @@ public: double imageActualWidth = -1, imageActualHeight = -1; MSWrite::DWord imageSize = 0; - QString imageType; - int pos = frameAnchor.picture.koStoreName.findRev ('.'); + TQString imageType; + int pos = frameAnchor.picture.koStoreName.tqfindRev ('.'); if (pos != -1) imageType = frameAnchor.picture.koStoreName.mid (pos).lower (); kdDebug (30509) << "\timageType: " << imageType << endl; - QByteArray imageData; + TQByteArray imageData; kdDebug (30509) << "\tReading image: " << frameAnchor.picture.koStoreName << endl; if (!loadSubFile (frameAnchor.picture.koStoreName, imageData)) ErrorAndQuit (MSWrite::Error::FileError, "could not open image from store\n"); @@ -1054,7 +1054,7 @@ public: } // get raw dimensions - QRect dimen = wmf.boundingRect (); + TQRect dimen = wmf.boundingRect (); int width = abs (dimen.width ()); int height = abs (dimen.height ()); kdDebug (30509) << "\tRaw WMF dimensions: " << width << "x" << height << endl; @@ -1082,7 +1082,7 @@ public: } else if (wmf.isEnhanced ()) { - kdError (30509) << "Enhanced WMF unsupported by QWmf, internal error!" << endl; + kdError (30509) << "Enhanced WMF unsupported by TQWmf, internal error!" << endl; return true; } @@ -1108,10 +1108,10 @@ public: // TODO: DDB? else if (imageType == ".bmp") { - QImage image (imageData); + TQImage image (imageData); if (image.isNull ()) { - kdError (30509) << "QImage IsNull: Line=" << __LINE__ << endl; + kdError (30509) << "TQImage IsNull: Line=" << __LINE__ << endl; return true; } @@ -1126,16 +1126,16 @@ public: << " size=" << imageSize << endl; - QByteArray imageWMF; + TQByteArray imageWMF; // input device - QBuffer inBuffer (imageData); + TQBuffer inBuffer (imageData); inBuffer.open (IO_ReadOnly); - QBufferDevice inDevice (&inBuffer); + TQBufferDevice inDevice (&inBuffer); // output device - QBuffer outBuffer (imageWMF); + TQBuffer outBuffer (imageWMF); outBuffer.open (IO_WriteOnly); - QBufferDevice outDevice (&outBuffer); + TQBufferDevice outDevice (&outBuffer); // BMP --> WMF if (!BMP2WMF (inDevice, outDevice)) @@ -1154,10 +1154,10 @@ public: { if (imageActualWidth == -1 && imageActualHeight == -1) { - QImage image (imageData); + TQImage image (imageData); if (image.isNull()) { - kdError (30509) << "QImage isNull: Line=" << __LINE__ << endl; + kdError (30509) << "TQImage isNull: Line=" << __LINE__ << endl; return true; } @@ -1170,13 +1170,13 @@ public: << " size=" << imageSize << endl; - QByteArray imageBMP; + TQByteArray imageBMP; // input device - QBuffer inBuffer (imageData); + TQBuffer inBuffer (imageData); inBuffer.open (IO_ReadOnly); // read foreign image - QImageIO imageIO (&inBuffer, NULL); + TQImageIO imageIO (&inBuffer, NULL); if (!imageIO.read ()) { kdError (30509) << "Could not read foreign format" << endl; @@ -1184,11 +1184,11 @@ public: } // output device - QBuffer outBuffer (imageBMP); + TQBuffer outBuffer (imageBMP); outBuffer.open (IO_WriteOnly); // write BMP - imageIO.setIODevice (&outBuffer); + imageIO.setIODevice (TQT_TQIODEVICE(&outBuffer)); imageIO.setFormat ("BMP"); if (!imageIO.write ()) { @@ -1286,8 +1286,8 @@ public: bool processTable (const Table &table) { - // just dump the table out for now (no layout) - for (QValueList <TableCell>::ConstIterator it = table.cellList.begin (); + // just dump the table out for now (no tqlayout) + for (TQValueList <TableCell>::ConstIterator it = table.cellList.begin (); it != table.cellList.end (); it++) { @@ -1326,28 +1326,28 @@ public: #endif // get Font Family - QFont QTFontInfo (f.fontName); - switch (QTFontInfo.styleHint ()) + TQFont TQTFontInfo (f.fontName); + switch (TQTFontInfo.styleHint ()) { - case QFont::Serif: + case TQFont::Serif: #ifdef KMF_DEBUG_FONT kdDebug (30509) << "FontFamily Serif" << endl; #endif font.setFamily (MSWrite::Font::Roman); break; - case QFont::SansSerif: + case TQFont::SansSerif: #ifdef KMF_DEBUG_FONT kdDebug (30509) << "FontFamily SansSerif" << endl; #endif font.setFamily (MSWrite::Font::Swiss); break; - case QFont::Courier: + case TQFont::Courier: #ifdef KMF_DEBUG_FONT kdDebug (30509) << "FontFamily Courier" << endl; #endif font.setFamily (MSWrite::Font::Modern); break; - case QFont::OldEnglish: + case TQFont::OldEnglish: #ifdef KMF_DEBUG_FONT kdDebug (30509) << "FontFamily OldEnglish" << endl; #endif @@ -1402,9 +1402,9 @@ public: #endif } - bool doFullParagraphList (const QValueList <ParaData> ¶List) + bool doFullParagraphList (const TQValueList <ParaData> ¶List) { - for (QValueList <ParaData>::ConstIterator it = paraList.begin (); + for (TQValueList <ParaData>::ConstIterator it = paraList.begin (); it != paraList.end (); it ++) { @@ -1417,12 +1417,12 @@ public: bool doFullParagraph (const ParaData ¶Data) { return doFullParagraph (paraData.text, - paraData.layout, + paraData.tqlayout, paraData.formattingList); } - bool doFullParagraph (const QString ¶Text, - const LayoutData &layout, + bool doFullParagraph (const TQString ¶Text, + const LayoutData &tqlayout, const ValueListFormatData ¶FormatDataList) { MSWrite::FormatParaProperty paraProp; @@ -1446,34 +1446,34 @@ public: paraProp.setIsText (true); // Alignment - if (!layout.alignment.isEmpty ()) + if (!tqlayout.tqalignment.isEmpty ()) { - if (layout.alignment == "left") + if (tqlayout.tqalignment == "left") // quite useless since MSWrite::Alignment::Left is the default anyway - paraProp.setAlignment (MSWrite::Alignment::Left); - else if (layout.alignment == "right") - paraProp.setAlignment (MSWrite::Alignment::Right); - else if (layout.alignment == "center") - paraProp.setAlignment (MSWrite::Alignment::Center); - else if (layout.alignment == "justify") - paraProp.setAlignment (MSWrite::Alignment::Justify); + paraProp.tqsetAlignment (MSWrite::Alignment::Left); + else if (tqlayout.tqalignment == "right") + paraProp.tqsetAlignment (MSWrite::Alignment::Right); + else if (tqlayout.tqalignment == "center") + paraProp.tqsetAlignment (MSWrite::Alignment::Center); + else if (tqlayout.tqalignment == "justify") + paraProp.tqsetAlignment (MSWrite::Alignment::Justify); else - kdWarning (30509) << "Unknown Alignment: " << layout.alignment << endl; + kdWarning (30509) << "Unknown Alignment: " << tqlayout.tqalignment << endl; } // Indentation - if (layout.indentFirst) paraProp.setLeftIndentFirstLine (MSWrite::Short (Point2Twip (layout.indentFirst))); - if (layout.indentLeft >= 0) paraProp.setLeftIndent (MSWrite::Word (Point2Twip (layout.indentLeft))); - if (layout.indentRight >= 0) paraProp.setRightIndent (MSWrite::Word (Point2Twip (layout.indentRight))); + if (tqlayout.indentFirst) paraProp.setLeftIndentFirstLine (MSWrite::Short (Point2Twip (tqlayout.indentFirst))); + if (tqlayout.indentLeft >= 0) paraProp.setLeftIndent (MSWrite::Word (Point2Twip (tqlayout.indentLeft))); + if (tqlayout.indentRight >= 0) paraProp.setRightIndent (MSWrite::Word (Point2Twip (tqlayout.indentRight))); #if 0 - kdDebug (30509) << "Indent: " << Point2Twip (layout.indentFirst) << " " - << Point2Twip (layout.indentLeft) << " " - << Point2Twip (layout.indentRight) << endl; + kdDebug (30509) << "Indent: " << Point2Twip (tqlayout.indentFirst) << " " + << Point2Twip (tqlayout.indentLeft) << " " + << Point2Twip (tqlayout.indentRight) << endl; #endif // Line Spacing MSWrite::Word lineSpacing = MSWrite::LineSpacing::Normal; - switch (layout.lineSpacingType) + switch (tqlayout.lineSpacingType) { case LayoutData::LS_SINGLE: lineSpacing = MSWrite::LineSpacing::Normal; @@ -1487,12 +1487,12 @@ public: case LayoutData::LS_CUSTOM: case LayoutData::LS_FIXED: case LayoutData::LS_ATLEAST: - lineSpacing = getClosestLineSpacing (layout.lineSpacing); + lineSpacing = getClosestLineSpacing (tqlayout.lineSpacing); break; case LayoutData::LS_MULTIPLE: break; default: - kdWarning (30509) << "unknown lineSpacingType \'" << layout.lineSpacingType << "\'" << endl; + kdWarning (30509) << "unknown lineSpacingType \'" << tqlayout.lineSpacingType << "\'" << endl; } paraProp.setLineSpacing (lineSpacing); @@ -1500,8 +1500,8 @@ public: // It seems that Write applies the 1st paragraph's Tabulator settings to the _entire_ document // Word97 and KWord, however, will treat them like a Paragraph Property int numTabs = 0; - for (TabulatorList::ConstIterator tabIt = layout.tabulatorList.begin (); - tabIt != layout.tabulatorList.end (); + for (TabulatorList::ConstIterator tabIt = tqlayout.tabulatorList.begin (); + tabIt != tqlayout.tabulatorList.end (); tabIt++) { MSWrite::FormatParaPropertyTabulator tab; @@ -1537,14 +1537,14 @@ public: // TODO: double marginTop; // space before the paragraph (a negative value means invalid) // TODO: double marginBottom; // space after the paragraph (a negative value means invalid) - // TODO: QString styleName; - // TODO: QString styleFollowing; + // TODO: TQString styleName; + // TODO: TQString styleFollowing; if (!m_generator->writeParaInfoBegin (¶Prop)) return false; // get this paragraph's "default formatting" MSWrite::FormatCharProperty charPropDefault; - processFormatData (charPropDefault, layout.formatData.text); + processFormatData (charPropDefault, tqlayout.formatData.text); MSWrite::DWord uptoByte = 0; // relative to start of KWord paragraph MSWrite::DWord numBytes = paraText.length (); // relative to start of KWord paragraph @@ -1561,18 +1561,18 @@ public: if (!m_generator->writeCharInfoBegin (&charPropDefault)) return false; // page break at start of paragraph? - if (layout.pageBreakBefore) + if (tqlayout.pageBreakBefore) if (!m_generator->writePageBreak ()) return false; // counter data - processCounter (layout.counter); + processCounter (tqlayout.counter); // end of line if (!m_generator->writeCarriageReturn ()) return false; if (!m_generator->writeNewLine (true/*end of paragraph*/)) return false; // page break at end of paragraph? - if (layout.pageBreakAfter) + if (tqlayout.pageBreakAfter) if (!m_generator->writePageBreak ()) return false; // write default character property end @@ -1595,11 +1595,11 @@ public: if (uptoByte == 0) { // page break at start of paragraph? - if (layout.pageBreakBefore) + if (tqlayout.pageBreakBefore) if (!m_generator->writePageBreak ()) return false; // counter data - processCounter (layout.counter); + processCounter (tqlayout.counter); } // yes, this is slightly premature but it doesn't matter @@ -1733,7 +1733,7 @@ public: } // page break at end of paragraph? - if (layout.pageBreakAfter) + if (tqlayout.pageBreakAfter) if (!m_generator->writePageBreak ()) return false; } @@ -1758,7 +1758,7 @@ public: #ifndef NDEBUG //#define DEBUG_PROCESS_TEXT #endif - bool processText (const QString &stringUnicode) + bool processText (const TQString &stringUnicode) { // // Look out for characters in the string and emit signals as appropriate: @@ -1783,19 +1783,19 @@ public: if (softHyphen == -2) { - softHyphen = stringUnicode.find (QChar (0xAD), upto); + softHyphen = stringUnicode.tqfind (TQChar (0xAD), upto); if (softHyphen == -1) softHyphen = INT_MAX; } if (nonBreakingSpace == -2) { - nonBreakingSpace = stringUnicode.find (QChar (0xA0), upto); + nonBreakingSpace = stringUnicode.tqfind (TQChar (0xA0), upto); if (nonBreakingSpace == -1) nonBreakingSpace = INT_MAX; } if (newLine == -2) { - newLine = stringUnicode.find (QChar ('\n'), upto); + newLine = stringUnicode.tqfind (TQChar ('\n'), upto); if (newLine == -1) newLine = INT_MAX; } @@ -1807,7 +1807,7 @@ public: int length = stringUnicodeLength - upto; if (specialLocation != INT_MAX) length = specialLocation - upto; - QString substring = stringUnicode.mid (upto, length); + TQString substring = stringUnicode.mid (upto, length); #ifdef DEBUG_PROCESS_TEXT kdDebug (30509) << "Parent string: upto=" << upto @@ -1820,7 +1820,7 @@ public: // convert substring to windows-1251 // - QCString stringWin; + TQCString stringWin; // there is a codec, therefore there is an encoder... if (m_codec) @@ -1894,7 +1894,7 @@ public: }; -MSWriteExport::MSWriteExport (KoFilter *, const char *, const QStringList &) +MSWriteExport::MSWriteExport (KoFilter *, const char *, const TQStringList &) : KoFilter() { } @@ -1903,7 +1903,7 @@ MSWriteExport::~MSWriteExport () { } -KoFilter::ConversionStatus MSWriteExport::convert (const QCString &from, const QCString &to) +KoFilter::ConversiontqStatus MSWriteExport::convert (const TQCString &from, const TQCString &to) { kdDebug (30509) << "MSWriteExport $Date: 2006-02-12 19:28:12 +0100 (Sun, 12 Feb 2006) $ using LibMSWrite " << MSWrite::Version << endl; @@ -1929,7 +1929,7 @@ KoFilter::ConversionStatus MSWriteExport::convert (const QCString &from, const Q return KoFilter::OutOfMemory; } - KoFilter::ConversionStatus ret = leader->convert (m_chain, from, to); + KoFilter::ConversiontqStatus ret = leader->convert (m_chain, from, to); int errorCode = worker->getError (); delete leader; diff --git a/filters/kword/mswrite/mswriteexport.h b/filters/kword/mswrite/mswriteexport.h index 242b0984..e2ab8fb4 100644 --- a/filters/kword/mswrite/mswriteexport.h +++ b/filters/kword/mswrite/mswriteexport.h @@ -25,12 +25,13 @@ class MSWriteExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - MSWriteExport (KoFilter *parent, const char *name, const QStringList &); + MSWriteExport (KoFilter *tqparent, const char *name, const TQStringList &); virtual ~MSWriteExport (); - KoFilter::ConversionStatus convert (const QCString &from, const QCString &to); + KoFilter::ConversiontqStatus convert (const TQCString &from, const TQCString &to); }; #endif // MSWRITEEXPORT_H diff --git a/filters/kword/mswrite/mswriteimport.cc b/filters/kword/mswrite/mswriteimport.cc index 8636c8b8..feff4917 100644 --- a/filters/kword/mswrite/mswriteimport.cc +++ b/filters/kword/mswrite/mswriteimport.cc @@ -24,11 +24,11 @@ #include <string.h> #include <stdarg.h> -#include <qfile.h> -#include <qobject.h> -#include <qstring.h> -#include <qtextcodec.h> -#include <qtextstream.h> +#include <tqfile.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqtextcodec.h> +#include <tqtextstream.h> #include <kdebug.h> #include <kgenericfactory.h> @@ -183,7 +183,7 @@ private: MSWrite::Byte *m_data; MSWrite::DWord m_dataLength; MSWrite::DWord m_dataUpto; - QString m_nameInStore; + TQString m_nameInStore; WRIObject () : m_data (NULL), m_dataLength (0), m_dataUpto (0) { @@ -241,15 +241,15 @@ private: KoStoreDevice *m_outfile; // for charset conversion - QTextCodec *m_codec; - QTextDecoder *m_decoder; + TQTextCodec *m_codec; + TQTextDecoder *m_decoder; // import options (compensate for differences between KWord and MS Write) bool m_simulateLineSpacing; bool m_simulateImageOffset; // formatting - QString m_formatOutput; + TQString m_formatOutput; int m_charInfoCountStart, m_charInfoCountLen; bool m_pageBreak, m_needAnotherParagraph; int m_pageBreakOffset; @@ -257,9 +257,9 @@ private: // picture counters int m_numPictures; - QString m_pictures; + TQString m_pictures; - QString m_objectFrameset; + TQString m_objectFrameset; MSWrite::List <WRIObject> m_objectList; @@ -271,7 +271,7 @@ private: // XML output that is held back until after "Text Frameset 1" is output // (i.e. header & footer must come after the Body in KWord) bool m_delayOutput; - QString m_heldOutput; + TQString m_heldOutput; void delayOutput (const bool yes) { @@ -280,7 +280,7 @@ private: bool delayOutputFlush (void) { - QCString strUtf8 = m_heldOutput.utf8 (); + TQCString strUtf8 = m_heldOutput.utf8 (); int strLength = strUtf8.length (); if (m_outfile->writeBlock (strUtf8, strLength) != strLength) @@ -305,7 +305,7 @@ public: delayOutput (false); // just select windows-1252 until the "Select Encoding" dialog works - m_codec = QTextCodec::codecForName ("CP 1252"); + m_codec = TQTextCodec::codecForName ("CP 1252"); if (m_codec) m_decoder = m_codec->makeDecoder(); @@ -499,7 +499,7 @@ public: ErrorAndQuit (MSWrite::Error::FileError, "could not open image in store\n"); if (m_outfile->writeBlock ((const char *) (*it).m_data, (*it).m_dataLength) - != (Q_LONG) (*it).m_dataLength) + != (TQ_LONG) (*it).m_dataLength) ErrorAndQuit (MSWrite::Error::FileError, "could not write image to store\n"); // close object in store @@ -692,21 +692,21 @@ public: { kdDebug (30509) << "Paragraph is an image!" << endl; - QString imageName; - QString fileInStore; + TQString imageName; + TQString fileInStore; // give picture a name // imageName = "Picture "; - imageName += QString::number (m_numPictures + 1); // image numbers start at 1... + imageName += TQString::number (m_numPictures + 1); // image numbers start at 1... // give picture a filename // - fileInStore = "pictures/picture" + QString::number (m_numPictures + 1); + fileInStore = "pictures/picture" + TQString::number (m_numPictures + 1); kdDebug (30509) << "\tGetting type..." << endl; @@ -743,21 +743,21 @@ public: const double imageLeft = double (m_left) + Twip2Point (double (image->getIndent ())); m_objectFrameset += " left=\""; - m_objectFrameset += QString::number (imageLeft); + m_objectFrameset += TQString::number (imageLeft); m_objectFrameset += "\""; const double imageWidth = Twip2Point (double (image->getDisplayedWidth ())); m_objectFrameset += " right=\""; - m_objectFrameset += QString::number (imageLeft + imageWidth - 1); + m_objectFrameset += TQString::number (imageLeft + imageWidth - 1); m_objectFrameset += "\""; m_objectFrameset += " top=\""; - m_objectFrameset += QString::number (m_top); + m_objectFrameset += TQString::number (m_top); m_objectFrameset += "\""; const double imageHeight = Twip2Point (double (image->getDisplayedHeight ())); m_objectFrameset += " bottom=\""; - m_objectFrameset += QString::number (double (m_top) + imageHeight - 1); + m_objectFrameset += TQString::number (double (m_top) + imageHeight - 1); m_objectFrameset += "\"/>"; m_objectFrameset += "<PICTURE keepAspectRatio=\"false\">"; @@ -833,7 +833,7 @@ public: << ")" << endl; } - QString output; + TQString output; output += "</TEXT>"; output += "<LAYOUT>"; @@ -897,9 +897,9 @@ public: if (indentFirst || indentLeft || indentRight) { output += "<INDENTS"; - if (indentFirst) output += " first=\"" + QString::number (indentFirst) + "\""; - if (indentLeft) output += " left=\"" + QString::number (indentLeft) + "\""; - if (indentRight) output += " right=\"" + QString::number (indentRight) + "\""; + if (indentFirst) output += " first=\"" + TQString::number (indentFirst) + "\""; + if (indentLeft) output += " left=\"" + TQString::number (indentLeft) + "\""; + if (indentRight) output += " right=\"" + TQString::number (indentRight) + "\""; output += "/>"; } @@ -908,7 +908,7 @@ public: if (lineSpacing != MSWrite::LineSpacing::Single) { #if 1 - output += "<LINESPACING type=\"atleast\" spacingvalue=\"" + QString::number (Twip2Point (lineSpacing)) + "\"/>"; + output += "<LINESPACING type=\"atleast\" spacingvalue=\"" + TQString::number (Twip2Point (lineSpacing)) + "\"/>"; #else // old way output += "<LINESPACING type=\""; switch (lineSpacing) @@ -925,7 +925,7 @@ public: kdWarning (30509) << "non-\"standard\" linespacing value: " << lineSpacing << endl; output += "atleast\" "; output += "spacingvalue=\""; - output += QString::number (Twip2Point (lineSpacing)); + output += TQString::number (Twip2Point (lineSpacing)); break; } output += "\"/>"; @@ -963,7 +963,7 @@ public: amount -= m_lineSpacingFromAbove; if (amount <= 0) amount = 0; // no emulation can be perfect... - output += QString::number (amount); + output += TQString::number (amount); output += "\" />"; } @@ -1023,7 +1023,7 @@ public: else output += " type=\"0\""; - output += " ptpos=\"" + QString::number (Twip2Point (double (tab->getIndent ()))) + "\"/>"; + output += " ptpos=\"" + TQString::number (Twip2Point (double (tab->getIndent ()))) + "\"/>"; //debug ("Tab: isNormal: %i ptPos: %i\n", // paraProperty->tbd [i].isTabNormal (), paraProperty->tbd [i].getTabNumPoints ()); @@ -1076,8 +1076,8 @@ public: m_formatOutput += "1"; m_formatOutput += "\" "; - m_formatOutput += "pos=\""; m_formatOutput += QString::number (m_charInfoCountStart); m_formatOutput += "\" "; - m_formatOutput += "len=\""; m_formatOutput += QString::number (m_charInfoCountLen); m_formatOutput += "\">"; + m_formatOutput += "pos=\""; m_formatOutput += TQString::number (m_charInfoCountStart); m_formatOutput += "\" "; + m_formatOutput += "len=\""; m_formatOutput += TQString::number (m_charInfoCountLen); m_formatOutput += "\">"; m_charInfoCountStart += m_charInfoCountLen; m_charInfoCountLen = 0; @@ -1094,7 +1094,7 @@ public: m_formatOutput += (const char *) (charProperty->getFont ()->getName ()); m_formatOutput += "\"/>"; m_formatOutput += "<SIZE value=\""; - m_formatOutput += QString::number (charProperty->getFontSize ()); + m_formatOutput += TQString::number (charProperty->getFontSize ()); m_formatOutput += "\"/>"; if (charProperty->getIsBold ()) @@ -1163,7 +1163,7 @@ public: bool writeText (const MSWrite::Byte *string) { // from Win Character Set... - QString strUnicode; + TQString strUnicode; // there is a codec, therefore there is a decoder... if (m_codec) @@ -1182,11 +1182,11 @@ public: m_charInfoCountLen += strUnicode.length (); // make string XML-friendly (TODO: speed up) - strUnicode.replace ('&', "&"); - strUnicode.replace ('<', "<"); - strUnicode.replace ('>', ">"); - strUnicode.replace ('\"', """); - strUnicode.replace ('\'', "'"); + strUnicode.tqreplace ('&', "&"); + strUnicode.tqreplace ('<', "<"); + strUnicode.tqreplace ('>', ">"); + strUnicode.tqreplace ('\"', """); + strUnicode.tqreplace ('\'', "'"); return writeTextInternal (strUnicode); } @@ -1194,7 +1194,7 @@ public: bool writeTextInternal (const MSWrite::Byte *str) { #if 0 - return textWrite_lowLevel (QString (str)); + return textWrite_lowLevel (TQString (str)); #else // while this is code duplication (of below func), this ensures that no // characters are mysteriously converted (this makes writeOptionalHyphen () work) if (m_delayOutput) @@ -1217,7 +1217,7 @@ public: #endif } - bool writeTextInternal (const QString &str) + bool writeTextInternal (const TQString &str) { if (m_delayOutput) { @@ -1227,7 +1227,7 @@ public: } else { - QCString strUtf8 = str.utf8 (); + TQCString strUtf8 = str.utf8 (); int strLength = strUtf8.length (); if (m_outfile->writeBlock (strUtf8, strLength) != strLength) @@ -1241,7 +1241,7 @@ public: bool writeTextInternal (const int num) { - return writeTextInternal (QString::number (num)); + return writeTextInternal (TQString::number (num)); } bool writeTextInternal (const char *format, ...) @@ -1333,7 +1333,7 @@ public: // KoFilter // -MSWriteImport::MSWriteImport (KoFilter *, const char *, const QStringList &) +MSWriteImport::MSWriteImport (KoFilter *, const char *, const TQStringList &) : m_device (NULL), m_parser (NULL), m_generator (NULL) { } @@ -1345,7 +1345,7 @@ MSWriteImport::~MSWriteImport () delete m_device; } -KoFilter::ConversionStatus MSWriteImport::convert (const QCString &from, const QCString &to) +KoFilter::ConversiontqStatus MSWriteImport::convert (const TQCString &from, const TQCString &to) { kdDebug (30509) << "MSWriteImport $Date: 2006-02-12 19:28:12 +0100 (Sun, 12 Feb 2006) $ using LibMSWrite " << MSWrite::Version << endl; @@ -1396,7 +1396,7 @@ KoFilter::ConversionStatus MSWriteImport::convert (const QCString &from, const Q } // open the .WRI file - if (!m_device->openFile (QFile::encodeName (m_chain->inputFile ()))) + if (!m_device->openFile (TQFile::encodeName (m_chain->inputFile ()))) { kdError (30509) << "Could not open \'" << m_chain->inputFile () << "\'" << endl; return KoFilter::FileNotFound; diff --git a/filters/kword/mswrite/mswriteimport.h b/filters/kword/mswrite/mswriteimport.h index ad1620d6..81f9511c 100644 --- a/filters/kword/mswrite/mswriteimport.h +++ b/filters/kword/mswrite/mswriteimport.h @@ -29,6 +29,7 @@ class KWordGenerator; class MSWriteImport : public KoFilter { Q_OBJECT + TQ_OBJECT private: WRIDevice *m_device; @@ -36,10 +37,10 @@ private: KWordGenerator *m_generator; public: - MSWriteImport (KoFilter *parent, const char *name, const QStringList &); + MSWriteImport (KoFilter *tqparent, const char *name, const TQStringList &); virtual ~MSWriteImport (); - KoFilter::ConversionStatus convert (const QCString &from, const QCString &to); + KoFilter::ConversiontqStatus convert (const TQCString &from, const TQCString &to); void sigProgress (const int value) { diff --git a/filters/kword/mswrite/status.html b/filters/kword/mswrite/status.html index ce8db955..6ede1caf 100644 --- a/filters/kword/mswrite/status.html +++ b/filters/kword/mswrite/status.html @@ -51,7 +51,7 @@ <td><b>Imports almost everything except OLE from MS WinWrite (3.0 & 3.1) documents</b> <br> - Character formatting (fonts, bold, italic, underline, superscript, subscript, "(page)" numbering) <br> - Optional/Soft Hyphenation <br> - - Paragraph formatting (alignment, linespacing, indentation, tabulation) <br> + - Paragraph formatting (tqalignment, linespacing, indentation, tabulation) <br> - Paragraphs with multiple newlines <br> - Pagebreaking (at the start or end of the line and on the next line) <br> - Images (Standard WMFs, monochrome BMPs, position from left margin) <br> @@ -101,7 +101,7 @@ <b> Version 0.3-1: KOffice 1.2 Beta1 </b> <br> - fixed mswritelib.cc crash on files with an unusual font table <br> - emulates image position from left margin by using paragraph indents <br> - - WMFs now render correctly in KWord (thanks to Lorthiois Thierry); note that only QWMF code was changed <br> + - WMFs now render correctly in KWord (thanks to Lorthiois Thierry); note that only TQWMF code was changed <br> - gcc 2.95.3 internal error workaround <br> - more *.desktop fixes <br> @@ -126,7 +126,7 @@ <br> <b> Version 0.1 (7 Oct 2001): Initial release </b> <br> - - the underlying code to read in the format is there but the filter can only do plain text with alignment + - the underlying code to read in the format is there but the filter can only do plain text with tqalignment <br> </td> </tr> diff --git a/filters/kword/mswrite/structures.h b/filters/kword/mswrite/structures.h index 5aa4f6a3..af687b3a 100644 --- a/filters/kword/mswrite/structures.h +++ b/filters/kword/mswrite/structures.h @@ -378,7 +378,7 @@ namespace MSWrite // convenience functions Byte getAlign (void) const { return getAlignment (); } - void setAlign (const Byte val) { setAlignment (val); } + void setAlign (const Byte val) { tqsetAlignment (val); } Short getLeftIndentFirstLine (const bool purist = false) const { diff --git a/filters/kword/mswrite/structures_generated.cpp b/filters/kword/mswrite/structures_generated.cpp index c443f252..6b6e5575 100644 --- a/filters/kword/mswrite/structures_generated.cpp +++ b/filters/kword/mswrite/structures_generated.cpp @@ -1166,7 +1166,7 @@ namespace MSWrite // --- set defaults in raw array (needed because it's a useThisMuch structure) --- WriteByte ((Byte) (60), m_data + 1);// magic0_60_or_61 - m_data [2] = 0; // alignment + m_data [2] = 0; // tqalignment WriteWord ((Word) (30), m_data + 3);// magic30 memset (m_data + 5, 0, 6); // rightIndent, leftIndent, leftIndentFirstLine WriteWord ((Word) (240), m_data + 11);// lineSpacing @@ -1176,7 +1176,7 @@ namespace MSWrite // --- set defaults for variables -- m_numDataBytes = (Byte) (0); m_magic0_60_or_61 = (Byte) (60); - m_alignment = (Byte) (0); + m_tqalignment = (Byte) (0); m_magic30 = (Word) (30); m_rightIndent = (Word) (0); m_leftIndent = (Word) (0); @@ -1210,7 +1210,7 @@ namespace MSWrite m_numDataBytes = rhs.m_numDataBytes; m_magic0_60_or_61 = rhs.m_magic0_60_or_61; - m_alignment = rhs.m_alignment; + m_tqalignment = rhs.m_tqalignment; m_magic30 = rhs.m_magic30; m_rightIndent = rhs.m_rightIndent; m_leftIndent = rhs.m_leftIndent; @@ -1235,7 +1235,7 @@ namespace MSWrite if (!Verify (Error::InvalidFormat, m_numDataBytes >= 1 && m_numDataBytes <= s_size - sizeof (Byte), DWord (m_numDataBytes))) return false; if (!Verify (Error::Warn, m_magic0_60_or_61 == 0 || m_magic0_60_or_61 == 60 || m_magic0_60_or_61 == 61, DWord (m_magic0_60_or_61))) return false; - // m_alignment will not be checked + // m_tqalignment will not be checked if (!Verify (Error::Warn, m_magic30 == 30, DWord (m_magic30))) return false; // m_rightIndent will not be checked // m_leftIndent will not be checked @@ -1275,8 +1275,8 @@ namespace MSWrite ReadByte (m_magic0_60_or_61, m_data + 1); signalHaveSetData (m_magic0_60_or_61 == Byte (60), 0/*offset*/ + 8/*size*/); - ReadByte (m_alignment, m_data + 2); - signalHaveSetData (m_alignment == Byte (0), 8/*offset*/ + 8/*size*/); + ReadByte (m_tqalignment, m_data + 2); + signalHaveSetData (m_tqalignment == Byte (0), 8/*offset*/ + 8/*size*/); ReadWord (m_magic30, m_data + 3); signalHaveSetData (m_magic30 == Word (30), 16/*offset*/ + 16/*size*/); ReadWord (m_rightIndent, m_data + 5); @@ -1323,7 +1323,7 @@ namespace MSWrite WriteByte (m_numDataBytes, m_data + 0); WriteByte (m_magic0_60_or_61, m_data + 1); - WriteByte (m_alignment, m_data + 2); + WriteByte (m_tqalignment, m_data + 2); WriteWord (m_magic30, m_data + 3); WriteWord (m_rightIndent, m_data + 5); WriteWord (m_leftIndent, m_data + 7); diff --git a/filters/kword/mswrite/structures_generated.h b/filters/kword/mswrite/structures_generated.h index c57ad4aa..6ee59103 100644 --- a/filters/kword/mswrite/structures_generated.h +++ b/filters/kword/mswrite/structures_generated.h @@ -70,7 +70,7 @@ namespace MSWrite // // Structure Fields: // - // name #REQUIRED + // name #RETQUIRED // type #IMPLIED "Word" // default #IMPLIED "" // description #IMPLIED "" (also valid for Structures) @@ -183,7 +183,7 @@ namespace MSWrite void setNumPages (const Word val) { m_numPages = val; } }; - // Page layout information (margins, dimensions, ...) + // Page tqlayout information (margins, dimensions, ...) class PageLayoutGenerated : public NeedsDevice { public: @@ -701,7 +701,7 @@ namespace MSWrite Byte m_numDataBytes; // number of bytes that follow Byte m_magic0_60_or_61; // =0? =60? =61? 60 is the most common - Byte m_alignment; + Byte m_tqalignment; Word m_magic30; // =30? Word m_rightIndent; // indent from right margin + right margin (if in header/footer) Word m_leftIndent; // indent from left margin + left margin (if in header/footer) @@ -730,7 +730,7 @@ namespace MSWrite static const Byte numDataBytesDefault = Byte (0); static const Byte magic0_60_or_61Default = Byte (60); - static const Byte alignmentDefault = Byte (0); + static const Byte tqalignmentDefault = Byte (0); static const Word magic30Default = Word (30); static const Word rightIndentDefault = Word (0); static const Word leftIndentDefault = Word (0); @@ -758,8 +758,8 @@ namespace MSWrite // get and set functions // - Byte getAlignment (void) const { return m_alignment; } - void setAlignment (const Byte val) { m_alignment = val; signalHaveSetData (m_alignment == Byte (0), 8/*offset*/ + 8/*size*/); } + Byte getAlignment (void) const { return m_tqalignment; } + void tqsetAlignment (const Byte val) { m_tqalignment = val; signalHaveSetData (m_tqalignment == Byte (0), 8/*offset*/ + 8/*size*/); } Word getRightIndent (void) const { return m_rightIndent; } void setRightIndent (const Word val) { m_rightIndent = val; signalHaveSetData (m_rightIndent == Word (0), 32/*offset*/ + 16/*size*/); } diff --git a/filters/kword/mswrite/structures_private.cpp b/filters/kword/mswrite/structures_private.cpp index 6779e1d7..dec806c0 100644 --- a/filters/kword/mswrite/structures_private.cpp +++ b/filters/kword/mswrite/structures_private.cpp @@ -479,7 +479,7 @@ namespace MSWrite code++; } - // couldn't find + // couldn't tqfind return 0xFFFFFFFF; } diff --git a/filters/kword/oowriter/ExportFilter.cc b/filters/kword/oowriter/ExportFilter.cc index 59b1598a..3432d611 100644 --- a/filters/kword/oowriter/ExportFilter.cc +++ b/filters/kword/oowriter/ExportFilter.cc @@ -30,11 +30,11 @@ License version 2. */ -#include <qmap.h> -#include <qiodevice.h> -#include <qbuffer.h> -#include <qtextstream.h> -#include <qdom.h> +#include <tqmap.h> +#include <tqiodevice.h> +#include <tqbuffer.h> +#include <tqtextstream.h> +#include <tqdom.h> #include <kdebug.h> #include <klocale.h> @@ -60,18 +60,18 @@ OOWriterWorker::OOWriterWorker(void) : m_streamOut(NULL), { } -QString OOWriterWorker::escapeOOText(const QString& strText) const +TQString OOWriterWorker::escapeOOText(const TQString& strText) const { // Escape quotes (needed in attributes) // Escape apostrophs (allowed by XML) return KWEFUtil::EscapeSgmlText(NULL,strText,true,true); } -QString OOWriterWorker::escapeOOSpan(const QString& strText) const +TQString OOWriterWorker::escapeOOSpan(const TQString& strText) const // We need not only to escape the classical XML stuff but also to take care of spaces and tabs. { - QString strReturn; - QChar ch; + TQString strReturn; + TQChar ch; int spaceNumber = 0; // How many spaces should be written for (uint i=0; i<strText.length(); i++) @@ -88,7 +88,7 @@ QString OOWriterWorker::escapeOOSpan(const QString& strText) const if ( spaceNumber > 0 ) { strReturn += "<text:s text:c=\""; - strReturn += QString::number( spaceNumber ); + strReturn += TQString::number( spaceNumber ); strReturn += "\"/>"; } spaceNumber = 0; @@ -96,7 +96,7 @@ QString OOWriterWorker::escapeOOSpan(const QString& strText) const } // ### TODO: would be switch/case or if/elseif the best? - switch (ch.unicode()) + switch (ch.tqunicode()) { case 9: // Tab { @@ -180,7 +180,7 @@ QString OOWriterWorker::escapeOOSpan(const QString& strText) const case 30: case 31: { - kdWarning(30518) << "Not allowed XML character: " << ch.unicode() << endl; + kdWarning(30518) << "Not allowed XML character: " << ch.tqunicode() << endl; strReturn += '?'; break; } @@ -201,7 +201,7 @@ QString OOWriterWorker::escapeOOSpan(const QString& strText) const if ( spaceNumber > 0 ) { strReturn += "<text:s text:c=\""; - strReturn += QString::number( spaceNumber ); + strReturn += TQString::number( spaceNumber ); strReturn += "\"/>"; } spaceNumber = 0; @@ -210,7 +210,7 @@ QString OOWriterWorker::escapeOOSpan(const QString& strText) const return strReturn; } -bool OOWriterWorker::doOpenFile(const QString& filenameOut, const QString& ) +bool OOWriterWorker::doOpenFile(const TQString& filenameOut, const TQString& ) { kdDebug(30518) << "Opening file: " << filenameOut << " (in OOWriterWorker::doOpenFile)" << endl; @@ -228,25 +228,25 @@ bool OOWriterWorker::doOpenFile(const QString& filenameOut, const QString& ) m_zip->setCompression( KZip::NoCompression ); m_zip->setExtraField( KZip::NoExtraField ); - const QCString appId( "application/vnd.sun.xml.writer" ); + const TQCString appId( "application/vnd.sun.xml.writer" ); - m_zip->writeFile( "mimetype", QString::null, QString::null, appId.length(), appId.data() ); + m_zip->writeFile( "mimetype", TQString(), TQString(), appId.length(), appId.data() ); m_zip->setCompression( KZip::DeflateCompression ); - m_streamOut=new QTextStream(m_contentBody, IO_WriteOnly); + m_streamOut=new TQTextStream(m_contentBody, IO_WriteOnly); - m_streamOut->setEncoding( QTextStream::UnicodeUTF8 ); + m_streamOut->setEncoding( TQTextStream::UnicodeUTF8 ); return true; } -bool OOWriterWorker::zipPrepareWriting(const QString& name) +bool OOWriterWorker::zipPrepareWriting(const TQString& name) { if (!m_zip) return false; m_size=0; - return m_zip->prepareWriting(name, QString::null, QString::null, 0); + return m_zip->prepareWriting(name, TQString(), TQString(), 0); } bool OOWriterWorker::zipDoneWriting(void) @@ -265,7 +265,7 @@ bool OOWriterWorker::zipWriteData(const char* str) return m_zip->writeData(str,size); } -bool OOWriterWorker::zipWriteData(const QByteArray& array) +bool OOWriterWorker::zipWriteData(const TQByteArray& array) { if (!m_zip) return false; @@ -274,7 +274,7 @@ bool OOWriterWorker::zipWriteData(const QByteArray& array) return m_zip->writeData(array.data(),size); } -bool OOWriterWorker::zipWriteData(const QCString& cstr) +bool OOWriterWorker::zipWriteData(const TQCString& cstr) { if (!m_zip) return false; @@ -283,12 +283,12 @@ bool OOWriterWorker::zipWriteData(const QCString& cstr) return m_zip->writeData(cstr.data(),size); } -bool OOWriterWorker::zipWriteData(const QString& str) +bool OOWriterWorker::zipWriteData(const TQString& str) { return zipWriteData(str.utf8()); } -void OOWriterWorker::writeStartOfFile(const QString& type) +void OOWriterWorker::writeStartOfFile(const TQString& type) { const bool noType=type.isEmpty(); zipWriteData("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); @@ -358,11 +358,11 @@ void OOWriterWorker::writeStartOfFile(const QString& type) void OOWriterWorker::writeFontDeclaration(void) { zipWriteData( " <office:font-decls>\n"); - QMap<QString,QString>::ConstIterator end(m_fontNames.end()); - for (QMap<QString,QString>::ConstIterator it=m_fontNames.begin(); it!=end; ++it) + TQMap<TQString,TQString>::ConstIterator end(m_fontNames.end()); + for (TQMap<TQString,TQString>::ConstIterator it=m_fontNames.begin(); it!=end; ++it) { - const bool space=(it.key().find(' ')>=0); // Does the font has at least a space in its name - const QString fontName(escapeOOText(it.key())); + const bool space=(it.key().tqfind(' ')>=0); // Does the font has at least a space in its name + const TQString fontName(escapeOOText(it.key())); zipWriteData(" <style:font-decl style:name=\""); zipWriteData(fontName); zipWriteData("\" fo:font-family=\""); @@ -403,9 +403,9 @@ void OOWriterWorker::writeStylesXml(void) zipWriteData( " style:page-usage=\"all\"" ); // ### TODO: check zipWriteData(" fo:page-width=\""); - zipWriteData(QString::number(m_paperWidth)); + zipWriteData(TQString::number(m_paperWidth)); zipWriteData("pt\" fo:page-height=\""); - zipWriteData(QString::number(m_paperHeight)); + zipWriteData(TQString::number(m_paperHeight)); zipWriteData("pt\" "); zipWriteData("style:print-orientation=\""); @@ -419,24 +419,24 @@ void OOWriterWorker::writeStylesXml(void) } zipWriteData("\" fo:margin-top=\""); - zipWriteData(QString::number(m_paperBorderTop)); + zipWriteData(TQString::number(m_paperBorderTop)); zipWriteData("pt\" fo:margin-bottom=\""); - zipWriteData(QString::number(m_paperBorderBottom)); + zipWriteData(TQString::number(m_paperBorderBottom)); zipWriteData("pt\" fo:margin-left=\""); - zipWriteData(QString::number(m_paperBorderLeft)); + zipWriteData(TQString::number(m_paperBorderLeft)); zipWriteData("pt\" fo:margin-right=\""); - zipWriteData(QString::number(m_paperBorderRight)); + zipWriteData(TQString::number(m_paperBorderRight)); zipWriteData("pt\" style:first-page-number=\""); - zipWriteData(QString::number(m_varSet.startingPageNumber)); + zipWriteData(TQString::number(m_varSet.startingPageNumber)); zipWriteData( "\">\n" ); if ( m_columns > 1 ) { zipWriteData( " <style:columns" ); zipWriteData( " fo:column-count=\"" ); - zipWriteData( QString::number( m_columns ) ); + zipWriteData( TQString::number( m_columns ) ); zipWriteData( "\" fo:column-gap=\"" ); - zipWriteData( QString::number( m_columnspacing ) ); + zipWriteData( TQString::number( m_columnspacing ) ); zipWriteData( "pt\">\n" ); for (int i=0; i < m_columns; ++i) @@ -474,7 +474,7 @@ void OOWriterWorker::writeContentXml(void) zipWriteData(" <office:automatic-styles>\n"); zipWriteData(m_contentAutomaticStyles); - m_contentAutomaticStyles = QString::null; // Release memory + m_contentAutomaticStyles = TQString(); // Release memory zipWriteData(" </office:automatic-styles>\n"); @@ -499,7 +499,7 @@ void OOWriterWorker::writeMetaXml(void) // Tell who we are in case that we have a bug in our filter output! zipWriteData(" <meta:generator>KWord's OOWriter Export Filter"); - zipWriteData(QString("$Revision: 515673 $").mid(10).remove('$')); // has a leading and a trailing space. + zipWriteData(TQString("$Revision: 515673 $").mid(10).remove('$')); // has a leading and a trailing space. zipWriteData("</meta:generator>\n"); @@ -543,16 +543,16 @@ void OOWriterWorker::writeMetaXml(void) if ( m_numPages > 0 ) { zipWriteData( " meta:page-count=\"" ); - zipWriteData( QString::number ( m_numPages ) ); + zipWriteData( TQString::number ( m_numPages ) ); zipWriteData( "\"" ); } zipWriteData( " meta:image-count=\"" ); // This is not specified in the OO specification section 2.1.19 - zipWriteData( QString::number ( m_pictureNumber ) ); + zipWriteData( TQString::number ( m_pictureNumber ) ); zipWriteData( "\"" ); zipWriteData( " meta:table-count=\"" ); - zipWriteData( QString::number ( m_tableNumber ) ); + zipWriteData( TQString::number ( m_tableNumber ) ); zipWriteData( "\"" ); zipWriteData( "/>\n" ); // meta:document-statistic @@ -596,7 +596,7 @@ bool OOWriterWorker::doCloseDocument(void) bool OOWriterWorker::doOpenBody(void) { - QValueList<FrameAnchor>::Iterator it; + TQValueList<FrameAnchor>::Iterator it; // We have to process all non-inline pictures kdDebug(30518) << "=== Processing non-inlined pictures ===" << endl; @@ -621,14 +621,14 @@ bool OOWriterWorker::doOpenBody(void) return true; } -QString OOWriterWorker::textFormatToStyle(const TextFormatting& formatOrigin, - const TextFormatting& formatData, const bool force, QString& key) +TQString OOWriterWorker::textFormatToStyle(const TextFormatting& formatOrigin, + const TextFormatting& formatData, const bool force, TQString& key) { // TODO: rename variable formatData - QString strElement; // TODO: rename this variable + TQString strElement; // TODO: rename this variable // Font name - QString fontName = formatData.fontName; + TQString fontName = formatData.fontName; declareFont(fontName); if ( !fontName.isEmpty() && (force || (formatOrigin.fontName!=formatData.fontName))) @@ -684,9 +684,9 @@ QString OOWriterWorker::textFormatToStyle(const TextFormatting& formatOrigin, if (size>0) { strElement+="fo:font-size=\""; - strElement+=QString::number(size,10); + strElement+=TQString::number(size,10); strElement+="pt\" "; - key+=QString::number(size,10); + key+=TQString::number(size,10); } } @@ -726,8 +726,8 @@ QString OOWriterWorker::textFormatToStyle(const TextFormatting& formatOrigin, strElement+="style:text-underline=\""; if ( formatData.underline ) { - QString underlineValue ( formatData.underlineValue ); - QString underlineStyle ( formatData.underlineStyle ); + TQString underlineValue ( formatData.underlineValue ); + TQString underlineStyle ( formatData.underlineStyle ); if ( underlineStyle.isEmpty() ) underlineStyle = "solid"; @@ -792,7 +792,7 @@ QString OOWriterWorker::textFormatToStyle(const TextFormatting& formatOrigin, if ( formatData.underline && formatData.underlineColor.isValid() ) { - const QString colorName( formatData.underlineColor.name() ); + const TQString colorName( formatData.underlineColor.name() ); strElement += "style:text-underline-color=\""; strElement += colorName; strElement += "\" "; @@ -861,10 +861,10 @@ QString OOWriterWorker::textFormatToStyle(const TextFormatting& formatOrigin, if ( force || ( formatOrigin.language != formatData.language ) ) { - const QString lang ( formatData.language ); + const TQString lang ( formatData.language ); if ( ! lang.isEmpty() ) { - const int res = lang.find( '_' ); + const int res = lang.tqfind( '_' ); if ( res >= 0 ) { @@ -941,20 +941,20 @@ QString OOWriterWorker::textFormatToStyle(const TextFormatting& formatOrigin, #define ALLOW_TABLE -QString OOWriterWorker::cellToProperties( const TableCell& cell, QString& key) const +TQString OOWriterWorker::cellToProperties( const TableCell& cell, TQString& key) const { #ifdef ALLOW_TABLE const FrameData& frame = cell.frame; - QString properties; + TQString properties; key += "!L"; // left border key += frame.lColor.name(); key += ","; - key += QString::number( frame.lWidth ); + key += TQString::number( frame.lWidth ); properties += " fo:border-left=\""; if ( frame.lColor.isValid() && frame.lWidth > 0.0 ) { - properties += QString::number( frame.lWidth ); + properties += TQString::number( frame.lWidth ); properties += "pt"; properties += " solid "; // ### TODO properties += frame.lColor.name(); @@ -968,11 +968,11 @@ QString OOWriterWorker::cellToProperties( const TableCell& cell, QString& key) c key += "!R"; // right border key += frame.rColor.name(); key += ","; - key += QString::number( frame.rWidth ); + key += TQString::number( frame.rWidth ); properties += " fo:border-right=\""; if ( frame.rColor.isValid() && frame.rWidth > 0.0 ) { - properties += QString::number( frame.rWidth ); + properties += TQString::number( frame.rWidth ); properties += "pt"; properties += " solid "; // ### TODO properties += frame.rColor.name(); @@ -986,11 +986,11 @@ QString OOWriterWorker::cellToProperties( const TableCell& cell, QString& key) c key += "!T"; // top border key += frame.tColor.name(); key += ","; - key += QString::number( frame.tWidth ); + key += TQString::number( frame.tWidth ); properties += " fo:border-top=\""; if ( frame.tColor.isValid() && frame.tWidth > 0.0 ) { - properties += QString::number( frame.tWidth ); + properties += TQString::number( frame.tWidth ); properties += "pt"; properties += " solid "; // ### TODO properties += frame.tColor.name(); @@ -1004,11 +1004,11 @@ QString OOWriterWorker::cellToProperties( const TableCell& cell, QString& key) c key += "!B"; // bottom border key += frame.bColor.name(); key += ","; - key += QString::number( frame.bWidth ); + key += TQString::number( frame.bWidth ); properties += " fo:border-bottom=\""; if ( frame.bColor.isValid() && frame.bWidth > 0.0 ) { - properties += QString::number( frame.bWidth ); + properties += TQString::number( frame.bWidth ); properties += "pt"; properties += " solid "; // ### TODO properties += frame.bColor.name(); @@ -1021,11 +1021,11 @@ QString OOWriterWorker::cellToProperties( const TableCell& cell, QString& key) c return properties; #else - return QString::null; + return TQString(); #endif } -bool OOWriterWorker::makeTableRows( const QString& tableName, const Table& table, int firstRowNumber ) +bool OOWriterWorker::makeTableRows( const TQString& tableName, const Table& table, int firstRowNumber ) { #ifdef ALLOW_TABLE // ### TODO: rows @@ -1038,9 +1038,9 @@ bool OOWriterWorker::makeTableRows( const QString& tableName, const Table& table ulong cellNumber = 0L; - QMap<QString,QString> mapCellStyleKeys; + TQMap<TQString,TQString> mapCellStyleKeys; - for ( QValueList<TableCell>::ConstIterator itCell ( table.cellList.begin() ); + for ( TQValueList<TableCell>::ConstIterator itCell ( table.cellList.begin() ); itCell != table.cellList.end(); ++itCell) { if ( rowCurrent != (*itCell).row ) @@ -1050,11 +1050,11 @@ bool OOWriterWorker::makeTableRows( const QString& tableName, const Table& table *m_streamOut << "<table:table-row>\n"; } - QString key; - const QString props ( cellToProperties( (*itCell), key ) ); + TQString key; + const TQString props ( cellToProperties( (*itCell), key ) ); - QString automaticCellStyle; - QMap<QString,QString>::ConstIterator it ( mapCellStyleKeys.find( key ) ); + TQString automaticCellStyle; + TQMap<TQString,TQString>::ConstIterator it ( mapCellStyleKeys.tqfind( key ) ); if ( it == mapCellStyleKeys.end() ) { automaticCellStyle = makeAutomaticStyleName( tableName + ".Cell", cellNumber ); @@ -1111,12 +1111,12 @@ bool OOWriterWorker::makeTableRows( const QString& tableName, const Table& table } #ifdef ALLOW_TABLE -static uint getColumnWidths( const Table& table, QMemArray<double>& widthArray, int firstRowNumber ) +static uint getColumnWidths( const Table& table, TQMemArray<double>& widthArray, int firstRowNumber ) { bool uniqueColumns = true; // We have not found any horizontally spanned cells yet. uint currentColumn = 0; int tryingRow = firstRowNumber; // We are trying the first row - QValueList<TableCell>::ConstIterator itCell; + TQValueList<TableCell>::ConstIterator itCell; for ( itCell = table.cellList.begin(); itCell != table.cellList.end(); ++itCell ) @@ -1150,7 +1150,7 @@ static uint getColumnWidths( const Table& table, QMemArray<double>& widthArray, const double width = ( (*itCell).frame.right - (*itCell).frame.left ); if ( currentColumn >= widthArray.size() ) - widthArray.resize( currentColumn + 4, QGArray::SpeedOptim); + widthArray.resize( currentColumn + 4, TQGArray::SpeedOptim); widthArray.at( currentColumn ) = width; ++currentColumn; @@ -1165,12 +1165,12 @@ static uint getColumnWidths( const Table& table, QMemArray<double>& widthArray, #endif #ifdef ALLOW_TABLE -static uint getFirstRowColumnWidths( const Table& table, QMemArray<double>& widthArray, int firstRowNumber ) +static uint getFirstRowColumnWidths( const Table& table, TQMemArray<double>& widthArray, int firstRowNumber ) // Get the column widths only by the first row. // This is used when all table rows have horizontally spanned cells. { uint currentColumn = 0; - QValueList<TableCell>::ConstIterator itCell; + TQValueList<TableCell>::ConstIterator itCell; for ( itCell = table.cellList.begin(); itCell != table.cellList.end(); ++itCell ) @@ -1187,7 +1187,7 @@ static uint getFirstRowColumnWidths( const Table& table, QMemArray<double>& widt const double width = ( (*itCell).frame.right - (*itCell).frame.left ) / cols; if ( currentColumn + cols > widthArray.size() ) - widthArray.resize( currentColumn + 4, QGArray::SpeedOptim); + widthArray.resize( currentColumn + 4, TQGArray::SpeedOptim); for ( int i = 0; i < cols; ++i ) { @@ -1204,15 +1204,15 @@ bool OOWriterWorker::makeTable( const FrameAnchor& anchor, const AnchorType anch #ifdef ALLOW_TABLE // Be careful that while being similar the following 5 strings have different purposes - const QString automaticTableStyle ( makeAutomaticStyleName( "Table", m_tableNumber ) ); // It also increases m_tableNumber - const QString tableName( QString( "Table" ) + QString::number( m_tableNumber ) ); // m_tableNumber was already increased - const QString translatedName( i18n( "Object name", "Table %1").arg( m_tableNumber ) ); - const QString automaticFrameStyle ( makeAutomaticStyleName( "TableFrame", m_textBoxNumber ) ); // It also increases m_textBoxNumber - const QString translatedFrameName( i18n( "Object name", "Table Frame %1").arg( m_textBoxNumber ) ); + const TQString automaticTableStyle ( makeAutomaticStyleName( "Table", m_tableNumber ) ); // It also increases m_tableNumber + const TQString tableName( TQString( "Table" ) + TQString::number( m_tableNumber ) ); // m_tableNumber was already increased + const TQString translatedName( i18n( "Object name", "Table %1").tqarg( m_tableNumber ) ); + const TQString automaticFrameStyle ( makeAutomaticStyleName( "TableFrame", m_textBoxNumber ) ); // It also increases m_textBoxNumber + const TQString translatedFrameName( i18n( "Object name", "Table Frame %1").tqarg( m_textBoxNumber ) ); kdDebug(30518) << "Processing table " << anchor.key.toString() << " => " << tableName << endl; - const QValueList<TableCell>::ConstIterator firstCell ( anchor.table.cellList.begin() ); + const TQValueList<TableCell>::ConstIterator firstCell ( anchor.table.cellList.begin() ); if ( firstCell == anchor.table.cellList.end() ) { @@ -1223,7 +1223,7 @@ bool OOWriterWorker::makeTable( const FrameAnchor& anchor, const AnchorType anch const int firstRowNumber = (*firstCell).row; kdDebug(30518) << "First row: " << firstRowNumber << endl; - QMemArray<double> widthArray(4); + TQMemArray<double> widthArray(4); uint numberColumns = getColumnWidths( anchor.table, widthArray, firstRowNumber ); @@ -1281,7 +1281,7 @@ bool OOWriterWorker::makeTable( const FrameAnchor& anchor, const AnchorType anch m_contentAutomaticStyles += " <style:style"; // for frame m_contentAutomaticStyles += " style:name=\"" + escapeOOText( automaticFrameStyle ) + "\""; m_contentAutomaticStyles += " style:family=\"graphics\""; - m_contentAutomaticStyles += " style:parent-style-name=\"Frame\""; // ### TODO: parent style needs to be correctly defined + m_contentAutomaticStyles += " style:tqparent-style-name=\"Frame\""; // ### TODO: tqparent style needs to be correctly defined m_contentAutomaticStyles += ">\n"; m_contentAutomaticStyles += " <style:properties "; // ### TODO m_contentAutomaticStyles += " text:anchor-type=\"as-char\""; // ### TODO: needed? @@ -1299,17 +1299,17 @@ bool OOWriterWorker::makeTable( const FrameAnchor& anchor, const AnchorType anch m_contentAutomaticStyles += " style:family=\"table\""; m_contentAutomaticStyles += ">\n"; m_contentAutomaticStyles += " <style:properties "; - m_contentAutomaticStyles += " style:width=\"" + QString::number( tableWidth ) + "pt\" "; + m_contentAutomaticStyles += " style:width=\"" + TQString::number( tableWidth ) + "pt\" "; m_contentAutomaticStyles += "/>\n"; m_contentAutomaticStyles += " </style:style>\n"; - QValueList<TableCell>::ConstIterator itCell; + TQValueList<TableCell>::ConstIterator itCell; ulong columnNumber = 0L; for ( i=0; i < numberColumns; ++i ) { - const QString automaticColumnStyle ( makeAutomaticStyleName( tableName + ".Column", columnNumber ) ); + const TQString automaticColumnStyle ( makeAutomaticStyleName( tableName + ".Column", columnNumber ) ); kdDebug(30518) << "Creating automatic column style: " << automaticColumnStyle /* << " key: " << styleKey */ << endl; m_contentAutomaticStyles += " <style:style"; @@ -1319,7 +1319,7 @@ bool OOWriterWorker::makeTable( const FrameAnchor& anchor, const AnchorType anch m_contentAutomaticStyles += " <style:properties "; // Despite that some OO specification examples use fo:width, OO specification section 4.19 tells to use style:column-width // and/or the relative variant: style:rel-column-width - m_contentAutomaticStyles += " style:column-width=\"" + QString::number( widthArray.at( i ) ) + "pt\" "; + m_contentAutomaticStyles += " style:column-width=\"" + TQString::number( widthArray.at( i ) ) + "pt\" "; m_contentAutomaticStyles += "/>\n"; m_contentAutomaticStyles += " </style:style>\n"; @@ -1344,12 +1344,12 @@ bool OOWriterWorker::makePicture( const FrameAnchor& anchor, const AnchorType an kdDebug(30518) << "New picture: " << anchor.picture.koStoreName << " , " << anchor.picture.key.toString() << endl; - const QString koStoreName(anchor.picture.koStoreName); + const TQString koStoreName(anchor.picture.koStoreName); - QByteArray image; + TQByteArray image; - QString strExtension(koStoreName.lower()); - const int result=koStoreName.findRev("."); + TQString strExtension(koStoreName.lower()); + const int result=koStoreName.tqfindRev("."); if (result>=0) { strExtension=koStoreName.mid(result+1); @@ -1397,12 +1397,12 @@ bool OOWriterWorker::makePicture( const FrameAnchor& anchor, const AnchorType an if ( anchorType == AnchorTextImage ) { // Text image have no frameset, so the only size information is in the picture itself. - QBuffer buffer( image.copy() ); // Be more safe than sorry and do not allow shallow copy + TQBuffer buffer( image.copy() ); // Be more safe than sorry and do not allow shallow copy KoPicture pic; buffer.open( IO_ReadOnly ); - if ( pic.load( &buffer, strExtension ) ) + if ( pic.load( TQT_TQIODEVICE(&buffer), strExtension ) ) { - const QSize size ( pic.getOriginalSize() ); + const TQSize size ( pic.getOriginalSize() ); height = size.height(); width = size.width(); } @@ -1432,11 +1432,11 @@ bool OOWriterWorker::makePicture( const FrameAnchor& anchor, const AnchorType an // We need a 32 digit hex value of the picture number // Please note: it is an exact 32 digit value, truncated if the value is more than 512 bits wide. :-) - QString number; + TQString number; number.fill('0',32); - number += QString::number(++m_pictureNumber,16); // in hex + number += TQString::number(++m_pictureNumber,16); // in hex - QString ooName("Pictures/"); + TQString ooName("Pictures/"); ooName += number.right(32); ooName += '.'; ooName += strExtension; @@ -1465,7 +1465,7 @@ bool OOWriterWorker::makePicture( const FrameAnchor& anchor, const AnchorType an { #if 0 // ### FIXME Why is the following line not working (at least with KDE 3.1)? (It makes unzip having problems with meta.xml) - m_zip->writeFile(ooName,QString::null, QString::null, image.size(), image.data()); + m_zip->writeFile(ooName,TQString(), TQString(), image.size(), image.data()); #else zipPrepareWriting(ooName); zipWriteData( image ); @@ -1476,12 +1476,12 @@ bool OOWriterWorker::makePicture( const FrameAnchor& anchor, const AnchorType an return true; } -void OOWriterWorker::processNormalText ( const QString ¶Text, +void OOWriterWorker::processNormalText ( const TQString ¶Text, const TextFormatting& formatLayout, const FormatData& formatData) { // Retrieve text and escape it (and necessary space, tabs and line-break tags) - const QString partialText( escapeOOSpan( paraText.mid( formatData.pos, formatData.len ) ) ); + const TQString partialText( escapeOOSpan( paraText.mid( formatData.pos, formatData.len ) ) ); if (formatData.text.missing) { @@ -1492,13 +1492,13 @@ void OOWriterWorker::processNormalText ( const QString ¶Text, { // Text with properties, so use a <text:span> element! *m_streamOut << "<text:span"; - QString styleKey; - const QString props ( textFormatToStyle(formatLayout,formatData.text,false,styleKey) ); + TQString styleKey; + const TQString props ( textFormatToStyle(formatLayout,formatData.text,false,styleKey) ); - QMap<QString,QString>::ConstIterator it ( m_mapTextStyleKeys.find(styleKey) ); + TQMap<TQString,TQString>::ConstIterator it ( m_mapTextStyleKeys.tqfind(styleKey) ); kdDebug(30518) << "Searching text key: " << styleKey << endl; - QString automaticStyle; + TQString automaticStyle; if (it==m_mapTextStyleKeys.end()) { // We have not any match, so we need a new automatic text style @@ -1531,10 +1531,10 @@ void OOWriterWorker::processNormalText ( const QString ¶Text, void OOWriterWorker::processFootnote( const VariableData& variable ) { // Footnote - const QValueList<ParaData> *paraList = variable.getFootnotePara(); + const TQValueList<ParaData> *paraList = variable.getFootnotePara(); if( paraList ) { - const QString value ( variable.getFootnoteValue() ); + const TQString value ( variable.getFootnoteValue() ); //const bool automatic = formatData.variable.getFootnoteAuto(); const bool flag = variable.getFootnoteType(); @@ -1596,7 +1596,7 @@ void OOWriterWorker::processNote( const VariableData& variable ) << "</office:annotation>"; } -void OOWriterWorker::processVariable ( const QString&, +void OOWriterWorker::processVariable ( const TQString&, const TextFormatting& /*formatLayout*/, const FormatData& formatData) { @@ -1650,7 +1650,7 @@ void OOWriterWorker::processVariable ( const QString&, } } -void OOWriterWorker::processAnchor ( const QString&, +void OOWriterWorker::processAnchor ( const TQString&, const TextFormatting& /*formatLayout*/, //TODO const FormatData& formatData) { @@ -1671,7 +1671,7 @@ void OOWriterWorker::processAnchor ( const QString&, } } -void OOWriterWorker::processTextImage ( const QString&, +void OOWriterWorker::processTextImage ( const TQString&, const TextFormatting& /*formatLayout*/, const FormatData& formatData) { @@ -1679,7 +1679,7 @@ void OOWriterWorker::processTextImage ( const QString&, makePicture( formatData.frameAnchor, AnchorTextImage ); } -void OOWriterWorker::processParagraphData ( const QString ¶Text, +void OOWriterWorker::processParagraphData ( const TQString ¶Text, const TextFormatting& formatLayout, const ValueListFormatData ¶FormatDataList) { @@ -1728,39 +1728,39 @@ void OOWriterWorker::processParagraphData ( const QString ¶Text, } } -QString OOWriterWorker::layoutToParagraphStyle(const LayoutData& layoutOrigin, - const LayoutData& layout, const bool force, QString& styleKey) +TQString OOWriterWorker::tqlayoutToParagraphStyle(const LayoutData& tqlayoutOrigin, + const LayoutData& tqlayout, const bool force, TQString& styleKey) { - QString props; // Props has to remain empty, if there is no difference. + TQString props; // Props has to remain empty, if there is no difference. - styleKey += layout.styleName; + styleKey += tqlayout.styleName; styleKey += ','; - if (force || (layoutOrigin.alignment!=layout.alignment)) + if (force || (tqlayoutOrigin.tqalignment!=tqlayout.tqalignment)) { // NOTE: OO 1.0.x uses start and end like left and right (section 3.11.4) // Unfortunately in XSL-FO's text-align, they are really supposed to be the start and the end. - if (layout.alignment == "left") + if (tqlayout.tqalignment == "left") { props += "fo:text-align=\"start\" "; styleKey += 'L'; } - else if (layout.alignment == "right") + else if (tqlayout.tqalignment == "right") { props += "fo:text-align=\"end\" "; styleKey += 'R'; } - else if (layout.alignment == "center") + else if (tqlayout.tqalignment == "center") { props += "fo:text-align=\"center\" "; styleKey += 'C'; } - else if (layout.alignment == "justify") + else if (tqlayout.tqalignment == "justify") { props += "fo:text-align=\"justify\" "; styleKey += 'J'; } - else if (layout.alignment == "auto") + else if (tqlayout.tqalignment == "auto") { props += "fo:text-align=\"start\" "; #ifndef STRICT_OOWRITER_VERSION_1 @@ -1770,68 +1770,68 @@ QString OOWriterWorker::layoutToParagraphStyle(const LayoutData& layoutOrigin, } else { - kdWarning(30518) << "Unknown alignment: " << layout.alignment << endl; + kdWarning(30518) << "Unknown tqalignment: " << tqlayout.tqalignment << endl; } } styleKey += ','; - if ((layout.indentLeft>=0.0) - && (force || (layoutOrigin.indentLeft!=layout.indentLeft))) + if ((tqlayout.indentLeft>=0.0) + && (force || (tqlayoutOrigin.indentLeft!=tqlayout.indentLeft))) { - props += QString("fo:margin-left=\"%1pt\" ").arg(layout.indentLeft); - styleKey += QString::number(layout.indentLeft); + props += TQString("fo:margin-left=\"%1pt\" ").tqarg(tqlayout.indentLeft); + styleKey += TQString::number(tqlayout.indentLeft); } styleKey += ','; - if ((layout.indentRight>=0.0) - && (force || (layoutOrigin.indentRight!=layout.indentRight))) + if ((tqlayout.indentRight>=0.0) + && (force || (tqlayoutOrigin.indentRight!=tqlayout.indentRight))) { - props += QString("fo:margin-right=\"%1pt\" ").arg(layout.indentRight); - styleKey += QString::number(layout.indentRight); + props += TQString("fo:margin-right=\"%1pt\" ").tqarg(tqlayout.indentRight); + styleKey += TQString::number(tqlayout.indentRight); } styleKey += ','; - if (force || (layoutOrigin.indentLeft!=layout.indentLeft)) + if (force || (tqlayoutOrigin.indentLeft!=tqlayout.indentLeft)) { props += "fo:text-indent=\""; - props += QString::number(layout.indentFirst); + props += TQString::number(tqlayout.indentFirst); props += "\" "; - styleKey += QString::number(layout.indentFirst); + styleKey += TQString::number(tqlayout.indentFirst); } styleKey += ','; - if ((layout.marginBottom>=0.0) - && ( force || ( layoutOrigin.marginBottom != layout.marginBottom ) ) ) + if ((tqlayout.marginBottom>=0.0) + && ( force || ( tqlayoutOrigin.marginBottom != tqlayout.marginBottom ) ) ) { - props += QString("fo:margin-bottom=\"%1pt\" ").arg(layout.marginBottom); - styleKey += QString::number(layout.marginBottom); + props += TQString("fo:margin-bottom=\"%1pt\" ").tqarg(tqlayout.marginBottom); + styleKey += TQString::number(tqlayout.marginBottom); } styleKey += ','; - if ((layout.marginTop>=0.0) - && ( force || ( layoutOrigin.marginTop != layout.marginTop ) ) ) + if ((tqlayout.marginTop>=0.0) + && ( force || ( tqlayoutOrigin.marginTop != tqlayout.marginTop ) ) ) { - props += QString("fo:margin-top=\"%1pt\" ").arg(layout.marginTop); - styleKey += QString::number(layout.marginTop); + props += TQString("fo:margin-top=\"%1pt\" ").tqarg(tqlayout.marginTop); + styleKey += TQString::number(tqlayout.marginTop); } styleKey += ','; if (force - || ( layoutOrigin.lineSpacingType != layout.lineSpacingType ) - || ( layoutOrigin.lineSpacing != layout.lineSpacing ) ) + || ( tqlayoutOrigin.lineSpacingType != tqlayout.lineSpacingType ) + || ( tqlayoutOrigin.lineSpacing != tqlayout.lineSpacing ) ) { - switch ( layout.lineSpacingType ) + switch ( tqlayout.lineSpacingType ) { case LayoutData::LS_CUSTOM: { // We have a custom line spacing (in points) - const QString height ( QString::number(layout.lineSpacing) ); // ### TODO: rounding? + const TQString height ( TQString::number(tqlayout.lineSpacing) ); // ### TODO: rounding? props += "style:line-spacing=\""; props += height; props += "pt\" "; @@ -1860,7 +1860,7 @@ QString OOWriterWorker::layoutToParagraphStyle(const LayoutData& layoutOrigin, case LayoutData::LS_MULTIPLE: { // OOWriter 1.1 only allows up to 200% - const QString mult ( QString::number( qRound( layout.lineSpacing * 100 ) ) ); + const TQString mult ( TQString::number( tqRound( tqlayout.lineSpacing * 100 ) ) ); props += "fo:line-height=\""; props += mult; props += "%\" "; @@ -1871,7 +1871,7 @@ QString OOWriterWorker::layoutToParagraphStyle(const LayoutData& layoutOrigin, case LayoutData::LS_FIXED: { // We have a fixed line height (in points) - const QString height ( QString::number(layout.lineSpacing) ); // ### TODO: rounding? + const TQString height ( TQString::number(tqlayout.lineSpacing) ); // ### TODO: rounding? props += "fo:line-height=\""; props += height; props += "pt\" "; @@ -1882,7 +1882,7 @@ QString OOWriterWorker::layoutToParagraphStyle(const LayoutData& layoutOrigin, case LayoutData::LS_ATLEAST: { // We have a at-least line height (in points) - const QString height ( QString::number(layout.lineSpacing) ); // ### TODO: rounding? + const TQString height ( TQString::number(tqlayout.lineSpacing) ); // ### TODO: rounding? props += "style:line-height-at-least=\""; props += height; props += "pt\" "; @@ -1892,7 +1892,7 @@ QString OOWriterWorker::layoutToParagraphStyle(const LayoutData& layoutOrigin, } default: { - kdWarning(30518) << "Unsupported lineSpacingType: " << layout.lineSpacingType << " (Ignoring!)" << endl; + kdWarning(30518) << "Unsupported lineSpacingType: " << tqlayout.lineSpacingType << " (Ignoring!)" << endl; break; } } @@ -1900,7 +1900,7 @@ QString OOWriterWorker::layoutToParagraphStyle(const LayoutData& layoutOrigin, styleKey += ','; - if ( layout.pageBreakBefore ) + if ( tqlayout.pageBreakBefore ) { // We have a page break before the paragraph props += "fo:page-break-before=\"page\" "; @@ -1909,7 +1909,7 @@ QString OOWriterWorker::layoutToParagraphStyle(const LayoutData& layoutOrigin, styleKey += ','; - if ( layout.pageBreakAfter ) + if ( tqlayout.pageBreakAfter ) { // We have a page break after the paragraph props += "fo:page-break-after=\"page\" "; @@ -1918,25 +1918,25 @@ QString OOWriterWorker::layoutToParagraphStyle(const LayoutData& layoutOrigin, styleKey += '@'; // A more visible seperator - props += textFormatToStyle(layoutOrigin.formatData.text,layout.formatData.text,force,styleKey); + props += textFormatToStyle(tqlayoutOrigin.formatData.text,tqlayout.formatData.text,force,styleKey); props += ">"; styleKey += '@'; // A more visible seperator // ### TODO/FIXME: what if all tabulators must be erased? - if (!layout.tabulatorList.isEmpty() - && (force || (layoutOrigin.tabulatorList!=layout.tabulatorList) )) + if (!tqlayout.tabulatorList.isEmpty() + && (force || (tqlayoutOrigin.tabulatorList!=tqlayout.tabulatorList) )) { props += "\n <style:tab-stops>\n"; TabulatorList::ConstIterator it; - TabulatorList::ConstIterator end(layout.tabulatorList.end()); - for (it=layout.tabulatorList.begin();it!=end;++it) + TabulatorList::ConstIterator end(tqlayout.tabulatorList.end()); + for (it=tqlayout.tabulatorList.begin();it!=end;++it) { props+=" <style:tab-stop style:position=\""; - props += QString::number((*it).m_ptpos); + props += TQString::number((*it).m_ptpos); props += "pt\""; - styleKey += QString::number((*it).m_ptpos); + styleKey += TQString::number((*it).m_ptpos); switch ((*it).m_type) { case 0: props += " style:type=\"left\""; styleKey += "L"; break; @@ -1966,33 +1966,33 @@ QString OOWriterWorker::layoutToParagraphStyle(const LayoutData& layoutOrigin, return props; } -bool OOWriterWorker::doFullParagraph(const QString& paraText, const LayoutData& layout, +bool OOWriterWorker::doFullParagraph(const TQString& paraText, const LayoutData& tqlayout, const ValueListFormatData& paraFormatDataList) { - const bool header = ( (layout.counter.numbering == CounterData::NUM_CHAPTER) - && (layout.counter.depth<10) ); // ### TODO: Does OOWriter really limits to 10? + const bool header = ( (tqlayout.counter.numbering == CounterData::NUM_CHAPTER) + && (tqlayout.counter.depth<10) ); // ### TODO: Does OOWriter really limits to 10? if (header) { *m_streamOut << " <text:h text:level=\""; - *m_streamOut << QString::number(layout.counter.depth+1,10); + *m_streamOut << TQString::number(tqlayout.counter.depth+1,10); *m_streamOut << "\" "; } else *m_streamOut << " <text:p "; - const LayoutData& styleLayout=m_styleMap[layout.styleName]; + const LayoutData& styleLayout=m_styleMap[tqlayout.styleName]; - QString styleKey; - const QString props(layoutToParagraphStyle(styleLayout,layout,false,styleKey)); + TQString styleKey; + const TQString props(tqlayoutToParagraphStyle(styleLayout,tqlayout,false,styleKey)); - QString actualStyle(layout.styleName); + TQString actualStyle(tqlayout.styleName); if (!props.isEmpty()) { - QMap<QString,QString>::ConstIterator it ( m_mapParaStyleKeys.find(styleKey) ); + TQMap<TQString,TQString>::ConstIterator it ( m_mapParaStyleKeys.tqfind(styleKey) ); kdDebug(30518) << "Searching paragraph key: " << styleKey << endl; - QString automaticStyle; + TQString automaticStyle; if (it==m_mapParaStyleKeys.end()) { @@ -2003,7 +2003,7 @@ bool OOWriterWorker::doFullParagraph(const QString& paraText, const LayoutData& m_contentAutomaticStyles += " <style:style"; m_contentAutomaticStyles += " style:name=\"" + escapeOOText(automaticStyle) + "\""; - m_contentAutomaticStyles += " style:parent-style-name=\"" + escapeOOText(layout.styleName) + "\""; + m_contentAutomaticStyles += " style:tqparent-style-name=\"" + escapeOOText(tqlayout.styleName) + "\""; m_contentAutomaticStyles += " style:family=\"paragraph\" style:class=\"text\""; m_contentAutomaticStyles += ">\n"; m_contentAutomaticStyles += " <style:properties "; @@ -2032,7 +2032,7 @@ bool OOWriterWorker::doFullParagraph(const QString& paraText, const LayoutData& *m_streamOut << ">"; - processParagraphData(paraText, layout.formatData.text, paraFormatDataList); + processParagraphData(paraText, tqlayout.formatData.text, paraFormatDataList); if (header) *m_streamOut << "</text:h>\n"; @@ -2054,21 +2054,21 @@ bool OOWriterWorker::doOpenStyles(void) return true; } -bool OOWriterWorker::doFullDefineStyle(LayoutData& layout) +bool OOWriterWorker::doFullDefineStyle(LayoutData& tqlayout) { //Register style in the style map - m_styleMap[layout.styleName]=layout; + m_styleMap[tqlayout.styleName]=tqlayout; m_styles += " <style:style"; - m_styles += " style:name=\"" + escapeOOText( layout.styleName ) + "\""; - m_styles += " style:next-style-name=\"" + escapeOOText( layout.styleFollowing ) + "\""; + m_styles += " style:name=\"" + escapeOOText( tqlayout.styleName ) + "\""; + m_styles += " style:next-style-name=\"" + escapeOOText( tqlayout.styleFollowing ) + "\""; m_styles += " style:family=\"paragraph\" style:class=\"text\""; m_styles += ">\n"; m_styles += " <style:properties "; - QString debugKey; // Not needed - m_styles += layoutToParagraphStyle(layout,layout,true,debugKey); + TQString debugKey; // Not needed + m_styles += tqlayoutToParagraphStyle(tqlayout,tqlayout,true,debugKey); kdDebug(30518) << "Defining style: " << debugKey << endl; m_styles += "</style:properties>\n"; @@ -2144,46 +2144,46 @@ bool OOWriterWorker::doVariableSettings(const VariableSettingsData& vs) return true; } -bool OOWriterWorker::doDeclareNonInlinedFramesets( QValueList<FrameAnchor>& pictureAnchors, QValueList<FrameAnchor>& tableAnchors ) +bool OOWriterWorker::doDeclareNonInlinedFramesets( TQValueList<FrameAnchor>& pictureAnchors, TQValueList<FrameAnchor>& tableAnchors ) { m_nonInlinedPictureAnchors = pictureAnchors; m_nonInlinedTableAnchors = tableAnchors; return true; } -void OOWriterWorker::declareFont(const QString& fontName) +void OOWriterWorker::declareFont(const TQString& fontName) { if (fontName.isEmpty()) return; - if (m_fontNames.find(fontName)==m_fontNames.end()) + if (m_fontNames.tqfind(fontName)==m_fontNames.end()) { - QString props; + TQString props; - // Disabled, as QFontInfo::styleHint() cannot guess + // Disabled, as TQFontInfo::tqstyleHint() cannot guess #if 0 - QFont font(fontName); - QFontInfo info(font); + TQFont font(fontName); + TQFontInfo info(font); props+="style:font-family-generic=\"" - switch (info.styleHint()) + switch (info.tqstyleHint()) { - case QFont::SansSerif: + case TQFont::SansSerif: default: { props += "swiss"; break; } - case QFont::Serif: + case TQFont::Serif: { props += "roman"; break; } - case QFont::Courier: + case TQFont::Courier: { props += "modern"; break; } - case QFont::OldEnglish: + case TQFont::OldEnglish: { props += "decorative"; break; @@ -2198,29 +2198,29 @@ void OOWriterWorker::declareFont(const QString& fontName) } } -QString OOWriterWorker::makeAutomaticStyleName(const QString& prefix, ulong& counter) const +TQString OOWriterWorker::makeAutomaticStyleName(const TQString& prefix, ulong& counter) const { - const QString str (prefix + QString::number(++counter,10)); + const TQString str (prefix + TQString::number(++counter,10)); // Checks if the automatic style has not the same name as a user one. // If it is the case, change it! - if (m_styleMap.find(str)==m_styleMap.end()) + if (m_styleMap.tqfind(str)==m_styleMap.end()) return str; // Unique, so let's go! - QString str2(str+"_bis"); - if (m_styleMap.find(str2)==m_styleMap.end()) + TQString str2(str+"_bis"); + if (m_styleMap.tqfind(str2)==m_styleMap.end()) return str2; str2 = str+"_ter"; - if (m_styleMap.find(str2)==m_styleMap.end()) + if (m_styleMap.tqfind(str2)==m_styleMap.end()) return str2; // If it is still not unique, try a time stamp. - const QDateTime dt(QDateTime::currentDateTime(Qt::UTC)); + const TQDateTime dt(TQDateTime::tqcurrentDateTime(Qt::UTC)); - str2 = str + "_" + QString::number(dt.toTime_t(),16); - if (m_styleMap.find(str2)==m_styleMap.end()) + str2 = str + "_" + TQString::number(dt.toTime_t(),16); + if (m_styleMap.tqfind(str2)==m_styleMap.end()) return str2; kdWarning(30518) << "Could not make an unique style name: " << str2 << endl; diff --git a/filters/kword/oowriter/ExportFilter.h b/filters/kword/oowriter/ExportFilter.h index 7a0d5640..4e7a567e 100644 --- a/filters/kword/oowriter/ExportFilter.h +++ b/filters/kword/oowriter/ExportFilter.h @@ -42,7 +42,7 @@ class KZip; -class StyleMap : public QMap<QString,LayoutData> +class StyleMap : public TQMap<TQString,LayoutData> { public: StyleMap(void) {} @@ -64,11 +64,11 @@ public: AnchorTextImage ///< This is a text image (KWord 0.8; inlined; only for pictures) }; public: - virtual bool doOpenFile(const QString& filenameOut, const QString& to); + virtual bool doOpenFile(const TQString& filenameOut, const TQString& to); virtual bool doCloseFile(void); ///< Close file in normal conditions virtual bool doOpenDocument(void); virtual bool doCloseDocument(void); - virtual bool doFullParagraph(const QString& paraText, const LayoutData& layout, + virtual bool doFullParagraph(const TQString& paraText, const LayoutData& tqlayout, const ValueListFormatData& paraFormatDataList); virtual bool doFullPaperFormat(const int format, const double width, const double height, const int orientation); @@ -81,67 +81,67 @@ public: virtual bool doFullPaperFormatOther ( const int columns, const double columnspacing, const int numPages ); virtual bool doOpenStyles(void); virtual bool doCloseStyles(void); - virtual bool doFullDefineStyle(LayoutData& layout); + virtual bool doFullDefineStyle(LayoutData& tqlayout); virtual bool doFullDocumentInfo(const KWEFDocumentInfo& docInfo); virtual bool doVariableSettings(const VariableSettingsData& vs); virtual bool doOpenBody (void); - virtual bool doDeclareNonInlinedFramesets( QValueList<FrameAnchor>& pictureAnchors, QValueList<FrameAnchor>& tableAnchors ); ///< @since 1.4 + virtual bool doDeclareNonInlinedFramesets( TQValueList<FrameAnchor>& pictureAnchors, TQValueList<FrameAnchor>& tableAnchors ); ///< @since 1.4 private: - void processParagraphData (const QString& paraText, + void processParagraphData (const TQString& paraText, const TextFormatting& formatLayout, const ValueListFormatData& paraFormatDataList); - void processNormalText ( const QString& paraText, + void processNormalText ( const TQString& paraText, const TextFormatting& formatLayout, const FormatData& formatData); void processFootnote( const VariableData& variable ); void processNote( const VariableData& variable ); - void processVariable ( const QString& paraText, + void processVariable ( const TQString& paraText, const TextFormatting& formatLayout, const FormatData& formatData); - void processAnchor ( const QString& paraText, + void processAnchor ( const TQString& paraText, const TextFormatting& formatLayout, const FormatData& formatData); - void processTextImage ( const QString&, + void processTextImage ( const TQString&, const TextFormatting& formatLayout, const FormatData& formatData); - QString textFormatToStyle(const TextFormatting& formatOrigin, - const TextFormatting& formatData, const bool force, QString& key); - QString layoutToParagraphStyle(const LayoutData& layoutOrigin, - const LayoutData& layout, const bool force, QString& styleKey); - QString escapeOOText(const QString& strText) const; - QString escapeOOSpan(const QString& strText) const; - QString cellToProperties( const TableCell& cell, QString& key) const; - bool makeTableRows( const QString& tableName, const Table& table, int firstRowNumber ); + TQString textFormatToStyle(const TextFormatting& formatOrigin, + const TextFormatting& formatData, const bool force, TQString& key); + TQString tqlayoutToParagraphStyle(const LayoutData& tqlayoutOrigin, + const LayoutData& tqlayout, const bool force, TQString& styleKey); + TQString escapeOOText(const TQString& strText) const; + TQString escapeOOSpan(const TQString& strText) const; + TQString cellToProperties( const TableCell& cell, TQString& key) const; + bool makeTableRows( const TQString& tableName, const Table& table, int firstRowNumber ); bool makeTable( const FrameAnchor& anchor, const AnchorType anchorType ); bool makePicture( const FrameAnchor& anchor, const AnchorType anchorType ); - bool convertUnknownPicture(const QString& name, const QString& extension, QByteArray& image); - void declareFont(const QString& fontName); + bool convertUnknownPicture(const TQString& name, const TQString& extension, TQByteArray& image); + void declareFont(const TQString& fontName); void writeFontDeclaration(void); void writeContentXml(void); void writeStylesXml(void); void writeMetaXml(void); - void writeStartOfFile(const QString& type); + void writeStartOfFile(const TQString& type); /** * For automatic styles: create the name from @p prefix and from the increased @p counter * (Yes, the counter is increased by the method.) */ - QString makeAutomaticStyleName(const QString& prefix, ulong& counter) const; + TQString makeAutomaticStyleName(const TQString& prefix, ulong& counter) const; private: // ZIP methods - bool zipPrepareWriting(const QString& name); + bool zipPrepareWriting(const TQString& name); bool zipDoneWriting(void); bool zipWriteData(const char* str); - bool zipWriteData(const QByteArray& array); - bool zipWriteData(const QCString& cstr); - bool zipWriteData(const QString& str); ///< Assumes UTF-8 + bool zipWriteData(const TQByteArray& array); + bool zipWriteData(const TQCString& cstr); + bool zipWriteData(const TQString& str); ///< Assumes UTF-8 private: - QTextStream* m_streamOut; - QString m_pagesize; + TQTextStream* m_streamOut; + TQString m_pagesize; StyleMap m_styleMap; double m_paperBorderTop,m_paperBorderLeft,m_paperBorderBottom,m_paperBorderRight; KWEFDocumentInfo m_docInfo; ///< document information - QByteArray m_contentBody; ///< office:body element of content.xml + TQByteArray m_contentBody; ///< office:body element of content.xml KZip* m_zip; ///< Output OOWriter file - QMap<QString,QString> m_fontNames; ///< List of used font names (the data() are extra attributes for font declaration time.) + TQMap<TQString,TQString> m_fontNames; ///< List of used font names (the data() are extra attributes for font declaration time.) ulong m_pictureNumber; ///< Number of picture (increment *before* use) ulong m_automaticParagraphStyleNumber; ///< Number of paragraph-based automatic styles (increment *before* use) @@ -151,8 +151,8 @@ private: ulong m_textBoxNumber; ///< Number of a textbox (for draw:text-box) (increment *before* use) - QString m_styles; ///< Normal paragraph styles (in OO format) - QString m_contentAutomaticStyles; ///< Automatic styles for content.xml (in OO format) + TQString m_styles; ///< Normal paragraph styles (in OO format) + TQString m_contentAutomaticStyles; ///< Automatic styles for content.xml (in OO format) uint m_size; ///< Size of ZIP entry int m_paperFormat; @@ -160,15 +160,15 @@ private: double m_paperHeight; int m_paperOrientation; - QMap<QString,QString> m_mapTextStyleKeys; ///< Map of keys to automatic text styles - QMap<QString,QString> m_mapParaStyleKeys; ///< Map of keys to automatic paragraph styles + TQMap<TQString,TQString> m_mapTextStyleKeys; ///< Map of keys to automatic text styles + TQMap<TQString,TQString> m_mapParaStyleKeys; ///< Map of keys to automatic paragraph styles VariableSettingsData m_varSet; ///< KWord's \<VARIABLESETTINGS\> int m_numPages; ///< Number of pages @note if the input file comes from a filter, this data is often missing. double m_columnspacing; ///< Spacing between columns int m_columns; ///< Number of columns private: // Variable that would need a link/glue from libexport - QValueList<FrameAnchor> m_nonInlinedPictureAnchors; ///< Pseudo-anchors for non-inlined anchors \todo: connection to libexport - QValueList<FrameAnchor> m_nonInlinedTableAnchors; ///< Pseudo-anchors for non-inlined tables \todo: connection to libexport + TQValueList<FrameAnchor> m_nonInlinedPictureAnchors; ///< Pseudo-anchors for non-inlined anchors \todo: connection to libexport + TQValueList<FrameAnchor> m_nonInlinedTableAnchors; ///< Pseudo-anchors for non-inlined tables \todo: connection to libexport }; #endif // _EXPORTFILTER_H diff --git a/filters/kword/oowriter/conversion.cc b/filters/kword/oowriter/conversion.cc index 8c7c4ebb..209b2bec 100644 --- a/filters/kword/oowriter/conversion.cc +++ b/filters/kword/oowriter/conversion.cc @@ -2,7 +2,7 @@ #include <kdebug.h> #include <klocale.h> -QString Conversion::importAlignment( const QString& align ) +TQString Conversion::importAlignment( const TQString& align ) { if ( align == "center" || align == "justify" ) return align; @@ -10,11 +10,11 @@ QString Conversion::importAlignment( const QString& align ) return "left"; if ( align == "end" ) return "right"; - kdWarning(30518) << "Conversion::importAlignment unknown alignment " << align << endl; + kdWarning(30518) << "Conversion::importAlignment unknown tqalignment " << align << endl; return "auto"; } -QString Conversion::exportAlignment( const QString& align ) +TQString Conversion::exportAlignment( const TQString& align ) { if ( align == "center" || align == "justify" ) return align; @@ -22,31 +22,31 @@ QString Conversion::exportAlignment( const QString& align ) return "start"; if ( align == "right" ) return "end"; - kdWarning(30518) << "Conversion::exportAlignment unknown alignment " << align << endl; + kdWarning(30518) << "Conversion::exportAlignment unknown tqalignment " << align << endl; return "auto"; } -QPair<int,QString> Conversion::importWrapping( const QString& oowrap ) +TQPair<int,TQString> Conversion::importWrapping( const TQString& oowrap ) { if ( oowrap == "none" ) // 'no wrap' means 'avoid horizontal space' - return qMakePair( 2, QString::null ); + return tqMakePair( 2, TQString() ); if ( oowrap == "left" || oowrap == "right" ) // Left and right, no problem - return qMakePair( 1, oowrap ); + return tqMakePair( 1, oowrap ); if ( oowrap == "run-through" ) - return qMakePair( 0, QString::null ); + return tqMakePair( 0, TQString() ); if ( oowrap == "biggest" ) // OASIS extension - return qMakePair( 1, QString::fromLatin1( "biggest" ) ); + return tqMakePair( 1, TQString::tqfromLatin1( "biggest" ) ); ////if ( oowrap == "parallel" || oowrap == "dynamic" ) // dynamic is called "optimal" in the OO GUI. It's different from biggest because it can lead to parallel. // Those are not supported in KWord, let's use biggest instead - return qMakePair( 1, QString::fromLatin1( "biggest" ) ); + return tqMakePair( 1, TQString::tqfromLatin1( "biggest" ) ); } -QString Conversion::exportWrapping( const QPair<int,QString>& runAroundAttribs ) +TQString Conversion::exportWrapping( const TQPair<int,TQString>& runAroundAttribs ) { switch( runAroundAttribs.first ) { case 0: @@ -60,7 +60,7 @@ QString Conversion::exportWrapping( const QPair<int,QString>& runAroundAttribs ) } } -int Conversion::importOverflowBehavior( const QString& oasisOverflowBehavior ) +int Conversion::importOverflowBehavior( const TQString& oasisOverflowBehavior ) { if ( oasisOverflowBehavior == "auto-extend-frame" ) return 0; // AutoExtendFrame @@ -72,7 +72,7 @@ int Conversion::importOverflowBehavior( const QString& oasisOverflowBehavior ) return 0; } -QString Conversion::exportOverflowBehavior( const QString& kwordAutoCreateNewFrame ) +TQString Conversion::exportOverflowBehavior( const TQString& kwordAutoCreateNewFrame ) { switch ( kwordAutoCreateNewFrame.toInt() ) { case 1: @@ -85,7 +85,7 @@ QString Conversion::exportOverflowBehavior( const QString& kwordAutoCreateNewFra } } -int Conversion::importCounterType( const QString& numFormat ) +int Conversion::importCounterType( const TQString& numFormat ) { if ( numFormat == "1" ) return 1; @@ -100,7 +100,7 @@ int Conversion::importCounterType( const QString& numFormat ) return 0; } -QString Conversion::headerTypeToFramesetName( const QString& localName, bool hasEvenOdd ) +TQString Conversion::headerTypeToFramesetName( const TQString& localName, bool hasEvenOdd ) { if ( localName == "header" ) return hasEvenOdd ? i18n("Odd Pages Header") : i18n( "Header" ); @@ -114,10 +114,10 @@ QString Conversion::headerTypeToFramesetName( const QString& localName, bool has // ###### //return i18n("First Page Header"); //return i18n("First Page Footer"); - return QString::null; + return TQString(); } -int Conversion::headerTypeToFrameInfo( const QString& localName, bool /*hasEvenOdd*/ ) +int Conversion::headerTypeToFrameInfo( const TQString& localName, bool /*hasEvenOdd*/ ) { if ( localName == "header" ) return 3; // odd headers diff --git a/filters/kword/oowriter/conversion.h b/filters/kword/oowriter/conversion.h index 1aa21489..d9388268 100644 --- a/filters/kword/oowriter/conversion.h +++ b/filters/kword/oowriter/conversion.h @@ -20,8 +20,8 @@ #ifndef CONVERSION_H #define CONVERSION_H -#include <qstring.h> -#include <qpair.h> +#include <tqstring.h> +#include <tqpair.h> // Static methods for simple OO<->KWord conversions // (enums etc.) @@ -32,25 +32,25 @@ namespace Conversion { - // Convert paragraph alignment value - QString importAlignment( const QString& ); - QString exportAlignment( const QString& ); + // Convert paragraph tqalignment value + TQString importAlignment( const TQString& ); + TQString exportAlignment( const TQString& ); // Convert frame wrapping (run-around) - // KWord-1.3 knows runaround(int) and runaroundSide(QString) - QPair<int,QString> importWrapping( const QString& ); - QString exportWrapping( const QPair<int,QString>& runAroundAttribs ); + // KWord-1.3 knows runaround(int) and runaroundSide(TQString) + TQPair<int,TQString> importWrapping( const TQString& ); + TQString exportWrapping( const TQPair<int,TQString>& runAroundAttribs ); // Convert overflow behavior ("what to do if the text is bigger than the frame") - int importOverflowBehavior( const QString& oasisOverflowBehavior ); - QString exportOverflowBehavior( const QString& kwordAutoCreateNewFrame ); + int importOverflowBehavior( const TQString& oasisOverflowBehavior ); + TQString exportOverflowBehavior( const TQString& kwordAutoCreateNewFrame ); // Convert numbering format (for a list) to a kword counter type - int importCounterType( const QString& numFormat ); + int importCounterType( const TQString& numFormat ); // Header-footer helpers - QString headerTypeToFramesetName( const QString& tagName, bool hasEvenOdd ); - int headerTypeToFrameInfo( const QString& tagName, bool hasEvenOdd ); + TQString headerTypeToFramesetName( const TQString& tagName, bool hasEvenOdd ); + int headerTypeToFrameInfo( const TQString& tagName, bool hasEvenOdd ); } #endif diff --git a/filters/kword/oowriter/oowriterexport.cc b/filters/kword/oowriter/oowriterexport.cc index 8e55e33d..15647164 100644 --- a/filters/kword/oowriter/oowriterexport.cc +++ b/filters/kword/oowriter/oowriterexport.cc @@ -48,11 +48,11 @@ public: K_EXPORT_COMPONENT_FACTORY( liboowriterexport, OOWRITERExportFactory() ) -OOWRITERExport::OOWRITERExport(KoFilter */*parent*/, const char */*name*/, const QStringList &) : +OOWRITERExport::OOWRITERExport(KoFilter */*tqparent*/, const char */*name*/, const TQStringList &) : KoFilter() { } -KoFilter::ConversionStatus OOWRITERExport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus OOWRITERExport::convert( const TQCString& from, const TQCString& to ) { if ( to != "application/vnd.sun.xml.writer" || from != "application/x-kword" ) { @@ -79,7 +79,7 @@ KoFilter::ConversionStatus OOWRITERExport::convert( const QCString& from, const return KoFilter::StupidError; } - KoFilter::ConversionStatus result=leader->convert(m_chain,from,to); + KoFilter::ConversiontqStatus result=leader->convert(m_chain,from,to); delete leader; delete worker; diff --git a/filters/kword/oowriter/oowriterexport.h b/filters/kword/oowriter/oowriterexport.h index d4475337..3a4e77ff 100644 --- a/filters/kword/oowriter/oowriterexport.h +++ b/filters/kword/oowriter/oowriterexport.h @@ -32,8 +32,8 @@ #ifndef OOWRITEREXPORT_H #define OOWRITEREXPORT_H -#include <qstring.h> -#include <qcstring.h> +#include <tqstring.h> +#include <tqcstring.h> #include <KoFilter.h> @@ -41,11 +41,12 @@ class OOWRITERExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - OOWRITERExport(KoFilter *parent, const char *name, const QStringList &); + OOWRITERExport(KoFilter *tqparent, const char *name, const TQStringList &); virtual ~OOWRITERExport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; #endif // OOWRITEREXPORT_H diff --git a/filters/kword/oowriter/oowriterimport.cc b/filters/kword/oowriter/oowriterimport.cc index 46623551..fa831de2 100644 --- a/filters/kword/oowriter/oowriterimport.cc +++ b/filters/kword/oowriter/oowriterimport.cc @@ -19,12 +19,12 @@ * Boston, MA 02110-1301, USA. */ -#include <qcolor.h> -#include <qfile.h> -#include <qfont.h> -#include <qpen.h> -#include <qregexp.h> -#include <qimage.h> +#include <tqcolor.h> +#include <tqfile.h> +#include <tqfont.h> +#include <tqpen.h> +#include <tqregexp.h> +#include <tqimage.h> #include "oowriterimport.h" #include <ooutils.h> @@ -53,7 +53,7 @@ typedef KGenericFactory<OoWriterImport, KoFilter> OoWriterImportFactory; K_EXPORT_COMPONENT_FACTORY( liboowriterimport, OoWriterImportFactory( "kofficefilters" ) ) -OoWriterImport::OoWriterImport( KoFilter *, const char *, const QStringList & ) +OoWriterImport::OoWriterImport( KoFilter *, const char *, const TQStringList & ) : KoFilter(), m_styleStack( ooNS::style, ooNS::fo ), m_insideOrderedList( false ), m_nextItemIsListItem( false ), @@ -69,7 +69,7 @@ OoWriterImport::~OoWriterImport() { } -KoFilter::ConversionStatus OoWriterImport::convert( QCString const & from, QCString const & to ) +KoFilter::ConversiontqStatus OoWriterImport::convert( TQCString const & from, TQCString const & to ) { kdDebug(30518) << "Entering Oowriter Import filter: " << from << " - " << to << endl; @@ -99,25 +99,25 @@ KoFilter::ConversionStatus OoWriterImport::convert( QCString const & from, QCStr } - KoFilter::ConversionStatus preStatus = openFile(); + KoFilter::ConversiontqStatus pretqStatus = openFile(); - QImage thumbnail; - if ( preStatus == KoFilter::OK ) + TQImage thumbnail; + if ( pretqStatus == KoFilter::OK ) { // We do not care about the failure OoUtils::loadThumbnail( thumbnail, m_zip ); } - if ( preStatus != KoFilter::OK ) + if ( pretqStatus != KoFilter::OK ) { m_zip->close(); delete m_zip; - return preStatus; + return pretqStatus; } - m_currentMasterPage = QString::null; - QDomDocument mainDocument; - QDomElement framesetsElem; + m_currentMasterPage = TQString(); + TQDomDocument mainDocument; + TQDomElement framesetsElem; prepareDocument( mainDocument, framesetsElem ); // Load styles from style.xml @@ -128,7 +128,7 @@ KoFilter::ConversionStatus OoWriterImport::convert( QCString const & from, QCStr return KoFilter::UserCancelled; // Create main frameset - QDomElement mainFramesetElement = mainDocument.createElement("FRAMESET"); + TQDomElement mainFramesetElement = mainDocument.createElement("FRAMESET"); mainFramesetElement.setAttribute("frameType",1); mainFramesetElement.setAttribute("frameInfo",0); mainFramesetElement.setAttribute("visible",1); @@ -150,22 +150,22 @@ KoFilter::ConversionStatus OoWriterImport::convert( QCString const & from, QCStr } else { - QCString cstr = mainDocument.toCString(); + TQCString cstr = mainDocument.toCString(); kdDebug(30518)<<" maindoc: " << cstr << endl; - // WARNING: we cannot use KoStore::write(const QByteArray&) because it gives an extra NULL character at the end. + // WARNING: we cannot use KoStore::write(const TQByteArray&) because it gives an extra NULL character at the end. out->writeBlock( cstr, cstr.length() ); } - QDomDocument docinfo; + TQDomDocument docinfo; createDocumentInfo( docinfo ); // store document info out = m_chain->storageFile( "documentinfo.xml", KoStore::Write ); if( out ) { - QCString info = docinfo.toCString(); + TQCString info = docinfo.toCString(); kdDebug(30518)<<" info :"<<info<<endl; - // WARNING: we cannot use KoStore::write(const QByteArray&) because it gives an extra NULL character at the end. + // WARNING: we cannot use KoStore::write(const TQByteArray&) because it gives an extra NULL character at the end. out->writeBlock( info , info.length() ); } @@ -175,7 +175,7 @@ KoFilter::ConversionStatus OoWriterImport::convert( QCString const & from, QCStr { // ### TODO: thumbnail.setAlphaBuffer( false ); // legacy KOffice previews have no alpha channel // Legacy KOffice previews are 256x256x8 instead of 128x128x32 - QImage preview( thumbnail.smoothScale( 256, 256 ).convertDepth(8, Qt::AvoidDither | Qt::DiffuseDither) ); + TQImage preview( thumbnail.smoothScale( 256, 256 ).convertDepth(8, Qt::AvoidDither | Qt::DiffuseDither) ); // Not to be able to generate a preview is not an error if ( !preview.isNull() ) { @@ -191,40 +191,40 @@ KoFilter::ConversionStatus OoWriterImport::convert( QCString const & from, QCStr return KoFilter::OK; } -void OoWriterImport::createStyles( QDomDocument& doc ) +void OoWriterImport::createStyles( TQDomDocument& doc ) { - QDomElement stylesElem = doc.createElement( "STYLES" ); + TQDomElement stylesElem = doc.createElement( "STYLES" ); doc.documentElement().appendChild( stylesElem ); - QDomNode fixedStyles = KoDom::namedItemNS( m_stylesDoc.documentElement(), ooNS::office, "styles" ); + TQDomNode fixedStyles = KoDom::namedItemNS( m_stylesDoc.documentElement(), ooNS::office, "styles" ); Q_ASSERT( !fixedStyles.isNull() ); - QDomElement e; + TQDomElement e; forEachElement( e, fixedStyles ) { if ( !e.hasAttributeNS( ooNS::style, "name" ) ) continue; // We only generate paragraph styles for now - if ( e.attributeNS( ooNS::style, "family", QString::null ) != "paragraph" ) + if ( e.attributeNS( ooNS::style, "family", TQString() ) != "paragraph" ) continue; - // We use the style stack, to flatten out parent styles + // We use the style stack, to flatten out tqparent styles // Once KWord supports style inheritance, replace this with a single m_styleStack.push. // (We still need to use StyleStack, since that's what writeLayout/writeFormat read from) addStyles( &e ); - QDomElement styleElem = doc.createElement("STYLE"); + TQDomElement styleElem = doc.createElement("STYLE"); stylesElem.appendChild( styleElem ); - QString styleName = kWordStyleName( e.attributeNS( ooNS::style, "name", QString::null ) ); - QDomElement element = doc.createElement("NAME"); + TQString styleName = kWordStyleName( e.attributeNS( ooNS::style, "name", TQString() ) ); + TQDomElement element = doc.createElement("NAME"); element.setAttribute( "value", styleName ); styleElem.appendChild( element ); //kdDebug(30518) << k_funcinfo << "generating style " << styleName << endl; - QString followingStyle = m_styleStack.attributeNS( ooNS::style, "next-style-name" ); + TQString followingStyle = m_styleStack.attributeNS( ooNS::style, "next-style-name" ); if ( !followingStyle.isEmpty() ) { - QDomElement element = doc.createElement( "FOLLOWING" ); + TQDomElement element = doc.createElement( "FOLLOWING" ); element.setAttribute( "name", kWordStyleName( followingStyle ) ); styleElem.appendChild( element ); } @@ -248,14 +248,14 @@ void OoWriterImport::createStyles( QDomDocument& doc ) if ( outline ) listOK = pushListLevelStyle( "<outline-style>", m_outlineStyle, level ); else { - const QString listStyleName = e.attributeNS( ooNS::style, "list-style-name", QString::null ); + const TQString listStyleName = e.attributeNS( ooNS::style, "list-style-name", TQString() ); listOK = !listStyleName.isEmpty(); if ( listOK ) listOK = pushListLevelStyle( listStyleName, level ); } } if ( listOK ) { - const QDomElement listStyle = m_listStyleStack.currentListStyle(); + const TQDomElement listStyle = m_listStyleStack.currentListStyle(); // The tag is either text:list-level-style-number or text:list-level-style-bullet bool ordered = listStyle.localName() == "list-level-style-number"; writeCounter( doc, styleElem, outline, level, ordered ); @@ -266,20 +266,20 @@ void OoWriterImport::createStyles( QDomDocument& doc ) } } -void OoWriterImport::parseBodyOrSimilar( QDomDocument &doc, const QDomElement& parent, QDomElement& currentFramesetElement ) +void OoWriterImport::parseBodyOrSimilar( TQDomDocument &doc, const TQDomElement& tqparent, TQDomElement& currentFramesetElement ) { - QDomElement oldCurrentFrameset = m_currentFrameset; + TQDomElement oldCurrentFrameset = m_currentFrameset; m_currentFrameset = currentFramesetElement; Q_ASSERT( !m_currentFrameset.isNull() ); - QDomElement t; - forEachElement( t, parent ) + TQDomElement t; + forEachElement( t, tqparent ) { m_styleStack.save(); - const QString localName = t.localName(); - const QString ns = t.namespaceURI(); + const TQString localName = t.localName(); + const TQString ns = t.namespaceURI(); const bool isTextNS = ns == ooNS::text; - QDomElement e; + TQDomElement e; if ( isTextNS && localName == "p" ) { // text paragraph fillStyleStack( t, ooNS::text, "style-name" ); e = parseParagraph( doc, t ); @@ -287,7 +287,7 @@ void OoWriterImport::parseBodyOrSimilar( QDomDocument &doc, const QDomElement& p else if ( isTextNS && localName == "h" ) // heading { fillStyleStack( t, ooNS::text, "style-name" ); - int level = t.attributeNS( ooNS::text, "level", QString::null ).toInt(); + int level = t.attributeNS( ooNS::text, "level", TQString() ).toInt(); bool listOK = false; // When a heading is inside a list, it seems that the list prevails. // Example: @@ -302,7 +302,7 @@ void OoWriterImport::parseBodyOrSimilar( QDomDocument &doc, const QDomElement& p m_nextItemIsListItem = true; if ( t.hasAttributeNS( ooNS::text, "start-value" ) ) // OASIS extension http://lists.oasis-open.org/archives/office/200310/msg00033.html - m_restartNumbering = t.attributeNS( ooNS::text, "start-value", QString::null ).toInt(); + m_restartNumbering = t.attributeNS( ooNS::text, "start-value", TQString() ).toInt(); e = parseParagraph( doc, t ); if ( listOK ) m_listStyleStack.pop(); @@ -355,11 +355,11 @@ void OoWriterImport::parseBodyOrSimilar( QDomDocument &doc, const QDomElement& p m_currentFrameset = oldCurrentFrameset; // in case of recursive invokations } -void OoWriterImport::createDocumentContent( QDomDocument &doc, QDomElement& mainFramesetElement ) +void OoWriterImport::createDocumentContent( TQDomDocument &doc, TQDomElement& mainFramesetElement ) { - QDomElement content = m_content.documentElement(); + TQDomElement content = m_content.documentElement(); - QDomElement body ( KoDom::namedItemNS( content, ooNS::office, "body" ) ); + TQDomElement body ( KoDom::namedItemNS( content, ooNS::office, "body" ) ); if ( body.isNull() ) { kdError(30518) << "No office:body found!" << endl; @@ -369,12 +369,12 @@ void OoWriterImport::createDocumentContent( QDomDocument &doc, QDomElement& main parseBodyOrSimilar( doc, body, mainFramesetElement ); } -void OoWriterImport::writePageLayout( QDomDocument& mainDocument, const QString& masterPageName ) +void OoWriterImport::writePageLayout( TQDomDocument& mainDocument, const TQString& masterPageName ) { - QDomElement docElement = mainDocument.documentElement(); + TQDomElement docElement = mainDocument.documentElement(); kdDebug(30518) << "writePageLayout " << masterPageName << endl; - QDomElement elementPaper = mainDocument.createElement("PAPER"); + TQDomElement elementPaper = mainDocument.createElement("PAPER"); KoOrientation orientation; double width, height; KoFormat paperFormat; @@ -382,18 +382,18 @@ void OoWriterImport::writePageLayout( QDomDocument& mainDocument, const QString& bool hasEvenOddHeader = false; bool hasEvenOddFooter = false; - QDomElement* masterPage = m_masterPages[ masterPageName ]; + TQDomElement* masterPage = m_masterPages[ masterPageName ]; Q_ASSERT( masterPage ); - kdDebug(30518) << "page-master-name: " << masterPage->attributeNS( ooNS::style, "page-master-name", QString::null ) << endl; - QDomElement *style = masterPage ? m_styles[masterPage->attributeNS( ooNS::style, "page-master-name", QString::null )] : 0; + kdDebug(30518) << "page-master-name: " << masterPage->attributeNS( ooNS::style, "page-master-name", TQString() ) << endl; + TQDomElement *style = masterPage ? m_styles[masterPage->attributeNS( ooNS::style, "page-master-name", TQString() )] : 0; Q_ASSERT( style ); if ( style ) { - QDomElement properties( KoDom::namedItemNS( *style, ooNS::style, "properties" ) ); + TQDomElement properties( KoDom::namedItemNS( *style, ooNS::style, "properties" ) ); Q_ASSERT( !properties.isNull() ); - orientation = ( (properties.attributeNS( ooNS::style, "print-orientation", QString::null) != "portrait") ? PG_LANDSCAPE : PG_PORTRAIT ); - width = KoUnit::parseValue(properties.attributeNS( ooNS::fo, "page-width", QString::null)); - height = KoUnit::parseValue(properties.attributeNS( ooNS::fo, "page-height", QString::null)); + orientation = ( (properties.attributeNS( ooNS::style, "print-orientation", TQString()) != "portrait") ? PG_LANDSCAPE : PG_PORTRAIT ); + width = KoUnit::parseValue(properties.attributeNS( ooNS::fo, "page-width", TQString())); + height = KoUnit::parseValue(properties.attributeNS( ooNS::fo, "page-height", TQString())); kdDebug(30518) << "width=" << width << " height=" << height << endl; // guessFormat takes millimeters if ( orientation == PG_LANDSCAPE ) @@ -401,49 +401,49 @@ void OoWriterImport::writePageLayout( QDomDocument& mainDocument, const QString& else paperFormat = KoPageFormat::guessFormat( POINT_TO_MM(width), POINT_TO_MM(height) ); - marginLeft = KoUnit::parseValue(properties.attributeNS( ooNS::fo, "margin-left", QString::null)); - marginTop = KoUnit::parseValue(properties.attributeNS( ooNS::fo, "margin-top", QString::null)); - marginRight = KoUnit::parseValue(properties.attributeNS( ooNS::fo, "margin-right", QString::null)); - marginBottom = KoUnit::parseValue(properties.attributeNS( ooNS::fo, "margin-bottom", QString::null)); + marginLeft = KoUnit::parseValue(properties.attributeNS( ooNS::fo, "margin-left", TQString())); + marginTop = KoUnit::parseValue(properties.attributeNS( ooNS::fo, "margin-top", TQString())); + marginRight = KoUnit::parseValue(properties.attributeNS( ooNS::fo, "margin-right", TQString())); + marginBottom = KoUnit::parseValue(properties.attributeNS( ooNS::fo, "margin-bottom", TQString())); - QDomElement footnoteSep = KoDom::namedItemNS( properties, ooNS::style, "footnote-sep" ); + TQDomElement footnoteSep = KoDom::namedItemNS( properties, ooNS::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" - QString width = footnoteSep.attributeNS( ooNS::style, "width", QString::null ); + TQString width = footnoteSep.attributeNS( ooNS::style, "width", TQString() ); elementPaper.setAttribute( "slFootNoteWidth", KoUnit::parseValue( width ) ); - QString pageWidth = footnoteSep.attributeNS( ooNS::style, "rel-width", QString::null ); + TQString pageWidth = footnoteSep.attributeNS( ooNS::style, "rel-width", TQString() ); if ( pageWidth.endsWith( "%" ) ) { pageWidth.truncate( pageWidth.length() - 1 ); // remove '%' elementPaper.setAttribute( "slFootNoteLenth", pageWidth ); } - elementPaper.setAttribute( "slFootNotePosition", footnoteSep.attributeNS( ooNS::style, "adjustment", QString::null ) ); + elementPaper.setAttribute( "slFootNotePosition", footnoteSep.attributeNS( ooNS::style, "adjustment", TQString() ) ); // Not in KWord: color, distance before and after separator // Not in OOo: line type of separator (solid, dot, dash etc.) } // Header/Footer - QDomElement headerStyle = KoDom::namedItemNS( *style, ooNS::style, "header-style" ); - QDomElement footerStyle = KoDom::namedItemNS( *style, ooNS::style, "footer-style" ); - QDomElement headerLeftElem = KoDom::namedItemNS( *masterPage, ooNS::style, "header-left" ); + TQDomElement headerStyle = KoDom::namedItemNS( *style, ooNS::style, "header-style" ); + TQDomElement footerStyle = KoDom::namedItemNS( *style, ooNS::style, "footer-style" ); + TQDomElement headerLeftElem = KoDom::namedItemNS( *masterPage, ooNS::style, "header-left" ); if ( !headerLeftElem.isNull() ) { kdDebug(30518) << "Found header-left" << endl; hasEvenOddHeader = true; importHeaderFooter( mainDocument, headerLeftElem, hasEvenOddHeader, headerStyle ); } - QDomElement headerElem = KoDom::namedItemNS( *masterPage, ooNS::style, "header" ); + TQDomElement headerElem = KoDom::namedItemNS( *masterPage, ooNS::style, "header" ); if ( !headerElem.isNull() ) { kdDebug(30518) << "Found header" << endl; importHeaderFooter( mainDocument, headerElem, hasEvenOddHeader, headerStyle ); } - QDomElement footerLeftElem = KoDom::namedItemNS( *masterPage, ooNS::style, "footer-left" ); + TQDomElement footerLeftElem = KoDom::namedItemNS( *masterPage, ooNS::style, "footer-left" ); if ( !footerLeftElem.isNull() ) { kdDebug(30518) << "Found footer-left" << endl; importHeaderFooter( mainDocument, footerLeftElem, hasEvenOddFooter, footerStyle ); } - QDomElement footerElem = KoDom::namedItemNS( *masterPage, ooNS::style, "footer" ); + TQDomElement footerElem = KoDom::namedItemNS( *masterPage, ooNS::style, "footer" ); if ( !footerElem.isNull() ) { kdDebug(30518) << "Found footer" << endl; importHeaderFooter( mainDocument, footerElem, hasEvenOddFooter, footerStyle ); @@ -478,7 +478,7 @@ void OoWriterImport::writePageLayout( QDomDocument& mainDocument, const QString& docElement.appendChild(elementPaper); // Page margins - QDomElement element = mainDocument.createElement("PAPERBORDERS"); + TQDomElement element = mainDocument.createElement("PAPERBORDERS"); element.setAttribute("left", marginLeft); element.setAttribute("top", marginTop); element.setAttribute("right", marginRight); @@ -486,10 +486,10 @@ void OoWriterImport::writePageLayout( QDomDocument& mainDocument, const QString& elementPaper.appendChild(element); } -void OoWriterImport::prepareDocument( QDomDocument& mainDocument, QDomElement& framesetsElem ) +void OoWriterImport::prepareDocument( TQDomDocument& mainDocument, TQDomElement& framesetsElem ) { mainDocument = KoDocument::createDomDocument( "kword", "DOC", "1.2" ); - QDomElement docElement = mainDocument.documentElement(); + TQDomElement docElement = mainDocument.documentElement(); docElement.setAttribute( "editor", "KWord's OOWriter Import Filter" ); docElement.setAttribute( "mime", "application/x-kword" ); docElement.setAttribute( "syntaxVersion", "2" ); @@ -498,12 +498,12 @@ void OoWriterImport::prepareDocument( QDomDocument& mainDocument, QDomElement& f docElement.appendChild(framesetsElem); // Now create VARIABLESETTINGS, mostly from meta.xml - QDomElement varSettings = mainDocument.createElement( "VARIABLESETTINGS" ); + TQDomElement varSettings = mainDocument.createElement( "VARIABLESETTINGS" ); docElement.appendChild( varSettings ); - QDomNode meta = KoDom::namedItemNS( m_meta, ooNS::office, "document-meta" ); - QDomNode office = KoDom::namedItemNS( meta, ooNS::office, "meta" ); + TQDomNode meta = KoDom::namedItemNS( m_meta, ooNS::office, "document-meta" ); + TQDomNode office = KoDom::namedItemNS( meta, ooNS::office, "meta" ); if ( !office.isNull() ) { - QDomElement date = KoDom::namedItemNS( office, ooNS::dc, "date" ); + TQDomElement date = KoDom::namedItemNS( office, ooNS::dc, "date" ); if ( !date.isNull() && !date.text().isEmpty() ) { // Both use ISO-8601, no conversion needed. varSettings.setAttribute( "modificationDate", date.text() ); @@ -520,9 +520,9 @@ void OoWriterImport::prepareDocument( QDomDocument& mainDocument, QDomElement& f } // Copied from the msword importer -QDomElement OoWriterImport::createInitialFrame( QDomElement& parentFramesetElem, double left, double right, double top, double bottom, bool autoExtend, NewFrameBehavior nfb ) +TQDomElement OoWriterImport::createInitialFrame( TQDomElement& tqparentFramesetElem, double left, double right, double top, double bottom, bool autoExtend, NewFrameBehavior nfb ) { - QDomElement frameElementOut = parentFramesetElem.ownerDocument().createElement("FRAME"); + TQDomElement frameElementOut = tqparentFramesetElem.ownerDocument().createElement("FRAME"); frameElementOut.setAttribute( "left", left ); frameElementOut.setAttribute( "right", right ); frameElementOut.setAttribute( "top", top ); @@ -531,18 +531,18 @@ QDomElement OoWriterImport::createInitialFrame( QDomElement& parentFramesetElem, // AutoExtendFrame for header/footer/footnote/endnote, AutoCreateNewFrame for body text frameElementOut.setAttribute( "autoCreateNewFrame", autoExtend ? 0 : 1 ); frameElementOut.setAttribute( "newFrameBehavior", nfb ); - parentFramesetElem.appendChild( frameElementOut ); + tqparentFramesetElem.appendChild( frameElementOut ); return frameElementOut; } -KoFilter::ConversionStatus OoWriterImport::loadAndParse(const QString& filename, QDomDocument& doc) +KoFilter::ConversiontqStatus OoWriterImport::loadAndParse(const TQString& filename, TQDomDocument& doc) { return OoUtils::loadAndParse( filename, doc, m_zip); } -KoFilter::ConversionStatus OoWriterImport::openFile() +KoFilter::ConversiontqStatus OoWriterImport::openFile() { - KoFilter::ConversionStatus status=loadAndParse("content.xml", m_content); + KoFilter::ConversiontqStatus status=loadAndParse("content.xml", m_content); if ( status != KoFilter::OK ) { kdError(30518) << "Content.xml could not be parsed correctly! Aborting!" << endl; @@ -551,12 +551,12 @@ KoFilter::ConversionStatus OoWriterImport::openFile() //kdDebug(30518)<<" m_content.toCString() :"<<m_content.toCString()<<endl; - // We need to keep the QDomDocument for styles too, unfortunately. - // Otherwise styleElement.parentNode() returns a null node + // We need to keep the TQDomDocument for styles too, unfortunately. + // Otherwise styleElement.tqparentNode() returns a null node // (see StyleStack::isUserStyle). Most of styles.xml is in m_styles // anyway, so this doesn't make a big difference. // We now also rely on this in createStyles. - //QDomDocument styles; + //TQDomDocument styles; // We do not stop if the following calls fail. loadAndParse("styles.xml", m_stylesDoc); @@ -569,7 +569,7 @@ KoFilter::ConversionStatus OoWriterImport::openFile() } // Very related to OoImpressImport::createDocumentInfo -void OoWriterImport::createDocumentInfo( QDomDocument &docinfo ) +void OoWriterImport::createDocumentInfo( TQDomDocument &docinfo ) { docinfo = KoDocument::createDomDocument( "document-info" /*DTD name*/, "document-info" /*tag name*/, "1.1" ); @@ -580,30 +580,30 @@ void OoWriterImport::createDocumentInfo( QDomDocument &docinfo ) // This mainly fills member variables with the styles. // The 'doc' argument is only for footnotes-configuration. -bool OoWriterImport::createStyleMap( const QDomDocument & styles, QDomDocument& doc ) +bool OoWriterImport::createStyleMap( const TQDomDocument & styles, TQDomDocument& doc ) { - QDomElement docElement = styles.documentElement(); - QDomNode docStyles = KoDom::namedItemNS( docElement, ooNS::office, "document-styles" ); + TQDomElement docElement = styles.documentElement(); + TQDomNode docStyles = KoDom::namedItemNS( docElement, ooNS::office, "document-styles" ); if ( docElement.hasAttributeNS( ooNS::office, "version" ) ) { bool ok = true; - double d = docElement.attributeNS( ooNS::office, "version", QString::null ).toDouble( &ok ); + double d = docElement.attributeNS( ooNS::office, "version", TQString() ).toDouble( &ok ); if ( ok ) { kdDebug(30518) << "OpenWriter version: " << d << endl; if ( d > 1.0 ) { - QString message( i18n("This document was created with OpenOffice.org version '%1'. This filter was written for version 1.0. Reading this file could cause strange behavior, crashes or incorrect display of the data. Do you want to continue converting the document?") ); - message = message.arg( docElement.attributeNS( ooNS::office, "version", QString::null ) ); + TQString message( i18n("This document was created with OpenOffice.org version '%1'. This filter was written for version 1.0. Reading this file could cause strange behavior, crashes or incorrect display of the data. Do you want to continue converting the document?") ); + message = message.tqarg( docElement.attributeNS( ooNS::office, "version", TQString() ) ); if ( KMessageBox::warningYesNo( 0, message, i18n( "Unsupported document version" ) ) == KMessageBox::No ) return false; } } } - QDomNode fontStyles = KoDom::namedItemNS( docElement, ooNS::office, "font-decls" ); + TQDomNode fontStyles = KoDom::namedItemNS( docElement, ooNS::office, "font-decls" ); if ( !fontStyles.isNull() ) { @@ -616,7 +616,7 @@ bool OoWriterImport::createStyleMap( const QDomDocument & styles, QDomDocument& kdDebug(30518) << "Starting reading in office:automatic-styles" << endl; - QDomNode autoStyles = KoDom::namedItemNS( docElement, ooNS::office, "automatic-styles" ); + TQDomNode autoStyles = KoDom::namedItemNS( docElement, ooNS::office, "automatic-styles" ); if ( !autoStyles.isNull() ) { insertStyles( autoStyles.toElement(), doc ); @@ -627,19 +627,19 @@ bool OoWriterImport::createStyleMap( const QDomDocument & styles, QDomDocument& kdDebug(30518) << "Reading in master styles" << endl; - QDomNode masterStyles = KoDom::namedItemNS( docElement, ooNS::office, "master-styles" ); + TQDomNode masterStyles = KoDom::namedItemNS( docElement, ooNS::office, "master-styles" ); if ( !masterStyles.isNull() ) { - QDomElement master; + TQDomElement master; forEachElement( master, masterStyles ) { if ( master.localName() == "master-page" && master.namespaceURI() == ooNS::style ) { - QString name = master.attributeNS( ooNS::style, "name", QString::null ); + TQString name = master.attributeNS( ooNS::style, "name", TQString() ); kdDebug(30518) << "Master style: '" << name << "' loaded " << endl; - m_masterPages.insert( name, new QDomElement( master ) ); + m_masterPages.insert( name, new TQDomElement( master ) ); } else kdWarning(30518) << "Unknown tag " << master.tagName() << " in office:master-styles" << endl; } @@ -648,7 +648,7 @@ bool OoWriterImport::createStyleMap( const QDomDocument & styles, QDomDocument& kdDebug(30518) << "Starting reading in office:styles" << endl; - QDomNode fixedStyles = KoDom::namedItemNS( docElement, ooNS::office, "styles" ); + TQDomNode fixedStyles = KoDom::namedItemNS( docElement, ooNS::office, "styles" ); if ( !fixedStyles.isNull() ) insertStyles( fixedStyles.toElement(), doc ); @@ -659,28 +659,28 @@ bool OoWriterImport::createStyleMap( const QDomDocument & styles, QDomDocument& } // started as a copy of OoImpressImport::insertStyles -void OoWriterImport::insertStyles( const QDomElement& styles, QDomDocument& doc ) +void OoWriterImport::insertStyles( const TQDomElement& styles, TQDomDocument& doc ) { //kdDebug(30518) << "Inserting styles from " << styles.tagName() << endl; - QDomElement e; + TQDomElement e; forEachElement( e, styles ) { - const QString localName = e.localName(); - const QString ns = e.namespaceURI(); + const TQString localName = e.localName(); + const TQString ns = e.namespaceURI(); - const QString name = e.attributeNS( ooNS::style, "name", QString::null ); + const TQString name = e.attributeNS( ooNS::style, "name", TQString() ); if ( ns == ooNS::style && ( localName == "style" || localName == "page-master" || localName == "font-decl" ) ) { - QDomElement* ep = new QDomElement( e ); + TQDomElement* ep = new TQDomElement( e ); m_styles.insert( name, ep ); kdDebug(30518) << "Style: '" << name << "' loaded " << endl; } else if ( localName == "default-style" && ns == ooNS::style ) { m_defaultStyle = e; } else if ( localName == "list-style" && ns == ooNS::text ) { - QDomElement* ep = new QDomElement( e ); + TQDomElement* ep = new TQDomElement( e ); m_listStyles.insert( name, ep ); kdDebug(30518) << "List style: '" << name << "' loaded " << endl; } else if ( localName == "outline-style" && ns == ooNS::text ) { @@ -703,20 +703,20 @@ void OoWriterImport::insertStyles( const QDomElement& styles, QDomDocument& doc } -// OO spec 2.5.4. p68. Conversion to Qt format: see qdate.html +// OO spec 2.5.4. p68. Conversion to TQt format: see qdate.html // OpenCalcImport::loadFormat has similar code, but slower, intermixed with other stuff, // lacking long-textual forms. -void OoWriterImport::importDateTimeStyle( const QDomElement& parent ) +void OoWriterImport::importDateTimeStyle( const TQDomElement& tqparent ) { - QString format; - QDomElement e; - forEachElement( e, parent ) + TQString format; + TQDomElement e; + forEachElement( e, tqparent ) { - const QString ns = e.namespaceURI(); + const TQString ns = e.namespaceURI(); if ( ns != ooNS::number ) continue; - const QString localName = e.localName(); - const QString numberStyle = e.attributeNS( ooNS::number, "style", QString::null ); + const TQString localName = e.localName(); + const TQString numberStyle = e.attributeNS( ooNS::number, "style", TQString() ); const bool shortForm = numberStyle == "short" || numberStyle.isEmpty(); if ( localName == "day" ) { format += shortForm ? "d" : "dd"; @@ -724,7 +724,7 @@ void OoWriterImport::importDateTimeStyle( const QDomElement& parent ) format += shortForm ? "ddd" : "dddd"; } else if ( localName == "month" ) { // TODO the spec has a strange mention of number:format-source - if ( e.attributeNS( ooNS::number, "textual", QString::null ) == "true" ) { + if ( e.attributeNS( ooNS::number, "textual", TQString() ) == "true" ) { format += shortForm ? "MMM" : "MMMM"; } else { // month number format += shortForm ? "M" : "MM"; @@ -732,7 +732,7 @@ void OoWriterImport::importDateTimeStyle( const QDomElement& parent ) } else if ( localName == "year" ) { format += shortForm ? "yy" : "yyyy"; } else if ( localName == "week-of-year" || localName == "quarter") { - // ### not supported in Qt + // ### not supported in TQt } else if ( localName == "hours" ) { format += shortForm ? "h" : "hh"; } else if ( localName == "minutes" ) { @@ -747,20 +747,20 @@ void OoWriterImport::importDateTimeStyle( const QDomElement& parent ) } #if 0 - // QDate doesn't work both ways!!! It can't parse something back from + // TQDate doesn't work both ways!!! It can't parse something back from // a string and a format (e.g. 01/02/03 and dd/MM/yy, it will assume MM/dd/yy). // So we also need to generate a KLocale-like format, to parse the value // Update: we don't need to parse the date back. - QString kdeFormat; - QDomElement e; - forEachElement( e, parent ) + TQString kdeFormat; + TQDomElement e; + forEachElement( e, tqparent ) { - const QString ns = e.namespaceURI(); + const TQString ns = e.namespaceURI(); if ( ns != ooNS::number ) continue; - QString localName = e.tagName(); - const QString numberStyle = e.attributeNS( ooNS::number, "style", QString::null ); + TQString localName = e.tagName(); + const TQString numberStyle = e.attributeNS( ooNS::number, "style", TQString() ); const bool shortForm = numberStyle == "short" || numberStyle.isEmpty(); if ( localName == "day" ) { kdeFormat += shortForm ? "%e" : "%d"; @@ -768,7 +768,7 @@ void OoWriterImport::importDateTimeStyle( const QDomElement& parent ) kdeFormat += shortForm ? "%a" : "%A"; } else if ( localName == "month" ) { // TODO the spec has a strange mention of number:format-source - if ( e.attributeNS( ooNS::number, "textual", QString::null ) == "true" ) { + if ( e.attributeNS( ooNS::number, "textual", TQString() ) == "true" ) { kdeFormat += shortForm ? "%b" : "%B"; } else { // month number kdeFormat += shortForm ? "%n" : "%m"; @@ -791,18 +791,18 @@ void OoWriterImport::importDateTimeStyle( const QDomElement& parent ) } #endif - QString styleName = parent.attributeNS( ooNS::style, "name", QString::null ); + TQString styleName = tqparent.attributeNS( ooNS::style, "name", TQString() ); kdDebug(30518) << "datetime style: " << styleName << " qt format=" << format << endl; m_dateTimeFormats.insert( styleName, format ); } -void OoWriterImport::fillStyleStack( const QDomElement& object, const char* nsURI, const QString& attrName ) +void OoWriterImport::fillStyleStack( const TQDomElement& object, const char* nsURI, const TQString& attrName ) { // find all styles associated with an object and push them on the stack // OoImpressImport has more tests here, but I don't think they're relevant to OoWriterImport if ( object.hasAttributeNS( nsURI, attrName ) ) { - const QString styleName = object.attributeNS( nsURI, attrName, QString::null ); - const QDomElement* style = m_styles[styleName]; + const TQString styleName = object.attributeNS( nsURI, attrName, TQString() ); + const TQDomElement* style = m_styles[styleName]; if ( style ) addStyles( style ); else @@ -810,42 +810,42 @@ void OoWriterImport::fillStyleStack( const QDomElement& object, const char* nsUR } } -void OoWriterImport::addStyles( const QDomElement* style ) +void OoWriterImport::addStyles( const TQDomElement* style ) { Q_ASSERT( style ); if ( !style ) return; - // this recursive function is necessary as parent styles can have parents themselves - if ( style->hasAttributeNS( ooNS::style, "parent-style-name" ) ) { - const QString parentStyleName = style->attributeNS( ooNS::style, "parent-style-name", QString::null ); - QDomElement* parentStyle = m_styles[ parentStyleName ]; - if ( parentStyle ) - addStyles( parentStyle ); + // this recursive function is necessary as tqparent styles can have tqparents themselves + if ( style->hasAttributeNS( ooNS::style, "tqparent-style-name" ) ) { + const TQString tqparentStyleName = style->attributeNS( ooNS::style, "tqparent-style-name", TQString() ); + TQDomElement* tqparentStyle = m_styles[ tqparentStyleName ]; + if ( tqparentStyle ) + addStyles( tqparentStyle ); else - kdWarning(30518) << "Parent style not found: " << parentStyleName << endl; + kdWarning(30518) << "Parent style not found: " << tqparentStyleName << endl; } else if ( !m_defaultStyle.isNull() ) // on top of all, the default style m_styleStack.push( m_defaultStyle ); - //kdDebug(30518) << "pushing style " << style->attributeNS( ooNS::style, "name", QString::null ) << endl; + //kdDebug(30518) << "pushing style " << style->attributeNS( ooNS::style, "name", TQString() ) << endl; m_styleStack.push( *style ); } -void OoWriterImport::applyListStyle( QDomDocument& doc, QDomElement& layoutElement, const QDomElement& paragraph ) +void OoWriterImport::applyListStyle( TQDomDocument& doc, TQDomElement& tqlayoutElement, const TQDomElement& paragraph ) { // Spec: see 3.3.5 p137 if ( m_listStyleStack.hasListStyle() && m_nextItemIsListItem ) { bool heading = paragraph.localName() == "h"; m_nextItemIsListItem = false; - int level = heading ? paragraph.attributeNS( ooNS::text, "level", QString::null ).toInt() : m_listStyleStack.level(); - writeCounter( doc, layoutElement, heading, level, m_insideOrderedList ); + int level = heading ? paragraph.attributeNS( ooNS::text, "level", TQString() ).toInt() : m_listStyleStack.level(); + writeCounter( doc, tqlayoutElement, heading, level, m_insideOrderedList ); } } -void OoWriterImport::writeCounter( QDomDocument& doc, QDomElement& layoutElement, bool heading, int level, bool ordered ) +void OoWriterImport::writeCounter( TQDomDocument& doc, TQDomElement& tqlayoutElement, bool heading, int level, bool ordered ) { - const QDomElement listStyle = m_listStyleStack.currentListStyle(); - //const QDomElement listStyleProperties = m_listStyleStack.currentListStyleProperties(); - QDomElement counter = doc.createElement( "COUNTER" ); + const TQDomElement listStyle = m_listStyleStack.currentListStyle(); + //const TQDomElement listStyleProperties = m_listStyleStack.currentListStyleProperties(); + TQDomElement counter = doc.createElement( "COUNTER" ); counter.setAttribute( "numberingtype", heading ? 1 : 0 ); counter.setAttribute( "depth", level - 1 ); // "depth" starts at 0 @@ -853,10 +853,10 @@ void OoWriterImport::writeCounter( QDomDocument& doc, QDomElement& layoutElement // << " m_restartNumbering=" << m_restartNumbering << endl; if ( ordered || heading ) { - counter.setAttribute( "type", Conversion::importCounterType( listStyle.attributeNS( ooNS::style, "num-format", QString::null ) ) ); - counter.setAttribute( "lefttext", listStyle.attributeNS( ooNS::style, "num-prefix", QString::null ) ); - counter.setAttribute( "righttext", listStyle.attributeNS( ooNS::style, "num-suffix", QString::null ) ); - QString dl = listStyle.attributeNS( ooNS::text, "display-levels", QString::null ); + counter.setAttribute( "type", Conversion::importCounterType( listStyle.attributeNS( ooNS::style, "num-format", TQString() ) ) ); + counter.setAttribute( "lefttext", listStyle.attributeNS( ooNS::style, "num-prefix", TQString() ) ); + counter.setAttribute( "righttext", listStyle.attributeNS( ooNS::style, "num-suffix", TQString() ) ); + TQString dl = listStyle.attributeNS( ooNS::text, "display-levels", TQString() ); if ( dl.isEmpty() ) dl = "1"; counter.setAttribute( "display-levels", dl ); @@ -865,21 +865,21 @@ void OoWriterImport::writeCounter( QDomDocument& doc, QDomElement& layoutElement counter.setAttribute( "restart", "true" ); } else { // useful? - counter.setAttribute( "start", listStyle.attributeNS( ooNS::text, "start-value", QString::null ) ); + counter.setAttribute( "start", listStyle.attributeNS( ooNS::text, "start-value", TQString() ) ); } } else { // bullets, see 3.3.6 p138 counter.setAttribute( "type", 6 ); - QString bulletChar = listStyle.attributeNS( ooNS::text, "bullet-char", QString::null ); + TQString bulletChar = listStyle.attributeNS( ooNS::text, "bullet-char", TQString() ); if ( !bulletChar.isEmpty() ) { #if 0 // doesn't work well. Fonts lack those symbols! - counter.setAttribute( "bullet", bulletChar[0].unicode() ); - kdDebug(30518) << "bullet code " << bulletChar[0].unicode() << endl; - QString fontName = listStyleProperties.attributeNS( ooNS::style, "font-name", QString::null ); + counter.setAttribute( "bullet", bulletChar[0].tqunicode() ); + kdDebug(30518) << "bullet code " << bulletChar[0].tqunicode() << endl; + TQString fontName = listStyleProperties.attributeNS( ooNS::style, "font-name", TQString() ); counter.setAttribute( "bulletfont", fontName ); #endif // Reverse engineering, I found those codes: - switch( bulletChar[0].unicode() ) { + switch( bulletChar[0].tqunicode() ) { case 0x2022: // small disc counter.setAttribute( "type", 10 ); // a disc bullet break; @@ -914,23 +914,23 @@ void OoWriterImport::writeCounter( QDomDocument& doc, QDomElement& layoutElement } } - layoutElement.appendChild(counter); + tqlayoutElement.appendChild(counter); } -static QDomElement findListLevelStyle( QDomElement& fullListStyle, int level ) +static TQDomElement findListLevelStyle( TQDomElement& fullListStyle, int level ) { - QDomElement listLevelItem; + TQDomElement listLevelItem; forEachElement( listLevelItem, fullListStyle ) { - if ( listLevelItem.attributeNS( ooNS::text, "level", QString::null ).toInt() == level ) + if ( listLevelItem.attributeNS( ooNS::text, "level", TQString() ).toInt() == level ) return listLevelItem; } - return QDomElement(); + return TQDomElement(); } -bool OoWriterImport::pushListLevelStyle( const QString& listStyleName, int level ) +bool OoWriterImport::pushListLevelStyle( const TQString& listStyleName, int level ) { - QDomElement* fullListStyle = m_listStyles[listStyleName]; + TQDomElement* fullListStyle = m_listStyles[listStyleName]; if ( !fullListStyle ) { kdWarning(30518) << "List style " << listStyleName << " not found!" << endl; return false; @@ -939,12 +939,12 @@ bool OoWriterImport::pushListLevelStyle( const QString& listStyleName, int level return pushListLevelStyle( listStyleName, *fullListStyle, level ); } -bool OoWriterImport::pushListLevelStyle( const QString& listStyleName, // for debug only - QDomElement& fullListStyle, int level ) +bool OoWriterImport::pushListLevelStyle( const TQString& listStyleName, // for debug only + TQDomElement& fullListStyle, int level ) { // Find applicable list-level-style for level int i = level; - QDomElement listLevelStyle; + TQDomElement listLevelStyle; while ( i > 0 && listLevelStyle.isNull() ) { listLevelStyle = findListLevelStyle( fullListStyle, i ); --i; @@ -958,14 +958,14 @@ bool OoWriterImport::pushListLevelStyle( const QString& listStyleName, // for de return true; } -void OoWriterImport::parseList( QDomDocument& doc, const QDomElement& list, QDomElement& currentFramesetElement ) +void OoWriterImport::parseList( TQDomDocument& doc, const TQDomElement& list, TQDomElement& currentFramesetElement ) { //kdDebug(30518) << k_funcinfo << "parseList"<< endl; m_insideOrderedList = ( list.localName() == "ordered-list" ); - QString oldListStyleName = m_currentListStyleName; + TQString oldListStyleName = m_currentListStyleName; if ( list.hasAttributeNS( ooNS::text, "style-name" ) ) - m_currentListStyleName = list.attributeNS( ooNS::text, "style-name", QString::null ); + m_currentListStyleName = list.attributeNS( ooNS::text, "style-name", TQString() ); bool listOK = !m_currentListStyleName.isEmpty(); const int level = m_listStyleStack.level() + 1; //kdDebug(30518) << k_funcinfo << " listOK=" << listOK << " level=" << level << endl; @@ -973,14 +973,14 @@ void OoWriterImport::parseList( QDomDocument& doc, const QDomElement& list, QDom listOK = pushListLevelStyle( m_currentListStyleName, level ); // Iterate over list items - QDomElement listItem; + TQDomElement listItem; forEachElement( listItem, list ) { // It's either list-header (normal text on top of list) or list-item m_nextItemIsListItem = ( listItem.localName() != "list-header" ); m_restartNumbering = -1; if ( listItem.hasAttributeNS( ooNS::text, "start-value" ) ) - m_restartNumbering = listItem.attributeNS( ooNS::text, "start-value", QString::null ).toInt(); + m_restartNumbering = listItem.attributeNS( ooNS::text, "start-value", TQString() ).toInt(); // ### Oasis: can be p h or list only. parseBodyOrSimilar( doc, listItem, currentFramesetElement ); m_restartNumbering = -1; @@ -990,31 +990,31 @@ void OoWriterImport::parseList( QDomDocument& doc, const QDomElement& list, QDom m_currentListStyleName = oldListStyleName; } -static int numberOfParagraphs( const QDomElement& frameset ) +static int numberOfParagraphs( const TQDomElement& frameset ) { - const QDomNodeList children = frameset.childNodes(); - const QString paragStr = "PARAGRAPH"; + const TQDomNodeList tqchildren = frameset.childNodes(); + const TQString paragStr = "PARAGRAPH"; int paragCount = 0; - for ( unsigned int i = 0 ; i < children.length() ; ++i ) { - if ( children.item( i ).toElement().tagName() == paragStr ) + for ( unsigned int i = 0 ; i < tqchildren.length() ; ++i ) { + if ( tqchildren.item( i ).toElement().tagName() == paragStr ) ++paragCount; } return paragCount; } -void OoWriterImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& parent, - QDomElement& outputParagraph, QDomElement& outputFormats, QString& paragraphText, uint& pos) +void OoWriterImport::parseSpanOrSimilar( TQDomDocument& doc, const TQDomElement& tqparent, + TQDomElement& outputParagraph, TQDomElement& outputFormats, TQString& paragraphText, uint& pos) { - // Parse every child node of the parent + // Parse every child node of the tqparent // Can't use forEachElement here since we also care about text nodes - for( QDomNode node ( parent.firstChild() ); !node.isNull(); node = node.nextSibling() ) + for( TQDomNode node ( tqparent.firstChild() ); !node.isNull(); node = node.nextSibling() ) { - QDomElement ts ( node.toElement() ); - QString textData; - const QString localName( ts.localName() ); - const QString ns = ts.namespaceURI(); + TQDomElement ts ( node.toElement() ); + TQString textData; + const TQString localName( ts.localName() ); + const TQString ns = ts.namespaceURI(); const bool isTextNS = ns == ooNS::text; - QDomText t ( node.toText() ); + TQDomText t ( node.toText() ); bool shouldWriteFormat=false; // By default no <FORMAT> element should be written @@ -1034,7 +1034,7 @@ void OoWriterImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& p else if ( isTextNS && localName == "tab-stop" ) // text:tab-stop { // KWord currently uses \t. - // Known bug: a line with only \t\t\t\t isn't loaded - XML (QDom) strips out whitespace. + // Known bug: a line with only \t\t\t\t isn't loaded - XML (TQDom) strips out whitespace. // One more good reason to switch to <text:tab-stop> instead... textData = '\t'; shouldWriteFormat=true; @@ -1053,19 +1053,19 @@ void OoWriterImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& p else if ( localName == "image" && ns == ooNS::draw ) { textData = '#'; // anchor placeholder - QString frameName = appendPicture(doc, ts); + TQString frameName = appendPicture(doc, ts); anchorFrameset( doc, outputFormats, pos, frameName ); } else if ( localName == "text-box" && ns == ooNS::draw ) { textData = '#'; // anchor placeholder - QString frameName = appendTextBox(doc, ts); + TQString frameName = appendTextBox(doc, ts); anchorFrameset( doc, outputFormats, pos, frameName ); } else if ( isTextNS && localName == "a" ) { m_styleStack.save(); - QString href( ts.attributeNS( ooNS::xlink, "href", QString::null) ); + TQString href( ts.attributeNS( ooNS::xlink, "href", TQString()) ); if ( href.startsWith("#") ) { // We have a reference to a bookmark (### TODO) @@ -1076,13 +1076,13 @@ void OoWriterImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& p { // The problem is that KWord's hyperlink text is not inside the normal text, but for OOWriter it is nearly a <text:span> // So we have to fake. - QDomElement fakeParagraph, fakeFormats; + TQDomElement fakeParagraph, fakeFormats; uint fakePos=0; - QString text; + TQString text; parseSpanOrSimilar( doc, ts, fakeParagraph, fakeFormats, text, fakePos); textData = '#'; // hyperlink placeholder - QDomElement linkElement (doc.createElement("LINK")); - linkElement.setAttribute("hrefName",ts.attributeNS( ooNS::xlink, "href", QString::null)); + TQDomElement linkElement (doc.createElement("LINK")); + linkElement.setAttribute("hrefName",ts.attributeNS( ooNS::xlink, "href", TQString())); linkElement.setAttribute("linkName",text); appendKWordVariable(doc, outputFormats, ts, pos, "STRING", 9, linkElement); } @@ -1121,21 +1121,21 @@ void OoWriterImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& p // (-1 for starting at 0, +1 since not written yet) Q_ASSERT( !m_currentFrameset.isNull() ); appendBookmark( doc, numberOfParagraphs( m_currentFrameset ), - pos, ts.attributeNS( ooNS::text, "name", QString::null ) ); + pos, ts.attributeNS( ooNS::text, "name", TQString() ) ); } else if ( isTextNS && localName == "bookmark-start" ) { - m_bookmarkStarts.insert( ts.attributeNS( ooNS::text, "name", QString::null ), + m_bookmarkStarts.insert( ts.attributeNS( ooNS::text, "name", TQString() ), BookmarkStart( m_currentFrameset.attribute( "name" ), numberOfParagraphs( m_currentFrameset ), pos ) ); } else if ( isTextNS && localName == "bookmark-end" ) { - QString bkName = ts.attributeNS( ooNS::text, "name", QString::null ); - BookmarkStartsMap::iterator it = m_bookmarkStarts.find( bkName ); + TQString bkName = ts.attributeNS( ooNS::text, "name", TQString() ); + BookmarkStartsMap::iterator it = m_bookmarkStarts.tqfind( bkName ); if ( it == m_bookmarkStarts.end() ) { // bookmark end without start. This seems to happen.. // insert simple bookmark then appendBookmark( doc, numberOfParagraphs( m_currentFrameset ), - pos, ts.attributeNS( ooNS::text, "name", QString::null ) ); + pos, ts.attributeNS( ooNS::text, "name", TQString() ) ); } else { if ( (*it).frameSetName != m_currentFrameset.attribute( "name" ) ) { // Oh tell me this never happens... @@ -1170,51 +1170,51 @@ void OoWriterImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& p } } -QDomElement OoWriterImport::parseParagraph( QDomDocument& doc, const QDomElement& paragraph ) +TQDomElement OoWriterImport::parseParagraph( TQDomDocument& doc, const TQDomElement& paragraph ) { - QDomElement p = doc.createElement( "PARAGRAPH" ); + TQDomElement p = doc.createElement( "PARAGRAPH" ); - QDomElement formats = doc.createElement( "FORMATS" ); + TQDomElement formats = doc.createElement( "FORMATS" ); - QString paragraphText; + TQString paragraphText; uint pos = 0; // parse every child node of the paragraph parseSpanOrSimilar( doc, paragraph, p, formats, paragraphText, pos); - QDomElement text = doc.createElement( "TEXT" ); + TQDomElement text = doc.createElement( "TEXT" ); text.appendChild( doc.createTextNode( paragraphText ) ); text.setAttribute( "xml:space", "preserve" ); p.appendChild( text ); //kdDebug(30518) << k_funcinfo << "Para text is: " << paragraphText << endl; p.appendChild( formats ); - QDomElement layoutElement = doc.createElement( "LAYOUT" ); - p.appendChild( layoutElement ); + TQDomElement tqlayoutElement = doc.createElement( "LAYOUT" ); + p.appendChild( tqlayoutElement ); // Style name - QString styleName = m_styleStack.userStyleName("paragraph"); + TQString styleName = m_styleStack.userStyleName("paragraph"); if ( !styleName.isEmpty() ) { - QDomElement nameElement = doc.createElement("NAME"); + TQDomElement nameElement = doc.createElement("NAME"); nameElement.setAttribute( "value", kWordStyleName(styleName) ); - layoutElement.appendChild(nameElement); + tqlayoutElement.appendChild(nameElement); } - writeLayout( doc, layoutElement ); - writeFormat( doc, layoutElement, 1, 0, 0 ); // paragraph format, useful for empty parags + writeLayout( doc, tqlayoutElement ); + writeFormat( doc, tqlayoutElement, 1, 0, 0 ); // paragraph format, useful for empty parags - applyListStyle( doc, layoutElement, paragraph ); + applyListStyle( doc, tqlayoutElement, paragraph ); - QDomElement* paragraphStyle = m_styles[paragraph.attributeNS( ooNS::text, "style-name", QString::null )]; - QString masterPageName = paragraphStyle ? paragraphStyle->attributeNS( ooNS::style, "master-page-name", QString::null ) : QString::null; + TQDomElement* paragraphStyle = m_styles[paragraph.attributeNS( ooNS::text, "style-name", TQString() )]; + TQString masterPageName = paragraphStyle ? paragraphStyle->attributeNS( ooNS::style, "master-page-name", TQString() ) : TQString(); if ( masterPageName.isEmpty() ) - masterPageName = "Standard"; // Seems to be a builtin name for the default layout... + masterPageName = "Standard"; // Seems to be a builtin name for the default tqlayout... if ( masterPageName != m_currentMasterPage ) { - // Detected a change in the master page -> this means we have to use a new page layout + // Detected a change in the master page -> this means we have to use a new page tqlayout // and insert a frame break if not on the first paragraph. - // In KWord we don't support sections so the first paragraph is the one that determines the page layout. + // In KWord we don't support sections so the first paragraph is the one that determines the page tqlayout. if ( m_currentMasterPage.isEmpty() ) { m_currentMasterPage = masterPageName; // before writePageLayout to avoid recursion writePageLayout( doc, masterPageName ); @@ -1222,23 +1222,23 @@ QDomElement OoWriterImport::parseParagraph( QDomDocument& doc, const QDomElement else { m_currentMasterPage = masterPageName; - QDomElement pageBreakElem = layoutElement.namedItem( "PAGEBREAKING" ).toElement(); + TQDomElement pageBreakElem = tqlayoutElement.namedItem( "PAGEBREAKING" ).toElement(); if ( !pageBreakElem.isNull() ) { pageBreakElem = doc.createElement( "PAGEBREAKING" ); - layoutElement.appendChild( pageBreakElem ); + tqlayoutElement.appendChild( pageBreakElem ); } pageBreakElem.setAttribute( "hardFrameBreak", "true" ); - // We have no way to store the new page layout, KWord doesn't have sections. + // We have no way to store the new page tqlayout, KWord doesn't have sections. } } return p; } -void OoWriterImport::writeFormat( QDomDocument& doc, QDomElement& formats, int id, int pos, int length ) +void OoWriterImport::writeFormat( TQDomDocument& doc, TQDomElement& formats, int id, int pos, int length ) { // Prepare a FORMAT element for this run of text - QDomElement format( doc.createElement( "FORMAT" ) ); + TQDomElement format( doc.createElement( "FORMAT" ) ); format.setAttribute( "id", id ); format.setAttribute( "pos", pos ); format.setAttribute( "len", length ); @@ -1254,8 +1254,8 @@ void OoWriterImport::writeFormat( QDomDocument& doc, QDomElement& formats, int i // find a case that breaks yet. if ( m_styleStack.hasAttributeNS( ooNS::fo, "color" ) ) { // 3.10.3 - QColor color( m_styleStack.attributeNS( ooNS::fo, "color" ) ); // #rrggbb format - QDomElement colorElem( doc.createElement( "COLOR" ) ); + TQColor color( m_styleStack.attributeNS( ooNS::fo, "color" ) ); // #rrggbb format + TQDomElement colorElem( doc.createElement( "COLOR" ) ); colorElem.setAttribute( "red", color.red() ); colorElem.setAttribute( "blue", color.blue() ); colorElem.setAttribute( "green", color.green() ); @@ -1265,7 +1265,7 @@ void OoWriterImport::writeFormat( QDomDocument& doc, QDomElement& formats, int i || m_styleStack.hasAttributeNS( ooNS::style, "font-name") ) // 3.10.8 { // Hmm, the remove "'" could break it's in the middle of the fontname... - QString fontName = m_styleStack.attributeNS( ooNS::fo, "font-family" ).remove( "'" ); + TQString fontName = m_styleStack.attributeNS( ooNS::fo, "font-family" ).remove( "'" ); if (fontName.isEmpty()) { // ##### TODO. This is wrong. style:font-name refers to a font-decl entry. @@ -1277,22 +1277,22 @@ void OoWriterImport::writeFormat( QDomDocument& doc, QDomElement& formats, int i if ( fontName == "Thorndale" ) fontName = "Times New Roman"; - fontName.remove(QRegExp("\\sCE$")); // Arial CE -> Arial + fontName.remove(TQRegExp("\\sCE$")); // Arial CE -> Arial - QDomElement fontElem( doc.createElement( "FONT" ) ); + TQDomElement fontElem( doc.createElement( "FONT" ) ); fontElem.setAttribute( "name", fontName ); format.appendChild( fontElem ); } if ( m_styleStack.hasAttributeNS( ooNS::fo, "font-size" ) ) { // 3.10.14 double pointSize = m_styleStack.fontSize(); - QDomElement fontSize( doc.createElement( "SIZE" ) ); - fontSize.setAttribute( "value", qRound(pointSize) ); // KWord uses toInt()! + TQDomElement fontSize( doc.createElement( "SIZE" ) ); + fontSize.setAttribute( "value", tqRound(pointSize) ); // KWord uses toInt()! format.appendChild( fontSize ); } if ( m_styleStack.hasAttributeNS( ooNS::fo, "font-weight" ) ) { // 3.10.24 - QDomElement weightElem( doc.createElement( "WEIGHT" ) ); - QString fontWeight = m_styleStack.attributeNS( ooNS::fo, "font-weight" ); + TQDomElement weightElem( doc.createElement( "WEIGHT" ) ); + TQString fontWeight = m_styleStack.attributeNS( ooNS::fo, "font-weight" ); int boldness = fontWeight.toInt(); if ( fontWeight == "bold" ) boldness = 75; @@ -1306,7 +1306,7 @@ void OoWriterImport::writeFormat( QDomDocument& doc, QDomElement& formats, int i if ( m_styleStack.attributeNS( ooNS::fo, "font-style" ) == "italic" || m_styleStack.attributeNS( ooNS::fo, "font-style" ) == "oblique" ) // no difference in kotext { - QDomElement italic = doc.createElement( "ITALIC" ); + TQDomElement italic = doc.createElement( "ITALIC" ); italic.setAttribute( "value", 1 ); format.appendChild( italic ); } @@ -1315,8 +1315,8 @@ void OoWriterImport::writeFormat( QDomDocument& doc, QDomElement& formats, int i && (m_styleStack.attributeNS( ooNS::fo, "score-spaces") == "false"); if( m_styleStack.hasAttributeNS( ooNS::style, "text-crossing-out" )) // 3.10.6 { - QString strikeOutType = m_styleStack.attributeNS( ooNS::style, "text-crossing-out" ); - QDomElement strikeOut = doc.createElement( "STRIKEOUT" ); + TQString strikeOutType = m_styleStack.attributeNS( ooNS::style, "text-crossing-out" ); + TQDomElement strikeOut = doc.createElement( "STRIKEOUT" ); if( strikeOutType =="double-line") { strikeOut.setAttribute("value", "double"); @@ -1340,10 +1340,10 @@ void OoWriterImport::writeFormat( QDomDocument& doc, QDomElement& formats, int i } if( m_styleStack.hasAttributeNS( ooNS::style, "text-position")) // 3.10.7 { - QDomElement vertAlign = doc.createElement( "VERTALIGN" ); - QString text_position = m_styleStack.attributeNS( ooNS::style, "text-position"); - QString value; - QString relativetextsize; + TQDomElement vertAlign = doc.createElement( "VERTALIGN" ); + TQString text_position = m_styleStack.attributeNS( ooNS::style, "text-position"); + TQString value; + TQString relativetextsize; OoUtils::importTextPosition( text_position, value, relativetextsize ); vertAlign.setAttribute( "value", value ); if ( !relativetextsize.isEmpty() ) @@ -1352,15 +1352,15 @@ void OoWriterImport::writeFormat( QDomDocument& doc, QDomElement& formats, int i } if ( m_styleStack.hasAttributeNS( ooNS::style, "text-underline" ) ) // 3.10.22 { - QString underline; - QString styleline; + TQString underline; + TQString styleline; OoUtils::importUnderline( m_styleStack.attributeNS( ooNS::style, "text-underline" ), underline, styleline ); - QDomElement underLineElem = doc.createElement( "UNDERLINE" ); + TQDomElement underLineElem = doc.createElement( "UNDERLINE" ); underLineElem.setAttribute( "value", underline ); underLineElem.setAttribute( "styleline", styleline ); - QString underLineColor = m_styleStack.attributeNS( ooNS::style, "text-underline-color" ); // 3.10.23 + TQString underLineColor = m_styleStack.attributeNS( ooNS::style, "text-underline-color" ); // 3.10.23 if ( !underLineColor.isEmpty() && underLineColor != "font-color" ) underLineElem.setAttribute("underlinecolor", underLineColor); if ( wordByWord ) @@ -1371,7 +1371,7 @@ void OoWriterImport::writeFormat( QDomDocument& doc, QDomElement& formats, int i if ( m_styleStack.hasAttributeNS( ooNS::fo, "font-variant" ) // 3.10.1 || m_styleStack.hasAttributeNS( ooNS::fo, "text-transform" ) ) // 3.10.2 { - QDomElement fontAttrib( doc.createElement( "FONTATTRIBUTE" ) ); + TQDomElement fontAttrib( doc.createElement( "FONTATTRIBUTE" ) ); bool smallCaps = m_styleStack.attributeNS( ooNS::fo, "font-variant" ) == "small-caps"; if ( smallCaps ) { @@ -1387,8 +1387,8 @@ void OoWriterImport::writeFormat( QDomDocument& doc, QDomElement& formats, int i if (m_styleStack.hasAttributeNS( ooNS::fo, "language")) // 3.10.17 { - QDomElement lang = doc.createElement("LANGUAGE"); - QString tmp = m_styleStack.attributeNS( ooNS::fo, "language"); + TQDomElement lang = doc.createElement("LANGUAGE"); + TQString tmp = m_styleStack.attributeNS( ooNS::fo, "language"); if (tmp=="en") lang.setAttribute("value", "en_US"); else @@ -1398,8 +1398,8 @@ void OoWriterImport::writeFormat( QDomDocument& doc, QDomElement& formats, int i if (m_styleStack.hasAttributeNS( ooNS::style, "text-background-color")) // 3.10.28 { - QDomElement bgCol = doc.createElement("TEXTBACKGROUNDCOLOR"); - QColor tmp = m_styleStack.attributeNS( ooNS::style, "text-background-color"); + TQDomElement bgCol = doc.createElement("TEXTBACKGROUNDCOLOR"); + TQColor tmp = m_styleStack.attributeNS( ooNS::style, "text-background-color"); if (tmp != "transparent") { bgCol.setAttribute("red", tmp.red()); @@ -1411,12 +1411,12 @@ void OoWriterImport::writeFormat( QDomDocument& doc, QDomElement& formats, int i if (m_styleStack.hasAttributeNS( ooNS::fo, "text-shadow")) // 3.10.21 { - QDomElement shadow = doc.createElement("SHADOW"); - QString css = m_styleStack.attributeNS( ooNS::fo, "text-shadow"); + TQDomElement shadow = doc.createElement("SHADOW"); + TQString css = m_styleStack.attributeNS( ooNS::fo, "text-shadow"); // Workaround for OOo-1.1 bug: they forgot to save the color. - QStringList tokens = QStringList::split(' ', css); + TQStringList tokens = TQStringList::split(' ', css); if ( !tokens.isEmpty() ) { - QColor col( tokens.first() ); + TQColor col( tokens.first() ); if ( !col.isValid() && tokens.count() > 1 ) { col.setNamedColor( tokens.last() ); } @@ -1436,7 +1436,7 @@ void OoWriterImport::writeFormat( QDomDocument& doc, QDomElement& formats, int i style:font-family-generic, 3.10.10 - roman, swiss, modern -> map to a font? style:font-style-name, 3.10.11 - can be ignored, says DV, the other ways to specify a font are more precise style:font-pitch, 3.10.12 - fixed or variable -> map to a font? - style:font-charset, 3.10.14 - not necessary with Qt + style:font-charset, 3.10.14 - not necessary with TQt style:font-size-rel, 3.10.15 - TODO in StyleStack::fontSize() fo:letter-spacing, 3.10.16 - not implemented in kotext style:text-relief, 3.10.20 - not implemented in kotext @@ -1454,12 +1454,12 @@ void OoWriterImport::writeFormat( QDomDocument& doc, QDomElement& formats, int i formats.appendChild( format ); } -void OoWriterImport::writeLayout( QDomDocument& doc, QDomElement& layoutElement ) +void OoWriterImport::writeLayout( TQDomDocument& doc, TQDomElement& tqlayoutElement ) { - Q_ASSERT( layoutElement.ownerDocument() == doc ); + Q_ASSERT( tqlayoutElement.ownerDocument() == doc ); - // Always write out the alignment, it's required - QDomElement flowElement = doc.createElement("FLOW"); + // Always write out the tqalignment, it's required + TQDomElement flowElement = doc.createElement("FLOW"); /* This was only an intermediate OASIS decision. The final decision is: * fo:text-align can be "left", "right", "center", "justify", and @@ -1476,29 +1476,29 @@ void OoWriterImport::writeLayout( QDomDocument& doc, QDomElement& layoutElement else flowElement.setAttribute( "align", "auto" ); } - layoutElement.appendChild( flowElement ); + tqlayoutElement.appendChild( flowElement ); if ( m_styleStack.hasAttributeNS( ooNS::fo, "writing-mode" ) ) // http://web4.w3.org/TR/xsl/slice7.html#writing-mode { // LTR is lr-tb. RTL is rl-tb - QString writingMode = m_styleStack.attributeNS( ooNS::fo, "writing-mode" ); + TQString writingMode = m_styleStack.attributeNS( ooNS::fo, "writing-mode" ); flowElement.setAttribute( "dir", writingMode=="rl-tb" || writingMode=="rl" ? "R" : "L" ); } // Indentation (margins) - OoUtils::importIndents( layoutElement, m_styleStack ); + OoUtils::importIndents( tqlayoutElement, m_styleStack ); // Offset before and after paragraph - OoUtils::importTopBottomMargin( layoutElement, m_styleStack ); + OoUtils::importTopBottomMargin( tqlayoutElement, m_styleStack ); // Line spacing - OoUtils::importLineSpacing( layoutElement, m_styleStack ); + OoUtils::importLineSpacing( tqlayoutElement, m_styleStack ); // Tabulators - OoUtils::importTabulators( layoutElement, m_styleStack ); + OoUtils::importTabulators( tqlayoutElement, m_styleStack ); // Borders - OoUtils::importBorders( layoutElement, m_styleStack ); + OoUtils::importBorders( tqlayoutElement, m_styleStack ); // Page breaking. This isn't in OoUtils since it doesn't apply to KPresenter if( m_styleStack.hasAttributeNS( ooNS::fo, "break-before") || @@ -1507,7 +1507,7 @@ void OoWriterImport::writeLayout( QDomDocument& doc, QDomElement& layoutElement m_styleStack.hasAttributeNS( ooNS::style, "keep-with-next") || m_styleStack.hasAttributeNS( ooNS::fo, "keep-with-next") ) { - QDomElement pageBreak = doc.createElement( "PAGEBREAKING" ); + TQDomElement pageBreak = doc.createElement( "PAGEBREAKING" ); if ( m_styleStack.hasAttributeNS( ooNS::fo, "break-before") ) { // 3.11.24 bool breakBefore = m_styleStack.attributeNS( ooNS::fo, "break-before" ) != "auto"; // TODO in KWord: implement difference between "column" and "page" @@ -1525,10 +1525,10 @@ void OoWriterImport::writeLayout( QDomDocument& doc, QDomElement& layoutElement } if ( m_styleStack.hasAttributeNS( ooNS::fo, "keep-with-next" ) ) { // 3.11.31 (the doc said style:keep-with-next but DV said it's wrong) // OASIS spec says it's "auto"/"always", not a boolean. Not sure which one OO uses. - QString val = m_styleStack.attributeNS( ooNS::fo, "keep-with-next" ); + TQString val = m_styleStack.attributeNS( ooNS::fo, "keep-with-next" ); pageBreak.setAttribute("keepWithNext", ( val == "true" || val == "always" ) ? "true" : "false"); } - layoutElement.appendChild( pageBreak ); + tqlayoutElement.appendChild( pageBreak ); } // TODO in KWord: padding @@ -1563,23 +1563,23 @@ void OoWriterImport::writeLayout( QDomDocument& doc, QDomElement& layoutElement style:background-image line numbering punctuation wrap, 3.10.36 - vertical alignment - a bit like offsetfrombaseline (but not for subscript/superscript, in general) + vertical tqalignment - a bit like offsetfrombaseline (but not for subscript/superscript, in general) Michael said those are in fact parag properties: style:text-autospace, 3.10.32 - not implemented in kotext - style:line-break, 3.10.37 - apparently that's for some Asian languages + style:line-break, 3.10.37 - aptqparently that's for some Asian languages */ } -void OoWriterImport::importFrame( QDomElement& frameElementOut, const QDomElement& object, bool isText ) +void OoWriterImport::importFrame( TQDomElement& frameElementOut, const TQDomElement& object, bool isText ) { double width = 100; if ( object.hasAttributeNS( ooNS::svg, "width" ) ) { // fixed width // TODO handle percentage (of enclosing table/frame/page) - width = KoUnit::parseValue( object.attributeNS( ooNS::svg, "width", QString::null ) ); + width = KoUnit::parseValue( object.attributeNS( ooNS::svg, "width", TQString() ) ); } else if ( object.hasAttributeNS( ooNS::fo, "min-width" ) ) { // min-width is not supported in KWord. Let's use it as a fixed width. - width = KoUnit::parseValue( object.attributeNS( ooNS::fo, "min-width", QString::null ) ); + width = KoUnit::parseValue( object.attributeNS( ooNS::fo, "min-width", TQString() ) ); } else { kdWarning(30518) << "Error in text-box: neither width nor min-width specified!" << endl; } @@ -1587,9 +1587,9 @@ void OoWriterImport::importFrame( QDomElement& frameElementOut, const QDomElemen bool hasMinHeight = false; if ( object.hasAttributeNS( ooNS::svg, "height" ) ) { // fixed height // TODO handle percentage (of enclosing table/frame/page) - height = KoUnit::parseValue( object.attributeNS( ooNS::svg, "height", QString::null ) ); + height = KoUnit::parseValue( object.attributeNS( ooNS::svg, "height", TQString() ) ); } else if ( object.hasAttributeNS( ooNS::fo, "min-height" ) ) { - height = KoUnit::parseValue( object.attributeNS( ooNS::fo, "min-height", QString::null ) ); + height = KoUnit::parseValue( object.attributeNS( ooNS::fo, "min-height", TQString() ) ); hasMinHeight = true; } else { kdWarning(30518) << "Error in text-box: neither height nor min-height specified!" << endl; @@ -1607,8 +1607,8 @@ void OoWriterImport::importFrame( QDomElement& frameElementOut, const QDomElemen // TODO draw:auto-grow-height draw:auto-grow-width - hmm? I thought min-height meant auto-grow-height... - KoRect frameRect( KoUnit::parseValue( object.attributeNS( ooNS::svg, "x", QString::null ) ), - KoUnit::parseValue( object.attributeNS( ooNS::svg, "y", QString::null ) ), + KoRect frameRect( KoUnit::parseValue( object.attributeNS( ooNS::svg, "x", TQString() ) ), + KoUnit::parseValue( object.attributeNS( ooNS::svg, "y", TQString() ) ), width, height ); frameElementOut.setAttribute("left", frameRect.left() ); @@ -1617,8 +1617,8 @@ void OoWriterImport::importFrame( QDomElement& frameElementOut, const QDomElemen frameElementOut.setAttribute("bottom", frameRect.bottom() ); if ( hasMinHeight ) frameElementOut.setAttribute("min-height", height ); - frameElementOut.setAttribute( "z-index", object.attributeNS( ooNS::draw, "z-index", QString::null ) ); - QPair<int, QString> attribs = Conversion::importWrapping( m_styleStack.attributeNS( ooNS::style, "wrap" ) ); + frameElementOut.setAttribute( "z-index", object.attributeNS( ooNS::draw, "z-index", TQString() ) ); + TQPair<int, TQString> attribs = Conversion::importWrapping( m_styleStack.attributeNS( ooNS::style, "wrap" ) ); frameElementOut.setAttribute("runaround", attribs.first ); if ( !attribs.second.isEmpty() ) frameElementOut.setAttribute("runaroundSide", attribs.second ); @@ -1643,7 +1643,7 @@ void OoWriterImport::importFrame( QDomElement& frameElementOut, const QDomElemen importCommonFrameProperties( frameElementOut ); } -void OoWriterImport::importCommonFrameProperties( QDomElement& frameElementOut ) +void OoWriterImport::importCommonFrameProperties( TQDomElement& frameElementOut ) { // padding. fo:padding for 4 values or padding-left/right/top/bottom (3.11.29 p228) double paddingLeft = KoUnit::parseValue( m_styleStack.attributeNS( ooNS::fo, "padding", "left" ) ); @@ -1662,9 +1662,9 @@ void OoWriterImport::importCommonFrameProperties( QDomElement& frameElementOut ) // background color (3.11.25) bool transparent = false; - QColor bgColor; + TQColor bgColor; if ( m_styleStack.hasAttributeNS( ooNS::fo, "background-color" ) ) { - QString color = m_styleStack.attributeNS( ooNS::fo, "background-color" ); + TQString color = m_styleStack.attributeNS( ooNS::fo, "background-color" ); if ( color == "transparent" ) transparent = true; else @@ -1687,7 +1687,7 @@ void OoWriterImport::importCommonFrameProperties( QDomElement& frameElementOut ) { double width; int style; - QColor color; + TQColor color; if (OoUtils::parseBorder(m_styleStack.attributeNS( ooNS::fo, "border", "left"), &width, &style, &color)) { frameElementOut.setAttribute( "lWidth", width ); if ( color.isValid() ) { // should be always true, but who knows @@ -1728,23 +1728,23 @@ void OoWriterImport::importCommonFrameProperties( QDomElement& frameElementOut ) // TODO more refined border spec for double borders (3.11.28) } -QString OoWriterImport::appendTextBox(QDomDocument& doc, const QDomElement& object) +TQString OoWriterImport::appendTextBox(TQDomDocument& doc, const TQDomElement& object) { - const QString frameName ( object.attributeNS( ooNS::draw, "name", QString::null) ); // ### TODO: what if empty, i.e. non-unique + const TQString frameName ( object.attributeNS( ooNS::draw, "name", TQString()) ); // ### TODO: what if empty, i.e. non-unique kdDebug(30518) << "appendTextBox " << frameName << endl; m_styleStack.save(); fillStyleStack( object, ooNS::draw, "style-name" ); // get the style for the graphics element // Create KWord frameset - QDomElement framesetElement(doc.createElement("FRAMESET")); + TQDomElement framesetElement(doc.createElement("FRAMESET")); framesetElement.setAttribute("frameType",1); framesetElement.setAttribute("frameInfo",0); framesetElement.setAttribute("visible",1); framesetElement.setAttribute("name",frameName); - QDomElement framesetsPluralElement (doc.documentElement().namedItem("FRAMESETS").toElement()); + TQDomElement framesetsPluralElement (doc.documentElement().namedItem("FRAMESETS").toElement()); framesetsPluralElement.appendChild(framesetElement); - QDomElement frameElementOut(doc.createElement("FRAME")); + TQDomElement frameElementOut(doc.createElement("FRAME")); framesetElement.appendChild(frameElementOut); importFrame( frameElementOut, object, true /*text*/ ); // TODO editable @@ -1763,18 +1763,18 @@ QString OoWriterImport::appendTextBox(QDomDocument& doc, const QDomElement& obje } // OOo SPEC: 3.6.3 p149 -void OoWriterImport::importFootnote( QDomDocument& doc, const QDomElement& object, QDomElement& formats, uint pos, const QString& localName ) +void OoWriterImport::importFootnote( TQDomDocument& doc, const TQDomElement& object, TQDomElement& formats, uint pos, const TQString& localName ) { - const QString frameName( object.attributeNS( ooNS::text, "id", QString::null) ); - QDomElement citationElem = KoDom::namedItemNS( object, ooNS::text, (localName+"-citation").latin1() ).toElement(); + const TQString frameName( object.attributeNS( ooNS::text, "id", TQString()) ); + TQDomElement citationElem = KoDom::namedItemNS( object, ooNS::text, (localName+"-citation").latin1() ).toElement(); bool endnote = localName == "endnote"; - QString label = citationElem.attributeNS( ooNS::text, "label", QString::null ); + TQString label = citationElem.attributeNS( ooNS::text, "label", TQString() ); bool autoNumbered = label.isEmpty(); // The var - QDomElement footnoteElem = doc.createElement( "FOOTNOTE" ); + TQDomElement footnoteElem = doc.createElement( "FOOTNOTE" ); if ( autoNumbered ) footnoteElem.setAttribute( "value", 1 ); // KWord will renumber anyway else @@ -1786,38 +1786,38 @@ void OoWriterImport::importFootnote( QDomDocument& doc, const QDomElement& objec appendKWordVariable( doc, formats, citationElem, pos, "STRI", 11 /*KWord code for footnotes*/, footnoteElem ); // The frameset - QDomElement framesetElement( doc.createElement("FRAMESET") ); + TQDomElement framesetElement( doc.createElement("FRAMESET") ); framesetElement.setAttribute( "frameType", 1 /* text */ ); framesetElement.setAttribute( "frameInfo", 7 /* footnote/endnote */ ); framesetElement.setAttribute( "name" , frameName ); - QDomElement framesetsPluralElement (doc.documentElement().namedItem("FRAMESETS").toElement()); + TQDomElement framesetsPluralElement (doc.documentElement().namedItem("FRAMESETS").toElement()); framesetsPluralElement.appendChild(framesetElement); createInitialFrame( framesetElement, 29, 798, 567, 567+41, true, NoFollowup ); // TODO importCommonFrameProperties ? // The text inside the frameset - QDomElement bodyElem = KoDom::namedItemNS( object, ooNS::text, (localName+"-body").latin1() ).toElement(); + TQDomElement bodyElem = KoDom::namedItemNS( object, ooNS::text, (localName+"-body").latin1() ).toElement(); parseBodyOrSimilar( doc, bodyElem, framesetElement ); } -QString OoWriterImport::appendPicture(QDomDocument& doc, const QDomElement& object) +TQString OoWriterImport::appendPicture(TQDomDocument& doc, const TQDomElement& object) { - const QString frameName ( object.attributeNS( ooNS::draw, "name", QString::null) ); // ### TODO: what if empty, i.e. non-unique - const QString href ( object.attributeNS( ooNS::xlink, "href", QString::null) ); + const TQString frameName ( object.attributeNS( ooNS::draw, "name", TQString()) ); // ### TODO: what if empty, i.e. non-unique + const TQString href ( object.attributeNS( ooNS::xlink, "href", TQString()) ); kdDebug(30518) << "Picture: " << frameName << " " << href << " (in OoWriterImport::appendPicture)" << endl; KoPicture picture; if ( href[0]=='#' ) { - QString strExtension; - const int result=href.findRev("."); + TQString strExtension; + const int result=href.tqfindRev("."); if (result>=0) { strExtension=href.mid(result+1); // As we are using KoPicture, the extension should be without the dot. } - QString filename(href.mid(1)); - KoPictureKey key(filename, QDateTime::currentDateTime(Qt::UTC)); + TQString filename(href.mid(1)); + KoPictureKey key(filename, TQDateTime::tqcurrentDateTime(Qt::UTC)); picture.setKey(key); if (!m_zip) @@ -1835,12 +1835,12 @@ QString OoWriterImport::appendPicture(QDomDocument& doc, const QDomElement& obje return frameName; } const KZipFileEntry* f = static_cast<const KZipFileEntry *>(entry); - QIODevice* io=f->device(); + TQIODevice* io=f->device(); kdDebug(30518) << "Picture " << filename << " has size " << f->size() << endl; if (!io) { - kdWarning(30518) << "No QIODevice for picture " << frameName << " " << href << endl; + kdWarning(30518) << "No TQIODevice for picture " << frameName << " " << href << endl; return frameName; } if (!picture.load(io,strExtension)) @@ -1850,14 +1850,14 @@ QString OoWriterImport::appendPicture(QDomDocument& doc, const QDomElement& obje { KURL url; url.setPath(href); // ### TODO: is this really right? - picture.setKeyAndDownloadPicture(url, 0); // ### TODO: find a better parent if possible + picture.setKeyAndDownloadPicture(url, 0); // ### TODO: find a better tqparent if possible } kdDebug(30518) << "Picture ready! Key: " << picture.getKey().toString() << " Size:" << picture.getOriginalSize() << endl; - QString strStoreName; + TQString strStoreName; strStoreName="pictures/picture"; - strStoreName+=QString::number(++m_pictureNumber); + strStoreName+=TQString::number(++m_pictureNumber); strStoreName+='.'; strStoreName+=picture.getExtension(); @@ -1883,18 +1883,18 @@ QString OoWriterImport::appendPicture(QDomDocument& doc, const QDomElement& obje // Now that we have copied the image, we need to make some bookkeeping - QDomElement docElement( doc.documentElement() ); + TQDomElement docElement( doc.documentElement() ); - QDomElement framesetsPluralElement ( docElement.namedItem("FRAMESETS").toElement() ); + TQDomElement framesetsPluralElement ( docElement.namedItem("FRAMESETS").toElement() ); - QDomElement framesetElement=doc.createElement("FRAMESET"); + TQDomElement framesetElement=doc.createElement("FRAMESET"); framesetElement.setAttribute("frameType",2); framesetElement.setAttribute("frameInfo",0); framesetElement.setAttribute("visible",1); framesetElement.setAttribute("name",frameName); framesetsPluralElement.appendChild(framesetElement); - QDomElement frameElementOut=doc.createElement("FRAME"); + TQDomElement frameElementOut=doc.createElement("FRAME"); framesetElement.appendChild(frameElementOut); m_styleStack.save(); @@ -1902,16 +1902,16 @@ QString OoWriterImport::appendPicture(QDomDocument& doc, const QDomElement& obje importFrame( frameElementOut, object, false /*not text*/ ); m_styleStack.restore(); - QDomElement element=doc.createElement("PICTURE"); + TQDomElement element=doc.createElement("PICTURE"); element.setAttribute("keepAspectRatio","true"); framesetElement.setAttribute("frameType",2); // Picture framesetElement.appendChild(element); - QDomElement singleKey ( doc.createElement("KEY") ); + TQDomElement singleKey ( doc.createElement("KEY") ); picture.getKey().saveAttributes(singleKey); element.appendChild(singleKey); - QDomElement picturesPluralElement ( docElement.namedItem("PICTURES").toElement() ); + TQDomElement picturesPluralElement ( docElement.namedItem("PICTURES").toElement() ); if (picturesPluralElement.isNull()) { // We do not yet have any <PICTURES> element, so we must create it @@ -1919,41 +1919,41 @@ QString OoWriterImport::appendPicture(QDomDocument& doc, const QDomElement& obje docElement.appendChild(picturesPluralElement); } - QDomElement pluralKey ( doc.createElement("KEY") ); + TQDomElement pluralKey ( doc.createElement("KEY") ); picture.getKey().saveAttributes(pluralKey); pluralKey.setAttribute("name",strStoreName); picturesPluralElement.appendChild(pluralKey); return frameName; } -void OoWriterImport::anchorFrameset( QDomDocument& doc, QDomElement& formats, uint pos, const QString& frameSetName ) +void OoWriterImport::anchorFrameset( TQDomDocument& doc, TQDomElement& formats, uint pos, const TQString& frameSetName ) { - QDomElement formatElementOut=doc.createElement("FORMAT"); + TQDomElement formatElementOut=doc.createElement("FORMAT"); formatElementOut.setAttribute("id",6); // Floating frame formatElementOut.setAttribute("pos",pos); // Start position formatElementOut.setAttribute("len",1); // Start position formats.appendChild(formatElementOut); //Append to <FORMATS> - QDomElement anchor=doc.createElement("ANCHOR"); + TQDomElement anchor=doc.createElement("ANCHOR"); // No name attribute! anchor.setAttribute("type","frameset"); anchor.setAttribute("instance",frameSetName); formatElementOut.appendChild(anchor); } -void OoWriterImport::appendField(QDomDocument& doc, QDomElement& outputFormats, QDomElement& object, uint pos) -// Note: QDomElement& outputFormats replaces the parameter QDomElement& e in OoImpressImport::appendField +void OoWriterImport::appendField(TQDomDocument& doc, TQDomElement& outputFormats, TQDomElement& object, uint pos) +// Note: TQDomElement& outputFormats replaces the parameter TQDomElement& e in OoImpressImport::appendField // (otherwise it should be the same parameters.) { - const QString localName (object.localName()); + const TQString localName (object.localName()); //kdDebug(30518) << localName << endl; int subtype = -1; if ( localName.endsWith( "date" ) || localName.endsWith( "time" ) ) { - QString dataStyleName = object.attributeNS( ooNS::style, "data-style-name", QString::null ); - QString dateFormat = "locale"; - DataFormatsMap::const_iterator it = m_dateTimeFormats.find( dataStyleName ); + TQString dataStyleName = object.attributeNS( ooNS::style, "data-style-name", TQString() ); + TQString dateFormat = "locale"; + DataFormatsMap::const_iterator it = m_dateTimeFormats.tqfind( dataStyleName ); if ( it != m_dateTimeFormats.end() ) dateFormat = (*it); @@ -1961,20 +1961,20 @@ void OoWriterImport::appendField(QDomDocument& doc, QDomElement& outputFormats, { subtype = 1; // current (or fixed) date // Standard form of the date is in date-value. Example: 2004-01-21T10:57:05 - QDateTime dt(QDate::fromString(object.attributeNS( ooNS::text, "date-value", QString::null), Qt::ISODate)); + TQDateTime dt(TQDate::fromString(object.attributeNS( ooNS::text, "date-value", TQString()), Qt::ISODate)); - bool fixed = (object.hasAttributeNS( ooNS::text, "fixed") && object.attributeNS( ooNS::text, "fixed", QString::null)=="true"); + bool fixed = (object.hasAttributeNS( ooNS::text, "fixed") && object.attributeNS( ooNS::text, "fixed", TQString())=="true"); if (!dt.isValid()) { - dt = QDateTime::currentDateTime(); // OOo docs say so :) + dt = TQDateTime::tqcurrentDateTime(); // OOo docs say so :) fixed = false; } - const QDate date(dt.date()); - const QTime time(dt.time()); + const TQDate date(dt.date()); + const TQTime time(dt.time()); if ( fixed ) subtype = 0; - QDomElement dateElement ( doc.createElement("DATE") ); + TQDomElement dateElement ( doc.createElement("DATE") ); dateElement.setAttribute("fix", fixed ? 1 : 0); dateElement.setAttribute("subtype", subtype); dateElement.setAttribute("day", date.day()); @@ -1984,29 +1984,29 @@ void OoWriterImport::appendField(QDomDocument& doc, QDomElement& outputFormats, dateElement.setAttribute("minute", time.minute()); dateElement.setAttribute("second", time.second()); if (object.hasAttributeNS( ooNS::text, "date-adjust")) - dateElement.setAttribute("correct", object.attributeNS( ooNS::text, "date-adjust", QString::null)); + dateElement.setAttribute("correct", object.attributeNS( ooNS::text, "date-adjust", TQString())); appendKWordVariable(doc, outputFormats, object, pos, "DATE" + dateFormat, 0, dateElement); } else if (localName == "time") { - // Use QDateTime to work around a possible problem of QTime::FromString in Qt 3.2.2 - QDateTime dt(QDateTime::fromString(object.attributeNS( ooNS::text, "time-value", QString::null), Qt::ISODate)); + // Use TQDateTime to work around a possible problem of TQTime::FromString in TQt 3.2.2 + TQDateTime dt(TQDateTime::fromString(object.attributeNS( ooNS::text, "time-value", TQString()), Qt::ISODate)); - bool fixed = (object.hasAttributeNS( ooNS::text, "fixed") && object.attributeNS( ooNS::text, "fixed", QString::null)=="true"); + bool fixed = (object.hasAttributeNS( ooNS::text, "fixed") && object.attributeNS( ooNS::text, "fixed", TQString())=="true"); if (!dt.isValid()) { - dt = QDateTime::currentDateTime(); // OOo docs say so :) + dt = TQDateTime::tqcurrentDateTime(); // OOo docs say so :) fixed = false; } - const QTime time(dt.time()); - QDomElement timeElement (doc.createElement("TIME") ); + const TQTime time(dt.time()); + TQDomElement timeElement (doc.createElement("TIME") ); timeElement.setAttribute("fix", fixed ? 1 : 0); timeElement.setAttribute("hour", time.hour()); timeElement.setAttribute("minute", time.minute()); timeElement.setAttribute("second", time.second()); /*if (object.hasAttributeNS( ooNS::text, "time-adjust")) - timeElem.setAttribute("correct", object.attributeNS( ooNS::text, "time-adjust", QString::null));*/ // ### TODO + timeElem.setAttribute("correct", object.attributeNS( ooNS::text, "time-adjust", TQString()));*/ // ### TODO appendKWordVariable(doc, outputFormats, object, pos, "TIME" + dateFormat, 2, timeElement); } @@ -2025,10 +2025,10 @@ void OoWriterImport::appendField(QDomDocument& doc, QDomElement& outputFormats, subtype = 4; // We do NOT include the date value here. It will be retrieved from // meta.xml - QDomElement dateElement ( doc.createElement("DATE") ); + TQDomElement dateElement ( doc.createElement("DATE") ); dateElement.setAttribute("subtype", subtype); if (object.hasAttributeNS( ooNS::text, "date-adjust")) - dateElement.setAttribute("correct", object.attributeNS( ooNS::text, "date-adjust", QString::null)); + dateElement.setAttribute("correct", object.attributeNS( ooNS::text, "date-adjust", TQString())); appendKWordVariable(doc, outputFormats, object, pos, "DATE" + dateFormat, 0, dateElement); } }// end of date/time variables @@ -2038,7 +2038,7 @@ void OoWriterImport::appendField(QDomDocument& doc, QDomElement& outputFormats, if (object.hasAttributeNS( ooNS::text, "select-page")) { - const QString select = object.attributeNS( ooNS::text, "select-page", QString::null); + const TQString select = object.attributeNS( ooNS::text, "select-page", TQString()); if (select == "previous") subtype = 3; // VST_PGNUM_PREVIOUS @@ -2046,16 +2046,16 @@ void OoWriterImport::appendField(QDomDocument& doc, QDomElement& outputFormats, subtype = 4; // VST_PGNUM_NEXT } - QDomElement pgnumElement ( doc.createElement("PGNUM") ); + TQDomElement pgnumElement ( doc.createElement("PGNUM") ); pgnumElement.setAttribute("subtype", subtype); pgnumElement.setAttribute("value", object.text()); appendKWordVariable(doc, outputFormats, object, pos, "NUMBER", 4, pgnumElement); } else if (localName == "chapter") { - const QString display = object.attributeNS( ooNS::text, "display", QString::null ); + const TQString display = object.attributeNS( ooNS::text, "display", TQString() ); // display can be name, number, number-and-name, plain-number-and-name, plain-number - QDomElement pgnumElement ( doc.createElement("PGNUM") ); + TQDomElement pgnumElement ( doc.createElement("PGNUM") ); pgnumElement.setAttribute("subtype", 2); // VST_CURRENT_SECTION pgnumElement.setAttribute("value", object.text()); appendKWordVariable(doc, outputFormats, object, pos, "STRING", 4, pgnumElement); @@ -2066,7 +2066,7 @@ void OoWriterImport::appendField(QDomDocument& doc, QDomElement& outputFormats, if (object.hasAttributeNS( ooNS::text, "display")) { - const QString display = object.attributeNS( ooNS::text, "display", QString::null); + const TQString display = object.attributeNS( ooNS::text, "display", TQString()); if (display == "path") subtype = 1; // VST_DIRECTORYNAME @@ -2078,7 +2078,7 @@ void OoWriterImport::appendField(QDomDocument& doc, QDomElement& outputFormats, subtype = 5; // VST_PATHFILENAME } - QDomElement fieldElement ( doc.createElement("FIELD") ); + TQDomElement fieldElement ( doc.createElement("FIELD") ); fieldElement.setAttribute("subtype", subtype); fieldElement.setAttribute("value", object.text()); appendKWordVariable(doc, outputFormats, object, pos, "STRING", 8, fieldElement); @@ -2101,7 +2101,7 @@ void OoWriterImport::appendField(QDomDocument& doc, QDomElement& outputFormats, else if ( localName == "description" ) subtype = 11; // Abstract - QDomElement authorElem = doc.createElement("FIELD"); + TQDomElement authorElem = doc.createElement("FIELD"); authorElem.setAttribute("subtype", subtype); authorElem.setAttribute("value", object.text()); appendKWordVariable(doc, outputFormats, object, pos, "STRING", 8, authorElem); @@ -2109,7 +2109,7 @@ void OoWriterImport::appendField(QDomDocument& doc, QDomElement& outputFormats, else if ( localName.startsWith( "sender-" ) ) { int subtype = -1; - const QCString afterText( localName.latin1() + 5 ); + const TQCString afterText( localName.latin1() + 5 ); if ( afterText == "sender-company" ) subtype = 4; //VST_COMPANYNAME; else if ( afterText == "sender-firstname" ) @@ -2140,7 +2140,7 @@ void OoWriterImport::appendField(QDomDocument& doc, QDomElement& outputFormats, subtype = 3; // VST_EMAIL; if ( subtype != -1 ) { - QDomElement fieldElem = doc.createElement("FIELD"); + TQDomElement fieldElem = doc.createElement("FIELD"); fieldElem.setAttribute("subtype", subtype); fieldElem.setAttribute("value", object.text()); appendKWordVariable(doc, outputFormats, object, pos, "STRING", 8, fieldElem); @@ -2153,8 +2153,8 @@ void OoWriterImport::appendField(QDomDocument& doc, QDomElement& outputFormats, // - variable-set is related to variable-decls (defined in <body>); // its value can change in the middle of the document. // - user-defined is related to meta::user-defined in meta.xml - QDomElement customElem = doc.createElement( "CUSTOM" ); - customElem.setAttribute( "name", object.attributeNS( ooNS::text, "name", QString::null ) ); + TQDomElement customElem = doc.createElement( "CUSTOM" ); + customElem.setAttribute( "name", object.attributeNS( ooNS::text, "name", TQString() ) ); customElem.setAttribute( "value", object.text() ); appendKWordVariable(doc, outputFormats, object, pos, "STRING", 6, customElem); } @@ -2165,12 +2165,12 @@ void OoWriterImport::appendField(QDomDocument& doc, QDomElement& outputFormats, // TODO localName == "page-variable-get", "initial-creator" and many more } -void OoWriterImport::appendKWordVariable(QDomDocument& doc, QDomElement& formats, const QDomElement& object, uint pos, - const QString& key, int type, QDomElement& child) +void OoWriterImport::appendKWordVariable(TQDomDocument& doc, TQDomElement& formats, const TQDomElement& object, uint pos, + const TQString& key, int type, TQDomElement& child) { - QDomElement variableElement ( doc.createElement("VARIABLE") ); + TQDomElement variableElement ( doc.createElement("VARIABLE") ); - QDomElement typeElement ( doc.createElement("TYPE") ); + TQDomElement typeElement ( doc.createElement("TYPE") ); typeElement.setAttribute("key",key); typeElement.setAttribute("type",type); typeElement.setAttribute("text",object.text()); @@ -2178,7 +2178,7 @@ void OoWriterImport::appendKWordVariable(QDomDocument& doc, QDomElement& formats variableElement.appendChild(child); //Append to <VARIABLE> - QDomElement formatElement ( doc.createElement("FORMAT") ); + TQDomElement formatElement ( doc.createElement("FORMAT") ); formatElement.setAttribute("id",4); // Variable formatElement.setAttribute("pos",pos); // Start position formatElement.setAttribute("len",1); @@ -2188,23 +2188,23 @@ void OoWriterImport::appendKWordVariable(QDomDocument& doc, QDomElement& formats formats.appendChild(formatElement); } -void OoWriterImport::parseTable( QDomDocument &doc, const QDomElement& parent, QDomElement& currentFramesetElement ) +void OoWriterImport::parseTable( TQDomDocument &doc, const TQDomElement& tqparent, TQDomElement& currentFramesetElement ) { - QString tableName ( parent.attributeNS( ooNS::table, "name", QString::null) ); // TODO: what if empty (non-unique?) + TQString tableName ( tqparent.attributeNS( ooNS::table, "name", TQString()) ); // TODO: what if empty (non-unique?) kdDebug(30518) << "Found table " << tableName << endl; // In OOWriter a table is never inside a paragraph, in KWord it is always in a paragraph - QDomElement paragraphElementOut (doc.createElement("PARAGRAPH")); + TQDomElement paragraphElementOut (doc.createElement("PARAGRAPH")); currentFramesetElement.appendChild(paragraphElementOut); - QDomElement textElementOut(doc.createElement("TEXT")); + TQDomElement textElementOut(doc.createElement("TEXT")); textElementOut.appendChild(doc.createTextNode("#")); paragraphElementOut.appendChild(textElementOut); - QDomElement formatsPluralElementOut(doc.createElement("FORMATS")); + TQDomElement formatsPluralElementOut(doc.createElement("FORMATS")); paragraphElementOut.appendChild(formatsPluralElementOut); - QDomElement elementFormat(doc.createElement("FORMAT")); + TQDomElement elementFormat(doc.createElement("FORMAT")); elementFormat.setAttribute("id",6); elementFormat.setAttribute("pos",0); elementFormat.setAttribute("len",1); @@ -2212,38 +2212,38 @@ void OoWriterImport::parseTable( QDomDocument &doc, const QDomElement& parent, Q // ### FIXME: we have no <LAYOUT> element! - QDomElement elementAnchor(doc.createElement("ANCHOR")); + TQDomElement elementAnchor(doc.createElement("ANCHOR")); elementAnchor.setAttribute("type","frameset"); elementAnchor.setAttribute("instance",tableName); elementFormat.appendChild(elementAnchor); // Left position of the cell/column (similar to RTF's \cellx). The last one defined is the right position of the last cell/column - QMemArray<double> columnLefts(4); + TQMemArray<double> columnLefts(4); uint maxColumns=columnLefts.size() - 1; uint col=0; columnLefts[0]=0.0; // Initialize left of first cell - QDomElement elem; - forEachElement( elem, parent ) + TQDomElement elem; + forEachElement( elem, tqparent ) { if ( elem.localName() == "table-column" && elem.namespaceURI() == ooNS::table ) { uint repeat = elem.attributeNS( ooNS::table, "number-columns-repeated", "1").toUInt(); // Default 1 time if (!repeat) repeat=1; // At least one column defined! - const QString styleName ( elem.attributeNS( ooNS::table, "style-name", QString::null) ); + const TQString styleName ( elem.attributeNS( ooNS::table, "style-name", TQString()) ); kdDebug(30518) << "Column " << col << " style " << styleName << endl; - const QDomElement* style=m_styles.find(styleName); + const TQDomElement* style=m_styles.tqfind(styleName); double width=0.0; if (style) { - const QDomElement elemProps( KoDom::namedItemNS( *style, ooNS::style, "properties") ); + const TQDomElement elemProps( KoDom::namedItemNS( *style, ooNS::style, "properties") ); if (elemProps.isNull()) { kdWarning(30518) << "Could not find table column style properties!" << endl; } - const QString strWidth ( elemProps.attributeNS( ooNS::style, "column-width", QString::null) ); + const TQString strWidth ( elemProps.attributeNS( ooNS::style, "column-width", TQString()) ); kdDebug(30518) << "- raw style width " << strWidth << endl; width = KoUnit::parseValue( strWidth ); } @@ -2265,7 +2265,7 @@ void OoWriterImport::parseTable( QDomDocument &doc, const QDomElement& parent, Q { // We need more columns maxColumns+=4; - columnLefts.resize(maxColumns+1, QGArray::SpeedOptim); + columnLefts.resize(maxColumns+1, TQGArray::SpeedOptim); } columnLefts.at(col) = width + columnLefts.at(col-1); kdDebug(30518) << "Cell column " << col-1 << " left " << columnLefts.at(col-1) << " right " << columnLefts.at(col) << endl; @@ -2275,26 +2275,26 @@ void OoWriterImport::parseTable( QDomDocument &doc, const QDomElement& parent, Q uint row=0; uint column=0; - parseInsideOfTable(doc, parent, currentFramesetElement, tableName, columnLefts, row, column); + parseInsideOfTable(doc, tqparent, currentFramesetElement, tableName, columnLefts, row, column); } -void OoWriterImport::parseInsideOfTable( QDomDocument &doc, const QDomElement& parent, QDomElement& currentFramesetElement, - const QString& tableName, const QMemArray<double> & columnLefts, uint& row, uint& column ) +void OoWriterImport::parseInsideOfTable( TQDomDocument &doc, const TQDomElement& tqparent, TQDomElement& currentFramesetElement, + const TQString& tableName, const TQMemArray<double> & columnLefts, uint& row, uint& column ) { kdDebug(30518) << "parseInsideOfTable: columnLefts.size()=" << columnLefts.size() << endl; - QDomElement framesetsPluralElement (doc.documentElement().namedItem("FRAMESETS").toElement()); + TQDomElement framesetsPluralElement (doc.documentElement().namedItem("FRAMESETS").toElement()); if (framesetsPluralElement.isNull()) { kdError(30518) << "Cannot find KWord's <FRAMESETS>! Cannot process table!" << endl; return; } - QDomElement e; - forEachElement( e, parent ) + TQDomElement e; + forEachElement( e, tqparent ) { m_styleStack.save(); - const QString localName = e.localName(); - const QString ns = e.namespaceURI(); + const TQString localName = e.localName(); + const TQString ns = e.namespaceURI(); if ( ns != ooNS::table ) { kdWarning(30518) << "Skipping element " << e.tagName() << " (in OoWriterImport::parseInsideOfTable)" << endl; continue; @@ -2302,26 +2302,26 @@ void OoWriterImport::parseInsideOfTable( QDomDocument &doc, const QDomElement& p if ( localName == "table-cell" ) // OOo SPEC 4.8.1 p267 { - const QString frameName(i18n("Frameset name","Table %3, row %1, column %2") - .arg(row).arg(column).arg(tableName)); // The table name could have a % sequence, so use the table name as last! + const TQString frameName(i18n("Frameset name","Table %3, row %1, column %2") + .tqarg(row).tqarg(column).tqarg(tableName)); // The table name could have a % sequence, so use the table name as last! kdDebug(30518) << "Trying to create " << frameName << endl; // We need to create a frameset for the cell - QDomElement framesetElement(doc.createElement("FRAMESET")); + TQDomElement framesetElement(doc.createElement("FRAMESET")); framesetElement.setAttribute("frameType",1); framesetElement.setAttribute("frameInfo",0); framesetElement.setAttribute("visible",1); framesetElement.setAttribute("name",frameName); framesetElement.setAttribute("row",row); framesetElement.setAttribute("col",column); - int rowSpan = e.attributeNS( ooNS::table, "number-rows-spanned", QString::null ).toInt(); + int rowSpan = e.attributeNS( ooNS::table, "number-rows-spanned", TQString() ).toInt(); framesetElement.setAttribute("rows",rowSpan == 0 ? 1 : rowSpan); - int colSpan = e.attributeNS( ooNS::table, "number-columns-spanned", QString::null ).toInt(); + int colSpan = e.attributeNS( ooNS::table, "number-columns-spanned", TQString() ).toInt(); framesetElement.setAttribute("cols",colSpan == 0 ? 1 : colSpan); framesetElement.setAttribute("grpMgr",tableName); framesetsPluralElement.appendChild(framesetElement); - QDomElement frameElementOut(doc.createElement("FRAME")); + TQDomElement frameElementOut(doc.createElement("FRAME")); frameElementOut.setAttribute("left",columnLefts.at(column)); frameElementOut.setAttribute("right",columnLefts.at(column+1)); frameElementOut.setAttribute("top", 0); @@ -2368,22 +2368,22 @@ void OoWriterImport::parseInsideOfTable( QDomDocument &doc, const QDomElement& p } } -void OoWriterImport::appendBookmark( QDomDocument& doc, int paragId, int pos, const QString& name ) +void OoWriterImport::appendBookmark( TQDomDocument& doc, int paragId, int pos, const TQString& name ) { appendBookmark( doc, paragId, pos, paragId, pos, name ); } -void OoWriterImport::appendBookmark( QDomDocument& doc, int paragId, int pos, int endParagId, int endPos, const QString& name ) +void OoWriterImport::appendBookmark( TQDomDocument& doc, int paragId, int pos, int endParagId, int endPos, const TQString& name ) { Q_ASSERT( !m_currentFrameset.isNull() ); - const QString frameSetName = m_currentFrameset.attribute( "name" ); + const TQString frameSetName = m_currentFrameset.attribute( "name" ); Q_ASSERT( !frameSetName.isEmpty() ); - QDomElement bookmarks = doc.documentElement().namedItem( "BOOKMARKS" ).toElement(); + TQDomElement bookmarks = doc.documentElement().namedItem( "BOOKMARKS" ).toElement(); if ( bookmarks.isNull() ) { bookmarks = doc.createElement( "BOOKMARKS" ); doc.documentElement().appendChild( bookmarks ); } - QDomElement bkItem = doc.createElement( "BOOKMARKITEM" ); + TQDomElement bkItem = doc.createElement( "BOOKMARKITEM" ); bkItem.setAttribute( "name", name ); bkItem.setAttribute( "frameset", frameSetName ); bkItem.setAttribute( "startparag", paragId ); @@ -2394,13 +2394,13 @@ void OoWriterImport::appendBookmark( QDomDocument& doc, int paragId, int pos, in } // OOo SPEC: 3.6.1 p146 -void OoWriterImport::importFootnotesConfiguration( QDomDocument& doc, const QDomElement& elem, bool endnote ) +void OoWriterImport::importFootnotesConfiguration( TQDomDocument& doc, const TQDomElement& elem, bool endnote ) { - QDomElement docElement( doc.documentElement() ); + TQDomElement docElement( doc.documentElement() ); // can we really be called more than once? - QString elemName = endnote ? "ENDNOTESETTING" : "FOOTNOTESETTING"; + TQString elemName = endnote ? "ENDNOTESETTING" : "FOOTNOTESETTING"; Q_ASSERT( docElement.namedItem( elemName ).isNull() ); - QDomElement settings = doc.createElement( elemName ); + TQDomElement settings = doc.createElement( elemName ); docElement.appendChild( settings ); // BUG in OO (both 1.0.1 and 1.1). It saves it with an off-by-one (reported to xml@). @@ -2408,33 +2408,33 @@ void OoWriterImport::importFootnotesConfiguration( QDomDocument& doc, const QDom // let's ignore this for now. #if 0 if ( elem.hasAttributeNS( ooNS::text, "start-value" ) ) { - int startValue = elem.attributeNS( ooNS::text, "start-value", QString::null ).toInt(); + int startValue = elem.attributeNS( ooNS::text, "start-value", TQString() ).toInt(); settings.setAttribute( "start", startValue ); } #endif - settings.setAttribute( "type", Conversion::importCounterType( elem.attributeNS( ooNS::style, "num-format", QString::null ) ) ); - settings.setAttribute( "lefttext", elem.attributeNS( ooNS::style, "num-prefix", QString::null ) ); - settings.setAttribute( "righttext", elem.attributeNS( ooNS::style, "num-suffix", QString::null ) ); + settings.setAttribute( "type", Conversion::importCounterType( elem.attributeNS( ooNS::style, "num-format", TQString() ) ) ); + settings.setAttribute( "lefttext", elem.attributeNS( ooNS::style, "num-prefix", TQString() ) ); + settings.setAttribute( "righttext", elem.attributeNS( ooNS::style, "num-suffix", TQString() ) ); } -void OoWriterImport::appendTOC( QDomDocument& doc, const QDomElement& toc ) +void OoWriterImport::appendTOC( TQDomDocument& doc, const TQDomElement& toc ) { // table-of-content OOo SPEC 7.5 p452 //fillStyleStack( toc, ooNS::text, "style-name" ); that's the section style - //QDomElement tocSource = KoDom::namedItemNS( toc, ooNS::text, "table-of-content-source" ); + //TQDomElement tocSource = KoDom::namedItemNS( toc, ooNS::text, "table-of-content-source" ); // TODO parse templates and generate "Contents ..." styles from it - //for ( QDomNode n(tocSource.firstChild()); !text.isNull(); text = text.nextSibling() ) + //for ( TQDomNode n(tocSource.firstChild()); !text.isNull(); text = text.nextSibling() ) //{ //} - QDomElement tocIndexBody = KoDom::namedItemNS( toc, ooNS::text, "index-body" ); - QDomElement t; + TQDomElement tocIndexBody = KoDom::namedItemNS( toc, ooNS::text, "index-body" ); + TQDomElement t; forEachElement( t, tocIndexBody ) { m_styleStack.save(); - const QString localName = t.localName(); - QDomElement e; + const TQString localName = t.localName(); + TQDomElement e; bool isTextNS = e.namespaceURI() == ooNS::text; if ( isTextNS && localName == "index-title" ) { parseBodyOrSimilar( doc, t, m_currentFrameset ); // recurse again @@ -2454,10 +2454,10 @@ void OoWriterImport::appendTOC( QDomDocument& doc, const QDomElement& toc ) // TODO style:num-format, default number format for page styles, // used for page numbers (2.3.1) -void OoWriterImport::finishDocumentContent( QDomDocument& mainDocument ) +void OoWriterImport::finishDocumentContent( TQDomDocument& mainDocument ) { - QDomElement attributes = mainDocument.createElement( "ATTRIBUTES" ); - QDomElement docElement = mainDocument.documentElement(); + TQDomElement attributes = mainDocument.createElement( "ATTRIBUTES" ); + TQDomElement docElement = mainDocument.documentElement(); docElement.appendChild( attributes ); attributes.setAttribute( "hasTOC", m_hasTOC ? 1 : 0 ); attributes.setAttribute( "hasHeader", m_hasHeader ); @@ -2467,7 +2467,7 @@ void OoWriterImport::finishDocumentContent( QDomDocument& mainDocument ) // Done at the end: write the type of headers/footers, // depending on which kind of headers and footers we received. - QDomElement paperElement = docElement.namedItem("PAPER").toElement(); + TQDomElement paperElement = docElement.namedItem("PAPER").toElement(); Q_ASSERT ( !paperElement.isNull() ); // writePageLayout should have been called! if ( !paperElement.isNull() ) { @@ -2477,22 +2477,22 @@ void OoWriterImport::finishDocumentContent( QDomDocument& mainDocument ) } } -QString OoWriterImport::kWordStyleName( const QString& ooStyleName ) +TQString OoWriterImport::kWordStyleName( const TQString& ooStyleName ) { if ( ooStyleName.startsWith( "Contents " ) ) { - QString s( ooStyleName ); - return s.replace( 0, 9, QString("Contents Head ") ); // Awful hack for KWord's broken "update TOC" feature + TQString s( ooStyleName ); + return s.tqreplace( 0, 9, TQString("Contents Head ") ); // Awful hack for KWord's broken "update TOC" feature } else { return ooStyleName; } } // OOo SPEC: 2.3.3 p59 -void OoWriterImport::importHeaderFooter( QDomDocument& doc, const QDomElement& headerFooter, bool hasEvenOdd, QDomElement& style ) +void OoWriterImport::importHeaderFooter( TQDomDocument& doc, const TQDomElement& headerFooter, bool hasEvenOdd, TQDomElement& style ) { - const QString localName = headerFooter.localName(); - QDomElement framesetElement = doc.createElement("FRAMESET"); - QDomElement framesetsPluralElement (doc.documentElement().namedItem("FRAMESETS").toElement()); + const TQString localName = headerFooter.localName(); + TQDomElement framesetElement = doc.createElement("FRAMESET"); + TQDomElement framesetsPluralElement (doc.documentElement().namedItem("FRAMESETS").toElement()); framesetElement.setAttribute( "frameType", 1 /* text */); framesetElement.setAttribute( "frameInfo", Conversion::headerTypeToFrameInfo( localName, hasEvenOdd ) ); framesetElement.setAttribute( "name", Conversion::headerTypeToFramesetName( localName, hasEvenOdd ) ); @@ -2503,7 +2503,7 @@ void OoWriterImport::importHeaderFooter( QDomDocument& doc, const QDomElement& h m_hasHeader = true; else m_hasFooter = true; - QDomElement frameElementOut = createInitialFrame( framesetElement, 29, 798, isHeader?0:567, isHeader?41:567+41, true, Copy ); + TQDomElement frameElementOut = createInitialFrame( framesetElement, 29, 798, isHeader?0:567, isHeader?41:567+41, true, Copy ); if ( !style.isNull() ) m_styleStack.push( style ); importCommonFrameProperties( frameElementOut ); diff --git a/filters/kword/oowriter/oowriterimport.h b/filters/kword/oowriter/oowriterimport.h index b3949d67..1b646c2e 100644 --- a/filters/kword/oowriter/oowriterimport.h +++ b/filters/kword/oowriter/oowriterimport.h @@ -23,8 +23,8 @@ #include <KoFilter.h> -#include <qdict.h> -#include <qdom.h> +#include <tqdict.h> +#include <tqdom.h> #include <KoStyleStack.h> #include <liststylestack.h> @@ -33,94 +33,95 @@ class KZip; class OoWriterImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - OoWriterImport( KoFilter * parent, const char * name, const QStringList & ); + OoWriterImport( KoFilter * tqparent, const char * name, const TQStringList & ); virtual ~OoWriterImport(); - virtual KoFilter::ConversionStatus convert( QCString const & from, QCString const & to ); + virtual KoFilter::ConversiontqStatus convert( TQCString const & from, TQCString const & to ); private: - void prepareDocument( QDomDocument& mainDocument, QDomElement& framesetsElem ); - void finishDocumentContent( QDomDocument& mainDocument ); - void writePageLayout( QDomDocument& mainDocument, const QString& masterPageName ); - void parseList( QDomDocument& doc, const QDomElement& list, QDomElement& currentFramesetElement ); - bool pushListLevelStyle( const QString& listStyleName, int level ); - bool pushListLevelStyle( const QString& listStyleName, QDomElement& fullListStyle, int level ); - void applyListStyle( QDomDocument& doc, QDomElement& layoutElement, const QDomElement& paragraph ); - void writeCounter( QDomDocument& doc, QDomElement& layoutElement, bool heading, int level, bool ordered ); - QDomElement parseParagraph( QDomDocument& doc, const QDomElement& paragraph ); - void parseSpanOrSimilar( QDomDocument& doc, const QDomElement& parent, QDomElement& kwordParagraph, QDomElement& kwordFormats, QString& paragraphText, uint& pos); - // Reads from m_styleStack, writes the text properties to parentElement - void writeFormat( QDomDocument& doc, QDomElement& parentElement, int id, int pos, int length ); - // Reads from m_styleStack, writes the paragraph properties to layoutElement - void writeLayout( QDomDocument& doc, QDomElement& layoutElement ); + void prepareDocument( TQDomDocument& mainDocument, TQDomElement& framesetsElem ); + void finishDocumentContent( TQDomDocument& mainDocument ); + void writePageLayout( TQDomDocument& mainDocument, const TQString& masterPageName ); + void parseList( TQDomDocument& doc, const TQDomElement& list, TQDomElement& currentFramesetElement ); + bool pushListLevelStyle( const TQString& listStyleName, int level ); + bool pushListLevelStyle( const TQString& listStyleName, TQDomElement& fullListStyle, int level ); + void applyListStyle( TQDomDocument& doc, TQDomElement& tqlayoutElement, const TQDomElement& paragraph ); + void writeCounter( TQDomDocument& doc, TQDomElement& tqlayoutElement, bool heading, int level, bool ordered ); + TQDomElement parseParagraph( TQDomDocument& doc, const TQDomElement& paragraph ); + void parseSpanOrSimilar( TQDomDocument& doc, const TQDomElement& tqparent, TQDomElement& kwordParagraph, TQDomElement& kwordFormats, TQString& paragraphText, uint& pos); + // Reads from m_styleStack, writes the text properties to tqparentElement + void writeFormat( TQDomDocument& doc, TQDomElement& tqparentElement, int id, int pos, int length ); + // Reads from m_styleStack, writes the paragraph properties to tqlayoutElement + void writeLayout( TQDomDocument& doc, TQDomElement& tqlayoutElement ); enum NewFrameBehavior { Reconnect=0, NoFollowup=1, Copy=2 }; - QDomElement createInitialFrame( QDomElement& parentFramesetElem, double left, double right, double top, double bottom, bool autoExtend, NewFrameBehavior nfb ); - void createStyles( QDomDocument &doc ); - void createDocumentInfo( QDomDocument &docinfo ); - void createDocumentContent( QDomDocument &doccontent, QDomElement& mainFramesetElement ); - void parseBodyOrSimilar( QDomDocument &doc, const QDomElement& parent, QDomElement& currentFramesetElement ); - KoFilter::ConversionStatus loadAndParse(const QString& filename, QDomDocument& doc); - KoFilter::ConversionStatus openFile(); - bool createStyleMap( const QDomDocument & styles, QDomDocument& doc ); - void insertStyles( const QDomElement& element, QDomDocument& doc ); - void importDateTimeStyle( const QDomElement& parent ); - void fillStyleStack( const QDomElement& object, const char* nsURI, const QString& attrName ); - void addStyles( const QDomElement* style ); - void importFootnotesConfiguration( QDomDocument& doc, const QDomElement& elem, bool endnote ); - void importFootnote( QDomDocument& doc, const QDomElement& object, QDomElement& formats, uint pos, const QString& tagName ); - QString appendPicture( QDomDocument& doc, const QDomElement& object ); - QString appendTextBox( QDomDocument& doc, const QDomElement& object ); - void appendTOC( QDomDocument& doc, const QDomElement& toc ); - void importFrame( QDomElement& frameElementOut, const QDomElement& object, bool isText ); - void importCommonFrameProperties( QDomElement& frameElementOut ); - void importHeaderFooter( QDomDocument& doc, const QDomElement& headerFooter, bool isHeader, QDomElement& style ); - void anchorFrameset( QDomDocument& doc, QDomElement& formats, uint pos, const QString& frameName ); - void appendField(QDomDocument& doc, QDomElement& outputFormats, QDomElement& object, uint pos); - void appendKWordVariable(QDomDocument& doc, QDomElement& formats, const QDomElement& object, uint pos, - const QString& key, int type, QDomElement& child); - void appendBookmark( QDomDocument& doc, int paragId, int pos, const QString& name ); - void appendBookmark( QDomDocument& doc, int paragId, int pos, int endParagId, int endPos, const QString& name ); - void parseTable( QDomDocument &doc, const QDomElement& parent, QDomElement& currentFramesetElement ); - void parseInsideOfTable( QDomDocument &doc, const QDomElement& parent, QDomElement& currentFramesetElement, - const QString& tableName, const QMemArray<double> & columnLefts, uint& row, uint& column ); - static QString kWordStyleName( const QString& ooStyleName ); - - QDomDocument m_content; - QDomDocument m_meta; - QDomDocument m_settings; - QDomDocument m_stylesDoc; - - QDict<QDomElement> m_styles; - QDict<QDomElement> m_masterPages; - QDict<QDomElement> m_listStyles; + TQDomElement createInitialFrame( TQDomElement& tqparentFramesetElem, double left, double right, double top, double bottom, bool autoExtend, NewFrameBehavior nfb ); + void createStyles( TQDomDocument &doc ); + void createDocumentInfo( TQDomDocument &docinfo ); + void createDocumentContent( TQDomDocument &doccontent, TQDomElement& mainFramesetElement ); + void parseBodyOrSimilar( TQDomDocument &doc, const TQDomElement& tqparent, TQDomElement& currentFramesetElement ); + KoFilter::ConversiontqStatus loadAndParse(const TQString& filename, TQDomDocument& doc); + KoFilter::ConversiontqStatus openFile(); + bool createStyleMap( const TQDomDocument & styles, TQDomDocument& doc ); + void insertStyles( const TQDomElement& element, TQDomDocument& doc ); + void importDateTimeStyle( const TQDomElement& tqparent ); + void fillStyleStack( const TQDomElement& object, const char* nsURI, const TQString& attrName ); + void addStyles( const TQDomElement* style ); + void importFootnotesConfiguration( TQDomDocument& doc, const TQDomElement& elem, bool endnote ); + void importFootnote( TQDomDocument& doc, const TQDomElement& object, TQDomElement& formats, uint pos, const TQString& tagName ); + TQString appendPicture( TQDomDocument& doc, const TQDomElement& object ); + TQString appendTextBox( TQDomDocument& doc, const TQDomElement& object ); + void appendTOC( TQDomDocument& doc, const TQDomElement& toc ); + void importFrame( TQDomElement& frameElementOut, const TQDomElement& object, bool isText ); + void importCommonFrameProperties( TQDomElement& frameElementOut ); + void importHeaderFooter( TQDomDocument& doc, const TQDomElement& headerFooter, bool isHeader, TQDomElement& style ); + void anchorFrameset( TQDomDocument& doc, TQDomElement& formats, uint pos, const TQString& frameName ); + void appendField(TQDomDocument& doc, TQDomElement& outputFormats, TQDomElement& object, uint pos); + void appendKWordVariable(TQDomDocument& doc, TQDomElement& formats, const TQDomElement& object, uint pos, + const TQString& key, int type, TQDomElement& child); + void appendBookmark( TQDomDocument& doc, int paragId, int pos, const TQString& name ); + void appendBookmark( TQDomDocument& doc, int paragId, int pos, int endParagId, int endPos, const TQString& name ); + void parseTable( TQDomDocument &doc, const TQDomElement& tqparent, TQDomElement& currentFramesetElement ); + void parseInsideOfTable( TQDomDocument &doc, const TQDomElement& tqparent, TQDomElement& currentFramesetElement, + const TQString& tableName, const TQMemArray<double> & columnLefts, uint& row, uint& column ); + static TQString kWordStyleName( const TQString& ooStyleName ); + + TQDomDocument m_content; + TQDomDocument m_meta; + TQDomDocument m_settings; + TQDomDocument m_stylesDoc; + + TQDict<TQDomElement> m_styles; + TQDict<TQDomElement> m_masterPages; + TQDict<TQDomElement> m_listStyles; KoStyleStack m_styleStack; - QDomElement m_defaultStyle; + TQDomElement m_defaultStyle; ListStyleStack m_listStyleStack; - QDomElement m_outlineStyle; + TQDomElement m_outlineStyle; bool m_insideOrderedList; bool m_nextItemIsListItem; // only the first elem inside list-item is numbered bool m_hasTOC; bool m_hasHeader; bool m_hasFooter; int m_restartNumbering; - QString m_currentListStyleName; - QString m_currentMasterPage; - QDomElement m_currentFrameset; // set by parseBodyOrSimilar + TQString m_currentListStyleName; + TQString m_currentMasterPage; + TQDomElement m_currentFrameset; // set by parseBodyOrSimilar struct BookmarkStart { - BookmarkStart() {} // for stupid QValueList - BookmarkStart( const QString&s, int par, int ind ) + BookmarkStart() {} // for stupid TQValueList + BookmarkStart( const TQString&s, int par, int ind ) : frameSetName( s ), paragId( par ), pos( ind ) {} - QString frameSetName; + TQString frameSetName; int paragId; int pos; }; - typedef QMap<QString, BookmarkStart> BookmarkStartsMap; + typedef TQMap<TQString, BookmarkStart> BookmarkStartsMap; BookmarkStartsMap m_bookmarkStarts; - typedef QMap<QString, QString> DataFormatsMap; + typedef TQMap<TQString, TQString> DataFormatsMap; DataFormatsMap m_dateTimeFormats; // maybe generalize to include number formats. uint m_pictureNumber; // Number of the picture (increment *before* use) diff --git a/filters/kword/palmdoc/palmdb.cpp b/filters/kword/palmdoc/palmdb.cpp index 0a1aac4a..65a83518 100644 --- a/filters/kword/palmdoc/palmdb.cpp +++ b/filters/kword/palmdoc/palmdb.cpp @@ -18,19 +18,19 @@ */ /* - The database layout for PalmDB files is described in + The database tqlayout for PalmDB files is described in http://www.palmos.com/dev/support/docs/protein_books/FileFormats/Intro.html */ #include "palmdb.h" -#include <qcstring.h> -#include <qdatastream.h> -#include <qdatetime.h> -#include <qfile.h> -#include <qmemarray.h> -#include <qptrlist.h> -#include <qstring.h> +#include <tqcstring.h> +#include <tqdatastream.h> +#include <tqdatetime.h> +#include <tqfile.h> +#include <tqmemarray.h> +#include <tqptrlist.h> +#include <tqstring.h> PalmDB::PalmDB() { @@ -38,11 +38,11 @@ PalmDB::PalmDB() setName( "Unnamed" ); setAttributes( 0 ); setVersion( 0 ); - setCreationDate( QDateTime::currentDateTime() ); - setModificationDate( QDateTime::currentDateTime() ); - setLastBackupDate( QDateTime::currentDateTime() ); - setType( QString::null ); - setCreator( QString::null ); + setCreationDate( TQDateTime::tqcurrentDateTime() ); + setModificationDate( TQDateTime::tqcurrentDateTime() ); + setLastBackupDate( TQDateTime::tqcurrentDateTime() ); + setType( TQString() ); + setCreator( TQString() ); // crash if autodelete ? records.setAutoDelete( TRUE ); @@ -56,80 +56,80 @@ PalmDB::~PalmDB() bool PalmDB::load( const char* filename ) { // open input file - QFile in (filename); + TQFile in (filename); if (!in.open (IO_ReadOnly)) return FALSE; - QDataStream stream; + TQDataStream stream; stream.setDevice (&in); unsigned filesize = stream.device()->size(); if( filesize < 72 ) return FALSE; // always big-endian - stream.setByteOrder (QDataStream::BigEndian); + stream.setByteOrder (TQDataStream::BigEndian); // now start to read PDB header (72 bytes) // read and encode database name // The name field is 32 bytes long, and is NUL terminated. - // Use the length parameter of fromLatin1() anyway. - Q_UINT8 name[32]; + // Use the length parameter of tqfromLatin1() anyway. + TQ_UINT8 name[32]; for(int k = 0; k < 32; k++) stream >> name[k]; - m_name = QString::fromLatin1( (char*) name, 31 ); + m_name = TQString::tqfromLatin1( (char*) name, 31 ); // read database attribute - Q_UINT16 attr; + TQ_UINT16 attr; stream >> attr; m_attributes = attr; // read database version (app-specific) - Q_UINT16 ver; + TQ_UINT16 ver; stream >> ver; m_version = ver; // NOTE: PDB specifies date as number of seconds since 1 Jan 1904 - // QDateTime::setTime_t expects number of seconds since 1 Jan 1970 + // TQDateTime::setTime_t expects number of seconds since 1 Jan 1970 // so, we make adjustment with a constant offset of 2082844800 const int adjust = 2082844800; // read creation date - Q_UINT32 creation; + TQ_UINT32 creation; stream >> creation; m_creationDate.setTime_t( creation - adjust ); // read modification date - Q_UINT32 modification; + TQ_UINT32 modification; stream >> modification; m_modificationDate.setTime_t( modification - adjust ); // read last backup date - Q_UINT32 lastbackup; + TQ_UINT32 lastbackup; stream >> lastbackup; m_lastBackupDate.setTime_t( lastbackup - adjust ); // read modification number - Q_UINT32 modnum; + TQ_UINT32 modnum; stream >> modnum; // read app info id and sort info id - Q_UINT32 appid, sortid; + TQ_UINT32 appid, sortid; stream >> appid; stream >> sortid; // read and encode database type - Q_UINT8 dbt[4]; + TQ_UINT8 dbt[4]; stream >> dbt[0] >> dbt[1] >> dbt[2] >> dbt[3]; - m_type = QString::fromLatin1( (char*) dbt, 4 ); + m_type = TQString::tqfromLatin1( (char*) dbt, 4 ); // read and encode database creator - Q_UINT8 dbc[4]; + TQ_UINT8 dbc[4]; stream >> dbc[0] >> dbc[1] >> dbc[2] >> dbc[3]; - m_creator = QString::fromLatin1( (char*) dbc, 4 ); + m_creator = TQString::tqfromLatin1( (char*) dbc, 4 ); // read unique id seed - Q_UINT32 idseed; + TQ_UINT32 idseed; stream >> idseed; m_uniqueIDSeed = idseed; @@ -137,23 +137,23 @@ bool PalmDB::load( const char* filename ) // next record list // FIXME what to do with this ? - Q_UINT32 nextlist; + TQ_UINT32 nextlist; stream >> nextlist; // number of records - Q_UINT16 numrec; + TQ_UINT16 numrec; stream >> numrec; // read entries in record list // find out location and size of each record - QMemArray<unsigned> recpos( numrec ); - QMemArray<int> recsize( numrec ); + TQMemArray<unsigned> recpos( numrec ); + TQMemArray<int> recsize( numrec ); // FIXME any other better way to find record size ? for( int r = 0; r < numrec; r++ ) { - Q_UINT32 pos; - Q_UINT8 flag, dummy; + TQ_UINT32 pos; + TQ_UINT8 flag, dummy; stream >> pos >> flag >> dummy >> dummy >> dummy; recpos[r] = pos; recsize[r] = filesize - pos; if( r> 0 ) recsize[r-1] = pos - recpos[r-1]; // fixup @@ -178,15 +178,15 @@ bool PalmDB::load( const char* filename ) records.clear(); for( int r = 0; r < numrec; r++ ) { - QByteArray* data = new QByteArray; + TQByteArray* data = new TQByteArray; if( recpos[r] < filesize ) if( recsize[r] >= 0 ) { data->resize( recsize[r] ); - stream.device()->at( recpos[r] ); + stream.tqdevice()->at( recpos[r] ); for( int q = 0; q < recsize[r]; q++ ) - { Q_UINT8 c; stream >> c; data->at(q) = c; } + { TQ_UINT8 c; stream >> c; data->tqat(q) = c; } } records.append( data ); } @@ -200,15 +200,15 @@ bool PalmDB::load( const char* filename ) bool PalmDB::save( const char* filename ) { // open output file - QFile out( filename ); + TQFile out( filename ); if( !out.open( IO_WriteOnly ) ) return FALSE; - QDataStream stream; + TQDataStream stream; stream.setDevice( &out ); // always big-endian - stream.setByteOrder (QDataStream::BigEndian); + stream.setByteOrder (TQDataStream::BigEndian); // now write PDB header (72 bytes) @@ -217,85 +217,85 @@ bool PalmDB::save( const char* filename ) const char *dbname = m_name.latin1(); for( unsigned k=0; k<31; k++ ) { - Q_UINT8 c = (k<m_name.length()) ? dbname[k] : 0; + TQ_UINT8 c = (k<m_name.length()) ? dbname[k] : 0; stream << c; } { // NUL-terminate the database name - Q_UINT8 c = 0; + TQ_UINT8 c = 0; stream << c; } // write database attribute - Q_UINT16 attr = m_attributes; + TQ_UINT16 attr = m_attributes; stream << attr; // write database version (app-specific) - Q_UINT16 ver = m_version; + TQ_UINT16 ver = m_version; stream << ver; // reference date is 1 Jan 1904 // see also note in function load() above - QDateTime ref = QDate( 1904, 1, 1 ); + TQDateTime ref = TQDate( 1904, 1, 1 ); // write creation date - Q_UINT32 creation = -m_creationDate.secsTo( ref ); + TQ_UINT32 creation = -m_creationDate.secsTo( ref ); stream << creation; // write modification date - Q_UINT32 modification = -m_modificationDate.secsTo( ref ); + TQ_UINT32 modification = -m_modificationDate.secsTo( ref ); stream << modification; // write last backup date - Q_UINT32 lastbackup = -m_lastBackupDate.secsTo( ref ); + TQ_UINT32 lastbackup = -m_lastBackupDate.secsTo( ref ); stream << lastbackup; // write modification number - Q_UINT32 modnum = 0; + TQ_UINT32 modnum = 0; stream << modnum; // write app info id and sort info id - Q_UINT32 appid = 0, sortid = 0; + TQ_UINT32 appid = 0, sortid = 0; stream << appid; stream << sortid; // write and encode database type - Q_UINT8 dbt[4]; + TQ_UINT8 dbt[4]; const char *dbtype = m_type.latin1(); for( int p=0; p<4; p++ ) dbt[p]=dbtype[p]; stream << dbt[0] << dbt[1] << dbt[2] << dbt[3]; // write and encode database creator - Q_UINT8 dbc[4]; + TQ_UINT8 dbc[4]; const char *dbcreator = m_creator.latin1(); for( int p=0; p<4; p++ ) dbc[p]=dbcreator[p]; stream << dbc[0] << dbc[1] << dbc[2] << dbc[3]; // write unique id seed - Q_UINT32 idseed = 0; + TQ_UINT32 idseed = 0; stream << idseed; // now start to read PDB record list (variable-length) // next record list - Q_UINT32 nextlist = 0; + TQ_UINT32 nextlist = 0; stream << nextlist; // number of records - Q_UINT16 numrec = records.count(); + TQ_UINT16 numrec = records.count(); stream << numrec; // where is the first record ? // 78 is size of PDB header, 2 is filler before data - Q_UINT32 pos = 78 + 2; + TQ_UINT32 pos = 78 + 2; pos += records.count()*8; // write record list for( unsigned r = 0; r < records.count(); r++ ) { - Q_UINT8 flag = 0, dummy = 0; + TQ_UINT8 flag = 0, dummy = 0; stream << pos; stream << flag; stream << dummy << dummy << dummy; @@ -303,17 +303,17 @@ bool PalmDB::save( const char* filename ) } // write 2-byte dummy - Q_UINT16 filler = 0; + TQ_UINT16 filler = 0; stream << filler; // write all records for( unsigned r = 0; r < records.count(); r++ ) { - QByteArray *data = records.at( r ); + TQByteArray *data = records.at( r ); if( !data ) continue; for( unsigned j=0; j<data->count(); j++ ) { - Q_UINT8 c = data->at( j ); + TQ_UINT8 c = data->at( j ); stream << c; } } @@ -324,7 +324,7 @@ bool PalmDB::save( const char* filename ) return TRUE; } -void PalmDB::setType( const QString& t ) +void PalmDB::setType( const TQString& t ) { m_type = t; if( m_type.length() > 4 ) @@ -334,7 +334,7 @@ void PalmDB::setType( const QString& t ) } -void PalmDB::setCreator( const QString& c ) +void PalmDB::setCreator( const TQString& c ) { m_creator = c; if( m_creator.length() > 4 ) diff --git a/filters/kword/palmdoc/palmdb.h b/filters/kword/palmdoc/palmdb.h index c98255f0..709df734 100644 --- a/filters/kword/palmdoc/palmdb.h +++ b/filters/kword/palmdoc/palmdb.h @@ -20,10 +20,10 @@ #ifndef __PALMDB_H #define __PALMDB_H -#include <qcstring.h> -#include <qdatetime.h> -#include <qptrlist.h> -#include <qstring.h> +#include <tqcstring.h> +#include <tqdatetime.h> +#include <tqptrlist.h> +#include <tqstring.h> class PalmDB { @@ -35,8 +35,8 @@ class PalmDB virtual bool load( const char* filename ); virtual bool save( const char* filename ); - QString name(){ return m_name; } - void setName( const QString& n ){ m_name = n; } + TQString name(){ return m_name; } + void setName( const TQString& n ){ m_name = n; } int attributes(){ return m_attributes; } void setAttributes( int a ){ m_attributes = a; } @@ -44,35 +44,35 @@ class PalmDB int version(){ return m_version; } void setVersion( int v ){ m_version = v; } - QDateTime creationDate(){ return m_creationDate; } - void setCreationDate( QDateTime d ){ m_creationDate = d; } + TQDateTime creationDate(){ return m_creationDate; } + void setCreationDate( TQDateTime d ){ m_creationDate = d; } - QDateTime modificationDate(){ return m_modificationDate; } - void setModificationDate( QDateTime d ){ m_modificationDate = d; } + TQDateTime modificationDate(){ return m_modificationDate; } + void setModificationDate( TQDateTime d ){ m_modificationDate = d; } - QDateTime lastBackupDate(){ return m_lastBackupDate; } - void setLastBackupDate( QDateTime d ){ m_lastBackupDate = d; } + TQDateTime lastBackupDate(){ return m_lastBackupDate; } + void setLastBackupDate( TQDateTime d ){ m_lastBackupDate = d; } - QString type(){ return m_type; } - QString creator(){ return m_creator; } + TQString type(){ return m_type; } + TQString creator(){ return m_creator; } - void setType( const QString& t ); - void setCreator( const QString& c ); + void setType( const TQString& t ); + void setCreator( const TQString& c ); int uniqueIDSeed(){ return m_uniqueIDSeed; } void setUniqueIDSeed( int i ){ m_uniqueIDSeed= i; } - QPtrList<QByteArray> records; + TQPtrList<TQByteArray> records; private: - QString m_name; + TQString m_name; int m_attributes, m_version; - QDateTime m_creationDate; - QDateTime m_modificationDate; - QDateTime m_lastBackupDate; - QString m_type; - QString m_creator; + TQDateTime m_creationDate; + TQDateTime m_modificationDate; + TQDateTime m_lastBackupDate; + TQString m_type; + TQString m_creator; int m_uniqueIDSeed; }; diff --git a/filters/kword/palmdoc/palmdoc.cpp b/filters/kword/palmdoc/palmdoc.cpp index 2f5bfd76..791fa356 100644 --- a/filters/kword/palmdoc/palmdoc.cpp +++ b/filters/kword/palmdoc/palmdoc.cpp @@ -19,15 +19,15 @@ #include "palmdoc.h" -#include <qcstring.h> -#include <qdatetime.h> -#include <qptrlist.h> -#include <qstring.h> +#include <tqcstring.h> +#include <tqdatetime.h> +#include <tqptrlist.h> +#include <tqstring.h> PalmDoc::PalmDoc(): PalmDB() { m_result = PalmDoc::OK; - setText( QString::null ); + setText( TQString() ); } PalmDoc::~PalmDoc() @@ -70,7 +70,7 @@ bool PalmDoc::load( const char* filename ) // the very first record is DOC header // NOTE: this is not PDB header (which is handled in PalmDB) ! - QByteArray header( *records.at( 0 ) ); + TQByteArray header( *records.at( 0 ) ); // format of the DOC int format = (header[0]<<8) + header[1]; @@ -86,14 +86,14 @@ bool PalmDoc::load( const char* filename ) } // initialize - setText( QString::null ); + setText( TQString() ); // assemble the records - QByteArray rec; + TQByteArray rec; unsigned i = 0; for( unsigned r = 1; r < records.count(); r++ ) { - QByteArray *p = records.at( r ); + TQByteArray *p = records.at( r ); if( !p ) continue; rec.resize( rec.size() + p->size() ); for( unsigned s=0; s<p->size(); s++ ) @@ -106,7 +106,7 @@ bool PalmDoc::load( const char* filename ) // if the text is not compressed, simply append as string if( format == 1 ) - setText( QString::fromLatin1( rec.data(),rec.count() ) ); + setText( TQString::tqfromLatin1( rec.data(),rec.count() ) ); // done m_result = OK; @@ -120,19 +120,19 @@ bool PalmDoc::save( const char* filename ) setCreator( "REAd" ); // "touch" the database :-) - setModificationDate( QDateTime::currentDateTime() ); + setModificationDate( TQDateTime::tqcurrentDateTime() ); // Palm record size is always 4 KB unsigned recsize = 4096; // compress the text - QByteArray data = compress( text() ); + TQByteArray data = compress( text() ); // prepare the records records.clear(); for( unsigned i=0; i<data.count(); ) { - QByteArray* ptr = new QByteArray; + TQByteArray* ptr = new TQByteArray; unsigned rs = data.count() - i; if( rs > recsize ) rs = recsize; ptr->resize( rs ); @@ -142,7 +142,7 @@ bool PalmDoc::save( const char* filename ) } // prepare the header - QByteArray header( 16 ); + TQByteArray header( 16 ); int docsize = m_text.length(); header[0] = 0; header[1] = 2; // 1=plain, 2=compressed header[2] = header[3] = 0; // reserved word, set to 0 @@ -158,7 +158,7 @@ bool PalmDoc::save( const char* filename ) header[14] = header[15] = 0; // header should be the very first record - records.prepend( new QByteArray( header ) ); + records.prepend( new TQByteArray( header ) ); // write to file bool ok = PalmDB::save( filename ); @@ -174,9 +174,9 @@ bool PalmDoc::save( const char* filename ) } // TODO describe in brief about compression algorithm -QByteArray PalmDoc::compress( const QString& text ) +TQByteArray PalmDoc::compress( const TQString& text ) { - QByteArray result; + TQByteArray result; unsigned textlen = text.length(); const char *ctext = text.latin1(); unsigned int i, j; @@ -247,9 +247,9 @@ QByteArray PalmDoc::compress( const QString& text ) #define INRANGE(v,p,q) ((v)>=(p))&&((v)<=(q)) // TODO describe in brief about decompression algorithm -QString PalmDoc::uncompress( QByteArray rec ) +TQString PalmDoc::uncompress( TQByteArray rec ) { - QString result; + TQString result; for( unsigned i = 0; i < rec.size(); i++ ) { diff --git a/filters/kword/palmdoc/palmdoc.h b/filters/kword/palmdoc/palmdoc.h index 43a358e2..6a1203f2 100644 --- a/filters/kword/palmdoc/palmdoc.h +++ b/filters/kword/palmdoc/palmdoc.h @@ -21,7 +21,7 @@ #define __PALMDOC_H #include "palmdb.h" -#include <qstring.h> +#include <tqstring.h> class PalmDoc: public PalmDB { @@ -35,18 +35,18 @@ class PalmDoc: public PalmDB int result(){ return m_result; } - QString text(){ return m_text; } - void setText( const QString& t){ m_text = t; } + TQString text(){ return m_text; } + void setText( const TQString& t){ m_text = t; } enum { OK, ReadError, InvalidFormat, WriteError }; private: int m_result; - QString m_text; + TQString m_text; - QByteArray compress( const QString& text ); - QString uncompress( QByteArray rec ); + TQByteArray compress( const TQString& text ); + TQString uncompress( TQByteArray rec ); }; #endif diff --git a/filters/kword/palmdoc/palmdocexport.cc b/filters/kword/palmdoc/palmdocexport.cc index 1760a0be..5e18ff6f 100644 --- a/filters/kword/palmdoc/palmdocexport.cc +++ b/filters/kword/palmdoc/palmdocexport.cc @@ -23,9 +23,9 @@ #include <unistd.h> #endif -#include <qfile.h> -#include <qfileinfo.h> -#include <qtextstream.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqtextstream.h> #include <kdebug.h> #include <KoFilterChain.h> @@ -48,20 +48,20 @@ public: PalmDocWorker(void) { } virtual ~PalmDocWorker(void) { } public: - virtual bool doOpenFile(const QString& filenameOut, const QString& to); + virtual bool doOpenFile(const TQString& filenameOut, const TQString& to); virtual bool doCloseFile(void); virtual bool doOpenDocument(void); virtual bool doCloseDocument(void); virtual bool doFullDocumentInfo(const KWEFDocumentInfo& docInfo); - virtual bool doFullParagraph(const QString& paraText, const LayoutData& layout, + virtual bool doFullParagraph(const TQString& paraText, const LayoutData& tqlayout, const ValueListFormatData& paraFormatDataList); private: - QString title; - QString outfile; - QString text; + TQString title; + TQString outfile; + TQString text; }; -bool PalmDocWorker::doOpenFile(const QString& filenameOut, const QString& /*to*/) +bool PalmDocWorker::doOpenFile(const TQString& filenameOut, const TQString& /*to*/) { outfile = filenameOut; return TRUE; @@ -71,7 +71,7 @@ bool PalmDocWorker::doCloseFile(void) { if( title.isEmpty() ) { - QFileInfo info( outfile ); + TQFileInfo info( outfile ); title = info.baseName(); } @@ -85,7 +85,7 @@ bool PalmDocWorker::doCloseFile(void) bool PalmDocWorker::doOpenDocument(void) { - text = QString::null; + text = TQString(); return TRUE; } @@ -100,8 +100,8 @@ bool PalmDocWorker::doFullDocumentInfo( const KWEFDocumentInfo& docInfo ) return TRUE; } -bool PalmDocWorker::doFullParagraph(const QString& paraText, - const LayoutData& /*layout*/, const ValueListFormatData& /*paraFormatDataList*/) +bool PalmDocWorker::doFullParagraph(const TQString& paraText, + const LayoutData& /*tqlayout*/, const ValueListFormatData& /*paraFormatDataList*/) { kdDebug(30525) << "Entering ::doFullParagraph" << endl; text.append( paraText ); @@ -110,13 +110,13 @@ bool PalmDocWorker::doFullParagraph(const QString& paraText, return TRUE; } -PalmDocExport::PalmDocExport( KoFilter *, const char *, const QStringList& ): +PalmDocExport::PalmDocExport( KoFilter *, const char *, const TQStringList& ): KoFilter() { } -KoFilter::ConversionStatus PalmDocExport::convert( const QCString& from, - const QCString& to ) +KoFilter::ConversiontqStatus PalmDocExport::convert( const TQCString& from, + const TQCString& to ) { // check for proper conversion if( to!= "application/vnd.palm" || from != "application/x-kword" ) @@ -125,7 +125,7 @@ KoFilter::ConversionStatus PalmDocExport::convert( const QCString& from, PalmDocWorker* worker = new PalmDocWorker(); KWEFKWordLeader* leader = new KWEFKWordLeader( worker ); - KoFilter::ConversionStatus result; + KoFilter::ConversiontqStatus result; result = leader->convert( m_chain, from, to ); delete worker; diff --git a/filters/kword/palmdoc/palmdocexport.h b/filters/kword/palmdoc/palmdocexport.h index 5d8559ef..f63bed73 100644 --- a/filters/kword/palmdoc/palmdocexport.h +++ b/filters/kword/palmdoc/palmdocexport.h @@ -26,15 +26,16 @@ class PalmDocExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - PalmDocExport(KoFilter *parent, const char *name, const QStringList&); + PalmDocExport(KoFilter *tqparent, const char *name, const TQStringList&); PalmDocExport(); virtual ~PalmDocExport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; #endif // __PALMDOCEXPORT_H diff --git a/filters/kword/palmdoc/palmdocimport.cc b/filters/kword/palmdoc/palmdocimport.cc index 3f0047cc..f659cad0 100644 --- a/filters/kword/palmdoc/palmdocimport.cc +++ b/filters/kword/palmdoc/palmdocimport.cc @@ -23,9 +23,9 @@ #include <unistd.h> #endif -#include <qfileinfo.h> -#include <qstringlist.h> -#include <qfont.h> +#include <tqfileinfo.h> +#include <tqstringlist.h> +#include <tqfont.h> #include <kdebug.h> #include <KoFilterChain.h> @@ -41,19 +41,19 @@ typedef KGenericFactory<PalmDocImport, KoFilter> PalmDocImportFactory; K_EXPORT_COMPONENT_FACTORY( libpalmdocimport, PalmDocImportFactory( "kofficefilters" ) ) -PalmDocImport::PalmDocImport( KoFilter *, const char *, const QStringList& ): +PalmDocImport::PalmDocImport( KoFilter *, const char *, const TQStringList& ): KoFilter() { } -KoFilter::ConversionStatus PalmDocImport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus PalmDocImport::convert( const TQCString& from, const TQCString& to ) { // check for proper conversion if( to!= "application/x-kword" || from != "application/vnd.palm" ) return KoFilter::NotImplemented; PalmDoc doc; - QString inputFile( m_chain->inputFile() ); + TQString inputFile( m_chain->inputFile() ); doc.load( inputFile.latin1() ); if( doc.result() == PalmDoc::InvalidFormat ) @@ -61,32 +61,32 @@ KoFilter::ConversionStatus PalmDocImport::convert( const QCString& from, const Q if( doc.result() == PalmDoc::ReadError ) return KoFilter::FileNotFound; - QString root = processPlainDocument( doc.text() ); + TQString root = processPlainDocument( doc.text() ); // prepare storage KoStoreDevice *out=m_chain->storageFile( "root", KoStore::Write ); if( out ) { - QCString cstring = root.utf8(); + TQCString cstring = root.utf8(); cstring.prepend( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" ); out->writeBlock( (const char*) cstring, cstring.length() ); } - QString docTitle = doc.name(); + TQString docTitle = doc.name(); if( docTitle.isEmpty() ) { - QFileInfo info( inputFile ); + TQFileInfo info( inputFile ); docTitle = info.baseName(); } - QString documentInfo = processDocumentInfo( docTitle ); + TQString documentInfo = processDocumentInfo( docTitle ); // store document info out = m_chain->storageFile( "documentinfo.xml", KoStore::Write ); if( out ) { - QCString cstring = documentInfo.utf8(); + TQCString cstring = documentInfo.utf8(); cstring.prepend( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" ); out->writeBlock( (const char*) cstring, cstring.length() ); } @@ -94,50 +94,50 @@ KoFilter::ConversionStatus PalmDocImport::convert( const QCString& from, const Q return KoFilter::OK; } -QString PalmDocImport::processPlainParagraph( QString text ) +TQString PalmDocImport::processPlainParagraph( TQString text ) { - QString formats, layout, result; + TQString formats, tqlayout, result; // specify FORMAT (just empty element) formats.append ( " <FORMAT id=\"1\" pos=\"0\" len=\"" + - QString::number( text.length() )+ "\">\n" ); + TQString::number( text.length() )+ "\">\n" ); formats.append ( " </FORMAT>\n" ); - QFont font = KoGlobal::defaultFont(); - QString fontFamily = font.family(); + TQFont font = KoGlobal::defaultFont(); + TQString fontFamily = font.family(); double fontSize = font.pointSizeFloat(); // default LAYOUT - layout.append( "<LAYOUT>\n" ); - layout.append( " <NAME value=\"Standard\" />\n" ); - layout.append( " <FLOW align=\"left\" />\n" ); - layout.append( " <LINESPACING value=\"0\" />\n" ); - layout.append( " <LEFTBORDER width=\"0\" style=\"0\" />\n" ); - layout.append( " <RIGHTBORDER width=\"0\" style=\"0\" />\n" ); - layout.append( " <TOPBORDER width=\"0\" style=\"0\" />\n" ); - layout.append( " <BOTTOMBORDER width=\"0\" style=\"0\" />\n" ); - layout.append( " <INDENTS />\n" ); - layout.append( " <OFFSETS after=\"9\" />\n" ); - layout.append( " <PAGEBREAKING />\n" ); - layout.append( " <COUNTER />\n" ); - layout.append( " <FORMAT id=\"1\">\n" ); - layout.append( " <SIZE value=\"" + QString::number( fontSize ) + "\" />\n" ); - layout.append( " <WEIGHT value=\"50\" />\n" ); - layout.append( " <ITALIC value=\"0\" />\n" ); - layout.append( " <UNDERLINE value=\"0\" />\n" ); - layout.append( " <STRIKEOUT value=\"0\" />\n" ); - layout.append( " <CHARSET value=\"0\" />\n" ); - layout.append( " <VERTALIGN value=\"0\" />\n" ); - layout.append( " <FONT name=\"" + fontFamily + "\" />\n" ); - layout.append( " </FORMAT>\n" ); - layout.append( "</LAYOUT>\n" ); + tqlayout.append( "<LAYOUT>\n" ); + tqlayout.append( " <NAME value=\"Standard\" />\n" ); + tqlayout.append( " <FLOW align=\"left\" />\n" ); + tqlayout.append( " <LINESPACING value=\"0\" />\n" ); + tqlayout.append( " <LEFTBORDER width=\"0\" style=\"0\" />\n" ); + tqlayout.append( " <RIGHTBORDER width=\"0\" style=\"0\" />\n" ); + tqlayout.append( " <TOPBORDER width=\"0\" style=\"0\" />\n" ); + tqlayout.append( " <BOTTOMBORDER width=\"0\" style=\"0\" />\n" ); + tqlayout.append( " <INDENTS />\n" ); + tqlayout.append( " <OFFSETS after=\"9\" />\n" ); + tqlayout.append( " <PAGEBREAKING />\n" ); + tqlayout.append( " <COUNTER />\n" ); + tqlayout.append( " <FORMAT id=\"1\">\n" ); + tqlayout.append( " <SIZE value=\"" + TQString::number( fontSize ) + "\" />\n" ); + tqlayout.append( " <WEIGHT value=\"50\" />\n" ); + tqlayout.append( " <ITALIC value=\"0\" />\n" ); + tqlayout.append( " <UNDERLINE value=\"0\" />\n" ); + tqlayout.append( " <STRIKEOUT value=\"0\" />\n" ); + tqlayout.append( " <CHARSET value=\"0\" />\n" ); + tqlayout.append( " <VERTALIGN value=\"0\" />\n" ); + tqlayout.append( " <FONT name=\"" + fontFamily + "\" />\n" ); + tqlayout.append( " </FORMAT>\n" ); + tqlayout.append( "</LAYOUT>\n" ); // encode text for XML-ness - text.replace( '&', "&" ); - text.replace( '<', "<" ); - text.replace( '>', ">" ); - text.replace( '"', """ ); - text.replace( '\'', "'" ); + text.tqreplace( '&', "&" ); + text.tqreplace( '<', "<" ); + text.tqreplace( '>', ">" ); + text.tqreplace( '"', """ ); + text.tqreplace( '\'', "'" ); // construct the <PARAGRAPH> result.append( "<PARAGRAPH>\n" ); @@ -145,22 +145,22 @@ QString PalmDocImport::processPlainParagraph( QString text ) result.append( "<FORMATS>\n"); result.append( formats ); result.append( "</FORMATS>\n"); - result.append( layout ); + result.append( tqlayout ); result.append( "</PARAGRAPH>\n" ); return result; } -QString PalmDocImport::processPlainDocument( QString plaindoc ) +TQString PalmDocImport::processPlainDocument( TQString plaindoc ) { - QString prolog, content, epilog; - QStringList paragraphs; + TQString prolog, content, epilog; + TQStringList paragraphs; - paragraphs = QStringList::split( "\n\n", plaindoc, TRUE ); + paragraphs = TQStringList::split( "\n\n", plaindoc, TRUE ); for( unsigned int i = 0; i < paragraphs.count(); i++ ) { - QString text = paragraphs[i]; - text.replace( '\n', ' ' ); + TQString text = paragraphs[i]; + text.tqreplace( '\n', ' ' ); content.append( processPlainParagraph( text ) ); } @@ -184,9 +184,9 @@ QString PalmDocImport::processPlainDocument( QString plaindoc ) return prolog + content + epilog; } -QString PalmDocImport::processDocumentInfo( const QString &title ) +TQString PalmDocImport::processDocumentInfo( const TQString &title ) { - QString documentInfo; + TQString documentInfo; documentInfo = "<!DOCTYPE document-info>\n"; diff --git a/filters/kword/palmdoc/palmdocimport.h b/filters/kword/palmdoc/palmdocimport.h index 872e86a1..0f934933 100644 --- a/filters/kword/palmdoc/palmdocimport.h +++ b/filters/kword/palmdoc/palmdocimport.h @@ -20,7 +20,7 @@ #ifndef __PALMDOCIMPORT_H #define __PALMDOCIMPORT_H -#include <qstring.h> +#include <tqstring.h> #include <KoFilter.h> #include <KoStore.h> @@ -28,21 +28,22 @@ class PalmDocImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - PalmDocImport(KoFilter *parent, const char *name, const QStringList&); + PalmDocImport(KoFilter *tqparent, const char *name, const TQStringList&); PalmDocImport(); virtual ~PalmDocImport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); private: - QString processPlainParagraph( QString text ); - QString processPlainDocument( QString plaindoc ); - QString processDocumentInfo( const QString &title ); + TQString processPlainParagraph( TQString text ); + TQString processPlainDocument( TQString plaindoc ); + TQString processDocumentInfo( const TQString &title ); }; #endif // __PALMDOCIMPORT_H diff --git a/filters/kword/pdf/DESIGN b/filters/kword/pdf/DESIGN index 0775afbf..1208b8db 100644 --- a/filters/kword/pdf/DESIGN +++ b/filters/kword/pdf/DESIGN @@ -9,7 +9,7 @@ PDFImport::convert | |- Dialog: ask for import options | - |- Document::paperSize/pageOrientation: extract paper size/orientation + |- Document::paperSize/pageQt::Orientation: extract paper size/orientation | |- for each page | | @@ -59,7 +59,7 @@ PDFImport::convert | | | | | |- associate links | | | - | | |- Page::initParagraph: compute tabs, indents and alignments + | | |- Page::initParagraph: compute tabs, indents and tqalignments | | | | | |- Page::fillParagrap: remove hyphen/eol, add tabs, add text | | | diff --git a/filters/kword/pdf/FilterDevice.cpp b/filters/kword/pdf/FilterDevice.cpp index f7a67d8e..0d840fc3 100644 --- a/filters/kword/pdf/FilterDevice.cpp +++ b/filters/kword/pdf/FilterDevice.cpp @@ -35,7 +35,7 @@ namespace PDFImport { Device::Device(Data &data) - : _data(data), _fillColor(Qt::white), _strokeColor(Qt::black) + : _data(data), _fillColor(TQt::white), _strokeColor(TQt::black) { _pages.setAutoDelete(true); } @@ -196,14 +196,14 @@ void Device::addImage() } // add image - QString name = QString("pictures/picture%1.png").arg(_data.imageIndex()); - QDomElement frameset = _data.pictureFrameset(_currentImage.rect); + TQString name = TQString("pictures/picture%1.png").tqarg(_data.imageIndex()); + TQDomElement frameset = _data.pictureFrameset(_currentImage.rect); current()->pictures.append(frameset); - QDomElement picture = _data.createElement("PICTURE"); + TQDomElement picture = _data.createElement("PICTURE"); picture.setAttribute("keepAspectRatio", "false"); frameset.appendChild(picture); - QDomElement key = _data.createElement("KEY"); + TQDomElement key = _data.createElement("KEY"); key.setAttribute("msec", 0); key.setAttribute("second", 0); key.setAttribute("minute", 0); @@ -227,7 +227,7 @@ void Device::addImage() _data.pictures().appendChild(key); KoStoreDevice *sd = _data.chain()->storageFile(name, KoStore::Write); - QImageIO io(sd, "PNG"); + TQImageIO io(sd, "PNG"); io.setImage(_currentImage.image); bool ok = io.write(); Q_ASSERT(ok); @@ -253,9 +253,9 @@ void Device::computeGeometry(GfxState *state, Image &image) uint Device::initImage(GfxState *state, int width, int height, bool withMask) { - // get image geometry + // get image tqgeometry Image image; - image.mask = withMask; + image.tqmask = withMask; computeGeometry(state, image); // check if new image @@ -263,28 +263,28 @@ uint Device::initImage(GfxState *state, int width, int height, // << " " << _currentImage.rect.left() // << " " << _currentImage.rect.right() // << " " << _currentImage.rect.bottom() -// << " " << _currentImage.mask << endl; +// << " " << _currentImage.tqmask << endl; // kdDebug(30516) << "new image " << width // << " " << image.rect.left() << " " << image.rect.right() // << " " << image.rect.top() -// << " " << image.mask << endl; +// << " " << image.tqmask << endl; if ( !_currentImage.image.isNull() && (_currentImage.image.width()!=width || !equal(image.rect.left(), _currentImage.rect.left()) || !equal(image.rect.right(), _currentImage.rect.right()) || !equal(image.rect.top(), _currentImage.rect.bottom()) - || image.mask!=_currentImage.mask) ) + || image.tqmask!=_currentImage.tqmask) ) addImage(); uint offset = (_currentImage.image.isNull() ? 0 : _currentImage.image.height()); - image.image = QImage(width, offset + height, 32); + image.image = TQImage(width, offset + height, 32); image.image.setAlphaBuffer(withMask); if ( !_currentImage.image.isNull() ) { // copy previous // kdDebug(30516) << "image continued..." << endl; for (int j=0; j<_currentImage.image.height(); j++) { - QRgb *pix = (QRgb *)_currentImage.image.scanLine(j); - QRgb *newPix = (QRgb *)image.image.scanLine(j); + TQRgb *pix = (TQRgb *)_currentImage.image.scanLine(j); + TQRgb *newPix = (TQRgb *)image.image.scanLine(j); for (int i=0; i<width; i++) newPix[i] = pix[i]; } _currentImage.image = image.image; @@ -295,14 +295,14 @@ uint Device::initImage(GfxState *state, int width, int height, void Device::drawImage(GfxState *state, Object *, Stream *str, int width, int height, GfxImageColorMap *colorMap, - int *maskColors, GBool inlineImg) + int *tqmaskColors, GBool inlineImg) { kdDebug(30516) << "image kind=" << str->getKind() << " inline=" << inlineImg - << " maskColors=" << (maskColors!=0) << endl; + << " tqmaskColors=" << (tqmaskColors!=0) << endl; if ( !_data.options().importImages ) return; - uint offset = initImage(state, width, height, maskColors!=0); + uint offset = initImage(state, width, height, tqmaskColors!=0); // read pixels int nbComps = colorMap->getNumPixelComps(); @@ -311,20 +311,20 @@ void Device::drawImage(GfxState *state, Object *, Stream *str, istr->reset(); for (int j=0; j<height; j++) { Guchar *p = istr->getLine(); - QRgb *pix = (QRgb *)_currentImage.image.scanLine(offset + j); + TQRgb *pix = (TQRgb *)_currentImage.image.scanLine(offset + j); for (int i=0; i<width; i++) { GfxRGB rgb; colorMap->getRGB(p, &rgb); int alpha = 255; - if (maskColors) { + if (tqmaskColors) { for (int k=0; k<nbComps; k++) - if ( p[k]<maskColors[2*k] || p[k]>maskColors[2*k+1] ) { + if ( p[k]<tqmaskColors[2*k] || p[k]>tqmaskColors[2*k+1] ) { alpha = 0; break; } } - pix[i] = qRgba(qRound(rgb.r*255), qRound(rgb.g*255), - qRound(rgb.b*255), alpha); + pix[i] = tqRgba(tqRound(rgb.r*255), tqRound(rgb.g*255), + tqRound(rgb.b*255), alpha); p += nbComps; } } @@ -335,7 +335,7 @@ void Device::drawImageMask(GfxState *state, Object *, Stream *str, int width, int height, GBool invert, GBool inlineImg) { - kdDebug(30516) << "image mask ! kind=" << str->getKind() + kdDebug(30516) << "image tqmask ! kind=" << str->getKind() << "inline=" << inlineImg << endl; if ( !_data.options().importImages ) return; @@ -344,17 +344,17 @@ void Device::drawImageMask(GfxState *state, Object *, Stream *str, // read pixels GfxRGB rgb; state->getFillRGB(&rgb); - int red = qRound(rgb.r * 255); - int green = qRound(rgb.g * 255); - int blue = qRound(rgb.b * 255); + int red = tqRound(rgb.r * 255); + int green = tqRound(rgb.g * 255); + int blue = tqRound(rgb.b * 255); ImageStream *istr = new ImageStream(str, width, 1, 1); str->reset(); for (int j=0; j<height; j++) { Guchar *p = istr->getLine(); - QRgb *pix = (QRgb *)_currentImage.image.scanLine(offset + j); + TQRgb *pix = (TQRgb *)_currentImage.image.scanLine(offset + j); for (int i=0; i<width; i++) - pix[i] = qRgba(red, green, blue, 255 * p[i]); + pix[i] = tqRgba(red, green, blue, 255 * p[i]); } delete istr; @@ -394,8 +394,8 @@ void Device::stroke(GfxState */*state*/) // _currentImage.rect = path[i].boundingRect(); // _currentImage.rect.bottom+=1; // _currentImage.image = -// QImage(qRound(_currentImage.rect.width()), -// qRound(_currentImage.rect.height()), 32); +// TQImage(tqRound(_currentImage.rect.width()), +// tqRound(_currentImage.rect.height()), 32); // _currentImage.image.fill(_fillColor.pixel()); // addImage(); // } else if ( path[i].isVerticalSegment() ) { @@ -426,8 +426,8 @@ void Device::doFill(const DPathVector &path) if ( !_currentImage.image.isNull() ) addImage(); _currentImage.rect = path[i].boundingRect(); _currentImage.image = - QImage(qRound(_currentImage.rect.width()), - qRound(_currentImage.rect.height()), 32); + TQImage(tqRound(_currentImage.rect.width()), + tqRound(_currentImage.rect.height()), 32); _currentImage.image.fill(_fillColor.pixel()); addImage(); } diff --git a/filters/kword/pdf/FilterDevice.h b/filters/kword/pdf/FilterDevice.h index 0901f0e6..3318b4ac 100644 --- a/filters/kword/pdf/FilterDevice.h +++ b/filters/kword/pdf/FilterDevice.h @@ -20,7 +20,7 @@ #ifndef FILTERDEVICE_H #define FILTERDEVICE_H -#include <qimage.h> +#include <tqimage.h> class Object; class Stream; @@ -86,7 +86,7 @@ public: GBool inlineImg); virtual void drawImage(GfxState *, Object *ref, Stream *, int width, int height, GfxImageColorMap *colorMap, - int *maskColors, GBool inlineImg); + int *tqmaskColors, GBool inlineImg); //----- path painting virtual void stroke(GfxState *state); @@ -96,7 +96,7 @@ public: private: class Image; static void computeGeometry(GfxState *, Image &); - uint initImage(GfxState *, int width, int height, bool mask); + uint initImage(GfxState *, int width, int height, bool tqmask); void addImage(); void clear(); static DPathVector convertPath(GfxState *); @@ -105,17 +105,17 @@ private: private: Data &_data; - QPtrList<Page> _pages; - QColor _fillColor, _strokeColor; + TQPtrList<Page> _pages; + TQColor _fillColor, _strokeColor; class Image { public: - QImage image; + TQImage image; DRect rect; - bool mask; + bool tqmask; }; Image _currentImage; - typedef QValueList<Image> ImageList; + typedef TQValueList<Image> ImageList; ImageList _images; }; diff --git a/filters/kword/pdf/FilterPage.cpp b/filters/kword/pdf/FilterPage.cpp index 6d1829aa..aefa2acc 100644 --- a/filters/kword/pdf/FilterPage.cpp +++ b/filters/kword/pdf/FilterPage.cpp @@ -82,10 +82,10 @@ void Page::addString(TextString *str) // if ( str->len==0 ) kdDebug(30516) << "empty string !" << endl; if (_lastStr) _lastStr->checkCombination(str); _lastStr = (str->len==0 ? 0 : static_cast<String *>(str)); -// QString s; -// for (int i=0; i<str->len; i++) s += QChar(str->text[i]); +// TQString s; +// for (int i=0; i<str->len; i++) s += TQChar(str->text[i]); // kdDebug(30516) << "string: " << s << " (" -// << (str->len>0 ? s[0].unicode() : 0) << ")" << endl; +// << (str->len>0 ? s[0].tqunicode() : 0) << ")" << endl; TextPage::addString(str); // kdDebug(30516) << " ...addString done" << endl; } @@ -125,7 +125,7 @@ bool Page::isLastParagraphLine(TextLine *line, const Paragraph &par) if ( line->next && line->next->blocks->next ) return true; TextBlock *b = block(line, -1); if ( b==0 || b->len==0 ) return false; // should not happen - QChar c = QChar(b->text[b->len-1]); + TQChar c = TQChar(b->text[b->len-1]); // last line char is not '.' or ':' if ( c!='.' && c!=':' ) return false; // if at line end and block aligned : same paragraph @@ -228,7 +228,7 @@ void Page::initParagraph(Paragraph &par) const const double pright = _rects[par.type].right(); const double pmean = (pleft + pright) / 2; - QValueList<TextLine *>::const_iterator it; + TQValueList<TextLine *>::const_iterator it; for (it = par.lines().begin(); it!=par.lines().end(); ++it) { // compute tabulations @@ -245,9 +245,9 @@ void Page::initParagraph(Paragraph &par) const if ( res==-1 ) { tab.pos = dx; if (tabRightAligned) { - tab.alignment = Tabulator::Right; + tab.tqalignment = Tabulator::Right; kdDebug(30516) << "tabulated text right aligned.." << endl; - } else tab.alignment = Tabulator::Left; + } else tab.tqalignment = Tabulator::Left; par.tabs.push_back(tab); } } @@ -262,14 +262,14 @@ void Page::initParagraph(Paragraph &par) const else par.leftIndent = kMin(par.leftIndent, left); } - // compute alignment + // compute tqalignment for (it = par.lines().begin(); it!=par.lines().end(); ++it) { double left = (*it)->blocks->xMin; double right = block(*it, -1)->xMax; double mean = (left + right) / 2; -// QString text; +// TQString text; // for (int i=0; i<kMin(4, (*it)->blocks->len); i++) -// text += QChar((*it)->blocks->text[i]); +// text += TQChar((*it)->blocks->text[i]); // kdDebug(30516) << text << " left=" << left // << " pleft=" << pleft + par.leftIndent // << " indent=" << par.leftIndent @@ -287,7 +287,7 @@ void Page::initParagraph(Paragraph &par) const } } - // finalize alignment + // finalize tqalignment if (rightAligned) par.align = (leftAligned ? AlignBlock : AlignRight); else if (centered) par.align = AlignCenter; } @@ -302,7 +302,7 @@ void Page::fillParagraph(Paragraph &par, double &offset) const // << " paroffset=" << par.offset << endl; if ( par.offset>0 ) offset += par.offset; - QValueList<TextLine *>::const_iterator it; + TQValueList<TextLine *>::const_iterator it; for (it = par.lines().begin(); it!=par.lines().end(); ++it) { // end of previous line (inside a paragraph) if ( !par.isFirst(*it) ) { @@ -312,17 +312,17 @@ void Page::fillParagraph(Paragraph &par, double &offset) const uint bi, pbi; int si = par.charFromEnd(0, bi); Q_ASSERT( si>=0 ); - QChar c = par.blocks[bi].text[si]; + TQChar c = par.blocks[bi].text[si]; int psi = par.charFromEnd(1, pbi); - QChar prev = (psi<0 ? QChar::null : par.blocks[pbi].text[psi]); - if ( !prev.isNull() && type(c.unicode())==Hyphen ) - kdDebug(30516) << "hyphen ? " << QString(prev) - << " type=" << type(prev.unicode()) + TQChar prev = (psi<0 ? TQChar::null : par.blocks[pbi].text[psi]); + if ( !prev.isNull() && type(c.tqunicode())==Hyphen ) + kdDebug(30516) << "hyphen ? " << TQString(prev) + << " type=" << type(prev.tqunicode()) << endl; TextString *next = ((*it)->next ? (*it)->next->blocks->strings : 0); - if ( !prev.isNull() && type(c.unicode())==Hyphen - && isLetter( type(prev.unicode()) ) + if ( !prev.isNull() && type(c.tqunicode())==Hyphen + && isLetter( type(prev.tqunicode()) ) && next && next->len>0 && isLetter( type(next->text[next->len-1]) ) ) { kdDebug(30516) << "found hyphen" << endl; @@ -370,7 +370,7 @@ void Page::fillParagraph(Paragraph &par, double &offset) const for (TextString *str = blk->strings; str; str = str->next) { Block b; for (uint k = 0; k<uint(str->len); k++) - b.text += QChar(str->text[k]); + b.text += TQChar(str->text[k]); if (str->spaceAfter) b.text += ' '; String *fstr = static_cast<String *>(str); b.font = fstr->font(); @@ -386,10 +386,10 @@ void Page::fillParagraph(Paragraph &par, double &offset) const } } -FontFamily Page::checkSpecial(QChar &c, const Font &font) const +FontFamily Page::checkSpecial(TQChar &c, const Font &font) const { Unicode res = 0; - switch ( PDFImport::checkSpecial(c.unicode(), res) ) { + switch ( PDFImport::checkSpecial(c.tqunicode(), res) ) { case Bullet: kdDebug(30516) << "found bullet" << endl; // #### FIXME : if list, use a COUNTER @@ -405,7 +405,7 @@ FontFamily Page::checkSpecial(QChar &c, const Font &font) const kdDebug(30516) << "found latex special" << endl; return Times; case SpecialSymbol: - kdDebug(30516) << "found symbol=" << c.unicode() << endl; + kdDebug(30516) << "found symbol=" << c.tqunicode() << endl; return Times; //return Symbol; default: @@ -417,20 +417,20 @@ FontFamily Page::checkSpecial(QChar &c, const Font &font) const void Page::checkSpecialChars(Paragraph &par) const { - QValueList<Block> blocks; + TQValueList<Block> blocks; for (uint k=0; k<par.blocks.size(); k++) { const Block &b = par.blocks[k]; - QString res; + TQString res; // kdDebug(30516) << "check \"" << b.text << "\"" << endl; for (uint l=0; l<b.text.length(); l++) { - QChar c = b.text[l]; + TQChar c = b.text[l]; FontFamily family = checkSpecial(c, b.font); if ( family==Nb_Family ) res += c; else { if ( !res.isEmpty() ) { blocks.push_back(b); blocks.back().text = res; - res = QString::null; + res = TQString(); } blocks.push_back(b); blocks.back().font.setFamily(family); @@ -447,7 +447,7 @@ void Page::checkSpecialChars(Paragraph &par) const void Page::coalesce(Paragraph &par) const { - QValueList<Block> blocks; + TQValueList<Block> blocks; blocks.push_back(par.blocks[0]); for (uint k=1; k<par.blocks.size(); k++) { const Block &b = par.blocks[k]; @@ -530,34 +530,34 @@ void Page::prepare() void Page::dump(const Paragraph &par) { - QValueVector<QDomElement> layouts; - QValueVector<QDomElement> formats; + TQValueVector<TQDomElement> tqlayouts; + TQValueVector<TQDomElement> formats; // tabulations for (uint k=0; k<par.tabs.size(); k++) { - QDomElement element = par.tabs[k].createElement(_data); - layouts.push_back(element); + TQDomElement element = par.tabs[k].createElement(_data); + tqlayouts.push_back(element); } // indents if ( !_data.options().smart || par.align!=AlignCenter ) { - QDomElement element = _data.createElement("INDENTS"); + TQDomElement element = _data.createElement("INDENTS"); element.setAttribute("left", par.leftIndent); double delta = par.firstIndent - par.leftIndent; if ( !equal(delta, 0) ) element.setAttribute("first", delta); - layouts.push_back(element); + tqlayouts.push_back(element); } // offset before if ( par.offset>0 ) { - QDomElement element = _data.createElement("OFFSETS"); + TQDomElement element = _data.createElement("OFFSETS"); element.setAttribute("before", par.offset); - layouts.push_back(element); + tqlayouts.push_back(element); } // flow if (_data.options().smart) { - QString flow; + TQString flow; // kdDebug(30516) << "flow=" << par.align << endl; switch (par.align) { case AlignLeft: break; @@ -566,28 +566,28 @@ void Page::dump(const Paragraph &par) case AlignBlock: flow = "justify"; break; } if ( !flow.isEmpty() ) { - QDomElement element = _data.createElement("FLOW"); - element.setAttribute("align", flow.utf8()); - layouts.push_back(element); + TQDomElement element = _data.createElement("FLOW"); + element.setAttribute("align", TQString(flow.utf8())); + tqlayouts.push_back(element); } } // text and formats - QString text; + TQString text; uint pos = 0; for (uint k=0; k<par.blocks.size(); k++) { const Block &b = par.blocks[k]; text += (b.link ? "#" : b.text); uint len = (b.link ? 1 : b.text.length()); - QDomElement element = _data.createElement("FORMAT"); - QDomDocument document = _data.document(); + TQDomElement element = _data.createElement("FORMAT"); + TQDomDocument document = _data.document(); bool r = b.font.format(document, element, pos, len); if (b.link) b.link->format(document, element, pos, b.text); if ( r || b.link ) formats.push_back(element); pos += len; } - _data.createParagraph(text, par.type, layouts, formats); + _data.createParagraph(text, par.type, tqlayouts, formats); } void Page::dump() diff --git a/filters/kword/pdf/FilterPage.h b/filters/kword/pdf/FilterPage.h index c56f78c7..234eb6e7 100644 --- a/filters/kword/pdf/FilterPage.h +++ b/filters/kword/pdf/FilterPage.h @@ -22,8 +22,8 @@ #include "TextOutputDev.h" -#include <qdatetime.h> -#include <qptrlist.h> +#include <tqdatetime.h> +#include <tqptrlist.h> #include "fstring.h" @@ -39,7 +39,7 @@ class Page : public TextPage public: Page(Data &data); - QValueVector<DRect> &rects() { return _rects; } + TQValueVector<DRect> &rects() { return _rects; } bool hasHeader() const; bool hasFooter() const; @@ -56,10 +56,10 @@ public: void dump(); public: - QValueList<QDomElement> pictures; + TQValueList<TQDomElement> pictures; private: - FontFamily checkSpecial(QChar &, const Font &) const; + FontFamily checkSpecial(TQChar &, const Font &) const; static TextBlock *block(TextLine *, int index); static bool isLastParagraphLine(TextLine *, const Paragraph &); @@ -78,11 +78,11 @@ private: private: Data &_data; - QValueList<Paragraph> _pars; - QPtrList<Link> _links; + TQValueList<Paragraph> _pars; + TQPtrList<Link> _links; String *_lastStr; - QTime _time; // debug - QValueVector<DRect> _rects; + TQTime _time; // debug + TQValueVector<DRect> _rects; }; } // namespace diff --git a/filters/kword/pdf/data.cpp b/filters/kword/pdf/data.cpp index 57d07b36..90fdc731 100644 --- a/filters/kword/pdf/data.cpp +++ b/filters/kword/pdf/data.cpp @@ -37,7 +37,7 @@ Data::Data(KoFilterChain *chain, const DRect &pageRect, _textFramesets(Nb_ParagraphTypes), _pageRect(pageRect), _options(options) { - _document = QDomDocument("DOC"); + _document = TQDomDocument("DOC"); _document.appendChild( _document.createProcessingInstruction( "xml","version=\"1.0\" encoding=\"UTF-8\"")); @@ -48,7 +48,7 @@ Data::Data(KoFilterChain *chain, const DRect &pageRect, _mainElement.setAttribute("syntaxVersion", 2); _document.appendChild(_mainElement); - QDomElement element = _document.createElement("ATTRIBUTES"); + TQDomElement element = _document.createElement("ATTRIBUTES"); element.setAttribute("processing", 1); element.setAttribute("hasHeader", 0); element.setAttribute("hasFooter", 0); @@ -71,10 +71,10 @@ Data::Data(KoFilterChain *chain, const DRect &pageRect, _mainElement.appendChild(_framesets); // standard style - QDomElement styles = _document.createElement("STYLES"); + TQDomElement styles = _document.createElement("STYLES"); _mainElement.appendChild(styles); - QDomElement style = _document.createElement("STYLE"); + TQDomElement style = _document.createElement("STYLE"); styles.appendChild(style); element = _document.createElement("FORMAT"); @@ -99,25 +99,25 @@ Data::Data(KoFilterChain *chain, const DRect &pageRect, _mainElement.appendChild(_bookmarks); } -QDomElement Data::pictureFrameset(const DRect &r) +TQDomElement Data::pictureFrameset(const DRect &r) { - QDomElement frameset = createFrameset(Picture, QString::null); - QDomElement frame = createFrame(Picture, r, false); + TQDomElement frameset = createFrameset(Picture, TQString()); + TQDomElement frame = createFrame(Picture, r, false); frameset.appendChild(frame); return frameset; } -QDomElement Data::createFrameset(FramesetType type, const QString &n) +TQDomElement Data::createFrameset(FramesetType type, const TQString &n) { bool text = (type==Text); uint &index = (text ? _textIndex : _imageIndex); - QDomElement frameset = _document.createElement("FRAMESET"); + TQDomElement frameset = _document.createElement("FRAMESET"); frameset.setAttribute("frameType", (text ? 1 : 2)); - QString name = n; + TQString name = n; if ( name.isNull() ) name = (text ? i18n("Text Frameset %1") - : i18n("Picture %1")).arg(index); + : i18n("Picture %1")).tqarg(index); frameset.setAttribute("name", name); frameset.setAttribute("frameInfo", 0); @@ -127,14 +127,14 @@ QDomElement Data::createFrameset(FramesetType type, const QString &n) return frameset; } -QDomElement Data::createFrame(FramesetType type, const DRect &r, +TQDomElement Data::createFrame(FramesetType type, const DRect &r, bool forceMainFrameset) { bool text = (type==Text); bool mainFrameset = (text ? (forceMainFrameset ? true : _textIndex==1) : false); - QDomElement frame = _document.createElement("FRAME"); + TQDomElement frame = _document.createElement("FRAME"); if (text) frame.setAttribute("autoCreateNewFrame", 0); frame.setAttribute("newFrameBehavior", 1); frame.setAttribute("runaround", 0); @@ -147,26 +147,26 @@ QDomElement Data::createFrame(FramesetType type, const DRect &r, return frame; } -void Data::initPage(const QValueVector<DRect> &rects, - const QValueList<QDomElement> &pictures) +void Data::initPage(const TQValueVector<DRect> &rects, + const TQValueList<TQDomElement> &pictures) { for (uint i=0; i<Nb_ParagraphTypes; i++) { // kdDebug(30516) << "page #" << pageIndex << " rect #" << i // << ": " << rects[i].toString() << endl; if ( !rects[i].isValid() ) continue; - QString name = i18n(TEXT_FRAMESET_NAMES[i]).arg(pageIndex); + TQString name = i18n(TEXT_FRAMESET_NAMES[i]).tqarg(pageIndex); _textFramesets[i] = createFrameset(Text, name); _framesets.appendChild(_textFramesets[i]); - QDomElement frame = createFrame(Text, rects[i], true); + TQDomElement frame = createFrame(Text, rects[i], true); _textFramesets[i].appendChild(frame); } - QValueList<QDomElement>::const_iterator it; + TQValueList<TQDomElement>::const_iterator it; for (it = pictures.begin(); it!=pictures.end(); ++it) _framesets.appendChild(*it); // page bookmark - QDomElement element = createElement("BOOKMARKITEM"); + TQDomElement element = createElement("BOOKMARKITEM"); element.setAttribute("name", Link::pageLinkName(pageIndex)); element.setAttribute("cursorIndexStart", 0); // ? element.setAttribute("cursorIndexEnd", 0); // ? @@ -178,27 +178,27 @@ void Data::initPage(const QValueVector<DRect> &rects, _marginRect.unite(rects[Body]); } -void Data::createParagraph(const QString &text, ParagraphType type, - const QValueVector<QDomElement> &layouts, - const QValueVector<QDomElement> &formats) +void Data::createParagraph(const TQString &text, ParagraphType type, + const TQValueVector<TQDomElement> &tqlayouts, + const TQValueVector<TQDomElement> &formats) { - QDomElement paragraph = _document.createElement("PARAGRAPH"); + TQDomElement paragraph = _document.createElement("PARAGRAPH"); _textFramesets[type].appendChild(paragraph); - QDomElement textElement = _document.createElement("TEXT"); + TQDomElement textElement = _document.createElement("TEXT"); textElement.appendChild( _document.createTextNode(text) ); paragraph.appendChild(textElement); - QDomElement layout = _document.createElement("LAYOUT"); - paragraph.appendChild(layout); - QDomElement element = _document.createElement("NAME"); + TQDomElement tqlayout = _document.createElement("LAYOUT"); + paragraph.appendChild(tqlayout); + TQDomElement element = _document.createElement("NAME"); element.setAttribute("value", "Standard"); - layout.appendChild(element); - for (uint i=0; i<layouts.size(); i++) - layout.appendChild(layouts[i]); + tqlayout.appendChild(element); + for (uint i=0; i<tqlayouts.size(); i++) + tqlayout.appendChild(tqlayouts[i]); if ( formats.size() ) { - QDomElement format = _document.createElement("FORMATS"); + TQDomElement format = _document.createElement("FORMATS"); paragraph.appendChild(format); for (uint i=0; i<formats.size(); i++) format.appendChild(formats[i]); @@ -208,7 +208,7 @@ void Data::createParagraph(const QString &text, ParagraphType type, void Data::endDump() { if ( !_marginRect.isValid() ) _marginRect = _pageRect; - QDomElement element = _document.createElement("PAPERBORDERS"); + TQDomElement element = _document.createElement("PAPERBORDERS"); element.setAttribute("left", _marginRect.left() - _pageRect.left()); element.setAttribute("top", _marginRect.top() - _pageRect.top()); element.setAttribute("right", _pageRect.right() - _marginRect.right()); diff --git a/filters/kword/pdf/data.h b/filters/kword/pdf/data.h index 4ae8c71d..d7ac0ba9 100644 --- a/filters/kword/pdf/data.h +++ b/filters/kword/pdf/data.h @@ -22,8 +22,8 @@ #include <math.h> -#include <qdom.h> -#include <qvaluevector.h> +#include <tqdom.h> +#include <tqvaluevector.h> #include <KoPageLayout.h> @@ -42,25 +42,25 @@ public: Data(KoFilterChain *, const DRect &pageRect, KoPageLayout, const Options &); - QDomElement createElement(const QString &name) + TQDomElement createElement(const TQString &name) { return _document.createElement(name); } - void createParagraph(const QString &text, ParagraphType type, - const QValueVector<QDomElement> &layouts, - const QValueVector<QDomElement> &formats); + void createParagraph(const TQString &text, ParagraphType type, + const TQValueVector<TQDomElement> &tqlayouts, + const TQValueVector<TQDomElement> &formats); KoFilterChain *chain() const { return _chain; } const Options &options() const { return _options; } - QDomDocument document() const { return _document; } + TQDomDocument document() const { return _document; } const DRect &pageRect() const { return _pageRect; } uint imageIndex() const { return _imageIndex; } uint textIndex() const { return _textIndex; } - QDomElement bookmarks() const { return _bookmarks; } - QDomElement pictures() const { return _pictures; } + TQDomElement bookmarks() const { return _bookmarks; } + TQDomElement pictures() const { return _pictures; } - QDomElement pictureFrameset(const DRect &); + TQDomElement pictureFrameset(const DRect &); - void initPage(const QValueVector<DRect> &, - const QValueList<QDomElement> &pictures); + void initPage(const TQValueVector<DRect> &, + const TQValueList<TQDomElement> &pictures); void endDump(); public: @@ -68,16 +68,16 @@ public: private: enum FramesetType { Text, Picture }; - QDomElement createFrameset(FramesetType, const QString &name); - QDomElement createFrame(FramesetType, const DRect &, + TQDomElement createFrameset(FramesetType, const TQString &name); + TQDomElement createFrame(FramesetType, const DRect &, bool forceMainFrameset); private: KoFilterChain *_chain; - QDomDocument _document; + TQDomDocument _document; uint _imageIndex, _textIndex; - QDomElement _mainElement, _framesets, _pictures, _bookmarks, _paper; - QValueVector<QDomElement> _textFramesets; + TQDomElement _mainElement, _framesets, _pictures, _bookmarks, _paper; + TQValueVector<TQDomElement> _textFramesets; DRect _pageRect, _marginRect; const Options &_options; }; diff --git a/filters/kword/pdf/dialog.cpp b/filters/kword/pdf/dialog.cpp index 1d303025..29e0eabc 100644 --- a/filters/kword/pdf/dialog.cpp +++ b/filters/kword/pdf/dialog.cpp @@ -20,17 +20,17 @@ #include "dialog.h" #include "dialog.moc" -#include <qhbox.h> -#include <qvgroupbox.h> -#include <qregexp.h> -#include <qapplication.h> -#include <qgrid.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qbuttongroup.h> -#include <qradiobutton.h> -#include <qwhatsthis.h> -#include <qcheckbox.h> +#include <tqhbox.h> +#include <tqvgroupbox.h> +#include <tqregexp.h> +#include <tqapplication.h> +#include <tqgrid.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqbuttongroup.h> +#include <tqradiobutton.h> +#include <tqwhatsthis.h> +#include <tqcheckbox.h> #include <klocale.h> #include <kdebug.h> @@ -38,30 +38,30 @@ //----------------------------------------------------------------------------- -SelectionRange::SelectionRange(const QString &s) +SelectionRange::SelectionRange(const TQString &s) { // fill - QValueVector<QPair<uint, uint> > r; - QStringList list = QStringList::split(',', s); - QRegExp range("^([0-9]+)\\-([0-9]+)$"); - QRegExp one("^[0-9]+$"); - for (QStringList::iterator it = list.begin(); it!=list.end(); ++it) { + TQValueVector<TQPair<uint, uint> > r; + TQStringList list = TQStringList::split(',', s); + TQRegExp range("^([0-9]+)\\-([0-9]+)$"); + TQRegExp one("^[0-9]+$"); + for (TQStringList::iterator it = list.begin(); it!=list.end(); ++it) { if ( one.exactMatch(*it) ) { uint p = (*it).toUInt(); - r.push_back( qMakePair(p, p) ); + r.push_back( tqMakePair(p, p) ); } else if ( range.exactMatch(*it) ) { uint p1 = range.cap(1).toUInt(); uint p2 = range.cap(2).toUInt(); if ( p1>p2 ) continue; - r.push_back( qMakePair(p1, p2) ); + r.push_back( tqMakePair(p1, p2) ); } } // order - QPair<uint, uint> tmp; + TQPair<uint, uint> tmp; for (uint i=1; i<r.size(); i++) if ( r[i].first<r[i-1].first ) - qSwap(r[i-1], r[i]); + tqSwap(r[i-1], r[i]); // coalesce for (uint i=0; i<r.size(); i++) @@ -114,65 +114,65 @@ int SelectionRangeIterator::next() namespace PDFImport { -Dialog::Dialog(uint nbPages, bool isEncrypted, QWidget *widget) +Dialog::Dialog(uint nbPages, bool isEncrypted, TQWidget *widget) : KDialogBase(Plain, i18n("KWord's PDF Import Filter"), Ok|Cancel, Ok, widget, "pdf_import_dialog"), _nbPages(nbPages) { - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); - QVBoxLayout *top = new QVBoxLayout(plainPage(), KDialogBase::marginHint(), + TQVBoxLayout *top = new TQVBoxLayout(plainPage(), KDialogBase::marginHint(), KDialogBase::spacingHint()); // page selection - QVGroupBox *gbox = new QVGroupBox(i18n("Page Selection"), plainPage()); + TQVGroupBox *gbox = new TQVGroupBox(i18n("Page Selection"), plainPage()); gbox->setInsideSpacing(KDialogBase::spacingHint()); top->addWidget(gbox); - _group = new QButtonGroup; - _allButton = new QRadioButton(i18n("All (%1 pages)").arg(nbPages), gbox); + _group = new TQButtonGroup; + _allButton = new TQRadioButton(i18n("All (%1 pages)").tqarg(nbPages), gbox); _allButton->setChecked(true); _group->insert(_allButton); - QHBox *hbox = new QHBox(gbox); - _rangeButton = new QRadioButton(i18n("Range:"), hbox); + TQHBox *hbox = new TQHBox(gbox); + _rangeButton = new TQRadioButton(i18n("Range:"), hbox); _group->insert(_rangeButton); _range = new KLineEdit(hbox); _range->setFocus(); - connect(_range, SIGNAL(textChanged(const QString &)), - SLOT(rangeChanged(const QString &))); + connect(_range, TQT_SIGNAL(textChanged(const TQString &)), + TQT_SLOT(rangeChanged(const TQString &))); // options - _images = new QCheckBox(i18n("Import images"), plainPage()); + _images = new TQCheckBox(i18n("Import images"), plainPage()); _images->setChecked(true); top->addWidget(_images); - _smart = new QCheckBox(i18n("\"Smart\" mode"), plainPage()); + _smart = new TQCheckBox(i18n("\"Smart\" mode"), plainPage()); _smart->setChecked(true); - QWhatsThis::add(_smart, + TQWhatsThis::add(_smart, i18n("Removes returns and hyphens at end of line. " - "Also tries to compute the paragraph alignment. " - "Note that the layout of some pages can " + "Also tries to compute the paragraph tqalignment. " + "Note that the tqlayout of some pages can " "get messed up.")); top->addWidget(_smart); // passwords - gbox = new QVGroupBox(i18n("Passwords"), plainPage()); + gbox = new TQVGroupBox(i18n("Passwords"), plainPage()); top->addWidget(gbox); - QGrid *grid = new QGrid(2, gbox); + TQGrid *grid = new TQGrid(2, gbox); grid->setSpacing(KDialogBase::spacingHint()); - (void)new QLabel(i18n("Owner:"), grid); + (void)new TQLabel(i18n("Owner:"), grid); _owner = new KLineEdit(grid); - _owner->setEchoMode(QLineEdit::Password); - (void)new QLabel(i18n("User:"), grid); + _owner->setEchoMode(TQLineEdit::Password); + (void)new TQLabel(i18n("User:"), grid); _user = new KLineEdit(grid); - _user->setEchoMode(QLineEdit::Password); + _user->setEchoMode(TQLineEdit::Password); grid->setEnabled(isEncrypted); } Dialog::~Dialog() { delete _group; - QApplication::setOverrideCursor(Qt::waitCursor); + TQApplication::setOverrideCursor(TQt::waitCursor); } -void Dialog::rangeChanged(const QString &) +void Dialog::rangeChanged(const TQString &) { _rangeButton->setChecked(true); } @@ -181,7 +181,7 @@ Options Dialog::options() const { Options o; o.range = SelectionRange( (_allButton->isChecked() ? - QString("1-%1").arg(_nbPages) : _range->text()) ); + TQString("1-%1").tqarg(_nbPages) : _range->text()) ); o.ownerPassword = _owner->text(); o.userPassword = _user->text(); o.importImages = _images->isChecked(); diff --git a/filters/kword/pdf/dialog.h b/filters/kword/pdf/dialog.h index 9139b390..128f9b18 100644 --- a/filters/kword/pdf/dialog.h +++ b/filters/kword/pdf/dialog.h @@ -20,14 +20,14 @@ #ifndef DIALOG_H #define DIALOG_H -#include <qvaluevector.h> -#include <qpair.h> +#include <tqvaluevector.h> +#include <tqpair.h> #include <kdialogbase.h> -class QButtonGroup; -class QRadioButton; -class QCheckBox; +class TQButtonGroup; +class TQRadioButton; +class TQCheckBox; class KLineEdit; @@ -36,12 +36,12 @@ class SelectionRange { public: SelectionRange() {} - SelectionRange(const QString &); + SelectionRange(const TQString &); uint nbPages() const; private: - QValueVector<QPair<uint, uint> > _ranges; + TQValueVector<TQPair<uint, uint> > _ranges; friend class SelectionRangeIterator; }; @@ -59,7 +59,7 @@ public: private: uint _index; int _current; - const QValueVector<QPair<uint, uint> > &_ranges; + const TQValueVector<TQPair<uint, uint> > &_ranges; }; //----------------------------------------------------------------------------- @@ -73,28 +73,29 @@ public: public: SelectionRange range; - QString ownerPassword, userPassword; + TQString ownerPassword, userPassword; bool importImages, smart; }; class Dialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - Dialog(uint nbPages, bool isEncrypted, QWidget *parent); + Dialog(uint nbPages, bool isEncrypted, TQWidget *tqparent); ~Dialog(); Options options() const; private slots: - void rangeChanged(const QString &); + void rangeChanged(const TQString &); private: uint _nbPages; - QRadioButton *_allButton, *_rangeButton; - QButtonGroup *_group; + TQRadioButton *_allButton, *_rangeButton; + TQButtonGroup *_group; KLineEdit *_range, *_owner, *_user; - QCheckBox *_images, *_smart; + TQCheckBox *_images, *_smart; }; } // namespace diff --git a/filters/kword/pdf/diffs/xpdf_security_integer_overflow_2.diff b/filters/kword/pdf/diffs/xpdf_security_integer_overflow_2.diff index e6464612..6257d287 100644 --- a/filters/kword/pdf/diffs/xpdf_security_integer_overflow_2.diff +++ b/filters/kword/pdf/diffs/xpdf_security_integer_overflow_2.diff @@ -104,14 +104,14 @@ diff -u -p -r1.3 -r1.3.2.1 +++ xpdf/Gfx.cc 22 Dec 2004 12:07:12 -0000 1.3.2.1 @@ -2379,7 +2379,9 @@ void Gfx::doImage(Object *ref, Stream *s haveMask = gFalse; - dict->lookup("Mask", &maskObj); - if (maskObj.isArray()) { -- for (i = 0; i < maskObj.arrayGetLength(); ++i) { + dict->lookup("Mask", &tqmaskObj); + if (tqmaskObj.isArray()) { +- for (i = 0; i < tqmaskObj.arrayGetLength(); ++i) { + for (i = 0; -+ i < maskObj.arrayGetLength() && i < 2*gfxColorMaxComps; ++ i < tqmaskObj.arrayGetLength() && i < 2*gfxColorMaxComps; + ++i) { - maskObj.arrayGet(i, &obj1); - maskColors[i] = obj1.getInt(); + tqmaskObj.arrayGet(i, &obj1); + tqmaskColors[i] = obj1.getInt(); obj1.free(); Index: xpdf/GfxState.cc =================================================================== diff --git a/filters/kword/pdf/fstring.cpp b/filters/kword/pdf/fstring.cpp index 86d94c20..88a79a94 100644 --- a/filters/kword/pdf/fstring.cpp +++ b/filters/kword/pdf/fstring.cpp @@ -29,14 +29,14 @@ namespace PDFImport { //----------------------------------------------------------------------------- -QDomElement Tabulator::createElement(Data &data) const +TQDomElement Tabulator::createElement(Data &data) const { - QDomElement element = data.createElement("TABULATOR"); - element.setAttribute("type", alignment); + TQDomElement element = data.createElement("TABULATOR"); + element.setAttribute("type", tqalignment); element.setAttribute("ptpos", pos); element.setAttribute("filling", filling); - if ( alignment==Character ) - element.setAttribute("alignchar", QString(alignmentChar)); + if ( tqalignment==Character ) + element.setAttribute("alignchar", TQString(tqalignmentChar)); return element; } @@ -57,7 +57,7 @@ Paragraph::Paragraph(TextLine *first, uint nbLines) } // compute rectangle - QValueList<TextLine *>::const_iterator it; + TQValueList<TextLine *>::const_iterator it; for (it = _lines.begin(); it!=_lines.end(); ++it) for (TextBlock *block = (*it)->blocks; block; block = block->next) { DRect br(block->xMin, block->xMax, block->yMin, block->yMax); @@ -112,12 +112,12 @@ void String::addChar(GfxState *state, double x, double y, { Unicode res[MaxLigatureLength]; uint nb = checkLigature(u, res); - QString sdebug; + TQString sdebug; if ( nb>1 ) sdebug = "found ligature "; double ddx = dx / nb; for (uint i=0; i<nb; i++) { TextString::addChar(state, x + ddx*i, y, ddx, dy, res[i]); - if ( nb>1 ) sdebug += QChar(res[i]); + if ( nb>1 ) sdebug += TQChar(res[i]); } if ( nb>1 ) kdDebug(30516) << sdebug << endl; else checkCombination(this); @@ -154,7 +154,7 @@ bool String::checkCombination(TextString *str) // #### above/below detection is not right !!! // bool above = more(accent.r.bottom, letter.r.top); // bool below = more(accent.r.top, letter.r.bottom); -// kdDebug(30516) << "found combi " << QString(QChar(res)) +// kdDebug(30516) << "found combi " << TQString(TQChar(res)) // << " accent: " << accent.r.toString() << endl; // kdDebug(30516) << "letter: " << letter.r.toString() // << endl; diff --git a/filters/kword/pdf/fstring.h b/filters/kword/pdf/fstring.h index f368bc33..f860b92f 100644 --- a/filters/kword/pdf/fstring.h +++ b/filters/kword/pdf/fstring.h @@ -22,7 +22,7 @@ #include "TextOutputDev.h" -#include <qvaluevector.h> +#include <tqvaluevector.h> #include "misc.h" @@ -39,15 +39,15 @@ public: enum Alignment { Left = 0, Center, Right, Character }; enum Filling { Blank = 0, Dots, Line, Dash, DashDot, DashDotDot }; - Tabulator() : alignment(Left) {} + Tabulator() : tqalignment(Left) {} - QDomElement createElement(Data &data) const; + TQDomElement createElement(Data &data) const; public: double pos; - Alignment alignment; + Alignment tqalignment; Filling filling; - QChar alignmentChar; + TQChar tqalignmentChar; }; inline bool operator <(const Tabulator &t1, const Tabulator &t2) @@ -62,7 +62,7 @@ public: public: Font font; const Link *link; - QString text; + TQString text; }; //----------------------------------------------------------------------------- @@ -77,7 +77,7 @@ public: const DRect &rect() const { return _rect; } bool hasOneLine() const { return _lines.count()==1; } - const QValueList<TextLine *> lines() const { return _lines; } + const TQValueList<TextLine *> lines() const { return _lines; } bool isFirst(const TextLine *line) const { return line==_lines.first();} bool isSecond(const TextLine* line) const { return (_lines.count()>1 && line==_lines.first()->next); } @@ -92,11 +92,11 @@ public: uint frameIndex; double firstIndent, leftIndent, offset; Align align; - QValueVector<Tabulator> tabs; - QValueList<Block> blocks; + TQValueVector<Tabulator> tabs; + TQValueList<Block> blocks; private: - QValueList<TextLine *> _lines; + TQValueList<TextLine *> _lines; DRect _rect; }; diff --git a/filters/kword/pdf/misc.cpp b/filters/kword/pdf/misc.cpp index e6ddaa3e..86eb81f6 100644 --- a/filters/kword/pdf/misc.cpp +++ b/filters/kword/pdf/misc.cpp @@ -20,8 +20,8 @@ #include "misc.h" #include <math.h> -#include <qfontmetrics.h> -#include <qfontdatabase.h> +#include <tqfontmetrics.h> +#include <tqfontdatabase.h> #include <kglobal.h> #include <kdebug.h> @@ -35,9 +35,9 @@ namespace PDFImport { -QColor toColor(GfxRGB &rgb) +TQColor toColor(GfxRGB &rgb) { - return QColor(qRound(rgb.r*255), qRound(rgb.g*255), qRound(rgb.b*255)); + return TQColor(tqRound(rgb.r*255), tqRound(rgb.g*255), tqRound(rgb.b*255)); } //----------------------------------------------------------------------------- @@ -67,11 +67,11 @@ void DRect::unite(const DRect &r) _bottom = kMax(_bottom, r._bottom); } -QString DRect::toString() const +TQString DRect::toString() const { if ( !isValid() ) return "invalid rect"; - return QString("left=%1 right=%2 top=%3 bottom=%4").arg(_left).arg(_right) - .arg(_top).arg(_bottom); + return TQString("left=%1 right=%2 top=%3 bottom=%4").tqarg(_left).tqarg(_right) + .tqarg(_top).tqarg(_bottom); } bool DPath::isRectangle() const @@ -98,7 +98,7 @@ DRect DPath::boundingRect() const //----------------------------------------------------------------------------- -QDict<Font::Data> *Font::_dict = 0; +TQDict<Font::Data> *Font::_dict = 0; const char *Font::FAMILY_DATA[Nb_Family] = { "Times", "Helvetica", "Courier", "Symbol" }; @@ -106,7 +106,7 @@ const char *Font::FAMILY_DATA[Nb_Family] = { void Font::init() { Q_ASSERT( _dict==0 ); - _dict = new QDict<Data>(100, false); // case insensitive + _dict = new TQDict<Data>(100, false); // case insensitive _dict->setAutoDelete(true); } @@ -117,7 +117,7 @@ void Font::cleanup() } Font::Font() - : _pointSize(12), _color(Qt::black) + : _pointSize(12), _color(TQt::black) { init("times-roman"); } @@ -125,7 +125,7 @@ Font::Font() Font::Font(const GfxState *state, double size) { if ( size<1 ) kdDebug(30516) << "very small font size=" << size << endl; - _pointSize = qRound(size); + _pointSize = tqRound(size); GfxRGB rgb; state->getFillRGB(&rgb); @@ -133,7 +133,7 @@ Font::Font(const GfxState *state, double size) GfxFont *font = state->getFont(); GString *gname = (font ? font->getName() : 0); - QString name = (gname ? gname->getCString() : 0); + TQString name = (gname ? gname->getCString() : 0); // kdDebug(30516) << "font: " << name << endl; name = name.section('+', 1, 1).lower(); if ( name.isEmpty() ) name = "##dummy"; // dummy name @@ -174,20 +174,20 @@ static const KnownData KNOWN_DATA[] = { { 0, Nb_Family, Regular, false } }; -void Font::init(const QString &n) +void Font::init(const TQString &n) { // check if font already parsed - _data = _dict->find(n); + _data = _dict->tqfind(n); if ( _data==0 ) { // kdDebug(30516) << "font " << n << endl; - QString name = n; - name.replace("oblique", "italic"); + TQString name = n; + name.tqreplace("oblique", "italic"); // check if known font _data = new Data; uint i = 0; while ( KNOWN_DATA[i].name!=0 ) { - if ( name.find(KNOWN_DATA[i].name)!=-1 ) { + if ( name.tqfind(KNOWN_DATA[i].name)!=-1 ) { // kdDebug(30516) << "found " << KNOWN_DATA[i].name // << " " << isBold(KNOWN_DATA[i].style) << endl; _data->family = FAMILY_DATA[KNOWN_DATA[i].family]; @@ -201,21 +201,21 @@ void Font::init(const QString &n) if ( _data->family.isEmpty() ) { // let's try harder // simple heuristic kdDebug(30516) << "unknown font : " << n << endl; - if ( name.find("times")!=-1 ) + if ( name.tqfind("times")!=-1 ) _data->family = FAMILY_DATA[Times]; - else if ( name.find("helvetica")!=-1 ) + else if ( name.tqfind("helvetica")!=-1 ) _data->family = FAMILY_DATA[Helvetica]; - else if ( name.find("courier")!=-1 ) + else if ( name.tqfind("courier")!=-1 ) _data->family = FAMILY_DATA[Courier]; - else if ( name.find("symbol")!=-1 ) + else if ( name.tqfind("symbol")!=-1 ) _data->family = FAMILY_DATA[Symbol]; - else { // with Qt - QFontDatabase fdb; - QStringList list = fdb.families(); + else { // with TQt + TQFontDatabase fdb; + TQStringList list = fdb.tqfamilies(); list = list.grep(name, false); if ( !list.isEmpty() ) { _data->family = list[0]; - kdDebug(30516) << "in Qt database as " << list[0] << endl; + kdDebug(30516) << "in TQt database as " << list[0] << endl; } else { kdDebug(30516) << "really unknown font !" << endl; @@ -223,8 +223,8 @@ void Font::init(const QString &n) } } - bool italic = ( name.find("italic")!=-1 ); - bool bold = ( name.find("bold")!=-1 ); + bool italic = ( name.tqfind("italic")!=-1 ); + bool bold = ( name.tqfind("bold")!=-1 ); _data->style = toStyle(bold, italic); _data->latex = false; } @@ -232,12 +232,12 @@ void Font::init(const QString &n) _dict->insert(name, _data); } - // check if QFont already created - if ( !_data->height.contains(_pointSize) ) { - QFont font(_data->family, _pointSize, - (isBold(_data->style) ? QFont::Bold : QFont::Normal), + // check if TQFont already created + if ( !_data->height.tqcontains(_pointSize) ) { + TQFont font(_data->family, _pointSize, + (isBold(_data->style) ? TQFont::Bold : TQFont::Normal), isItalic(_data->style)); - QFontMetrics fm(font); + TQFontMetrics fm(font); _data->height.insert(_pointSize, fm.height()); } } @@ -253,14 +253,14 @@ bool Font::operator ==(const Font &font) const return true; } -bool Font::format(QDomDocument &doc, QDomElement &f, +bool Font::format(TQDomDocument &doc, TQDomElement &f, uint pos, uint len, bool all) const { f.setAttribute("id", 1); if (!all) f.setAttribute("pos", pos); if (!all) f.setAttribute("len", len); - QDomElement element; + TQDomElement element; Font def; if ( all || _data->family!=def._data->family ) { @@ -281,7 +281,7 @@ bool Font::format(QDomDocument &doc, QDomElement &f, if ( all || isBold(_data->style)!=isBold(def._data->style) ) { element = doc.createElement("WEIGHT"); element.setAttribute("value", - (isBold(_data->style) ? QFont::Bold : QFont::Normal)); + (isBold(_data->style) ? TQFont::Bold : TQFont::Normal)); f.appendChild(element); } // if ( all || _underline!=def._underline ) { @@ -357,7 +357,7 @@ Link::Link(const DRect &rect, LinkAction &action, Catalog &catalog) delete dest; } - _href = QString("bkm://") + pageLinkName(page); + _href = TQString("bkm://") + pageLinkName(page); // kdDebug(30516) << "link to page " << page << endl; break; } @@ -405,15 +405,15 @@ Link::Link(const DRect &rect, LinkAction &action, Catalog &catalog) } } -void Link::format(QDomDocument &doc, QDomElement &f, uint pos, - const QString &text) const +void Link::format(TQDomDocument &doc, TQDomElement &f, uint pos, + const TQString &text) const { f.setAttribute("id", 4); f.setAttribute("pos", pos); f.setAttribute("len", 1); - QDomElement v = doc.createElement("VARIABLE"); - QDomElement element = doc.createElement("TYPE"); + TQDomElement v = doc.createElement("VARIABLE"); + TQDomElement element = doc.createElement("TYPE"); element.setAttribute("type", 9); element.setAttribute("key", "STRING"); element.setAttribute("text", text); @@ -426,9 +426,9 @@ void Link::format(QDomDocument &doc, QDomElement &f, uint pos, f.appendChild(v); } -QString Link::pageLinkName(uint i) +TQString Link::pageLinkName(uint i) { - return QString("page") + QString::number(i); + return TQString("page") + TQString::number(i); } } // namespace diff --git a/filters/kword/pdf/misc.h b/filters/kword/pdf/misc.h index e661be4d..5af22ed7 100644 --- a/filters/kword/pdf/misc.h +++ b/filters/kword/pdf/misc.h @@ -22,12 +22,12 @@ #include <math.h> -#include <qcolor.h> -#include <qdom.h> -#include <qsize.h> -#include <qvaluevector.h> -#include <qdict.h> -#include <qmap.h> +#include <tqcolor.h> +#include <tqdom.h> +#include <tqsize.h> +#include <tqvaluevector.h> +#include <tqdict.h> +#include <tqmap.h> class LinkAction; class Catalog; @@ -37,7 +37,7 @@ class GfxState; namespace PDFImport { -// FIX for Qt 3.0 +// FIX for TQt 3.0 // qvaluevector bug - qheapsort uses 'count' but qvaluevector has only 'size' template <class Container> inline void qHeapSort2( Container &c ) @@ -83,7 +83,7 @@ inline bool less(double d1, double d2, double percent = 0.01) { return ( (d1-d2)<delta ); } -QColor toColor(GfxRGB &); +TQColor toColor(GfxRGB &); //----------------------------------------------------------------------------- class DRect { @@ -110,7 +110,7 @@ public: bool operator ==(const DRect &) const; bool isInside(const DRect &, double percent = 0.01) const; void unite(const DRect &); - QString toString() const; + TQString toString() const; private: double _left, _right, _top, _bottom; @@ -120,7 +120,7 @@ struct DPoint { double x, y; }; -class DPath : public QValueVector<DPoint> +class DPath : public TQValueVector<DPoint> { public: DPath() {} @@ -136,7 +136,7 @@ public: DRect boundingRect() const; }; -typedef QValueVector<DPath> DPathVector; +typedef TQValueVector<DPath> DPathVector; //----------------------------------------------------------------------------- class Font @@ -146,10 +146,10 @@ public: Font(const GfxState *, double size); bool operator ==(const Font &) const; - bool format(QDomDocument &, QDomElement &format, uint pos, uint len, + bool format(TQDomDocument &, TQDomElement &format, uint pos, uint len, bool all = false) const; int height() const { return _data->height[_pointSize]; } - const QColor &color() const { return _color; } + const TQColor &color() const { return _color; } bool isLatex() const { return _data->latex; } void setFamily(FontFamily); @@ -158,22 +158,22 @@ public: static void cleanup(); private: - void init(const QString &name); + void init(const TQString &name); private: uint _pointSize; - QColor _color; + TQColor _color; class Data { public: - QString family; + TQString family; FontStyle style; bool latex; - QMap<int, int> height; + TQMap<int, int> height; }; Data *_data; - static QDict<Data> *_dict; + static TQDict<Data> *_dict; static const char *FAMILY_DATA[PDFImport::Nb_Family]; }; @@ -184,14 +184,14 @@ public: Link(const DRect &, LinkAction &, Catalog &); const DRect &rect() const { return _rect; } - void format(QDomDocument &, QDomElement &format, - uint pos, const QString &text) const; + void format(TQDomDocument &, TQDomElement &format, + uint pos, const TQString &text) const; - static QString pageLinkName(uint i); + static TQString pageLinkName(uint i); private: DRect _rect; - QString _href; + TQString _href; }; } // namespace diff --git a/filters/kword/pdf/pdfdocument.cpp b/filters/kword/pdf/pdfdocument.cpp index d78c0fb8..ffe27e1c 100644 --- a/filters/kword/pdf/pdfdocument.cpp +++ b/filters/kword/pdf/pdfdocument.cpp @@ -38,13 +38,13 @@ Document::Document() : _file(0), _object(0), _fileStream(0), _document(0), _device(0) {} -KoFilter::ConversionStatus -Document::init(const QString &name, const QString &ownerPassword, - const QString &userPassword) +KoFilter::ConversiontqStatus +Document::init(const TQString &name, const TQString &ownerPassword, + const TQString &userPassword) { clear(); - _file = new QFile(name); + _file = new TQFile(name); if( !_file->open(IO_ReadOnly) ) return KoFilter::FileNotFound; FILE *fd = fdopen(_file->handle(), "r"); @@ -87,9 +87,9 @@ void Document::clear() _imageIndex = 1; } -QString Document::info(const QCString &key) const +TQString Document::info(const TQCString &key) const { - QString res; + TQString res; Object info; _document->getDocInfo(&info); if ( info.isDict() ) { @@ -111,7 +111,7 @@ QString Document::info(const QCString &key) const i++; } else u = s->getChar(i) & 0xff; i++; - res += QChar(u); + res += TQChar(u); } tmp.free(); } diff --git a/filters/kword/pdf/pdfdocument.h b/filters/kword/pdf/pdfdocument.h index f283aff7..c54606f4 100644 --- a/filters/kword/pdf/pdfdocument.h +++ b/filters/kword/pdf/pdfdocument.h @@ -20,8 +20,8 @@ #ifndef PDFDOCUMENT_H #define PDFDOCUMENT_H -#include <qfile.h> -#include <qdom.h> +#include <tqfile.h> +#include <tqdom.h> #include <KoFilter.h> #include <KoPageLayout.h> @@ -43,11 +43,11 @@ class Document Document(); ~Document() { clear(); } - KoFilter::ConversionStatus init(const QString &name, - const QString &ownerPassword, const QString &userPassword); + KoFilter::ConversiontqStatus init(const TQString &name, + const TQString &ownerPassword, const TQString &userPassword); void clear(); - QString info(const QCString &key) const; + TQString info(const TQCString &key) const; uint nbPages() const; KoOrientation paperOrientation() const; DRect paperSize(KoFormat &format) const; @@ -59,7 +59,7 @@ class Document void dumpPage(uint i); private: - QFile *_file; + TQFile *_file; Object *_object; BaseStream *_fileStream; PDFDoc *_document; diff --git a/filters/kword/pdf/pdfimport.cpp b/filters/kword/pdf/pdfimport.cpp index 9441d734..bee3e39a 100644 --- a/filters/kword/pdf/pdfimport.cpp +++ b/filters/kword/pdf/pdfimport.cpp @@ -20,8 +20,8 @@ #include "pdfimport.h" #include "pdfimport.moc" -#include <qdom.h> -#include <qdatetime.h> // debug +#include <tqdom.h> +#include <tqdatetime.h> // debug #include <KoFilterChain.h> #include <kgenericfactory.h> @@ -52,26 +52,26 @@ class PdfImportFactory : KGenericFactory<PdfImport, KoFilter> K_EXPORT_COMPONENT_FACTORY(libpdfimport, PdfImportFactory()) //----------------------------------------------------------------------------- -PdfImport::PdfImport(KoFilter *, const char *, const QStringList&) +PdfImport::PdfImport(KoFilter *, const char *, const TQStringList&) {} -KoFilter::ConversionStatus PdfImport::convert(const QCString& from, - const QCString& to) +KoFilter::ConversiontqStatus PdfImport::convert(const TQCString& from, + const TQCString& to) { // check for proper conversion if ( to!="application/x-kword" || from!="application/pdf" ) return KoFilter::NotImplemented; // read file - KoFilter::ConversionStatus result - = _doc.init(m_chain->inputFile(), QString::null, QString::null); + KoFilter::ConversiontqStatus result + = _doc.init(m_chain->inputFile(), TQString(), TQString()); if ( result!=KoFilter::OK ) return result; // options dialog { Dialog dialog(_doc.nbPages(), _doc.isEncrypted(), 0); dialog.exec(); - if ( dialog.result()==QDialog::Rejected ) + if ( dialog.result()==TQDialog::Rejected ) return KoFilter::UserCancelled; _options = dialog.options(); } @@ -82,7 +82,7 @@ KoFilter::ConversionStatus PdfImport::convert(const QCString& from, pd.setMinimumDuration(0); pd.progressBar()->setTotalSteps( _options.range.nbPages()*2 ); pd.progressBar()->setValue(1); - qApp->processEvents(); + tqApp->processEvents(); // if passwords : reread file if ( !_options.ownerPassword.isEmpty() @@ -101,7 +101,7 @@ KoFilter::ConversionStatus PdfImport::convert(const QCString& from, _doc.initDevice(data); // treat pages - QTime time; + TQTime time; time.start(); SelectionRangeIterator it(_options.range); for (uint k=0; k<2; k++) { @@ -109,10 +109,10 @@ KoFilter::ConversionStatus PdfImport::convert(const QCString& from, data.pageIndex = 0; if ( !first ) _doc.init(); for (it.toFirst(); it.current()!=it.end(); it.next()) { - QString s = (first ? i18n("First pass: page #%1...") + TQString s = (first ? i18n("First pass: page #%1...") : i18n("Second pass: page #%1...")); - pd.setLabel( s.arg(it.current()) ); - qApp->processEvents(); + pd.setLabel( s.tqarg(it.current()) ); + tqApp->processEvents(); if (pd.wasCancelled()) return KoFilter::UserCancelled; kdDebug(30516) << "-- " << "pass #" << k << " treat page: " << it.current() @@ -133,7 +133,7 @@ KoFilter::ConversionStatus PdfImport::convert(const QCString& from, return KoFilter::StorageCreationError; } // kdDebug(30516) << data.document().toCString() << endl; - QCString cstr = data.document().toCString(); + TQCString cstr = data.document().toCString(); out->writeBlock(cstr, cstr.length()); out->close(); @@ -144,26 +144,26 @@ KoFilter::ConversionStatus PdfImport::convert(const QCString& from, void PdfImport::treatInfoDocument() { - QDomDocument infoDocument("document-info"); + TQDomDocument infoDocument("document-info"); infoDocument.appendChild( infoDocument.createProcessingInstruction( "xml", "version=\"1.0\" encoding=\"UTF-8\"")); - QDomElement infoElement = infoDocument.createElement( "document-info" ); + TQDomElement infoElement = infoDocument.createElement( "document-info" ); infoDocument.appendChild(infoElement); - QDomElement aboutTag = infoDocument.createElement("about"); + TQDomElement aboutTag = infoDocument.createElement("about"); infoElement.appendChild(aboutTag); - QDomElement authorTag = infoDocument.createElement("author"); + TQDomElement authorTag = infoDocument.createElement("author"); infoElement.appendChild(authorTag); - QDomElement fullNameTag = infoDocument.createElement("full-name"); + TQDomElement fullNameTag = infoDocument.createElement("full-name"); authorTag.appendChild(fullNameTag); - QDomText authorText = infoDocument.createTextNode( _doc.info("Author") ); + TQDomText authorText = infoDocument.createTextNode( _doc.info("Author") ); fullNameTag.appendChild(authorText); - QDomElement titleTag = infoDocument.createElement("title"); + TQDomElement titleTag = infoDocument.createElement("title"); aboutTag.appendChild(titleTag); - QDomText titleText = infoDocument.createTextNode( _doc.info("Title") ); + TQDomText titleText = infoDocument.createTextNode( _doc.info("Title") ); titleTag.appendChild(titleText); // output @@ -172,7 +172,7 @@ void PdfImport::treatInfoDocument() if ( !out ) kdWarning(30516) << "unable to open doc info. continuing anyway\n"; else { - QCString cstr = infoDocument.toCString(); + TQCString cstr = infoDocument.toCString(); out->writeBlock(cstr, cstr.length()); out->close(); } diff --git a/filters/kword/pdf/pdfimport.h b/filters/kword/pdf/pdfimport.h index 22b34f67..66b68525 100644 --- a/filters/kword/pdf/pdfimport.h +++ b/filters/kword/pdf/pdfimport.h @@ -29,11 +29,12 @@ class PdfImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - PdfImport(KoFilter *parent, const char *name, const QStringList&); + PdfImport(KoFilter *tqparent, const char *name, const TQStringList&); - KoFilter::ConversionStatus - convert(const QCString& from, const QCString& to); + KoFilter::ConversiontqStatus + convert(const TQCString& from, const TQCString& to); private: void treatInfoDocument(); diff --git a/filters/kword/pdf/status.html b/filters/kword/pdf/status.html index 946c3df4..4e6c263c 100644 --- a/filters/kword/pdf/status.html +++ b/filters/kword/pdf/status.html @@ -50,7 +50,7 @@ <td><ul> <li>import text with formatting. <li>import links. - <li>import images (image masks cannot be handled correctly thought). + <li>import images (image tqmasks cannot be handled correctly thought). </ul></td> </tr> diff --git a/filters/kword/pdf/transform.cpp b/filters/kword/pdf/transform.cpp index 4f1badc3..dbf0cb46 100644 --- a/filters/kword/pdf/transform.cpp +++ b/filters/kword/pdf/transform.cpp @@ -193,7 +193,7 @@ CharType checkSpecial(Unicode u, Unicode &res) // special mapping switch (t) { case Unknown: - kdDebug(30516) << "unknown special " << QString(QChar(u)) + kdDebug(30516) << "unknown special " << TQString(TQChar(u)) << " (" << u << ")" << endl; break; case SuperScript: { diff --git a/filters/kword/pdf/transform.h b/filters/kword/pdf/transform.h index 6bfd8b5c..8f8ae7f1 100644 --- a/filters/kword/pdf/transform.h +++ b/filters/kword/pdf/transform.h @@ -20,7 +20,7 @@ #ifndef TRANSFORM_H #define TRANSFORM_H -#include <qpair.h> +#include <tqpair.h> #include "CharTypes.h" namespace PDFImport @@ -75,7 +75,7 @@ namespace PDFImport CharType checkSpecial(Unicode, Unicode &res); // detect some letter/accent combinations - // (latex layouts them separately) + // (latex tqlayouts them separately) Unicode checkCombi(Unicode letter, Unicode accent); } diff --git a/filters/kword/pdf/xpdf/goo/GHash.cc b/filters/kword/pdf/xpdf/goo/GHash.cc index d336f88e..b8f511e0 100644 --- a/filters/kword/pdf/xpdf/goo/GHash.cc +++ b/filters/kword/pdf/xpdf/goo/GHash.cc @@ -97,7 +97,7 @@ void *GHash::lookup(const GString *key) { GHashBucket *p; int h; - if (!(p = find(key, &h))) { + if (!(p = tqfind(key, &h))) { return NULL; } return p->val; @@ -107,7 +107,7 @@ void *GHash::lookup(const char *key) { GHashBucket *p; int h; - if (!(p = find(key, &h))) { + if (!(p = tqfind(key, &h))) { return NULL; } return p->val; @@ -119,7 +119,7 @@ void *GHash::remove(const GString *key) { void *val; int h; - if (!(p = find(key, &h))) { + if (!(p = tqfind(key, &h))) { return NULL; } q = &tab[h]; @@ -142,7 +142,7 @@ void *GHash::remove(const char *key) { void *val; int h; - if (!(p = find(key, &h))) { + if (!(p = tqfind(key, &h))) { return NULL; } q = &tab[h]; @@ -190,7 +190,7 @@ void GHash::killIter(GHashIter **iter) { *iter = NULL; } -GHashBucket *GHash::find(const GString *key, int *h) { +GHashBucket *GHash::tqfind(const GString *key, int *h) { GHashBucket *p; *h = hash(key); @@ -202,7 +202,7 @@ GHashBucket *GHash::find(const GString *key, int *h) { return NULL; } -GHashBucket *GHash::find(const char *key, int *h) { +GHashBucket *GHash::tqfind(const char *key, int *h) { GHashBucket *p; *h = hash(key); diff --git a/filters/kword/pdf/xpdf/goo/GHash.h b/filters/kword/pdf/xpdf/goo/GHash.h index 79d9a7ea..426428c1 100644 --- a/filters/kword/pdf/xpdf/goo/GHash.h +++ b/filters/kword/pdf/xpdf/goo/GHash.h @@ -37,8 +37,8 @@ public: private: - GHashBucket *find(const GString *key, int *h); - GHashBucket *find(const char *key, int *h); + GHashBucket *tqfind(const GString *key, int *h); + GHashBucket *tqfind(const char *key, int *h); int hash(const GString *key); int hash(const char *key); diff --git a/filters/kword/pdf/xpdf/xpdf/CMap.cc b/filters/kword/pdf/xpdf/xpdf/CMap.cc index b0002183..21f0af22 100644 --- a/filters/kword/pdf/xpdf/xpdf/CMap.cc +++ b/filters/kword/pdf/xpdf/xpdf/CMap.cc @@ -61,7 +61,7 @@ CMap *CMap::parse(CMapCache *cache, GString *collectionA, return new CMap(collectionA->copy(), cMapNameA->copy(), 1); } - error(-1, "Couldn't find '%s' CMap file for '%s' collection", + error(-1, "Couldn't tqfind '%s' CMap file for '%s' collection", cMapNameA->getCString(), collectionA->getCString()); return NULL; } diff --git a/filters/kword/pdf/xpdf/xpdf/CMap.h b/filters/kword/pdf/xpdf/xpdf/CMap.h index ce926baf..5ece2635 100644 --- a/filters/kword/pdf/xpdf/xpdf/CMap.h +++ b/filters/kword/pdf/xpdf/xpdf/CMap.h @@ -45,7 +45,7 @@ public: GBool match(GString *collectionA, GString *cMapNameA); // Return the CID corresponding to the character code starting at - // <s>, which contains <len> bytes. Sets *<nUsed> to the number of + // <s>, which tqcontains <len> bytes. Sets *<nUsed> to the number of // bytes used by the char code. CID getCID(char *s, int len, int *nUsed); diff --git a/filters/kword/pdf/xpdf/xpdf/Catalog.cc b/filters/kword/pdf/xpdf/xpdf/Catalog.cc index 8f7e6b04..4a68d3b3 100644 --- a/filters/kword/pdf/xpdf/xpdf/Catalog.cc +++ b/filters/kword/pdf/xpdf/xpdf/Catalog.cc @@ -25,7 +25,7 @@ #include "Catalog.h" // This define is used to limit the depth of recursive readPageTree calls -// This is needed because the page tree nodes can reference their parents +// This is needed because the page tree nodes can reference their tqparents // leaving us in an infinite loop // Most sane pdf documents don't have a call depth higher than 10 #define MAX_CALL_DEPTH 1000 diff --git a/filters/kword/pdf/xpdf/xpdf/Dict.cc b/filters/kword/pdf/xpdf/xpdf/Dict.cc index 351c23a0..048ce80a 100644 --- a/filters/kword/pdf/xpdf/xpdf/Dict.cc +++ b/filters/kword/pdf/xpdf/xpdf/Dict.cc @@ -50,7 +50,7 @@ void Dict::add(char *key, Object *val) { ++length; } -inline DictEntry *Dict::find(const char *key) { +inline DictEntry *Dict::tqfind(const char *key) { int i; for (i = 0; i < length; ++i) { @@ -63,19 +63,19 @@ inline DictEntry *Dict::find(const char *key) { GBool Dict::is(const char *type) { DictEntry *e; - return (e = find("Type")) && e->val.isName(type); + return (e = tqfind("Type")) && e->val.isName(type); } Object *Dict::lookup(const char *key, Object *obj) { DictEntry *e; - return (e = find(key)) ? e->val.fetch(xref, obj) : obj->initNull(); + return (e = tqfind(key)) ? e->val.fetch(xref, obj) : obj->initNull(); } Object *Dict::lookupNF(const char *key, Object *obj) { DictEntry *e; - return (e = find(key)) ? e->val.copy(obj) : obj->initNull(); + return (e = tqfind(key)) ? e->val.copy(obj) : obj->initNull(); } char *Dict::getKey(int i) { diff --git a/filters/kword/pdf/xpdf/xpdf/Dict.h b/filters/kword/pdf/xpdf/xpdf/Dict.h index 4bc4408e..cc66161e 100644 --- a/filters/kword/pdf/xpdf/xpdf/Dict.h +++ b/filters/kword/pdf/xpdf/xpdf/Dict.h @@ -71,7 +71,7 @@ private: int length; // number of entries in dictionary int ref; // reference count - DictEntry *find(const char *key); + DictEntry *tqfind(const char *key); }; #endif diff --git a/filters/kword/pdf/xpdf/xpdf/FTFont.cc b/filters/kword/pdf/xpdf/xpdf/FTFont.cc index 8de09e0e..ebbbff40 100644 --- a/filters/kword/pdf/xpdf/xpdf/FTFont.cc +++ b/filters/kword/pdf/xpdf/xpdf/FTFont.cc @@ -50,7 +50,7 @@ FTFontEngine::~FTFontEngine() { FTFontFile::FTFontFile(FTFontEngine *engineA, char *fontFileName, char **fontEnc, GBool pdfFontHasEncoding) { char *name; - int unicodeCmap, macRomanCmap, msSymbolCmap; + int tqunicodeCmap, macRomanCmap, msSymbolCmap; int i, j; ok = gFalse; @@ -89,11 +89,11 @@ FTFontFile::FTFontFile(FTFontEngine *engineA, char *fontFileName, // and use (0xf000 + char code). // 3. If none of these rules apply, use the first cmap and hope for // the best (this shouldn't happen). - unicodeCmap = macRomanCmap = msSymbolCmap = 0xffff; + tqunicodeCmap = macRomanCmap = msSymbolCmap = 0xffff; for (i = 0; i < face->num_charmaps; ++i) { if (face->charmaps[i]->platform_id == 3 && face->charmaps[i]->encoding_id == 1) { - unicodeCmap = i; + tqunicodeCmap = i; } else if (face->charmaps[i]->platform_id == 1 && face->charmaps[i]->encoding_id == 0) { macRomanCmap = i; @@ -106,8 +106,8 @@ FTFontFile::FTFontFile(FTFontEngine *engineA, char *fontFileName, mode = ftFontModeCharCode; charMapOffset = 0; if (pdfFontHasEncoding) { - if (unicodeCmap != 0xffff) { - i = unicodeCmap; + if (tqunicodeCmap != 0xffff) { + i = tqunicodeCmap; mode = ftFontModeUnicode; } else if (macRomanCmap != 0xffff) { i = macRomanCmap; diff --git a/filters/kword/pdf/xpdf/xpdf/FontFile.cc b/filters/kword/pdf/xpdf/xpdf/FontFile.cc index ccb880bf..28396338 100644 --- a/filters/kword/pdf/xpdf/xpdf/FontFile.cc +++ b/filters/kword/pdf/xpdf/xpdf/FontFile.cc @@ -1111,7 +1111,7 @@ void Type1CFontFile::convertToType0(const char *psName, (*outputFunc)(outputStream, "cleartomark\n", 12); } - // write the Type 0 parent font + // write the Type 0 tqparent font (*outputFunc)(outputStream, "16 dict begin\n", 14); (*outputFunc)(outputStream, "/FontName /", 11); (*outputFunc)(outputStream, psName, strlen(psName)); @@ -1572,7 +1572,7 @@ void Type1CFontFile::cvtGlyph(const Guchar *s, int n) { } i += 2; nOps = 0; - } else if (s[i] == 19) { // hintmask + } else if (s[i] == 19) { // hinttqmask // ignored if (first) { cvtGlyphWidth(nOps == 1); @@ -1580,14 +1580,14 @@ void Type1CFontFile::cvtGlyph(const Guchar *s, int n) { } if (nOps > 0) { if (nOps & 1) { - error(-1, "Wrong number of args (%d) to Type 2 hintmask/vstemhm", + error(-1, "Wrong number of args (%d) to Type 2 hinttqmask/vstemhm", nOps); } nHints += nOps / 2; } i += 1 + ((nHints + 7) >> 3); nOps = 0; - } else if (s[i] == 20) { // cntrmask + } else if (s[i] == 20) { // cntrtqmask // ignored if (first) { cvtGlyphWidth(nOps == 1); @@ -1595,7 +1595,7 @@ void Type1CFontFile::cvtGlyph(const Guchar *s, int n) { } if (nOps > 0) { if (nOps & 1) { - error(-1, "Wrong number of args (%d) to Type 2 cntrmask/vstemhm", + error(-1, "Wrong number of args (%d) to Type 2 cntrtqmask/vstemhm", nOps); } nHints += nOps / 2; @@ -3063,7 +3063,7 @@ void TrueTypeFontFile::convertToType0(const char *name, const Gushort *cidMap, "FontName currentdict end definefont pop\n", 40); } - // write the Type 0 parent font + // write the Type 0 tqparent font (*outputFunc)(outputStream, "16 dict begin\n", 14); (*outputFunc)(outputStream, "/FontName /", 11); (*outputFunc)(outputStream, name, strlen(name)); @@ -3206,7 +3206,7 @@ void TrueTypeFontFile::cvtCharStrings(const char **encodingA, GBool pdfFontHasEncoding, FontFileOutputFunc outputFunc, void *outputStream) { - int unicodeCmap, macRomanCmap, msSymbolCmap; + int tqunicodeCmap, macRomanCmap, msSymbolCmap; int nCmaps, cmapPlatform, cmapEncoding, cmapFmt, cmapOffset; T42FontIndexMode mode; const char *name; @@ -3239,13 +3239,13 @@ void TrueTypeFontFile::cvtCharStrings(const char **encodingA, // 3. If none of these rules apply, use the first cmap and hope for // the best (this shouldn't happen). nCmaps = getUShort(pos+2); - unicodeCmap = macRomanCmap = msSymbolCmap = -1; + tqunicodeCmap = macRomanCmap = msSymbolCmap = -1; cmapOffset = 0; for (i = 0; i < nCmaps; ++i) { cmapPlatform = getUShort(pos + 4 + 8*i); cmapEncoding = getUShort(pos + 4 + 8*i + 2); if (cmapPlatform == 3 && cmapEncoding == 1) { - unicodeCmap = i; + tqunicodeCmap = i; } else if (cmapPlatform == 1 && cmapEncoding == 0) { macRomanCmap = i; } else if (cmapPlatform == 3 && cmapEncoding == 0) { @@ -3255,8 +3255,8 @@ void TrueTypeFontFile::cvtCharStrings(const char **encodingA, i = 0; mode = t42FontModeCharCode; if (pdfFontHasEncoding) { - if (unicodeCmap >= 0) { - i = unicodeCmap; + if (tqunicodeCmap >= 0) { + i = tqunicodeCmap; mode = t42FontModeUnicode; } else if (macRomanCmap >= 0) { i = macRomanCmap; diff --git a/filters/kword/pdf/xpdf/xpdf/Gfx.cc b/filters/kword/pdf/xpdf/xpdf/Gfx.cc index 7948d78a..d357ba94 100644 --- a/filters/kword/pdf/xpdf/xpdf/Gfx.cc +++ b/filters/kword/pdf/xpdf/xpdf/Gfx.cc @@ -2259,13 +2259,13 @@ void Gfx::doImage(Object *ref, Stream *str, GBool inlineImg) { Dict *dict; int width, height; int bits; - GBool mask; + GBool tqmask; GBool invert; GfxColorSpace *colorSpace; GfxImageColorMap *colorMap; - Object maskObj; + Object tqmaskObj; GBool haveMask; - int maskColors[2*gfxColorMaxComps]; + int tqmaskColors[2*gfxColorMaxComps]; Object obj1, obj2; int i; @@ -2292,15 +2292,15 @@ void Gfx::doImage(Object *ref, Stream *str, GBool inlineImg) { height = obj1.getInt(); obj1.free(); - // image or mask? + // image or tqmask? dict->lookup("ImageMask", &obj1); if (obj1.isNull()) { obj1.free(); dict->lookup("IM", &obj1); } - mask = gFalse; + tqmask = gFalse; if (obj1.isBool()) - mask = obj1.getBool(); + tqmask = obj1.getBool(); else if (!obj1.isNull()) goto err2; obj1.free(); @@ -2316,10 +2316,10 @@ void Gfx::doImage(Object *ref, Stream *str, GBool inlineImg) { bits = obj1.getInt(); obj1.free(); - // display a mask - if (mask) { + // display a tqmask + if (tqmask) { - // check for inverted mask + // check for inverted tqmask if (bits != 1) goto err1; invert = gFalse; @@ -2375,15 +2375,15 @@ void Gfx::doImage(Object *ref, Stream *str, GBool inlineImg) { goto err1; } - // get the mask + // get the tqmask haveMask = gFalse; - dict->lookup("Mask", &maskObj); - if (maskObj.isArray()) { + dict->lookup("Mask", &tqmaskObj); + if (tqmaskObj.isArray()) { for (i = 0; - i < maskObj.arrayGetLength() && i < 2*gfxColorMaxComps; + i < tqmaskObj.arrayGetLength() && i < 2*gfxColorMaxComps; ++i) { - maskObj.arrayGet(i, &obj1); - maskColors[i] = obj1.getInt(); + tqmaskObj.arrayGet(i, &obj1); + tqmaskColors[i] = obj1.getInt(); obj1.free(); } haveMask = gTrue; @@ -2391,10 +2391,10 @@ void Gfx::doImage(Object *ref, Stream *str, GBool inlineImg) { // draw it out->drawImage(state, ref, str, width, height, colorMap, - haveMask ? maskColors : (int *)NULL, inlineImg); + haveMask ? tqmaskColors : (int *)NULL, inlineImg); delete colorMap; - maskObj.free(); + tqmaskObj.free(); } if ((i = width * height) > 1000) { diff --git a/filters/kword/pdf/xpdf/xpdf/GfxFont.cc b/filters/kword/pdf/xpdf/xpdf/GfxFont.cc index 1ed21174..7886ae69 100644 --- a/filters/kword/pdf/xpdf/xpdf/GfxFont.cc +++ b/filters/kword/pdf/xpdf/xpdf/GfxFont.cc @@ -738,7 +738,7 @@ Gfx8BitFont::Gfx8BitFont(XRef *xref, const char *tagA, Ref idA, GString *nameA, } else { // this is technically an error -- the Widths entry is required // for all but the Base-14 fonts -- but certain PDF generators - // apparently don't include widths for Arial and TimesNewRoman + // aptqparently don't include widths for Arial and TimesNewRoman if (isFixedWidth()) { i = 0; } else if (isSerif()) { diff --git a/filters/kword/pdf/xpdf/xpdf/GlobalParams.cc b/filters/kword/pdf/xpdf/xpdf/GlobalParams.cc index 8a7b36de..d25970de 100644 --- a/filters/kword/pdf/xpdf/xpdf/GlobalParams.cc +++ b/filters/kword/pdf/xpdf/xpdf/GlobalParams.cc @@ -139,7 +139,7 @@ GlobalParams::GlobalParams(const char *cfgFileName) { nameToUnicode = new NameToCharCode(); cidToUnicodes = new GHash(gTrue); residentUnicodeMaps = new GHash(); - unicodeMaps = new GHash(gTrue); + tqunicodeMaps = new GHash(gTrue); cMapDirs = new GHash(gTrue); toUnicodeDirs = new GList(); displayFonts = new GHash(); @@ -195,7 +195,7 @@ GlobalParams::GlobalParams(const char *cfgFileName) { errQuiet = gFalse; cidToUnicodeCache = new CIDToUnicodeCache(); - unicodeMapCache = new UnicodeMapCache(); + tqunicodeMapCache = new UnicodeMapCache(); cMapCache = new CMapCache(); // set up the initial nameToUnicode table @@ -318,7 +318,7 @@ void GlobalParams::parseFile(GString *fileName, FILE *f) { parseNameToUnicode(tokens, fileName, line); } else if (!cmd->cmp("cidToUnicode")) { parseCIDToUnicode(tokens, fileName, line); - } else if (!cmd->cmp("unicodeMap")) { + } else if (!cmd->cmp("tqunicodeMap")) { parseUnicodeMap(tokens, fileName, line); } else if (!cmd->cmp("cMapDir")) { parseCMapDir(tokens, fileName, line); @@ -465,16 +465,16 @@ void GlobalParams::parseUnicodeMap(GList *tokens, GString *fileName, GString *encodingName, *name, *old; if (tokens->getLength() != 3) { - error(-1, "Bad 'unicodeMap' config file command (%s:%d)", + error(-1, "Bad 'tqunicodeMap' config file command (%s:%d)", fileName->getCString(), line); return; } encodingName = (GString *)tokens->get(1); name = (GString *)tokens->get(2); - if ((old = (GString *)unicodeMaps->remove(encodingName))) { + if ((old = (GString *)tqunicodeMaps->remove(encodingName))) { delete old; } - unicodeMaps->add(encodingName->copy(), name->copy()); + tqunicodeMaps->add(encodingName->copy(), name->copy()); } void GlobalParams::parseCMapDir(GList *tokens, GString *fileName, int line) { @@ -765,7 +765,7 @@ GlobalParams::~GlobalParams() { delete nameToUnicode; deleteGHash(cidToUnicodes, GString); deleteGHash(residentUnicodeMaps, UnicodeMap); - deleteGHash(unicodeMaps, GString); + deleteGHash(tqunicodeMaps, GString); deleteGList(toUnicodeDirs, GString); deleteGHash(displayFonts, DisplayFontParam); deleteGHash(displayCIDFonts, DisplayFontParam); @@ -793,7 +793,7 @@ GlobalParams::~GlobalParams() { delete cMapDirs; delete cidToUnicodeCache; - delete unicodeMapCache; + delete tqunicodeMapCache; delete cMapCache; } @@ -825,7 +825,7 @@ UnicodeMap *GlobalParams::getResidentUnicodeMap(const GString *encodingName) { FILE *GlobalParams::getUnicodeMapFile(const GString *encodingName) { GString *fileName; - if (!(fileName = (GString *)unicodeMaps->lookup(encodingName))) { + if (!(fileName = (GString *)tqunicodeMaps->lookup(encodingName))) { return NULL; } return fopen(fileName->getCString(), "r"); @@ -959,7 +959,7 @@ UnicodeMap *GlobalParams::getUnicodeMap(GString *encodingName) { map->incRefCnt(); return map; } - return unicodeMapCache->getUnicodeMap(encodingName); + return tqunicodeMapCache->getUnicodeMap(encodingName); } CMap *GlobalParams::getCMap(GString *collection, GString *cMapName) { diff --git a/filters/kword/pdf/xpdf/xpdf/GlobalParams.h b/filters/kword/pdf/xpdf/xpdf/GlobalParams.h index 86114a15..1f3e4c53 100644 --- a/filters/kword/pdf/xpdf/xpdf/GlobalParams.h +++ b/filters/kword/pdf/xpdf/xpdf/GlobalParams.h @@ -237,7 +237,7 @@ private: // [GString] GHash *residentUnicodeMaps; // mappings from Unicode to char codes, // indexed by encoding name [UnicodeMap] - GHash *unicodeMaps; // files for mappings from Unicode to char + GHash *tqunicodeMaps; // files for mappings from Unicode to char // codes, indexed by encoding name [GString] GHash *cMapDirs; // list of CMap dirs, indexed by collection // name [GList[GString]] @@ -263,7 +263,7 @@ private: GBool psEmbedCIDTrueType; // embed CID TrueType fonts? GBool psOPI; // generate PostScript OPI comments? GBool psASCIIHex; // use ASCIIHex instead of ASCII85? - GString *textEncoding; // encoding (unicodeMap) to use for text + GString *textEncoding; // encoding (tqunicodeMap) to use for text // output EndOfLineKind textEOL; // type of EOL marker to use for text // output @@ -280,7 +280,7 @@ private: GBool errQuiet; // suppress error messages? CIDToUnicodeCache *cidToUnicodeCache; - UnicodeMapCache *unicodeMapCache; + UnicodeMapCache *tqunicodeMapCache; CMapCache *cMapCache; }; diff --git a/filters/kword/pdf/xpdf/xpdf/ImageOutputDev.cc b/filters/kword/pdf/xpdf/xpdf/ImageOutputDev.cc index 1a6d87e1..43bfc793 100644 --- a/filters/kword/pdf/xpdf/xpdf/ImageOutputDev.cc +++ b/filters/kword/pdf/xpdf/xpdf/ImageOutputDev.cc @@ -96,7 +96,7 @@ void ImageOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str, void ImageOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, - int *maskColors, GBool inlineImg) { + int *tqmaskColors, GBool inlineImg) { FILE *f; ImageStream *imgStr; Guchar *p; diff --git a/filters/kword/pdf/xpdf/xpdf/ImageOutputDev.h b/filters/kword/pdf/xpdf/xpdf/ImageOutputDev.h index c3eb36e0..4f317150 100644 --- a/filters/kword/pdf/xpdf/xpdf/ImageOutputDev.h +++ b/filters/kword/pdf/xpdf/xpdf/ImageOutputDev.h @@ -62,7 +62,7 @@ public: GBool inlineImg); virtual void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, - int *maskColors, GBool inlineImg); + int *tqmaskColors, GBool inlineImg); private: diff --git a/filters/kword/pdf/xpdf/xpdf/JBIG2Stream.cc b/filters/kword/pdf/xpdf/xpdf/JBIG2Stream.cc index 6312caca..c5d5450b 100644 --- a/filters/kword/pdf/xpdf/xpdf/JBIG2Stream.cc +++ b/filters/kword/pdf/xpdf/xpdf/JBIG2Stream.cc @@ -682,11 +682,11 @@ GBool JBIG2HuffmanDecoder::decodeInt(int *x, JBIG2HuffmanTable *table) { } Guint JBIG2HuffmanDecoder::readBits(Guint n) { - Guint x, mask, nLeft; + Guint x, tqmask, nLeft; - mask = (n == 32) ? 0xffffffff : ((1 << n) - 1); + tqmask = (n == 32) ? 0xffffffff : ((1 << n) - 1); if (bufLen >= n) { - x = (buf >> (bufLen - n)) & mask; + x = (buf >> (bufLen - n)) & tqmask; bufLen -= n; } else { x = buf & ((1 << bufLen) - 1); @@ -1101,7 +1101,7 @@ void JBIG2Bitmap::combine(JBIG2Bitmap *bitmap, int x, int y, for (yy = y0; yy < y1; ++yy) { - // one byte per line -- need to mask both left and right side + // one byte per line -- need to tqmask both left and right side if (oneByte) { if (x >= 0) { destPtr = data + (y + yy) * line + (x >> 3); @@ -1121,7 +1121,7 @@ void JBIG2Bitmap::combine(JBIG2Bitmap *bitmap, int x, int y, case 3: // xnor dest ^= ((src1 ^ 0xff) >> s1) & m2; break; - case 4: // replace + case 4: // tqreplace dest = (dest & ~m3) | ((src1 >> s1) & m3); break; } @@ -1144,14 +1144,14 @@ void JBIG2Bitmap::combine(JBIG2Bitmap *bitmap, int x, int y, case 3: // xnor dest ^= (src1 ^ 0xff) & m2; break; - case 4: // replace + case 4: // tqreplace dest = (src1 & m2) | (dest & m1); break; } *destPtr = dest; } - // multiple bytes per line -- need to mask left side of left-most + // multiple bytes per line -- need to tqmask left side of left-most // byte and right side of right-most byte } else { @@ -1174,7 +1174,7 @@ void JBIG2Bitmap::combine(JBIG2Bitmap *bitmap, int x, int y, case 3: // xnor dest ^= (src1 ^ 0xff) >> s1; break; - case 4: // replace + case 4: // tqreplace dest = (dest & (0xff << s2)) | (src1 >> s1); break; } @@ -1206,7 +1206,7 @@ void JBIG2Bitmap::combine(JBIG2Bitmap *bitmap, int x, int y, case 3: // xnor dest ^= src ^ 0xff; break; - case 4: // replace + case 4: // tqreplace dest = src; break; } @@ -1231,7 +1231,7 @@ void JBIG2Bitmap::combine(JBIG2Bitmap *bitmap, int x, int y, case 3: // xnor dest ^= (src ^ 0xff) & m2; break; - case 4: // replace + case 4: // tqreplace dest = (src & m2) | (dest & m1); break; } diff --git a/filters/kword/pdf/xpdf/xpdf/Link.cc b/filters/kword/pdf/xpdf/xpdf/Link.cc index 345e7296..b660c035 100644 --- a/filters/kword/pdf/xpdf/xpdf/Link.cc +++ b/filters/kword/pdf/xpdf/xpdf/Link.cc @@ -713,7 +713,7 @@ Links::~Links() { gfree(links); } -LinkAction *Links::find(double x, double y) { +LinkAction *Links::tqfind(double x, double y) { int i; for (i = numLinks - 1; i >= 0; --i) { diff --git a/filters/kword/pdf/xpdf/xpdf/Link.h b/filters/kword/pdf/xpdf/xpdf/Link.h index 17eab2c7..65161876 100644 --- a/filters/kword/pdf/xpdf/xpdf/Link.h +++ b/filters/kword/pdf/xpdf/xpdf/Link.h @@ -357,7 +357,7 @@ public: // If point <x>,<y> is in a link, return the associated action; // else return NULL. - LinkAction *find(double x, double y); + LinkAction *tqfind(double x, double y); // Return true if <x>,<y> is in a link. GBool onLink(double x, double y); diff --git a/filters/kword/pdf/xpdf/xpdf/OutputDev.cc b/filters/kword/pdf/xpdf/xpdf/OutputDev.cc index 34ec5683..fbef8c17 100644 --- a/filters/kword/pdf/xpdf/xpdf/OutputDev.cc +++ b/filters/kword/pdf/xpdf/xpdf/OutputDev.cc @@ -81,7 +81,7 @@ void OutputDev::drawImageMask(GfxState */*state*/, Object */*ref*/, void OutputDev::drawImage(GfxState */*state*/, Object */*ref*/, Stream *str, int width, int height, GfxImageColorMap *colorMap, - int */*maskColors*/, GBool inlineImg) { + int */*tqmaskColors*/, GBool inlineImg) { int i, j; if (inlineImg) { diff --git a/filters/kword/pdf/xpdf/xpdf/OutputDev.h b/filters/kword/pdf/xpdf/xpdf/OutputDev.h index a7e1f0ab..0e29c40c 100644 --- a/filters/kword/pdf/xpdf/xpdf/OutputDev.h +++ b/filters/kword/pdf/xpdf/xpdf/OutputDev.h @@ -135,7 +135,7 @@ public: GBool inlineImg); virtual void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, - int *maskColors, GBool inlineImg); + int *tqmaskColors, GBool inlineImg); #ifdef OPI_SUPPORT //----- OPI functions diff --git a/filters/kword/pdf/xpdf/xpdf/PBMOutputDev.cc b/filters/kword/pdf/xpdf/xpdf/PBMOutputDev.cc index 34432991..453b0862 100644 --- a/filters/kword/pdf/xpdf/xpdf/PBMOutputDev.cc +++ b/filters/kword/pdf/xpdf/xpdf/PBMOutputDev.cc @@ -72,7 +72,7 @@ void PBMOutputDev::killPBMOutputDev(PBMOutputDev *out) { delete out; - // these have to be done *after* the XOutputDev (parent of the + // these have to be done *after* the XOutputDev (tqparent of the // PBMOutputDev) is deleted, since XOutputDev::~XOutputDev() needs // them XFreePixmap(displayA, pixmapA); diff --git a/filters/kword/pdf/xpdf/xpdf/PDFDoc.h b/filters/kword/pdf/xpdf/xpdf/PDFDoc.h index ff6e359c..64c6cd2a 100644 --- a/filters/kword/pdf/xpdf/xpdf/PDFDoc.h +++ b/filters/kword/pdf/xpdf/xpdf/PDFDoc.h @@ -103,7 +103,7 @@ public: // If point <x>,<y> is in a link, return the associated action; // else return NULL. - LinkAction *findLink(double x, double y) { return links->find(x, y); } + LinkAction *findLink(double x, double y) { return links->tqfind(x, y); } // Return true if <x>,<y> is in a link. GBool onLink(double x, double y) { return links->onLink(x, y); } diff --git a/filters/kword/pdf/xpdf/xpdf/PSOutputDev.cc b/filters/kword/pdf/xpdf/xpdf/PSOutputDev.cc index c400338e..700c4829 100644 --- a/filters/kword/pdf/xpdf/xpdf/PSOutputDev.cc +++ b/filters/kword/pdf/xpdf/xpdf/PSOutputDev.cc @@ -315,7 +315,7 @@ static char *prolog[] = { "} def", "/pdfImM1 {", " /pdfImBuf1 4 index 7 add 8 idiv string def", - " { currentfile pdfImBuf1 readhexstring pop } imagemask", + " { currentfile pdfImBuf1 readhexstring pop } imagetqmask", "} def", "% Level 2 image operators", "/pdfImBuf 100 string def", @@ -340,7 +340,7 @@ static char *prolog[] = { " (%-EOD-) eq { exit } if } loop", "} def", "/pdfImM {", - " fCol imagemask", + " fCol imagetqmask", " { currentfile pdfImBuf readline", " not { pop exit } if", " (%-EOD-) eq { exit } if } loop", @@ -862,7 +862,7 @@ void PSOutputDev::setupFonts(Dict *resDict) { fontDict.free(); } -void PSOutputDev::setupFont(GfxFont *font, Dict *parentResDict) { +void PSOutputDev::setupFont(GfxFont *font, Dict *tqparentResDict) { Ref fontFileID; GString *name; PSFontParam *fontParam; @@ -960,7 +960,7 @@ void PSOutputDev::setupFont(GfxFont *font, Dict *parentResDict) { sprintf(type3Name, "T3_%d_%d", font->getID()->num, font->getID()->gen); psName = type3Name; - setupType3Font(font, psName, parentResDict); + setupType3Font(font, psName, tqparentResDict); // do 8-bit font substitution } else if (!font->isCIDFont()) { @@ -1477,7 +1477,7 @@ void PSOutputDev::setupEmbeddedCIDTrueTypeFont(GfxFont *font, Ref *id, } void PSOutputDev::setupType3Font(GfxFont *font, char *psName, - Dict *parentResDict) { + Dict *tqparentResDict) { Dict *resDict; Dict *charProcs; Object charProc; @@ -1491,7 +1491,7 @@ void PSOutputDev::setupType3Font(GfxFont *font, char *psName, if ((resDict = ((Gfx8BitFont *)font)->getResources())) { setupResources(resDict); } else { - resDict = parentResDict; + resDict = tqparentResDict; } // beginning comment @@ -1701,7 +1701,7 @@ void PSOutputDev::startPage(int pageNum, GfxState *state) { height = y2 - y1; if (width > height && width > paperWidth) { landscape = gTrue; - writePSFmt("%%%%PageOrientation: %s\n", + writePSFmt("%%%%PageQt::Orientation: %s\n", state->getCTM()[0] ? "Landscape" : "Portrait"); writePS("pdfStartPage\n"); writePS("90 rotate\n"); @@ -1712,7 +1712,7 @@ void PSOutputDev::startPage(int pageNum, GfxState *state) { height = t; } else { landscape = gFalse; - writePSFmt("%%%%PageOrientation: %s\n", + writePSFmt("%%%%PageQt::Orientation: %s\n", state->getCTM()[0] ? "Portrait" : "Landscape"); writePS("pdfStartPage\n"); tx = -x1; @@ -2217,7 +2217,7 @@ void PSOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str, void PSOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, - int *maskColors, GBool inlineImg) { + int *tqmaskColors, GBool inlineImg) { int len; len = height * ((width * colorMap->getNumPixelComps() * @@ -2287,7 +2287,7 @@ void PSOutputDev::doImageL1(GfxImageColorMap *colorMap, } delete imgStr; - // imagemask + // imagetqmask } else { str->reset(); i = 0; @@ -2478,7 +2478,7 @@ void PSOutputDev::doImageL2(Object *ref, GfxImageColorMap *colorMap, writePS(" /DataSource { 2 copy get exch 1 add exch }\n"); // end of image dictionary - writePSFmt(">>\n%s\n", colorMap ? "image" : "imagemask"); + writePSFmt(">>\n%s\n", colorMap ? "image" : "imagetqmask"); // get rid of the array and index writePS("pop pop\n"); diff --git a/filters/kword/pdf/xpdf/xpdf/PSOutputDev.h b/filters/kword/pdf/xpdf/xpdf/PSOutputDev.h index fbfc3a5c..245ff0b4 100644 --- a/filters/kword/pdf/xpdf/xpdf/PSOutputDev.h +++ b/filters/kword/pdf/xpdf/xpdf/PSOutputDev.h @@ -131,7 +131,7 @@ public: GBool inlineImg); virtual void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, - int *maskColors, GBool inlineImg); + int *tqmaskColors, GBool inlineImg); #if OPI_SUPPORT //----- OPI functions @@ -155,7 +155,7 @@ private: int firstPage, int lastPage, PSOutMode modeA); void setupResources(Dict *resDict); void setupFonts(Dict *resDict); - void setupFont(GfxFont *font, Dict *parentResDict); + void setupFont(GfxFont *font, Dict *tqparentResDict); void setupEmbeddedType1Font(Ref *id, char *psName); void setupExternalType1Font(GString *fileName, char *psName); void setupEmbeddedType1CFont(GfxFont *font, Ref *id, char *psName); @@ -163,7 +163,7 @@ private: void setupExternalTrueTypeFont(GfxFont *font, char *psName); void setupEmbeddedCIDType0Font(GfxFont *font, Ref *id, char *psName); void setupEmbeddedCIDTrueTypeFont(GfxFont *font, Ref *id, char *psName); - void setupType3Font(GfxFont *font, char *psName, Dict *parentResDict); + void setupType3Font(GfxFont *font, char *psName, Dict *tqparentResDict); void setupImages(Dict *resDict); void setupImage(Ref id, Stream *str); void addProcessColor(double c, double m, double y, double k); diff --git a/filters/kword/pdf/xpdf/xpdf/TTFont.cc b/filters/kword/pdf/xpdf/xpdf/TTFont.cc index 6107fd43..6077f3c0 100644 --- a/filters/kword/pdf/xpdf/xpdf/TTFont.cc +++ b/filters/kword/pdf/xpdf/xpdf/TTFont.cc @@ -48,7 +48,7 @@ TTFontEngine::~TTFontEngine() { TTFontFile::TTFontFile(TTFontEngine *engineA, char *fontFileName, char **fontEnc, GBool pdfFontHasEncoding) { TT_Face_Properties props; - TT_UShort unicodeCmap, macRomanCmap, msSymbolCmap; + TT_UShort tqunicodeCmap, macRomanCmap, msSymbolCmap; TT_UShort platform, encoding, i; int j; @@ -77,11 +77,11 @@ TTFontFile::TTFontFile(TTFontEngine *engineA, char *fontFileName, // and use (0xf000 + char code). // 3. If none of these rules apply, use the first cmap and hope for // the best (this shouldn't happen). - unicodeCmap = macRomanCmap = msSymbolCmap = 0xffff; + tqunicodeCmap = macRomanCmap = msSymbolCmap = 0xffff; for (i = 0; i < props.num_CharMaps; ++i) { if (!TT_Get_CharMap_ID(face, i, &platform, &encoding)) { if (platform == 3 && encoding == 1) { - unicodeCmap = i; + tqunicodeCmap = i; } else if (platform == 1 && encoding == 0) { macRomanCmap = i; } else if (platform == 3 && encoding == 0) { @@ -93,8 +93,8 @@ TTFontFile::TTFontFile(TTFontEngine *engineA, char *fontFileName, mode = ttFontModeCharCode; charMapOffset = 0; if (pdfFontHasEncoding) { - if (unicodeCmap != 0xffff) { - i = unicodeCmap; + if (tqunicodeCmap != 0xffff) { + i = tqunicodeCmap; mode = ttFontModeUnicode; } else if (macRomanCmap != 0xffff) { i = macRomanCmap; diff --git a/filters/kword/pdf/xpdf/xpdf/UnicodeMap.cc b/filters/kword/pdf/xpdf/xpdf/UnicodeMap.cc index fe1185d7..d197e5cf 100644 --- a/filters/kword/pdf/xpdf/xpdf/UnicodeMap.cc +++ b/filters/kword/pdf/xpdf/xpdf/UnicodeMap.cc @@ -46,7 +46,7 @@ UnicodeMap *UnicodeMap::parse(GString *encodingNameA) { char *tok1, *tok2, *tok3; if (!(f = globalParams->getUnicodeMapFile(encodingNameA))) { - error(-1, "Couldn't find unicodeMap file for the '%s' encoding", + error(-1, "Couldn't find tqunicodeMap file for the '%s' encoding", encodingNameA->getCString()); return NULL; } @@ -93,11 +93,11 @@ UnicodeMap *UnicodeMap::parse(GString *encodingNameA) { eMap->nBytes = nBytes; ++map->eMapsLen; } else { - error(-1, "Bad line (%d) in unicodeMap file for the '%s' encoding", + error(-1, "Bad line (%d) in tqunicodeMap file for the '%s' encoding", line, encodingNameA->getCString()); } } else { - error(-1, "Bad line (%d) in unicodeMap file for the '%s' encoding", + error(-1, "Bad line (%d) in tqunicodeMap file for the '%s' encoding", line, encodingNameA->getCString()); } ++line; @@ -110,8 +110,8 @@ UnicodeMap *UnicodeMap::parse(GString *encodingNameA) { UnicodeMap::UnicodeMap(GString *encodingNameA) { encodingName = encodingNameA; - unicodeOut = gFalse; - kind = unicodeMapUser; + tqunicodeOut = gFalse; + kind = tqunicodeMapUser; ranges = NULL; len = 0; eMaps = NULL; @@ -119,11 +119,11 @@ UnicodeMap::UnicodeMap(GString *encodingNameA) { refCnt = 1; } -UnicodeMap::UnicodeMap(const char *encodingNameA, GBool unicodeOutA, +UnicodeMap::UnicodeMap(const char *encodingNameA, GBool tqunicodeOutA, UnicodeMapRange *rangesA, int lenA) { encodingName = new GString(encodingNameA); - unicodeOut = unicodeOutA; - kind = unicodeMapResident; + tqunicodeOut = tqunicodeOutA; + kind = tqunicodeMapResident; ranges = rangesA; len = lenA; eMaps = NULL; @@ -131,11 +131,11 @@ UnicodeMap::UnicodeMap(const char *encodingNameA, GBool unicodeOutA, refCnt = 1; } -UnicodeMap::UnicodeMap(const char *encodingNameA, GBool unicodeOutA, +UnicodeMap::UnicodeMap(const char *encodingNameA, GBool tqunicodeOutA, UnicodeMapFunc funcA) { encodingName = new GString(encodingNameA); - unicodeOut = unicodeOutA; - kind = unicodeMapFunc; + tqunicodeOut = tqunicodeOutA; + kind = tqunicodeMapFunc; func = funcA; eMaps = NULL; eMapsLen = 0; @@ -144,7 +144,7 @@ UnicodeMap::UnicodeMap(const char *encodingNameA, GBool unicodeOutA, UnicodeMap::~UnicodeMap() { delete encodingName; - if (kind == unicodeMapUser && ranges) { + if (kind == tqunicodeMapUser && ranges) { gfree(ranges); } if (eMaps) { @@ -170,7 +170,7 @@ int UnicodeMap::mapUnicode(Unicode u, char *buf, int bufSize) { int a, b, m, n, i, j; Guint code; - if (kind == unicodeMapFunc) { + if (kind == tqunicodeMapFunc) { return (*func)(u, buf, bufSize); } @@ -219,7 +219,7 @@ int UnicodeMap::mapUnicode(Unicode u, char *buf, int bufSize) { UnicodeMapCache::UnicodeMapCache() { int i; - for (i = 0; i < unicodeMapCacheSize; ++i) { + for (i = 0; i < tqunicodeMapCacheSize; ++i) { cache[i] = NULL; } } @@ -227,7 +227,7 @@ UnicodeMapCache::UnicodeMapCache() { UnicodeMapCache::~UnicodeMapCache() { int i; - for (i = 0; i < unicodeMapCacheSize; ++i) { + for (i = 0; i < tqunicodeMapCacheSize; ++i) { if (cache[i]) { cache[i]->decRefCnt(); } @@ -242,7 +242,7 @@ UnicodeMap *UnicodeMapCache::getUnicodeMap(GString *encodingName) { cache[0]->incRefCnt(); return cache[0]; } - for (i = 1; i < unicodeMapCacheSize; ++i) { + for (i = 1; i < tqunicodeMapCacheSize; ++i) { if (cache[i] && cache[i]->match(encodingName)) { map = cache[i]; for (j = i; j >= 1; --j) { @@ -254,10 +254,10 @@ UnicodeMap *UnicodeMapCache::getUnicodeMap(GString *encodingName) { } } if ((map = UnicodeMap::parse(encodingName))) { - if (cache[unicodeMapCacheSize - 1]) { - cache[unicodeMapCacheSize - 1]->decRefCnt(); + if (cache[tqunicodeMapCacheSize - 1]) { + cache[tqunicodeMapCacheSize - 1]->decRefCnt(); } - for (j = unicodeMapCacheSize - 1; j >= 1; --j) { + for (j = tqunicodeMapCacheSize - 1; j >= 1; --j) { cache[j] = cache[j - 1]; } cache[0] = map; diff --git a/filters/kword/pdf/xpdf/xpdf/UnicodeMap.h b/filters/kword/pdf/xpdf/xpdf/UnicodeMap.h index 189f3154..35506aab 100644 --- a/filters/kword/pdf/xpdf/xpdf/UnicodeMap.h +++ b/filters/kword/pdf/xpdf/xpdf/UnicodeMap.h @@ -25,9 +25,9 @@ class GString; //------------------------------------------------------------------------ enum UnicodeMapKind { - unicodeMapUser, // read from a file - unicodeMapResident, // static list of ranges - unicodeMapFunc // function pointer + tqunicodeMapUser, // read from a file + tqunicodeMapResident, // static list of ranges + tqunicodeMapFunc // function pointer }; typedef int (*UnicodeMapFunc)(Unicode u, char *buf, int bufSize); @@ -49,12 +49,12 @@ public: static UnicodeMap *parse(GString *encodingNameA); // Create a resident UnicodeMap. - UnicodeMap(const char *encodingNameA, GBool unicodeOutA, + UnicodeMap(const char *encodingNameA, GBool tqunicodeOutA, UnicodeMapRange *rangesA, int lenA); // Create a resident UnicodeMap that uses a function instead of a // list of ranges. - UnicodeMap(const char *encodingNameA, GBool unicodeOutA, + UnicodeMap(const char *encodingNameA, GBool tqunicodeOutA, UnicodeMapFunc funcA); ~UnicodeMap(); @@ -64,7 +64,7 @@ public: GString *getEncodingName() { return encodingName; } - GBool isUnicode() { return unicodeOut; } + GBool isUnicode() { return tqunicodeOut; } // Return true if this UnicodeMap matches the specified // <encodingNameA>. @@ -82,7 +82,7 @@ private: GString *encodingName; UnicodeMapKind kind; - GBool unicodeOut; + GBool tqunicodeOut; union { UnicodeMapRange *ranges; // (user, resident) UnicodeMapFunc func; // (func) @@ -95,7 +95,7 @@ private: //------------------------------------------------------------------------ -#define unicodeMapCacheSize 4 +#define tqunicodeMapCacheSize 4 class UnicodeMapCache { public: @@ -110,7 +110,7 @@ public: private: - UnicodeMap *cache[unicodeMapCacheSize]; + UnicodeMap *cache[tqunicodeMapCacheSize]; }; #endif diff --git a/filters/kword/pdf/xpdf/xpdf/XOutputDev.cc b/filters/kword/pdf/xpdf/xpdf/XOutputDev.cc index 3c58f565..f172ac41 100644 --- a/filters/kword/pdf/xpdf/xpdf/XOutputDev.cc +++ b/filters/kword/pdf/xpdf/xpdf/XOutputDev.cc @@ -1627,7 +1627,7 @@ XOutputDev::XOutputDev(Display *displayA, int screenNumA, XVisualInfo visualTempl; XVisualInfo *visualList; int nVisuals; - Gulong mask; + Gulong tqmask; XColor xcolor; XColor *xcolors; int r, g, b, n, m; @@ -1662,18 +1662,18 @@ XOutputDev::XOutputDev(Display *displayA, int screenNumA, depth = visualList->depth; if (visualList->c_class == TrueColor) { trueColor = gTrue; - for (mask = visualList->red_mask, rShift = 0; - mask && !(mask & 1); - mask >>= 1, ++rShift) ; - rMul = (int)mask; - for (mask = visualList->green_mask, gShift = 0; - mask && !(mask & 1); - mask >>= 1, ++gShift) ; - gMul = (int)mask; - for (mask = visualList->blue_mask, bShift = 0; - mask && !(mask & 1); - mask >>= 1, ++bShift) ; - bMul = (int)mask; + for (tqmask = visualList->red_tqmask, rShift = 0; + tqmask && !(tqmask & 1); + tqmask >>= 1, ++rShift) ; + rMul = (int)tqmask; + for (tqmask = visualList->green_tqmask, gShift = 0; + tqmask && !(tqmask & 1); + tqmask >>= 1, ++gShift) ; + gMul = (int)tqmask; + for (tqmask = visualList->blue_tqmask, bShift = 0; + tqmask && !(tqmask & 1); + tqmask >>= 1, ++bShift) ; + bMul = (int)tqmask; } else { trueColor = gFalse; } @@ -3162,7 +3162,7 @@ void XOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str, XGetSubImage(display, pixmap, cx0, cy0, cw, ch, (1 << depth) - 1, ZPixmap, image, cx1, cy1); - // get mask color + // get tqmask color state->getFillRGB(&rgb); if (reverseVideo) { rgb.r = 1 - rgb.r; @@ -3294,7 +3294,7 @@ void XOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str, void XOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, - int *maskColors, GBool inlineImg) { + int *tqmaskColors, GBool inlineImg) { ImageStream *imgStr; XImage *image; int nComps, nVals, nBits; @@ -3464,7 +3464,7 @@ void XOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, // allocate pixel buffer pixBuf = (GfxRGB *)gmalloc((yp + 1) * width * sizeof(GfxRGB)); - if (maskColors) { + if (tqmaskColors) { alphaBuf = (Guchar *)gmalloc((yp + 1) * width * sizeof(Guchar)); } else { alphaBuf = NULL; @@ -3475,11 +3475,11 @@ void XOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, image->data = (char *)gmalloc(bh * image->bytes_per_line); // if the transform is anything other than a 0/90/180/270 degree - // rotation/flip, or if there is color key masking, read the + // rotation/flip, or if there is color key tqmasking, read the // backgound pixmap to fill in the corners if (!((ulx == llx && uly == ury) || (uly == lly && ulx == urx)) || - maskColors) { + tqmaskColors) { XGetSubImage(display, pixmap, cx0, cy0, cw, ch, (1 << depth) - 1, ZPixmap, image, cx1, cy1); } @@ -3540,8 +3540,8 @@ void XOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, if (q) { *q = 1; for (k = 0; k < nComps; ++k) { - if (p2[k] < maskColors[2*k] || - p2[k] > maskColors[2*k]) { + if (p2[k] < tqmaskColors[2*k] || + p2[k] > tqmaskColors[2*k]) { *q = 0; break; } @@ -3657,7 +3657,7 @@ void XOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, // free memory delete imgStr; gfree(pixBuf); - if (maskColors) { + if (tqmaskColors) { gfree(alphaBuf); } gfree(image->data); diff --git a/filters/kword/pdf/xpdf/xpdf/XOutputDev.h b/filters/kword/pdf/xpdf/xpdf/XOutputDev.h index e4974f31..0d97af89 100644 --- a/filters/kword/pdf/xpdf/xpdf/XOutputDev.h +++ b/filters/kword/pdf/xpdf/xpdf/XOutputDev.h @@ -569,7 +569,7 @@ public: GBool inlineImg); virtual void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, - int *maskColors, GBool inlineImg); + int *tqmaskColors, GBool inlineImg); //----- Type 3 font operators virtual void type3D0(GfxState *state, double wx, double wy); diff --git a/filters/kword/pdf/xpdf/xpdf/XPDFApp.cc b/filters/kword/pdf/xpdf/xpdf/XPDFApp.cc index e456310b..d0bda665 100644 --- a/filters/kword/pdf/xpdf/xpdf/XPDFApp.cc +++ b/filters/kword/pdf/xpdf/xpdf/XPDFApp.cc @@ -54,8 +54,8 @@ static XrmOptionDescRec xOpts[] = { {"-fg", "*Foreground", XrmoptionSepArg, NULL}, {"-background", "*Background", XrmoptionSepArg, NULL}, {"-bg", "*Background", XrmoptionSepArg, NULL}, - {"-geometry", ".geometry", XrmoptionSepArg, NULL}, - {"-g", ".geometry", XrmoptionSepArg, NULL}, + {"-tqgeometry", ".tqgeometry", XrmoptionSepArg, NULL}, + {"-g", ".tqgeometry", XrmoptionSepArg, NULL}, {"-font", "*.fontList", XrmoptionSepArg, NULL}, {"-fn", "*.fontList", XrmoptionSepArg, NULL}, {"-title", ".title", XrmoptionSepArg, NULL}, @@ -69,7 +69,7 @@ static XrmOptionDescRec xOpts[] = { #define nXOpts (sizeof(xOpts) / sizeof(XrmOptionDescRec)) struct XPDFAppResources { - String geometry; + String tqgeometry; String title; Bool installCmap; int rgbCubeSize; @@ -85,7 +85,7 @@ static Bool defReverseVideo = False; static Bool defViKeys = False; static XtResource xResources[] = { - { "geometry", "Geometry", XtRString, sizeof(String), XtOffsetOf(XPDFAppResources, geometry), XtRString, (XtPointer)NULL }, + { "geometry", "Geometry", XtRString, sizeof(String), XtOffsetOf(XPDFAppResources, tqgeometry), XtRString, (XtPointer)NULL }, { "title", "Title", XtRString, sizeof(String), XtOffsetOf(XPDFAppResources, title), XtRString, (XtPointer)NULL }, { "installCmap", "InstallCmap", XtRBool, sizeof(Bool), XtOffsetOf(XPDFAppResources, installCmap), XtRBool, (XtPointer)&defInstallCmap }, { "rgbCubeSize", "RgbCubeSize", XtRInt, sizeof(int), XtOffsetOf(XPDFAppResources, rgbCubeSize), XtRInt, (XtPointer)&defRGBCubeSize }, @@ -156,7 +156,7 @@ void XPDFApp::getResources() { XtGetApplicationResources(appShell, &resources, xResources, nXResources, NULL, 0); - geometry = resources.geometry ? new GString(resources.geometry) + tqgeometry = resources.tqgeometry ? new GString(resources.tqgeometry) : (GString *)NULL; title = resources.title ? new GString(resources.title) : (GString *)NULL; installCmap = (GBool)resources.installCmap; @@ -180,8 +180,8 @@ void XPDFApp::getResources() { XPDFApp::~XPDFApp() { deleteGList(viewers, XPDFViewer); - if (geometry) { - delete geometry; + if (tqgeometry) { + delete tqgeometry; } if (title) { delete title; diff --git a/filters/kword/pdf/xpdf/xpdf/XPDFApp.h b/filters/kword/pdf/xpdf/xpdf/XPDFApp.h index 4875456e..46aa28dc 100644 --- a/filters/kword/pdf/xpdf/xpdf/XPDFApp.h +++ b/filters/kword/pdf/xpdf/xpdf/XPDFApp.h @@ -58,7 +58,7 @@ public: void remoteQuit(); //----- resource/option values - GString *getGeometry() { return geometry; } + GString *getGeometry() { return tqgeometry; } GString *getTitle() { return title; } GBool getInstallCmap() { return installCmap; } int getRGBCubeSize() { return rgbCubeSize; } @@ -90,7 +90,7 @@ private: Widget remoteWin; //----- resource/option values - GString *geometry; + GString *tqgeometry; GString *title; GBool installCmap; int rgbCubeSize; diff --git a/filters/kword/pdf/xpdf/xpdf/XPDFCore.cc b/filters/kword/pdf/xpdf/xpdf/XPDFCore.cc index 8376ce97..a7897358 100644 --- a/filters/kword/pdf/xpdf/xpdf/XPDFCore.cc +++ b/filters/kword/pdf/xpdf/xpdf/XPDFCore.cc @@ -106,16 +106,16 @@ XPDFCore *XPDFCore::currentSelectionOwner = NULL; // XPDFCore //------------------------------------------------------------------------ -XPDFCore::XPDFCore(Widget shellA, Widget parentWidgetA, +XPDFCore::XPDFCore(Widget shellA, Widget tqparentWidgetA, Gulong paperColorA, GBool fullScreenA, GBool reverseVideo, GBool installCmap, int rgbCubeSize) { GString *initialZoom; int i; shell = shellA; - parentWidget = parentWidgetA; - display = XtDisplay(parentWidget); - screenNum = XScreenNumberOfScreen(XtScreen(parentWidget)); + tqparentWidget = tqparentWidgetA; + display = XtDisplay(tqparentWidget); + screenNum = XScreenNumberOfScreen(XtScreen(tqparentWidget)); paperColor = paperColorA; fullScreen = fullScreenA; @@ -302,7 +302,7 @@ int XPDFCore::loadFile(GString *fileName, GString *ownerPassword, // save the modification time modTime = getModTime(doc->getFileName()->getCString()); - // update the parent window + // update the tqparent window if (updateCbk) { (*updateCbk)(updateCbkData, doc->getFileName(), -1, doc->getNumPages(), NULL); @@ -495,7 +495,7 @@ void XPDFCore::displayPage(int pageA, int zoomA, int rotateA, historyFLen = 0; } - // update the parent window + // update the tqparent window if (updateCbk) { (*updateCbk)(updateCbkData, NULL, page, -1, ""); } @@ -1231,10 +1231,10 @@ void XPDFCore::runCommand(GString *cmdFmt, GString *arg) { //------------------------------------------------------------------------ -// find +// tqfind //------------------------------------------------------------------------ -void XPDFCore::find(char *s) { +void XPDFCore::tqfind(char *s) { Unicode *u; TextOutputDev *textOut; int xMin, yMin, xMax, yMax; @@ -1364,7 +1364,7 @@ void XPDFCore::initWindow() { n = 0; XtSetArg(args[n], XmNscrollingPolicy, XmAPPLICATION_DEFINED); ++n; XtSetArg(args[n], XmNvisualPolicy, XmVARIABLE); ++n; - scrolledWin = XmCreateScrolledWindow(parentWidget, "scroll", args, n); + scrolledWin = XmCreateScrolledWindow(tqparentWidget, "scroll", args, n); XtManageChild(scrolledWin); n = 0; XtSetArg(args[n], XmNorientation, XmHORIZONTAL); ++n; diff --git a/filters/kword/pdf/xpdf/xpdf/XPDFCore.h b/filters/kword/pdf/xpdf/xpdf/XPDFCore.h index 348486f0..25c26f6b 100644 --- a/filters/kword/pdf/xpdf/xpdf/XPDFCore.h +++ b/filters/kword/pdf/xpdf/xpdf/XPDFCore.h @@ -84,8 +84,8 @@ typedef GString *(*XPDFReqPasswordCbk)(void *data, GBool again); class XPDFCore { public: - // Create viewer core inside <parentWidgetA>. - XPDFCore(Widget shellA, Widget parentWidgetA, + // Create viewer core inside <tqparentWidgetA>. + XPDFCore(Widget shellA, Widget tqparentWidgetA, Gulong paperColorA, GBool fullScreenA, GBool reverseVideo, GBool installCmap, int rgbCubeSize); @@ -142,9 +142,9 @@ public: void doAction(LinkAction *action); - //----- find + //----- tqfind - void find(char *s); + void tqfind(char *s); //----- simple modal dialogs @@ -229,7 +229,7 @@ private: Visual *visual; Colormap colormap; Widget shell; // top-level shell containing the widget - Widget parentWidget; // parent widget (not created by XPDFCore) + Widget tqparentWidget; // tqparent widget (not created by XPDFCore) Widget scrolledWin; Widget hScrollBar; Widget vScrollBar; diff --git a/filters/kword/pdf/xpdf/xpdf/XPDFTree.cc b/filters/kword/pdf/xpdf/xpdf/XPDFTree.cc index 46e5466c..1ead3a27 100644 --- a/filters/kword/pdf/xpdf/xpdf/XPDFTree.cc +++ b/filters/kword/pdf/xpdf/xpdf/XPDFTree.cc @@ -16,7 +16,7 @@ struct _XPDFTreeEntry { Widget widget; - XPDFTreeEntry *children; + XPDFTreeEntry *tqchildren; XPDFTreeEntry *next; }; @@ -41,7 +41,7 @@ static void setValuesAlmost(Widget oldWidget, Widget newWidget, static XtGeometryResult queryGeometry(Widget widget, XtWidgetGeometry *request, XtWidgetGeometry *reply); -static XtGeometryResult geometryManager(Widget widget, +static XtGeometryResult tqgeometryManager(Widget widget, XtWidgetGeometry *request, XtWidgetGeometry *reply); static void changeManaged(Widget widget); @@ -56,8 +56,8 @@ static void insertChildOnList(XPDFTreeEntry *e, XPDFTreeEntry **listHead); static void deleteChildFromList(XPDFTreeEntry *e, XPDFTreeEntry **listHead); static void createGC(Widget widget); static void destroyGC(Widget widget); -static void layout(Widget widget, Widget instigator); -static int layoutSubtree(XPDFTreeWidget w, Widget instigator, +static void tqlayout(Widget widget, Widget instigator); +static int tqlayoutSubtree(XPDFTreeWidget w, Widget instigator, XPDFTreeEntry *e, Position x, Position y, Boolean visible); static void calcSize(Widget widget, Widget instigator, @@ -66,7 +66,7 @@ static void calcSize(Widget widget, Widget instigator, static void calcSubtreeSize(XPDFTreeWidget w, Widget instigator, XPDFTreeEntry *e, Dimension *width, Dimension *height); -static Boolean needRelayout(Widget oldWidget, Widget newWidget); +static Boolean needRetqlayout(Widget oldWidget, Widget newWidget); static void click(Widget widget, XEvent *event, String *params, Cardinal *numParams); static Boolean findPosition(XPDFTreeWidget w, int x, int y, @@ -142,7 +142,7 @@ externaldef(xpdftreeclassrec) XPDFTreeClassRec xpdfTreeClassRec = { XtNumber(actions), // num_actions resources, // resources XtNumber(resources), // num_resources - NULLQUARK, // xrm_class + NULLTQUARK, // xrm_class TRUE, // compress_motion XtExposeCompressMaximal, // compress_exposure TRUE, // compress_enterleave @@ -158,12 +158,12 @@ externaldef(xpdftreeclassrec) XPDFTreeClassRec xpdfTreeClassRec = { XtVersion, // version NULL, // callback_private defaultTranslations, // tm_table - &queryGeometry, // query_geometry + &queryGeometry, // query_tqgeometry NULL, // display_accelerator NULL // extension }, { // Composite - &geometryManager, // geometry_manager + &tqgeometryManager, // tqgeometry_manager &changeManaged, // change_managed XtInheritInsertChild, // insert_child XtInheritDeleteChild, // delete_child @@ -189,15 +189,15 @@ externaldef(xpdftreeclassrec) XPDFTreeClassRec xpdfTreeClassRec = { #endif NULL, // syn_constraint_resources 0, // num_syn_constraint_res's - XmInheritParentProcess, // parent_process + XmInheritParentProcess, // tqparent_process NULL // extension }, { // XPDFTree &createGC, // createGC &destroyGC, // destroyGC - &layout, // layout + &tqlayout, // tqlayout &calcSize, // calcSize - &needRelayout, // needRelayout + &needRetqlayout, // needRetqlayout NULL // extension } }; @@ -218,14 +218,14 @@ static void classPartInitialize(WidgetClass widgetCls) { if (wc->treeClass.destroyGC == XPDFInheritDestroyGC) { wc->treeClass.destroyGC = sc->treeClass.destroyGC; } - if (wc->treeClass.layout == XPDFInheritLayout) { - wc->treeClass.layout = sc->treeClass.layout; + if (wc->treeClass.tqlayout == XPDFInheritLayout) { + wc->treeClass.tqlayout = sc->treeClass.tqlayout; } if (wc->treeClass.calcSize == XPDFInheritCalcSize) { wc->treeClass.calcSize = sc->treeClass.calcSize; } - if (wc->treeClass.needRelayout == XPDFInheritNeedRelayout) { - wc->treeClass.needRelayout = sc->treeClass.needRelayout; + if (wc->treeClass.needRetqlayout == XPDFInheritNeedRetqlayout) { + wc->treeClass.needRetqlayout = sc->treeClass.needRetqlayout; } } @@ -259,8 +259,8 @@ static void destroy(Widget widget) { } static void destroySubtree(XPDFTreeEntry *e) { - if (e->children) { - destroySubtree(e->children); + if (e->tqchildren) { + destroySubtree(e->tqchildren); } if (e->next) { destroySubtree(e->next); @@ -270,10 +270,10 @@ static void destroySubtree(XPDFTreeEntry *e) { static void resize(Widget widget) { XPDFTreeWidgetClass cls = (XPDFTreeWidgetClass)XtClass(widget); - if (cls->treeClass.layout) { - (*cls->treeClass.layout)(widget, NULL); + if (cls->treeClass.tqlayout) { + (*cls->treeClass.tqlayout)(widget, NULL); } else { - layout(widget, NULL); + tqlayout(widget, NULL); } } @@ -301,11 +301,11 @@ static void redisplaySubtree(XPDFTreeWidget w, XPDFTreeEntry *e, c = XPDFTreeCPart(e->widget); x = e->widget->core.x; y = e->widget->core.y + e->widget->core.height / 2; - if (e->children) { + if (e->tqchildren) { if (c->entryExpanded) { drawExpandedIcon(w, x - 8, y); y2 = y; // make gcc happy - for (child = e->children; child; child = child->next) { + for (child = e->tqchildren; child; child = child->next) { y2 = child->widget->core.y + child->widget->core.height / 2; XDrawLine(XtDisplay((Widget)w), XtWindow((Widget)w), w->tree.dottedGC, x - 8, y2, x + 6, y2); @@ -346,16 +346,16 @@ static Boolean setValues(Widget oldWidget, Widget requestWidget, XPDFTreeWidget ow = (XPDFTreeWidget)oldWidget; XPDFTreeWidget nw = (XPDFTreeWidget)newWidget; XPDFTreeWidgetClass cls = (XPDFTreeWidgetClass)XtClass(nw); - Boolean relayout, redisp; + Boolean retqlayout, redisp; - // check to see if layout-affecting resources have changed - if (cls->treeClass.needRelayout) { - relayout = (*cls->treeClass.needRelayout)((Widget)ow, (Widget)nw); + // check to see if tqlayout-affecting resources have changed + if (cls->treeClass.needRetqlayout) { + retqlayout = (*cls->treeClass.needRetqlayout)((Widget)ow, (Widget)nw); } else { - relayout = needRelayout((Widget)ow, (Widget)nw); + retqlayout = needRetqlayout((Widget)ow, (Widget)nw); } redisp = False; - if (relayout) { + if (retqlayout) { // calculate a new ideal size (reset the widget size first so // calcSize will compute a new one) @@ -372,14 +372,14 @@ static Boolean setValues(Widget oldWidget, Widget requestWidget, calcSize((Widget)nw, NULL, &nw->core.width, &nw->core.height); } - // if resources have changed but size hasn't, layout manually + // if resources have changed but size hasn't, tqlayout manually // (because Xt just looks at the size) if (nw->core.width == ow->core.width && nw->core.height == ow->core.height) { - if (cls->treeClass.layout) { - (*cls->treeClass.layout)((Widget)nw, NULL); + if (cls->treeClass.tqlayout) { + (*cls->treeClass.tqlayout)((Widget)nw, NULL); } else { - layout((Widget)nw, NULL); + tqlayout((Widget)nw, NULL); } redisp = True; } @@ -393,13 +393,13 @@ static void setValuesAlmost(Widget oldWidget, Widget newWidget, XtWidgetGeometry *reply) { XPDFTreeWidgetClass cls = (XPDFTreeWidgetClass)XtClass(newWidget); - // our parent rejected a geometry request, so accept the compromise - // and relayout + // our tqparent rejected a tqgeometry request, so accept the compromise + // and retqlayout if (!reply->request_mode) { - if (cls->treeClass.layout) { - (*cls->treeClass.layout)(newWidget, NULL); + if (cls->treeClass.tqlayout) { + (*cls->treeClass.tqlayout)(newWidget, NULL); } else { - layout(newWidget, NULL); + tqlayout(newWidget, NULL); } } *request = *reply; @@ -440,13 +440,13 @@ static XtGeometryResult queryGeometry(Widget widget, #endif } -static XtGeometryResult geometryManager(Widget widget, +static XtGeometryResult tqgeometryManager(Widget widget, XtWidgetGeometry *request, XtWidgetGeometry *reply) { XPDFTreeWidget w = (XPDFTreeWidget)XtParent(widget); XPDFTreeWidgetClass cls = (XPDFTreeWidgetClass)XtClass(w); Dimension curWidth, curHeight, curBW; - XtWidgetGeometry parentReq; + XtWidgetGeometry tqparentReq; XtGeometryResult result; // deny any requests for a new position @@ -454,7 +454,7 @@ static XtGeometryResult geometryManager(Widget widget, return XtGeometryNo; } - // save the current geometry + // save the current tqgeometry curWidth = w->core.width; curHeight = w->core.height; curBW = w->core.border_width; @@ -471,35 +471,35 @@ static XtGeometryResult geometryManager(Widget widget, } // calculate the new ideal size - parentReq.width = 0; - parentReq.height = 0; + tqparentReq.width = 0; + tqparentReq.height = 0; if (cls->treeClass.calcSize) { (*cls->treeClass.calcSize)((Widget)w, widget, - &parentReq.width, &reply->height); + &tqparentReq.width, &reply->height); } else { - calcSize((Widget)w, widget, &parentReq.width, &reply->height); + calcSize((Widget)w, widget, &tqparentReq.width, &reply->height); } - // send geometry request to our parent - parentReq.request_mode = CWWidth | CWHeight; + // send tqgeometry request to our tqparent + tqparentReq.request_mode = CWWidth | CWHeight; if (request->request_mode & XtCWQueryOnly) { - parentReq.request_mode |= XtCWQueryOnly; + tqparentReq.request_mode |= XtCWQueryOnly; } - result = XtMakeGeometryRequest((Widget)w, &parentReq, NULL); + result = XtMakeGeometryRequest((Widget)w, &tqparentReq, NULL); if (result == XtGeometryAlmost) { result = XtGeometryNo; } if (result == XtGeometryNo || (request->request_mode & XtCWQueryOnly)) { - // restore the original geometry + // restore the original tqgeometry w->core.width = curWidth; w->core.height = curHeight; w->core.border_width = curBW; } else { - if (cls->treeClass.layout) { - (*cls->treeClass.layout)((Widget)w, widget); + if (cls->treeClass.tqlayout) { + (*cls->treeClass.tqlayout)((Widget)w, widget); } else { - layout((Widget)w, widget); + tqlayout((Widget)w, widget); } } @@ -524,16 +524,16 @@ static void changeManaged(Widget widget) { calcSize(widget, NULL, &width, &height); } - // make resize request to parent -- keep asking until we get a yes + // make resize request to tqparent -- keep asking until we get a yes // or no while (XtMakeResizeRequest(widget, width, height, &width, &height) == XtGeometryAlmost) ; - // relayout - if (cls->treeClass.layout) { - (*cls->treeClass.layout)(widget, NULL); + // retqlayout + if (cls->treeClass.tqlayout) { + (*cls->treeClass.tqlayout)(widget, NULL); } else { - layout(widget, NULL); + tqlayout(widget, NULL); } #if XmVERSION > 1 @@ -552,10 +552,10 @@ static void initConstraint(Widget requestWidget, Widget newWidget, c = XPDFTreeCPart(newWidget); c->e = (XPDFTreeEntry *)gmalloc(sizeof(XPDFTreeEntry)); c->e->widget = newWidget; - c->e->children = NULL; + c->e->tqchildren = NULL; c->e->next = NULL; if (c->entryParent) { - insertChildOnList(c->e, &XPDFTreeCPart(c->entryParent)->e->children); + insertChildOnList(c->e, &XPDFTreeCPart(c->entryParent)->e->tqchildren); } else { insertChildOnList(c->e, &w->tree.root); } @@ -573,11 +573,11 @@ static void deleteSubtree(Widget widget) { if (!c->e) { return; } - while (c->e->children) { - deleteSubtree(c->e->children->widget); + while (c->e->tqchildren) { + deleteSubtree(c->e->tqchildren->widget); } if (c->entryParent) { - deleteChildFromList(c->e, &XPDFTreeCPart(c->entryParent)->e->children); + deleteChildFromList(c->e, &XPDFTreeCPart(c->entryParent)->e->tqchildren); } else { deleteChildFromList(c->e, &w->tree.root); } @@ -591,7 +591,7 @@ static Boolean constraintSetValues(Widget oldWidget, Widget requestWidget, XPDFTreeWidget w = (XPDFTreeWidget)XtParent(newWidget); XPDFTreeWidgetClass cls = (XPDFTreeWidgetClass)XtClass((Widget)w); XPDFTreeConstraint oc, nc; - Boolean relayout; + Boolean retqlayout; Dimension width, height; if (!XtIsManaged(newWidget)) { @@ -599,25 +599,25 @@ static Boolean constraintSetValues(Widget oldWidget, Widget requestWidget, } oc = XPDFTreeCPart(oldWidget); nc = XPDFTreeCPart(newWidget); - relayout = False; + retqlayout = False; if (nc->entryParent != oc->entryParent || nc->entryPosition != oc->entryPosition) { if (oc->entryParent) { - deleteChildFromList(oc->e, &XPDFTreeCPart(oc->entryParent)->e->children); + deleteChildFromList(oc->e, &XPDFTreeCPart(oc->entryParent)->e->tqchildren); } else { deleteChildFromList(oc->e, &w->tree.root); } if (nc->entryParent) { - insertChildOnList(nc->e, &XPDFTreeCPart(nc->entryParent)->e->children); + insertChildOnList(nc->e, &XPDFTreeCPart(nc->entryParent)->e->tqchildren); } else { insertChildOnList(nc->e, &w->tree.root); } - relayout = True; + retqlayout = True; } else if (nc->entryExpanded != oc->entryExpanded) { - relayout = True; + retqlayout = True; } - if (relayout) { + if (retqlayout) { // calculate a new ideal size (reset the widget size first so // calcSize will compute a new one) @@ -629,20 +629,20 @@ static Boolean constraintSetValues(Widget oldWidget, Widget requestWidget, calcSize((Widget)w, NULL, &width, &height); } - // make resize request to parent -- keep asking until we get a yes + // make resize request to tqparent -- keep asking until we get a yes // or no while (XtMakeResizeRequest((Widget)w, width, height, &width, &height) == XtGeometryAlmost) ; - // relayout the widget - if (cls->treeClass.layout) { - (*cls->treeClass.layout)((Widget)w, NULL); + // retqlayout the widget + if (cls->treeClass.tqlayout) { + (*cls->treeClass.tqlayout)((Widget)w, NULL); } else { - layout((Widget)w, NULL); + tqlayout((Widget)w, NULL); } } - return relayout; + return retqlayout; } static void insertChildOnList(XPDFTreeEntry *e, XPDFTreeEntry **listHead) { @@ -701,7 +701,7 @@ static void destroyGC(Widget widget) { XtReleaseGC(widget, w->tree.dottedGC); } -static void layout(Widget widget, Widget instigator) { +static void tqlayout(Widget widget, Widget instigator) { XPDFTreeWidget w = (XPDFTreeWidget)widget; XPDFTreeEntry *e; Position x, y; @@ -709,11 +709,11 @@ static void layout(Widget widget, Widget instigator) { x = w->tree.marginWidth + xpdfTreeIndent; y = w->tree.marginHeight; for (e = w->tree.root; e; e = e->next) { - y = layoutSubtree(w, instigator, e, x, y, True); + y = tqlayoutSubtree(w, instigator, e, x, y, True); } } -static int layoutSubtree(XPDFTreeWidget w, Widget instigator, +static int tqlayoutSubtree(XPDFTreeWidget w, Widget instigator, XPDFTreeEntry *e, Position x, Position y, Boolean visible) { Widget ew; @@ -745,10 +745,10 @@ static int layoutSubtree(XPDFTreeWidget w, Widget instigator, } } - // place this entry's children + // place this entry's tqchildren x += xpdfTreeIndent; - for (child = e->children; child; child = child->next) { - y = layoutSubtree(w, instigator, child, x, y, + for (child = e->tqchildren; child; child = child->next) { + y = tqlayoutSubtree(w, instigator, child, x, y, visible && (!c || c->entryExpanded)); } @@ -820,9 +820,9 @@ static void calcSubtreeSize(XPDFTreeWidget w, Widget instigator, h1 = 0; } - // if this entry is expanded, get size of all of its children + // if this entry is expanded, get size of all of its tqchildren if (c->entryExpanded) { - for (child = e->children; child; child = child->next) { + for (child = e->tqchildren; child; child = child->next) { calcSubtreeSize(w, instigator, child, &w2, &h2); w2 += xpdfTreeIndent; if (w2 > w1) { @@ -836,7 +836,7 @@ static void calcSubtreeSize(XPDFTreeWidget w, Widget instigator, *height = h1; } -static Boolean needRelayout(Widget oldWidget, Widget newWidget) { +static Boolean needRetqlayout(Widget oldWidget, Widget newWidget) { XPDFTreeWidget ow = (XPDFTreeWidget)oldWidget; XPDFTreeWidget nw = (XPDFTreeWidget)newWidget; @@ -907,13 +907,13 @@ static Boolean findPositionInSubtree(XPDFTreeWidget w, int x, int y, return True; } else if (x >= child->core.x - 16 && x < child->core.x - 4 && y >= y1 - 6 && y < y1 + 6 && - (*e)->children) { + (*e)->tqchildren) { *onExpandIcon = True; return True; } c = XPDFTreeCPart(child); if (!c || c->entryExpanded) { - for (e2 = (*e)->children; e2; e2 = e2->next) { + for (e2 = (*e)->tqchildren; e2; e2 = e2->next) { *e = e2; if (findPositionInSubtree(w, x, y, e, onExpandIcon)) { return True; @@ -923,7 +923,7 @@ static Boolean findPositionInSubtree(XPDFTreeWidget w, int x, int y, return False; } -Widget XPDFCreateTree(Widget parent, char *name, +Widget XPDFCreateTree(Widget tqparent, char *name, ArgList argList, Cardinal numArgs) { - return XtCreateWidget(name, xpdfTreeWidgetClass, parent, argList, numArgs); + return XtCreateWidget(name, xpdfTreeWidgetClass, tqparent, argList, numArgs); } diff --git a/filters/kword/pdf/xpdf/xpdf/XPDFTree.h b/filters/kword/pdf/xpdf/xpdf/XPDFTree.h index d569f498..93e3fb77 100644 --- a/filters/kword/pdf/xpdf/xpdf/XPDFTree.h +++ b/filters/kword/pdf/xpdf/xpdf/XPDFTree.h @@ -35,7 +35,7 @@ typedef struct { Widget selectedItem; } XPDFTreeSelectCallbackStruct; -extern Widget XPDFCreateTree(Widget parent, char *name, +extern Widget XPDFCreateTree(Widget tqparent, char *name, ArgList argList, Cardinal argCount); } // extern "C" diff --git a/filters/kword/pdf/xpdf/xpdf/XPDFTreeP.h b/filters/kword/pdf/xpdf/xpdf/XPDFTreeP.h index 16ab137a..fecc2572 100644 --- a/filters/kword/pdf/xpdf/xpdf/XPDFTreeP.h +++ b/filters/kword/pdf/xpdf/xpdf/XPDFTreeP.h @@ -16,20 +16,20 @@ typedef void (*XPDFLayoutProc)(Widget widget, Widget instigator); typedef void (*XPDFCalcSizeProc)(Widget widget, Widget instigator, Dimension *totalWidth, Dimension *totalHeight); -typedef Boolean (*XPDFNeedRelayoutProc)(Widget oldWidget, Widget newWidget); +typedef Boolean (*XPDFNeedRetqlayoutProc)(Widget oldWidget, Widget newWidget); #define XPDFInheritCreateGC ((XtWidgetProc)_XtInherit) #define XPDFInheritDestroyGC ((XtWidgetProc)_XtInherit) #define XPDFInheritLayout ((XPDFLayoutProc)_XtInherit) #define XPDFInheritCalcSize ((XPDFCalcSizeProc)_XtInherit) -#define XPDFInheritNeedRelayout ((XPDFNeedRelayoutProc)_XtInherit) +#define XPDFInheritNeedRetqlayout ((XPDFNeedRetqlayoutProc)_XtInherit) typedef struct { XtWidgetProc createGC; XtWidgetProc destroyGC; - XPDFLayoutProc layout; + XPDFLayoutProc tqlayout; XPDFCalcSizeProc calcSize; - XPDFNeedRelayoutProc needRelayout; + XPDFNeedRetqlayoutProc needRetqlayout; XtPointer extension; } XPDFTreeClassPart; diff --git a/filters/kword/pdf/xpdf/xpdf/XPDFViewer.cc b/filters/kword/pdf/xpdf/xpdf/XPDFViewer.cc index a8c8f8f0..cf2ea6d0 100644 --- a/filters/kword/pdf/xpdf/xpdf/XPDFViewer.cc +++ b/filters/kword/pdf/xpdf/xpdf/XPDFViewer.cc @@ -501,9 +501,9 @@ void XPDFViewer::initWindow() { XtSetArg(args[n], XmNdeleteResponse, XmDO_NOTHING); ++n; if (app->getFullScreen()) { XtSetArg(args[n], XmNmwmDecorations, 0); ++n; - XtSetArg(args[n], XmNgeometry, "+0+0"); ++n; + XtSetArg(args[n], XmNtqgeometry, "+0+0"); ++n; } else if (app->getGeometry()) { - XtSetArg(args[n], XmNgeometry, app->getGeometry()->getCString()); ++n; + XtSetArg(args[n], XmNtqgeometry, app->getGeometry()->getCString()); ++n; } win = XtCreatePopupShell("win", topLevelShellWidgetClass, app->getAppShell(), args, n); @@ -633,7 +633,7 @@ void XPDFViewer::initWindow() { XtSetArg(args[n], XmNbottomAttachment, XmATTACH_FORM); ++n; s = XmStringCreateLocalized(" of 00000"); XtSetArg(args[n], XmNlabelString, s); ++n; - XtSetArg(args[n], XmNalignment, XmALIGNMENT_BEGINNING); ++n; + XtSetArg(args[n], XmNtqalignment, XmALIGNMENT_BEGINNING); ++n; XtSetArg(args[n], XmNrecomputeSize, False); ++n; pageCountLabel = XmCreateLabel(toolBar, "pageCountLabel", args, n); XmStringFree(s); @@ -690,7 +690,7 @@ void XPDFViewer::initWindow() { zoomMenu = XmCreateOptionMenu(toolBar, "zoomMenu", args, n); XtManageChild(zoomMenu); - // find/print/about buttons + // tqfind/print/about buttons n = 0; XtSetArg(args[n], XmNleftAttachment, XmATTACH_WIDGET); ++n; XtSetArg(args[n], XmNleftWidget, zoomMenu); ++n; @@ -698,7 +698,7 @@ void XPDFViewer::initWindow() { XtSetArg(args[n], XmNbottomAttachment, XmATTACH_FORM); ++n; XtSetArg(args[n], XmNmarginWidth, 6); ++n; XtSetArg(args[n], XmNlabelString, emptyString); ++n; - findBtn = XmCreatePushButton(toolBar, "find", args, n); + findBtn = XmCreatePushButton(toolBar, "tqfind", args, n); XtManageChild(findBtn); XtAddCallback(findBtn, XmNactivateCallback, &findCbk, (XtPointer)this); @@ -751,7 +751,7 @@ void XPDFViewer::initWindow() { s = XmStringCreateLocalized(""); XtSetArg(args[n], XmNlabelString, s); ++n; XtSetArg(args[n], XmNrecomputeSize, True); ++n; - XtSetArg(args[n], XmNalignment, XmALIGNMENT_BEGINNING); ++n; + XtSetArg(args[n], XmNtqalignment, XmALIGNMENT_BEGINNING); ++n; linkLabel = XmCreateLabel(toolBar, "linkLabel", args, n); XmStringFree(s); XtManageChild(linkLabel); @@ -1484,7 +1484,7 @@ void XPDFViewer::setupOutline() { XtManageChildren(outlineLabels, outlineLabelsLength); } -void XPDFViewer::setupOutlineItems(GList *items, Widget parent, +void XPDFViewer::setupOutlineItems(GList *items, Widget tqparent, UnicodeMap *uMap) { OutlineItem *item; GList *kids; @@ -1504,8 +1504,8 @@ void XPDFViewer::setupOutlineItems(GList *items, Widget parent, } n = 0; XtSetArg(args[n], XPDFNentryPosition, i); ++n; - if (parent) { - XtSetArg(args[n], XPDFNentryParent, parent); ++n; + if (tqparent) { + XtSetArg(args[n], XPDFNentryParent, tqparent); ++n; } XtSetArg(args[n], XPDFNentryExpanded, item->isOpen()); ++n; s = XmStringCreateLocalized(title->getCString()); @@ -1741,7 +1741,7 @@ void XPDFViewer::openOkCbk(Widget widget, XtPointer ptr, } //------------------------------------------------------------------------ -// GUI code: "find" dialog +// GUI code: "tqfind" dialog //------------------------------------------------------------------------ void XPDFViewer::initFindDialog() { @@ -1780,7 +1780,7 @@ void XPDFViewer::initFindDialog() { findText = XmCreateTextField(row1, "text", args, n); XtManageChild(findText); - //----- "find" and "close" buttons + //----- "tqfind" and "close" buttons n = 0; XtSetArg(args[n], XmNtopAttachment, XmATTACH_WIDGET); ++n; XtSetArg(args[n], XmNtopWidget, row1); ++n; @@ -1816,7 +1816,7 @@ void XPDFViewer::findFindCbk(Widget widget, XtPointer ptr, XtPointer callData) { XPDFViewer *viewer = (XPDFViewer *)ptr; - viewer->core->find(XmTextFieldGetString(viewer->findText)); + viewer->core->tqfind(XmTextFieldGetString(viewer->findText)); } void XPDFViewer::findCloseCbk(Widget widget, XtPointer ptr, diff --git a/filters/kword/pdf/xpdf/xpdf/XPDFViewer.h b/filters/kword/pdf/xpdf/xpdf/XPDFViewer.h index 77875c41..df606395 100644 --- a/filters/kword/pdf/xpdf/xpdf/XPDFViewer.h +++ b/filters/kword/pdf/xpdf/xpdf/XPDFViewer.h @@ -124,7 +124,7 @@ private: //----- GUI code: outline #ifndef DISABLE_OUTLINE void setupOutline(); - void setupOutlineItems(GList *items, Widget parent, UnicodeMap *uMap); + void setupOutlineItems(GList *items, Widget tqparent, UnicodeMap *uMap); static void outlineSelectCbk(Widget widget, XtPointer ptr, XtPointer callData); #endif @@ -139,7 +139,7 @@ private: static void openOkCbk(Widget widget, XtPointer ptr, XtPointer callData); - //----- GUI code: "find" dialog + //----- GUI code: "tqfind" dialog void initFindDialog(); static void findFindCbk(Widget widget, XtPointer ptr, XtPointer callData); diff --git a/filters/kword/pdf/xpdf/xpdf/xpdf.cc b/filters/kword/pdf/xpdf/xpdf/xpdf.cc index ef47fb6e..d4103df2 100644 --- a/filters/kword/pdf/xpdf/xpdf/xpdf.cc +++ b/filters/kword/pdf/xpdf/xpdf/xpdf.cc @@ -44,9 +44,9 @@ static GBool printHelp = gFalse; static ArgDesc argDesc[] = { {"-g", argStringDummy, NULL, 0, - "initial window geometry"}, - {"-geometry", argStringDummy, NULL, 0, - "initial window geometry"}, + "initial window tqgeometry"}, + {"-tqgeometry", argStringDummy, NULL, 0, + "initial window tqgeometry"}, {"-title", argStringDummy, NULL, 0, "window title"}, {"-cmap", argFlagDummy, NULL, 0, diff --git a/filters/kword/rtf/export/ExportFilter.cc b/filters/kword/rtf/export/ExportFilter.cc index a2fb8827..da43d2a4 100644 --- a/filters/kword/rtf/export/ExportFilter.cc +++ b/filters/kword/rtf/export/ExportFilter.cc @@ -20,17 +20,17 @@ * Boston, MA 02110-1301, USA. */ -#include <qstring.h> -#include <qtextcodec.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qfontinfo.h> -#include <qfontdatabase.h> -#include <qpicture.h> -#include <qimage.h> -#include <qregexp.h> -#include <qcolor.h> -#include <qdatetime.h> +#include <tqstring.h> +#include <tqtextcodec.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqfontinfo.h> +#include <tqfontdatabase.h> +#include <tqpicture.h> +#include <tqimage.h> +#include <tqregexp.h> +#include <tqcolor.h> +#include <tqdatetime.h> #include <klocale.h> #include <kglobal.h> @@ -52,9 +52,9 @@ // map KWord field name to RTF field name // e.g authorName -> AUTHOR -static QString mapFieldName( const QString& kwordField ) +static TQString mapFieldName( const TQString& kwordField ) { - QString rtfField; + TQString rtfField; if( kwordField == "fileName" ) rtfField = "FILENAME"; else if( kwordField == "authorName" ) rtfField = "AUTHOR"; @@ -71,26 +71,26 @@ RTFWorker::RTFWorker(): { } -static QString WritePositiveKeyword(const QString& keyword, const int value) +static TQString WritePositiveKeyword(const TQString& keyword, const int value) { - QString str; + TQString str; str += keyword; if (value>0) // The value of the keyword cannot be negative - str += QString::number( value ); + str += TQString::number( value ); else str += '0'; return str; } -QString RTFWorker::writeRow(const QString& textCellHeader, const QString& rowText, const FrameData& frame) +TQString RTFWorker::writeRow(const TQString& textCellHeader, const TQString& rowText, const FrameData& frame) { - QString row; + TQString row; row += "\\trowd\\trgaph60\\trql"; // start new row - row += WritePositiveKeyword("\\trrh", qRound(PT_TO_TWIP(frame.minHeight))); - row += WritePositiveKeyword("\\trleft", qRound(PT_TO_TWIP(frame.left) - m_paperMarginLeft)); + row += WritePositiveKeyword("\\trrh", tqRound(PT_TO_TWIP(frame.minHeight))); + row += WritePositiveKeyword("\\trleft", tqRound(PT_TO_TWIP(frame.left) - m_paperMarginLeft)); //row += "\\trautofit0"; // ### VERIFY row += textCellHeader; row += " "; // End of keyword @@ -99,15 +99,15 @@ QString RTFWorker::writeRow(const QString& textCellHeader, const QString& rowTex return row; } -QString RTFWorker::writeBorder(const char whichBorder, const int borderWidth, const QColor& color) +TQString RTFWorker::writeBorder(const char whichBorder, const int borderWidth, const TQColor& color) { - QString str; + TQString str; if (borderWidth > 0) { str += "\\clbrdr"; // Define border str += whichBorder; // t=top, l=left, b=bottom, r=right str += "\\brdrs\\brdrw"; // Single border; thickness - str += QString::number(borderWidth); + str += TQString::number(borderWidth); if (color.isValid()) { str += lookupColor("\\brdrcf",color); @@ -116,24 +116,24 @@ QString RTFWorker::writeBorder(const char whichBorder, const int borderWidth, co return str; } -QString RTFWorker::makeTable(const FrameAnchor& anchor) +TQString RTFWorker::makeTable(const FrameAnchor& anchor) { - QString textBody; // Text to be returned + TQString textBody; // Text to be returned textBody += m_prefix; - m_prefix = QString::null; - QString rowText; + m_prefix = TQString(); + TQString rowText; int rowCurrent = 0; bool firstCellInRow = true; FrameData firstFrameData; int debugCellCurrent = 0; //DEBUG int debugRowCurrent = 0; //DEBUG - QString textCellHeader; // <celldef> + TQString textCellHeader; // <celldef> const bool oldInTable = m_inTable; m_inTable = true; - QValueList<TableCell>::ConstIterator itCell; + TQValueList<TableCell>::ConstIterator itCell; for (itCell=anchor.table.cellList.begin(); itCell!=anchor.table.cellList.end(); itCell++) { @@ -144,8 +144,8 @@ QString RTFWorker::makeTable(const FrameAnchor& anchor) textBody += writeRow( textCellHeader, rowText, firstFrameData); textBody += "\\row"; textBody += m_eol; - rowText = QString::null; - textCellHeader = QString::null; + rowText = TQString(); + textCellHeader = TQString(); firstCellInRow=true; debugRowCurrent ++; // DEBUG debugCellCurrent = 0; //DEBUG @@ -161,20 +161,20 @@ QString RTFWorker::makeTable(const FrameAnchor& anchor) kdDebug(30515) << "Cell: " << debugRowCurrent << "," << debugCellCurrent << " left: " << frame.left << " right: " << frame.right << " top: " << frame.top << " bottom " << frame.bottom << endl; - textCellHeader += writeBorder('t',qRound(PT_TO_TWIP(frame.tWidth)),frame.tColor); - textCellHeader += writeBorder('l',qRound(PT_TO_TWIP(frame.lWidth)),frame.lColor); - textCellHeader += writeBorder('b',qRound(PT_TO_TWIP(frame.bWidth)),frame.bColor); - textCellHeader += writeBorder('r',qRound(PT_TO_TWIP(frame.rWidth)),frame.rColor); - textCellHeader += WritePositiveKeyword("\\cellx",qRound(PT_TO_TWIP(frame.right) - m_paperMarginRight)); //right border of cell - - QString endOfParagraph; - QValueList<ParaData> *paraList = (*itCell).paraList; - QValueList<ParaData>::ConstIterator it; - QValueList<ParaData>::ConstIterator end(paraList->end()); + textCellHeader += writeBorder('t',tqRound(PT_TO_TWIP(frame.tWidth)),frame.tColor); + textCellHeader += writeBorder('l',tqRound(PT_TO_TWIP(frame.lWidth)),frame.lColor); + textCellHeader += writeBorder('b',tqRound(PT_TO_TWIP(frame.bWidth)),frame.bColor); + textCellHeader += writeBorder('r',tqRound(PT_TO_TWIP(frame.rWidth)),frame.rColor); + textCellHeader += WritePositiveKeyword("\\cellx",tqRound(PT_TO_TWIP(frame.right) - m_paperMarginRight)); //right border of cell + + TQString endOfParagraph; + TQValueList<ParaData> *paraList = (*itCell).paraList; + TQValueList<ParaData>::ConstIterator it; + TQValueList<ParaData>::ConstIterator end(paraList->end()); for (it=paraList->begin();it!=end;++it) { rowText += endOfParagraph; - rowText += ProcessParagraphData( (*it).text,(*it).layout,(*it).formattingList); + rowText += ProcessParagraphData( (*it).text,(*it).tqlayout,(*it).formattingList); rowText += m_eol; endOfParagraph = "\\par"; // The problem is that the last paragraph ends with \cell not with \par } @@ -190,20 +190,20 @@ QString RTFWorker::makeTable(const FrameAnchor& anchor) return textBody; } -QString RTFWorker::makeImage(const FrameAnchor& anchor) +TQString RTFWorker::makeImage(const FrameAnchor& anchor) { - QString textBody; // Text to be returned + TQString textBody; // Text to be returned - QString strImageName(anchor.picture.koStoreName); - QString strExt; - QByteArray image; + TQString strImageName(anchor.picture.koStoreName); + TQString strExt; + TQByteArray image; kdDebug(30515) << "RTFWorker::makeImage" << endl << anchor.picture.koStoreName << endl; - const int pos=strImageName.findRev('.'); + const int pos=strImageName.tqfindRev('.'); if(pos!=-1) strExt = strImageName.mid(pos+1).lower(); - QString strTag; + TQString strTag; if (strExt=="png") strTag="\\pngblip"; #if 0 @@ -224,17 +224,17 @@ QString RTFWorker::makeImage(const FrameAnchor& anchor) if( !loadAndConvertToImage(anchor.picture.koStoreName,strExt,"PNG",image) ) { kdWarning(30515) << "Unable to convert " << anchor.picture.koStoreName << endl; - return QString::null; + return TQString(); } } - // ### TODO: SVG, QPicture + // ### TODO: SVG, TQPicture // load the image, this isn't necessary for converted image if( !image.size() ) if (!loadSubFile(anchor.picture.koStoreName,image)) { kdWarning(30515) << "Unable to load picture " << anchor.picture.koStoreName << endl; - return QString::null; + return TQString(); } @@ -249,7 +249,7 @@ QString RTFWorker::makeImage(const FrameAnchor& anchor) { // special treatment for WMF with metaheader // d7cdc69a is metaheader magic id - Q_UINT8* data = (Q_UINT8*) image.data(); + TQ_UINT8* data = (TQ_UINT8*) image.data(); if( ( data[0] == 0xd7 ) && ( data[1] == 0xcd ) && ( data[2] == 0xc6 ) && ( data[3] == 0x9a ) && ( image.size() > 22 ) ) @@ -264,18 +264,18 @@ QString RTFWorker::makeImage(const FrameAnchor& anchor) // throw away WMF metaheader (22 bytes) for( uint i=0; i<image.size()-22; i++) - image.at(i) = image.at(i+22); // As we use uint, we need at() ( [] uses int only .) + image.tqat(i) = image.tqat(i+22); // As we use uint, we need at() ( [] uses int only .) image.resize( image.size()-22 ); } } else { // It must be an image - QImage img( image ); + TQImage img( image ); if( img.isNull() ) { kdWarning(30515) << "Unable to load picture as image " << anchor.picture.koStoreName << endl; - return QString::null; + return TQString(); } // check resolution, assume 2835 dpm (72 dpi) if not available int resx = img.dotsPerMeterX(); @@ -300,17 +300,17 @@ QString RTFWorker::makeImage(const FrameAnchor& anchor) int pich = (int)(100 * TWIP_TO_MM(origHeight)); textBody += "\\picscalex"; - textBody += QString::number(scaleX, 10); + textBody += TQString::number(scaleX, 10); textBody += "\\picscaley"; - textBody += QString::number(scaleY, 10); + textBody += TQString::number(scaleY, 10); textBody += "\\picw"; - textBody += QString::number(picw,10); + textBody += TQString::number(picw,10); textBody += "\\pich"; - textBody += QString::number(pich,10); + textBody += TQString::number(pich,10); textBody += "\\picwgoal"; - textBody += QString::number(origWidth, 10); + textBody += TQString::number(origWidth, 10); textBody += "\\pichgoal"; - textBody += QString::number(origHeight, 10); + textBody += TQString::number(origHeight, 10); textBody+=" "; const char hex[] = "0123456789abcdef"; @@ -329,10 +329,10 @@ QString RTFWorker::makeImage(const FrameAnchor& anchor) return textBody; } -QString RTFWorker::formatTextParagraph(const QString& strText, +TQString RTFWorker::formatTextParagraph(const TQString& strText, const FormatData& formatOrigin, const FormatData& format) { - QString str; + TQString str; if (!format.text.missing) { @@ -340,14 +340,14 @@ QString RTFWorker::formatTextParagraph(const QString& strText, str+=openSpan(formatOrigin,format); } - QString strEscaped = escapeRtfText(strText); + TQString strEscaped = escapeRtfText(strText); // Replace line feeds by forced line breaks int pos; - QString strBr("\\line "); - while ((pos=strEscaped.find(QChar(10)))>-1) + TQString strBr("\\line "); + while ((pos=strEscaped.tqfind(TQChar(10)))>-1) { - strEscaped.replace(pos,1,strBr); + strEscaped.tqreplace(pos,1,strBr); } str+=strEscaped; @@ -361,12 +361,12 @@ QString RTFWorker::formatTextParagraph(const QString& strText, return str; } -QString RTFWorker::ProcessParagraphData ( const QString ¶Text, - const LayoutData& layout, const ValueListFormatData ¶FormatDataList) +TQString RTFWorker::ProcessParagraphData ( const TQString ¶Text, + const LayoutData& tqlayout, const ValueListFormatData ¶FormatDataList) { - QString str; - QString content; - QString markup; + TQString str; + TQString content; + TQString markup; // open paragraph markup += "\\pard"; markup += "\\plain"; @@ -374,40 +374,40 @@ QString RTFWorker::ProcessParagraphData ( const QString ¶Text, markup += "\\intbl"; //lists - if (layout.counter.style) + if (tqlayout.counter.style) { markup += "{\\pntext\\pard\\plain"; - if( layout.formatData.text.fontSize >= 0) + if( tqlayout.formatData.text.fontSize >= 0) { markup += "\\fs"; - markup += QString::number((2 * layout.formatData.text.fontSize)); - markup += lookupFont("\\f",layout.formatData.text.fontName); + markup += TQString::number((2 * tqlayout.formatData.text.fontSize)); + markup += lookupFont("\\f",tqlayout.formatData.text.fontName); } markup += " "; - markup += layout.counter.text; + markup += tqlayout.counter.text; markup += "\\tab}{\\*\\pn"; - if (layout.counter.style > 5) + if (tqlayout.counter.style > 5) { markup += "\\pnlvlblt "; markup += "{\\pntxtb "; - if (!layout.counter.lefttext.isEmpty() && layout.counter.lefttext != "{" && layout.counter.lefttext != "}") + if (!tqlayout.counter.lefttext.isEmpty() && tqlayout.counter.lefttext != "{" && tqlayout.counter.lefttext != "}") { - markup += layout.counter.lefttext; + markup += tqlayout.counter.lefttext; } - switch (layout.counter.style) + switch (tqlayout.counter.style) { case 6: { //custom bullets (one char) //TODO: use correct character/sign for bullet - markup += layout.counter.customCharacter; + markup += tqlayout.counter.customCharacter; break; } case 7: { //custom bullets (complex) - markup += layout.counter.text; + markup += tqlayout.counter.text; break; } case 8: @@ -435,7 +435,7 @@ QString RTFWorker::ProcessParagraphData ( const QString ¶Text, { //disc bullets //TODO: use correct character/sign for bullet - markup += layout.counter.text; + markup += tqlayout.counter.text; break; } default: @@ -445,23 +445,23 @@ QString RTFWorker::ProcessParagraphData ( const QString ¶Text, } else { - if (layout.counter.numbering!=0) + if (tqlayout.counter.numbering!=0) { markup += "\\pnlvl"; - markup += QString::number(layout.counter.depth + 1); + markup += TQString::number(tqlayout.counter.depth + 1); markup += "\\pnprev1"; } - else if (layout.counter.style==1) + else if (tqlayout.counter.style==1) { markup += "\\pnlvlbody"; } else { markup += "\\pnlvl"; - markup += QString::number(11 - layout.counter.style); + markup += TQString::number(11 - tqlayout.counter.style); } - switch (layout.counter.style) + switch (tqlayout.counter.style) { case 1: { @@ -492,18 +492,18 @@ QString RTFWorker::ProcessParagraphData ( const QString ¶Text, markup += "\\pndec"; } markup += "{\\pntxtb "; - markup += layout.counter.lefttext; + markup += tqlayout.counter.lefttext; markup += " }"; } markup += "{\\pntxta "; - markup += layout.counter.righttext; + markup += tqlayout.counter.righttext; markup += " }"; // ### FIXME: that is too late! And why at every list paragraph? (See bug #88241) - if (layout.counter.start!=0) + if (tqlayout.counter.start!=0) { markup += "\\pnstart"; - markup += QString::number(layout.counter.start); + markup += TQString::number(tqlayout.counter.start); } else { @@ -511,15 +511,15 @@ QString RTFWorker::ProcessParagraphData ( const QString ¶Text, } markup += "\\pnindent0\\pnhang"; - if( layout.formatData.text.fontSize > 0 ) + if( tqlayout.formatData.text.fontSize > 0 ) { markup += "\\pnfs"; - markup += QString::number((2 * layout.formatData.text.fontSize)); + markup += TQString::number((2 * tqlayout.formatData.text.fontSize)); } - if( !layout.formatData.text.fontName.isEmpty() ) + if( !tqlayout.formatData.text.fontName.isEmpty() ) { - markup += lookupFont("\\pnf", layout.formatData.text.fontName); + markup += lookupFont("\\pnf", tqlayout.formatData.text.fontName); } markup += "}"; @@ -527,20 +527,20 @@ QString RTFWorker::ProcessParagraphData ( const QString ¶Text, LayoutData styleLayout; - markup += lookupStyle(layout.styleName, styleLayout); - markup += layoutToRtf(styleLayout,layout,true); + markup += lookupStyle(tqlayout.styleName, styleLayout); + markup += tqlayoutToRtf(styleLayout,tqlayout,true); - if ( 1==layout.formatData.text.verticalAlignment ) + if ( 1==tqlayout.formatData.text.verticalAlignment ) { markup += "\\sub"; //Subscript } - else if ( 2==layout.formatData.text.verticalAlignment ) + else if ( 2==tqlayout.formatData.text.verticalAlignment ) { markup += "\\super"; //Superscript } - if (layout.pageBreakBefore) + if (tqlayout.pageBreakBefore) content += "\\page "; @@ -552,9 +552,9 @@ QString RTFWorker::ProcessParagraphData ( const QString ¶Text, ValueListFormatData::ConstIterator paraFormatDataIt; - QString partialText; + TQString partialText; - FormatData formatRef = layout.formatData; + FormatData formatRef = tqlayout.formatData; for ( paraFormatDataIt = paraFormatDataList.begin (); paraFormatDataIt != paraFormatDataList.end (); @@ -578,7 +578,7 @@ QString RTFWorker::ProcessParagraphData ( const QString ¶Text, content += "DATE "; else content += "TIME "; - QString key((*paraFormatDataIt).variable.m_key.mid(4)); + TQString key((*paraFormatDataIt).variable.m_key.mid(4)); kdDebug(30515) << "Time format: " << key << endl; if (key.startsWith("locale")) { @@ -609,47 +609,47 @@ QString RTFWorker::ProcessParagraphData ( const QString ¶Text, // KLocale's key differ from KWord // Date - key.replace( "%Y", "yyyy" ); // Year 4 digits - key.replace( "%y", "yy" ); // Year 2 digits - key.replace( "%n", "M" ); // Month 1 digit - key.replace( "%m", "MM" ); // Month 2 digits - key.replace( "%e", "d" ); // Day 1 digit - key.replace( "%d", "dd" ); // Day 2 digits - key.replace( "%b", "MMM" ); // Month 3 letters - key.replace( "%B", "MMMM" ); // Month all letters - key.replace( "%a", "ddd" ); // Day 3 letters - key.replace( "%A", "dddd" ); // Day all letters + key.tqreplace( "%Y", "yyyy" ); // Year 4 digits + key.tqreplace( "%y", "yy" ); // Year 2 digits + key.tqreplace( "%n", "M" ); // Month 1 digit + key.tqreplace( "%m", "MM" ); // Month 2 digits + key.tqreplace( "%e", "d" ); // Day 1 digit + key.tqreplace( "%d", "dd" ); // Day 2 digits + key.tqreplace( "%b", "MMM" ); // Month 3 letters + key.tqreplace( "%B", "MMMM" ); // Month all letters + key.tqreplace( "%a", "ddd" ); // Day 3 letters + key.tqreplace( "%A", "dddd" ); // Day all letters // 12h - key.replace( "%p", "am/pm" ); // AM/PM (KLocale knows it only lower case) - key.replace( "%I", "hh" ); // 12 hour 2 digits - key.replace( "%l", "h" ); // 12 hour 1 digits + key.tqreplace( "%p", "am/pm" ); // AM/PM (KLocale knows it only lower case) + key.tqreplace( "%I", "hh" ); // 12 hour 2 digits + key.tqreplace( "%l", "h" ); // 12 hour 1 digits // 24h - key.replace( "%H", "HH" ); // 24 hour 2 digits - key.replace( "%k", "H" ); // 24 hour 1 digit + key.tqreplace( "%H", "HH" ); // 24 hour 2 digits + key.tqreplace( "%k", "H" ); // 24 hour 1 digit // Other times - key.replace( "%M", "mm" ); // minute 2 digits (KLocale knows it with 2 digits) - key.replace( "%S", "ss" ); // second 2 digits (KLocale knows it with 2 digits) + key.tqreplace( "%M", "mm" ); // minute 2 digits (KLocale knows it with 2 digits) + key.tqreplace( "%S", "ss" ); // second 2 digits (KLocale knows it with 2 digits) kdDebug(30515) << "Locale date in RTF format: " << key << endl; } else if (!key.isEmpty()) { - const QRegExp regexp("AP",false); // Not case-sensitive + const TQRegExp regexp("AP",false); // Not case-sensitive if (regexp.search(key)!=-1) { // 12h - key.replace("ap","am/pm"); - key.replace("AP","AM/PM"); + key.tqreplace("ap","am/pm"); + key.tqreplace("AP","AM/PM"); } else { //24h - key.replace('h','H'); // MS Word uses H for 24hour times + key.tqreplace('h','H'); // MS Word uses H for 24hour times } // MS Word do not know possesive months - key.replace("PPP","MMM"); - key.replace("PPPP","MMMM"); - key.replace("zzz","000"); // replace microseconds by 000 + key.tqreplace("PPP","MMM"); + key.tqreplace("PPPP","MMMM"); + key.tqreplace("zzz","000"); // replace microseconds by 000 kdDebug(30515) << "New format: " << key << endl; content += "\\@ \""; content += key; @@ -661,7 +661,7 @@ QString RTFWorker::ProcessParagraphData ( const QString ¶Text, } else if (4==(*paraFormatDataIt).variable.m_type) { - QString strFieldType; + TQString strFieldType; if ((*paraFormatDataIt).variable.isPageNumber()) { content += "{\\field{\\*\\fldinst PAGE \\* MERGEFORMAT }{\\fldrslt "; @@ -683,9 +683,9 @@ QString RTFWorker::ProcessParagraphData ( const QString ¶Text, else if (8==(*paraFormatDataIt).variable.m_type) { // Field - QString name = escapeRtfText((*paraFormatDataIt).variable.getFieldName()); - QString value = escapeRtfText((*paraFormatDataIt).variable.getFieldValue()); - QString rtfField = mapFieldName(name); + TQString name = escapeRtfText((*paraFormatDataIt).variable.getFieldName()); + TQString value = escapeRtfText((*paraFormatDataIt).variable.getFieldValue()); + TQString rtfField = mapFieldName(name); if( rtfField.isEmpty() ) // Couldn't map field name, just write out the value @@ -710,25 +710,25 @@ QString RTFWorker::ProcessParagraphData ( const QString ¶Text, content += "}"; content += "{\\fldrslt "; content += "{\\ul"; // underline, ### TODO: use style Hyperlink - content += lookupColor("\\cf",QColor(0,0,255));// blue + content += lookupColor("\\cf",TQColor(0,0,255));// blue content += escapeRtfText((*paraFormatDataIt).variable.getLinkName()); content += "}}}"; } else if (11==(*paraFormatDataIt).variable.m_type) { // Footnote - QString value = (*paraFormatDataIt).variable.getFootnoteValue(); + TQString value = (*paraFormatDataIt).variable.getFootnoteValue(); bool automatic = (*paraFormatDataIt).variable.getFootnoteAuto(); - QValueList<ParaData> *paraList = (*paraFormatDataIt).variable.getFootnotePara(); + TQValueList<ParaData> *paraList = (*paraFormatDataIt).variable.getFootnotePara(); if( paraList ) { - QString fstr; - QValueList<ParaData>::ConstIterator it; - QValueList<ParaData>::ConstIterator end(paraList->end()); - const QString prefixSaved = m_prefix; - m_prefix = QString::null; + TQString fstr; + TQValueList<ParaData>::ConstIterator it; + TQValueList<ParaData>::ConstIterator end(paraList->end()); + const TQString prefixSaved = m_prefix; + m_prefix = TQString(); for (it=paraList->begin();it!=end;++it) - fstr += ProcessParagraphData( (*it).text, (*it).layout,(*it).formattingList); + fstr += ProcessParagraphData( (*it).text, (*it).tqlayout,(*it).formattingList); m_prefix = prefixSaved; content += "{\\super "; content += automatic ? "\\chftn " : value; @@ -762,7 +762,7 @@ QString RTFWorker::ProcessParagraphData ( const QString ¶Text, str += content; str += "}"; str += m_eol; - content = QString::null; + content = TQString(); if (!m_inTable) { m_prefix = "\\par"; @@ -779,7 +779,7 @@ QString RTFWorker::ProcessParagraphData ( const QString ¶Text, } } - if (layout.pageBreakAfter) + if (tqlayout.pageBreakAfter) content += "\\page"; if (!content.isEmpty()) @@ -806,11 +806,11 @@ QString RTFWorker::ProcessParagraphData ( const QString ¶Text, return str; } -bool RTFWorker::doFullParagraph(const QString& paraText, - const LayoutData& layout, const ValueListFormatData& paraFormatDataList) +bool RTFWorker::doFullParagraph(const TQString& paraText, + const LayoutData& tqlayout, const ValueListFormatData& paraFormatDataList) { kdDebug(30515) << "Entering RTFWorker::doFullParagraph" << endl << paraText << endl; - QString par = ProcessParagraphData( paraText, layout, paraFormatDataList); + TQString par = ProcessParagraphData( paraText, tqlayout, paraFormatDataList); m_textBody += par; kdDebug(30515) << "Quiting RTFWorker::doFullParagraph" << endl; return true; @@ -818,8 +818,8 @@ bool RTFWorker::doFullParagraph(const QString& paraText, bool RTFWorker::doHeader(const HeaderData& header) { - QString str; - QString content; + TQString str; + TQString content; if( header.page == HeaderData::PAGE_ODD ) str = "\\facingp{\\headerr"; else if( header.page == HeaderData::PAGE_EVEN ) @@ -833,10 +833,10 @@ bool RTFWorker::doHeader(const HeaderData& header) str += " {"; - QValueList<ParaData>::ConstIterator it; - QValueList<ParaData>::ConstIterator end(header.para.end()); + TQValueList<ParaData>::ConstIterator it; + TQValueList<ParaData>::ConstIterator end(header.para.end()); for (it=header.para.begin();it!=end;++it) - content += ProcessParagraphData( (*it).text,(*it).layout,(*it).formattingList); + content += ProcessParagraphData( (*it).text,(*it).tqlayout,(*it).formattingList); if (content!="\\par\\pard\\plain") { @@ -847,14 +847,14 @@ bool RTFWorker::doHeader(const HeaderData& header) m_textBody += str; } - m_prefix=QString::null; + m_prefix=TQString(); return true; } bool RTFWorker::doFooter(const FooterData& footer) { - QString str; - QString content; + TQString str; + TQString content; if( footer.page == FooterData::PAGE_ODD ) str = "\\facingp{\\footerr"; else if( footer.page == FooterData::PAGE_EVEN ) @@ -868,10 +868,10 @@ bool RTFWorker::doFooter(const FooterData& footer) str += " {"; - QValueList<ParaData>::ConstIterator it; - QValueList<ParaData>::ConstIterator end(footer.para.end()); + TQValueList<ParaData>::ConstIterator it; + TQValueList<ParaData>::ConstIterator end(footer.para.end()); for (it=footer.para.begin();it!=end;++it) - content += ProcessParagraphData( (*it).text,(*it).layout,(*it).formattingList); + content += ProcessParagraphData( (*it).text,(*it).tqlayout,(*it).formattingList); if (content!="\\par\\pard\\plain") { @@ -882,13 +882,13 @@ bool RTFWorker::doFooter(const FooterData& footer) m_textBody += str; } - m_prefix=QString::null; + m_prefix=TQString(); return true; } -bool RTFWorker::doOpenFile(const QString& filenameOut, const QString& /*to*/) +bool RTFWorker::doOpenFile(const TQString& filenameOut, const TQString& /*to*/) { - m_ioDevice=new QFile(filenameOut); + m_ioDevice=TQT_TQIODEVICE(new TQFile(filenameOut)); if (!m_ioDevice) { @@ -902,10 +902,10 @@ bool RTFWorker::doOpenFile(const QString& filenameOut, const QString& /*to*/) return false; } - m_streamOut=new QTextStream(m_ioDevice); + m_streamOut=new TQTextStream(m_ioDevice); // ### TODO: should "CP 1252" be used directly? (But RTFWorker::escapeRtfText is beased on ISO-8859-1 only.) - m_streamOut->setEncoding(QTextStream::Latin1); // We are declaring the RTF document as CP 1252, so use ISO-8859-1 + m_streamOut->setEncoding(TQTextStream::Latin1); // We are declaring the RTF document as CP 1252, so use ISO-8859-1 m_fileName=filenameOut; @@ -932,11 +932,11 @@ bool RTFWorker::doOpenDocument(void) // Default color table m_colorList - << QColor(0,0,0) << QColor(0,0,255) << QColor(0,255,255) - << QColor(0,255,0) << QColor(255,0,255) << QColor(255,0,0) - << QColor(255,255,0) << QColor(255,255,255) << QColor(0,0,128) - << QColor(0,128,128) << QColor(0,128,0) << QColor(128,0,128) - << QColor(128,0,0) << QColor(128,128,0) << QColor(128,128,128); + << TQColor(0,0,0) << TQColor(0,0,255) << TQColor(0,255,255) + << TQColor(0,255,0) << TQColor(255,0,255) << TQColor(255,0,0) + << TQColor(255,255,0) << TQColor(255,255,255) << TQColor(0,0,128) + << TQColor(0,128,128) << TQColor(0,128,0) << TQColor(128,0,128) + << TQColor(128,0,0) << TQColor(128,128,0) << TQColor(128,128,128); return true; } @@ -946,17 +946,17 @@ void RTFWorker::writeFontData(void) kdDebug(30515) << "Fonts:" << m_fontList << endl; *m_streamOut << "{\\fonttbl"; uint count; - QFontDatabase fontDatabase; - QStringList::ConstIterator it; + TQFontDatabase fontDatabase; + TQStringList::ConstIterator it; for (count=0, it=m_fontList.begin(); it!=m_fontList.end(); count++, it++) { - const QString strLower( (*it).lower() ); + const TQString strLower( (*it).lower() ); *m_streamOut << "{\\f" << count; - if ( (strLower.find("symbol")>-1) || (strLower.find("dingbat")>-1) ) + if ( (strLower.tqfind("symbol")>-1) || (strLower.tqfind("dingbat")>-1) ) *m_streamOut << "\\ftech"; - else if ( (strLower.find("script")>-1) ) + else if ( (strLower.tqfind("script")>-1) ) *m_streamOut << "\\fscript"; #if 1 @@ -967,28 +967,28 @@ void RTFWorker::writeFontData(void) } #else else - // QFontInfo:styleHint() does not guess anything, it just returns what is in the QFont. Nothing put in, nothing gets out. + // TQFontInfo:tqstyleHint() does not guess anything, it just returns what is in the TQFont. Nothing put in, nothing gets out. { - QFontInfo info(*it); - switch (info.styleHint()) + TQFontInfo info(*it); + switch (info.tqstyleHint()) { - case QFont::SansSerif: + case TQFont::SansSerif: default: { *m_streamOut << "\\fswiss"; break; } - case QFont::Serif: + case TQFont::Serif: { *m_streamOut << "\\froman"; break; } - case QFont::Courier: + case TQFont::Courier: { *m_streamOut << "\\fmodern"; break; } - case QFont::OldEnglish: + case TQFont::OldEnglish: { *m_streamOut << "\\fdecor"; break; @@ -996,7 +996,7 @@ void RTFWorker::writeFontData(void) } } #endif - // ### TODO: \fcharset would be mandatory but Qt3 does not give us the font charset. :-( + // ### TODO: \fcharset would be mandatory but TQt3 does not give us the font charset. :-( *m_streamOut << "\\fprq" << ( fontDatabase.isFixedPitch( *it ) ? 1 : 2 ) << " "; // font definition *m_streamOut << escapeRtfText( *it ); *m_streamOut << ";}" << m_eol; // end font table entry @@ -1008,7 +1008,7 @@ void RTFWorker::writeColorData(void) { *m_streamOut << "{\\colortbl;"; uint count; - QValueList<QColor>::ConstIterator it; + TQValueList<TQColor>::ConstIterator it; for (count=0, it=m_colorList.begin(); it!=m_colorList.end(); count++, it++) @@ -1026,7 +1026,7 @@ void RTFWorker::writeStyleData(void) *m_streamOut << "{\\stylesheet" << m_eol; uint count; - QValueList<LayoutData>::ConstIterator it; + TQValueList<LayoutData>::ConstIterator it; for (count=0, it=m_styleList.begin(); it!=m_styleList.end(); count++, it++) @@ -1035,12 +1035,12 @@ void RTFWorker::writeStyleData(void) if (count>0) // \s0 is not written out *m_streamOut << "\\s" << count; - *m_streamOut << layoutToRtf((*it),(*it),true); + *m_streamOut << tqlayoutToRtf((*it),(*it),true); // \snext must be the last keyword before the style name // Find the number of the following style uint counter=0; // counts position in style table starting at 0 - QValueList < LayoutData > ::ConstIterator it2; + TQValueList < LayoutData > ::ConstIterator it2; for( it2 = m_styleList.begin(); it2 != m_styleList.end(); counter++, ++it2 ) { if ( (*it2).styleName == (*it).styleFollowing ) @@ -1129,7 +1129,7 @@ bool RTFWorker::doFullDocumentInfo(const KWEFDocumentInfo& docInfo) } // Now add who we are in a \comment - QString revision("$Revision: 549975 $"); + TQString revision("$Revision: 549975 $"); m_textDocInfo += "{\\comment "; m_textDocInfo += "Generated by KWord's RTF Export Filter"; m_textDocInfo += revision.mid(10).remove('$'); // has a leading and a trailing space. @@ -1155,9 +1155,9 @@ bool RTFWorker::doCloseTextFrameSet(void) return true; } -QString RTFWorker::openSpan(const FormatData& formatOrigin, const FormatData& format) +TQString RTFWorker::openSpan(const FormatData& formatOrigin, const FormatData& format) { - QString result; + TQString result; result += "{"; result += textFormatToRtf(formatOrigin.text,format.text,false); @@ -1175,31 +1175,31 @@ QString RTFWorker::openSpan(const FormatData& formatOrigin, const FormatData& fo return result; } -QString RTFWorker::closeSpan(const FormatData& , const FormatData& ) +TQString RTFWorker::closeSpan(const FormatData& , const FormatData& ) { - QString result; + TQString result; result += "}"; return result; } -// The following function encodes the kword unicode characters into +// The following function encodes the kword tqunicode characters into // RTF seven bit ASCII. This affects any 8 bit characters. // They are encoded either with \' or with \u -QString RTFWorker::escapeRtfText ( const QString& text ) const +TQString RTFWorker::escapeRtfText ( const TQString& text ) const { // initialize strings - QString escapedText; + TQString escapedText; const uint length = text.length(); for ( uint i = 0; i < length; i++ ) { - QChar QCh ( text.at( i ) ); // get out one unicode char from the string - const ushort ch = QCh.unicode(); // take unicode value of the char + TQChar TQCh ( text.at( i ) ); // get out one tqunicode char from the string + const ushort ch = TQCh.tqunicode(); // take tqunicode value of the char - if ( QCh == '\\' ) escapedText += "\\\\"; // back-slash - else if ( QCh == '{' ) escapedText += "\\{"; - else if ( QCh == '}' ) escapedText += "\\}"; + if ( TQCh == '\\' ) escapedText += "\\\\"; // back-slash + else if ( TQCh == '{' ) escapedText += "\\{"; + else if ( TQCh == '}' ) escapedText += "\\}"; else if ( ch >= 32 && ch <= 127) // ASCII character - escapedText += QCh; + escapedText += TQCh; else if ( ch == 0x0009 ) escapedText += "\\tab "; // tabulator else if ( ch == 0x00a0 ) escapedText += "\\~"; // Non-breaking space else if ( ch == 0x00ad ) escapedText += "\\-"; // Soft hyphen @@ -1222,20 +1222,20 @@ QString RTFWorker::escapeRtfText ( const QString& text ) const else if ( ch >= 160 && ch < 256) // check for characters common between ISO-8859-1 and CP1252 { // NOTE: 128 to 159 in CP1252 are somewhere else in UTF-8 and do not exist in ISO-8859-1 (### TODO?) escapedText += "\\\'"; // escape upper page character to 7 bit - escapedText += QString::number ( ch, 16 ); + escapedText += TQString::number ( ch, 16 ); } else if ( ch >= 256) // check for a higher code non-ASCII character { - // encode this as decimal unicode with a replacement character. + // encode this as decimal tqunicode with a replacement character. escapedText += "\\u"; - escapedText += QString::number ( ch, 10 ); + escapedText += TQString::number ( ch, 10 ); // We decompose the character. If it works, the first character is whitout any accent. // (Of course this only works with Latin letters.) - // WARNING: QChar::decomposition is not re-entrant in Qt 3.x - QChar replacement ( QCh.decomposition().at(0) ); - kdDebug(30515) << "Proposed replacement character: " << QString(replacement) << endl; + // WARNING: TQChar::decomposition is not re-entrant in TQt 3.x + TQChar replacement ( TQCh.decomposition().at(0) ); + kdDebug(30515) << "Proposed replacement character: " << TQString(replacement) << endl; - if (replacement.isNull() || replacement<=' ' || replacement>=char(127) + if (replacement.isNull() || (int)replacement<=' ' || (int)replacement>=char(127) || replacement=='{' || replacement=='}' || replacement=='\\') replacement='?'; // Not a normal ASCII character, so default to show a ? sign @@ -1243,7 +1243,7 @@ QString RTFWorker::escapeRtfText ( const QString& text ) const } else - escapedText += QCh ; + escapedText += TQCh ; } @@ -1270,41 +1270,41 @@ bool RTFWorker::doFullPaperBorders (const double top, const double left, return true; } -bool RTFWorker::doFullDefineStyle(LayoutData& layout) +bool RTFWorker::doFullDefineStyle(LayoutData& tqlayout) { //Register the new style in the style list - m_styleList << layout; + m_styleList << tqlayout; // Now we must register a few things (with help of the lookup methods.) - lookupFont("\\f", layout.formatData.text.fontName); - lookupColor(QString::null, layout.formatData.text.fgColor); - lookupColor(QString::null, layout.formatData.text.bgColor); + lookupFont("\\f", tqlayout.formatData.text.fontName); + lookupColor(TQString(), tqlayout.formatData.text.fgColor); + lookupColor(TQString(), tqlayout.formatData.text.bgColor); return true; } -static QString writeDate(const QString keyword, const QDateTime& now) +static TQString writeDate(const TQString keyword, const TQDateTime& now) { - QString str; + TQString str; if (now.isValid()) { kdDebug(30515) << "Date " << keyword << " " << now.toString() << endl; str += '{'; str += keyword; - const QDate nowDate(now.date()); + const TQDate nowDate(now.date()); str += "\\yr"; - str += QString::number(nowDate.year()); + str += TQString::number(nowDate.year()); str += "\\mo"; - str += QString::number(nowDate.month()); + str += TQString::number(nowDate.month()); str += "\\dy"; - str += QString::number(nowDate.day()); - const QTime nowTime(now.time()); + str += TQString::number(nowDate.day()); + const TQTime nowTime(now.time()); str += "\\hr"; - str += QString::number(nowTime.hour()); + str += TQString::number(nowTime.hour()); str += "\\min"; - str += QString::number(nowTime.minute()); + str += TQString::number(nowTime.minute()); str += "\\sec"; - str += QString::number(nowTime.second()); + str += TQString::number(nowTime.second()); str += '}'; } else @@ -1323,14 +1323,14 @@ bool RTFWorker::doVariableSettings(const VariableSettingsData& vs) return true; } -QString RTFWorker::textFormatToRtf(const TextFormatting& formatOrigin, +TQString RTFWorker::textFormatToRtf(const TextFormatting& formatOrigin, const TextFormatting& formatData, const bool force) { // TODO: rename variable formatData - QString strElement; // TODO: rename this variable + TQString strElement; // TODO: rename this variable // Font name - const QString fontName(formatData.fontName); + const TQString fontName(formatData.fontName); if (!fontName.isEmpty() && (force || (formatOrigin.fontName!=formatData.fontName))) { @@ -1343,7 +1343,7 @@ QString RTFWorker::textFormatToRtf(const TextFormatting& formatOrigin, if (size>0) { strElement+="\\fs"; - strElement+=QString::number(2*size,10); + strElement+=TQString::number(2*size,10); } } @@ -1398,10 +1398,10 @@ QString RTFWorker::textFormatToRtf(const TextFormatting& formatOrigin, { if ( formatData.underline ) { - QString underlineValue = formatData.underlineValue; - QString underlineStyle = formatData.underlineStyle; + TQString underlineValue = formatData.underlineValue; + TQString underlineStyle = formatData.underlineStyle; bool underlineWord = formatData.underlineWord; - QString ul ( "\\ul" ); // fall-back: simple underline + TQString ul ( "\\ul" ); // fall-back: simple underline if( underlineStyle.isEmpty() ) underlineStyle = "solid"; if( underlineValue == "1" ) underlineValue = "single"; @@ -1458,122 +1458,122 @@ QString RTFWorker::textFormatToRtf(const TextFormatting& formatOrigin, return strElement; } -QString RTFWorker::layoutToRtf(const LayoutData& layoutOrigin, - const LayoutData& layout, const bool force) +TQString RTFWorker::tqlayoutToRtf(const LayoutData& tqlayoutOrigin, + const LayoutData& tqlayout, const bool force) { - QString strLayout; + TQString strLayout; - if (force || (layoutOrigin.alignment!=layout.alignment)) + if (force || (tqlayoutOrigin.tqalignment!=tqlayout.tqalignment)) { - if (layout.alignment=="left") + if (tqlayout.tqalignment=="left") strLayout += "\\ql"; - else if (layout.alignment== "right") + else if (tqlayout.tqalignment== "right") strLayout += "\\qr"; - else if (layout.alignment=="center") + else if (tqlayout.tqalignment=="center") strLayout += "\\qc"; - else if (layout.alignment=="justify") + else if (tqlayout.tqalignment=="justify") strLayout += "\\qj"; - else if ( layout.alignment=="auto") + else if ( tqlayout.tqalignment=="auto") { // ### TODO: what for BIDI? //strLayout += "\\ql"; } else { - kdWarning(30515) << "Unknown alignment: " << layout.alignment << endl; + kdWarning(30515) << "Unknown tqalignment: " << tqlayout.tqalignment << endl; } } - if ((layout.indentLeft>=0.0) - && (force || (layoutOrigin.indentLeft!=layout.indentLeft))) + if ((tqlayout.indentLeft>=0.0) + && (force || (tqlayoutOrigin.indentLeft!=tqlayout.indentLeft))) { strLayout += "\\li"; - strLayout += QString::number(int(layout.indentLeft)*20, 10); + strLayout += TQString::number(int(tqlayout.indentLeft)*20, 10); } - if ((layout.indentRight>=0.0) - && (force || (layoutOrigin.indentRight!=layout.indentRight))) + if ((tqlayout.indentRight>=0.0) + && (force || (tqlayoutOrigin.indentRight!=tqlayout.indentRight))) { strLayout += "\\ri"; - strLayout += QString::number(int(layout.indentRight)*20, 10); + strLayout += TQString::number(int(tqlayout.indentRight)*20, 10); } - if (force || (layoutOrigin.indentFirst!=layout.indentFirst)) + if (force || (tqlayoutOrigin.indentFirst!=tqlayout.indentFirst)) { strLayout += "\\fi"; - strLayout += QString::number(int(layout.indentFirst)*20, 10); + strLayout += TQString::number(int(tqlayout.indentFirst)*20, 10); } - if ((layout.marginBottom>=0.0) - && (force || (layoutOrigin.marginBottom!=layout.marginBottom))) + if ((tqlayout.marginBottom>=0.0) + && (force || (tqlayoutOrigin.marginBottom!=tqlayout.marginBottom))) { strLayout += "\\sa"; - strLayout += QString::number(int(layout.marginBottom)*20 ,10); + strLayout += TQString::number(int(tqlayout.marginBottom)*20 ,10); } - if ((layout.marginTop>=0.0) - && (force || (layoutOrigin.marginTop!=layout.marginTop))) + if ((tqlayout.marginTop>=0.0) + && (force || (tqlayoutOrigin.marginTop!=tqlayout.marginTop))) { strLayout += "\\sb"; - strLayout += QString::number(int(layout.marginTop)*20, 10); + strLayout += TQString::number(int(tqlayout.marginTop)*20, 10); } - if (force || (layoutOrigin.keepLinesTogether!=layout.keepLinesTogether)) + if (force || (tqlayoutOrigin.keepLinesTogether!=tqlayout.keepLinesTogether)) { - if(layout.keepLinesTogether) strLayout += "\\keep"; + if(tqlayout.keepLinesTogether) strLayout += "\\keep"; } - // Note: there seems to be too many problems of using a page break in a layout + // Note: there seems to be too many problems of using a page break in a tqlayout // - KWord's RTF import filter makes the page break immediately (also in styles) // - AbiWord's RTF import does not like \*\pgbrk // ### TODO: decide if we really remove this code #if 0 - if (force || (layoutOrigin.pageBreakBefore!=layout.pageBreakBefore)) + if (force || (tqlayoutOrigin.pageBreakBefore!=tqlayout.pageBreakBefore)) { - if(layout.pageBreakBefore) strLayout += "\\pagebb"; + if(tqlayout.pageBreakBefore) strLayout += "\\pagebb"; } // Note: RTF doesn't specify "page break after" // \*\pgbrk0 is used after OpenOffice.org Writer - if (force || (layoutOrigin.pageBreakAfter!=layout.pageBreakAfter)) + if (force || (tqlayoutOrigin.pageBreakAfter!=tqlayout.pageBreakAfter)) { - if(layout.pageBreakAfter) strLayout += "\\*\\pgbrk0"; + if(tqlayout.pageBreakAfter) strLayout += "\\*\\pgbrk0"; } #endif if (force - || ( layoutOrigin.lineSpacingType != layout.lineSpacingType ) - || ( layoutOrigin.lineSpacing != layout.lineSpacing ) ) + || ( tqlayoutOrigin.lineSpacingType != tqlayout.lineSpacingType ) + || ( tqlayoutOrigin.lineSpacing != tqlayout.lineSpacing ) ) { - if ( layout.lineSpacingType==LayoutData::LS_SINGLE ) + if ( tqlayout.lineSpacingType==LayoutData::LS_SINGLE ) ;// do nothing, single linespace is default in RTF - else if ( layout.lineSpacingType==LayoutData::LS_ONEANDHALF ) + else if ( tqlayout.lineSpacingType==LayoutData::LS_ONEANDHALF ) strLayout += "\\sl360\\slmult1"; // one-and-half linespace - else if ( layout.lineSpacingType==LayoutData::LS_DOUBLE ) + else if ( tqlayout.lineSpacingType==LayoutData::LS_DOUBLE ) strLayout += "\\sl480\\slmult1"; // double linespace - else if ( layout.lineSpacingType==LayoutData::LS_ATLEAST ) - strLayout += QString("\\sl%1\\slmult0").arg(int(layout.lineSpacing)*20); + else if ( tqlayout.lineSpacingType==LayoutData::LS_ATLEAST ) + strLayout += TQString("\\sl%1\\slmult0").tqarg(int(tqlayout.lineSpacing)*20); - else if ( layout.lineSpacingType==LayoutData::LS_MULTIPLE ) - strLayout += QString("\\sl%1\\slmult1").arg( int(layout.lineSpacing)*240 ); + else if ( tqlayout.lineSpacingType==LayoutData::LS_MULTIPLE ) + strLayout += TQString("\\sl%1\\slmult1").tqarg( int(tqlayout.lineSpacing)*240 ); - else if ( layout.lineSpacingType==LayoutData::LS_CUSTOM ) + else if ( tqlayout.lineSpacingType==LayoutData::LS_CUSTOM ) // "Custom" in KWord is like "Exactly" in MS Word - strLayout += QString("\\sl-%1\\slmult0").arg(int(layout.lineSpacing)*20); + strLayout += TQString("\\sl-%1\\slmult0").tqarg(int(tqlayout.lineSpacing)*20); else - kdWarning(30515) << "Unsupported lineSpacingType: " << layout.lineSpacingType << " (Ignoring!)" << endl; + kdWarning(30515) << "Unsupported lineSpacingType: " << tqlayout.lineSpacingType << " (Ignoring!)" << endl; } - if (!layout.tabulatorList.isEmpty() - && (force || (layoutOrigin.tabulatorList!=layout.tabulatorList) )) + if (!tqlayout.tabulatorList.isEmpty() + && (force || (tqlayoutOrigin.tabulatorList!=tqlayout.tabulatorList) )) { TabulatorList::ConstIterator it; - for (it=layout.tabulatorList.begin();it!=layout.tabulatorList.end();++it) + for (it=tqlayout.tabulatorList.begin();it!=tqlayout.tabulatorList.end();++it) { switch ((*it).m_type) { @@ -1598,7 +1598,7 @@ QString RTFWorker::layoutToRtf(const LayoutData& layoutOrigin, // must be the last strLayout += "\\tx"; - strLayout += QString::number(int((*it).m_ptpos)*20, 10); + strLayout += TQString::number(int((*it).m_ptpos)*20, 10); } } @@ -1606,7 +1606,7 @@ QString RTFWorker::layoutToRtf(const LayoutData& layoutOrigin, // shadow support // note shadow in KWord is more full-feature/sophisticated than RTF // here we just treat KWord's shadow as simple \shad mark-up - if( layout.shadowDistance > 0 ) + if( tqlayout.shadowDistance > 0 ) { strLayout += "\\shad"; } @@ -1614,21 +1614,21 @@ QString RTFWorker::layoutToRtf(const LayoutData& layoutOrigin, // TODO: borders // This must remain last, as it adds a terminating space. - strLayout+=textFormatToRtf(layoutOrigin.formatData.text, - layout.formatData.text,force); + strLayout+=textFormatToRtf(tqlayoutOrigin.formatData.text, + tqlayout.formatData.text,force); return strLayout; } -QString RTFWorker::lookupFont(const QString& markup, const QString& fontName) +TQString RTFWorker::lookupFont(const TQString& markup, const TQString& fontName) { if (fontName.isEmpty()) - return QString::null; + return TQString(); - // First we have to remove Qt-typical foundry names, as some RTF readers are confused by them. - QString cookedFontName(fontName); - QRegExp regexp("\\s*\\[\\S*\\]"); // Some white space, opening square bracket, some non-white-space, ending square bracket + // First we have to remove TQt-typical foundry names, as some RTF readers are confused by them. + TQString cookedFontName(fontName); + TQRegExp regexp("\\s*\\[\\S*\\]"); // Some white space, opening square bracket, some non-white-space, ending square bracket cookedFontName.remove(regexp); // But we cannot have an empty name font if (cookedFontName.isEmpty()) @@ -1637,15 +1637,15 @@ QString RTFWorker::lookupFont(const QString& markup, const QString& fontName) kdDebug(30515) << "RTFWorker::lookupFont " << fontName << " cooked: " << cookedFontName << endl; uint counter=0; // counts position in font table (starts at 0) - QString strFont(markup); // markup for font selection - QStringList::ConstIterator it; + TQString strFont(markup); // markup for font selection + TQStringList::ConstIterator it; // search font table for this font for( it = m_fontList.begin(); it != m_fontList.end(); counter++, ++it ) { if((*it) == cookedFontName) // check for match { - strFont += QString::number(counter); + strFont += TQString::number(counter); kdDebug(30515) << strFont << endl; return strFont; } @@ -1654,64 +1654,64 @@ QString RTFWorker::lookupFont(const QString& markup, const QString& fontName) kdDebug(30515) << "New font: " << cookedFontName << " count: " << counter << endl; m_fontList << cookedFontName; - strFont += QString::number(counter); + strFont += TQString::number(counter); return strFont; } -QString RTFWorker::lookupColor(const QString& markup, const QColor& color) +TQString RTFWorker::lookupColor(const TQString& markup, const TQColor& color) { if (!color.isValid()) - return QString::null; + return TQString(); uint counter=1; // counts position in color table starting at 1 - QString strColor(markup); // Holds RTF markup for the color + TQString strColor(markup); // Holds RTF markup for the color - QValueList < QColor > ::ConstIterator it; + TQValueList < TQColor > ::ConstIterator it; // search color table for this color for( it = m_colorList.begin(); it != m_colorList.end(); counter++, ++it ) { if ( (*it) == color ) { - strColor += QString::number(counter); + strColor += TQString::number(counter); return strColor; } } - kdDebug(30515) << "New color: " << color.name() << " count: " << counter << endl; + kdDebug(30515) << "New color: " << TQString(color.name()) << " count: " << counter << endl; m_colorList << color; - strColor += QString::number(counter); + strColor += TQString::number(counter); return strColor; } -QString RTFWorker::lookupStyle(const QString& styleName, LayoutData& returnLayout) +TQString RTFWorker::lookupStyle(const TQString& styleName, LayoutData& returnLayout) { if (styleName.isEmpty()) - return QString::null; + return TQString(); uint counter=0; // counts position in style table starting at 0 - QString strMarkup("\\s"); // Holds RTF markup for the style + TQString strMarkup("\\s"); // Holds RTF markup for the style - QValueList < LayoutData > ::ConstIterator it; - QValueList < LayoutData > ::ConstIterator end(m_styleList.end()); + TQValueList < LayoutData > ::ConstIterator it; + TQValueList < LayoutData > ::ConstIterator end(m_styleList.end()); // search color table for this color for( it = m_styleList.begin(); it != end; counter++, ++it ) { if ( (*it).styleName == styleName ) { - strMarkup += QString::number(counter); + strMarkup += TQString::number(counter); returnLayout=(*it); return strMarkup; } } kdDebug(30515) << "New style: " << styleName << " count: " << counter << endl; - LayoutData layout; - m_styleList << layout; - returnLayout=layout; + LayoutData tqlayout; + m_styleList << tqlayout; + returnLayout=tqlayout; - strMarkup += QString::number(counter); + strMarkup += TQString::number(counter); return strMarkup; } diff --git a/filters/kword/rtf/export/ExportFilter.h b/filters/kword/rtf/export/ExportFilter.h index a35dd1b7..77567980 100644 --- a/filters/kword/rtf/export/ExportFilter.h +++ b/filters/kword/rtf/export/ExportFilter.h @@ -21,9 +21,9 @@ #ifndef EXPORTFILTERFULLPOWER_H #define EXPORTFILTERFULLPOWER_H -#include <qvaluestack.h> -#include <qvaluelist.h> -#include <qstringlist.h> +#include <tqvaluestack.h> +#include <tqvaluelist.h> +#include <tqstringlist.h> #include <KWEFBaseWorker.h> @@ -40,11 +40,11 @@ public: RTFWorker(void); virtual ~RTFWorker(void) { delete m_streamOut; delete m_ioDevice; } public: - virtual bool doOpenFile(const QString& filenameOut, const QString& to); + virtual bool doOpenFile(const TQString& filenameOut, const TQString& to); virtual bool doCloseFile(void); ///< Close file in normal conditions virtual bool doOpenDocument(void); virtual bool doCloseDocument(void); - virtual bool doFullParagraph(const QString& paraText, const LayoutData& layout, + virtual bool doFullParagraph(const TQString& paraText, const LayoutData& tqlayout, const ValueListFormatData& paraFormatDataList); virtual bool doFullDocumentInfo(const KWEFDocumentInfo& docInfo); virtual bool doOpenTextFrameSet(void); @@ -53,57 +53,57 @@ public: const double width, const double height, const int orientation); virtual bool doFullPaperBorders (const double top, const double left, const double bottom, const double right); - virtual bool doFullDefineStyle(LayoutData& layout); + virtual bool doFullDefineStyle(LayoutData& tqlayout); virtual bool doHeader(const HeaderData& header); virtual bool doFooter(const FooterData& footer); virtual bool doVariableSettings(const VariableSettingsData& vs); private: - QString openSpan(const FormatData& formatOrigin, const FormatData& format); - QString closeSpan(const FormatData& formatOrigin, const FormatData& format); + TQString openSpan(const FormatData& formatOrigin, const FormatData& format); + TQString closeSpan(const FormatData& formatOrigin, const FormatData& format); /** * Encodes the @p text into * RTF seven bit ASCII. This affects any 8 bit characters. * They are encoded either with \\' or with \\u * @return the escaped string */ - QString escapeRtfText ( const QString& text ) const; - QString ProcessParagraphData ( const QString ¶Text, - const LayoutData& layout, const ValueListFormatData ¶FormatDataList); - QString formatTextParagraph(const QString& strText, + TQString escapeRtfText ( const TQString& text ) const; + TQString ProcessParagraphData ( const TQString ¶Text, + const LayoutData& tqlayout, const ValueListFormatData ¶FormatDataList); + TQString formatTextParagraph(const TQString& strText, const FormatData& formatOrigin, const FormatData& format); - QString makeTable(const FrameAnchor& anchor); - bool convertUnknownPicture(const QString& strName, const QString& extension, QByteArray& image); - QString makeImage(const FrameAnchor& anchor); + TQString makeTable(const FrameAnchor& anchor); + bool convertUnknownPicture(const TQString& strName, const TQString& extension, TQByteArray& image); + TQString makeImage(const FrameAnchor& anchor); void writeFontData(void); void writeColorData(void); void writeStyleData(void); - QString textFormatToRtf(const TextFormatting& formatOrigin, + TQString textFormatToRtf(const TextFormatting& formatOrigin, const TextFormatting& formatData, const bool force); - QString layoutToRtf(const LayoutData& layoutOrigin, - const LayoutData& layout, const bool force); - QString lookupFont(const QString& markup, const QString& fontName); - QString lookupColor(const QString& markup, const QColor& color); - QString lookupStyle(const QString& styleName, LayoutData& returnLayout); - QString writeRow(const QString& textCellHeader, const QString& rowText, const FrameData& frame); - QString writeBorder(const char whichBorder, const int borderWidth, const QColor& color); + TQString tqlayoutToRtf(const LayoutData& tqlayoutOrigin, + const LayoutData& tqlayout, const bool force); + TQString lookupFont(const TQString& markup, const TQString& fontName); + TQString lookupColor(const TQString& markup, const TQColor& color); + TQString lookupStyle(const TQString& styleName, LayoutData& returnLayout); + TQString writeRow(const TQString& textCellHeader, const TQString& rowText, const FrameData& frame); + TQString writeBorder(const char whichBorder, const int borderWidth, const TQColor& color); protected: - QIODevice* m_ioDevice; - QTextStream* m_streamOut; - QString m_eol; - QString m_textDocInfo; - QString m_textPage; - QString m_textBody; - QString m_fileName; ///< Name of the output file - QValueStack<ListInfo> m_listStack; ///< Stack for list information - QStringList m_fontList; - QValueList<QColor> m_colorList; - QValueList<LayoutData> m_styleList; + TQIODevice* m_ioDevice; + TQTextStream* m_streamOut; + TQString m_eol; + TQString m_textDocInfo; + TQString m_textPage; + TQString m_textBody; + TQString m_fileName; ///< Name of the output file + TQValueStack<ListInfo> m_listStack; ///< Stack for list information + TQStringList m_fontList; + TQValueList<TQColor> m_colorList; + TQValueList<LayoutData> m_styleList; bool m_inTable; bool m_paperOrientation; double m_paperWidth, m_paperHeight; double m_paperMarginTop, m_paperMarginLeft, m_paperMarginBottom, m_paperMarginRight; - QString m_prefix; + TQString m_prefix; int m_startPageNumber; }; diff --git a/filters/kword/rtf/export/rtfexport.cc b/filters/kword/rtf/export/rtfexport.cc index 87d6d9d3..15ff976b 100644 --- a/filters/kword/rtf/export/rtfexport.cc +++ b/filters/kword/rtf/export/rtfexport.cc @@ -53,11 +53,11 @@ K_EXPORT_COMPONENT_FACTORY( librtfexport, RTFExportFactory( "kofficefilters" ) ) // RTFExport // -RTFExport::RTFExport(KoFilter *, const char *, const QStringList &) : +RTFExport::RTFExport(KoFilter *, const char *, const TQStringList &) : KoFilter() { } -KoFilter::ConversionStatus RTFExport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus RTFExport::convert( const TQCString& from, const TQCString& to ) { if ((from != "application/x-kword") || (to != "text/rtf" && to != "application/msword" )) { @@ -77,7 +77,7 @@ KoFilter::ConversionStatus RTFExport::convert( const QCString& from, const QCStr return KoFilter::StupidError; } - KoFilter::ConversionStatus result=leader->convert(m_chain, from,to ); + KoFilter::ConversiontqStatus result=leader->convert(m_chain, from,to ); delete leader; delete worker; diff --git a/filters/kword/rtf/export/rtfexport.h b/filters/kword/rtf/export/rtfexport.h index 8e446113..e5276f1a 100644 --- a/filters/kword/rtf/export/rtfexport.h +++ b/filters/kword/rtf/export/rtfexport.h @@ -21,10 +21,10 @@ #ifndef RTFEXPORT_H #define RTFEXPORT_H -#include <qstring.h> -#include <qtextstream.h> -#include <qfile.h> -#include <qobject.h> +#include <tqstring.h> +#include <tqtextstream.h> +#include <tqfile.h> +#include <tqobject.h> #include <KoFilter.h> #include <KoStore.h> @@ -33,12 +33,13 @@ class RTFExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - RTFExport(KoFilter *parent, const char *name, const QStringList &); + RTFExport(KoFilter *tqparent, const char *name, const TQStringList &); virtual ~RTFExport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; #endif // RTFEXPORT_H diff --git a/filters/kword/rtf/import/rtfimport.cpp b/filters/kword/rtf/import/rtfimport.cpp index 7418494d..bb17d532 100644 --- a/filters/kword/rtf/import/rtfimport.cpp +++ b/filters/kword/rtf/import/rtfimport.cpp @@ -1,4 +1,4 @@ -// kate: space-indent on; indent-width 4; replace-tabs off; +// kate: space-indent on; indent-width 4; tqreplace-tabs off; /* This file is part of the KDE project Copyright (C) 2001 Ewald Snel <ewald@rambo.its.tudelft.nl> @@ -14,18 +14,18 @@ // ### FIXME: copyright holders/date #include <kdebug.h> -#include <qfontinfo.h> +#include <tqfontinfo.h> #include <stddef.h> #include <string.h> #include <KoFilterChain.h> #include <kgenericfactory.h> -#include <qcstring.h> -#include <qstringlist.h> -#include <qdir.h> -#include <qfileinfo.h> -#include <qregexp.h> -#include <qvaluelist.h> +#include <tqcstring.h> +#include <tqstringlist.h> +#include <tqdir.h> +#include <tqfileinfo.h> +#include <tqregexp.h> +#include <tqvaluelist.h> #include <kurl.h> #include <kmessagebox.h> @@ -98,7 +98,7 @@ static RTFProperty propertyTable[] = MEMBER( 0L, "b", setToggleProperty, state.format.bold, 0 ), // \bin is handled in the tokenizer MEMBER( "@colortbl", "blue", setNumericProperty, blue, 0 ), - MEMBER( 0L, "box", setEnumProperty, state.layout.border, 0 ), + MEMBER( 0L, "box", setEnumProperty, state.tqlayout.border, 0 ), PROP( 0L, "brdrb", selectLayoutBorder, 0L, 3 ), PROP( 0L, "brdrcf", setBorderColor, 0L, 0 ), PROP( 0L, "brdrdash", setBorderStyle, 0L, RTFBorder::Dashes ), @@ -146,29 +146,29 @@ static RTFProperty propertyTable[] = PROP( 0L, "expndtw", ignoreKeyword, 0L, 0 ), // Expansion/compression of character inter-space not supported MEMBER( 0L, "f", setNumericProperty, state.format.font, 0 ), MEMBER( "@rtf", "facingp", setFlagProperty, facingPages, true ), - PROP( 0L, "fcharset", setCharset, 0L, 0 ), // Not needed with Qt - PROP( "@fonttbl", "fdecor", setFontStyleHint, 0L, QFont::Decorative ), - MEMBER( 0L, "fi", setNumericProperty, state.layout.firstIndent, 0 ), - PROP( "@fonttbl", "fmodern", setFontStyleHint, 0L, QFont::TypeWriter ), - PROP( "@fonttbl", "fnil", setFontStyleHint, 0L, QFont::AnyStyle ), + PROP( 0L, "fcharset", setCharset, 0L, 0 ), // Not needed with TQt + PROP( "@fonttbl", "fdecor", setFontStyleHint, 0L, TQFont::Decorative ), + MEMBER( 0L, "fi", setNumericProperty, state.tqlayout.firstIndent, 0 ), + PROP( "@fonttbl", "fmodern", setFontStyleHint, 0L, TQFont::TypeWriter ), + PROP( "@fonttbl", "fnil", setFontStyleHint, 0L, TQFont::AnyStyle ), MEMBER( 0L, "footery", setNumericProperty, state.section.footerMargin, 0 ), PROP( 0L, "formshade", ignoreKeyword, 0L, 0 ), // Not supported, KWord has no form support MEMBER( "@fonttbl", "fprq", setNumericProperty, font.fixedPitch, 0 ), - PROP( "@fonttbl", "froman", setFontStyleHint, 0L, QFont::Serif ), + PROP( "@fonttbl", "froman", setFontStyleHint, 0L, TQFont::Serif ), MEMBER( 0L, "fs", setNumericProperty, state.format.fontSize, 0 ), - PROP( "@fonttbl", "fscript", setFontStyleHint, 0L, QFont::AnyStyle ), - PROP( "@fonttbl", "fswiss", setFontStyleHint, 0L, QFont::SansSerif ), - PROP( "@fonttbl", "ftech", setFontStyleHint, 0L, QFont::AnyStyle ), + PROP( "@fonttbl", "fscript", setFontStyleHint, 0L, TQFont::AnyStyle ), + PROP( "@fonttbl", "fswiss", setFontStyleHint, 0L, TQFont::SansSerif ), + PROP( "@fonttbl", "ftech", setFontStyleHint, 0L, TQFont::AnyStyle ), MEMBER( "@colortbl", "green", setNumericProperty, green, 0 ), MEMBER( 0L, "headery", setNumericProperty, state.section.headerMargin, 0 ), MEMBER( 0L, "i", setToggleProperty, state.format.italic, 0 ), - MEMBER( 0L, "intbl", setFlagProperty, state.layout.inTable, true ), + MEMBER( 0L, "intbl", setFlagProperty, state.tqlayout.inTable, true ), PROP( "@pict", "jpegblip", setPictureType, 0L, RTFPicture::JPEG ), - MEMBER( 0L, "keep", setFlagProperty, state.layout.keep, true ), - MEMBER( 0L, "keepn", setFlagProperty, state.layout.keepNext, true ), + MEMBER( 0L, "keep", setFlagProperty, state.tqlayout.keep, true ), + MEMBER( 0L, "keepn", setFlagProperty, state.tqlayout.keepNext, true ), MEMBER( "@rtf", "landscape", setFlagProperty, landscape, true ), PROP( 0L, "ldblquote", insertSymbol, 0L, 0x201c ), - MEMBER( 0L, "li", setNumericProperty, state.layout.leftIndent, 0 ), + MEMBER( 0L, "li", setNumericProperty, state.tqlayout.leftIndent, 0 ), PROP( 0L, "line", insertSymbol, 0L, 0x000a ), PROP( 0L, "lquote", insertSymbol, 0L, 0x2018 ), PROP( 0L, "ltrmark", insertSymbol, 0L, 0x200e ), @@ -180,14 +180,14 @@ static RTFProperty propertyTable[] = MEMBER( "@rtf", "margt", setNumericProperty, topMargin, 0 ), MEMBER( 0L, "nosupersub", setEnumProperty, state.format.vertAlign, RTFFormat::Normal ), PROP( "Text", "page", insertPageBreak, 0L, 0 ), - MEMBER( 0L, "pagebb", setFlagProperty, state.layout.pageBB, true ), + MEMBER( 0L, "pagebb", setFlagProperty, state.tqlayout.pageBB, true ), MEMBER( "@rtf", "paperh", setNumericProperty, paperHeight, 0 ), MEMBER( "@rtf", "paperw", setNumericProperty, paperWidth, 0 ), PROP( "Text", "par", insertParagraph, 0L, 0 ), PROP( 0L, "pard", setParagraphDefaults, 0L, 0 ), PROP( 0L, "pc", setPcCodepage, 0L, 0 ), PROP( 0L, "pca", setPcaCodepage, 0L, 0 ), - MEMBER( 0L, "pgbrk", setToggleProperty, state.layout.pageBA, true ), + MEMBER( 0L, "pgbrk", setToggleProperty, state.tqlayout.pageBA, true ), MEMBER( "@pict", "piccropb", setNumericProperty, picture.cropBottom, 0 ), MEMBER( "@pict", "piccropl", setNumericProperty, picture.cropLeft, 0 ), MEMBER( "@pict", "piccropr", setNumericProperty, picture.cropRight, 0 ), @@ -202,25 +202,25 @@ static RTFProperty propertyTable[] = PROP( 0L, "plain", setPlainFormatting, 0L, 0 ), PROP( "@pict", "pmmetafile", setPictureType, 0L, RTFPicture::WMF ), PROP( "@pict", "pngblip", setPictureType, 0L, RTFPicture::PNG ), - MEMBER( 0L, "qc", setEnumProperty, state.layout.alignment, RTFLayout::Centered ), - MEMBER( 0L, "qj", setEnumProperty, state.layout.alignment, RTFLayout::Justified ), - MEMBER( 0L, "ql", setEnumProperty, state.layout.alignment, RTFLayout::Left ), + MEMBER( 0L, "qc", setEnumProperty, state.tqlayout.tqalignment, RTFLayout::Centered ), + MEMBER( 0L, "qj", setEnumProperty, state.tqlayout.tqalignment, RTFLayout::Justified ), + MEMBER( 0L, "ql", setEnumProperty, state.tqlayout.tqalignment, RTFLayout::Left ), PROP( 0L, "qmspace", insertSymbol, 0L, 0x2004 ), - MEMBER( 0L, "qr", setEnumProperty, state.layout.alignment, RTFLayout::Right ), + MEMBER( 0L, "qr", setEnumProperty, state.tqlayout.tqalignment, RTFLayout::Right ), PROP( 0L, "rdblquote", insertSymbol, 0L, 0x201d ), MEMBER( "@colortbl", "red", setNumericProperty, red, 0 ), - MEMBER( 0L, "ri", setNumericProperty, state.layout.rightIndent, 0 ), + MEMBER( 0L, "ri", setNumericProperty, state.tqlayout.rightIndent, 0 ), PROP( "Text", "row", insertTableRow, 0L, 0 ), PROP( 0L, "rquote", insertSymbol, 0L, 0x2019 ), PROP( 0L, "rtlmark", insertSymbol, 0L, 0x200f ), - MEMBER( 0L, "s", setNumericProperty, state.layout.style, 0 ), - MEMBER( 0L, "sa", setNumericProperty, state.layout.spaceAfter, 0 ), - MEMBER( 0L, "sb", setNumericProperty, state.layout.spaceBefore, 0 ), + MEMBER( 0L, "s", setNumericProperty, state.tqlayout.style, 0 ), + MEMBER( 0L, "sa", setNumericProperty, state.tqlayout.spaceAfter, 0 ), + MEMBER( 0L, "sb", setNumericProperty, state.tqlayout.spaceBefore, 0 ), MEMBER( 0L, "scaps", setToggleProperty, state.format.smallCaps, 0 ), PROP( "Text", "sect", insertPageBreak, 0L, 0 ), PROP( 0L, "sectd", setSectionDefaults, 0L, 0 ), - MEMBER( 0L, "sl", setNumericProperty, state.layout.spaceBetween, 0 ), - MEMBER( 0L, "slmult", setToggleProperty, state.layout.spaceBetweenMultiple, 0 ), + MEMBER( 0L, "sl", setNumericProperty, state.tqlayout.spaceBetween, 0 ), + MEMBER( 0L, "slmult", setToggleProperty, state.tqlayout.spaceBetweenMultiple, 0 ), MEMBER( "@stylesheet", "snext", setNumericProperty, style.next, 0 ), MEMBER( 0L, "strike", setToggleProperty, state.format.strike, 0 ), MEMBER( 0L, "striked", setToggleProperty, state.format.striked, 0 ), @@ -228,18 +228,18 @@ static RTFProperty propertyTable[] = MEMBER( 0L, "super", setEnumProperty, state.format.vertAlign, RTFFormat::SuperScript ), PROP( 0L, "tab", insertSymbol, 0L, 0x0009 ), MEMBER( 0L, "titlepg", setFlagProperty, state.section.titlePage, true ), - MEMBER( 0L, "tldot", setEnumProperty, state.layout.tab.leader, RTFTab::Dots ), - MEMBER( 0L, "tlhyph", setEnumProperty, state.layout.tab.leader, RTFTab::Hyphens ), - MEMBER( 0L, "tlth", setEnumProperty, state.layout.tab.leader, RTFTab::ThickLine ), - MEMBER( 0L, "tlul", setEnumProperty, state.layout.tab.leader, RTFTab::Underline ), - MEMBER( 0L, "tqc", setEnumProperty, state.layout.tab.type, RTFTab::Centered ), - MEMBER( 0L, "tqdec", setEnumProperty, state.layout.tab.type, RTFTab::Decimal ), - MEMBER( 0L, "tqr", setEnumProperty, state.layout.tab.type, RTFTab::FlushRight ), + MEMBER( 0L, "tldot", setEnumProperty, state.tqlayout.tab.leader, RTFTab::Dots ), + MEMBER( 0L, "tlhyph", setEnumProperty, state.tqlayout.tab.leader, RTFTab::Hyphens ), + MEMBER( 0L, "tlth", setEnumProperty, state.tqlayout.tab.leader, RTFTab::ThickLine ), + MEMBER( 0L, "tlul", setEnumProperty, state.tqlayout.tab.leader, RTFTab::Underline ), + MEMBER( 0L, "tqc", setEnumProperty, state.tqlayout.tab.type, RTFTab::Centered ), + MEMBER( 0L, "tqdec", setEnumProperty, state.tqlayout.tab.type, RTFTab::Decimal ), + MEMBER( 0L, "tqr", setEnumProperty, state.tqlayout.tab.type, RTFTab::FlushRight ), MEMBER( 0L, "trleft", setNumericProperty, state.tableRow.left, 0 ), MEMBER( 0L, "trowd", setTableRowDefaults, state.tableRow, 0 ), - MEMBER( 0L, "trqc", setEnumProperty, state.tableRow.alignment, RTFLayout::Centered ), - MEMBER( 0L, "trql", setEnumProperty, state.tableRow.alignment, RTFLayout::Left ), - MEMBER( 0L, "trqr", setEnumProperty, state.tableRow.alignment, RTFLayout::Right ), + MEMBER( 0L, "trqc", setEnumProperty, state.tableRow.tqalignment, RTFLayout::Centered ), + MEMBER( 0L, "trql", setEnumProperty, state.tableRow.tqalignment, RTFLayout::Left ), + MEMBER( 0L, "trqr", setEnumProperty, state.tableRow.tqalignment, RTFLayout::Right ), MEMBER( 0L, "trrh", setNumericProperty, state.tableRow.height, 0 ), PROP( 0L, "tx", insertTabDef, 0L, 0 ), MEMBER( 0L, "u", insertUnicodeSymbol, state.format.uc, 0 ), @@ -287,7 +287,7 @@ static const char *alignN[4] = { "left", "right", "justify", "center" }; static const char *boolN[2] = { "false", "true" }; static const char *borderN[4] = { "LEFTBORDER", "RIGHTBORDER", "TOPBORDER", "BOTTOMBORDER" }; -RTFImport::RTFImport( KoFilter *, const char *, const QStringList& ) +RTFImport::RTFImport( KoFilter *, const char *, const TQStringList& ) : KoFilter(), properties(181), destinationProperties(29), textCodec(0), utf8TextCodec(0) { for (uint i=0; i < sizeof(propertyTable) / sizeof(propertyTable[0]); i++) @@ -299,7 +299,7 @@ RTFImport::RTFImport( KoFilter *, const char *, const QStringList& ) destinationProperties.insert( destinationPropertyTable[i].name, &destinationPropertyTable[i] ); } // DEBUG START - // Check the hash size (see QDict doc) + // Check the hash size (see TQDict doc) kdDebug(30515) << properties.count() << " normal and " << destinationProperties.count() << " destination keywords loaded" << endl; if (properties.size() < properties.count()) kdWarning(30515) << "Hash size of properties too small: " << properties.size() << ". It should be at least " << properties.count() << " and be a prime number"<< endl; @@ -309,13 +309,13 @@ RTFImport::RTFImport( KoFilter *, const char *, const QStringList& ) fnnum=0; } -KoFilter::ConversionStatus RTFImport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus RTFImport::convert( const TQCString& from, const TQCString& to ) { // This filter only supports RTF to KWord conversion if ((from != "text/rtf") || (to != "application/x-kword")) return KoFilter::NotImplemented; - QTime debugTime; + TQTime debugTime; debugTime.start(); // Are we in batch mode, i.e. non-interactive @@ -325,7 +325,7 @@ KoFilter::ConversionStatus RTFImport::convert( const QCString& from, const QCStr // Open input file inFileName = m_chain->inputFile(); - QFile in( inFileName ); + TQFile in( inFileName ); if (!in.open( IO_ReadOnly )) { @@ -384,7 +384,7 @@ KoFilter::ConversionStatus RTFImport::convert( const QCString& from, const QCStr if ( !m_batch ) { force = ( KMessageBox::warningYesNo( 0L, - i18n("The RTF (Rich Text Format) document has an unexpected version number: %1. Continuing might result in an erroneous conversion. Do you want to continue?").arg( token.value ), + i18n("The RTF (Rich Text Format) document has an unexpected version number: %1. Continuing might result in an erroneous conversion. Do you want to continue?").tqarg( token.value ), i18n("KWord's RTF Import Filter") ) == KMessageBox::Yes ); } if ( !force ) @@ -403,7 +403,7 @@ KoFilter::ConversionStatus RTFImport::convert( const QCString& from, const QCStr if ( !m_batch ) { force = ( KMessageBox::warningYesNo( 0L, - i18n("The PWD (PocketWord's Rich Text Format) document has an unexpected version number: %1. Continuing might result in an erroneous conversion. Do you want to continue?").arg( token.value ), + i18n("The PWD (PocketWord's Rich Text Format) document has an unexpected version number: %1. Continuing might result in an erroneous conversion. Do you want to continue?").tqarg( token.value ), i18n("KWord's RTF Import Filter") ) == KMessageBox::Yes ); } if ( !force ) @@ -422,7 +422,7 @@ KoFilter::ConversionStatus RTFImport::convert( const QCString& from, const QCStr if ( !m_batch ) { force = ( KMessageBox::warningYesNo( 0L, - i18n("The URTF (\"Unicode Rich Text Format\") document has an unexpected version number: %1. Continuing might result in an erroneous conversion. Do you want to continue?").arg( token.value ), + i18n("The URTF (\"Unicode Rich Text Format\") document has an unexpected version number: %1. Continuing might result in an erroneous conversion. Do you want to continue?").tqarg( token.value ), i18n("KWord's RTF Import Filter") ) == KMessageBox::Yes ); } if ( !force ) @@ -439,7 +439,7 @@ KoFilter::ConversionStatus RTFImport::convert( const QCString& from, const QCStr if ( !m_batch ) { KMessageBox::error( 0L, - i18n("The RTF document cannot be loaded, as it has an unexpected first keyword: \\%1.").arg( token.text ), + i18n("The RTF document cannot be loaded, as it has an unexpected first keyword: \\%1.").tqarg( token.text ), i18n("KWord's RTF Import Filter"), 0 ); } return KoFilter::WrongFormat; @@ -487,12 +487,12 @@ KoFilter::ConversionStatus RTFImport::convert( const QCString& from, const QCStr state.format.uc=1; state.ignoreGroup = false; - utf8TextCodec=QTextCodec::codecForName("UTF-8"); - kdDebug(30515) << "UTF-8 asked, given: " << (utf8TextCodec?utf8TextCodec->name():QString("-none-")) << endl; + utf8TextCodec=TQTextCodec::codecForName("UTF-8"); + kdDebug(30515) << "UTF-8 asked, given: " << (utf8TextCodec?TQString(utf8TextCodec->name()):TQString("-none-")) << endl; // There is no default encoding in RTF, it must be always declared. (But beware of buggy files!) - textCodec=QTextCodec::codecForName("CP 1252"); // Or IBM 437 ? - kdDebug(30515) << "CP 1252 asked, given: " << (textCodec?textCodec->name():QString("-none-")) << endl; + textCodec=TQTextCodec::codecForName("CP 1252"); // Or IBM 437 ? + kdDebug(30515) << "CP 1252 asked, given: " << (textCodec?TQString(textCodec->name()):TQString("-none-")) << endl; // Parse RTF document while (true) @@ -536,7 +536,7 @@ KoFilter::ConversionStatus RTFImport::convert( const QCString& from, const QCStr destination = destinationStack.pop(); } } - // ### TODO: why can this not be simplified to use QValueList::isEmpty() + // ### TODO: why can this not be simplified to use TQValueList::isEmpty() if (stateStack.count() <= 1) { // End-of-document, keep formatting properties @@ -700,7 +700,7 @@ KoFilter::ConversionStatus RTFImport::convert( const QCString& from, const QCStr int num=1; for(RTFTextState* i=footnotes.first();i;i=footnotes.next()) { - QCString str; + TQCString str; str.setNum(num); str.prepend("Footnote "); num++; @@ -722,16 +722,16 @@ KoFilter::ConversionStatus RTFImport::convert( const QCString& from, const QCStr kwFormat.len = 0; // Process all styles in the style sheet - const QValueList<RTFStyle>::ConstIterator endStyleSheet=styleSheet.end(); - for (QValueList<RTFStyle>::ConstIterator it=styleSheet.begin();it!=endStyleSheet;++it) + const TQValueList<RTFStyle>::ConstIterator endStyleSheet=styleSheet.end(); + for (TQValueList<RTFStyle>::ConstIterator it=styleSheet.begin();it!=endStyleSheet;++it) { mainDoc.addNode( "STYLE" ); kwFormat.fmt = (*it).format; // Search for 'following' style - for (QValueList<RTFStyle>::ConstIterator it2=styleSheet.begin();it2!=endStyleSheet;++it2) + for (TQValueList<RTFStyle>::ConstIterator it2=styleSheet.begin();it2!=endStyleSheet;++it2) { - if ((*it2).layout.style == (*it).next) + if ((*it2).tqlayout.style == (*it).next) { mainDoc.addNode( "FOLLOWING" ); mainDoc.setAttribute( "name", CheckAndEscapeXmlText( (*it2).name )); @@ -739,7 +739,7 @@ KoFilter::ConversionStatus RTFImport::convert( const QCString& from, const QCStr break; } } - addLayout( mainDoc, (*it).name, (*it).layout, false ); + addLayout( mainDoc, (*it).name, (*it).tqlayout, false ); addFormat( mainDoc, kwFormat, 0L ); mainDoc.closeNode( "STYLE" ); } @@ -791,9 +791,9 @@ KoFilter::ConversionStatus RTFImport::convert( const QCString& from, const QCStr kdDebug(30515) << "RTF FILTER TIME: " << debugTime.elapsed() << endl; - for (QMap<QString,int>::ConstIterator it=debugUnknownKeywords.begin(); + for (TQMap<TQString,int>::ConstIterator it=debugUnknownKeywords.begin(); it!=debugUnknownKeywords.end();it++) - kdDebug(30515) << "Unknown keyword: " << QString( "%1" ).arg( it.data(), 4 ) << " * " << it.key() << endl; + kdDebug(30515) << "Unknown keyword: " << TQString( "%1" ).tqarg( it.data(), 4 ) << " * " << it.key() << endl; return KoFilter::OK; } @@ -804,55 +804,55 @@ void RTFImport::ignoreKeyword( RTFProperty * ) void RTFImport::setCodepage( RTFProperty * ) { - QTextCodec* oldCodec = textCodec; - QCString cp; + TQTextCodec* oldCodec = textCodec; + TQCString cp; if ( token.value == 10000 ) { - cp = "Apple Roman"; // ### TODO: how to support the other ones (Qt does not know them!) + cp = "Apple Roman"; // ### TODO: how to support the other ones (TQt does not know them!) } else { cp.setNum( token.value ); cp.prepend("CP"); } - textCodec=QTextCodec::codecForName(cp); - kdDebug(30515) << "\\ansicpg: codepage: " << token.value << "asked: "<< cp << " given: " << (textCodec?textCodec->name():QString("-none-")) << endl; + textCodec=TQTextCodec::codecForName(cp); + kdDebug(30515) << "\\ansicpg: codepage: " << token.value << "asked: "<< cp << " given: " << (textCodec?TQString(textCodec->name()):TQString("-none-")) << endl; if ( ! textCodec ) textCodec = oldCodec; } void RTFImport::setMacCodepage( RTFProperty * ) { - QTextCodec* oldCodec = textCodec; - textCodec=QTextCodec::codecForName("Apple Roman"); - kdDebug(30515) << "\\mac " << (textCodec?textCodec->name():QString("-none-")) << endl; + TQTextCodec* oldCodec = textCodec; + textCodec=TQTextCodec::codecForName("Apple Roman"); + kdDebug(30515) << "\\mac " << (textCodec?TQString(textCodec->name()):TQString("-none-")) << endl; if ( ! textCodec ) textCodec = oldCodec; } void RTFImport::setAnsiCodepage( RTFProperty * ) { - QTextCodec* oldCodec = textCodec; - textCodec=QTextCodec::codecForName("CP1252"); - kdDebug(30515) << "\\ansi " << (textCodec?textCodec->name():QString("-none-")) << endl; + TQTextCodec* oldCodec = textCodec; + textCodec=TQTextCodec::codecForName("CP1252"); + kdDebug(30515) << "\\ansi " << (textCodec?TQString(textCodec->name()):TQString("-none-")) << endl; if ( ! textCodec ) textCodec = oldCodec; } void RTFImport::setPcaCodepage( RTFProperty * ) { - QTextCodec* oldCodec = textCodec; - textCodec=QTextCodec::codecForName("IBM 850"); // Qt writes the name with a space - kdDebug(30515) << "\\pca " << (textCodec?textCodec->name():QString("-none-")) << endl; + TQTextCodec* oldCodec = textCodec; + textCodec=TQTextCodec::codecForName("IBM 850"); // TQt writes the name with a space + kdDebug(30515) << "\\pca " << (textCodec?TQString(textCodec->name()):TQString("-none-")) << endl; if ( ! textCodec ) textCodec = oldCodec; } void RTFImport::setPcCodepage( RTFProperty * ) { - QTextCodec* oldCodec = textCodec; - textCodec=QTextCodec::codecForName("IBM 850"); // This is an approximation - kdDebug(30515) << "\\pc (approximation) " << (textCodec?textCodec->name():QString("-none-")) << endl; + TQTextCodec* oldCodec = textCodec; + textCodec=TQTextCodec::codecForName("IBM 850"); // This is an approximation + kdDebug(30515) << "\\pc (approximation) " << (textCodec?TQString(textCodec->name()):TQString("-none-")) << endl; if ( ! textCodec ) textCodec = oldCodec; } @@ -869,7 +869,7 @@ void RTFImport::setFlagProperty( RTFProperty *property ) void RTFImport::setCharset( RTFProperty *property ) { - QCString cp; + TQCString cp; switch(token.value) { case 0: cp = "CP1252"; break; // ANSI_CHARSET case 1: cp = "CP1252"; break; // DEFAULT_CHARSET @@ -877,7 +877,7 @@ void RTFImport::setCharset( RTFProperty *property ) case 77: cp = "Apple Roman"; break; // MAC_CHARSET case 128: cp = "Shift-JIS"; break; // SHIFTJIS_CHARSET "CP932" case 129: cp = "eucKR"; break; // HANGUL_CHARSET "CP949" - case 130: cp = "CP1361"; break; // JOHAB_CHARSET doesn't really seem to be supported by Qt :-( + case 130: cp = "CP1361"; break; // JOHAB_CHARSET doesn't really seem to be supported by TQt :-( case 134: cp = "GB2312"; break; // GB2312_CHARSET "CP936" case 136: cp = "Big5-HKSCS"; break; // CHINESEBIG5_CHARSET "CP950" case 161: cp = "CP1253"; break; // GREEK_CHARSET @@ -892,9 +892,9 @@ void RTFImport::setCharset( RTFProperty *property ) case 255: cp = "CP850"; break; // OEM_CHARSET "IBM 850" default: return; } - QTextCodec* oldCodec = textCodec; - textCodec=QTextCodec::codecForName(cp); - kdDebug(30515) << "\\fcharset: charset: " << token.value << " codepage: "<< cp << " given: " << (textCodec?textCodec->name():QString("-none-")) << endl; + TQTextCodec* oldCodec = textCodec; + textCodec=TQTextCodec::codecForName(cp); + kdDebug(30515) << "\\fcharset: charset: " << token.value << " codepage: "<< cp << " given: " << (textCodec?TQString(textCodec->name()):TQString("-none-")) << endl; if ( ! textCodec ) textCodec = oldCodec; } @@ -911,7 +911,7 @@ void RTFImport::setEnumProperty( RTFProperty *property ) void RTFImport::setFontStyleHint( RTFProperty* property ) { - font.styleHint = QFont::StyleHint( property->value ); + font.tqstyleHint = TQFont::StyleHint( property->value ); } void RTFImport::setPictureType( RTFProperty* property ) @@ -933,15 +933,15 @@ void RTFImport::setUnderlineProperty( RTFProperty* property ) void RTFImport::setBorderStyle( RTFProperty *property ) { - if (state.layout.border) + if (state.tqlayout.border) { - state.layout.border->style = static_cast <RTFBorder::BorderStyle> ( property->value ); + state.tqlayout.border->style = static_cast <RTFBorder::BorderStyle> ( property->value ); } else { for (uint i=0; i < 4; i++) { - state.layout.borders[i].style = static_cast <RTFBorder::BorderStyle> ( property->value ); + state.tqlayout.borders[i].style = static_cast <RTFBorder::BorderStyle> ( property->value ); } } } @@ -949,30 +949,30 @@ void RTFImport::setBorderStyle( RTFProperty *property ) void RTFImport::setBorderProperty( RTFProperty *property ) { //kdDebug() << "setBorderProperty: " << endl; - if (state.layout.border) + if (state.tqlayout.border) { - state.layout.border->width = token.value; + state.tqlayout.border->width = token.value; } else { for (uint i=0; i < 4; i++) { - state.layout.borders[i].width = token.value; + state.tqlayout.borders[i].width = token.value; } } } void RTFImport::setBorderColor( RTFProperty * ) { - if (state.layout.border) + if (state.tqlayout.border) { - state.layout.border->color = token.value; + state.tqlayout.border->color = token.value; } else { for (uint i=0; i < 4; i++) { - state.layout.borders[i].color = token.value; + state.tqlayout.borders[i].color = token.value; } } } @@ -1008,34 +1008,34 @@ void RTFImport::setPlainFormatting( RTFProperty * ) void RTFImport::setParagraphDefaults( RTFProperty * ) { - RTFLayout &layout = state.layout; + RTFLayout &tqlayout = state.tqlayout; - layout.tablist.clear(); - layout.tab.type = RTFTab::Left; - layout.tab.leader = RTFTab::None; + tqlayout.tablist.clear(); + tqlayout.tab.type = RTFTab::Left; + tqlayout.tab.leader = RTFTab::None; for (uint i=0; i < 4; i++) { - RTFBorder &border = layout.borders[i]; + RTFBorder &border = tqlayout.borders[i]; border.color = -1; border.width = 0; border.style = RTFBorder::None; } - layout.firstIndent = 0; - layout.leftIndent = 0; - layout.rightIndent = 0; - layout.spaceBefore = 0; - layout.spaceAfter = 0; - layout.spaceBetween = 0; - layout.spaceBetweenMultiple = false; - layout.style = 0; - layout.alignment = RTFLayout::Left; - layout.border = 0L; - layout.inTable = false; - layout.keep = false; - layout.keepNext = false; - layout.pageBB = false; - layout.pageBA = false; + tqlayout.firstIndent = 0; + tqlayout.leftIndent = 0; + tqlayout.rightIndent = 0; + tqlayout.spaceBefore = 0; + tqlayout.spaceAfter = 0; + tqlayout.spaceBetween = 0; + tqlayout.spaceBetweenMultiple = false; + tqlayout.style = 0; + tqlayout.tqalignment = RTFLayout::Left; + tqlayout.border = 0L; + tqlayout.inTable = false; + tqlayout.keep = false; + tqlayout.keepNext = false; + tqlayout.pageBB = false; + tqlayout.pageBA = false; } void RTFImport::setSectionDefaults( RTFProperty * ) @@ -1054,7 +1054,7 @@ void RTFImport::setTableRowDefaults( RTFProperty * ) tableRow.height = 0; tableRow.left = 0; - tableRow.alignment = RTFLayout::Left; + tableRow.tqalignment = RTFLayout::Left; tableRow.cells.clear(); tableCell.bgcolor = -1; @@ -1069,17 +1069,17 @@ void RTFImport::setTableRowDefaults( RTFProperty * ) void RTFImport::selectLayoutBorder( RTFProperty * property ) { - state.layout.border = & state.layout.borders [ property->value ]; + state.tqlayout.border = & state.tqlayout.borders [ property->value ]; } void RTFImport::selectLayoutBorderFromCell( RTFProperty * property ) { - state.layout.border = & state.tableCell.borders [ property->value ]; + state.tqlayout.border = & state.tableCell.borders [ property->value ]; } void RTFImport::insertParagraph( RTFProperty * ) { - if (state.layout.inTable) + if (state.tqlayout.inTable) { if (textState->table == 0) { @@ -1110,10 +1110,10 @@ void RTFImport::insertPageBreak( RTFProperty * ) void RTFImport::insertTableCell( RTFProperty * ) { //{{ - bool b = state.layout.inTable; - state.layout.inTable = true; + bool b = state.tqlayout.inTable; + state.tqlayout.inTable = true; insertParagraph(); - state.layout.inTable = b; + state.tqlayout.inTable = b; //}} textState->frameSets << textState->cell.toString(); textState->cell.clear( 3 ); @@ -1130,14 +1130,14 @@ void RTFImport::insertTableRow( RTFProperty * ) { char buf[64]; sprintf( buf, "Table %d", textState->table ); - RTFLayout::Alignment align = row.alignment; + RTFLayout::Alignment align = row.tqalignment; // Store the current state on the stack stateStack.push( state ); resetState(); - state.layout.alignment = align; // table alignment + state.tqlayout.tqalignment = align; // table tqalignment - // Add anchor for new table (default layout) + // Add anchor for new table (default tqlayout) addAnchor( buf ); addParagraph( textState->node, false ); @@ -1202,9 +1202,9 @@ void RTFImport::insertCellDef( RTFProperty * ) void RTFImport::insertTabDef( RTFProperty * ) { - RTFTab tab = state.layout.tab; + RTFTab tab = state.tqlayout.tab; tab.position = token.value; - state.layout.tablist.push( tab ); + state.tqlayout.tablist.push( tab ); tab.type = RTFTab::Left; tab.leader = RTFTab::None; } @@ -1235,12 +1235,12 @@ void RTFImport::insertUTF8( int ch ) *text++ = ch; *text++ = 0; - QTextCodec* oldCodec=textCodec; + TQTextCodec* oldCodec=textCodec; if (utf8TextCodec) textCodec=utf8TextCodec; else - kdError(30515) << "No UTF-8 QTextCodec available" << endl; + kdError(30515) << "No UTF-8 TQTextCodec available" << endl; (this->*destination.destproc)(0L); @@ -1297,7 +1297,7 @@ void RTFImport::insertUnicodeSymbol( RTFProperty * ) } else if (token.type == RTFTokenizer::PlainText) { - const uint len = qstrlen( token.text ); + const uint len = tqstrlen( token.text ); if ( len < i ) i -= len; else @@ -1320,8 +1320,8 @@ void RTFImport::parseFontTable( RTFProperty * ) { if (token.type == RTFTokenizer::OpenGroup) { - font.name = QString::null; - font.styleHint = QFont::AnyStyle; + font.name = TQString(); + font.tqstyleHint = TQFont::AnyStyle; font.fixedPitch = 0; } else if (token.type == RTFTokenizer::PlainText) @@ -1341,20 +1341,20 @@ void RTFImport::parseFontTable( RTFProperty * ) // Add font to font table *strchr( token.text, ';' ) = 0; // ### TODO: is this allowed with multi-byte Asian characters? font.name += textCodec->toUnicode( token.text ); - // Use Qt to look up the closest matching installed font - QFont qFont( font.name ); + // Use TQt to look up the closest matching installed font + TQFont qFont( font.name ); qFont.setFixedPitch( (font.fixedPitch == 1) ); - qFont.setStyleHint( font.styleHint ); + qFont.setStyleHint( font.tqstyleHint ); for(;!qFont.exactMatch();) { - int space=font.name.findRev(' ', font.name.length()); + int space=font.name.tqfindRev(' ', font.name.length()); if(space==-1) break; font.name.truncate(space); qFont.setFamily( font.name ); } - const QFontInfo info( qFont ); - const QString newFontName ( info.family() ); + const TQFontInfo info( qFont ); + const TQString newFontName ( info.family() ); kdDebug(30515) << "Font " << state.format.font << " asked: " << font.name << " given: " << newFontName << endl; if ( newFontName.isEmpty() ) @@ -1362,7 +1362,7 @@ void RTFImport::parseFontTable( RTFProperty * ) else fontTable.insert( state.format.font, newFontName ); font.name.truncate( 0 ); - font.styleHint = QFont::AnyStyle; + font.tqstyleHint = TQFont::AnyStyle; font.fixedPitch = 0; } } @@ -1386,8 +1386,8 @@ void RTFImport::parseStyleSheet( RTFProperty * ) *strchr( token.text, ';' ) = 0; // ### TODO: is this allowed with multi-byte Asian characters? style.name += textCodec->toUnicode( token.text ); style.format = state.format; - style.layout = state.layout; - style.next = (style.next == -1) ? style.layout.style : style.next; + style.tqlayout = state.tqlayout; + style.next = (style.next == -1) ? style.tqlayout.style : style.next; styleSheet << style; style.name.truncate( 0 ); style.next = -1; @@ -1409,7 +1409,7 @@ void RTFImport::parseColorTable( RTFProperty * ) // Search for semicolon(s) while ((token.text = strchr( token.text, ';' ))) { - colorTable << QColor( red, green, blue ); + colorTable << TQColor( red, green, blue ); red = green = blue = 0; ++token.text; } @@ -1420,11 +1420,11 @@ void RTFImport::parseBlipUid( RTFProperty * ) { if (token.type == RTFTokenizer::OpenGroup) { - picture.identifier = QString::null; + picture.identifier = TQString(); } else if (token.type == RTFTokenizer::PlainText) { - picture.identifier += QString::fromUtf8( token.text ); + picture.identifier += TQString::fromUtf8( token.text ); } else if (token.type == RTFTokenizer::CloseGroup) { @@ -1452,7 +1452,7 @@ void RTFImport::parsePicture( RTFProperty * ) picture.cropBottom = 0; picture.nibble = 0; picture.bits.truncate( 0 ); - picture.identifier = QString::null; + picture.identifier = TQString(); } else if (token.type == RTFTokenizer::PlainText) { @@ -1460,7 +1460,7 @@ void RTFImport::parsePicture( RTFProperty * ) { *(--token.text) = picture.nibble; } - uint n = qstrlen( token.text ) >> 1; + uint n = tqstrlen( token.text ) >> 1; picture.bits.resize( picture.bits.size() + n ); char *src = token.text; char *dst = (picture.bits.data() + picture.bits.size() - n); @@ -1506,15 +1506,15 @@ void RTFImport::parsePicture( RTFProperty * ) break; } const int id = ++pictureNumber; - QString pictName("pictures/picture"); - pictName += QString::number(id); + TQString pictName("pictures/picture"); + pictName += TQString::number(id); pictName += ext; - QCString frameName; + TQCString frameName; frameName.setNum(id); frameName.prepend("Picture "); - QString idStr; + TQString idStr; if (picture.identifier.isEmpty()) { idStr = pictName; @@ -1538,8 +1538,8 @@ void RTFImport::parsePicture( RTFProperty * ) // Add anchor to rich text destination addAnchor( frameName ); - // It is safe, as we call currentDateTime only once for each picture - const QDateTime dt(QDateTime::currentDateTime()); + // It is safe, as we call tqcurrentDateTime only once for each picture + const TQDateTime dt(TQDateTime::tqcurrentDateTime()); // Add pixmap or clipart (key) pictures.addKey( dt, idStr, pictName ); @@ -1556,11 +1556,11 @@ void RTFImport::parsePicture( RTFProperty * ) frameSets.addKey( dt, idStr ); frameSets.closeNode( "PICTURE" ); frameSets.closeNode( "FRAMESET" ); - picture.identifier = QString::null; + picture.identifier = TQString(); } } -void RTFImport::addImportedPicture( const QString& rawFileName ) +void RTFImport::addImportedPicture( const TQString& rawFileName ) { kdDebug(30515) << "Import field: reading " << rawFileName << endl; @@ -1570,12 +1570,12 @@ void RTFImport::addImportedPicture( const QString& rawFileName ) return; } - QString slashPath( rawFileName ); - slashPath.replace('\\','/'); // Replace directory separators. + TQString slashPath( rawFileName ); + slashPath.tqreplace('\\','/'); // Replace directory separators. // ### TODO: what with MS-DOS absolute paths? (Will only work for KOffice on Win32) - QFileInfo info; + TQFileInfo info; info.setFile( inFileName ); - QDir dir( info.dirPath() ); + TQDir dir( info.dirPath() ); KURL url; url.setPath(dir.filePath( rawFileName )); @@ -1583,7 +1583,7 @@ void RTFImport::addImportedPicture( const QString& rawFileName ) kdDebug(30515) << "Path: " << url.prettyURL() << endl; KoPicture pic; - pic.setKeyAndDownloadPicture(url, 0); // ### TODO: find a better parent if possible + pic.setKeyAndDownloadPicture(url, 0); // ### TODO: find a better tqparent if possible if (pic.isNull()) { kdError(30515) << "Import field: file is empty: " << rawFileName << endl; @@ -1592,12 +1592,12 @@ void RTFImport::addImportedPicture( const QString& rawFileName ) const uint id = ++pictureNumber; - QString pictName("pictures/picture"); - pictName += QString::number(id); + TQString pictName("pictures/picture"); + pictName += TQString::number(id); pictName += '.'; pictName += pic.getExtension(); - QCString frameName; + TQCString frameName; frameName.setNum(id); frameName.prepend("Picture "); @@ -1614,14 +1614,14 @@ void RTFImport::addImportedPicture( const QString& rawFileName ) // Add anchor to rich text destination addAnchor( frameName ); - // It is safe, as we call currentDateTime only once for each picture - const QDateTime dt( pic.getKey().lastModified() ); + // It is safe, as we call tqcurrentDateTime only once for each picture + const TQDateTime dt( pic.getKey().lastModified() ); // Add picture key pictures.addKey( dt, rawFileName, pictName ); // Add picture frameset - const QSize size ( pic.getOriginalSize() * 20 ); // We need twips for addFrame + const TQSize size ( pic.getOriginalSize() * 20 ); // We need twips for addFrame frameSets.addFrameSet( frameName, 2, 0 ); frameSets.addFrame( 0, 0, size.width(), size.height(), 0, 1, 0 ); frameSets.closeNode( "FRAME" ); @@ -1644,13 +1644,13 @@ void RTFImport::insertPageNumber( RTFProperty * ) void RTFImport::insertDateTime( RTFProperty *property ) { kdDebug(30515) << "insertDateTime: " << property->value << endl; - addDateTime( QString::null, bool(property->value), state.format ); + addDateTime( TQString(), bool(property->value), state.format ); } -void RTFImport::addDateTime( const QString& format, const bool isDate, RTFFormat& fmt ) +void RTFImport::addDateTime( const TQString& format, const bool isDate, RTFFormat& fmt ) { bool asDate=isDate; // Should the variable be a date variable? - QString kwordFormat(format); + TQString kwordFormat(format); if (format.isEmpty()) { if (isDate) @@ -1662,7 +1662,7 @@ void RTFImport::addDateTime( const QString& format, const bool isDate, RTFFormat { // It is a time with a specified format, so check if it is really a time // (as in KWord 1.3, a date can have a time format but a time cannot have a date format - const QRegExp regexp ("[yMd]"); // any date format character? + const TQRegExp regexp ("[yMd]"); // any date format character? asDate = (regexp.search(format)>-1); // if yes, then it is a date } DomNode node; @@ -1708,11 +1708,11 @@ void RTFImport::parseField( RTFProperty * ) if (!fldinst.isEmpty()) { DomNode node; - QStringList list ( QStringList::split( ' ', fldinst, false ) ); + TQStringList list ( TQStringList::split( ' ', fldinst, false ) ); kdDebug(30515) << "Field: " << list << endl; uint i; - QString fieldName ( list[0].upper() ); + TQString fieldName ( list[0].upper() ); fieldName.remove('\\'); // Remove \, especialy leading ones in OOWriter RTF files node.clear(7); @@ -1749,7 +1749,7 @@ void RTFImport::parseField( RTFProperty * ) } else if (fieldTable[i].type == 9) { - QString hrefName = QString::null; + TQString hrefName = TQString(); // Use ConstIterator for (uint i=1; i < list.count(); i++) @@ -1768,7 +1768,7 @@ void RTFImport::parseField( RTFProperty * ) } } node.addNode( "LINK" ); - node.setAttribute( "linkName", fldrslt ); + node.setAttribute( "linkName", !fldrslt.isNull() ); node.setAttribute( "hrefName", hrefName ); node.closeNode( "LINK" ); addVariable( node, 9, "STRING", &fldfmt); @@ -1790,21 +1790,21 @@ void RTFImport::parseField( RTFProperty * ) } else if (fieldName == "TIME" || fieldName == "DATE") { - QString strFldinst( QString::fromUtf8(fldinst) ); - QRegExp regexp("\\\\@\\s*\"(.+)\""); // \@ "Text" + TQString strFldinst( TQString::fromUtf8(fldinst) ); + TQRegExp regexp("\\\\@\\s*\"(.+)\""); // \@ "Text" if (regexp.search(strFldinst)==-1) { // Not found? Perhaps it is not in quotes (even if it is rare) kdWarning(30515) << "Date/time field format not in quotes!" << endl; strFldinst += ' '; // Add a space at the end to simplify the regular expression - regexp = QRegExp("\\\\@(\\S+)\\s+"); // \@some_text_up_to_a_space + regexp = TQRegExp("\\\\@(\\S+)\\s+"); // \@some_text_up_to_a_space regexp.search(strFldinst); } - QString format(regexp.cap(1)); + TQString format(regexp.cap(1)); kdDebug(30515) << "Date/time field format: " << format << endl; - format.replace("am/pm", "ap"); - format.replace("a/p", "ap"); // Approximation - format.replace("AM/PM", "AP"); - format.replace("A/P", "AP"); // Approximation + format.tqreplace("am/pm", "ap"); + format.tqreplace("a/p", "ap"); // Approximation + format.tqreplace("AM/PM", "AP"); + format.tqreplace("A/P", "AP"); // Approximation format.remove("'"); // KWord 1.3 cannot protect text in date/time addDateTime( format, (fieldName == "DATE"), fldfmt ); } @@ -1865,7 +1865,7 @@ void RTFImport::parseFldrslt( RTFProperty * ) } } -void RTFImport::addVariable (const DomNode& spec, int type, const QString& key, const RTFFormat* fmt) +void RTFImport::addVariable (const DomNode& spec, int type, const TQString& key, const RTFFormat* fmt) { DomNode node; @@ -1899,7 +1899,7 @@ void RTFImport::parseFootNote( RTFProperty * property) fnnum++; destination.target = newTextState; - QCString str; + TQCString str; str.setNum(fnnum); str.prepend("Footnote "); @@ -1909,7 +1909,7 @@ void RTFImport::parseFootNote( RTFProperty * property) node.addNode("FOOTNOTE"); node.setAttribute("numberingtype", "auto"); node.setAttribute("notetype", "footnote"); - node.setAttribute("frameset", str); + node.setAttribute("frameset", !str.isNull()); node.setAttribute("value", fnnum); node.closeNode("FOOTNOTE"); addVariable(node, 11, "STRING"); @@ -1942,7 +1942,7 @@ void RTFImport::parseRichText( RTFProperty * ) // Ignore hidden text if (!state.format.hidden) { - const int len = (token.text[0] < 0) ? 1 : qstrlen( token.text ); + const int len = (token.text[0] < 0) ? 1 : tqstrlen( token.text ); // Check and store format changes if ( textState->formats.isEmpty() || @@ -1954,7 +1954,7 @@ void RTFImport::parseRichText( RTFProperty * ) kwFormat.pos = textState->length; kwFormat.len = len; textState->formats << kwFormat; - kwFormat.xmldata = QString::null; + kwFormat.xmldata = TQString(); } else { @@ -2055,7 +2055,7 @@ void RTFImport::addFormat( DomNode &node, const KWFormat& format, const RTFForma int vertAlign0 = ~vertAlign; int fontSize0 = ~fontSize; - // Adjust vertical alignment and font size if (\dn, \up) are used + // Adjust vertical tqalignment and font size if (\dn, \up) are used if (format.fmt.vertAlign == RTFFormat::Normal && format.fmt.baseline) { if (format.fmt.baseline < 0) @@ -2096,7 +2096,7 @@ void RTFImport::addFormat( DomNode &node, const KWFormat& format, const RTFForma { node.addNode( "COLOR" ); node.addColor( ((uint)format.fmt.color >= colorTable.count()) - ? (QColor &)Qt::black : colorTable[format.fmt.color] ); + ? (TQColor &)TQt::black : colorTable[format.fmt.color] ); node.closeNode( "COLOR" ); } if ((uint)format.fmt.bgcolor < colorTable.count() && @@ -2110,7 +2110,7 @@ void RTFImport::addFormat( DomNode &node, const KWFormat& format, const RTFForma { node.addNode( "FONT" ); - if (fontTable.contains( format.fmt.font )) + if (fontTable.tqcontains( format.fmt.font )) { node.setAttribute( "name", fontTable[format.fmt.font] ); } @@ -2137,7 +2137,7 @@ void RTFImport::addFormat( DomNode &node, const KWFormat& format, const RTFForma if (!baseFormat || format.fmt.underline != baseFormat->underline ) { node.addNode( "UNDERLINE" ); - QCString st,styleline,wordbyword("0"); + TQCString st,styleline,wordbyword("0"); st.setNum(format.fmt.underline); int underlinecolor = format.fmt.underlinecolor; @@ -2205,10 +2205,10 @@ void RTFImport::addFormat( DomNode &node, const KWFormat& format, const RTFForma break; } } // end of switch - node.setAttribute( "value", st ); - node.setAttribute( "wordbyword", wordbyword ); + node.setAttribute( "value", !st.isNull() ); + node.setAttribute( "wordbyword", !wordbyword.isNull() ); if ( !styleline.isEmpty() ) - node.setAttribute( "styleline", styleline ); + node.setAttribute( "styleline", !styleline.isNull() ); if ( underlinecolor >= 0 && uint(underlinecolor) < colorTable.count() ) { node.setAttribute( "underlinecolor", colorTable[underlinecolor].name() ); @@ -2219,11 +2219,11 @@ void RTFImport::addFormat( DomNode &node, const KWFormat& format, const RTFForma if (!baseFormat || format.fmt.strike != baseFormat->strike || format.fmt.striked != baseFormat->striked) { node.addNode( "STRIKEOUT" ); - QCString st; + TQCString st; st.setNum(format.fmt.strike); if(format.fmt.striked) st="double"; - node.setAttribute( "value", st ); + node.setAttribute( "value", !st.isNull() ); node.closeNode( "STRIKEOUT" ); } if (vertAlign != vertAlign0) @@ -2235,20 +2235,20 @@ void RTFImport::addFormat( DomNode &node, const KWFormat& format, const RTFForma if (!baseFormat || format.fmt.caps != baseFormat->caps || format.fmt.smallCaps != baseFormat->smallCaps) { node.addNode( "FONTATTRIBUTE" ); - QCString fontattr; + TQCString fontattr; if ( format.fmt.caps ) fontattr="uppercase"; else if ( format.fmt.smallCaps ) fontattr="smallcaps"; else fontattr="none"; - node.setAttribute( "value", fontattr ); + node.setAttribute( "value", !fontattr.isNull() ); node.closeNode( "FONTATTRIBUTE" ); } if (!baseFormat) { node.addNode( "CHARSET" ); - node.setAttribute( "value", (int)QFont::Unicode ); + node.setAttribute( "value", (int)TQFont::Unicode ); node.closeNode( "CHARSET" ); } } @@ -2261,40 +2261,40 @@ void RTFImport::addFormat( DomNode &node, const KWFormat& format, const RTFForma node.closeNode( "FORMAT" ); } -void RTFImport::addLayout( DomNode &node, const QString &name, const RTFLayout &layout, bool frameBreak ) +void RTFImport::addLayout( DomNode &node, const TQString &name, const RTFLayout &tqlayout, bool frameBreak ) { - // Style name and alignment + // Style name and tqalignment node.addNode( "NAME" ); node.setAttribute( "value", CheckAndEscapeXmlText(name) ); node.closeNode( "NAME" ); node.addNode( "FLOW" ); - node.setAttribute( "align", alignN[layout.alignment] ); + node.setAttribute( "align", alignN[tqlayout.tqalignment] ); node.closeNode( "FLOW" ); // Indents - if (layout.firstIndent || layout.leftIndent || layout.rightIndent) + if (tqlayout.firstIndent || tqlayout.leftIndent || tqlayout.rightIndent) { node.addNode( "INDENTS" ); - if (layout.firstIndent) - node.setAttribute( "first", .05*layout.firstIndent ); - if (layout.leftIndent) - node.setAttribute( "left", .05*layout.leftIndent ); - if (layout.rightIndent) - node.setAttribute( "right", .05*layout.rightIndent ); + if (tqlayout.firstIndent) + node.setAttribute( "first", .05*tqlayout.firstIndent ); + if (tqlayout.leftIndent) + node.setAttribute( "left", .05*tqlayout.leftIndent ); + if (tqlayout.rightIndent) + node.setAttribute( "right", .05*tqlayout.rightIndent ); node.closeNode( "INDENTS" ); } // Offets - if (layout.spaceBefore || layout.spaceAfter) + if (tqlayout.spaceBefore || tqlayout.spaceAfter) { node.addNode( "OFFSETS" ); - if (layout.spaceBefore) - node.setAttribute( "before", .05*layout.spaceBefore ); - if (layout.spaceAfter) - node.setAttribute( "after", .05*layout.spaceAfter ); + if (tqlayout.spaceBefore) + node.setAttribute( "before", .05*tqlayout.spaceBefore ); + if (tqlayout.spaceAfter) + node.setAttribute( "after", .05*tqlayout.spaceAfter ); node.closeNode( "OFFSETS" ); } @@ -2302,12 +2302,12 @@ void RTFImport::addLayout( DomNode &node, const QString &name, const RTFLayout & // Linespacing - QString lineSpacingType; - QString lineSpacingValue; - if ( layout.spaceBetweenMultiple ) + TQString lineSpacingType; + TQString lineSpacingValue; + if ( tqlayout.spaceBetweenMultiple ) { // Note: 240 is a sort of magic value for one line (Once upon a time, it meant 12pt for a single line) - switch (layout.spaceBetween ) + switch (tqlayout.spaceBetween ) { case 240: { @@ -2326,10 +2326,10 @@ void RTFImport::addLayout( DomNode &node, const QString &name, const RTFLayout & } default: { - if ( layout.spaceBetween > 0 ) + if ( tqlayout.spaceBetween > 0 ) { lineSpacingType = "multiple"; - lineSpacingValue.setNum( layout.spaceBetween / 240.0 ); + lineSpacingValue.setNum( tqlayout.spaceBetween / 240.0 ); } break; } @@ -2337,16 +2337,16 @@ void RTFImport::addLayout( DomNode &node, const QString &name, const RTFLayout & } else { - if (layout.spaceBetween > 0) + if (tqlayout.spaceBetween > 0) { lineSpacingType = "atleast"; - lineSpacingValue.setNum( 0.05*layout.spaceBetween ); + lineSpacingValue.setNum( 0.05*tqlayout.spaceBetween ); } - if (layout.spaceBetween < 0) + if (tqlayout.spaceBetween < 0) { // negative linespace means "exact" lineSpacingType = "fixed" ; - lineSpacingValue.setNum( -0.05*layout.spaceBetween ); + lineSpacingValue.setNum( -0.05*tqlayout.spaceBetween ); } } @@ -2359,26 +2359,26 @@ void RTFImport::addLayout( DomNode &node, const QString &name, const RTFLayout & node.closeNode( "LINESPACING" ); } - if (layout.keep || layout.pageBB || layout.pageBA || frameBreak || layout.keepNext) + if (tqlayout.keep || tqlayout.pageBB || tqlayout.pageBA || frameBreak || tqlayout.keepNext) { node.addNode( "PAGEBREAKING" ); - node.setAttribute( "linesTogether", boolN[layout.keep] ); - node.setAttribute( "hardFrameBreak", boolN[layout.pageBB] ); - node.setAttribute( "hardFrameBreakAfter", boolN[layout.pageBA || frameBreak] ); - node.setAttribute( "keepWithNext", boolN[layout.keepNext] ); + node.setAttribute( "linesTogether", boolN[tqlayout.keep] ); + node.setAttribute( "hardFrameBreak", boolN[tqlayout.pageBB] ); + node.setAttribute( "hardFrameBreakAfter", boolN[tqlayout.pageBA || frameBreak] ); + node.setAttribute( "keepWithNext", boolN[tqlayout.keepNext] ); node.closeNode( "PAGEBREAKING" ); } // Paragraph borders for (uint i=0; i < 4; i++) { - const RTFBorder &border = layout.borders[i]; + const RTFBorder &border = tqlayout.borders[i]; if (border.style != RTFBorder::None || border.width > 0) { node.addNode( borderN[i] ); node.addColor( ((uint)border.color >= colorTable.count()) - ? (QColor &)Qt::black : colorTable[border.color] ); + ? (TQColor &)TQt::black : colorTable[border.color] ); node.setAttribute( "style", (int)border.style & 0xf ); node.setAttribute( "width", (border.width < 20) ? 1 : border.width /20 ); node.closeNode( borderN[i] ); @@ -2386,21 +2386,21 @@ void RTFImport::addLayout( DomNode &node, const QString &name, const RTFLayout & } // Add automatic tab stop for hanging indent - if (layout.firstIndent < 0 && layout.leftIndent > 0) + if (tqlayout.firstIndent < 0 && tqlayout.leftIndent > 0) { node.addNode( "TABULATOR" ); node.setAttribute( "type", 0 ); - node.setAttribute( "ptpos", .05*layout.leftIndent ); + node.setAttribute( "ptpos", .05*tqlayout.leftIndent ); node.closeNode( "TABULATOR" ); } // Tabulators - if (!layout.tablist.isEmpty()) + if (!tqlayout.tablist.isEmpty()) { // ### TODO: use ConstIterator - for (uint i=0; i < layout.tablist.count(); i++) + for (uint i=0; i < tqlayout.tablist.count(); i++) { - const RTFTab &tab = layout.tablist[i]; + const RTFTab &tab = tqlayout.tablist[i]; int l = (int)tab.leader; node.addNode( "TABULATOR" ); node.setAttribute( "type", tab.type ); @@ -2420,14 +2420,14 @@ void RTFImport::addParagraph( DomNode &node, bool frameBreak ) node.closeNode( "TEXT" ); // Search for style in style sheet - QString name; + TQString name; const RTFFormat* format = &state.format; - const int styleNum = state.layout.style; + const int styleNum = state.tqlayout.style; - const QValueList<RTFStyle>::ConstIterator endStyleSheet = styleSheet.end(); - for ( QValueList<RTFStyle>::ConstIterator it=styleSheet.begin(); it!=endStyleSheet; ++it ) + const TQValueList<RTFStyle>::ConstIterator endStyleSheet = styleSheet.end(); + for ( TQValueList<RTFStyle>::ConstIterator it=styleSheet.begin(); it!=endStyleSheet; ++it ) { - if ( (*it).layout.style == styleNum ) + if ( (*it).tqlayout.style == styleNum ) { if ( textState->length > 0 ) { @@ -2451,7 +2451,7 @@ void RTFImport::addParagraph( DomNode &node, bool frameBreak ) // Insert character formatting bool hasFormats = false; - for ( QValueList<KWFormat>::ConstIterator it = textState->formats.begin(); it != textState->formats.end(); ++it ) + for ( TQValueList<KWFormat>::ConstIterator it = textState->formats.begin(); it != textState->formats.end(); ++it ) { if ( (*it).id != 1 || (*it).fmt != *format ) { @@ -2468,9 +2468,9 @@ void RTFImport::addParagraph( DomNode &node, bool frameBreak ) node.closeNode( "FORMATS" ); } - // Write out layout and format + // Write out tqlayout and format node.addNode( "LAYOUT" ); - addLayout( node, name, state.layout, frameBreak ); + addLayout( node, name, state.tqlayout, frameBreak ); addFormat( node, kwFormat, 0L ); node.closeNode( "LAYOUT" ); node.closeNode( "PARAGRAPH" ); @@ -2484,8 +2484,8 @@ void RTFImport::addParagraph( DomNode &node, bool frameBreak ) void RTFImport::finishTable() { kdDebug(30515) << "Starting TFImport::finishTable..." << endl; - QCString emptyArray; - QValueList<int> cellx; + TQCString emptyArray; + TQValueList<int> cellx; int left = 0, right = 0; insertTableRow(); @@ -2524,10 +2524,10 @@ void RTFImport::finishTable() // ### TODO: use ConstIterator for (uint k=0; k < row.cells.count(); k++) { - if (!cellx.contains( row.cells[k].x )) + if (!cellx.tqcontains( row.cells[k].x )) cellx << row.cells[k].x; } - if (!cellx.contains( row.left )) + if (!cellx.tqcontains( row.left )) { cellx << row.left; } @@ -2562,7 +2562,7 @@ void RTFImport::finishTable() { char buf[64]; int x2 = row.cells[k].x; - int col = cellx.findIndex( x1 ); + int col = cellx.tqfindIndex( x1 ); sprintf( buf, "Table %d Cell %d,%d", textState->table, i, col ); frameSets.addFrameSet( buf, 1, 0 ); @@ -2571,7 +2571,7 @@ void RTFImport::finishTable() frameSets.setAttribute( "row", (int)i ); frameSets.setAttribute( "col", col ); frameSets.setAttribute( "rows", 1 ); - frameSets.setAttribute( "cols", cellx.findIndex( x2 ) - col ); + frameSets.setAttribute( "cols", cellx.tqfindIndex( x2 ) - col ); frameSets.addFrame( x1, y1, x2, y2, (row.height < 0) ? 2 : 0, 1, 0 ); @@ -2583,8 +2583,8 @@ void RTFImport::finishTable() if (border.style != RTFBorder::None || border.width > 0) { const char *id = "lrtb"; - QColor &c = ((uint)border.color >= colorTable.count()) - ? (QColor &)Qt::black : colorTable[border.color]; + TQColor &c = ((uint)border.color >= colorTable.count()) + ? (TQColor &)TQt::black : colorTable[border.color]; frameSets.addBorder( (int)id[i], c, (int)border.style & 0x0f, .05*(!border.width ? 10 : border.width) ); } @@ -2593,7 +2593,7 @@ void RTFImport::finishTable() // Frame background color if ((uint)row.cells[k].bgcolor < colorTable.count()) { - QColor &color = colorTable[row.cells[k].bgcolor]; + TQColor &color = colorTable[row.cells[k].bgcolor]; frameSets.setAttribute( "bkRed", color.red() ); frameSets.setAttribute( "bkGreen", color.green() ); frameSets.setAttribute( "bkBlue", color.blue() ); @@ -2615,8 +2615,8 @@ void RTFImport::writeOutPart( const char *name, const DomNode& node ) KoStoreDevice* dev = m_chain->storageFile( name, KoStore::Write ); if ( dev ) { - QTextStream stream( dev ); - stream.setEncoding( QTextStream::UnicodeUTF8 ); + TQTextStream stream( dev ); + stream.setEncoding( TQTextStream::UnicodeUTF8 ); stream << node.toString(); } else diff --git a/filters/kword/rtf/import/rtfimport.h b/filters/kword/rtf/import/rtfimport.h index 538a4c23..fd39b435 100644 --- a/filters/kword/rtf/import/rtfimport.h +++ b/filters/kword/rtf/import/rtfimport.h @@ -16,19 +16,19 @@ #define __RTFIMPORT_H__ #include <KoFilter.h> -#include <qasciidict.h> -#include <qcolor.h> -#include <qcstring.h> -#include <qfile.h> -#include <qfont.h> -#include <qmap.h> -#include <qstring.h> -#include <qvaluelist.h> -#include <qvaluestack.h> -#include <qtextcodec.h> +#include <tqasciidict.h> +#include <tqcolor.h> +#include <tqcstring.h> +#include <tqfile.h> +#include <tqfont.h> +#include <tqmap.h> +#include <tqstring.h> +#include <tqvaluelist.h> +#include <tqvaluestack.h> +#include <tqtextcodec.h> #include "rtfimport_dom.h" #include "rtfimport_tokenizer.h" -#include <qptrlist.h> +#include <tqptrlist.h> class DomNode; @@ -92,8 +92,8 @@ struct RTFTab /// Font table entry struct RTFFont { - QString name; - QFont::StyleHint styleHint; + TQString name; + TQFont::StyleHint tqstyleHint; int fixedPitch; int number; }; @@ -103,7 +103,7 @@ struct RTFPicture { enum PictureType { BMP, WMF, MacPict, EMF, PNG, JPEG }; - QByteArray bits; + TQByteArray bits; PictureType type; int width, height; int cropLeft, cropTop, cropRight, cropBottom; @@ -112,7 +112,7 @@ struct RTFPicture int nibble; bool scaled; /// \\blipuid - QString identifier; + TQString identifier; }; /// Paragraph-formatting properties @@ -120,11 +120,11 @@ struct RTFLayout { enum Alignment { Left, Right, Justified, Centered }; - QValueStack<RTFTab> tablist; + TQValueStack<RTFTab> tablist; RTFTab tab; RTFBorder borders[4]; RTFBorder *border; - Alignment alignment; + Alignment tqalignment; int style; int firstIndent, leftIndent, rightIndent; int spaceBefore, spaceAfter; @@ -171,9 +171,9 @@ inline bool operator != ( const RTFFormat& f1, const RTFFormat& f2 ) /// Style sheet entry struct RTFStyle { - QString name; + TQString name; RTFFormat format; - RTFLayout layout; + RTFLayout tqlayout; int next; }; @@ -196,9 +196,9 @@ struct RTFTableCell /// Table-formatting properties struct RTFTableRow { - QValueList<RTFTableCell> cells; - QStringList frameSets; - RTFLayout::Alignment alignment; + TQValueList<RTFTableCell> cells; + TQStringList frameSets; + RTFLayout::Alignment tqalignment; int height; int left; }; @@ -207,7 +207,7 @@ struct RTFTableRow struct KWFormat { RTFFormat fmt; - QString xmldata; + TQString xmldata; uint id, pos, len; }; @@ -220,9 +220,9 @@ struct RTFTextState DomNode cell; /// plain text (for paragraph or table cell) DomNode text; - QValueList<KWFormat> formats; - QStringList frameSets; - QValueList<RTFTableRow> rows; + TQValueList<KWFormat> formats; + TQStringList frameSets; + TQValueList<RTFTableRow> rows; uint table, length; }; @@ -232,7 +232,7 @@ struct RTFGroupState RTFTableRow tableRow; RTFTableCell tableCell; RTFFormat format; - RTFLayout layout; + RTFLayout tqlayout; RTFSectionLayout section; /// '}' will close the current destination bool brace0; @@ -244,9 +244,10 @@ struct RTFGroupState class RTFImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - RTFImport( KoFilter *parent, const char *name, const QStringList& ); + RTFImport( KoFilter *tqparent, const char *name, const TQStringList& ); /** * Convert document from RTF to KWord format. @@ -254,7 +255,7 @@ public: * @param to the mimetype for KWord * @return true if the document was successfully converted */ - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); /** * Skip the keyword, as we do not need to do anything with it @@ -281,7 +282,7 @@ public: void setPcaCodepage( RTFProperty * ); /** * Set document codepage to IBM 435. - * @note As Qt does not support IBM 435, this is currently approximated as IBM 850 + * @note As TQt does not support IBM 435, this is currently approximated as IBM 850 */ void setPcCodepage( RTFProperty * ); /** @@ -407,7 +408,7 @@ public: void insertSymbol( RTFProperty *property ); /// Insert special character (hexadecimal escape value). void insertHexSymbol( RTFProperty * ); - /// Insert unicode character (keyword \\u). + /// Insert tqunicode character (keyword \\u). void insertUnicodeSymbol( RTFProperty * ); /** * Insert a date or time field @@ -488,27 +489,27 @@ public: */ void addFormat( DomNode &node, const KWFormat& format, const RTFFormat* baseFormat ); /** - * Add layout information to document node. + * Add tqlayout information to document node. * @param node the document node (destination) * @param name the name of the current style - * @param layout the paragraph layout information + * @param tqlayout the paragraph tqlayout information * @param frameBreak paragraph is always the last in a frame if true */ - void addLayout( DomNode &node, const QString &name, const RTFLayout &layout, bool frameBreak ); + void addLayout( DomNode &node, const TQString &name, const RTFLayout &tqlayout, bool frameBreak ); /** * Add paragraph information to document node. * @param node the document node (destination) * @param frameBreak paragraph is always the last in a frame if true */ void addParagraph( DomNode &node, bool frameBreak ); - void addVariable(const DomNode& spec, int type, const QString& key, const RTFFormat* fmt=0); - void addImportedPicture( const QString& rawFileName ); + void addVariable(const DomNode& spec, int type, const TQString& key, const RTFFormat* fmt=0); + void addImportedPicture( const TQString& rawFileName ); /** * Add a date/time field and split it for KWord * @param format format of the date/time * @param isDate is it a date field? (For the default format, if needed) */ - void addDateTime( const QString& format, const bool isDate, RTFFormat& fmt ); + void addDateTime( const TQString& format, const bool isDate, RTFFormat& fmt ); /** * Finish table and recalculate cell borders. */ @@ -526,7 +527,7 @@ public: DomNode pictures; DomNode author, company, title, doccomm; RTFTextState bodyText; - QPtrList<RTFTextState> footnotes; ///< list of footnotes + TQPtrList<RTFTextState> footnotes; ///< list of footnotes int fnnum; ///< number of last footnote RTFTextState firstPageHeader, oddPagesHeader, evenPagesHeader; RTFTextState firstPageFooter, oddPagesFooter, evenPagesFooter; @@ -535,11 +536,11 @@ public: * @note this is mainly to avoid dangling or NULL pointers */ RTFTextState m_dummyTextState; - QMap<int,QString> fontTable; - QValueList<RTFStyle> styleSheet; - QValueList<QColor> colorTable; - QValueStack<RTFGroupState> stateStack; - QValueStack<RTFDestination> destinationStack; + TQMap<int,TQString> fontTable; + TQValueList<RTFStyle> styleSheet; + TQValueList<TQColor> colorTable; + TQValueStack<RTFGroupState> stateStack; + TQValueStack<RTFDestination> destinationStack; RTFGroupState state; RTFDestination destination; RTFTextState *textState; @@ -548,8 +549,8 @@ public: RTFPicture picture; RTFTableCell emptyCell; KWFormat kwFormat; - QAsciiDict<RTFProperty> properties; - QAsciiDict<RTFProperty> destinationProperties; + TQAsciiDict<RTFProperty> properties; + TQAsciiDict<RTFProperty> destinationProperties; uint table; uint pictureNumber; ///< Picture number; increase *before* use! @@ -561,14 +562,14 @@ public: bool landscape, facingPages; // Field support - QCString fldinst, fldrslt; + TQCString fldinst, fldrslt; RTFFormat fldfmt; int flddst; ///< support for recursive fields - QString inFileName; ///< File name of the source file. + TQString inFileName; ///< File name of the source file. protected: - QTextCodec* textCodec; ///< currently used QTextCodec by the RTF file - QTextCodec* utf8TextCodec; ///< QTextCodec for UTF-8 (used in \u) - QMap<QString,int> debugUnknownKeywords; + TQTextCodec* textCodec; ///< currently used TQTextCodec by the RTF file + TQTextCodec* utf8TextCodec; ///< TQTextCodec for UTF-8 (used in \u) + TQMap<TQString,int> debugUnknownKeywords; bool m_batch; ///< Should the filter system be in batch mode (i.e. non-interactive) }; diff --git a/filters/kword/rtf/import/rtfimport_dom.cpp b/filters/kword/rtf/import/rtfimport_dom.cpp index 48ee8606..9794e088 100644 --- a/filters/kword/rtf/import/rtfimport_dom.cpp +++ b/filters/kword/rtf/import/rtfimport_dom.cpp @@ -11,9 +11,9 @@ #include <stdio.h> -#include <qdatetime.h> -#include <qtextcodec.h> -#include <qcolor.h> +#include <tqdatetime.h> +#include <tqtextcodec.h> +#include <tqcolor.h> #include <kdebug.h> @@ -22,22 +22,22 @@ /** * Escape the special XML characters and be careful to catch any unallowed control character */ -QString CheckAndEscapeXmlText(const QString& strText) +TQString CheckAndEscapeXmlText(const TQString& strText) { - QString strReturn(strText); - QChar ch; + TQString strReturn(strText); + TQChar ch; for (uint i=0; i<strReturn.length(); i++) { ch = strReturn[i]; - const int test = ch.unicode(); + const int test = ch.tqunicode(); // The i+= is for the additional characters - if (test == 38) { strReturn.replace(i, 1, "&"); i+=4; } // & - else if (test == 60) { strReturn.replace(i, 1, "<"); i+=3; } // < - else if (test == 62) { strReturn.replace(i, 1, ">"); i+=3; } // > - else if (test == 34) { strReturn.replace(i, 1, """); i+=5; } // " - else if (test == 39) { strReturn.replace(i, 1, "'"); i+=5; } // ' + if (test == 38) { strReturn.tqreplace(i, 1, "&"); i+=4; } // & + else if (test == 60) { strReturn.tqreplace(i, 1, "<"); i+=3; } // < + else if (test == 62) { strReturn.tqreplace(i, 1, ">"); i+=3; } // > + else if (test == 34) { strReturn.tqreplace(i, 1, """); i+=5; } // " + else if (test == 39) { strReturn.tqreplace(i, 1, "'"); i+=5; } // ' else if (test >= 32) continue; // Normal character (from space on) else if ((test == 9) || (test == 10) || (test == 13) ) continue; // Allowed control characters: TAB, LF, CR else @@ -47,7 +47,7 @@ QString CheckAndEscapeXmlText(const QString& strText) // - could be not supported encoding. // In any case, we must replace this character. kdDebug(30515) << "Control character in XML stream: " << test << endl; - strReturn.replace(i, 1, '?'); // Replacement character + strReturn.tqreplace(i, 1, '?'); // Replacement character } } @@ -81,7 +81,7 @@ DomNode::DomNode( const char *doctype ) */ void DomNode::clear( int level ) { - str = QString::null; + str = TQString(); documentLevel = level; hasChildren = true; hasAttributes = false; @@ -104,13 +104,13 @@ void DomNode::addNode( const char *name ) * Adds a text node. * @param text the text to write into the document node */ -void DomNode::addTextNode( const char *text, QTextCodec* codec ) +void DomNode::addTextNode( const char *text, TQTextCodec* codec ) { closeTag( false ); if (!codec) { - kdError(30515) << "No QTextCodec available!" << endl; + kdError(30515) << "No TQTextCodec available!" << endl; return; } @@ -121,7 +121,7 @@ void DomNode::addTextNode( const char *text, QTextCodec* codec ) /** * Add border to existing frameset (see KWord DTD). */ -void DomNode::addBorder( int id, const QColor &color, int style, double width ) +void DomNode::addBorder( int id, const TQColor &color, int style, double width ) { char attr[16]; sprintf( attr, "%cRed", id ); @@ -140,7 +140,7 @@ void DomNode::addBorder( int id, const QColor &color, int style, double width ) * Add color attributes to document node. * @param color the color */ -void DomNode::addColor( const QColor &color ) +void DomNode::addColor( const TQColor &color ) { setAttribute( "red", color.red() ); setAttribute( "green", color.green() ); @@ -164,10 +164,10 @@ void DomNode::addRect( int left, int top, int right, int bottom ) * @param filename the filename of the image * @param name the relative path to the image in the store (optional) */ -void DomNode::addKey( const QDateTime& dt, const QString& filename, const QString& name ) +void DomNode::addKey( const TQDateTime& dt, const TQString& filename, const TQString& name ) { - const QDate date ( dt.date() ); - const QTime time ( dt.time() ); + const TQDate date ( dt.date() ); + const TQTime time ( dt.time() ); addNode( "KEY" ); setAttribute( "filename", CheckAndEscapeXmlText(filename) ); @@ -218,7 +218,7 @@ void DomNode::addFrame( int left, int top, int right, int bottom, /** * Sets a new attribute to a string value. */ -void DomNode::setAttribute( const QString& attribute, const QString& value ) +void DomNode::setAttribute( const TQString& attribute, const TQString& value ) { str += ' '; str += attribute; @@ -304,7 +304,7 @@ void DomNode::closeTag( bool nl ) */ void DomNode::appendNode( const DomNode &child ) { - const QString childStr ( child.toString() ); + const TQString childStr ( child.toString() ); closeTag( (childStr.length() >= 2 && (childStr[0] == '<' || childStr[1] == '<')) ); str += childStr; } @@ -312,14 +312,14 @@ void DomNode::appendNode( const DomNode &child ) /** * Appends XML text to node */ -void DomNode::append( const QString& _str) +void DomNode::append( const TQString& _str) { str += _str; } -void DomNode::append( const QCString& cstr) +void DomNode::append( const TQCString& cstr) { - str += QString::fromUtf8(cstr); + str += TQString::fromUtf8(cstr); } void DomNode::append( const char ch) @@ -338,7 +338,7 @@ bool DomNode::isEmpty( void ) const /** * Returns the data of the document node. */ -QString DomNode::toString( void ) const +TQString DomNode::toString( void ) const { return str; } diff --git a/filters/kword/rtf/import/rtfimport_dom.h b/filters/kword/rtf/import/rtfimport_dom.h index d5d85a40..f6717174 100644 --- a/filters/kword/rtf/import/rtfimport_dom.h +++ b/filters/kword/rtf/import/rtfimport_dom.h @@ -12,16 +12,16 @@ #ifndef __RTFIMPORT_DOM_H__ #define __RTFIMPORT_DOM_H__ -#include <qstring.h> +#include <tqstring.h> -class QColor; -class QDateTime; -class QTextCodec; +class TQColor; +class TQDateTime; +class TQTextCodec; /** * Escape the special XML characters and be careful to catch any unallowed control character */ -QString CheckAndEscapeXmlText(const QString& strText); +TQString CheckAndEscapeXmlText(const TQString& strText); class DomNode { @@ -46,16 +46,16 @@ public: * Adds a text node. * @param text the text to write into the document node */ - void addTextNode( const char *text, QTextCodec* codec ); + void addTextNode( const char *text, TQTextCodec* codec ); /** * Add border to existing frameset (see KWord DTD). */ - void addBorder( int id, const QColor &color, int style, double width ); + void addBorder( int id, const TQColor &color, int style, double width ); /** * Add color attributes to document node. * @param color the color */ - void addColor( const QColor &color ); + void addColor( const TQColor &color ); /** * Add rectangle attributes to document node. */ @@ -66,7 +66,7 @@ public: * @param filename the filename of the image * @param name the relative path to the image in the store (optional) */ - void addKey( const QDateTime& dt, const QString& filename, const QString& name = QString::null ); + void addKey( const TQDateTime& dt, const TQString& filename, const TQString& name = TQString() ); /** * Add frameset to document (see KWord DTD). */ @@ -80,7 +80,7 @@ public: /** * Sets a new attribute to a string value. */ - void setAttribute( const QString& attribute, const QString& value ); + void setAttribute( const TQString& attribute, const TQString& value ); /** * Sets a new attribute to an integer value. */ @@ -107,8 +107,8 @@ public: /** * Appends XML text to node */ - void append( const QCString& cstr); - void append( const QString& _str); + void append( const TQCString& cstr); + void append( const TQString& _str); void append( const char ch); /** * Returns true if node is empty. @@ -117,10 +117,10 @@ public: /** * Returns the data of the document node. */ - QString toString() const; + TQString toString() const; private: - QString str; + TQString str; int documentLevel; bool hasChildren; bool hasAttributes; diff --git a/filters/kword/rtf/import/rtfimport_tokenizer.cpp b/filters/kword/rtf/import/rtfimport_tokenizer.cpp index 3e255c47..b9a0a567 100644 --- a/filters/kword/rtf/import/rtfimport_tokenizer.cpp +++ b/filters/kword/rtf/import/rtfimport_tokenizer.cpp @@ -26,7 +26,7 @@ RTFTokenizer::RTFTokenizer() * Open tokenizer from file. * @param in the input file */ -void RTFTokenizer::open( QFile *in ) +void RTFTokenizer::open( TQFile *in ) { fileBufferPtr = 0L; fileBufferEnd = 0L; diff --git a/filters/kword/rtf/import/rtfimport_tokenizer.h b/filters/kword/rtf/import/rtfimport_tokenizer.h index 424a26b2..f32a2bc8 100644 --- a/filters/kword/rtf/import/rtfimport_tokenizer.h +++ b/filters/kword/rtf/import/rtfimport_tokenizer.h @@ -12,8 +12,8 @@ #ifndef __RTFIMPORT_TOKENIZER_H__ #define __RTFIMPORT_TOKENIZER_H__ -#include <qcstring.h> -#include <qfile.h> +#include <tqcstring.h> +#include <tqfile.h> /// This class represents the tokenizer and the token @@ -28,7 +28,7 @@ public: * Open tokenizer from file. * @param in the input file */ - void open( QFile *in ); + void open( TQFile *in ); /** * Reads the next token. */ @@ -46,15 +46,15 @@ public: public: /// Binary data (of \\bin keyword) - QByteArray binaryData; + TQByteArray binaryData; // tokenizer (private) data private: int nextChar(); - QFile *infile; - QByteArray fileBuffer; - QCString tokenText; + TQFile *infile; + TQByteArray fileBuffer; + TQCString tokenText; uchar *fileBufferPtr; uchar *fileBufferEnd; }; diff --git a/filters/kword/rtf/status.html b/filters/kword/rtf/status.html index 73204a6b..27239e52 100644 --- a/filters/kword/rtf/status.html +++ b/filters/kword/rtf/status.html @@ -52,14 +52,14 @@ - Document information (author, title, comments, company).<br> - Page size and margins.<br> - Headers and footers (with margins).<br> - - Tables (including non-rectangular), horizontal alignment.<br> + - Tables (including non-rectangular), horizontal tqalignment.<br> - Table cell background color and borders (style, color, width).<br> - Embedded pictures (JPEG/PNG/BMP) and clipart (EMF/WMF).<br> - Word 97-2000 picture support.<br> - Style sheet.<br> - Character formatting (size, color, bold, italic, underline, strikeout, subscript, superscript...).<br> - - Font mapping (using QFont/QFontInfo).<br> - - Paragraph layout (horizontal alignment, indents, space before/after, frame break).<br> + - Font mapping (using TQFont/TQFontInfo).<br> + - Paragraph tqlayout (horizontal tqalignment, indents, space before/after, frame break).<br> - Paragraph borders (style, color, width).<br> - Tabulators, automatic tabulator for hanging indent.<br> - Unicode and codepages support.<br> @@ -76,16 +76,16 @@ - Fix line spacing.<br> - Columns.<br> - Improve list handling.<br> - - Shaps, especially picture that are in shapes<br> + - Shaps, especially picture that are in tqshapes<br> </td> </tr> <tr BGCOLOR="#CCCCFF"> <td VALIGN=TOP><b><font size="+1">History</font></b></td> <td> - 15 July 2001: First useful version (rewritten for QDom).<br> + 15 July 2001: First useful version (rewritten for TQDom).<br> 18 July 2001: Fixed function <code>finishTable()</code> (some tables crashed KWord).<br> - 23 July 2001: Added table alignment, background color and cell borders.<br> + 23 July 2001: Added table tqalignment, background color and cell borders.<br> 31 August 2001: Faster version, uses read buffers and optimized XML output.<br> 2 October 2001: Clipart import fixed (requires libwmf).<br> 23 July 2002: Added field and hyperlink support, fixed embedded pictures.<br> diff --git a/filters/kword/starwriter/pole.cpp b/filters/kword/starwriter/pole.cpp index 9323cdbc..96b3e82c 100644 --- a/filters/kword/starwriter/pole.cpp +++ b/filters/kword/starwriter/pole.cpp @@ -31,12 +31,12 @@ namespace POLE class Entry { public: - Entry* parent; + Entry* tqparent; std::string name; unsigned long size; unsigned start; bool dir; - std::vector<Entry*> children; + std::vector<Entry*> tqchildren; Entry(); ~Entry(); private: @@ -153,7 +153,7 @@ class StorageIO unsigned long loadSmallBlock( unsigned long block, unsigned char* buffer, unsigned long maxlen ); /// construct directory tree - Entry* buildTree( Entry* parent, int index, const unsigned char* dirent ); + Entry* buildTree( Entry* tqparent, int index, const unsigned char* dirent ); std::string fullName( Entry* e ); @@ -257,9 +257,9 @@ Entry::Entry() Entry::~Entry() { - for( unsigned i=0; i<children.size(); i++ ) + for( unsigned i=0; i<tqchildren.size(); i++ ) { - Entry* entry = children[ i ]; + Entry* entry = tqchildren[ i ]; delete entry; } } @@ -619,7 +619,7 @@ unsigned long StorageIO::loadSmallBlock( unsigned long block, } // recursive function to construct directory tree -Entry* StorageIO::buildTree( Entry* parent, int index, const unsigned char* dirent ) +Entry* StorageIO::buildTree( Entry* tqparent, int index, const unsigned char* dirent ) { Entry* entry = (Entry*) 0L; @@ -656,12 +656,12 @@ Entry* StorageIO::buildTree( Entry* parent, int index, const unsigned char* dire entry->size = readU32( dirent + 0x78+p ); // append as another child - entry->parent = parent; - if( parent ) parent->children.push_back( entry ); + entry->tqparent = tqparent; + if( tqparent ) tqparent->tqchildren.push_back( entry ); // check previous int prev = readU32( dirent + 0x44+p ); - if( prev >= 0 ) buildTree( parent, prev, dirent ); + if( prev >= 0 ) buildTree( tqparent, prev, dirent ); // traverse to sub int dir = readU32( dirent + 0x4C+p ); @@ -670,7 +670,7 @@ Entry* StorageIO::buildTree( Entry* parent, int index, const unsigned char* dire // check next int next = readU32( dirent + 0x48+p ); - if( next >= 0 ) buildTree( parent, next, dirent ); + if( next >= 0 ) buildTree( tqparent, next, dirent ); return entry; } @@ -681,11 +681,11 @@ std::string StorageIO::fullName( Entry* e ) std::string result; - while( e->parent ) + while( e->tqparent ) { result.insert( 0, e->name ); result.insert( 0, "/" ); - e = e->parent; + e = e->tqparent; } // don't use specified root name (like "Root Entry") @@ -725,9 +725,9 @@ Entry* StorageIO::entry( const std::string& name ) std::string entryname = *it; Entry *child = (Entry*) 0L; if( entry->dir ) - for( unsigned j=0; j < entry->children.size(); j++ ) - if( entry->children[j]->name == entryname ) - child = entry->children[j]; + for( unsigned j=0; j < entry->tqchildren.size(); j++ ) + if( entry->tqchildren[j]->name == entryname ) + child = entry->tqchildren[j]; if( !child ) return (Entry*) 0L; entry = child; } @@ -750,7 +750,7 @@ StreamIO::StreamIO( StorageIO* _io, Entry* _entry ): updateCache(); } -// FIXME tell parent we're gone +// FIXME tell tqparent we're gone StreamIO::~StreamIO() { delete[] cache_data; @@ -912,10 +912,10 @@ std::list<std::string> Storage::listDirectory() // sentinel: do nothing if not a directory if( !io->current_dir->dir ) return entries; - // find all children belongs to this directory - for( unsigned i = 0; i<io->current_dir->children.size(); i++ ) + // find all tqchildren belongs to this directory + for( unsigned i = 0; i<io->current_dir->tqchildren.size(); i++ ) { - Entry* e = io->current_dir->children[i]; + Entry* e = io->current_dir->tqchildren[i]; if( e ) entries.push_back( e->name ); } @@ -930,9 +930,9 @@ bool Storage::enterDirectory( const std::string& directory ) if( !io->current_dir ) return false; // look for the specified sub-dir - for( unsigned i = 0; i<io->current_dir->children.size(); i++ ) + for( unsigned i = 0; i<io->current_dir->tqchildren.size(); i++ ) { - Entry* e = io->current_dir->children[i]; + Entry* e = io->current_dir->tqchildren[i]; if( e ) if( e->name == directory ) if ( e->dir ) { @@ -951,9 +951,9 @@ void Storage::leaveDirectory() if( !io ) return; if( !io->current_dir ) return; - Entry* parent = io->current_dir->parent; - if( parent ) if( parent->dir ) - io->current_dir = parent; + Entry* tqparent = io->current_dir->tqparent; + if( tqparent ) if( tqparent->dir ) + io->current_dir = tqparent; } // note: without trailing "/" @@ -993,7 +993,7 @@ Stream::Stream( StreamIO* _io ): { } -// FIXME tell parent we're gone +// FIXME tell tqparent we're gone Stream::~Stream() { delete io; diff --git a/filters/kword/starwriter/starwriterimport.cc b/filters/kword/starwriter/starwriterimport.cc index b43415c0..a9bd80d3 100644 --- a/filters/kword/starwriter/starwriterimport.cc +++ b/filters/kword/starwriter/starwriterimport.cc @@ -21,9 +21,9 @@ #include <starwriterimport.h> -#include <qdatastream.h> -#include <qiodevice.h> -#include <qstring.h> +#include <tqdatastream.h> +#include <tqiodevice.h> +#include <tqstring.h> #include <KoFilterChain.h> #include <kgenericfactory.h> @@ -34,20 +34,20 @@ typedef KGenericFactory<StarWriterImport, KoFilter> StarWriterImportFactory; K_EXPORT_COMPONENT_FACTORY(libstarwriterimport, StarWriterImportFactory("kofficefilters")) // Get unsigned 24-bits integer at given offset -static inline Q_UINT32 readU24(QByteArray array, Q_UINT32 p) +static inline TQ_UINT32 readU24(TQByteArray array, TQ_UINT32 p) { - Q_UINT8* ptr = (Q_UINT8*) array.data(); - return (Q_UINT32) (ptr[p] + (ptr[p+1] << 8) + (ptr[p+2] << 16)); + TQ_UINT8* ptr = (TQ_UINT8*) array.data(); + return (TQ_UINT32) (ptr[p] + (ptr[p+1] << 8) + (ptr[p+2] << 16)); } // Get unsigned 16-bits integer at given offset -static inline Q_UINT16 readU16(QByteArray array, Q_UINT32 p) +static inline TQ_UINT16 readU16(TQByteArray array, TQ_UINT32 p) { - Q_UINT8* ptr = (Q_UINT8*) array.data(); - return (Q_UINT16) (ptr[p] + (ptr[p+1] << 8)); + TQ_UINT8* ptr = (TQ_UINT8*) array.data(); + return (TQ_UINT16) (ptr[p] + (ptr[p+1] << 8)); } -StarWriterImport::StarWriterImport(KoFilter *, const char *, const QStringList&) : KoFilter() +StarWriterImport::StarWriterImport(KoFilter *, const char *, const TQStringList&) : KoFilter() { hasHeader = false; hasFooter = false; @@ -58,7 +58,7 @@ StarWriterImport::~StarWriterImport() { } -KoFilter::ConversionStatus StarWriterImport::convert(const QCString& from, const QCString& to) +KoFilter::ConversiontqStatus StarWriterImport::convert(const TQCString& from, const TQCString& to) { // Check for proper conversion // When 4.x is supported, use also: || (from != "application/x-starwriter") @@ -99,7 +99,7 @@ KoFilter::ConversionStatus StarWriterImport::convert(const QCString& from, const // Prepare storage device and return KoStoreDevice *out = m_chain->storageFile("maindoc.xml", KoStore::Write); if (out) { - QCString cstring = maindoc.utf8(); + TQCString cstring = maindoc.utf8(); cstring.prepend("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); out->writeBlock((const char*) cstring, cstring.length()); } @@ -129,7 +129,7 @@ bool StarWriterImport::checkDocumentVersion() if (StarWriterDocument[0x05] != 'R') return false; // Password-protection is not supported for the moment - Q_UINT16 flags = readU16(StarWriterDocument, 0x0A); + TQ_UINT16 flags = readU16(StarWriterDocument, 0x0A); if (flags & 0x0008) return false; return true; @@ -138,7 +138,7 @@ bool StarWriterImport::checkDocumentVersion() bool StarWriterImport::addKWordHeader() { // Proper prolog and epilog - QString prolog; + TQString prolog; prolog = "<!DOCTYPE DOC>\n"; prolog.append("<DOC mime=\"application/x-kword\" syntaxVersion=\"2\" editor=\"KWord\">\n"); prolog.append("<PAPER width=\"595\" height=\"841\" format=\"1\" fType=\"0\" orientation=\"0\" hType=\"0\" columns=\"1\">\n"); @@ -183,8 +183,8 @@ bool StarWriterImport::addBody() { // Find the starting point, by: // 1. skipping the header - Q_UINT32 len = StarWriterDocument[0x07]; - Q_UINT32 p = len; + TQ_UINT32 len = StarWriterDocument[0x07]; + TQ_UINT32 p = len; // 2. skipping 8 more bytes p += 0x08; @@ -199,8 +199,8 @@ bool StarWriterImport::addBody() // Select nodes and pass them to parseNodes() len = readU24(StarWriterDocument, p+1); - QByteArray data(len); - for (Q_UINT32 k=0; k<len; k++) + TQByteArray data(len); + for (TQ_UINT32 k=0; k<len; k++) data[k] = StarWriterDocument[p+k]; bool retval = parseNodes(data); @@ -212,11 +212,11 @@ bool StarWriterImport::addBody() return retval; } -QString StarWriterImport::convertToKWordString(QByteArray s) +TQString StarWriterImport::convertToKWordString(TQByteArray s) { - QString result; + TQString result; - for (Q_UINT32 i = 0x00; i < s.size(); i++) + for (TQ_UINT32 i = 0x00; i < s.size(); i++) if (s[i] == '&') result += "&"; else if (s[i] == '<') result += "<"; else if (s[i] == '>') result += ">"; @@ -225,15 +225,15 @@ QString StarWriterImport::convertToKWordString(QByteArray s) else if (s[i] == 0x09) result += "\t"; // FIXME: more to add here // (manual breaks, soft-hyphens, non-breaking spaces, variables) - else result += QChar(s[i]); + else result += TQChar(s[i]); return result; } -bool StarWriterImport::parseNodes(QByteArray n) +bool StarWriterImport::parseNodes(TQByteArray n) { - QByteArray s; - Q_UINT32 len, p; + TQByteArray s; + TQ_UINT32 len, p; // Loop p = 0x09; // is this a fixed value? is it the same for headers/footers? @@ -243,7 +243,7 @@ bool StarWriterImport::parseNodes(QByteArray n) len = readU24(n, p+1); s.resize(len); - for (Q_UINT32 k = 0x00; k < len; k++) + for (TQ_UINT32 k = 0x00; k < len; k++) s[k] = n[p+k]; switch (c) { @@ -267,20 +267,20 @@ bool StarWriterImport::parseNodes(QByteArray n) return true; } -bool StarWriterImport::parseText(QByteArray n) +bool StarWriterImport::parseText(TQByteArray n) { - QByteArray s; - Q_UINT16 len; - Q_UINT32 p; - QString text; - // Q_UINT16 attributeStart, attributeEnd, formatPos, formatLen; - // QString pAttributes, cAttributes, tempCAttributes; - // QStringList cAttributesList; + TQByteArray s; + TQ_UINT16 len; + TQ_UINT32 p; + TQString text; + // TQ_UINT16 attributeStart, attributeEnd, formatPos, formatLen; + // TQString pAttributes, cAttributes, tempCAttributes; + // TQStringList cAttributesList; // Retrieve the paragraph (text-only) len = readU16(n, 0x09); s.resize(len); - for (Q_UINT16 k = 0x00; k < len; k++) + for (TQ_UINT16 k = 0x00; k < len; k++) s[k] = n[0x0B+k]; /* @@ -333,19 +333,19 @@ bool StarWriterImport::parseText(QByteArray n) return true; } -bool StarWriterImport::parseTable(QByteArray n) +bool StarWriterImport::parseTable(TQByteArray n) { /* - QByteArray s; - Q_UINT32 len, len2; - Q_UINT16 len3; - Q_UINT32 p, p2; - QString text; - QString tableCell, tableText, tableName; - Q_UINT8 row, column; + TQByteArray s; + TQ_UINT32 len, len2; + TQ_UINT16 len3; + TQ_UINT32 p, p2; + TQString text; + TQString tableCell, tableText, tableName; + TQ_UINT8 row, column; // Set table name - tableName = QString("Table %1").arg(tablesNumber); + tableName = TQString("Table %1").tqarg(tablesNumber); tablesNumber++; // Skip useless sections and retrieve the right point @@ -376,13 +376,13 @@ bool StarWriterImport::parseTable(QByteArray n) // Get cell text/value len3 = readU16(n, p+0x09); s.resize(len3); - for (Q_UINT16 k = 0x00; k < len3; k++) + for (TQ_UINT16 k = 0x00; k < len3; k++) s[k] = n[p+0x0B+k]; text = convertToKWordString(s); // FIXME: check this stuff - QString frameName = QString("%1 Cell %2,%3").arg(tableName).arg(row).arg(column); - tableText.append(QString(" <FRAMESET name=\"%1\" frameType=\"1\" frameInfo=\"0\" removable=\"0\" visible=\"1\" grpMgr=\"%2\" row=\"%3\" col=\"%4\" rows=\"1\" cols=\"1\" protectSize=\"0\">\n").arg(frameName).arg(tableName).arg(row).arg(column)); + TQString frameName = TQString("%1 Cell %2,%3").tqarg(tableName).tqarg(row).tqarg(column); + tableText.append(TQString(" <FRAMESET name=\"%1\" frameType=\"1\" frameInfo=\"0\" removable=\"0\" visible=\"1\" grpMgr=\"%2\" row=\"%3\" col=\"%4\" rows=\"1\" cols=\"1\" protectSize=\"0\">\n").tqarg(frameName).tqarg(tableName).tqarg(row).tqarg(column)); tableText.append(" <FRAME runaround=\"1\" copy=\"0\" newFrameBehavior=\"1\" runaroundSide=\"biggest\" autoCreateNewFrame=\"0\" bleftpt=\"2.8\" brightpt=\"2.8\" btoppt=\"2.8\" bbottompt=\"2.8\" runaroundGap=\"2.8\" />\n"); tableText.append(" <PARAGRAPH>\n"); tableText.append(" <TEXT xml:space=\"preserve\">" + text + "</TEXT>\n"); @@ -408,7 +408,7 @@ bool StarWriterImport::parseTable(QByteArray n) bodyStuff.append(" <TEXT xml:space=\"preserve\">#</TEXT>\n"); bodyStuff.append(" <FORMATS>\n"); bodyStuff.append(" <FORMAT id=\"6\" pos=\"0\" len=\"1\">\n"); - bodyStuff.append(QString(" <ANCHOR type=\"frameset\" instance=\"%1\" />\n").arg(tableName)); + bodyStuff.append(TQString(" <ANCHOR type=\"frameset\" instance=\"%1\" />\n").tqarg(tableName)); bodyStuff.append(" </FORMAT>\n"); bodyStuff.append(" </FORMATS>\n"); bodyStuff.append(" </PARAGRAPH>\n"); @@ -417,7 +417,7 @@ bool StarWriterImport::parseTable(QByteArray n) return true; } -bool StarWriterImport::parseGraphics(QByteArray n) +bool StarWriterImport::parseGraphics(TQByteArray n) { return true; } diff --git a/filters/kword/starwriter/starwriterimport.h b/filters/kword/starwriter/starwriterimport.h index 8bc036ce..acb91a02 100644 --- a/filters/kword/starwriter/starwriterimport.h +++ b/filters/kword/starwriter/starwriterimport.h @@ -23,26 +23,27 @@ #define __STARWRITERIMPORT_H #include <KoFilter.h> -#include <qstring.h> -#include <qcstring.h> +#include <tqstring.h> +#include <tqcstring.h> class StarWriterImport: public KoFilter { Q_OBJECT + TQ_OBJECT public: - StarWriterImport(KoFilter *parent, const char *name, const QStringList&); + StarWriterImport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~StarWriterImport(); - KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); private: // most important OLE streams - QByteArray SwPageStyleSheets; - QByteArray StarWriterDocument; + TQByteArray SwPageStyleSheets; + TQByteArray StarWriterDocument; // supplementary variables - Q_UINT8 tablesNumber; - QString bodyStuff, tablesStuff, picturesStuff; + TQ_UINT8 tablesNumber; + TQString bodyStuff, tablesStuff, picturesStuff; // needed for ATTRIBUTES bool hasHeader; @@ -58,16 +59,16 @@ private: bool addHeaders(); bool addFooters(); bool addBody(); - QString convertToKWordString(QByteArray s); + TQString convertToKWordString(TQByteArray s); // Node routines - bool parseNodes(QByteArray n); - bool parseText(QByteArray n); - bool parseTable(QByteArray n); - bool parseGraphics(QByteArray n); + bool parseNodes(TQByteArray n); + bool parseText(TQByteArray n); + bool parseTable(TQByteArray n); + bool parseGraphics(TQByteArray n); // finished KWord document - QString maindoc; + TQString maindoc; }; #endif diff --git a/filters/kword/starwriter/status.html b/filters/kword/starwriter/status.html index c6656c9c..6919c589 100644 --- a/filters/kword/starwriter/status.html +++ b/filters/kword/starwriter/status.html @@ -3,11 +3,11 @@ <HTML> <HEAD> <TITLE>StarWriter 5.x filter for KWord</TITLE> - <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> + <META HTTP-ETQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <META NAME="GENERATOR" CONTENT="Quanta Plus"> </HEAD> <BODY> - <H2 align="center">Status of the</H2> + <H2 align="center">tqStatus of the</H2> <H1 align="center">StarWriter 5.x filter for KWord</H1> <P>Author: <A HREF="mailto:info@marcozanon.com">Marco Zanon</A> diff --git a/filters/kword/wml/wmlexport.cc b/filters/kword/wml/wmlexport.cc index 31a44468..92908c57 100644 --- a/filters/kword/wml/wmlexport.cc +++ b/filters/kword/wml/wmlexport.cc @@ -23,10 +23,10 @@ #include <unistd.h> #endif -#include <qtextcodec.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qtextstream.h> +#include <tqtextcodec.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqtextstream.h> #include <kdebug.h> #include <KoFilterChain.h> @@ -47,19 +47,19 @@ class WMLWorker : public KWEFBaseWorker public: WMLWorker(void) { } virtual ~WMLWorker(void) { } - virtual bool doOpenFile(const QString& filenameOut, const QString& to); + virtual bool doOpenFile(const TQString& filenameOut, const TQString& to); virtual bool doCloseFile(void); virtual bool doOpenDocument(void); virtual bool doCloseDocument(void); - virtual bool doFullParagraph(const QString& paraText, const LayoutData& layout, + virtual bool doFullParagraph(const TQString& paraText, const LayoutData& tqlayout, const ValueListFormatData& paraFormatDataList); private: - QString filename; - QString result; + TQString filename; + TQString result; bool m_bold, m_italic, m_underline; }; -bool WMLWorker::doOpenFile(const QString& filenameOut, const QString& /*to*/) +bool WMLWorker::doOpenFile(const TQString& filenameOut, const TQString& /*to*/) { filename = filenameOut; return TRUE; @@ -67,11 +67,11 @@ bool WMLWorker::doOpenFile(const QString& filenameOut, const QString& /*to*/) bool WMLWorker::doCloseFile(void) { - QFile out( filename ); + TQFile out( filename ); if( !out.open( IO_WriteOnly ) ) return FALSE; - QTextStream stream; - stream.setDevice( &out ); + TQTextStream stream; + stream.setDevice( TQT_TQIODEVICE(&out) ); stream << result; return TRUE; } @@ -96,11 +96,11 @@ bool WMLWorker::doCloseDocument(void) return TRUE; } -bool WMLWorker::doFullParagraph(const QString& paraText, - const LayoutData& layout, const ValueListFormatData& paraFormatDataList) +bool WMLWorker::doFullParagraph(const TQString& paraText, + const LayoutData& tqlayout, const ValueListFormatData& paraFormatDataList) { - QString wmlText; - QString text = paraText; + TQString wmlText; + TQString text = paraText; ValueListFormatData::ConstIterator it; for( it = paraFormatDataList.begin(); it!=paraFormatDataList.end(); ++it ) @@ -110,7 +110,7 @@ bool WMLWorker::doFullParagraph(const QString& paraText, // only if the format is for text (id==1) if( formatData.id == 1 ) { - QString partialText; + TQString partialText; partialText = text.mid( formatData.pos, formatData.len ); // escape the text @@ -131,7 +131,7 @@ bool WMLWorker::doFullParagraph(const QString& paraText, } // sentinel check - QString align = layout.alignment.lower(); + TQString align = tqlayout.tqalignment.lower(); if( ( align!="left" ) && ( align!="right" ) && ( align!="center" ) ) align = "left"; @@ -140,13 +140,13 @@ bool WMLWorker::doFullParagraph(const QString& paraText, return TRUE; } -WMLExport::WMLExport( KoFilter *, const char *, const QStringList& ): +WMLExport::WMLExport( KoFilter *, const char *, const TQStringList& ): KoFilter() { } -KoFilter::ConversionStatus WMLExport::convert( const QCString& from, - const QCString& to ) +KoFilter::ConversiontqStatus WMLExport::convert( const TQCString& from, + const TQCString& to ) { // check for proper conversion if( to!= "text/vnd.wap.wml" || from != "application/x-kword" ) @@ -155,7 +155,7 @@ KoFilter::ConversionStatus WMLExport::convert( const QCString& from, WMLWorker* worker = new WMLWorker(); KWEFKWordLeader* leader = new KWEFKWordLeader( worker ); - KoFilter::ConversionStatus result; + KoFilter::ConversiontqStatus result; result = leader->convert( m_chain, from, to ); delete worker; diff --git a/filters/kword/wml/wmlexport.h b/filters/kword/wml/wmlexport.h index 4ac7bf8e..0fbd4f45 100644 --- a/filters/kword/wml/wmlexport.h +++ b/filters/kword/wml/wmlexport.h @@ -26,15 +26,16 @@ class WMLExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - WMLExport(KoFilter *parent, const char *name, const QStringList&); + WMLExport(KoFilter *tqparent, const char *name, const TQStringList&); WMLExport(); virtual ~WMLExport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; #endif // __WMLEXPORT_H diff --git a/filters/kword/wml/wmlimport.cc b/filters/kword/wml/wmlimport.cc index 7ea2eabd..a9b5edc7 100644 --- a/filters/kword/wml/wmlimport.cc +++ b/filters/kword/wml/wmlimport.cc @@ -23,9 +23,9 @@ #include <unistd.h> #endif -#include <qfileinfo.h> -#include <qvaluelist.h> -#include <qfont.h> +#include <tqfileinfo.h> +#include <tqvaluelist.h> +#include <tqfont.h> #include <kdebug.h> #include <KoFilterChain.h> @@ -38,7 +38,7 @@ typedef KGenericFactory<WMLImport, KoFilter> WMLImportFactory; K_EXPORT_COMPONENT_FACTORY( libwmlimport, WMLImportFactory( "kofficefilters" ) ) -WMLImport::WMLImport( KoFilter *, const char *, const QStringList& ): +WMLImport::WMLImport( KoFilter *, const char *, const TQStringList& ): KoFilter() { } @@ -47,16 +47,16 @@ WMLImport::WMLImport( KoFilter *, const char *, const QStringList& ): class WMLConverter: public WMLParser { public: - QString root; - QString documentInfo; + TQString root; + TQString documentInfo; WMLConverter(); virtual void parse( const char* filename ); - virtual bool doOpenCard( QString, QString ); + virtual bool doOpenCard( TQString, TQString ); virtual bool doCloseCard(); - virtual bool doParagraph( QString text, WMLFormatList formatList, - WMLLayout layout ); + virtual bool doParagraph( TQString text, WMLFormatList formatList, + WMLLayout tqlayout ); private: - QString m_title; + TQString m_title; }; WMLConverter::WMLConverter() @@ -64,23 +64,23 @@ WMLConverter::WMLConverter() root = ""; } -static QString WMLFormatAsXML( WMLFormat format ) +static TQString WMLFormatAsXML( WMLFormat format ) { - QString result; + TQString result; if( format.href.isEmpty() ) { - QFont font = KoGlobal::defaultFont(); - QString fontFamily = font.family(); - QString fontSize = QString::number( + TQFont font = KoGlobal::defaultFont(); + TQString fontFamily = font.family(); + TQString fontSize = TQString::number( format.fontsize == WMLFormat::Big ? font.pointSizeFloat()+3 : format.fontsize == WMLFormat::Small ? font.pointSizeFloat()-3 : font.pointSizeFloat() ); - QString boldness = format.bold ? "75" : "50"; - QString italic = format.italic ? "1" : "0"; - QString underline = format.underline ? "1" : "0"; + TQString boldness = format.bold ? "75" : "50"; + TQString italic = format.italic ? "1" : "0"; + TQString underline = format.underline ? "1" : "0"; - result = "<FORMAT id=\"1\" pos=\"" + QString::number(format.pos) + - "\" len=\"" + QString::number(format.len) + "\">\n"; + result = "<FORMAT id=\"1\" pos=\"" + TQString::number(format.pos) + + "\" len=\"" + TQString::number(format.len) + "\">\n"; result.append( " <FONT name=\"" + fontFamily + "\" />\n" ); result.append( " <SIZE value=\"" + fontSize + "\" />\n" ); result.append( " <WEIGHT value=\"" + boldness + "\" />\n" ); @@ -91,8 +91,8 @@ static QString WMLFormatAsXML( WMLFormat format ) else { // hyperlink - result.append( "<FORMAT id=\"4\" pos=\"" + QString::number(format.pos) + - "\" len=\"" + QString::number(format.len) + "\">\n"); + result.append( "<FORMAT id=\"4\" pos=\"" + TQString::number(format.pos) + + "\" len=\"" + TQString::number(format.len) + "\">\n"); result.append( "<VARIABLE>\n" ); result.append( " <TYPE key=\"STRING\" type=\"9\" text=\"" + format.link + "\" />\n" ); result.append( " <LINK linkName=\"" + format.link + "\" hrefName=\"" + @@ -105,17 +105,17 @@ static QString WMLFormatAsXML( WMLFormat format ) return result; } -static QString WMLLayoutAsXML( WMLLayout layout ) +static TQString WMLLayoutAsXML( WMLLayout tqlayout ) { - QString result; + TQString result; - QString align = "left"; - if( layout.align == WMLLayout::Center ) align = "center"; - if( layout.align == WMLLayout::Right ) align = "right"; + TQString align = "left"; + if( tqlayout.align == WMLLayout::Center ) align = "center"; + if( tqlayout.align == WMLLayout::Right ) align = "right"; - QFont font = KoGlobal::defaultFont(); - QString fontFamily = font.family(); - QString fontSize = QString::number( font.pointSizeFloat() ); + TQFont font = KoGlobal::defaultFont(); + TQString fontFamily = font.family(); + TQString fontSize = TQString::number( font.pointSizeFloat() ); result.append( "<LAYOUT>\n" ); result.append( " <NAME value=\"Standard\" />\n" ); @@ -145,7 +145,7 @@ static QString WMLLayoutAsXML( WMLLayout layout ) } // use the first card title (or id) as document title -bool WMLConverter::doOpenCard( QString id, QString title ) +bool WMLConverter::doOpenCard( TQString id, TQString title ) { if( m_title.isEmpty() ) m_title = ( !title.isEmpty() ) ? title : id; @@ -160,16 +160,16 @@ bool WMLConverter::doCloseCard() return doParagraph( " ", WMLFormatList(), WMLLayout() ); } -bool WMLConverter::doParagraph( QString atext, WMLFormatList formatList, - WMLLayout layout ) +bool WMLConverter::doParagraph( TQString atext, WMLFormatList formatList, + WMLLayout tqlayout ) { - QString text, formats; + TQString text, formats; // encode the text for XML-ness text = atext; - text.replace( '&', "&" ); - text.replace( '<', "<" ); - text.replace( '>', ">" ); + text.tqreplace( '&', "&" ); + text.tqreplace( '<', "<" ); + text.tqreplace( '>', ">" ); // formats, taken from formatList WMLFormatList::iterator it; @@ -183,7 +183,7 @@ bool WMLConverter::doParagraph( QString atext, WMLFormatList formatList, root.append( "<PARAGRAPH>\n" ); root.append( "<TEXT>" + text + "</TEXT>\n" ); root.append( "<FORMATS>" + formats + "</FORMATS>\n" ); - root.append( WMLLayoutAsXML( layout) ); + root.append( WMLLayoutAsXML( tqlayout) ); root.append( "</PARAGRAPH>\n" ); return TRUE; @@ -193,7 +193,7 @@ void WMLConverter::parse( const char* filename ) { WMLParser::parse( filename ); - QString prolog; + TQString prolog; prolog += "<!DOCTYPE DOC>\n"; prolog += "<DOC mime=\"application/x-kword\" syntaxVersion=\"2\" editor=\"KWord\" >\n"; prolog += "<PAPER width=\"595\" spHeadBody=\"9\" format=\"1\" height=\"841\" fType=\"0\" orientation=\"0\" hType=\"0\" columnspacing=\"2\" spFootBody=\"9\" columns=\"1\" >\n"; @@ -204,7 +204,7 @@ void WMLConverter::parse( const char* filename ) prolog += "<FRAMESET frameType=\"1\" frameInfo=\"0\" name=\"Text Frameset 1\" visible=\"1\" >\n"; prolog += "<FRAME runaround=\"1\" copy=\"0\" right=\"567\" newFrameBehavior=\"0\" left=\"28\" bottom=\"799\" runaroundGap=\"2\" top=\"42\" />\n"; - QString epilog; + TQString epilog; epilog = "</FRAMESET>\n"; epilog += "</FRAMESETS>\n"; epilog += "</DOC>\n"; @@ -231,7 +231,7 @@ void WMLConverter::parse( const char* filename ) } -KoFilter::ConversionStatus WMLImport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus WMLImport::convert( const TQCString& from, const TQCString& to ) { // check for proper conversion if( to!= "application/x-kword" || from != "text/vnd.wap.wml" ) @@ -246,7 +246,7 @@ KoFilter::ConversionStatus WMLImport::convert( const QCString& from, const QCStr if( filter.root.isEmpty() ) return KoFilter::StupidError; - QString root = filter.root; + TQString root = filter.root; // prepare storage KoStoreDevice* out=m_chain->storageFile( "root", KoStore::Write ); @@ -254,19 +254,19 @@ KoFilter::ConversionStatus WMLImport::convert( const QCString& from, const QCStr // store output document if( out ) { - QCString cstring = root.utf8(); + TQCString cstring = root.utf8(); cstring.prepend( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" ); out->writeBlock( (const char*) cstring, cstring.length() ); } - QString documentInfo = filter.documentInfo; + TQString documentInfo = filter.documentInfo; // store document info out = m_chain->storageFile( "documentinfo.xml", KoStore::Write ); if ( out ) { - QCString cstring = documentInfo.utf8(); + TQCString cstring = documentInfo.utf8(); cstring.prepend( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" ); out->writeBlock( (const char*) cstring, cstring.length() ); diff --git a/filters/kword/wml/wmlimport.h b/filters/kword/wml/wmlimport.h index 87184ca7..903cb9e0 100644 --- a/filters/kword/wml/wmlimport.h +++ b/filters/kword/wml/wmlimport.h @@ -20,7 +20,7 @@ #ifndef __WMLIMPORT_H #define __WMLIMPORT_H -#include <qstring.h> +#include <tqstring.h> #include <KoFilter.h> #include <KoStore.h> @@ -28,15 +28,16 @@ class WMLImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - WMLImport(KoFilter *parent, const char *name, const QStringList&); + WMLImport(KoFilter *tqparent, const char *name, const TQStringList&); WMLImport(); virtual ~WMLImport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; #endif // __WMLIMPORT_H diff --git a/filters/kword/wml/wmlparser.cpp b/filters/kword/wml/wmlparser.cpp index a37dbeb4..ecbb235c 100644 --- a/filters/kword/wml/wmlparser.cpp +++ b/filters/kword/wml/wmlparser.cpp @@ -17,10 +17,10 @@ * Boston, MA 02110-1301, USA. */ -#include <qstring.h> -#include <qxml.h> -#include <qfile.h> -#include <qvaluestack.h> +#include <tqstring.h> +#include <tqxml.h> +#include <tqfile.h> +#include <tqvaluestack.h> #include <wmlparser.h> @@ -63,31 +63,31 @@ void WMLParseState::assign( const WMLParseState& state ) } // ContentHandler for use with the reader -class WMLHandler: public QXmlDefaultHandler +class WMLHandler: public TQXmlDefaultHandler { public: WMLHandler( WMLParser *parser ){ m_parser = parser; } bool startDocument(); - bool startElement( const QString&, const QString&, const QString& , - const QXmlAttributes& ); - bool endElement( const QString&, const QString&, const QString& ); - bool characters( const QString& ch ); + bool startElement( const TQString&, const TQString&, const TQString& , + const TQXmlAttributes& ); + bool endElement( const TQString&, const TQString&, const TQString& ); + bool characters( const TQString& ch ); private: WMLParser *m_parser; bool m_inBlock; - QString m_text; + TQString m_text; bool m_inLink; - QString m_link; - QString m_href; + TQString m_link; + TQString m_href; WMLParseState m_state; - QValueStack<WMLParseState> m_stateStack; + TQValueStack<WMLParseState> m_stateStack; bool flushParagraph(); void pushState(); @@ -105,11 +105,11 @@ bool WMLHandler::startDocument() return true; } -bool WMLHandler::startElement( const QString&, const QString&, - const QString& qName, - const QXmlAttributes& attr ) +bool WMLHandler::startElement( const TQString&, const TQString&, + const TQString& qName, + const TQXmlAttributes& attr ) { - QString tag = qName.lower(); + TQString tag = qName.lower(); if( tag == "wml" ) return m_parser->doOpenDocument(); @@ -117,8 +117,8 @@ bool WMLHandler::startElement( const QString&, const QString&, if( tag == "card" ) { m_state = WMLParseState(); - QString card_id = attr.value("id"); - QString card_title = attr.value("title"); + TQString card_id = attr.value("id"); + TQString card_title = attr.value("title"); return m_parser->doOpenCard( card_id, card_title ); } @@ -132,7 +132,7 @@ bool WMLHandler::startElement( const QString&, const QString&, (m_state.currentFormat.fontsize != WMLFormat::Normal) ) m_state.formatList.append( m_state.currentFormat ); - QString align = attr.value("align").lower(); + TQString align = attr.value("align").lower(); if( align == "right" ) m_state.currentLayout.align = WMLLayout::Right; if( align == "center" ) @@ -183,7 +183,7 @@ bool WMLHandler::startElement( const QString&, const QString&, if( tag == "a" ) { - QString href = attr.value("href"); + TQString href = attr.value("href"); if( !href.isEmpty() ) { m_inBlock = false; @@ -225,10 +225,10 @@ bool WMLHandler::startElement( const QString&, const QString&, return TRUE; } -bool WMLHandler::endElement( const QString&, const QString&, - const QString& qName ) +bool WMLHandler::endElement( const TQString&, const TQString&, + const TQString& qName ) { - QString tag = qName.lower(); + TQString tag = qName.lower(); if( tag == "wml" ) return m_parser->doCloseDocument(); @@ -318,7 +318,7 @@ bool WMLHandler::endElement( const QString&, const QString&, return TRUE; } -bool WMLHandler::characters( const QString& ch ) +bool WMLHandler::characters( const TQString& ch ) { if( m_inBlock ) m_text.append( ch ); @@ -403,7 +403,7 @@ WMLFormat& WMLFormat::operator=( const WMLFormat& f ) return *this; } -// paragraph layout info +// paragraph tqlayout info WMLLayout::WMLLayout() { align = Left; @@ -428,9 +428,9 @@ WMLLayout& WMLLayout::operator=( const WMLLayout& l ) // The basic WML parser void WMLParser::parse( const char* filename ) { - QFile f( filename ); - QXmlInputSource source( &f ); - QXmlSimpleReader reader; + TQFile f( filename ); + TQXmlInputSource source( TQT_TQIODEVICE(&f) ); + TQXmlSimpleReader reader; WMLHandler handler( this ); reader.setContentHandler( &handler ); reader.parse( source ); @@ -446,7 +446,7 @@ bool WMLParser::doCloseDocument() return TRUE; } -bool WMLParser::doOpenCard( QString, QString ) +bool WMLParser::doOpenCard( TQString, TQString ) { return TRUE; } @@ -456,7 +456,7 @@ bool WMLParser::doCloseCard() return TRUE; } -bool WMLParser::doParagraph( QString, WMLFormatList, WMLLayout ) +bool WMLParser::doParagraph( TQString, WMLFormatList, WMLLayout ) { return TRUE; } diff --git a/filters/kword/wml/wmlparser.h b/filters/kword/wml/wmlparser.h index 504b184e..575652f8 100644 --- a/filters/kword/wml/wmlparser.h +++ b/filters/kword/wml/wmlparser.h @@ -20,8 +20,8 @@ #ifndef __WMLPARSER_H #define __WMLPARSER_H -#include <qvaluelist.h> -#include <qstring.h> +#include <tqvaluelist.h> +#include <tqstring.h> class WMLFormat { @@ -29,7 +29,7 @@ class WMLFormat int pos, len; bool bold, italic, underline; enum { Normal, Big, Small } fontsize; - QString link, href; + TQString link, href; WMLFormat(); WMLFormat( const WMLFormat& ); WMLFormat& operator= ( const WMLFormat& ); @@ -46,7 +46,7 @@ class WMLLayout void assign( const WMLLayout& ); }; -typedef QValueList<WMLFormat> WMLFormatList; +typedef TQValueList<WMLFormat> WMLFormatList; class WMLParser { @@ -57,9 +57,9 @@ class WMLParser virtual bool doOpenDocument(); virtual bool doCloseDocument(); - virtual bool doOpenCard( QString id, QString title ); + virtual bool doOpenCard( TQString id, TQString title ); virtual bool doCloseCard(); - virtual bool doParagraph( QString, WMLFormatList, WMLLayout ); + virtual bool doParagraph( TQString, WMLFormatList, WMLLayout ); virtual bool doBeginTable(); virtual bool doTableCell( unsigned row, unsigned col ); virtual bool doEndTable(); diff --git a/filters/kword/wordperfect/export/wp5.cc b/filters/kword/wordperfect/export/wp5.cc index c304447b..bffdecf1 100644 --- a/filters/kword/wordperfect/export/wp5.cc +++ b/filters/kword/wordperfect/export/wp5.cc @@ -23,10 +23,10 @@ #include <unistd.h> #endif -#include <qtextcodec.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qtextstream.h> +#include <tqtextcodec.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqtextstream.h> #include <KWEFBaseWorker.h> #include <KWEFKWordLeader.h> @@ -34,7 +34,7 @@ #include <wp5.h> -bool WPFiveWorker::doOpenFile(const QString& filenameOut, const QString& /*to*/) +bool WPFiveWorker::doOpenFile(const TQString& filenameOut, const TQString& /*to*/) { filename = filenameOut; outfile.setName( filename ); @@ -42,14 +42,14 @@ bool WPFiveWorker::doOpenFile(const QString& filenameOut, const QString& /*to*/) return false; output.setDevice( &outfile ); - output.setByteOrder (QDataStream::LittleEndian); + output.setByteOrder (TQDataStream::LittleEndian); return true; } bool WPFiveWorker::doCloseFile(void) { // asssume we're at the end of the file - Q_UINT32 total_filesize = outfile.at(); + TQ_UINT32 total_filesize = outfile.at(); // close the file first outfile.close(); @@ -58,7 +58,7 @@ bool WPFiveWorker::doCloseFile(void) if( !outfile.open( IO_ReadWrite ) ) return false; output.setDevice( &outfile ); - output.setByteOrder (QDataStream::LittleEndian); + output.setByteOrder (TQDataStream::LittleEndian); // now it's time to fix-up some header fields @@ -80,52 +80,52 @@ bool WPFiveWorker::doOpenDocument(void) // note that some fields are still "dummy" // magic id: -1, "WPC" - Q_UINT8 magic[] = { 0xff, 0x57, 0x50, 0x43 }; + TQ_UINT8 magic[] = { 0xff, 0x57, 0x50, 0x43 }; for( int i=0; i<4; i++ ) output << magic[i]; // pointer to document area (dummy, will be fixed later) - Q_UINT8 docptr[] = { 0x0E, 0x02, 0x00, 0x00 } ; + TQ_UINT8 docptr[] = { 0x0E, 0x02, 0x00, 0x00 } ; for( int i=0; i<4; i++ ) output << docptr[i]; // write product type ( 1 = WordPerfect ) - Q_UINT8 product_type = 1; + TQ_UINT8 product_type = 1; output << product_type; // write file type ( 10 = WordPerfect document ) - Q_UINT8 file_type = 10; + TQ_UINT8 file_type = 10; output << file_type; // write version ( 1 = WordPerfect 5.x ) - Q_UINT16 version = 0x0100; + TQ_UINT16 version = 0x0100; output << version; // write encryption flag ( 0 = not encrypted ) - Q_UINT16 encrypt = 0; + TQ_UINT16 encrypt = 0; output << encrypt; // offset to index header (always 0x200?) - Q_UINT16 index_header_ptr = 0x200; + TQ_UINT16 index_header_ptr = 0x200; output << index_header_ptr; // beginning of extended file header (always 5) - Q_UINT32 extheader = 5; + TQ_UINT32 extheader = 5; output << extheader; // filesize (dummy, will be fixed later) - Q_UINT32 filesize = 0; + TQ_UINT32 filesize = 0; output << filesize; // filler 488 bytes - Q_UINT8 dummy = 0; + TQ_UINT8 dummy = 0; for( int i=0; i<488; i++ ) output << dummy; // index header (specified 0 index!) - Q_UINT8 index_header[] = { 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, + TQ_UINT8 index_header[] = { 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; for( int i=0; i<14; i++ ) output << index_header[i]; // document area starts, mark it for the header fields - document_area_ptr = output.device()->at(); + document_area_ptr = output.tqdevice()->at(); return true; } @@ -137,13 +137,13 @@ bool WPFiveWorker::doCloseDocument(void) // quick-and-dirty escape function for WP 5.x chars // TODO fix it ! -static QCString WPFiveEscape( const QString& text ) +static TQCString WPFiveEscape( const TQString& text ) { - QCString result; + TQCString result; for( unsigned int i=0; i < text.length(); i++ ) { - int c = text[i].unicode(); + int c = text[i].tqunicode(); if( c < 32 ) result += '.'; else if ( c == 32 ) result += 0x20 ; // hard space else if ( c < 128 ) result += text[i].latin1(); @@ -154,8 +154,8 @@ static QCString WPFiveEscape( const QString& text ) } -bool WPFiveWorker::doFullParagraph(const QString& paraText, - const LayoutData& /*layout*/, const ValueListFormatData& paraFormatDataList) +bool WPFiveWorker::doFullParagraph(const TQString& paraText, + const LayoutData& /*tqlayout*/, const ValueListFormatData& paraFormatDataList) { ValueListFormatData::ConstIterator it; for( it = paraFormatDataList.begin(); it!=paraFormatDataList.end(); ++it ) @@ -166,7 +166,7 @@ bool WPFiveWorker::doFullParagraph(const QString& paraText, if( formatData.id == 1 ) { - Q_UINT8 attr = 0; //invalid + TQ_UINT8 attr = 0; //invalid if( formatData.text.weight >= 75 ) attr = 12; // bold if( formatData.text.italic ) attr = 8; if( formatData.text.underline ) @@ -184,30 +184,30 @@ bool WPFiveWorker::doFullParagraph(const QString& paraText, // write some prefix-code (such as Bold On) and possibly appropriate suffix-code (Bold Off) // attribute on - if( attr > 0 ) output << (Q_UINT8)0xc3 << attr << (Q_UINT8)0xc3; + if( attr > 0 ) output << (TQ_UINT8)0xc3 << attr << (TQ_UINT8)0xc3; // set font color - QColor fgColor = formatData.text.fgColor; + TQColor fgColor = formatData.text.fgColor; if( fgColor.isValid() ) { - Q_UINT8 wp_color[] = { 0xd1, 0, 10, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0xd1 }; - wp_color[7] = (Q_UINT8) fgColor.red(); - wp_color[8] = (Q_UINT8) fgColor.green(); - wp_color[9] = (Q_UINT8) fgColor.blue(); + TQ_UINT8 wp_color[] = { 0xd1, 0, 10, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0xd1 }; + wp_color[7] = (TQ_UINT8) fgColor.red(); + wp_color[8] = (TQ_UINT8) fgColor.green(); + wp_color[9] = (TQ_UINT8) fgColor.blue(); output.writeRawBytes( (const char*)wp_color, 14 ); } // the text itself, "escape" it first - QCString out = WPFiveEscape( paraText.mid( formatData.pos, formatData.len ) ); + TQCString out = WPFiveEscape( paraText.mid( formatData.pos, formatData.len ) ); output.writeRawBytes( (const char*)out, out.length() ); // attribute off - if( attr > 0 ) output << (Q_UINT8)0xc4 << attr << (Q_UINT8)0xc4; + if( attr > 0 ) output << (TQ_UINT8)0xc4 << attr << (TQ_UINT8)0xc4; } } // write hard-return - output << (Q_UINT8) 0x0a; + output << (TQ_UINT8) 0x0a; return true; } diff --git a/filters/kword/wordperfect/export/wp5.h b/filters/kword/wordperfect/export/wp5.h index bc197e72..0791459b 100644 --- a/filters/kword/wordperfect/export/wp5.h +++ b/filters/kword/wordperfect/export/wp5.h @@ -23,26 +23,26 @@ #include <KWEFStructures.h> #include <KWEFBaseWorker.h> -class QString; -class QFile; -class QDataStream; +class TQString; +class TQFile; +class TQDataStream; class WPFiveWorker : public KWEFBaseWorker { public: WPFiveWorker(void) { } virtual ~WPFiveWorker(void) { } - virtual bool doOpenFile(const QString& filenameOut, const QString& to); + virtual bool doOpenFile(const TQString& filenameOut, const TQString& to); virtual bool doCloseFile(void); virtual bool doOpenDocument(void); virtual bool doCloseDocument(void); - virtual bool doFullParagraph(const QString& paraText, const LayoutData& layout, + virtual bool doFullParagraph(const TQString& paraText, const LayoutData& tqlayout, const ValueListFormatData& paraFormatDataList); private: - QString filename; - QFile outfile; - QDataStream output; - Q_UINT32 document_area_ptr; + TQString filename; + TQFile outfile; + TQDataStream output; + TQ_UINT32 document_area_ptr; }; #endif //__WP5_H diff --git a/filters/kword/wordperfect/export/wp6.cc b/filters/kword/wordperfect/export/wp6.cc index 62291244..21c59606 100644 --- a/filters/kword/wordperfect/export/wp6.cc +++ b/filters/kword/wordperfect/export/wp6.cc @@ -23,11 +23,11 @@ #include <unistd.h> #endif -#include <qtextcodec.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qtextstream.h> -#include <qvaluevector.h> +#include <tqtextcodec.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqtextstream.h> +#include <tqvaluevector.h> #include <KWEFBaseWorker.h> #include <KWEFKWordLeader.h> @@ -35,7 +35,7 @@ #include <wp6.h> -bool WPSixWorker::doOpenFile(const QString& filenameOut, const QString& /*to*/) +bool WPSixWorker::doOpenFile(const TQString& filenameOut, const TQString& /*to*/) { filename = filenameOut; outfile.setName( filename ); @@ -43,14 +43,14 @@ bool WPSixWorker::doOpenFile(const QString& filenameOut, const QString& /*to*/) return false; output.setDevice( &outfile ); - output.setByteOrder (QDataStream::LittleEndian); + output.setByteOrder (TQDataStream::LittleEndian); return true; } bool WPSixWorker::doCloseFile(void) { // asssume we're at the end of the file - Q_UINT32 total_filesize = outfile.at(); + TQ_UINT32 total_filesize = outfile.at(); // close the file first outfile.close(); @@ -80,52 +80,52 @@ bool WPSixWorker::doOpenDocument(void) // note that some fields are still "dummy" // magic id: -1, "WPC" - Q_UINT8 magic[] = { 0xff, 0x57, 0x50, 0x43 }; + TQ_UINT8 magic[] = { 0xff, 0x57, 0x50, 0x43 }; for( int i=0; i<4; i++ ) output << magic[i]; // pointer to document area (dummy, will be fixed later) - Q_UINT8 docptr[] = { 0x0E, 0x02, 0x00, 0x00 } ; + TQ_UINT8 docptr[] = { 0x0E, 0x02, 0x00, 0x00 } ; for( int i=0; i<4; i++ ) output << docptr[i]; // write product type ( 1 = WordPerfect ) - Q_UINT8 product_type = 1; + TQ_UINT8 product_type = 1; output << product_type; // write file type ( 10 = WordPerfect document ) - Q_UINT8 file_type = 10; + TQ_UINT8 file_type = 10; output << file_type; // write version (TODO explain) - Q_UINT16 version = 0x0202; + TQ_UINT16 version = 0x0202; output << version; // write encryption flag ( 0 = not encrypted ) - Q_UINT16 encrypt = 0; + TQ_UINT16 encrypt = 0; output << encrypt; // offset to index header (always 0x200?) - Q_UINT16 index_header_ptr = 0x200; + TQ_UINT16 index_header_ptr = 0x200; output << index_header_ptr; // beginning of extended file header (always 5) - Q_UINT32 extheader = 5; + TQ_UINT32 extheader = 5; output << extheader; // filesize (dummy, will be fixed later) - Q_UINT32 filesize = 0; + TQ_UINT32 filesize = 0; output << filesize; // filler 488 bytes - Q_UINT8 dummy = 0; + TQ_UINT8 dummy = 0; for( int i=0; i<488; i++ ) output << dummy; // index header (specified 0 index!) - Q_UINT8 index_header[] = { 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, + TQ_UINT8 index_header[] = { 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; for( int i=0; i<14; i++ ) output << index_header[i]; // document area starts, mark it for the header fields - document_area_ptr = output.device()->at(); + document_area_ptr = output.tqdevice()->at(); return true; } @@ -138,13 +138,13 @@ bool WPSixWorker::doCloseDocument(void) // this helper functions "escape" plain Unicode string to WP-compliance string // what it does: converting spaces and tabs to hard-spaces and hard-tabs // TODO handle Unicode characters using WP charsets -static QCString WPSixEscape( const QString& text ) +static TQCString WPSixEscape( const TQString& text ) { - QCString result; + TQCString result; for( unsigned int i=0; i < text.length(); i++ ) { - int c = text[i].unicode(); + int c = text[i].tqunicode(); if( c < 32 ) result += '.'; else if ( c == 32 ) result += 0x80 ; // hard space else if ( c < 128 ) result += text[i].latin1(); @@ -154,15 +154,15 @@ static QCString WPSixEscape( const QString& text ) return result; } -bool WPSixWorker::doFullParagraph(const QString& paraText, - const LayoutData& layout, const ValueListFormatData& paraFormatDataList) +bool WPSixWorker::doFullParagraph(const TQString& paraText, + const LayoutData& tqlayout, const ValueListFormatData& paraFormatDataList) { - // handle paragraph alignment/justification (default to left) + // handle paragraph tqalignment/justification (default to left) unsigned char wp_align[] = { 0xd3, 5, 12, 0, 0, 1, 0, 0, 2, 12, 0, 0xd3 }; - if( layout.alignment == "left" ) wp_align[7] = 0; - if( layout.alignment == "justify" ) wp_align[7] = 1; - if( layout.alignment == "center" ) wp_align[7] = 2; - if( layout.alignment == "right" ) wp_align[7] = 3; + if( tqlayout.tqalignment == "left" ) wp_align[7] = 0; + if( tqlayout.tqalignment == "justify" ) wp_align[7] = 1; + if( tqlayout.tqalignment == "center" ) wp_align[7] = 2; + if( tqlayout.tqalignment == "right" ) wp_align[7] = 3; output.writeRawBytes( (const char*)wp_align, 12 ); ValueListFormatData::ConstIterator it; @@ -174,7 +174,7 @@ bool WPSixWorker::doFullParagraph(const QString& paraText, if( formatData.id == 1 ) { - Q_UINT8 attr = 0; //invalid + TQ_UINT8 attr = 0; //invalid if( formatData.text.weight >= 75 ) attr = 12; // bold if( formatData.text.italic ) attr = 8; if( formatData.text.underline ) @@ -188,53 +188,53 @@ bool WPSixWorker::doFullParagraph(const QString& paraText, if( formatData.text.verticalAlignment == 2 ) attr = 5; //superscript if( formatData.text.strikeout ) attr = 13; - QColor fgColor = formatData.text.fgColor; - QColor bgColor = formatData.text.bgColor; + TQColor fgColor = formatData.text.fgColor; + TQColor bgColor = formatData.text.bgColor; // due to the file format, before writing the text we must // write some refix-code (such as Bold On) and possibly appropriate suffix-code (Bold Off) // attribute on - if( attr > 0 ) output << (Q_UINT8)0xf2 << attr << (Q_UINT8)0xf2; + if( attr > 0 ) output << (TQ_UINT8)0xf2 << attr << (TQ_UINT8)0xf2; // set font color if( fgColor.isValid() ) { - Q_UINT8 wp_color[] = { 0xd4, 0x18, 16, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0xd4 }; - wp_color[7] = (Q_UINT8) fgColor.red(); - wp_color[8] = (Q_UINT8) fgColor.green(); - wp_color[9] = (Q_UINT8) fgColor.blue(); + TQ_UINT8 wp_color[] = { 0xd4, 0x18, 16, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0xd4 }; + wp_color[7] = (TQ_UINT8) fgColor.red(); + wp_color[8] = (TQ_UINT8) fgColor.green(); + wp_color[9] = (TQ_UINT8) fgColor.blue(); output.writeRawBytes( (const char*)wp_color, 16 ); } // highlight on (background color) if( bgColor.isValid() ) { - output << (Q_UINT8) 0xfb; - output << (Q_UINT8)bgColor.red() << (Q_UINT8)bgColor.green() << (Q_UINT8)bgColor.blue(); - output << (Q_UINT8) 100 << (Q_UINT8) 0xfb; + output << (TQ_UINT8) 0xfb; + output << (TQ_UINT8)bgColor.red() << (TQ_UINT8)bgColor.green() << (TQ_UINT8)bgColor.blue(); + output << (TQ_UINT8) 100 << (TQ_UINT8) 0xfb; } // the text itself, "escape" it first - QCString out = WPSixEscape( paraText.mid( formatData.pos, formatData.len ) ); + TQCString out = WPSixEscape( paraText.mid( formatData.pos, formatData.len ) ); output.writeRawBytes( (const char*)out, out.length() ); // attribute off - if( attr > 0 ) output << (Q_UINT8)0xf3 << attr << (Q_UINT8)0xf3; + if( attr > 0 ) output << (TQ_UINT8)0xf3 << attr << (TQ_UINT8)0xf3; // highlight off if( bgColor.isValid() ) { - output << (Q_UINT8) 0xfc; - output << (Q_UINT8)bgColor.red() << (Q_UINT8)bgColor.green() << (Q_UINT8)bgColor.blue(); - output << (Q_UINT8) 100 << (Q_UINT8) 0xfc; + output << (TQ_UINT8) 0xfc; + output << (TQ_UINT8)bgColor.red() << (TQ_UINT8)bgColor.green() << (TQ_UINT8)bgColor.blue(); + output << (TQ_UINT8) 100 << (TQ_UINT8) 0xfc; } } } // write hard-return - output << (Q_UINT8) 0xcc; + output << (TQ_UINT8) 0xcc; return true; } diff --git a/filters/kword/wordperfect/export/wp6.h b/filters/kword/wordperfect/export/wp6.h index 042cf614..73397338 100644 --- a/filters/kword/wordperfect/export/wp6.h +++ b/filters/kword/wordperfect/export/wp6.h @@ -23,26 +23,26 @@ #include <KWEFStructures.h> #include <KWEFBaseWorker.h> -class QString; -class QFile; -class QDataStream; +class TQString; +class TQFile; +class TQDataStream; class WPSixWorker : public KWEFBaseWorker { public: WPSixWorker(void) { } virtual ~WPSixWorker(void) { } - virtual bool doOpenFile(const QString& filenameOut, const QString& to); + virtual bool doOpenFile(const TQString& filenameOut, const TQString& to); virtual bool doCloseFile(void); virtual bool doOpenDocument(void); virtual bool doCloseDocument(void); - virtual bool doFullParagraph(const QString& paraText, const LayoutData& layout, + virtual bool doFullParagraph(const TQString& paraText, const LayoutData& tqlayout, const ValueListFormatData& paraFormatDataList); private: - QString filename; - QFile outfile; - QDataStream output; - Q_UINT32 document_area_ptr; + TQString filename; + TQFile outfile; + TQDataStream output; + TQ_UINT32 document_area_ptr; }; #endif //__WP6_H diff --git a/filters/kword/wordperfect/export/wpexport.cc b/filters/kword/wordperfect/export/wpexport.cc index 80467006..43a688c3 100644 --- a/filters/kword/wordperfect/export/wpexport.cc +++ b/filters/kword/wordperfect/export/wpexport.cc @@ -23,10 +23,10 @@ #include <unistd.h> #endif -#include <qtextcodec.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qtextstream.h> +#include <tqtextcodec.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqtextstream.h> #include <kdebug.h> #include <KoFilterChain.h> @@ -42,14 +42,14 @@ typedef KGenericFactory<WPExport, KoFilter> WPExportFactory; K_EXPORT_COMPONENT_FACTORY( libwpexport, WPExportFactory( "kofficefilters" ) ) -WPExport::WPExport( KoFilter *, const char *, const QStringList& ): +WPExport::WPExport( KoFilter *, const char *, const TQStringList& ): KoFilter() { } -KoFilter::ConversionStatus -WPExport::convert( const QCString& from, - const QCString& to ) +KoFilter::ConversiontqStatus +WPExport::convert( const TQCString& from, + const TQCString& to ) { // check for proper conversion if( to!= "application/wordperfect" || from != "application/x-kword" ) @@ -59,8 +59,8 @@ WPExport::convert( const QCString& from, // "WP" is for WP 5.x, "WPD" or else is for WP 6/7 // e.g /home/ariya/test.wp is a WP 5 document // TODO ask user with a dialog box - QString outfile = m_chain->outputFile(); - QString extension = QFileInfo( outfile ).extension().lower(); + TQString outfile = m_chain->outputFile(); + TQString extension = TQFileInfo( outfile ).extension().lower(); int version = ( extension == "wp" ) ? 5 : 6 ; KWEFBaseWorker* worker; @@ -69,7 +69,7 @@ WPExport::convert( const QCString& from, KWEFKWordLeader* leader = new KWEFKWordLeader( worker ); - KoFilter::ConversionStatus result; + KoFilter::ConversiontqStatus result; result = leader->convert( m_chain, from, to ); delete worker; diff --git a/filters/kword/wordperfect/export/wpexport.h b/filters/kword/wordperfect/export/wpexport.h index 1329740c..4c819ba4 100644 --- a/filters/kword/wordperfect/export/wpexport.h +++ b/filters/kword/wordperfect/export/wpexport.h @@ -26,15 +26,16 @@ class WPExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - WPExport(KoFilter *parent, const char *name, const QStringList&); + WPExport(KoFilter *tqparent, const char *name, const TQStringList&); WPExport(); virtual ~WPExport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; #endif // __WPEXPORT_H diff --git a/filters/kword/wordperfect/import/PageSpan.cxx b/filters/kword/wordperfect/import/PageSpan.cxx index db92cfd7..c56fbe54 100644 --- a/filters/kword/wordperfect/import/PageSpan.cxx +++ b/filters/kword/wordperfect/import/PageSpan.cxx @@ -33,12 +33,12 @@ PageSpan::PageSpan(const WPXPropertyList &xPropList) : #if 0 -const int iSpan, const float fFormLength, const float fFormWidth, const WPXFormOrientation fFormOrientation, +const int iSpan, const float fFormLength, const float fFormWidth, const WPXFormQt::Orientation fFormQt::Orientation, const float fLeftMargin, const float fRightMargin, const float fTopMargin, const float fBottomMargin): miSpan(iSpan), mfFormLength(fFormLength), mfFormWidth(fFormWidth), - mfFormOrientation(fFormOrientation), + mfFormQt::Orientation(fFormQt::Orientation), mfMarginLeft(fLeftMargin), mfMarginRight(fRightMargin), mfMarginTop(fTopMargin), diff --git a/filters/kword/wordperfect/import/PageSpan.hxx b/filters/kword/wordperfect/import/PageSpan.hxx index f068b3b2..61ac0193 100644 --- a/filters/kword/wordperfect/import/PageSpan.hxx +++ b/filters/kword/wordperfect/import/PageSpan.hxx @@ -44,7 +44,7 @@ public: #if 0 float getFormLength() { return mfFormLength; } float getFormWidth() { return mfFormWidth; } - WPXFormOrientation getFormOrientation() { return mfFormOrientation; } + WPXFormQt::Orientation getFormQt::Orientation() { return mfFormQt::Orientation; } #endif float getMarginLeft() const; float getMarginRight() const; diff --git a/filters/kword/wordperfect/import/TextRunStyle.cxx b/filters/kword/wordperfect/import/TextRunStyle.cxx index 702dddb5..2860df9a 100644 --- a/filters/kword/wordperfect/import/TextRunStyle.cxx +++ b/filters/kword/wordperfect/import/TextRunStyle.cxx @@ -58,7 +58,7 @@ void ParagraphStyle::write(DocumentHandler &xHandler) const WPXPropertyList propList; propList.insert("style:name", msName.cstr()); propList.insert("style:family", "paragraph"); - propList.insert("style:parent-style-name", (*mpPropList)["style:parent-style-name"]->getStr()); + propList.insert("style:tqparent-style-name", (*mpPropList)["style:tqparent-style-name"]->getStr()); if ((*mpPropList)["style:master-page-name"]) propList.insert("style:master-page-name", (*mpPropList)["style:master-page-name"]->getStr()); xHandler.startElement("style:style", propList); diff --git a/filters/kword/wordperfect/import/WordPerfectCollector.cxx b/filters/kword/wordperfect/import/WordPerfectCollector.cxx index 7c630feb..ad732702 100644 --- a/filters/kword/wordperfect/import/WordPerfectCollector.cxx +++ b/filters/kword/wordperfect/import/WordPerfectCollector.cxx @@ -172,7 +172,7 @@ void WordPerfectCollector::_writeDefaultStyles(DocumentHandler &xHandler) TagOpenElement textBodyStyleOpenElement("style:style"); textBodyStyleOpenElement.addAttribute("style:name", "Text Body"); textBodyStyleOpenElement.addAttribute("style:family", "paragraph"); - textBodyStyleOpenElement.addAttribute("style:parent-style-name", "Standard"); + textBodyStyleOpenElement.addAttribute("style:tqparent-style-name", "Standard"); textBodyStyleOpenElement.addAttribute("style:class", "text"); textBodyStyleOpenElement.write(xHandler); TagCloseElement textBodyStyleCloseElement("style:style"); @@ -181,7 +181,7 @@ void WordPerfectCollector::_writeDefaultStyles(DocumentHandler &xHandler) TagOpenElement tableContentsStyleOpenElement("style:style"); tableContentsStyleOpenElement.addAttribute("style:name", "Table Contents"); tableContentsStyleOpenElement.addAttribute("style:family", "paragraph"); - tableContentsStyleOpenElement.addAttribute("style:parent-style-name", "Text Body"); + tableContentsStyleOpenElement.addAttribute("style:tqparent-style-name", "Text Body"); tableContentsStyleOpenElement.addAttribute("style:class", "extra"); tableContentsStyleOpenElement.write(xHandler); TagCloseElement tableContentsStyleCloseElement("style:style"); @@ -190,7 +190,7 @@ void WordPerfectCollector::_writeDefaultStyles(DocumentHandler &xHandler) TagOpenElement tableHeadingStyleOpenElement("style:style"); tableHeadingStyleOpenElement.addAttribute("style:name", "Table Heading"); tableHeadingStyleOpenElement.addAttribute("style:family", "paragraph"); - tableHeadingStyleOpenElement.addAttribute("style:parent-style-name", "Table Contents"); + tableHeadingStyleOpenElement.addAttribute("style:tqparent-style-name", "Table Contents"); tableHeadingStyleOpenElement.addAttribute("style:class", "extra"); tableHeadingStyleOpenElement.write(xHandler); TagCloseElement tableHeadingStyleCloseElement("style:style"); @@ -474,10 +474,10 @@ void WordPerfectCollector::openParagraph(const WPXPropertyList &propList, const { // we don't have to go through the fuss of determining if the paragraph style is // unique in this case, because if we are the first document element, then we - // are singular. Neither do we have to determine what our parent style is-- we can't + // are singular. Neither do we have to determine what our tqparent style is-- we can't // be inside a table in this case (the table would be the first document element //in that case) - pPersistPropList->insert("style:parent-style-name", "Standard"); + pPersistPropList->insert("style:tqparent-style-name", "Standard"); WPXString sName; sName.sprintf("FS"); @@ -492,12 +492,12 @@ void WordPerfectCollector::openParagraph(const WPXPropertyList &propList, const if (mWriterDocumentState.mbTableCellOpened) { if (mWriterDocumentState.mbHeaderRow) - pPersistPropList->insert("style:parent-style-name", "Table Heading"); + pPersistPropList->insert("style:tqparent-style-name", "Table Heading"); else - pPersistPropList->insert("style:parent-style-name", "Table Contents"); + pPersistPropList->insert("style:tqparent-style-name", "Table Contents"); } else - pPersistPropList->insert("style:parent-style-name", "Standard"); + pPersistPropList->insert("style:tqparent-style-name", "Standard"); WPXString sKey = getParagraphStyleKey(*pPersistPropList, tabStops); @@ -707,7 +707,7 @@ void WordPerfectCollector::openListElement(const WPXPropertyList &propList, cons WPXPropertyList *pPersistPropList = new WPXPropertyList(propList); pPersistPropList->insert("style:list-style-name", mpCurrentListStyle->getName()); - pPersistPropList->insert("style:parent-style-name", "Standard"); + pPersistPropList->insert("style:tqparent-style-name", "Standard"); WPXString sKey = getParagraphStyleKey(*pPersistPropList, tabStops); diff --git a/filters/kword/wordperfect/import/kwordfilter.cpp b/filters/kword/wordperfect/import/kwordfilter.cpp index 5e91e28c..56e91b33 100644 --- a/filters/kword/wordperfect/import/kwordfilter.cpp +++ b/filters/kword/wordperfect/import/kwordfilter.cpp @@ -21,10 +21,10 @@ #include "kwordfilter.h" #include "parser.h" -#include <qfileinfo.h> -#include <qptrlist.h> -#include <qstring.h> -#include <qregexp.h> +#include <tqfileinfo.h> +#include <tqptrlist.h> +#include <tqstring.h> +#include <tqregexp.h> using namespace WP; @@ -44,10 +44,10 @@ class KWordFormat int red, green, blue; int bgred, bggreen, bgblue; double fontsize; - QString fontface; + TQString fontface; KWordFormat(); - QString asXML(); + TQString asXML(); }; KWordFormat::KWordFormat() @@ -61,9 +61,9 @@ KWordFormat::KWordFormat() fontface = ""; } -QString KWordFormat::asXML() +TQString KWordFormat::asXML() { - QString result; + TQString result; if( bold ) result.append( " <WEIGHT value=\"75\" />\n" ); if( italic ) result.append( " <ITALIC value=\"1\" />\n" ); @@ -77,22 +77,22 @@ QString KWordFormat::asXML() result.append( "<FONT name=\"" + fontface + "\" />\n" ); if( fontsize > 0.0 ) - result.append( " <SIZE value=\"" + QString::number(fontsize) + "\" />\n" ); + result.append( " <SIZE value=\"" + TQString::number(fontsize) + "\" />\n" ); if( color ) - result.append( " <COLOR red=\"" + QString::number(red) + - "\" green=\"" + QString::number(green) + - "\" blue=\"" + QString::number(blue) + "\" />\n" ); + result.append( " <COLOR red=\"" + TQString::number(red) + + "\" green=\"" + TQString::number(green) + + "\" blue=\"" + TQString::number(blue) + "\" />\n" ); if( highlight ) - result.append( " <TEXTBACKGROUNDCOLOR red=\"" + QString::number(bgred) + - "\" green=\"" + QString::number(bggreen) + - "\" blue=\"" + QString::number(bgblue) + "\" />\n" ); + result.append( " <TEXTBACKGROUNDCOLOR red=\"" + TQString::number(bgred) + + "\" green=\"" + TQString::number(bggreen) + + "\" blue=\"" + TQString::number(bgblue) + "\" />\n" ); return result; } -static QString mapAlign( Token::Align align ) +static TQString mapAlign( Token::Align align ) { switch( align ) { @@ -107,9 +107,9 @@ static QString mapAlign( Token::Align align ) // NOTE: KWord value for linespace: 72=one, 144=double, .. // Special case: "0" is normal, "oneandhalf" is 108, "double" is 144. -static QString mapLinespace( double linespace ) +static TQString mapLinespace( double linespace ) { - return QString::number( linespace ); + return TQString::number( linespace ); } KWordFilter::KWordFilter ():Parser () @@ -117,7 +117,7 @@ KWordFilter::KWordFilter ():Parser () } bool -KWordFilter::parse (const QString & filename) +KWordFilter::parse (const TQString & filename) { int frameLeftMargin = 36, frameRightMargin = 36; // quick hack @@ -127,9 +127,9 @@ KWordFilter::parse (const QString & filename) // this will force very last text and formatting to be flushed as well tokens.append( new Token( Token::HardReturn ) ); - QString text; - QString layout; - QString formats; + TQString text; + TQString tqlayout; + TQString formats; int LeftMargin = 0; int TopMargin = 36; int RightMargin = 0; @@ -144,13 +144,13 @@ KWordFilter::parse (const QString & filename) KWordFormat flag; int format_pos; - QString fmt; + TQString fmt; // FIXME replace with doc initial code or default style format_pos = 0; fmt = flag.asXML(); - for (QPtrListIterator < Token > it (tokens); it; ++it) + for (TQPtrListIterator < Token > it (tokens); it; ++it) { unsigned int ucode; int attr; @@ -231,8 +231,8 @@ KWordFilter::parse (const QString & filename) // process previous fmt first len = text.length() - format_pos; - formats.append ( "<FORMAT id=\"1\" pos=\"" + QString::number( format_pos ) + - "\" len=\"" + QString::number( len )+ "\">\n" ); + formats.append ( "<FORMAT id=\"1\" pos=\"" + TQString::number( format_pos ) + + "\" len=\"" + TQString::number( len )+ "\">\n" ); formats.append( fmt ); formats.append ( "</FORMAT>\n" ); @@ -248,45 +248,45 @@ KWordFilter::parse (const QString & filename) // last formatting not flushed // SEE ABOVE len = text.length() - format_pos; - formats.append ( " <FORMAT id=\"1\" pos=\"" + QString::number( format_pos ) + - "\" len=\"" + QString::number( len )+ "\">\n" ); + formats.append ( " <FORMAT id=\"1\" pos=\"" + TQString::number( format_pos ) + + "\" len=\"" + TQString::number( len )+ "\">\n" ); formats.append( " " + fmt ); formats.append ( " </FORMAT>\n" ); - layout = ""; - layout.append( "<LAYOUT>\n" ); - layout.append( " <NAME value=\"Standard\" />\n" ); - layout.append( " <FLOW align=\"" + mapAlign( align ) + "\" />\n" ); - layout.append( " <LINESPACING value=\"" + mapLinespace( linespace) + "\" />\n" ); - layout.append( " <LEFTBORDER width=\"0\" style=\"0\" />\n" ); - layout.append( " <RIGHTBORDER width=\"0\" style=\"0\" />\n" ); - layout.append( " <TOPBORDER width=\"0\" style=\"0\" />\n" ); - layout.append( " <BOTTOMBORDER width=\"0\" style=\"0\" />\n" ); + tqlayout = ""; + tqlayout.append( "<LAYOUT>\n" ); + tqlayout.append( " <NAME value=\"Standard\" />\n" ); + tqlayout.append( " <FLOW align=\"" + mapAlign( align ) + "\" />\n" ); + tqlayout.append( " <LINESPACING value=\"" + mapLinespace( linespace) + "\" />\n" ); + tqlayout.append( " <LEFTBORDER width=\"0\" style=\"0\" />\n" ); + tqlayout.append( " <RIGHTBORDER width=\"0\" style=\"0\" />\n" ); + tqlayout.append( " <TOPBORDER width=\"0\" style=\"0\" />\n" ); + tqlayout.append( " <BOTTOMBORDER width=\"0\" style=\"0\" />\n" ); lm = LeftMargin + LeftMarginAdjust - frameLeftMargin; rm = RightMargin + RightMarginAdjust - frameRightMargin; - layout.append( " <INDENTS left=\"" + QString::number( QMAX( 0, lm ) ) + "\"" + - " right=\"" + QString::number( QMAX( 0 , rm ) ) + "\"" + + tqlayout.append( " <INDENTS left=\"" + TQString::number( TQMAX( 0, lm ) ) + "\"" + + " right=\"" + TQString::number( TQMAX( 0 , rm ) ) + "\"" + " first=\"0\" />\n" ); - layout.append( " <OFFSETS />\n" ); - layout.append( " <PAGEBREAKING />\n" ); - layout.append( " <COUNTER />\n" ); - layout.append( " <FORMAT id=\"1\">\n" ); - layout.append( " <WEIGHT value=\"50\" />\n" ); - layout.append( " <ITALIC value=\"0\" />\n" ); - layout.append( " <UNDERLINE value=\"0\" />\n" ); - layout.append( " <STRIKEOUT value=\"0\" />\n" ); - layout.append( " <CHARSET value=\"0\" />\n" ); - layout.append( " <VERTALIGN value=\"0\" />\n" ); - layout.append( " </FORMAT>\n" ); - layout.append( "</LAYOUT>\n" ); + tqlayout.append( " <OFFSETS />\n" ); + tqlayout.append( " <PAGEBREAKING />\n" ); + tqlayout.append( " <COUNTER />\n" ); + tqlayout.append( " <FORMAT id=\"1\">\n" ); + tqlayout.append( " <WEIGHT value=\"50\" />\n" ); + tqlayout.append( " <ITALIC value=\"0\" />\n" ); + tqlayout.append( " <UNDERLINE value=\"0\" />\n" ); + tqlayout.append( " <STRIKEOUT value=\"0\" />\n" ); + tqlayout.append( " <CHARSET value=\"0\" />\n" ); + tqlayout.append( " <VERTALIGN value=\"0\" />\n" ); + tqlayout.append( " </FORMAT>\n" ); + tqlayout.append( "</LAYOUT>\n" ); // encode text for XML-ness - // FIXME could be faster without QRegExp - text.replace( QRegExp("&"), "&" ); - text.replace( QRegExp("<"), "<" ); - text.replace( QRegExp(">"), ">" ); - text.replace( QRegExp("\""), """ ); - text.replace( QRegExp("'"), "'" ); + // FIXME could be faster without TQRegExp + text.tqreplace( TQRegExp("&"), "&" ); + text.tqreplace( TQRegExp("<"), "<" ); + text.tqreplace( TQRegExp(">"), ">" ); + text.tqreplace( TQRegExp("\""), """ ); + text.tqreplace( TQRegExp("'"), "'" ); // construct the <PARAGRAPH> root.append( "<PARAGRAPH>\n" ); @@ -294,7 +294,7 @@ KWordFilter::parse (const QString & filename) root.append( "<FORMATS>\n"); root.append( formats ); root.append( "</FORMATS>\n"); - root.append( layout ); + root.append( tqlayout ); root.append( "</PARAGRAPH>\n" ); // for the next paragraph @@ -346,7 +346,7 @@ KWordFilter::parse (const QString & filename) case Token::ExtChar: ucode = Parser::ExtCharToUnicode (t->charset (), t->charcode ()); if (ucode == 0) ucode = 32; - text.append( QChar (ucode) ); + text.append( TQChar (ucode) ); break; case Token::TabHardFlushRight: @@ -361,7 +361,7 @@ KWordFilter::parse (const QString & filename) } - QString content = root; + TQString content = root; root = "<!DOCTYPE DOC>\n"; root.append( "<DOC mime=\"application/x-kword\" syntaxVersion=\"2\" editor=\"KWord\">\n"); @@ -371,10 +371,10 @@ KWordFilter::parse (const QString & filename) // paper definition root.append( "<PAPER width=\"595\" height=\"841\" format=\"1\" fType=\"0\" orientation=\"0\" hType=\"0\" columns=\"1\">\n" ); - root.append( " <PAPERBORDERS left=\"" + QString::number(frameLeftMargin) + - "\" right=\"" + QString::number(frameRightMargin) + - "\" top=\"" + QString::number(TopMargin) + - "\" bottom=\"" + QString::number(BottomMargin) + "\" />\n" ); + root.append( " <PAPERBORDERS left=\"" + TQString::number(frameLeftMargin) + + "\" right=\"" + TQString::number(frameRightMargin) + + "\" top=\"" + TQString::number(TopMargin) + + "\" bottom=\"" + TQString::number(BottomMargin) + "\" />\n" ); root.append( "</PAPER>\n" ); root.append( "<ATTRIBUTES standardpage=\"1\" hasFooter=\"0\" hasHeader=\"0\" processing=\"0\" />\n" ); @@ -393,7 +393,7 @@ KWordFilter::parse (const QString & filename) // e.g /home/ariya/test/resume.wpd will have 'resume' as the title if( docTitle.isEmpty() ) { - QFileInfo info( filename ); + TQFileInfo info( filename ); docTitle = info.baseName(); } diff --git a/filters/kword/wordperfect/import/kwordfilter.h b/filters/kword/wordperfect/import/kwordfilter.h index d930d917..33e0d717 100644 --- a/filters/kword/wordperfect/import/kwordfilter.h +++ b/filters/kword/wordperfect/import/kwordfilter.h @@ -30,11 +30,11 @@ class KWordFilter: public Parser public: - QString root; - QString documentInfo; + TQString root; + TQString documentInfo; KWordFilter(); - bool parse( const QString& filename ); + bool parse( const TQString& filename ); }; diff --git a/filters/kword/wordperfect/import/parser.cpp b/filters/kword/wordperfect/import/parser.cpp index bbf5404d..7b87e5a6 100644 --- a/filters/kword/wordperfect/import/parser.cpp +++ b/filters/kword/wordperfect/import/parser.cpp @@ -19,11 +19,11 @@ #include "parser.h" -#include <qmemarray.h> -#include <qdatastream.h> -#include <qfile.h> -#include <qptrlist.h> -#include <qstring.h> +#include <tqmemarray.h> +#include <tqdatastream.h> +#include <tqfile.h> +#include <tqptrlist.h> +#include <tqstring.h> using namespace WP; @@ -96,7 +96,7 @@ Parser::Parser () } bool -Parser::parse (const QString & filename) +Parser::parse (const TQString & filename) { // initialize tokens.clear(); @@ -104,17 +104,17 @@ Parser::parse (const QString & filename) docTitle = docAuthor = docAbstract = ""; // open input file and assign the stream - QDataStream stream; - QFile in (filename); + TQDataStream stream; + TQFile in (filename); if (!in.open (IO_ReadOnly)) return FALSE; stream.setDevice (&in); // must be little-endian - stream.setByteOrder (QDataStream::LittleEndian); + stream.setByteOrder (TQDataStream::LittleEndian); // read 16-bytes document header - Q_UINT8 header[16]; + TQ_UINT8 header[16]; for (int k = 0; k < 16; k++) stream >> header[k]; @@ -163,11 +163,11 @@ Parser::parse (const QString & filename) } void -Parser::parsePacketWP5( const QString & filename ) +Parser::parsePacketWP5( const TQString & filename ) { // open input file and assign the stream - QDataStream stream; - QFile in (filename); + TQDataStream stream; + TQFile in (filename); if (!in.open (IO_ReadOnly)) return; stream.setDevice (&in); @@ -175,11 +175,11 @@ Parser::parsePacketWP5( const QString & filename ) unsigned filesize = stream.device()->size(); // must be little-endian - stream.setByteOrder (QDataStream::LittleEndian); + stream.setByteOrder (TQDataStream::LittleEndian); for( unsigned next_block=16; next_block>0; ) { - QMemArray<Q_UINT8> buf( 10 ); + TQMemArray<TQ_UINT8> buf( 10 ); stream.device()->at( next_block ); for( int c=0; c<10; c++ ) stream >> buf.at( c ); @@ -194,8 +194,8 @@ Parser::parsePacketWP5( const QString & filename ) for( unsigned v=0; v<count; v++ ) { - Q_UINT16 packet_type; - Q_UINT32 packet_size, packet_pos; + TQ_UINT16 packet_type; + TQ_UINT32 packet_size, packet_pos; stream >> packet_type; stream >> packet_size; stream >> packet_pos; @@ -215,7 +215,7 @@ Parser::parsePacketWP5( const QString & filename ) } // load all packets - for( QPtrListIterator<Packet> it(packets); it; ++it ) + for( TQPtrListIterator<Packet> it(packets); it; ++it ) { Packet* p = it.current(); stream.device()->at( p->pos ); @@ -227,7 +227,7 @@ Parser::parsePacketWP5( const QString & filename ) in.close(); // process all known packets - for( QPtrListIterator<Packet> i(packets); i; ++i ) + for( TQPtrListIterator<Packet> i(packets); i; ++i ) { Packet* p = i.current(); if( p->data.size()==0 ) continue; @@ -236,7 +236,7 @@ Parser::parsePacketWP5( const QString & filename ) if( p->type== 1 ) { unsigned c; - QString desc, desc_type, subject, author, typist, abstract; + TQString desc, desc_type, subject, author, typist, abstract; // handle difference between WP 5.0 and WP 5.1 unsigned limit = (p->data[p->data.size()-1]==0xff) ? 94 : 57; @@ -265,11 +265,11 @@ Parser::parsePacketWP5( const QString & filename ) } void -Parser::parsePacketWP6( const QString & filename ) +Parser::parsePacketWP6( const TQString & filename ) { // open input file and assign the stream - QDataStream stream; - QFile in (filename); + TQDataStream stream; + TQFile in (filename); if (!in.open (IO_ReadOnly)) return; stream.setDevice (&in); @@ -277,9 +277,9 @@ Parser::parsePacketWP6( const QString & filename ) unsigned filesize = stream.device()->size(); // must be little-endian - stream.setByteOrder (QDataStream::LittleEndian); + stream.setByteOrder (TQDataStream::LittleEndian); - Q_UINT16 flag, count; + TQ_UINT16 flag, count; stream.device()->at( 0x200 ); stream >> flag; // FIXME should be checked == 2 ? @@ -288,9 +288,9 @@ Parser::parsePacketWP6( const QString & filename ) stream.device()->at( 0x20e ); for( unsigned c=0; c<count; c++ ) { - Q_UINT8 packet_type, packet_flag; - Q_UINT16 count, hidcount; - Q_UINT32 packet_size, packet_pos; + TQ_UINT8 packet_type, packet_flag; + TQ_UINT16 count, hidcount; + TQ_UINT32 packet_size, packet_pos; stream >> packet_flag; stream >> packet_type; @@ -309,7 +309,7 @@ Parser::parsePacketWP6( const QString & filename ) } // load all packets - for( QPtrListIterator<Packet> it(packets); it; ++it ) + for( TQPtrListIterator<Packet> it(packets); it; ++it ) { Packet* p = it.current(); stream.device()->at( p->pos ); @@ -321,7 +321,7 @@ Parser::parsePacketWP6( const QString & filename ) in.close(); // process all known packets - for( QPtrListIterator<Packet> i(packets); i; ++i ) + for( TQPtrListIterator<Packet> i(packets); i; ++i ) { Packet* p = i.current(); if( p->data.size()==0 ) continue; @@ -333,7 +333,7 @@ Parser::parsePacketWP6( const QString & filename ) { unsigned size = p->data[j] + (p->data[j+1]<<8); unsigned tag = p->data[j+2] + (p->data[j+3]<<8); - QString str; + TQString str; for( unsigned k=0; k<size-8; k++) if(!((j+8+k)&1)) if( p->data[j+8+k]==0 ) break; @@ -354,11 +354,11 @@ Parser::parsePacketWP6( const QString & filename ) } void -Parser::parseDocWP5( const QString & filename, int start ) +Parser::parseDocWP5( const TQString & filename, int start ) { // open input file and assign the stream - QDataStream stream; - QFile in (filename); + TQDataStream stream; + TQFile in (filename); if (!in.open (IO_ReadOnly)) return; stream.setDevice (&in); @@ -368,18 +368,18 @@ Parser::parseDocWP5( const QString & filename, int start ) if ( start >= stream.device ()->size () ) return; // must be little-endian - stream.setByteOrder (QDataStream::LittleEndian); + stream.setByteOrder (TQDataStream::LittleEndian); // seek to start of document area stream.device ()->at (start); // main loop - QString text; + TQString text; while (!stream.atEnd ()) { // read one byte - Q_UINT8 code; + TQ_UINT8 code; stream >> code; // ASCII printable characters ? @@ -389,13 +389,13 @@ Parser::parseDocWP5( const QString & filename, int start ) { // either fixed-length or variable-length function - QMemArray < Q_UINT8 > data; - QMemArray < Q_UINT16 > pid; - Q_UINT8 subfunction = 0; + TQMemArray < TQ_UINT8 > data; + TQMemArray < TQ_UINT16 > pid; + TQ_UINT8 subfunction = 0; if ((code >= 0xC0) && (code <= 0xCF)) { - Q_UINT8 dummy; + TQ_UINT8 dummy; unsigned lentab[] = { 2, 7, 9, 1, 1, 3, 4, 5, 2, 3, 4, 4, 6, 8, 8, 10 }; unsigned length = lentab[code & 0x0F]; @@ -406,7 +406,7 @@ Parser::parseDocWP5( const QString & filename, int start ) } else if ((code >= 0xD0) && (code <= 0xFF)) { - Q_UINT16 length; + TQ_UINT16 length; stream >> subfunction; stream >> length; @@ -563,11 +563,11 @@ Parser::parseDocWP5( const QString & filename, int start ) } void -Parser::parseDocWP6 (const QString & filename, int start) +Parser::parseDocWP6 (const TQString & filename, int start) { // open input file and assign the stream - QDataStream stream; - QFile in (filename); + TQDataStream stream; + TQFile in (filename); if (!in.open (IO_ReadOnly)) return; stream.setDevice (&in); @@ -577,18 +577,18 @@ Parser::parseDocWP6 (const QString & filename, int start) if ( start >= stream.device ()->size () ) return; // must be little-endian - stream.setByteOrder (QDataStream::LittleEndian); + stream.setByteOrder (TQDataStream::LittleEndian); // seek to start of document area stream.device ()->at (start); // main loop - QString text; + TQString text; while (!stream.atEnd ()) { // read one byte - Q_UINT8 code; + TQ_UINT8 code; stream >> code; // ASCII printable characters ? @@ -617,13 +617,13 @@ Parser::parseDocWP6 (const QString & filename, int start) { // either fixed-length or variable-length function - QMemArray < Q_UINT8 > data; - QMemArray < Q_UINT16 > pid; - Q_UINT8 subfunction = 0; + TQMemArray < TQ_UINT8 > data; + TQMemArray < TQ_UINT16 > pid; + TQ_UINT8 subfunction = 0; if ((code >= 0xF0) && (code <= 0xFF)) { - Q_UINT8 dummy; + TQ_UINT8 dummy; unsigned lentab[] = { 2, 3, 1, 1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 6, 6, 0 }; unsigned length = lentab[code & 0x0F]; @@ -634,8 +634,8 @@ Parser::parseDocWP6 (const QString & filename, int start) } else if ((code >= 0xD0) && (code <= 0xFF)) { - Q_UINT16 length; - Q_UINT8 flag = 0, numpid = 0; + TQ_UINT16 length; + TQ_UINT8 flag = 0, numpid = 0; stream >> subfunction; stream >> length; stream >> flag; @@ -650,15 +650,15 @@ Parser::parseDocWP6 (const QString & filename, int start) length = length - 1 - numpid * 2; } - Q_UINT16 nondel; + TQ_UINT16 nondel; stream >> nondel; data.resize (length); for (int c = 0; length && !stream.atEnd (); length--, c++) stream >> data[c]; - Q_UINT16 dummy_length; - Q_UINT8 dummy_code; + TQ_UINT16 dummy_length; + TQ_UINT8 dummy_code; stream >> dummy_length; // FIXME should be checked == length ? stream >> dummy_code; // FIXME should be checked == code ? @@ -825,7 +825,7 @@ Parser::parseDocWP6 (const QString & filename, int start) if( p->type==85 ) { // read the typeface (stored as WP word-string) - QString typeface; + TQString typeface; unsigned strlen = p->data[22]; for( unsigned i=24; strlen && (i<p->data.size()); i+=2, strlen-=2 ) if( p->data[i]) typeface.append( p->data[i] ); @@ -833,7 +833,7 @@ Parser::parseDocWP6 (const QString & filename, int start) typeface = typeface.stripWhiteSpace(); // hack: get rid of "Regular" as font name suffix - QString suffix = "Regular"; + TQString suffix = "Regular"; if( typeface.right( suffix.length() ) == suffix ) typeface = typeface.left( typeface.length() - suffix.length() ).stripWhiteSpace(); @@ -959,9 +959,9 @@ mapToTabType (int t) } void -Parser::handleTab (QMemArray < Q_UINT8 > data) +Parser::handleTab (TQMemArray < TQ_UINT8 > data) { - QPtrList < Token::Tab > tabs; + TQPtrList < Token::Tab > tabs; bool relative = data[0]; int adjust = data[1] + (data[2] << 8); int num = data[3]; @@ -1002,7 +1002,7 @@ Parser::handleTab (QMemArray < Q_UINT8 > data) } -// the following tables maps WP charset/charcode to unicode character +// the following tables maps WP charset/charcode to tqunicode character // WP multinational characters (charset 1) static unsigned multinational_map[] = { diff --git a/filters/kword/wordperfect/import/parser.h b/filters/kword/wordperfect/import/parser.h index 832a02f8..2a69ad27 100644 --- a/filters/kword/wordperfect/import/parser.h +++ b/filters/kword/wordperfect/import/parser.h @@ -21,9 +21,9 @@ #ifndef __WP_PARSER_H #define __WP_PARSER_H -#include <qptrlist.h> -#include <qmemarray.h> -#include <qstring.h> +#include <tqptrlist.h> +#include <tqmemarray.h> +#include <tqstring.h> namespace WP { @@ -64,7 +64,7 @@ namespace WP { Left, Right, Center, Full, All }; enum TabType - { LeftTab, CenterTab, RightTab, DecimalTab, VerticalTab }; + { LeftTab, CenterTab, RightTab, DecimalTab,Qt::VerticalTab }; class Tab { @@ -82,7 +82,7 @@ namespace WP Token (Type type) { m_type = type; } - Token (const QString & text) { m_type = Text; m_text = text; } + Token (const TQString & text) { m_type = Text; m_text = text; } Token (Type type, Attr attr) { m_type = type; m_attr = attr; } @@ -105,9 +105,9 @@ namespace WP m_blue = blue; } - Token (Type type, QString fontface){ m_type = FontFace; m_fontface = fontface; } + Token (Type type, TQString fontface){ m_type = FontFace; m_fontface = fontface; } - Token (const QPtrList < Tab > &tabs) + Token (const TQPtrList < Tab > &tabs) { m_type = TabSet; m_tabs = tabs; @@ -117,7 +117,7 @@ namespace WP int value (){ return m_value; } - QString text (){ return m_text; } + TQString text (){ return m_text; } Attr attr (){ return m_attr; } @@ -127,23 +127,23 @@ namespace WP int green (){ return m_green; } int blue (){ return m_blue; } - QString fontface (){ return m_fontface; } + TQString fontface (){ return m_fontface; } int charset (){ return m_charset; } int charcode (){ return m_charcode; } - QPtrList < Tab > tabs (){ return m_tabs; } + TQPtrList < Tab > tabs (){ return m_tabs; } private: Type m_type; int m_value; - QString m_text; + TQString m_text; Attr m_attr; Align m_align; int m_red, m_green, m_blue; - QString m_fontface; + TQString m_fontface; int m_charset, m_charcode; - QPtrList < Tab > m_tabs; + TQPtrList < Tab > m_tabs; @@ -153,7 +153,7 @@ namespace WP { public: unsigned type, size, pos; - QMemArray<Q_UINT8> data; + TQMemArray<TQ_UINT8> data; }; /** @@ -173,15 +173,15 @@ namespace WP * @returns TRUE if parsing was successful, otherwise FALSE. * */ - bool parse (const QString & filename); + bool parse (const TQString & filename); // high byte is major version, 0=WP 5.x, 2=WP 6/7/8 int version; - QString docTitle, docAuthor, docAbstract; + TQString docTitle, docAuthor, docAbstract; - QPtrList<Token> tokens; - QPtrList<Packet> packets; + TQPtrList<Token> tokens; + TQPtrList<Packet> packets; /** * Maps WordPerfect extended character to its Unicode equivalent. Supported character @@ -196,13 +196,13 @@ namespace WP private: - void handleTab ( QMemArray <Q_UINT8> data ); + void handleTab ( TQMemArray <TQ_UINT8> data ); - void parsePacketWP5( const QString & filename ); - void parseDocWP5( const QString & filename, int start ); + void parsePacketWP5( const TQString & filename ); + void parseDocWP5( const TQString & filename, int start ); - void parsePacketWP6( const QString & filename ); - void parseDocWP6( const QString & filename, int start ); + void parsePacketWP6( const TQString & filename ); + void parseDocWP6( const TQString & filename, int start ); }; diff --git a/filters/kword/wordperfect/import/wpimport.cc b/filters/kword/wordperfect/import/wpimport.cc index 882bd890..5554f6e0 100644 --- a/filters/kword/wordperfect/import/wpimport.cc +++ b/filters/kword/wordperfect/import/wpimport.cc @@ -214,11 +214,11 @@ void KWordHandler::endDocument() -WPImport::WPImport( KoFilter *, const char *, const QStringList& ): KoFilter() +WPImport::WPImport( KoFilter *, const char *, const TQStringList& ): KoFilter() { } -KoFilter::ConversionStatus WPImport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus WPImport::convert( const TQCString& from, const TQCString& to ) { // check for proper conversion if(to!= "application/vnd.sun.xml.writer" || from != "application/wordperfect" ) @@ -260,7 +260,7 @@ KoFilter::ConversionStatus WPImport::convert( const QCString& from, const QCStri KoStoreDevice* manifest = m_chain->storageFile( "META-INF/manifest.xml", KoStore::Write ); if ( manifest ) { - QCString manifeststring = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\ + TQCString manifeststring = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\ <!DOCTYPE manifest:manifest PUBLIC \"-//OpenOffice.org//DTD Manifest 1.0//EN\" \"Manifest.dtd\">\n\ <manifest:manifest xmlns:manifest=\"http://openoffice.org/2001/manifest\">\n\ <manifest:file-entry manifest:media-type=\"application/vnd.sun.xml.writer\" manifest:full-path=\"/\"/>\n\ @@ -273,7 +273,7 @@ KoFilter::ConversionStatus WPImport::convert( const QCString& from, const QCStri KoStoreDevice* styles = m_chain->storageFile( "styles.xml", KoStore::Write ); if ( styles ) { - QCString stylesstring = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\ + TQCString stylesstring = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\ <!DOCTYPE office:document-styles PUBLIC \"-//OpenOffice.org//DTD OfficeDocument 1.0//EN\" \"office.dtd\">\ <office:document-styles xmlns:office=\"http://openoffice.org/2000/office\" xmlns:style=\"http://openoffice.org/2000/style\"\ xmlns:text=\"http://openoffice.org/2000/text\" xmlns:table=\"http://openoffice.org/2000/table\"\ @@ -291,14 +291,14 @@ KoFilter::ConversionStatus WPImport::convert( const QCString& from, const QCStri <style:default-style style:family=\"table-row\"/>\ <style:default-style style:family=\"table-column\"/>\ <style:style style:name=\"Standard\" style:family=\"paragraph\" style:class=\"text\"/>\ -<style:style style:name=\"Text body\" style:family=\"paragraph\" style:parent-style-name=\"Standard\" style:class=\"text\"/>\ -<style:style style:name=\"List\" style:family=\"paragraph\" style:parent-style-name=\"Text body\" style:class=\"list\"/>\ -<style:style style:name=\"Header\" style:family=\"paragraph\" style:parent-style-name=\"Standard\" style:class=\"extra\"/>\ -<style:style style:name=\"Footer\" style:family=\"paragraph\" style:parent-style-name=\"Standard\" style:class=\"extra\"/>\ -<style:style style:name=\"Caption\" style:family=\"paragraph\" style:parent-style-name=\"Standard\" style:class=\"extra\"/>\ -<style:style style:name=\"Footnote\" style:family=\"paragraph\" style:parent-style-name=\"Standard\" style:class=\"extra\"/>\ -<style:style style:name=\"Endnote\" style:family=\"paragraph\" style:parent-style-name=\"Standard\" style:class=\"extra\"/>\ -<style:style style:name=\"Index\" style:family=\"paragraph\" style:parent-style-name=\"Standard\" style:class=\"index\"/>\ +<style:style style:name=\"Text body\" style:family=\"paragraph\" style:tqparent-style-name=\"Standard\" style:class=\"text\"/>\ +<style:style style:name=\"List\" style:family=\"paragraph\" style:tqparent-style-name=\"Text body\" style:class=\"list\"/>\ +<style:style style:name=\"Header\" style:family=\"paragraph\" style:tqparent-style-name=\"Standard\" style:class=\"extra\"/>\ +<style:style style:name=\"Footer\" style:family=\"paragraph\" style:tqparent-style-name=\"Standard\" style:class=\"extra\"/>\ +<style:style style:name=\"Caption\" style:family=\"paragraph\" style:tqparent-style-name=\"Standard\" style:class=\"extra\"/>\ +<style:style style:name=\"Footnote\" style:family=\"paragraph\" style:tqparent-style-name=\"Standard\" style:class=\"extra\"/>\ +<style:style style:name=\"Endnote\" style:family=\"paragraph\" style:tqparent-style-name=\"Standard\" style:class=\"extra\"/>\ +<style:style style:name=\"Index\" style:family=\"paragraph\" style:tqparent-style-name=\"Standard\" style:class=\"index\"/>\ <style:style style:name=\"Footnote Symbol\" style:family=\"text\">\ <style:properties style:text-position=\"super 58%\"/>\ </style:style>\ diff --git a/filters/kword/wordperfect/import/wpimport.h b/filters/kword/wordperfect/import/wpimport.h index 0656fb35..862b7683 100644 --- a/filters/kword/wordperfect/import/wpimport.h +++ b/filters/kword/wordperfect/import/wpimport.h @@ -20,13 +20,13 @@ #ifndef __WPIMPORT_H #define __WPIMPORT_H -#include <qstring.h> -#include <qdatastream.h> -#include <qobject.h> -#include <qptrlist.h> -#include <qcstring.h> -#include <qmemarray.h> -#include <qdom.h> +#include <tqstring.h> +#include <tqdatastream.h> +#include <tqobject.h> +#include <tqptrlist.h> +#include <tqcstring.h> +#include <tqmemarray.h> +#include <tqdom.h> #include <KoFilter.h> #include <KoStore.h> @@ -34,20 +34,21 @@ class WPImport : public KoFilter { Q_OBJECT + TQ_OBJECT protected: - QString m_output; + TQString m_output; public: - WPImport(KoFilter *parent, const char *name, const QStringList&); + WPImport(KoFilter *tqparent, const char *name, const TQStringList&); WPImport(); virtual ~WPImport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; #endif // __WPIMPORT_H diff --git a/filters/kword/wordperfect/status_old.html b/filters/kword/wordperfect/status_old.html index 7d103e9d..1db3dc09 100644 --- a/filters/kword/wordperfect/status_old.html +++ b/filters/kword/wordperfect/status_old.html @@ -55,7 +55,7 @@ <li>font information: size, typeface, color</li> <li>WP extended character converted to Unicode</li> <li>character formatting: bold, italics, underline, double underline, strikeout, superscript, subscript</li> - <li>paragraph layout: linespacing, justification</li> + <li>paragraph tqlayout: linespacing, justification</li> <li>page settings: margins</li> <li>document summary: title, author, abstract</li> </ul> @@ -86,7 +86,7 @@ <dl> <dt>29 Aug 2001 <dd>first implementation, only for WP 5.x, can import - all text along with formatting, using QDom + all text along with formatting, using TQDom </dl> </td> </tr> diff --git a/filters/libdialogfilter/exportsizedia.cpp b/filters/libdialogfilter/exportsizedia.cpp index adcd36c6..adce4a56 100644 --- a/filters/libdialogfilter/exportsizedia.cpp +++ b/filters/libdialogfilter/exportsizedia.cpp @@ -17,15 +17,15 @@ * Boston, MA 02110-1301, USA. */ -#include <qcheckbox.h> -#include <qimage.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlineedit.h> -#include <qpaintdevice.h> -#include <qrect.h> -#include <qvbuttongroup.h> -#include <qwidget.h> +#include <tqcheckbox.h> +#include <tqimage.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqpaintdevice.h> +#include <tqrect.h> +#include <tqvbuttongroup.h> +#include <tqwidget.h> #include <kapplication.h> #include <kdebug.h> @@ -37,8 +37,8 @@ ExportSizeDia::ExportSizeDia( int width, int height, - QWidget *parent, const char *name ) - : KDialogBase( parent, name, true, + TQWidget *tqparent, const char *name ) + : KDialogBase( tqparent, name, true, i18n("Export Filter Parameters" ), Ok|Cancel ) { kapp->restoreOverrideCursor(); @@ -53,8 +53,8 @@ ExportSizeDia::ExportSizeDia( int width, int height, m_percHeightEdit->setValue( 100 ); connectAll(); - connect( m_proportional, SIGNAL( clicked() ), - this, SLOT( proportionalClicked() ) ); + connect( m_proportional, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( proportionalClicked() ) ); } @@ -66,27 +66,27 @@ ExportSizeDia::~ExportSizeDia() void ExportSizeDia::setupGUI() { //resize( size() ); - QWidget *page = new QWidget( this ); + TQWidget *page = new TQWidget( this ); setMainWidget(page); #if 0 - QBoxLayout* mainLayout = new QVBoxLayout( page, + TQBoxLayout* mainLayout = new TQVBoxLayout( page, KDialog::marginHint(), KDialog::spacingHint() ); #else - QGridLayout *mainLayout = new QGridLayout( page, 5, 2, + TQGridLayout *mainLayout = new TQGridLayout( page, 5, 2, KDialog::marginHint(), KDialog::spacingHint() ); #endif - m_proportional = new QCheckBox( page, "proportional" ); + m_proportional = new TQCheckBox( page, "proportional" ); m_proportional->setText( i18n( "Keep ratio" ) ); m_proportional->setChecked( true ); mainLayout->addWidget( m_proportional, 0, 0 ); - QLabel* width = new QLabel( page, "width" ); + TQLabel* width = new TQLabel( page, "width" ); width->setText( i18n( "Width:" ) ); m_widthEdit = new KIntNumInput( page, "widthEdit" ); - QLabel* height = new QLabel( page, "height" ); + TQLabel* height = new TQLabel( page, "height" ); height->setText( i18n( "Height:" ) ); m_heightEdit = new KIntNumInput( page, "heightEdit" ); @@ -95,10 +95,10 @@ void ExportSizeDia::setupGUI() mainLayout->addWidget( height, 2, 0 ); mainLayout->addWidget( m_heightEdit, 2, 1 ); - QLabel* percentWidth = new QLabel( page, "PercentWidth" ); + TQLabel* percentWidth = new TQLabel( page, "PercentWidth" ); percentWidth->setText( i18n( "Width (%):" ) ); m_percWidthEdit = new KDoubleNumInput( page, "percWidthEdit" ); - QLabel* percentHeight = new QLabel( page, "PercentHeight" ); + TQLabel* percentHeight = new TQLabel( page, "PercentHeight" ); percentHeight->setText( i18n( "Height (%):" ) ); m_percHeightEdit = new KDoubleNumInput( page, "percHeightEdit" ); @@ -107,7 +107,7 @@ void ExportSizeDia::setupGUI() mainLayout->addWidget( percentHeight, 4, 0 ); mainLayout->addWidget( m_percWidthEdit, 4, 1 ); - /* Display the main layout */ + /* Display the main tqlayout */ //mainLayout->addStretch( 5 ); mainLayout->activate(); } @@ -135,8 +135,8 @@ int ExportSizeDia::height() const void ExportSizeDia::widthChanged( int width ) { disconnectAll(); - width = QMIN( width, m_realWidth * 10 ); - width = QMAX( width, m_realWidth / 10 ); + width = TQMIN( width, m_realWidth * 10 ); + width = TQMAX( width, m_realWidth / 10 ); double percent = (100.0 * static_cast<double>( width ) / static_cast<double>( m_realWidth )); m_percWidthEdit->setValue( percent ); @@ -152,8 +152,8 @@ void ExportSizeDia::widthChanged( int width ) void ExportSizeDia::heightChanged( int height ) { disconnectAll(); - height = QMIN( height, m_realHeight * 10 ); - height = QMAX( height, m_realHeight / 10 ); + height = TQMIN( height, m_realHeight * 10 ); + height = TQMAX( height, m_realHeight / 10 ); double percent = (100.0 * static_cast<double>( height ) / static_cast<double>( m_realHeight )); m_percHeightEdit->setValue( percent ); @@ -169,8 +169,8 @@ void ExportSizeDia::heightChanged( int height ) void ExportSizeDia::percentWidthChanged( double percent ) { disconnectAll(); - percent = QMIN( percent, 1000 ); - percent = QMAX( percent, 10 ); + percent = TQMIN( percent, 1000 ); + percent = TQMAX( percent, 10 ); int width = static_cast<int>( m_realWidth * percent / 100. ); m_widthEdit->setValue( width ); if ( m_proportional->isChecked() ) { @@ -185,8 +185,8 @@ void ExportSizeDia::percentWidthChanged( double percent ) void ExportSizeDia::percentHeightChanged( double percent ) { disconnectAll(); - percent = QMIN( percent, 1000 ); - percent = QMAX( percent, 10 ); + percent = TQMIN( percent, 1000 ); + percent = TQMAX( percent, 10 ); if ( m_proportional->isChecked() ) { int width = static_cast<int>( m_realWidth * percent / 100. ); m_widthEdit->setValue( width ); @@ -203,8 +203,8 @@ void ExportSizeDia::proportionalClicked() if ( m_proportional->isChecked() ) { disconnectAll(); int width = m_widthEdit->value( ); - width = QMIN( width, m_realWidth * 10 ); - width = QMAX( width, m_realWidth / 10 ); + width = TQMIN( width, m_realWidth * 10 ); + width = TQMAX( width, m_realWidth / 10 ); double percent = (100.0 * static_cast<double>( width ) / static_cast<double>( m_realWidth )); m_percHeightEdit->setValue( percent ); @@ -221,27 +221,27 @@ void ExportSizeDia::proportionalClicked() void ExportSizeDia::connectAll() { - connect( m_widthEdit, SIGNAL( valueChanged(int) ), - this, SLOT( widthChanged( int ) ) ); - connect( m_heightEdit, SIGNAL( valueChanged(int) ), - this, SLOT( heightChanged( int ) ) ); - connect( m_percWidthEdit, SIGNAL( valueChanged(double) ), - this, SLOT( percentWidthChanged( double ) ) ); - connect( m_percHeightEdit, SIGNAL( valueChanged(double) ), - this, SLOT( percentHeightChanged(double ) ) ); + connect( m_widthEdit, TQT_SIGNAL( valueChanged(int) ), + this, TQT_SLOT( widthChanged( int ) ) ); + connect( m_heightEdit, TQT_SIGNAL( valueChanged(int) ), + this, TQT_SLOT( heightChanged( int ) ) ); + connect( m_percWidthEdit, TQT_SIGNAL( valueChanged(double) ), + this, TQT_SLOT( percentWidthChanged( double ) ) ); + connect( m_percHeightEdit, TQT_SIGNAL( valueChanged(double) ), + this, TQT_SLOT( percentHeightChanged(double ) ) ); } void ExportSizeDia::disconnectAll() { - disconnect( m_widthEdit, SIGNAL( valueChanged(int) ), - this, SLOT( widthChanged( int ) ) ); - disconnect( m_heightEdit, SIGNAL( valueChanged(int) ), - this, SLOT( heightChanged( int ) ) ); - disconnect( m_percWidthEdit, SIGNAL( valueChanged(double) ), - this, SLOT( percentWidthChanged( double ) ) ); - disconnect( m_percHeightEdit, SIGNAL( valueChanged(double) ), - this, SLOT( percentHeightChanged(double ) ) ); + disconnect( m_widthEdit, TQT_SIGNAL( valueChanged(int) ), + this, TQT_SLOT( widthChanged( int ) ) ); + disconnect( m_heightEdit, TQT_SIGNAL( valueChanged(int) ), + this, TQT_SLOT( heightChanged( int ) ) ); + disconnect( m_percWidthEdit, TQT_SIGNAL( valueChanged(double) ), + this, TQT_SLOT( percentWidthChanged( double ) ) ); + disconnect( m_percHeightEdit, TQT_SIGNAL( valueChanged(double) ), + this, TQT_SLOT( percentHeightChanged(double ) ) ); } @@ -250,7 +250,7 @@ void ExportSizeDia::slotOk() { hide(); //doc->setZoomAndResolution( 100, 600, 600 ); - //doc->setZoomAndResolution( 1000, QPaintDevice::x11AppDpiX(), QPaintDevice::x11AppDpiY() ); + //doc->setZoomAndResolution( 1000, TQPaintDevice::x11AppDpiX(), TQPaintDevice::x11AppDpiY() ); //doc->newZoomAndResolution( false, false ); int width = widthEdit->value(); int height = heightEdit->value(); @@ -259,7 +259,7 @@ void ExportSizeDia::slotOk() // << endl; // width = realWidth; // height = realHeight; - QImage image = formula->drawImage( width, height ); + TQImage image = formula->drawImage( width, height ); if ( !image.save( _fileOut, "PNG" ) ) { KMessageBox::error( 0, i18n( "Failed to write file." ), i18n( "PNG Export Error" ) ); } diff --git a/filters/libdialogfilter/exportsizedia.h b/filters/libdialogfilter/exportsizedia.h index f3cc8ad4..2eba6ccb 100644 --- a/filters/libdialogfilter/exportsizedia.h +++ b/filters/libdialogfilter/exportsizedia.h @@ -21,8 +21,8 @@ #define EXPORTSIZEDIA_H -class QCheckBox; -class QString; +class TQCheckBox; +class TQString; class KIntNumInput; class KDoubleNumInput; @@ -33,10 +33,11 @@ class KDoubleNumInput; class ExportSizeDia : public KDialogBase { Q_OBJECT + TQ_OBJECT public: ExportSizeDia( int width, int height, - QWidget *parent=0L, const char *name=0L ); + TQWidget *tqparent=0L, const char *name=0L ); ~ExportSizeDia(); int width() const; @@ -65,7 +66,7 @@ private: int m_realWidth; int m_realHeight; - QCheckBox *m_proportional; + TQCheckBox *m_proportional; KIntNumInput *m_widthEdit; KIntNumInput *m_heightEdit; KDoubleNumInput *m_percWidthEdit; diff --git a/filters/liboofilter/liststylestack.cc b/filters/liboofilter/liststylestack.cc index 8befb3e6..b5eff133 100644 --- a/filters/liboofilter/liststylestack.cc +++ b/filters/liboofilter/liststylestack.cc @@ -36,7 +36,7 @@ void ListStyleStack::pop() m_stack.pop(); } -void ListStyleStack::push( const QDomElement& style ) +void ListStyleStack::push( const TQDomElement& style ) { m_stack.push( style ); } @@ -47,14 +47,14 @@ void ListStyleStack::setInitialLevel( int initialLevel ) m_initialLevel = initialLevel; } -QDomElement ListStyleStack::currentListStyle() const +TQDomElement ListStyleStack::currentListStyle() const { Q_ASSERT( !m_stack.isEmpty() ); return m_stack.top(); } -QDomElement ListStyleStack::currentListStyleProperties() const +TQDomElement ListStyleStack::currentListStyleProperties() const { - QDomElement style = currentListStyle(); + TQDomElement style = currentListStyle(); return KoDom::namedItemNS( style, ooNS::style, "properties" ); } diff --git a/filters/liboofilter/liststylestack.h b/filters/liboofilter/liststylestack.h index abe3be0b..fd8ac485 100644 --- a/filters/liboofilter/liststylestack.h +++ b/filters/liboofilter/liststylestack.h @@ -20,8 +20,8 @@ #ifndef LISTSTYLESTACK_H #define LISTSTYLESTACK_H -#include <qdom.h> -#include <qvaluestack.h> +#include <tqdom.h> +#include <tqvaluestack.h> /** * This class implements the list styles currently active at a given point. @@ -43,14 +43,14 @@ public: /** * Pushes the new list-style onto the stack. */ - void push( const QDomElement& style ); + void push( const TQDomElement& style ); /// @return true if we're inside a list (i.e. the stack isn't empty) bool hasListStyle() const { return !m_stack.isEmpty(); } /// @return currently applicable list style, i.e. the one on top of the stack /// Most list-level properties are the attributes of that element. - QDomElement currentListStyle() const; + TQDomElement currentListStyle() const; /** * @return the style:properties for the currently applicable list style. @@ -58,7 +58,7 @@ public: * like text:min-label-width, text:space-before, and style:font-name * are the attributes of that element. */ - QDomElement currentListStyleProperties() const; + TQDomElement currentListStyleProperties() const; /** * Set the initial level of the list, i.e. of item at the bottom of the stack. @@ -75,7 +75,7 @@ public: private: - QValueStack<QDomElement> m_stack; + TQValueStack<TQDomElement> m_stack; int m_initialLevel; }; diff --git a/filters/liboofilter/ooutils.cc b/filters/liboofilter/ooutils.cc index b543f879..0e023618 100644 --- a/filters/liboofilter/ooutils.cc +++ b/filters/liboofilter/ooutils.cc @@ -22,15 +22,15 @@ #include "ooutils.h" #include <KoDocument.h> #include <KoStyleStack.h> -#include <qdom.h> -#include <qcolor.h> -#include <qimage.h> +#include <tqdom.h> +#include <tqcolor.h> +#include <tqimage.h> #include <KoUnit.h> -#include <qregexp.h> +#include <tqregexp.h> #include <kdebug.h> #include <kzip.h> #include <KoDom.h> -#include <qxml.h> +#include <tqxml.h> const char* const ooNS::office="http://openoffice.org/2000/office"; const char* const ooNS::style="http://openoffice.org/2000/style"; @@ -46,28 +46,28 @@ const char* const ooNS::dc="http://purl.org/dc/elements/1.1/"; const char* const ooNS::meta="http://openoffice.org/2000/meta"; const char* const ooNS::config="http://openoffice.org/2001/config"; -QString OoUtils::expandWhitespace(const QDomElement& tag) +TQString OoUtils::expandWhitespace(const TQDomElement& tag) { //tags like <text:s text:c="4"> int howmany=1; if (tag.hasAttributeNS( ooNS::text, "c")) - howmany = tag.attributeNS( ooNS::text, "c", QString::null).toInt(); + howmany = tag.attributeNS( ooNS::text, "c", TQString()).toInt(); - QString result; + TQString result; return result.fill(32, howmany); } -bool OoUtils::parseBorder(const QString & tag, double * width, int * style, QColor * color) +bool OoUtils::parseBorder(const TQString & tag, double * width, int * style, TQColor * color) { //string like "0.088cm solid #800000" if (tag.isEmpty() || tag=="none" || tag=="hidden") // in fact no border return false; - QString _width = tag.section(' ', 0, 0); - QString _style = tag.section(' ', 1, 1); - QString _color = tag.section(' ', 2, 2); + TQString _width = tag.section(' ', 0, 0); + TQString _style = tag.section(' ', 1, 1); + TQString _color = tag.section(' ', 2, 2); *width = KoUnit::parseValue(_width, 1.0); @@ -85,14 +85,14 @@ bool OoUtils::parseBorder(const QString & tag, double * width, int * style, QCol *style = 0; if (_color.isEmpty()) - *color = QColor(); + *color = TQColor(); else color->setNamedColor(_color); return true; } -void OoUtils::importIndents( QDomElement& parentElement, const KoStyleStack& styleStack ) +void OoUtils::importIndents( TQDomElement& tqparentElement, const KoStyleStack& styleStack ) { if ( styleStack.hasAttributeNS( ooNS::fo, "margin-left" ) || // 3.11.19 styleStack.hasAttributeNS( ooNS::fo, "margin-right" ) ) @@ -111,27 +111,27 @@ void OoUtils::importIndents( QDomElement& parentElement, const KoStyleStack& sty if ( marginLeft != 0 || marginRight != 0 || first != 0 ) { - QDomElement indent = parentElement.ownerDocument().createElement( "INDENTS" ); + TQDomElement indent = tqparentElement.ownerDocument().createElement( "INDENTS" ); if( marginLeft != 0 ) indent.setAttribute( "left", marginLeft ); if( marginRight != 0 ) indent.setAttribute( "right", marginRight ); if( first != 0 ) indent.setAttribute( "first", first ); - parentElement.appendChild( indent ); + tqparentElement.appendChild( indent ); } } } -void OoUtils::importLineSpacing( QDomElement& parentElement, const KoStyleStack& styleStack ) +void OoUtils::importLineSpacing( TQDomElement& tqparentElement, const KoStyleStack& styleStack ) { if( styleStack.hasAttributeNS( ooNS::fo, "line-height") ) { // Fixed line height - QString value = styleStack.attributeNS( ooNS::fo, "line-height" ); // 3.11.1 + TQString value = styleStack.attributeNS( ooNS::fo, "line-height" ); // 3.11.1 if ( value != "normal" ) { - QDomElement lineSpacing = parentElement.ownerDocument().createElement( "LINESPACING" ); + TQDomElement lineSpacing = tqparentElement.ownerDocument().createElement( "LINESPACING" ); if ( value.endsWith("%" ) ) { @@ -153,22 +153,22 @@ void OoUtils::importLineSpacing( QDomElement& parentElement, const KoStyleStack& kdWarning(30519) << "Unhandled value for fo:line-height: " << value << endl; lineSpacing.setAttribute("type","single"); // fallback } - parentElement.appendChild( lineSpacing ); + tqparentElement.appendChild( lineSpacing ); } } // Line-height-at-least is mutually exclusive with line-height else if ( styleStack.hasAttributeNS( ooNS::style, "line-height-at-least") ) // 3.11.2 { - QString value = styleStack.attributeNS( ooNS::style, "line-height-at-least" ); + TQString value = styleStack.attributeNS( ooNS::style, "line-height-at-least" ); // kotext has "at least" but that's for the linespacing, not for the entire line height! // Strange. kotext also has "at least" for the whole line height.... // Did we make the wrong choice in kotext? //kdWarning(30519) << "Unimplemented support for style:line-height-at-least: " << value << endl; // Well let's see if this makes a big difference. - QDomElement lineSpacing = parentElement.ownerDocument().createElement("LINESPACING"); + TQDomElement lineSpacing = tqparentElement.ownerDocument().createElement("LINESPACING"); lineSpacing.setAttribute("type", "atleast"); lineSpacing.setAttribute("spacingvalue", KoUnit::parseValue(value)); - parentElement.appendChild(lineSpacing); + tqparentElement.appendChild(lineSpacing); } // Line-spacing is mutually exclusive with line-height and line-height-at-least else if ( styleStack.hasAttributeNS( ooNS::style, "line-spacing") ) // 3.11.3 @@ -176,16 +176,16 @@ void OoUtils::importLineSpacing( QDomElement& parentElement, const KoStyleStack& double value = KoUnit::parseValue( styleStack.attributeNS( ooNS::style, "line-spacing" ) ); if ( value != 0.0 ) { - QDomElement lineSpacing = parentElement.ownerDocument().createElement( "LINESPACING" ); + TQDomElement lineSpacing = tqparentElement.ownerDocument().createElement( "LINESPACING" ); lineSpacing.setAttribute( "type", "custom" ); lineSpacing.setAttribute( "spacingvalue", value ); - parentElement.appendChild( lineSpacing ); + tqparentElement.appendChild( lineSpacing ); } } } -void OoUtils::importTopBottomMargin( QDomElement& parentElement, const KoStyleStack& styleStack ) +void OoUtils::importTopBottomMargin( TQDomElement& tqparentElement, const KoStyleStack& styleStack ) { if( styleStack.hasAttributeNS( ooNS::fo, "margin-top") || // 3.11.22 styleStack.hasAttributeNS( ooNS::fo, "margin-bottom")) @@ -194,29 +194,29 @@ void OoUtils::importTopBottomMargin( QDomElement& parentElement, const KoStyleSt double mbottom = KoUnit::parseValue( styleStack.attributeNS( ooNS::fo, "margin-bottom" ) ); if( mtop != 0 || mbottom != 0 ) { - QDomElement offset = parentElement.ownerDocument().createElement( "OFFSETS" ); + TQDomElement offset = tqparentElement.ownerDocument().createElement( "OFFSETS" ); if( mtop != 0 ) offset.setAttribute( "before", mtop ); if( mbottom != 0 ) offset.setAttribute( "after", mbottom ); - parentElement.appendChild( offset ); + tqparentElement.appendChild( offset ); } } } -void OoUtils::importTabulators( QDomElement& parentElement, const KoStyleStack& styleStack ) +void OoUtils::importTabulators( TQDomElement& tqparentElement, const KoStyleStack& styleStack ) { if ( !styleStack.hasChildNodeNS( ooNS::style, "tab-stops" ) ) // 3.11.10 return; - QDomElement tabStops = styleStack.childNodeNS( ooNS::style, "tab-stops" ); - //kdDebug(30519) << k_funcinfo << tabStops.childNodes().count() << " tab stops in layout." << endl; - for ( QDomNode it = tabStops.firstChild(); !it.isNull(); it = it.nextSibling() ) + TQDomElement tabStops = styleStack.childNodeNS( ooNS::style, "tab-stops" ); + //kdDebug(30519) << k_funcinfo << tabStops.childNodes().count() << " tab stops in tqlayout." << endl; + for ( TQDomNode it = tabStops.firstChild(); !it.isNull(); it = it.nextSibling() ) { - QDomElement tabStop = it.toElement(); + TQDomElement tabStop = it.toElement(); Q_ASSERT( tabStop.tagName() == "style:tab-stop" ); - QString type = tabStop.attributeNS( ooNS::style, "type", QString::null ); // left, right, center or char + TQString type = tabStop.attributeNS( ooNS::style, "type", TQString() ); // left, right, center or char - QDomElement elem = parentElement.ownerDocument().createElement( "TABULATOR" ); + TQDomElement elem = tqparentElement.ownerDocument().createElement( "TABULATOR" ); int kOfficeType = 0; if ( type == "left" ) kOfficeType = 0; @@ -225,23 +225,23 @@ void OoUtils::importTabulators( QDomElement& parentElement, const KoStyleStack& else if ( type == "right" ) kOfficeType = 2; else if ( type == "char" ) { - QString delimiterChar = tabStop.attributeNS( ooNS::style, "char", QString::null ); // single character + TQString delimiterChar = tabStop.attributeNS( ooNS::style, "char", TQString() ); // single character elem.setAttribute( "alignchar", delimiterChar ); - kOfficeType = 3; // "alignment on decimal point" + kOfficeType = 3; // "tqalignment on decimal point" } elem.setAttribute( "type", kOfficeType ); - double pos = KoUnit::parseValue( tabStop.attributeNS( ooNS::style, "position", QString::null ) ); + double pos = KoUnit::parseValue( tabStop.attributeNS( ooNS::style, "position", TQString() ) ); elem.setAttribute( "ptpos", pos ); - // TODO Convert leaderChar's unicode value to the KOffice enum + // TODO Convert leaderChar's tqunicode value to the KOffice enum // (blank/dots/line/dash/dash-dot/dash-dot-dot, 0 to 5) - QString leaderChar = tabStop.attributeNS( ooNS::style, "leader-char", QString::null ); // single character + TQString leaderChar = tabStop.attributeNS( ooNS::style, "leader-char", TQString() ); // single character if ( !leaderChar.isEmpty() ) { int filling = 0; - QChar ch = leaderChar[0]; + TQChar ch = leaderChar[0]; switch (ch.latin1()) { case '.': filling = 1; break; @@ -255,21 +255,21 @@ void OoUtils::importTabulators( QDomElement& parentElement, const KoStyleStack& } elem.setAttribute( "filling", filling ); } - parentElement.appendChild( elem ); + tqparentElement.appendChild( elem ); } } -void OoUtils::importBorders( QDomElement& parentElement, const KoStyleStack& styleStack ) +void OoUtils::importBorders( TQDomElement& tqparentElement, const KoStyleStack& styleStack ) { if (styleStack.hasAttributeNS( ooNS::fo, "border","left")) { double width; int style; - QColor color; + TQColor color; if (OoUtils::parseBorder(styleStack.attributeNS( ooNS::fo, "border", "left"), &width, &style, &color)) { - QDomElement lbElem = parentElement.ownerDocument().createElement("LEFTBORDER"); + TQDomElement lbElem = tqparentElement.ownerDocument().createElement("LEFTBORDER"); lbElem.setAttribute("width", width); lbElem.setAttribute("style", style); if (color.isValid()) { @@ -277,7 +277,7 @@ void OoUtils::importBorders( QDomElement& parentElement, const KoStyleStack& sty lbElem.setAttribute("green", color.green()); lbElem.setAttribute("blue", color.blue()); } - parentElement.appendChild(lbElem); + tqparentElement.appendChild(lbElem); } } @@ -285,10 +285,10 @@ void OoUtils::importBorders( QDomElement& parentElement, const KoStyleStack& sty { double width; int style; - QColor color; + TQColor color; if (OoUtils::parseBorder(styleStack.attributeNS( ooNS::fo, "border", "right"), &width, &style, &color)) { - QDomElement lbElem = parentElement.ownerDocument().createElement("RIGHTBORDER"); + TQDomElement lbElem = tqparentElement.ownerDocument().createElement("RIGHTBORDER"); lbElem.setAttribute("width", width); lbElem.setAttribute("style", style); if (color.isValid()) { @@ -296,7 +296,7 @@ void OoUtils::importBorders( QDomElement& parentElement, const KoStyleStack& sty lbElem.setAttribute("green", color.green()); lbElem.setAttribute("blue", color.blue()); } - parentElement.appendChild(lbElem); + tqparentElement.appendChild(lbElem); } } @@ -304,10 +304,10 @@ void OoUtils::importBorders( QDomElement& parentElement, const KoStyleStack& sty { double width; int style; - QColor color; + TQColor color; if (OoUtils::parseBorder(styleStack.attributeNS( ooNS::fo, "border", "top"), &width, &style, &color)) { - QDomElement lbElem = parentElement.ownerDocument().createElement("TOPBORDER"); + TQDomElement lbElem = tqparentElement.ownerDocument().createElement("TOPBORDER"); lbElem.setAttribute("width", width); lbElem.setAttribute("style", style); if (color.isValid()) { @@ -315,7 +315,7 @@ void OoUtils::importBorders( QDomElement& parentElement, const KoStyleStack& sty lbElem.setAttribute("green", color.green()); lbElem.setAttribute("blue", color.blue()); } - parentElement.appendChild(lbElem); + tqparentElement.appendChild(lbElem); } } @@ -323,10 +323,10 @@ void OoUtils::importBorders( QDomElement& parentElement, const KoStyleStack& sty { double width; int style; - QColor color; + TQColor color; if (OoUtils::parseBorder(styleStack.attributeNS( ooNS::fo, "border", "bottom"), &width, &style, &color)) { - QDomElement lbElem = parentElement.ownerDocument().createElement("BOTTOMBORDER"); + TQDomElement lbElem = tqparentElement.ownerDocument().createElement("BOTTOMBORDER"); lbElem.setAttribute("width", width); lbElem.setAttribute("style", style); if (color.isValid()) { @@ -334,12 +334,12 @@ void OoUtils::importBorders( QDomElement& parentElement, const KoStyleStack& sty lbElem.setAttribute("green", color.green()); lbElem.setAttribute("blue", color.blue()); } - parentElement.appendChild(lbElem); + tqparentElement.appendChild(lbElem); } } } -void OoUtils::importUnderline( const QString& in, QString& underline, QString& styleline ) +void OoUtils::importUnderline( const TQString& in, TQString& underline, TQString& styleline ) { underline = "single"; if ( in == "none" ) @@ -383,16 +383,16 @@ void OoUtils::importUnderline( const QString& in, QString& underline, QString& s kdWarning(30519) << k_funcinfo << " unsupported text-underline value: " << in << endl; } -void OoUtils::importTextPosition( const QString& text_position, QString& value, QString& relativetextsize ) +void OoUtils::importTextPosition( const TQString& text_position, TQString& value, TQString& relativetextsize ) { //OO: <vertical position (% or sub or super)> [<size as %>] //Examples: "super" or "super 58%" or "82% 58%" (where 82% is the vertical position) // TODO in kword: vertical positions other than sub/super - QStringList lst = QStringList::split( ' ', text_position ); + TQStringList lst = TQStringList::split( ' ', text_position ); if ( !lst.isEmpty() ) { - QString textPos = lst.front().stripWhiteSpace(); - QString textSize; + TQString textPos = lst.front().stripWhiteSpace(); + TQString textSize; lst.pop_front(); if ( !lst.isEmpty() ) textSize = lst.front().stripWhiteSpace(); @@ -421,27 +421,27 @@ void OoUtils::importTextPosition( const QString& text_position, QString& value, { textSize.truncate( textSize.length() - 1 ); double textSizeValue = textSize.toDouble() / 100; // e.g. 0.58 - relativetextsize = QString::number( textSizeValue ); + relativetextsize = TQString::number( textSizeValue ); } } else value = "0"; } -void OoUtils::createDocumentInfo(QDomDocument &_meta, QDomDocument & docinfo) +void OoUtils::createDocumentInfo(TQDomDocument &_meta, TQDomDocument & docinfo) { - QDomNode meta = KoDom::namedItemNS( _meta, ooNS::office, "document-meta" ); - QDomNode office = KoDom::namedItemNS( meta, ooNS::office, "meta" ); + TQDomNode meta = KoDom::namedItemNS( _meta, ooNS::office, "document-meta" ); + TQDomNode office = KoDom::namedItemNS( meta, ooNS::office, "meta" ); if ( office.isNull() ) return; - QDomElement elementDocInfo = docinfo.documentElement(); + TQDomElement elementDocInfo = docinfo.documentElement(); - QDomElement e = KoDom::namedItemNS( office, ooNS::dc, "creator" ); + TQDomElement e = KoDom::namedItemNS( office, ooNS::dc, "creator" ); if ( !e.isNull() && !e.text().isEmpty() ) { - QDomElement author = docinfo.createElement( "author" ); - QDomElement t = docinfo.createElement( "full-name" ); + TQDomElement author = docinfo.createElement( "author" ); + TQDomElement t = docinfo.createElement( "full-name" ); author.appendChild( t ); t.appendChild( docinfo.createTextNode( e.text() ) ); elementDocInfo.appendChild( author); @@ -450,8 +450,8 @@ void OoUtils::createDocumentInfo(QDomDocument &_meta, QDomDocument & docinfo) e = KoDom::namedItemNS( office, ooNS::dc, "title" ); if ( !e.isNull() && !e.text().isEmpty() ) { - QDomElement about = docinfo.createElement( "about" ); - QDomElement title = docinfo.createElement( "title" ); + TQDomElement about = docinfo.createElement( "about" ); + TQDomElement title = docinfo.createElement( "title" ); about.appendChild( title ); title.appendChild( docinfo.createTextNode( e.text() ) ); elementDocInfo.appendChild( about ); @@ -460,46 +460,46 @@ void OoUtils::createDocumentInfo(QDomDocument &_meta, QDomDocument & docinfo) e = KoDom::namedItemNS( office, ooNS::dc, "description" ); if ( !e.isNull() && !e.text().isEmpty() ) { - QDomElement about = elementDocInfo.namedItem( "about" ).toElement(); + TQDomElement about = elementDocInfo.namedItem( "about" ).toElement(); if ( about.isNull() ) { about = docinfo.createElement( "about" ); elementDocInfo.appendChild( about ); } - QDomElement title = docinfo.createElement( "abstract" ); + TQDomElement title = docinfo.createElement( "abstract" ); about.appendChild( title ); title.appendChild( docinfo.createTextNode( e.text() ) ); } e = KoDom::namedItemNS( office, ooNS::dc, "subject" ); if ( !e.isNull() && !e.text().isEmpty() ) { - QDomElement about = elementDocInfo.namedItem( "about" ).toElement(); + TQDomElement about = elementDocInfo.namedItem( "about" ).toElement(); if ( about.isNull() ) { about = docinfo.createElement( "about" ); elementDocInfo.appendChild( about ); } - QDomElement subject = docinfo.createElement( "subject" ); + TQDomElement subject = docinfo.createElement( "subject" ); about.appendChild( subject ); subject.appendChild( docinfo.createTextNode( e.text() ) ); } e = KoDom::namedItemNS( office, ooNS::meta, "keywords" ); if ( !e.isNull() ) { - QDomElement about = elementDocInfo.namedItem( "about" ).toElement(); + TQDomElement about = elementDocInfo.namedItem( "about" ).toElement(); if ( about.isNull() ) { about = docinfo.createElement( "about" ); elementDocInfo.appendChild( about ); } - QDomElement tmp = KoDom::namedItemNS( e, ooNS::meta, "keyword" ); + TQDomElement tmp = KoDom::namedItemNS( e, ooNS::meta, "keyword" ); if ( !tmp.isNull() && !tmp.text().isEmpty() ) { - QDomElement keyword = docinfo.createElement( "keyword" ); + TQDomElement keyword = docinfo.createElement( "keyword" ); about.appendChild( keyword ); keyword.appendChild( docinfo.createTextNode( tmp.text() ) ); } } } -KoFilter::ConversionStatus OoUtils::loadAndParse(const QString& fileName, QDomDocument& doc, KoStore *m_store ) +KoFilter::ConversiontqStatus OoUtils::loadAndParse(const TQString& fileName, TQDomDocument& doc, KoStore *m_store ) { kdDebug(30518) << "loadAndParse: Trying to open " << fileName << endl; @@ -508,21 +508,21 @@ KoFilter::ConversionStatus OoUtils::loadAndParse(const QString& fileName, QDomDo kdWarning(30519) << "Entry " << fileName << " not found!" << endl; return KoFilter::FileNotFound; } - KoFilter::ConversionStatus convertStatus = loadAndParse( m_store->device(),doc, fileName ); + KoFilter::ConversiontqStatus converttqStatus = loadAndParse( m_store->device(),doc, fileName ); m_store->close(); - return convertStatus; + return converttqStatus; } -KoFilter::ConversionStatus OoUtils::loadAndParse(QIODevice* io, QDomDocument& doc, const QString & fileName) +KoFilter::ConversiontqStatus OoUtils::loadAndParse(TQIODevice* io, TQDomDocument& doc, const TQString & fileName) { - QXmlInputSource source( io ); - // Copied from QDomDocumentPrivate::setContent, to change the whitespace thing - QXmlSimpleReader reader; + TQXmlInputSource source( io ); + // Copied from TQDomDocumentPrivate::setContent, to change the whitespace thing + TQXmlSimpleReader reader; KoDocument::setupXmlReader( reader, true /*namespaceProcessing*/ ); - // Error variables for QDomDocument::setContent - QString errorMsg; + // Error variables for TQDomDocument::setContent + TQString errorMsg; int errorLine, errorColumn; if ( !doc.setContent( &source, &reader, &errorMsg, &errorLine, &errorColumn ) ) { @@ -538,7 +538,7 @@ KoFilter::ConversionStatus OoUtils::loadAndParse(QIODevice* io, QDomDocument& do } -KoFilter::ConversionStatus OoUtils::loadAndParse(const QString& filename, QDomDocument& doc, KZip * m_zip) +KoFilter::ConversiontqStatus OoUtils::loadAndParse(const TQString& filename, TQDomDocument& doc, KZip * m_zip) { kdDebug(30519) << "Trying to open " << filename << endl; @@ -561,15 +561,15 @@ KoFilter::ConversionStatus OoUtils::loadAndParse(const QString& filename, QDomDo } const KZipFileEntry* f = static_cast<const KZipFileEntry *>(entry); kdDebug(30519) << "Entry " << filename << " has size " << f->size() << endl; - QIODevice* io = f->device(); - KoFilter::ConversionStatus convertStatus = loadAndParse( io,doc, filename ); + TQIODevice* io = f->device(); + KoFilter::ConversiontqStatus converttqStatus = loadAndParse( io,doc, filename ); delete io; - return convertStatus; + return converttqStatus; } -KoFilter::ConversionStatus OoUtils::loadThumbnail( QImage& thumbnail, KZip * m_zip ) +KoFilter::ConversiontqStatus OoUtils::loadThumbnail( TQImage& thumbnail, KZip * m_zip ) { - const QString filename( "Thumbnails/thumbnail.png" ); + const TQString filename( "Thumbnails/thumbnail.png" ); kdDebug(30519) << "Trying to open thumbnail " << filename << endl; if (!m_zip) @@ -590,7 +590,7 @@ KoFilter::ConversionStatus OoUtils::loadThumbnail( QImage& thumbnail, KZip * m_z return KoFilter::WrongFormat; } const KZipFileEntry* f = static_cast<const KZipFileEntry *>(entry); - QIODevice* io=f->device(); + TQIODevice* io=f->device(); kdDebug(30519) << "Entry " << filename << " has size " << f->size() << endl; if ( ! io->open( IO_ReadOnly ) ) @@ -600,7 +600,7 @@ KoFilter::ConversionStatus OoUtils::loadThumbnail( QImage& thumbnail, KZip * m_z return KoFilter::StupidError; } - QImageIO imageIO( io, "PNG" ); + TQImageIO imageIO( io, "PNG" ); if ( ! imageIO.read() ) { kdWarning(30519) << "Thumbnail could not be read!" <<endl; diff --git a/filters/liboofilter/ooutils.h b/filters/liboofilter/ooutils.h index 76a003e5..4619adcf 100644 --- a/filters/liboofilter/ooutils.h +++ b/filters/liboofilter/ooutils.h @@ -22,12 +22,12 @@ #ifndef OOUTILS_H #define OOUTILS_H -#include <qstring.h> +#include <tqstring.h> #include <KoFilterChain.h> -class QColor; -class QDomElement; +class TQColor; +class TQDomElement; class KoStyleStack; -class QDomDocument; +class TQDomDocument; class KZip; class ooNS { @@ -49,45 +49,45 @@ public: namespace OoUtils { - QString expandWhitespace(const QDomElement& tag); + TQString expandWhitespace(const TQDomElement& tag); - bool parseBorder(const QString & tag, double * width, int * style, QColor * color); + bool parseBorder(const TQString & tag, double * width, int * style, TQColor * color); ///////// Paragraph properties ///////// // Convert fo:margin-left, fo:margin-right and fo:text-indent to <INDENTS> - void importIndents( QDomElement& parentElement, const KoStyleStack& styleStack ); + void importIndents( TQDomElement& tqparentElement, const KoStyleStack& styleStack ); // Convert fo:line-height, style:line-height-at-least and style:line-spacing to <LINESPACING> - void importLineSpacing( QDomElement& parentElement, const KoStyleStack& styleStack ); + void importLineSpacing( TQDomElement& tqparentElement, const KoStyleStack& styleStack ); // Convert fo:margin-top and fo:margin-bottom to <OFFSETS> - void importTopBottomMargin( QDomElement& parentElement, const KoStyleStack& styleStack ); + void importTopBottomMargin( TQDomElement& tqparentElement, const KoStyleStack& styleStack ); // Convert style:tab-stops to <TABULATORS> - void importTabulators( QDomElement& parentElement, const KoStyleStack& styleStack ); + void importTabulators( TQDomElement& tqparentElement, const KoStyleStack& styleStack ); // Convert fo:border* to <*BORDER> - void importBorders( QDomElement& parentElement, const KoStyleStack& styleStack ); + void importBorders( TQDomElement& tqparentElement, const KoStyleStack& styleStack ); /////////// Text properties /////////// // From style:text-underline to kword/kpresenter's underline/underlinestyleline - void importUnderline( const QString& text_underline, QString& underline, QString& styleline ); + void importUnderline( const TQString& text_underline, TQString& underline, TQString& styleline ); // From style:text-position (for subscript/superscript) // to kword/kpresenter's value/relativetextsize - void importTextPosition( const QString& text_position, QString& value, QString& relativetextsize ); + void importTextPosition( const TQString& text_position, TQString& value, TQString& relativetextsize ); - void createDocumentInfo(QDomDocument &_meta, QDomDocument & docinfo); - KoFilter::ConversionStatus loadAndParse(const QString& filename, QDomDocument& doc, KZip * m_zip); - KoFilter::ConversionStatus loadAndParse(const QString& filename, QDomDocument& doc, KoStore *m_store ); + void createDocumentInfo(TQDomDocument &_meta, TQDomDocument & docinfo); + KoFilter::ConversiontqStatus loadAndParse(const TQString& filename, TQDomDocument& doc, KZip * m_zip); + KoFilter::ConversiontqStatus loadAndParse(const TQString& filename, TQDomDocument& doc, KoStore *m_store ); /// Load an OASIS thumbnail - KoFilter::ConversionStatus loadThumbnail( QImage& thumbnail, KZip * m_zip ); + KoFilter::ConversiontqStatus loadThumbnail( TQImage& thumbnail, KZip * m_zip ); // Internal - KoFilter::ConversionStatus loadAndParse(QIODevice* io, QDomDocument& doc, const QString & fileName); + KoFilter::ConversiontqStatus loadAndParse(TQIODevice* io, TQDomDocument& doc, const TQString & fileName); } #endif /* OOUTILS_H */ diff --git a/filters/olefilters/lib/filterbase.cc b/filters/olefilters/lib/filterbase.cc index b1ec9c32..523a0348 100644 --- a/filters/olefilters/lib/filterbase.cc +++ b/filters/olefilters/lib/filterbase.cc @@ -19,37 +19,37 @@ #include <filterbase.h> -FilterBase::FilterBase() : QObject() { +FilterBase::FilterBase() : TQObject() { m_success=true; m_ready=false; } -FilterBase::FilterBase(QStringList &oleStreams) : QObject() { +FilterBase::FilterBase(TQStringList &oleStreams) : TQObject() { FilterBase(); m_oleStreams = oleStreams; } bool FilterBase::filter() { - QString newstr; + TQString newstr; // Page sizes, margins etc. all in points. const unsigned height = 841; // Height. const unsigned width = 595; // Width. - const unsigned hMargin = 28; // Horizontal margin. - const unsigned vMargin = 42; // Vertical margin. + const unsigned hMargin = 28; //Qt::Horizontal margin. + const unsigned vMargin = 42; //Qt::Vertical margin. - newstr = QString("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE DOC >\n" + newstr = TQString("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE DOC >\n" "<DOC author=\"Reginald Stadlbauer and Torben Weis\" email=\"reggie@kde.org and weis@kde.org\" editor=\"KWord\" mime=\"application/x-kword\">\n" " <PAPER format=\"1\" ptWidth=\"595\" ptHeight=\"841\" mmWidth =\"210\" mmHeight=\"297\" inchWidth =\"8.26772\" inchHeight=\"11.6929\" orientation=\"0\" columns=\"1\" ptColumnspc=\"2\" mmColumnspc=\"1\" inchColumnspc=\"0.0393701\" hType=\"0\" fType=\"0\" ptHeadBody=\"9\" ptFootBody=\"9\" mmHeadBody=\"3.5\" mmFootBody=\"3.5\" inchHeadBody=\"0.137795\" inchFootBody=\"0.137795\">\n" " <PAPERBORDERS mmLeft=\"10\" mmTop=\"15\" mmRight=\"10\" mmBottom=\"15\" ptLeft=\""); - newstr.append(QString::number(hMargin)); + newstr.append(TQString::number(hMargin)); newstr.append("\" ptTop=\""); - newstr.append(QString::number(vMargin)); + newstr.append(TQString::number(vMargin)); newstr.append("\" ptRight=\""); - newstr.append(QString::number(hMargin)); + newstr.append(TQString::number(hMargin)); newstr.append("\" ptBottom=\""); - newstr.append(QString::number(vMargin)); + newstr.append(TQString::number(vMargin)); newstr.append("\" inchLeft=\"0.393701\" inchTop=\"0.590551\" inchRight=\"0.393701\" inchBottom=\"0.590551\"/>\n" " </PAPER>\n" " <ATTRIBUTES processing=\"0\" standardpage=\"1\" hasHeader=\"0\" hasFooter=\"0\" unit=\"mm\"/>\n" @@ -62,13 +62,13 @@ bool FilterBase::filter() { newstr.append( " <FRAMESET frameType=\"1\" frameInfo=\"0\" removeable=\"0\" visible=\"1\">\n" " <FRAME left=\""); - newstr.append(QString::number(hMargin)); + newstr.append(TQString::number(hMargin)); newstr.append("\" top=\""); - newstr.append(QString::number(vMargin)); + newstr.append(TQString::number(vMargin)); newstr.append("\" right=\""); - newstr.append(QString::number(width - hMargin)); + newstr.append(TQString::number(width - hMargin)); newstr.append("\" bottom=\""); - newstr.append(QString::number(height - vMargin)); + newstr.append(TQString::number(height - vMargin)); newstr.append("\" runaround=\"1\" runaGapPT=\"2\" runaGapMM=\"1\" runaGapINCH=\"0.0393701\" lWidth=\"1\" lRed=\"255\" lGreen=\"255\" lBlue=\"255\" lStyle=\"0\" rWidth=\"1\" rRed=\"255\" rGreen=\"255\" rBlue=\"255\" rStyle=\"0\" tWidth=\"1\" tRed=\"255\" tGreen=\"255\" tBlue=\"255\" tStyle=\"0\" bWidth=\"1\" bRed=\"255\" bGreen=\"255\" bBlue=\"255\" bStyle=\"0\" bkRed=\"255\" bkGreen=\"255\" bkBlue=\"255\" bleftpt=\"0\" bleftmm=\"0\" bleftinch=\"0\" brightpt=\"0\" brightmm=\"0\" brightinch=\"0\" btoppt=\"0\" btopmm=\"0\" btopinch=\"0\" bbottompt=\"0\" bbottommm=\"0\" bbottominch=\"0"); newstr.append("\" autoCreateNewFrame=\"1\" newFrameBehaviour=\"0\"/>\n" " <PARAGRAPH>\n" @@ -81,7 +81,7 @@ bool FilterBase::filter() { newstr.append( " </FRAMESETS>\n" "</DOC>\n"); - m_part=QDomDocument("doc"); + m_part=TQDomDocument("doc"); m_part.setContent(newstr); m_success=true; m_ready=true; diff --git a/filters/olefilters/lib/filterbase.h b/filters/olefilters/lib/filterbase.h index 942c3836..138842a0 100644 --- a/filters/olefilters/lib/filterbase.h +++ b/filters/olefilters/lib/filterbase.h @@ -25,20 +25,21 @@ #ifndef FILTERBASE_H #define FILTERBASE_H -#include <qobject.h> -#include <qdom.h> -#include <qstringlist.h> +#include <tqobject.h> +#include <tqdom.h> +#include <tqstringlist.h> class myFile; -class QCString; +class TQCString; // Attention: The nameOUT Strings are allocated with new[] in the // slots. Therefore you have to delete [] them! // If you call slotGetStream you have to delete [] the // stream.data prt after use! -class FilterBase : public QObject { +class FilterBase : public TQObject { Q_OBJECT + TQ_OBJECT public: @@ -47,63 +48,63 @@ public: // This filter only ever gets used in error cases, when we could not find a // real filter. So, pass in the names of the OLE streams making up the item // item that could not be converted. - FilterBase(QStringList &oleStreams); + FilterBase(TQStringList &oleStreams); virtual ~FilterBase() {} // Manages the filtering process virtual bool filter(); - // override this to return true if you want to return a plain QCString + // override this to return true if you want to return a plain TQCString virtual bool plainString() const { return false; } - // okay -- let's get the QDomDocument - virtual const QDomDocument *const part() { return &m_part; } - // or get the plain QCString ;) - virtual QCString CString() const { return QCString(); } + // okay -- let's get the TQDomDocument + virtual const TQDomDocument *const part() { return &m_part; } + // or get the plain TQCString ;) + virtual TQCString CString() const { return TQCString(); } signals: // See olefilter.h for information void signalSaveDocumentInformation( - const QString &fullName, - const QString &title, - const QString &company, - const QString &email, - const QString &telephone, - const QString &fax, - const QString &postalCode, - const QString &country, - const QString &city, - const QString &street, - const QString &docTitle, - const QString &docAbstract); + const TQString &fullName, + const TQString &title, + const TQString &company, + const TQString &email, + const TQString &telephone, + const TQString &fax, + const TQString &postalCode, + const TQString &country, + const TQString &city, + const TQString &street, + const TQString &docTitle, + const TQString &docAbstract); void signalSavePic( - const QString &nameIN, - QString &storageId, - const QString &extension, + const TQString &nameIN, + TQString &storageId, + const TQString &extension, unsigned int length, const char *data); void signalSavePart( - const QString &nameIN, - QString &storageId, - QString &mimeType, - const QString &extension, + const TQString &nameIN, + TQString &storageId, + TQString &mimeType, + const TQString &extension, unsigned int length, const char *data); - void signalPart(const QString& nameIN, QString &storageId, QString &mimeType); + void signalPart(const TQString& nameIN, TQString &storageId, TQString &mimeType); void signalGetStream(const int &handle, myFile &stream); // Note: might return wrong stream as names are NOT unique!!! // (searching only in current dir) - void signalGetStream(const QString &name, myFile &stream); + void signalGetStream(const TQString &name, myFile &stream); void sigProgress(int value); protected: bool m_success; // ok, the filtering process was successful bool m_ready; // filtering took place, you may fetch the file now - QDomDocument m_part; // this represents the part (document) + TQDomDocument m_part; // this represents the part (document) private: // Don't copy or assign me... FilterBase(const FilterBase &); const FilterBase &operator=(const FilterBase &); - QStringList m_oleStreams; + TQStringList m_oleStreams; }; #endif // FILTERBASE_H diff --git a/filters/olefilters/lib/klaola.cc b/filters/olefilters/lib/klaola.cc index 69d5284e..7db5d815 100644 --- a/filters/olefilters/lib/klaola.cc +++ b/filters/olefilters/lib/klaola.cc @@ -81,10 +81,10 @@ void KLaola::createTree(const int handle, const short index) { tree->node=node; tree->subtree=-1; - //QString nix="### entering create tree: handle="; - //nix+=QString::number(handle); + //TQString nix="### entering create tree: handle="; + //nix+=TQString::number(handle); //nix+=" index="; - //nix+=QString::number(index); + //nix+=TQString::number(index); //kdDebug(s_area) << nix << endl; if(node->prevHandle!=-1) { @@ -130,7 +130,7 @@ bool KLaola::enterDir(const OLENode *dirHandle) { return false; } -const KLaola::NodeList KLaola::find(const QString &name, bool onlyCurrentDir) { +const KLaola::NodeList KLaola::tqfind(const TQString &name, bool onlyCurrentDir) { OLENode *node; NodeList ret; @@ -189,7 +189,7 @@ int KLaola::nextSmallBlock(int pos) const bool KLaola::parseHeader() { - if(qstrncmp((const char*)m_file.data,"\xd0\xcf\x11\xe0\xa1\xb1\x1a\xe1",8 )!=0) { + if(tqstrncmp((const char*)m_file.data,"\xd0\xcf\x11\xe0\xa1\xb1\x1a\xe1",8 )!=0) { kdError(s_area) << "KLaola::parseHeader(): Invalid file format (unexpected id in header)!" << endl; return false; } @@ -406,7 +406,7 @@ void KLaola::readPPSEntry(int pos, const int handle) { // Get the rest of the name. for (; i < (nameSize / 2) - 1; ++i) { - QChar tmp; + TQChar tmp; tmp = read16(pos + 2 * i); node->m_name += tmp; @@ -451,7 +451,7 @@ myFile KLaola::stream(unsigned handle) { return stream(node); } -void KLaola::testIt(QString prefix) +void KLaola::testIt(TQString prefix) { NodeList nodes; @@ -470,16 +470,16 @@ void KLaola::testIt(QString prefix) } // Return a human-readable description of a stream. -QString KLaola::Node::describe() const +TQString KLaola::Node::describe() const { - QString description; + TQString description; myFile file; unsigned i; - description = QString::number(m_handle) + " " + + description = TQString::number(m_handle) + " " + m_name + "(" + - QString::number(sb) + " " + - QString::number(size) + " bytes)"; + TQString::number(sb) + " " + + TQString::number(size) + " bytes)"; if (isDirectory()) description += ", directory"; switch (m_prefix) @@ -494,13 +494,13 @@ QString KLaola::Node::describe() const description += ", "; for (i = 16; i < file.length; i++) { - description += QString::number((file.data[i] >> 4) & 0xf, 16); - description += QString::number(file.data[i] & 0xf, 16); + description += TQString::number((file.data[i] >> 4) & 0xf, 16); + description += TQString::number(file.data[i] & 0xf, 16); } description += ", "; for (i = 16; i < file.length; i++) { - QChar tmp = file.data[i]; + TQChar tmp = file.data[i]; if (tmp.isPrint()) description += tmp; @@ -512,68 +512,68 @@ QString KLaola::Node::describe() const description += ", OLE_2"; break; case PARENT_MANAGED: - description += ", parent managed"; + description += ", tqparent managed"; break; case STRUCTURED_STORAGE: - description += ", reserved 0x" + QString::number(m_prefix, 16); + description += ", reserved 0x" + TQString::number(m_prefix, 16); break; case NONE: break; default: - description += ", reserved 0x" + QString::number(m_prefix, 16); + description += ", reserved 0x" + TQString::number(m_prefix, 16); break; } return description; } -QString KLaola::Node::name() const +TQString KLaola::Node::name() const { return m_name; } // See "Associating Code with Storage" in Inside OLE. -QString KLaola::Node::readClassStream() const +TQString KLaola::Node::readClassStream() const { if (isDirectory()) - return QString::null; + return TQString(); if (m_prefix == CLSID) { myFile file; unsigned i; - QString clsid; + TQString clsid; // CLSID format is: 00020900-0000-0000-C000-000000000046 file = m_laola->stream(this); for (i = 0; i < 4; i++) { - clsid += QString::number((file.data[i] >> 4) & 0xf, 16); - clsid += QString::number(file.data[i] & 0xf, 16); + clsid += TQString::number((file.data[i] >> 4) & 0xf, 16); + clsid += TQString::number(file.data[i] & 0xf, 16); } clsid += '-'; for (; i < 6; i++) { - clsid += QString::number((file.data[i] >> 4) & 0xf, 16); - clsid += QString::number(file.data[i] & 0xf, 16); + clsid += TQString::number((file.data[i] >> 4) & 0xf, 16); + clsid += TQString::number(file.data[i] & 0xf, 16); } clsid += '-'; for (; i < 8; i++) { - clsid += QString::number((file.data[i] >> 4) & 0xf, 16); - clsid += QString::number(file.data[i] & 0xf, 16); + clsid += TQString::number((file.data[i] >> 4) & 0xf, 16); + clsid += TQString::number(file.data[i] & 0xf, 16); } clsid += '-'; for (; i < 10; i++) { - clsid += QString::number((file.data[i] >> 4) & 0xf, 16); - clsid += QString::number(file.data[i] & 0xf, 16); + clsid += TQString::number((file.data[i] >> 4) & 0xf, 16); + clsid += TQString::number(file.data[i] & 0xf, 16); } clsid += '-'; for (; i < 16; i++) { - clsid += QString::number((file.data[i] >> 4) & 0xf, 16); - clsid += QString::number(file.data[i] & 0xf, 16); + clsid += TQString::number((file.data[i] >> 4) & 0xf, 16); + clsid += TQString::number(file.data[i] & 0xf, 16); } return clsid; } - return QString::null; + return TQString(); } diff --git a/filters/olefilters/lib/klaola.h b/filters/olefilters/lib/klaola.h index 816a7666..b292716f 100644 --- a/filters/olefilters/lib/klaola.h +++ b/filters/olefilters/lib/klaola.h @@ -28,8 +28,8 @@ DESCRIPTION #define KLAOLA_H #include <myfile.h> -#include <qstring.h> -#include <qptrlist.h> +#include <tqstring.h> +#include <tqptrlist.h> class KLaola { @@ -45,7 +45,7 @@ public: public: virtual ~OLENode() {}; virtual unsigned handle() const = 0; - virtual QString name() const = 0; + virtual TQString name() const = 0; // Does the node represent a stream datum, or a storage container // of data? @@ -53,27 +53,27 @@ public: // If isDirectory() is true, return the CLSID associated with // any child CompObj node. If the Node is a CompObj, return - // its CLSID. Otherwise return QString::null. + // its CLSID. Otherwise return TQString(). // // The CLSID is returned in the form: // // 00020900-0000-0000-C000-000000000046 // - virtual QString readClassStream() const = 0; + virtual TQString readClassStream() const = 0; // Return a human-readable description of a stream. - virtual QString describe() const = 0; + virtual TQString describe() const = 0; protected: OLENode() {} }; // Wade through the "file system" - typedef QPtrList<OLENode> NodeList; + typedef TQPtrList<OLENode> NodeList; NodeList parseRootDir(); NodeList parseCurrentDir(); const NodeList currentPath() const; - const NodeList find(const QString &name, bool onlyCurrentDir=false); + const NodeList tqfind(const TQString &name, bool onlyCurrentDir=false); bool enterDir(const OLENode *node); bool leaveDir(); @@ -107,7 +107,7 @@ private: // Dump the parsed structure info (similar to "lls" // of the LAOLA-project). - void testIt(QString prefix = ""); + void testIt(TQString prefix = ""); public: typedef enum @@ -124,7 +124,7 @@ public: CLSID, OLE_MANAGED_2, PARENT_MANAGED, // Marks an element as owned by the code that - // manages the parent storage of that element. + // manages the tqparent storage of that element. STRUCTURED_STORAGE, // For the exclusive use of the Structured Storage // implementation. RESERVED_FIRST, @@ -137,15 +137,15 @@ public: Node(KLaola *laola) { m_laola = laola; } ~Node() {} unsigned handle() const { return m_handle; } - QString name() const; + TQString name() const; bool isDirectory() const { return (type == DIRECTORY) || (type == ROOT_ENTRY); } - QString readClassStream() const; - QString describe() const; + TQString readClassStream() const; + TQString describe() const; KLaola *m_laola; unsigned m_handle; // PPS entry number Prefix m_prefix; - QString m_name; + TQString m_name; NodeType type; int prevHandle; // Last pps int nextHandle; // Next pps @@ -173,8 +173,8 @@ private: Node *node; short subtree; }; - typedef QPtrList<TreeNode> SubTree; - QPtrList<SubTree> m_nodeTree; + typedef TQPtrList<TreeNode> SubTree; + TQPtrList<SubTree> m_nodeTree; bool ok; // is the file OK? diff --git a/filters/olefilters/lib/myfile.h b/filters/olefilters/lib/myfile.h index 7be578b3..22d35283 100644 --- a/filters/olefilters/lib/myfile.h +++ b/filters/olefilters/lib/myfile.h @@ -25,9 +25,9 @@ DESCRIPTION #ifndef MYFILE_H #define MYFILE_H -#include <qcstring.h> +#include <tqcstring.h> -class myFile: public QByteArray +class myFile: public TQByteArray { public: myFile() { data = 0L; length = 0; } @@ -43,7 +43,7 @@ public: { this->data = data; this->length = length; - QByteArray::setRawData((const char *)data, length); + TQByteArray::setRawData((const char *)data, length); } }; #endif // MYFILE_H diff --git a/filters/olefilters/olefilter.cc b/filters/olefilters/olefilter.cc index 3d671ecb..ff40cd72 100644 --- a/filters/olefilters/olefilter.cc +++ b/filters/olefilters/olefilter.cc @@ -19,13 +19,13 @@ DESCRIPTION When reading, the point of this module is toperform a depth-first traversal - of an OLE file. This ensures that a parent object is processed only after + of an OLE file. This ensures that a tqparent object is processed only after its child objects have been processed. */ #include <olefilter.h> -#include <qfile.h> +#include <tqfile.h> #include <ktempfile.h> #include <kgenericfactory.h> #include <kmimetype.h> @@ -55,7 +55,7 @@ protected: K_EXPORT_COMPONENT_FACTORY( libolefilter, OLEFilterFactory() ) -OLEFilter::OLEFilter(KoFilter *, const char *, const QStringList&) : +OLEFilter::OLEFilter(KoFilter *, const char *, const TQStringList&) : KoEmbeddingFilter(), numPic( 0 ), docfile( 0 ), m_embeddeeData( 0 ), m_embeddeeLength( 0 ), success( true ) @@ -69,7 +69,7 @@ OLEFilter::~OLEFilter() delete docfile; } -KoFilter::ConversionStatus OLEFilter::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus OLEFilter::convert( const TQCString& from, const TQCString& to ) { if(to!="application/x-kword" && to!="application/x-kspread" && @@ -83,7 +83,7 @@ KoFilter::ConversionStatus OLEFilter::convert( const QCString& from, const QCStr from!="application/x-hancomword") return KoFilter::NotImplemented; - QFile in(m_chain->inputFile()); + TQFile in(m_chain->inputFile()); if(!in.open(IO_ReadOnly)) { kdError(s_area) << "OLEFilter::filter(): Unable to open input" << endl; in.close(); @@ -118,16 +118,16 @@ void OLEFilter::commSlotDelayStream( const char* delay ) emit internalCommDelayStream( delay ); } -void OLEFilter::commSlotShapeID( unsigned int& shapeID ) +void OLEFilter::commSlotShapeID( unsigned int& tqshapeID ) { - emit internalCommShapeID( shapeID ); + emit internalCommShapeID( tqshapeID ); } void OLEFilter::slotSavePart( - const QString &nameIN, - QString &storageId, - QString &mimeType, - const QString &extension, + const TQString &nameIN, + TQString &storageId, + TQString &mimeType, + const TQString &extension, unsigned int length, const char *data) { @@ -140,7 +140,7 @@ void OLEFilter::slotSavePart( { // The part is already there, this is a lookup operation // -> return the part id. - storageId = QString::number( id ); + storageId = TQString::number( id ); mimeType = internalPartMimeType( nameIN ); } else @@ -149,13 +149,13 @@ void OLEFilter::slotSavePart( m_embeddeeData = data; m_embeddeeLength = length; - QString srcMime( KoEmbeddingFilter::mimeTypeByExtension( extension ) ); + TQString srcMime( KoEmbeddingFilter::mimeTypeByExtension( extension ) ); if ( srcMime == KMimeType::defaultMimeType() ) kdWarning( s_area ) << "Couldn't determine the mimetype from the extension" << endl; - KoFilter::ConversionStatus status; - QCString destMime( mimeType.latin1() ); - storageId = QString::number( embedPart( srcMime.latin1(), destMime, status, nameIN ) ); + KoFilter::ConversiontqStatus status; + TQCString destMime( mimeType.latin1() ); + storageId = TQString::number( embedPart( srcMime.latin1(), destMime, status, nameIN ) ); // copy back what the method returned mimeType = destMime; @@ -170,18 +170,18 @@ void OLEFilter::slotSavePart( } void OLEFilter::slotSaveDocumentInformation( - const QString &fullName, - const QString &title, - const QString &company, - const QString &email, - const QString &telephone, - const QString &fax, - const QString &postalCode, - const QString &country, - const QString &city, - const QString &street, - const QString &docTitle, - const QString &docAbstract) + const TQString &fullName, + const TQString &title, + const TQString &company, + const TQString &email, + const TQString &telephone, + const TQString &fax, + const TQString &postalCode, + const TQString &country, + const TQString &city, + const TQString &street, + const TQString &docTitle, + const TQString &docAbstract) { KoDocumentInfo *info = new KoDocumentInfo(); KoDocumentInfoAuthor *author = static_cast<KoDocumentInfoAuthor *>(info->page("author")); @@ -207,26 +207,26 @@ void OLEFilter::slotSaveDocumentInformation( return; } - QCString data = info->save().toCString(); + TQCString data = info->save().toCString(); // Important: don't use data.length() here. It's slow, and dangerous (in case of a '\0' somewhere) // The -1 is because we don't want to write the final \0. - Q_LONG length = data.size()-1; + TQ_LONG length = data.size()-1; if(docInfo->writeBlock(data, length) != length) kdError(s_area) << "OLEFilter::slotSaveDocumentInformation(): Could not write to KoStore!" << endl; } void OLEFilter::slotSavePic( - const QString &nameIN, - QString &storageId, - const QString &extension, + const TQString &nameIN, + TQString &storageId, + const TQString &extension, unsigned int length, const char *data) { if(nameIN.isEmpty()) return; - QMap<QString, QString>::ConstIterator it = imageMap.find(nameIN); + TQMap<TQString, TQString>::ConstIterator it = imageMap.tqfind(nameIN); if (it != imageMap.end()) // The key is already here - return the part id. @@ -234,7 +234,7 @@ void OLEFilter::slotSavePic( else { // It's not here, so let's generate one. - storageId = QString( "pictures/picture%1.%2" ).arg( numPic++ ).arg( extension ); + storageId = TQString( "pictures/picture%1.%2" ).tqarg( numPic++ ).tqarg( extension ); imageMap.insert(nameIN, storageId); KoStoreDevice* pic = m_chain->storageFile( storageId, KoStore::Write ); if(!pic) @@ -253,9 +253,9 @@ void OLEFilter::slotSavePic( // ##### Only used for lookup now! void OLEFilter::slotPart( - const QString& nameIN, - QString &storageId, - QString &mimeType) + const TQString& nameIN, + TQString &storageId, + TQString &mimeType) { if (nameIN.isEmpty()) return; @@ -265,7 +265,7 @@ void OLEFilter::slotPart( if (id != -1) { // The key is already here - return the part id. - storageId = QString::number( id ); + storageId = TQString::number( id ); mimeType = internalPartMimeType( nameIN ); } else @@ -280,11 +280,11 @@ void OLEFilter::slotGetStream(const int &handle, myFile &stream) { // I can't guarantee that you get the right stream as the names // in a OLE 2 file are not unique! (searching only the current dir!) // Don't forget the delete [] the stream.data ptr! -void OLEFilter::slotGetStream(const QString &name, myFile &stream) { +void OLEFilter::slotGetStream(const TQString &name, myFile &stream) { KLaola::NodeList handle; - handle=docfile->find(name, true); // search only in current dir! + handle=docfile->tqfind(name, true); // search only in current dir! if (handle.count()==1) stream=docfile->stream(handle.at(0)); @@ -294,14 +294,14 @@ void OLEFilter::slotGetStream(const QString &name, myFile &stream) { } } -void OLEFilter::savePartContents( QIODevice* file ) +void OLEFilter::savePartContents( TQIODevice* file ) { if ( m_embeddeeData != 0 && m_embeddeeLength != 0 ) file->writeBlock( m_embeddeeData, m_embeddeeLength ); } // The recursive method to do all the work -void OLEFilter::convert( const QCString& mimeTypeHint ) +void OLEFilter::convert( const TQCString& mimeTypeHint ) { KLaola::NodeList list=docfile->parseCurrentDir(); KLaola::OLENode *node; @@ -318,7 +318,7 @@ void OLEFilter::convert( const QCString& mimeTypeHint ) else { // Get the storage name of the part (dirname==key), and associate the // mimeType with it for later use. - QCString mimeHint( mimeTypeHelper() ); + TQCString mimeHint( mimeTypeHelper() ); if ( mimeHint.isEmpty() ) mimeHint = "application/x-kword"; // will be converted to a dummy KWord part startInternalEmbedding( node->name(), mimeHint ); @@ -333,8 +333,8 @@ void OLEFilter::convert( const QCString& mimeTypeHint ) } if(!onlyDirs) { - QStringList nodeNames; - QCString mimeType; + TQStringList nodeNames; + TQCString mimeType; if ( !mimeTypeHint.isEmpty() ) mimeType = mimeTypeHint; else @@ -348,30 +348,30 @@ void OLEFilter::convert( const QCString& mimeTypeHint ) myFile main; KLaola::NodeList tmp; - tmp=docfile->find("WordDocument", true); + tmp=docfile->tqfind("WordDocument", true); if(tmp.count()==1) { // okay, not a dummy main=docfile->stream(tmp.at(0)); myFile table0, table1, data; - tmp=docfile->find("0Table", true); + tmp=docfile->tqfind("0Table", true); if(tmp.count()==1) table0=docfile->stream(tmp.at(0)); - tmp=docfile->find("1Table", true); + tmp=docfile->tqfind("1Table", true); if(tmp.count()==1) table1=docfile->stream(tmp.at(0)); - tmp=docfile->find("Data", true); + tmp=docfile->tqfind("Data", true); if(tmp.count()==1) data=docfile->stream(tmp.at(0)); myFilter=new WordFilter(main, table0, table1, data); // forward the internal communication calls - connect( this, SIGNAL( internalCommShapeID( unsigned int& ) ), myFilter, SIGNAL( internalCommShapeID( unsigned int& ) ) ); - connect( this, SIGNAL( internalCommDelayStream( const char* ) ), myFilter, SIGNAL( internalCommDelayStream( const char* ) ) ); + connect( this, TQT_SIGNAL( internalCommShapeID( unsigned int& ) ), myFilter, TQT_SIGNAL( internalCommShapeID( unsigned int& ) ) ); + connect( this, TQT_SIGNAL( internalCommDelayStream( const char* ) ), myFilter, TQT_SIGNAL( internalCommDelayStream( const char* ) ) ); } } else if ( mimeType == "application/x-kspread" ) { @@ -380,11 +380,11 @@ void OLEFilter::convert( const QCString& mimeTypeHint ) myFile workbook; KLaola::NodeList tmp; - tmp = docfile->find( "Workbook", true ); + tmp = docfile->tqfind( "Workbook", true ); if ( tmp.count() == 1 ) workbook = docfile->stream( tmp.at( 0 ) ); else { - tmp = docfile->find( "Book", true ); + tmp = docfile->tqfind( "Book", true ); if ( tmp.count() == 1 ) workbook = docfile->stream( tmp.at( 0 ) ); } @@ -398,23 +398,23 @@ void OLEFilter::convert( const QCString& mimeTypeHint ) myFile main, currentUser, pictures, summary, documentSummary; KLaola::NodeList tmp; - tmp=docfile->find("PowerPoint Document", true); + tmp=docfile->tqfind("PowerPoint Document", true); if(tmp.count()==1) main=docfile->stream(tmp.at(0)); - tmp=docfile->find("Current User", true); + tmp=docfile->tqfind("Current User", true); if(tmp.count()==1) currentUser=docfile->stream(tmp.at(0)); - tmp=docfile->find("Pictures", true); + tmp=docfile->tqfind("Pictures", true); if(tmp.count()==1) pictures=docfile->stream(tmp.at(0)); - tmp=docfile->find("SummaryInformation", true); + tmp=docfile->tqfind("SummaryInformation", true); if(tmp.count()==1) summary=docfile->stream(tmp.at(0)); - tmp=docfile->find("DocumentSummaryInformation", true); + tmp=docfile->tqfind("DocumentSummaryInformation", true); if(tmp.count()==1) documentSummary=docfile->stream(tmp.at(0)); @@ -426,7 +426,7 @@ void OLEFilter::convert( const QCString& mimeTypeHint ) myFile prvText; KLaola::NodeList tmp; - tmp = docfile->find( "PrvText", true ); + tmp = docfile->tqfind( "PrvText", true ); if( tmp.count() == 1 ) prvText = docfile->stream( tmp.at( 0 ) ); myFilter = new HancomWordFilter( prvText ); @@ -451,9 +451,9 @@ void OLEFilter::convert( const QCString& mimeTypeHint ) // Launch the filtering process... success=myFilter->filter(); // ...and fetch the file - QCString file; + TQCString file; if(!myFilter->plainString()) { - const QDomDocument * const part=myFilter->part(); + const TQDomDocument * const part=myFilter->part(); file=part->toCString(); } else @@ -467,7 +467,7 @@ void OLEFilter::convert( const QCString& mimeTypeHint ) } // Write it to the gzipped tar file - bool ret = dev->writeBlock(file.data(), file.size()-1) == static_cast<Q_LONG>( file.size() - 1 ); + bool ret = dev->writeBlock(file.data(), file.size()-1) == static_cast<TQ_LONG>( file.size() - 1 ); if (!ret) kdError(s_area) << "OLEFilter::slotSavePic(): Could not write to KoStore!" << endl; delete myFilter; @@ -475,32 +475,32 @@ void OLEFilter::convert( const QCString& mimeTypeHint ) } void OLEFilter::connectCommon(FilterBase **myFilter) { - QObject::connect( + TQObject::connect( *myFilter, - SIGNAL(signalSaveDocumentInformation(const QString &, const QString &, const QString &, const QString &, const QString &, const QString &, const QString &, const QString &, const QString &, const QString &, const QString &, const QString &)), + TQT_SIGNAL(signalSaveDocumentInformation(const TQString &, const TQString &, const TQString &, const TQString &, const TQString &, const TQString &, const TQString &, const TQString &, const TQString &, const TQString &, const TQString &, const TQString &)), this, - SLOT(slotSaveDocumentInformation(const QString &, const QString &, const QString &, const QString &, const QString &, const QString &, const QString &, const QString &, const QString &, const QString &, const QString &, const QString &))); + TQT_SLOT(slotSaveDocumentInformation(const TQString &, const TQString &, const TQString &, const TQString &, const TQString &, const TQString &, const TQString &, const TQString &, const TQString &, const TQString &, const TQString &, const TQString &))); - QObject::connect( + TQObject::connect( *myFilter, - SIGNAL(signalSavePic(const QString &, QString &, const QString &, unsigned int, const char *)), + TQT_SIGNAL(signalSavePic(const TQString &, TQString &, const TQString &, unsigned int, const char *)), this, - SLOT(slotSavePic(const QString &, QString &, const QString &, unsigned int, const char *))); - QObject::connect( + TQT_SLOT(slotSavePic(const TQString &, TQString &, const TQString &, unsigned int, const char *))); + TQObject::connect( *myFilter, - SIGNAL(signalSavePart(const QString &, QString &, QString &, const QString &, unsigned int, const char *)), + TQT_SIGNAL(signalSavePart(const TQString &, TQString &, TQString &, const TQString &, unsigned int, const char *)), this, - SLOT(slotSavePart(const QString &, QString &, QString &, const QString &, unsigned int, const char *))); - QObject::connect(*myFilter, SIGNAL(signalPart(const QString&, QString &, QString &)), - this, SLOT(slotPart(const QString&, QString &, QString &))); - QObject::connect(*myFilter, SIGNAL(signalGetStream(const int &, myFile &)), this, - SLOT(slotGetStream(const int &, myFile &))); - QObject::connect(*myFilter, SIGNAL(signalGetStream(const QString &, myFile &)), this, - SLOT(slotGetStream(const QString &, myFile &))); - QObject::connect(*myFilter, SIGNAL(sigProgress(int)), this, SIGNAL(sigProgress(int))); + TQT_SLOT(slotSavePart(const TQString &, TQString &, TQString &, const TQString &, unsigned int, const char *))); + TQObject::connect(*myFilter, TQT_SIGNAL(signalPart(const TQString&, TQString &, TQString &)), + this, TQT_SLOT(slotPart(const TQString&, TQString &, TQString &))); + TQObject::connect(*myFilter, TQT_SIGNAL(signalGetStream(const int &, myFile &)), this, + TQT_SLOT(slotGetStream(const int &, myFile &))); + TQObject::connect(*myFilter, TQT_SIGNAL(signalGetStream(const TQString &, myFile &)), this, + TQT_SLOT(slotGetStream(const TQString &, myFile &))); + TQObject::connect(*myFilter, TQT_SIGNAL(sigProgress(int)), this, TQT_SIGNAL(sigProgress(int))); } -QCString OLEFilter::mimeTypeHelper() +TQCString OLEFilter::mimeTypeHelper() { KLaola::NodeList list = docfile->parseCurrentDir(); KLaola::OLENode* node = list.first(); diff --git a/filters/olefilters/olefilter.h b/filters/olefilters/olefilter.h index a1509973..0be2a8ba 100644 --- a/filters/olefilters/olefilter.h +++ b/filters/olefilters/olefilter.h @@ -33,38 +33,39 @@ class KoStore; class OLEFilter : public KoEmbeddingFilter { Q_OBJECT + TQ_OBJECT public: - OLEFilter(KoFilter *parent, const char *name, const QStringList&); + OLEFilter(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~OLEFilter(); - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); public slots: void commSlotDelayStream( const char* delay ); - void commSlotShapeID( unsigned int& shapeID ); + void commSlotShapeID( unsigned int& tqshapeID ); protected slots: // This slot saves the document informations to the KOffice tar storage. void slotSaveDocumentInformation( - const QString &fullName, - const QString &title, - const QString &company, - const QString &email, - const QString &telephone, - const QString &fax, - const QString &postalCode, - const QString &country, - const QString &city, - const QString &street, - const QString &docTitle, - const QString &docAbstract); + const TQString &fullName, + const TQString &title, + const TQString &company, + const TQString &email, + const TQString &telephone, + const TQString &fax, + const TQString &postalCode, + const TQString &country, + const TQString &city, + const TQString &street, + const TQString &docTitle, + const TQString &docAbstract); // This slot saves an embedded Picture to the KOffice tar storage. void slotSavePic( - const QString &nameIN, - QString &storageId, - const QString &extension, + const TQString &nameIN, + TQString &storageId, + const TQString &extension, unsigned int length, const char *data); @@ -73,19 +74,19 @@ protected slots: // that we want to handle as parts rather than using slotSavePic() since OLE // objects are handled by us, and a filter need only call slotPart(). void slotSavePart( - const QString &nameIN, - QString &storageId, - QString &mimeType, - const QString &extension, + const TQString &nameIN, + TQString &storageId, + TQString &mimeType, + const TQString &extension, unsigned int length, const char *data); // Generate a name for a new part to store it in the KOffice tar storage, // or find the name and type of an existing one. void slotPart( - const QString &nameIN, - QString &storageId, - QString &mimeType); + const TQString &nameIN, + TQString &storageId, + TQString &mimeType); // Get another OLE 2 stream for your filter. // Attention: You'll have to delete [] the stream.data ptr! @@ -95,11 +96,11 @@ protected slots: // as the stream names are NOT unique in the OLE 2 file!!! // (Therefore it's searching only in the current dir) // Attention: You'll have to delete [] the stream.data ptr! - void slotGetStream(const QString &name, myFile &stream); + void slotGetStream(const TQString &name, myFile &stream); signals: // Forwarding signals for inter-filter communication - void internalCommShapeID( unsigned int& shapeID ); + void internalCommShapeID( unsigned int& tqshapeID ); void internalCommDelayStream( const char* delay ); private: @@ -108,13 +109,13 @@ private: const OLEFilter &operator=(const OLEFilter &); // Template method, triggered by embedPart calls - virtual void savePartContents( QIODevice* file ); + virtual void savePartContents( TQIODevice* file ); - void convert( const QCString& mimeTypeHint ); + void convert( const TQCString& mimeTypeHint ); void connectCommon(FilterBase **myFilter); - QCString mimeTypeHelper(); + TQCString mimeTypeHelper(); - QMap<QString, QString> imageMap; + TQMap<TQString, TQString> imageMap; myFile olefile; int numPic; // for the "unique name generation" diff --git a/filters/olefilters/powerpoint97/powerpoint.cc b/filters/olefilters/powerpoint97/powerpoint.cc index f01c71c7..b240a690 100644 --- a/filters/olefilters/powerpoint97/powerpoint.cc +++ b/filters/olefilters/powerpoint97/powerpoint.cc @@ -40,15 +40,15 @@ Powerpoint::~Powerpoint() void Powerpoint::invokeHandler( Header &op, - Q_UINT32 bytes, - QDataStream &operands) + TQ_UINT32 bytes, + TQDataStream &operands) { - typedef void (Powerpoint::*method)(Header &op, Q_UINT32 bytes, QDataStream &operands); + typedef void (Powerpoint::*method)(Header &op, TQ_UINT32 bytes, TQDataStream &operands); typedef struct { const char *name; - Q_UINT16 opcode; + TQ_UINT16 opcode; method handler; } opcodeEntry; @@ -104,9 +104,9 @@ void Powerpoint::invokeHandler( { "EXPLAINATOM", 4039, 0 /* &Powerpoint::opExPlainAtom */ }, { "EXPLAINLINK", 4054, 0 /* &Powerpoint::opExPlainLink */ }, { "EXPLAINLINKATOM", 4036, 0 /* &Powerpoint::opExPlainLinkAtom */ }, - { "EXQUICKTIME", 4073, 0 /* &Powerpoint::opExQuickTime */ }, - { "EXQUICKTIMEMOVIE", 4074, 0 /* &Powerpoint::opExQuickTimeMovie */ }, - { "EXQUICKTIMEMOVIEDATA", 4075, 0 /* &Powerpoint::opExQuickTimeMovieData */ }, + { "EXTQUICKTIME", 4073, 0 /* &Powerpoint::opExQuickTime */ }, + { "EXTQUICKTIMEMOVIE", 4074, 0 /* &Powerpoint::opExQuickTimeMovie */ }, + { "EXTQUICKTIMEMOVIEDATA", 4075, 0 /* &Powerpoint::opExQuickTimeMovieData */ }, { "EXSUBSCRIPTION", 4076, 0 /* &Powerpoint::opExSubscription */ }, { "EXSUBSCRIPTIONSECTION", 4077, 0 /* &Powerpoint::opExSubscriptionSection */ }, { "EXTERNALOBJECT", 4027, 0 /* &Powerpoint::opExternalObject */ }, @@ -265,19 +265,19 @@ void Powerpoint::invokeHandler( if (bytes) { - QByteArray *record = new QByteArray(bytes); - QDataStream *body; + TQByteArray *record = new TQByteArray(bytes); + TQDataStream *body; operands.readRawBytes(record->data(), bytes); - body = new QDataStream(*record, IO_ReadOnly); - body->setByteOrder(QDataStream::LittleEndian); + body = new TQDataStream(*record, IO_ReadOnly); + body->setByteOrder(TQDataStream::LittleEndian); (this->*result)(op, bytes, *body); delete body; delete record; } else { - QDataStream *body = new QDataStream(); + TQDataStream *body = new TQDataStream(); (this->*result)(op, bytes, *body); delete body; @@ -331,19 +331,19 @@ bool Powerpoint::parse( void Powerpoint::opColorSchemeAtom( Header & /* op */, - Q_UINT32, - QDataStream &operands) + TQ_UINT32, + TQDataStream &operands) { struct { - Q_UINT32 background; - Q_UINT32 textAndLines; - Q_UINT32 shadows; - Q_UINT32 titleText; - Q_UINT32 fills; - Q_UINT32 accent; - Q_UINT32 accentAndHyperlink; - Q_UINT32 accentAndFollowedHyperlink; + TQ_UINT32 background; + TQ_UINT32 textAndLines; + TQ_UINT32 shadows; + TQ_UINT32 titleText; + TQ_UINT32 fills; + TQ_UINT32 accent; + TQ_UINT32 accentAndHyperlink; + TQ_UINT32 accentAndFollowedHyperlink; } data; operands >> data.background >> data.textAndLines >> data.shadows >> @@ -356,15 +356,15 @@ void Powerpoint::opColorSchemeAtom( // void Powerpoint::opCString( Header & /* op */, - Q_UINT32 bytes, - QDataStream &operands) + TQ_UINT32 bytes, + TQDataStream &operands) { - QString value; + TQString value; unsigned i; for (i = 0; i < bytes / 2; i++) { - Q_UINT16 tmp; + TQ_UINT16 tmp; operands >> tmp; value += tmp; @@ -374,11 +374,11 @@ void Powerpoint::opCString( void Powerpoint::opCurrentUserAtom( Header & /* op */, - Q_UINT32 /*bytes*/, - QDataStream &operands) + TQ_UINT32 /*bytes*/, + TQDataStream &operands) { - const Q_UINT32 MAGIC_NUMBER = (Q_UINT32)(-476987297); + const TQ_UINT32 MAGIC_NUMBER = (TQ_UINT32)(-476987297); //unsigned i; operands >> mCurrentUserAtom.size >> mCurrentUserAtom.magic >> mCurrentUserAtom.offsetToCurrentEdit >> @@ -429,31 +429,31 @@ void Powerpoint::opCurrentUserAtom( void Powerpoint::opDocument( Header & /* op */, - Q_UINT32 bytes, - QDataStream &operands) + TQ_UINT32 bytes, + TQDataStream &operands) { walk(bytes, operands); } void Powerpoint::opDocumentAtom( Header & /* op */, - Q_UINT32 /*bytes*/, - QDataStream &/*operands*/) + TQ_UINT32 /*bytes*/, + TQDataStream &/*operands*/) { } void Powerpoint::opEndDocument( Header & /* op */, - Q_UINT32 bytes, - QDataStream &operands) + TQ_UINT32 bytes, + TQDataStream &operands) { walk(bytes, operands); } void Powerpoint::opEnvironment( Header & /* op */, - Q_UINT32 bytes, - QDataStream &operands) + TQ_UINT32 bytes, + TQDataStream &operands) { walk(bytes, operands); } @@ -464,8 +464,8 @@ void Powerpoint::opEnvironment( // void Powerpoint::opExEmbed( Header & /* op */, - Q_UINT32 bytes, - QDataStream &operands) + TQ_UINT32 bytes, + TQDataStream &operands) { walk(bytes, operands); } @@ -475,15 +475,15 @@ void Powerpoint::opExEmbed( // void Powerpoint::opExEmbedAtom( Header & /* op */, - Q_UINT32, - QDataStream &operands) + TQ_UINT32, + TQDataStream &operands) { struct { - Q_INT32 followColorScheme; - Q_UINT8 cantLockServerB; - Q_UINT8 noSizeToServerB; - Q_UINT8 isTable; + TQ_INT32 followColorScheme; + TQ_UINT8 cantLockServerB; + TQ_UINT8 noSizeToServerB; + TQ_UINT8 isTable; } data; operands >> data.followColorScheme; @@ -494,54 +494,54 @@ void Powerpoint::opExEmbedAtom( void Powerpoint::opFontCollection( Header & /* op */, - Q_UINT32 bytes, - QDataStream &operands) + TQ_UINT32 bytes, + TQDataStream &operands) { walk(bytes, operands); } void Powerpoint::opFontEntityAtom( Header & /* op */, - Q_UINT32 /*bytes*/, - QDataStream &/*operands*/) + TQ_UINT32 /*bytes*/, + TQDataStream &/*operands*/) { } void Powerpoint::opHeadersFooters( Header & /* op */, - Q_UINT32 bytes, - QDataStream &operands) + TQ_UINT32 bytes, + TQDataStream &operands) { walk(bytes, operands); } void Powerpoint::opHeadersFootersAtom( Header & /* op */, - Q_UINT32 /*bytes*/, - QDataStream &/*operands*/) + TQ_UINT32 /*bytes*/, + TQDataStream &/*operands*/) { } void Powerpoint::opList( Header & /* op */, - Q_UINT32 bytes, - QDataStream &operands) + TQ_UINT32 bytes, + TQDataStream &operands) { walk(bytes, operands); } void Powerpoint::opMainMaster( Header & /* op */, - Q_UINT32 bytes, - QDataStream &operands) + TQ_UINT32 bytes, + TQDataStream &operands) { walk(bytes, operands); } void Powerpoint::opMsod( Header & /* op */, - Q_UINT32 bytes, - QDataStream &operands) + TQ_UINT32 bytes, + TQDataStream &operands) { char *data; @@ -561,21 +561,21 @@ kdError() <<" drgid: "<< m_pptSlide->getPsrReference() << endl; void Powerpoint::opNotes( Header & /* op */, - Q_UINT32 bytes, - QDataStream &operands) + TQ_UINT32 bytes, + TQDataStream &operands) { walk(bytes, operands); } void Powerpoint::opNotesAtom( Header & /* op */, - Q_UINT32 /*bytes*/, - QDataStream &operands) + TQ_UINT32 /*bytes*/, + TQDataStream &operands) { struct { - Q_INT32 slideId; // Id for the corresponding slide. - Q_UINT16 flags; + TQ_INT32 slideId; // Id for the corresponding slide. + TQ_UINT16 flags; } data; operands >> data.slideId >> data.flags; @@ -586,8 +586,8 @@ void Powerpoint::opNotesAtom( // void Powerpoint::opExObjList( Header & /* op */, - Q_UINT32 bytes, - QDataStream &operands) + TQ_UINT32 bytes, + TQDataStream &operands) { walk(bytes, operands); } @@ -597,10 +597,10 @@ void Powerpoint::opExObjList( // void Powerpoint::opExObjListAtom( Header & /* op */, - Q_UINT32, - QDataStream &operands) + TQ_UINT32, + TQDataStream &operands) { - Q_UINT32 objectSeedId; + TQ_UINT32 objectSeedId; operands >> objectSeedId; kdDebug(s_area) << "next OLE obj id: " << objectSeedId << endl; @@ -608,30 +608,30 @@ void Powerpoint::opExObjListAtom( void Powerpoint::opExObjRefAtom( Header & /* op */, - Q_UINT32 /*bytes*/, - QDataStream &/*operands*/) + TQ_UINT32 /*bytes*/, + TQDataStream &/*operands*/) { } void Powerpoint::opExOleObj( Header & /* op */, - Q_UINT32 /*bytes*/, - QDataStream &/*operands*/) + TQ_UINT32 /*bytes*/, + TQDataStream &/*operands*/) { } void Powerpoint::opExOleObjAtom( Header & /* op */, - Q_UINT32 /*bytes*/, - QDataStream &operands) + TQ_UINT32 /*bytes*/, + TQDataStream &operands) { struct { - Q_UINT32 drawAspect; - Q_INT32 type; - Q_INT32 objID; - Q_INT32 subType; - Q_INT8 isBlank; + TQ_UINT32 drawAspect; + TQ_INT32 type; + TQ_INT32 objID; + TQ_INT32 subType; + TQ_INT8 isBlank; } data; operands >> data.drawAspect; @@ -645,26 +645,26 @@ void Powerpoint::opExOleObjAtom( void Powerpoint::opExOleObjStg( Header & /* op */, - Q_UINT32 /*bytes*/, - QDataStream &/*operands*/) + TQ_UINT32 /*bytes*/, + TQDataStream &/*operands*/) { } void Powerpoint::opOutlineViewInfo( Header & /* op */, - Q_UINT32 bytes, - QDataStream &operands) + TQ_UINT32 bytes, + TQDataStream &operands) { walk(bytes, operands); } void Powerpoint::opPersistPtrIncrementalBlock2( Header & /* op */, - Q_UINT32 /*bytes*/, - QDataStream &/*operands*/) + TQ_UINT32 /*bytes*/, + TQDataStream &/*operands*/) { //PSR_UserEditAtom userEdit; - //Q_INT16 offsetToEdit = mCurrentUserAtom.offsetToCurrentEdit; + //TQ_INT16 offsetToEdit = mCurrentUserAtom.offsetToCurrentEdit; /* huh? while(0 < offsetToEdit) @@ -678,23 +678,23 @@ void Powerpoint::opPersistPtrIncrementalBlock2( void Powerpoint::opPersistPtrIncrementalBlock( Header & /* op */, - Q_UINT32 bytes, - QDataStream &operands) + TQ_UINT32 bytes, + TQDataStream &operands) { struct { union { - Q_UINT32 info; + TQ_UINT32 info; struct { - Q_UINT32 offsetNumber: 20; - Q_UINT32 offsetCount: 12; + TQ_UINT32 offsetNumber: 20; + TQ_UINT32 offsetCount: 12; } fields; } header; - Q_UINT32 offset; + TQ_UINT32 offset; } data; - Q_UINT32 length = 0; + TQ_UINT32 length = 0; while (length < bytes) { @@ -724,7 +724,7 @@ void Powerpoint::opPersistPtrIncrementalBlock( // Create a record of this persistent reference. - if (m_persistentReferences.end() == m_persistentReferences.find(reference)) + if (m_persistentReferences.end() == m_persistentReferences.tqfind(reference)) { if(reference < 5) { @@ -753,44 +753,44 @@ void Powerpoint::opPersistPtrIncrementalBlock( void Powerpoint::opPPDrawing( Header & /* op */, - Q_UINT32 bytes, - QDataStream &operands) + TQ_UINT32 bytes, + TQDataStream &operands) { walk(bytes, operands); } void Powerpoint::opPPDrawingGroup( Header & /* op */, - Q_UINT32 bytes, - QDataStream &operands) + TQ_UINT32 bytes, + TQDataStream &operands) { walk(bytes, operands); } void Powerpoint::opSlide( Header & /* op */, - Q_UINT32 bytes, - QDataStream &operands) + TQ_UINT32 bytes, + TQDataStream &operands) { walk(bytes, operands); } void Powerpoint::opSlideAtom( Header & /* op */, - Q_UINT32 /*bytes*/, - QDataStream &operands) + TQ_UINT32 /*bytes*/, + TQDataStream &operands) { struct { - Q_UINT8 layout[12]; // Slide layout descriptor. - Q_INT32 masterId; // Id of the master of the slide. Zero for a master slide. - Q_INT32 notesId; // Id for the corresponding notes slide. Zero if slide has no notes. - Q_UINT16 flags; + TQ_UINT8 tqlayout[12]; // Slide tqlayout descriptor. + TQ_INT32 masterId; // Id of the master of the slide. Zero for a master slide. + TQ_INT32 notesId; // Id for the corresponding notes slide. Zero if slide has no notes. + TQ_UINT16 flags; } data; Header tmp; tmp.type = 1015; - tmp.length = sizeof(data.layout); + tmp.length = sizeof(data.tqlayout); invokeHandler(tmp, tmp.length, operands); operands >> data.masterId >> data.notesId >> data.flags; @@ -805,24 +805,24 @@ void Powerpoint::opSlideAtom( void Powerpoint::opSlideListWithText( Header & /* op */, - Q_UINT32 bytes, - QDataStream &operands) + TQ_UINT32 bytes, + TQDataStream &operands) { walk(bytes, operands); } void Powerpoint::opSlidePersistAtom( Header & /* op */, - Q_UINT32 /*bytes*/, - QDataStream &operands) + TQ_UINT32 /*bytes*/, + TQDataStream &operands) { struct { - Q_UINT32 psrReference; // Logical reference to the slide persist object. - Q_UINT32 flags; // If bit 3 set then slide contains shapes other than placeholders. - Q_INT32 numberTexts; // Number of placeholder texts stored with the persist object. - Q_INT32 slideId; // Unique slide identifier, used for OLE link monikers for example. - Q_UINT32 reserved; + TQ_UINT32 psrReference; // Logical reference to the slide persist object. + TQ_UINT32 flags; // If bit 3 set then slide contains tqshapes other than placeholders. + TQ_INT32 numberTexts; // Number of placeholder texts stored with the persist object. + TQ_INT32 slideId; // Unique slide identifier, used for OLE link monikers for example. + TQ_UINT32 reserved; } data; operands >> data.psrReference >> data.flags >> data.numberTexts >> @@ -855,31 +855,31 @@ void Powerpoint::opSlidePersistAtom( void Powerpoint::opSlideViewInfo( Header & /* op */, - Q_UINT32 bytes, - QDataStream &operands) + TQ_UINT32 bytes, + TQDataStream &operands) { walk(bytes, operands); } void Powerpoint::opSrKinsoku( Header & /* op */, - Q_UINT32 bytes, - QDataStream &operands) + TQ_UINT32 bytes, + TQDataStream &operands) { walk(bytes, operands); } void Powerpoint::opSSDocInfoAtom( Header & /* op */, - Q_UINT32 /*bytes*/, - QDataStream &/*operands*/) + TQ_UINT32 /*bytes*/, + TQDataStream &/*operands*/) { } void Powerpoint::opSSSlideLayoutAtom( Header & /* op */, - Q_UINT32 /*bytes*/, - QDataStream &operands) + TQ_UINT32 /*bytes*/, + TQDataStream &operands) { PSR_SSlideLayoutAtom data; @@ -906,18 +906,18 @@ void Powerpoint::opSSSlideLayoutAtom( //this is where we set bold/italic/etc and paragraph styles void Powerpoint::opStyleTextPropAtom( Header & /* op */, - Q_UINT32 bytes, - QDataStream &operands) + TQ_UINT32 bytes, + TQDataStream &operands) { - Q_UINT16 totalLength = 0; - Q_UINT16 length = 0; - Q_UINT32 style1 = 0; - Q_UINT32 style2 = 0; - Q_UINT16 style3 = 0; - Q_UINT32 BOLD = 0x00010000; - Q_UINT32 ITALIC = 0x00020000; - Q_UINT32 UNDERLINE = 0x00040000; + TQ_UINT16 totalLength = 0; + TQ_UINT16 length = 0; + TQ_UINT32 style1 = 0; + TQ_UINT32 style2 = 0; + TQ_UINT16 style3 = 0; + TQ_UINT32 BOLD = 0x00010000; + TQ_UINT32 ITALIC = 0x00020000; + TQ_UINT32 UNDERLINE = 0x00040000; //--get the paragraph style? operands >> length >> style1 >> style2; @@ -967,15 +967,15 @@ void Powerpoint::opStyleTextPropAtom( void Powerpoint::opTextBytesAtom( Header & /* op */, - Q_UINT32 bytes, - QDataStream &operands) + TQ_UINT32 bytes, + TQDataStream &operands) { - QString data; + TQString data; unsigned i; for (i = 0; i < bytes; i++) { - Q_UINT8 tmp; + TQ_UINT8 tmp; operands >> tmp; data += tmp; @@ -1007,15 +1007,15 @@ void Powerpoint::opTextBytesAtom( void Powerpoint::opTextCharsAtom( Header & /* op */, - Q_UINT32 bytes, - QDataStream &operands) + TQ_UINT32 bytes, + TQDataStream &operands) { - QString data; + TQString data; unsigned i; for (i = 0; i < bytes / 2; i++) { - Q_UINT16 tmp; + TQ_UINT16 tmp; operands >> tmp; data += tmp; @@ -1045,18 +1045,18 @@ void Powerpoint::opTextCharsAtom( void Powerpoint::opTextHeaderAtom( Header & /* op */, - Q_UINT32 /*bytes*/, - QDataStream &operands) + TQ_UINT32 /*bytes*/, + TQDataStream &operands) { struct { - Q_UINT32 txType; // Type of text: + TQ_UINT32 txType; // Type of text: // // 0 Title // 1 Body // 2 Notes // 3 Not Used - // 4 Other (Text in a shape) + // 4 Other (Text in a tqshape) // 5 Center body (subtitle in title slide) // 6 Center title (title in title slide) // 7 Half body (body in two-column slide) @@ -1080,22 +1080,22 @@ void Powerpoint::opTextHeaderAtom( void Powerpoint::opTextSpecInfoAtom( Header & /* op */, - Q_UINT32 /*bytes*/, - QDataStream &/*operands*/) + TQ_UINT32 /*bytes*/, + TQDataStream &/*operands*/) { } void Powerpoint::opTxMasterStyleAtom( Header & /* op */, - Q_UINT32 /*bytes*/, - QDataStream &/*operands*/) + TQ_UINT32 /*bytes*/, + TQDataStream &/*operands*/) { } void Powerpoint::opTxSIStyleAtom( Header & /* op */, - Q_UINT32 /*bytes*/, - QDataStream &/*operands*/) + TQ_UINT32 /*bytes*/, + TQDataStream &/*operands*/) { } @@ -1105,8 +1105,8 @@ void Powerpoint::opTxSIStyleAtom( // void Powerpoint::opUserEditAtom( Header & /* op */, - Q_UINT32 /*bytes*/, - QDataStream &operands) + TQ_UINT32 /*bytes*/, + TQDataStream &operands) { operands >> mUserEditAtom.lastSlideID >> mUserEditAtom.version >> mUserEditAtom.offsetLastEdit >> @@ -1154,13 +1154,13 @@ void Powerpoint::opUserEditAtom( void Powerpoint::opVBAInfo( Header & /* op */, - Q_UINT32 bytes, - QDataStream &operands) + TQ_UINT32 bytes, + TQDataStream &operands) { walk(bytes, operands); } -void Powerpoint::skip(Q_UINT32 bytes, QDataStream &operands) +void Powerpoint::skip(TQ_UINT32 bytes, TQDataStream &operands) { if ((int)bytes < 0) { @@ -1169,8 +1169,8 @@ void Powerpoint::skip(Q_UINT32 bytes, QDataStream &operands) } if (bytes) { - Q_UINT32 i; - Q_UINT8 discard; + TQ_UINT32 i; + TQ_UINT8 discard; kdDebug(s_area) << "skip: " << bytes << endl; for (i = 0; i < bytes; i++) @@ -1183,10 +1183,10 @@ void Powerpoint::skip(Q_UINT32 bytes, QDataStream &operands) // // Handle a container record. // -void Powerpoint::walk(Q_UINT32 bytes, QDataStream &operands) +void Powerpoint::walk(TQ_UINT32 bytes, TQDataStream &operands) { Header op; - Q_UINT32 length = 0; + TQ_UINT32 length = 0; // Stop parsing when there are no more records. Note that we stop as soon // as we cannot get a complete header. @@ -1210,29 +1210,29 @@ void Powerpoint::walk(Q_UINT32 bytes, QDataStream &operands) skip(bytes - length, operands); } -void Powerpoint::walk(Q_UINT32 mainStreamOffset) +void Powerpoint::walk(TQ_UINT32 mainStreamOffset) { - Q_UINT32 length = m_mainStream.length - mainStreamOffset; - QByteArray a; + TQ_UINT32 length = m_mainStream.length - mainStreamOffset; + TQByteArray a; a.setRawData((const char *)m_mainStream.data + mainStreamOffset, length); - QDataStream stream(a, IO_ReadOnly); - stream.setByteOrder(QDataStream::LittleEndian); + TQDataStream stream(a, IO_ReadOnly); + stream.setByteOrder(TQDataStream::LittleEndian); walk(length, stream); a.resetRawData((const char *)m_mainStream.data + mainStreamOffset, length); } void Powerpoint::walkDocument() { - QByteArray a; - Q_UINT32 mainStreamOffset = 0; - Q_UINT32 bytes = m_mainStream.length - mainStreamOffset; + TQByteArray a; + TQ_UINT32 mainStreamOffset = 0; + TQ_UINT32 bytes = m_mainStream.length - mainStreamOffset; a.setRawData((const char *)m_mainStream.data + mainStreamOffset, bytes); - QDataStream stream(a, IO_ReadOnly); - stream.setByteOrder(QDataStream::LittleEndian); + TQDataStream stream(a, IO_ReadOnly); + stream.setByteOrder(TQDataStream::LittleEndian); //--get tho the slide list Header op; - Q_UINT32 length = 0; + TQ_UINT32 length = 0; // Stop parsing when there are no more records. Note that we stop as soon // as we cannot get a complete header. @@ -1254,19 +1254,19 @@ void Powerpoint::walkDocument() } -void Powerpoint::walkRecord(Q_UINT32 bytes, const unsigned char *operands) +void Powerpoint::walkRecord(TQ_UINT32 bytes, const unsigned char *operands) { // First read what should be the next header using one stream. kdError(s_area) << "WalkRecord - bytes: " << bytes << endl; - Q_UINT32 length = sizeof(Header); - QByteArray a; + TQ_UINT32 length = sizeof(Header); + TQByteArray a; Header op; a.setRawData((const char *)operands, bytes); - QDataStream stream1(a, IO_ReadOnly); - stream1.setByteOrder(QDataStream::LittleEndian); + TQDataStream stream1(a, IO_ReadOnly); + stream1.setByteOrder(TQDataStream::LittleEndian); stream1 >> op.opcode.info >> op.type >> op.length; a.resetRawData((const char *)operands, bytes); @@ -1274,20 +1274,20 @@ void Powerpoint::walkRecord(Q_UINT32 bytes, const unsigned char *operands) length += op.length; a.setRawData((const char *)operands, length); - QDataStream stream2(a, IO_ReadOnly); - stream2.setByteOrder(QDataStream::LittleEndian); + TQDataStream stream2(a, IO_ReadOnly); + stream2.setByteOrder(TQDataStream::LittleEndian); walk(length, stream2); a.resetRawData((const char *)operands, length); } -void Powerpoint::walkRecord(Q_UINT32 mainStreamOffset) +void Powerpoint::walkRecord(TQ_UINT32 mainStreamOffset) { walkRecord(sizeof(Header), m_mainStream.data + mainStreamOffset); } -void Powerpoint::walkReference(Q_UINT32 reference) +void Powerpoint::walkReference(TQ_UINT32 reference) { - if (m_persistentReferences.end() == m_persistentReferences.find(reference)) + if (m_persistentReferences.end() == m_persistentReferences.tqfind(reference)) { kdError(s_area) << "cannot find reference: " << reference << endl; } diff --git a/filters/olefilters/powerpoint97/powerpoint.h b/filters/olefilters/powerpoint97/powerpoint.h index 5c7a9195..54e8d7c7 100644 --- a/filters/olefilters/powerpoint97/powerpoint.h +++ b/filters/olefilters/powerpoint97/powerpoint.h @@ -29,24 +29,24 @@ DESCRIPTION #include <myfile.h> -#include <qdatastream.h> -#include <qptrlist.h> -#include <qmap.h> +#include <tqdatastream.h> +#include <tqptrlist.h> +#include <tqmap.h> #include <pptSlide.h> -typedef Q_INT32 sint4; // signed 4-byte integral value -typedef Q_INT16 sint2; // signed 4-byte integral value -typedef Q_UINT32 uint4; // unsigned 4-byte integral value -typedef Q_UINT16 uint2; // 2-byte -typedef Q_INT8 bool1; // 1-byte boolean -typedef Q_UINT8 ubyte1; // unsigned byte value +typedef TQ_INT32 sint4; // signed 4-byte integral value +typedef TQ_INT16 sint2; // signed 4-byte integral value +typedef TQ_UINT32 uint4; // unsigned 4-byte integral value +typedef TQ_UINT16 uint2; // 2-byte +typedef TQ_INT8 bool1; // 1-byte boolean +typedef TQ_UINT8 ubyte1; // unsigned byte value typedef uint2 psrType; typedef uint4 psrSize; // each record is preceded by // pssTypeType and pssSizeType. typedef uint2 psrInstance; typedef uint2 psrVersion; typedef uint4 psrReference; // Saved object reference -//typedef QList<PptSlide> PptSlideList; +//typedef TQList<PptSlide> PptSlideList; class Powerpoint { @@ -67,20 +67,20 @@ public: typedef struct { unsigned type; - QString data; + TQString data; } SlideText; typedef struct { unsigned persistentReference; - QPtrList<SlideText> text; + TQPtrList<SlideText> text; } Slide; protected: virtual void gotDrawing( unsigned id, - QString type, + TQString type, unsigned length, const char *data) = 0; virtual void gotSlide( @@ -100,7 +100,7 @@ private: myFile m_pictures; unsigned m_documentRef; bool m_documentRefFound; - QMap<unsigned, unsigned> m_persistentReferences; + TQMap<unsigned, unsigned> m_persistentReferences; unsigned m_editDepth; enum { @@ -109,7 +109,7 @@ private: } m_pass; unsigned m_textType; - QPtrList<PptSlide> m_slideList; + TQPtrList<PptSlide> m_slideList; PptSlide* m_pptSlide; struct PSR_CurrentUserAtom @@ -144,7 +144,7 @@ struct PSR_SSlideLayoutAtom PSR_CurrentUserAtom mCurrentUserAtom; PSR_UserEditAtom mUserEditAtom; PSR_UserEditAtom* mpLastUserEditAtom; - Q_UINT32 mEditOffset; + TQ_UINT32 mEditOffset; // Common Header. @@ -152,204 +152,204 @@ struct PSR_SSlideLayoutAtom { union { - Q_UINT16 info; + TQ_UINT16 info; struct { - Q_UINT16 version: 4; - Q_UINT16 instance: 12; + TQ_UINT16 version: 4; + TQ_UINT16 instance: 12; } fields; } opcode; - Q_UINT16 type; - Q_UINT32 length; + TQ_UINT16 type; + TQ_UINT32 length; } Header; // Opcode handling and painter methods. void walk( - Q_UINT32 bytes, - QDataStream &operands); + TQ_UINT32 bytes, + TQDataStream &operands); void walk( - Q_UINT32 mainStreamOffset); + TQ_UINT32 mainStreamOffset); void walkRecord( - Q_UINT32 bytes, + TQ_UINT32 bytes, const unsigned char *operands); void walkRecord( - Q_UINT32 mainStreamOffset); + TQ_UINT32 mainStreamOffset); void walkReference( - Q_UINT32 reference); + TQ_UINT32 reference); void skip( - Q_UINT32 bytes, - QDataStream &operands); + TQ_UINT32 bytes, + TQDataStream &operands); void invokeHandler( Header &op, - Q_UINT32 bytes, - QDataStream &operands); + TQ_UINT32 bytes, + TQDataStream &operands); void walkDocument(); - void opAnimationInfo(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opAnimationInfoAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opArrayElementAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opBaseTextPropAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opBinaryTagData(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opBookmarkCollection(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opBookmarkEntityAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opBookmarkSeedAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opCharFormatAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opClientSignal1(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opClientSignal2(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opColorSchemeAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opCorePict(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opCorePictAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opCString(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opCurrentUserAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opDateTimeMCAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opDefaultRulerAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opDocRoutingSlip(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opDocument(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opDocumentAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opDocViewInfo(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opEmFormatAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opEndDocument(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opEnvironment(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opExAviMovie(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opExCDAudio(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opExCDAudioAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opExControl(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opExControlAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opExEmbed(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opExEmbedAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opExHyperlink(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opExHyperlinkAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opExLink(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opExLinkAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opExLinkAtom_old(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opExMCIMovie(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opExMediaAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opExMIDIAudio(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opExObjList(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opExObjListAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opExObjRefAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opExOleObj(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opExOleObjAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opExOleObjStg(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opExPlain(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opExPlainAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opExPlainLink(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opExPlainLinkAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opExQuickTime(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opExQuickTimeMovie(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opExQuickTimeMovieData(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opExSubscription(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opExSubscriptionSection(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opExternalObject(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opExVideo(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opExWAVAudioEmbedded(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opExWAVAudioEmbeddedAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opExWAVAudioLink(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opFontCollection(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opFontEmbedData(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opFontEntityAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opFooterMCAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opGenericDateMCAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opGlineAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opGLPointAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opGpointAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opGratioAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opGrColor(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opGrColorAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opGrectAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opGscaling(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opGscalingAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opGuideAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opGuideList(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opHandout(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opHeaderMCAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opHeadersFooters(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opHeadersFootersAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opInt4ArrayAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opInteractiveInfo(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opInteractiveInfoAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opIRRAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opList(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opListPlaceholder(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opMainMaster(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opMasterText(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opMetaFile(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opMsod(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opNamedShow(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opNamedShows(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opNamedShowSlides(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opNotes(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opNotesAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opOEPlaceholderAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opOEShape(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opOEShapeAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opOutlineTextRefAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opOutlineViewInfo(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opParaFormatAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opPersistPtrFullBlock(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opPersistPtrIncrementalBlock(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opPersistPtrIncrementalBlock2(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opPowerPointStateInfoAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opPPDrawing(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opPPDrawingGroup(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opPrintOptions(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opProgBinaryTag(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opProgStringTag(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opProgTags(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opPSS(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opRecolorEntryAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opRecolorInfoAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opRTFDateTimeMCAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opRulerIndentAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opRunArray(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opRunArrayAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opScheme(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opSchemeAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opSlide(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opSlideAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opSlideBase(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opSlideBaseAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opSlideList(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opSlideListWithText(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opSlideNumberMCAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opSlidePersist(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opSlidePersistAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opSlideViewInfo(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opSlideViewInfoAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opSorterViewInfo(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opSound(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opSoundCollAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opSoundCollection(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opSoundData(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opSrKinsoku(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opSrKinsokuAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opSSDocInfoAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opSSSlideLayoutAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opSSSlideInfoAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opStyleTextPropAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opSubContainerCompleted(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opSubContainerException(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opSummary(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opTextBookmarkAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opTextBytesAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opTextCharsAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opTextHeaderAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opTextRulerAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opTextSpecInfoAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opTexture(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opTxCFStyleAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opTxInteractiveInfoAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opTxMasterStyleAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opTxPFStyleAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opTxSIStyleAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opTypeFace(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opUserEditAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opVBAInfo(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opVBAInfoAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opVBASlideInfo(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opVBASlideInfoAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opViewInfo(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opViewInfoAtom(Header &op, Q_UINT32 bytes, QDataStream &operands); + void opAnimationInfo(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opAnimationInfoAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opArrayElementAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opBaseTextPropAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opBinaryTagData(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opBookmarkCollection(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opBookmarkEntityAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opBookmarkSeedAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opCharFormatAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opClientSignal1(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opClientSignal2(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opColorSchemeAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opCorePict(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opCorePictAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opCString(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opCurrentUserAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opDateTimeMCAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opDefaultRulerAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opDocRoutingSlip(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opDocument(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opDocumentAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opDocViewInfo(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opEmFormatAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opEndDocument(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opEnvironment(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opExAviMovie(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opExCDAudio(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opExCDAudioAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opExControl(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opExControlAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opExEmbed(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opExEmbedAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opExHyperlink(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opExHyperlinkAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opExLink(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opExLinkAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opExLinkAtom_old(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opExMCIMovie(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opExMediaAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opExMIDIAudio(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opExObjList(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opExObjListAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opExObjRefAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opExOleObj(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opExOleObjAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opExOleObjStg(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opExPlain(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opExPlainAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opExPlainLink(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opExPlainLinkAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opExQuickTime(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opExQuickTimeMovie(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opExQuickTimeMovieData(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opExSubscription(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opExSubscriptionSection(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opExternalObject(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opExVideo(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opExWAVAudioEmbedded(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opExWAVAudioEmbeddedAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opExWAVAudioLink(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opFontCollection(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opFontEmbedData(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opFontEntityAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opFooterMCAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opGenericDateMCAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opGlineAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opGLPointAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opGpointAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opGratioAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opGrColor(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opGrColorAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opGrectAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opGscaling(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opGscalingAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opGuideAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opGuideList(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opHandout(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opHeaderMCAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opHeadersFooters(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opHeadersFootersAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opInt4ArrayAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opInteractiveInfo(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opInteractiveInfoAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opIRRAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opList(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opListPlaceholder(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opMainMaster(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opMasterText(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opMetaFile(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opMsod(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opNamedShow(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opNamedShows(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opNamedShowSlides(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opNotes(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opNotesAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opOEPlaceholderAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opOEShape(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opOEShapeAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opOutlineTextRefAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opOutlineViewInfo(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opParaFormatAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opPersistPtrFullBlock(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opPersistPtrIncrementalBlock(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opPersistPtrIncrementalBlock2(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opPowerPointStateInfoAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opPPDrawing(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opPPDrawingGroup(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opPrintOptions(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opProgBinaryTag(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opProgStringTag(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opProgTags(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opPSS(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opRecolorEntryAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opRecolorInfoAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opRTFDateTimeMCAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opRulerIndentAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opRunArray(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opRunArrayAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opScheme(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opSchemeAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opSlide(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opSlideAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opSlideBase(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opSlideBaseAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opSlideList(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opSlideListWithText(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opSlideNumberMCAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opSlidePersist(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opSlidePersistAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opSlideViewInfo(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opSlideViewInfoAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opSorterViewInfo(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opSound(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opSoundCollAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opSoundCollection(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opSoundData(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opSrKinsoku(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opSrKinsokuAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opSSDocInfoAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opSSSlideLayoutAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opSSSlideInfoAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opStyleTextPropAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opSubContainerCompleted(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opSubContainerException(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opSummary(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opTextBookmarkAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opTextBytesAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opTextCharsAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opTextHeaderAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opTextRulerAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opTextSpecInfoAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opTexture(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opTxCFStyleAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opTxInteractiveInfoAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opTxMasterStyleAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opTxPFStyleAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opTxSIStyleAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opTypeFace(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opUserEditAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opVBAInfo(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opVBAInfoAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opVBASlideInfo(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opVBASlideInfoAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opViewInfo(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opViewInfoAtom(Header &op, TQ_UINT32 bytes, TQDataStream &operands); }; #endif diff --git a/filters/olefilters/powerpoint97/powerpointfilter.cc b/filters/olefilters/powerpoint97/powerpointfilter.cc index e0ea629a..5359dd98 100644 --- a/filters/olefilters/powerpoint97/powerpointfilter.cc +++ b/filters/olefilters/powerpoint97/powerpointfilter.cc @@ -32,25 +32,25 @@ PowerPointFilter::PowerPointFilter( connect( m_tree, - SIGNAL(signalPart(const QString&, QString &, QString &)), + TQT_SIGNAL(signalPart(const TQString&, TQString &, TQString &)), this, - SIGNAL(signalPart(const QString&, QString &, QString &))); + TQT_SIGNAL(signalPart(const TQString&, TQString &, TQString &))); // Hook up the embedded picture support. connect( m_tree, - SIGNAL(signalSavePic(const QString &, QString &, const QString &, unsigned int, const char *)), + TQT_SIGNAL(signalSavePic(const TQString &, TQString &, const TQString &, unsigned int, const char *)), this, - SIGNAL(signalSavePic(const QString &, QString &, const QString &, unsigned int, const char *))); + TQT_SIGNAL(signalSavePic(const TQString &, TQString &, const TQString &, unsigned int, const char *))); // Hook up the embedded part support. connect( m_tree, - SIGNAL(signalSavePart(const QString &, QString &, QString &, const QString &, unsigned int, const char *)), + TQT_SIGNAL(signalSavePart(const TQString &, TQString &, TQString &, const TQString &, unsigned int, const char *)), this, - SIGNAL(signalSavePart(const QString &, QString &, QString &, const QString &, unsigned int, const char *))); + TQT_SIGNAL(signalSavePart(const TQString &, TQString &, TQString &, const TQString &, unsigned int, const char *))); } PowerPointFilter::~PowerPointFilter() @@ -63,9 +63,9 @@ bool PowerPointFilter::filter() return m_tree->convert(); } -const QDomDocument * const PowerPointFilter::part() +const TQDomDocument * const PowerPointFilter::part() { - m_part = QDomDocument("DOC"); + m_part = TQDomDocument("DOC"); m_part.setContent(m_tree->getXml()); return &m_part; } diff --git a/filters/olefilters/powerpoint97/powerpointfilter.h b/filters/olefilters/powerpoint97/powerpointfilter.h index 173d1ebb..b38706dc 100644 --- a/filters/olefilters/powerpoint97/powerpointfilter.h +++ b/filters/olefilters/powerpoint97/powerpointfilter.h @@ -27,6 +27,7 @@ class PowerPointFilter: public FilterBase { Q_OBJECT + TQ_OBJECT public: PowerPointFilter( @@ -35,7 +36,7 @@ public: const myFile &pictures); virtual ~PowerPointFilter(); virtual bool filter(); - virtual const QDomDocument * const part(); + virtual const TQDomDocument * const part(); private: PowerPointFilter(const PowerPointFilter &); diff --git a/filters/olefilters/powerpoint97/pptSlide.cpp b/filters/olefilters/powerpoint97/pptSlide.cpp index b86418c9..e1b02296 100644 --- a/filters/olefilters/powerpoint97/pptSlide.cpp +++ b/filters/olefilters/powerpoint97/pptSlide.cpp @@ -36,7 +36,7 @@ PptSlide::PptSlide() //{ //} -QStringList PptSlide::getPlaceholderText(void) +TQStringList PptSlide::getPlaceholderText(void) { return m_currentPholder->paragraphs; } @@ -46,33 +46,33 @@ QStringList PptSlide::getPlaceholderText(void) // return m_currentPholder->styleRun; //} -Q_UINT16 PptSlide::getPlaceholderType(void) +TQ_UINT16 PptSlide::getPlaceholderType(void) { return m_currentPholder->type; } -Q_UINT16 PptSlide::gotoPlaceholder(Q_UINT16 pholderNumber) +TQ_UINT16 PptSlide::gotoPlaceholder(TQ_UINT16 pholderNumber) { m_currentPholder = m_placeholderList.at(pholderNumber); return 0; } -Q_INT32 PptSlide::getPsrReference(void) +TQ_INT32 PptSlide::getPsrReference(void) { return m_psrReference; } -void PptSlide::setPsrReference(Q_INT32 psr) +void PptSlide::setPsrReference(TQ_INT32 psr) { m_psrReference = psr; } -Q_UINT16 PptSlide::getNumberOfPholders() +TQ_UINT16 PptSlide::getNumberOfPholders() { return m_numberOfPholders; } -void PptSlide::addText(QString text, Q_UINT16 type) +void PptSlide::addText(TQString text, TQ_UINT16 type) { unsigned j; m_currentPholder = new placeholder; @@ -97,8 +97,8 @@ void PptSlide::addText(QString text, Q_UINT16 type) case OTHER_TEXT: case CENTER_BODY_TEXT: case HALF_BODY_TEXT: - case QUARTER_BODY_TEXT: - QStringList data(QStringList::split(QChar('\r'), text, true)); + case TQUARTER_BODY_TEXT: + TQStringList data(TQStringList::split(TQChar('\r'), text, true)); for (j = 0; j < data.count(); j++) { m_currentPholder->paragraphs.append(data[j]); diff --git a/filters/olefilters/powerpoint97/pptSlide.h b/filters/olefilters/powerpoint97/pptSlide.h index 16d53f8b..026e2ef1 100644 --- a/filters/olefilters/powerpoint97/pptSlide.h +++ b/filters/olefilters/powerpoint97/pptSlide.h @@ -25,20 +25,20 @@ DESCRIPTION //#define PPTSLIDE_H #include <kdebug.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qptrlist.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqptrlist.h> //--text types #define TITLE_TEXT 0 //title #define BODY_TEXT 1 //body #define NOTES_TEXT 2 //notes #define NOTUSED_TEXT 3 //not used -#define OTHER_TEXT 4 //other(test in shape) +#define OTHER_TEXT 4 //other(test in tqshape) #define CENTER_BODY_TEXT 5 //center body(subtitle in title slide) #define CENTER_TITLE_TEXT 6 //center title(title in title slide) #define HALF_BODY_TEXT 7 //half body(body in two-column slide) -#define QUARTER_BODY_TEXT 8 //quarter body(body in four-body slide) +#define TQUARTER_BODY_TEXT 8 //quarter body(body in four-body slide) //-- //--char style types @@ -55,37 +55,37 @@ class PptSlide public: typedef struct { - Q_UINT16 style; //the style of the text run - Q_UINT16 length; //length of the style run + TQ_UINT16 style; //the style of the text run + TQ_UINT16 length; //length of the style run }styleRunType; - typedef QPtrList<styleRunType> styleRun; + typedef TQPtrList<styleRunType> styleRun; PptSlide(); - QStringList getPlaceholderText(void); //gets the list of paragraphs from the placeholder + TQStringList getPlaceholderText(void); //gets the list of paragraphs from the placeholder //styleRun getPlaceholderStyleRun(void); //gets the list of placeholder style runs - Q_UINT16 getPlaceholderType(void); //gets the type of the placeholder - Q_UINT16 gotoPlaceholder(Q_UINT16 pholderNumber); //goto the n'th placeholder - Q_UINT16 getNumberOfPholders(); //gets the number of placeholders on slide + TQ_UINT16 getPlaceholderType(void); //gets the type of the placeholder + TQ_UINT16 gotoPlaceholder(TQ_UINT16 pholderNumber); //goto the n'th placeholder + TQ_UINT16 getNumberOfPholders(); //gets the number of placeholders on slide - Q_INT32 getPsrReference(void); - void setPsrReference(Q_INT32 psr); + TQ_INT32 getPsrReference(void); + void setPsrReference(TQ_INT32 psr); - void addText(QString text, Q_UINT16 type); //adds text of the given type - void addToStyleRun(Q_UINT16 style, Q_UINT16 length); //adds to the current style run + void addText(TQString text, TQ_UINT16 type); //adds text of the given type + void addToStyleRun(TQ_UINT16 style, TQ_UINT16 length); //adds to the current style run private: typedef struct { - QStringList paragraphs; //text of the placeholder - Q_UINT16 type; //what is the text type + TQStringList paragraphs; //text of the placeholder + TQ_UINT16 type; //what is the text type styleRun style; //char style info }placeholder; - Q_INT16 m_slideLayout; //type of slide - Q_INT16 m_numberOfPholders; //number of placeholder on the slide - Q_INT32 m_psrReference; //logical reference - QPtrList<placeholder> m_placeholderList; //list of all the placeholders on the slide + TQ_INT16 m_slideLayout; //type of slide + TQ_INT16 m_numberOfPholders; //number of placeholder on the slide + TQ_INT32 m_psrReference; //logical reference + TQPtrList<placeholder> m_placeholderList; //list of all the placeholders on the slide placeholder* m_currentPholder; //pointer to current placeholder }; diff --git a/filters/olefilters/powerpoint97/pptdoc.cc b/filters/olefilters/powerpoint97/pptdoc.cc index 0e40293f..07ac8725 100644 --- a/filters/olefilters/powerpoint97/pptdoc.cc +++ b/filters/olefilters/powerpoint97/pptdoc.cc @@ -24,7 +24,7 @@ DESCRIPTION #include <kdebug.h> #include <pptdoc.h> -#include <qptrlist.h> +#include <tqptrlist.h> const int PptDoc::s_area = 30512; @@ -52,7 +52,7 @@ void PptDoc::gotSlide( for (i = 0; i < slide.text.count(); i++) { SlideText *text = slide.text.at(i); - QStringList data(QStringList::split(QChar('\r'), text->data, true)); + TQStringList data(TQStringList::split(TQChar('\r'), text->data, true)); unsigned j; switch (text->type) @@ -68,7 +68,7 @@ void PptDoc::gotSlide( case OTHER_TEXT: case CENTER_BODY_TEXT: case HALF_BODY_TEXT: - case QUARTER_BODY_TEXT: + case TQUARTER_BODY_TEXT: for (j = 0; j < data.count(); j++) { ourSlide.body.append(data[j]); diff --git a/filters/olefilters/powerpoint97/pptdoc.h b/filters/olefilters/powerpoint97/pptdoc.h index f7008ad9..5619d6e4 100644 --- a/filters/olefilters/powerpoint97/pptdoc.h +++ b/filters/olefilters/powerpoint97/pptdoc.h @@ -28,8 +28,8 @@ DESCRIPTION #include <kdebug.h> #include <myfile.h> #include <powerpoint.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> class myFile; @@ -48,7 +48,7 @@ protected: // Metadata. - QString getAuthor(void) const; + TQString getAuthor(void) const; // Call the parse() function to process the document. The callbacks return // the text along with any relevant attributes. @@ -57,7 +57,7 @@ protected: virtual void gotDrawing( unsigned id, - QString type, + TQString type, unsigned length, const char *data) = 0; virtual void gotSlide(PptSlide &slide) = 0; diff --git a/filters/olefilters/powerpoint97/pptxml.cc b/filters/olefilters/powerpoint97/pptxml.cc index 1202edcc..7c6a45fe 100644 --- a/filters/olefilters/powerpoint97/pptxml.cc +++ b/filters/olefilters/powerpoint97/pptxml.cc @@ -22,7 +22,7 @@ DESCRIPTION #include <pptdoc.h> #include <pptxml.h> -#include <qobject.h> +#include <tqobject.h> #include <KoGlobal.h> const int PptXml::s_area = 30512; @@ -57,27 +57,27 @@ bool PptXml::convert() return m_success; } -void PptXml::encode(QString &text) +void PptXml::encode(TQString &text) { // When encoding the stored form of text to its run-time form, // be sure to do the conversion for "&" to "&" first to avoid // accidentally converting user text into one of the other escape // sequences. - text.replace('&', "&"); - text.replace('<', "<"); - text.replace('>', ">"); // Needed to avoid ]]> + text.tqreplace('&', "&"); + text.tqreplace('<', "<"); + text.tqreplace('>', ">"); // Needed to avoid ]]> // Strictly, there is no need to encode " or ', but we do so to allow // them to co-exist! - text.replace('"', """); - text.replace('\'', "'"); + text.tqreplace('"', """); + text.tqreplace('\'', "'"); } -const QString PptXml::getXml() const +const TQString PptXml::getXml() const { - QString body = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE DOC>\n" + TQString body = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE DOC>\n" "<DOC mime=\"application/x-kpresenter\" email=\"reggie@kde.org\" syntaxVersion=\"2\" author=\"Reginald Stadlbauer\" editor=\"Powerpoint import filter\">\n" " <PAPER ptWidth=\"680\" unit=\"0\" format=\"5\" orientation=\"0\" ptHeight=\"510\">\n" " <PAPERBORDERS ptRight=\"0\" ptBottom=\"0\" ptLeft=\"0\" ptTop=\"0\"/>\n" @@ -129,24 +129,24 @@ const QString PptXml::getXml() const void PptXml::gotDrawing( unsigned id, - QString type, + TQString type, unsigned length, const char *data) { - QString ourKey; - QString uid; - QString mimeType; - QString filterArgs; + TQString ourKey; + TQString uid; + TQString mimeType; + TQString filterArgs; // Send the picture to the outside world and get back the UID. - ourKey = "vectorGraphic" + QString::number(id) + "." + type; + ourKey = "vectorGraphic" + TQString::number(id) + "." + type; if (type == "msod") { - filterArgs = "shape-id="; - filterArgs += QString::number(id); + filterArgs = "tqshape-id="; + filterArgs += TQString::number(id); filterArgs += ";delay-stream="; - filterArgs += QString::number(0); + filterArgs += TQString::number(0); } emit signalSavePart( ourKey, @@ -184,10 +184,10 @@ if (mimeType != "application/x-kontour") void PptXml::gotSlide(PptSlide &slide) { static const unsigned pageHeight = 510; - Q_UINT16 numbOfPholders = 0; + TQ_UINT16 numbOfPholders = 0; m_pages += " <PAGE/>\n"; numbOfPholders = slide.getNumberOfPholders(); - for(Q_UINT16 i = 0; i < numbOfPholders; i++) + for(TQ_UINT16 i = 0; i < numbOfPholders; i++) { slide.gotoPlaceholder(i); setPlaceholder(slide); @@ -197,51 +197,51 @@ void PptXml::gotSlide(PptSlide &slide) void PptXml::setPlaceholder(PptSlide &slide) { - QString xml_friendly; + TQString xml_friendly; unsigned i = 0; bool bulletedList = false; //is this a bulleted list? - Q_UINT16 type; //type of text - QString x; //x of placeholder - QString align; //align of text - QString height ; //height of placeholder - QString width ; //width of placeholder - QString pointSize; //font size + TQ_UINT16 type; //type of text + TQString x; //x of placeholder + TQString align; //align of text + TQString height ; //height of placeholder + TQString width ; //width of placeholder + TQString pointSize; //font size xml_friendly = *slide.getPlaceholderText().at(i); encode(xml_friendly); type = slide.getPlaceholderType(); - Q_UINT16 y = 0; + TQ_UINT16 y = 0; switch (type) { case TITLE_TEXT: y = 30; - height = QString::number(55); - x = QString::number(30); - width = QString::number(610); - align = QString::number(ALIGN_CENTER); - pointSize = QString::number(44); + height = TQString::number(55); + x = TQString::number(30); + width = TQString::number(610); + align = TQString::number(ALIGN_CENTER); + pointSize = TQString::number(44); bulletedList = false; m_titles += " <Title title=\"" + xml_friendly + "\" />\n"; break; case CENTER_TITLE_TEXT: y = 130; - x = QString::number(45); - height = QString::number(55); - width = QString::number(610); - align = QString::number(ALIGN_CENTER); - pointSize = QString::number(44); + x = TQString::number(45); + height = TQString::number(55); + width = TQString::number(610); + align = TQString::number(ALIGN_CENTER); + pointSize = TQString::number(44); bulletedList = false; m_titles += " <Title title=\"" + xml_friendly + "\" />\n"; break; case CENTER_BODY_TEXT: y = 200; - x = QString::number(35); - height = QString::number(37); - width = QString::number(610); - align = QString::number(ALIGN_CENTER); - pointSize = QString::number(32); + x = TQString::number(35); + height = TQString::number(37); + width = TQString::number(610); + align = TQString::number(ALIGN_CENTER); + pointSize = TQString::number(32); bulletedList = false; break; case NOTES_TEXT: @@ -249,32 +249,32 @@ void PptXml::setPlaceholder(PptSlide &slide) break; case BODY_TEXT: y = 130; - x = QString::number(35); - height = QString::number(268); - width = QString::number(610); - align = QString::number(ALIGN_LEFT); - pointSize = QString::number(28); + x = TQString::number(35); + height = TQString::number(268); + width = TQString::number(610); + align = TQString::number(ALIGN_LEFT); + pointSize = TQString::number(28); bulletedList = true; break; case OTHER_TEXT: case HALF_BODY_TEXT: - case QUARTER_BODY_TEXT: + case TQUARTER_BODY_TEXT: y = 130; if(m_half) { - x = QString::number(335); - width = QString::number(300); + x = TQString::number(335); + width = TQString::number(300); m_half = false; } else { - x = QString::number(30); - width = QString::number(300); + x = TQString::number(30); + width = TQString::number(300); m_half = true; } - height = QString::number(268); - align = QString::number(ALIGN_LEFT); - pointSize = QString::number(28); + height = TQString::number(268); + align = TQString::number(ALIGN_LEFT); + pointSize = TQString::number(28); bulletedList = true; break; default: @@ -283,7 +283,7 @@ void PptXml::setPlaceholder(PptSlide &slide) } m_text += "<OBJECT type=\"4\">\n" - " <ORIG x=\""+x+"\" y=\""+QString::number(y + m_y)+"\"/>\n" + " <ORIG x=\""+x+"\" y=\""+TQString::number(y + m_y)+"\"/>\n" " <SIZE width=\""+width+"\" height=\""+ height +"\"/>\n" " <PEN width=\"1\" style=\"0\" color=\"#000000\"/>\n" " <TEXTOBJ>\n" diff --git a/filters/olefilters/powerpoint97/pptxml.h b/filters/olefilters/powerpoint97/pptxml.h index b57338cb..f3ffbdb1 100644 --- a/filters/olefilters/powerpoint97/pptxml.h +++ b/filters/olefilters/powerpoint97/pptxml.h @@ -24,8 +24,8 @@ DESCRIPTION #define PPTXML_H #include <pptdoc.h> -#include <qobject.h> -#include <qstring.h> +#include <tqobject.h> +#include <tqstring.h> #define ALIGN_LEFT 1 #define ALIGN_RIGHT 2 @@ -33,14 +33,15 @@ DESCRIPTION #define ALIGN_JUSTIFY 8 class myFile; -class QDomDocument; +class TQDomDocument; class PptXml: - public QObject, + public TQObject, private PptDoc { Q_OBJECT + TQ_OBJECT public: PptXml( @@ -51,29 +52,29 @@ public: bool convert(); - const QString getXml() const; + const TQString getXml() const; signals: // See olefilter.h for information void signalSavePic( - const QString &nameIN, - QString &storageId, - const QString &extension, + const TQString &nameIN, + TQString &storageId, + const TQString &extension, unsigned int length, const char *data); void signalSavePart( - const QString &nameIN, - QString &storageId, - QString &mimeType, - const QString &extension, + const TQString &nameIN, + TQString &storageId, + TQString &mimeType, + const TQString &extension, unsigned int length, const char *data); void signalPart( - const QString& nameIN, - QString &storageId, - QString &mimeType); + const TQString& nameIN, + TQString &storageId, + TQString &mimeType); private: PptXml(const PptXml &); @@ -89,18 +90,18 @@ private: bool m_success; bool m_half; unsigned m_y; - QString m_embedded; - QString m_pages; - QString m_titles; - QString m_notes; - QString m_text; - void encode(QString &text); + TQString m_embedded; + TQString m_pages; + TQString m_titles; + TQString m_notes; + TQString m_text; + void encode(TQString &text); // Override the base class functions. void gotDrawing( unsigned id, - QString type, + TQString type, unsigned length, const char *data); void gotSlide(PptSlide &slide); diff --git a/filters/xsltfilter/export/xsl/kword/xslfo/main.xsl b/filters/xsltfilter/export/xsl/kword/xslfo/main.xsl index e619bf21..b8bb24de 100644 --- a/filters/xsltfilter/export/xsl/kword/xslfo/main.xsl +++ b/filters/xsltfilter/export/xsl/kword/xslfo/main.xsl @@ -39,7 +39,7 @@ <xsl:value-of select="@editor"/> </xsl:comment> <fo:root> - <fo:layout-master-set> + <fo:tqlayout-master-set> <fo:simple-page-master margin-right="0.5cm" margin-left="0.5cm" margin-bottom="0.5cm" margin-top="0.75cm" page-width="21cm" page-height="29.7cm" master-name="first"> @@ -61,7 +61,7 @@ <fo:conditional-page-master-reference master-name="rest" /> </fo:repeatable-page-master-alternatives> </fo:page-sequence-master> - </fo:layout-master-set> + </fo:tqlayout-master-set> <xsl:apply-templates select="FRAMESETS"/> </fo:root> </xsl:template> diff --git a/filters/xsltfilter/export/xsltdialog.ui b/filters/xsltfilter/export/xsltdialog.ui index ac4bc72b..cacf710f 100644 --- a/filters/xsltfilter/export/xsltdialog.ui +++ b/filters/xsltfilter/export/xsltdialog.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.0" stdsetdef="1"> <class>XSLTDialog</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>XSLTDialog</cstring> </property> @@ -28,7 +28,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>GroupBox1</cstring> </property> @@ -45,11 +45,11 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QListBox"> + <widget class="TQListBox"> <property name="name"> <cstring>xsltList</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>200</height> @@ -64,7 +64,7 @@ </widget> </vbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>GroupBox2</cstring> </property> @@ -81,7 +81,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QComboBox"> + <widget class="TQComboBox"> <property name="name"> <cstring>recentBox</cstring> </property> @@ -104,14 +104,14 @@ <property name="sizeType"> <enum>Minimum</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>chooseBtn</cstring> </property> @@ -121,7 +121,7 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout37</cstring> </property> @@ -145,14 +145,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>OkBtn</cstring> </property> @@ -163,7 +163,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>CancelBtn</cstring> </property> @@ -210,12 +210,12 @@ <includes> <include location="local" impldecl="in implementation">xsltdialog.ui.h</include> </includes> -<slots> +<Q_SLOTS> <slot>cancelSlot()</slot> <slot>chooseRecentSlot()</slot> <slot>chooseSlot()</slot> <slot>chooseCommonSlot()</slot> <slot>okSlot()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/filters/xsltfilter/export/xsltexport.cc b/filters/xsltfilter/export/xsltexport.cc index 50d40ffb..545ffde2 100644 --- a/filters/xsltfilter/export/xsltexport.cc +++ b/filters/xsltfilter/export/xsltexport.cc @@ -36,11 +36,11 @@ extern "C" { } -XSLTExport::XSLTExport(KoFilter *, const char *, const QStringList&) : +XSLTExport::XSLTExport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } -KoFilter::ConversionStatus XSLTExport::convert( const QCString& from, const QCString&) +KoFilter::ConversiontqStatus XSLTExport::convert( const TQCString& from, const TQCString&) { if(from != "application/x-kword" && from != "application/x-kontour" && from != "application/x-kspread" && diff --git a/filters/xsltfilter/export/xsltexport.h b/filters/xsltfilter/export/xsltexport.h index 3ecbaed0..24ee3044 100644 --- a/filters/xsltfilter/export/xsltexport.h +++ b/filters/xsltfilter/export/xsltexport.h @@ -26,11 +26,12 @@ class XSLTExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - XSLTExport(KoFilter *parent, const char *name, const QStringList&); + XSLTExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~XSLTExport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; #endif /* __XSLTEXPORT_H__ */ diff --git a/filters/xsltfilter/export/xsltexportdia.cc b/filters/xsltfilter/export/xsltexportdia.cc index 02aab19c..2da253aa 100644 --- a/filters/xsltfilter/export/xsltexportdia.cc +++ b/filters/xsltfilter/export/xsltexportdia.cc @@ -21,8 +21,8 @@ #include <xsltexportdia.h> #include <xsltproc.h> -#include <qdir.h> -#include <qcombobox.h> +#include <tqdir.h> +#include <tqcombobox.h> #include <kapplication.h> #include <kglobal.h> @@ -42,14 +42,14 @@ #endif*/ /* - * Constructs a XSLTExportDia which is a child of 'parent', with the + * Constructs a XSLTExportDia which is a child of 'tqparent', with the * name 'name' and widget flags set to 'f'. * * The dialog will by default be modeless, unless you set 'modal' to * TRUE to construct a modal dialog. */ -XSLTExportDia::XSLTExportDia(KoStoreDevice* in, const QCString &format, QWidget* parent, const char* name_, bool modal, WFlags fl ) - : XSLTDialog( parent, name_, modal, fl ) +XSLTExportDia::XSLTExportDia(KoStoreDevice* in, const TQCString &format, TQWidget* tqparent, const char* name_, bool modal, WFlags fl ) + : XSLTDialog( tqparent, name_, modal, fl ) { int i = 0; _in = in; @@ -61,10 +61,10 @@ XSLTExportDia::XSLTExportDia(KoStoreDevice* in, const QCString &format, QWidget* /* Recent files */ _config = new KConfig("xsltdialog"); _config->setGroup( "XSLT export filter" ); - QString value; + TQString value; while(i < 10) { - value = _config->readPathEntry( QString("Recent%1").arg(i) ); + value = _config->readPathEntry( TQString("Recent%1").tqarg(i) ); kdDebug() << "recent : " << value << endl; if(!value.isEmpty()) { @@ -77,27 +77,27 @@ XSLTExportDia::XSLTExportDia(KoStoreDevice* in, const QCString &format, QWidget* } /* Common xslt files box */ - QString appName = (const char*) KGlobal::instance()->instanceName(); + TQString appName = (const char*) KGlobal::instance()->instanceName(); kdDebug() << "app name = " << appName << endl; - QString filenames = QString("xsltfilter") + QDir::separator() + QString("export") + - QDir::separator() + appName + QDir::separator() + "*/*.xsl"; - QStringList commonFilesList = KGlobal::dirs()->findAllResources("data", filenames, true); + TQString filenames = TQString("xsltfilter") + TQDir::separator() + TQString("export") + + TQDir::separator() + appName + TQDir::separator() + "*/*.xsl"; + TQStringList commonFilesList = KGlobal::dirs()->findAllResources("data", filenames, true); kdDebug() << "There are " << commonFilesList.size() << " entries like " << filenames << endl; - QStringList tempList; - QString name; - QString file; + TQStringList tempList; + TQString name; + TQString file; - for(QStringList::Iterator it = commonFilesList.begin(); it != commonFilesList.end(); ++it) + for(TQStringList::Iterator it = commonFilesList.begin(); it != commonFilesList.end(); ++it) { - tempList = QStringList::split("/", (*it)); + tempList = TQStringList::split("/", (*it)); file = tempList.last(); tempList.pop_back(); name = tempList.last(); tempList.pop_back(); kdDebug() << name << " " << file << endl; - if(!_namesList.contains(name) && file == "main.xsl") + if(!_namesList.tqcontains(name) && file == "main.xsl") { _filesList.append(file); _namesList.append(name); @@ -136,16 +136,16 @@ void XSLTExportDia::chooseSlot() { /* Use dir from currently selected file */ - QString dir = QString::null; - if ( _currentFile.isLocalFile() && QFile::exists( _currentFile.path() ) ) - dir = QFileInfo( _currentFile.path() ).absFilePath(); + TQString dir = TQString(); + if ( _currentFile.isLocalFile() && TQFile::exists( _currentFile.path() ) ) + dir = TQFileInfo( _currentFile.path() ).absFilePath(); - KFileDialog *dialog = new KFileDialog(dir, QString::null, 0L, "file dialog", true); + KFileDialog *dialog = new KFileDialog(dir, TQString(), 0L, "file dialog", true); dialog->setCaption( i18n("Open Document") ); dialog->setMimeFilter( KoFilterManager::mimeFilter( _format, KoFilterManager::Export ) ); KURL u; - if(dialog->exec() == QDialog::Accepted) + if(dialog->exec() == TQDialog::Accepted) { u = dialog->selectedURL(); KRecentDocument::add(dialog->selectedURL().url(), !dialog->selectedURL().isLocalFile()); @@ -157,16 +157,16 @@ void XSLTExportDia::chooseSlot() delete dialog; - QString filename = u.path(); - QString url = u.url(); + TQString filename = u.path(); + TQString url = u.url(); bool local = u.isLocalFile(); bool ok = !url.isEmpty(); if (local) // additional checks for local files - ok = ok && (QFileInfo( filename ).isFile() || - (QFileInfo( filename ).isSymLink() && - !QFileInfo( filename ).readLink().isEmpty() && - QFileInfo( QFileInfo( filename ).readLink() ).isFile() ) ); + ok = ok && (TQFileInfo( filename ).isFile() || + (TQFileInfo( filename ).isSymLink() && + !TQFileInfo( filename ).readLink().isEmpty() && + TQFileInfo( TQFileInfo( filename ).readLink() ).isFile() ) ); if ( ok ) { @@ -192,8 +192,8 @@ void XSLTExportDia::chooseRecentSlot() void XSLTExportDia::chooseCommonSlot() { int num = xsltList->currentItem(); - _currentFile = QDir::separator() + _dirsList[num] + QDir::separator() + - xsltList->currentText() + QDir::separator() + _filesList[num]; + _currentFile = TQDir::separator() + _dirsList[num] + TQDir::separator() + + xsltList->currentText() + TQDir::separator() + _filesList[num]; kdDebug() << "common slot : " << _currentFile.url() << endl; } @@ -207,10 +207,10 @@ void XSLTExportDia::okSlot() if(_currentFile.url().isEmpty()) return; kdDebug() << "XSLT FILTER --> BEGIN" << endl; - QString stylesheet = _currentFile.directory() + QDir::separator() + _currentFile.fileName(); + TQString stylesheet = _currentFile.directory() + TQDir::separator() + _currentFile.fileName(); /* Add the current file in the recent list if is not and save the list. */ - if(_recentList.contains(stylesheet) == 0) + if(_recentList.tqcontains(stylesheet) == 0) { kdDebug() << "Style sheet add to recent list" << endl; /* Remove the older stylesheet used */ @@ -227,9 +227,9 @@ void XSLTExportDia::okSlot() { kdDebug() << "save : " << _recentList.first() << endl; #if KDE_IS_VERSION(3,1,3) - _config->writePathEntry( QString("Recent%1").arg(i), _recentList.first()); + _config->writePathEntry( TQString("Recent%1").tqarg(i), _recentList.first()); #else - _config->writeEntry( QString("Recent%1").arg(i), _recentList.first()); + _config->writeEntry( TQString("Recent%1").tqarg(i), _recentList.first()); #endif _recentList.pop_front(); i = i + 1; @@ -241,11 +241,11 @@ void XSLTExportDia::okSlot() /* Temp file */ KTempFile temp("xsltexport-", "kwd"); temp.setAutoDelete(true); - QFile* tempFile = temp.file(); + TQFile* tempFile = temp.file(); - const Q_LONG buflen = 4096; + const TQ_LONG buflen = 4096; char buffer[ buflen ]; - Q_LONG readBytes = _in->readBlock( buffer, buflen ); + TQ_LONG readBytes = _in->readBlock( buffer, buflen ); while ( readBytes > 0 ) { diff --git a/filters/xsltfilter/export/xsltexportdia.h b/filters/xsltfilter/export/xsltexportdia.h index b79c429b..31491d71 100644 --- a/filters/xsltfilter/export/xsltexportdia.h +++ b/filters/xsltfilter/export/xsltexportdia.h @@ -21,7 +21,7 @@ #define __XSLTEXPORTDIA_H__ #include <xsltdialog.h> -#include <qstringlist.h> +#include <tqstringlist.h> #include <kurl.h> class KoStoreDevice; @@ -30,26 +30,27 @@ class KConfig; class XSLTExportDia : public XSLTDialog { Q_OBJECT + TQ_OBJECT - QString _fileOut; + TQString _fileOut; KoStoreDevice* _in; /** xslt file current */ KURL _currentFile; - QCString _format; + TQCString _format; KConfig* _config; /** List of the most recent xslt file used. */ - QStringList _recentList; + TQStringList _recentList; /** Lits use for common xslt files. */ - QStringList _dirsList; - QStringList _filesList; - QStringList _namesList; + TQStringList _dirsList; + TQStringList _filesList; + TQStringList _namesList; public: - XSLTExportDia( KoStoreDevice*, const QCString &format, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + XSLTExportDia( KoStoreDevice*, const TQCString &format, TQWidget* tqparent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); ~XSLTExportDia(); - void setOutputFile(QString file) { _fileOut = file; } + void setOutputFile(TQString file) { _fileOut = file; } public slots: virtual void cancelSlot(); diff --git a/filters/xsltfilter/export/xsltproc.cc b/filters/xsltfilter/export/xsltproc.cc index 592c849a..3bd20408 100644 --- a/filters/xsltfilter/export/xsltproc.cc +++ b/filters/xsltfilter/export/xsltproc.cc @@ -27,7 +27,7 @@ */ #include "xsltproc.h" -#include <qfile.h> +#include <tqfile.h> #ifdef HAVE_STRING_H #include <string.h> @@ -87,11 +87,11 @@ XSLTProc::XSLTProc(const char* fileIn, const char* fileOut, const char* xsltshee } #endif -XSLTProc::XSLTProc(QString fileIn, QString fileOut, QString xsltsheet) +XSLTProc::XSLTProc(TQString fileIn, TQString fileOut, TQString xsltsheet) { - _fileIn = QFile::encodeName(fileIn); - _fileOut = QFile::encodeName(fileOut); - _stylesheet = QFile::encodeName(xsltsheet); + _fileIn = TQFile::encodeName(fileIn); + _fileOut = TQFile::encodeName(fileOut); + _stylesheet = TQFile::encodeName(xsltsheet); nbparams = 0; debug = 0; repeat = 0; @@ -202,7 +202,7 @@ XSLTProc::xsltProcess(xmlDocPtr doc, xsltStylesheetPtr cur, const char *filename printf(" --profile or --norman : dump profiling informations \n"); }*/ -void XSLTProc::addParam(QString name, QString value) +void XSLTProc::addParam(TQString name, TQString value) { if(nbparams < NB_PARAMETER_MAX) { diff --git a/filters/xsltfilter/export/xsltproc.h b/filters/xsltfilter/export/xsltproc.h index 9469b502..b195c163 100644 --- a/filters/xsltfilter/export/xsltproc.h +++ b/filters/xsltfilter/export/xsltproc.h @@ -20,7 +20,7 @@ #ifndef __XSLTPROC_H__ #define __XSLTPROC_H__ -#include <qstring.h> +#include <tqstring.h> #include <libexslt/exslt.h> #include <libxslt/xsltconfig.h> @@ -34,9 +34,9 @@ class XSLTProc { - QCString _fileIn; - QCString _fileOut; - QCString _stylesheet; + TQCString _fileIn; + TQCString _fileOut; + TQCString _stylesheet; const char *params[NB_PARAMETER_MAX + 1]; int nbparams; @@ -54,14 +54,14 @@ class XSLTProc */ XSLTProc(const char* fileIn, const char* fileOut, const char *stylesheet); - XSLTProc(QString fileIn, QString fileOut, QString stylesheet); + XSLTProc(TQString fileIn, TQString fileOut, TQString stylesheet); /** * Destroy the processor */ virtual ~XSLTProc() {} - void addParam(QString name, QString value); + void addParam(TQString name, TQString value); /** Process fileIn through the stylesheet. * @return return 0 if no error occurred diff --git a/filters/xsltfilter/import/xsltdialog.ui b/filters/xsltfilter/import/xsltdialog.ui index ac4bc72b..cacf710f 100644 --- a/filters/xsltfilter/import/xsltdialog.ui +++ b/filters/xsltfilter/import/xsltdialog.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.0" stdsetdef="1"> <class>XSLTDialog</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>XSLTDialog</cstring> </property> @@ -28,7 +28,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>GroupBox1</cstring> </property> @@ -45,11 +45,11 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QListBox"> + <widget class="TQListBox"> <property name="name"> <cstring>xsltList</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>200</height> @@ -64,7 +64,7 @@ </widget> </vbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>GroupBox2</cstring> </property> @@ -81,7 +81,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QComboBox"> + <widget class="TQComboBox"> <property name="name"> <cstring>recentBox</cstring> </property> @@ -104,14 +104,14 @@ <property name="sizeType"> <enum>Minimum</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>chooseBtn</cstring> </property> @@ -121,7 +121,7 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout37</cstring> </property> @@ -145,14 +145,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>OkBtn</cstring> </property> @@ -163,7 +163,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>CancelBtn</cstring> </property> @@ -210,12 +210,12 @@ <includes> <include location="local" impldecl="in implementation">xsltdialog.ui.h</include> </includes> -<slots> +<Q_SLOTS> <slot>cancelSlot()</slot> <slot>chooseRecentSlot()</slot> <slot>chooseSlot()</slot> <slot>chooseCommonSlot()</slot> <slot>okSlot()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/filters/xsltfilter/import/xsltimport.cc b/filters/xsltfilter/import/xsltimport.cc index e60208ca..e73bdf18 100644 --- a/filters/xsltfilter/import/xsltimport.cc +++ b/filters/xsltfilter/import/xsltimport.cc @@ -24,7 +24,7 @@ #include <kgenericfactory.h> #include <kglobal.h> #include <klocale.h> -#include <qtextcodec.h> +#include <tqtextcodec.h> #include "xsltimportdia.h" @@ -32,13 +32,13 @@ typedef KGenericFactory<XSLTImport, KoFilter> XSLTImportFactory; K_EXPORT_COMPONENT_FACTORY( libxsltimport, XSLTImportFactory( "kofficefilters" ) ) -XSLTImport::XSLTImport(KoFilter *, const char *, const QStringList&) : +XSLTImport::XSLTImport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } -KoFilter::ConversionStatus XSLTImport::convert( const QCString&, const QCString& to ) +KoFilter::ConversiontqStatus XSLTImport::convert( const TQCString&, const TQCString& to ) { - QString config; + TQString config; if(to != "application/x-kword" && to != "application/x-kontour" && to != "application/x-kspread" && @@ -47,7 +47,7 @@ KoFilter::ConversionStatus XSLTImport::convert( const QCString&, const QCString& return KoFilter::NotImplemented; // ## missing appIdentification - KoStore* out = KoStore::createStore(QString(m_chain->outputFile()), KoStore::Write); + KoStore* out = KoStore::createStore(TQString(m_chain->outputFile()), KoStore::Write); if(!out || !out->open("root")) { kdError() << "Unable to create output file!" << endl; diff --git a/filters/xsltfilter/import/xsltimport.h b/filters/xsltfilter/import/xsltimport.h index 8ec64364..22b89941 100644 --- a/filters/xsltfilter/import/xsltimport.h +++ b/filters/xsltfilter/import/xsltimport.h @@ -20,10 +20,10 @@ #ifndef __XSLTIMPORT_H__ #define __XSLTIMPORT_H__ -#include <qstring.h> -#include <qtextstream.h> -#include <qfile.h> -#include <qobject.h> +#include <tqstring.h> +#include <tqtextstream.h> +#include <tqfile.h> +#include <tqobject.h> #include <KoFilter.h> #include <KoStore.h> @@ -32,13 +32,14 @@ class XSLTImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - XSLTImport(KoFilter *parent, const char *name, const QStringList&); + XSLTImport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~XSLTImport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, - const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, + const TQCString& to ); }; #endif /* __XSLTIMPORT_H__ */ diff --git a/filters/xsltfilter/import/xsltimportdia.cc b/filters/xsltfilter/import/xsltimportdia.cc index 0486b84e..a72b2b1c 100644 --- a/filters/xsltfilter/import/xsltimportdia.cc +++ b/filters/xsltfilter/import/xsltimportdia.cc @@ -22,10 +22,10 @@ //#include <stdio.h> -#include <qcombobox.h> -#include <qcursor.h> -#include <qstringlist.h> -#include <qdir.h> +#include <tqcombobox.h> +#include <tqcursor.h> +#include <tqstringlist.h> +#include <tqdir.h> #include <kapplication.h> #include <klocale.h> @@ -39,14 +39,14 @@ #include <xsltproc.h> /* - * Constructs a XSLTImportDia which is a child of 'parent', with the + * Constructs a XSLTImportDia which is a child of 'tqparent', with the * name 'name' and widget flags set to 'f'. * * The dialog will by default be modeless, unless you set 'modal' to * TRUE to construct a modal dialog. */ -XSLTImportDia::XSLTImportDia(KoStore* out, const QCString &format, QWidget* parent, const char* name_, bool modal, WFlags fl ) - : XSLTDialog( parent, name_, modal, fl ) +XSLTImportDia::XSLTImportDia(KoStore* out, const TQCString &format, TQWidget* tqparent, const char* name_, bool modal, WFlags fl ) + : XSLTDialog( tqparent, name_, modal, fl ) { int i = 0; _out = out; @@ -56,10 +56,10 @@ XSLTImportDia::XSLTImportDia(KoStore* out, const QCString &format, QWidget* pare /* Recent files */ _config = new KConfig("xsltdialog"); _config->setGroup( "XSLT import filter" ); - QString value; + TQString value; while(i < 10) { - value = _config->readPathEntry( QString("Recent%1").arg(i) ); + value = _config->readPathEntry( TQString("Recent%1").tqarg(i) ); kdDebug() << "recent : " << value << endl; if(!value.isEmpty()) { @@ -72,27 +72,27 @@ XSLTImportDia::XSLTImportDia(KoStore* out, const QCString &format, QWidget* pare } /* Common xslt files box */ - QString appName = (const char*) KGlobal::instance()->instanceName(); + TQString appName = (const char*) KGlobal::instance()->instanceName(); kdDebug() << "app name = " << appName << endl; - QString filenames = QString("xsltfilter") + QDir::separator() + QString("import") + - QDir::separator() + appName + QDir::separator() + "*/*.xsl"; - QStringList commonFilesList = KGlobal::dirs()->findAllResources("data", filenames, true); + TQString filenames = TQString("xsltfilter") + TQDir::separator() + TQString("import") + + TQDir::separator() + appName + TQDir::separator() + "*/*.xsl"; + TQStringList commonFilesList = KGlobal::dirs()->findAllResources("data", filenames, true); kdDebug() << "There are " << commonFilesList.size() << " entries like " << filenames << endl; - QStringList tempList; - QString name; - QString file; + TQStringList tempList; + TQString name; + TQString file; - for(QStringList::Iterator it = commonFilesList.begin(); it != commonFilesList.end(); ++it) + for(TQStringList::Iterator it = commonFilesList.begin(); it != commonFilesList.end(); ++it) { - tempList = QStringList::split("/", (*it)); + tempList = TQStringList::split("/", (*it)); file = tempList.last(); tempList.pop_back(); name = tempList.last(); tempList.pop_back(); kdDebug() << name << " " << file << endl; - if(!_namesList.contains(name) && file == "main.xsl") + if(!_namesList.tqcontains(name) && file == "main.xsl") { _filesList.append(file); _namesList.append(name); @@ -110,7 +110,7 @@ XSLTImportDia::XSLTImportDia(KoStore* out, const QCString &format, QWidget* pare */ XSLTImportDia::~XSLTImportDia() { - // no need to delete child widgets, Qt does it all for us + // no need to delete child widgets, TQt does it all for us delete _config; } @@ -133,16 +133,16 @@ void XSLTImportDia::chooseSlot() { /* Use dir from currently selected file */ - QString dir = QString::null; - if ( _currentFile.isLocalFile() && QFile::exists( _currentFile.path() ) ) - dir = QFileInfo( _currentFile.path() ).absFilePath(); + TQString dir = TQString(); + if ( _currentFile.isLocalFile() && TQFile::exists( _currentFile.path() ) ) + dir = TQFileInfo( _currentFile.path() ).absFilePath(); - KFileDialog *dialog = new KFileDialog(dir, QString::null, 0L, "file dialog", true); + KFileDialog *dialog = new KFileDialog(dir, TQString(), 0L, "file dialog", true); dialog->setCaption( i18n("Open Document") ); dialog->setMimeFilter( KoFilterManager::mimeFilter( _format, KoFilterManager::Import ) ); KURL u; - if(dialog->exec() == QDialog::Accepted) + if(dialog->exec() == TQDialog::Accepted) { u = dialog->selectedURL(); KRecentDocument::add(dialog->selectedURL().url(), !dialog->selectedURL().isLocalFile()); @@ -154,16 +154,16 @@ void XSLTImportDia::chooseSlot() delete dialog; - QString filename = u.path(); - QString url = u.url(); + TQString filename = u.path(); + TQString url = u.url(); bool local = u.isLocalFile(); bool ok = !url.isEmpty(); if (local) // additional checks for local files - ok = ok && (QFileInfo( filename ).isFile() || - (QFileInfo( filename ).isSymLink() && - !QFileInfo( filename ).readLink().isEmpty() && - QFileInfo( QFileInfo( filename ).readLink() ).isFile() ) ); + ok = ok && (TQFileInfo( filename ).isFile() || + (TQFileInfo( filename ).isSymLink() && + !TQFileInfo( filename ).readLink().isEmpty() && + TQFileInfo( TQFileInfo( filename ).readLink() ).isFile() ) ); if ( ok ) { @@ -189,8 +189,8 @@ void XSLTImportDia::chooseRecentSlot() void XSLTImportDia::chooseCommonSlot() { int num = xsltList->currentItem(); - _currentFile = QDir::separator() + _dirsList[num] + QDir::separator() + - xsltList->currentText() + QDir::separator() + _filesList[num]; + _currentFile = TQDir::separator() + _dirsList[num] + TQDir::separator() + + xsltList->currentText() + TQDir::separator() + _filesList[num]; kdDebug() << "common slot : " << _currentFile.url() << endl; } @@ -200,16 +200,16 @@ void XSLTImportDia::chooseCommonSlot() */ void XSLTImportDia::okSlot() { - kapp->setOverrideCursor(QCursor(Qt::WaitCursor)); + kapp->setOverrideCursor(TQCursor(TQt::WaitCursor)); hide(); if(_currentFile.url().isEmpty()) return; kdDebug() << "XSLT FILTER --> BEGIN" << endl; _out->open("root"); - QString stylesheet = _currentFile.directory() + "/" + _currentFile.fileName(); + TQString stylesheet = _currentFile.directory() + "/" + _currentFile.fileName(); /* Add the current file in the recent list if is not and save the list. */ - if(_recentList.contains(stylesheet) == 0) + if(_recentList.tqcontains(stylesheet) == 0) { kdDebug() << "Style sheet add to recent list" << endl; /* Remove the older stylesheet used */ @@ -226,9 +226,9 @@ void XSLTImportDia::okSlot() { kdDebug() << "save : " << _recentList.first() << endl; #if KDE_IS_VERSION(3,1,3) - _config->writePathEntry( QString("Recent%1").arg(i), _recentList.first()); + _config->writePathEntry( TQString("Recent%1").tqarg(i), _recentList.first()); #else - _config->writeEntry( QString("Recent%1").arg(i), _recentList.first()); + _config->writeEntry( TQString("Recent%1").tqarg(i), _recentList.first()); #endif _recentList.pop_front(); i = i + 1; @@ -241,7 +241,7 @@ void XSLTImportDia::okSlot() KTempFile temp("xsltimport-", "kwd"); temp.setAutoDelete(true); - QFile* tempFile = temp.file(); + TQFile* tempFile = temp.file(); tempFile->open(IO_WriteOnly); /* Generate the data in the temp file */ diff --git a/filters/xsltfilter/import/xsltimportdia.h b/filters/xsltfilter/import/xsltimportdia.h index 55b1eab9..1b6a507b 100644 --- a/filters/xsltfilter/import/xsltimportdia.h +++ b/filters/xsltfilter/import/xsltimportdia.h @@ -28,29 +28,30 @@ class XSLTImportDia : public XSLTDialog { Q_OBJECT + TQ_OBJECT - QString _fileIn; - QString _fileOut; - QByteArray _arrayIn; + TQString _fileIn; + TQString _fileOut; + TQByteArray _arrayIn; KoStore* _out; /** xslt file current */ KURL _currentFile; - QCString _format; + TQCString _format; KConfig* _config; /** List of the most recent xslt file used. */ - QStringList _recentList; + TQStringList _recentList; /** Lits use for common xslt files. */ - QStringList _dirsList; - QStringList _filesList; - QStringList _namesList; + TQStringList _dirsList; + TQStringList _filesList; + TQStringList _namesList; public: - XSLTImportDia(KoStore*, const QCString &format, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + XSLTImportDia(KoStore*, const TQCString &format, TQWidget* tqparent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); ~XSLTImportDia(); - void setInputFile(QString file) { _fileIn = file; } - void setOutputFile(QString file) { _fileOut = file; } + void setInputFile(TQString file) { _fileIn = file; } + void setOutputFile(TQString file) { _fileOut = file; } public slots: virtual void cancelSlot(); diff --git a/filters/xsltfilter/import/xsltproc.cc b/filters/xsltfilter/import/xsltproc.cc index 592c849a..3bd20408 100644 --- a/filters/xsltfilter/import/xsltproc.cc +++ b/filters/xsltfilter/import/xsltproc.cc @@ -27,7 +27,7 @@ */ #include "xsltproc.h" -#include <qfile.h> +#include <tqfile.h> #ifdef HAVE_STRING_H #include <string.h> @@ -87,11 +87,11 @@ XSLTProc::XSLTProc(const char* fileIn, const char* fileOut, const char* xsltshee } #endif -XSLTProc::XSLTProc(QString fileIn, QString fileOut, QString xsltsheet) +XSLTProc::XSLTProc(TQString fileIn, TQString fileOut, TQString xsltsheet) { - _fileIn = QFile::encodeName(fileIn); - _fileOut = QFile::encodeName(fileOut); - _stylesheet = QFile::encodeName(xsltsheet); + _fileIn = TQFile::encodeName(fileIn); + _fileOut = TQFile::encodeName(fileOut); + _stylesheet = TQFile::encodeName(xsltsheet); nbparams = 0; debug = 0; repeat = 0; @@ -202,7 +202,7 @@ XSLTProc::xsltProcess(xmlDocPtr doc, xsltStylesheetPtr cur, const char *filename printf(" --profile or --norman : dump profiling informations \n"); }*/ -void XSLTProc::addParam(QString name, QString value) +void XSLTProc::addParam(TQString name, TQString value) { if(nbparams < NB_PARAMETER_MAX) { diff --git a/filters/xsltfilter/import/xsltproc.h b/filters/xsltfilter/import/xsltproc.h index 9469b502..b195c163 100644 --- a/filters/xsltfilter/import/xsltproc.h +++ b/filters/xsltfilter/import/xsltproc.h @@ -20,7 +20,7 @@ #ifndef __XSLTPROC_H__ #define __XSLTPROC_H__ -#include <qstring.h> +#include <tqstring.h> #include <libexslt/exslt.h> #include <libxslt/xsltconfig.h> @@ -34,9 +34,9 @@ class XSLTProc { - QCString _fileIn; - QCString _fileOut; - QCString _stylesheet; + TQCString _fileIn; + TQCString _fileOut; + TQCString _stylesheet; const char *params[NB_PARAMETER_MAX + 1]; int nbparams; @@ -54,14 +54,14 @@ class XSLTProc */ XSLTProc(const char* fileIn, const char* fileOut, const char *stylesheet); - XSLTProc(QString fileIn, QString fileOut, QString stylesheet); + XSLTProc(TQString fileIn, TQString fileOut, TQString stylesheet); /** * Destroy the processor */ virtual ~XSLTProc() {} - void addParam(QString name, QString value); + void addParam(TQString name, TQString value); /** Process fileIn through the stylesheet. * @return return 0 if no error occurred diff --git a/filters/xsltfilter/kword2xslfo.xsl b/filters/xsltfilter/kword2xslfo.xsl index 4268afba..ea36238b 100644 --- a/filters/xsltfilter/kword2xslfo.xsl +++ b/filters/xsltfilter/kword2xslfo.xsl @@ -36,7 +36,7 @@ <xsl:value-of select="@editor"/> </xsl:comment> <fo:root> - <fo:layout-master-set> + <fo:tqlayout-master-set> <fo:simple-page-master margin-right="0.5cm" margin-left="0.5cm" margin-bottom="0.5cm" margin-top="0.75cm" page-width="21cm" page-height="29.7cm" master-name="first"> @@ -58,7 +58,7 @@ <fo:conditional-page-master-reference master-name="rest" /> </fo:repeatable-page-master-alternatives> </fo:page-sequence-master> - </fo:layout-master-set> + </fo:tqlayout-master-set> <xsl:apply-templates select="FRAMESETS"/> </fo:root> </xsl:template> |