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
00028 #ifndef WP5STYLESLISTENER_H
00029 #define WP5STYLESLISTENER_H
00030
00031 #include "WP5Listener.h"
00032 #include "WPXStylesListener.h"
00033 #include <vector>
00034 #include <list>
00035 #include "WPXPageSpan.h"
00036 #include "WPXTable.h"
00037 #include "WP5SubDocument.h"
00038
00039 class WP5StylesListener : public WP5Listener, protected WPXStylesListener
00040 {
00041 public:
00042 WP5StylesListener(std::list<WPXPageSpan> &pageList, WPXTableList tableList, std::vector<WP5SubDocument *> &subDocuments);
00043
00044 void startDocument() {}
00045 void startSubDocument() {}
00046 void setFont(const librevenge::RVNGString & , double ) {}
00047 void setTabs(const std::vector<WPXTabStop> & , unsigned short ) {}
00048 void insertCharacter(unsigned )
00049 {
00050 m_currentPageHasContent = true;
00051 }
00052 void insertTab(unsigned char , double )
00053 {
00054 m_currentPageHasContent = true;
00055 }
00056 virtual void insertIndent(unsigned char , double )
00057 {
00058 m_currentPageHasContent = true;
00059 }
00060 void characterColorChange(unsigned char , unsigned char , unsigned char ) {}
00061 void insertEOL()
00062 {
00063 m_currentPageHasContent = true;
00064 }
00065 void insertBreak(unsigned char breakType);
00066 void attributeChange(bool , unsigned char ) {}
00067 void lineSpacingChange(double ) {}
00068 void justificationChange(unsigned char ) {}
00069 void pageMarginChange(unsigned char side, unsigned short margin);
00070 void pageFormChange(unsigned short length, unsigned short width, WPXFormOrientation orientation);
00071 void marginChange(unsigned char side, unsigned short margin);
00072 void endDocument();
00073 void endSubDocument();
00074
00075 void defineTable(unsigned char , unsigned short ) {}
00076 void addTableColumnDefinition(unsigned , unsigned , unsigned ,
00077 unsigned , unsigned char ) {}
00078 void startTable();
00079 void insertRow(unsigned short rowHeight, bool isMinimumHeight, bool isHeaderRow);
00080 void insertCell(unsigned char colSpan, unsigned char rowSpan, unsigned char borderBits,
00081 const RGBSColor *cellFgColor, const RGBSColor *cellBgColor,
00082 const RGBSColor *cellBorderColor, WPXVerticalAlignment cellVerticalAlignment,
00083 bool useCellAttributes, unsigned cellAttributes);
00084 void endTable() {}
00085
00086 void insertNoteReference(const librevenge::RVNGString & ) {}
00087 void insertNote(WPXNoteType , const WP5SubDocument * ) {}
00088 void headerFooterGroup(unsigned char headerFooterType, unsigned char occurrenceBits, WP5SubDocument *subDocument);
00089 void suppressPageCharacteristics(unsigned char suppressCode);
00090
00091 void boxOn(unsigned char , unsigned char , unsigned short , unsigned short , unsigned short , unsigned short ) {}
00092 virtual void boxOff() {}
00093 virtual void insertGraphicsData(const librevenge::RVNGBinaryData * ) {}
00094
00095 protected:
00096 void _handleSubDocument(const WPXSubDocument *subDocument, WPXSubDocumentType subDocumentType, WPXTableList tableList, int nextTableIndice = 0);
00097
00098 private:
00099 WP5StylesListener(const WP5StylesListener &);
00100 WP5StylesListener &operator=(const WP5StylesListener &);
00101 WPXPageSpan m_currentPage, m_nextPage;
00102
00103 WPXTableList m_tableList;
00104 WPXTable *m_currentTable;
00105 double m_tempMarginLeft, m_tempMarginRight;
00106 bool m_currentPageHasContent;
00107 bool m_isSubDocument;
00108 std::vector<WP5SubDocument *> &m_subDocuments;
00109 std::list<WPXPageSpan>::iterator m_pageListHardPageMark;
00110 };
00111
00112 #endif
00113