Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

WP42StylesListener.h

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

Generated on Sat Jul 1 21:51:46 2006 for libwpd by doxygen 1.3.9.1