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

WP3HLStylesListener.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., 59 Temple Place, Suite 330, Boston, MA  02111-1307 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 WP3HLSTYLESLISTENER_H
00026 #define WP3HLSTYLESLISTENER_H
00027 
00028 #include "WP3HLListener.h"
00029 #include <vector>
00030 #include "WPXPageSpan.h"
00031 #include "WPXTable.h"
00032 
00033 class WP3HLStylesListener : public WP3HLListener
00034 {
00035 public:
00036         WP3HLStylesListener(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(uint8_t position, uint16_t leftOffset){}
00061         virtual void addTableColumnDefinition(uint32_t width, uint32_t leftGutter, uint32_t rightGutter){}
00062         virtual void startTable();
00063         virtual void insertRow(const uint16_t rowHeight, const bool isMinimumHeight, const bool isHeaderRow);
00064         virtual void insertCell(const uint8_t colSpan, const uint8_t rowSpan, const bool boundFromLeft, const bool boundFromAbove,
00065                                 const uint8_t borderBits, const RGBSColor * cellFgColor, const RGBSColor * cellBgColor, 
00066                                 const RGBSColor * cellBorderColor, 
00067                                 const WPXVerticalAlignment cellVerticalAlignment, const uint32_t cellAttributes);
00068         virtual void endTable() {}
00069 
00070 
00071 protected:
00072         virtual void _openPageSpan() { /* FIXME: REMOVE ME WHEN IMPLEMENTED IN WPXHLListener */ };
00073 
00074 private:
00075         WPXPageSpan *m_currentPage;
00076 
00077         WPXTableList m_tableList;
00078         WPXTable *m_currentTable;
00079         float m_tempMarginLeft, m_tempMarginRight;
00080         bool m_currentPageHasContent;
00081 };
00082 
00083 #endif /* WP3HLSTYLESLISTENER_H */

Generated on Mon Mar 12 10:11:47 2007 for libwpd by doxygen 1.4.2