- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

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 * 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) 2004 Marc Maurer (uwog@uwog.net)
11 * Copyright (C) 2005-2006 Fridrich Strba (fridrich.strba@bluewin.ch)
12 *
13 * For minor contributions see the git repository.
14 *
15 * Alternatively, the contents of this file may be used under the terms
16 * of the GNU Lesser General Public License Version 2.1 or later
17 * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
18 * applicable instead of those above.
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 <vector>
31 #include <librevenge/librevenge.h>
32 #include "libwpd_internal.h"
33
34 class WP3SubDocument;
35 class WP3ResourceFork;
36
37 class WP3Listener
38 {
39 public:
40 WP3Listener();
41 virtual ~WP3Listener() {}
42
43 virtual void startDocument() = 0;
44 virtual void startSubDocument() = 0;
45 virtual void insertCharacter(unsigned character) = 0;
46 virtual void insertTab() = 0;
47 virtual void insertTab(unsigned char tabType, double tabPosition) = 0;
48 virtual void insertBreak(unsigned char breakType) = 0;
49 virtual void insertEOL() = 0;
50 virtual void lineSpacingChange(double lineSpacing) = 0;
51 virtual void attributeChange(bool isOn, unsigned char attribute) = 0;
52 virtual void pageMarginChange(unsigned char side, unsigned short margin) = 0;
53 virtual void pageFormChange(unsigned short length, unsigned short width, WPXFormOrientation orientation) = 0;
54 virtual void marginChange(unsigned char side, unsigned short margin) = 0;
55 virtual void indentFirstLineChange(double offset) = 0;
56 virtual void setTabs(bool isRelative, const std::vector<WPXTabStop> tabStops) = 0;
57 virtual void columnChange(WPXTextColumnType columnType, unsigned char 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(unsigned char position, unsigned short leftOffset) = 0;
63 virtual void addTableColumnDefinition(unsigned width, unsigned leftGutter, unsigned rightGutter,
64 unsigned attributes, unsigned char alignment) = 0;
65 virtual void startTable() = 0;
66 virtual void closeCell() = 0;
67 virtual void closeRow() = 0;
68 virtual void setTableCellSpan(unsigned short colSpan, unsigned short rowSpan) = 0;
69 virtual void setTableCellFillColor(const RGBSColor *cellFillColor) = 0;
70 virtual void endTable() = 0;
71 virtual void undoChange(unsigned char undoType, unsigned short undoLevel) = 0;
72 virtual void justificationChange(unsigned char justification) = 0;
73 virtual void setTextColor(const RGBSColor *fontColor) = 0;
74 virtual void setTextFont(const librevenge::RVNGString &fontName) = 0;
75 virtual void setFontSize(unsigned short fontSize) = 0;
76 virtual void insertPageNumber(const librevenge::RVNGString &pageNumber) = 0;
77 virtual void insertNoteReference(const librevenge::RVNGString &noteReference) = 0;
78 virtual void insertNote(WPXNoteType noteType, const WP3SubDocument *subDocument) = 0;
79 virtual void headerFooterGroup(unsigned char headerFooterType, unsigned char occurrenceBits, WP3SubDocument *subDocument) = 0;
80 virtual void suppressPage(unsigned short 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, unsigned char leftColumn, unsigned char rightColumn,
87 unsigned short figureFlags, const librevenge::RVNGBinaryData &binaryData) = 0;
88 virtual void insertTextBox(double height, double width, double verticalOffset, double horizontalOffset, unsigned char leftColumn, unsigned char rightColumn,
89 unsigned short figureFlags, const WP3SubDocument *subDocument, const WP3SubDocument *caption) = 0;
90 virtual void insertWP51Table(double height, double width, double verticalOffset, double horizontalOffset, unsigned char leftColumn, unsigned char rightColumn,
91 unsigned short figureFlags, const WP3SubDocument *subDocument, const WP3SubDocument *caption) = 0;
92
93 void setResourceFork(WP3ResourceFork *resourceFork)
94 {
95 m_resourceFork = resourceFork;
96 }
97 const WP3ResourceFork *getResourceFork() const
98 {
99 return m_resourceFork;
100 }
101
102 private:
103 WP3ResourceFork *m_resourceFork;
104 // Unimplemented to prevent compiler from creating crasher ones
105 WP3Listener(const WP3Listener &);
106 WP3Listener &operator=(const WP3Listener &);
107 };
108
109 #endif /* WP3LISTENER_H */
110 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
WP3Listener::setTableCellFillColor
virtual void setTableCellFillColor(const RGBSColor *cellFillColor)=0
WP3Listener::WP3Listener
WP3Listener()
Definition: WP3Listener.cpp:30
WP3Listener::closeCell
virtual void closeCell()=0
WP3Listener
Definition: WP3Listener.h:37
WP3Listener::startDocument
virtual void startDocument()=0
WP3Listener::getResourceFork
const WP3ResourceFork * getResourceFork() const
Definition: WP3Listener.h:97
WP3Listener::addTableColumnDefinition
virtual void addTableColumnDefinition(unsigned width, unsigned leftGutter, unsigned rightGutter, unsigned attributes, unsigned char alignment)=0
WP3Listener::insertPicture
virtual void insertPicture(double height, double width, double verticalOffset, double horizontalOffset, unsigned char leftColumn, unsigned char rightColumn, unsigned short figureFlags, const librevenge::RVNGBinaryData &binaryData)=0
WP3Listener::leftRightIndent
virtual void leftRightIndent()=0
WP3Listener::setTextFont
virtual void setTextFont(const librevenge::RVNGString &fontName)=0
WP3Listener::endTable
virtual void endTable()=0
WP3Listener::insertTab
virtual void insertTab()=0
WP3Listener::pageMarginChange
virtual void pageMarginChange(unsigned char side, unsigned short margin)=0
WP3Listener::defineTable
virtual void defineTable(unsigned char position, unsigned short leftOffset)=0
WP3Listener::justificationChange
virtual void justificationChange(unsigned char justification)=0
WP3Listener::startSubDocument
virtual void startSubDocument()=0
WPXTextColumnType
WPXTextColumnType
Definition: libwpd_internal.h:109
WP3Listener::insertPageNumber
virtual void insertPageNumber(const librevenge::RVNGString &pageNumber)=0
WP3Listener::columnChange
virtual void columnChange(WPXTextColumnType columnType, unsigned char numColumns, const std::vector< double > &columnWidth, const std::vector< bool > &isFixedWidth)=0
WP3Listener::insertTextBox
virtual void insertTextBox(double height, double width, double verticalOffset, double horizontalOffset, unsigned char leftColumn, unsigned char rightColumn, unsigned short figureFlags, const WP3SubDocument *subDocument, const WP3SubDocument *caption)=0
WP3Listener::operator=
WP3Listener & operator=(const WP3Listener &)
WP3Listener::endSubDocument
virtual void endSubDocument()=0
libwpd_internal.h
WP3Listener::suppressPage
virtual void suppressPage(unsigned short suppressCode)=0
WP3Listener::insertWP51Table
virtual void insertWP51Table(double height, double width, double verticalOffset, double horizontalOffset, unsigned char leftColumn, unsigned char rightColumn, unsigned short figureFlags, const WP3SubDocument *subDocument, const WP3SubDocument *caption)=0
_RGBSColor
Definition: libwpd_internal.h:167
WP3Listener::insertNoteReference
virtual void insertNoteReference(const librevenge::RVNGString &noteReference)=0
WP3Listener::~WP3Listener
virtual ~WP3Listener()
Definition: WP3Listener.h:41
WP3Listener::insertNote
virtual void insertNote(WPXNoteType noteType, const WP3SubDocument *subDocument)=0
WP3Listener::headerFooterGroup
virtual void headerFooterGroup(unsigned char headerFooterType, unsigned char occurrenceBits, WP3SubDocument *subDocument)=0
WP3Listener::setTabs
virtual void setTabs(bool isRelative, const std::vector< WPXTabStop > tabStops)=0
WPXFormOrientation
WPXFormOrientation
Definition: libwpd_internal.h:105
WP3Listener::startTable
virtual void startTable()=0
WP3Listener::setTextColor
virtual void setTextColor(const RGBSColor *fontColor)=0
WP3Listener::m_resourceFork
WP3ResourceFork * m_resourceFork
Definition: WP3Listener.h:103
WP3Listener::attributeChange
virtual void attributeChange(bool isOn, unsigned char attribute)=0
WP3Listener::lineSpacingChange
virtual void lineSpacingChange(double lineSpacing)=0
WP3Listener::leftIndent
virtual void leftIndent()=0
WP3Listener::pageFormChange
virtual void pageFormChange(unsigned short length, unsigned short width, WPXFormOrientation orientation)=0
WP3Listener::insertBreak
virtual void insertBreak(unsigned char breakType)=0
WP3Listener::insertEOL
virtual void insertEOL()=0
WP3ResourceFork
Definition: WP3ResourceFork.h:35
WP3Listener::setTableCellSpan
virtual void setTableCellSpan(unsigned short colSpan, unsigned short rowSpan)=0
WP3Listener::undoChange
virtual void undoChange(unsigned char undoType, unsigned short undoLevel)=0
WP3Listener::indentFirstLineChange
virtual void indentFirstLineChange(double offset)=0
WP3Listener::backTab
virtual void backTab()=0
WP3Listener::marginChange
virtual void marginChange(unsigned char side, unsigned short margin)=0
WP3Listener::setResourceFork
void setResourceFork(WP3ResourceFork *resourceFork)
Definition: WP3Listener.h:93
WP3SubDocument
Definition: WP3SubDocument.h:33
WP3Listener::insertCharacter
virtual void insertCharacter(unsigned character)=0
WPXNoteType
WPXNoteType
Definition: libwpd_internal.h:93
WP3Listener::endDocument
virtual void endDocument()=0
WP3Listener::setFontSize
virtual void setFontSize(unsigned short fontSize)=0
WP3Listener::closeRow
virtual void closeRow()=0