WP3Listener.h
Go to the documentation of this file.
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* libwpd
* Version: MPL 2.0 / LGPLv2.1+
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Major Contributor(s):
* Copyright (C) 2004 Marc Maurer (uwog@uwog.net)
* Copyright (C) 2005-2006 Fridrich Strba (fridrich.strba@bluewin.ch)
*
* For minor contributions see the git repository.
*
* Alternatively, the contents of this file may be used under the terms
* of the GNU Lesser General Public License Version 2.1 or later
* (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
* applicable instead of those above.
*
* For further information visit http://libwpd.sourceforge.net
*/
/* "This product is not manufactured, approved, or supported by
* Corel Corporation or Corel Corporation Limited."
*/
#ifndef WP3LISTENER_H
#define WP3LISTENER_H
#include <memory>
#include <vector>
#include <librevenge/librevenge.h>
#include "libwpd_internal.h"
class WP3SubDocument;
class WP3ResourceFork;
class WP3Listener
{
public:
WP3Listener();
virtual ~WP3Listener() {}
virtual void startDocument() = 0;
virtual void startSubDocument() = 0;
virtual void insertCharacter(unsigned character) = 0;
virtual void insertTab() = 0;
virtual void insertTab(unsigned char tabType, double tabPosition) = 0;
virtual void insertBreak(unsigned char breakType) = 0;
virtual void insertEOL() = 0;
virtual void lineSpacingChange(double lineSpacing) = 0;
virtual void attributeChange(bool isOn, unsigned char attribute) = 0;
virtual void pageMarginChange(unsigned char side, unsigned short margin) = 0;
virtual void pageFormChange(unsigned short length, unsigned short width, WPXFormOrientation orientation) = 0;
virtual void marginChange(unsigned char side, unsigned short margin) = 0;
virtual void indentFirstLineChange(double offset) = 0;
virtual void setTabs(bool isRelative, const std::vector<WPXTabStop> tabStops) = 0;
virtual void columnChange(WPXTextColumnType columnType, unsigned char numColumns, const std::vector<double> &columnWidth,
const std::vector<bool> &isFixedWidth) = 0;
virtual void endDocument() = 0;
virtual void endSubDocument() = 0;
virtual void defineTable(unsigned char position, unsigned short leftOffset) = 0;
virtual void addTableColumnDefinition(unsigned width, unsigned leftGutter, unsigned rightGutter,
unsigned attributes, unsigned char alignment) = 0;
virtual void startTable() = 0;
virtual void closeCell() = 0;
virtual void closeRow() = 0;
virtual void setTableCellSpan(unsigned short colSpan, unsigned short rowSpan) = 0;
virtual void setTableCellFillColor(const RGBSColor *cellFillColor) = 0;
virtual void endTable() = 0;
virtual void undoChange(unsigned char undoType, unsigned short undoLevel) = 0;
virtual void justificationChange(unsigned char justification) = 0;
virtual void setTextColor(const RGBSColor *fontColor) = 0;
virtual void setTextFont(const librevenge::RVNGString &fontName) = 0;
virtual void setFontSize(unsigned short fontSize) = 0;
virtual void insertPageNumber(const librevenge::RVNGString &pageNumber) = 0;
virtual void insertNoteReference(const librevenge::RVNGString &noteReference) = 0;
virtual void insertNote(WPXNoteType noteType, const WP3SubDocument *subDocument) = 0;
virtual void headerFooterGroup(unsigned char headerFooterType, unsigned char occurrenceBits, const std::shared_ptr<WP3SubDocument> &subDocument) = 0;
virtual void suppressPage(unsigned short suppressCode) = 0;
virtual void backTab() = 0;
virtual void leftIndent() = 0;
virtual void leftIndent(double offset) = 0;
virtual void leftRightIndent() = 0;
virtual void leftRightIndent(double offset) = 0;
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;
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;
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;
void setResourceFork(WP3ResourceFork *resourceFork)
{
m_resourceFork = resourceFork;
}
const WP3ResourceFork *getResourceFork() const
{
return m_resourceFork;
}
private:
WP3ResourceFork *m_resourceFork;
// Unimplemented to prevent compiler from creating crasher ones
WP3Listener(const WP3Listener &);
WP3Listener &operator=(const WP3Listener &);
};
#endif /* WP3LISTENER_H */
/* 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