summaryrefslogtreecommitdiffstats
path: root/filters/kspread/opencalc
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /filters/kspread/opencalc
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'filters/kspread/opencalc')
-rw-r--r--filters/kspread/opencalc/opencalcexport.cc364
-rw-r--r--filters/kspread/opencalc/opencalcexport.h35
-rw-r--r--filters/kspread/opencalc/opencalcimport.cc810
-rw-r--r--filters/kspread/opencalc/opencalcimport.h93
-rw-r--r--filters/kspread/opencalc/opencalcstyleexport.cc106
-rw-r--r--filters/kspread/opencalc/opencalcstyleexport.h82
-rw-r--r--filters/kspread/opencalc/status.html12
7 files changed, 752 insertions, 750 deletions
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:&nbsp;&nbsp; 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:&nbsp;&nbsp; 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:&nbsp;&nbsp; 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>