40#ifndef EXPORTFILTERSSTRUCTURES_H
41#define EXPORTFILTERSSTRUCTURES_H
43#include <tqvaluelist.h>
48#include <tqdatetime.h>
50#include <KoPictureKey.h>
51#include <koffice_export.h>
61 weight (50), fontSize (0), verticalAlignment (0), missing ( true) {}
63 TextFormatting( const bool newMissing) : italic ( false),
65 weight (50), fontSize (0), verticalAlignment (0),
68 TextFormatting ( TQString f,
79 weight (w), fontSize (sz), fgColor (fg),
80 bgColor (bg), verticalAlignment (v), missing ( false) {}
102 int verticalAlignment;
104 TQString fontAttribute;
121 TQString koStoreName;
138 TQString runaroundSide;
140 int autoCreateNewFrame;
141 int newFrameBehavior;
145 double lWidth, rWidth, tWidth, bWidth;
152 int lStyle, rStyle, tStyle, bStyle;
156 double bleftpt, brightpt, btoppt, bbottompt;
162class KOFFICEFILTER_EXPORT TableCell
165 TableCell (): col( 0 ), row( 0 ), m_cols( 0 ), m_rows( 0 ), paraList( 0 ) {}
168 TableCell ( int c, int r, int _cols, int _rows, TQValueList<ParaData> *p, FrameData &frameData )
169 : col (c), row (r), m_cols( _cols ), m_rows( _rows ), paraList (p), frame (frameData) {}
177 TQValueList<ParaData> *paraList;
185 Table () : cols (0) {}
188 void addCell ( int c, int r, int _cols, int _rows, TQValueList<ParaData> &p, FrameData &frameData );
191 TQValueList<TableCell> cellList;
202 FrameAnchor ( const KoPictureKey& n ) : key (n), type (-1) {}
215class KOFFICEFILTER_EXPORT VariableData
218 VariableData (): m_type(-1), footnotePara(0) {}
219 VariableData ( const TQString& text ) : m_text(text), m_type(-1) {}
220 VariableData ( const VariableData& other ) :
221 m_key(other.m_key), m_text(other.m_text),
222 m_type(other.m_type), propertyMap(other.propertyMap),
223 footnotePara(other.footnotePara) {}
228 void setLink( const TQString& linkName, const TQString& hrefName);
234 void setPgNum( const TQString& subtype, const TQString& value);
235 bool isPageNumber( void) const;
236 bool isPageCount( void) const;
240 void setField( const TQString& subtype, const TQString& value);
241 TQString getFieldName( void) const;
242 TQString getFieldValue( void) const;
247 void setFootnote( const TQString& notetype, const TQString& automatic, const TQString& value, TQValueList<ParaData>* para );
280 TQMap<TQString,TQString> propertyMap;
281 TQValueList<ParaData>* footnotePara;
288 : id (-1), pos (-1), len (-1), text(true) {}
290 FormatData ( const int p, const int l, const bool missing )
291 : id (1), pos (p), len (l), text(missing) {}
293 FormatData ( const int i, const int p, const int l )
294 : id (i), pos (p), len (l), text(false) {}
296 FormatData ( const int p, const int l, const FrameAnchor& t )
297 : id (6), pos (p), len (l), frameAnchor (t) {}
299 FormatData ( const FormatData& other )
300 : id(other.id), pos(other.pos), len(other.len),
301 text(other.text), frameAnchor(other.frameAnchor), variable(other.variable) {}
308 FrameAnchor frameAnchor;
309 VariableData variable;
313class ValueListFormatData : public TQValueList<FormatData>
316 ValueListFormatData ( void) { }
317 virtual ~ValueListFormatData ( void) { }
326 : numbering ( NUM_NONE), style (STYLE_NONE), depth(0), start(0), customCharacter(0)
344 STYLE_CUSTOMBULLET = 6,
346 STYLE_CIRCLEBULLET = 8,
347 STYLE_SQUAREBULLET = 9,
348 STYLE_DISCBULLET = 10,
371 BorderData() : style(0), width(0.0) {}
381class KOFFICEFILTER_EXPORT TabulatorData
395 TabulatorData() : m_type(0), m_ptpos(0.0), m_filling(0), m_width(0.0) {}
397 bool operator == ( const TabulatorData& other) const;
408class TabulatorList : public TQValueList<TabulatorData>
411 TabulatorList( void) {}
412 virtual ~TabulatorList( void) {}
421 keepLinesTogether( false),
426 enum { LS_CUSTOM = 0, LS_SINGLE = 10, LS_ONEANDHALF = 15, LS_DOUBLE = 20,
427 LS_ATLEAST = 30, LS_MULTIPLE = 40, LS_FIXED = 50 };
430 TQString styleFollowing;
433 FormatData formatData;
443 bool pageBreakBefore;
445 bool keepLinesTogether;
461 ValueListFormatData formattingList;
465struct HeaderFooterData
467 enum HeaderFooterPage
475 HeaderFooterPage page;
476 TQValueList<ParaData> para;
479typedef HeaderFooterData HeaderData;
480typedef HeaderFooterData FooterData;
486 TQValueList<ParaData> para;
490class VariableSettingsData
493 VariableSettingsData () : startingPageNumber (1),
495 underlinelink ( true),
496 displaycomment ( true),
497 displayfieldcode ( false)
501 int startingPageNumber;
505 bool displayfieldcode;
506 TQDateTime creationTime;
507 TQDateTime modificationTime;
508 TQDateTime printTime;
511class KWEFDocumentInfo
514 KWEFDocumentInfo( void) { }
534 TQString telephonework;
558void CreateMissingFormatData ( TQString ¶Text, ValueListFormatData ¶FormatDataList );
TQString m_name Bookmark name.
int m_startparag Number of the paragrapgh where the booksmark starts.
int m_cursorIndexStart Position where the bookmark starts in the paragraph.
int m_cursorIndexEnd Position where the bookmark ends in the paragraph.
TQString m_frameset Name of the frameset where the bookmark is.
int m_endparag Number of the paragrapgh where the booksmark starts.
Counter structure, for LayoutData.
TQString text text at the time of saving (no formatting info though)
@ NUM_LIST Numbered as a list item.
@ NUM_CHAPTER Numbered as a heading.
KoPictureKey key Picture key.
double lineSpacing Space between lines in pt, if lineSpacingType==0.
int shadowDirection direction of <SHADOW>
TabulatorList tabulatorList List of tabulators.
TQColor shadowColor red, green, blue of <SHADOW>
double indentFirst indentation correction of first line (can be negative!)
double indentRight right indentation (a negative value means invalid)
double shadowDistance distance of <SHADOW>
double indentLeft left indentation (a negative value means invalid)
TQString alignment left, right, center, justify
int lineSpacingType 0=custom, 10=one line, 15=one and half lines, 20= 2 lines
double marginTop space before the paragraph (a negative value means invalid)
double marginBottom space after the paragraph (a negative value means invalid)
void addCell(int c, int r, int _cols, int _rows, TQValueList< ParaData > &p, FrameData &frameData)
bool underlineWord true if word-by-word (i.e spaces are not underlined)
bool underline Any underline? (If true, we do not know if simple or double or what else).
TQString language Language code.
TQColor underlineColor color of the line
bool strikeout true if strikeout
TQString underlineStyle underline style: solid, dash, dot dash, ....
TQString underlineValue "value" of the underline: single, double, bold-single...
bool missing true if this TextFormatting object does not correspond to a real <FORMAT> element
TQString strikeoutLineStyle type of the strikeout line: solid, dash, dot, ....
TQString strikeoutType type of strikeout: single, bold, double
TQString getFootnoteValue(void) const Get the value (counter) of the footnote.
TQString getHrefName(void) const Reference of link (attribute "hrefName" of <LINK>).
bool getFootnoteType(void) const Get type of footnote.
TQValueList< ParaData > * getFootnotePara(void) const Paragrapgh of the footnote.
void setLink(const TQString &linkName, const TQString &hrefName) Set parameters of a LINK element.
void setGenericData(const TQString &key, const TQString &data) Set generic variable data.
void setField(const TQString &subtype, const TQString &value) Set parameters of a FIELD element.
void setFootnote(const TQString ¬etype, const TQString &automatic, const TQString &value, TQValueList< ParaData > *para) Set parameters of a <FOOTNOTE> element.
TQString getGenericData(const TQString &key) const Get generic variable data.
TQString getLinkName(void) const Name of link (attribute "linkName" of <LINK>).
void setPgNum(const TQString &subtype, const TQString &value) Set parameters of a PGNUM element.
bool getFootnoteAuto(void) const Is the footnote an automatic one?
|