WP3Listener.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) 2004 Marc Maurer (uwog@uwog.net)
4  * Copyright (C) 2005-2006 Fridrich Strba (fridrich.strba@bluewin.ch)
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19  *
20  * For further information visit http://libwpd.sourceforge.net
21  */
22 
23 /* "This product is not manufactured, approved, or supported by
24  * Corel Corporation or Corel Corporation Limited."
25  */
26 
27 #ifndef WP3LISTENER_H
28 #define WP3LISTENER_H
29 
30 #include "libwpd_internal.h"
31 #include <vector>
32 
33 class WP3SubDocument;
34 class WP3ResourceFork;
35 class WPXBinaryData;
36 
38 {
39 public:
40  WP3Listener();
41  virtual ~WP3Listener() {}
42 
43  virtual void startDocument() = 0;
44  virtual void startSubDocument() = 0;
45  virtual void insertCharacter(uint32_t character) = 0;
46  virtual void insertTab() = 0;
47  virtual void insertTab(uint8_t tabType, double tabPosition) = 0;
48  virtual void insertBreak(uint8_t breakType) = 0;
49  virtual void insertEOL() = 0;
50  virtual void lineSpacingChange(double lineSpacing) = 0;
51  virtual void attributeChange(bool isOn, uint8_t attribute) = 0;
52  virtual void pageMarginChange(uint8_t side, uint16_t margin) = 0;
53  virtual void pageFormChange(uint16_t length, uint16_t width, WPXFormOrientation orientation) = 0;
54  virtual void marginChange(uint8_t side, uint16_t margin) = 0;
55  virtual void indentFirstLineChange(int16_t offset) = 0;
56  virtual void setTabs(bool isRelative, const std::vector<WPXTabStop> tabStops) = 0;
57  virtual void columnChange(WPXTextColumnType columnType, uint8_t numColumns, const std::vector<double> &columnWidth,
58  const std::vector<bool> &isFixedWidth) = 0;
59  virtual void endDocument() = 0;
60  virtual void endSubDocument() = 0;
61 
62  virtual void defineTable(uint8_t position, uint16_t leftOffset) = 0;
63  virtual void addTableColumnDefinition(uint32_t width, uint32_t leftGutter, uint32_t rightGutter,
64  uint32_t attributes, uint8_t alignment) = 0;
65  virtual void startTable() = 0;
66  virtual void closeCell() = 0;
67  virtual void closeRow() = 0;
68  virtual void setTableCellSpan(uint16_t colSpan, uint16_t rowSpan) = 0;
69  virtual void setTableCellFillColor(const RGBSColor *cellFillColor) = 0;
70  virtual void endTable() = 0;
71  virtual void undoChange(uint8_t undoType, uint16_t undoLevel) = 0;
72  virtual void justificationChange(uint8_t justification) = 0;
73  virtual void setTextColor(const RGBSColor *fontColor) = 0;
74  virtual void setTextFont(const WPXString &fontName) = 0;
75  virtual void setFontSize(uint16_t fontSize) = 0;
76  virtual void insertPageNumber(const WPXString &pageNumber) = 0;
77  virtual void insertNoteReference(const WPXString &noteReference) = 0;
78  virtual void insertNote(WPXNoteType noteType, const WP3SubDocument *subDocument) = 0;
79  virtual void headerFooterGroup(uint8_t headerFooterType, uint8_t occurenceBits, WP3SubDocument *subDocument) = 0;
80  virtual void suppressPage(uint16_t suppressCode) = 0;
81  virtual void backTab() = 0;
82  virtual void leftIndent() = 0;
83  virtual void leftIndent(double offset) = 0;
84  virtual void leftRightIndent() = 0;
85  virtual void leftRightIndent(double offset) = 0;
86  virtual void insertPicture(double height, double width, double verticalOffset, double horizontalOffset, uint8_t leftColumn, uint8_t rightColumn,
87  uint16_t figureFlags, const WPXBinaryData &binaryData) = 0;
88  virtual void insertTextBox(double height, double width, double verticalOffset, double horizontalOffset, uint8_t leftColumn, uint8_t rightColumn,
89  uint16_t figureFlags, const WP3SubDocument *subDocument, const WP3SubDocument *caption) = 0;
90  virtual void insertWP51Table(double height, double width, double verticalOffset, double horizontalOffset, uint8_t leftColumn, uint8_t rightColumn,
91  uint16_t figureFlags, const WP3SubDocument *subDocument, const WP3SubDocument *caption) = 0;
92 
93  void setResourceFork(WP3ResourceFork *resourceFork)
94  {
95  m_resourceFork = resourceFork;
96  }
98  {
99  return m_resourceFork;
100  }
101 
102 private:
104  // Unimplemented to prevent compiler from creating crasher ones
105  WP3Listener(const WP3Listener &);
107 };
108 
109 #endif /* WP3LISTENER_H */
110 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */

Generated for libwpd by doxygen 1.8.1.2