WP5Listener.h Source File documentation

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

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 <vector>
32 #include <librevenge/librevenge.h>
33 #include "libwpd_internal.h"
34
35 class WP5SubDocument;
36 class WP5PrefixData;
37 class WP5GeneralPacketData;
38
39 class WP5Listener
40 {
41 public:
42 WP5Listener();
43 virtual ~WP5Listener() {}
44
45 virtual void startDocument() = 0;
46 virtual void startSubDocument() = 0;
47 virtual void setFont(const librevenge::RVNGString &fontName, double fontSize) = 0;
48 virtual void setTabs(const std::vector<WPXTabStop> &tabStops, unsigned short tabOffset) = 0;
49 virtual void insertCharacter(unsigned character) = 0;
50 virtual void insertTab(unsigned char tabType, double tabPosition) = 0;
51 virtual void insertIndent(unsigned char indentType, double indentPosition) = 0;
52 virtual void insertEOL() = 0;
53 virtual void insertBreak(unsigned char breakType) = 0;
54 virtual void lineSpacingChange(double lineSpacing) = 0;
55 virtual void justificationChange(unsigned char justification) = 0;
56 virtual void characterColorChange(unsigned char red, unsigned char green, unsigned char blue) = 0;
57 virtual void attributeChange(bool isOn, unsigned char attribute) = 0;
58 virtual void pageMarginChange(unsigned char side, unsigned short margin) = 0;
59 virtual void pageFormChange(unsigned short length, unsigned short width, WPXFormOrientation orientation) = 0;
60 virtual void marginChange(unsigned char side, unsigned short margin) = 0;
61 virtual void endDocument() = 0;
62 virtual void endSubDocument() = 0;
63
64 virtual void defineTable(unsigned char position, unsigned short leftOffset) = 0;
65 virtual void addTableColumnDefinition(unsigned width, unsigned leftGutter, unsigned rightGutter,
66 unsigned attributes, unsigned char alignment) = 0;
67 virtual void startTable() = 0;
68 virtual void insertRow(unsigned short rowHeight, bool isMinimumHeight, bool isHeaderRow) = 0;
69 virtual void insertCell(unsigned char colSpan, unsigned char rowSpan, unsigned char borderBits,
70 const RGBSColor *cellFgColor, const RGBSColor *cellBgColor,
71 const RGBSColor *cellBorderColor, WPXVerticalAlignment cellVerticalAlignment,
72 bool useCellAttributes, unsigned cellAttributes) = 0;
73 virtual void endTable() = 0;
74
75 virtual void insertNoteReference(const librevenge::RVNGString &noteReference) = 0;
76 virtual void insertNote(WPXNoteType noteType, const WP5SubDocument *subDocument) = 0;
77 virtual void headerFooterGroup(unsigned char headerFooterType, unsigned char occurrenceBits, WP5SubDocument *subDocument) = 0;
78 virtual void suppressPageCharacteristics(unsigned char suppressCode) = 0;
79
80 virtual void boxOn(unsigned char positionAndType, unsigned char alignment, unsigned short width, unsigned short height, unsigned short x, unsigned short y) = 0;
81 virtual void boxOff() = 0;
82 virtual void insertGraphicsData(const librevenge::RVNGBinaryData *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 &);
92 WP5Listener &operator=(const WP5Listener &);
93 WP5PrefixData *m_prefixData;
94 };
95
96 #endif /* WP5LISTENER_H */
97 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
WP5Listener::attributeChange
virtual void attributeChange(bool isOn, unsigned char attribute)=0
WP5Listener::~WP5Listener
virtual ~WP5Listener()
Definition: WP5Listener.h:43
WP5PrefixData
Definition: WP5PrefixData.h:32
WP5SubDocument
Definition: WP5SubDocument.h:33
WP5Listener::insertIndent
virtual void insertIndent(unsigned char indentType, double indentPosition)=0
WP5Listener::justificationChange
virtual void justificationChange(unsigned char justification)=0
WP5Listener
Definition: WP5Listener.h:39
WP5Listener::lineSpacingChange
virtual void lineSpacingChange(double lineSpacing)=0
WP5Listener::m_prefixData
WP5PrefixData * m_prefixData
Definition: WP5Listener.h:93
WP5Listener::pageMarginChange
virtual void pageMarginChange(unsigned char side, unsigned short margin)=0
WP5Listener::insertBreak
virtual void insertBreak(unsigned char breakType)=0
WP5Listener::endDocument
virtual void endDocument()=0
libwpd_internal.h
WP5Listener::endSubDocument
virtual void endSubDocument()=0
WP5Listener::startTable
virtual void startTable()=0
WP5Listener::WP5Listener
WP5Listener()
Definition: WP5Listener.cpp:34
WP5Listener::addTableColumnDefinition
virtual void addTableColumnDefinition(unsigned width, unsigned leftGutter, unsigned rightGutter, unsigned attributes, unsigned char alignment)=0
WP5Listener::defineTable
virtual void defineTable(unsigned char position, unsigned short leftOffset)=0
WP5Listener::setPrefixData
void setPrefixData(WP5PrefixData *prefixData)
Definition: WP5Listener.h:84
WP5Listener::boxOff
virtual void boxOff()=0
WP5GeneralPacketData
Definition: WP5GeneralPacketData.h:32
WP5Listener::suppressPageCharacteristics
virtual void suppressPageCharacteristics(unsigned char suppressCode)=0
WP5Listener::setTabs
virtual void setTabs(const std::vector< WPXTabStop > &tabStops, unsigned short tabOffset)=0
WP5Listener::startSubDocument
virtual void startSubDocument()=0
WPXFormOrientation
WPXFormOrientation
Definition: libwpd_internal.h:99
WP5Listener::startDocument
virtual void startDocument()=0
WP5Listener::headerFooterGroup
virtual void headerFooterGroup(unsigned char headerFooterType, unsigned char occurrenceBits, WP5SubDocument *subDocument)=0
WP5Listener::insertEOL
virtual void insertEOL()=0
WPXVerticalAlignment
WPXVerticalAlignment
Definition: libwpd_internal.h:101
WP5Listener::insertGraphicsData
virtual void insertGraphicsData(const librevenge::RVNGBinaryData *data)=0
WP5Listener::getGeneralPacketData
const WP5GeneralPacketData * getGeneralPacketData(const int type) const
Definition: WP5Listener.cpp:39
WP5Listener::endTable
virtual void endTable()=0
WP5Listener::pageFormChange
virtual void pageFormChange(unsigned short length, unsigned short width, WPXFormOrientation orientation)=0
WP5Listener::insertNoteReference
virtual void insertNoteReference(const librevenge::RVNGString &noteReference)=0
WP5Listener::insertCell
virtual void insertCell(unsigned char colSpan, unsigned char rowSpan, unsigned char borderBits, const RGBSColor *cellFgColor, const RGBSColor *cellBgColor, const RGBSColor *cellBorderColor, WPXVerticalAlignment cellVerticalAlignment, bool useCellAttributes, unsigned cellAttributes)=0
RGBSColor
Definition: libwpd_internal.h:160
WP5Listener::operator=
WP5Listener & operator=(const WP5Listener &)
WP5Listener::insertTab
virtual void insertTab(unsigned char tabType, double tabPosition)=0
WP5Listener::characterColorChange
virtual void characterColorChange(unsigned char red, unsigned char green, unsigned char blue)=0
WP5Listener::setFont
virtual void setFont(const librevenge::RVNGString &fontName, double fontSize)=0
WP5Listener::insertRow
virtual void insertRow(unsigned short rowHeight, bool isMinimumHeight, bool isHeaderRow)=0
WP5Listener::marginChange
virtual void marginChange(unsigned char side, unsigned short margin)=0
WP5Listener::boxOn
virtual void boxOn(unsigned char positionAndType, unsigned char alignment, unsigned short width, unsigned short height, unsigned short x, unsigned short y)=0
WP5Listener::insertNote
virtual void insertNote(WPXNoteType noteType, const WP5SubDocument *subDocument)=0
WPXNoteType
WPXNoteType
Definition: libwpd_internal.h:87
WP5Listener::insertCharacter
virtual void insertCharacter(unsigned character)=0