WP5Listener.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) 2003 William Lachance (wrlach@gmail.com)
* Copyright (C) 2003 Marc Maurer (uwog@uwog.net)
* Copyright (C) 2005-2007 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 WP5LISTENER_H
#define WP5LISTENER_H
#include <memory>
#include <vector>
#include <librevenge/librevenge.h>
#include "libwpd_internal.h"
class WP5SubDocument;
class WP5PrefixData;
class WP5GeneralPacketData;
class WP5Listener
{
public:
WP5Listener();
virtual ~WP5Listener() {}
virtual void startDocument() = 0;
virtual void startSubDocument() = 0;
virtual void setFont(const librevenge::RVNGString &fontName, double fontSize) = 0;
virtual void setTabs(const std::vector<WPXTabStop> &tabStops, unsigned short tabOffset) = 0;
virtual void insertCharacter(unsigned character) = 0;
virtual void insertTab(unsigned char tabType, double tabPosition) = 0;
virtual void insertIndent(unsigned char indentType, double indentPosition) = 0;
virtual void insertEOL() = 0;
virtual void insertBreak(unsigned char breakType) = 0;
virtual void lineSpacingChange(double lineSpacing) = 0;
virtual void justificationChange(unsigned char justification) = 0;
virtual void characterColorChange(unsigned char red, unsigned char green, unsigned char blue) = 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 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 insertRow(unsigned short rowHeight, bool isMinimumHeight, bool isHeaderRow) = 0;
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;
virtual void endTable() = 0;
virtual void insertNoteReference(const librevenge::RVNGString &noteReference) = 0;
virtual void insertNote(WPXNoteType noteType, const WP5SubDocument *subDocument) = 0;
virtual void headerFooterGroup(unsigned char headerFooterType, unsigned char occurrenceBits, const std::shared_ptr<WP5SubDocument> &subDocument) = 0;
virtual void suppressPageCharacteristics(unsigned char suppressCode) = 0;
virtual void boxOn(unsigned char positionAndType, unsigned char alignment, unsigned short width, unsigned short height, unsigned short x, unsigned short y) = 0;
virtual void boxOff() = 0;
virtual void insertGraphicsData(const librevenge::RVNGBinaryData *data) = 0;
void setPrefixData(WP5PrefixData *prefixData)
{
m_prefixData = prefixData;
}
const WP5GeneralPacketData *getGeneralPacketData(const int type) const;
private:
WP5Listener(const WP5Listener &);
WP5Listener &operator=(const WP5Listener &);
WP5PrefixData *m_prefixData;
};
#endif /* WP5LISTENER_H */
/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
WP5GeneralPacketData
Definition WP5GeneralPacketData.h:33
WP5Listener::lineSpacingChange
virtual void lineSpacingChange(double lineSpacing)=0
WP5Listener::justificationChange
virtual void justificationChange(unsigned char justification)=0
WP5Listener::addTableColumnDefinition
virtual void addTableColumnDefinition(unsigned width, unsigned leftGutter, unsigned rightGutter, unsigned attributes, unsigned char alignment)=0
WP5Listener::insertIndent
virtual void insertIndent(unsigned char indentType, double indentPosition)=0
WP5Listener::setPrefixData
void setPrefixData(WP5PrefixData *prefixData)
Definition WP5Listener.h:85
WP5Listener::marginChange
virtual void marginChange(unsigned char side, unsigned short margin)=0
WP5Listener::suppressPageCharacteristics
virtual void suppressPageCharacteristics(unsigned char suppressCode)=0
WP5Listener::startSubDocument
virtual void startSubDocument()=0
WP5Listener::insertBreak
virtual void insertBreak(unsigned char breakType)=0
WP5Listener::operator=
WP5Listener & operator=(const WP5Listener &)
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
WP5Listener::WP5Listener
WP5Listener(const WP5Listener &)
WP5Listener::insertNoteReference
virtual void insertNoteReference(const librevenge::RVNGString &noteReference)=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::~WP5Listener
virtual ~WP5Listener()
Definition WP5Listener.h:44
WP5Listener::insertTab
virtual void insertTab(unsigned char tabType, double tabPosition)=0
WP5Listener::startTable
virtual void startTable()=0
WP5Listener::startDocument
virtual void startDocument()=0
WP5Listener::insertCharacter
virtual void insertCharacter(unsigned character)=0
WP5Listener::insertGraphicsData
virtual void insertGraphicsData(const librevenge::RVNGBinaryData *data)=0
WP5Listener::m_prefixData
WP5PrefixData * m_prefixData
Definition WP5Listener.h:94
WP5Listener::setFont
virtual void setFont(const librevenge::RVNGString &fontName, double fontSize)=0
WP5Listener::endDocument
virtual void endDocument()=0
WP5Listener::endSubDocument
virtual void endSubDocument()=0
WP5Listener::getGeneralPacketData
const WP5GeneralPacketData * getGeneralPacketData(const int type) const
Definition WP5Listener.cpp:39
WP5Listener::insertEOL
virtual void insertEOL()=0
WP5Listener::pageFormChange
virtual void pageFormChange(unsigned short length, unsigned short width, WPXFormOrientation orientation)=0
WP5Listener::endTable
virtual void endTable()=0
WP5Listener::insertRow
virtual void insertRow(unsigned short rowHeight, bool isMinimumHeight, bool isHeaderRow)=0
WP5Listener::setTabs
virtual void setTabs(const std::vector< WPXTabStop > &tabStops, unsigned short tabOffset)=0
WP5Listener::attributeChange
virtual void attributeChange(bool isOn, unsigned char attribute)=0
WP5Listener::pageMarginChange
virtual void pageMarginChange(unsigned char side, unsigned short margin)=0
WP5Listener::boxOff
virtual void boxOff()=0
WP5Listener::insertNote
virtual void insertNote(WPXNoteType noteType, const WP5SubDocument *subDocument)=0
WP5Listener::headerFooterGroup
virtual void headerFooterGroup(unsigned char headerFooterType, unsigned char occurrenceBits, const std::shared_ptr< WP5SubDocument > &subDocument)=0
WP5Listener::defineTable
virtual void defineTable(unsigned char position, unsigned short leftOffset)=0
WP5Listener::characterColorChange
virtual void characterColorChange(unsigned char red, unsigned char green, unsigned char blue)=0
WP5Listener::WP5Listener
WP5Listener()
Definition WP5Listener.cpp:34
WP5PrefixData
Definition WP5PrefixData.h:35
WP5SubDocument
Definition WP5SubDocument.h:34
libwpd_internal.h
WPXFormOrientation
WPXFormOrientation
Definition libwpd_internal.h:105
WPXVerticalAlignment
WPXVerticalAlignment
Definition libwpd_internal.h:107
WPXNoteType
WPXNoteType
Definition libwpd_internal.h:93
RGBSColor
Definition libwpd_internal.h:167