WP5Listener.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2 /* libwpd
3  * Copyright (C) 2003 William Lachance (wrlach@gmail.com)
4  * Copyright (C) 2003 Marc Maurer (uwog@uwog.net)
5  * Copyright (C) 2005-2007 Fridrich Strba (fridrich.strba@bluewin.ch)
6  * Copyright (C) 2007 Novell, Inc. (http://www.novell.com)
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Library General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Library General Public License for more details.
17  *
18  * You should have received a copy of the GNU Library General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
21  *
22  * For further information visit http://libwpd.sourceforge.net
23  */
24 
25 /* "This product is not manufactured, approved, or supported by
26  * Corel Corporation or Corel Corporation Limited."
27  */
28 
29 #ifndef WP5LISTENER_H
30 #define WP5LISTENER_H
31 
32 #include "libwpd_internal.h"
33 #include <vector>
34 
35 class WP5SubDocument;
36 class WP5PrefixData;
38 class WPXBinaryData;
39 
41 {
42 public:
43  WP5Listener();
44  virtual ~WP5Listener() {};
45 
46  virtual void startDocument() = 0;
47  virtual void startSubDocument() = 0;
48  virtual void setFont(const WPXString &fontName, double fontSize) = 0;
49  virtual void setTabs(const std::vector<WPXTabStop>& tabStops, uint16_t tabOffset) = 0;
50  virtual void insertCharacter(uint32_t character) = 0;
51  virtual void insertTab(uint8_t tabType, double tabPosition) = 0;
52  virtual void insertIndent(uint8_t indentType, double indentPosition) = 0;
53  virtual void insertEOL() = 0;
54  virtual void insertBreak(uint8_t breakType) = 0;
55  virtual void lineSpacingChange(double lineSpacing) = 0;
56  virtual void justificationChange(uint8_t justification) = 0;
57  virtual void characterColorChange(uint8_t red, uint8_t green, uint8_t blue) = 0;
58  virtual void attributeChange(bool isOn, uint8_t attribute) = 0;
59  virtual void pageMarginChange(uint8_t side, uint16_t margin) = 0;
60  virtual void pageFormChange(uint16_t length, uint16_t width, WPXFormOrientation orientation) = 0;
61  virtual void marginChange(uint8_t side, uint16_t margin) = 0;
62  virtual void endDocument() = 0;
63  virtual void endSubDocument() = 0;
64 
65  virtual void defineTable(uint8_t position, uint16_t leftOffset) = 0;
66  virtual void addTableColumnDefinition(uint32_t width, uint32_t leftGutter, uint32_t rightGutter,
67  uint32_t attributes, uint8_t alignment) = 0;
68  virtual void startTable() = 0;
69  virtual void insertRow(uint16_t rowHeight, bool isMinimumHeight, bool isHeaderRow) = 0;
70  virtual void insertCell(uint8_t colSpan, uint8_t rowSpan, uint8_t borderBits,
71  const RGBSColor *cellFgColor, const RGBSColor *cellBgColor,
72  const RGBSColor *cellBorderColor, WPXVerticalAlignment cellVerticalAlignment,
73  bool useCellAttributes, uint32_t cellAttributes) = 0;
74  virtual void endTable() = 0;
75 
76  virtual void insertNoteReference(const WPXString &noteReference) = 0;
77  virtual void insertNote(WPXNoteType noteType, const WP5SubDocument *subDocument) = 0;
78  virtual void headerFooterGroup(uint8_t headerFooterType, uint8_t occurenceBits, WP5SubDocument *subDocument) = 0;
79  virtual void suppressPageCharacteristics(uint8_t suppressCode) = 0;
80 
81  virtual void boxOn(uint8_t positionAndType, uint8_t alignment, uint16_t width, uint16_t height, uint16_t x, uint16_t y) = 0;
82  virtual void boxOff() = 0;
83  virtual void insertGraphicsData(const WPXBinaryData *data) = 0;
84 
85  void setPrefixData(WP5PrefixData *prefixData)
86  {
87  m_prefixData = prefixData;
88  }
89  const WP5GeneralPacketData *getGeneralPacketData(const int type) const;
90 
91 private:
92  WP5Listener(const WP5Listener &);
95 };
96 
97 #endif /* WP5LISTENER_H */
98 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */

Generated for libwpd by doxygen 1.8.1.2