diff options
Diffstat (limited to 'filters/kpresenter')
35 files changed, 1470 insertions, 1458 deletions
diff --git a/filters/kpresenter/bmp/bmpexport.cpp b/filters/kpresenter/bmp/bmpexport.cpp index b2ecfe0f..f7351a10 100644 --- a/filters/kpresenter/bmp/bmpexport.cpp +++ b/filters/kpresenter/bmp/bmpexport.cpp @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include <qpixmap.h> -#include <qpainter.h> +#include <tqpixmap.h> +#include <tqpainter.h> #include <kmessagebox.h> @@ -36,7 +36,7 @@ typedef KGenericFactory<BmpExport, KoFilter> bmpExportFactory; K_EXPORT_COMPONENT_FACTORY( libkpresenterbmpexport, bmpExportFactory( "bmpexport" ) ) -BmpExport::BmpExport(KoFilter *fil, const char *name, const QStringList&lst) +BmpExport::BmpExport(KoFilter *fil, const char *name, const TQStringList&lst) : ImageExport(fil,name,lst) { } @@ -61,7 +61,7 @@ bool BmpExport::extraImageAttribute() } -bool BmpExport::saveImage( QString fileName) +bool BmpExport::saveImage( TQString fileName) { bool ret = pixmap.save( fileName, "BMP" ); // Save the image. diff --git a/filters/kpresenter/bmp/bmpexport.h b/filters/kpresenter/bmp/bmpexport.h index 6e4f29bf..f266f636 100644 --- a/filters/kpresenter/bmp/bmpexport.h +++ b/filters/kpresenter/bmp/bmpexport.h @@ -25,11 +25,12 @@ class BmpExport : public ImageExport { Q_OBJECT + TQ_OBJECT public: - BmpExport(KoFilter *parent, const char *name, const QStringList&); + BmpExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~BmpExport(); - virtual bool saveImage( QString fileName); + virtual bool saveImage( TQString fileName); virtual bool extraImageAttribute(); virtual const char * exportFormat(); }; diff --git a/filters/kpresenter/jpeg/jpegexport.cpp b/filters/kpresenter/jpeg/jpegexport.cpp index b62d985d..52711188 100644 --- a/filters/kpresenter/jpeg/jpegexport.cpp +++ b/filters/kpresenter/jpeg/jpegexport.cpp @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include <qpixmap.h> -#include <qpainter.h> +#include <tqpixmap.h> +#include <tqpainter.h> #include <kmessagebox.h> @@ -36,7 +36,7 @@ typedef KGenericFactory<JpegExport, KoFilter> jpegExportFactory; K_EXPORT_COMPONENT_FACTORY( libkpresenterjpegexport, jpegExportFactory( "jpegexport" ) ) -JpegExport::JpegExport(KoFilter *fil, const char *name, const QStringList&lst) +JpegExport::JpegExport(KoFilter *fil, const char *name, const TQStringList&lst) : ImageExport(fil,name,lst) { } @@ -62,7 +62,7 @@ bool JpegExport::extraImageAttribute() } -bool JpegExport::saveImage( QString fileName) +bool JpegExport::saveImage( TQString fileName) { bool ret = pixmap.save( fileName, "JPEG" ); // Save the image. diff --git a/filters/kpresenter/jpeg/jpegexport.h b/filters/kpresenter/jpeg/jpegexport.h index 873e463f..518615df 100644 --- a/filters/kpresenter/jpeg/jpegexport.h +++ b/filters/kpresenter/jpeg/jpegexport.h @@ -25,11 +25,12 @@ class JpegExport : public ImageExport { Q_OBJECT + TQ_OBJECT public: - JpegExport(KoFilter *parent, const char *name, const QStringList&); + JpegExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~JpegExport(); - virtual bool saveImage( QString fileName); + virtual bool saveImage( TQString fileName); virtual bool extraImageAttribute(); virtual const char * exportFormat(); }; diff --git a/filters/kpresenter/kword/kprkword.cc b/filters/kpresenter/kword/kprkword.cc index a0cd7ab4..75042fc3 100644 --- a/filters/kpresenter/kword/kprkword.cc +++ b/filters/kpresenter/kword/kprkword.cc @@ -26,13 +26,13 @@ #include <kprkword.h> #include <klocale.h> #include <kdebug.h> -#include <qsortedlist.h> -#include <qcolor.h> +#include <tqsortedlist.h> +#include <tqcolor.h> typedef KGenericFactory<KprKword, KoFilter> KprKwordFactory; K_EXPORT_COMPONENT_FACTORY( libkprkword, KprKwordFactory( "kofficefilters" ) ) -KprKword::KprKword(KoFilter *, const char *, const QStringList&) : +KprKword::KprKword(KoFilter *, const char *, const TQStringList&) : KoFilter(), outdoc( "DOC" ) { @@ -40,8 +40,8 @@ KprKword::KprKword(KoFilter *, const char *, const QStringList&) : // This filter can act as an import filter for KWord and as an export // filter for KPresenter (isn't our architecture really nice ? :) -// This is why we use the file-to-file method, not a QDomDoc one. -KoFilter::ConversionStatus KprKword::convert( const QCString& from, const QCString& to ) +// This is why we use the file-to-file method, not a TQDomDoc one. +KoFilter::ConversiontqStatus KprKword::convert( const TQCString& from, const TQCString& to ) { if(to!="application/x-kword" || from!="application/x-kpresenter") return KoFilter::NotImplemented; @@ -57,32 +57,32 @@ KoFilter::ConversionStatus KprKword::convert( const QCString& from, const QCStri outdoc.appendChild( outdoc.createProcessingInstruction( "xml", "version=\"1.0\" encoding=\"UTF-8\"" ) ); - QDomElement kwdoc = outdoc.createElement( "DOC" ); + TQDomElement kwdoc = outdoc.createElement( "DOC" ); kwdoc.setAttribute( "editor", "KprKword converter" ); kwdoc.setAttribute( "mime", "application/x-kword" ); kwdoc.setAttribute( "syntaxVersion", 1 ); outdoc.appendChild( kwdoc ); - QDomElement paper = outdoc.createElement( "PAPER" ); + TQDomElement paper = outdoc.createElement( "PAPER" ); kwdoc.appendChild( paper ); paper.setAttribute( "format", 1 ); // A4. How on earth could I know what the user really wants ? :) paper.setAttribute( "width", 595 ); paper.setAttribute( "height", 841 ); - QDomElement borders = outdoc.createElement( "PAPERBORDERS" ); + TQDomElement borders = outdoc.createElement( "PAPERBORDERS" ); paper.appendChild( borders ); borders.setAttribute( "left", 28 ); borders.setAttribute( "top", 42 ); borders.setAttribute( "right", 28 ); borders.setAttribute( "bottom", 42 ); - QDomElement framesets = outdoc.createElement( "FRAMESETS" ); + TQDomElement framesets = outdoc.createElement( "FRAMESETS" ); kwdoc.appendChild( framesets ); frameset = outdoc.createElement( "FRAMESET" ); framesets.appendChild( frameset ); frameset.setAttribute( "frameType", 1 ); // text frameset.setAttribute( "frameInfo", 0 ); // body - QDomElement frame = outdoc.createElement( "FRAME" ); + TQDomElement frame = outdoc.createElement( "FRAME" ); frameset.appendChild( frame ); frame.setAttribute( "left", 28 ); frame.setAttribute( "top", 42 ); @@ -99,19 +99,19 @@ KoFilter::ConversionStatus KprKword::convert( const QCString& from, const QCStri // Create a style for the slide titles - QDomElement styles = outdoc.createElement( "STYLES" ); + TQDomElement styles = outdoc.createElement( "STYLES" ); kwdoc.appendChild( styles ); - QDomElement style = outdoc.createElement( "STYLE" ); + TQDomElement style = outdoc.createElement( "STYLE" ); styles.appendChild( style ); - QDomElement elem = outdoc.createElement( "NAME" ); + TQDomElement elem = outdoc.createElement( "NAME" ); style.appendChild( elem ); elem.setAttribute( "value", titleStyleName ); elem = outdoc.createElement( "FOLLOWING" ); style.appendChild( elem ); elem.setAttribute( "name", "Standard" ); // no i18n here! - QDomElement counter = outdoc.createElement( "COUNTER" ); + TQDomElement counter = outdoc.createElement( "COUNTER" ); style.appendChild( counter ); counter.setAttribute( "type", 1 ); // numbered counter.setAttribute( "depth", 0 ); @@ -119,15 +119,15 @@ KoFilter::ConversionStatus KprKword::convert( const QCString& from, const QCStri counter.setAttribute( "numberingtype", 1 ); // chapter counter.setAttribute( "righttext", "." ); - QDomElement format = outdoc.createElement( "FORMAT" ); + TQDomElement format = outdoc.createElement( "FORMAT" ); style.appendChild( format ); - QDomElement font = outdoc.createElement( "FONT" ); + TQDomElement font = outdoc.createElement( "FONT" ); format.appendChild( font ); font.setAttribute( "name", titleFont ); // found when reading the first title - QDomElement size = outdoc.createElement( "SIZE" ); + TQDomElement size = outdoc.createElement( "SIZE" ); format.appendChild( size ); size.setAttribute( "value", 24 ); - QDomElement bold = outdoc.createElement( "WEIGHT" ); + TQDomElement bold = outdoc.createElement( "WEIGHT" ); format.appendChild( bold ); bold.setAttribute( "value", 75 ); @@ -147,7 +147,7 @@ KoFilter::ConversionStatus KprKword::convert( const QCString& from, const QCStri kdError(30502) << "Unable to open output file!" << endl; return KoFilter::StorageCreationError; } - QCString cstring = outdoc.toCString(); // utf-8 already + TQCString cstring = outdoc.toCString(); // utf-8 already out->writeBlock( cstring.data(), cstring.length() ); return KoFilter::OK; } @@ -156,7 +156,7 @@ KoFilter::ConversionStatus KprKword::convert( const QCString& from, const QCStri class KprObject { public: double y; - QDomElement elem; + TQDomElement elem; bool operator < ( const KprObject & c ) const { return y < c.y; @@ -169,25 +169,25 @@ class KprObject { void KprKword::convert() { - QDomElement docElem = inpdoc.documentElement(); - QDomElement paper = docElem.namedItem( "PAPER" ).toElement(); + TQDomElement docElem = inpdoc.documentElement(); + TQDomElement paper = docElem.namedItem( "PAPER" ).toElement(); int ptPageHeight = paper.attribute( "ptHeight" ).toInt(); - QDomElement objects = docElem.namedItem( "OBJECTS" ).toElement(); + TQDomElement objects = docElem.namedItem( "OBJECTS" ).toElement(); if ( objects.isNull() ) return; - QSortedList< KprObject > objList; + TQSortedList< KprObject > objList; objList.setAutoDelete( true ); - QDomNodeList lst = objects.elementsByTagName( "OBJECT" ); + TQDomNodeList lst = objects.elementsByTagName( "OBJECT" ); uint lstcount = lst.count(); for ( uint item = 0 ; item < lstcount ; ++item ) { - QDomElement object = lst.item( item ).toElement(); + TQDomElement object = lst.item( item ).toElement(); if ( object.attribute( "type" ).toInt() == 4 ) // we only care about text objs { - QDomElement orig = object.namedItem( "ORIG" ).toElement(); + TQDomElement orig = object.namedItem( "ORIG" ).toElement(); if ( !orig.isNull() ) { KprObject * obj = new KprObject; @@ -201,9 +201,9 @@ void KprKword::convert() int curPage = -1; //kdDebug() << "found " << objList.count() << " objects" << endl; - for ( QPtrListIterator<KprObject> it(objList); it.current(); ++it ) + for ( TQPtrListIterator<KprObject> it(objList); it.current(); ++it ) { - QDomElement elem = it.current()->elem; + TQDomElement elem = it.current()->elem; // Detect the first object of each page int page = int( it.current()->y / ptPageHeight ); bool isTitle = ( page > curPage ); @@ -211,64 +211,64 @@ void KprKword::convert() // << " isTitle=" << isTitle << endl; curPage = page; - QDomElement textObj = elem.namedItem( "TEXTOBJ" ).toElement(); + TQDomElement textObj = elem.namedItem( "TEXTOBJ" ).toElement(); if (textObj.isNull()) continue; // For each paragraph in this text object... - QDomNodeList lst = textObj.elementsByTagName( "P" ); + TQDomNodeList lst = textObj.elementsByTagName( "P" ); uint lstcount = lst.count(); for ( uint item = 0; item < lstcount ; ++item ) { - QDomElement p = lst.item( item ).toElement(); + TQDomElement p = lst.item( item ).toElement(); // Create paragraph in KWord doc - QDomElement parag = outdoc.createElement( "PARAGRAPH" ); + TQDomElement parag = outdoc.createElement( "PARAGRAPH" ); frameset.appendChild( parag ); - QDomElement outFormatsElem = outdoc.createElement( "FORMATS" ); + TQDomElement outFormatsElem = outdoc.createElement( "FORMATS" ); - QString text; + TQString text; // For each text element in the paragraph... - QDomElement textElem = p.firstChild().toElement(); + TQDomElement textElem = p.firstChild().toElement(); - QDomElement counter = p.namedItem( "COUNTER" ).toElement(); - QDomElement indent=p.namedItem("INDENTS").toElement(); - QDomElement lineSpacing=p.namedItem( "LINESPACING" ).toElement(); - QDomElement offset=p.namedItem("OFFSETS").toElement(); - QDomElement leftBorder = p.namedItem( "LEFTBORDER" ).toElement(); - QDomElement rightBorder = p.namedItem( "RIGHTBORDER" ).toElement(); - QDomElement topBorder = p.namedItem( "TOPBORDER" ).toElement(); - QDomElement bottomBorder = p.namedItem( "BOTTOMBORDER" ).toElement(); + TQDomElement counter = p.namedItem( "COUNTER" ).toElement(); + TQDomElement indent=p.namedItem("INDENTS").toElement(); + TQDomElement lineSpacing=p.namedItem( "LINESPACING" ).toElement(); + TQDomElement offset=p.namedItem("OFFSETS").toElement(); + TQDomElement leftBorder = p.namedItem( "LEFTBORDER" ).toElement(); + TQDomElement rightBorder = p.namedItem( "RIGHTBORDER" ).toElement(); + TQDomElement topBorder = p.namedItem( "TOPBORDER" ).toElement(); + TQDomElement bottomBorder = p.namedItem( "BOTTOMBORDER" ).toElement(); - QDomElement shadow=p.namedItem("SHADOW").toElement(); + TQDomElement shadow=p.namedItem("SHADOW").toElement(); for ( ; !textElem.isNull() ; textElem = textElem.nextSibling().toElement() ) { int oldLen = text.length(); text += textElem.text(); //kdDebug() << "KprKword::convert text now " << text << endl; - QDomElement outFormatElem = outdoc.createElement( "FORMAT" ); + TQDomElement outFormatElem = outdoc.createElement( "FORMAT" ); if ( textElem.attribute( "italic" ).toInt() ) { - QDomElement e = outdoc.createElement("ITALIC"); + TQDomElement e = outdoc.createElement("ITALIC"); e.setAttribute( "value", 1 ); outFormatElem.appendChild( e ); } - QColor underlineColor; + TQColor underlineColor; if ( textElem.hasAttribute("underlinecolor" )) { - underlineColor =QColor(textElem.attribute("underlinecolor" )); + underlineColor =TQColor(textElem.attribute("underlinecolor" )); } - QString underlineStyleLine; + TQString underlineStyleLine; if ( textElem.hasAttribute("underlinestyleline")) { underlineStyleLine = textElem.attribute("underlinestyleline"); } if ( textElem.hasAttribute("underline" )) { - QDomElement e = outdoc.createElement("UNDERLINE"); - QString value = textElem.attribute( "underline" ); + TQDomElement e = outdoc.createElement("UNDERLINE"); + TQString value = textElem.attribute( "underline" ); if ( value == "double" ) { e.setAttribute( "value", "double" ); @@ -291,12 +291,12 @@ void KprKword::convert() } - QString strikeOutStyleLine; + TQString strikeOutStyleLine; if ( textElem.hasAttribute("strikeoutstyleline")) { strikeOutStyleLine = textElem.attribute("strikeoutstyleline"); } - QString strikeOutValue; + TQString strikeOutValue; if ( textElem.hasAttribute("strikeOut")) { strikeOutValue = textElem.attribute("strikeOut"); @@ -304,7 +304,7 @@ void KprKword::convert() if( !strikeOutValue.isEmpty()) { - QDomElement e = outdoc.createElement("STRIKEOUT"); + TQDomElement e = outdoc.createElement("STRIKEOUT"); e.setAttribute( "value", strikeOutValue ); if ( !strikeOutStyleLine.isEmpty()) e.setAttribute("styleline", strikeOutStyleLine); @@ -312,7 +312,7 @@ void KprKword::convert() } /*if ( textElem.attribute( "bold" ).toInt() ) { - QDomElement e = outdoc.createElement("WEIGHT"); + TQDomElement e = outdoc.createElement("WEIGHT"); e.setAttribute( "value", 75 ); outFormatElem.appendChild( e ); }*/ // doesn't look good @@ -322,9 +322,9 @@ void KprKword::convert() // Family and point size are voluntarily NOT passed over. if ( !textElem.attribute( "color" ).isEmpty()) { - QColor col; + TQColor col; col.setNamedColor(textElem.attribute( "color" )); - QDomElement e = outdoc.createElement("COLOR"); + TQDomElement e = outdoc.createElement("COLOR"); e.setAttribute( "red", col.red() ); e.setAttribute( "green", col.green() ); e.setAttribute( "blue", col.blue() ); @@ -332,9 +332,9 @@ void KprKword::convert() } if ( !textElem.attribute("textbackcolor").isEmpty()) { - QColor col; + TQColor col; col.setNamedColor(textElem.attribute( "textbackcolor" )); - QDomElement e = outdoc.createElement("TEXTBACKGROUNDCOLOR"); + TQDomElement e = outdoc.createElement("TEXTBACKGROUNDCOLOR"); e.setAttribute( "red", col.red() ); e.setAttribute( "green", col.green() ); e.setAttribute( "blue", col.blue() ); @@ -351,7 +351,7 @@ void KprKword::convert() if( textElem.attribute("VERTALIGN").toInt()) { - QDomElement e = outdoc.createElement("VERTALIGN"); + TQDomElement e = outdoc.createElement("VERTALIGN"); e.setAttribute( "value", textElem.attribute("VERTALIGN").toInt() ); if ( relative != 0) e.setAttribute( "relativetextsize", relative ); @@ -360,34 +360,34 @@ void KprKword::convert() if( textElem.hasAttribute("shadowtext")) { - QDomElement e = outdoc.createElement("SHADOWTEXT"); + TQDomElement e = outdoc.createElement("SHADOWTEXT"); e.setAttribute( "value", textElem.attribute("shadowtext").toInt() ); outFormatElem.appendChild( e ); } if( textElem.hasAttribute("offsetfrombaseline")) { - QDomElement e = outdoc.createElement("OFFSETFROMBASELINE"); + TQDomElement e = outdoc.createElement("OFFSETFROMBASELINE"); e.setAttribute( "value", textElem.attribute("offsetfrombaseline").toInt() ); outFormatElem.appendChild( e ); } if( textElem.hasAttribute("wordbyword")) { - QDomElement e = outdoc.createElement("WORDBYWORD"); + TQDomElement e = outdoc.createElement("WORDBYWORD"); e.setAttribute( "value", textElem.attribute("wordbyword").toInt() ); outFormatElem.appendChild( e ); } if( textElem.hasAttribute("fontattribute")) { - QDomElement e = outdoc.createElement("FONTATTRIBUTE"); + TQDomElement e = outdoc.createElement("FONTATTRIBUTE"); e.setAttribute( "value", textElem.attribute("fontattribute") ); outFormatElem.appendChild( e ); } if( textElem.hasAttribute("language")) { - QDomElement e = outdoc.createElement("LANGUAGE"); + TQDomElement e = outdoc.createElement("LANGUAGE"); e.setAttribute( "value", textElem.attribute("language") ); outFormatElem.appendChild( e ); } @@ -406,19 +406,19 @@ void KprKword::convert() if ( len > 0 && text[ len - 1 ] == ' ' ) text.truncate( len - 1 ); - QDomElement outTextElem = outdoc.createElement( "TEXT" ); + TQDomElement outTextElem = outdoc.createElement( "TEXT" ); parag.appendChild( outTextElem ); outTextElem.appendChild( outdoc.createTextNode( text ) ); if ( !outFormatsElem.firstChild().isNull() ) // Do we have formats to save ? parag.appendChild( outFormatsElem ); - QDomElement layoutElem = outdoc.createElement( "LAYOUT" ); - parag.appendChild( layoutElem ); - QDomElement nameElem = outdoc.createElement( "NAME" ); - layoutElem.appendChild( nameElem ); - nameElem.setAttribute( "value", isTitle ? titleStyleName : QString("Standard") ); - QDomElement align=outdoc.createElement("FLOW"); + TQDomElement tqlayoutElem = outdoc.createElement( "LAYOUT" ); + parag.appendChild( tqlayoutElem ); + TQDomElement nameElem = outdoc.createElement( "NAME" ); + tqlayoutElem.appendChild( nameElem ); + nameElem.setAttribute( "value", isTitle ? titleStyleName : TQString("Standard") ); + TQDomElement align=outdoc.createElement("FLOW"); if(p.hasAttribute("align")) { switch(p.attribute( "align" ).toInt()) @@ -438,25 +438,25 @@ void KprKword::convert() } } if(!counter.isNull() ) - layoutElem.appendChild( counter ); + tqlayoutElem.appendChild( counter ); if(!indent.isNull()) - layoutElem.appendChild( indent ); + tqlayoutElem.appendChild( indent ); if(!lineSpacing.isNull()) - layoutElem.appendChild( lineSpacing ); + tqlayoutElem.appendChild( lineSpacing ); if(!offset.isNull()) - layoutElem.appendChild( offset); + tqlayoutElem.appendChild( offset); if(!leftBorder.isNull()) - layoutElem.appendChild(leftBorder); + tqlayoutElem.appendChild(leftBorder); if(!rightBorder.isNull()) - layoutElem.appendChild(rightBorder); + tqlayoutElem.appendChild(rightBorder); if(!topBorder.isNull()) - layoutElem.appendChild(topBorder); + tqlayoutElem.appendChild(topBorder); if(!bottomBorder.isNull()) - layoutElem.appendChild(bottomBorder); + tqlayoutElem.appendChild(bottomBorder); if(!align.isNull()) - layoutElem.appendChild(align); + tqlayoutElem.appendChild(align); if(!shadow.isNull()) - layoutElem.appendChild(shadow); + tqlayoutElem.appendChild(shadow); // Only the first parag of the top text object is set to the 'title' style isTitle = false; } diff --git a/filters/kpresenter/kword/kprkword.h b/filters/kpresenter/kword/kprkword.h index 5e0aed2d..0ba4efa5 100644 --- a/filters/kpresenter/kword/kprkword.h +++ b/filters/kpresenter/kword/kprkword.h @@ -21,25 +21,26 @@ #define KPRKWORD_H #include <KoFilter.h> -#include <qdom.h> +#include <tqdom.h> class KprKword : public KoFilter { Q_OBJECT + TQ_OBJECT public: - KprKword(KoFilter *parent, const char *name, const QStringList&); + KprKword(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~KprKword() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); protected: void convert(); - QDomDocument inpdoc; - QDomDocument outdoc; - QDomElement frameset; - QString titleStyleName; - QString titleFont; + TQDomDocument inpdoc; + TQDomDocument outdoc; + TQDomElement frameset; + TQString titleStyleName; + TQString titleFont; }; #endif // KPRKWORD_H diff --git a/filters/kpresenter/libimageexport/imageexport.cpp b/filters/kpresenter/libimageexport/imageexport.cpp index 7611a936..9e933380 100644 --- a/filters/kpresenter/libimageexport/imageexport.cpp +++ b/filters/kpresenter/libimageexport/imageexport.cpp @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include <qpixmap.h> -#include <qpainter.h> +#include <tqpixmap.h> +#include <tqpainter.h> #include <kmessagebox.h> @@ -32,7 +32,7 @@ #include "KPrCanvas.h" #include "imageexport.h" -ImageExport::ImageExport(KoFilter *, const char *, const QStringList&) +ImageExport::ImageExport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -42,8 +42,8 @@ ImageExport::~ImageExport() } -KoFilter::ConversionStatus -ImageExport::convert(const QCString& from, const QCString& to) +KoFilter::ConversiontqStatus +ImageExport::convert(const TQCString& from, const TQCString& to) { KoDocument * document = m_chain->inputDocument(); @@ -70,9 +70,9 @@ ImageExport::convert(const QCString& from, const QCString& to) kdWarning() << "Invalid document mimetype " << kpresenterdoc->mimeType() << endl; return KoFilter::NotImplemented; } - KoPageLayout layoutPage= kpresenterdoc->pageLayout(); - width = int( layoutPage.ptWidth ); - height = int( layoutPage.ptHeight ); + KoPageLayout tqlayoutPage= kpresenterdoc->pageLayout(); + width = int( tqlayoutPage.ptWidth ); + height = int( tqlayoutPage.ptHeight ); if (extraImageAttribute()) { KPrView* view = static_cast<KPrView*>( kpresenterdoc->views().getFirst()); @@ -83,8 +83,8 @@ ImageExport::convert(const QCString& from, const QCString& to) } else //when it's embedded we use just it. { - pixmap = QPixmap(width, height); - QPainter painter(&pixmap); + pixmap = TQPixmap(width, height); + TQPainter painter(&pixmap); kpresenterdoc->paintContent(painter, pixmap.rect(), false); } if( !saveImage( m_chain->outputFile())) diff --git a/filters/kpresenter/libimageexport/imageexport.h b/filters/kpresenter/libimageexport/imageexport.h index e5dfeb81..641a9010 100644 --- a/filters/kpresenter/libimageexport/imageexport.h +++ b/filters/kpresenter/libimageexport/imageexport.h @@ -22,23 +22,24 @@ #include <KoFilter.h> -class QPixmap; +class TQPixmap; class ImageExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - ImageExport(KoFilter *parent, const char *name, const QStringList&); + ImageExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~ImageExport(); - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); virtual bool extraImageAttribute() { return true;}; - virtual bool saveImage( QString fileName) = 0; + virtual bool saveImage( TQString fileName) = 0; virtual const char* exportFormat() = 0; protected: int width; int height; - QPixmap pixmap; + TQPixmap pixmap; }; #endif // __IMAGEEXPORT_H__ diff --git a/filters/kpresenter/magicpoint/mgp2kpr.py b/filters/kpresenter/magicpoint/mgp2kpr.py index 97527471..73751f26 100755 --- a/filters/kpresenter/magicpoint/mgp2kpr.py +++ b/filters/kpresenter/magicpoint/mgp2kpr.py @@ -56,7 +56,7 @@ class MgpImporter: self.__reset() #init properties def __reset(self): - self.alignment="1" #text alignment, left + self.tqalignment="1" #text tqalignment, left self.vgap=1 #line spacing #font properties @@ -84,14 +84,14 @@ class MgpImporter: def __setupDefaultFonts(self,command): tokens=string.split(command,' ') - _key=string.replace(tokens[1], '"', '') - _val=string.replace(tokens[3], '"', '') + _key=string.tqreplace(tokens[1], '"', '') + _val=string.tqreplace(tokens[3], '"', '') self.defFonts[_key]=_val #print self.defFonts def __setFontIndirect(self,command): tokens=string.split(command,' ') - _font=string.replace(tokens[1], '"', '') + _font=string.tqreplace(tokens[1], '"', '') if _font in self.defFonts.keys(): #�we have a "default" font, find it in the map self.__setFont(None,self.defFonts[_font]) #print self.defFonts[_font] @@ -99,9 +99,9 @@ class MgpImporter: def __setFont(self,command,font=""): if command: tokens=string.split(command,' ') - font=string.replace(tokens[1], '"', '').strip() #XLFD-like, eg: mincho-medium-r (family-weight-slant) + font=string.tqreplace(tokens[1], '"', '').strip() #XLFD-like, eg: mincho-medium-r (family-weight-slant) - _numDash=string.find(font,"-") #find dashes + _numDash=string.tqfind(font,"-") #find dashes if (_numDash==-1): #mincho self.fontName=font @@ -124,7 +124,7 @@ class MgpImporter: def __setBgColor(self, command): tokens=string.split(command,' ') self.bctype="0" - self.color1=string.replace(tokens[1].strip(),'"', '') #strip quotes and \n + self.color1=string.tqreplace(tokens[1].strip(),'"', '') #strip quotes and \n def __setBgGradient(self, command): tokens=string.split(command,' ') @@ -135,8 +135,8 @@ class MgpImporter: try: dir=tokens[4] - self.color1=string.replace(tokens[6].strip(),'"', '') #strip quotes and \n - self.color2=string.replace(tokens[7].strip(),'"', '') + self.color1=string.tqreplace(tokens[6].strip(),'"', '') #strip quotes and \n + self.color2=string.tqreplace(tokens[7].strip(),'"', '') except: self.bctype="0" self.color1="black" @@ -167,16 +167,16 @@ class MgpImporter: def __setAlign(self,command): tokens=string.split(command,' ') if (tokens[0]=='leftfill'): #justify - self.alignment="8" + self.tqalignment="8" elif (tokens[0]=='right'): - self.alignment="2" + self.tqalignment="2" elif (tokens[0]=='center'): - self.alignment="4" + self.tqalignment="4" else: - self.alignment="1" #left - #print self.alignment + self.tqalignment="1" #left + #print self.tqalignment - def __setBackground(self,parent): + def __setBackground(self,tqparent): pageElem=self.document.createElement("PAGE") elem=self.document.createElement("BACKTYPE") #color @@ -200,9 +200,9 @@ class MgpImporter: elem.setAttribute("color", self.color2) pageElem.appendChild(elem) - parent.appendChild(pageElem) + tqparent.appendChild(pageElem) - def __handlePage(self,parent,bgParent): + def __handlePage(self,tqparent,bgParent): if (self.pageCount!=-1): self.__setBackground(bgParent) #set the background for this page @@ -224,7 +224,7 @@ class MgpImporter: ### para comes here objElem.appendChild(self.textElem) - parent.appendChild(objElem) + tqparent.appendChild(objElem) self.useDefaults=1 self.__reset() @@ -233,7 +233,7 @@ class MgpImporter: indent=-1 pElem=self.document.createElement("P") #paragraph - pElem.setAttribute("align", self.alignment) + pElem.setAttribute("align", self.tqalignment) elem=self.document.createElement("NAME") #style name elem.setAttribute("value", "Standard") ###is this needed at all? @@ -283,7 +283,7 @@ class MgpImporter: if (self.fontItalic!=0): elem.setAttribute("italic", "1") - text=self.document.createTextNode(unicode(line, self.charset, 'ignore')) + text=self.document.createTextNode(tqunicode(line, self.charset, 'ignore')) elem.appendChild(text) pElem.appendChild(elem) self.textElem.appendChild(pElem) @@ -296,14 +296,14 @@ class MgpImporter: def __setTextColor(self,command): tokens=string.split(command,' ') - self.textColor=string.replace(tokens[1].strip(),'"', '') #strip quotes + self.textColor=string.tqreplace(tokens[1].strip(),'"', '') #strip quotes #print self.textColor def __handleBar(self,command): tokens=string.split(command,' ') try: - color=string.replace(tokens[1].strip(),'"', '') #strip quotes and \n + color=string.tqreplace(tokens[1].strip(),'"', '') #strip quotes and \n width=tokens[2].strip()/1000*Y_OFFSET #in per mils of display height start=tokens[3].strip()/100*PAGE_WIDTH #start position percent of display width length=tokens[4].strip()/100*PAGE_WIDTH #length percent of display width @@ -314,7 +314,7 @@ class MgpImporter: length=PAGE_WIDTH - def __setPaper(self,parent): + def __setPaper(self,tqparent): paperElem=self.document.createElement("PAPER") paperElem.setAttribute("ptWidth", str(PAGE_WIDTH)) paperElem.setAttribute("ptHeight", str(Y_OFFSET)) @@ -330,7 +330,7 @@ class MgpImporter: paperElem.appendChild(borderElem) - parent.appendChild(paperElem) + tqparent.appendChild(paperElem) def convert(self, fileIn, fileOut=None): """Parses the Magicpoint document and returns a KPresenter XML document. @@ -357,7 +357,7 @@ class MgpImporter: if (line.startswith('#') or line.startswith('%%')): #skip comments continue elif (line.startswith('%')): #commands - commands=string.split(string.replace(line, '%', ''),',') #list of commands, comma separated, remove '%' + commands=string.split(string.tqreplace(line, '%', ''),',') #list of commands, comma separated, remove '%' for command in commands: command=command.strip().lower() #print command @@ -377,7 +377,7 @@ class MgpImporter: self.__setFontSize(command) elif (command.startswith('left') or command.startswith('center') or - command.startswith('right')): #text alignment + command.startswith('right')): #text tqalignment self.__setAlign(command) elif (command.startswith('charset')): #charset self.__setCharset(command) diff --git a/filters/kpresenter/mng/mngexport.cpp b/filters/kpresenter/mng/mngexport.cpp index f56f4c77..67ff47d5 100644 --- a/filters/kpresenter/mng/mngexport.cpp +++ b/filters/kpresenter/mng/mngexport.cpp @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include <qpixmap.h> -#include <qpainter.h> +#include <tqpixmap.h> +#include <tqpainter.h> #include <kmessagebox.h> @@ -33,7 +33,7 @@ typedef KGenericFactory<MngExport, KoFilter> mngExportFactory; K_EXPORT_COMPONENT_FACTORY( libkpresentermngexport, mngExportFactory( "mngexport" ) ) -MngExport::MngExport(KoFilter *fil, const char *name, const QStringList&lst) +MngExport::MngExport(KoFilter *fil, const char *name, const TQStringList&lst) : ImageExport(fil,name,lst) { } @@ -58,7 +58,7 @@ bool MngExport::extraImageAttribute() } -bool MngExport::saveImage( QString fileName) +bool MngExport::saveImage( TQString fileName) { bool ret = pixmap.save( fileName, "MNG" ); // Save the image. diff --git a/filters/kpresenter/mng/mngexport.h b/filters/kpresenter/mng/mngexport.h index c479b1e0..6e5f9d4a 100644 --- a/filters/kpresenter/mng/mngexport.h +++ b/filters/kpresenter/mng/mngexport.h @@ -25,11 +25,12 @@ class MngExport : public ImageExport { Q_OBJECT + TQ_OBJECT public: - MngExport(KoFilter *parent, const char *name, const QStringList&); + MngExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~MngExport(); - virtual bool saveImage( QString fileName); + virtual bool saveImage( TQString fileName); virtual bool extraImageAttribute(); virtual const char * exportFormat(); }; diff --git a/filters/kpresenter/ooimpress/ooimpressexport.cc b/filters/kpresenter/ooimpress/ooimpressexport.cc index 27d0781d..3e54a05f 100644 --- a/filters/kpresenter/ooimpress/ooimpressexport.cc +++ b/filters/kpresenter/ooimpress/ooimpressexport.cc @@ -19,9 +19,9 @@ #include "ooimpressexport.h" -#include <qdom.h> -#include <qfile.h> -#include <qdatetime.h> +#include <tqdom.h> +#include <tqfile.h> +#include <tqdatetime.h> #include <kdebug.h> #include <kgenericfactory.h> @@ -33,7 +33,7 @@ typedef KGenericFactory<OoImpressExport, KoFilter> OoImpressExportFactory; K_EXPORT_COMPONENT_FACTORY( libooimpressexport, OoImpressExportFactory( "kofficefilters" ) ) -OoImpressExport::OoImpressExport( KoFilter *, const char *, const QStringList & ) +OoImpressExport::OoImpressExport( KoFilter *, const char *, const TQStringList & ) : KoFilter() , m_currentPage( 0 ) , m_objectIndex( 0 ) @@ -54,8 +54,8 @@ OoImpressExport::~OoImpressExport() delete m_storeinp; } -KoFilter::ConversionStatus OoImpressExport::convert( const QCString & from, - const QCString & to ) +KoFilter::ConversiontqStatus OoImpressExport::convert( const TQCString & from, + const TQCString & to ) { kdDebug(30518) << "Entering Ooimpress Export filter: " << from << " - " << to << endl; @@ -66,13 +66,13 @@ KoFilter::ConversionStatus OoImpressExport::convert( const QCString & from, } // read in the KPresenter file - KoFilter::ConversionStatus preStatus = openFile(); + KoFilter::ConversiontqStatus pretqStatus = openFile(); - if ( preStatus != KoFilter::OK ) - return preStatus; + if ( pretqStatus != KoFilter::OK ) + return pretqStatus; - QDomImplementation impl; - QDomDocument meta( impl.createDocumentType( "office:document-meta", + TQDomImplementation impl; + TQDomDocument meta( impl.createDocumentType( "office:document-meta", "-//OpenOffice.org//DTD OfficeDocument 1.0//EN", "office.dtd" ) ); @@ -93,12 +93,12 @@ KoFilter::ConversionStatus OoImpressExport::convert( const QCString & from, return KoFilter::CreationError; } - QCString metaString = meta.toCString(); + TQCString metaString = meta.toCString(); //kdDebug(30518) << "meta :" << metaString << endl; m_storeout->write( metaString , metaString.length() ); m_storeout->close(); - QDomDocument content( impl.createDocumentType( "office:document-content", + TQDomDocument content( impl.createDocumentType( "office:document-content", "-//OpenOffice.org//DTD OfficeDocument 1.0//EN", "office.dtd" ) ); @@ -114,12 +114,12 @@ KoFilter::ConversionStatus OoImpressExport::convert( const QCString & from, return KoFilter::CreationError; } - QCString contentString = content.toCString(); + TQCString contentString = content.toCString(); //kdDebug(30518) << "content :" << contentString << endl; m_storeout->write( contentString , contentString.length() ); m_storeout->close(); - QDomDocument settings( impl.createDocumentType( "office:document-content", + TQDomDocument settings( impl.createDocumentType( "office:document-content", "-//OpenOffice.org//DTD OfficeDocument 1.0//EN", "office.dtd" ) ); @@ -132,13 +132,13 @@ KoFilter::ConversionStatus OoImpressExport::convert( const QCString & from, return KoFilter::CreationError; } - QCString settingsString = settings.toCString(); + TQCString settingsString = settings.toCString(); //kdDebug(30518) << "content :" << settingsString << endl; m_storeout->write( settingsString , settingsString.length() ); m_storeout->close(); - QDomDocument styles( impl.createDocumentType( "office:document-styles", + TQDomDocument styles( impl.createDocumentType( "office:document-styles", "-//OpenOffice.org//DTD OfficeDocument 1.0//EN", "office.dtd" ) ); @@ -151,12 +151,12 @@ KoFilter::ConversionStatus OoImpressExport::convert( const QCString & from, return KoFilter::CreationError; } - QCString stylesString = styles.toCString(); + TQCString stylesString = styles.toCString(); //kdDebug(30518) << "styles :" << stylesString << endl; m_storeout->write( stylesString , stylesString.length() ); m_storeout->close(); - QDomDocument manifest( impl.createDocumentType( "manifest:manifest", + TQDomDocument manifest( impl.createDocumentType( "manifest:manifest", "-//OpenOffice.org//DTD Manifest 1.0//EN", "Manifest.dtd" ) ); @@ -170,7 +170,7 @@ KoFilter::ConversionStatus OoImpressExport::convert( const QCString & from, return KoFilter::CreationError; } - QCString manifestString = manifest.toCString(); + TQCString manifestString = manifest.toCString(); //kdDebug(30518) << "manifest :" << manifestString << endl; m_storeout->write( manifestString , manifestString.length() ); m_storeout->close(); @@ -178,7 +178,7 @@ KoFilter::ConversionStatus OoImpressExport::convert( const QCString & from, return KoFilter::OK; } -KoFilter::ConversionStatus OoImpressExport::openFile() +KoFilter::ConversiontqStatus OoImpressExport::openFile() { m_storeinp = KoStore::createStore( m_chain->inputFile(), KoStore::Read ); @@ -210,31 +210,31 @@ KoFilter::ConversionStatus OoImpressExport::openFile() return KoFilter::OK; } -void OoImpressExport::createDocumentMeta( QDomDocument & docmeta ) +void OoImpressExport::createDocumentMeta( TQDomDocument & docmeta ) { docmeta.appendChild( docmeta.createProcessingInstruction( "xml","version=\"1.0\" encoding=\"UTF-8\"" ) ); - QDomElement content = docmeta.createElement( "office:document-meta" ); + TQDomElement content = docmeta.createElement( "office:document-meta" ); content.setAttribute( "xmlns:office", "http://openoffice.org/2000/office" ); content.setAttribute( "xmlns:xlink", "http://www.w3.org/1999/xlink" ); content.setAttribute( "xmlns:dc", "http://purl.org/dc/elements/1.1/" ); content.setAttribute( "xmlns:meta", "http://openoffice.org/2000/meta" ); content.setAttribute( "office:version", "1.0" ); - QDomNode meta = docmeta.createElement( "office:meta" ); + TQDomNode meta = docmeta.createElement( "office:meta" ); - QDomElement generator = docmeta.createElement( "meta:generator" ); + TQDomElement generator = docmeta.createElement( "meta:generator" ); generator.appendChild( docmeta.createTextNode( "KPresenter 1.5" ) ); meta.appendChild( generator ); - QDomNode i = m_documentinfo.namedItem( "document-info" ); + TQDomNode i = m_documentinfo.namedItem( "document-info" ); if ( !i.isNull() ) { - QDomNode n = i.namedItem( "author" ).namedItem( "full-name" ); + TQDomNode n = i.namedItem( "author" ).namedItem( "full-name" ); if ( !n.isNull() ) { - QDomElement fullName = n.toElement(); - QDomElement creator = docmeta.createElement( "meta:initial-creator" ); + TQDomElement fullName = n.toElement(); + TQDomElement creator = docmeta.createElement( "meta:initial-creator" ); creator.appendChild( docmeta.createTextNode( fullName.text() ) ); meta.appendChild( creator ); @@ -245,16 +245,16 @@ void OoImpressExport::createDocumentMeta( QDomDocument & docmeta ) n = i.namedItem( "about" ).namedItem( "abstract" ); if ( !n.isNull() ) { - QDomElement user = docmeta.createElement( "dc:description" ); + TQDomElement user = docmeta.createElement( "dc:description" ); user.appendChild( n.firstChild() ); meta.appendChild( user ); } n = i.namedItem( "about" ).namedItem( "keyword" ); if ( !n.isNull() ) { - QDomElement text = n.toElement(); - QDomElement key = docmeta.createElement( "meta:keywords" ); - QDomElement keyword = docmeta.createElement( "meta:keyword" ); + TQDomElement text = n.toElement(); + TQDomElement key = docmeta.createElement( "meta:keywords" ); + TQDomElement keyword = docmeta.createElement( "meta:keyword" ); key.appendChild( keyword ); keyword.appendChild( docmeta.createTextNode( text.text() ) ); meta.appendChild( key ); @@ -262,22 +262,22 @@ void OoImpressExport::createDocumentMeta( QDomDocument & docmeta ) n = i.namedItem( "about" ).namedItem( "subject" ); if ( !n.isNull() ) { - QDomElement text = n.toElement(); - QDomElement subjet = docmeta.createElement( "dc:subject" ); + TQDomElement text = n.toElement(); + TQDomElement subjet = docmeta.createElement( "dc:subject" ); subjet.appendChild( docmeta.createTextNode( text.text() ) ); meta.appendChild( subjet ); } n = i.namedItem( "about" ).namedItem( "title" ); if ( !n.isNull() ) { - QDomElement text = n.toElement(); - QDomElement title = docmeta.createElement( "dc:title" ); + TQDomElement text = n.toElement(); + TQDomElement title = docmeta.createElement( "dc:title" ); title.appendChild( docmeta.createTextNode( text.text() ) ); meta.appendChild( title ); } } -// QDomElement statistic = docmeta.createElement( "meta:document-statistic" ); +// TQDomElement statistic = docmeta.createElement( "meta:document-statistic" ); // statistic.setAttribute( "meta:object-count", 0 ); // meta.appendChild( data ); @@ -285,11 +285,11 @@ void OoImpressExport::createDocumentMeta( QDomDocument & docmeta ) docmeta.appendChild( content ); } -void OoImpressExport::createDocumentStyles( QDomDocument & docstyles ) +void OoImpressExport::createDocumentStyles( TQDomDocument & docstyles ) { docstyles.appendChild( docstyles.createProcessingInstruction( "xml","version=\"1.0\" encoding=\"UTF-8\"" ) ); - QDomElement content = docstyles.createElement( "office:document-content" ); + TQDomElement content = docstyles.createElement( "office:document-content" ); content.setAttribute( "xmlns:office", "http://openoffice.org/2000/office" ); content.setAttribute( "xmlns:style", "http://openoffice.org/2000/style" ); content.setAttribute( "xmlns:text", "http://openoffice.org/2000/text" ); @@ -307,45 +307,45 @@ void OoImpressExport::createDocumentStyles( QDomDocument & docstyles ) content.setAttribute( "office:version", "1.0" ); // order important here! - QDomElement styles = docstyles.createElement( "office:styles" ); + TQDomElement styles = docstyles.createElement( "office:styles" ); m_styleFactory.addOfficeStyles( docstyles, styles ); content.appendChild( styles ); - QDomElement automatic = docstyles.createElement( "office:automatic-styles" ); + TQDomElement automatic = docstyles.createElement( "office:automatic-styles" ); m_styleFactory.addOfficeAutomatic( docstyles, automatic ); content.appendChild( automatic ); - QDomElement master = docstyles.createElement( "office:master-styles" ); + TQDomElement master = docstyles.createElement( "office:master-styles" ); m_styleFactory.addOfficeMaster( docstyles, master ); content.appendChild( master ); docstyles.appendChild( content ); } -void OoImpressExport::createDocumentSettings( QDomDocument & docsetting ) +void OoImpressExport::createDocumentSettings( TQDomDocument & docsetting ) { docsetting.appendChild( docsetting.createProcessingInstruction( "xml","version=\"1.0\" encoding=\"UTF-8\"" ) ); - QDomElement setting = docsetting.createElement( "office:document-settings" ); + TQDomElement setting = docsetting.createElement( "office:document-settings" ); setting.setAttribute( "xmlns:office", "http://openoffice.org/2000/office"); setting.setAttribute( "xmlns:config", "http://openoffice.org/2001/config" ); setting.setAttribute( "office:class", "presentation" ); setting.setAttribute( "office:version", "1.0" ); - QDomElement begin = docsetting.createElement( "office:settings" ); + TQDomElement begin = docsetting.createElement( "office:settings" ); - QDomElement configItem = docsetting.createElement("config:config-item-set" ); + TQDomElement configItem = docsetting.createElement("config:config-item-set" ); configItem.setAttribute( "config:name", "view-settings" ); - QDomElement mapIndexed = docsetting.createElement( "config:config-item-map-indexed" ); + TQDomElement mapIndexed = docsetting.createElement( "config:config-item-map-indexed" ); mapIndexed.setAttribute("config:name", "Views" ); configItem.appendChild( mapIndexed ); //<config:config-item-map-indexed config:name="Views"> - QDomElement mapItem = docsetting.createElement("config:config-item-map-entry" ); + TQDomElement mapItem = docsetting.createElement("config:config-item-map-entry" ); - QDomElement attribute = docsetting.createElement("config:config-item" ); + TQDomElement attribute = docsetting.createElement("config:config-item" ); attribute.setAttribute( "config:name", "SnapLinesDrawing" ); attribute.setAttribute( "config:type", "string" ); attribute.appendChild( docsetting.createTextNode( m_helpLine ) ); @@ -363,7 +363,7 @@ void OoImpressExport::createDocumentSettings( QDomDocument & docsetting ) attribute = docsetting.createElement("config:config-item" ); attribute.setAttribute( "config:name", "GridFineWidth" ); attribute.setAttribute( "config:type", "int" ); - attribute.appendChild( docsetting.createTextNode( QString::number( ( int ) ( KoUnit::toMM( ( m_gridX ) )*100 ) ) ) ); + attribute.appendChild( docsetting.createTextNode( TQString::number( ( int ) ( KoUnit::toMM( ( m_gridX ) )*100 ) ) ) ); mapItem.appendChild( attribute ); } @@ -372,14 +372,14 @@ void OoImpressExport::createDocumentSettings( QDomDocument & docsetting ) attribute = docsetting.createElement("config:config-item" ); attribute.setAttribute( "config:name", "GridFineHeight" ); attribute.setAttribute( "config:type", "int" ); - attribute.appendChild( docsetting.createTextNode( QString::number( ( int ) ( KoUnit::toMM( ( m_gridY ) )*100 ) ) ) ); + attribute.appendChild( docsetting.createTextNode( TQString::number( ( int ) ( KoUnit::toMM( ( m_gridY ) )*100 ) ) ) ); mapItem.appendChild( attribute ); } attribute = docsetting.createElement("config:config-item" ); attribute.setAttribute( "config:name", "SelectedPage" ); attribute.setAttribute( "config:type", "short" ); - attribute.appendChild( docsetting.createTextNode( QString::number( m_activePage ) ) ); + attribute.appendChild( docsetting.createTextNode( TQString::number( m_activePage ) ) ); mapItem.appendChild( attribute ); @@ -394,11 +394,11 @@ void OoImpressExport::createDocumentSettings( QDomDocument & docsetting ) } -void OoImpressExport::createDocumentContent( QDomDocument & doccontent ) +void OoImpressExport::createDocumentContent( TQDomDocument & doccontent ) { doccontent.appendChild( doccontent.createProcessingInstruction( "xml","version=\"1.0\" encoding=\"UTF-8\"" ) ); - QDomElement content = doccontent.createElement( "office:document-content" ); + TQDomElement content = doccontent.createElement( "office:document-content" ); content.setAttribute( "xmlns:office", "http://openoffice.org/2000/office"); content.setAttribute( "xmlns:style", "http://openoffice.org/2000/style" ); content.setAttribute( "xmlns:text", "http://openoffice.org/2000/text" ); @@ -417,32 +417,32 @@ void OoImpressExport::createDocumentContent( QDomDocument & doccontent ) content.setAttribute( "office:class", "presentation" ); content.setAttribute( "office:version", "1.0" ); - QDomElement script = doccontent.createElement( "office:script" ); + TQDomElement script = doccontent.createElement( "office:script" ); content.appendChild( script ); m_styles = doccontent.createElement( "office:automatic-styles" ); content.appendChild( m_styles ); - QDomElement body = doccontent.createElement( "office:body" ); + TQDomElement body = doccontent.createElement( "office:body" ); exportBody( doccontent, body ); content.appendChild( body ); doccontent.appendChild( content ); } -void OoImpressExport::createDocumentManifest( QDomDocument & docmanifest ) +void OoImpressExport::createDocumentManifest( TQDomDocument & docmanifest ) { docmanifest.appendChild( docmanifest.createProcessingInstruction( "xml","version=\"1.0\" encoding=\"UTF-8\"" ) ); - QDomElement manifest = docmanifest.createElement( "manifest:manifest" ); + TQDomElement manifest = docmanifest.createElement( "manifest:manifest" ); manifest.setAttribute( "xmlns:manifest", "http://openoffice.org/2001/manifest" ); - QDomElement entry = docmanifest.createElement( "manifest:file-entry" ); + TQDomElement entry = docmanifest.createElement( "manifest:file-entry" ); entry.setAttribute( "manifest:media-type", "application/vnd.sun.xml.impress" ); entry.setAttribute( "manifest:full-path", "/" ); manifest.appendChild( entry ); - QMap<QString, QString>::Iterator it; + TQMap<TQString, TQString>::Iterator it; for ( it = m_pictureLst.begin(); it != m_pictureLst.end(); ++it ) { entry = docmanifest.createElement( "manifest:file-entry" ); @@ -474,7 +474,7 @@ void OoImpressExport::createDocumentManifest( QDomDocument & docmanifest ) docmanifest.appendChild( manifest ); } -QString OoImpressExport::pictureKey( QDomElement &elem ) +TQString OoImpressExport::pictureKey( TQDomElement &elem ) { // Default date/time is the *nix epoch: 1970-01-01 00:00:00,000 int year=1970, month=1, day=1; @@ -496,20 +496,20 @@ QString OoImpressExport::pictureKey( QDomElement &elem ) if( elem.hasAttribute( "msec" ) ) msec=elem.attribute( "msec" ).toInt(); } - QDateTime key; - key.setDate( QDate( year, month, day ) ); - key.setTime( QTime( hour, minute, second, msec ) ); + TQDateTime key; + key.setDate( TQDate( year, month, day ) ); + key.setTime( TQTime( hour, minute, second, msec ) ); return key.toString(); } -void OoImpressExport::createPictureList( QDomNode &pictures ) +void OoImpressExport::createPictureList( TQDomNode &pictures ) { pictures = pictures.firstChild(); for( ; !pictures.isNull(); pictures = pictures.nextSibling() ) { if ( pictures.isElement() ) { - QDomElement element = pictures.toElement(); + TQDomElement element = pictures.toElement(); if ( element.tagName() == "KEY" ) { //kdDebug(30518)<<"element.attribute( name ) :"<<element.attribute( "name" )<<endl; @@ -521,9 +521,9 @@ void OoImpressExport::createPictureList( QDomNode &pictures ) } } -void OoImpressExport::createAttribute( QDomNode &attributeValue ) +void OoImpressExport::createAttribute( TQDomNode &attributeValue ) { - QDomElement elem = attributeValue.toElement(); + TQDomElement elem = attributeValue.toElement(); if(elem.hasAttribute("activePage")) m_activePage=elem.attribute("activePage").toInt(); if(elem.hasAttribute("gridx")) @@ -534,10 +534,10 @@ void OoImpressExport::createAttribute( QDomNode &attributeValue ) m_snapToGrid = (bool)elem.attribute("snaptogrid").toInt(); } -void OoImpressExport::createHelpLine( QDomNode &helpline ) +void OoImpressExport::createHelpLine( TQDomNode &helpline ) { helpline = helpline.firstChild(); - QDomElement helplines; + TQDomElement helplines; for( ; !helpline.isNull(); helpline = helpline.nextSibling() ) { if ( helpline.isElement() ) @@ -546,19 +546,19 @@ void OoImpressExport::createHelpLine( QDomNode &helpline ) if ( helplines.tagName()=="Vertical" ) { int tmpX = ( int ) ( KoUnit::toMM( helplines.attribute("value").toDouble() )*100 ); - m_helpLine+="V"+QString::number( tmpX ); + m_helpLine+="V"+TQString::number( tmpX ); } else if ( helplines.tagName()=="Horizontal" ) { int tmpY = ( int ) ( KoUnit::toMM( helplines.attribute("value").toDouble() )*100 ); - m_helpLine+="H"+QString::number( tmpY ); + m_helpLine+="H"+TQString::number( tmpY ); } else if ( helplines.tagName()=="HelpPoint" ) { - QString str( "P%1,%2" ); + TQString str( "P%1,%2" ); int tmpX = ( int ) ( KoUnit::toMM( helplines.attribute("posX").toDouble() )*100 ); int tmpY = ( int ) ( KoUnit::toMM( helplines.attribute("posY").toDouble() )*100 ); - m_helpLine+=str.arg( QString::number( tmpX ) ).arg( QString::number( tmpY ) ); + m_helpLine+=str.tqarg( TQString::number( tmpX ) ).tqarg( TQString::number( tmpY ) ); } } } @@ -566,26 +566,26 @@ void OoImpressExport::createHelpLine( QDomNode &helpline ) } -void OoImpressExport::exportBody( QDomDocument & doccontent, QDomElement & body ) +void OoImpressExport::exportBody( TQDomDocument & doccontent, TQDomElement & body ) { - QDomNode doc = m_maindoc.namedItem( "DOC" ); - QDomNode paper = doc.namedItem( "PAPER" ); - QDomNode background = doc.namedItem( "BACKGROUND" ); - QDomNode header = doc.namedItem( "HEADER" ); - QDomNode footer = doc.namedItem( "FOOTER" ); - QDomNode titles = doc.namedItem( "PAGETITLES" ); - QDomNode notes = doc.namedItem( "PAGENOTES" ); - QDomNode objects = doc.namedItem( "OBJECTS" ); - QDomNode pictures = doc.namedItem( "PICTURES" ); - QDomNode sounds = doc.namedItem( "SOUNDS" ); - QDomNode helpline = doc.namedItem( "HELPLINES" ); - QDomNode attributeValue = doc.namedItem( "ATTRIBUTES" ); - QDomNode infiniLoop = doc.namedItem( "INFINITLOOP" ); - QDomNode manualSwitch = doc.namedItem( "MANUALSWITCH" ); - QDomNode customSlideShow = doc.namedItem( "CUSTOMSLIDESHOWCONFIG" ); - QDomNode customSlideShowDefault = doc.namedItem( "DEFAULTCUSTOMSLIDESHOWNAME" ); - - QDomNode bgpage = background.firstChild(); + TQDomNode doc = m_maindoc.namedItem( "DOC" ); + TQDomNode paper = doc.namedItem( "PAPER" ); + TQDomNode background = doc.namedItem( "BACKGROUND" ); + TQDomNode header = doc.namedItem( "HEADER" ); + TQDomNode footer = doc.namedItem( "FOOTER" ); + TQDomNode titles = doc.namedItem( "PAGETITLES" ); + TQDomNode notes = doc.namedItem( "PAGENOTES" ); + TQDomNode objects = doc.namedItem( "OBJECTS" ); + TQDomNode pictures = doc.namedItem( "PICTURES" ); + TQDomNode sounds = doc.namedItem( "SOUNDS" ); + TQDomNode helpline = doc.namedItem( "HELPLINES" ); + TQDomNode attributeValue = doc.namedItem( "ATTRIBUTES" ); + TQDomNode infiniLoop = doc.namedItem( "INFINITLOOP" ); + TQDomNode manualSwitch = doc.namedItem( "MANUALSWITCH" ); + TQDomNode customSlideShow = doc.namedItem( "CUSTOMSLIDESHOWCONFIG" ); + TQDomNode customSlideShowDefault = doc.namedItem( "DEFAULTCUSTOMSLIDESHOWNAME" ); + + TQDomNode bgpage = background.firstChild(); createPictureList( pictures ); @@ -594,25 +594,25 @@ void OoImpressExport::exportBody( QDomDocument & doccontent, QDomElement & body createAttribute( attributeValue ); // store the paper settings - QDomElement p = paper.toElement(); + TQDomElement p = paper.toElement(); m_masterPageStyle = m_styleFactory.createPageMasterStyle( p ); m_pageHeight = p.attribute( "ptHeight" ).toFloat(); m_currentPage = 1; // parse all pages - QDomNode note = notes.firstChild(); - for ( QDomNode title = titles.firstChild(); !title.isNull() && !note.isNull(); + TQDomNode note = notes.firstChild(); + for ( TQDomNode title = titles.firstChild(); !title.isNull() && !note.isNull(); title = title.nextSibling(), note = note.nextSibling() ) { // create the page style and ignore the fact that there may // be less backgrounds than pages - QDomElement bg = bgpage.toElement(); - QString ps = m_styleFactory.createPageStyle( bg ); + TQDomElement bg = bgpage.toElement(); + TQString ps = m_styleFactory.createPageStyle( bg ); bgpage = bgpage.nextSibling(); - QDomElement t = title.toElement(); - QDomElement drawPage = doccontent.createElement( "draw:page" ); + TQDomElement t = title.toElement(); + TQDomElement drawPage = doccontent.createElement( "draw:page" ); drawPage.setAttribute( "draw:name", t.attribute( "title" ) ); drawPage.setAttribute( "draw:style-name", ps ); drawPage.setAttribute( "draw:id", m_currentPage ); @@ -620,7 +620,7 @@ void OoImpressExport::exportBody( QDomDocument & doccontent, QDomElement & body appendObjects( doccontent, objects, drawPage ); - QDomElement noteElement = note.toElement(); + TQDomElement noteElement = note.toElement(); appendNote( doccontent, noteElement, drawPage ); body.appendChild( drawPage ); m_currentPage++; @@ -643,7 +643,7 @@ void OoImpressExport::exportBody( QDomDocument & doccontent, QDomElement & body } if ( infiniLoopValue != -1 || manualSwitchValue != -1 || !customSlideShowDefault.isNull()) { - QDomElement settings = doccontent.createElement( "presentation:settings" ); + TQDomElement settings = doccontent.createElement( "presentation:settings" ); if ( infiniLoopValue !=-1 ) settings.setAttribute( "presentation:force-manual", ( manualSwitchValue==1 ) ? "true" : "false" ); if ( manualSwitchValue != -1 ) @@ -653,13 +653,13 @@ void OoImpressExport::exportBody( QDomDocument & doccontent, QDomElement & body if ( !customSlideShow.isNull() ) { - for ( QDomNode customPage = customSlideShow.firstChild(); !customPage.isNull(); + for ( TQDomNode customPage = customSlideShow.firstChild(); !customPage.isNull(); customPage = customPage.nextSibling() ) { - QDomElement show = customPage.toElement(); + TQDomElement show = customPage.toElement(); if ( !show.isNull() && show.tagName()=="CUSTOMSLIDESHOW" ) { - QDomElement showElement = doccontent.createElement( "presentation:show" ); + TQDomElement showElement = doccontent.createElement( "presentation:show" ); showElement.setAttribute( "presentation:name",show.attribute( "name" ) ); showElement.setAttribute( "presentation:pages",show.attribute( "pages" ) ); settings.appendChild( showElement ); @@ -671,16 +671,16 @@ void OoImpressExport::exportBody( QDomDocument & doccontent, QDomElement & body } -void OoImpressExport::appendObjects(QDomDocument & doccontent, QDomNode &objects, QDomElement &drawPage) +void OoImpressExport::appendObjects(TQDomDocument & doccontent, TQDomNode &objects, TQDomElement &drawPage) { // I am not sure if objects are always stored sorted so I parse all // of them to find the ones belonging to a certain page. - for ( QDomNode object = objects.firstChild(); !object.isNull(); + for ( TQDomNode object = objects.firstChild(); !object.isNull(); object = object.nextSibling() ) { - QDomElement o = object.toElement(); + TQDomElement o = object.toElement(); - QDomElement orig = o.namedItem( "ORIG" ).toElement(); + TQDomElement orig = o.namedItem( "ORIG" ).toElement(); float y = orig.attribute( "y" ).toFloat(); if ( y < m_pageHeight * ( m_currentPage - 1 ) || @@ -725,7 +725,7 @@ void OoImpressExport::appendObjects(QDomDocument & doccontent, QDomNode &objects case 12: // polyline appendPolyline( doccontent, o, drawPage ); break; - case 13: //OT_QUADRICBEZIERCURVE = 13 + case 13: //OT_TQUADRICBEZIERCURVE = 13 case 14: //OT_CUBICBEZIERCURVE = 14 //todo // "draw:path" @@ -740,29 +740,29 @@ void OoImpressExport::appendObjects(QDomDocument & doccontent, QDomNode &objects } -void OoImpressExport::appendGroupObject( QDomDocument & doc, QDomElement & source, QDomElement & target ) +void OoImpressExport::appendGroupObject( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ) { - QDomElement groupElement = doc.createElement( "draw:g" ); - QDomNode objects = source.namedItem( "OBJECTS" ); + TQDomElement groupElement = doc.createElement( "draw:g" ); + TQDomNode objects = source.namedItem( "OBJECTS" ); appendObjects( doc, objects, groupElement); target.appendChild( groupElement ); } -void OoImpressExport::appendNote( QDomDocument & doc, QDomElement & source, QDomElement & target ) +void OoImpressExport::appendNote( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ) { - QString noteText = source.attribute("note"); + TQString noteText = source.attribute("note"); //kdDebug(30518)<<"noteText :"<<noteText<<endl; if ( noteText.isEmpty() ) return; - QDomElement noteElement = doc.createElement( "presentation:notes" ); - QDomElement noteTextBox = doc.createElement( "draw:text-box" ); + TQDomElement noteElement = doc.createElement( "presentation:notes" ); + TQDomElement noteTextBox = doc.createElement( "draw:text-box" ); //TODO : add draw:text-box size : - //<draw:text-box draw:style-name="gr2" draw:text-style-name="P2" draw:layer="layout" svg:width="13.336cm" svg:height="56.288cm" svg:x="-0.54cm" svg:y="-14.846cm"> + //<draw:text-box draw:style-name="gr2" draw:text-style-name="P2" draw:layer="tqlayout" svg:width="13.336cm" svg:height="56.288cm" svg:x="-0.54cm" svg:y="-14.846cm"> - QStringList text = QStringList::split( "\n", noteText ); - for ( QStringList::Iterator it = text.begin(); it != text.end(); ++it ) { - QDomElement tmp = doc.createElement( "text:p" ); + TQStringList text = TQStringList::split( "\n", noteText ); + for ( TQStringList::Iterator it = text.begin(); it != text.end(); ++it ) { + TQDomElement tmp = doc.createElement( "text:p" ); tmp.appendChild( doc.createTextNode( *it ) ); noteTextBox.appendChild( tmp ); } @@ -770,64 +770,64 @@ void OoImpressExport::appendNote( QDomDocument & doc, QDomElement & source, QDom target.appendChild( noteElement ); } -void OoImpressExport::appendTextbox( QDomDocument & doc, QDomElement & source, QDomElement & target ) +void OoImpressExport::appendTextbox( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ) { - QDomElement textbox = doc.createElement( "draw:text-box" ); + TQDomElement textbox = doc.createElement( "draw:text-box" ); - QDomNode textobject = source.namedItem( "TEXTOBJ" ); + TQDomNode textobject = source.namedItem( "TEXTOBJ" ); // create the graphic style - QString gs = m_styleFactory.createGraphicStyle( source ); + TQString gs = m_styleFactory.createGraphicStyle( source ); textbox.setAttribute( "draw:style-name", gs ); - // set the geometry + // set the tqgeometry set2DGeometry( source, textbox ); // parse every paragraph - for ( QDomNode paragraph = textobject.firstChild(); !paragraph.isNull(); + for ( TQDomNode paragraph = textobject.firstChild(); !paragraph.isNull(); paragraph = paragraph.nextSibling() ) { - QDomElement p = paragraph.toElement(); + TQDomElement p = paragraph.toElement(); appendParagraph( doc, p, textbox ); } target.appendChild( textbox ); } -void OoImpressExport::appendParagraph( QDomDocument & doc, QDomElement & source, QDomElement & target ) +void OoImpressExport::appendParagraph( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ) { - QDomElement paragraph = doc.createElement( "text:p" ); + TQDomElement paragraph = doc.createElement( "text:p" ); // create the paragraph style - QString ps = m_styleFactory.createParagraphStyle( source ); + TQString ps = m_styleFactory.createParagraphStyle( source ); paragraph.setAttribute( "text:style-name", ps ); // parse every text element - for ( QDomNode text = source.firstChild(); !text.isNull(); + for ( TQDomNode text = source.firstChild(); !text.isNull(); text = text.nextSibling() ) { if ( text.nodeName() == "TEXT" ) { - QDomElement t = text.toElement(); + TQDomElement t = text.toElement(); appendText( doc, t, paragraph ); } } // take care of lists - QDomNode counter = source.namedItem( "COUNTER" ); + TQDomNode counter = source.namedItem( "COUNTER" ); if ( !counter.isNull() ) { - QDomElement c = counter.toElement(); + TQDomElement c = counter.toElement(); int type = c.attribute( "type" ).toInt(); int level = 1; if ( c.hasAttribute( "depth" ) ) level = c.attribute( "depth" ).toInt() + 1; - QDomElement endOfList = target; + TQDomElement endOfList = target; for ( int l = 0; l < level; l++ ) { - QDomElement list; + TQDomElement list; if ( type == 1 ) { list = doc.createElement( "text:ordered-list" ); @@ -839,11 +839,11 @@ void OoImpressExport::appendParagraph( QDomDocument & doc, QDomElement & source, if ( l == 0 ) { // create the list style - QString ls = m_styleFactory.createListStyle( c ); + TQString ls = m_styleFactory.createListStyle( c ); list.setAttribute( "text:style-name", ls ); } - QDomElement item = doc.createElement( "text:list-item" ); + TQDomElement item = doc.createElement( "text:list-item" ); list.appendChild( item ); endOfList.appendChild( list ); endOfList = item; @@ -855,28 +855,28 @@ void OoImpressExport::appendParagraph( QDomDocument & doc, QDomElement & source, target.appendChild( paragraph ); } -void OoImpressExport::appendText( QDomDocument & doc, QDomElement & source, QDomElement & target ) +void OoImpressExport::appendText( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ) { - QDomElement textspan = doc.createElement( "text:span" ); + TQDomElement textspan = doc.createElement( "text:span" ); // create the text style - QString ts = m_styleFactory.createTextStyle( source ); + TQString ts = m_styleFactory.createTextStyle( source ); textspan.setAttribute( "text:style-name", ts ); textspan.appendChild( doc.createTextNode( source.text() ) ); target.appendChild( textspan ); } -void OoImpressExport::appendPicture( QDomDocument & doc, QDomElement & source, QDomElement & target ) +void OoImpressExport::appendPicture( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ) { - QDomElement image = doc.createElement( "draw:image" ); + TQDomElement image = doc.createElement( "draw:image" ); // create the graphic style - QString gs = m_styleFactory.createGraphicStyle( source ); + TQString gs = m_styleFactory.createGraphicStyle( source ); image.setAttribute( "draw:style-name", gs ); - QDomElement key = source.namedItem( "KEY" ).toElement(); + TQDomElement key = source.namedItem( "KEY" ).toElement(); - QString pictureName = QString( "Picture/Picture%1" ).arg( m_pictureIndex ); + TQString pictureName = TQString( "Picture/Picture%1" ).tqarg( m_pictureIndex ); image.setAttribute( "xlink:type", "simple" ); image.setAttribute( "xlink:show", "embed" ); @@ -884,12 +884,12 @@ void OoImpressExport::appendPicture( QDomDocument & doc, QDomElement & source, Q if ( !key.isNull() ) { - QString str = pictureKey( key ); - QString returnstr = m_kpresenterPictureLst[str]; - const int pos=returnstr.findRev('.'); + TQString str = pictureKey( key ); + TQString returnstr = m_kpresenterPictureLst[str]; + const int pos=returnstr.tqfindRev('.'); if (pos!=-1) { - const QString extension( returnstr.mid(pos+1) ); + const TQString extension( returnstr.mid(pos+1) ); pictureName +="."+extension; } @@ -897,7 +897,7 @@ void OoImpressExport::appendPicture( QDomDocument & doc, QDomElement & source, Q { if ( m_storeout->open( pictureName ) ) { - QByteArray data(8*1024); + TQByteArray data(8*1024); uint total = 0; for ( int block = 0; ( block = m_storeinp->read(data.data(), data.size()) ) > 0; total += block ) @@ -909,7 +909,7 @@ void OoImpressExport::appendPicture( QDomDocument & doc, QDomElement & source, Q } image.setAttribute( "xlink:href", "#" + pictureName ); -// set the geometry +// set the tqgeometry set2DGeometry( source, image ); target.appendChild( image ); @@ -919,94 +919,94 @@ void OoImpressExport::appendPicture( QDomDocument & doc, QDomElement & source, Q } -void OoImpressExport::appendLine( QDomDocument & doc, QDomElement & source, QDomElement & target ) +void OoImpressExport::appendLine( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ) { - QDomElement line = doc.createElement( "draw:line" ); + TQDomElement line = doc.createElement( "draw:line" ); // create the graphic style - QString gs = m_styleFactory.createGraphicStyle( source ); + TQString gs = m_styleFactory.createGraphicStyle( source ); line.setAttribute( "draw:style-name", gs ); - // set the geometry + // set the tqgeometry setLineGeometry( source, line ); target.appendChild( line ); } -void OoImpressExport::appendRectangle( QDomDocument & doc, QDomElement & source, QDomElement & target ) +void OoImpressExport::appendRectangle( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ) { - QDomElement rectangle = doc.createElement( "draw:rect" ); + TQDomElement rectangle = doc.createElement( "draw:rect" ); // create the graphic style - QString gs = m_styleFactory.createGraphicStyle( source ); + TQString gs = m_styleFactory.createGraphicStyle( source ); rectangle.setAttribute( "draw:style-name", gs ); - // set the geometry + // set the tqgeometry set2DGeometry( source, rectangle ); target.appendChild( rectangle ); } -void OoImpressExport::appendPolyline( QDomDocument & doc, QDomElement & source, QDomElement & target, bool _poly) +void OoImpressExport::appendPolyline( TQDomDocument & doc, TQDomElement & source, TQDomElement & target, bool _poly) { - QDomElement polyline = doc.createElement( _poly ? "draw:polygon" : "draw:polyline" ); + TQDomElement polyline = doc.createElement( _poly ? "draw:polygon" : "draw:polyline" ); // create the graphic style - QString gs = m_styleFactory.createGraphicStyle( source ); + TQString gs = m_styleFactory.createGraphicStyle( source ); polyline.setAttribute( "draw:style-name", gs ); - // set the geometry + // set the tqgeometry set2DGeometry( source, polyline, false, true /*multipoint*/ ); target.appendChild( polyline ); } -void OoImpressExport::appendEllipse( QDomDocument & doc, QDomElement & source, QDomElement & target, bool pieObject ) +void OoImpressExport::appendEllipse( TQDomDocument & doc, TQDomElement & source, TQDomElement & target, bool pieObject ) { - QDomElement size = source.namedItem( "SIZE" ).toElement(); + TQDomElement size = source.namedItem( "SIZE" ).toElement(); double width = size.attribute( "width" ).toDouble(); double height = size.attribute( "height" ).toDouble(); - QDomElement ellipse = doc.createElement( (width == height) ? "draw:circle" : "draw:ellipse" ); + TQDomElement ellipse = doc.createElement( (width == height) ? "draw:circle" : "draw:ellipse" ); // create the graphic style - QString gs = m_styleFactory.createGraphicStyle( source ); + TQString gs = m_styleFactory.createGraphicStyle( source ); ellipse.setAttribute( "draw:style-name", gs ); - // set the geometry + // set the tqgeometry set2DGeometry( source, ellipse, pieObject ); target.appendChild( ellipse ); } -void OoImpressExport::set2DGeometry( QDomElement & source, QDomElement & target, bool pieObject, bool multiPoint ) +void OoImpressExport::set2DGeometry( TQDomElement & source, TQDomElement & target, bool pieObject, bool multiPoint ) { - QDomElement orig = source.namedItem( "ORIG" ).toElement(); - QDomElement size = source.namedItem( "SIZE" ).toElement(); - QDomElement name = source.namedItem( "OBJECTNAME").toElement(); + TQDomElement orig = source.namedItem( "ORIG" ).toElement(); + TQDomElement size = source.namedItem( "SIZE" ).toElement(); + TQDomElement name = source.namedItem( "OBJECTNAME").toElement(); float y = orig.attribute( "y" ).toFloat(); y -= m_pageHeight * ( m_currentPage - 1 ); - QDomElement angle = source.namedItem( "ANGLE").toElement(); + TQDomElement angle = source.namedItem( "ANGLE").toElement(); if ( !angle.isNull() ) { - QString returnAngle = rotateValue( angle.attribute( "value" ).toDouble() ); + TQString returnAngle = rotateValue( angle.attribute( "value" ).toDouble() ); if ( !returnAngle.isEmpty() ) target.setAttribute("draw:transform",returnAngle ); } - target.setAttribute( "draw:id", QString::number( m_objectIndex ) ); + target.setAttribute( "draw:id", TQString::number( m_objectIndex ) ); target.setAttribute( "svg:x", StyleFactory::toCM( orig.attribute( "x" ) ) ); - target.setAttribute( "svg:y", QString( "%1cm" ).arg( KoUnit::toCM( y ) ) ); + target.setAttribute( "svg:y", TQString( "%1cm" ).tqarg( KoUnit::toCM( y ) ) ); target.setAttribute( "svg:width", StyleFactory::toCM( size.attribute( "width" ) ) ); target.setAttribute( "svg:height", StyleFactory::toCM( size.attribute( "height" ) ) ); - QString nameStr = name.attribute("objectName"); + TQString nameStr = name.attribute("objectName"); if( !nameStr.isEmpty() ) target.setAttribute( "draw:name", nameStr ); if ( pieObject ) { - QDomElement pie = source.namedItem( "PIETYPE").toElement(); + TQDomElement pie = source.namedItem( "PIETYPE").toElement(); if( !pie.isNull() ) { int typePie = pie.attribute("value").toInt(); @@ -1028,7 +1028,7 @@ void OoImpressExport::set2DGeometry( QDomElement & source, QDomElement & target, } else target.setAttribute( "draw:kind", "section");//by default - QDomElement pieAngle = source.namedItem( "PIEANGLE").toElement(); + TQDomElement pieAngle = source.namedItem( "PIEANGLE").toElement(); int startangle = 45; if( !pieAngle.isNull() ) { @@ -1040,7 +1040,7 @@ void OoImpressExport::set2DGeometry( QDomElement & source, QDomElement & target, //default value take it into kppieobject target.setAttribute( "draw:start-angle", 45 ); } - QDomElement pieLength = source.namedItem( "PIELENGTH").toElement(); + TQDomElement pieLength = source.namedItem( "PIELENGTH").toElement(); if( !pieLength.isNull() ) { int value = pieLength.attribute("value").toInt(); @@ -1058,10 +1058,10 @@ void OoImpressExport::set2DGeometry( QDomElement & source, QDomElement & target, if ( multiPoint ) { //loadPoint - QDomElement point = source.namedItem( "POINTS" ).toElement(); + TQDomElement point = source.namedItem( "POINTS" ).toElement(); if ( !point.isNull() ) { - QDomElement elemPoint = point.firstChild().toElement(); - QString listOfPoint; + TQDomElement elemPoint = point.firstChild().toElement(); + TQString listOfPoint; int maxX=0; int maxY=0; while ( !elemPoint.isNull() ) { @@ -1073,42 +1073,42 @@ void OoImpressExport::set2DGeometry( QDomElement & source, QDomElement & target, if( elemPoint.hasAttribute( "point_y" ) ) tmpY = ( int ) ( KoUnit::toMM(elemPoint.attribute( "point_y" ).toDouble() )*100 ); if ( !listOfPoint.isEmpty() ) - listOfPoint += QString( " %1,%2" ).arg( tmpX ).arg( tmpY ); + listOfPoint += TQString( " %1,%2" ).tqarg( tmpX ).tqarg( tmpY ); else - listOfPoint = QString( "%1,%2" ).arg( tmpX ).arg( tmpY ); - maxX = QMAX( maxX, tmpX ); - maxY = QMAX( maxY, tmpY ); + listOfPoint = TQString( "%1,%2" ).tqarg( tmpX ).tqarg( tmpY ); + maxX = TQMAX( maxX, tmpX ); + maxY = TQMAX( maxY, tmpY ); } elemPoint = elemPoint.nextSibling().toElement(); } target.setAttribute( "draw:points", listOfPoint ); - target.setAttribute( "svg:viewBox", QString( "0 0 %1 %2" ).arg( maxX ).arg( maxY ) ); + target.setAttribute( "svg:viewBox", TQString( "0 0 %1 %2" ).tqarg( maxX ).tqarg( maxY ) ); } } } -QString OoImpressExport::rotateValue( double val ) +TQString OoImpressExport::rotateValue( double val ) { - QString str; + TQString str; if ( val!=0.0 ) { double value = -1 * ( ( double )val* M_PI )/180.0; - str=QString( "rotate (%1)" ).arg( value ); + str=TQString( "rotate (%1)" ).tqarg( value ); } return str; } -void OoImpressExport::setLineGeometry( QDomElement & source, QDomElement & target ) +void OoImpressExport::setLineGeometry( TQDomElement & source, TQDomElement & target ) { - QDomElement orig = source.namedItem( "ORIG" ).toElement(); - QDomElement size = source.namedItem( "SIZE" ).toElement(); - QDomElement linetype = source.namedItem( "LINETYPE" ).toElement(); - QDomElement name = source.namedItem( "OBJECTNAME").toElement(); - QDomElement angle = source.namedItem( "ANGLE").toElement(); + TQDomElement orig = source.namedItem( "ORIG" ).toElement(); + TQDomElement size = source.namedItem( "SIZE" ).toElement(); + TQDomElement linetype = source.namedItem( "LINETYPE" ).toElement(); + TQDomElement name = source.namedItem( "OBJECTNAME").toElement(); + TQDomElement angle = source.namedItem( "ANGLE").toElement(); if ( !angle.isNull() ) { - QString returnAngle = rotateValue( angle.attribute( "value" ).toDouble() ); + TQString returnAngle = rotateValue( angle.attribute( "value" ).toDouble() ); if ( !returnAngle.isEmpty() ) target.setAttribute("draw:transform",returnAngle ); } @@ -1123,36 +1123,36 @@ void OoImpressExport::setLineGeometry( QDomElement & source, QDomElement & targe x2 += x1; y2 += y1; - target.setAttribute( "draw:id", QString::number( m_objectIndex ) ); - QString xpos1 = StyleFactory::toCM( orig.attribute( "x" ) ); - QString xpos2 = QString( "%1cm" ).arg( KoUnit::toCM( x2 ) ); + target.setAttribute( "draw:id", TQString::number( m_objectIndex ) ); + TQString xpos1 = StyleFactory::toCM( orig.attribute( "x" ) ); + TQString xpos2 = TQString( "%1cm" ).tqarg( KoUnit::toCM( x2 ) ); if ( type == 0 ) { - target.setAttribute( "svg:y1", QString( "%1cm" ).arg( KoUnit::toCM( y2/2.0 ) ) ); - target.setAttribute( "svg:y2", QString( "%1cm" ).arg( KoUnit::toCM( y2/2.0 ) ) ); + target.setAttribute( "svg:y1", TQString( "%1cm" ).tqarg( KoUnit::toCM( y2/2.0 ) ) ); + target.setAttribute( "svg:y2", TQString( "%1cm" ).tqarg( KoUnit::toCM( y2/2.0 ) ) ); } else if ( type == 1 ) { - target.setAttribute( "svg:y1", QString( "%1cm" ).arg( KoUnit::toCM( y1 ) ) ); - target.setAttribute( "svg:y2", QString( "%1cm" ).arg( KoUnit::toCM( y2 ) ) ); - xpos1 = QString( "%1cm" ).arg( KoUnit::toCM( x1/2.0 ) ); + target.setAttribute( "svg:y1", TQString( "%1cm" ).tqarg( KoUnit::toCM( y1 ) ) ); + target.setAttribute( "svg:y2", TQString( "%1cm" ).tqarg( KoUnit::toCM( y2 ) ) ); + xpos1 = TQString( "%1cm" ).tqarg( KoUnit::toCM( x1/2.0 ) ); xpos2 = xpos1; } else if ( type == 3 ) // from left bottom to right top { - target.setAttribute( "svg:y1", QString( "%1cm" ).arg( KoUnit::toCM( y2 ) ) ); - target.setAttribute( "svg:y2", QString( "%1cm" ).arg( KoUnit::toCM( y1 ) ) ); + target.setAttribute( "svg:y1", TQString( "%1cm" ).tqarg( KoUnit::toCM( y2 ) ) ); + target.setAttribute( "svg:y2", TQString( "%1cm" ).tqarg( KoUnit::toCM( y1 ) ) ); } else // from left top to right bottom { - target.setAttribute( "svg:y1", QString( "%1cm" ).arg( KoUnit::toCM( y1 ) ) ); - target.setAttribute( "svg:y2", QString( "%1cm" ).arg( KoUnit::toCM( y2 ) ) ); + target.setAttribute( "svg:y1", TQString( "%1cm" ).tqarg( KoUnit::toCM( y1 ) ) ); + target.setAttribute( "svg:y2", TQString( "%1cm" ).tqarg( KoUnit::toCM( y2 ) ) ); } target.setAttribute( "svg:x1", xpos1 ); target.setAttribute( "svg:x2", xpos2 ); - QString nameStr = name.attribute("objectName"); + TQString nameStr = name.attribute("objectName"); if( !nameStr.isEmpty() ) target.setAttribute( "draw:name", nameStr ); } diff --git a/filters/kpresenter/ooimpress/ooimpressexport.h b/filters/kpresenter/ooimpress/ooimpressexport.h index 9ab3d153..3b1e7b79 100644 --- a/filters/kpresenter/ooimpress/ooimpressexport.h +++ b/filters/kpresenter/ooimpress/ooimpressexport.h @@ -22,68 +22,69 @@ #include "stylefactory.h" -#include <qdom.h> +#include <tqdom.h> #include <KoFilter.h> -class QDomElement; +class TQDomElement; class KoStore; class OoImpressExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - OoImpressExport( KoFilter * parent, const char * name, const QStringList & ); + OoImpressExport( KoFilter * tqparent, const char * name, const TQStringList & ); virtual ~OoImpressExport(); - virtual KoFilter::ConversionStatus convert( const QCString & from, - const QCString & to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString & from, + const TQCString & to ); private: - KoFilter::ConversionStatus openFile(); - - void exportBody( QDomDocument & doccontent, QDomElement & body ); - void createDocumentMeta( QDomDocument & docmeta ); - void createDocumentStyles( QDomDocument & docstyles ); - void createDocumentContent( QDomDocument & doccontent ); - void createDocumentManifest( QDomDocument & docmanifest ); - void createDocumentSettings( QDomDocument & docsetting ); - void appendTextbox( QDomDocument & doc, QDomElement & source, QDomElement & target ); - void appendParagraph( QDomDocument & doc, QDomElement & source, QDomElement & target ); - void appendText( QDomDocument & doc, QDomElement & source, QDomElement & target ); - void appendLine( QDomDocument & doc, QDomElement & source, QDomElement & target ); - void appendRectangle( QDomDocument & doc, QDomElement & source, QDomElement & target ); - void appendEllipse( QDomDocument & doc, QDomElement & source, QDomElement & target, bool pieObject = false ); - void set2DGeometry( QDomElement & source, QDomElement & target, bool pieObject = false, bool multiPoint = false ); - void setLineGeometry( QDomElement & source, QDomElement & target ); - void appendPolyline( QDomDocument & doc, QDomElement & source, QDomElement & target, bool polygone = false); - void appendPicture( QDomDocument & doc, QDomElement & source, QDomElement & target ); - void createPictureList( QDomNode &pictures ); - void appendNote( QDomDocument & doc, QDomElement & source, QDomElement & target ); - void appendGroupObject( QDomDocument & doc, QDomElement & source, QDomElement & target ); - QString rotateValue( double val ); - QString pictureKey( QDomElement &element ); - void createHelpLine( QDomNode &helpline ); - void createAttribute( QDomNode &attributeValue ); - void appendObjects(QDomDocument & doccontent, QDomNode &objects, QDomElement &drawPage); + KoFilter::ConversiontqStatus openFile(); + + void exportBody( TQDomDocument & doccontent, TQDomElement & body ); + void createDocumentMeta( TQDomDocument & docmeta ); + void createDocumentStyles( TQDomDocument & docstyles ); + void createDocumentContent( TQDomDocument & doccontent ); + void createDocumentManifest( TQDomDocument & docmanifest ); + void createDocumentSettings( TQDomDocument & docsetting ); + void appendTextbox( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ); + void appendParagraph( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ); + void appendText( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ); + void appendLine( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ); + void appendRectangle( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ); + void appendEllipse( TQDomDocument & doc, TQDomElement & source, TQDomElement & target, bool pieObject = false ); + void set2DGeometry( TQDomElement & source, TQDomElement & target, bool pieObject = false, bool multiPoint = false ); + void setLineGeometry( TQDomElement & source, TQDomElement & target ); + void appendPolyline( TQDomDocument & doc, TQDomElement & source, TQDomElement & target, bool polygone = false); + void appendPicture( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ); + void createPictureList( TQDomNode &pictures ); + void appendNote( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ); + void appendGroupObject( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ); + TQString rotateValue( double val ); + TQString pictureKey( TQDomElement &element ); + void createHelpLine( TQDomNode &helpline ); + void createAttribute( TQDomNode &attributeValue ); + void appendObjects(TQDomDocument & doccontent, TQDomNode &objects, TQDomElement &drawPage); int m_currentPage; int m_objectIndex; float m_pageHeight; StyleFactory m_styleFactory; - QString m_masterPageStyle; - QDomElement m_styles; - QDomDocument m_maindoc; - QDomDocument m_documentinfo; - QMap<QString, QString> m_pictureLst; + TQString m_masterPageStyle; + TQDomElement m_styles; + TQDomDocument m_maindoc; + TQDomDocument m_documentinfo; + TQMap<TQString, TQString> m_pictureLst; - QString m_helpLine; + TQString m_helpLine; int m_activePage; double m_gridX, m_gridY; bool m_snapToGrid; //load from kpresenter file format - QMap<QString, QString> m_kpresenterPictureLst; + TQMap<TQString, TQString> m_kpresenterPictureLst; int m_pictureIndex; KoStore *m_storeinp; KoStore *m_storeout; diff --git a/filters/kpresenter/ooimpress/ooimpressimport.cc b/filters/kpresenter/ooimpress/ooimpressimport.cc index be6c094d..8ca41b2a 100644 --- a/filters/kpresenter/ooimpress/ooimpressimport.cc +++ b/filters/kpresenter/ooimpress/ooimpressimport.cc @@ -23,10 +23,10 @@ #include <math.h> -#include <qregexp.h> -#include <qdatetime.h> -#include <qfileinfo.h> -#include <qdir.h> +#include <tqregexp.h> +#include <tqdatetime.h> +#include <tqfileinfo.h> +#include <tqdir.h> #include <kzip.h> #include <karchive.h> @@ -46,7 +46,7 @@ typedef KGenericFactory<OoImpressImport, KoFilter> OoImpressImportFactory; K_EXPORT_COMPONENT_FACTORY( libooimpressimport, OoImpressImportFactory( "kofficefilters" ) ) -OoImpressImport::OoImpressImport( KoFilter *, const char *, const QStringList & ) +OoImpressImport::OoImpressImport( KoFilter *, const char *, const TQStringList & ) : KoFilter(), m_numPicture( 1 ), m_numSound(1), @@ -59,7 +59,7 @@ OoImpressImport::OoImpressImport( KoFilter *, const char *, const QStringList & OoImpressImport::~OoImpressImport() { - QDictIterator<animationList> it( m_animations ); // See QDictIterator + TQDictIterator<animationList> it( m_animations ); // See TQDictIterator for( ; it.current(); ++it ) { delete it.current()->element; @@ -67,7 +67,7 @@ OoImpressImport::~OoImpressImport() m_animations.clear(); } -KoFilter::ConversionStatus OoImpressImport::convert( QCString const & from, QCString const & to ) +KoFilter::ConversiontqStatus OoImpressImport::convert( TQCString const & from, TQCString const & to ) { kdDebug(30518) << "Entering Ooimpress Import filter: " << from << " - " << to << endl; @@ -87,36 +87,36 @@ KoFilter::ConversionStatus OoImpressImport::convert( QCString const & from, QCSt return KoFilter::FileNotFound; } - KoFilter::ConversionStatus preStatus = openFile(); + KoFilter::ConversiontqStatus pretqStatus = openFile(); - if ( preStatus != KoFilter::OK ) + if ( pretqStatus != KoFilter::OK ) { m_zip->close(); delete m_zip; - return preStatus; + return pretqStatus; } - QDomDocument docinfo; + TQDomDocument docinfo; createDocumentInfo( docinfo ); // store document info KoStoreDevice* out = m_chain->storageFile( "documentinfo.xml", KoStore::Write ); if( out ) { - QCString info = docinfo.toCString(); + TQCString info = docinfo.toCString(); //kdDebug(30518) << " info :" << info << endl; - // WARNING: we cannot use KoStore::write(const QByteArray&) because it gives an extra NULL character at the end. + // WARNING: we cannot use KoStore::write(const TQByteArray&) because it gives an extra NULL character at the end. out->writeBlock( info , info.length() ); } - QDomDocument doccontent; + TQDomDocument doccontent; createDocumentContent( doccontent ); // store document content out = m_chain->storageFile( "maindoc.xml", KoStore::Write ); if( out ) { - QCString content = doccontent.toCString(); + TQCString content = doccontent.toCString(); kdDebug(30518) << " content :" << content << endl; out->writeBlock( content , content.length() ); } @@ -129,9 +129,9 @@ KoFilter::ConversionStatus OoImpressImport::convert( QCString const & from, QCSt } // Very related to OoWriterImport::openFile() -KoFilter::ConversionStatus OoImpressImport::openFile() +KoFilter::ConversiontqStatus OoImpressImport::openFile() { - KoFilter::ConversionStatus status = loadAndParse( "content.xml", m_content ); + KoFilter::ConversiontqStatus status = loadAndParse( "content.xml", m_content ); if ( status != KoFilter::OK ) { kdError(30518) << "Content.xml could not be parsed correctly! Aborting!" << endl; @@ -139,7 +139,7 @@ KoFilter::ConversionStatus OoImpressImport::openFile() } // We do not stop if the following calls fail. - QDomDocument styles; + TQDomDocument styles; loadAndParse( "styles.xml", styles ); loadAndParse( "meta.xml", m_meta ); loadAndParse( "settings.xml", m_settings ); @@ -150,13 +150,13 @@ KoFilter::ConversionStatus OoImpressImport::openFile() return KoFilter::OK; } -KoFilter::ConversionStatus OoImpressImport::loadAndParse(const QString& filename, QDomDocument& doc) +KoFilter::ConversiontqStatus OoImpressImport::loadAndParse(const TQString& filename, TQDomDocument& doc) { return OoUtils::loadAndParse( filename, doc, m_zip); } // Very related to OoWriterImport::createDocumentInfo -void OoImpressImport::createDocumentInfo( QDomDocument &docinfo ) +void OoImpressImport::createDocumentInfo( TQDomDocument &docinfo ) { docinfo = KoDocument::createDomDocument( "document-info" /*DTD name*/, "document-info" /*tag name*/, "1.1" ); @@ -164,60 +164,60 @@ void OoImpressImport::createDocumentInfo( QDomDocument &docinfo ) //kdDebug(30518) << " meta-info :" << m_meta.toCString() << endl; } -void OoImpressImport::createDocumentContent( QDomDocument &doccontent ) +void OoImpressImport::createDocumentContent( TQDomDocument &doccontent ) { - QDomDocument doc = KoDocument::createDomDocument( "kpresenter", "DOC", "1.2" ); - QDomElement docElement = doc.documentElement(); + TQDomDocument doc = KoDocument::createDomDocument( "kpresenter", "DOC", "1.2" ); + TQDomElement docElement = doc.documentElement(); docElement.setAttribute( "editor", "KPresenter" ); docElement.setAttribute( "mime", "application/x-kpresenter" ); docElement.setAttribute( "syntaxVersion", "2" ); - QDomElement content = m_content.documentElement(); + TQDomElement content = m_content.documentElement(); // content.xml contains some automatic-styles that we need to store - QDomNode automaticStyles = KoDom::namedItemNS( content, ooNS::office, "automatic-styles" ); + TQDomNode automaticStyles = KoDom::namedItemNS( content, ooNS::office, "automatic-styles" ); if ( !automaticStyles.isNull() ) insertStyles( automaticStyles.toElement() ); - QDomNode body = KoDom::namedItemNS( content, ooNS::office, "body" ); + TQDomNode body = KoDom::namedItemNS( content, ooNS::office, "body" ); if ( body.isNull() ) return; - QDomElement customSlideShow = doc.createElement( "CUSTOMSLIDESHOWCONFIG" ); + TQDomElement customSlideShow = doc.createElement( "CUSTOMSLIDESHOWCONFIG" ); // presentation settings - QDomElement settings = KoDom::namedItemNS( body, ooNS::presentation, "settings"); + TQDomElement settings = KoDom::namedItemNS( body, ooNS::presentation, "settings"); if (!settings.isNull()) { - if (settings.attributeNS( ooNS::presentation, "endless", QString::null)=="true") + if (settings.attributeNS( ooNS::presentation, "endless", TQString())=="true") { - QDomElement infElem = doc.createElement("INFINITLOOP"); + TQDomElement infElem = doc.createElement("INFINITLOOP"); infElem.setAttribute("value", 1); docElement.appendChild(infElem); } - if (settings.attributeNS( ooNS::presentation, "show-end-of-presentation-slide", QString::null)=="true") + if (settings.attributeNS( ooNS::presentation, "show-end-of-presentation-slide", TQString())=="true") { - QDomElement infElem = doc.createElement("SHOWENDOFPRESENTATIONSLIDE"); + TQDomElement infElem = doc.createElement("SHOWENDOFPRESENTATIONSLIDE"); infElem.setAttribute("value", 1); docElement.appendChild(infElem); } - if (settings.attributeNS( ooNS::presentation, "force-manual", QString::null)=="true") + if (settings.attributeNS( ooNS::presentation, "force-manual", TQString())=="true") { - QDomElement manualElem = doc.createElement("MANUALSWITCH"); + TQDomElement manualElem = doc.createElement("MANUALSWITCH"); manualElem.setAttribute("value", 1); docElement.appendChild(manualElem); } if ( settings.hasAttributeNS( ooNS::presentation, "show") ) { - QDomElement defaultPage = doc.createElement("DEFAULTCUSTOMSLIDESHOWNAME"); - defaultPage.setAttribute("name", settings.attributeNS( ooNS::presentation, "show", QString::null) ); + TQDomElement defaultPage = doc.createElement("DEFAULTCUSTOMSLIDESHOWNAME"); + defaultPage.setAttribute("name", settings.attributeNS( ooNS::presentation, "show", TQString()) ); docElement.appendChild(defaultPage); } } - QDomElement presentationShow; + TQDomElement presentationShow; forEachElement( presentationShow, settings ) { if ( presentationShow.localName()=="show" && presentationShow.namespaceURI() == ooNS::presentation ) @@ -225,40 +225,40 @@ void OoImpressImport::createDocumentContent( QDomDocument &doccontent ) if ( presentationShow.hasAttributeNS( ooNS::presentation, "pages") && presentationShow.hasAttributeNS( ooNS::presentation, "name")) { - QDomElement slide=doc.createElement("CUSTOMSLIDESHOW"); - slide.setAttribute( "pages", presentationShow.attributeNS( ooNS::presentation, "pages", QString::null )); - slide.setAttribute( "name", presentationShow.attributeNS( ooNS::presentation, "name", QString::null )); + TQDomElement slide=doc.createElement("CUSTOMSLIDESHOW"); + slide.setAttribute( "pages", presentationShow.attributeNS( ooNS::presentation, "pages", TQString() )); + slide.setAttribute( "name", presentationShow.attributeNS( ooNS::presentation, "name", TQString() )); customSlideShow.appendChild( slide ); } } } // it seems that ooimpress has different paper-settings for every slide. // we take the settings of the first slide for the whole document. - QDomElement drawPage = KoDom::namedItemNS( body, ooNS::draw, "page" ); + TQDomElement drawPage = KoDom::namedItemNS( body, ooNS::draw, "page" ); if ( drawPage.isNull() ) // no slides? give up. return; - QDomElement objectElement = doc.createElement( "OBJECTS" ); - QDomElement pictureElement = doc.createElement( "PICTURES" ); - QDomElement pageTitleElement = doc.createElement( "PAGETITLES" ); - QDomElement pageNoteElement = doc.createElement( "PAGENOTES" ); - QDomElement backgroundElement = doc.createElement( "BACKGROUND" ); - QDomElement soundElement = doc.createElement( "SOUNDS" ); - QDomElement selSlideElement = doc.createElement( "SELSLIDES" ); - QDomElement helpLineElement = doc.createElement( "HELPLINES" ); - QDomElement attributeElement = doc.createElement( "ATTRIBUTES" ); - QDomElement *master = m_styles[drawPage.attributeNS( ooNS::draw, "master-page-name", QString::null )]; + TQDomElement objectElement = doc.createElement( "OBJECTS" ); + TQDomElement pictureElement = doc.createElement( "PICTURES" ); + TQDomElement pageTitleElement = doc.createElement( "PAGETITLES" ); + TQDomElement pageNoteElement = doc.createElement( "PAGENOTES" ); + TQDomElement backgroundElement = doc.createElement( "BACKGROUND" ); + TQDomElement soundElement = doc.createElement( "SOUNDS" ); + TQDomElement selSlideElement = doc.createElement( "SELSLIDES" ); + TQDomElement helpLineElement = doc.createElement( "HELPLINES" ); + TQDomElement attributeElement = doc.createElement( "ATTRIBUTES" ); + TQDomElement *master = m_styles[drawPage.attributeNS( ooNS::draw, "master-page-name", TQString() )]; appendObject(*master, doc, soundElement,pictureElement,pageNoteElement,objectElement, 0, true); - QDomElement *style = m_styles[master->attributeNS( ooNS::style, "page-master-name", QString::null )]; - QDomElement properties = KoDom::namedItemNS( *style, ooNS::style, "properties" ); - //kdDebug(30518)<<" master->attribute( draw:style-name ) :"<<master->attributeNS( ooNS::draw, "style-name", QString::null )<<endl; - QDomElement *backgroundStyle = m_stylesPresentation[ master->attributeNS( ooNS::draw, "style-name", QString::null ).isEmpty() ? "Standard-background" : master->attributeNS( ooNS::draw, "style-name", QString::null ) ]; + TQDomElement *style = m_styles[master->attributeNS( ooNS::style, "page-master-name", TQString() )]; + TQDomElement properties = KoDom::namedItemNS( *style, ooNS::style, "properties" ); + //kdDebug(30518)<<" master->attribute( draw:style-name ) :"<<master->attributeNS( ooNS::draw, "style-name", TQString() )<<endl; + TQDomElement *backgroundStyle = m_stylesPresentation[ master->attributeNS( ooNS::draw, "style-name", TQString() ).isEmpty() ? "Standard-background" : master->attributeNS( ooNS::draw, "style-name", TQString() ) ]; //kdDebug(30518)<<" backgroundStyle :"<<backgroundStyle<<endl; double pageHeight; - QDomElement paperElement = doc.createElement( "PAPER" ); + TQDomElement paperElement = doc.createElement( "PAPER" ); if ( properties.isNull() ) { paperElement.setAttribute( "ptWidth", CM_TO_POINT(28) ); @@ -269,7 +269,7 @@ void OoImpressImport::createDocumentContent( QDomDocument &doccontent ) paperElement.setAttribute( "orientation", 0 ); pageHeight = 21; - QDomElement paperBorderElement = doc.createElement( "PAPERBORDERS" ); + TQDomElement paperBorderElement = doc.createElement( "PAPERBORDERS" ); paperBorderElement.setAttribute( "ptRight", 0 ); paperBorderElement.setAttribute( "ptBottom", 0 ); paperBorderElement.setAttribute( "ptLeft", 0 ); @@ -278,8 +278,8 @@ void OoImpressImport::createDocumentContent( QDomDocument &doccontent ) } else { - paperElement.setAttribute( "ptWidth", KoUnit::parseValue(properties.attributeNS( ooNS::fo, "page-width", QString::null ) ) ); - paperElement.setAttribute( "ptHeight", KoUnit::parseValue(properties.attributeNS( ooNS::fo, "page-height", QString::null ) ) ); + paperElement.setAttribute( "ptWidth", KoUnit::parseValue(properties.attributeNS( ooNS::fo, "page-width", TQString() ) ) ); + paperElement.setAttribute( "ptHeight", KoUnit::parseValue(properties.attributeNS( ooNS::fo, "page-height", TQString() ) ) ); // paperElement.setAttribute( "unit", 0 ); // paperElement.setAttribute( "format", 5 ); // paperElement.setAttribute( "tabStopValue", 42.5198 ); @@ -287,20 +287,20 @@ void OoImpressImport::createDocumentContent( QDomDocument &doccontent ) // Keep pageHeight in cm to avoid rounding-errors that would // get multiplied with every new slide. - if (properties.attributeNS( ooNS::style, "print-orientation", QString::null)=="portrait") + if (properties.attributeNS( ooNS::style, "print-orientation", TQString())=="portrait") paperElement.setAttribute("orientation", 0); - else if (properties.attributeNS( ooNS::style, "print-orientation", QString::null)=="landscape") + else if (properties.attributeNS( ooNS::style, "print-orientation", TQString())=="landscape") paperElement.setAttribute("orientation", 1); - pageHeight = properties.attributeNS( ooNS::fo, "page-height", QString::null ).remove( "cm" ).toDouble(); + pageHeight = properties.attributeNS( ooNS::fo, "page-height", TQString() ).remove( "cm" ).toDouble(); - QDomElement paperBorderElement = doc.createElement( "PAPERBORDERS" ); - paperBorderElement.setAttribute( "ptRight", KoUnit::parseValue( properties.attributeNS( ooNS::fo, "margin-right", QString::null ) ) ); - paperBorderElement.setAttribute( "ptBottom", KoUnit::parseValue( properties.attributeNS( ooNS::fo, "margin-bottom", QString::null ) ) ); - paperBorderElement.setAttribute( "ptLeft", KoUnit::parseValue( properties.attributeNS( ooNS::fo, "margin-left", QString::null ) ) ); - paperBorderElement.setAttribute( "ptTop", KoUnit::parseValue( properties.attributeNS( ooNS::fo, "margin-top", QString::null ) ) ); + TQDomElement paperBorderElement = doc.createElement( "PAPERBORDERS" ); + paperBorderElement.setAttribute( "ptRight", KoUnit::parseValue( properties.attributeNS( ooNS::fo, "margin-right", TQString() ) ) ); + paperBorderElement.setAttribute( "ptBottom", KoUnit::parseValue( properties.attributeNS( ooNS::fo, "margin-bottom", TQString() ) ) ); + paperBorderElement.setAttribute( "ptLeft", KoUnit::parseValue( properties.attributeNS( ooNS::fo, "margin-left", TQString() ) ) ); + paperBorderElement.setAttribute( "ptTop", KoUnit::parseValue( properties.attributeNS( ooNS::fo, "margin-top", TQString() ) ) ); paperElement.appendChild( paperBorderElement ); } @@ -313,7 +313,7 @@ void OoImpressImport::createDocumentContent( QDomDocument &doccontent ) m_styleStack.clear(); // remove all styles fillStyleStack( drawPage ); m_styleStack.save(); - int pagePos = drawPage.attributeNS( ooNS::draw, "id", QString::null ).toInt() - 1; + int pagePos = drawPage.attributeNS( ooNS::draw, "id", TQString() ).toInt() - 1; // take care of a possible page background or slide transition or sound if ( m_styleStack.hasAttributeNS( ooNS::draw, "fill" ) || m_styleStack.hasAttributeNS( ooNS::presentation, "transition-style" )) @@ -330,8 +330,8 @@ void OoImpressImport::createDocumentContent( QDomDocument &doccontent ) } if ( m_styleStack.hasAttributeNS( ooNS::presentation, "visibility" ) ) { - QString str = m_styleStack.attributeNS( ooNS::presentation, "visibility" ); - QDomElement slide = doc.createElement("SLIDE"); + TQString str = m_styleStack.attributeNS( ooNS::presentation, "visibility" ); + TQDomElement slide = doc.createElement("SLIDE"); slide.setAttribute( "nr", pagePos ); slide.setAttribute( "show", ( ( str=="hidden" ) ? "0" : "1" )); selSlideElement.appendChild( slide ); @@ -340,13 +340,13 @@ void OoImpressImport::createDocumentContent( QDomDocument &doccontent ) kdDebug(30518)<<"m_styleStack.hasAttribute( presentation:visibility ) :"<<str<<" position page "<<pagePos<<endl; } // set the pagetitle - QDomElement titleElement = doc.createElement( "Title" ); - titleElement.setAttribute( "title", drawPage.attributeNS( ooNS::draw, "name", QString::null ) ); + TQDomElement titleElement = doc.createElement( "Title" ); + titleElement.setAttribute( "title", drawPage.attributeNS( ooNS::draw, "name", TQString() ) ); pageTitleElement.appendChild( titleElement ); // The '+1' is necessary to avoid that objects that start on the first line // of a slide will show up on the last line of the previous slide. - double offset = CM_TO_POINT( ( drawPage.attributeNS( ooNS::draw, "id", QString::null ).toInt() - 1 ) * pageHeight ) + 1; + double offset = CM_TO_POINT( ( drawPage.attributeNS( ooNS::draw, "id", TQString() ).toInt() - 1 ) * pageHeight ) + 1; // animations (object effects) createPresentationAnimation(KoDom::namedItemNS( drawPage, ooNS::presentation, "animations") ); @@ -375,7 +375,7 @@ void OoImpressImport::createDocumentContent( QDomDocument &doccontent ) doccontent.appendChild( doc ); } -bool OoImpressImport::parseSettings( QDomDocument &doc, QDomElement &helpLineElement, QDomElement &attributeElement ) +bool OoImpressImport::parseSettings( TQDomDocument &doc, TQDomElement &helpLineElement, TQDomElement &attributeElement ) { bool foundElement = false; KoOasisSettings settings( m_settings, ooNS::office, ooNS::config ); @@ -388,7 +388,7 @@ bool OoImpressImport::parseSettings( QDomDocument &doc, QDomElement &helpLineEle if ( !firstView.isNull() ) { - QString str = firstView.parseConfigItemString( "SnapLinesDrawing" ); + TQString str = firstView.parseConfigItemString( "SnapLinesDrawing" ); if ( !str.isEmpty() ) { parseHelpLine( doc, helpLineElement, str ); @@ -413,9 +413,9 @@ bool OoImpressImport::parseSettings( QDomDocument &doc, QDomElement &helpLineEle return foundElement; } -void OoImpressImport::parseHelpLine( QDomDocument &doc,QDomElement &helpLineElement, const QString &text ) +void OoImpressImport::parseHelpLine( TQDomDocument &doc,TQDomElement &helpLineElement, const TQString &text ) { - QString str; + TQString str; int newPos = text.length()-1; //start to element = 1 for ( int pos = text.length()-1; pos >=0;--pos ) { @@ -424,10 +424,10 @@ void OoImpressImport::parseHelpLine( QDomDocument &doc,QDomElement &helpLineElem //point str = text.mid( pos+1, ( newPos-pos ) ); - QDomElement point=doc.createElement("HelpPoint"); + TQDomElement point=doc.createElement("HelpPoint"); //kdDebug(30518)<<" point element :"<< str <<endl; - QStringList listVal = QStringList::split( ",", str ); + TQStringList listVal = TQStringList::split( ",", str ); int posX = ( listVal[0].toInt()/100 ); int posY = ( listVal[1].toInt()/100 ); point.setAttribute("posX", MM_TO_POINT( posX )); @@ -438,7 +438,7 @@ void OoImpressImport::parseHelpLine( QDomDocument &doc,QDomElement &helpLineElem } else if ( text[pos]=='V' ) { - QDomElement lines=doc.createElement("Vertical"); + TQDomElement lines=doc.createElement("Vertical"); //vertical element str = text.mid( pos+1, ( newPos-pos ) ); //kdDebug(30518)<<" vertical :"<< str <<endl; @@ -452,7 +452,7 @@ void OoImpressImport::parseHelpLine( QDomDocument &doc,QDomElement &helpLineElem else if ( text[pos]=='H' ) { //horizontal element - QDomElement lines=doc.createElement("Horizontal"); + TQDomElement lines=doc.createElement("Horizontal"); str = text.mid( pos+1, ( newPos-pos ) ); //kdDebug(30518)<<" horizontal :"<< str <<endl; int posY = ( str.toInt()/100 ); @@ -463,17 +463,17 @@ void OoImpressImport::parseHelpLine( QDomDocument &doc,QDomElement &helpLineElem } } -void OoImpressImport::appendObject(QDomNode & drawPage, QDomDocument & doc, QDomElement & soundElement, QDomElement & pictureElement, QDomElement & pageNoteElement, QDomElement &objectElement, double offset, bool sticky) +void OoImpressImport::appendObject(TQDomNode & drawPage, TQDomDocument & doc, TQDomElement & soundElement, TQDomElement & pictureElement, TQDomElement & pageNoteElement, TQDomElement &objectElement, double offset, bool sticky) { - QDomElement o; + TQDomElement o; forEachElement( o, drawPage ) { - const QString localName = o.localName(); - const QString ns = o.namespaceURI(); - const QString drawID = o.attributeNS( ooNS::draw, "id", QString::null); + const TQString localName = o.localName(); + const TQString ns = o.namespaceURI(); + const TQString drawID = o.attributeNS( ooNS::draw, "id", TQString()); m_styleStack.save(); - QDomElement e; + TQDomElement e; if ( localName == "text-box" && ns == ooNS::draw ) // textbox { fillStyleStack( o, sticky ); @@ -523,9 +523,9 @@ void OoImpressImport::appendObject(QDomNode & drawPage, QDomDocument & doc, QD { e.setAttribute( "type", 8 ); appendPie( doc, e, o ); - QDomElement type = doc.createElement( "PIETYPE" ); + TQDomElement type = doc.createElement( "PIETYPE" ); - QString kind = o.attributeNS( ooNS::draw, "kind", QString::null ); + TQString kind = o.attributeNS( ooNS::draw, "kind", TQString() ); if ( kind == "section" ) { appendBrush( doc, e ); @@ -620,18 +620,18 @@ void OoImpressImport::appendObject(QDomNode & drawPage, QDomDocument & doc, QD } else if ( localName == "notes" && ns == ooNS::presentation ) // notes { - QDomNode textBox = KoDom::namedItemNS( o, ooNS::draw, "text-box" ); + TQDomNode textBox = KoDom::namedItemNS( o, ooNS::draw, "text-box" ); if ( !textBox.isNull() ) { - QString note; - QDomElement t; + TQString note; + TQDomElement t; forEachElement( t, textBox ) { // We don't care about styles as they are not supported in kpresenter. // Only add a linebreak for every child. note += t.text() + "\n"; } - QDomElement notesElement = doc.createElement( "Note" ); + TQDomElement notesElement = doc.createElement( "Note" ); notesElement.setAttribute( "note", note ); pageNoteElement.appendChild( notesElement ); } @@ -648,44 +648,44 @@ void OoImpressImport::appendObject(QDomNode & drawPage, QDomDocument & doc, QD } } -void OoImpressImport::appendBackgroundPage( QDomDocument &doc, QDomElement &backgroundElement, QDomElement & pictureElement, QDomElement &soundElement) +void OoImpressImport::appendBackgroundPage( TQDomDocument &doc, TQDomElement &backgroundElement, TQDomElement & pictureElement, TQDomElement &soundElement) { - QDomElement bgPage = doc.createElement( "PAGE" ); + TQDomElement bgPage = doc.createElement( "PAGE" ); // background if ( m_styleStack.hasAttributeNS( ooNS::draw, "fill" ) ) { - const QString fill = m_styleStack.attributeNS( ooNS::draw, "fill" ); + const TQString fill = m_styleStack.attributeNS( ooNS::draw, "fill" ); if ( fill == "solid" ) { - QDomElement backColor1 = doc.createElement( "BACKCOLOR1" ); + TQDomElement backColor1 = doc.createElement( "BACKCOLOR1" ); backColor1.setAttribute( "color", m_styleStack.attributeNS( ooNS::draw, "fill-color" ) ); bgPage.appendChild( backColor1 ); - QDomElement bcType = doc.createElement( "BCTYPE" ); + TQDomElement bcType = doc.createElement( "BCTYPE" ); bcType.setAttribute( "value", 0 ); // plain bgPage.appendChild( bcType ); - QDomElement backType = doc.createElement( "BACKTYPE" ); + TQDomElement backType = doc.createElement( "BACKTYPE" ); backType.setAttribute( "value", 0 ); // color/gradient bgPage.appendChild( backType ); } else if ( fill == "gradient" ) { - QString style = m_styleStack.attributeNS( ooNS::draw, "fill-gradient-name" ); - QDomElement* draw = m_draws[style]; + TQString style = m_styleStack.attributeNS( ooNS::draw, "fill-gradient-name" ); + TQDomElement* draw = m_draws[style]; appendBackgroundGradient( doc, bgPage, *draw ); } else if ( fill == "bitmap" ) { - QString style = m_styleStack.attributeNS( ooNS::draw, "fill-image-name" ); - QDomElement* draw = m_draws[style]; + TQString style = m_styleStack.attributeNS( ooNS::draw, "fill-image-name" ); + TQDomElement* draw = m_draws[style]; appendBackgroundImage( doc, bgPage, pictureElement, *draw ); - QDomElement backView = doc.createElement( "BACKVIEW" ); + TQDomElement backView = doc.createElement( "BACKVIEW" ); if ( m_styleStack.hasAttributeNS( ooNS::style, "repeat" ) ) { - QString repeat = m_styleStack.attributeNS( ooNS::style, "repeat" ); + TQString repeat = m_styleStack.attributeNS( ooNS::style, "repeat" ); if ( repeat == "stretch" ) backView.setAttribute( "value", 0 ); // zoomed else if ( repeat == "no-repeat" ) @@ -697,7 +697,7 @@ void OoImpressImport::appendBackgroundPage( QDomDocument &doc, QDomElement &back backView.setAttribute( "value", 2 ); // use tiled as default bgPage.appendChild( backView ); - QDomElement backType = doc.createElement( "BACKTYPE" ); + TQDomElement backType = doc.createElement( "BACKTYPE" ); backType.setAttribute( "value", 1 ); // image bgPage.appendChild( backType ); } @@ -705,23 +705,23 @@ void OoImpressImport::appendBackgroundPage( QDomDocument &doc, QDomElement &back if ( m_styleStack.hasAttributeNS( ooNS::presentation, "duration" ) ) { - QString str = m_styleStack.attributeNS( ooNS::presentation, "duration"); + TQString str = m_styleStack.attributeNS( ooNS::presentation, "duration"); kdDebug(30518)<<"styleStack.hasAttribute(presentation:duration ) :"<<str<<endl; //convert date duration int hour( str.mid( 2, 2 ).toInt() ); int minute( str.mid( 5, 2 ).toInt() ); int second( str.mid( 8, 2 ).toInt() ); int pageTimer = second + minute*60 + hour*60*60; - QDomElement pgEffect = doc.createElement("PGTIMER"); + TQDomElement pgEffect = doc.createElement("PGTIMER"); pgEffect.setAttribute( "timer", pageTimer ); bgPage.appendChild(pgEffect); } // slide transition if (m_styleStack.hasAttributeNS( ooNS::presentation, "transition-style")) { - QDomElement pgEffect = doc.createElement("PGEFFECT"); + TQDomElement pgEffect = doc.createElement("PGEFFECT"); - const QString effect = m_styleStack.attributeNS( ooNS::presentation, "transition-style"); + const TQString effect = m_styleStack.attributeNS( ooNS::presentation, "transition-style"); //kdDebug(30518) << "Transition name: " << effect << endl; int pef; @@ -786,12 +786,12 @@ void OoImpressImport::appendBackgroundPage( QDomDocument &doc, QDomElement &back // slide transition sound if (m_styleStack.hasChildNodeNS( ooNS::presentation, "sound")) { - QString soundUrl = storeSound(m_styleStack.childNodeNS( ooNS::presentation, "sound"), + TQString soundUrl = storeSound(m_styleStack.childNodeNS( ooNS::presentation, "sound"), soundElement, doc); if (!soundUrl.isNull()) { - QDomElement pseElem = doc.createElement("PGSOUNDEFFECT"); + TQDomElement pseElem = doc.createElement("PGSOUNDEFFECT"); pseElem.setAttribute("soundEffect", 1); pseElem.setAttribute("soundFileName", soundUrl); @@ -802,43 +802,43 @@ void OoImpressImport::appendBackgroundPage( QDomDocument &doc, QDomElement &back backgroundElement.appendChild(bgPage); } -void OoImpressImport::appendName(QDomDocument& doc, QDomElement& e, const QDomElement& object) +void OoImpressImport::appendName(TQDomDocument& doc, TQDomElement& e, const TQDomElement& object) { if( object.hasAttributeNS( ooNS::draw, "name" )) { - QDomElement name = doc.createElement( "OBJECTNAME" ); - name.setAttribute( "objectName", object.attributeNS( ooNS::draw, "name", QString::null )); + TQDomElement name = doc.createElement( "OBJECTNAME" ); + name.setAttribute( "objectName", object.attributeNS( ooNS::draw, "name", TQString() )); e.appendChild( name ); } } -void OoImpressImport::append2DGeometry( QDomDocument& doc, QDomElement& e, const QDomElement& object, int offset ) +void OoImpressImport::append2DGeometry( TQDomDocument& doc, TQDomElement& e, const TQDomElement& object, int offset ) { - QDomElement orig = doc.createElement( "ORIG" ); - orig.setAttribute( "x", KoUnit::parseValue( object.attributeNS( ooNS::svg, "x", QString::null ) ) ); - orig.setAttribute( "y", KoUnit::parseValue( object.attributeNS( ooNS::svg, "y", QString::null ) ) + offset ); + TQDomElement orig = doc.createElement( "ORIG" ); + orig.setAttribute( "x", KoUnit::parseValue( object.attributeNS( ooNS::svg, "x", TQString() ) ) ); + orig.setAttribute( "y", KoUnit::parseValue( object.attributeNS( ooNS::svg, "y", TQString() ) ) + offset ); e.appendChild( orig ); - QDomElement size = doc.createElement( "SIZE" ); - size.setAttribute( "width", KoUnit::parseValue( object.attributeNS( ooNS::svg, "width", QString::null ) ) ); - size.setAttribute( "height", KoUnit::parseValue( object.attributeNS( ooNS::svg, "height", QString::null ) ) ); + TQDomElement size = doc.createElement( "SIZE" ); + size.setAttribute( "width", KoUnit::parseValue( object.attributeNS( ooNS::svg, "width", TQString() ) ) ); + size.setAttribute( "height", KoUnit::parseValue( object.attributeNS( ooNS::svg, "height", TQString() ) ) ); e.appendChild( size ); if( object.hasAttributeNS( ooNS::draw, "transform" )) { kdDebug(30518)<<" object transform \n"; //todo parse it - QString transform = object.attributeNS( ooNS::draw, "transform", QString::null ); - if( transform.contains("rotate (")) + TQString transform = object.attributeNS( ooNS::draw, "transform", TQString() ); + if( transform.tqcontains("rotate (")) { //kdDebug(30518)<<" rotate object \n"; transform = transform.remove("rotate (" ); - transform = transform.left(transform.find(")")); + transform = transform.left(transform.tqfind(")")); //kdDebug(30518)<<" transform :"<<transform<<endl; bool ok; double radian = transform.toDouble(&ok); if( ok ) { - QDomElement angle = doc.createElement( "ANGLE" ); + TQDomElement angle = doc.createElement( "ANGLE" ); //angle is defined as a radian in oo but degree into kpresenter. angle.setAttribute("value", (-1 * ((radian*180)/M_PI))); @@ -849,27 +849,27 @@ void OoImpressImport::append2DGeometry( QDomDocument& doc, QDomElement& e, const } //return true if (x1 < x2) necessary to load correctly start-line and end-line -bool OoImpressImport::appendLineGeometry( QDomDocument& doc, QDomElement& e, const QDomElement& object, int offset ) +bool OoImpressImport::appendLineGeometry( TQDomDocument& doc, TQDomElement& e, const TQDomElement& object, int offset ) { - double x1 = KoUnit::parseValue( object.attributeNS( ooNS::svg, "x1", QString::null ) ); - double y1 = KoUnit::parseValue( object.attributeNS( ooNS::svg, "y1", QString::null ) ); - double x2 = KoUnit::parseValue( object.attributeNS( ooNS::svg, "x2", QString::null ) ); - double y2 = KoUnit::parseValue( object.attributeNS( ooNS::svg, "y2", QString::null ) ); + double x1 = KoUnit::parseValue( object.attributeNS( ooNS::svg, "x1", TQString() ) ); + double y1 = KoUnit::parseValue( object.attributeNS( ooNS::svg, "y1", TQString() ) ); + double x2 = KoUnit::parseValue( object.attributeNS( ooNS::svg, "x2", TQString() ) ); + double y2 = KoUnit::parseValue( object.attributeNS( ooNS::svg, "y2", TQString() ) ); - double x = QMIN( x1, x2 ); - double y = QMIN( y1, y2 ); + double x = TQMIN( x1, x2 ); + double y = TQMIN( y1, y2 ); - QDomElement orig = doc.createElement( "ORIG" ); + TQDomElement orig = doc.createElement( "ORIG" ); orig.setAttribute( "x", x ); orig.setAttribute( "y", y + offset ); e.appendChild( orig ); - QDomElement size = doc.createElement( "SIZE" ); + TQDomElement size = doc.createElement( "SIZE" ); size.setAttribute( "width", fabs( x1 - x2 ) ); size.setAttribute( "height", fabs( y1 - y2 ) ); e.appendChild( size ); - QDomElement linetype = doc.createElement( "LINETYPE" ); + TQDomElement linetype = doc.createElement( "LINETYPE" ); if ( ( x1 < x2 && y1 < y2 ) || ( x1 > x2 && y1 > y2 ) ) linetype.setAttribute( "value", 2 ); else @@ -879,18 +879,18 @@ bool OoImpressImport::appendLineGeometry( QDomDocument& doc, QDomElement& e, con return (x1 < x2); } -void OoImpressImport::appendPen( QDomDocument& doc, QDomElement& e ) +void OoImpressImport::appendPen( TQDomDocument& doc, TQDomElement& e ) { if ( m_styleStack.hasAttributeNS( ooNS::draw, "stroke" )) { - QDomElement pen = doc.createElement( "PEN" ); + TQDomElement pen = doc.createElement( "PEN" ); if ( m_styleStack.attributeNS( ooNS::draw, "stroke" ) == "none" ) pen.setAttribute( "style", 0 ); else if ( m_styleStack.attributeNS( ooNS::draw, "stroke" ) == "solid" ) pen.setAttribute( "style", 1 ); else if ( m_styleStack.attributeNS( ooNS::draw, "stroke" ) == "dash" ) { - QString style = m_styleStack.attributeNS( ooNS::draw, "stroke-dash" ); + TQString style = m_styleStack.attributeNS( ooNS::draw, "stroke-dash" ); if ( style == "Ultrafine Dashed" || style == "Fine Dashed" || style == "Fine Dashed (var)" || style == "Dashed (var)" ) pen.setAttribute( "style", 2 ); @@ -911,18 +911,18 @@ void OoImpressImport::appendPen( QDomDocument& doc, QDomElement& e ) } } -void OoImpressImport::appendBrush( QDomDocument& doc, QDomElement& e ) +void OoImpressImport::appendBrush( TQDomDocument& doc, TQDomElement& e ) { if ( m_styleStack.hasAttributeNS( ooNS::draw, "fill" ) ) { - const QString fill = m_styleStack.attributeNS( ooNS::draw, "fill" ); - //kdDebug(30518)<<"void OoImpressImport::appendBrush( QDomDocument& doc, QDomElement& e ) :"<<fill<<endl; + const TQString fill = m_styleStack.attributeNS( ooNS::draw, "fill" ); + //kdDebug(30518)<<"void OoImpressImport::appendBrush( TQDomDocument& doc, TQDomElement& e ) :"<<fill<<endl; if ( fill == "solid" ) { - QDomElement brush = doc.createElement( "BRUSH" ); + TQDomElement brush = doc.createElement( "BRUSH" ); if ( m_styleStack.hasAttributeNS( ooNS::draw, "transparency" ) ) { - QString transparency = m_styleStack.attributeNS( ooNS::draw, "transparency" ); + TQString transparency = m_styleStack.attributeNS( ooNS::draw, "transparency" ); transparency = transparency.remove( '%' ); int value = transparency.toInt(); if ( value >= 94 && value <= 99 ) @@ -962,22 +962,22 @@ void OoImpressImport::appendBrush( QDomDocument& doc, QDomElement& e ) } else if ( fill == "hatch" ) { - QDomElement brush = doc.createElement( "BRUSH" ); - QString style = m_styleStack.attributeNS( ooNS::draw, "fill-hatch-name" ); - QDomElement* draw = m_draws[style]; + TQDomElement brush = doc.createElement( "BRUSH" ); + TQString style = m_styleStack.attributeNS( ooNS::draw, "fill-hatch-name" ); + TQDomElement* draw = m_draws[style]; if ( draw ) { if( draw->hasAttributeNS( ooNS::draw, "color" ) ) - brush.setAttribute( "color", draw->attributeNS( ooNS::draw, "color", QString::null ) ); + brush.setAttribute( "color", draw->attributeNS( ooNS::draw, "color", TQString() ) ); int angle = 0; if( draw->hasAttributeNS( ooNS::draw, "rotation" )) { - angle = (draw->attributeNS( ooNS::draw, "rotation", QString::null ).toInt())/10; + angle = (draw->attributeNS( ooNS::draw, "rotation", TQString() ).toInt())/10; kdDebug(30518)<<"angle :"<<angle<<endl; } if( draw->hasAttributeNS( ooNS::draw, "style" )) { - QString styleHash = draw->attributeNS( ooNS::draw, "style", QString::null ); + TQString styleHash = draw->attributeNS( ooNS::draw, "style", TQString() ); if( styleHash == "single") { switch( angle ) @@ -1041,24 +1041,24 @@ void OoImpressImport::appendBrush( QDomDocument& doc, QDomElement& e ) // We have to set a brush with brushstyle != no background fill // otherwise the properties dialog for the object won't // display the preview for the gradient. - QDomElement brush = doc.createElement( "BRUSH" ); + TQDomElement brush = doc.createElement( "BRUSH" ); brush.setAttribute( "style", 1 ); e.appendChild( brush ); - QDomElement gradient = doc.createElement( "GRADIENT" ); - QString style = m_styleStack.attributeNS( ooNS::draw, "fill-gradient-name" ); + TQDomElement gradient = doc.createElement( "GRADIENT" ); + TQString style = m_styleStack.attributeNS( ooNS::draw, "fill-gradient-name" ); - QDomElement* draw = m_draws[style]; + TQDomElement* draw = m_draws[style]; if ( draw ) { - gradient.setAttribute( "color1", draw->attributeNS( ooNS::draw, "start-color", QString::null ) ); - gradient.setAttribute( "color2", draw->attributeNS( ooNS::draw, "end-color", QString::null ) ); + gradient.setAttribute( "color1", draw->attributeNS( ooNS::draw, "start-color", TQString() ) ); + gradient.setAttribute( "color2", draw->attributeNS( ooNS::draw, "end-color", TQString() ) ); - QString type = draw->attributeNS( ooNS::draw, "style", QString::null ); + TQString type = draw->attributeNS( ooNS::draw, "style", TQString() ); //kdDebug(30518)<<" type !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! :"<<type<<endl; if ( type == "linear" ) { - int angle = draw->attributeNS( ooNS::draw, "angle", QString::null ).toInt() / 10; + int angle = draw->attributeNS( ooNS::draw, "angle", TQString() ).toInt() / 10; // make sure the angle is between 0 and 359 angle = abs( angle ); @@ -1099,12 +1099,12 @@ void OoImpressImport::appendBrush( QDomDocument& doc, QDomElement& e ) // and (un-)balanced settings of kpresenter. Let's try it. int x, y; if ( draw->hasAttributeNS( ooNS::draw, "cx" ) ) - x = draw->attributeNS( ooNS::draw, "cx", QString::null ).remove( '%' ).toInt(); + x = draw->attributeNS( ooNS::draw, "cx", TQString() ).remove( '%' ).toInt(); else x = 50; if ( draw->hasAttributeNS( ooNS::draw, "cy" ) ) - y = draw->attributeNS( ooNS::draw, "cy", QString::null ).remove( '%' ).toInt(); + y = draw->attributeNS( ooNS::draw, "cy", TQString() ).remove( '%' ).toInt(); else y = 50; @@ -1124,22 +1124,22 @@ void OoImpressImport::appendBrush( QDomDocument& doc, QDomElement& e ) } e.appendChild( gradient ); - QDomElement fillType = doc.createElement( "FILLTYPE" ); + TQDomElement fillType = doc.createElement( "FILLTYPE" ); fillType.setAttribute( "value", 1 ); e.appendChild( fillType ); } } } -void OoImpressImport::appendPie( QDomDocument& doc, QDomElement& e, const QDomElement& object ) +void OoImpressImport::appendPie( TQDomDocument& doc, TQDomElement& e, const TQDomElement& object ) { - QDomElement angle = doc.createElement( "PIEANGLE" ); - int start = (int) ( object.attributeNS( ooNS::draw, "start-angle", QString::null ).toDouble() ); + TQDomElement angle = doc.createElement( "PIEANGLE" ); + int start = (int) ( object.attributeNS( ooNS::draw, "start-angle", TQString() ).toDouble() ); angle.setAttribute( "value", start * 16 ); e.appendChild( angle ); - QDomElement length = doc.createElement( "PIELENGTH" ); - int end = (int) ( object.attributeNS( ooNS::draw, "end-angle", QString::null ).toDouble() ); + TQDomElement length = doc.createElement( "PIELENGTH" ); + int end = (int) ( object.attributeNS( ooNS::draw, "end-angle", TQString() ).toDouble() ); if ( end < start ) length.setAttribute( "value", ( 360 - start + end ) * 16 ); else @@ -1147,16 +1147,16 @@ void OoImpressImport::appendPie( QDomDocument& doc, QDomElement& e, const QDomEl e.appendChild( length ); } -void OoImpressImport::appendImage( QDomDocument& doc, QDomElement& e, QDomElement& p, - const QDomElement& object ) +void OoImpressImport::appendImage( TQDomDocument& doc, TQDomElement& e, TQDomElement& p, + const TQDomElement& object ) { - QString fileName = storeImage( object ); + TQString fileName = storeImage( object ); // create a key for the picture - QTime time = QTime::currentTime(); - QDate date = QDate::currentDate(); + TQTime time = TQTime::currentTime(); + TQDate date = TQDate::tqcurrentDate(); - QDomElement image = doc.createElement( "KEY" ); + TQDomElement image = doc.createElement( "KEY" ); image.setAttribute( "msec", time.msec() ); image.setAttribute( "second", time.second() ); image.setAttribute( "minute", time.minute() ); @@ -1167,7 +1167,7 @@ void OoImpressImport::appendImage( QDomDocument& doc, QDomElement& e, QDomElemen image.setAttribute( "filename", fileName ); e.appendChild( image ); - QDomElement settings = doc.createElement( "PICTURESETTINGS" ); + TQDomElement settings = doc.createElement( "PICTURESETTINGS" ); if ( m_styleStack.hasAttributeNS( ooNS::draw, "color-mode" ) && ( m_styleStack.attributeNS( ooNS::draw, "color-mode" )=="greyscale" ) ) settings.setAttribute( "grayscal", 1 ); else @@ -1175,7 +1175,7 @@ void OoImpressImport::appendImage( QDomDocument& doc, QDomElement& e, QDomElemen if ( m_styleStack.hasAttributeNS( ooNS::draw, "luminance" ) ) { - QString str( m_styleStack.attributeNS( ooNS::draw, "luminance" ) ); + TQString str( m_styleStack.attributeNS( ooNS::draw, "luminance" ) ); str = str.remove( '%' ); settings.setAttribute( "bright", str ); } @@ -1187,36 +1187,36 @@ void OoImpressImport::appendImage( QDomDocument& doc, QDomElement& e, QDomElemen settings.setAttribute( "depth", 0 ); e.appendChild( settings ); - QDomElement effects = doc.createElement( "EFFECTS" ); + TQDomElement effects = doc.createElement( "EFFECTS" ); bool hasEffect = false; if ( m_styleStack.hasAttributeNS( ooNS::draw, "contrast" ) ) { - QString str( m_styleStack.attributeNS( ooNS::draw, "contrast" ) ); + TQString str( m_styleStack.attributeNS( ooNS::draw, "contrast" ) ); str = str.remove( '%' ); int val = str.toInt(); val = ( int )( 255.0 *val/100.0 ); effects.setAttribute( "type", "5" ); - effects.setAttribute( "param1", QString::number( val ) ); + effects.setAttribute( "param1", TQString::number( val ) ); hasEffect = true; } if ( hasEffect ) e.appendChild( effects ); - QDomElement key = image.cloneNode().toElement(); + TQDomElement key = image.cloneNode().toElement(); key.setAttribute( "name", "pictures/" + fileName ); p.appendChild( key ); } -void OoImpressImport::appendBackgroundImage( QDomDocument& doc, QDomElement& e, - QDomElement& p, const QDomElement& object ) +void OoImpressImport::appendBackgroundImage( TQDomDocument& doc, TQDomElement& e, + TQDomElement& p, const TQDomElement& object ) { - QString fileName = storeImage( object ); + TQString fileName = storeImage( object ); // create a key for the picture - QTime time = QTime::currentTime(); - QDate date = QDate::currentDate(); + TQTime time = TQTime::currentTime(); + TQDate date = TQDate::tqcurrentDate(); - QDomElement image = doc.createElement( "BACKPICTUREKEY" ); + TQDomElement image = doc.createElement( "BACKPICTUREKEY" ); image.setAttribute( "msec", time.msec() ); image.setAttribute( "second", time.second() ); image.setAttribute( "minute", time.minute() ); @@ -1227,32 +1227,32 @@ void OoImpressImport::appendBackgroundImage( QDomDocument& doc, QDomElement& e, image.setAttribute( "filename", fileName ); e.appendChild( image ); - QDomElement key = image.cloneNode().toElement(); + TQDomElement key = image.cloneNode().toElement(); key.setTagName( "KEY" ); key.setAttribute( "name", "pictures/" + fileName ); p.appendChild( key ); } -void OoImpressImport::appendBackgroundGradient( QDomDocument& doc, QDomElement& e, - const QDomElement& object ) +void OoImpressImport::appendBackgroundGradient( TQDomDocument& doc, TQDomElement& e, + const TQDomElement& object ) { - QDomElement backColor1 = doc.createElement( "BACKCOLOR1" ); - backColor1.setAttribute( "color", object.attributeNS( ooNS::draw, "start-color", QString::null ) ); + TQDomElement backColor1 = doc.createElement( "BACKCOLOR1" ); + backColor1.setAttribute( "color", object.attributeNS( ooNS::draw, "start-color", TQString() ) ); e.appendChild( backColor1 ); - QDomElement backColor2 = doc.createElement( "BACKCOLOR2" ); - backColor2.setAttribute( "color", object.attributeNS( ooNS::draw, "end-color", QString::null ) ); + TQDomElement backColor2 = doc.createElement( "BACKCOLOR2" ); + backColor2.setAttribute( "color", object.attributeNS( ooNS::draw, "end-color", TQString() ) ); e.appendChild( backColor2 ); - QDomElement backType = doc.createElement( "BACKTYPE" ); + TQDomElement backType = doc.createElement( "BACKTYPE" ); backType.setAttribute( "value", 0 ); // color/gradient e.appendChild( backType ); - QDomElement bcType = doc.createElement( "BCTYPE" ); - QString type = object.attributeNS( ooNS::draw, "style", QString::null ); + TQDomElement bcType = doc.createElement( "BCTYPE" ); + TQString type = object.attributeNS( ooNS::draw, "style", TQString() ); if ( type == "linear" ) { - int angle = object.attributeNS( ooNS::draw, "angle", QString::null ).toInt() / 10; + int angle = object.attributeNS( ooNS::draw, "angle", TQString() ).toInt() / 10; // make sure the angle is between 0 and 359 angle = abs( angle ); @@ -1291,18 +1291,18 @@ void OoImpressImport::appendBackgroundGradient( QDomDocument& doc, QDomElement& e.appendChild( bcType ); - QDomElement bGradient = doc.createElement( "BGRADIENT" ); + TQDomElement bGradient = doc.createElement( "BGRADIENT" ); // Hard to map between x- and y-center settings of ooimpress // and (un-)balanced settings of kpresenter. Let's try it. int x, y; if ( object.hasAttributeNS( ooNS::draw, "cx" ) ) - x = object.attributeNS( ooNS::draw, "cx", QString::null ).remove( '%' ).toInt(); + x = object.attributeNS( ooNS::draw, "cx", TQString() ).remove( '%' ).toInt(); else x = 50; if ( object.hasAttributeNS( ooNS::draw, "cy" ) ) - y = object.attributeNS( ooNS::draw, "cy", QString::null ).remove( '%' ).toInt(); + y = object.attributeNS( ooNS::draw, "cy", TQString() ).remove( '%' ).toInt(); else y = 50; @@ -1323,20 +1323,20 @@ void OoImpressImport::appendBackgroundGradient( QDomDocument& doc, QDomElement& e.appendChild( bGradient ); } -void OoImpressImport::appendRounding( QDomDocument& doc, QDomElement& e, const QDomElement& object ) +void OoImpressImport::appendRounding( TQDomDocument& doc, TQDomElement& e, const TQDomElement& object ) { if ( object.hasAttributeNS( ooNS::draw, "corner-radius" ) ) { // kpresenter uses percent, ooimpress uses cm ... hmm? - QDomElement rounding = doc.createElement( "RNDS" ); - int corner = static_cast<int>(KoUnit::parseValue(object.attributeNS( ooNS::draw, "corner-radius", QString::null))); + TQDomElement rounding = doc.createElement( "RNDS" ); + int corner = static_cast<int>(KoUnit::parseValue(object.attributeNS( ooNS::draw, "corner-radius", TQString()))); rounding.setAttribute( "x", corner ); rounding.setAttribute( "y", corner ); e.appendChild( rounding ); } } -void OoImpressImport::appendShadow( QDomDocument& doc, QDomElement& e ) +void OoImpressImport::appendShadow( TQDomDocument& doc, TQDomElement& e ) { // Note that ooimpress makes a difference between shadowed text and // a shadowed object while kpresenter only knows the attribute 'shadow'. @@ -1351,9 +1351,9 @@ void OoImpressImport::appendShadow( QDomDocument& doc, QDomElement& e ) m_styleStack.attributeNS( ooNS::fo, "text-shadow" ) != "none" ) { // use the shadow attribute to indicate a text-shadow - QDomElement shadow = doc.createElement( "SHADOW" ); - QString distance = m_styleStack.attributeNS( ooNS::fo, "text-shadow" ); - distance.truncate( distance.find( ' ' ) ); + TQDomElement shadow = doc.createElement( "SHADOW" ); + TQString distance = m_styleStack.attributeNS( ooNS::fo, "text-shadow" ); + distance.truncate( distance.tqfind( ' ' ) ); shadow.setAttribute( "distance", KoUnit::parseValue( distance ) ); shadow.setAttribute( "direction", 5 ); shadow.setAttribute( "color", "#a0a0a0" ); @@ -1364,7 +1364,7 @@ void OoImpressImport::appendShadow( QDomDocument& doc, QDomElement& e ) m_styleStack.attributeNS( ooNS::draw, "shadow" ) == "visible" ) { // use the shadow attribute to indicate an object-shadow - QDomElement shadow = doc.createElement( "SHADOW" ); + TQDomElement shadow = doc.createElement( "SHADOW" ); double x = KoUnit::parseValue( m_styleStack.attributeNS( ooNS::draw, "shadow-offset-x" ) ); double y = KoUnit::parseValue( m_styleStack.attributeNS( ooNS::draw, "shadow-offset-y" ) ); @@ -1419,20 +1419,20 @@ void OoImpressImport::appendShadow( QDomDocument& doc, QDomElement& e ) bool b = ( m_styleStack.attributeNS( ooNS::draw, "size-protect" ) == "true" ) || ( m_styleStack.attributeNS( ooNS::draw, "move-protect" ) == "true" ); if ( b ) { - QDomElement protect = doc.createElement( "PROTECT" ); + TQDomElement protect = doc.createElement( "PROTECT" ); protect.setAttribute("state" , b); e.appendChild(protect); } } } -void OoImpressImport::appendLineEnds( QDomDocument& doc, QDomElement& e, bool orderEndStartLine) +void OoImpressImport::appendLineEnds( TQDomDocument& doc, TQDomElement& e, bool orderEndStartLine) { const char* attr = orderEndStartLine ? "marker-start" : "marker-end"; if ( m_styleStack.hasAttributeNS( ooNS::draw, attr ) ) { - QDomElement lineBegin = doc.createElement( "LINEBEGIN" ); - QString type = m_styleStack.attributeNS( ooNS::draw, attr ); + TQDomElement lineBegin = doc.createElement( "LINEBEGIN" ); + TQString type = m_styleStack.attributeNS( ooNS::draw, attr ); if ( type == "Arrow" || type == "Small Arrow" || type == "Rounded short Arrow" || type == "Symmetric Arrow" || type == "Rounded large Arrow" || type == "Arrow concave" ) lineBegin.setAttribute( "value", 1 ); @@ -1451,8 +1451,8 @@ void OoImpressImport::appendLineEnds( QDomDocument& doc, QDomElement& e, bool or attr = orderEndStartLine ? "marker-end" : "marker-start"; if ( m_styleStack.hasAttributeNS( ooNS::draw, attr ) ) { - QDomElement lineEnd = doc.createElement( "LINEEND" ); - QString type = m_styleStack.attributeNS( ooNS::draw, attr ); + TQDomElement lineEnd = doc.createElement( "LINEEND" ); + TQString type = m_styleStack.attributeNS( ooNS::draw, attr ); if ( type == "Arrow" || type == "Small Arrow" || type == "Rounded short Arrow" || type == "Symmetric Arrow" || type == "Rounded large Arrow" || type == "Arrow concave" ) lineEnd.setAttribute( "value", 1 ); @@ -1470,7 +1470,7 @@ void OoImpressImport::appendLineEnds( QDomDocument& doc, QDomElement& e, bool or } } -void OoImpressImport::appendTextObjectMargin( QDomDocument& /*doc*/, QDomElement& e ) +void OoImpressImport::appendTextObjectMargin( TQDomDocument& /*doc*/, TQDomElement& e ) { if ( m_styleStack.hasAttributeNS( ooNS::fo, "padding" ) ) { @@ -1493,20 +1493,20 @@ void OoImpressImport::appendTextObjectMargin( QDomDocument& /*doc*/, QDomElement } } -QDomElement OoImpressImport::parseTextBox( QDomDocument& doc, const QDomElement& textBox ) +TQDomElement OoImpressImport::parseTextBox( TQDomDocument& doc, const TQDomElement& textBox ) { - QDomElement textObjectElement = doc.createElement( "TEXTOBJ" ); + TQDomElement textObjectElement = doc.createElement( "TEXTOBJ" ); appendTextObjectMargin( doc, textObjectElement ); - // vertical alignment + // vertical tqalignment if ( m_styleStack.hasAttributeNS( ooNS::draw, "textarea-vertical-align" ) ) { - QString alignment = m_styleStack.attributeNS( ooNS::draw, "textarea-vertical-align" ); - if ( alignment == "top" ) + TQString tqalignment = m_styleStack.attributeNS( ooNS::draw, "textarea-vertical-align" ); + if ( tqalignment == "top" ) textObjectElement.setAttribute( "verticalAlign", "top" ); - else if ( alignment == "middle" ) + else if ( tqalignment == "middle" ) textObjectElement.setAttribute( "verticalAlign", "center" ); - else if ( alignment == "bottom" ) + else if ( tqalignment == "bottom" ) textObjectElement.setAttribute( "verticalAlign", "bottom" ); textObjectElement.setAttribute("verticalValue", 0.0); @@ -1517,17 +1517,17 @@ QDomElement OoImpressImport::parseTextBox( QDomDocument& doc, const QDomElement& return textObjectElement; } -void OoImpressImport::parseParagraphs( QDomDocument& doc, QDomElement& textObjectElement, const QDomElement& parent ) +void OoImpressImport::parseParagraphs( TQDomDocument& doc, TQDomElement& textObjectElement, const TQDomElement& tqparent ) { - QDomElement t; - forEachElement( t, parent ) + TQDomElement t; + forEachElement( t, tqparent ) { m_styleStack.save(); - const QString localName = t.localName(); - const QString ns = t.namespaceURI(); + const TQString localName = t.localName(); + const TQString ns = t.namespaceURI(); const bool isTextNS = ns == ooNS::text; - QDomElement e; + TQDomElement e; if ( isTextNS && localName == "p" ) // text paragraph e = parseParagraph( doc, t ); else if ( isTextNS && localName == "h" ) // heading - can this happen in ooimpress? @@ -1552,17 +1552,17 @@ void OoImpressImport::parseParagraphs( QDomDocument& doc, QDomElement& textObjec } } -void OoImpressImport::applyListStyle( QDomElement& paragraph ) +void OoImpressImport::applyListStyle( TQDomElement& paragraph ) { // Spec: see 3.3.5 p137 if ( m_listStyleStack.hasListStyle() && m_nextItemIsListItem ) { - //const QDomElement listStyle = m_listStyleStack.currentListStyle(); + //const TQDomElement listStyle = m_listStyleStack.currentListStyle(); //bool heading = paragraph.localName() == "h"; m_nextItemIsListItem = false; - /*int level = heading ? paragraph.attributeNS( ooNS::text, "level", QString::null ).toInt() + /*int level = heading ? paragraph.attributeNS( ooNS::text, "level", TQString() ).toInt() : m_listStyleStack.level();*/ - QDomElement counter = paragraph.ownerDocument().createElement( "COUNTER" ); + TQDomElement counter = paragraph.ownerDocument().createElement( "COUNTER" ); counter.setAttribute( "numberingtype", 0 ); counter.setAttribute( "depth", 0 ); @@ -1574,20 +1574,20 @@ void OoImpressImport::applyListStyle( QDomElement& paragraph ) } } -static QDomElement findListLevelStyle( QDomElement& fullListStyle, int level ) +static TQDomElement findListLevelStyle( TQDomElement& fullListStyle, int level ) { - QDomElement listLevelItem; + TQDomElement listLevelItem; forEachElement( listLevelItem, fullListStyle ) { - if ( listLevelItem.attributeNS( ooNS::text, "level", QString::null ).toInt() == level ) + if ( listLevelItem.attributeNS( ooNS::text, "level", TQString() ).toInt() == level ) return listLevelItem; } - return QDomElement(); + return TQDomElement(); } -bool OoImpressImport::pushListLevelStyle( const QString& listStyleName, int level ) +bool OoImpressImport::pushListLevelStyle( const TQString& listStyleName, int level ) { - QDomElement* fullListStyle = m_listStyles[listStyleName]; + TQDomElement* fullListStyle = m_listStyles[listStyleName]; if ( !fullListStyle ) { kdWarning(30518) << "List style " << listStyleName << " not found!" << endl; return false; @@ -1596,12 +1596,12 @@ bool OoImpressImport::pushListLevelStyle( const QString& listStyleName, int leve return pushListLevelStyle( listStyleName, *fullListStyle, level ); } -bool OoImpressImport::pushListLevelStyle( const QString& listStyleName, // for debug only - QDomElement& fullListStyle, int level ) +bool OoImpressImport::pushListLevelStyle( const TQString& listStyleName, // for debug only + TQDomElement& fullListStyle, int level ) { // Find applicable list-level-style for level int i = level; - QDomElement listLevelStyle; + TQDomElement listLevelStyle; while ( i > 0 && listLevelStyle.isNull() ) { listLevelStyle = findListLevelStyle( fullListStyle, i ); --i; @@ -1615,14 +1615,14 @@ bool OoImpressImport::pushListLevelStyle( const QString& listStyleName, // for d return true; } -void OoImpressImport::parseList( QDomDocument& doc, QDomElement& textObjectElement, const QDomElement& list ) +void OoImpressImport::parseList( TQDomDocument& doc, TQDomElement& textObjectElement, const TQDomElement& list ) { //kdDebug(30518) << k_funcinfo << "parseList"<< endl; m_insideOrderedList = ( list.localName() == "ordered-list" ); - QString oldListStyleName = m_currentListStyleName; + TQString oldListStyleName = m_currentListStyleName; if ( list.hasAttributeNS( ooNS::text, "style-name" ) ) - m_currentListStyleName = list.attributeNS( ooNS::text, "style-name", QString::null ); + m_currentListStyleName = list.attributeNS( ooNS::text, "style-name", TQString() ); bool listOK = !m_currentListStyleName.isEmpty(); const int level = m_listStyleStack.level() + 1; //kdDebug(30518) << k_funcinfo << " listOK=" << listOK << " level=" << level << endl; @@ -1630,14 +1630,14 @@ void OoImpressImport::parseList( QDomDocument& doc, QDomElement& textObjectEleme listOK = pushListLevelStyle( m_currentListStyleName, level ); // Iterate over list items - QDomElement listItem; + TQDomElement listItem; forEachElement( listItem, list ) { // It's either list-header (normal text on top of list) or list-item m_nextItemIsListItem = ( listItem.localName() != "list-header" ); m_restartNumbering = -1; if ( listItem.hasAttributeNS( ooNS::text, "start-value" ) ) - m_restartNumbering = listItem.attributeNS( ooNS::text, "start-value", QString::null ).toInt(); + m_restartNumbering = listItem.attributeNS( ooNS::text, "start-value", TQString() ).toInt(); // ### Oasis: can be p h or list only. parseParagraphs( doc, textObjectElement, listItem ); m_restartNumbering = -1; @@ -1647,26 +1647,26 @@ void OoImpressImport::parseList( QDomDocument& doc, QDomElement& textObjectEleme m_currentListStyleName = oldListStyleName; } -QDomElement OoImpressImport::parseParagraph( QDomDocument& doc, const QDomElement& paragraph ) +TQDomElement OoImpressImport::parseParagraph( TQDomDocument& doc, const TQDomElement& paragraph ) { - QDomElement p = doc.createElement( "P" ); + TQDomElement p = doc.createElement( "P" ); // parse the paragraph-properties fillStyleStack( paragraph ); // Style name - QString styleName = m_styleStack.userStyleName("paragraph"); + TQString styleName = m_styleStack.userStyleName("paragraph"); if ( !styleName.isEmpty() ) { - QDomElement nameElem = doc.createElement("NAME"); + TQDomElement nameElem = doc.createElement("NAME"); nameElem.setAttribute("value", styleName); p.appendChild(nameElem); } - // Paragraph alignment + // Paragraph tqalignment if ( m_styleStack.hasAttributeNS( ooNS::fo, "text-align" ) ) { - QString align = m_styleStack.attributeNS( ooNS::fo, "text-align" ); + TQString align = m_styleStack.attributeNS( ooNS::fo, "text-align" ); if ( align == "center" ) p.setAttribute( "align", 4 ); else if ( align == "justify" ) @@ -1707,19 +1707,19 @@ QDomElement OoImpressImport::parseParagraph( QDomDocument& doc, const QDomElemen return p; } -void OoImpressImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& parent, - QDomElement& outputParagraph, uint& pos) +void OoImpressImport::parseSpanOrSimilar( TQDomDocument& doc, const TQDomElement& tqparent, + TQDomElement& outputParagraph, uint& pos) { - // Parse every child node of the parent + // Parse every child node of the tqparent // Can't use forEachElement here since we also care about text nodes - for( QDomNode node = parent.firstChild(); !node.isNull(); node = node.nextSibling() ) + for( TQDomNode node = tqparent.firstChild(); !node.isNull(); node = node.nextSibling() ) { - QDomElement ts = node.toElement(); - QString textData; - const QString localName( ts.localName() ); - const QString ns = ts.namespaceURI(); + TQDomElement ts = node.toElement(); + TQString textData; + const TQString localName( ts.localName() ); + const TQString ns = ts.namespaceURI(); const bool isTextNS = ns == ooNS::text; - QDomText t = node.toText(); + TQDomText t = node.toText(); // Try to keep the order of the tag names by probability of happening if ( isTextNS && localName == "span" ) // text:span @@ -1736,7 +1736,7 @@ void OoImpressImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& else if ( isTextNS && localName == "tab-stop" ) // text:tab-stop { // KPresenter currently uses \t. - // Known bug: a line with only \t\t\t\t isn't loaded - XML (QDom) strips out whitespace. + // Known bug: a line with only \t\t\t\t isn't loaded - XML (TQDom) strips out whitespace. // One more good reason to switch to <text:tab-stop> instead... textData = '\t'; } @@ -1752,7 +1752,7 @@ void OoImpressImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& else if ( isTextNS && localName == "a" ) { m_styleStack.save(); - QString href( ts.attributeNS( ooNS::xlink, "href", QString::null) ); + TQString href( ts.attributeNS( ooNS::xlink, "href", TQString()) ); if ( href.startsWith("#") ) { // We have a reference to a bookmark (### TODO) @@ -1764,13 +1764,13 @@ void OoImpressImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& #if 0 // TODO // The problem is that KPresenter's hyperlink text is not inside the normal text, but for OOWriter it is nearly a <text:span> // So we have to fake. - QDomElement fakeParagraph, fakeFormats; + TQDomElement fakeParagraph, fakeFormats; uint fakePos=0; - QString text; + TQString text; parseSpanOrSimilar( doc, ts, fakeParagraph, fakeFormats, text, fakePos); textData = '#'; // hyperlink placeholder - QDomElement linkElement (doc.createElement("LINK")); - linkElement.setAttribute("hrefName",ts.attributeNS( ooNS::xlink, "href", QString::null)); + TQDomElement linkElement (doc.createElement("LINK")); + linkElement.setAttribute("hrefName",ts.attributeNS( ooNS::xlink, "href", TQString())); linkElement.setAttribute("linkName",text); appendVariable(doc, ts, pos, "STRING", 9, text, linkElement); #endif @@ -1798,12 +1798,12 @@ void OoImpressImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& pos += textData.length(); - QDomElement text = saveHelper(textData, doc); + TQDomElement text = saveHelper(textData, doc); kdDebug(30518) << k_funcinfo << "Para text is: " << textData << endl; if (m_styleStack.hasAttributeNS( ooNS::fo, "language" )) { - QString lang = m_styleStack.attributeNS( ooNS::fo, "language" ); + TQString lang = m_styleStack.attributeNS( ooNS::fo, "language" ); if (lang=="en") text.setAttribute("language", "en_US"); else @@ -1830,7 +1830,7 @@ void OoImpressImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& if ( m_styleStack.hasAttributeNS( ooNS::fo, "font-size" ) ) { double pointSize = m_styleStack.fontSize(); - text.setAttribute( "pointSize", qRound(pointSize) ); // KPresenter uses toInt()! + text.setAttribute( "pointSize", tqRound(pointSize) ); // KPresenter uses toInt()! } if ( m_styleStack.hasAttributeNS( ooNS::fo, "font-weight" ) ) // 3.10.24 if ( m_styleStack.attributeNS( ooNS::fo, "font-weight" ) == "bold" ) @@ -1841,9 +1841,9 @@ void OoImpressImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& if ( m_styleStack.hasAttributeNS( ooNS::style, "text-position" ) ) // 3.10.17 { - QString text_position = m_styleStack.attributeNS( ooNS::style, "text-position"); - QString value; - QString relativetextsize; + TQString text_position = m_styleStack.attributeNS( ooNS::style, "text-position"); + TQString value; + TQString relativetextsize; OoUtils::importTextPosition( text_position, value, relativetextsize ); text.setAttribute( "VERTALIGN", value ); if ( !relativetextsize.isEmpty() ) @@ -1857,7 +1857,7 @@ void OoImpressImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& if ( m_styleStack.hasAttributeNS( ooNS::style, "text-crossing-out")// 3.10.6 && m_styleStack.attributeNS( ooNS::style, "text-crossing-out") != "none") { - QString strikeOutType = m_styleStack.attributeNS( ooNS::style, "text-crossing-out" ); + TQString strikeOutType = m_styleStack.attributeNS( ooNS::style, "text-crossing-out" ); if ( strikeOutType =="double-line" ) { text.setAttribute( "strikeOut", "double" ); @@ -1881,11 +1881,11 @@ void OoImpressImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& // underlining if ( m_styleStack.hasAttributeNS( ooNS::style, "text-underline" ) ) // 3.10.22 { - QString underline; - QString styleline; + TQString underline; + TQString styleline; OoUtils::importUnderline( m_styleStack.attributeNS( ooNS::style, "text-underline" ), underline, styleline ); - QString underLineColor = m_styleStack.attributeNS( ooNS::style, "text-underline-color" );// 3.10.23 + TQString underLineColor = m_styleStack.attributeNS( ooNS::style, "text-underline-color" );// 3.10.23 text.setAttribute( "value", underline ); text.setAttribute( "styleline", styleline ); @@ -1900,7 +1900,7 @@ void OoImpressImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& if ( m_styleStack.hasAttributeNS( ooNS::fo, "font-variant" ) // 3.10.1 || m_styleStack.hasAttributeNS( ooNS::fo, "text-transform" ) ) // 3.10.2 { - QDomElement fontAttrib( doc.createElement( "FONTATTRIBUTE" ) ); + TQDomElement fontAttrib( doc.createElement( "FONTATTRIBUTE" ) ); bool smallCaps = m_styleStack.attributeNS( ooNS::fo, "font-variant" ) == "small-caps"; if ( smallCaps ) { @@ -1916,7 +1916,7 @@ void OoImpressImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& // background color (property of the paragraph in OOo, of the text in kword/kpresenter) if (m_styleStack.hasAttributeNS( ooNS::fo, "background-color" )) { - QString bgColor = m_styleStack.attributeNS( ooNS::fo, "background-color"); + TQString bgColor = m_styleStack.attributeNS( ooNS::fo, "background-color"); if (bgColor != "transparent") text.setAttribute("textbackcolor", bgColor); } @@ -1926,13 +1926,13 @@ void OoImpressImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& } // for each text span } -void OoImpressImport::createStyleMap( QDomDocument &docstyles ) +void OoImpressImport::createStyleMap( TQDomDocument &docstyles ) { - QDomElement styles = docstyles.documentElement(); + TQDomElement styles = docstyles.documentElement(); if ( styles.isNull() ) return; - QDomNode fixedStyles = KoDom::namedItemNS( styles, ooNS::office, "styles" ); + TQDomNode fixedStyles = KoDom::namedItemNS( styles, ooNS::office, "styles" ); if ( !fixedStyles.isNull() ) { insertDraws( fixedStyles.toElement() ); @@ -1940,148 +1940,148 @@ void OoImpressImport::createStyleMap( QDomDocument &docstyles ) insertStylesPresentation( fixedStyles.toElement() ); } - QDomNode automaticStyles = KoDom::namedItemNS( styles, ooNS::office, "automatic-styles" ); + TQDomNode automaticStyles = KoDom::namedItemNS( styles, ooNS::office, "automatic-styles" ); if ( !automaticStyles.isNull() ) { insertStyles( automaticStyles.toElement() ); insertStylesPresentation( automaticStyles.toElement() ); } - QDomNode masterStyles = KoDom::namedItemNS( styles, ooNS::office, "master-styles" ); + TQDomNode masterStyles = KoDom::namedItemNS( styles, ooNS::office, "master-styles" ); if ( !masterStyles.isNull() ) insertStyles( masterStyles.toElement() ); } -void OoImpressImport::insertDraws( const QDomElement& styles ) +void OoImpressImport::insertDraws( const TQDomElement& styles ) { - QDomElement e; + TQDomElement e; forEachElement( e, styles ) { if ( !e.hasAttributeNS( ooNS::draw, "name" ) ) continue; - QString name = e.attributeNS( ooNS::draw, "name", QString::null ); - m_draws.insert( name, new QDomElement( e ) ); + TQString name = e.attributeNS( ooNS::draw, "name", TQString() ); + m_draws.insert( name, new TQDomElement( e ) ); } } -void OoImpressImport::insertStyles( const QDomElement& styles ) +void OoImpressImport::insertStyles( const TQDomElement& styles ) { - QDomElement e; + TQDomElement e; forEachElement( e, styles ) { - const QString localName = e.localName(); - const QString ns = e.namespaceURI(); + const TQString localName = e.localName(); + const TQString ns = e.namespaceURI(); if ( !e.hasAttributeNS( ooNS::style, "name" ) ) continue; - const QString name = e.attributeNS( ooNS::style, "name", QString::null ); + const TQString name = e.attributeNS( ooNS::style, "name", TQString() ); if ( localName == "list-style" && ns == ooNS::text ) { - QDomElement* ep = new QDomElement( e ); + TQDomElement* ep = new TQDomElement( e ); m_listStyles.insert( name, ep ); kdDebug(30518) << "List style: '" << name << "' loaded " << endl; } else { - m_styles.insert( name, new QDomElement( e ) ); + m_styles.insert( name, new TQDomElement( e ) ); kdDebug(30518) << "Style: '" << name << "' loaded " << endl; } } } -void OoImpressImport::insertStylesPresentation( const QDomElement& styles ) +void OoImpressImport::insertStylesPresentation( const TQDomElement& styles ) { - QDomElement e; + TQDomElement e; forEachElement( e, styles ) { if ( !e.hasAttributeNS( ooNS::style, "name" ) ) continue; - QString name = e.attributeNS( ooNS::style, "name", QString::null ); - m_stylesPresentation.insert( name, new QDomElement( e ) ); + TQString name = e.attributeNS( ooNS::style, "name", TQString() ); + m_stylesPresentation.insert( name, new TQDomElement( e ) ); //kdDebug(30518) << "Style: '" << name << "' loaded " << endl; } } -void OoImpressImport::fillStyleStack( const QDomElement& object, bool sticky ) +void OoImpressImport::fillStyleStack( const TQDomElement& object, bool sticky ) { // find all styles associated with an object and push them on the stack if ( object.hasAttributeNS( ooNS::presentation, "style-name" ) ) { - kdDebug(30518)<<" presentation:style-name **************************** :"<<object.attributeNS( ooNS::presentation, "style-name", QString::null )<<endl; + kdDebug(30518)<<" presentation:style-name **************************** :"<<object.attributeNS( ooNS::presentation, "style-name", TQString() )<<endl; if ( sticky ) - addStyles( m_stylesPresentation[object.attributeNS( ooNS::presentation, "style-name", QString::null )] ); + addStyles( m_stylesPresentation[object.attributeNS( ooNS::presentation, "style-name", TQString() )] ); else - addStyles( m_styles[object.attributeNS( ooNS::presentation, "style-name", QString::null )] ); + addStyles( m_styles[object.attributeNS( ooNS::presentation, "style-name", TQString() )] ); } if ( object.hasAttributeNS( ooNS::draw, "style-name" ) ) - addStyles( m_styles[object.attributeNS( ooNS::draw, "style-name", QString::null )] ); + addStyles( m_styles[object.attributeNS( ooNS::draw, "style-name", TQString() )] ); if ( object.hasAttributeNS( ooNS::draw, "text-style-name" ) ) - addStyles( m_styles[object.attributeNS( ooNS::draw, "text-style-name", QString::null )] ); + addStyles( m_styles[object.attributeNS( ooNS::draw, "text-style-name", TQString() )] ); if ( object.hasAttributeNS( ooNS::text, "style-name" ) ) { - QString styleName = object.attributeNS( ooNS::text, "style-name", QString::null ); + TQString styleName = object.attributeNS( ooNS::text, "style-name", TQString() ); //kdDebug(30518) << "adding style " << styleName << endl; addStyles( m_styles[styleName] ); } } -void OoImpressImport::addStyles( const QDomElement* style ) +void OoImpressImport::addStyles( const TQDomElement* style ) { - kdDebug(30518)<<" addStyle :" << style->attributeNS( ooNS::style, "name", QString::null ) <<endl; - // this function is necessary as parent styles can have parents themself - if ( style->hasAttributeNS( ooNS::style, "parent-style-name" ) ) + kdDebug(30518)<<" addStyle :" << style->attributeNS( ooNS::style, "name", TQString() ) <<endl; + // this function is necessary as tqparent styles can have tqparents themself + if ( style->hasAttributeNS( ooNS::style, "tqparent-style-name" ) ) { - //kdDebug(30518)<<"m_styles[style->attribute( style:parent-style-name )] :"<<m_styles[style->attributeNS( ooNS::style, "parent-style-name", QString::null )]<<endl; - addStyles( m_styles[style->attributeNS( ooNS::style, "parent-style-name", QString::null )] ); + //kdDebug(30518)<<"m_styles[style->attribute( style:tqparent-style-name )] :"<<m_styles[style->attributeNS( ooNS::style, "tqparent-style-name", TQString() )]<<endl; + addStyles( m_styles[style->attributeNS( ooNS::style, "tqparent-style-name", TQString() )] ); } - //kdDebug(30518)<<" void OoImpressImport::addStyles( const QDomElement* style ) :"<<style<<endl; + //kdDebug(30518)<<" void OoImpressImport::addStyles( const TQDomElement* style ) :"<<style<<endl; m_styleStack.push( *style ); } -QString OoImpressImport::storeImage( const QDomElement& object ) +TQString OoImpressImport::storeImage( const TQDomElement& object ) { // store the picture - QString url = object.attributeNS( ooNS::xlink, "href", QString::null ).remove( '#' ); + TQString url = object.attributeNS( ooNS::xlink, "href", TQString() ).remove( '#' ); KArchiveFile* file = (KArchiveFile*) m_zip->directory()->entry( url ); - QString extension = url.mid( url.find( '.' ) ); - QString fileName = QString( "picture%1" ).arg( m_numPicture++ ) + extension; + TQString extension = url.mid( url.tqfind( '.' ) ); + TQString fileName = TQString( "picture%1" ).tqarg( m_numPicture++ ) + extension; KoStoreDevice* out = m_chain->storageFile( "pictures/" + fileName, KoStore::Write ); if ( file && out ) { - QByteArray buffer = file->data(); + TQByteArray buffer = file->data(); out->writeBlock( buffer.data(), buffer.size() ); } return fileName; } -QString OoImpressImport::storeSound(const QDomElement & object, QDomElement & p, QDomDocument & doc) +TQString OoImpressImport::storeSound(const TQDomElement & object, TQDomElement & p, TQDomDocument & doc) { - QFileInfo fi(m_chain->inputFile()); // handle relative URLs - QDir::setCurrent(fi.dirPath(true)); - fi.setFile(object.attributeNS( ooNS::xlink, "href", QString::null)); - QString url = fi.absFilePath(); + TQFileInfo fi(m_chain->inputFile()); // handle relative URLs + TQDir::setCurrent(fi.dirPath(true)); + fi.setFile(object.attributeNS( ooNS::xlink, "href", TQString())); + TQString url = fi.absFilePath(); //kdDebug(30518) << "Sound URL: " << url << endl; - QFile file(url); + TQFile file(url); if (!file.exists()) - return QString::null; + return TQString(); - QString extension = url.mid( url.find( '.' ) ); - QString fileName = QString( "sound%1" ).arg( m_numSound++ ) + extension; + TQString extension = url.mid( url.tqfind( '.' ) ); + TQString fileName = TQString( "sound%1" ).tqarg( m_numSound++ ) + extension; fileName = "sounds/" + fileName; KoStoreDevice* out = m_chain->storageFile( fileName, KoStore::Write ); if (out) { if (!file.open(IO_ReadOnly)) - return QString::null; + return TQString(); - QByteArray data(8*1024); + TQByteArray data(8*1024); uint total = 0; for ( int block = 0; ( block = file.readBlock(data.data(), data.size()) ) > 0; @@ -2093,9 +2093,9 @@ QString OoImpressImport::storeSound(const QDomElement & object, QDomElement & p, file.close(); } else - return QString::null; + return TQString(); - QDomElement key = doc.createElement("FILE"); + TQDomElement key = doc.createElement("FILE"); key.setAttribute("name", fileName); key.setAttribute("filename", url); p.appendChild(key); @@ -2103,29 +2103,29 @@ QString OoImpressImport::storeSound(const QDomElement & object, QDomElement & p, return url; } -QDomElement OoImpressImport::saveHelper(const QString &tmpText, QDomDocument &doc) +TQDomElement OoImpressImport::saveHelper(const TQString &tmpText, TQDomDocument &doc) { - QDomElement element=doc.createElement("TEXT"); + TQDomElement element=doc.createElement("TEXT"); if(tmpText.stripWhiteSpace().isEmpty()) // ### careful, this also strips \t and \n .... - // working around a bug in QDom + // working around a bug in TQDom element.setAttribute("whitespace", tmpText.length()); element.appendChild(doc.createTextNode(tmpText)); return element; } -void OoImpressImport::appendPoints(QDomDocument& doc, QDomElement& e, const QDomElement& object) +void OoImpressImport::appendPoints(TQDomDocument& doc, TQDomElement& e, const TQDomElement& object) { - QDomElement ptsElem = doc.createElement("POINTS"); + TQDomElement ptsElem = doc.createElement("POINTS"); - QStringList ptList = QStringList::split(' ', object.attributeNS( ooNS::draw, "points", QString::null)); + TQStringList ptList = TQStringList::split(' ', object.attributeNS( ooNS::draw, "points", TQString())); - QString pt_x, pt_y; + TQString pt_x, pt_y; double tmp_x, tmp_y; - for (QStringList::Iterator it = ptList.begin(); it != ptList.end(); ++it) + for (TQStringList::Iterator it = ptList.begin(); it != ptList.end(); ++it) { - QDomElement point = doc.createElement("Point"); + TQDomElement point = doc.createElement("Point"); tmp_x = (*it).section(',',0,0).toInt() / 100; tmp_y = (*it).section(',',1,1).toInt() / 100; @@ -2144,37 +2144,37 @@ void OoImpressImport::appendPoints(QDomDocument& doc, QDomElement& e, const QDom e.appendChild(ptsElem); } -void OoImpressImport::appendField(QDomDocument& doc, QDomElement& e, const QDomElement& object, uint pos) +void OoImpressImport::appendField(TQDomDocument& doc, TQDomElement& e, const TQDomElement& object, uint pos) { - const QString tag = object.localName(); - const QString ns = object.namespaceURI(); + const TQString tag = object.localName(); + const TQString ns = object.namespaceURI(); const bool isTextNS = ns == ooNS::text; - QDomElement custom = doc.createElement("CUSTOM"); + TQDomElement custom = doc.createElement("CUSTOM"); custom.setAttribute("pos", pos); - QDomElement variable = doc.createElement("VARIABLE"); + TQDomElement variable = doc.createElement("VARIABLE"); if (isTextNS && tag == "date") { - QDateTime dt(QDate::fromString(object.attributeNS( ooNS::text, "date-value", QString::null), Qt::ISODate)); + TQDateTime dt(TQDate::fromString(object.attributeNS( ooNS::text, "date-value", TQString()), Qt::ISODate)); - bool fixed = (object.hasAttributeNS( ooNS::text, "fixed") && object.attributeNS( ooNS::text, "fixed", QString::null)=="true"); + bool fixed = (object.hasAttributeNS( ooNS::text, "fixed") && object.attributeNS( ooNS::text, "fixed", TQString())=="true"); if (!dt.isValid()) { - dt = QDateTime::currentDateTime(); // OOo docs say so :) + dt = TQDateTime::tqcurrentDateTime(); // OOo docs say so :) fixed = false; } - QDomElement typeElem = doc.createElement("TYPE"); + TQDomElement typeElem = doc.createElement("TYPE"); typeElem.setAttribute("key", "DATE0locale"); // ### find out the correlation between KOffice and OOo date/time types typeElem.setAttribute("type", 0); // VT_DATE typeElem.setAttribute("text", object.text()); variable.appendChild(typeElem); - const QDate date(dt.date()); - const QTime time(dt.time()); - QDomElement dateElement = doc.createElement("DATE"); + const TQDate date(dt.date()); + const TQTime time(dt.time()); + TQDomElement dateElement = doc.createElement("DATE"); dateElement.setAttribute("subtype", fixed ? 0 : 1); // VST_DATE_FIX, VST_DATE_CURRENT dateElement.setAttribute("fix", fixed ? 1 : 0); dateElement.setAttribute("day", date.day()); @@ -2184,57 +2184,57 @@ void OoImpressImport::appendField(QDomDocument& doc, QDomElement& e, const QDomE dateElement.setAttribute("minute", time.minute()); dateElement.setAttribute("second", time.second()); if (object.hasAttributeNS( ooNS::text, "date-adjust")) - dateElement.setAttribute("correct", object.attributeNS( ooNS::text, "date-adjust", QString::null)); + dateElement.setAttribute("correct", object.attributeNS( ooNS::text, "date-adjust", TQString())); variable.appendChild(dateElement); } else if (isTextNS && tag == "time") { - // Use QDateTime to work around a possible problem of QTime::FromString in Qt 3.2.2 - QDateTime dt(QDateTime::fromString(object.attributeNS( ooNS::text, "time-value", QString::null), Qt::ISODate)); + // Use TQDateTime to work around a possible problem of TQTime::FromString in TQt 3.2.2 + TQDateTime dt(TQDateTime::fromString(object.attributeNS( ooNS::text, "time-value", TQString()), Qt::ISODate)); - bool fixed = (object.hasAttributeNS( ooNS::text, "fixed") && object.attributeNS( ooNS::text, "fixed", QString::null)=="true"); + bool fixed = (object.hasAttributeNS( ooNS::text, "fixed") && object.attributeNS( ooNS::text, "fixed", TQString())=="true"); if (!dt.isValid()) { - dt = QDateTime::currentDateTime(); // OOo docs say so :) + dt = TQDateTime::tqcurrentDateTime(); // OOo docs say so :) fixed = false; } - QDomElement typeElem = doc.createElement("TYPE"); + TQDomElement typeElem = doc.createElement("TYPE"); typeElem.setAttribute("key", "TIMElocale"); // ### find out the correlation between KOffice and OOo date/time types typeElem.setAttribute("type", 2); // VT_TIME typeElem.setAttribute("text", object.text()); variable.appendChild(typeElem); - const QTime time(dt.time()); - QDomElement timeElement = doc.createElement("TIME"); + const TQTime time(dt.time()); + TQDomElement timeElement = doc.createElement("TIME"); timeElement.setAttribute("subtype", fixed ? 0 : 1); // VST_TIME_FIX, VST_TIME_CURRENT timeElement.setAttribute("fix", fixed ? 1 : 0); timeElement.setAttribute("hour", time.hour()); timeElement.setAttribute("minute", time.minute()); timeElement.setAttribute("second", time.second()); /*if (object.hasAttributeNS( ooNS::text, "time-adjust")) - timeElem.setAttribute("correct", object.attributeNS( ooNS::text, "time-adjust", QString::null));*/ // ### TODO + timeElem.setAttribute("correct", object.attributeNS( ooNS::text, "time-adjust", TQString()));*/ // ### TODO variable.appendChild(timeElement); } else if (isTextNS && tag == "page-number") { - QDomElement typeElem = doc.createElement("TYPE"); + TQDomElement typeElem = doc.createElement("TYPE"); typeElem.setAttribute("key", "NUMBER"); typeElem.setAttribute("type", 4); // VT_PGNUM typeElem.setAttribute("text", object.text()); variable.appendChild(typeElem); - QDomElement pgNumElem = doc.createElement("PGNUM"); + TQDomElement pgNumElem = doc.createElement("PGNUM"); int subtype = 0; // VST_PGNUM_CURRENT if (object.hasAttributeNS( ooNS::text, "select-page")) { - const QString select = object.attributeNS( ooNS::text, "select-page", QString::null); + const TQString select = object.attributeNS( ooNS::text, "select-page", TQString()); if (select == "previous") subtype = 3; // VST_PGNUM_PREVIOUS @@ -2251,7 +2251,7 @@ void OoImpressImport::appendField(QDomDocument& doc, QDomElement& e, const QDomE } else if (isTextNS && tag == "file-name") { - QDomElement typeElem = doc.createElement("TYPE"); + TQDomElement typeElem = doc.createElement("TYPE"); typeElem.setAttribute("key", "STRING"); typeElem.setAttribute("type", 8); // VT_FIELD typeElem.setAttribute("text", object.text()); @@ -2262,7 +2262,7 @@ void OoImpressImport::appendField(QDomDocument& doc, QDomElement& e, const QDomE if (object.hasAttributeNS( ooNS::text, "display")) { - const QString display = object.attributeNS( ooNS::text, "display", QString::null); + const TQString display = object.attributeNS( ooNS::text, "display", TQString()); if (display == "path") subtype = 1; // VST_DIRECTORYNAME @@ -2274,7 +2274,7 @@ void OoImpressImport::appendField(QDomDocument& doc, QDomElement& e, const QDomE subtype = 5; // VST_PATHFILENAME } - QDomElement fileNameElem = doc.createElement("FIELD"); + TQDomElement fileNameElem = doc.createElement("FIELD"); fileNameElem.setAttribute("subtype", subtype); fileNameElem.setAttribute("value", object.text()); @@ -2283,7 +2283,7 @@ void OoImpressImport::appendField(QDomDocument& doc, QDomElement& e, const QDomE else if (isTextNS && tag == "author-name" || isTextNS && tag == "author-initials") { - QDomElement typeElem = doc.createElement("TYPE"); + TQDomElement typeElem = doc.createElement("TYPE"); typeElem.setAttribute("key", "STRING"); typeElem.setAttribute("type", 8); // VT_FIELD typeElem.setAttribute("text", object.text()); @@ -2295,7 +2295,7 @@ void OoImpressImport::appendField(QDomDocument& doc, QDomElement& e, const QDomE if (isTextNS && tag == "author-initials") subtype = 16; // VST_INITIAL - QDomElement authorElem = doc.createElement("FIELD"); + TQDomElement authorElem = doc.createElement("FIELD"); authorElem.setAttribute("subtype", subtype); authorElem.setAttribute("value", object.text()); @@ -2306,20 +2306,20 @@ void OoImpressImport::appendField(QDomDocument& doc, QDomElement& e, const QDomE e.appendChild(custom); } -void OoImpressImport::createPresentationAnimation(const QDomElement& element) +void OoImpressImport::createPresentationAnimation(const TQDomElement& element) { int order = 0; - QDomElement e; + TQDomElement e; forEachElement( e, element ) { - const QString localName = e.localName(); - const QString ns = e.namespaceURI(); - if ( ns == ooNS::presentation && localName == "show-shape" && e.hasAttributeNS( ooNS::draw, "shape-id" ) ) + const TQString localName = e.localName(); + const TQString ns = e.namespaceURI(); + if ( ns == ooNS::presentation && localName == "show-tqshape" && e.hasAttributeNS( ooNS::draw, "tqshape-id" ) ) { - QString name = e.attributeNS( ooNS::draw, "shape-id", QString::null ); + TQString name = e.attributeNS( ooNS::draw, "tqshape-id", TQString() ); //kdDebug(30518)<<" insert animation style : name :"<<name<<endl; animationList *lst = new animationList; - QDomElement* ep = new QDomElement( e ); + TQDomElement* ep = new TQDomElement( e ); lst->element = ep; lst->order = order; m_animations.insert( name, lst ); @@ -2328,41 +2328,41 @@ void OoImpressImport::createPresentationAnimation(const QDomElement& element) } } -QDomElement OoImpressImport::findAnimationByObjectID(const QString & id, int & order) +TQDomElement OoImpressImport::findAnimationByObjectID(const TQString & id, int & order) { - kdDebug(30518)<<"QDomElement OoImpressImport::findAnimationByObjectID(const QString & id) :"<<id<<endl; + kdDebug(30518)<<"TQDomElement OoImpressImport::findAnimationByObjectID(const TQString & id) :"<<id<<endl; if (m_animations.isEmpty() ) - return QDomElement(); + return TQDomElement(); animationList *animation = m_animations[id]; - //kdDebug(30518)<<"QDomElement *animation = m_animations[id]; :"<<animation<<endl; + //kdDebug(30518)<<"TQDomElement *animation = m_animations[id]; :"<<animation<<endl; if ( !animation ) - return QDomElement(); - for (QDomNode node = *( animation->element ); !node.isNull(); node = node.nextSibling()) + return TQDomElement(); + for (TQDomNode node = *( animation->element ); !node.isNull(); node = node.nextSibling()) { - QDomElement e = node.toElement(); + TQDomElement e = node.toElement(); order = animation->order; - kdDebug(30518)<<"e.tagName() :"<<e.tagName()<<" e.attribute(draw:shape-id) :"<<e.attributeNS( ooNS::draw, "shape-id", QString::null)<<endl; - if (e.tagName()=="presentation:show-shape" && e.attributeNS( ooNS::draw, "shape-id", QString::null)==id) + kdDebug(30518)<<"e.tagName() :"<<e.tagName()<<" e.attribute(draw:tqshape-id) :"<<e.attributeNS( ooNS::draw, "tqshape-id", TQString())<<endl; + if (e.tagName()=="presentation:show-tqshape" && e.attributeNS( ooNS::draw, "tqshape-id", TQString())==id) return e; } - return QDomElement(); + return TQDomElement(); } -void OoImpressImport::appendObjectEffect(QDomDocument& doc, QDomElement& e, const QDomElement& object, - QDomElement& sound) +void OoImpressImport::appendObjectEffect(TQDomDocument& doc, TQDomElement& e, const TQDomElement& object, + TQDomElement& sound) { int order = 0; - QDomElement origEffect = findAnimationByObjectID(object.attributeNS( ooNS::draw, "id", QString::null), order).toElement(); + TQDomElement origEffect = findAnimationByObjectID(object.attributeNS( ooNS::draw, "id", TQString()), order).toElement(); if (origEffect.isNull()) return; - QString effect = origEffect.attributeNS( ooNS::presentation, "effect", QString::null); - QString dir = origEffect.attributeNS( ooNS::presentation, "direction", QString::null); - QString speed = origEffect.attributeNS( ooNS::presentation, "speed", QString::null); + TQString effect = origEffect.attributeNS( ooNS::presentation, "effect", TQString()); + TQString dir = origEffect.attributeNS( ooNS::presentation, "direction", TQString()); + TQString speed = origEffect.attributeNS( ooNS::presentation, "speed", TQString()); kdDebug(30518)<<"speed :"<<speed<<endl; //todo implement speed value. @@ -2405,23 +2405,23 @@ void OoImpressImport::appendObjectEffect(QDomDocument& doc, QDomElement& e, cons else return; // sorry, no more supported effects :( - QDomElement effElem = doc.createElement("EFFECTS"); + TQDomElement effElem = doc.createElement("EFFECTS"); effElem.setAttribute("effect", effVal); e.appendChild(effElem); - QDomElement presNum = doc.createElement( "PRESNUM" ); + TQDomElement presNum = doc.createElement( "PRESNUM" ); presNum.setAttribute("value", order); e.appendChild( presNum ); // sound effect - QDomElement origSoundEff = KoDom::namedItemNS( origEffect, ooNS::presentation, "sound"); + TQDomElement origSoundEff = KoDom::namedItemNS( origEffect, ooNS::presentation, "sound"); if (!origSoundEff.isNull()) { - QString soundUrl = storeSound(origSoundEff, sound, doc); + TQString soundUrl = storeSound(origSoundEff, sound, doc); if (!soundUrl.isNull()) { - QDomElement pseElem = doc.createElement("APPEARSOUNDEFFECT"); + TQDomElement pseElem = doc.createElement("APPEARSOUNDEFFECT"); pseElem.setAttribute("appearSoundEffect", 1); pseElem.setAttribute("appearSoundFileName", soundUrl); diff --git a/filters/kpresenter/ooimpress/ooimpressimport.h b/filters/kpresenter/ooimpress/ooimpressimport.h index 403daf98..26d49420 100644 --- a/filters/kpresenter/ooimpress/ooimpressimport.h +++ b/filters/kpresenter/ooimpress/ooimpressimport.h @@ -24,9 +24,9 @@ #include <KoFilter.h> #include <KoStore.h> -#include <qdom.h> -#include <qdict.h> -#include <qcolor.h> +#include <tqdom.h> +#include <tqdict.h> +#include <tqcolor.h> #include <KoStyleStack.h> #include <liststylestack.h> @@ -34,83 +34,84 @@ class KZip; struct animationList { - QDomElement *element; + TQDomElement *element; int order; }; class OoImpressImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - OoImpressImport( KoFilter * parent, const char * name, const QStringList & ); + OoImpressImport( KoFilter * tqparent, const char * name, const TQStringList & ); virtual ~OoImpressImport(); - virtual KoFilter::ConversionStatus convert( QCString const & from, QCString const & to ); + virtual KoFilter::ConversiontqStatus convert( TQCString const & from, TQCString const & to ); private: - void createDocumentInfo( QDomDocument &docinfo ); - void createDocumentContent( QDomDocument &doccontent ); - void createStyleMap( QDomDocument &docstyles ); - void insertDraws( const QDomElement& styles ); - void insertStyles( const QDomElement& styles ); - void insertStylesPresentation( const QDomElement& styles ); - - void fillStyleStack( const QDomElement& object,bool sticky = false ); - void addStyles( const QDomElement* style ); - void appendName(QDomDocument& doc, QDomElement& e, const QDomElement& object); - void append2DGeometry( QDomDocument& doc, QDomElement& e, const QDomElement& object, int offset ); - bool appendLineGeometry( QDomDocument& doc, QDomElement& e, const QDomElement& object, int offset ); - void appendPoints(QDomDocument& doc, QDomElement& e, const QDomElement& object); - void appendPie( QDomDocument& doc, QDomElement& e, const QDomElement& object ); - void appendImage( QDomDocument& doc, QDomElement& e, QDomElement& p, const QDomElement& object ); - void appendBackgroundImage( QDomDocument& doc, QDomElement& e, QDomElement& p, const QDomElement& object ); - void appendBackgroundGradient( QDomDocument& doc, QDomElement& e, const QDomElement& object ); - void appendRounding( QDomDocument& doc, QDomElement& e, const QDomElement& object ); - void appendPen( QDomDocument& doc, QDomElement& e ); - void appendBrush( QDomDocument& doc, QDomElement& e ); - void appendShadow( QDomDocument& doc, QDomElement& e ); - void appendLineEnds( QDomDocument& doc, QDomElement& e, bool _orderEndStartLine = true ); - void appendTextObjectMargin( QDomDocument& doc, QDomElement& e ); - void appendField(QDomDocument& doc, QDomElement& e, const QDomElement& object, uint pos); - void createPresentationAnimation(const QDomElement& element); - QDomElement findAnimationByObjectID(const QString & id, int & order); - - void appendObjectEffect(QDomDocument& doc, QDomElement& e, const QDomElement& object, QDomElement& sound); - void appendBackgroundPage( QDomDocument &doc, QDomElement &e,QDomElement & pictureElement, QDomElement &soundElement ); - - QDomElement saveHelper(const QString &tmpText, QDomDocument &doc); - void appendObject(QDomNode & drawPage, QDomDocument & doc, QDomElement & soundElement, QDomElement & pictureElement, QDomElement & pageNoteElement, QDomElement &objectElement,double offset, bool sticky = false); - - QString storeImage( const QDomElement& object ); - QString storeSound(const QDomElement & object, QDomElement & p, QDomDocument & doc); - QDomElement parseTextBox( QDomDocument& doc, const QDomElement& textBox ); - bool pushListLevelStyle( const QString& listStyleName, int level ); - bool pushListLevelStyle( const QString& listStyleName, QDomElement& fullListStyle, int level ); - void applyListStyle( QDomElement& paragraph ); - void parseList( QDomDocument& doc, QDomElement& textObjectElement, const QDomElement& list ); - void parseParagraphs( QDomDocument& doc, QDomElement& textObjectElement, const QDomElement& textBox ); - QDomElement parseParagraph( QDomDocument& doc, const QDomElement& paragraph ); - void parseSpanOrSimilar( QDomDocument& doc, const QDomElement& parent, - QDomElement& outputParagraph, uint& pos); - bool parseSettings( QDomDocument &doc, QDomElement &helpLineElement, QDomElement &attributeElement ); - void parseHelpLine( QDomDocument &doc,QDomElement &helpLineElement, const QString &text ); - - KoFilter::ConversionStatus openFile(); - KoFilter::ConversionStatus loadAndParse(const QString& filename, QDomDocument& doc); + void createDocumentInfo( TQDomDocument &docinfo ); + void createDocumentContent( TQDomDocument &doccontent ); + void createStyleMap( TQDomDocument &docstyles ); + void insertDraws( const TQDomElement& styles ); + void insertStyles( const TQDomElement& styles ); + void insertStylesPresentation( const TQDomElement& styles ); + + void fillStyleStack( const TQDomElement& object,bool sticky = false ); + void addStyles( const TQDomElement* style ); + void appendName(TQDomDocument& doc, TQDomElement& e, const TQDomElement& object); + void append2DGeometry( TQDomDocument& doc, TQDomElement& e, const TQDomElement& object, int offset ); + bool appendLineGeometry( TQDomDocument& doc, TQDomElement& e, const TQDomElement& object, int offset ); + void appendPoints(TQDomDocument& doc, TQDomElement& e, const TQDomElement& object); + void appendPie( TQDomDocument& doc, TQDomElement& e, const TQDomElement& object ); + void appendImage( TQDomDocument& doc, TQDomElement& e, TQDomElement& p, const TQDomElement& object ); + void appendBackgroundImage( TQDomDocument& doc, TQDomElement& e, TQDomElement& p, const TQDomElement& object ); + void appendBackgroundGradient( TQDomDocument& doc, TQDomElement& e, const TQDomElement& object ); + void appendRounding( TQDomDocument& doc, TQDomElement& e, const TQDomElement& object ); + void appendPen( TQDomDocument& doc, TQDomElement& e ); + void appendBrush( TQDomDocument& doc, TQDomElement& e ); + void appendShadow( TQDomDocument& doc, TQDomElement& e ); + void appendLineEnds( TQDomDocument& doc, TQDomElement& e, bool _orderEndStartLine = true ); + void appendTextObjectMargin( TQDomDocument& doc, TQDomElement& e ); + void appendField(TQDomDocument& doc, TQDomElement& e, const TQDomElement& object, uint pos); + void createPresentationAnimation(const TQDomElement& element); + TQDomElement findAnimationByObjectID(const TQString & id, int & order); + + void appendObjectEffect(TQDomDocument& doc, TQDomElement& e, const TQDomElement& object, TQDomElement& sound); + void appendBackgroundPage( TQDomDocument &doc, TQDomElement &e,TQDomElement & pictureElement, TQDomElement &soundElement ); + + TQDomElement saveHelper(const TQString &tmpText, TQDomDocument &doc); + void appendObject(TQDomNode & drawPage, TQDomDocument & doc, TQDomElement & soundElement, TQDomElement & pictureElement, TQDomElement & pageNoteElement, TQDomElement &objectElement,double offset, bool sticky = false); + + TQString storeImage( const TQDomElement& object ); + TQString storeSound(const TQDomElement & object, TQDomElement & p, TQDomDocument & doc); + TQDomElement parseTextBox( TQDomDocument& doc, const TQDomElement& textBox ); + bool pushListLevelStyle( const TQString& listStyleName, int level ); + bool pushListLevelStyle( const TQString& listStyleName, TQDomElement& fullListStyle, int level ); + void applyListStyle( TQDomElement& paragraph ); + void parseList( TQDomDocument& doc, TQDomElement& textObjectElement, const TQDomElement& list ); + void parseParagraphs( TQDomDocument& doc, TQDomElement& textObjectElement, const TQDomElement& textBox ); + TQDomElement parseParagraph( TQDomDocument& doc, const TQDomElement& paragraph ); + void parseSpanOrSimilar( TQDomDocument& doc, const TQDomElement& tqparent, + TQDomElement& outputParagraph, uint& pos); + bool parseSettings( TQDomDocument &doc, TQDomElement &helpLineElement, TQDomElement &attributeElement ); + void parseHelpLine( TQDomDocument &doc,TQDomElement &helpLineElement, const TQString &text ); + + KoFilter::ConversiontqStatus openFile(); + KoFilter::ConversiontqStatus loadAndParse(const TQString& filename, TQDomDocument& doc); int m_numPicture; int m_numSound; - QDomDocument m_content; - QDomDocument m_meta; - QDomDocument m_settings; - QDict<QDomElement> m_styles, m_draws, m_stylesPresentation; - QDict<QDomElement> m_listStyles; - QDict<animationList> m_animations; + TQDomDocument m_content; + TQDomDocument m_meta; + TQDomDocument m_settings; + TQDict<TQDomElement> m_styles, m_draws, m_stylesPresentation; + TQDict<TQDomElement> m_listStyles; + TQDict<animationList> m_animations; bool m_insideOrderedList; bool m_nextItemIsListItem; // only the first elem inside list-item is numbered int m_restartNumbering; - QString m_currentListStyleName; + TQString m_currentListStyleName; KZip * m_zip; KoStyleStack m_styleStack; diff --git a/filters/kpresenter/ooimpress/status.html b/filters/kpresenter/ooimpress/status.html index b0062c04..f64a38b0 100644 --- a/filters/kpresenter/ooimpress/status.html +++ b/filters/kpresenter/ooimpress/status.html @@ -61,7 +61,7 @@ - Rounding (for rectangles)<br> - Shadow<br> - Text margins<br> - - Vertical alignment for text<br> + -Qt::Vertical tqalignment for text<br> - Text style (underline, sub/super script, bold, italic, strikeout, background color)<br> - Paragraph style (line spacing, offset before/after paragraph, indent first/right/left, borders)<br> - Presentation settings<br> @@ -168,7 +168,7 @@ - Settings element (snap line drawing)<br> - Export Transparency<br> - Export Group Object<br> - - Vertical alignment for text<br> + -Qt::Vertical tqalignment for text<br> - Text margins<br> - Export title/keyword/subject<br> - Custom Slide Show<br> diff --git a/filters/kpresenter/ooimpress/stylefactory.cc b/filters/kpresenter/ooimpress/stylefactory.cc index 0c7d9a2c..18ce339b 100644 --- a/filters/kpresenter/ooimpress/stylefactory.cc +++ b/filters/kpresenter/ooimpress/stylefactory.cc @@ -19,8 +19,8 @@ #include "stylefactory.h" -#include <qcolor.h> -#include <qdatetime.h> +#include <tqcolor.h> +#include <tqdatetime.h> #include <KoUnit.h> #include <kdebug.h> @@ -55,7 +55,7 @@ StyleFactory::~StyleFactory() { } -void StyleFactory::addOfficeStyles( QDomDocument & doc, QDomElement & styles ) +void StyleFactory::addOfficeStyles( TQDomDocument & doc, TQDomElement & styles ) { StrokeDashStyle * sd; for ( sd = m_strokeDashStyles.first(); sd ; sd = m_strokeDashStyles.next() ) @@ -78,12 +78,12 @@ void StyleFactory::addOfficeStyles( QDomDocument & doc, QDomElement & styles ) gr->toXML( doc, styles ); } -void StyleFactory::addOfficeMaster( QDomDocument & doc, QDomElement & master ) +void StyleFactory::addOfficeMaster( TQDomDocument & doc, TQDomElement & master ) { PageMasterStyle * p; for ( p = m_pageMasterStyles.first(); p ; p = m_pageMasterStyles.next() ) { - QDomElement masterPage = doc.createElement( "style:master-page" ); + TQDomElement masterPage = doc.createElement( "style:master-page" ); masterPage.setAttribute( "style:name", p->style() ); masterPage.setAttribute( "style:page-master-name", p->name() ); masterPage.setAttribute( "draw:style-name", "dp1" ); @@ -91,7 +91,7 @@ void StyleFactory::addOfficeMaster( QDomDocument & doc, QDomElement & master ) } } -void StyleFactory::addOfficeAutomatic( QDomDocument & doc, QDomElement & automatic ) +void StyleFactory::addOfficeAutomatic( TQDomDocument & doc, TQDomElement & automatic ) { PageMasterStyle * p; for ( p = m_pageMasterStyles.first(); p ; p = m_pageMasterStyles.next() ) @@ -100,7 +100,7 @@ void StyleFactory::addOfficeAutomatic( QDomDocument & doc, QDomElement & automat } } -void StyleFactory::addAutomaticStyles( QDomDocument & doc, QDomElement & autoStyles ) +void StyleFactory::addAutomaticStyles( TQDomDocument & doc, TQDomElement & autoStyles ) { ListStyle * l; for ( l = m_listStyles.first(); l ; l = m_listStyles.next() ) @@ -124,7 +124,7 @@ void StyleFactory::addAutomaticStyles( QDomDocument & doc, QDomElement & autoSty pg->toXML( doc, autoStyles ); } -QString StyleFactory::createStrokeDashStyle( int style ) +TQString StyleFactory::createStrokeDashStyle( int style ) { StrokeDashStyle * newStrokeDashStyle, * sd; newStrokeDashStyle = new StrokeDashStyle( style ); @@ -141,7 +141,7 @@ QString StyleFactory::createStrokeDashStyle( int style ) return newStrokeDashStyle->name(); } -QString StyleFactory::createGradientStyle( QDomElement & gradient ) +TQString StyleFactory::createGradientStyle( TQDomElement & gradient ) { GradientStyle * newGradientStyle, * g; newGradientStyle = new GradientStyle( gradient, m_gradientStyles.count() + 1 ); @@ -158,7 +158,7 @@ QString StyleFactory::createGradientStyle( QDomElement & gradient ) return newGradientStyle->name(); } -QString StyleFactory::createMarkerStyle( int style ) +TQString StyleFactory::createMarkerStyle( int style ) { MarkerStyle * newMarkerStyle, * m; newMarkerStyle = new MarkerStyle( style ); @@ -175,7 +175,7 @@ QString StyleFactory::createMarkerStyle( int style ) return newMarkerStyle->name(); } -QString StyleFactory::createHatchStyle( int style, QString & color ) +TQString StyleFactory::createHatchStyle( int style, TQString & color ) { HatchStyle * newHatchStyle, * h; newHatchStyle = new HatchStyle( style, color ); @@ -192,7 +192,7 @@ QString StyleFactory::createHatchStyle( int style, QString & color ) return newHatchStyle->name(); } -QString StyleFactory::createListStyle( QDomElement & e ) +TQString StyleFactory::createListStyle( TQDomElement & e ) { ListStyle * newListStyle, * l; newListStyle = new ListStyle( e, m_listStyles.count() + 1 ); @@ -209,7 +209,7 @@ QString StyleFactory::createListStyle( QDomElement & e ) return newListStyle->name(); } -QString StyleFactory::createPageStyle( QDomElement & e ) +TQString StyleFactory::createPageStyle( TQDomElement & e ) { PageStyle * newPageStyle, * p; newPageStyle = new PageStyle( this, e, m_pageStyles.count() + 1 ); @@ -226,7 +226,7 @@ QString StyleFactory::createPageStyle( QDomElement & e ) return newPageStyle->name(); } -QString StyleFactory::createTextStyle( QDomElement & e ) +TQString StyleFactory::createTextStyle( TQDomElement & e ) { TextStyle * newTextStyle, * t; newTextStyle = new TextStyle( e, m_textStyles.count() + 1 ); @@ -243,7 +243,7 @@ QString StyleFactory::createTextStyle( QDomElement & e ) return newTextStyle->name(); } -QString StyleFactory::createGraphicStyle( QDomElement & e ) +TQString StyleFactory::createGraphicStyle( TQDomElement & e ) { GraphicStyle * newGraphicStyle, * g; newGraphicStyle = new GraphicStyle( this, e, m_graphicStyles.count() ); @@ -260,7 +260,7 @@ QString StyleFactory::createGraphicStyle( QDomElement & e ) return newGraphicStyle->name(); } -QString StyleFactory::createParagraphStyle( QDomElement & e ) +TQString StyleFactory::createParagraphStyle( TQDomElement & e ) { ParagraphStyle * newParagraphStyle, * p; newParagraphStyle = new ParagraphStyle( e, m_paragraphStyles.count() + 1 ); @@ -277,7 +277,7 @@ QString StyleFactory::createParagraphStyle( QDomElement & e ) return newParagraphStyle->name(); } -QString StyleFactory::createPageMasterStyle( QDomElement & e ) +TQString StyleFactory::createPageMasterStyle( TQDomElement & e ) { PageMasterStyle * newPMStyle, * p; newPMStyle = new PageMasterStyle( e, m_pageMasterStyles.count() ); @@ -294,11 +294,11 @@ QString StyleFactory::createPageMasterStyle( QDomElement & e ) return newPMStyle->style(); } -QString StyleFactory::toCM( const QString & point ) +TQString StyleFactory::toCM( const TQString & point ) { double pt = point.toFloat(); double cm = KoUnit::toCM( pt ); - return QString( "%1cm" ).arg ( cm ); + return TQString( "%1cm" ).arg ( cm ); } StrokeDashStyle::StrokeDashStyle( int style ) @@ -340,9 +340,9 @@ StrokeDashStyle::StrokeDashStyle( int style ) } } -void StrokeDashStyle::toXML( QDomDocument & doc, QDomElement & e ) const +void StrokeDashStyle::toXML( TQDomDocument & doc, TQDomElement & e ) const { - QDomElement strokeDash = doc.createElement( "draw:stroke-dash" ); + TQDomElement strokeDash = doc.createElement( "draw:stroke-dash" ); strokeDash.setAttribute( "draw:name", m_name ); if ( !m_style.isNull() ) strokeDash.setAttribute( "draw:style", m_style ); @@ -360,9 +360,9 @@ void StrokeDashStyle::toXML( QDomDocument & doc, QDomElement & e ) const e.appendChild( strokeDash ); } -GradientStyle::GradientStyle( QDomElement & gradient, int index ) +GradientStyle::GradientStyle( TQDomElement & gradient, int index ) { - m_name = QString( "Gradient %1" ).arg( index ); + m_name = TQString( "Gradient %1" ).tqarg( index ); m_start_intensity = "100%"; m_end_intensity = "100%"; m_border = "0%"; @@ -371,10 +371,10 @@ GradientStyle::GradientStyle( QDomElement & gradient, int index ) if ( gradient.nodeName() == "PAGE" ) { // gradient from page background - QDomElement backColor1 = gradient.namedItem( "BACKCOLOR1" ).toElement(); - QDomElement backColor2 = gradient.namedItem( "BACKCOLOR2" ).toElement(); - QDomElement bcType = gradient.namedItem( "BCTYPE" ).toElement(); - QDomElement bGradient = gradient.namedItem( "BGRADIENT" ).toElement(); + TQDomElement backColor1 = gradient.namedItem( "BACKCOLOR1" ).toElement(); + TQDomElement backColor2 = gradient.namedItem( "BACKCOLOR2" ).toElement(); + TQDomElement bcType = gradient.namedItem( "BCTYPE" ).toElement(); + TQDomElement bGradient = gradient.namedItem( "BGRADIENT" ).toElement(); if ( !backColor1.isNull() ) m_start_color = backColor1.attribute( "color" ); @@ -393,8 +393,8 @@ GradientStyle::GradientStyle( QDomElement & gradient, int index ) { int cx = bGradient.attribute( "xfactor" ).toInt(); int cy = bGradient.attribute( "yfactor" ).toInt(); - m_cx = QString( "%1%" ).arg( cx / 4 + 50 ); - m_cy = QString( "%1%" ).arg( cy / 4 + 50 ); + m_cx = TQString( "%1%" ).tqarg( cx / 4 + 50 ); + m_cy = TQString( "%1%" ).tqarg( cy / 4 + 50 ); } } @@ -419,8 +419,8 @@ GradientStyle::GradientStyle( QDomElement & gradient, int index ) { int cx = gradient.attribute( "xfactor" ).toInt(); int cy = gradient.attribute( "yfactor" ).toInt(); - m_cx = QString( "%1%" ).arg( cx / 4 + 50 ); - m_cy = QString( "%1%" ).arg( cy / 4 + 50 ); + m_cx = TQString( "%1%" ).tqarg( cx / 4 + 50 ); + m_cy = TQString( "%1%" ).tqarg( cy / 4 + 50 ); } } @@ -459,9 +459,9 @@ GradientStyle::GradientStyle( QDomElement & gradient, int index ) } } -void GradientStyle::toXML( QDomDocument & doc, QDomElement & e ) const +void GradientStyle::toXML( TQDomDocument & doc, TQDomElement & e ) const { - QDomElement gradient = doc.createElement( "draw:gradient" ); + TQDomElement gradient = doc.createElement( "draw:gradient" ); gradient.setAttribute( "draw:name", m_name ); if ( !m_style.isNull() ) gradient.setAttribute( "draw:style", m_style ); @@ -527,9 +527,9 @@ MarkerStyle::MarkerStyle( int style ) } } -void MarkerStyle::toXML( QDomDocument & doc, QDomElement & e ) const +void MarkerStyle::toXML( TQDomDocument & doc, TQDomElement & e ) const { - QDomElement marker = doc.createElement( "draw:marker" ); + TQDomElement marker = doc.createElement( "draw:marker" ); marker.setAttribute( "draw:name", m_name ); if ( !m_viewBox.isNull() ) marker.setAttribute( "svg:viewBox", m_viewBox ); @@ -539,7 +539,7 @@ void MarkerStyle::toXML( QDomDocument & doc, QDomElement & e ) const e.appendChild( marker ); } -HatchStyle::HatchStyle( int style, QString & color ) +HatchStyle::HatchStyle( int style, TQString & color ) { m_color = color; @@ -584,9 +584,9 @@ HatchStyle::HatchStyle( int style, QString & color ) } } -void HatchStyle::toXML( QDomDocument & doc, QDomElement & e ) const +void HatchStyle::toXML( TQDomDocument & doc, TQDomElement & e ) const { - QDomElement hatch = doc.createElement( "draw:hatch" ); + TQDomElement hatch = doc.createElement( "draw:hatch" ); hatch.setAttribute( "draw:name", m_name ); if ( !m_style.isNull() ) hatch.setAttribute( "draw:style", m_style ); @@ -600,23 +600,23 @@ void HatchStyle::toXML( QDomDocument & doc, QDomElement & e ) const e.appendChild( hatch ); } -FillImageStyle::FillImageStyle( QString & name ) +FillImageStyle::FillImageStyle( TQString & name ) { } -void FillImageStyle::toXML( QDomDocument & doc, QDomElement & e ) const +void FillImageStyle::toXML( TQDomDocument & doc, TQDomElement & e ) const { } -PageMasterStyle::PageMasterStyle( QDomElement & e, const uint index ) +PageMasterStyle::PageMasterStyle( TQDomElement & e, const uint index ) { - QDomNode borders = e.namedItem( "PAPERBORDERS" ); - QDomElement b = borders.toElement(); + TQDomNode borders = e.namedItem( "PAPERBORDERS" ); + TQDomElement b = borders.toElement(); - m_name = QString( "PM%1" ).arg( index ); - m_style = QString( "Default%1" ).arg( index ); + m_name = TQString( "PM%1" ).tqarg( index ); + m_style = TQString( "Default%1" ).tqarg( index ); m_margin_top = StyleFactory::toCM( b.attribute( "ptTop" ) ); m_margin_bottom = StyleFactory::toCM( b.attribute( "ptBottom" ) ); m_margin_left = StyleFactory::toCM( b.attribute( "ptLeft" ) ); @@ -626,12 +626,12 @@ PageMasterStyle::PageMasterStyle( QDomElement & e, const uint index ) m_orientation = "landscape"; } -void PageMasterStyle::toXML( QDomDocument & doc, QDomElement & e ) const +void PageMasterStyle::toXML( TQDomDocument & doc, TQDomElement & e ) const { - QDomElement style = doc.createElement( "style:page-master" ); + TQDomElement style = doc.createElement( "style:page-master" ); style.setAttribute( "style:name", "PM0" ); - QDomElement properties = doc.createElement( "style:properties" ); + TQDomElement properties = doc.createElement( "style:properties" ); properties.setAttribute( "fo:margin-top", m_margin_top ); properties.setAttribute( "fo:margin-bottom", m_margin_bottom ); properties.setAttribute( "fo:margin-left", m_margin_left ); @@ -655,9 +655,9 @@ bool PageMasterStyle::operator==( const PageMasterStyle & pageMasterStyle ) cons m_orientation == pageMasterStyle.m_orientation ); } -PageStyle::PageStyle( StyleFactory * styleFactory, QDomElement & e, const uint index ) +PageStyle::PageStyle( StyleFactory * styleFactory, TQDomElement & e, const uint index ) { - QDomElement backMaster = e.namedItem( "BACKMASTER" ).toElement(); + TQDomElement backMaster = e.namedItem( "BACKMASTER" ).toElement(); if( !backMaster.isNull()) { int tmp=0; @@ -675,21 +675,21 @@ PageStyle::PageStyle( StyleFactory * styleFactory, QDomElement & e, const uint i m_bg_objects_visible = "true"; } - m_name = QString( "dp%1" ).arg( index ); + m_name = TQString( "dp%1" ).tqarg( index ); // check if this is an empty page tag if ( !e.hasChildNodes() ) return; - QDomElement backType = e.namedItem( "BACKTYPE" ).toElement(); + TQDomElement backType = e.namedItem( "BACKTYPE" ).toElement(); if ( backType.isNull() || backType.attribute( "value" ) == "0" ) { // color - QDomElement bcType = e.namedItem( "BCTYPE" ).toElement(); + TQDomElement bcType = e.namedItem( "BCTYPE" ).toElement(); if ( bcType.isNull() || bcType.attribute( "value" ) == "0" ) { // plain - QDomElement backColor = e.namedItem( "BACKCOLOR1" ).toElement(); + TQDomElement backColor = e.namedItem( "BACKCOLOR1" ).toElement(); m_fill = "solid"; m_fill_color = backColor.attribute( "color" ); } @@ -705,23 +705,23 @@ PageStyle::PageStyle( StyleFactory * styleFactory, QDomElement & e, const uint i // picture } - QDomElement pageDuration = e.namedItem( "PGTIMER" ).toElement(); + TQDomElement pageDuration = e.namedItem( "PGTIMER" ).toElement(); if ( !pageDuration.isNull() ) { - QTime time; + TQTime time; time = time.addSecs( pageDuration.attribute("timer").toInt() ); - QString hours( QString::number( time.hour() ).rightJustify( 2, '0' ) ); - QString ms( QString::number( time.minute() ).rightJustify( 2, '0' ) ); - QString sec( QString::number( time.second() ).rightJustify( 2, '0' ) ); + TQString hours( TQString::number( time.hour() ).rightJustify( 2, '0' ) ); + TQString ms( TQString::number( time.minute() ).rightJustify( 2, '0' ) ); + TQString sec( TQString::number( time.second() ).rightJustify( 2, '0' ) ); //ISO8601 chapter 5.5.3.2 - //QDate doesn't encode it as this format. - m_page_duration = QString( "PT%1H%2M%3S" ).arg( hours ).arg( ms ).arg( sec ); + //TQDate doesn't encode it as this format. + m_page_duration = TQString( "PT%1H%2M%3S" ).tqarg( hours ).tqarg( ms ).tqarg( sec ); } - QDomElement pageEffect = e.namedItem( "PGEFFECT" ).toElement(); + TQDomElement pageEffect = e.namedItem( "PGEFFECT" ).toElement(); if ( !pageEffect.isNull() ) { int tmp=0; @@ -842,13 +842,13 @@ PageStyle::PageStyle( StyleFactory * styleFactory, QDomElement & e, const uint i } } -void PageStyle::toXML( QDomDocument & doc, QDomElement & e ) const +void PageStyle::toXML( TQDomDocument & doc, TQDomElement & e ) const { - QDomElement style = doc.createElement( "style:style" ); + TQDomElement style = doc.createElement( "style:style" ); style.setAttribute( "style:name", m_name ); style.setAttribute( "style:family", "drawing-page" ); - QDomElement properties = doc.createElement( "style:properties" ); + TQDomElement properties = doc.createElement( "style:properties" ); properties.setAttribute( "presentation:background-visible", m_bg_visible ); properties.setAttribute( "presentation:background-objects-visible", m_bg_objects_visible ); @@ -897,13 +897,13 @@ bool PageStyle::operator==( const PageStyle & pageStyle ) const m_page_duration == pageStyle.m_page_duration ); } -TextStyle::TextStyle( QDomElement & e, const uint index ) +TextStyle::TextStyle( TQDomElement & e, const uint index ) { - m_name = QString( "T%1" ).arg( index ); + m_name = TQString( "T%1" ).tqarg( index ); if ( e.hasAttribute( "family" ) ) m_font_family = e.attribute( "family" ); if ( e.hasAttribute( "pointSize" ) ) - m_font_size = QString( "%1pt" ).arg( e.attribute( "pointSize" ) ); + m_font_size = TQString( "%1pt" ).tqarg( e.attribute( "pointSize" ) ); if ( e.hasAttribute( "color" ) ) m_color = e.attribute( "color" ); if ( e.hasAttribute( "bold" ) && e.attribute( "bold" ) == "1" ) @@ -921,8 +921,8 @@ TextStyle::TextStyle( QDomElement & e, const uint index ) } if ( e.hasAttribute( "underline" ) ) { - QString underline = e.attribute( "underline" ); - QString style = e.attribute( "underlinestyleline" ); + TQString underline = e.attribute( "underline" ); + TQString style = e.attribute( "underlinestyleline" ); m_text_underline_color = e.attribute( "underlinecolor" ); if ( style == "solid" ) @@ -948,13 +948,13 @@ TextStyle::TextStyle( QDomElement & e, const uint index ) } } -void TextStyle::toXML( QDomDocument & doc, QDomElement & e ) const +void TextStyle::toXML( TQDomDocument & doc, TQDomElement & e ) const { - QDomElement style = doc.createElement( "style:style" ); + TQDomElement style = doc.createElement( "style:style" ); style.setAttribute( "style:name", m_name ); style.setAttribute( "style:family", "text" ); - QDomElement properties = doc.createElement( "style:properties" ); + TQDomElement properties = doc.createElement( "style:properties" ); if ( !m_font_size.isNull() ) properties.setAttribute( "fo:font-size", m_font_size ); if ( !m_font_family.isNull() ) @@ -997,18 +997,18 @@ bool TextStyle::operator==( const TextStyle & textStyle ) const m_text_crossing_out == textStyle.m_text_crossing_out ); } -GraphicStyle::GraphicStyle( StyleFactory * styleFactory, QDomElement & e, const uint index ) +GraphicStyle::GraphicStyle( StyleFactory * styleFactory, TQDomElement & e, const uint index ) { - QDomNode pen = e.namedItem( "PEN" ); - QDomNode brush = e.namedItem( "BRUSH" ); - QDomNode linebegin = e.namedItem( "LINEBEGIN" ); - QDomNode lineend = e.namedItem( "LINEEND" ); - QDomNode gradient = e.namedItem( "GRADIENT" ); - QDomNode shadow = e.namedItem( "SHADOW" ); - QDomNode textObject = e.namedItem( "TEXTOBJ" ); + TQDomNode pen = e.namedItem( "PEN" ); + TQDomNode brush = e.namedItem( "BRUSH" ); + TQDomNode linebegin = e.namedItem( "LINEBEGIN" ); + TQDomNode lineend = e.namedItem( "LINEEND" ); + TQDomNode gradient = e.namedItem( "GRADIENT" ); + TQDomNode shadow = e.namedItem( "SHADOW" ); + TQDomNode textObject = e.namedItem( "TEXTOBJ" ); if ( !textObject.isNull() ) { - QDomElement textObjectElement = textObject.toElement(); + TQDomElement textObjectElement = textObject.toElement(); if ( textObjectElement.hasAttribute( "verticalAlign" ) ) { m_textAlignment = textObjectElement.attribute("verticalAlign"); @@ -1017,28 +1017,28 @@ GraphicStyle::GraphicStyle( StyleFactory * styleFactory, QDomElement & e, const } if ( textObjectElement.hasAttribute( "bleftpt" ) ) { - m_textMarginLeft = QString( "%1pt" ).arg( textObjectElement.attribute( "bleftpt" ) ); + m_textMarginLeft = TQString( "%1pt" ).tqarg( textObjectElement.attribute( "bleftpt" ) ); } if ( textObjectElement.hasAttribute( "bbottompt" ) ) { - m_textMarginBottom = QString( "%1pt" ).arg( textObjectElement.attribute( "bbottompt" ) ); + m_textMarginBottom = TQString( "%1pt" ).tqarg( textObjectElement.attribute( "bbottompt" ) ); } if ( textObjectElement.hasAttribute( "btoppt" ) ) { - m_textMarginTop = QString( "%1pt" ).arg( textObjectElement.attribute( "btoppt" ) ); + m_textMarginTop = TQString( "%1pt" ).tqarg( textObjectElement.attribute( "btoppt" ) ); } if ( textObjectElement.hasAttribute( "brightpt" ) ) { - m_textMarginRight = QString( "%1pt" ).arg( textObjectElement.attribute( "brightpt" ) ); + m_textMarginRight = TQString( "%1pt" ).tqarg( textObjectElement.attribute( "brightpt" ) ); } } - kdDebug(30518)<<" alignment :"<<m_textAlignment<<endl; + kdDebug(30518)<<" tqalignment :"<<m_textAlignment<<endl; - m_name = QString( "gr%1" ).arg( index ); + m_name = TQString( "gr%1" ).tqarg( index ); if ( !pen.isNull() ) { - QDomElement p = pen.toElement(); + TQDomElement p = pen.toElement(); m_stroke_width = StyleFactory::toCM( p.attribute( "width" ) ); m_stroke_color = p.attribute( "color" ); @@ -1056,7 +1056,7 @@ GraphicStyle::GraphicStyle( StyleFactory * styleFactory, QDomElement & e, const if ( !brush.isNull() ) { - QDomElement b = brush.toElement(); + TQDomElement b = brush.toElement(); m_fill_color = b.attribute( "color" ); int style = b.attribute( "style" ).toInt(); @@ -1087,7 +1087,7 @@ GraphicStyle::GraphicStyle( StyleFactory * styleFactory, QDomElement & e, const } else if ( !gradient.isNull() ) { - QDomElement g = gradient.toElement(); + TQDomElement g = gradient.toElement(); m_fill = "gradient"; m_fill_gradient_name = styleFactory->createGradientStyle( g ); } @@ -1096,7 +1096,7 @@ GraphicStyle::GraphicStyle( StyleFactory * styleFactory, QDomElement & e, const if ( !linebegin.isNull() ) { - QDomElement lb = linebegin.toElement(); + TQDomElement lb = linebegin.toElement(); m_marker_start_width = "0.25cm"; int style = lb.attribute( "value" ).toInt(); @@ -1105,7 +1105,7 @@ GraphicStyle::GraphicStyle( StyleFactory * styleFactory, QDomElement & e, const if ( !lineend.isNull() ) { - QDomElement le = lineend.toElement(); + TQDomElement le = lineend.toElement(); m_marker_end_width = "0.25cm"; int style = le.attribute( "value" ).toInt(); @@ -1114,12 +1114,12 @@ GraphicStyle::GraphicStyle( StyleFactory * styleFactory, QDomElement & e, const if ( !shadow.isNull() ) { - QDomElement s = shadow.toElement(); + TQDomElement s = shadow.toElement(); m_shadow = "visible"; m_shadow_color = s.attribute( "color" ); int direction = s.attribute( "direction" ).toInt(); - QString distance = StyleFactory::toCM( s.attribute( "distance" ) ); + TQString distance = StyleFactory::toCM( s.attribute( "distance" ) ); switch ( direction ) { case 1: @@ -1202,15 +1202,15 @@ GraphicStyle::GraphicStyle( const char * name, } -void GraphicStyle::toXML( QDomDocument & doc, QDomElement & e ) const +void GraphicStyle::toXML( TQDomDocument & doc, TQDomElement & e ) const { - QDomElement style = doc.createElement( "style:style" ); + TQDomElement style = doc.createElement( "style:style" ); style.setAttribute( "style:name", m_name ); style.setAttribute( "style:family", "graphics" ); if ( m_name != "standard" ) - style.setAttribute( "style:parent-style-name", "standard" ); + style.setAttribute( "style:tqparent-style-name", "standard" ); - QDomElement properties = doc.createElement( "style:properties" ); + TQDomElement properties = doc.createElement( "style:properties" ); if ( !m_stroke.isNull() ) properties.setAttribute( "draw:stroke", m_stroke ); if ( !m_stroke_dash.isNull() ) @@ -1335,24 +1335,24 @@ bool GraphicStyle::operator==( const GraphicStyle & graphicStyle ) const m_textMarginRight == graphicStyle.m_textMarginRight); } -ParagraphStyle::ParagraphStyle( QDomElement & e, const uint index ) +ParagraphStyle::ParagraphStyle( TQDomElement & e, const uint index ) { // some defaults that may be overwritten m_margin_left = "0cm"; m_margin_right = "0cm"; m_text_indent = "0cm"; - QDomNode shadow = e.namedItem( "SHADOW" ); - QDomNode indents = e.namedItem( "INDENTS" ); - QDomNode offsets = e.namedItem( "OFFSETS" ); - QDomNode leftBorder = e.namedItem( "LEFTBORDER" ); - QDomNode rightBorder = e.namedItem( "RIGHTBORDER" ); - QDomNode topBorder = e.namedItem( "TOPBORDER" ); - QDomNode bottomBorder = e.namedItem( "BOTTOMBORDER" ); - QDomNode lineSpacing = e.namedItem( "LINESPACING" ); - QDomNode counter = e.namedItem( "COUNTER" ); - - m_name = QString( "P%1" ).arg( index ); + TQDomNode shadow = e.namedItem( "SHADOW" ); + TQDomNode indents = e.namedItem( "INDENTS" ); + TQDomNode offsets = e.namedItem( "OFFSETS" ); + TQDomNode leftBorder = e.namedItem( "LEFTBORDER" ); + TQDomNode rightBorder = e.namedItem( "RIGHTBORDER" ); + TQDomNode topBorder = e.namedItem( "TOPBORDER" ); + TQDomNode bottomBorder = e.namedItem( "BOTTOMBORDER" ); + TQDomNode lineSpacing = e.namedItem( "LINESPACING" ); + TQDomNode counter = e.namedItem( "COUNTER" ); + + m_name = TQString( "P%1" ).tqarg( index ); if ( e.hasAttribute( "align" ) ) { int align = e.attribute( "align" ).toInt(); @@ -1375,14 +1375,14 @@ ParagraphStyle::ParagraphStyle( QDomElement & e, const uint index ) if ( !shadow.isNull() ) { - QDomElement s = shadow.toElement(); - QString distance = QString( "%1pt" ).arg( s.attribute( "distance" ) ); + TQDomElement s = shadow.toElement(); + TQString distance = TQString( "%1pt" ).tqarg( s.attribute( "distance" ) ); m_text_shadow = distance + " " + distance; } if ( !indents.isNull() ) { - QDomElement i = indents.toElement(); + TQDomElement i = indents.toElement(); m_margin_left = StyleFactory::toCM( i.attribute( "left" ) ); m_margin_right = StyleFactory::toCM( i.attribute( "right" ) ); m_text_indent = StyleFactory::toCM( i.attribute( "first" ) ); @@ -1390,7 +1390,7 @@ ParagraphStyle::ParagraphStyle( QDomElement & e, const uint index ) if ( !offsets.isNull() ) { - QDomElement o = offsets.toElement(); + TQDomElement o = offsets.toElement(); m_margin_top = StyleFactory::toCM( o.attribute( "before" ) ); m_margin_bottom = StyleFactory::toCM( o.attribute( "after" ) ); } @@ -1406,8 +1406,8 @@ ParagraphStyle::ParagraphStyle( QDomElement & e, const uint index ) if ( !lineSpacing.isNull() ) { - QDomElement l = lineSpacing.toElement(); - QString type = l.attribute( "type" ); + TQDomElement l = lineSpacing.toElement(); + TQString type = l.attribute( "type" ); if ( type == "single" ) m_line_height = "100%"; @@ -1416,7 +1416,7 @@ ParagraphStyle::ParagraphStyle( QDomElement & e, const uint index ) else if ( type == "double" ) m_line_height = "200%"; else if ( type == "multiple" ) - m_line_height = QString( "%1%" ).arg( l.attribute( "spacingvalue" ).toInt() * 100 ); + m_line_height = TQString( "%1%" ).tqarg( l.attribute( "spacingvalue" ).toInt() * 100 ); else if ( type == "custom" ) m_line_spacing = StyleFactory::toCM( l.attribute( "spacingvalue" ) ); else if ( type == "atleast" ) @@ -1427,13 +1427,13 @@ ParagraphStyle::ParagraphStyle( QDomElement & e, const uint index ) m_enable_numbering = "true"; } -void ParagraphStyle::toXML( QDomDocument & doc, QDomElement & e ) const +void ParagraphStyle::toXML( TQDomDocument & doc, TQDomElement & e ) const { - QDomElement style = doc.createElement( "style:style" ); + TQDomElement style = doc.createElement( "style:style" ); style.setAttribute( "style:name", m_name ); style.setAttribute( "style:family", "paragraph" ); - QDomElement properties = doc.createElement( "style:properties" ); + TQDomElement properties = doc.createElement( "style:properties" ); if ( !m_margin_left.isNull() ) properties.setAttribute( "fo:margin-left", m_margin_left ); if ( !m_margin_right.isNull() ) @@ -1488,32 +1488,32 @@ bool ParagraphStyle::operator==( const ParagraphStyle & paragraphStyle ) const m_line_spacing == paragraphStyle.m_line_spacing ); } -QString ParagraphStyle::parseBorder( QDomElement e ) +TQString ParagraphStyle::parseBorder( TQDomElement e ) { - QString style; + TQString style; int _style = e.attribute( "style" ).toInt(); if ( _style == 5 ) style = "double"; else style = "solid"; - QString width = StyleFactory::toCM( e.attribute( "width" ) ); + TQString width = StyleFactory::toCM( e.attribute( "width" ) ); - QColor color( e.attribute( "red" ).toInt(), + TQColor color( e.attribute( "red" ).toInt(), e.attribute( "green" ).toInt(), e.attribute( "blue" ).toInt() ); - return QString( "%1 %2 %3" ).arg( width ).arg( style ).arg( color.name() ); + return TQString( "%1 %2 %3" ).tqarg( width ).tqarg( style ).tqarg( color.name() ); } -ListStyle::ListStyle( QDomElement & e, const uint index ) +ListStyle::ListStyle( TQDomElement & e, const uint index ) { // setting some default values m_min_label_width = 0.6; m_color = "#000000"; m_font_size = "100%"; - m_name = QString( "L%1" ).arg( index ); + m_name = TQString( "L%1" ).tqarg( index ); if ( e.hasAttribute( "type" ) ) { @@ -1569,14 +1569,14 @@ ListStyle::ListStyle( QDomElement & e, const uint index ) m_font_family = e.attribute( "bulletfont" ); } -void ListStyle::toXML( QDomDocument & doc, QDomElement & e ) const +void ListStyle::toXML( TQDomDocument & doc, TQDomElement & e ) const { - QDomElement style = doc.createElement( "text:list-style" ); + TQDomElement style = doc.createElement( "text:list-style" ); style.setAttribute( "style:name", m_name ); for ( int level = 1; level <= 10; level++ ) { - QDomElement listLevelStyle; + TQDomElement listLevelStyle; if ( m_listLevelStyle == LLS_NUMBER ) { listLevelStyle = doc.createElement( "text:list-level-style-number" ); @@ -1594,13 +1594,13 @@ void ListStyle::toXML( QDomDocument & doc, QDomElement & e ) const listLevelStyle.setAttribute( "text:bullet-char", m_bullet_char ); } - QDomElement properties = doc.createElement( "style:properties" ); + TQDomElement properties = doc.createElement( "style:properties" ); if ( level > 1 ) { properties.setAttribute( "text:min-label-width", - QString( "%1cm" ).arg( m_min_label_width ) ); + TQString( "%1cm" ).tqarg( m_min_label_width ) ); properties.setAttribute( "text:space-before", - QString( "%1cm" ).arg( m_min_label_width * ( level - 1 ) ) ); + TQString( "%1cm" ).tqarg( m_min_label_width * ( level - 1 ) ) ); } if ( !m_color.isNull() ) diff --git a/filters/kpresenter/ooimpress/stylefactory.h b/filters/kpresenter/ooimpress/stylefactory.h index 9de6a548..86ee1089 100644 --- a/filters/kpresenter/ooimpress/stylefactory.h +++ b/filters/kpresenter/ooimpress/stylefactory.h @@ -21,10 +21,10 @@ #ifndef STYLEFACTORY_H #define STYLEFACTORY_H -#include <qptrlist.h> -#include <qstring.h> +#include <tqptrlist.h> +#include <tqstring.h> -#include <qdom.h> +#include <tqdom.h> class StyleFactory; @@ -34,29 +34,29 @@ public: StrokeDashStyle( int style ); ~StrokeDashStyle() {}; - void toXML( QDomDocument & doc, QDomElement & e ) const; - QString name() const { return m_name; }; + void toXML( TQDomDocument & doc, TQDomElement & e ) const; + TQString name() const { return m_name; }; private: StrokeDashStyle() {}; - QString m_name, m_style, m_dots1, m_dots2, m_dots1_length, m_dots2_length, + TQString m_name, m_style, m_dots1, m_dots2, m_dots1_length, m_dots2_length, m_distance; }; class GradientStyle { public: - GradientStyle( QDomElement & gradient, int index ); + GradientStyle( TQDomElement & gradient, int index ); ~GradientStyle() {}; - void toXML( QDomDocument & doc, QDomElement & e ) const; - QString name() const { return m_name; }; + void toXML( TQDomDocument & doc, TQDomElement & e ) const; + TQString name() const { return m_name; }; private: GradientStyle() {}; - QString m_name, m_style, m_cx, m_cy, m_start_color, m_end_color, + TQString m_name, m_style, m_cx, m_cy, m_start_color, m_end_color, m_start_intensity, m_end_intensity, m_angle, m_border; }; @@ -66,76 +66,76 @@ public: MarkerStyle( int style ); ~MarkerStyle() {}; - void toXML( QDomDocument & doc, QDomElement & e ) const; - QString name() const { return m_name; }; + void toXML( TQDomDocument & doc, TQDomElement & e ) const; + TQString name() const { return m_name; }; private: MarkerStyle() {}; - QString m_name, m_viewBox, m_d; + TQString m_name, m_viewBox, m_d; }; class HatchStyle { public: - HatchStyle( int style, QString & color ); + HatchStyle( int style, TQString & color ); ~HatchStyle() {}; - void toXML( QDomDocument & doc, QDomElement & e ) const; - QString name() const { return m_name; }; + void toXML( TQDomDocument & doc, TQDomElement & e ) const; + TQString name() const { return m_name; }; private: HatchStyle() {}; - QString m_name, m_style, m_color, m_distance, m_rotation; + TQString m_name, m_style, m_color, m_distance, m_rotation; }; class FillImageStyle { public: - FillImageStyle( QString & name ); + FillImageStyle( TQString & name ); ~FillImageStyle() {}; - void toXML( QDomDocument & doc, QDomElement & e ) const; + void toXML( TQDomDocument & doc, TQDomElement & e ) const; private: FillImageStyle() {}; - QString m_name, m_href, m_type, m_show, m_actuate; + TQString m_name, m_href, m_type, m_show, m_actuate; }; class PageMasterStyle { public: - PageMasterStyle( QDomElement & e, const uint index ); + PageMasterStyle( TQDomElement & e, const uint index ); ~PageMasterStyle() {}; - void toXML( QDomDocument & doc, QDomElement & e ) const; + void toXML( TQDomDocument & doc, TQDomElement & e ) const; bool operator==( const PageMasterStyle & pageMasterStyle ) const; - QString name() const { return m_name; }; - QString style() const { return m_style; }; + TQString name() const { return m_name; }; + TQString style() const { return m_style; }; private: PageMasterStyle() {}; - QString m_name, m_page_width, m_page_height, m_orientation, m_style; - QString m_margin_top, m_margin_bottom, m_margin_left, m_margin_right; + TQString m_name, m_page_width, m_page_height, m_orientation, m_style; + TQString m_margin_top, m_margin_bottom, m_margin_left, m_margin_right; }; class PageStyle { public: - PageStyle( StyleFactory * styleFactory, QDomElement & e, const uint index ); + PageStyle( StyleFactory * styleFactory, TQDomElement & e, const uint index ); ~PageStyle() {}; - void toXML( QDomDocument & doc, QDomElement & e ) const; + void toXML( TQDomDocument & doc, TQDomElement & e ) const; bool operator==( const PageStyle & pageStyle ) const; - QString name() const { return m_name; }; + TQString name() const { return m_name; }; private: PageStyle() {}; - QString m_name, m_bg_visible, m_bg_objects_visible, m_fill, m_fill_color, + TQString m_name, m_bg_visible, m_bg_objects_visible, m_fill, m_fill_color, m_fill_image_name, m_fill_image_width, m_fill_image_height, m_fill_image_ref_point, m_fill_gradient_name, m_repeat, m_page_effect, m_page_duration; @@ -144,17 +144,17 @@ private: class TextStyle { public: - TextStyle( QDomElement & e, const uint index ); + TextStyle( TQDomElement & e, const uint index ); ~TextStyle() {}; - void toXML( QDomDocument & doc, QDomElement & e ) const; + void toXML( TQDomDocument & doc, TQDomElement & e ) const; bool operator==( const TextStyle & textStyle ) const; - QString name() const { return m_name; }; + TQString name() const { return m_name; }; private: TextStyle() {}; - QString m_name, m_font_size, m_font_family, m_font_family_generic, + TQString m_name, m_font_size, m_font_family, m_font_family_generic, m_color, m_font_pitch, m_font_style, m_font_weight, m_text_shadow, m_text_underline, m_text_underline_color, m_text_crossing_out; }; @@ -162,7 +162,7 @@ private: class GraphicStyle { public: - GraphicStyle( StyleFactory * styleFactory, QDomElement & e, const uint index ); + GraphicStyle( StyleFactory * styleFactory, TQDomElement & e, const uint index ); GraphicStyle( const char * name, const char * stroke, const char * stroke_color, const char * stroke_width, const char * shadow, @@ -179,14 +179,14 @@ public: const char * enable_numbering ); ~GraphicStyle() {}; - void toXML( QDomDocument & doc, QDomElement & e ) const; + void toXML( TQDomDocument & doc, TQDomElement & e ) const; bool operator==( const GraphicStyle & graphicStyle ) const; - QString name() const { return m_name; }; + TQString name() const { return m_name; }; private: GraphicStyle() {}; - QString m_name, m_stroke, m_stroke_color, m_stroke_width, m_shadow, + TQString m_name, m_stroke, m_stroke_color, m_stroke_width, m_shadow, m_shadow_offset_x, m_shadow_offset_y, m_shadow_color, m_margin_left, m_margin_right, m_margin_top, m_margin_bottom, m_color, m_text_outline, m_text_crossing_out, m_font_family, m_font_size, m_font_style, @@ -200,18 +200,18 @@ private: class ParagraphStyle { public: - ParagraphStyle( QDomElement & e, const uint index ); + ParagraphStyle( TQDomElement & e, const uint index ); ~ParagraphStyle() {}; - void toXML( QDomDocument & doc, QDomElement & e ) const; + void toXML( TQDomDocument & doc, TQDomElement & e ) const; bool operator==( const ParagraphStyle & paragraphStyle ) const; - QString name() const { return m_name; }; + TQString name() const { return m_name; }; private: ParagraphStyle() {}; - QString parseBorder( QDomElement e ); + TQString parseBorder( TQDomElement e ); - QString m_name, m_margin_left, m_margin_right, m_text_indent, m_text_align, + TQString m_name, m_margin_left, m_margin_right, m_text_indent, m_text_align, m_enable_numbering, m_text_shadow, m_margin_top, m_margin_bottom, m_border_left, m_border_right, m_border_top, m_border_bottom, m_line_height, m_line_height_at_least, m_line_spacing; @@ -220,12 +220,12 @@ private: class ListStyle { public: - ListStyle( QDomElement & e, const uint index ); + ListStyle( TQDomElement & e, const uint index ); ~ListStyle() {}; - void toXML( QDomDocument & doc, QDomElement & e ) const; + void toXML( TQDomDocument & doc, TQDomElement & e ) const; bool operator==( const ListStyle & listStyle ) const; - QString name() const { return m_name; }; + TQString name() const { return m_name; }; private: ListStyle() {}; @@ -237,7 +237,7 @@ private: float m_min_label_width; list_level_style_t m_listLevelStyle; - QString m_name, m_num_suffix, m_num_format, m_bullet_char, m_color, + TQString m_name, m_num_suffix, m_num_format, m_bullet_char, m_color, m_font_size, m_font_family; }; @@ -247,36 +247,36 @@ public: StyleFactory(); ~StyleFactory(); - void addOfficeStyles( QDomDocument & doc, QDomElement & styles ); - void addOfficeMaster( QDomDocument & doc, QDomElement & master ); - void addOfficeAutomatic( QDomDocument & doc, QDomElement & automatic ); - void addAutomaticStyles( QDomDocument & doc, QDomElement & autoStyles ); + void addOfficeStyles( TQDomDocument & doc, TQDomElement & styles ); + void addOfficeMaster( TQDomDocument & doc, TQDomElement & master ); + void addOfficeAutomatic( TQDomDocument & doc, TQDomElement & automatic ); + void addAutomaticStyles( TQDomDocument & doc, TQDomElement & autoStyles ); - QString createStrokeDashStyle( int style ); - QString createGradientStyle( QDomElement & gradient ); - QString createMarkerStyle( int style ); - QString createHatchStyle( int style, QString & color ); - QString createListStyle( QDomElement & e ); - QString createPageStyle( QDomElement & e ); - QString createTextStyle( QDomElement & e ); - QString createGraphicStyle( QDomElement & e ); - QString createParagraphStyle( QDomElement & e ); - QString createPageMasterStyle( QDomElement & e ); + TQString createStrokeDashStyle( int style ); + TQString createGradientStyle( TQDomElement & gradient ); + TQString createMarkerStyle( int style ); + TQString createHatchStyle( int style, TQString & color ); + TQString createListStyle( TQDomElement & e ); + TQString createPageStyle( TQDomElement & e ); + TQString createTextStyle( TQDomElement & e ); + TQString createGraphicStyle( TQDomElement & e ); + TQString createParagraphStyle( TQDomElement & e ); + TQString createPageMasterStyle( TQDomElement & e ); - static QString toCM( const QString & point ); + static TQString toCM( const TQString & point ); private: - QPtrList<StrokeDashStyle> m_strokeDashStyles; - QPtrList<GradientStyle> m_gradientStyles; - QPtrList<HatchStyle> m_hatchStyles; - QPtrList<MarkerStyle> m_markerStyles; - QPtrList<FillImageStyle> m_fillImageStyles; - QPtrList<ListStyle> m_listStyles; - QPtrList<PageStyle> m_pageStyles; - QPtrList<TextStyle> m_textStyles; - QPtrList<GraphicStyle> m_graphicStyles; - QPtrList<ParagraphStyle> m_paragraphStyles; - QPtrList<PageMasterStyle> m_pageMasterStyles; + TQPtrList<StrokeDashStyle> m_strokeDashStyles; + TQPtrList<GradientStyle> m_gradientStyles; + TQPtrList<HatchStyle> m_hatchStyles; + TQPtrList<MarkerStyle> m_markerStyles; + TQPtrList<FillImageStyle> m_fillImageStyles; + TQPtrList<ListStyle> m_listStyles; + TQPtrList<PageStyle> m_pageStyles; + TQPtrList<TextStyle> m_textStyles; + TQPtrList<GraphicStyle> m_graphicStyles; + TQPtrList<ParagraphStyle> m_paragraphStyles; + TQPtrList<PageMasterStyle> m_pageMasterStyles; }; #endif diff --git a/filters/kpresenter/png/pngexport.cpp b/filters/kpresenter/png/pngexport.cpp index 571e7864..8bb6b054 100644 --- a/filters/kpresenter/png/pngexport.cpp +++ b/filters/kpresenter/png/pngexport.cpp @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include <qpixmap.h> -#include <qpainter.h> +#include <tqpixmap.h> +#include <tqpainter.h> #include <kmessagebox.h> @@ -33,7 +33,7 @@ typedef KGenericFactory<PngExport, KoFilter> PngExportFactory; K_EXPORT_COMPONENT_FACTORY( libkpresenterpngexport, PngExportFactory( "pngexport" ) ) -PngExport::PngExport(KoFilter *fil, const char *name, const QStringList&lst) +PngExport::PngExport(KoFilter *fil, const char *name, const TQStringList&lst) : ImageExport(fil,name,lst) { } @@ -62,7 +62,7 @@ const char * PngExport::exportFormat() return "image/png"; } -bool PngExport::saveImage( QString fileName) +bool PngExport::saveImage( TQString fileName) { bool ret = pixmap.save( fileName, "PNG" ); // Save the image. diff --git a/filters/kpresenter/png/pngexport.h b/filters/kpresenter/png/pngexport.h index 8856dbd8..692aa76a 100644 --- a/filters/kpresenter/png/pngexport.h +++ b/filters/kpresenter/png/pngexport.h @@ -25,11 +25,12 @@ class PngExport : public ImageExport { Q_OBJECT + TQ_OBJECT public: - PngExport(KoFilter *parent, const char *name, const QStringList&); + PngExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~PngExport(); - virtual bool saveImage( QString fileName); + virtual bool saveImage( TQString fileName); virtual bool extraImageAttribute(); virtual const char * exportFormat(); }; diff --git a/filters/kpresenter/powerpoint/import/powerpointimport.cc b/filters/kpresenter/powerpoint/import/powerpointimport.cc index 761e4f0d..6afdc659 100644 --- a/filters/kpresenter/powerpoint/import/powerpointimport.cc +++ b/filters/kpresenter/powerpoint/import/powerpointimport.cc @@ -26,11 +26,11 @@ #include <powerpointimport.h> #include <powerpointimport.moc> -#include <qbuffer.h> -#include <qcstring.h> -#include <qfile.h> -#include <qstring.h> -#include <qtextstream.h> +#include <tqbuffer.h> +#include <tqcstring.h> +#include <tqfile.h> +#include <tqstring.h> +#include <tqtextstream.h> #include <kdebug.h> #include <KoFilterChain.h> @@ -52,9 +52,9 @@ K_EXPORT_COMPONENT_FACTORY( libpowerpointimport, namespace Libppt { -inline QConstString string( const Libppt::UString& str ) +inline TQConstString string( const Libppt::UString& str ) { - return QConstString( reinterpret_cast<const QChar*>( str.data() ), str.length() ); + return TQConstString( reinterpret_cast<const TQChar*>( str.data() ), str.length() ); } } @@ -62,14 +62,14 @@ inline QConstString string( const Libppt::UString& str ) class PowerPointImport::Private { public: - QString inputFile; - QString outputFile; + TQString inputFile; + TQString outputFile; Presentation *presentation; }; -PowerPointImport::PowerPointImport ( QObject*, const char*, const QStringList& ) +PowerPointImport::PowerPointImport ( TQObject*, const char*, const TQStringList& ) : KoFilter() { d = new Private; @@ -80,7 +80,7 @@ PowerPointImport::~PowerPointImport() delete d; } -KoFilter::ConversionStatus PowerPointImport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus PowerPointImport::convert( const TQCString& from, const TQCString& to ) { if ( from != "application/mspowerpoint" ) return KoFilter::NotImplemented; @@ -143,21 +143,21 @@ KoFilter::ConversionStatus PowerPointImport::convert( const QCString& from, cons // we are done! delete d->presentation; delete storeout; - d->inputFile = QString::null; - d->outputFile = QString::null; + d->inputFile = TQString(); + d->outputFile = TQString(); d->presentation = 0; return KoFilter::OK; } -QByteArray PowerPointImport::createStyles() +TQByteArray PowerPointImport::createStyles() { KoXmlWriter* stylesWriter; - QByteArray stylesData; - QBuffer stylesBuffer( stylesData ); + TQByteArray stylesData; + TQBuffer stylesBuffer( stylesData ); - QString pageWidth = QString("%1pt").arg( d->presentation->masterSlide()->pageWidth() ); - QString pageHeight = QString("%1pt").arg( d->presentation->masterSlide()->pageHeight() ); + TQString pageWidth = TQString("%1pt").tqarg( d->presentation->masterSlide()->pageWidth() ); + TQString pageHeight = TQString("%1pt").tqarg( d->presentation->masterSlide()->pageHeight() ); stylesBuffer.open( IO_WriteOnly ); stylesWriter = new KoXmlWriter( &stylesBuffer ); @@ -178,10 +178,10 @@ QByteArray PowerPointImport::createStyles() // office:automatic-styles stylesWriter->startElement( "office:automatic-styles" ); - stylesWriter->startElement( "style:page-layout" ); + stylesWriter->startElement( "style:page-tqlayout" ); stylesWriter->addAttribute( "style:name","pm1" ); stylesWriter->addAttribute( "style:page-usage","all" ); - stylesWriter->startElement( "style:page-layout-properties" ); + stylesWriter->startElement( "style:page-tqlayout-properties" ); stylesWriter->addAttribute( "fo:margin-bottom","0pt" ); stylesWriter->addAttribute( "fo:margin-left","0pt" ); stylesWriter->addAttribute( "fo:margin-right","0pt" ); @@ -189,8 +189,8 @@ QByteArray PowerPointImport::createStyles() stylesWriter->addAttribute( "fo:page-height", pageHeight ); stylesWriter->addAttribute( "fo:page-width", pageWidth ); stylesWriter->addAttribute( "style:print-orientation","landscape" ); - stylesWriter->endElement(); // style:page-layout-properties - stylesWriter->endElement(); // style:page-layout + stylesWriter->endElement(); // style:page-tqlayout-properties + stylesWriter->endElement(); // style:page-tqlayout stylesWriter->startElement( "style:style" ); stylesWriter->addAttribute( "style:name","dp1" ); @@ -237,7 +237,7 @@ QByteArray PowerPointImport::createStyles() stylesWriter->startElement( "office:master-styles" ); stylesWriter->startElement( "style:master-page" ); stylesWriter->addAttribute( "style:name", "Standard" ); - stylesWriter->addAttribute( "style:page-layout-name", "pm1" ); + stylesWriter->addAttribute( "style:page-tqlayout-name", "pm1" ); stylesWriter->addAttribute( "draw:style-name", "dp1" ); stylesWriter->endElement(); stylesWriter->endElement(); @@ -247,7 +247,7 @@ QByteArray PowerPointImport::createStyles() delete stylesWriter; // for troubleshooting only !! - QString dbg; + TQString dbg; for( unsigned i=0; i<stylesData.size(); i++ ) dbg.append( stylesData[i] ); qDebug("\nstyles.xml:\n%s\n", dbg.latin1() ); @@ -256,11 +256,11 @@ QByteArray PowerPointImport::createStyles() } -QByteArray PowerPointImport::createContent() +TQByteArray PowerPointImport::createContent() { KoXmlWriter* contentWriter; - QByteArray contentData; - QBuffer contentBuffer( contentData ); + TQByteArray contentData; + TQBuffer contentBuffer( contentData ); contentBuffer.open( IO_WriteOnly ); contentWriter = new KoXmlWriter( &contentBuffer ); @@ -308,7 +308,7 @@ QByteArray PowerPointImport::createContent() delete contentWriter; // for troubleshooting only !! - QString dbg; + TQString dbg; for( unsigned i=0; i<contentData.size(); i++ ) dbg.append( contentData[i] ); qDebug("\ncontent.xml:\n%s\n", dbg.latin1() ); @@ -316,11 +316,11 @@ QByteArray PowerPointImport::createContent() return contentData; } -QByteArray PowerPointImport::createManifest() +TQByteArray PowerPointImport::createManifest() { KoXmlWriter* manifestWriter; - QByteArray manifestData; - QBuffer manifestBuffer( manifestData ); + TQByteArray manifestData; + TQBuffer manifestBuffer( manifestData ); manifestBuffer.open( IO_WriteOnly ); manifestWriter = new KoXmlWriter( &manifestBuffer ); @@ -339,7 +339,7 @@ QByteArray PowerPointImport::createManifest() delete manifestWriter; // for troubleshooting only !! - QString dbg; + TQString dbg; for( unsigned i=0; i<manifestData.size(); i++ ) dbg.append( manifestData[i] ); qDebug("\nmanifest.xml:\n%s\n", dbg.latin1() ); @@ -351,11 +351,11 @@ void PowerPointImport::processEllipse (DrawObject* drawObject, KoXmlWriter* xmlW { if( !drawObject || !xmlWriter ) return; - QString widthStr = QString("%1mm").arg( drawObject->width() ); - QString heightStr = QString("%1mm").arg( drawObject->height() ); - QString xStr = QString("%1mm").arg( drawObject->left() ); - QString yStr = QString("%1mm").arg( drawObject->top() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString widthStr = TQString("%1mm").tqarg( drawObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( drawObject->height() ); + TQString xStr = TQString("%1mm").tqarg( drawObject->left() ); + TQString yStr = TQString("%1mm").tqarg( drawObject->top() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); xmlWriter->startElement( "draw:ellipse" ); xmlWriter->addAttribute( "draw:style-name", styleName ); @@ -363,7 +363,7 @@ void PowerPointImport::processEllipse (DrawObject* drawObject, KoXmlWriter* xmlW xmlWriter->addAttribute( "svg:height", heightStr ); xmlWriter->addAttribute( "svg:x", xStr ); xmlWriter->addAttribute( "svg:y", yStr ); - xmlWriter->addAttribute( "draw:layer", "layout" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); xmlWriter->endElement(); // draw:ellipse } @@ -372,11 +372,11 @@ void PowerPointImport::processRectangle (DrawObject* drawObject, KoXmlWriter* xm if( !drawObject ) return; if( !xmlWriter ) return; - QString widthStr = QString("%1mm").arg( drawObject->width() ); - QString heightStr = QString("%1mm").arg( drawObject->height() ); - QString xStr = QString("%1mm").arg( drawObject->left() ); - QString yStr = QString("%1mm").arg( drawObject->top() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString widthStr = TQString("%1mm").tqarg( drawObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( drawObject->height() ); + TQString xStr = TQString("%1mm").tqarg( drawObject->left() ); + TQString yStr = TQString("%1mm").tqarg( drawObject->top() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); xmlWriter->startElement( "draw:rect" ); xmlWriter->addAttribute( "draw:style-name", styleName ); @@ -393,7 +393,7 @@ void PowerPointImport::processRectangle (DrawObject* drawObject, KoXmlWriter* xm double xNew = xVec*cos(rotAngle) - yVec*sin(rotAngle); double yNew = xVec*sin(rotAngle) + yVec*cos(rotAngle); - QString rot = QString("rotate (%1) translate (%2mm %3mm)").arg(rotAngle).arg(xNew+xMid).arg(yMid-yNew); + TQString rot = TQString("rotate (%1) translate (%2mm %3mm)").tqarg(rotAngle).tqarg(xNew+xMid).tqarg(yMid-yNew); xmlWriter->addAttribute( "draw:transform", rot ); } else @@ -401,7 +401,7 @@ void PowerPointImport::processRectangle (DrawObject* drawObject, KoXmlWriter* xm xmlWriter->addAttribute( "svg:x", xStr ); xmlWriter->addAttribute( "svg:y", yStr ); } - xmlWriter->addAttribute( "draw:layer", "layout" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); xmlWriter->endElement(); // draw:rect } @@ -409,13 +409,13 @@ void PowerPointImport::processRoundRectangle (DrawObject* drawObject, KoXmlWrite { if( !drawObject || !xmlWriter ) return; - QString widthStr = QString("%1mm").arg( drawObject->width() ); - QString heightStr = QString("%1mm").arg( drawObject->height() ); - QString xStr = QString("%1mm").arg( drawObject->left() ); - QString yStr = QString("%1mm").arg( drawObject->top() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString widthStr = TQString("%1mm").tqarg( drawObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( drawObject->height() ); + TQString xStr = TQString("%1mm").tqarg( drawObject->left() ); + TQString yStr = TQString("%1mm").tqarg( drawObject->top() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); - xmlWriter->startElement( "draw:custom-shape" ); + xmlWriter->startElement( "draw:custom-tqshape" ); xmlWriter->addAttribute( "draw:style-name", styleName ); @@ -435,7 +435,7 @@ void PowerPointImport::processRoundRectangle (DrawObject* drawObject, KoXmlWrite double xNew = xVec*cos(rotAngle) - yVec*sin(rotAngle); double yNew = xVec*sin(rotAngle) + yVec*cos(rotAngle); - QString rot = QString("rotate (%1) translate (%2mm %3mm)").arg(rotAngle).arg(xNew+xMid).arg(yMid+yNew); + TQString rot = TQString("rotate (%1) translate (%2mm %3mm)").tqarg(rotAngle).tqarg(xNew+xMid).tqarg(yMid+yNew); xmlWriter->addAttribute( "draw:transform", rot ); } else @@ -448,7 +448,7 @@ void PowerPointImport::processRoundRectangle (DrawObject* drawObject, KoXmlWrite double xNew = xVec*cos(rotAngle) - yVec*sin(rotAngle); double yNew = xVec*sin(rotAngle) + yVec*cos(rotAngle); - QString rot = QString("rotate (%1) translate (%2mm %3mm)").arg(rotAngle).arg(xNew+xMid).arg(yMid-yNew); + TQString rot = TQString("rotate (%1) translate (%2mm %3mm)").tqarg(rotAngle).tqarg(xNew+xMid).tqarg(yMid-yNew); xmlWriter->addAttribute( "draw:transform", rot ); } @@ -463,8 +463,8 @@ void PowerPointImport::processRoundRectangle (DrawObject* drawObject, KoXmlWrite // xmlWriter->addAttribute( "svg:x", xStr ); // xmlWriter->addAttribute( "svg:y", yStr ); - xmlWriter->addAttribute( "draw:layer", "layout" ); - xmlWriter->startElement( "draw:enhanced-geometry" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); + xmlWriter->startElement( "draw:enhanced-tqgeometry" ); xmlWriter->addAttribute( "draw:type", "round-rectangle"); xmlWriter->startElement( "draw:equation" ); xmlWriter->addAttribute( "draw:formula", "$0 /3" ); @@ -486,21 +486,21 @@ void PowerPointImport::processRoundRectangle (DrawObject* drawObject, KoXmlWrite xmlWriter->addAttribute( "draw:formula", "top+?f0 " ); xmlWriter->addAttribute( "draw:name", "f4" ); xmlWriter->endElement(); // draw:equation - xmlWriter->endElement(); // draw:enhanced-geometry - xmlWriter->endElement(); // draw:custom-shape + xmlWriter->endElement(); // draw:enhanced-tqgeometry + xmlWriter->endElement(); // draw:custom-tqshape } void PowerPointImport::processDiamond (DrawObject* drawObject, KoXmlWriter* xmlWriter ) { if( !drawObject || !xmlWriter ) return; - QString widthStr = QString("%1mm").arg( drawObject->width() ); - QString heightStr = QString("%1mm").arg( drawObject->height() ); - QString xStr = QString("%1mm").arg( drawObject->left() ); - QString yStr = QString("%1mm").arg( drawObject->top() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString widthStr = TQString("%1mm").tqarg( drawObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( drawObject->height() ); + TQString xStr = TQString("%1mm").tqarg( drawObject->left() ); + TQString yStr = TQString("%1mm").tqarg( drawObject->top() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); - xmlWriter->startElement( "draw:custom-shape" ); + xmlWriter->startElement( "draw:custom-tqshape" ); xmlWriter->addAttribute( "draw:style-name", styleName ); xmlWriter->addAttribute( "svg:width", widthStr ); xmlWriter->addAttribute( "svg:height", heightStr ); @@ -522,10 +522,10 @@ void PowerPointImport::processDiamond (DrawObject* drawObject, KoXmlWriter* xmlW xmlWriter->addAttribute( "svg:x", 10 ); xmlWriter->addAttribute( "svg:y", 5 ); xmlWriter->endElement(); - xmlWriter->startElement( "draw:enhanced-geometry" ); + xmlWriter->startElement( "draw:enhanced-tqgeometry" ); xmlWriter->addAttribute( "draw:type", "diamond"); xmlWriter->endElement(); - xmlWriter->addAttribute( "draw:layer", "layout" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); xmlWriter->endElement(); } @@ -533,20 +533,20 @@ void PowerPointImport::processTriangle (DrawObject* drawObject, KoXmlWriter* xml { if( !drawObject || !xmlWriter ) return; - QString widthStr = QString("%1mm").arg( drawObject->width() ); - QString heightStr = QString("%1mm").arg( drawObject->height() ); - QString xStr = QString("%1mm").arg( drawObject->left() ); - QString yStr = QString("%1mm").arg( drawObject->top() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString widthStr = TQString("%1mm").tqarg( drawObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( drawObject->height() ); + TQString xStr = TQString("%1mm").tqarg( drawObject->left() ); + TQString yStr = TQString("%1mm").tqarg( drawObject->top() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); /* draw IsocelesTriangle or RightTriangle */ - xmlWriter->startElement( "draw:custom-shape" ); + xmlWriter->startElement( "draw:custom-tqshape" ); xmlWriter->addAttribute( "draw:style-name", styleName ); xmlWriter->addAttribute( "svg:width", widthStr ); xmlWriter->addAttribute( "svg:height", heightStr ); xmlWriter->addAttribute( "svg:x", xStr ); xmlWriter->addAttribute( "svg:y", yStr ); - xmlWriter->addAttribute( "draw:layer", "layout" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); xmlWriter->startElement( "draw:glue-point" ); xmlWriter->addAttribute( "svg:x", 5 ); xmlWriter->addAttribute( "svg:y", 0 ); @@ -572,7 +572,7 @@ void PowerPointImport::processTriangle (DrawObject* drawObject, KoXmlWriter* xml xmlWriter->addAttribute( "svg:y", 5 ); xmlWriter->endElement(); - xmlWriter->startElement( "draw:enhanced-geometry" ); + xmlWriter->startElement( "draw:enhanced-tqgeometry" ); if (drawObject->hasProperty("draw:mirror-vertical")) { @@ -588,14 +588,14 @@ void PowerPointImport::processTriangle (DrawObject* drawObject, KoXmlWriter* xml double rotAngle = drawObject->getDoubleProperty("libppt:rotation" ); double xMid = ( drawObject->left() + 0.5*drawObject->width() ); double yMid = ( drawObject->top() + 0.5*drawObject->height() ); - QString rot = QString("rotate (%1) translate (%2cm %3cm)").arg(rotAngle).arg(xMid).arg(yMid); + TQString rot = TQString("rotate (%1) translate (%2cm %3cm)").tqarg(rotAngle).tqarg(xMid).tqarg(yMid); xmlWriter->addAttribute( "draw:transform", rot ); } - if (drawObject->shape() == DrawObject::RightTriangle) + if (drawObject->tqshape() == DrawObject::RightTriangle) { xmlWriter->addAttribute( "draw:type", "right-triangle"); } - else if (drawObject->shape() == DrawObject::IsoscelesTriangle) + else if (drawObject->tqshape() == DrawObject::IsoscelesTriangle) { xmlWriter->addAttribute( "draw:type", "isosceles-triangle"); xmlWriter->startElement( "draw:equation" ); @@ -637,27 +637,27 @@ void PowerPointImport::processTriangle (DrawObject* drawObject, KoXmlWriter* xml xmlWriter->endElement(); } - xmlWriter->endElement(); // enhanced-geometry - xmlWriter->endElement(); // custom-shape + xmlWriter->endElement(); // enhanced-tqgeometry + xmlWriter->endElement(); // custom-tqshape } void PowerPointImport::processTrapezoid (DrawObject* drawObject, KoXmlWriter* xmlWriter ) { if( !drawObject || !xmlWriter ) return; - QString widthStr = QString("%1mm").arg( drawObject->width() ); - QString heightStr = QString("%1mm").arg( drawObject->height() ); - QString xStr = QString("%1mm").arg( drawObject->left() ); - QString yStr = QString("%1mm").arg( drawObject->top() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString widthStr = TQString("%1mm").tqarg( drawObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( drawObject->height() ); + TQString xStr = TQString("%1mm").tqarg( drawObject->left() ); + TQString yStr = TQString("%1mm").tqarg( drawObject->top() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); - xmlWriter->startElement( "draw:custom-shape" ); + xmlWriter->startElement( "draw:custom-tqshape" ); xmlWriter->addAttribute( "draw:style-name", styleName ); xmlWriter->addAttribute( "svg:width", widthStr ); xmlWriter->addAttribute( "svg:height", heightStr ); xmlWriter->addAttribute( "svg:x", xStr ); xmlWriter->addAttribute( "svg:y", yStr ); - xmlWriter->addAttribute( "draw:layer", "layout" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); xmlWriter->startElement( "draw:glue-point" ); xmlWriter->addAttribute( "svg:x", 5 ); @@ -675,7 +675,7 @@ void PowerPointImport::processTrapezoid (DrawObject* drawObject, KoXmlWriter* xm xmlWriter->addAttribute( "svg:x", 5 ); xmlWriter->addAttribute( "svg:y", 10 ); xmlWriter->endElement(); - xmlWriter->startElement( "draw:enhanced-geometry" ); + xmlWriter->startElement( "draw:enhanced-tqgeometry" ); if ( drawObject->hasProperty("draw:mirror-vertical") ) { xmlWriter->addAttribute("draw:mirror-vertical","true"); @@ -718,27 +718,27 @@ void PowerPointImport::processTrapezoid (DrawObject* drawObject, KoXmlWriter* xm xmlWriter->addAttribute( "draw:handle-range-x-minimum", 0); xmlWriter->addAttribute("draw:handle-position","$0 bottom"); xmlWriter->endElement(); - xmlWriter->endElement(); // enhanced-geometry - xmlWriter->endElement(); // custom-shape + xmlWriter->endElement(); // enhanced-tqgeometry + xmlWriter->endElement(); // custom-tqshape } void PowerPointImport::processParallelogram (DrawObject* drawObject, KoXmlWriter* xmlWriter ) { if( !drawObject || !xmlWriter ) return; - QString widthStr = QString("%1mm").arg( drawObject->width() ); - QString heightStr = QString("%1mm").arg( drawObject->height() ); - QString xStr = QString("%1mm").arg( drawObject->left() ); - QString yStr = QString("%1mm").arg( drawObject->top() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString widthStr = TQString("%1mm").tqarg( drawObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( drawObject->height() ); + TQString xStr = TQString("%1mm").tqarg( drawObject->left() ); + TQString yStr = TQString("%1mm").tqarg( drawObject->top() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); - xmlWriter->startElement( "draw:custom-shape" ); + xmlWriter->startElement( "draw:custom-tqshape" ); xmlWriter->addAttribute( "draw:style-name", styleName ); xmlWriter->addAttribute( "svg:width", widthStr ); xmlWriter->addAttribute( "svg:height", heightStr ); xmlWriter->addAttribute( "svg:x", xStr ); xmlWriter->addAttribute( "svg:y", yStr ); - xmlWriter->addAttribute( "draw:layer", "layout" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); xmlWriter->startElement( "draw:glue-point" ); xmlWriter->addAttribute( "svg:x", 6.25 ); xmlWriter->addAttribute( "svg:y", 0 ); @@ -763,7 +763,7 @@ void PowerPointImport::processParallelogram (DrawObject* drawObject, KoXmlWriter xmlWriter->addAttribute( "svg:x", 1.25 ); xmlWriter->addAttribute( "svg:y", 5 ); xmlWriter->endElement(); - xmlWriter->startElement( "draw:enhanced-geometry" ); + xmlWriter->startElement( "draw:enhanced-tqgeometry" ); if (drawObject->hasProperty("draw:mirror-vertical")) { xmlWriter->addAttribute("draw:mirror-vertical","true"); @@ -834,27 +834,27 @@ void PowerPointImport::processParallelogram (DrawObject* drawObject, KoXmlWriter xmlWriter->addAttribute( "draw:handle-range-x-minimum", 0); xmlWriter->addAttribute("draw:handle-position","$0 top"); xmlWriter->endElement(); - xmlWriter->endElement(); // enhanced-geometry - xmlWriter->endElement(); // custom-shape + xmlWriter->endElement(); // enhanced-tqgeometry + xmlWriter->endElement(); // custom-tqshape } void PowerPointImport::processHexagon (DrawObject* drawObject, KoXmlWriter* xmlWriter ) { if( !drawObject || !xmlWriter ) return; - QString widthStr = QString("%1mm").arg( drawObject->width() ); - QString heightStr = QString("%1mm").arg( drawObject->height() ); - QString xStr = QString("%1mm").arg( drawObject->left() ); - QString yStr = QString("%1mm").arg( drawObject->top() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString widthStr = TQString("%1mm").tqarg( drawObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( drawObject->height() ); + TQString xStr = TQString("%1mm").tqarg( drawObject->left() ); + TQString yStr = TQString("%1mm").tqarg( drawObject->top() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); - xmlWriter->startElement( "draw:custom-shape" ); + xmlWriter->startElement( "draw:custom-tqshape" ); xmlWriter->addAttribute( "draw:style-name", styleName ); xmlWriter->addAttribute( "svg:width", widthStr ); xmlWriter->addAttribute( "svg:height", heightStr ); xmlWriter->addAttribute( "svg:x", xStr ); xmlWriter->addAttribute( "svg:y", yStr ); - xmlWriter->addAttribute( "draw:layer", "layout" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); xmlWriter->startElement( "draw:glue-point" ); xmlWriter->addAttribute( "svg:x", 5 ); xmlWriter->addAttribute( "svg:y", 0 ); @@ -871,7 +871,7 @@ void PowerPointImport::processHexagon (DrawObject* drawObject, KoXmlWriter* xmlW xmlWriter->addAttribute( "svg:x", 10 ); xmlWriter->addAttribute( "svg:y", 5 ); xmlWriter->endElement(); - xmlWriter->startElement( "draw:enhanced-geometry" ); + xmlWriter->startElement( "draw:enhanced-tqgeometry" ); xmlWriter->addAttribute( "draw:type", "hexagon" ); xmlWriter->startElement( "draw:equation" ); xmlWriter->addAttribute( "draw:formula", "$0 " ); @@ -898,27 +898,27 @@ void PowerPointImport::processHexagon (DrawObject* drawObject, KoXmlWriter* xmlW xmlWriter->addAttribute( "draw:handle-range-x-minimum", 0); xmlWriter->addAttribute("draw:handle-position","$0 top"); xmlWriter->endElement(); - xmlWriter->endElement(); // enhanced-geometry - xmlWriter->endElement(); // custom-shape + xmlWriter->endElement(); // enhanced-tqgeometry + xmlWriter->endElement(); // custom-tqshape } void PowerPointImport::processOctagon (DrawObject* drawObject, KoXmlWriter* xmlWriter ) { if( !drawObject || !xmlWriter ) return; - QString widthStr = QString("%1mm").arg( drawObject->width() ); - QString heightStr = QString("%1mm").arg( drawObject->height() ); - QString xStr = QString("%1mm").arg( drawObject->left() ); - QString yStr = QString("%1mm").arg( drawObject->top() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString widthStr = TQString("%1mm").tqarg( drawObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( drawObject->height() ); + TQString xStr = TQString("%1mm").tqarg( drawObject->left() ); + TQString yStr = TQString("%1mm").tqarg( drawObject->top() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); - xmlWriter->startElement( "draw:custom-shape" ); + xmlWriter->startElement( "draw:custom-tqshape" ); xmlWriter->addAttribute( "draw:style-name", styleName ); xmlWriter->addAttribute( "svg:width", widthStr ); xmlWriter->addAttribute( "svg:height", heightStr ); xmlWriter->addAttribute( "svg:x", xStr ); xmlWriter->addAttribute( "svg:y", yStr ); - xmlWriter->addAttribute( "draw:layer", "layout" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); xmlWriter->startElement( "draw:glue-point" ); xmlWriter->addAttribute( "svg:x", 5 ); xmlWriter->addAttribute( "svg:y", 0 ); @@ -935,7 +935,7 @@ void PowerPointImport::processOctagon (DrawObject* drawObject, KoXmlWriter* xmlW xmlWriter->addAttribute( "svg:x", 10 ); xmlWriter->addAttribute( "svg:y", 4.782 ); xmlWriter->endElement(); - xmlWriter->startElement( "draw:enhanced-geometry" ); + xmlWriter->startElement( "draw:enhanced-tqgeometry" ); xmlWriter->addAttribute( "draw:type", "octagon" ); xmlWriter->startElement( "draw:equation" ); xmlWriter->addAttribute( "draw:formula", "left+$0 " ); @@ -978,36 +978,36 @@ void PowerPointImport::processOctagon (DrawObject* drawObject, KoXmlWriter* xmlW xmlWriter->addAttribute( "draw:handle-range-x-minimum", 0); xmlWriter->addAttribute("draw:handle-position","$0 top"); xmlWriter->endElement(); - xmlWriter->endElement(); // enhanced-geometry - xmlWriter->endElement(); // custom-shape + xmlWriter->endElement(); // enhanced-tqgeometry + xmlWriter->endElement(); // custom-tqshape } void PowerPointImport::processArrow (DrawObject* drawObject, KoXmlWriter* xmlWriter ) { if( !drawObject || !xmlWriter ) return; - QString widthStr = QString("%1mm").arg( drawObject->width() ); - QString heightStr = QString("%1mm").arg( drawObject->height() ); - QString xStr = QString("%1mm").arg( drawObject->left() ); - QString yStr = QString("%1mm").arg( drawObject->top() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString widthStr = TQString("%1mm").tqarg( drawObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( drawObject->height() ); + TQString xStr = TQString("%1mm").tqarg( drawObject->left() ); + TQString yStr = TQString("%1mm").tqarg( drawObject->top() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); - xmlWriter->startElement( "draw:custom-shape" ); + xmlWriter->startElement( "draw:custom-tqshape" ); xmlWriter->addAttribute( "draw:style-name", styleName ); xmlWriter->addAttribute( "svg:width", widthStr ); xmlWriter->addAttribute( "svg:height", heightStr ); xmlWriter->addAttribute( "svg:x", xStr ); xmlWriter->addAttribute( "svg:y", yStr ); - xmlWriter->addAttribute( "draw:layer", "layout" ); - xmlWriter->startElement( "draw:enhanced-geometry" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); + xmlWriter->startElement( "draw:enhanced-tqgeometry" ); - if (drawObject->shape() == DrawObject::RightArrow) + if (drawObject->tqshape() == DrawObject::RightArrow) xmlWriter->addAttribute( "draw:type", "right-arrow" ); - else if (drawObject->shape() == DrawObject::LeftArrow) + else if (drawObject->tqshape() == DrawObject::LeftArrow) xmlWriter->addAttribute( "draw:type", "left-arrow" ); - else if (drawObject->shape() == DrawObject::UpArrow) + else if (drawObject->tqshape() == DrawObject::UpArrow) xmlWriter->addAttribute( "draw:type", "up-arrow" ); - else if (drawObject->shape() == DrawObject::DownArrow) + else if (drawObject->tqshape() == DrawObject::DownArrow) xmlWriter->addAttribute( "draw:type", "down-arrow" ); xmlWriter->startElement( "draw:equation" ); xmlWriter->addAttribute( "draw:formula","$1"); @@ -1042,7 +1042,7 @@ void PowerPointImport::processArrow (DrawObject* drawObject, KoXmlWriter* xmlWri xmlWriter->addAttribute( "draw:name","f7"); xmlWriter->endElement(); // draw:equation xmlWriter->startElement( "draw:handle" ); - if ( drawObject->shape() == DrawObject::RightArrow | drawObject->shape() == DrawObject::LeftArrow ) + if ( drawObject->tqshape() == DrawObject::RightArrow | drawObject->tqshape() == DrawObject::LeftArrow ) { xmlWriter->addAttribute( "draw:handle-range-x-maximum", 21600); xmlWriter->addAttribute( "draw:handle-range-x-minimum", 0); @@ -1050,7 +1050,7 @@ void PowerPointImport::processArrow (DrawObject* drawObject, KoXmlWriter* xmlWri xmlWriter->addAttribute("draw:handle-range-y-maximum",10800); xmlWriter->addAttribute("draw:handle-range-y-minimum",0); } - else if ( drawObject->shape() == DrawObject::UpArrow | drawObject->shape() == DrawObject::DownArrow ) + else if ( drawObject->tqshape() == DrawObject::UpArrow | drawObject->tqshape() == DrawObject::DownArrow ) { xmlWriter->addAttribute( "draw:handle-range-x-maximum", 10800); xmlWriter->addAttribute( "draw:handle-range-x-minimum", 0); @@ -1059,27 +1059,27 @@ void PowerPointImport::processArrow (DrawObject* drawObject, KoXmlWriter* xmlWri xmlWriter->addAttribute("draw:handle-range-y-minimum",0); } xmlWriter->endElement(); // draw:handle - xmlWriter->endElement(); // draw:enhanced-geometry - xmlWriter->endElement(); // draw:custom-shape + xmlWriter->endElement(); // draw:enhanced-tqgeometry + xmlWriter->endElement(); // draw:custom-tqshape } void PowerPointImport::processLine (DrawObject* drawObject, KoXmlWriter* xmlWriter ) { if( !drawObject || !xmlWriter) return; - QString x1Str = QString("%1mm").arg( drawObject->left() ); - QString y1Str = QString("%1mm").arg( drawObject->top() ); - QString x2Str = QString("%1mm").arg( drawObject->left() + drawObject->width() ); - QString y2Str = QString("%1mm").arg( drawObject->top() + drawObject->height() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString x1Str = TQString("%1mm").tqarg( drawObject->left() ); + TQString y1Str = TQString("%1mm").tqarg( drawObject->top() ); + TQString x2Str = TQString("%1mm").tqarg( drawObject->left() + drawObject->width() ); + TQString y2Str = TQString("%1mm").tqarg( drawObject->top() + drawObject->height() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); if ( drawObject->hasProperty("draw:mirror-vertical") ) - { QString temp = y1Str; + { TQString temp = y1Str; y1Str = y2Str; y2Str = temp; } if ( drawObject->hasProperty("draw:mirror-horizontal") ) - { QString temp = x1Str; + { TQString temp = x1Str; x1Str = x2Str; x2Str = temp; } @@ -1090,7 +1090,7 @@ void PowerPointImport::processLine (DrawObject* drawObject, KoXmlWriter* xmlWrit xmlWriter->addAttribute( "svg:y2", y2Str ); xmlWriter->addAttribute( "svg:x1", x1Str ); xmlWriter->addAttribute( "svg:x2", x2Str ); - xmlWriter->addAttribute( "draw:layer", "layout" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); xmlWriter->endElement(); } @@ -1099,19 +1099,19 @@ void PowerPointImport::processSmiley (DrawObject* drawObject, KoXmlWriter* xmlWr { if( !drawObject ||!xmlWriter ) return; - QString widthStr = QString("%1mm").arg( drawObject->width() ); - QString heightStr = QString("%1mm").arg( drawObject->height() ); - QString xStr = QString("%1mm").arg( drawObject->left() ); - QString yStr = QString("%1mm").arg( drawObject->top() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString widthStr = TQString("%1mm").tqarg( drawObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( drawObject->height() ); + TQString xStr = TQString("%1mm").tqarg( drawObject->left() ); + TQString yStr = TQString("%1mm").tqarg( drawObject->top() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); - xmlWriter->startElement( "draw:custom-shape" ); + xmlWriter->startElement( "draw:custom-tqshape" ); xmlWriter->addAttribute( "draw:style-name", styleName ); xmlWriter->addAttribute( "svg:width", widthStr ); xmlWriter->addAttribute( "svg:height", heightStr ); xmlWriter->addAttribute( "svg:x", xStr ); xmlWriter->addAttribute( "svg:y", yStr ); - xmlWriter->addAttribute( "draw:layer", "layout" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); xmlWriter->startElement( "draw:glue-point" ); xmlWriter->addAttribute( "svg:x", 5 ); xmlWriter->addAttribute( "svg:y", 0 ); @@ -1136,7 +1136,7 @@ void PowerPointImport::processSmiley (DrawObject* drawObject, KoXmlWriter* xmlWr xmlWriter->addAttribute( "svg:x", 8.536 ); xmlWriter->addAttribute( "svg:y", 1.461 ); xmlWriter->endElement(); - xmlWriter->startElement( "draw:enhanced-geometry" ); + xmlWriter->startElement( "draw:enhanced-tqgeometry" ); xmlWriter->addAttribute( "draw:type", "smiley" ); xmlWriter->startElement( "draw:equation" ); xmlWriter->addAttribute( "draw:formula", "$0-15510 " ); @@ -1156,27 +1156,27 @@ void PowerPointImport::processSmiley (DrawObject* drawObject, KoXmlWriter* xmlWr xmlWriter->addAttribute( "draw:handle-range-y-minimum", 15510); xmlWriter->addAttribute("draw:handle-position","$0 top"); xmlWriter->endElement(); - xmlWriter->endElement(); // enhanced-geometry - xmlWriter->endElement(); // custom-shape + xmlWriter->endElement(); // enhanced-tqgeometry + xmlWriter->endElement(); // custom-tqshape } void PowerPointImport::processHeart (DrawObject* drawObject, KoXmlWriter* xmlWriter ) { if( !drawObject || !xmlWriter ) return; - QString widthStr = QString("%1mm").arg( drawObject->width() ); - QString heightStr = QString("%1mm").arg( drawObject->height() ); - QString xStr = QString("%1mm").arg( drawObject->left() ); - QString yStr = QString("%1mm").arg( drawObject->top() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString widthStr = TQString("%1mm").tqarg( drawObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( drawObject->height() ); + TQString xStr = TQString("%1mm").tqarg( drawObject->left() ); + TQString yStr = TQString("%1mm").tqarg( drawObject->top() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); - xmlWriter->startElement( "draw:custom-shape" ); + xmlWriter->startElement( "draw:custom-tqshape" ); xmlWriter->addAttribute( "draw:style-name", styleName ); xmlWriter->addAttribute( "svg:width", widthStr ); xmlWriter->addAttribute( "svg:height", heightStr ); xmlWriter->addAttribute( "svg:x", xStr ); xmlWriter->addAttribute( "svg:y", yStr ); - xmlWriter->addAttribute( "draw:layer", "layout" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); xmlWriter->startElement( "draw:glue-point" ); xmlWriter->addAttribute( "svg:x", 5 ); xmlWriter->addAttribute( "svg:y", 1 ); @@ -1193,22 +1193,22 @@ void PowerPointImport::processHeart (DrawObject* drawObject, KoXmlWriter* xmlWri xmlWriter->addAttribute( "svg:x", 8.553 ); xmlWriter->addAttribute( "svg:y", 5 ); xmlWriter->endElement(); - xmlWriter->startElement( "draw:enhanced-geometry" ); + xmlWriter->startElement( "draw:enhanced-tqgeometry" ); xmlWriter->addAttribute( "draw:type", "heart" ); - xmlWriter->endElement(); // enhanced-geometry - xmlWriter->endElement(); // custom-shape + xmlWriter->endElement(); // enhanced-tqgeometry + xmlWriter->endElement(); // custom-tqshape } void PowerPointImport::processFreeLine (DrawObject* drawObject, KoXmlWriter* xmlWriter) { if( !drawObject ||!xmlWriter ) return; - QString widthStr = QString("%1mm").arg( drawObject->width() ); - QString heightStr = QString("%1mm").arg( drawObject->height() ); - QString xStr = QString("%1mm").arg( drawObject->left() ); - QString yStr = QString("%1mm").arg( drawObject->top() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString widthStr = TQString("%1mm").tqarg( drawObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( drawObject->height() ); + TQString xStr = TQString("%1mm").tqarg( drawObject->left() ); + TQString yStr = TQString("%1mm").tqarg( drawObject->top() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); xmlWriter->startElement( "draw:path" ); xmlWriter->addAttribute( "draw:style-name", styleName ); @@ -1216,7 +1216,7 @@ void PowerPointImport::processFreeLine (DrawObject* drawObject, KoXmlWriter* xml xmlWriter->addAttribute( "svg:height", heightStr ); xmlWriter->addAttribute( "svg:x", xStr ); xmlWriter->addAttribute( "svg:y", yStr ); - xmlWriter->addAttribute( "draw:layer", "layout" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); xmlWriter->endElement(); // path } @@ -1228,63 +1228,63 @@ void PowerPointImport::processDrawingObjectForBody( DrawObject* drawObject, KoXm drawingObjectCounter++; - if (drawObject->shape() == DrawObject::Ellipse) + if (drawObject->tqshape() == DrawObject::Ellipse) { processEllipse (drawObject, xmlWriter ); } - else if (drawObject->shape() == DrawObject::Rectangle) + else if (drawObject->tqshape() == DrawObject::Rectangle) { processRectangle (drawObject, xmlWriter ); } - else if (drawObject->shape() == DrawObject::RoundRectangle) + else if (drawObject->tqshape() == DrawObject::RoundRectangle) { processRoundRectangle (drawObject, xmlWriter ); } - else if (drawObject->shape() == DrawObject::Diamond) + else if (drawObject->tqshape() == DrawObject::Diamond) { processDiamond (drawObject, xmlWriter ); } - else if (drawObject->shape() == DrawObject::IsoscelesTriangle | - drawObject->shape() == DrawObject::RightTriangle) + else if (drawObject->tqshape() == DrawObject::IsoscelesTriangle | + drawObject->tqshape() == DrawObject::RightTriangle) { processTriangle (drawObject, xmlWriter ); } - else if (drawObject->shape() == DrawObject::Trapezoid) + else if (drawObject->tqshape() == DrawObject::Trapezoid) { processTrapezoid (drawObject, xmlWriter ); } - else if (drawObject->shape() == DrawObject::Parallelogram) + else if (drawObject->tqshape() == DrawObject::Parallelogram) { processParallelogram( drawObject, xmlWriter); } - else if (drawObject->shape() == DrawObject::Hexagon) + else if (drawObject->tqshape() == DrawObject::Hexagon) { processHexagon ( drawObject, xmlWriter ); } - else if (drawObject->shape() == DrawObject::Octagon) + else if (drawObject->tqshape() == DrawObject::Octagon) { processOctagon ( drawObject, xmlWriter ); } - else if (drawObject->shape() == DrawObject::RightArrow | - drawObject->shape() == DrawObject::LeftArrow | - drawObject->shape() == DrawObject::UpArrow | - drawObject->shape() == DrawObject::DownArrow ) + else if (drawObject->tqshape() == DrawObject::RightArrow | + drawObject->tqshape() == DrawObject::LeftArrow | + drawObject->tqshape() == DrawObject::UpArrow | + drawObject->tqshape() == DrawObject::DownArrow ) { processArrow ( drawObject, xmlWriter ); } - else if (drawObject->shape() == DrawObject::Line) + else if (drawObject->tqshape() == DrawObject::Line) { processLine ( drawObject, xmlWriter ); } - else if (drawObject->shape() == DrawObject::Smiley) + else if (drawObject->tqshape() == DrawObject::Smiley) { processSmiley (drawObject, xmlWriter ); } - else if (drawObject->shape() == DrawObject::Heart) + else if (drawObject->tqshape() == DrawObject::Heart) { processHeart (drawObject, xmlWriter ); } - else if (drawObject->shape() == DrawObject::FreeLine) + else if (drawObject->tqshape() == DrawObject::FreeLine) { processFreeLine (drawObject, xmlWriter ); } @@ -1311,20 +1311,20 @@ void PowerPointImport::processTextObjectForBody( TextObject* textObject, KoXmlWr { if( !textObject || !xmlWriter ) return; - QString classStr = "subtitle"; + TQString classStr = "subtitle"; if( textObject->type() == TextObject::Title ) classStr = "title"; -// QString pStr = string( textObject->text() ).string(); - QString pStr; +// TQString pStr = string( textObject->text() ).string(); + TQString pStr; - QString widthStr = QString("%1mm").arg( textObject->width() ); - QString heightStr = QString("%1mm").arg( textObject->height() ); - QString xStr = QString("%1mm").arg( textObject->left() ); - QString yStr = QString("%1mm").arg( textObject->top() ); + TQString widthStr = TQString("%1mm").tqarg( textObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( textObject->height() ); + TQString xStr = TQString("%1mm").tqarg( textObject->left() ); + TQString yStr = TQString("%1mm").tqarg( textObject->top() ); xmlWriter->startElement( "draw:frame" ); xmlWriter->addAttribute( "presentation:style-name", "pr1" ); - xmlWriter->addAttribute( "draw:layer", "layout" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); xmlWriter->addAttribute( "svg:width", widthStr ); xmlWriter->addAttribute( "svg:height", heightStr ); xmlWriter->addAttribute( "svg:x", xStr ); @@ -1379,17 +1379,17 @@ void PowerPointImport::processSlideForBody( unsigned slideNo, Slide* slide, KoXm { if( !slide || !xmlWriter ) return; - QString nameStr = Libppt::string( slide->title() ).string(); + TQString nameStr = Libppt::string( slide->title() ).string(); if( nameStr.isEmpty() ) - nameStr = QString("page%1").arg(slideNo+1); + nameStr = TQString("page%1").tqarg(slideNo+1); - QString styleNameStr = QString("dp%1").arg(slideNo+1); + TQString styleNameStr = TQString("dp%1").tqarg(slideNo+1); xmlWriter->startElement( "draw:page" ); xmlWriter->addAttribute( "draw:master-page-name", "Default" ); xmlWriter->addAttribute( "draw:name", nameStr ); xmlWriter->addAttribute( "draw:style-name", styleNameStr ); - xmlWriter->addAttribute( "presentation:presentation-page-layout-name", "AL1T0"); + xmlWriter->addAttribute( "presentation:presentation-page-tqlayout-name", "AL1T0"); GroupObject* root = slide->rootObject(); if( root ) @@ -1439,9 +1439,9 @@ void PowerPointImport::processGroupObjectForStyle( GroupObject* groupObject, KoX if( !groupObject ||!xmlWriter ) return; } -QString hexname( const Color &c ) +TQString hexname( const Color &c ) { - QColor qc( c.red, c.green, c.blue ); + TQColor qc( c.red, c.green, c.blue ); return qc.name(); } @@ -1450,12 +1450,12 @@ void PowerPointImport::processDrawingObjectForStyle( DrawObject* drawObject, KoX if( !drawObject || !xmlWriter) return; drawingObjectCounter++; - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); xmlWriter->startElement( "style:style" ); xmlWriter->addAttribute( "style:name", styleName ); xmlWriter->addAttribute( "style:family", "graphic" ); - xmlWriter->addAttribute( "style:parent-style-name", "standard" ); + xmlWriter->addAttribute( "style:tqparent-style-name", "standard" ); xmlWriter->startElement( "style:graphic-properties" ); /* @@ -1463,7 +1463,7 @@ void PowerPointImport::processDrawingObjectForStyle( DrawObject* drawObject, KoX { xmlWriter->addAttribute( "draw:stroke", "dash" ); std::string s = drawObject->getStrProperty("draw:stroke-dash"); - QString ss( s.c_str() ); + TQString ss( s.c_str() ); xmlWriter->addAttribute( "draw:stroke-dash", ss ); } else xmlWriter->addAttribute( "draw:stroke", "dash" ); */ @@ -1477,7 +1477,7 @@ void PowerPointImport::processDrawingObjectForStyle( DrawObject* drawObject, KoX { xmlWriter->addAttribute( "draw:stroke", "dash" ); std::string s = drawObject->getStrProperty("draw:stroke-dash"); - QString ss( s.c_str() ); + TQString ss( s.c_str() ); xmlWriter->addAttribute( "draw:stroke-dash", ss ); qDebug("=============stroke dash==================="); // qDebug("test %g\n",angka); @@ -1490,7 +1490,7 @@ void PowerPointImport::processDrawingObjectForStyle( DrawObject* drawObject, KoX if( drawObject->hasProperty( "svg:stroke-width" ) ) { double strokeWidth = drawObject->getDoubleProperty("svg:stroke-width" ); - xmlWriter->addAttribute( "svg:stroke-width",QString("%1mm").arg( strokeWidth ) ); + xmlWriter->addAttribute( "svg:stroke-width",TQString("%1mm").tqarg( strokeWidth ) ); } if( drawObject->hasProperty( "svg:stroke-color" ) ) @@ -1502,25 +1502,25 @@ void PowerPointImport::processDrawingObjectForStyle( DrawObject* drawObject, KoX if( drawObject->hasProperty( "draw:marker-start" ) ) { std::string s = drawObject->getStrProperty("draw:marker-start"); - QString ss( s.c_str() ); + TQString ss( s.c_str() ); xmlWriter->addAttribute( "draw:marker-start", ss ); } if( drawObject->hasProperty( "draw:marker-end" ) ) { std::string s = drawObject->getStrProperty("draw:marker-end"); - QString ss( s.c_str() ); + TQString ss( s.c_str() ); xmlWriter->addAttribute( "draw:marker-end", ss); } /* if( drawObject->hasProperty( "draw:marker-start-length" ) ) { std::string s = drawObject->getStrProperty("draw:marker-start-length"); - QString ss( s.c_str() ); + TQString ss( s.c_str() ); xmlWriter->addAttribute("draw:marker-start-length", ss ); } if( drawObject->hasProperty( "draw:marker-end-length" ) ) { std::string s = drawObject->getStrProperty("draw:marker-end-length"); - QString ss( s.c_str() ); + TQString ss( s.c_str() ); xmlWriter->addAttribute( "draw:marker-end-length", ss); } */ @@ -1528,14 +1528,14 @@ void PowerPointImport::processDrawingObjectForStyle( DrawObject* drawObject, KoX { double strokeWidth = drawObject->getDoubleProperty("svg:stroke-width" ); double arrowWidth = (drawObject->getDoubleProperty("draw:marker-start-width") * strokeWidth); - xmlWriter->addAttribute( "draw:marker-start-width",QString("%1cm").arg( arrowWidth ) ); + xmlWriter->addAttribute( "draw:marker-start-width",TQString("%1cm").tqarg( arrowWidth ) ); } if( drawObject->hasProperty( "draw:marker-end-width" ) ) { double strokeWidth = drawObject->getDoubleProperty("svg:stroke-width" ); double arrowWidth = (drawObject->getDoubleProperty("draw:marker-end-width") * strokeWidth); - xmlWriter->addAttribute( "draw:marker-end-width",QString("%1cm").arg( arrowWidth ) ); + xmlWriter->addAttribute( "draw:marker-end-width",TQString("%1cm").tqarg( arrowWidth ) ); } @@ -1543,7 +1543,7 @@ void PowerPointImport::processDrawingObjectForStyle( DrawObject* drawObject, KoX if( drawObject->hasProperty( "draw:fill" ) ) { std::string s = drawObject->getStrProperty("draw:fill"); - QString ss( s.c_str() ); + TQString ss( s.c_str() ); xmlWriter->addAttribute( "draw:fill", ss); } @@ -1569,19 +1569,19 @@ void PowerPointImport::processDrawingObjectForStyle( DrawObject* drawObject, KoX if( drawObject->hasProperty( "draw:shadow-opacity" ) ) { double opacity = drawObject->getDoubleProperty("draw:shadow-opacity") ; - xmlWriter->addAttribute( "draw:shadow-opacity",QString("%1%").arg( opacity ) ); + xmlWriter->addAttribute( "draw:shadow-opacity",TQString("%1%").tqarg( opacity ) ); } if( drawObject->hasProperty( "draw:shadow-offset-x" ) ) { double offset = drawObject->getDoubleProperty("draw:shadow-offset-x") ; - xmlWriter->addAttribute( "draw:shadow-offset-x",QString("%1cm").arg( offset ) ); + xmlWriter->addAttribute( "draw:shadow-offset-x",TQString("%1cm").tqarg( offset ) ); } if( drawObject->hasProperty( "draw:shadow-offset-y" ) ) { double offset = drawObject->getDoubleProperty("draw:shadow-offset-y"); - xmlWriter->addAttribute( "draw:shadow-offset-y",QString("%1cm").arg( offset ) ); + xmlWriter->addAttribute( "draw:shadow-offset-y",TQString("%1cm").tqarg( offset ) ); } diff --git a/filters/kpresenter/powerpoint/import/powerpointimport.h b/filters/kpresenter/powerpoint/import/powerpointimport.h index 6c6774ab..5c3a73bc 100644 --- a/filters/kpresenter/powerpoint/import/powerpointimport.h +++ b/filters/kpresenter/powerpoint/import/powerpointimport.h @@ -23,7 +23,7 @@ #include <KoFilter.h> #include <KoStore.h> -#include <qcstring.h> +#include <tqcstring.h> #include "libppt.h" @@ -34,20 +34,21 @@ class KoXmlWriter; class PowerPointImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - PowerPointImport ( QObject *parent, const char* name, const QStringList& ); + PowerPointImport ( TQObject *tqparent, const char* name, const TQStringList& ); virtual ~PowerPointImport(); - virtual KoFilter::ConversionStatus convert( const QCString& from, - const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, + const TQCString& to ); private: class Private; Private* d; - QByteArray createManifest(); - QByteArray createStyles(); - QByteArray createContent(); + TQByteArray createManifest(); + TQByteArray createStyles(); + TQByteArray createContent(); int drawingObjectCounter; diff --git a/filters/kpresenter/powerpoint/libppt/objects.cpp b/filters/kpresenter/powerpoint/libppt/objects.cpp index 29870cbd..82359d15 100644 --- a/filters/kpresenter/powerpoint/libppt/objects.cpp +++ b/filters/kpresenter/powerpoint/libppt/objects.cpp @@ -139,7 +139,7 @@ void Object::setBackground( bool bg ) bool Object::hasProperty( std::string name ) { std::map<std::string,PropertyValue>::const_iterator i; - i = d->properties.find( name ); + i = d->properties.tqfind( name ); if( i == d->properties.end() ) return false; else @@ -379,7 +379,7 @@ void GroupObject::takeObject( Object* object ) class DrawObject::Private { public: - unsigned shape; + unsigned tqshape; bool isVerFlip; bool isHorFlip; }; @@ -387,7 +387,7 @@ public: DrawObject::DrawObject() { d = new Private; - d->shape = None; + d->tqshape = None; } DrawObject::~DrawObject() @@ -395,14 +395,14 @@ DrawObject::~DrawObject() delete d; } -unsigned DrawObject::shape() const +unsigned DrawObject::tqshape() const { - return d->shape; + return d->tqshape; } void DrawObject::setShape( unsigned s ) { - d->shape = s; + d->tqshape = s; } bool DrawObject::isVerFlip() const diff --git a/filters/kpresenter/powerpoint/libppt/objects.h b/filters/kpresenter/powerpoint/libppt/objects.h index 823e2a75..a9160897 100644 --- a/filters/kpresenter/powerpoint/libppt/objects.h +++ b/filters/kpresenter/powerpoint/libppt/objects.h @@ -103,7 +103,7 @@ public: Body = 1, Notes = 2, NotUsed = 3, - Other = 4, // text in a shape + Other = 4, // text in a tqshape CenterBody = 5, // subtitle in title slide CenterTitle = 6, // title in title slide HalfBody = 7, // body in two-column slide @@ -184,7 +184,7 @@ public: virtual ~DrawObject(); virtual bool isDrawing() const { return true; } - unsigned shape() const; + unsigned tqshape() const; void setShape( unsigned s ); bool isVerFlip() const; diff --git a/filters/kpresenter/powerpoint/libppt/pole.cpp b/filters/kpresenter/powerpoint/libppt/pole.cpp index 2a78b79f..daab8ff9 100644 --- a/filters/kpresenter/powerpoint/libppt/pole.cpp +++ b/filters/kpresenter/powerpoint/libppt/pole.cpp @@ -94,7 +94,7 @@ class DirEntry { public: bool valid; // false if invalid (should be skipped) - std::string name; // the name, not in unicode anymore + std::string name; // the name, not in tqunicode anymore bool dir; // true if directory unsigned long size; // size (not valid if directory) unsigned long start; // starting block @@ -113,9 +113,9 @@ class DirTree DirEntry* entry( unsigned index ); DirEntry* entry( const std::string& name, bool create=false ); int indexOf( DirEntry* e ); - int parent( unsigned index ); + int tqparent( unsigned index ); std::string fullName( unsigned index ); - std::vector<unsigned> children( unsigned index ); + std::vector<unsigned> tqchildren( unsigned index ); void load( unsigned char* buffer, unsigned len ); void save( unsigned char* buffer ); unsigned size(); @@ -503,13 +503,13 @@ int DirTree::indexOf( DirEntry* e ) return -1; } -int DirTree::parent( unsigned index ) +int DirTree::tqparent( unsigned index ) { - // brute-force, basically we iterate for each entries, find its children - // and check if one of the children is 'index' + // brute-force, basically we iterate for each entries, find its tqchildren + // and check if one of the tqchildren is 'index' for( unsigned j=0; j<entryCount(); j++ ) { - std::vector<unsigned> chi = children( j ); + std::vector<unsigned> chi = tqchildren( j ); for( unsigned i=0; i<chi.size();i++ ) if( chi[i] == index ) return j; @@ -525,7 +525,7 @@ std::string DirTree::fullName( unsigned index ) std::string result = entry( index )->name; result.insert( 0, "/" ); - int p = parent( index ); + int p = tqparent( index ); DirEntry * _entry = 0; while( p > 0 ) { @@ -573,8 +573,8 @@ DirEntry* DirTree::entry( const std::string& name, bool create ) for( it = names.begin(); it != names.end(); ++it ) { - // find among the children of index - std::vector<unsigned> chi = children( index ); + // find among the tqchildren of index + std::vector<unsigned> chi = tqchildren( index ); unsigned child = 0; for( unsigned i = 0; i < chi.size(); i++ ) { @@ -589,11 +589,11 @@ DirEntry* DirTree::entry( const std::string& name, bool create ) if( child > 0 ) index = child; else { - // not found among children + // not found among tqchildren if( !create ) return (DirEntry*)0; // create a new entry - unsigned parent = index; + unsigned tqparent = index; entries.push_back( DirEntry() ); index = entryCount()-1; DirEntry* e = entry( index ); @@ -604,8 +604,8 @@ DirEntry* DirTree::entry( const std::string& name, bool create ) e->start = 0; e->child = End; e->prev = End; - e->next = entry(parent)->child; - entry(parent)->child = index; + e->next = entry(tqparent)->child; + entry(tqparent)->child = index; } } @@ -646,7 +646,7 @@ void dirtree_find_siblings( DirTree* dirtree, std::vector<unsigned>& result, } } -std::vector<unsigned> DirTree::children( unsigned index ) +std::vector<unsigned> DirTree::tqchildren( unsigned index ) { std::vector<unsigned> result; @@ -1102,7 +1102,7 @@ StreamIO::StreamIO( StorageIO* s, DirEntry* e) updateCache(); } -// FIXME tell parent we're gone +// FIXME tell tqparent we're gone StreamIO::~StreamIO() { delete[] cache_data; @@ -1248,10 +1248,10 @@ std::list<std::string> Storage::entries( const std::string& path ) DirEntry* e = dt->entry( path, false ); if( e && e->dir ) { - unsigned parent = dt->indexOf( e ); - std::vector<unsigned> children = dt->children( parent ); - for( unsigned i = 0; i < children.size(); i++ ) - result.push_back( dt->entry( children[i] )->name ); + unsigned tqparent = dt->indexOf( e ); + std::vector<unsigned> tqchildren = dt->tqchildren( tqparent ); + for( unsigned i = 0; i < tqchildren.size(); i++ ) + result.push_back( dt->entry( tqchildren[i] )->name ); } return result; @@ -1270,7 +1270,7 @@ Stream::Stream( Storage* storage, const std::string& name ) io = storage->io->streamIO( name ); } -// FIXME tell parent we're gone +// FIXME tell tqparent we're gone Stream::~Stream() { delete io; diff --git a/filters/kpresenter/powerpoint/libppt/powerpoint.cpp b/filters/kpresenter/powerpoint/libppt/powerpoint.cpp index af035c69..eceb3411 100644 --- a/filters/kpresenter/powerpoint/libppt/powerpoint.cpp +++ b/filters/kpresenter/powerpoint/libppt/powerpoint.cpp @@ -394,12 +394,12 @@ Record* Record::create( unsigned type ) return record; } -void Record::setParent( Record* parent ) +void Record::setParent( Record* tqparent ) { - record_parent = parent; + record_parent = tqparent; } -const Record* Record::parent() const +const Record* Record::tqparent() const { return record_parent; } @@ -3088,10 +3088,10 @@ void StyleTextPropAtom::setData( unsigned /*size*/, const unsigned char* data, u atomData.charCount = charCount; atomData.depth = readU16(data+k); k += 2; - unsigned mask = readU32(data+6); + unsigned tqmask = readU32(data+6); k += 4; - if ( mask & 0xF ) + if ( tqmask & 0xF ) { int bulletFlag = readU16(data+k); k += 2; @@ -3100,99 +3100,99 @@ void StyleTextPropAtom::setData( unsigned /*size*/, const unsigned char* data, u atomData.bulletHardColor = ( bulletFlag & 4 ) ? 1 : 0; } - if ( mask & 0x0080 ) + if ( tqmask & 0x0080 ) { atomData.bulletChar = readU16(data+k); k += 2; } - if ( mask & 0x0010 ) + if ( tqmask & 0x0010 ) { atomData.bulletFont = readU16(data+k); k += 2; } - if ( mask & 0x0040 ) + if ( tqmask & 0x0040 ) { atomData.bulletHeight = readU16(data+k); k += 2; } - if ( mask & 0x0020 ) + if ( tqmask & 0x0020 ) { atomData.bulletColor = readU32(data+k); k += 4; } - if ( mask & 0x0F00 ) + if ( tqmask & 0x0F00 ) { - if ( mask & 0x800 ) + if ( tqmask & 0x800 ) { unsigned dummy = readU16(data+k); atomData.align = ( dummy & 3 ); k += 2; } - if ( mask & 0x400 ) + if ( tqmask & 0x400 ) { /*unsigned dummy =*/ readU16(data+k); k += 2; } - if ( mask & 0x200 ) + if ( tqmask & 0x200 ) { /*unsigned dummy =*/ readU16(data+k); k += 2; } - if ( mask & 0x100 ) + if ( tqmask & 0x100 ) { /*unsigned dummy =*/ readU16(data+k); k += 2; } } - if ( mask & 0x1000 ) + if ( tqmask & 0x1000 ) { atomData.lineFeed = readU16(data+k); k += 2; } - if ( mask & 0x2000 ) + if ( tqmask & 0x2000 ) { atomData.upperDist = readU16(data+k); k += 2; } - if ( mask & 0x4000 ) + if ( tqmask & 0x4000 ) { atomData.lowerDist = readU16(data+k); k += 2; } - if ( mask & 0x8000 ) + if ( tqmask & 0x8000 ) { /*unsigned dummy =*/ readU16(data+k); k += 2; } - if ( mask & 0x10000 ) + if ( tqmask & 0x10000 ) { /*unsigned dummy =*/ readU16(data+k); k += 2; } - if ( mask & 0xe0000 ) + if ( tqmask & 0xe0000 ) { unsigned dummy = readU16(data+k); - if ( mask & 0x20000 ) + if ( tqmask & 0x20000 ) atomData.asianLB1 = dummy & 1; - if ( mask & 0x40000 ) + if ( tqmask & 0x40000 ) atomData.asianLB2 = (dummy >> 1) & 1; - if ( mask & 0x80000 ) + if ( tqmask & 0x80000 ) atomData.asianLB3 = (dummy >> 2) & 1; k += 2; } - if ( mask & 0x200000 ) + if ( tqmask & 0x200000 ) { atomData.biDi = readU16(data+k); k += 2; @@ -3537,15 +3537,15 @@ const unsigned int SlideAtom::id = 1007; class SlideAtom::Private { public: - int layoutGeom; - int layoutPlaceholderId1; - int layoutPlaceholderId2; - int layoutPlaceholderId3; - int layoutPlaceholderId4; - int layoutPlaceholderId5; - int layoutPlaceholderId6; - int layoutPlaceholderId7; - int layoutPlaceholderId8; + int tqlayoutGeom; + int tqlayoutPlaceholderId1; + int tqlayoutPlaceholderId2; + int tqlayoutPlaceholderId3; + int tqlayoutPlaceholderId4; + int tqlayoutPlaceholderId5; + int tqlayoutPlaceholderId6; + int tqlayoutPlaceholderId7; + int tqlayoutPlaceholderId8; int masterId; int notesId; int flags; @@ -3554,15 +3554,15 @@ public: SlideAtom::SlideAtom() { d = new Private; - d->layoutGeom = 0; - d->layoutPlaceholderId1 = 0; - d->layoutPlaceholderId2 = 0; - d->layoutPlaceholderId3 = 0; - d->layoutPlaceholderId4 = 0; - d->layoutPlaceholderId5 = 0; - d->layoutPlaceholderId6 = 0; - d->layoutPlaceholderId7 = 0; - d->layoutPlaceholderId8 = 0; + d->tqlayoutGeom = 0; + d->tqlayoutPlaceholderId1 = 0; + d->tqlayoutPlaceholderId2 = 0; + d->tqlayoutPlaceholderId3 = 0; + d->tqlayoutPlaceholderId4 = 0; + d->tqlayoutPlaceholderId5 = 0; + d->tqlayoutPlaceholderId6 = 0; + d->tqlayoutPlaceholderId7 = 0; + d->tqlayoutPlaceholderId8 = 0; d->masterId = 0; d->notesId = 0; d->flags = 0; @@ -3573,39 +3573,39 @@ SlideAtom::~SlideAtom() delete d; } -int SlideAtom::layoutGeom() const +int SlideAtom::tqlayoutGeom() const { - return d->layoutGeom; + return d->tqlayoutGeom; } -void SlideAtom::setLayoutGeom(int layoutGeom ) +void SlideAtom::setLayoutGeom(int tqlayoutGeom ) { - d->layoutGeom = layoutGeom; + d->tqlayoutGeom = tqlayoutGeom; } -int SlideAtom::layoutPlaceholderId() const +int SlideAtom::tqlayoutPlaceholderId() const { - return d->layoutPlaceholderId1; - return d->layoutPlaceholderId2; - return d->layoutPlaceholderId3; - return d->layoutPlaceholderId4; - return d->layoutPlaceholderId5; - return d->layoutPlaceholderId6; - return d->layoutPlaceholderId7; - return d->layoutPlaceholderId8; + return d->tqlayoutPlaceholderId1; + return d->tqlayoutPlaceholderId2; + return d->tqlayoutPlaceholderId3; + return d->tqlayoutPlaceholderId4; + return d->tqlayoutPlaceholderId5; + return d->tqlayoutPlaceholderId6; + return d->tqlayoutPlaceholderId7; + return d->tqlayoutPlaceholderId8; } -void SlideAtom::setLayoutPlaceholderId(int layoutPlaceholderId1, int layoutPlaceholderId2,int layoutPlaceholderId3,int layoutPlaceholderId4,int layoutPlaceholderId5,int layoutPlaceholderId6,int layoutPlaceholderId7,int layoutPlaceholderId8) +void SlideAtom::setLayoutPlaceholderId(int tqlayoutPlaceholderId1, int tqlayoutPlaceholderId2,int tqlayoutPlaceholderId3,int tqlayoutPlaceholderId4,int tqlayoutPlaceholderId5,int tqlayoutPlaceholderId6,int tqlayoutPlaceholderId7,int tqlayoutPlaceholderId8) { - d->layoutPlaceholderId1 = layoutPlaceholderId1; - d->layoutPlaceholderId2 = layoutPlaceholderId2; - d->layoutPlaceholderId3 = layoutPlaceholderId3; - d->layoutPlaceholderId4 = layoutPlaceholderId4; - d->layoutPlaceholderId5 = layoutPlaceholderId5; - d->layoutPlaceholderId6 = layoutPlaceholderId6; - d->layoutPlaceholderId7 = layoutPlaceholderId7; - d->layoutPlaceholderId8 = layoutPlaceholderId8; + d->tqlayoutPlaceholderId1 = tqlayoutPlaceholderId1; + d->tqlayoutPlaceholderId2 = tqlayoutPlaceholderId2; + d->tqlayoutPlaceholderId3 = tqlayoutPlaceholderId3; + d->tqlayoutPlaceholderId4 = tqlayoutPlaceholderId4; + d->tqlayoutPlaceholderId5 = tqlayoutPlaceholderId5; + d->tqlayoutPlaceholderId6 = tqlayoutPlaceholderId6; + d->tqlayoutPlaceholderId7 = tqlayoutPlaceholderId7; + d->tqlayoutPlaceholderId8 = tqlayoutPlaceholderId8; } int SlideAtom::masterId() const @@ -3650,16 +3650,16 @@ void SlideAtom::setData( unsigned , const unsigned char* data ) void SlideAtom::dump( std::ostream& out ) const { out << "SlideAtom" << std::endl; - out << "layoutGeom " << layoutGeom() << std::endl; - // out << "layoutPlaceholderId " << layoutPlaceholderId() <<std::endl; - out << "layoutPlaceholderId1 " << d->layoutPlaceholderId1 <<std::endl; - out << "layoutPlaceholderId2 " << d->layoutPlaceholderId2 <<std::endl; - out << "layoutPlaceholderId3 " << d->layoutPlaceholderId3 <<std::endl; - out << "layoutPlaceholderId4 " << d->layoutPlaceholderId4 <<std::endl; - out << "layoutPlaceholderId5 " << d->layoutPlaceholderId5 <<std::endl; - out << "layoutPlaceholderId6 " << d->layoutPlaceholderId6 <<std::endl; - out << "layoutPlaceholderId7 " << d->layoutPlaceholderId7 <<std::endl; - out << "layoutPlaceholderId8 " << d->layoutPlaceholderId8 <<std::endl; + out << "tqlayoutGeom " << tqlayoutGeom() << std::endl; + // out << "tqlayoutPlaceholderId " << tqlayoutPlaceholderId() <<std::endl; + out << "tqlayoutPlaceholderId1 " << d->tqlayoutPlaceholderId1 <<std::endl; + out << "tqlayoutPlaceholderId2 " << d->tqlayoutPlaceholderId2 <<std::endl; + out << "tqlayoutPlaceholderId3 " << d->tqlayoutPlaceholderId3 <<std::endl; + out << "tqlayoutPlaceholderId4 " << d->tqlayoutPlaceholderId4 <<std::endl; + out << "tqlayoutPlaceholderId5 " << d->tqlayoutPlaceholderId5 <<std::endl; + out << "tqlayoutPlaceholderId6 " << d->tqlayoutPlaceholderId6 <<std::endl; + out << "tqlayoutPlaceholderId7 " << d->tqlayoutPlaceholderId7 <<std::endl; + out << "tqlayoutPlaceholderId8 " << d->tqlayoutPlaceholderId8 <<std::endl; out << "masterId " << masterId() << std::endl; out << "notesId " << notesId() << std::endl; out << "flags " << flags() << std::endl; @@ -4105,7 +4105,7 @@ const unsigned int msofbtSpAtom::id = 61450; /* F00A */ class msofbtSpAtom::Private { public: - unsigned long shapeId; + unsigned long tqshapeId; unsigned long persistentFlag; bool background; bool hFlip; @@ -4115,7 +4115,7 @@ public: msofbtSpAtom ::msofbtSpAtom () { d = new Private; - d->shapeId = 0; + d->tqshapeId = 0; d->persistentFlag = 0; d->background = false; d->hFlip = false; @@ -4127,17 +4127,17 @@ msofbtSpAtom ::~msofbtSpAtom () delete d; } -unsigned long msofbtSpAtom::shapeId() const +unsigned long msofbtSpAtom::tqshapeId() const { - return d->shapeId; + return d->tqshapeId; } void msofbtSpAtom::setShapeId( unsigned long id ) { - d->shapeId = id; + d->tqshapeId = id; } -const char* msofbtSpAtom::shapeTypeAsString() const +const char* msofbtSpAtom::tqshapeTypeAsString() const { switch( instance() ) { @@ -5453,7 +5453,7 @@ int PPTReader::indexPersistence( unsigned long ofs ) return 0; } -void PPTReader::loadRecord( Record* parent ) +void PPTReader::loadRecord( Record* tqparent ) { // FIXME unsigned char buffer[65536]; @@ -5472,7 +5472,7 @@ void PPTReader::loadRecord( Record* parent ) Record* record = Record::create( type ); if( record ) { - record->setParent( parent ); + record->setParent( tqparent ); record->setPosition( pos ); record->setInstance( instance ); @@ -5821,7 +5821,7 @@ void PPTReader::handleEscherGroupAtom( msofbtSpgrAtom* atom ) // set rect bound of current group - // this is shape for the group, no need to + // this is tqshape for the group, no need to d->isShapeGroup = true; } diff --git a/filters/kpresenter/powerpoint/libppt/powerpoint.h b/filters/kpresenter/powerpoint/libppt/powerpoint.h index 49950817..ea293ae5 100644 --- a/filters/kpresenter/powerpoint/libppt/powerpoint.h +++ b/filters/kpresenter/powerpoint/libppt/powerpoint.h @@ -63,9 +63,9 @@ public: */ virtual bool isContainer() const { return false; } - void setParent( Record* parent ); + void setParent( Record* tqparent ); - const Record* parent() const; + const Record* tqparent() const; /** Sets the data for this record. @@ -1262,12 +1262,12 @@ public: SlideAtom(); ~SlideAtom(); - int layoutGeom() const; - void setLayoutGeom( int layoutGeom ); + int tqlayoutGeom() const; + void setLayoutGeom( int tqlayoutGeom ); // see OEPlaceHolderAtom - int layoutPlaceholderId() const; - // void setLayoutPlaceholderId(int layoutPlaceholderId); - void setLayoutPlaceholderId(int layoutPlaceholderId1, int layoutPlaceholderId2,int layoutPlaceholderId3,int layoutPlaceholderId4,int layoutPlaceholderId5,int layoutPlaceholderId6,int layoutPlaceholderId7,int layoutPlaceholderId8); + int tqlayoutPlaceholderId() const; + // void setLayoutPlaceholderId(int tqlayoutPlaceholderId); + void setLayoutPlaceholderId(int tqlayoutPlaceholderId1, int tqlayoutPlaceholderId2,int tqlayoutPlaceholderId3,int tqlayoutPlaceholderId4,int tqlayoutPlaceholderId5,int tqlayoutPlaceholderId6,int tqlayoutPlaceholderId7,int tqlayoutPlaceholderId8); int masterId() const; void setMasterId( int masterId ); int notesId() const; @@ -1901,9 +1901,9 @@ public: msofbtSpAtom (); ~msofbtSpAtom (); - unsigned long shapeId() const; + unsigned long tqshapeId() const; void setShapeId( unsigned long id ); - const char* shapeTypeAsString() const; + const char* tqshapeTypeAsString() const; unsigned long persistentFlag() const; void setPersistentFlag( unsigned long persistentFlag ); @@ -1957,10 +1957,10 @@ public: FillSolid, // Fill with a solid color FillPattern, // Fill with a pattern (bitmap) FillTexture, // A texture (pattern with its own color map) - FillPicture, // Center a picture in the shape + FillPicture, // Center a picture in the tqshape FillShade, // Shade from start to end points FillShadeCenter, // Shade from bounding rectangle to end point - FillShadeShape, // Shade from shape outline to end point + FillShadeShape, // Shade from tqshape outline to end point FillShadeScale, // Similar to msofillShade, but the fillAngle FillShadeTitle, // special type - shade to title --- for PP FillBackground // Use the background fill color/pattern @@ -2095,8 +2095,8 @@ public: NotesBody, CenteredTitle, Subtitle, - VerticalTextTitle, - VerticalTextBody, + Qt::VerticalTextTitle, + Qt::VerticalTextBody, NotesSlideImage, Object, Graph, @@ -2385,9 +2385,9 @@ public: int ruid() const; // rule ID void setRuid( int ruid ); int align() const; - void setAlign( int align );// alignment + void setAlign( int align );// tqalignment int cProxies() const; - void setCProxies( int cProxies );// number of shapes governed by rule + void setCProxies( int cProxies );// number of tqshapes governed by rule void setData( unsigned size, const unsigned char* data ); const char* name(){ return "msofbtAlignRuleAtom "; } @@ -2497,7 +2497,7 @@ protected: void loadDocument(); int indexPersistence( unsigned long offset ); - void loadRecord( Record* parent ); + void loadRecord( Record* tqparent ); void handleRecord( Record* record, int type ); void handleContainer( Container* container, int type, unsigned size ); diff --git a/filters/kpresenter/powerpoint/libppt/ustring.cpp b/filters/kpresenter/powerpoint/libppt/ustring.cpp index b0a44e56..b574d7de 100644 --- a/filters/kpresenter/powerpoint/libppt/ustring.cpp +++ b/filters/kpresenter/powerpoint/libppt/ustring.cpp @@ -216,13 +216,13 @@ UString UString::null; static char *statBuffer = 0L; UChar::UChar(const UCharReference &c) - : uc( c.unicode() ) + : uc( c.tqunicode() ) { } UChar UChar::toLower() const { - // ### properly support unicode tolower + // ### properly support tqunicode tolower if (uc >= 256 || islower(uc)) return *this; @@ -526,7 +526,7 @@ unsigned long UString::toULong(bool *ok) const return static_cast<unsigned long>(d); } -int UString::find(const UString &f, int pos) const +int UString::tqfind(const UString &f, int pos) const { if (isNull()) return -1; @@ -644,7 +644,7 @@ bool Libppt::operator<(const UString& s1, const UString& s2) l++; } if (l < lmin) - return (c1->unicode() < c2->unicode()); + return (c1->tqunicode() < c2->tqunicode()); return (l1 < l2); } diff --git a/filters/kpresenter/powerpoint/libppt/ustring.h b/filters/kpresenter/powerpoint/libppt/ustring.h index dfadbc7d..087aff50 100644 --- a/filters/kpresenter/powerpoint/libppt/ustring.h +++ b/filters/kpresenter/powerpoint/libppt/ustring.h @@ -40,8 +40,8 @@ namespace Libppt { * @short Unicode character. * * UChar represents a 16 bit Unicode character. It's internal data - * representation is compatible to XChar2b and QChar. It's therefore - * possible to exchange data with X and Qt with shallow copies. + * representation is compatible to XChar2b and TQChar. It's therefore + * possible to exchange data with X and TQt with shallow copies. */ struct UChar { /** @@ -71,7 +71,7 @@ namespace Libppt { /** * @return the 16 bit Unicode value of the character */ - unsigned short unicode() const { return uc; } + unsigned short tqunicode() const { return uc; } public: /** * @return The character converted to lower case. @@ -128,7 +128,7 @@ namespace Libppt { /** * @return Unicode value. */ - unsigned short unicode() const { return ref().unicode(); } + unsigned short tqunicode() const { return ref().tqunicode(); } /** * @return Lower byte. */ @@ -334,7 +334,7 @@ namespace Libppt { * @return Position of first occurence of f starting at position pos. * -1 if the search was not successful. */ - int find(const UString &f, int pos = 0) const; + int tqfind(const UString &f, int pos = 0) const; /** * @return Position of first occurence of f searching backwards from * position pos. diff --git a/filters/kpresenter/svg/svgexport.cc b/filters/kpresenter/svg/svgexport.cc index 2be6eea1..20cff46d 100644 --- a/filters/kpresenter/svg/svgexport.cc +++ b/filters/kpresenter/svg/svgexport.cc @@ -18,8 +18,8 @@ Boston, MA 02110-1301 USA. */ -#include <qpicture.h> -#include <qpainter.h> +#include <tqpicture.h> +#include <tqpainter.h> #include <kmessagebox.h> @@ -38,7 +38,7 @@ typedef KGenericFactory<SvgExport, KoFilter> SvgExportFactory; K_EXPORT_COMPONENT_FACTORY( libkpresentersvgexport, SvgExportFactory( "svgexport" ) ) -SvgExport::SvgExport(KoFilter *, const char *, const QStringList&) +SvgExport::SvgExport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -48,8 +48,8 @@ SvgExport::~SvgExport() } -KoFilter::ConversionStatus -SvgExport::convert(const QCString& from, const QCString& to) +KoFilter::ConversiontqStatus +SvgExport::convert(const TQCString& from, const TQCString& to) { KoDocument * document = m_chain->inputDocument(); @@ -76,13 +76,13 @@ SvgExport::convert(const QCString& from, const QCString& to) kdWarning() << "Invalid document mimetype " << kpresenterdoc->mimeType() << endl; return KoFilter::NotImplemented; } - KoPageLayout layoutPage= kpresenterdoc->pageLayout(); - int width = int( layoutPage.ptWidth ); - int height = int( layoutPage.ptHeight ); + KoPageLayout tqlayoutPage= kpresenterdoc->pageLayout(); + int width = int( tqlayoutPage.ptWidth ); + int height = int( tqlayoutPage.ptHeight ); - QPicture picture; - QPainter painter(&picture); - QRect rect(QPoint(0, 0), QPoint(width, height)); + TQPicture picture; + TQPainter painter(&picture); + TQRect rect(TQPoint(0, 0), TQPoint(width, height)); kpresenterdoc->paintContent(painter, rect, false); painter.end(); diff --git a/filters/kpresenter/svg/svgexport.h b/filters/kpresenter/svg/svgexport.h index 7b4583b3..a11b20c2 100644 --- a/filters/kpresenter/svg/svgexport.h +++ b/filters/kpresenter/svg/svgexport.h @@ -26,12 +26,13 @@ class SvgExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - SvgExport(KoFilter *parent, const char *name, const QStringList&); + SvgExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~SvgExport(); - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; #endif // __SVGEXPORT_H__ diff --git a/filters/kpresenter/xbm/xbmexport.cpp b/filters/kpresenter/xbm/xbmexport.cpp index 148288dc..16a0818a 100644 --- a/filters/kpresenter/xbm/xbmexport.cpp +++ b/filters/kpresenter/xbm/xbmexport.cpp @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include <qpixmap.h> -#include <qpainter.h> +#include <tqpixmap.h> +#include <tqpainter.h> #include <kmessagebox.h> @@ -33,7 +33,7 @@ typedef KGenericFactory<XbmExport, KoFilter> xbmExportFactory; K_EXPORT_COMPONENT_FACTORY( libkpresenterxbmexport, xbmExportFactory( "xbmexport" ) ) -XbmExport::XbmExport(KoFilter *fil, const char *name, const QStringList&lst) +XbmExport::XbmExport(KoFilter *fil, const char *name, const TQStringList&lst) : ImageExport(fil,name,lst) { } @@ -58,7 +58,7 @@ bool XbmExport::extraImageAttribute() } -bool XbmExport::saveImage( QString fileName) +bool XbmExport::saveImage( TQString fileName) { bool ret = pixmap.save( fileName, "XBM" ); // Save the image. diff --git a/filters/kpresenter/xbm/xbmexport.h b/filters/kpresenter/xbm/xbmexport.h index 065e52d5..9079f950 100644 --- a/filters/kpresenter/xbm/xbmexport.h +++ b/filters/kpresenter/xbm/xbmexport.h @@ -25,11 +25,12 @@ class XbmExport : public ImageExport { Q_OBJECT + TQ_OBJECT public: - XbmExport(KoFilter *parent, const char *name, const QStringList&); + XbmExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~XbmExport(); - virtual bool saveImage( QString fileName); + virtual bool saveImage( TQString fileName); virtual bool extraImageAttribute(); virtual const char * exportFormat(); }; diff --git a/filters/kpresenter/xpm/xpmexport.cpp b/filters/kpresenter/xpm/xpmexport.cpp index 1456504e..87097f5f 100644 --- a/filters/kpresenter/xpm/xpmexport.cpp +++ b/filters/kpresenter/xpm/xpmexport.cpp @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include <qpixmap.h> -#include <qpainter.h> +#include <tqpixmap.h> +#include <tqpainter.h> #include <kmessagebox.h> @@ -33,7 +33,7 @@ typedef KGenericFactory<XpmExport, KoFilter> xpmExportFactory; K_EXPORT_COMPONENT_FACTORY( libkpresenterxpmexport, xpmExportFactory( "xpmexport" ) ) -XpmExport::XpmExport(KoFilter *fil, const char *name, const QStringList&lst) +XpmExport::XpmExport(KoFilter *fil, const char *name, const TQStringList&lst) : ImageExport(fil,name,lst) { } @@ -58,7 +58,7 @@ bool XpmExport::extraImageAttribute() } -bool XpmExport::saveImage( QString fileName) +bool XpmExport::saveImage( TQString fileName) { bool ret = pixmap.save( fileName, "XPM" ); // Save the image. diff --git a/filters/kpresenter/xpm/xpmexport.h b/filters/kpresenter/xpm/xpmexport.h index 8ccec46c..14b14b6c 100644 --- a/filters/kpresenter/xpm/xpmexport.h +++ b/filters/kpresenter/xpm/xpmexport.h @@ -25,11 +25,12 @@ class XpmExport : public ImageExport { Q_OBJECT + TQ_OBJECT public: - XpmExport(KoFilter *parent, const char *name, const QStringList&); + XpmExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~XpmExport(); - virtual bool saveImage( QString fileName); + virtual bool saveImage( TQString fileName); virtual bool extraImageAttribute(); virtual const char * exportFormat(); }; |