diff options
Diffstat (limited to 'lib/kotext/KoRichText.h')
-rw-r--r-- | lib/kotext/KoRichText.h | 288 |
1 files changed, 144 insertions, 144 deletions
diff --git a/lib/kotext/KoRichText.h b/lib/kotext/KoRichText.h index 94954b93..e161b2fe 100644 --- a/lib/kotext/KoRichText.h +++ b/lib/kotext/KoRichText.h @@ -6,27 +6,27 @@ ** ** Copyright (C) 1999-2000 Trolltech AS. All rights reserved. ** -** This file is part of the kernel module of the Qt GUI Toolkit. +** This file is part of the kernel module of the TQt GUI Toolkit. ** ** This file may be distributed under the terms of the Q Public License ** as defined by Trolltech AS of Norway and appearing in the file -** LICENSE.QPL included in the packaging of this file. +** LICENSE.TQPL included in the packaging of this file. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as publish by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses may use this file in accordance with the Qt Commercial License +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License ** Agreement provided with the Software. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/pricing.html or email [email protected] for -** information about Qt Commercial License Agreements. -** See http://www.trolltech.com/qpl/ for QPL licensing information. +** information about TQt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for TQPL licensing information. ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact [email protected] if any conditions of this licensing are @@ -37,16 +37,16 @@ #ifndef KORICHTEXT_H #define KORICHTEXT_H -#include <qptrlist.h> -#include <qrect.h> -#include <qmap.h> -#include <qstringlist.h> -#include <qcolor.h> -#include <qsize.h> -#include <qvaluelist.h> -#include <qobject.h> -#include <qstylesheet.h> -#include <qpainter.h> +#include <tqptrlist.h> +#include <tqrect.h> +#include <tqmap.h> +#include <tqstringlist.h> +#include <tqcolor.h> +#include <tqsize.h> +#include <tqvaluelist.h> +#include <tqobject.h> +#include <tqstylesheet.h> +#include <tqpainter.h> #include "KoComplexText.h" #include <koffice_export.h> @@ -66,7 +66,7 @@ struct KoBidiContext; //// kotext additions (needed by the #included headers) class KCommand; -class QDomElement; +class TQDomElement; class KoTextZoomHandler; class KoTextFormatter; class KoParagVisitor; @@ -74,7 +74,7 @@ class KoTextDocCommand; class KoXmlWriter; class KoSavingContext; -#include <qmemarray.h> +#include <tqmemarray.h> #include "KoParagLayout.h" //// @@ -89,11 +89,11 @@ public: KoTextStringChar() : lineStart( 0 ), type( Regular ), startOfRun( 0 ) {d.format=0; } ~KoTextStringChar(); - QChar c; + TQChar c; // this is the same struct as in qtextengine_p.h. Don't change! uchar softBreak :1; // Potential linebreak point - uchar whiteSpace :1; // A unicode whitespace character, except NBSP, ZWNBSP + uchar whiteSpace :1; // A tqunicode whitespace character, except NBSP, ZWNBSP uchar charStop :1; // Valid cursor position (for left/right arrow) uchar wordStop :1; // Valid cursor position (for ctrl + left/right arrow) (TODO: use) //uchar nobreak :1; @@ -105,7 +105,7 @@ public: uint rightToLeft : 1; // --- added for WYSIWYG --- - Q_INT8 pixelxadj; // adjustment to apply to lu2pixel(x) + TQ_INT8 pixelxadj; // adjustment to apply to lu2pixel(x) short int pixelwidth; // width in pixels short int width; // width in LU @@ -140,10 +140,10 @@ private: friend class KoTextParag; }; -#if defined(Q_TEMPLATEDLL) -// MOC_SKIP_BEGIN -template class QMemArray<KoTextStringChar>; -// MOC_SKIP_END +#if defined(TQ_TEMPLATEDLL) +// TQMOC_SKIP_BEGIN +template class TQMemArray<KoTextStringChar>; +// TQMOC_SKIP_END #endif class KOTEXT_EXPORT KoTextString @@ -154,18 +154,18 @@ public: KoTextString( const KoTextString &s ); virtual ~KoTextString(); - QString toString() const; - static QString toString( const QMemArray<KoTextStringChar> &data ); - QString toReverseString() const; + TQString toString() const; + static TQString toString( const TQMemArray<KoTextStringChar> &data ); + TQString toReverseString() const; - QString stringToSpellCheck(); + TQString stringToSpellCheck(); KoTextStringChar &at( int i ) const; int length() const; //int width( int idx ) const; // moved to KoTextFormat - void insert( int index, const QString &s, KoTextFormat *f ); + void insert( int index, const TQString &s, KoTextFormat *f ); void insert( int index, KoTextStringChar *c ); void truncate( int index ); void remove( int index, int len ); @@ -176,20 +176,20 @@ public: void setBidi( bool b ) { bidi = b; } bool isBidi() const; bool isRightToLeft() const; - QChar::Direction direction() const; - void setDirection( QChar::Direction d ) { dir = d; bidiDirty = TRUE; } + TQChar::Direction direction() const; + void setDirection( TQChar::Direction d ) { dir = d; bidiDirty = TRUE; } /** Set dirty flag for background spell-checking */ void setNeedsSpellCheck( bool b ) { bNeedsSpellCheck = b; } bool needsSpellCheck() const { return bNeedsSpellCheck; } - QMemArray<KoTextStringChar> subString( int start = 0, int len = 0xFFFFFF ) const; - QString mid( int start = 0, int len = 0xFFFFFF ) const; // kotext addition - QMemArray<KoTextStringChar> rawData() const { return data.copy(); } + TQMemArray<KoTextStringChar> subString( int start = 0, int len = 0xFFFFFF ) const; + TQString mid( int start = 0, int len = 0xFFFFFF ) const; // kotext addition + TQMemArray<KoTextStringChar> rawData() const { return data.copy(); } - void operator=( const QString &s ) { clear(); insert( 0, s, 0 ); } - void operator+=( const QString &s ); - void prepend( const QString &s ) { insert( 0, s, 0 ); } + void operator=( const TQString &s ) { clear(); insert( 0, s, 0 ); } + void operator+=( const TQString &s ); + void prepend( const TQString &s ) { insert( 0, s, 0 ); } // return next and previous valid cursor positions. bool validCursorPosition( int idx ); @@ -199,7 +199,7 @@ public: private: void checkBidi() const; - QMemArray<KoTextStringChar> data; + TQMemArray<KoTextStringChar> data; uint bidiDirty : 1; uint bidi : 1; // true when the paragraph has right to left characters uint rightToLeft : 1; @@ -221,9 +221,9 @@ inline bool KoTextString::isRightToLeft() const return rightToLeft; } -inline QChar::Direction KoTextString::direction() const +inline TQChar::Direction KoTextString::direction() const { - return (QChar::Direction) dir; + return (TQChar::Direction) dir; } // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -264,7 +264,7 @@ public: void gotoWordLeft(); void gotoWordRight(); - void insert( const QString &s, bool checkNewLine, QMemArray<KoTextStringChar> *formatting = 0 ); + void insert( const TQString &s, bool checkNewLine, TQMemArray<KoTextStringChar> *formatting = 0 ); void splitAndInsertEmptyParag( bool ind = TRUE, bool updateIds = TRUE ); bool remove(); bool removePreviousChar(); @@ -281,7 +281,7 @@ public: //int offsetX() const { return ox; } //int offsetY() const { return oy; } - bool place( const QPoint &pos, KoTextParag *s, bool link = false, int *customItemIndex = 0 ); + bool place( const TQPoint &pos, KoTextParag *s, bool link = false, int *customItemIndex = 0 ); int x() const; int y() const; @@ -314,10 +314,10 @@ protected: }; -#if defined(Q_TEMPLATEDLL) -// MOC_SKIP_BEGIN -template class QPtrList<KoTextDocCommand>; -// MOC_SKIP_END +#if defined(TQ_TEMPLATEDLL) +// TQMOC_SKIP_BEGIN +template class TQPtrList<KoTextDocCommand>; +// TQMOC_SKIP_END #endif class KoTextDocCommandHistory @@ -342,7 +342,7 @@ public: int currentPosition() const { return current; } private: - QPtrList<KoTextDocCommand> history; + TQPtrList<KoTextDocCommand> history; int current, steps; }; @@ -351,36 +351,36 @@ private: #include "KoTextCustomItem.h" -#if defined(Q_TEMPLATEDLL) -// MOC_SKIP_BEGIN -template class QMap<QString, QString>; -// MOC_SKIP_END +#if defined(TQ_TEMPLATEDLL) +// TQMOC_SKIP_BEGIN +template class TQMap<TQString, TQString>; +// TQMOC_SKIP_END #endif #if 0 class KoTextImage : public KoTextCustomItem { public: - KoTextImage( KoTextDocument *p, const QMap<QString, QString> &attr, const QString& context, - QMimeSourceFactory &factory ); + KoTextImage( KoTextDocument *p, const TQMap<TQString, TQString> &attr, const TQString& context, + TQMimeSourceFactory &factory ); virtual ~KoTextImage(); Placement placement() const { return place; } - //void setPainter( QPainter*, bool ); + //void setPainter( TQPainter*, bool ); int widthHint() const { return width; } int minimumWidth() const { return width; } - QString richText() const; + TQString richText() const; - void draw( QPainter* p, int x, int y, int cx, int cy, int cw, int ch, const QColorGroup& cg, bool selected ); + void draw( TQPainter* p, int x, int y, int cx, int cy, int cw, int ch, const TQColorGroup& cg, bool selected ); private: - QRegion* reg; - QPixmap pm; + TQRegion* reg; + TQPixmap pm; Placement place; int tmpwidth, tmpheight; - QMap<QString, QString> attributes; - QString imgId; + TQMap<TQString, TQString> attributes; + TQString imgId; }; #endif @@ -388,26 +388,26 @@ private: class KoTextHorizontalLine : public KoTextCustomItem { public: - KoTextHorizontalLine( KoTextDocument *p, const QMap<QString, QString> &attr, const QString& context, - QMimeSourceFactory &factory ); + KoTextHorizontalLine( KoTextDocument *p, const TQMap<TQString, TQString> &attr, const TQString& context, + TQMimeSourceFactory &factory ); virtual ~KoTextHorizontalLine(); - //void setPainter( QPainter*, bool ); - void draw(QPainter* p, int x, int y, int cx, int cy, int cw, int ch, const QColorGroup& cg, bool selected ); - QString richText() const; + //void setPainter( TQPainter*, bool ); + void draw(TQPainter* p, int x, int y, int cx, int cy, int cw, int ch, const TQColorGroup& cg, bool selected ); + TQString richText() const; bool ownLine() const { return TRUE; } private: int tmpheight; - QColor color; + TQColor color; }; -#if defined(Q_TEMPLATEDLL) -// MOC_SKIP_BEGIN -template class QPtrList<KoTextCustomItem>; -// MOC_SKIP_END +#if defined(TQ_TEMPLATEDLL) +// TQMOC_SKIP_BEGIN +template class TQPtrList<KoTextCustomItem>; +// TQMOC_SKIP_END #endif class KOTEXT_EXPORT KoTextFlow @@ -433,17 +433,17 @@ public: * @param leftMargin returns the left margin * @param rightMargin returns the right margin (from the page width) * @param pageWidth returns the page width at that point - * This method merges QRichText's adjustLMargin and adjustRMargin for efficiency reasons + * This method merges TQRichText's adjustLMargin and adjustRMargin for efficiency reasons */ virtual void adjustMargins( int yp, int h, int reqMinWidth, int& leftMargin, int& rightMargin, int& pageWidth, KoTextParag* parag ); virtual void registerFloatingItem( KoTextCustomItem* item ); virtual void unregisterFloatingItem( KoTextCustomItem* item ); - //virtual QRect boundingRect() const; + //virtual TQRect boundingRect() const; /// kotext addition. Allows the textformatter to stop when it goes too far. virtual int availableHeight() const; - virtual void drawFloatingItems(QPainter* p, int cx, int cy, int cw, int ch, const QColorGroup& cg, bool selected ); + virtual void drawFloatingItems(TQPainter* p, int cx, int cy, int cw, int ch, const TQColorGroup& cg, bool selected ); virtual int adjustFlow( int y, int w, int h ); // adjusts y according to the defined pagesize. Returns the shift. @@ -455,40 +455,40 @@ private: int w; //int pagesize; - QPtrList<KoTextCustomItem> leftItems; - QPtrList<KoTextCustomItem> rightItems; + TQPtrList<KoTextCustomItem> leftItems; + TQPtrList<KoTextCustomItem> rightItems; }; -#ifdef QTEXTTABLE_AVAILABLE +#ifdef TQTEXTTABLE_AVAILABLE class KoTextTable; -class KoTextTableCell : public QLayoutItem +class KoTextTableCell : public TQLayoutItem { friend class KoTextTable; public: KoTextTableCell( KoTextTable* table, int row, int column, - const QMap<QString, QString> &attr, - const QStyleSheetItem* style, - const KoTextFormat& fmt, const QString& context, - QMimeSourceFactory &factory, QStyleSheet *sheet, const QString& doc ); + const TQMap<TQString, TQString> &attr, + const TQStyleSheetItem* style, + const KoTextFormat& fmt, const TQString& context, + TQMimeSourceFactory &factory, TQStyleSheet *sheet, const TQString& doc ); KoTextTableCell( KoTextTable* table, int row, int column ); virtual ~KoTextTableCell(); - QSize sizeHint() const ; - QSize minimumSize() const ; - QSize maximumSize() const ; - QSizePolicy::ExpandData expanding() const; + TQSize tqsizeHint() const ; + TQSize tqminimumSize() const ; + TQSize tqmaximumSize() const ; + TQSizePolicy::ExpandData expanding() const; bool isEmpty() const; - void setGeometry( const QRect& ) ; - QRect geometry() const; + void setGeometry( const TQRect& ) ; + TQRect tqgeometry() const; bool hasHeightForWidth() const; int heightForWidth( int ) const; - void setPainter( QPainter*, bool ); + void setPainter( TQPainter*, bool ); int row() const { return row_; } int column() const { return col_; } @@ -497,20 +497,20 @@ public: int stretch() const { return stretch_; } KoTextDocument* richText() const { return richtext; } - KoTextTable* table() const { return parent; } + KoTextTable* table() const { return tqparent; } - void draw( int x, int y, int cx, int cy, int cw, int ch, const QColorGroup& cg, bool selected ); + void draw( int x, int y, int cx, int cy, int cw, int ch, const TQColorGroup& cg, bool selected ); - QBrush *backGround() const { return background; } - virtual void invalidate(); + TQBrush *backGround() const { return background; } + virtual void tqinvalidate(); int verticalAlignmentOffset() const; int horizontalAlignmentOffset() const; private: - QPainter* painter() const; - QRect geom; - KoTextTable* parent; + TQPainter* painter() const; + TQRect geom; + KoTextTable* tqparent; KoTextDocument* richtext; int row_; int col_; @@ -520,18 +520,18 @@ private: int maxw; int minw; bool hasFixedWidth; - QBrush *background; + TQBrush *background; int cached_width; int cached_sizehint; - QMap<QString, QString> attributes; + TQMap<TQString, TQString> attributes; int align; }; -#if defined(Q_TEMPLATEDLL) -// MOC_SKIP_BEGIN -template class QPtrList<KoTextTableCell>; -template class QMap<KoTextCursor*, int>; -// MOC_SKIP_END +#if defined(TQ_TEMPLATEDLL) +// TQMOC_SKIP_BEGIN +template class TQPtrList<KoTextTableCell>; +template class TQMap<KoTextCursor*, int>; +// TQMOC_SKIP_END #endif class KoTextTable: public KoTextCustomItem @@ -539,37 +539,37 @@ class KoTextTable: public KoTextCustomItem friend class KoTextTableCell; public: - KoTextTable( KoTextDocument *p, const QMap<QString, QString> &attr ); + KoTextTable( KoTextDocument *p, const TQMap<TQString, TQString> &attr ); virtual ~KoTextTable(); - void setPainter( QPainter *p, bool adjust ); + void setPainter( TQPainter *p, bool adjust ); void pageBreak( int y, KoTextFlow* flow ); - void draw( QPainter* p, int x, int y, int cx, int cy, int cw, int ch, - const QColorGroup& cg, bool selected ); + void draw( TQPainter* p, int x, int y, int cx, int cy, int cw, int ch, + const TQColorGroup& cg, bool selected ); bool noErase() const { return TRUE; } bool ownLine() const { return TRUE; } Placement placement() const { return place; } bool isNested() const { return TRUE; } void resize( int nwidth ); - virtual void invalidate(); - /// ## QString anchorAt( QPainter* p, int x, int y ); + virtual void tqinvalidate(); + /// ## TQString anchorAt( TQPainter* p, int x, int y ); virtual bool enter( KoTextCursor *c, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy, bool atEnd = FALSE ); - virtual bool enterAt( KoTextCursor *c, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy, const QPoint &pos ); + virtual bool enterAt( KoTextCursor *c, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy, const TQPoint &pos ); virtual bool next( KoTextCursor *c, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy ); virtual bool prev( KoTextCursor *c, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy ); virtual bool down( KoTextCursor *c, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy ); virtual bool up( KoTextCursor *c, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy ); - QString richText() const; + TQString richText() const; - int minimumWidth() const { return layout ? layout->minimumSize().width() : 0; } - int widthHint() const { return ( layout ? layout->sizeHint().width() : 0 ) + 2 * outerborder; } + int minimumWidth() const { return tqlayout ? tqlayout->tqminimumSize().width() : 0; } + int widthHint() const { return ( tqlayout ? tqlayout->tqsizeHint().width() : 0 ) + 2 * outerborder; } - QPtrList<KoTextTableCell> tableCells() const { return cells; } + TQPtrList<KoTextTableCell> tableCells() const { return cells; } - QRect geometry() const { return layout ? layout->geometry() : QRect(); } + TQRect tqgeometry() const { return tqlayout ? tqlayout->tqgeometry() : TQRect(); } bool isStretching() const { return stretch; } private: @@ -577,9 +577,9 @@ private: void addCell( KoTextTableCell* cell ); private: - QGridLayout* layout; - QPtrList<KoTextTableCell> cells; - QPainter* painter; + TQGridLayout* tqlayout; + TQPtrList<KoTextTableCell> cells; + TQPainter* painter; int cachewidth; int fixwidth; int cellpadding; @@ -589,13 +589,13 @@ private: int stretch; int innerborder; int us_cp, us_ib, us_b, us_ob, us_cs; - QMap<QString, QString> attributes; - QMap<KoTextCursor*, int> currCell; + TQMap<TQString, TQString> attributes; + TQMap<KoTextCursor*, int> currCell; Placement place; void adjustCells( int y , int shift ); int pageBreakFor; }; -#endif // QTEXTTABLE_AVAILABLE +#endif // TQTEXTTABLE_AVAILABLE // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -613,8 +613,8 @@ struct KoTextDocumentSelection class KOTEXT_EXPORT KoTextDocDeleteCommand : public KoTextDocCommand { public: - KoTextDocDeleteCommand( KoTextDocument *d, int i, int idx, const QMemArray<KoTextStringChar> &str ); - //KoTextDocDeleteCommand( KoTextParag *p, int idx, const QMemArray<KoTextStringChar> &str ); + KoTextDocDeleteCommand( KoTextDocument *d, int i, int idx, const TQMemArray<KoTextStringChar> &str ); + //KoTextDocDeleteCommand( KoTextParag *p, int idx, const TQMemArray<KoTextStringChar> &str ); virtual ~KoTextDocDeleteCommand(); Commands type() const { return Delete; } @@ -624,7 +624,7 @@ public: protected: int id, index; KoTextParag *parag; - QMemArray<KoTextStringChar> text; + TQMemArray<KoTextStringChar> text; }; @@ -632,9 +632,9 @@ protected: class KoTextDocInsertCommand : public KoTextDocDeleteCommand { public: - KoTextDocInsertCommand( KoTextDocument *d, int i, int idx, const QMemArray<KoTextStringChar> &str ) + KoTextDocInsertCommand( KoTextDocument *d, int i, int idx, const TQMemArray<KoTextStringChar> &str ) : KoTextDocDeleteCommand( d, i, idx, str ) {} - KoTextDocInsertCommand( KoTextParag *p, int idx, const QMemArray<KoTextStringChar> &str ) + KoTextDocInsertCommand( KoTextParag *p, int idx, const TQMemArray<KoTextStringChar> &str ) : KoTextDocDeleteCommand( p, idx, str ) {} virtual ~KoTextDocInsertCommand() {} @@ -648,7 +648,7 @@ public: class KoTextDocFormatCommand : public KoTextDocCommand { public: - KoTextDocFormatCommand( KoTextDocument *d, int sid, int sidx, int eid, int eidx, const QMemArray<KoTextStringChar> &old, const KoTextFormat *f, int fl ); + KoTextDocFormatCommand( KoTextDocument *d, int sid, int sidx, int eid, int eidx, const TQMemArray<KoTextStringChar> &old, const KoTextFormat *f, int fl ); virtual ~KoTextDocFormatCommand(); Commands type() const { return Format; } @@ -658,7 +658,7 @@ public: protected: int startId, startIndex, endId, endIndex; KoTextFormat *format; - QMemArray<KoTextStringChar> oldFormats; + TQMemArray<KoTextStringChar> oldFormats; int flags; }; @@ -666,7 +666,7 @@ protected: class KoTextAlignmentCommand : public KoTextDocCommand { public: - KoTextAlignmentCommand( KoTextDocument *d, int fParag, int lParag, int na, const QMemArray<int> &oa ); + KoTextAlignmentCommand( KoTextDocument *d, int fParag, int lParag, int na, const TQMemArray<int> &oa ); virtual ~KoTextAlignmentCommand() {} Commands type() const { return Alignment; } @@ -676,7 +676,7 @@ public: private: int firstParag, lastParag; int newAlign; - QMemArray<int> oldAligns; + TQMemArray<int> oldAligns; }; @@ -685,32 +685,32 @@ private: struct KoTextParagLineStart { KoTextParagLineStart() : y( 0 ), baseLine( 0 ), h( 0 ), lineSpacing( 0 ), hyphenated( false ) -#ifndef QT_NO_COMPLEXTEXT +#ifndef TQT_NO_COMPLEXTEXT , bidicontext( 0 ) #endif { } KoTextParagLineStart( ushort y_, ushort bl, ushort h_ ) : y( y_ ), baseLine( bl ), h( h_ ), lineSpacing( 0 ), hyphenated( false ), w( 0 ) -#ifndef QT_NO_COMPLEXTEXT +#ifndef TQT_NO_COMPLEXTEXT , bidicontext( 0 ) #endif { } -#ifndef QT_NO_COMPLEXTEXT - KoTextParagLineStart( KoBidiContext *c, KoBidiStatus s ) : y(0), baseLine(0), h(0), +#ifndef TQT_NO_COMPLEXTEXT + KoTextParagLineStart( KoBidiContext *c, KoBiditqStatus s ) : y(0), baseLine(0), h(0), lineSpacing( 0 ), hyphenated( false ), status( s ), bidicontext( c ) { if ( bidicontext ) bidicontext->ref(); } #endif virtual ~KoTextParagLineStart() { -#ifndef QT_NO_COMPLEXTEXT +#ifndef TQT_NO_COMPLEXTEXT if ( bidicontext && bidicontext->deref() ) delete bidicontext; #endif } -#ifndef QT_NO_COMPLEXTEXT +#ifndef TQT_NO_COMPLEXTEXT void setContext( KoBidiContext *c ) { if ( c == bidicontext ) return; @@ -727,13 +727,13 @@ public: ushort y, baseLine, h; short lineSpacing; bool hyphenated; -#ifndef QT_NO_COMPLEXTEXT - KoBidiStatus status; +#ifndef TQT_NO_COMPLEXTEXT + KoBiditqStatus status; #endif int w; private: -#ifndef QT_NO_COMPLEXTEXT +#ifndef TQT_NO_COMPLEXTEXT KoBidiContext *bidicontext; #endif }; @@ -745,7 +745,7 @@ class KOTEXT_EXPORT KoTextFormatterBase public: KoTextFormatterBase(); virtual ~KoTextFormatterBase() {} - virtual bool format( KoTextDocument *doc, KoTextParag *parag, int start, const QMap<int, KoTextParagLineStart*> &oldLineStarts, int& y, int& widthUsed ) = 0; + virtual bool format( KoTextDocument *doc, KoTextParag *parag, int start, const TQMap<int, KoTextParagLineStart*> &oldLineStarts, int& y, int& widthUsed ) = 0; virtual int formatVertically( KoTextDocument* doc, KoTextParag* parag ); // Called after formatting a paragraph @@ -769,7 +769,7 @@ protected: // KoTextStringChar *last, int align = AlignAuto, int space = 0 ); //KoTextStringChar -#ifndef QT_NO_COMPLEXTEXT +#ifndef TQT_NO_COMPLEXTEXT virtual KoTextParagLineStart *bidiReorderLine( KoTextParag *parag, KoTextString *string, KoTextParagLineStart *line, KoTextStringChar *start, KoTextStringChar *last, int align, int space ); #endif @@ -782,7 +782,7 @@ private: bool unused; // for future extensions #ifdef HAVE_THAI_BREAKS - static QCString *thaiCache; + static TQCString *thaiCache; static KoTextString *cachedString; static ThBreakIterator *thaiIt; #endif @@ -796,7 +796,7 @@ inline int KoTextString::length() const return data.size(); } -inline void KoTextString::operator+=( const QString &s ) +inline void KoTextString::operator+=( const TQString &s ) { insert( length(), s, 0 ); } @@ -831,7 +831,7 @@ inline KoTextStringChar &KoTextString::at( int i ) const return data[ i ]; } -inline QString KoTextString::toString() const +inline TQString KoTextString::toString() const { return toString( data ); } |