diff options
Diffstat (limited to 'filters/kspread')
103 files changed, 2863 insertions, 2844 deletions
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 @@ /* [email protected] */ /* additions: Norbert Andres [email protected] */ -#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:[email protected]">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 [email protected] 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 [email protected] 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 <[email protected]></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 |