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  * Version: MPL 2.0 / LGPLv2.1+
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * Major Contributor(s):
10  * Copyright (C) 2003 William Lachance (wrlach@gmail.com)
11  * Copyright (C) 2003 Marc Maurer (uwog@uwog.net)
12  * Copyright (C) 2005-2007 Fridrich Strba (fridrich.strba@bluewin.ch)
13  *
14  * For minor contributions see the git repository.
15  *
16  * Alternatively, the contents of this file may be used under the terms
17  * of the GNU Lesser General Public License Version 2.1 or later
18  * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
19  * applicable instead of those above.
20  *
21  * For further information visit http://libwpd.sourceforge.net
22  */
23 
24 /* "This product is not manufactured, approved, or supported by
25  * Corel Corporation or Corel Corporation Limited."
26  */
27 
28 #ifndef WP5LISTENER_H
29 #define WP5LISTENER_H
30 
31 #include "libwpd_internal.h"
32 #include <vector>
33 
34 class WP5SubDocument;
35 class WP5PrefixData;
37 class WPXBinaryData;
38 
40 {
41 public:
42  WP5Listener();
43  virtual ~WP5Listener() {}
44 
45  virtual void startDocument() = 0;
46  virtual void startSubDocument() = 0;
47  virtual void setFont(const WPXString &fontName, double fontSize) = 0;
48  virtual void setTabs(const std::vector<WPXTabStop> &tabStops, uint16_t tabOffset) = 0;
49  virtual void insertCharacter(uint32_t character) = 0;
50  virtual void insertTab(uint8_t tabType, double tabPosition) = 0;
51  virtual void insertIndent(uint8_t indentType, double indentPosition) = 0;
52  virtual void insertEOL() = 0;
53  virtual void insertBreak(uint8_t breakType) = 0;
54  virtual void lineSpacingChange(double lineSpacing) = 0;
55  virtual void justificationChange(uint8_t justification) = 0;
56  virtual void characterColorChange(uint8_t red, uint8_t green, uint8_t blue) = 0;
57  virtual void attributeChange(bool isOn, uint8_t attribute) = 0;
58  virtual void pageMarginChange(uint8_t side, uint16_t margin) = 0;
59  virtual void pageFormChange(uint16_t length, uint16_t width, WPXFormOrientation orientation) = 0;
60  virtual void marginChange(uint8_t side, uint16_t margin) = 0;
61  virtual void endDocument() = 0;
62  virtual void endSubDocument() = 0;
63 
64  virtual void defineTable(uint8_t position, uint16_t leftOffset) = 0;
65  virtual void addTableColumnDefinition(uint32_t width, uint32_t leftGutter, uint32_t rightGutter,
66  uint32_t attributes, uint8_t alignment) = 0;
67  virtual void startTable() = 0;
68  virtual void insertRow(uint16_t rowHeight, bool isMinimumHeight, bool isHeaderRow) = 0;
69  virtual void insertCell(uint8_t colSpan, uint8_t rowSpan, uint8_t borderBits,
70  const RGBSColor *cellFgColor, const RGBSColor *cellBgColor,
71  const RGBSColor *cellBorderColor, WPXVerticalAlignment cellVerticalAlignment,
72  bool useCellAttributes, uint32_t cellAttributes) = 0;
73  virtual void endTable() = 0;
74 
75  virtual void insertNoteReference(const WPXString &noteReference) = 0;
76  virtual void insertNote(WPXNoteType noteType, const WP5SubDocument *subDocument) = 0;
77  virtual void headerFooterGroup(uint8_t headerFooterType, uint8_t occurenceBits, WP5SubDocument *subDocument) = 0;
78  virtual void suppressPageCharacteristics(uint8_t suppressCode) = 0;
79 
80  virtual void boxOn(uint8_t positionAndType, uint8_t alignment, uint16_t width, uint16_t height, uint16_t x, uint16_t y) = 0;
81  virtual void boxOff() = 0;
82  virtual void insertGraphicsData(const WPXBinaryData *data) = 0;
83 
84  void setPrefixData(WP5PrefixData *prefixData)
85  {
86  m_prefixData = prefixData;
87  }
88  const WP5GeneralPacketData *getGeneralPacketData(const int type) const;
89 
90 private:
91  WP5Listener(const WP5Listener &);
94 };
95 
96 #endif /* WP5LISTENER_H */
97 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */

Generated for libwpd by doxygen 1.8.3.1