Diffstat (limited to 'noncore/apps/opie-write/qrichtext_p.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-write/qrichtext_p.h | 157 |
1 files changed, 80 insertions, 77 deletions
diff --git a/noncore/apps/opie-write/qrichtext_p.h b/noncore/apps/opie-write/qrichtext_p.h index e368edb..3778feb 100644 --- a/noncore/apps/opie-write/qrichtext_p.h +++ b/noncore/apps/opie-write/qrichtext_p.h @@ -41,24 +41,27 @@ // // W A R N I N G // ------------- // // This file is not part of the Qt API. It exists for the convenience // of a number of Qt sources files. This header file may change from // version to version without notice, or even be removed. // // We mean it. // // +#include <opie2/odebug.h> +using namespace Opie::Core; + #ifndef QT_H #include "qstring.h" #include "qlist.h" #include "qrect.h" #include "qfontmetrics.h" #include "qintdict.h" #include "qmap.h" #include "qstringlist.h" #include "qfont.h" #include "qcolor.h" #include "qsize.h" #include "qvaluelist.h" @@ -115,46 +118,46 @@ public: int x; int height() const; int ascent() const; int descent() const; bool isCustom() const { return (type & Custom) != 0; } QTextFormat *format() const; QTextCustomItem *customItem() const; void setFormat( QTextFormat *f ); void setCustomItem( QTextCustomItem *i ); struct CustomData { - QTextFormat *format; - QTextCustomItem *custom; - QString anchorName; - QString anchorHref; + QTextFormat *format; + QTextCustomItem *custom; + QString anchorName; + QString anchorHref; }; void loseCustomItem(); union { - QTextFormat* format; - CustomData* custom; + QTextFormat* format; + CustomData* custom; } d; bool isAnchor() const { return ( type & Anchor) != 0; } QString anchorName() const; QString anchorHref() const; void setAnchor( const QString& name, const QString& href ); private: QTextStringChar &operator=( const QTextStringChar & ) { - //abort(); - return *this; + //abort(); + return *this; } friend class QComplexText; friend class QTextParagraph; }; #if defined(Q_TEMPLATEDLL) // MOC_SKIP_BEGIN Q_TEMPLATE_EXTERN template class Q_EXPORT QMemArray<QTextStringChar>; // MOC_SKIP_END #endif class Q_EXPORT QTextString @@ -199,32 +202,32 @@ private: void checkBidi() const; QMemArray<QTextStringChar> data; uint bidiDirty : 1; uint bidi : 1; // true when the paragraph has right to left characters uint rightToLeft : 1; uint dir : 5; }; inline bool QTextString::isBidi() const { if ( bidiDirty ) - checkBidi(); + checkBidi(); return bidi; } inline bool QTextString::isRightToLeft() const { if ( bidiDirty ) - checkBidi(); + checkBidi(); return rightToLeft; } inline QChar::Direction QTextString::direction() const { return (QChar::Direction) dir; } // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ #if defined(Q_TEMPLATEDLL) // MOC_SKIP_BEGIN @@ -375,25 +378,25 @@ private: inline QTextCommandHistory::~QTextCommandHistory() { clear(); } // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ class Q_EXPORT QTextCustomItem { public: QTextCustomItem( QTextDocument *p ) - : xpos(0), ypos(-1), width(-1), height(0), parent( p ) + : xpos(0), ypos(-1), width(-1), height(0), parent( p ) {} virtual ~QTextCustomItem(); virtual void draw(QPainter* p, int x, int y, int cx, int cy, int cw, int ch, const QColorGroup& cg, bool selected ) = 0; virtual void adjustToPainter( QPainter* ); enum Placement { PlaceInline = 0, PlaceLeft, PlaceRight }; virtual Placement placement() const; bool placeInline() { return placement() == PlaceInline; } virtual bool ownLine() const; virtual void resize( int nwidth ); @@ -429,50 +432,50 @@ public: }; #if defined(Q_TEMPLATEDLL) // MOC_SKIP_BEGIN Q_TEMPLATE_EXTERN template class Q_EXPORT QMap<QString, QString>; // MOC_SKIP_END #endif class Q_EXPORT QTextImage : public QTextCustomItem { public: QTextImage( QTextDocument *p, const QMap<QString, QString> &attr, const QString& context, - QMimeSourceFactory &factory ); + QMimeSourceFactory &factory ); virtual ~QTextImage(); Placement placement() const { return place; } void adjustToPainter( QPainter* ); int minimumWidth() const { return width; } QString richText() const; void draw( QPainter* p, int x, int y, int cx, int cy, int cw, int ch, const QColorGroup& cg, bool selected ); private: QRegion* reg; QPixmap pm; Placement place; int tmpwidth, tmpheight; QMap<QString, QString> attributes; QString imgId; }; class Q_EXPORT QTextHorizontalLine : public QTextCustomItem { public: QTextHorizontalLine( QTextDocument *p, const QMap<QString, QString> &attr, const QString& context, - QMimeSourceFactory &factory ); + QMimeSourceFactory &factory ); virtual ~QTextHorizontalLine(); void adjustToPainter( QPainter* ); void draw(QPainter* p, int x, int y, int cx, int cy, int cw, int ch, const QColorGroup& cg, bool selected ); QString richText() const; bool ownLine() const { return TRUE; } private: int tmpheight; QColor color; @@ -523,29 +526,29 @@ private: }; inline int QTextFlow::width() const { return w; } class QTextTable; class Q_EXPORT QTextTableCell : public QLayoutItem { friend class QTextTable; public: QTextTableCell( QTextTable* table, - int row, int column, - const QMap<QString, QString> &attr, - const QStyleSheetItem* style, - const QTextFormat& fmt, const QString& context, - QMimeSourceFactory &factory, QStyleSheet *sheet, const QString& doc ); + int row, int column, + const QMap<QString, QString> &attr, + const QStyleSheetItem* style, + const QTextFormat& fmt, const QString& context, + QMimeSourceFactory &factory, QStyleSheet *sheet, const QString& doc ); virtual ~QTextTableCell(); QSize sizeHint() const ; QSize minimumSize() const ; QSize maximumSize() const ; QSizePolicy::ExpandData expanding() const; bool isEmpty() const; void setGeometry( const QRect& ) ; QRect geometry() const; bool hasHeightForWidth() const; int heightForWidth( int ) const; @@ -597,25 +600,25 @@ Q_TEMPLATE_EXTERN template class Q_EXPORT QMap<QTextCursor*, int>; class Q_EXPORT QTextTable: public QTextCustomItem { friend class QTextTableCell; public: QTextTable( QTextDocument *p, const QMap<QString, QString> &attr ); virtual ~QTextTable(); void adjustToPainter( QPainter *p ); void pageBreak( int y, QTextFlow* flow ); void draw( QPainter* p, int x, int y, int cx, int cy, int cw, int ch, - const QColorGroup& cg, bool selected ); + const QColorGroup& 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(); virtual bool enter( QTextCursor *c, QTextDocument *&doc, QTextParagraph *¶g, int &idx, int &ox, int &oy, bool atEnd = FALSE ); virtual bool enterAt( QTextCursor *c, QTextDocument *&doc, QTextParagraph *¶g, int &idx, int &ox, int &oy, const QPoint &pos ); virtual bool next( QTextCursor *c, QTextDocument *&doc, QTextParagraph *¶g, int &idx, int &ox, int &oy ); virtual bool prev( QTextCursor *c, QTextDocument *&doc, QTextParagraph *¶g, int &idx, int &ox, int &oy ); @@ -675,27 +678,27 @@ Q_TEMPLATE_EXTERN template class Q_EXPORT QPtrList<QTextDocument>; class Q_EXPORT QTextDocument : public QObject { Q_OBJECT friend class QTextTableCell; friend class QTextCursor; friend class QTextEdit; friend class QTextParagraph; public: enum SelectionIds { - Standard = 0, - Temp = 32000 // This selection must not be drawn, it's used e.g. by undo/redo to - // remove multiple lines with removeSelectedText() + Standard = 0, + Temp = 32000 // This selection must not be drawn, it's used e.g. by undo/redo to + // remove multiple lines with removeSelectedText() }; QTextDocument( QTextDocument *p ); QTextDocument( QTextDocument *d, QTextFormatCollection *f ); virtual ~QTextDocument(); QTextDocument *parent() const { return par; } QTextParagraph *parentParagraph() const { return parentPar; } void setText( const QString &text, const QString &context ); QMap<QString, QString> attributes() const { return attribs; } void setAttributes( const QMap<QString, QString> &attr ) { attribs = attr; } @@ -782,29 +785,29 @@ public: void setMimeSourceFactory( QMimeSourceFactory *f ) { if ( f ) factory_ = f; } void setContext( const QString &c ) { if ( !c.isEmpty() ) contxt = c; } void setUnderlineLinks( bool b ); bool underlineLinks() const { return underlLinks; } void setPaper( QBrush *brush ) { if ( backBrush ) delete backBrush; backBrush = brush; } QBrush *paper() const { return backBrush; } void doLayout( QPainter *p, int w ); void draw( QPainter *p, const QRect& rect, const QColorGroup &cg, const QBrush *paper = 0 ); void drawParagraph( QPainter *p, QTextParagraph *parag, int cx, int cy, int cw, int ch, - QPixmap *&doubleBuffer, const QColorGroup &cg, - bool drawCursor, QTextCursor *cursor, bool resetChanged = TRUE ); + QPixmap *&doubleBuffer, const QColorGroup &cg, + bool drawCursor, QTextCursor *cursor, bool resetChanged = TRUE ); QTextParagraph *draw( QPainter *p, int cx, int cy, int cw, int ch, const QColorGroup &cg, - bool onlyChanged = FALSE, bool drawCursor = FALSE, QTextCursor *cursor = 0, - bool resetChanged = TRUE ); + bool onlyChanged = FALSE, bool drawCursor = FALSE, QTextCursor *cursor = 0, + bool resetChanged = TRUE ); void registerCustomItem( QTextCustomItem *i, QTextParagraph *p ); void unregisterCustomItem( QTextCustomItem *i, QTextParagraph *p ); void setFlow( QTextFlow *f ); void takeFlow(); QTextFlow *flow() const { return flow_; } bool isPageBreakEnabled() const { return pages; } void setPageBreakEnabled( bool b ) { pages = b; } void setUseFormatCollection( bool b ) { useFC = b; } bool useFormatCollection() const { return useFC; } @@ -849,40 +852,40 @@ public: static bool endsWith( QString str, const QString &s); signals: void minimumWidthChanged( int ); private: void init(); QPixmap *bufferPixmap( const QSize &s ); // HTML parser bool hasPrefix(const QChar* doc, int length, int pos, QChar c); bool hasPrefix(const QChar* doc, int length, int pos, const QString& s); QTextCustomItem* parseTable( const QMap<QString, QString> &attr, const QTextFormat &fmt, - const QChar* doc, int length, int& pos, QTextParagraph *curpar ); + const QChar* doc, int length, int& pos, QTextParagraph *curpar ); bool eatSpace(const QChar* doc, int length, int& pos, bool includeNbsp = FALSE ); bool eat(const QChar* doc, int length, int& pos, QChar c); QString parseOpenTag(const QChar* doc, int length, int& pos, QMap<QString, QString> &attr, bool& emptyTag); QString parseCloseTag( const QChar* doc, int length, int& pos ); QChar parseHTMLSpecialChar(const QChar* doc, int length, int& pos); QString parseWord(const QChar* doc, int length, int& pos, bool lower = TRUE); QChar parseChar(const QChar* doc, int length, int& pos, QStyleSheetItem::WhiteSpaceMode wsm ); void setRichTextInternal( const QString &text, QTextCursor* cursor = 0 ); void setRichTextMarginsInternal( QPtrList< QPtrVector<QStyleSheetItem> >& styles, QTextParagraph* stylesPar ); private: struct Q_EXPORT Focus { - QTextParagraph *parag; - int start, len; - QString href; + QTextParagraph *parag; + int start, len; + QString href; }; int cx, cy, cw, vw; QTextParagraph *fParag, *lParag; QTextPreProcessor *pProcessor; QMap<int, QColor> selectionColors; QMap<int, QTextDocumentSelection> selections; QMap<int, bool> selectionText; QTextCommandHistory *commandHistory; QTextFormatter *pFormatter; QTextIndent *indenter; QTextFormatCollection *fCollection; @@ -922,48 +925,48 @@ private: double scaleFontsFactor; short list_tm,list_bm, list_lm, li_tm, li_bm, par_tm, par_bm; }; // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ class Q_EXPORT QTextDeleteCommand : public QTextCommand { public: QTextDeleteCommand( QTextDocument *d, int i, int idx, const QMemArray<QTextStringChar> &str, - const QByteArray& oldStyle ); + const QByteArray& oldStyle ); QTextDeleteCommand( QTextParagraph *p, int idx, const QMemArray<QTextStringChar> &str ); virtual ~QTextDeleteCommand(); Commands type() const { return Delete; } QTextCursor *execute( QTextCursor *c ); QTextCursor *unexecute( QTextCursor *c ); protected: int id, index; QTextParagraph *parag; QMemArray<QTextStringChar> text; QByteArray styleInformation; }; class Q_EXPORT QTextInsertCommand : public QTextDeleteCommand { public: QTextInsertCommand( QTextDocument *d, int i, int idx, const QMemArray<QTextStringChar> &str, - const QByteArray& oldStyleInfo ) - : QTextDeleteCommand( d, i, idx, str, oldStyleInfo ) {} + const QByteArray& oldStyleInfo ) + : QTextDeleteCommand( d, i, idx, str, oldStyleInfo ) {} QTextInsertCommand( QTextParagraph *p, int idx, const QMemArray<QTextStringChar> &str ) - : QTextDeleteCommand( p, idx, str ) {} + : QTextDeleteCommand( p, idx, str ) {} virtual ~QTextInsertCommand() {} Commands type() const { return Insert; } QTextCursor *execute( QTextCursor *c ) { return QTextDeleteCommand::unexecute( c ); } QTextCursor *unexecute( QTextCursor *c ) { return QTextDeleteCommand::execute( c ); } }; class Q_EXPORT QTextFormatCommand : public QTextCommand { public: QTextFormatCommand( QTextDocument *d, int sid, int sidx, int eid, int eidx, const QMemArray<QTextStringChar> &old, QTextFormat *f, int fl ); @@ -1002,55 +1005,55 @@ private: // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ struct Q_EXPORT QTextParagraphSelection { int start, end; }; struct Q_EXPORT QTextLineStart { QTextLineStart() : y( 0 ), baseLine( 0 ), h( 0 ) #ifndef QT_NO_COMPLEXTEXT - , bidicontext( 0 ) + , bidicontext( 0 ) #endif { } QTextLineStart( ushort y_, ushort bl, ushort h_ ) : y( y_ ), baseLine( bl ), h( h_ ), - w( 0 ) + w( 0 ) #ifndef QT_NO_COMPLEXTEXT - , bidicontext( 0 ) + , bidicontext( 0 ) #endif { } #ifndef QT_NO_COMPLEXTEXT QTextLineStart( QBidiContext *c, QBidiStatus s ) : y(0), baseLine(0), h(0), - status( s ), bidicontext( c ) { if ( bidicontext ) bidicontext->ref(); } + status( s ), bidicontext( c ) { if ( bidicontext ) bidicontext->ref(); } #endif virtual ~QTextLineStart() { #ifndef QT_NO_COMPLEXTEXT - if ( bidicontext && bidicontext->deref() ) - delete bidicontext; + if ( bidicontext && bidicontext->deref() ) + delete bidicontext; #endif } #ifndef QT_NO_COMPLEXTEXT void setContext( QBidiContext *c ) { - if ( c == bidicontext ) - return; - if ( bidicontext && bidicontext->deref() ) - delete bidicontext; - bidicontext = c; - if ( bidicontext ) - bidicontext->ref(); + if ( c == bidicontext ) + return; + if ( bidicontext && bidicontext->deref() ) + delete bidicontext; + bidicontext = c; + if ( bidicontext ) + bidicontext->ref(); } QBidiContext *context() const { return bidicontext; } #endif public: ushort y, baseLine, h; #ifndef QT_NO_COMPLEXTEXT QBidiStatus status; #endif int w; private: @@ -1174,25 +1177,25 @@ public: void setExtraData( QTextParagraphData *data ); QTextParagraphData *extraData() const; QMap<int, QTextLineStart*> &lineStartList(); void setFormat( int index, int len, QTextFormat *f, bool useCollection = TRUE, int flags = -1 ); void setAlignment( int a ); int alignment() const; virtual void paint( QPainter &painter, const QColorGroup &cg, QTextCursor *cursor = 0, bool drawSelections = FALSE, - int clipx = -1, int clipy = -1, int clipw = -1, int cliph = -1 ); + int clipx = -1, int clipy = -1, int clipw = -1, int cliph = -1 ); virtual int topMargin() const; virtual int bottomMargin() const; virtual int leftMargin() const; virtual int firstLineMargin() const; virtual int rightMargin() const; virtual int lineSpacing() const; void registerFloatingItem( QTextCustomItem *i ); void unregisterFloatingItem( QTextCustomItem *i ); void setFullWidth( bool b ) { fullWidth = b; } @@ -1237,27 +1240,27 @@ public: void setMovedDown( bool b ) { movedDown = b; } bool wasMovedDown() const { return movedDown; } void setDirection( QChar::Direction d ); QChar::Direction direction() const; void readStyleInformation( QDataStream& stream ); void writeStyleInformation( QDataStream& stream ) const; protected: virtual void drawLabel( QPainter* p, int x, int y, int w, int h, int base, const QColorGroup& cg ); virtual void drawString( QPainter &painter, const QString &str, int start, int len, int xstart, - int y, int baseLine, int w, int h, int selection, - QTextStringChar *formatChar, const QColorGroup& cg, - bool rightToLeft ); + int y, int baseLine, int w, int h, int selection, + QTextStringChar *formatChar, const QColorGroup& cg, + bool rightToLeft ); private: QMap<int, QTextParagraphSelection> &selections() const; QPtrList<QTextCustomItem> &floatingItems() const; QBrush backgroundBrush( const QColorGroup&cg ) { if ( bgcol ) return *bgcol; return cg.brush( QColorGroup::Base ); } void invalidateStyleCache(); QMap<int, QTextLineStart*> lineStarts; int invalid; QRect r; QTextParagraph *p, *n; void *docOrPseudo; @@ -1306,28 +1309,28 @@ public: virtual void setWrapEnabled( bool b ); virtual void setWrapAtColumn( int c ); virtual void setAllowBreakInWords( bool b ) { biw = b; } bool allowBreakInWords() const { return biw; } int minimumWidth() const { return thisminw; } int widthUsed() const { return thiswused; } static bool isBreakable( QTextString *string, int pos ); protected: virtual QTextLineStart *formatLine( QTextParagraph *parag, QTextString *string, QTextLineStart *line, QTextStringChar *start, - QTextStringChar *last, int align = Qt3::AlignAuto, int space = 0 ); + QTextStringChar *last, int align = Qt3::AlignAuto, int space = 0 ); #ifndef QT_NO_COMPLEXTEXT virtual QTextLineStart *bidiReorderLine( QTextParagraph *parag, QTextString *string, QTextLineStart *line, QTextStringChar *start, - QTextStringChar *last, int align, int space ); + QTextStringChar *last, int align, int space ); #endif void insertLineStart( QTextParagraph *parag, int index, QTextLineStart *ls ); int thisminw; int thiswused; private: bool wrapEnabled; int wrapColumn; bool biw; #ifdef HAVE_THAI_BREAKS @@ -1370,56 +1373,56 @@ public: virtual ~QTextIndent() {} virtual void indent( QTextDocument *doc, QTextParagraph *parag, int *oldIndent = 0, int *newIndent = 0 ) = 0; }; // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ class Q_EXPORT QTextPreProcessor { public: enum Ids { - Standard = 0 + Standard = 0 }; QTextPreProcessor(); virtual ~QTextPreProcessor() {} virtual void process( QTextDocument *doc, QTextParagraph *, int, bool = TRUE ) = 0; virtual QTextFormat *format( int id ) = 0; }; // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ class Q_EXPORT QTextFormat { friend class QTextFormatCollection; friend class QTextDocument; public: enum Flags { - NoFlags, - Bold = 1, - Italic = 2, - Underline = 4, - Family = 8, - Size = 16, - Color = 32, - Misspelled = 64, - VAlign = 128, - StrikeOut= 256, - Font = Bold | Italic | Underline | Family | Size | StrikeOut, - Format = Font | Color | Misspelled | VAlign + NoFlags, + Bold = 1, + Italic = 2, + Underline = 4, + Family = 8, + Size = 16, + Color = 32, + Misspelled = 64, + VAlign = 128, + StrikeOut= 256, + Font = Bold | Italic | Underline | Family | Size | StrikeOut, + Format = Font | Color | Misspelled | VAlign }; enum VerticalAlignment { AlignNormal, AlignSuperScript, AlignSubScript }; QTextFormat(); virtual ~QTextFormat(); QTextFormat( const QStyleSheetItem *s ); QTextFormat( const QFont &f, const QColor &c, QTextFormatCollection *parent = 0 ); QTextFormat( const QTextFormat &fm ); QTextFormat makeTextFormat( const QStyleSheetItem *style, const QMap<QString,QString>& attr, double scaleFontsFactor ) const; QTextFormat& operator=( const QTextFormat &fm ); @@ -1720,32 +1723,32 @@ inline void QTextDocument::setTabArray( int *a ) { tArray = a; } inline void QTextDocument::setTabStops( int tw ) { tStopWidth = tw; } inline QString QTextDocument::originalText() const { if ( oTextValid ) - return oText; + return oText; return text(); } inline void QTextDocument::setFlow( QTextFlow *f ) { if ( flow_ ) - delete flow_; + delete flow_; flow_ = f; } inline void QTextDocument::takeFlow() { flow_ = 0; } // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ inline QColor QTextFormat::color() const { @@ -1777,29 +1780,29 @@ inline QTextFormatCollection *QTextFormat::parent() const return collection; } inline void QTextFormat::addRef() { ref++; } inline void QTextFormat::removeRef() { ref--; if ( !collection ) - return; + return; if ( this == collection->defFormat ) - return; + return; if ( ref == 0 ) - collection->remove( this ); + collection->remove( this ); } inline QString QTextFormat::key() const { return k; } inline bool QTextFormat::useLinkColor() const { return linkColor; } @@ -1834,65 +1837,65 @@ inline void QTextParagraph::setBackgroundColor( const QColor & c ) bgcol = new QColor( c ); setChanged( TRUE ); } inline void QTextParagraph::clearBackgroundColor() { delete bgcol; bgcol = 0; setChanged( TRUE ); } inline void QTextParagraph::append( const QString &s, bool reallyAtEnd ) { if ( reallyAtEnd ) - insert( str->length(), s ); + insert( str->length(), s ); else - insert( QMAX( str->length() - 1, 0 ), s ); + insert( QMAX( str->length() - 1, 0 ), s ); } inline QTextParagraph *QTextParagraph::prev() const { return p; } inline QTextParagraph *QTextParagraph::next() const { return n; } inline bool QTextParagraph::hasAnySelection() const { return mSelections ? !selections().isEmpty() : FALSE; } inline void QTextParagraph::setEndState( int s ) { if ( s == state ) - return; + return; state = s; } inline int QTextParagraph::endState() const { return state; } inline void QTextParagraph::setParagId( int i ) { id = i; } inline int QTextParagraph::paragId() const { if ( id == -1 ) - qWarning( "invalid parag id!!!!!!!! (%p)", (void*)this ); + owarn << "invalid parag id!!!!!!!! (" << (void*)this << ")" << oendl; return id; } inline bool QTextParagraph::firstPreProcess() const { return firstPProcess; } inline void QTextParagraph::setFirstPreProcess( bool b ) { firstPProcess = b; } @@ -1901,32 +1904,32 @@ inline QMap<int, QTextLineStart*> &QTextParagraph::lineStartList() { return lineStarts; } inline QTextString *QTextParagraph::string() const { return str; } inline QTextDocument *QTextParagraph::document() const { if ( hasdoc ) - return (QTextDocument*) docOrPseudo; + return (QTextDocument*) docOrPseudo; return 0; } inline QTextParagraphPseudoDocument *QTextParagraph::pseudoDocument() const { if ( hasdoc ) - return 0; + return 0; return (QTextParagraphPseudoDocument*) docOrPseudo; } inline QTextTableCell *QTextParagraph::tableCell() const { return hasdoc ? document()->tableCell () : 0; } inline QTextCommandHistory *QTextParagraph::commands() const { return hasdoc ? document()->commands() : pseudoDocument()->commandHistory; |