filters

RTFImport Class Reference

List of all members.

Detailed Description

Definition at line 244 of file rtfimport.h.


Public Member Functions

 RTFImport (KoFilter *parent, const char *name, const QStringList &)
virtual KoFilter::ConversionStatus convert (const QCString &from, const QCString &to)
void ignoreKeyword (RTFProperty *)
void setCodepage (RTFProperty *)
void setMacCodepage (RTFProperty *)
void setAnsiCodepage (RTFProperty *)
void setPcaCodepage (RTFProperty *)
void setPcCodepage (RTFProperty *)
void setToggleProperty (RTFProperty *)
void setFlagProperty (RTFProperty *property)
void setCharset (RTFProperty *property)
void setNumericProperty (RTFProperty *property)
void setEnumProperty (RTFProperty *property)
void setFontStyleHint (RTFProperty *property)
void setPictureType (RTFProperty *property)
void setSimpleUnderlineProperty (RTFProperty *)
void setUnderlineProperty (RTFProperty *property)
void setBorderProperty (RTFProperty *property)
void setBorderColor (RTFProperty *)
void setBorderStyle (RTFProperty *property)
void setUpProperty (RTFProperty *)
void setPlainFormatting (RTFProperty *=0L)
void setParagraphDefaults (RTFProperty *=0L)
void setSectionDefaults (RTFProperty *=0L)
void setTableRowDefaults (RTFProperty *=0L)
void selectLayoutBorder (RTFProperty *property)
void selectLayoutBorderFromCell (RTFProperty *property)
void insertParagraph (RTFProperty *=0L)
void insertPageBreak (RTFProperty *)
void insertTableCell (RTFProperty *)
void insertTableRow (RTFProperty *=0L)
void insertCellDef (RTFProperty *)
void insertTabDef (RTFProperty *)
void insertUTF8 (int ch)
void insertSymbol (RTFProperty *property)
void insertHexSymbol (RTFProperty *)
void insertUnicodeSymbol (RTFProperty *)
void insertDateTime (RTFProperty *property)
void insertPageNumber (RTFProperty *)
void parseBlipUid (RTFProperty *)
void parseField (RTFProperty *)
void parseFldinst (RTFProperty *)
void parseFldrslt (RTFProperty *)
void parseFontTable (RTFProperty *)
void parseFootNote (RTFProperty *)
void parseStyleSheet (RTFProperty *)
void parseColorTable (RTFProperty *)
void parsePicture (RTFProperty *)
void parseRichText (RTFProperty *)
void parsePlainText (RTFProperty *)
void parseGroup (RTFProperty *)
void skipGroup (RTFProperty *)
void changeDestination (RTFProperty *property)
void resetState ()
void addAnchor (const char *instance)
void addFormat (DomNode &node, const KWFormat &format, const RTFFormat *baseFormat)
void addLayout (DomNode &node, const QString &name, const RTFLayout &layout, bool frameBreak)
void addParagraph (DomNode &node, bool frameBreak)
void addVariable (const DomNode &spec, int type, const QString &key, const RTFFormat *fmt=0)
void addImportedPicture (const QString &rawFileName)
void addDateTime (const QString &format, const bool isDate, RTFFormat &fmt)
void finishTable ()
void writeOutPart (const char *name, const DomNode &node)

Public Attributes

RTFTokenizer token
DomNode frameSets
DomNode pictures
DomNode author
DomNode company
DomNode title
DomNode doccomm
RTFTextState bodyText
QPtrList< RTFTextStatefootnotes
int fnnum
RTFTextState firstPageHeader
RTFTextState oddPagesHeader
RTFTextState evenPagesHeader
RTFTextState firstPageFooter
RTFTextState oddPagesFooter
RTFTextState evenPagesFooter
RTFTextState m_dummyTextState
QMap< int, QString > fontTable
QValueList< RTFStylestyleSheet
QValueList< QColor > colorTable
QValueStack< RTFGroupStatestateStack
QValueStack< RTFDestinationdestinationStack
RTFGroupState state
RTFDestination destination
RTFTextStatetextState
RTFFont font
RTFStyle style
RTFPicture picture
RTFTableCell emptyCell
KWFormat kwFormat
QAsciiDict< RTFPropertyproperties
QAsciiDict< RTFPropertydestinationProperties
uint table
uint pictureNumber
int red
int green
int blue
int paperWidth
int paperHeight
int leftMargin
int topMargin
int rightMargin
int bottomMargin
int defaultTab
int defaultFont
bool landscape
bool facingPages
QCString fldinst
QCString fldrslt
RTFFormat fldfmt
int flddst
QString inFileName

Protected Attributes

QTextCodec * textCodec
QTextCodec * utf8TextCodec
QMap< QString, int > debugUnknownKeywords
bool m_batch

Member Function Documentation

void RTFImport::addAnchor ( const char *  instance  ) 

Add anchor to current destination (see KWord DTD).

Parameters:
instance the frameset number in the document

Definition at line 2033 of file rtfimport.cpp.

void RTFImport::addDateTime ( const QString &  format,
const bool  isDate,
RTFFormat fmt 
)

Add a date/time field and split it for KWord.

Parameters:
format format of the date/time
isDate is it a date field? (For the default format, if needed)

Definition at line 1650 of file rtfimport.cpp.

void RTFImport::addFormat ( DomNode node,
const KWFormat format,
const RTFFormat baseFormat 
)

Add format information to document node.

Parameters:
node the document node (destination)
format the format information
baseFormat the format information is based on this format

Definition at line 2050 of file rtfimport.cpp.

void RTFImport::addLayout ( DomNode node,
const QString &  name,
const RTFLayout layout,
bool  frameBreak 
)

Add layout information to document node.

Parameters:
node the document node (destination)
name the name of the current style
layout the paragraph layout information
frameBreak paragraph is always the last in a frame if true

Definition at line 2264 of file rtfimport.cpp.

void RTFImport::addParagraph ( DomNode node,
bool  frameBreak 
)

Add paragraph information to document node.

Parameters:
node the document node (destination)
frameBreak paragraph is always the last in a frame if true

Definition at line 2415 of file rtfimport.cpp.

void RTFImport::changeDestination ( RTFProperty property  ) 

Change the destination.

Definition at line 2009 of file rtfimport.cpp.

KoFilter::ConversionStatus RTFImport::convert ( const QCString &  from,
const QCString &  to 
) [virtual]

Convert document from RTF to KWord format.

Parameters:
from the mimetype for RTF
to the mimetype for KWord
Returns:
true if the document was successfully converted

Definition at line 312 of file rtfimport.cpp.

void RTFImport::finishTable (  ) 

Finish table and recalculate cell borders.

Definition at line 2484 of file rtfimport.cpp.

void RTFImport::ignoreKeyword ( RTFProperty  ) 

Skip the keyword, as we do not need to do anything with it (either because it is supported anyway or because we cannot support it.

)

Definition at line 801 of file rtfimport.cpp.

void RTFImport::insertCellDef ( RTFProperty  ) 

Inserts a table cell definition.

Definition at line 1187 of file rtfimport.cpp.

void RTFImport::insertDateTime ( RTFProperty property  ) 

Insert a date or time field.

Definition at line 1644 of file rtfimport.cpp.

void RTFImport::insertHexSymbol ( RTFProperty  ) 

Insert special character (hexadecimal escape value).

Definition at line 1256 of file rtfimport.cpp.

void RTFImport::insertPageNumber ( RTFProperty  ) 

Insert a page number field.

Definition at line 1634 of file rtfimport.cpp.

void RTFImport::insertSymbol ( RTFProperty property  ) 

Insert special character (as plain text).

Definition at line 1251 of file rtfimport.cpp.

void RTFImport::insertTabDef ( RTFProperty  ) 

Inserts a tabulator definition.

Definition at line 1203 of file rtfimport.cpp.

void RTFImport::insertTableRow ( RTFProperty = 0L  ) 

Finish table row and calculate cell borders.

Definition at line 1122 of file rtfimport.cpp.

void RTFImport::insertUnicodeSymbol ( RTFProperty  ) 

Insert unicode character (keyword \u).

Definition at line 1282 of file rtfimport.cpp.

void RTFImport::insertUTF8 ( int  ch  ) 

Inserts a single (Unicode) character in UTF8 format.

Parameters:
ch the character to write to the current destination

Definition at line 1212 of file rtfimport.cpp.

void RTFImport::parseBlipUid ( RTFProperty  ) 

Parse the picture identifier.

Definition at line 1419 of file rtfimport.cpp.

void RTFImport::parseColorTable ( RTFProperty  ) 

Color table destination callback.

Definition at line 1398 of file rtfimport.cpp.

void RTFImport::parseField ( RTFProperty  ) 

Parse recursive fields.

Note:
The { ...} group will be used for unsupported and embedded fields.

Definition at line 1693 of file rtfimport.cpp.

void RTFImport::parseFontTable ( RTFProperty  ) 

Font table destination callback.

Definition at line 1319 of file rtfimport.cpp.

void RTFImport::parseFootNote ( RTFProperty  ) 

This function parses footnotes.

Todo:
Endnotes

Definition at line 1893 of file rtfimport.cpp.

void RTFImport::parseGroup ( RTFProperty  ) 

Do nothing special for this group.

Definition at line 1991 of file rtfimport.cpp.

void RTFImport::parsePicture ( RTFProperty  ) 

Picture destination callback.

Definition at line 1435 of file rtfimport.cpp.

void RTFImport::parsePlainText ( RTFProperty  ) 

Plain text destination callback.

Definition at line 1979 of file rtfimport.cpp.

void RTFImport::parseRichText ( RTFProperty  ) 

Rich text destination callback.

Definition at line 1920 of file rtfimport.cpp.

void RTFImport::parseStyleSheet ( RTFProperty  ) 

Style sheet destination callback.

Definition at line 1371 of file rtfimport.cpp.

void RTFImport::resetState (  ) 

Reset formatting properties to their default settings.

Definition at line 2001 of file rtfimport.cpp.

void RTFImport::selectLayoutBorder ( RTFProperty property  ) 

Select which border is the current one.

Parameters:
property the property to set

Definition at line 1070 of file rtfimport.cpp.

void RTFImport::selectLayoutBorderFromCell ( RTFProperty property  ) 

Select which border is the current one, in case of a cell.

Parameters:
property the property to set

Definition at line 1075 of file rtfimport.cpp.

void RTFImport::setAnsiCodepage ( RTFProperty  ) 

Set document codepage to CP1252.

Note:
Old RTF files have a keyword but no keyword

Definition at line 833 of file rtfimport.cpp.

void RTFImport::setBorderColor ( RTFProperty  ) 

Sets the value of a border color specified by token.

Deprecated:
not portable, as it needs an out-of-specification use of offsetof

Definition at line 965 of file rtfimport.cpp.

void RTFImport::setBorderProperty ( RTFProperty property  ) 

Sets the value of a border property specified by token.

Parameters:
property the property to set

Definition at line 949 of file rtfimport.cpp.

void RTFImport::setBorderStyle ( RTFProperty property  ) 

Sets the value of a border property specified by token.

Parameters:
property the property to set

Definition at line 934 of file rtfimport.cpp.

void RTFImport::setCharset ( RTFProperty property  ) 

Sets the charset.

Parameters:
property the property to set
Deprecated:
not portable, as it needs an out-of-specification use of offsetof

Definition at line 870 of file rtfimport.cpp.

void RTFImport::setCodepage ( RTFProperty  ) 

Set document codepage.

Note:
Mac's code pages > 10000 are not supported

Definition at line 805 of file rtfimport.cpp.

void RTFImport::setEnumProperty ( RTFProperty property  ) 

Sets an enumeration (flag) RTF property specified by token.

Parameters:
property the property to set
Deprecated:
not portable, as it assumes that an enum is a char

Definition at line 907 of file rtfimport.cpp.

void RTFImport::setFlagProperty ( RTFProperty property  ) 

Sets a boolean RTF property specified by token.

Parameters:
property the property to set
Deprecated:
not portable, as it needs an out-of-specification use of offsetof

Definition at line 865 of file rtfimport.cpp.

void RTFImport::setFontStyleHint ( RTFProperty property  ) 

Set font style hint.

Since:
1.4

Definition at line 912 of file rtfimport.cpp.

void RTFImport::setMacCodepage ( RTFProperty  ) 

Set document codepage to Mac (also known as MacRoman or as Apple Roman).

Definition at line 824 of file rtfimport.cpp.

void RTFImport::setNumericProperty ( RTFProperty property  ) 

Sets the value of a numeric RTF property specified by token.

Parameters:
property the property to set
Deprecated:
not portable, as it assumes that an enum is a char

Definition at line 902 of file rtfimport.cpp.

void RTFImport::setParagraphDefaults ( RTFProperty = 0L  ) 

Reset paragraph-formatting properties.

Definition at line 1009 of file rtfimport.cpp.

void RTFImport::setPcaCodepage ( RTFProperty  ) 

Set document codepage to IBM 850.

Definition at line 842 of file rtfimport.cpp.

void RTFImport::setPcCodepage ( RTFProperty  ) 

Set document codepage to IBM 435.

Note:
As Qt does not support IBM 435, this is currently approximated as IBM 850

Definition at line 851 of file rtfimport.cpp.

void RTFImport::setPictureType ( RTFProperty property  ) 

Set the picture type (BMP, PNG.

..)

Since:
1.4

Definition at line 917 of file rtfimport.cpp.

void RTFImport::setPlainFormatting ( RTFProperty = 0L  ) 

Reset character-formatting properties.

Definition at line 985 of file rtfimport.cpp.

void RTFImport::setSectionDefaults ( RTFProperty = 0L  ) 

Reset section-formatting properties.

Definition at line 1041 of file rtfimport.cpp.

void RTFImport::setSimpleUnderlineProperty ( RTFProperty  ) 

Sets the enumaration value for \ul-type keywords \ul switches on simple underline \ul0 switches off all underlines.

Since:
1.4 (renamed)

Definition at line 922 of file rtfimport.cpp.

void RTFImport::setTableRowDefaults ( RTFProperty = 0L  ) 

Reset table-formatting properties.

Definition at line 1050 of file rtfimport.cpp.

void RTFImport::setToggleProperty ( RTFProperty  ) 

Sets the value of a boolean RTF property specified by token.

Parameters:
property the property to set
Deprecated:
not portable, as it needs an out-of-specification use of offsetof

Definition at line 860 of file rtfimport.cpp.

void RTFImport::setUnderlineProperty ( RTFProperty property  ) 

Set underline properties.

Parameters:
property the property to set
Since:
1.4 (changed behaviour)

Definition at line 929 of file rtfimport.cpp.

void RTFImport::setUpProperty ( RTFProperty  ) 

Sets the value of the font baseline (superscript).

Definition at line 980 of file rtfimport.cpp.

void RTFImport::skipGroup ( RTFProperty  ) 

Discard all tokens until the current group is closed.

Definition at line 1995 of file rtfimport.cpp.

void RTFImport::writeOutPart ( const char *  name,
const DomNode node 
)

Write out part (file inside the store).

Parameters:
name the internal name of the part
node the data to write

Definition at line 2613 of file rtfimport.cpp.


Member Data Documentation

support for recursive fields

Definition at line 566 of file rtfimport.h.

number of last footnote

Definition at line 530 of file rtfimport.h.

list of footnotes

Definition at line 529 of file rtfimport.h.

File name of the source file.

Definition at line 567 of file rtfimport.h.

bool RTFImport::m_batch [protected]

Should the filter system be in batch mode (i.e. non-interactive).

Definition at line 572 of file rtfimport.h.

Dummy text state for destinations without own RTFTextState.

Note:
this is mainly to avoid dangling or NULL pointers

Definition at line 537 of file rtfimport.h.

Picture number; increase *before* use!

Definition at line 554 of file rtfimport.h.

QTextCodec* RTFImport::textCodec [protected]

currently used QTextCodec by the RTF file

Definition at line 569 of file rtfimport.h.

QTextCodec* RTFImport::utf8TextCodec [protected]

QTextCodec for UTF-8 (used in ).

Definition at line 570 of file rtfimport.h.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys