15#ifndef __RTFIMPORT_H__
16#define __RTFIMPORT_H__
19#include <tqasciidict.h>
26#include <tqvaluelist.h>
27#include <tqvaluestack.h>
28#include <tqtextcodec.h>
29#include "rtfimport_dom.h"
30#include "rtfimport_tokenizer.h"
41 const char *onlyValidIn;
73 enum BorderStyle { Solid, Dashes, Dots, DashDot, DashDotDot, None = 16 };
84 enum TabType { Left, Centered, FlushRight, Decimal };
85 enum LeaderType { None, Dots, Hyphens, Underline, ThickLine };
96 TQFont::StyleHint styleHint;
104 enum PictureType { BMP, WMF, MacPict, EMF, PNG, JPEG };
109 int cropLeft, cropTop, cropRight, cropBottom;
110 int desiredWidth, desiredHeight;
121 enum Alignment { Left, Right, Justified, Centered };
123 TQValueStack<RTFTab> tablist;
129 int firstIndent, leftIndent, rightIndent;
130 int spaceBefore, spaceAfter;
141 enum VertAlign { Normal = 0, SubScript, SuperScript };
142 enum Underline { UnderlineNone=0, UnderlineSimple, UnderlineThick, UnderlineDouble, UnderlineWordByWord,
143 UnderlineWave, UnderlineDash, UnderlineDot, UnderlineDashDot, UnderlineDashDotDot };
147 int font, fontSize, baseline;
148 int color, bgcolor, underlinecolor;
150 bool bold, italic, strike, striked;
151 bool hidden, caps, smallCaps;
157 return f1.vertAlign == f2.vertAlign && f1.underline == f2.underline
158 && f1.font == f2.font && f1.fontSize == f2.fontSize && f1.baseline == f2.baseline
159 && f1.color == f2.color && f1.bgcolor == f2.color && f1.underlinecolor == f2.underlinecolor
161 && f1.bold == f2.bold && f1.italic == f2.italic && f1.strike == f2.strike && f1.striked == f2.striked
162 && f1.hidden == f2.hidden && f1.caps == f2.caps && f1.smallCaps == f2.smallCaps
168 return ! ( f1 == f2 );
199 TQValueList<RTFTableCell> cells;
200 TQStringList frameSets;
201 RTFLayout::Alignment alignment;
223 TQValueList<KWFormat> formats;
224 TQStringList frameSets;
225 TQValueList<RTFTableRow> rows;
244class RTFImport : public KoFilter
250 RTFImport( KoFilter *parent, const char *name, const TQStringList& );
258 virtual KoFilter::ConversionStatus convert( const TQCString& from, const TQCString& to );
341 void setUnderlineProperty( RTFProperty* property );
386 void selectLayoutBorderFromCell( RTFProperty * property );
406 void insertUTF8( int ch );
483 void addAnchor( const char *instance );
490 void addFormat( DomNode &node, const KWFormat& format, const RTFFormat* baseFormat );
498 void addLayout( DomNode &node, const TQString &name, const RTFLayout &layout, bool frameBreak );
504 void addParagraph( DomNode &node, bool frameBreak );
505 void addVariable( const DomNode& spec, int type, const TQString& key, const RTFFormat* fmt=0);
506 void addImportedPicture( const TQString& rawFileName );
512 void addDateTime( const TQString& format, const bool isDate, RTFFormat& fmt );
522 void writeOutPart( const char *name, const DomNode &node );
528 DomNode author, company, title, doccomm;
530 TQPtrList<RTFTextState> footnotes;
532 RTFTextState firstPageHeader, oddPagesHeader, evenPagesHeader;
533 RTFTextState firstPageFooter, oddPagesFooter, evenPagesFooter;
539 TQMap<int,TQString> fontTable;
540 TQValueList<RTFStyle> styleSheet;
541 TQValueList<TQColor> colorTable;
542 TQValueStack<RTFGroupState> stateStack;
543 TQValueStack<RTFDestination> destinationStack;
552 TQAsciiDict<RTFProperty> properties;
553 TQAsciiDict<RTFProperty> destinationProperties;
558 int red, green, blue;
559 int paperWidth, paperHeight;
560 int leftMargin, topMargin, rightMargin, bottomMargin;
561 int defaultTab, defaultFont;
562 bool landscape, facingPages;
565 TQCString fldinst, fldrslt;
570 TQTextCodec* textCodec;
571 TQTextCodec* utf8TextCodec;
572 TQMap<TQString,int> debugUnknownKeywords;
This class represents the tokenizer and the token.
RTF group state (formatting properties).
bool ignoreGroup Should the group be ignored?
bool brace0 '}' will close the current destination
Paragraph-formatting properties.
bool spaceBetweenMultiple Is the linespacing defined as multiple of line height (true) or by a height in 1/20 pt (false)?
int spaceBetween Line spacing.
TQString identifier \blipuid
RTF property (control word table entry).
int offset offset of formatting property
Section-formatting properties.
Table-formatting properties.
RTF rich text state (text and tables).
DomNode cell table cell(s)
DomNode text plain text (for paragraph or table cell)
|