WP6Listener.h Source File documentation

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

WP6Listener.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) 2002 William Lachance (wrlach@gmail.com)
11 * Copyright (C) 2002 Marc Maurer (uwog@uwog.net)
12 * Copyright (C) 2006 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 WP6LISTENER_H
29 #define WP6LISTENER_H
30
31 #include <librevenge/librevenge.h>
32 #include "libwpd_internal.h"
33 #include <vector>
34
35 class WP6DefaultInitialFontPacket;
36 class WP6PrefixData;
37 class WP6PrefixDataPacket;
38 class WP6SubDocument;
39
40 class WP6Listener
41 {
42 public:
43 WP6Listener();
44 virtual ~WP6Listener() {}
45
46 virtual void startDocument() = 0;
47 virtual void startSubDocument() = 0;
48 virtual void setDate(const unsigned short type, const unsigned short year,
49 const unsigned char month, const unsigned char day,
50 const unsigned char hour, const unsigned char minute,
51 const unsigned char second, const unsigned char dayOfWeek,
52 const unsigned char timeZone, const unsigned char unused) = 0;
53 virtual void setExtendedInformation(const unsigned short type, const librevenge::RVNGString &data) = 0;
54 virtual void setAlignmentCharacter(const unsigned character) = 0;
55 virtual void setLeaderCharacter(const unsigned character, const unsigned char numSpaces) = 0;
56 virtual void defineTabStops(const bool isRelative, const std::vector<WPXTabStop> &tabStops,
57 const std::vector<bool> &usePreWP9LeaderMethods) = 0;
58 virtual void insertCharacter(unsigned character) = 0;
59 virtual void insertTab(const unsigned char tabType, double tabPosition) = 0;
60 virtual void handleLineBreak() = 0;
61 virtual void insertEOL() = 0;
62 virtual void insertBreak(const unsigned char breakType) = 0;
63 virtual void lineSpacingChange(const double lineSpacing) = 0;
64 virtual void justificationChange(const unsigned char justification) = 0;
65 virtual void characterColorChange(const unsigned char red, const unsigned char green, const unsigned char blue) = 0;
66 virtual void characterShadingChange(const unsigned char shading) = 0;
67 virtual void highlightChange(const bool isOn, const RGBSColor &color) = 0;
68 virtual void fontChange(const unsigned short matchedFontPointSize, const unsigned short fontPID, const librevenge::RVNGString &fontName) = 0;
69 virtual void attributeChange(const bool isOn, const unsigned char attribute) = 0;
70 virtual void spacingAfterParagraphChange(const double spacingRelative, const double spacingAbsolute) = 0;
71 virtual void pageMarginChange(const unsigned char side, const unsigned short margin) = 0;
72 virtual void pageFormChange(const unsigned short length, const unsigned short width, const WPXFormOrientation orientation) = 0;
73 virtual void pageNumberingChange(const WPXPageNumberPosition pageNumberPosition, const unsigned short pageNumberFontPointSize, const unsigned short pageNumberFontPID) = 0;
74 virtual void marginChange(const unsigned char side, const unsigned short margin) = 0;
75 virtual void paragraphMarginChange(const unsigned char side, const signed short margin) = 0;
76 virtual void indentFirstLineChange(const signed short offset) = 0;
77 virtual void columnChange(const WPXTextColumnType columnType, const unsigned char numColumns,
78 const std::vector<double> &columnWidth, const std::vector<bool> &isFixedWidth) = 0;
79 virtual void updateOutlineDefinition(const unsigned short outlineHash, const unsigned char *numberingMethods, const unsigned char tabBehaviourFlag) = 0;
80 virtual void paragraphNumberOn(const unsigned short outlineHash, const unsigned char level, const unsigned char flag) = 0;
81 virtual void paragraphNumberOff() = 0;
82 virtual void displayNumberReferenceGroupOn(const unsigned char subGroup, const unsigned char level) = 0;
83 virtual void displayNumberReferenceGroupOff(const unsigned char subGroup) = 0;
84 virtual void styleGroupOn(const unsigned char subGroup) = 0;
85 virtual void styleGroupOff(const unsigned char subGroup) = 0;
86 virtual void globalOn(const unsigned char systemStyle) = 0;
87 virtual void globalOff() = 0;
88 virtual void noteOn(const unsigned short textPID) = 0;
89 virtual void noteOff(const WPXNoteType noteType) = 0;
90 virtual void headerFooterGroup(const unsigned char headerFooterType, const unsigned char occurrenceBits, const unsigned short textPID) = 0;
91 virtual void suppressPageCharacteristics(const unsigned char suppressCode) = 0;
92 virtual void setPageNumber(const unsigned short pageNumber) = 0;
93 virtual void setPageNumberingType(const WPXNumberingType pageNumberingType) = 0;
94 virtual void endDocument() = 0;
95 virtual void endSubDocument() = 0;
96 virtual void defineTable(const unsigned char position, const unsigned short leftOffset) = 0;
97 virtual void addTableColumnDefinition(const unsigned width, const unsigned leftGutter, const unsigned rightGutter,
98 const unsigned attributes, const unsigned char alignment) = 0;
99 virtual void startTable() = 0;
100 virtual void insertRow(const unsigned short rowHeight, const bool isMinimumHeight, const bool isHeaderRow) = 0;
101 virtual void insertCell(const unsigned char colSpan, const unsigned char rowSpan, const unsigned char borderBits,
102 const RGBSColor *cellFgColor, const RGBSColor *cellBgColor,
103 const RGBSColor *cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment,
104 const bool useCellAttributes, const unsigned cellAttributes) = 0;
105 virtual void endTable() = 0;
106
107 virtual void undoChange(const unsigned char undoType, const unsigned short undoLevel) = 0;
108 virtual void boxOn(const unsigned char anchoringType, const unsigned char generalPositioningFlags, const unsigned char horizontalPositioningFlags,
109 const signed short horizontalOffset, const unsigned char leftColumn, const unsigned char rightColumn,
110 const unsigned char verticalPositioningFlags, const signed short verticalOffset, const unsigned char widthFlags, const unsigned short width,
111 const unsigned char heightFlags, const unsigned short height, const unsigned char boxContentType, const unsigned short nativeWidth,
112 const unsigned short nativeHeight,
113 const librevenge::RVNGString &linkTarget) = 0;
114 virtual void boxOff() = 0;
115 virtual void insertGraphicsData(const unsigned short packetId) = 0;
116 virtual void insertTextBox(const WP6SubDocument *subDocument) = 0;
117 virtual void commentAnnotation(const unsigned short textPID) = 0;
118
119 void setPrefixData(WP6PrefixData *prefixData)
120 {
121 m_prefixData = prefixData;
122 }
123 const WP6PrefixDataPacket *getPrefixDataPacket(const int prefixID) const;
124 librevenge::RVNGString getFontNameForPID(const int prefixID) const;
125
126 private:
127 WP6Listener(const WP6Listener &);
128 WP6Listener &operator=(const WP6Listener &);
129 WP6PrefixData *m_prefixData;
130 };
131
132 #endif /* WP6LISTENER_H */
133 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
WPXNumberingType
WPXNumberingType
Definition: libwpd_internal.h:86
WP6DefaultInitialFontPacket
Definition: WP6DefaultInitialFontPacket.h:31
WP6Listener::setLeaderCharacter
virtual void setLeaderCharacter(const unsigned character, const unsigned char numSpaces)=0
WP6Listener::spacingAfterParagraphChange
virtual void spacingAfterParagraphChange(const double spacingRelative, const double spacingAbsolute)=0
WP6Listener::insertTextBox
virtual void insertTextBox(const WP6SubDocument *subDocument)=0
WP6Listener::endTable
virtual void endTable()=0
WP6Listener::noteOn
virtual void noteOn(const unsigned short textPID)=0
WP6Listener
Definition: WP6Listener.h:40
WP6Listener::pageFormChange
virtual void pageFormChange(const unsigned short length, const unsigned short width, const WPXFormOrientation orientation)=0
WP6Listener::pageMarginChange
virtual void pageMarginChange(const unsigned char side, const unsigned short margin)=0
WP6Listener::justificationChange
virtual void justificationChange(const unsigned char justification)=0
WP6Listener::getPrefixDataPacket
const WP6PrefixDataPacket * getPrefixDataPacket(const int prefixID) const
Definition: WP6Listener.cpp:44
WP6Listener::globalOn
virtual void globalOn(const unsigned char systemStyle)=0
WP6Listener::insertGraphicsData
virtual void insertGraphicsData(const unsigned short packetId)=0
WP6Listener::indentFirstLineChange
virtual void indentFirstLineChange(const signed short offset)=0
WP6Listener::updateOutlineDefinition
virtual void updateOutlineDefinition(const unsigned short outlineHash, const unsigned char *numberingMethods, const unsigned char tabBehaviourFlag)=0
WP6Listener::operator=
WP6Listener & operator=(const WP6Listener &)
WP6Listener::displayNumberReferenceGroupOn
virtual void displayNumberReferenceGroupOn(const unsigned char subGroup, const unsigned char level)=0
WPXTextColumnType
WPXTextColumnType
Definition: libwpd_internal.h:103
WP6Listener::fontChange
virtual void fontChange(const unsigned short matchedFontPointSize, const unsigned short fontPID, const librevenge::RVNGString &fontName)=0
WP6Listener::highlightChange
virtual void highlightChange(const bool isOn, const RGBSColor &color)=0
WP6Listener::suppressPageCharacteristics
virtual void suppressPageCharacteristics(const unsigned char suppressCode)=0
WP6Listener::styleGroupOn
virtual void styleGroupOn(const unsigned char subGroup)=0
WP6Listener::insertEOL
virtual void insertEOL()=0
libwpd_internal.h
WP6Listener::m_prefixData
WP6PrefixData * m_prefixData
Definition: WP6Listener.h:129
WP6Listener::addTableColumnDefinition
virtual void addTableColumnDefinition(const unsigned width, const unsigned leftGutter, const unsigned rightGutter, const unsigned attributes, const unsigned char alignment)=0
WP6Listener::headerFooterGroup
virtual void headerFooterGroup(const unsigned char headerFooterType, const unsigned char occurrenceBits, const unsigned short textPID)=0
WP6Listener::setExtendedInformation
virtual void setExtendedInformation(const unsigned short type, const librevenge::RVNGString &data)=0
WP6Listener::endDocument
virtual void endDocument()=0
WP6Listener::setPrefixData
void setPrefixData(WP6PrefixData *prefixData)
Definition: WP6Listener.h:119
WP6Listener::setPageNumberingType
virtual void setPageNumberingType(const WPXNumberingType pageNumberingType)=0
WP6Listener::startSubDocument
virtual void startSubDocument()=0
WP6Listener::paragraphNumberOn
virtual void paragraphNumberOn(const unsigned short outlineHash, const unsigned char level, const unsigned char flag)=0
WP6Listener::displayNumberReferenceGroupOff
virtual void displayNumberReferenceGroupOff(const unsigned char subGroup)=0
WP6Listener::paragraphMarginChange
virtual void paragraphMarginChange(const unsigned char side, const signed short margin)=0
WP6SubDocument
Definition: WP6SubDocument.h:33
WP6Listener::globalOff
virtual void globalOff()=0
WP6Listener::insertBreak
virtual void insertBreak(const unsigned char breakType)=0
WP6Listener::insertRow
virtual void insertRow(const unsigned short rowHeight, const bool isMinimumHeight, const bool isHeaderRow)=0
WP6Listener::startTable
virtual void startTable()=0
WP6Listener::characterShadingChange
virtual void characterShadingChange(const unsigned char shading)=0
WP6Listener::noteOff
virtual void noteOff(const WPXNoteType noteType)=0
WP6Listener::defineTabStops
virtual void defineTabStops(const bool isRelative, const std::vector< WPXTabStop > &tabStops, const std::vector< bool > &usePreWP9LeaderMethods)=0
WPXFormOrientation
WPXFormOrientation
Definition: libwpd_internal.h:99
WP6Listener::paragraphNumberOff
virtual void paragraphNumberOff()=0
WP6PrefixData
Definition: WP6PrefixData.h:38
WPXVerticalAlignment
WPXVerticalAlignment
Definition: libwpd_internal.h:101
WP6Listener::columnChange
virtual void columnChange(const WPXTextColumnType columnType, const unsigned char numColumns, const std::vector< double > &columnWidth, const std::vector< bool > &isFixedWidth)=0
WP6Listener::styleGroupOff
virtual void styleGroupOff(const unsigned char subGroup)=0
WP6Listener::insertCell
virtual void insertCell(const unsigned char colSpan, const unsigned char rowSpan, const unsigned char borderBits, const RGBSColor *cellFgColor, const RGBSColor *cellBgColor, const RGBSColor *cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment, const bool useCellAttributes, const unsigned cellAttributes)=0
WP6Listener::getFontNameForPID
librevenge::RVNGString getFontNameForPID(const int prefixID) const
Definition: WP6Listener.cpp:52
WP6Listener::setPageNumber
virtual void setPageNumber(const unsigned short pageNumber)=0
RGBSColor
Definition: libwpd_internal.h:160
WP6Listener::pageNumberingChange
virtual void pageNumberingChange(const WPXPageNumberPosition pageNumberPosition, const unsigned short pageNumberFontPointSize, const unsigned short pageNumberFontPID)=0
WP6Listener::endSubDocument
virtual void endSubDocument()=0
WP6Listener::~WP6Listener
virtual ~WP6Listener()
Definition: WP6Listener.h:44
WP6PrefixDataPacket
Definition: WP6PrefixDataPacket.h:35
WPXPageNumberPosition
WPXPageNumberPosition
Definition: libwpd_internal.h:91
WP6Listener::startDocument
virtual void startDocument()=0
WP6Listener::boxOff
virtual void boxOff()=0
WP6Listener::defineTable
virtual void defineTable(const unsigned char position, const unsigned short leftOffset)=0
WP6Listener::insertTab
virtual void insertTab(const unsigned char tabType, double tabPosition)=0
WP6Listener::setAlignmentCharacter
virtual void setAlignmentCharacter(const unsigned character)=0
WP6Listener::handleLineBreak
virtual void handleLineBreak()=0
WP6Listener::lineSpacingChange
virtual void lineSpacingChange(const double lineSpacing)=0
WP6Listener::characterColorChange
virtual void characterColorChange(const unsigned char red, const unsigned char green, const unsigned char blue)=0
WP6Listener::setDate
virtual void setDate(const unsigned short type, const unsigned short year, const unsigned char month, const unsigned char day, const unsigned char hour, const unsigned char minute, const unsigned char second, const unsigned char dayOfWeek, const unsigned char timeZone, const unsigned char unused)=0
WP6Listener::insertCharacter
virtual void insertCharacter(unsigned character)=0
WP6Listener::commentAnnotation
virtual void commentAnnotation(const unsigned short textPID)=0
WP6Listener::WP6Listener
WP6Listener()
Definition: WP6Listener.cpp:39
WP6Listener::boxOn
virtual void boxOn(const unsigned char anchoringType, const unsigned char generalPositioningFlags, const unsigned char horizontalPositioningFlags, const signed short horizontalOffset, const unsigned char leftColumn, const unsigned char rightColumn, const unsigned char verticalPositioningFlags, const signed short verticalOffset, const unsigned char widthFlags, const unsigned short width, const unsigned char heightFlags, const unsigned short height, const unsigned char boxContentType, const unsigned short nativeWidth, const unsigned short nativeHeight, const librevenge::RVNGString &linkTarget)=0
WPXNoteType
WPXNoteType
Definition: libwpd_internal.h:87
WP6Listener::undoChange
virtual void undoChange(const unsigned char undoType, const unsigned short undoLevel)=0
WP6Listener::attributeChange
virtual void attributeChange(const bool isOn, const unsigned char attribute)=0
WP6Listener::marginChange
virtual void marginChange(const unsigned char side, const unsigned short margin)=0