2
* Copyright (C) 2003 William Lachance (william.lachance@sympatico.ca)
3
* Copyright (C) 2003 Marc Maurer (uwog@uwog.net)
4
* Copyright (C) 2005-2006 Fridrich Strba (fridrich.strba@bluewin.ch)
6
* This library is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU Library General Public
8
* License as published by the Free Software Foundation; either
9
* version 2 of the License, or (at your option) any later version.
11
* This library is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* Library General Public License for more details.
16
* You should have received a copy of the GNU Library General Public
17
* License along with this library; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
20
* For further information visit http://libwpd.sourceforge.net
23
/* "This product is not manufactured, approved, or supported by
24
* Corel Corporation or Corel Corporation Limited."
27
#ifndef WP42CONTENTLISTENER_H
28
#define WP42CONTENTLISTENER_H
30
#include "WP42Listener.h"
31
#include "WPXContentListener.h"
32
#include "WPXHLListenerImpl.h"
34
typedef struct _WP42ContentParsingState WP42ContentParsingState;
35
struct _WP42ContentParsingState
37
_WP42ContentParsingState();
38
~_WP42ContentParsingState();
39
WPXString m_textBuffer;
42
class WP42ContentListener : public WP42Listener, public WPXContentListener
45
WP42ContentListener(std::list<WPXPageSpan> &pageList, WPXHLListenerImpl *listenerImpl);
46
~WP42ContentListener();
48
void startDocument() { WPXContentListener::startDocument(); };
49
void setAlignmentCharacter(const uint16_t character) {};
50
void setLeaderCharacter(const uint16_t character, const uint8_t numberOfSpaces) {};
51
void defineTabStops(const bool isRelative, const std::vector<WPXTabStop> &tabStops,
52
const std::vector<bool> &usePreWP9LeaderMethods) {};
53
void insertCharacter(const uint16_t character);
54
void insertTab(const uint8_t tabType, float tabPosition);
55
void insertBreak(const uint8_t breakType) { WPXContentListener::insertBreak(breakType); };
56
void handleLineBreak() {};
58
void attributeChange(const bool isOn, const uint8_t attribute);
59
void lineSpacingChange(const float lineSpacing) {};
60
void spacingAfterParagraphChange(const float spacingRelative, const float spacingAbsolute) {};
61
void justificationChange(const uint8_t justification) {};
62
void pageMarginChange(const uint8_t side, const uint16_t margin) {};
63
void pageFormChange(const uint16_t length, const uint16_t width, const WPXFormOrientation orientation, const bool isPersistent) {};
64
void marginChange(const uint8_t side, const uint16_t margin) {};
65
void paragraphMarginChange(const uint8_t side, const int16_t margin) {};
66
void indentFirstLineChange(const int16_t offset) {};
67
void columnChange(const WPXTextColumnType typeColumn, const uint8_t numColumns, const std::vector<float> &columnWidth,
68
const std::vector<bool> &isFixedWidth) {};
71
void defineTable(const uint8_t position, const uint16_t leftOffset) {};
72
void addTableColumnDefinition(const uint32_t width, const uint32_t leftGutter, const uint32_t rightGutter,
73
const uint32_t attributes, const uint8_t alignment) {};
75
void insertRow(const uint16_t rowHeight, const bool isMinimumHeight, const bool isHeaderRow) {};
76
void insertCell(const uint8_t colSpan, const uint8_t rowSpan, const bool boundFromLeft, const bool boundFromAbove,
77
const uint8_t borderBits, const RGBSColor * cellFgColor, const RGBSColor * cellBgColor,
78
const RGBSColor * cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment,
79
const bool useCellAttributes, const uint32_t cellAttributes) {};
83
void _handleSubDocument(const WPXSubDocument *subDocument, const bool isHeaderFooter, WPXTableList tableList, int nextTableIndice = 0) {}
87
void _changeList() {};
89
WP42ContentParsingState *m_parseState;
92
#endif /* WP42LISTENER_H */