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

WP3HLListener.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 WP3HLLISTENER_H
00026 #define WP3HLLISTENER_H
00027 
00028 #include "WP3LLListener.h"
00029 #include "WPXHLListener.h"
00030 #include "WPXHLListenerImpl.h"
00031 
00032 typedef struct _WP3ParsingState WP3ParsingState;
00033 struct _WP3ParsingState
00034 {
00035         _WP3ParsingState();
00036         ~_WP3ParsingState();
00037 };
00038 
00039 
00040 class WP3HLListener : public WPXHLListener, public WP3LLListener
00041 {
00042 public:
00043         WP3HLListener(std::vector<WPXPageSpan *> *pageList, WPXHLListenerImpl *listenerImpl);
00044         virtual ~WP3HLListener();
00045 
00046         virtual void setAlignmentCharacter(const uint16_t character) {};
00047         virtual void setLeaderCharacter(const uint16_t character, const uint8_t numberOfSpaces) {};
00048         virtual void defineTabStops(const bool isRelative, const std::vector<WPXTabStop> &tabStops, 
00049                                     const std::vector<bool> &usePreWP9LeaderMethods) {};
00050         virtual void insertCharacter(const uint16_t character);
00051         virtual void insertTab(const uint8_t tabType, const float tabPosition);
00052         virtual void handleLineBreak() {};
00053         virtual void insertEOL();
00054         virtual void attributeChange(const bool isOn, const uint8_t attribute);
00055         virtual void spacingAfterParagraphChange(const float spacingRelative, const float spacingAbsolute) {};
00056         virtual void pageMarginChange(const uint8_t side, const uint16_t margin) {};
00057         virtual void pageFormChange(const uint16_t length, const uint16_t width, const WPXFormOrientation orientation, const bool isPersistent) {};
00058         virtual void marginChange(const uint8_t side, const uint16_t margin);
00059         virtual void paragraphMarginChange(const uint8_t side, const int16_t margin) {};
00060         virtual void indentFirstLineChange(const int16_t offset);
00061         virtual void columnChange(const WPXTextColumnType columnType, const uint8_t numColumns, const std::vector<float> &columnWidth,
00062                                   const std::vector<bool> &isFixedWidth) {};
00063         virtual void endDocument();
00064 
00065         virtual void defineTable(uint8_t position, uint16_t leftOffset) {};
00066         virtual void addTableColumnDefinition(uint32_t width, uint32_t leftGutter, uint32_t rightGutter) {};
00067         virtual void startTable() {};
00068         virtual void insertRow(const uint16_t rowHeight, const bool isMinimumHeight, const bool isHeaderRow) {};
00069         virtual void insertCell(const uint8_t colSpan, const uint8_t rowSpan, const bool boundFromLeft, const bool boundFromAbove,
00070                                 const uint8_t borderBits, const RGBSColor * cellFgColor, const RGBSColor * cellBgColor,
00071                                 const RGBSColor * cellBorderColor, 
00072                                 const WPXVerticalAlignment cellVerticalAlignment, const uint32_t cellAttributes) {};
00073         virtual void endTable() {};
00074         virtual void undoChange(const uint8_t undoType, const uint16_t undoLevel);
00075 
00076 protected:
00077         virtual void _handleSubDocument(uint16_t textPID, const bool isHeaderFooter, WPXTableList tableList, int nextTableIndice = 0) {}
00078 
00079 private:
00080         void _flushText(const bool fakeText=false);
00081         void _flushList() {};
00082 
00083         WPXString m_textBuffer;
00084 
00085         WP3ParsingState *m_parseState;
00086 };
00087 
00088 #endif /* WP3HLLISTENER_H */

Generated on Tue May 3 21:36:47 2005 for libwpd by doxygen 1.3.9.1