Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef WP3LISTENER_H
00028 #define WP3LISTENER_H
00029
00030 #include <vector>
00031 #include <librevenge/librevenge.h>
00032 #include "libwpd_internal.h"
00033
00034 class WP3SubDocument;
00035 class WP3ResourceFork;
00036
00037 class WP3Listener
00038 {
00039 public:
00040 WP3Listener();
00041 virtual ~WP3Listener() {}
00042
00043 virtual void startDocument() = 0;
00044 virtual void startSubDocument() = 0;
00045 virtual void insertCharacter(unsigned character) = 0;
00046 virtual void insertTab() = 0;
00047 virtual void insertTab(unsigned char tabType, double tabPosition) = 0;
00048 virtual void insertBreak(unsigned char breakType) = 0;
00049 virtual void insertEOL() = 0;
00050 virtual void lineSpacingChange(double lineSpacing) = 0;
00051 virtual void attributeChange(bool isOn, unsigned char attribute) = 0;
00052 virtual void pageMarginChange(unsigned char side, unsigned short margin) = 0;
00053 virtual void pageFormChange(unsigned short length, unsigned short width, WPXFormOrientation orientation) = 0;
00054 virtual void marginChange(unsigned char side, unsigned short margin) = 0;
00055 virtual void indentFirstLineChange(double offset) = 0;
00056 virtual void setTabs(bool isRelative, const std::vector<WPXTabStop> tabStops) = 0;
00057 virtual void columnChange(WPXTextColumnType columnType, unsigned char numColumns, const std::vector<double> &columnWidth,
00058 const std::vector<bool> &isFixedWidth) = 0;
00059 virtual void endDocument() = 0;
00060 virtual void endSubDocument() = 0;
00061
00062 virtual void defineTable(unsigned char position, unsigned short leftOffset) = 0;
00063 virtual void addTableColumnDefinition(unsigned width, unsigned leftGutter, unsigned rightGutter,
00064 unsigned attributes, unsigned char alignment) = 0;
00065 virtual void startTable() = 0;
00066 virtual void closeCell() = 0;
00067 virtual void closeRow() = 0;
00068 virtual void setTableCellSpan(unsigned short colSpan, unsigned short rowSpan) = 0;
00069 virtual void setTableCellFillColor(const RGBSColor *cellFillColor) = 0;
00070 virtual void endTable() = 0;
00071 virtual void undoChange(unsigned char undoType, unsigned short undoLevel) = 0;
00072 virtual void justificationChange(unsigned char justification) = 0;
00073 virtual void setTextColor(const RGBSColor *fontColor) = 0;
00074 virtual void setTextFont(const librevenge::RVNGString &fontName) = 0;
00075 virtual void setFontSize(unsigned short fontSize) = 0;
00076 virtual void insertPageNumber(const librevenge::RVNGString &pageNumber) = 0;
00077 virtual void insertNoteReference(const librevenge::RVNGString ¬eReference) = 0;
00078 virtual void insertNote(WPXNoteType noteType, const WP3SubDocument *subDocument) = 0;
00079 virtual void headerFooterGroup(unsigned char headerFooterType, unsigned char occurrenceBits, WP3SubDocument *subDocument) = 0;
00080 virtual void suppressPage(unsigned short suppressCode) = 0;
00081 virtual void backTab() = 0;
00082 virtual void leftIndent() = 0;
00083 virtual void leftIndent(double offset) = 0;
00084 virtual void leftRightIndent() = 0;
00085 virtual void leftRightIndent(double offset) = 0;
00086 virtual void insertPicture(double height, double width, double verticalOffset, double horizontalOffset, unsigned char leftColumn, unsigned char rightColumn,
00087 unsigned short figureFlags, const librevenge::RVNGBinaryData &binaryData) = 0;
00088 virtual void insertTextBox(double height, double width, double verticalOffset, double horizontalOffset, unsigned char leftColumn, unsigned char rightColumn,
00089 unsigned short figureFlags, const WP3SubDocument *subDocument, const WP3SubDocument *caption) = 0;
00090 virtual void insertWP51Table(double height, double width, double verticalOffset, double horizontalOffset, unsigned char leftColumn, unsigned char rightColumn,
00091 unsigned short figureFlags, const WP3SubDocument *subDocument, const WP3SubDocument *caption) = 0;
00092
00093 void setResourceFork(WP3ResourceFork *resourceFork)
00094 {
00095 m_resourceFork = resourceFork;
00096 }
00097 const WP3ResourceFork *getResourceFork() const
00098 {
00099 return m_resourceFork;
00100 }
00101
00102 private:
00103 WP3ResourceFork *m_resourceFork;
00104
00105 WP3Listener(const WP3Listener &);
00106 WP3Listener &operator=(const WP3Listener &);
00107 };
00108
00109 #endif
00110