Browse Source

TQt4 port koffice

This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
tags/v3.5.13
tpearson 8 years ago
parent
commit
f008adb5a7
100 changed files with 2097 additions and 2058 deletions
  1. 5
    5
      example/example_factory.cc
  2. 3
    2
      example/example_factory.h
  3. 15
    15
      example/example_part.cc
  4. 9
    8
      example/example_part.h
  5. 9
    9
      example/example_view.cc
  6. 4
    3
      example/example_view.h
  7. 13
    13
      filters/generic_wrapper/generic_filter.cc
  8. 9
    8
      filters/generic_wrapper/generic_filter.h
  9. 17
    17
      filters/karbon/ai/ai88handler.cc
  10. 1
    1
      filters/karbon/ai/aicolor.h
  11. 95
    95
      filters/karbon/ai/aielement.cc
  12. 28
    28
      filters/karbon/ai/aielement.h
  13. 13
    13
      filters/karbon/ai/aiimport.cc
  14. 6
    5
      filters/karbon/ai/aiimport.h
  15. 12
    12
      filters/karbon/ai/ailexer.cc
  16. 6
    6
      filters/karbon/ai/ailexer.h
  17. 78
    78
      filters/karbon/ai/aiparserbase.cc
  18. 26
    26
      filters/karbon/ai/aiparserbase.h
  19. 7
    7
      filters/karbon/ai/karbonaiparserbase.cc
  20. 11
    11
      filters/karbon/ai/karbonaiparserbase.h
  21. 39
    39
      filters/karbon/applixgraphics/applixgraphicimport.cc
  22. 4
    3
      filters/karbon/applixgraphics/applixgraphicimport.h
  23. 27
    27
      filters/karbon/eps/epsexport.cc
  24. 5
    4
      filters/karbon/eps/epsexport.h
  25. 14
    14
      filters/karbon/eps/epsexportdlg.cc
  26. 6
    5
      filters/karbon/eps/epsexportdlg.h
  27. 14
    14
      filters/karbon/eps/epsimport.cc
  28. 6
    5
      filters/karbon/eps/epsimport.h
  29. 14
    14
      filters/karbon/eps/pscommentlexer.cc
  30. 5
    5
      filters/karbon/eps/pscommentlexer.h
  31. 26
    26
      filters/karbon/kontour/kontourimport.cpp
  32. 8
    7
      filters/karbon/kontour/kontourimport.h
  33. 201
    201
      filters/karbon/msod/msod.cc
  34. 93
    93
      filters/karbon/msod/msod.h
  35. 66
    66
      filters/karbon/msod/msodimport.cc
  36. 16
    15
      filters/karbon/msod/msodimport.h
  37. 138
    138
      filters/karbon/oodraw/oodrawimport.cc
  38. 24
    23
      filters/karbon/oodraw/oodrawimport.h
  39. 16
    16
      filters/karbon/png/pngexport.cc
  40. 3
    2
      filters/karbon/png/pngexport.h
  41. 2
    2
      filters/karbon/svg/color.h
  42. 40
    40
      filters/karbon/svg/svgexport.cc
  43. 15
    14
      filters/karbon/svg/svgexport.h
  44. 5
    5
      filters/karbon/svg/svggraphiccontext.h
  45. 140
    140
      filters/karbon/svg/svgimport.cc
  46. 33
    32
      filters/karbon/svg/svgimport.h
  47. 12
    12
      filters/karbon/wmf/wmfexport.cc
  48. 10
    9
      filters/karbon/wmf/wmfexport.h
  49. 6
    6
      filters/karbon/wmf/wmfimport.cc
  50. 3
    2
      filters/karbon/wmf/wmfimport.h
  51. 28
    28
      filters/karbon/wmf/wmfimportparser.cc
  52. 24
    24
      filters/karbon/wmf/wmfimportparser.h
  53. 2
    2
      filters/karbon/xaml/color.h
  54. 30
    30
      filters/karbon/xaml/xamlexport.cc
  55. 12
    11
      filters/karbon/xaml/xamlexport.h
  56. 3
    3
      filters/karbon/xaml/xamlgraphiccontext.h
  57. 117
    117
      filters/karbon/xaml/xamlimport.cc
  58. 28
    27
      filters/karbon/xaml/xamlimport.h
  59. 122
    122
      filters/karbon/xcf/xcfexport.cc
  60. 5
    4
      filters/karbon/xcf/xcfexport.h
  61. 72
    72
      filters/karbon/xfig/xfigimport.cc
  62. 13
    12
      filters/karbon/xfig/xfigimport.h
  63. 8
    8
      filters/karbon/xfig/xfigimport_factory.cc
  64. 3
    2
      filters/karbon/xfig/xfigimport_factory.h
  65. 4
    4
      filters/kchart/bmp/bmpexport.cpp
  66. 3
    2
      filters/kchart/bmp/bmpexport.h
  67. 4
    4
      filters/kchart/jpeg/jpegexport.cpp
  68. 3
    2
      filters/kchart/jpeg/jpegexport.h
  69. 9
    9
      filters/kchart/libimageexport/imageexport.cpp
  70. 6
    5
      filters/kchart/libimageexport/imageexport.h
  71. 4
    4
      filters/kchart/mng/mngexport.cpp
  72. 3
    2
      filters/kchart/mng/mngexport.h
  73. 4
    4
      filters/kchart/png/pngexport.cpp
  74. 3
    2
      filters/kchart/png/pngexport.h
  75. 10
    10
      filters/kchart/svg/svgexport.cc
  76. 3
    2
      filters/kchart/svg/svgexport.h
  77. 4
    4
      filters/kchart/xbm/xbmexport.cpp
  78. 3
    2
      filters/kchart/xbm/xbmexport.h
  79. 4
    4
      filters/kchart/xpm/xpmexport.cpp
  80. 3
    2
      filters/kchart/xpm/xpmexport.h
  81. 12
    12
      filters/kformula/latex/latexexport.cc
  82. 5
    4
      filters/kformula/latex/latexexport.h
  83. 12
    12
      filters/kformula/mathml/mathmlexport.cc
  84. 5
    4
      filters/kformula/mathml/mathmlexport.h
  85. 13
    13
      filters/kformula/mathml/mathmlimport.cc
  86. 7
    6
      filters/kformula/mathml/mathmlimport.h
  87. 7
    7
      filters/kformula/png/pngexport.cc
  88. 5
    4
      filters/kformula/png/pngexport.h
  89. 62
    62
      filters/kformula/png/pngexportdia.cc
  90. 8
    7
      filters/kformula/png/pngexportdia.h
  91. 10
    10
      filters/kformula/svg/svgexport.cc
  92. 3
    2
      filters/kformula/svg/svgexport.h
  93. 21
    21
      filters/kivio/imageexport/kivio_imageexport.cpp
  94. 3
    2
      filters/kivio/imageexport/kivio_imageexport.h
  95. 6
    6
      filters/kivio/imageexport/kivio_imageexportdialog.cpp
  96. 4
    3
      filters/kivio/imageexport/kivio_imageexportdialog.h
  97. 12
    12
      filters/kivio/imageexport/kivio_imageexportwidget.ui
  98. 4
    4
      filters/kpresenter/bmp/bmpexport.cpp
  99. 3
    2
      filters/kpresenter/bmp/bmpexport.h
  100. 0
    0
      filters/kpresenter/jpeg/jpegexport.cpp

+ 5
- 5
example/example_factory.cc View File

@@ -30,8 +30,8 @@ K_EXPORT_COMPONENT_FACTORY( libexamplepart, ExampleFactory )
KInstance* ExampleFactory::s_global = 0L;
KAboutData* ExampleFactory::s_aboutData = 0L;

ExampleFactory::ExampleFactory( QObject* parent, const char* name )
: KoFactory( parent, name )
ExampleFactory::ExampleFactory( TQObject* tqparent, const char* name )
: KoFactory( tqparent, name )
{
global();
}
@@ -44,14 +44,14 @@ ExampleFactory::~ExampleFactory()
s_global = 0L;
}

KParts::Part* ExampleFactory::createPartObject( QWidget *parentWidget, const char *widgetName, QObject* parent, const char* name, const char* classname, const QStringList & )
KParts::Part* ExampleFactory::createPartObject( TQWidget *tqparentWidget, const char *widgetName, TQObject* tqparent, const char* name, const char* classname, const TQStringList & )
{
// If classname is "KoDocument", our host is a koffice application
// otherwise, the host wants us as a simple part, so switch to readonly and single view.
bool bWantKoDocument = ( strcmp( classname, "KoDocument" ) == 0 );

// parentWidget and widgetName are used by KoDocument for the "readonly+singleView" case.
ExamplePart *part = new ExamplePart( parentWidget, widgetName, parent, name, !bWantKoDocument );
// tqparentWidget and widgetName are used by KoDocument for the "readonly+singleView" case.
ExamplePart *part = new ExamplePart( tqparentWidget, widgetName, tqparent, name, !bWantKoDocument );

if ( !bWantKoDocument )
part->setReadWrite( false );

+ 3
- 2
example/example_factory.h View File

@@ -28,11 +28,12 @@ class KAboutData;
class ExampleFactory : public KoFactory
{
Q_OBJECT
TQ_OBJECT
public:
ExampleFactory( QObject* parent = 0, const char* name = 0 );
ExampleFactory( TQObject* tqparent = 0, const char* name = 0 );
~ExampleFactory();

virtual KParts::Part *createPartObject( QWidget *parentWidget = 0, const char *widgetName = 0, QObject *parent = 0, const char *name = 0, const char *classname = "KoDocument", const QStringList &args = QStringList() );
virtual KParts::Part *createPartObject( TQWidget *tqparentWidget = 0, const char *widgetName = 0, TQObject *tqparent = 0, const char *name = 0, const char *classname = "KoDocument", const TQStringList &args = TQStringList() );

static KInstance* global();


+ 15
- 15
example/example_part.cc View File

@@ -21,15 +21,15 @@
#include "example_factory.h"
#include "example_view.h"

#include <qpainter.h>
#include <tqpainter.h>

ExamplePart::ExamplePart( QWidget *parentWidget, const char *widgetName, QObject* parent, const char* name, bool singleViewMode )
: KoDocument( parentWidget, widgetName, parent, name, singleViewMode )
ExamplePart::ExamplePart( TQWidget *tqparentWidget, const char *widgetName, TQObject* tqparent, const char* name, bool singleViewMode )
: KoDocument( tqparentWidget, widgetName, tqparent, name, singleViewMode )
{
setInstance( ExampleFactory::global(), false );
}

bool ExamplePart::initDoc(InitDocFlags flags, QWidget* parentWidget)
bool ExamplePart::initDoc(InitDocFlags flags, TQWidget* tqparentWidget)
{
// If nothing is loaded, do initialize here
// Most KOffice applications use the template dialog here, with code like:
@@ -46,27 +46,27 @@ bool ExamplePart::initDoc(InitDocFlags flags, QWidget* parentWidget)
return TRUE;
}

KoView* ExamplePart::createViewInstance( QWidget* parent, const char* name )
KoView* ExamplePart::createViewInstance( TQWidget* tqparent, const char* name )
{
return new ExampleView( this, parent, name );
return new ExampleView( this, tqparent, name );
}

bool ExamplePart::loadXML( QIODevice *, const QDomDocument & )
bool ExamplePart::loadXML( TQIODevice *, const TQDomDocument & )
{
// TODO load the document from the QDomDocument
// TODO load the document from the TQDomDocument
return true;
}

QDomDocument ExamplePart::saveXML()
TQDomDocument ExamplePart::saveXML()
{
// TODO save the document into a QDomDocument
return QDomDocument();
// TODO save the document into a TQDomDocument
return TQDomDocument();
}

bool ExamplePart::loadOasis( const QDomDocument & doc, KoOasisStyles& oasisStyles,
const QDomDocument & settings, KoStore* store )
bool ExamplePart::loadOasis( const TQDomDocument & doc, KoOasisStyles& oasisStyles,
const TQDomDocument & settings, KoStore* store )
{
// TODO load the document from the QDomDocument
// TODO load the document from the TQDomDocument
return true;
}

@@ -76,7 +76,7 @@ bool ExamplePart::saveOasis( KoStore* store, KoXmlWriter* manifestWriter )
return true;
}

void ExamplePart::paintContent( QPainter& painter, const QRect& rect, bool /*transparent*/,
void ExamplePart::paintContent( TQPainter& painter, const TQRect& rect, bool /*transparent*/,
double /*zoomX*/, double /*zoomY*/ )
{
// ####### handle transparency

+ 9
- 8
example/example_part.h View File

@@ -25,22 +25,23 @@
class ExamplePart : public KoDocument
{
Q_OBJECT
TQ_OBJECT
public:
ExamplePart( QWidget *parentWidget = 0, const char *widgetName = 0, QObject* parent = 0, const char* name = 0, bool singleViewMode = false );
ExamplePart( TQWidget *tqparentWidget = 0, const char *widgetName = 0, TQObject* tqparent = 0, const char* name = 0, bool singleViewMode = false );

virtual void paintContent( QPainter& painter, const QRect& rect, bool transparent = FALSE, double zoomX = 1.0, double zoomY = 1.0 );
virtual void paintContent( TQPainter& painter, const TQRect& rect, bool transparent = FALSE, double zoomX = 1.0, double zoomY = 1.0 );

virtual bool initDoc(InitDocFlags flags, QWidget* parentWidget=0);
virtual bool initDoc(InitDocFlags flags, TQWidget* tqparentWidget=0);

virtual bool loadXML( QIODevice *, const QDomDocument & );
virtual QDomDocument saveXML();
virtual bool loadXML( TQIODevice *, const TQDomDocument & );
virtual TQDomDocument saveXML();

virtual bool loadOasis( const QDomDocument & doc, KoOasisStyles& oasisStyles,
const QDomDocument & settings, KoStore* store );
virtual bool loadOasis( const TQDomDocument & doc, KoOasisStyles& oasisStyles,
const TQDomDocument & settings, KoStore* store );
virtual bool saveOasis( KoStore* store, KoXmlWriter* manifestWriter );

protected:
virtual KoView* createViewInstance( QWidget* parent, const char* name );
virtual KoView* createViewInstance( TQWidget* tqparent, const char* name );
};

#endif

+ 9
- 9
example/example_view.cc View File

@@ -21,31 +21,31 @@
#include "example_factory.h"
#include "example_part.h"

#include <qpainter.h>
#include <qiconset.h>
#include <tqpainter.h>
#include <tqiconset.h>
#include <kaction.h>
#include <kstdaction.h>
#include <klocale.h>
#include <kdebug.h>

ExampleView::ExampleView( ExamplePart* part, QWidget* parent, const char* name )
: KoView( part, parent, name )
ExampleView::ExampleView( ExamplePart* part, TQWidget* tqparent, const char* name )
: KoView( part, tqparent, name )
{
setInstance( ExampleFactory::global() );
if ( !part->isReadWrite() ) // readonly case, e.g. when embedded into konqueror
setXMLFile( "example_readonly.rc" ); // simplified GUI
else
setXMLFile( "example.rc" );
KStdAction::copy(this, SLOT( copy() ), actionCollection(), "copy" );
KStdAction::cut(this, SLOT( cut() ), actionCollection(), "cut" );
KStdAction::copy(this, TQT_SLOT( copy() ), actionCollection(), "copy" );
KStdAction::cut(this, TQT_SLOT( cut() ), actionCollection(), "cut" );
// Note: Prefer KStdAction::* to any custom action if possible.
//m_cut = new KAction( i18n("&Cut"), "editcut", 0, this, SLOT( cut() ),
//m_cut = new KAction( i18n("&Cut"), "editcut", 0, this, TQT_SLOT( cut() ),
// actionCollection(), "cut");
}

void ExampleView::paintEvent( QPaintEvent* ev )
void ExampleView::paintEvent( TQPaintEvent* ev )
{
QPainter painter;
TQPainter painter;
painter.begin( this );

// ### TODO: Scaling

+ 4
- 3
example/example_view.h View File

@@ -23,22 +23,23 @@
#include <KoView.h>

class KAction;
class QPaintEvent;
class TQPaintEvent;

class ExamplePart;

class ExampleView : public KoView
{
Q_OBJECT
TQ_OBJECT
public:
ExampleView( ExamplePart* part, QWidget* parent = 0, const char* name = 0 );
ExampleView( ExamplePart* part, TQWidget* tqparent = 0, const char* name = 0 );

protected slots:
void cut();
void copy();

protected:
void paintEvent( QPaintEvent* );
void paintEvent( TQPaintEvent* );

virtual void updateReadWrite( bool readwrite );


+ 13
- 13
filters/generic_wrapper/generic_filter.cc View File

@@ -19,8 +19,8 @@

#include <stdlib.h>

#include <qtextcodec.h>
#include <qfile.h>
#include <tqtextcodec.h>
#include <tqfile.h>

#include <kdebug.h>
#include <KoFilterChain.h>
@@ -37,11 +37,11 @@ typedef KGenericFactory<GenericFilter, KoFilter> GenericFilterFactory;
K_EXPORT_COMPONENT_FACTORY( libgenerickofilter, GenericFilterFactory )


GenericFilter::GenericFilter(KoFilter *, const char *, const QStringList&) :
GenericFilter::GenericFilter(KoFilter *, const char *, const TQStringList&) :
KoFilter() {
}

KoFilter::ConversionStatus GenericFilter::convert( const QCString &from, const QCString &to )
KoFilter::ConversiontqStatus GenericFilter::convert( const TQCString &from, const TQCString &to )
{

//find the right script to use
@@ -80,14 +80,14 @@ KoFilter::ConversionStatus GenericFilter::convert( const QCString &from, const Q
return KoFilter::NotImplemented;
}

KoFilter::ConversionStatus GenericFilter::doImport()
KoFilter::ConversiontqStatus GenericFilter::doImport()
{
KTempFile temp(QString("genericfilter-"));
KTempFile temp(TQString("genericfilter-"));
temp.setAutoDelete(true);

QFile tempFile(temp.name());
TQFile tempFile(temp.name());

m_out = KoStore::createStore(&tempFile, KoStore::Write);
m_out = KoStore::createStore(TQT_TQIODEVICE(&tempFile), KoStore::Write);

if (!m_out || !m_out->open("root"))
{
@@ -97,15 +97,15 @@ KoFilter::ConversionStatus GenericFilter::doImport()
}
else
{
QString exec = m_exec + " " + KProcess::quote(m_chain->inputFile()) + " "
TQString exec = m_exec + " " + KProcess::quote(m_chain->inputFile()) + " "
+ KProcess::quote(m_chain->outputFile());
system(QFile::encodeName(exec));
system(TQFile::encodeName(exec));

kdDebug() << "Executing: " << exec << endl;

QFile outFile(m_chain->outputFile());
TQFile outFile(m_chain->outputFile());
outFile.open(IO_ReadOnly);
QByteArray outData = outFile.readAll();
TQByteArray outData = outFile.readAll();
if (outData.size()==0) {
m_out->close();
return KoFilter::UnexpectedEOF;
@@ -119,7 +119,7 @@ KoFilter::ConversionStatus GenericFilter::doImport()
return KoFilter::OK;
}

KoFilter::ConversionStatus GenericFilter::doExport()
KoFilter::ConversiontqStatus GenericFilter::doExport()
{
return KoFilter::NotImplemented;
}

+ 9
- 8
filters/generic_wrapper/generic_filter.h View File

@@ -20,8 +20,8 @@
#ifndef __GENERICFILTER_H__
#define __GENERICFILTER_H__

#include <qcstring.h>
#include <qstringlist.h>
#include <tqcstring.h>
#include <tqstringlist.h>

#include <kprocess.h>
#include <KoFilter.h>
@@ -30,17 +30,18 @@
class GenericFilter : public KoFilter
{
Q_OBJECT
TQ_OBJECT

public:
GenericFilter(KoFilter *parent, const char *name, const QStringList&);
GenericFilter(KoFilter *tqparent, const char *name, const TQStringList&);
virtual ~GenericFilter() {}

virtual KoFilter::ConversionStatus convert( const QCString& from,
const QCString& to );
virtual KoFilter::ConversiontqStatus convert( const TQCString& from,
const TQCString& to );
private:
KoFilter::ConversionStatus doImport();
KoFilter::ConversionStatus doExport();
QString m_to, m_from, m_exec;
KoFilter::ConversiontqStatus doImport();
KoFilter::ConversiontqStatus doExport();
TQString m_to, m_from, m_exec;
KoStore* m_out;
};


+ 17
- 17
filters/karbon/ai/ai88handler.cc View File

@@ -326,7 +326,7 @@ void AI88Handler::_handleSetFillPattern()
AIElement elem (m_delegate->m_stack.top());
m_delegate->m_stack.pop();

const QValueVector<AIElement> aval = elem.toElementArray();
const TQValueVector<AIElement> aval = elem.toElementArray();

double ka = m_delegate->getDoubleValue();
double k = m_delegate->getDoubleValue();
@@ -341,7 +341,7 @@ void AI88Handler::_handleSetFillPattern()
AIElement elem2 (m_delegate->m_stack.top());
m_delegate->m_stack.pop();

const QString &name = elem2.toString();
const TQString &name = elem2.toString();
if (m_delegate->m_gstateHandler) m_delegate->m_gstateHandler->gotFillPattern (name.latin1(), px, py, sx, sy, angle, rf, r, k, ka, aval);
}

@@ -350,7 +350,7 @@ void AI88Handler::_handleSetStrokePattern()
AIElement elem (m_delegate->m_stack.top());
m_delegate->m_stack.pop();

const QValueVector<AIElement> aval = elem.toElementArray();
const TQValueVector<AIElement> aval = elem.toElementArray();

double ka = m_delegate->getDoubleValue();
double k = m_delegate->getDoubleValue();
@@ -365,7 +365,7 @@ void AI88Handler::_handleSetStrokePattern()
AIElement elem2 (m_delegate->m_stack.top());
m_delegate->m_stack.pop();

const QString &name = elem2.toString();
const TQString &name = elem2.toString();
if (m_delegate->m_gstateHandler) m_delegate->m_gstateHandler->gotStrokePattern (name.latin1(), px, py, sx, sy, angle, rf, r, k, ka, aval);
}

@@ -406,7 +406,7 @@ void AI88Handler::_handleSetStrokeColorGray()
void AI88Handler::_handleSetFillColorCustom()
{
double g = m_delegate->getDoubleValue();
const QString name = m_delegate->getStringValue();
const TQString name = m_delegate->getStringValue();
double k = m_delegate->getDoubleValue();
double y = m_delegate->getDoubleValue();
double m = m_delegate->getDoubleValue();
@@ -426,7 +426,7 @@ void AI88Handler::_handleSetDash()
AIElement elem (m_delegate->m_stack.top());
m_delegate->m_stack.pop();

const QValueVector<AIElement> aval = elem.toElementArray();
const TQValueVector<AIElement> aval = elem.toElementArray();
if (m_delegate->m_gstateHandler) m_delegate->m_gstateHandler->gotDash (aval, fval);
// qDebug ("dash operation finished");
}
@@ -436,7 +436,7 @@ void AI88Handler::_handlePatternDefinition()
AIElement elem (m_delegate->m_stack.top());
m_delegate->m_stack.pop();

const QValueVector<AIElement> aval = elem.toElementArray();
const TQValueVector<AIElement> aval = elem.toElementArray();

double ury = m_delegate->getDoubleValue();
double urx = m_delegate->getDoubleValue();
@@ -446,7 +446,7 @@ void AI88Handler::_handlePatternDefinition()
AIElement elem2 (m_delegate->m_stack.top());
m_delegate->m_stack.pop();

const QString &name = elem2.toString();
const TQString &name = elem2.toString();

if (m_delegate->m_documentHandler) m_delegate->m_documentHandler->gotPatternDefinition (name.latin1(), aval, llx, lly, urx, ury);
}
@@ -455,7 +455,7 @@ void AI88Handler::_handleGsaveIncludeDocument() {
AIElement elem2 (m_delegate->m_stack.top());
m_delegate->m_stack.pop();

const QString &name = elem2.toString();
const TQString &name = elem2.toString();

int ury = m_delegate->getIntValue();
int urx = m_delegate->getIntValue();
@@ -465,7 +465,7 @@ void AI88Handler::_handleGsaveIncludeDocument() {
AIElement elem (m_delegate->m_stack.top());
m_delegate->m_stack.pop();

const QValueVector<AIElement> aval = elem.toElementArray();
const TQValueVector<AIElement> aval = elem.toElementArray();

if (m_delegate->m_embeddedHandler) m_delegate->m_embeddedHandler->gotGsaveIncludeDocument (aval, llx,lly,urx,ury,name.latin1());
}
@@ -491,7 +491,7 @@ void AI88Handler::_handleSetCurrentText() {
AIElement elem2 (m_delegate->m_stack.top());
m_delegate->m_stack.pop();

const QString &fontname = elem2.toReference();
const TQString &fontname = elem2.toReference();

if (m_delegate->m_textHandler) m_delegate->m_textHandler->gotFontDefinition (fontname.latin1(), size, leading, kerning, ta);

@@ -502,7 +502,7 @@ void AI88Handler::_handleTextBlock (TextOperation to) {
qDebug ("to element is (%s)",elem.typeName());
m_delegate->m_stack.pop();

const QValueVector<AIElement> aval = elem.toElementArray();
const TQValueVector<AIElement> aval = elem.toElementArray();

if (m_delegate->m_textHandler) m_delegate->m_textHandler->gotTextBlockBegin (aval, to);
}
@@ -511,7 +511,7 @@ void AI88Handler::_handleTextOutput () {
AIElement elem (m_delegate->m_stack.top());
m_delegate->m_stack.pop();

const QString &text = elem.toString();
const TQString &text = elem.toString();

int length = -1;

@@ -535,15 +535,15 @@ void AI88Handler::_handleFontEncoding()

AIElement elem (m_delegate->m_stack.top());
m_delegate->m_stack.pop();
const QString &oldFont = elem.toReference();
const TQString &oldFont = elem.toReference();

AIElement elem2 (m_delegate->m_stack.top());
m_delegate->m_stack.pop();
const QString &newFont = elem2.toReference();
const TQString &newFont = elem2.toReference();

AIElement elem3 (m_delegate->m_stack.top());
m_delegate->m_stack.pop();
const QValueVector<AIElement> encodingData = elem3.toElementArray();
const TQValueVector<AIElement> encodingData = elem3.toElementArray();

if (m_delegate->m_textHandler) m_delegate->m_textHandler->gotFontEncoding (encodingData, oldFont.latin1(), newFont.latin1());
}
@@ -551,7 +551,7 @@ void AI88Handler::_handleFontEncoding()
void AI88Handler::_handleSetStrokeColorCustom()
{
double g = m_delegate->getDoubleValue();
const QString name = m_delegate->getStringValue();
const TQString name = m_delegate->getStringValue();
double k = m_delegate->getDoubleValue();
double y = m_delegate->getDoubleValue();
double m = m_delegate->getDoubleValue();

+ 1
- 1
filters/karbon/ai/aicolor.h View File

@@ -20,7 +20,7 @@
#ifndef AICOLOR_H
#define AICOLOR_H

#include <qstring.h>
#include <tqstring.h>

/**
*@author

+ 95
- 95
filters/karbon/ai/aielement.cc View File

@@ -1,5 +1,5 @@
/* This file is part of the KDE project
Copyright (C) 2002, Dirk Schönberger <dirk.schoenberger@sz-online.de>
Copyright (C) 2002, Dirk Sch�nberger <dirk.schoenberger@sz-online.de>

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -18,7 +18,7 @@
*/

#include "aielement.h"
#include <qglobal.h>
#include <tqglobal.h>

AIElement::Private::Private()
{
@@ -34,23 +34,23 @@ AIElement::Private::Private( Private* d )
case AIElement::String:
case AIElement::Reference:
case AIElement::Operator:
value.ptr = new QString( *((QString*)d->value.ptr) );
value.ptr = new TQString( *((TQString*)d->value.ptr) );
break;
case AIElement::CString:
// QCString is explicit shared
value.ptr = new QCString( *((QCString*)d->value.ptr) );
// TQCString is explicit shared
value.ptr = new TQCString( *((TQCString*)d->value.ptr) );
break;
/* case AIElement::List:
value.ptr = new QValueList<AIElement>( *((QValueList<AIElement>*)d->value.ptr) );
value.ptr = new TQValueList<AIElement>( *((TQValueList<AIElement>*)d->value.ptr) );
break; */
case AIElement::ElementArray:
value.ptr = new QValueVector<AIElement>( *((QValueVector<AIElement>*)d->value.ptr) );
value.ptr = new TQValueVector<AIElement>( *((TQValueVector<AIElement>*)d->value.ptr) );
break;
case AIElement::Block:
value.ptr = new QValueVector<AIElement>( *((QValueVector<AIElement>*)d->value.ptr) );
value.ptr = new TQValueVector<AIElement>( *((TQValueVector<AIElement>*)d->value.ptr) );
break;
case AIElement::ByteArray:
value.ptr = new QByteArray( *((QByteArray*)d->value.ptr) );
value.ptr = new TQByteArray( *((TQByteArray*)d->value.ptr) );
break;
case AIElement::Int:
value.i = d->value.i;
@@ -83,22 +83,22 @@ void AIElement::Private::clear()
case AIElement::String:
case AIElement::Operator:
case AIElement::Reference:
delete (QString*)value.ptr;
delete (TQString*)value.ptr;
break;
case AIElement::CString:
delete (QCString*)value.ptr;
delete (TQCString*)value.ptr;
break;
/* case AIElement::List:
delete (QValueList<AIElement>*)value.ptr;
delete (TQValueList<AIElement>*)value.ptr;
break; */
case AIElement::ElementArray:
delete (QValueVector<AIElement>*)value.ptr;
delete (TQValueVector<AIElement>*)value.ptr;
break;
case AIElement::Block:
delete (QValueVector<AIElement>*)value.ptr;
delete (TQValueVector<AIElement>*)value.ptr;
break;
case AIElement::ByteArray:
delete (QByteArray*)value.ptr;
delete (TQByteArray*)value.ptr;
break;
case AIElement::Invalid:
case AIElement::Int:
@@ -136,7 +136,7 @@ AIElement::~AIElement()
/*!
Constructs a copy of the aielement, \a p, passed as the argument to this
constructor. Usually this is a deep copy, but a shallow copy is made
if the stored data type is explicitly shared, as e.g. QImage is.
if the stored data type is explicitly shared, as e.g. TQImage is.
*/
AIElement::AIElement( const AIElement& p )
{
@@ -147,25 +147,25 @@ AIElement::AIElement( const AIElement& p )
/*!
Constructs a new aielement with a string value, \a val.
*/
AIElement::AIElement( const QString& val, Type type )
AIElement::AIElement( const TQString& val, Type type )
{
d = new Private;
d->typ = type;
d->value.ptr = new QString( val );
d->value.ptr = new TQString( val );
}

/*!
Constructs a new aielement with a C-string value, \a val.

If you want to modify the QCString after you've passed it to this
If you want to modify the TQCString after you've passed it to this
constructor, we recommend passing a deep copy (see
QCString::copy()).
TQCString::copy()).
*/
AIElement::AIElement( const QCString& val )
AIElement::AIElement( const TQCString& val )
{
d = new Private;
d->typ = CString;
d->value.ptr = new QCString( val );
d->value.ptr = new TQCString( val );
}

/*!
@@ -180,7 +180,7 @@ AIElement::AIElement( const char* val )
if ( val == 0 )
return;
d->typ = CString;
d->value.ptr = new QCString( val );
d->value.ptr = new TQCString( val );
}

/*!
@@ -227,32 +227,32 @@ AIElement::AIElement( double val )
/*!
Constructs a new aielement with a list value, \a val.
*/
/* AIElement::AIElement( const QValueList<AIElement>& val )
/* AIElement::AIElement( const TQValueList<AIElement>& val )
{
d = new Private;
d->typ = List;
d->value.ptr = new QValueList<AIElement>( val );
d->value.ptr = new TQValueList<AIElement>( val );
} */

AIElement::AIElement( const QValueVector<AIElement>& val, Type type )
AIElement::AIElement( const TQValueVector<AIElement>& val, Type type )
{
d = new Private;
d->typ = type;
d->value.ptr = new QValueVector<AIElement>( val );
d->value.ptr = new TQValueVector<AIElement>( val );
}

AIElement::AIElement( const QByteArray& val )
AIElement::AIElement( const TQByteArray& val )
{
d = new Private;
d->typ = ByteArray;
d->value.ptr = new QByteArray( val );
d->value.ptr = new TQByteArray( val );
}

/*!
Assigns the value of the aielement \a aielement to this aielement.

This is a deep copy of the aielement, but note that if the aielement
holds an explicitly shared type such as QImage, a shallow copy
holds an explicitly shared type such as TQImage, a shallow copy
is performed.
*/
AIElement& AIElement::operator= ( const AIElement& aielement )
@@ -283,7 +283,7 @@ void AIElement::detach()
/*!
Returns the name of the type stored in the aielement.
The returned strings describe the C++ datatype used to store the
data: for example, "QFont", "QString", or "QValueList<AIElement>".
data: for example, "TQFont", TQSTRING_OBJECT_NAME_STRING, or "TQValueList<AIElement>".
An Invalid aielement returns 0.
*/
const char* AIElement::typeName() const
@@ -310,16 +310,16 @@ static const int ntypes = 11;
static const char* const type_map[ntypes] =
{
0,
// "QValueList<AIElement>",
"QString",
// "TQValueList<AIElement>",
TQSTRING_OBJECT_NAME_STRING,
"int",
"uint",
"double",
"QCString",
"TQCString",
"Operator",
"Reference",
"QValueVector<AIElement>",
"QByteArray",
"TQValueVector<AIElement>",
TQBYTEARRAY_OBJECT_NAME_STRING,
"uchar",
};

@@ -351,59 +351,59 @@ AIElement::Type AIElement::nameToType( const char* name )
}

/*!
Returns the aielement as a QString if the aielement has type()
Returns the aielement as a TQString if the aielement has type()
String, CString, ByteArray, Int, Uint, Double,
or QString::null otherwise.
or TQString() otherwise.

\sa asString()
*/
const QString AIElement::toString() const
const TQString AIElement::toString() const
{
if ( d->typ == CString )
return QString::fromLatin1( toCString() );
return TQString::tqfromLatin1( toCString() );
if ( d->typ == Int )
return QString::number( toInt() );
return TQString::number( toInt() );
if ( d->typ == UInt )
return QString::number( toUInt() );
return TQString::number( toUInt() );
if ( d->typ == Double )
return QString::number( toDouble() );
return TQString::number( toDouble() );
if ( d->typ == Byte )
return QString::number( toByte() );
return TQString::number( toByte() );
if ( d->typ != String )
return QString::null;
return *((QString*)d->value.ptr);
return TQString();
return *((TQString*)d->value.ptr);
}

const QString AIElement::toReference() const
const TQString AIElement::toReference() const
{
if ( d->typ != Reference )
return QString::null;
return *((QString*)d->value.ptr);
return TQString();
return *((TQString*)d->value.ptr);
}

const QString AIElement::toOperator() const
const TQString AIElement::toOperator() const
{
if ( d->typ != Operator )
return QString::null;
return *((QString*)d->value.ptr);
return TQString();
return *((TQString*)d->value.ptr);
}

/*!
Returns the aielement as a QCString if the aielement has type()
Returns the aielement as a TQCString if the aielement has type()
CString or String, or a 0 otherwise.

\sa asCString()
*/
const QCString AIElement::toCString() const
const TQCString AIElement::toCString() const
{
if ( d->typ == CString )
return *((QCString*)d->value.ptr);
return *((TQCString*)d->value.ptr);
if ( d->typ == String )
return ((QString*)d->value.ptr)->latin1();
return ((TQString*)d->value.ptr)->latin1();
if ( d->typ == Operator )
return ((QString*)d->value.ptr)->latin1();
return ((TQString*)d->value.ptr)->latin1();
if ( d->typ == Reference )
return ((QString*)d->value.ptr)->latin1();
return ((TQString*)d->value.ptr)->latin1();

return 0;
}
@@ -421,9 +421,9 @@ const QCString AIElement::toCString() const
int AIElement::toInt( bool * ok ) const
{
if( d->typ == String )
return ((QString*)d->value.ptr)->toInt( ok );
return ((TQString*)d->value.ptr)->toInt( ok );
if ( d->typ == CString )
return ((QCString*)d->value.ptr)->toInt( ok );
return ((TQCString*)d->value.ptr)->toInt( ok );
if ( ok )
*ok = canCast( UInt );
if( d->typ == Int )
@@ -440,9 +440,9 @@ int AIElement::toInt( bool * ok ) const
uchar AIElement::toByte( bool * ok ) const
{
if( d->typ == String )
return ((QString*)d->value.ptr)->toShort( ok );
return ((TQString*)d->value.ptr)->toShort( ok );
if ( d->typ == CString )
return ((QCString*)d->value.ptr)->toShort( ok );
return ((TQCString*)d->value.ptr)->toShort( ok );
if ( ok )
*ok = canCast( UInt );
if( d->typ == Byte )
@@ -469,9 +469,9 @@ uchar AIElement::toByte( bool * ok ) const
uint AIElement::toUInt( bool * ok ) const
{
if( d->typ == String )
return ((QString*)d->value.ptr)->toUInt( ok );
return ((TQString*)d->value.ptr)->toUInt( ok );
if ( d->typ == CString )
return ((QCString*)d->value.ptr)->toUInt( ok );
return ((TQCString*)d->value.ptr)->toUInt( ok );
if ( ok )
*ok = canCast( UInt );
if( d->typ == Int )
@@ -498,9 +498,9 @@ uint AIElement::toUInt( bool * ok ) const
double AIElement::toDouble( bool * ok ) const
{
if( d->typ == String )
return ((QString*)d->value.ptr)->toDouble( ok );
return ((TQString*)d->value.ptr)->toDouble( ok );
if ( d->typ == CString )
return ((QCString*)d->value.ptr)->toDouble( ok );
return ((TQCString*)d->value.ptr)->toDouble( ok );
if ( ok )
*ok = canCast( Double );
if ( d->typ == Double )
@@ -515,14 +515,14 @@ double AIElement::toDouble( bool * ok ) const
}

/*!
Returns the aielement as a QValueList<AIElement> if the aielement has type()
Returns the aielement as a TQValueList<AIElement> if the aielement has type()
List or StringList, or an empty list otherwise.

Note that if you want to iterate over the list, you should
iterate over a copy, e.g.
\code
QValueList<AIElement> list = myAIElement.toList();
QValueList<AIElement>::Iterator it = list.begin();
TQValueList<AIElement> list = myAIElement.toList();
TQValueList<AIElement>::Iterator it = list.begin();
while( it != list.end() ) {
myProcessing( *it );
++it;
@@ -531,40 +531,40 @@ double AIElement::toDouble( bool * ok ) const

\sa asList()
*/
/* const QValueList<AIElement> AIElement::toList() const
/* const TQValueList<AIElement> AIElement::toList() const
{
if ( d->typ == List )
return *((QValueList<AIElement>*)d->value.ptr);
return QValueList<AIElement>();
return *((TQValueList<AIElement>*)d->value.ptr);
return TQValueList<AIElement>();
} */

const QValueVector<AIElement> AIElement::toElementArray() const
const TQValueVector<AIElement> AIElement::toElementArray() const
{
if ( d->typ == ElementArray )
return *((QValueVector<AIElement>*)d->value.ptr);
return QValueVector<AIElement>();
return *((TQValueVector<AIElement>*)d->value.ptr);
return TQValueVector<AIElement>();
}

const QValueVector<AIElement> AIElement::toBlock() const
const TQValueVector<AIElement> AIElement::toBlock() const
{
if ( d->typ == Block )
return *((QValueVector<AIElement>*)d->value.ptr);
return QValueVector<AIElement>();
return *((TQValueVector<AIElement>*)d->value.ptr);
return TQValueVector<AIElement>();
}


const QByteArray AIElement::toByteArray() const
const TQByteArray AIElement::toByteArray() const
{
if ( d->typ == ByteArray )
return *((QByteArray*)d->value.ptr);
return QByteArray();
return *((TQByteArray*)d->value.ptr);
return TQByteArray();
}

#define Q_VARIANT_AS( f ) Q##f& AIElement::as##f() { \
if ( d->typ != f ) *this = AIElement( to##f() ); else detach(); return *((Q##f*)d->value.ptr);}
#define TQ_VARIANT_AS( f ) TQ##f& AIElement::as##f() { \
if ( d->typ != f ) *this = AIElement( to##f() ); else detach(); return *((TQ##f*)d->value.ptr);}

Q_VARIANT_AS(String)
Q_VARIANT_AS(CString)
TQ_VARIANT_AS(String)
TQ_VARIANT_AS(CString)

/*!
Returns the aielement's value as int reference.
@@ -632,41 +632,41 @@ uchar& AIElement::asByte()
Note that if you want to iterate over the list, you should
iterate over a copy, e.g.
\code
QValueList<AIElement> list = myAIElement.asList();
QValueList<AIElement>::Iterator it = list.begin();
TQValueList<AIElement> list = myAIElement.asList();
TQValueList<AIElement>::Iterator it = list.begin();
while( it != list.end() ) {
myProcessing( *it );
++it;
}
\endcode
*/
/* QValueList<AIElement>& AIElement::asList()
/* TQValueList<AIElement>& AIElement::asList()
{
if ( d->typ != List )
*this = AIElement( toList() );
return *((QValueList<AIElement>*)d->value.ptr);
return *((TQValueList<AIElement>*)d->value.ptr);
} */

QValueVector<AIElement>& AIElement::asElementArray()
TQValueVector<AIElement>& AIElement::asElementArray()
{
if ( d->typ != ElementArray )
*this = AIElement( toElementArray() );
return *((QValueVector<AIElement>*)d->value.ptr);
return *((TQValueVector<AIElement>*)d->value.ptr);
}

QValueVector<AIElement>& AIElement::asBlock()
TQValueVector<AIElement>& AIElement::asBlock()
{
if ( d->typ != Block )
*this = AIElement( toBlock() );
return *((QValueVector<AIElement>*)d->value.ptr);
return *((TQValueVector<AIElement>*)d->value.ptr);
}


QByteArray& AIElement::asByteArray()
TQByteArray& AIElement::asByteArray()
{
if ( d->typ != ByteArray )
*this = AIElement( toByteArray() );
return *((QByteArray*)d->value.ptr);
return *((TQByteArray*)d->value.ptr);
}

/*!

+ 28
- 28
filters/karbon/ai/aielement.h View File

@@ -20,11 +20,11 @@
#ifndef AIELEMENT_H
#define AIELEMENT_H

// #include <qvaluelist.h>
#include <qvaluevector.h>
// #include <tqvaluelist.h>
#include <tqvaluevector.h>

class QString;
class QCString;
class TQString;
class TQCString;

/**
*@author
@@ -52,15 +52,15 @@ public:
AIElement();
~AIElement();
AIElement( const AIElement& );
AIElement( const QString&, Type type = String );
AIElement( const QCString& );
AIElement( const TQString&, Type type = String );
AIElement( const TQCString& );
AIElement( const char* );
// AIElement( const QValueList<AIElement>& );
AIElement( const QValueVector<AIElement>&, Type type = ElementArray);
// AIElement( const TQValueList<AIElement>& );
AIElement( const TQValueVector<AIElement>&, Type type = ElementArray);
AIElement( int );
AIElement( uint );
AIElement( double );
AIElement( const QByteArray& );
AIElement( const TQByteArray& );
AIElement( uchar );

AIElement& operator= ( const AIElement& );
@@ -77,36 +77,36 @@ public:

void clear();

const QString toString() const;
const QCString toCString() const;
const TQString toString() const;
const TQCString toCString() const;
int toInt( bool * ok=0 ) const;
uint toUInt( bool * ok=0 ) const;
double toDouble( bool * ok=0 ) const;
// const QValueList<AIElement> toList() const;
const QValueVector<AIElement> toElementArray() const;
const QValueVector<AIElement> toBlock() const;
// const TQValueList<AIElement> toList() const;
const TQValueVector<AIElement> toElementArray() const;
const TQValueVector<AIElement> toBlock() const;

// Custom types
const QString toReference() const;
const QString toOperator() const;
const QByteArray toByteArray() const;
const TQString toReference() const;
const TQString toOperator() const;
const TQByteArray toByteArray() const;
uchar toByte( bool * ok=0 ) const;

// QValueListConstIterator<AIElement> listBegin() const;
// QValueListConstIterator<AIElement> listEnd() const;
QString& asString();
QCString& asCString();
// TQValueListConstIterator<AIElement> listBegin() const;
// TQValueListConstIterator<AIElement> listEnd() const;
TQString& asString();
TQCString& asCString();
int& asInt();
uint& asUInt();
double& asDouble();
// QValueList<AIElement>& asList();
QValueVector<AIElement>& asElementArray();
QValueVector<AIElement>& asBlock();
// TQValueList<AIElement>& asList();
TQValueVector<AIElement>& asElementArray();
TQValueVector<AIElement>& asBlock();

// Custom types
QString& asReference();
QString& asToken();
QByteArray& asByteArray();
TQString& asReference();
TQString& asToken();
TQByteArray& asByteArray();
uchar& asByte();

static const char* typeToName( Type typ );
@@ -115,7 +115,7 @@ public:
private:
void detach();

class Private : public QShared
class Private : public TQShared
{
public:
Private();

+ 13
- 13
filters/karbon/ai/aiimport.cc View File

@@ -1,5 +1,5 @@
/* This file is part of the KDE project
Copyright (C) 2002, Dirk Schönberger <dirk.schoenberger@sz-online.de>
Copyright (C) 2002, Dirk Sch�nberger <dirk.schoenberger@sz-online.de>

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -17,10 +17,10 @@
* Boston, MA 02110-1301, USA.
*/

#include <qdom.h>
#include <qcstring.h>
#include <qfile.h>
#include <qstring.h>
#include <tqdom.h>
#include <tqcstring.h>
#include <tqfile.h>
#include <tqstring.h>

#include <kgenericfactory.h>
#include <KoFilterChain.h>
@@ -47,7 +47,7 @@ protected:

K_EXPORT_COMPONENT_FACTORY( libkarbonaiimport, AiImportFactory() )

AiImport::AiImport( KoFilter*, const char*, const QStringList& )
AiImport::AiImport( KoFilter*, const char*, const TQStringList& )
: KoFilter()
{
}
@@ -56,29 +56,29 @@ AiImport::~AiImport()
{
}

KoFilter::ConversionStatus
AiImport::convert( const QCString& from, const QCString& to )
KoFilter::ConversiontqStatus
AiImport::convert( const TQCString& from, const TQCString& to )
{
if ( from != "application/illustrator" || to != "application/x-karbon" )
{
return KoFilter::NotImplemented;
}
QFile fileIn( m_chain->inputFile() );
TQFile fileIn( m_chain->inputFile() );
if( !fileIn.open( IO_ReadOnly ) )
{
fileIn.close();
return KoFilter::FileNotFound;
}

QDomDocument doc ("DOC");
TQDomDocument doc ("DOC");
KarbonAIParserBase parser;

if (!parser.parse (fileIn, doc))
if (!parser.parse (*TQT_TQIODEVICE(&fileIn), doc))
{
fileIn.close();
return KoFilter::CreationError;
}
QString result = doc.toString();
TQString result = doc.toString();

kdDebug() << result << endl;
KoStoreDevice* storeOut = m_chain->storageFile( "root", KoStore::Write );
@@ -88,7 +88,7 @@ AiImport::convert( const QCString& from, const QCString& to )
return KoFilter::StorageCreationError;
}

QCString cStr = result.latin1();
TQCString cStr = result.latin1();
storeOut->writeBlock( cStr, cStr.size() - 1 );

return KoFilter::OK;

+ 6
- 5
filters/karbon/ai/aiimport.h View File

@@ -24,20 +24,21 @@

#include "karbonaiparserbase.h"

class QDomElement;
class QTextStream;
class TQDomElement;
class TQTextStream;

class AiImport : public KoFilter
{
Q_OBJECT
TQ_OBJECT

public:
AiImport( KoFilter* parent, const char* name, const QStringList& );
AiImport( KoFilter* tqparent, const char* name, const TQStringList& );
virtual ~AiImport();

virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to );
virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to );
/* private:
QString m_result; */
TQString m_result; */


};

+ 12
- 12
filters/karbon/ai/ailexer.cc View File

@@ -19,7 +19,7 @@

#include <ctype.h>
#include <stdlib.h>
#include <qstringlist.h>
#include <tqstringlist.h>
#include "ailexer.h"

#define CATEGORY_WHITESPACE -1
@@ -173,7 +173,7 @@ AILexer::AILexer(){
AILexer::~AILexer(){
}

bool AILexer::parse (QIODevice& fin){
bool AILexer::parse (TQIODevice& fin){
char c;

m_buffer.clear();
@@ -350,7 +350,7 @@ void AILexer::gotByte (uchar value) {
qDebug ( "got byte %d" , value );
}

void AILexer::gotByteArray (const QByteArray &data) {
void AILexer::gotByteArray (const TQByteArray &data) {
qDebug ( "got byte array" );
/* for ( uint i = 0; i < data.size(); i++ )
{
@@ -413,11 +413,11 @@ void AILexer::doHandleByteArray ()
uint strIdx = 0;
uint arrayIdx = 0;

QByteArray data (m_buffer.length() >> 1);
TQByteArray data (m_buffer.length() >> 1);

while (strIdx < m_buffer.length())
{
const QString &item = m_buffer.mid (strIdx, 2);
const TQString &item = m_buffer.mid (strIdx, 2);
uchar val = item.toShort(NULL, 16);
data[arrayIdx] = val;
strIdx += 2;
@@ -431,7 +431,7 @@ uchar AILexer::getByte()
{
// qDebug ("convert string to byte (%s)", m_buffer.latin1());

QStringList list = QStringList::split ("#", m_buffer.toString());
TQStringList list = TQStringList::split ("#", m_buffer.toString());
int radix = list[0].toShort();
uchar value = list[1].toShort (NULL, radix);

@@ -471,8 +471,8 @@ void StringBuffer::clear(){
m_length = 0;
}

QString StringBuffer::toString() const {
QString ret(m_buffer);
TQString StringBuffer::toString() const {
TQString ret(m_buffer);
return ret;
}

@@ -495,12 +495,12 @@ uint StringBuffer::length() {
}

double StringBuffer::toFloat() {
QString data = toString();
TQString data = toString();
return data.toFloat();
}

int StringBuffer::toInt() {
QString data = toString();
TQString data = toString();
return data.toInt();
}

@@ -508,7 +508,7 @@ const char *StringBuffer::latin1() {
return m_buffer;
}

QString StringBuffer::mid( uint index, uint len) const {
QString data = toString();
TQString StringBuffer::mid( uint index, uint len) const {
TQString data = toString();
return data.mid(index,len);
}

+ 6
- 6
filters/karbon/ai/ailexer.h View File

@@ -20,8 +20,8 @@
#ifndef AILEXER_H
#define AILEXER_H

#include <qiodevice.h>
#include <qstring.h>
#include <tqiodevice.h>
#include <tqstring.h>

/**
*@author Dirk Schönberger
@@ -65,12 +65,12 @@ public:

void append (char c);
void clear();
QString toString() const;
TQString toString() const;
uint length();
double toFloat();
int toInt();
const char *latin1();
QString mid( uint index, uint len=0xffffffff) const;
TQString mid( uint index, uint len=0xffffffff) const;
private:
char *m_buffer;
uint m_length;
@@ -84,7 +84,7 @@ public:
AILexer();
virtual ~AILexer();

virtual bool parse (QIODevice& fin);
virtual bool parse (TQIODevice& fin);
private:
State m_curState;
StringBuffer m_buffer;
@@ -116,7 +116,7 @@ protected:
virtual void gotArrayStart ();
virtual void gotArrayEnd ();
virtual void gotByte (uchar value);
virtual void gotByteArray (const QByteArray &data);
virtual void gotByteArray (const TQByteArray &data);
};

#endif

+ 78
- 78
filters/karbon/ai/aiparserbase.cc View File

@@ -20,8 +20,8 @@
#include "aiparserbase.h"
#include "ai88handler.h"
#include "ai3handler.h"
#include <qregexp.h>
#include <qstringlist.h>
#include <tqregexp.h>
#include <tqstringlist.h>

typedef struct {
char* op;
@@ -204,7 +204,7 @@ AIParserBase::~AIParserBase(){

}

bool AIParserBase::parse (QIODevice& fin){
bool AIParserBase::parse (TQIODevice& fin){
return AILexer::parse (fin);
}

@@ -376,13 +376,13 @@ void AIParserBase::handleElement (AIElement &element)
if (m_sink == DS_Array)
{
if (m_debug) qDebug ("in mode array");
QValueVector<AIElement> &elementArray = m_arrayStack.top();
TQValueVector<AIElement> &elementArray = m_arrayStack.top();
elementArray.push_back(element);
}
if (m_sink == DS_Block)
{
if (m_debug) qDebug ("in mode block");
QValueVector<AIElement> &elementArray = m_blockStack.top();
TQValueVector<AIElement> &elementArray = m_blockStack.top();
elementArray.push_back(element);
}
else
@@ -425,7 +425,7 @@ void AIParserBase::gotReference (const char *value) {
if (m_ignoring) return;
if (value == NULL) value = "";
if (m_debug) qDebug ("reference: %s", value);
QString string(value);
TQString string(value);
AIElement element (string, AIElement::Reference);
handleElement (element);
if (m_debug) qDebug ("/got reference value");
@@ -441,7 +441,7 @@ void AIParserBase::gotByte (uchar value) {
if (m_debug) qDebug ("/got byte value");
}

void AIParserBase::gotByteArray (const QByteArray &data) {
void AIParserBase::gotByteArray (const TQByteArray &data) {
if (m_ignoring) return;
AIElement element (data);
handleElement (element);
@@ -452,7 +452,7 @@ void AIParserBase::gotArrayStart () {
if (m_ignoring) return;
if (m_debug) qDebug ("got array start");

QValueVector<AIElement> array;
TQValueVector<AIElement> array;
m_arrayStack.push (array);

m_sink = DS_Array;
@@ -462,7 +462,7 @@ void AIParserBase::gotBlockStart () {
if (m_ignoring) return;
if (m_debug) qDebug ("got block start");

QValueVector<AIElement> array;
TQValueVector<AIElement> array;
m_blockStack.push (array);

m_sink = DS_Block;
@@ -472,7 +472,7 @@ void AIParserBase::gotArrayEnd () {
if (m_ignoring) return;
if (m_debug) qDebug ("got array end");

QValueVector<AIElement> stackArray = m_arrayStack.pop();
TQValueVector<AIElement> stackArray = m_arrayStack.pop();

if (m_arrayStack.empty())
{
@@ -491,7 +491,7 @@ void AIParserBase::gotArrayEnd () {
else
{
if (m_debug) qDebug ("put elements to nest stack level");
QValueVector<AIElement> currentTOS = m_arrayStack.top();
TQValueVector<AIElement> currentTOS = m_arrayStack.top();
currentTOS.push_back (stackArray);
}
}
@@ -500,7 +500,7 @@ void AIParserBase::gotBlockEnd () {
if (m_ignoring) return;
if (m_debug) qDebug ("got block end");

QValueVector<AIElement> stackArray = m_blockStack.pop();
TQValueVector<AIElement> stackArray = m_blockStack.pop();

if (m_blockStack.empty())
{
@@ -519,7 +519,7 @@ void AIParserBase::gotBlockEnd () {
else
{
if (m_debug) qDebug ("put elements to nest stack level");
QValueVector<AIElement> currentTOS = m_blockStack.top();
TQValueVector<AIElement> currentTOS = m_blockStack.top();
currentTOS.push_back (stackArray);
}
}
@@ -531,7 +531,7 @@ void AIParserBase::gotBlockEnd () {
AIElement elem (m_stack.top());
m_stack.pop();

const QValueVector<AIElement> aval = elem.toElementArray();
const TQValueVector<AIElement> aval = elem.toElementArray();
if (m_gstateHandler) m_gstateHandler->gotDash (aval, fval);
} */

@@ -553,7 +553,7 @@ void AIParserBase::gotBlockEnd () {
AIElement elem (m_stack.top());
m_stack.pop();

const QValueVector<AIElement> aval = elem.toElementArray();
const TQValueVector<AIElement> aval = elem.toElementArray();

double ka = getDoubleValue();
double k = getDoubleValue();
@@ -568,7 +568,7 @@ void AIParserBase::gotBlockEnd () {
AIElement elem2 (m_stack.top());
m_stack.pop();

const QString &name = elem2.toString();
const TQString &name = elem2.toString();
if (m_gstateHandler) m_gstateHandler->gotFillPattern (name.latin1(), px, py, sx, sy, angle, rf, r, k, ka, aval);
} */

@@ -577,7 +577,7 @@ void AIParserBase::gotBlockEnd () {
AIElement elem (m_stack.top());
m_stack.pop();

const QValueVector<AIElement> aval = elem.toElementArray();
const TQValueVector<AIElement> aval = elem.toElementArray();

double ka = getDoubleValue();
double k = getDoubleValue();
@@ -592,7 +592,7 @@ void AIParserBase::gotBlockEnd () {
AIElement elem2 (m_stack.top());
m_stack.pop();

const QString &name = elem2.toString();
const TQString &name = elem2.toString();
if (m_gstateHandler) m_gstateHandler->gotStrokePattern (name.latin1(), px, py, sx, sy, angle, rf, r, k, ka, aval);
} */

@@ -632,7 +632,7 @@ void AIParserBase::gotBlockEnd () {
/*Ai88*/ /* void AIParserBase::_handleSetFillColorCustom()
{
double g = getDoubleValue();
const QString &name = getStringValue();
const TQString &name = getStringValue();
double k = getDoubleValue();
double y = getDoubleValue();
double m = getDoubleValue();
@@ -648,7 +648,7 @@ void AIParserBase::_handlePSGet() {
m_stack.pop();
m_stack.pop();

QString name ("xxx");
TQString name ("xxx");
AIElement ref (name,AIElement::Reference);
m_stack.push (ref);
}
@@ -660,7 +660,7 @@ void AIParserBase::_handlePSExec() {
void AIParserBase::_handlePSString() {
m_stack.pop();

QString name ("stringval");
TQString name ("stringval");
AIElement ref (name,AIElement::Reference);
m_stack.push (ref);
}
@@ -668,13 +668,13 @@ void AIParserBase::_handlePSString() {
void AIParserBase::_handlePSBind() {
m_stack.pop();

QString name ("bindentry");
TQString name ("bindentry");
AIElement ref (name,AIElement::Reference);
m_stack.push (ref);
}

void AIParserBase::_handlePSUserdict() {
QString name ("userdict");
TQString name ("userdict");
AIElement ref (name,AIElement::Reference);
m_stack.push (ref);
}
@@ -684,7 +684,7 @@ void AIParserBase::_handlePSDict() {
m_stack.pop();
m_stack.pop();

QString name ("dict");
TQString name ("dict");
AIElement ref (name,AIElement::Reference);
m_stack.push (ref);
}
@@ -699,7 +699,7 @@ void AIParserBase::_handlePSDup() {
void AIParserBase::_handlePSBegin() {
m_stack.pop();

QString name ("dictionary begin");
TQString name ("dictionary begin");
AIElement ref (name,AIElement::Reference);
m_stack.push (ref);
}
@@ -714,7 +714,7 @@ void AIParserBase::_handlePSPut() {
AIElement elem (m_stack.top());
m_stack.pop();

const QValueVector<AIElement> aval = elem.toElementArray();
const TQValueVector<AIElement> aval = elem.toElementArray();

double ury = getDoubleValue();
double urx = getDoubleValue();
@@ -724,7 +724,7 @@ void AIParserBase::_handlePSPut() {
AIElement elem2 (m_stack.top());
m_stack.pop();

const QString &name = elem2.toString();
const TQString &name = elem2.toString();

if (m_documentHandler) m_documentHandler->gotPatternDefinition (name.latin1(), aval, llx, lly, urx, ury);
} */
@@ -740,7 +740,7 @@ void AIParserBase::_handlePSDef() {
/*Ai88*/ /* void AIParserBase::_handleSetStrokeColorCustom()
{
double g = getDoubleValue();
const QString &name = getStringValue();
const TQString &name = getStringValue();
double k = getDoubleValue();
double y = getDoubleValue();
double m = getDoubleValue();
@@ -763,22 +763,22 @@ void AIParserBase::_handleDocumentCustomColors(const char *) {

void AIParserBase::_handleDocumentNeededResources(const char *data) {
if (!data) return;
QStringList items = QStringList::split (' ', data);
TQStringList items = TQStringList::split (' ', data);

QString itemType = items[1];
QString name = items[2];
QString version = items[3];
QString release = items[4];
TQString itemType = items[1];
TQString name = items[2];
TQString version = items[3];
TQString release = items[4];
}

void AIParserBase::_handleIncludeResource(const char *data) {
if (!data) return;
QStringList items = QStringList::split (' ', data);
TQStringList items = TQStringList::split (' ', data);

QString itemType = items[1];
QString name = items[2];
QString version = items[3];
QString release = items[4];
TQString itemType = items[1];
TQString name = items[2];
TQString version = items[3];
TQString release = items[4];

m_modules.push_back (name);
}
@@ -787,20 +787,20 @@ void AIParserBase::_handleDocumentProcessColors(const char *data) {
if (!data) return;

int colorSet = 0;
QString tmp (data);
TQString tmp (data);

signed int index;

index = tmp.find ("Cyan");
index = tmp.tqfind ("Cyan");
if (index > 0) colorSet |= PC_Cyan;

index = tmp.find ("Magenta");
index = tmp.tqfind ("Magenta");
if (index > 0) colorSet |= PC_Magenta;

index = tmp.find ("Yellow");
index = tmp.tqfind ("Yellow");
if (index > 0) colorSet |= PC_Yellow;

index = tmp.find ("Black");
index = tmp.tqfind ("Black");
if (index > 0) colorSet |= PC_Black;

if (m_documentHandler) m_documentHandler->gotProcessColors (colorSet);
@@ -813,7 +813,7 @@ void AIParserBase::_handleCMYKCustomColor(const char *) {
AIElement elem2 (m_stack.top());
m_stack.pop();

const QString &name = elem2.toString();
const TQString &name = elem2.toString();

int ury = getIntValue();
int urx = getIntValue();
@@ -823,7 +823,7 @@ void AIParserBase::_handleCMYKCustomColor(const char *) {
AIElement elem (m_stack.top());
m_stack.pop();

const QValueVector<AIElement> aval = elem.toElementArray();
const TQValueVector<AIElement> aval = elem.toElementArray();

if (m_embeddedHandler) m_embeddedHandler->gotGsaveIncludeDocument (aval, llx,lly,urx,ury,name.latin1());
} */
@@ -849,7 +849,7 @@ void AIParserBase::_handleCMYKCustomColor(const char *) {
AIElement elem2 (m_stack.top());
m_stack.pop();

const QString &fontname = elem2.toReference();
const TQString &fontname = elem2.toReference();

if (m_textHandler) m_textHandler->gotFontDefinition (fontname.latin1(), size, leading, kerning, ta);
} */
@@ -859,7 +859,7 @@ void AIParserBase::_handleCMYKCustomColor(const char *) {
qDebug ("to element is (%s)",elem.typeName());
m_stack.pop();

const QValueVector<AIElement> aval = elem.toElementArray();
const TQValueVector<AIElement> aval = elem.toElementArray();

if (m_textHandler) m_textHandler->gotTextBlockBegin (aval, to);
} */
@@ -868,7 +868,7 @@ void AIParserBase::_handleCMYKCustomColor(const char *) {
AIElement elem (m_stack.top());
m_stack.pop();

const QString &text = elem.toString();
const TQString &text = elem.toString();

int length = -1;

@@ -888,11 +888,11 @@ void AIParserBase::_handleCreationDate (const char *data)
{
if (!data) return;

QRegExp test ("\\((.+)\\) \\((.+)\\)");
TQRegExp test ("\\((.+)\\) \\((.+)\\)");
if (test.search (data))
{
QString val1 = test.cap(1);
QString val2 = test.cap(2);
TQString val1 = test.cap(1);
TQString val2 = test.cap(2);

if (m_documentHandler) m_documentHandler->gotCreationDate (val1.latin1(),val2.latin1());
}
@@ -907,7 +907,7 @@ void AIParserBase::gotToken (const char *value) {
if (m_sink == DS_Array)
{
if (m_debug) qDebug ("token in array");
QString op (value);
TQString op (value);
AIElement realElement (op, AIElement::Operator);
handleElement (realElement);

@@ -916,7 +916,7 @@ void AIParserBase::gotToken (const char *value) {
if (m_sink == DS_Block)
{
if (m_debug) qDebug ("token in block");
QString op (value);
TQString op (value);
AIElement realElement (op, AIElement::Operator);
handleElement (realElement);

@@ -943,9 +943,9 @@ void AIParserBase::gotToken (const char *value) {
}
qWarning ( "unknown operator: %s", value );

QString string(value);
TQString string(value);

if (m_modules.findIndex(string) != -1)
if (m_modules.tqfindIndex(string) != -1)
{
AIElement element (string, AIElement::Reference);
handleElement (element);
@@ -1019,13 +1019,13 @@ const bool AIParserBase::getBoolValue(void) {
return getIntValue() == 1;
}

const QString AIParserBase::getStringValue(void) {
const TQString AIParserBase::getStringValue(void) {
const AIElement &elem = m_stack.pop();

return elem.toString();
}

const QString AIParserBase::getOperatorValue(void) {
const TQString AIParserBase::getOperatorValue(void) {
const AIElement &elem = m_stack.pop();

return elem.toOperator();
@@ -1034,7 +1034,7 @@ const QString AIParserBase::getOperatorValue(void) {
AIOperation AIParserBase::getAIOperation (const char *operand)
{
int i=0;
QString cmpValue (operand);
TQString cmpValue (operand);

for(;;) { AIOperationMapping map = aiMappings[i];
if (map.op == NULL) return AIO_Other;
@@ -1047,7 +1047,7 @@ AIOperation AIParserBase::getAIOperation (const char *operand)
PSOperation AIParserBase::getPSOperation (const char *operand)
{
int i=0;
QString cmpValue (operand);
TQString cmpValue (operand);

for(;;) { PSOperationMapping map = psMappings[i];
if (map.op == NULL) return PSO_Other;
@@ -1058,7 +1058,7 @@ PSOperation AIParserBase::getPSOperation (const char *operand)
}

CommentOperation AIParserBase::getCommentOperation (const char *command) {
QString data (command);
TQString data (command);

signed int index;

@@ -1067,28 +1067,28 @@ CommentOperation AIParserBase::getCommentOperation (const char *command) {
for(;;) {
CommentOperationMapping map = commentMappings[i];
if (map.op == NULL) return CO_Other;
index = data.find (map.op);
index = data.tqfind (map.op);
if (index >= 0) return map.action;
i++;
}
}

void GStateHandlerBase::gotFillPattern (const char *pname, double px, double py, double sx, double sy, double angle, double rf, double r, double k, double ka, const QValueVector<AIElement>& transformData) {
void GStateHandlerBase::gotFillPattern (const char *pname, double px, double py, double sx, double sy, double angle, double rf, double r, double k, double ka, const TQValueVector<AIElement>& transformData) {
qDebug ( "got fill pattern %s %f %f %f %f %f %f %f %f %f", pname, px, py, sx, sy, angle, rf, r, k, ka);
arraytoa (transformData);
qDebug ("/got fill pattern");
}

void GStateHandlerBase::gotStrokePattern (const char *pname, double px, double py, double sx, double sy, double angle, double rf, double r, double k, double ka, const QValueVector<AIElement>& transformData) {
void GStateHandlerBase::gotStrokePattern (const char *pname, double px, double py, double sx, double sy, double angle, double rf, double r, double k, double ka, const TQValueVector<AIElement>& transformData) {
qDebug ( "got stroke pattern %s %f %f %f %f %f %f %f %f %f", pname, px, py, sx, sy, angle, rf, r, k, ka);
arraytoa (transformData);
qDebug ("/got stroke pattern");
}

const char *AIParserBase::getValue (const char *input) {
QString data(input);
TQString data(input);

signed int index = data.find (':');
signed int index = data.tqfind (':');
if (index < 0) return "";
index++;
while (data.at(index) == ' ') index++;
@@ -1098,9 +1098,9 @@ const char *AIParserBase::getValue (const char *input) {
bool AIParserBase::getRectangle (const char* input, int &llx, int &lly, int &urx, int &ury) {
if (input == NULL) return false;

QString s(input);
if (s.contains ("(atend)")) return false;
QStringList values = QStringList::split (" ", input);
TQString s(input);
if (s.tqcontains ("(atend)")) return false;
TQStringList values = TQStringList::split (" ", input);
if (values.size() < 5) return false;
llx = values[1].toInt();
lly = values[2].toInt();
@@ -1113,8 +1113,8 @@ bool AIParserBase::getRectangle (const char* input, int &llx, int &lly, int &urx
bool AIParserBase::getPoint (const char* input, int &x, int &y) {
if (input == NULL) return false;

QString s(input);
QStringList values = QStringList::split (" ", input);
TQString s(input);
TQStringList values = TQStringList::split (" ", input);

if (values.size() < 3) return false;

@@ -1139,20 +1139,20 @@ void AIParserBase::cleanupArrays()

AIElement elem (m_stack.top());
m_stack.pop();
const QString &oldFont = elem.toReference();
const TQString &oldFont = elem.toReference();

AIElement elem2 (m_stack.top());
m_stack.pop();
const QString &newFont = elem2.toReference();
const TQString &newFont = elem2.toReference();

AIElement elem3 (m_stack.top());
m_stack.pop();
const QValueVector<AIElement> encodingData = elem3.toElementArray();
const TQValueVector<AIElement> encodingData = elem3.toElementArray();

if (m_textHandler) m_textHandler->gotFontEncoding (encodingData, oldFont.latin1(), newFont.latin1());
} */

void TextHandlerBase::gotFontEncoding (const QValueVector<AIElement>& encodingData, const char*oldFontName, const char*newFontName)
void TextHandlerBase::gotFontEncoding (const TQValueVector<AIElement>& encodingData, const char*oldFontName, const char*newFontName)
{
qDebug ("font encoding %s to %s",oldFontName, newFontName);
arraytoa (encodingData);
@@ -1164,7 +1164,7 @@ void TextHandlerBase::gotFontDefinition (const char*fontName, double size, doubl
qDebug ("font definition: name %s size %f leading %f kerning %f align %d", fontName, size, leading, kerning, align);
}

void TextHandlerBase::gotTextBlockBegin (const QValueVector<AIElement>& transData, TextOperation mode)
void TextHandlerBase::gotTextBlockBegin (const TQValueVector<AIElement>& transData, TextOperation mode)
{
qDebug ("text block begin %d",mode);
arraytoa (transData);
@@ -1213,7 +1213,7 @@ const void elementtoa (const AIElement &/*data*/)
} */
}

const void arraytoa (const QValueVector<AIElement> &/*data*/)
const void arraytoa (const TQValueVector<AIElement> &/*data*/)
{
/* qDebug ("array size is %d ",data.size());
if (data.size() > 0)
@@ -1227,7 +1227,7 @@ const void arraytoa (const QValueVector<AIElement> &/*data*/)
} */
}

const void stacktoa (const QValueStack<AIElement> &/*data*/)
const void stacktoa (const TQValueStack<AIElement> &/*data*/)
{
/* qDebug ("stack size is %d",data.size());
if (data.size() > 0)
@@ -1241,7 +1241,7 @@ const void stacktoa (const QValueStack<AIElement> &/*data*/)
qDebug (">>>>>>>>>>>>>>>>>>"); */
}

const void stacktoa2 (const QValueStack<QValueVector<AIElement> >&/*data*/)
const void stacktoa2 (const TQValueStack<TQValueVector<AIElement> >&/*data*/)
{
/* qDebug ("stack size is %d",data.size());


+ 26
- 26
filters/karbon/ai/aiparserbase.h View File

@@ -22,19 +22,19 @@

#include "ailexer.h"

#include <qstring.h>
#include <qvaluestack.h>
#include <qvaluevector.h>
#include <qvaluelist.h>
#include <tqstring.h>
#include <tqvaluestack.h>
#include <tqvaluevector.h>
#include <tqvaluelist.h>

#include "aielement.h"
#include "aicolor.h"


const void arraytoa (const QValueVector<AIElement> &data);
const void arraytoa (const TQValueVector<AIElement> &data);
const void elementtoa (const AIElement &data);
const void stacktoa (const QValueStack<AIElement> &data);
const void stacktoa2 (const QValueStack<QValueVector<AIElement> >&data);
const void stacktoa (const TQValueStack<AIElement> &data);
const void stacktoa2 (const TQValueStack<TQValueVector<AIElement> >&data);

class GStateHandlerBase;
class StructureHandlerBase;
@@ -209,9 +209,9 @@ typedef enum {
#define PatternTileFilledDefiniton "_"
#define TextSizeUnknown -1

/* typedef QValueVector<AElement> ElementArray;
typedef QValueStack<AIElement> ElementStack;
typedef QValueStack<ElementArray> ElementArrayStack; */
/* typedef TQValueVector<AElement> ElementArray;
typedef TQValueStack<AIElement> ElementStack;
typedef TQValueStack<ElementArray> ElementArrayStack; */

typedef struct {
PathElementType petype;
@@ -234,19 +234,19 @@ protected:
bool m_debug;
private:
bool m_ignoring;
QValueStack<AIElement> m_stack;
QValueStack<QValueVector<AIElement> > m_arrayStack;
QValueStack<QValueVector<AIElement> > m_blockStack;
TQValueStack<AIElement> m_stack;
TQValueStack<TQValueVector<AIElement> > m_arrayStack;
TQValueStack<TQValueVector<AIElement> > m_blockStack;
DataSink m_sink;
QValueList<QString> m_modules;
TQValueList<TQString> m_modules;
ContinuationMode m_continuationMode;

const double getDoubleValue(void);
const int getIntValue(void);
const bool getBoolValue(void);
const QString getStringValue(void);
const QString& getReferenceValue(void);
const QString getOperatorValue(void);
const TQString getStringValue(void);
const TQString& getReferenceValue(void);
const TQString getOperatorValue(void);

/*Ai88*/ // void _handleSetDash();
/*Ai88*/ // void _handleGsaveIncludeDocument();
@@ -308,7 +308,7 @@ protected:
void gotArrayStart ();
void gotArrayEnd ();
void gotByte (uchar value);
void gotByteArray (const QByteArray &data);
void gotByteArray (const TQByteArray &data);

GStateHandlerBase *m_gstateHandler;
StructureHandlerBase *m_structureHandler;
@@ -328,7 +328,7 @@ public:
AIParserBase();
~AIParserBase();

bool parse (QIODevice& fin);
bool parse (TQIODevice& fin);
};

const void aiotoa (AIOperation &data);
@@ -342,15 +342,15 @@ class GStateHandlerBase

virtual void gotFillColor (AIColor &) {}
virtual void gotStrokeColor (AIColor &) {}
virtual void gotFillPattern (const char *pname, double px, double py, double sx, double sy, double angle, double rf, double r, double k, double ka, const QValueVector<AIElement>& transformData);
virtual void gotStrokePattern (const char *pname, double px, double py, double sx, double sy, double angle, double rf, double r, double k, double ka, const QValueVector<AIElement>& transformData);
virtual void gotFillPattern (const char *pname, double px, double py, double sx, double sy, double angle, double rf, double r, double k, double ka, const TQValueVector<AIElement>& transformData);
virtual void gotStrokePattern (const char *pname, double px, double py, double sx, double sy, double angle, double rf, double r, double k, double ka, const TQValueVector<AIElement>& transformData);
virtual void gotFlatness (double) {}
virtual void gotLineWidth (double) {}
virtual void gotLineCaps (int) {}
virtual void gotLineJoin (int) {}
virtual void gotMiterLimit (double) {}
virtual void gotWindingOrder (int) {}
virtual void gotDash (const QValueVector<AIElement>& /*dashData*/, double /*phase*/) {}
virtual void gotDash (const TQValueVector<AIElement>& /*dashData*/, double /*phase*/) {}
};

class StructureHandlerBase {
@@ -401,7 +401,7 @@ class DocumentHandlerBase {
virtual void gotTemplate (const char *) {}
virtual void gotTitle (const char *) {}
virtual void gotCreator (const char *) {}
virtual void gotPatternDefinition (const char */*name*/, const QValueVector<AIElement>& /*layerData*/, double /*llx*/, double /*lly*/, double /*urx*/, double /*ury*/) {}
virtual void gotPatternDefinition (const char */*name*/, const TQValueVector<AIElement>& /*layerData*/, double /*llx*/, double /*lly*/, double /*urx*/, double /*ury*/) {}
virtual void gotCreationDate (const char */*val1*/,const char */*val2*/) {}
virtual void gotProcessColors (int /*colors*/) {}
};
@@ -420,7 +420,7 @@ class EmbeddedHandlerBase {
EmbeddedHandlerBase() {}
virtual ~EmbeddedHandlerBase() {}

virtual void gotGsaveIncludeDocument (const QValueVector<AIElement>& /*transData*/, int /*llx*/, int /*lly*/, int /*urx*/, int /*ury*/, const char*/*fileName*/) {}
virtual void gotGsaveIncludeDocument (const TQValueVector<AIElement>& /*transData*/, int /*llx*/, int /*lly*/, int /*urx*/, int /*ury*/, const char*/*fileName*/) {}
virtual void gotGrestore () {}
};

@@ -429,9 +429,9 @@ class TextHandlerBase {
TextHandlerBase() {}
virtual ~TextHandlerBase() {}
<