WP42StylesListener.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) 2003 William Lachance (wrlach@gmail.com)
11  * Copyright (C) 2004 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 WP42STYLESLISTENER_H
29 #define WP42STYLESLISTENER_H
30 
31 #include "WP42Listener.h"
32 #include "WP42SubDocument.h"
33 #include "WPXStylesListener.h"
34 #include <vector>
35 #include "WPXPageSpan.h"
36 #include "WPXTable.h"
37 
39 {
40 public:
41  WP42StylesListener(std::list<WPXPageSpan> &pageList, std::vector<WP42SubDocument *> &subDocuments);
42 
43  void startDocument() override {}
44  void startSubDocument() override {}
45  void insertCharacter(unsigned /* character */) override
46  {
47  if (!isUndoOn()) m_currentPageHasContent = true;
48  }
49  void insertTab(unsigned char /* tabType */, double /* tabPosition */) override
50  {
51  if (!isUndoOn()) m_currentPageHasContent = true;
52  }
53  void insertEOL() override
54  {
55  if (!isUndoOn()) m_currentPageHasContent = true;
56  }
57  void insertBreak(unsigned char breakType) override;
58  void attributeChange(bool /* isOn */, unsigned char /* attribute */) override {}
59  void marginReset(unsigned char /* leftMargin */, unsigned char /* rightMargin */) override {}
60  void headerFooterGroup(unsigned char headerFooterDefinition, WP42SubDocument *subDocument) override;
61  void suppressPageCharacteristics(unsigned char suppressCode) override;
62  void endDocument() override;
63  void endSubDocument() override;
64 
65 protected:
66  void _handleSubDocument(const WPXSubDocument *subDocument, WPXSubDocumentType subDocumentType, WPXTableList tableList, int nextTableIndice = 0);
67 
68 private:
70  std::vector<WP42SubDocument *> &m_subDocuments;
74  std::list<WPXPageSpan>::iterator m_pageListHardPageMark;
75 };
76 
77 #endif /* WP42STYLESLISTENER_H */
78 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
void marginReset(unsigned char, unsigned char) override
Definition: WP42StylesListener.h:59
void _handleSubDocument(const WPXSubDocument *subDocument, WPXSubDocumentType subDocumentType, WPXTableList tableList, int nextTableIndice=0)
Definition: WP42StylesListener.cpp:192
void insertTab(unsigned char, double) override
Definition: WP42StylesListener.h:49
void startSubDocument() override
Definition: WP42StylesListener.h:44
Definition: WP42StylesListener.h:38
Definition: WP42Listener.h:34
double m_tempMarginRight
Definition: WP42StylesListener.h:71
void headerFooterGroup(unsigned char headerFooterDefinition, WP42SubDocument *subDocument) override
Definition: WP42StylesListener.cpp:119
void insertEOL() override
Definition: WP42StylesListener.h:53
WPXPageSpan m_nextPage
Definition: WP42StylesListener.h:69
WPXSubDocumentType
Definition: libwpd_internal.h:111
std::list< WPXPageSpan >::iterator m_pageListHardPageMark
Definition: WP42StylesListener.h:74
Definition: WPXTable.h:79
std::vector< WP42SubDocument * > & m_subDocuments
Definition: WP42StylesListener.h:70
void endDocument() override
Definition: WP42StylesListener.cpp:48
void startDocument() override
Definition: WP42StylesListener.h:43
void attributeChange(bool, unsigned char) override
Definition: WP42StylesListener.h:58
void insertCharacter(unsigned) override
Definition: WP42StylesListener.h:45
Definition: WPXSubDocument.h:34
void suppressPageCharacteristics(unsigned char suppressCode) override
Definition: WP42StylesListener.cpp:165
double m_tempMarginLeft
Definition: WP42StylesListener.h:71
bool m_currentPageHasContent
Definition: WP42StylesListener.h:72
Definition: WPXPageSpan.h:77
void endSubDocument() override
Definition: WP42StylesListener.cpp:53
bool isUndoOn()
Definition: WPXListener.h:40
bool m_isSubDocument
Definition: WP42StylesListener.h:73
WPXPageSpan m_currentPage
Definition: WP42StylesListener.h:69
Definition: WPXStylesListener.h:33
Definition: WP42SubDocument.h:33
WP42StylesListener(std::list< WPXPageSpan > &pageList, std::vector< WP42SubDocument *> &subDocuments)
Definition: WP42StylesListener.cpp:34
void insertBreak(unsigned char breakType) override
Definition: WP42StylesListener.cpp:58

Generated for libwpd by doxygen 1.8.14