WP3StylesListener.h

Go to the documentation of this file.
00001 /* libwpd
00002  * Copyright (C) 2004 Marc Maurer (j.m.maurer@student.utwente.nl)
00003  *
00004  * This library is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Library General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2 of the License, or (at your option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Library General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Library General Public
00015  * License along with this library; if not, write to the Free Software
00016  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
00017  *
00018  * For further information visit http://libwpd.sourceforge.net
00019  */
00020 
00021 /* "This product is not manufactured, approved, or supported by
00022  * Corel Corporation or Corel Corporation Limited."
00023  */
00024 
00025 #ifndef WP3STYLESLISTENER_H
00026 #define WP3STYLESLISTENER_H
00027 
00028 #include "WP3Listener.h"
00029 #include <vector>
00030 #include "WPXPageSpan.h"
00031 #include "WPXTable.h"
00032 
00033 class WP3StylesListener : public WP3Listener
00034 {
00035 public:
00036         WP3StylesListener(std::vector<WPXPageSpan *> *pageList, WPXTableList tableList);
00037 
00038         virtual void startDocument() {}
00039         virtual void setAlignmentCharacter(const uint16_t character) {}
00040         virtual void setLeaderCharacter(const uint16_t character, const uint8_t numberOfSpaces) {}
00041         virtual void defineTabStops(const bool isRelative, const std::vector<WPXTabStop> &tabStops, 
00042                                     const std::vector<bool> &usePreWP9LeaderMethods) {}
00043         virtual void insertCharacter(const uint16_t character) {}
00044         virtual void insertTab(const uint8_t tabType, const uint16_t tabPosition) {}
00045         virtual void insertEOL() {}
00046         virtual void insertBreak(const uint8_t breakType);
00047         virtual void attributeChange(const bool isOn, const uint8_t attribute) {}
00048         virtual void lineSpacingChange(const float lineSpacing) {}
00049         virtual void spacingAfterParagraphChange(const float spacingRelative, const float spacingAbsolute) {}
00050         virtual void justificationChange(const uint8_t justification) {}
00051         virtual void pageMarginChange(const uint8_t side, const uint16_t margin);
00052         virtual void pageFormChange(const uint16_t length, const uint16_t width, const WPXFormOrientation orientation, const bool isPersistent);
00053         virtual void marginChange(const uint8_t side, const uint16_t margin);
00054         virtual void paragraphMarginChange(const uint8_t side, const int16_t margin) {}
00055         virtual void indentFirstLineChange(const int16_t offset) {}
00056         virtual void columnChange(const WPXTextColumnType columnType, const uint8_t numColumns, const std::vector<float> &columnWidth,
00057                                   const std::vector<bool> &isFixedWidth) {}
00058         virtual void endDocument();
00059 
00060         virtual void defineTable(const uint8_t position, const uint16_t leftOffset){}
00061         virtual void addTableColumnDefinition(const uint32_t width, const uint32_t leftGutter, const uint32_t rightGutter, const uint32_t attributes,
00062                                 const uint8_t alignment){}
00063         virtual void startTable();
00064         virtual void insertRow(const uint16_t rowHeight, const bool isMinimumHeight, const bool isHeaderRow);
00065         virtual void insertCell(const uint8_t colSpan, const uint8_t rowSpan, const uint8_t borderBits, 
00066                                 const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, 
00067                                 const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, 
00068                                 const bool useCellAttributes, const uint32_t cellAttributes);
00069         virtual void closeCell() {}
00070         virtual void closeRow() {}
00071         virtual void setTableCellSpan(const uint16_t colSpan, const uint16_t rowSpan) {}
00072         virtual void endTable() {}
00073         virtual void setTextFont(const std::string fontName) {}
00074         virtual void setFontSize(const uint16_t fontSize) {}
00075         virtual void insertNoteReference(const WPXNoteType noteType, const std::string noteReference) {};
00076         virtual void insertNote(const WPXNoteType noteType, const WP3SubDocument *subDocument) {};
00077 
00078 protected:
00079         virtual void _openPageSpan() { /* FIXME: REMOVE ME WHEN IMPLEMENTED IN WPXListener */ };
00080 
00081 private:
00082         WPXPageSpan *m_currentPage;
00083 
00084         WPXTableList m_tableList;
00085         WPXTable *m_currentTable;
00086         float m_tempMarginLeft, m_tempMarginRight;
00087         bool m_currentPageHasContent;
00088 };
00089 
00090 #endif /* WP3STYLESLISTENER_H */

Generated on Sat Dec 10 16:49:56 2005 for libwpd by doxygen 1.4.5