diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /filters/kspread/applixspread | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'filters/kspread/applixspread')
-rw-r--r-- | filters/kspread/applixspread/applixspreadimport.cc | 378 | ||||
-rw-r--r-- | filters/kspread/applixspread/applixspreadimport.h | 41 | ||||
-rw-r--r-- | filters/kspread/applixspread/status.html | 20 |
3 files changed, 220 insertions, 219 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> |