WP3Listener.h Source File documentation

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 <memory>
31#include <vector>
32#include <librevenge/librevenge.h>
33#include "libwpd_internal.h"
34
35class WP3SubDocument;
36class WP3ResourceFork;
37
38 class WP3Listener
39{
40public:
41 WP3Listener();
42 virtual ~WP3Listener() {}
43
44 virtual void startDocument() = 0;
45 virtual void startSubDocument() = 0;
46 virtual void insertCharacter(unsigned character) = 0;
47 virtual void insertTab() = 0;
48 virtual void insertTab(unsigned char tabType, double tabPosition) = 0;
49 virtual void insertBreak(unsigned char breakType) = 0;
50 virtual void insertEOL() = 0;
51 virtual void lineSpacingChange(double lineSpacing) = 0;
52 virtual void attributeChange(bool isOn, unsigned char attribute) = 0;
53 virtual void pageMarginChange(unsigned char side, unsigned short margin) = 0;
54 virtual void pageFormChange(unsigned short length, unsigned short width, WPXFormOrientation orientation) = 0;
55 virtual void marginChange(unsigned char side, unsigned short margin) = 0;
56 virtual void indentFirstLineChange(double offset) = 0;
57 virtual void setTabs(bool isRelative, const std::vector<WPXTabStop> tabStops) = 0;
58 virtual void columnChange(WPXTextColumnType columnType, unsigned char numColumns, const std::vector<double> &columnWidth,
59 const std::vector<bool> &isFixedWidth) = 0;
60 virtual void endDocument() = 0;
61 virtual void endSubDocument() = 0;
62
63 virtual void defineTable(unsigned char position, unsigned short leftOffset) = 0;
64 virtual void addTableColumnDefinition(unsigned width, unsigned leftGutter, unsigned rightGutter,
65 unsigned attributes, unsigned char alignment) = 0;
66 virtual void startTable() = 0;
67 virtual void closeCell() = 0;
68 virtual void closeRow() = 0;
69 virtual void setTableCellSpan(unsigned short colSpan, unsigned short rowSpan) = 0;
70 virtual void setTableCellFillColor(const RGBSColor *cellFillColor) = 0;
71 virtual void endTable() = 0;
72 virtual void undoChange(unsigned char undoType, unsigned short undoLevel) = 0;
73 virtual void justificationChange(unsigned char justification) = 0;
74 virtual void setTextColor(const RGBSColor *fontColor) = 0;
75 virtual void setTextFont(const librevenge::RVNGString &fontName) = 0;
76 virtual void setFontSize(unsigned short fontSize) = 0;
77 virtual void insertPageNumber(const librevenge::RVNGString &pageNumber) = 0;
78 virtual void insertNoteReference(const librevenge::RVNGString &noteReference) = 0;
79 virtual void insertNote(WPXNoteType noteType, const WP3SubDocument *subDocument) = 0;
80 virtual void headerFooterGroup(unsigned char headerFooterType, unsigned char occurrenceBits, const std::shared_ptr<WP3SubDocument> &subDocument) = 0;
81 virtual void suppressPage(unsigned short suppressCode) = 0;
82 virtual void backTab() = 0;
83 virtual void leftIndent() = 0;
84 virtual void leftIndent(double offset) = 0;
85 virtual void leftRightIndent() = 0;
86 virtual void leftRightIndent(double offset) = 0;
87 virtual void insertPicture(double height, double width, double verticalOffset, double horizontalOffset, unsigned char leftColumn, unsigned char rightColumn,
88 unsigned short figureFlags, const librevenge::RVNGBinaryData &binaryData) = 0;
89 virtual void insertTextBox(double height, double width, double verticalOffset, double horizontalOffset, unsigned char leftColumn, unsigned char rightColumn,
90 unsigned short figureFlags, const WP3SubDocument *subDocument, const WP3SubDocument *caption) = 0;
91 virtual void insertWP51Table(double height, double width, double verticalOffset, double horizontalOffset, unsigned char leftColumn, unsigned char rightColumn,
92 unsigned short figureFlags, const WP3SubDocument *subDocument, const WP3SubDocument *caption) = 0;
93
94 void setResourceFork(WP3ResourceFork *resourceFork)
95 {
96 m_resourceFork = resourceFork;
97 }
98 const WP3ResourceFork *getResourceFork() const
99 {
100 return m_resourceFork;
101 }
102
103private:
104 WP3ResourceFork *m_resourceFork;
105 // Unimplemented to prevent compiler from creating crasher ones
106 WP3Listener(const WP3Listener &);
107 WP3Listener &operator=(const WP3Listener &);
108};
109
110#endif /* WP3LISTENER_H */
111/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
WP3Listener::pageMarginChange
virtual void pageMarginChange(unsigned char side, unsigned short margin)=0
WP3Listener::insertEOL
virtual void insertEOL()=0
WP3Listener::endDocument
virtual void endDocument()=0
WP3Listener::WP3Listener
WP3Listener(const WP3Listener &)
WP3Listener::indentFirstLineChange
virtual void indentFirstLineChange(double offset)=0
WP3Listener::columnChange
virtual void columnChange(WPXTextColumnType columnType, unsigned char numColumns, const std::vector< double > &columnWidth, const std::vector< bool > &isFixedWidth)=0
WP3Listener::addTableColumnDefinition
virtual void addTableColumnDefinition(unsigned width, unsigned leftGutter, unsigned rightGutter, unsigned attributes, unsigned char alignment)=0
WP3Listener::startTable
virtual void startTable()=0
WP3Listener::insertPageNumber
virtual void insertPageNumber(const librevenge::RVNGString &pageNumber)=0
WP3Listener::marginChange
virtual void marginChange(unsigned char side, unsigned short margin)=0
WP3Listener::attributeChange
virtual void attributeChange(bool isOn, unsigned char attribute)=0
WP3Listener::insertNote
virtual void insertNote(WPXNoteType noteType, const WP3SubDocument *subDocument)=0
WP3Listener::~WP3Listener
virtual ~WP3Listener()
Definition WP3Listener.h:42
WP3Listener::getResourceFork
const WP3ResourceFork * getResourceFork() const
Definition WP3Listener.h:98
WP3Listener::insertTab
virtual void insertTab(unsigned char tabType, double tabPosition)=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::setTextColor
virtual void setTextColor(const RGBSColor *fontColor)=0
WP3Listener::setTableCellFillColor
virtual void setTableCellFillColor(const RGBSColor *cellFillColor)=0
WP3Listener::insertBreak
virtual void insertBreak(unsigned char breakType)=0
WP3Listener::leftRightIndent
virtual void leftRightIndent()=0
WP3Listener::headerFooterGroup
virtual void headerFooterGroup(unsigned char headerFooterType, unsigned char occurrenceBits, const std::shared_ptr< WP3SubDocument > &subDocument)=0
WP3Listener::setResourceFork
void setResourceFork(WP3ResourceFork *resourceFork)
Definition WP3Listener.h:94
WP3Listener::lineSpacingChange
virtual void lineSpacingChange(double lineSpacing)=0
WP3Listener::backTab
virtual void backTab()=0
WP3Listener::WP3Listener
WP3Listener()
Definition WP3Listener.cpp:30
WP3Listener::suppressPage
virtual void suppressPage(unsigned short suppressCode)=0
WP3Listener::startSubDocument
virtual void startSubDocument()=0
WP3Listener::endTable
virtual void endTable()=0
WP3Listener::defineTable
virtual void defineTable(unsigned char position, unsigned short leftOffset)=0
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::pageFormChange
virtual void pageFormChange(unsigned short length, unsigned short width, WPXFormOrientation orientation)=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::insertNoteReference
virtual void insertNoteReference(const librevenge::RVNGString &noteReference)=0
WP3Listener::insertCharacter
virtual void insertCharacter(unsigned character)=0
WP3Listener::leftIndent
virtual void leftIndent(double offset)=0
WP3Listener::insertTab
virtual void insertTab()=0
WP3Listener::setTextFont
virtual void setTextFont(const librevenge::RVNGString &fontName)=0
WP3Listener::closeRow
virtual void closeRow()=0
WP3Listener::leftIndent
virtual void leftIndent()=0
WP3Listener::setFontSize
virtual void setFontSize(unsigned short fontSize)=0
WP3Listener::m_resourceFork
WP3ResourceFork * m_resourceFork
Definition WP3Listener.h:104
WP3Listener::setTabs
virtual void setTabs(bool isRelative, const std::vector< WPXTabStop > tabStops)=0
WP3Listener::closeCell
virtual void closeCell()=0
WP3Listener::endSubDocument
virtual void endSubDocument()=0
WP3Listener::operator=
WP3Listener & operator=(const WP3Listener &)
WP3Listener::leftRightIndent
virtual void leftRightIndent(double offset)=0
WP3Listener::justificationChange
virtual void justificationChange(unsigned char justification)=0
WP3Listener::startDocument
virtual void startDocument()=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
WP3ResourceFork
Definition WP3ResourceFork.h:37
WP3SubDocument
Definition WP3SubDocument.h:34
libwpd_internal.h
WPXFormOrientation
WPXFormOrientation
Definition libwpd_internal.h:105
WPXTextColumnType
WPXTextColumnType
Definition libwpd_internal.h:109
WPXNoteType
WPXNoteType
Definition libwpd_internal.h:93
RGBSColor
Definition libwpd_internal.h:167