ABWTextGenerator.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2 /* librvngabw
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-2004 William Lachance (wrlach@gmail.com)
11  * Copyright (C) 2004 Fridrich Strba (fridrich.strba@bluewin.ch)
12  *
13  * For minor contributions see the git repository.
14  *
15  * Alternatively, the contents of this file may be used under the terms
16  * of the GNU Lesser General Public License Version 2.1 or later
17  * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
18  * applicable instead of those above.
19  *
20  * For further information visit http://libwpd.sourceforge.net
21  */
22 
23 /* "This product is not manufactured, approved, or supported by
24  * Corel Corporation or Corel Corporation Limited."
25  */
26 
27 #ifndef _ABW_TEXT_GENERATOR_HXX_
28 #define _ABW_TEXT_GENERATOR_HXX_
29 
30 #include <librevenge/librevenge.h>
31 
32 #include "librvngabw-api.hxx"
33 #include "ABWDocumentHandler.hxx"
34 
35 namespace librvngabw
36 {
37 class ABWTextGeneratorPrivate;
38 
44 class RVNGABWAPI ABWTextGenerator final : public librevenge::RVNGTextInterface
45 {
46 public:
48  ~ABWTextGenerator() final;
49 
50  void setDocumentMetaData(const librevenge::RVNGPropertyList &propList) final;
51  void startDocument(const librevenge::RVNGPropertyList &) final;
52  void endDocument() final;
53 
54  void defineEmbeddedFont(const librevenge::RVNGPropertyList &propList) final;
55 
56  void definePageStyle(const librevenge::RVNGPropertyList &) final;
57  void openPageSpan(const librevenge::RVNGPropertyList &propList) final;
58  void closePageSpan() final;
59 
60  void defineSectionStyle(const librevenge::RVNGPropertyList &) final;
61  void openSection(const librevenge::RVNGPropertyList &propList) final;
62  void closeSection() final;
63 
64  void openHeader(const librevenge::RVNGPropertyList &propList) final;
65  void closeHeader() final;
66  void openFooter(const librevenge::RVNGPropertyList &propList) final;
67  void closeFooter() final;
68 
69  void defineParagraphStyle(const librevenge::RVNGPropertyList &propList) final;
70  void openParagraph(const librevenge::RVNGPropertyList &propList) final;
71  void closeParagraph() final;
72 
73  void defineCharacterStyle(const librevenge::RVNGPropertyList &propList) final;
74  void openSpan(const librevenge::RVNGPropertyList &propList) final;
75  void closeSpan() final;
76 
77  void openLink(const librevenge::RVNGPropertyList &propList) final;
78  void closeLink() final;
79 
80  void insertTab() final;
81  void insertSpace() final;
82  void insertText(const librevenge::RVNGString &text) final;
83  void insertLineBreak() final;
84  void insertField(const librevenge::RVNGPropertyList &propList) final;
85 
86  void openOrderedListLevel(const librevenge::RVNGPropertyList &propList) final;
87  void openUnorderedListLevel(const librevenge::RVNGPropertyList &propList) final;
88  void closeOrderedListLevel() final;
89  void closeUnorderedListLevel() final;
90  void openListElement(const librevenge::RVNGPropertyList &propList) final;
91  void closeListElement() final;
92 
93  void openFootnote(const librevenge::RVNGPropertyList &propList) final;
94  void closeFootnote() final;
95  void openEndnote(const librevenge::RVNGPropertyList &propList) final;
96  void closeEndnote() final;
97  void openComment(const librevenge::RVNGPropertyList &propList) final;
98  void closeComment() final;
99  void openTextBox(const librevenge::RVNGPropertyList &propList) final;
100  void closeTextBox() final;
101 
102  void openTable(const librevenge::RVNGPropertyList &propList) final;
103  void openTableRow(const librevenge::RVNGPropertyList &propList) final;
104  void closeTableRow() final;
105  void openTableCell(const librevenge::RVNGPropertyList &propList) final;
106  void closeTableCell() final;
107  void insertCoveredTableCell(const librevenge::RVNGPropertyList &propList) final;
108  void closeTable() final;
109 
110  //
111  // simple Graphic
112  //
113 
114  void openGroup(const librevenge::RVNGPropertyList &propList) final;
115  void closeGroup() final;
116 
117  void defineGraphicStyle(const librevenge::RVNGPropertyList &propList) final;
118  void drawRectangle(const librevenge::RVNGPropertyList &propList) final;
119  void drawEllipse(const librevenge::RVNGPropertyList &propList) final;
120  void drawPolygon(const librevenge::RVNGPropertyList &propList) final;
121  void drawPolyline(const librevenge::RVNGPropertyList &propList) final;
122  void drawPath(const librevenge::RVNGPropertyList &propList) final;
123  void drawConnector(const librevenge::RVNGPropertyList &propList) final;
124 
125  void openFrame(const librevenge::RVNGPropertyList &propList) final;
126  void closeFrame() final;
127 
128  void insertBinaryObject(const librevenge::RVNGPropertyList &propList) final;
129  void insertEquation(const librevenge::RVNGPropertyList &propList) final;
130 
137  void registerCheckImageHandler(ABWCheckImage checkHandler, bool useAlsoDefaultType);
147  void registerEmbeddedImageHandler(const librevenge::RVNGString &mimeType, ABWEmbeddedImage imageHandler);
154  void registerEmbeddedObjectHandler(const librevenge::RVNGString &mimeType, ABWEmbeddedObject objectHandler);
155 
156 
157 private:
159  ABWTextGenerator &operator=(ABWTextGenerator const &);
160 
161  ABWTextGeneratorPrivate *m_data;
162 };
163 }
164 #endif
165 
166 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
bool(* ABWEmbeddedImage)(const librevenge::RVNGBinaryData &input, librevenge::RVNGBinaryData &output)
Handler for embedded images.
Definition: ABWDocumentHandler.hxx:48
#define RVNGABWAPI
Definition: librvngabw-api.hxx:36
Definition: ABWDocumentHandler.hxx:30
bool(* ABWEmbeddedObject)(const librevenge::RVNGBinaryData &data, ABWGenerator &generator)
Handler for embedded objects.
Definition: ABWDocumentHandler.hxx:55
ABWTextGeneratorPrivate * m_data
Definition: ABWTextGenerator.hxx:161
XML writer.
Definition: ABWDocumentHandler.hxx:64
bool(* ABWCheckImage)(const librevenge::RVNGString &mimeType, const librevenge::RVNGBinaryData &image)
Handler for to check the images type.
Definition: ABWDocumentHandler.hxx:40
A generator for text documents.
Definition: ABWTextGenerator.hxx:44

Generated for librvngabw by doxygen 1.8.15