WP1StylesListener.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  * Copyright (C) 2003 William Lachance (wrlach@gmail.com)
4  * Copyright (C) 2004 Marc Maurer (uwog@uwog.net)
5  * Copyright (C) 2006 Fridrich Strba (fridrich.strba@bluewin.ch)
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Library General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Library General Public License for more details.
16  *
17  * You should have received a copy of the GNU Library General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
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 WP1STYLESLISTENER_H
29 #define WP1STYLESLISTENER_H
30 
31 #include "WP1Listener.h"
32 #include "WP1SubDocument.h"
33 #include "WPXStylesListener.h"
34 #include <vector>
35 #include "WPXPageSpan.h"
36 #include "WPXTable.h"
37 
39 {
40 public:
41  WP1StylesListener(std::list<WPXPageSpan> &pageList, std::vector<WP1SubDocument *> &subDocuments);
43 
44  void startDocument() {}
45  void startSubDocument() {}
46  void insertCharacter(uint32_t /* character */)
47  {
48  if (!isUndoOn()) m_currentPageHasContent = true;
49  }
50  void insertExtendedCharacter(uint8_t /* extendedCharacter */)
51  {
52  if (!isUndoOn()) m_currentPageHasContent = true;
53  }
54  void insertTab()
55  {
56  if (!isUndoOn()) m_currentPageHasContent = true;
57  }
58  void insertEOL()
59  {
60  if (!isUndoOn()) m_currentPageHasContent = true;
61  }
62  void insertBreak(uint8_t breakType);
63  void insertNote(WPXNoteType /* noteType */, WP1SubDocument * /* subDocument */) {}
64  void attributeChange(bool /* isOn */, uint8_t /* attribute */) {}
65  void fontPointSize(uint8_t /* pointSize */) {}
66  void fontId(uint16_t /* id */) {}
67  void marginReset(uint16_t leftMargin, uint16_t rightMargin);
68  void topMarginSet(uint16_t topMargin);
69  void bottomMarginSet(uint16_t bottomMargin);
70  void leftIndent(uint16_t /* leftMarginOffset */)
71  {
72  if (!isUndoOn()) m_currentPageHasContent = true;
73  }
74  void leftRightIndent(uint16_t /* leftRightMarginOffset */)
75  {
76  if (!isUndoOn()) m_currentPageHasContent = true;
77  }
78  void leftMarginRelease(uint16_t /* release */) {}
79  void setTabs(const std::vector<WPXTabStop>& /* tabStops */) {}
80  void headerFooterGroup(uint8_t headerFooterDefinition, WP1SubDocument *subDocument);
81  void suppressPageCharacteristics(uint8_t suppressCode);
82  void justificationChange(uint8_t /* justification */) {}
83  void lineSpacingChange(uint8_t /* spacing */) {}
84  void flushRightOn() {}
85  void flushRightOff() {}
86  void centerOn() {}
87  void centerOff() {}
88  void endDocument();
89  void endSubDocument();
90  void insertPicture(uint16_t /* width */, uint16_t /* height */, const WPXBinaryData & /* binaryData */) {}
91 
92 protected:
93  void _handleSubDocument(const WPXSubDocument *subDocument, WPXSubDocumentType subDocumentType, WPXTableList tableList, int nextTableIndice = 0);
94 
95 private:
97  std::vector<WP1SubDocument *> &m_subDocuments;
101  std::list<WPXPageSpan>::iterator m_pageListHardPageMark;
102 };
103 
104 #endif /* WP1STYLESLISTENER_H */
105 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */

Generated for libwpd by doxygen 1.8.1.2