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 : public librevenge::RVNGTextInterface
45 {
46 public:
49 
50  void setDocumentMetaData(const librevenge::RVNGPropertyList &propList);
51  void startDocument(const librevenge::RVNGPropertyList &);
52  void endDocument();
53 
54  void defineEmbeddedFont(const librevenge::RVNGPropertyList &propList);
55 
56  void definePageStyle(const librevenge::RVNGPropertyList &);
57  void openPageSpan(const librevenge::RVNGPropertyList &propList);
58  void closePageSpan();
59 
60  void defineSectionStyle(const librevenge::RVNGPropertyList &);
61  void openSection(const librevenge::RVNGPropertyList &propList);
62  void closeSection();
63 
64  void openHeader(const librevenge::RVNGPropertyList &propList);
65  void closeHeader();
66  void openFooter(const librevenge::RVNGPropertyList &propList);
67  void closeFooter();
68 
69  void defineParagraphStyle(const librevenge::RVNGPropertyList &propList);
70  void openParagraph(const librevenge::RVNGPropertyList &propList);
71  void closeParagraph();
72 
73  void defineCharacterStyle(const librevenge::RVNGPropertyList &propList);
74  void openSpan(const librevenge::RVNGPropertyList &propList);
75  void closeSpan();
76 
77  void openLink(const librevenge::RVNGPropertyList &propList);
78  void closeLink();
79 
80  void insertTab();
81  void insertSpace();
82  void insertText(const librevenge::RVNGString &text);
83  void insertLineBreak();
84  void insertField(const librevenge::RVNGPropertyList &propList);
85 
86  void openOrderedListLevel(const librevenge::RVNGPropertyList &propList);
87  void openUnorderedListLevel(const librevenge::RVNGPropertyList &propList);
88  void closeOrderedListLevel();
89  void closeUnorderedListLevel();
90  void openListElement(const librevenge::RVNGPropertyList &propList);
91  void closeListElement();
92 
93  void openFootnote(const librevenge::RVNGPropertyList &propList);
94  void closeFootnote();
95  void openEndnote(const librevenge::RVNGPropertyList &propList);
96  void closeEndnote();
97  void openComment(const librevenge::RVNGPropertyList &propList);
98  void closeComment();
99  void openTextBox(const librevenge::RVNGPropertyList &propList);
100  void closeTextBox();
101 
102  void openTable(const librevenge::RVNGPropertyList &propList);
103  void openTableRow(const librevenge::RVNGPropertyList &propList);
104  void closeTableRow();
105  void openTableCell(const librevenge::RVNGPropertyList &propList);
106  void closeTableCell();
107  void insertCoveredTableCell(const librevenge::RVNGPropertyList &propList);
108  void closeTable();
109 
110  //
111  // simple Graphic
112  //
113 
114  void openGroup(const librevenge::RVNGPropertyList &propList);
115  void closeGroup();
116 
117  void defineGraphicStyle(const librevenge::RVNGPropertyList &propList);
118  void drawRectangle(const librevenge::RVNGPropertyList &propList);
119  void drawEllipse(const librevenge::RVNGPropertyList &propList);
120  void drawPolygon(const librevenge::RVNGPropertyList &propList);
121  void drawPolyline(const librevenge::RVNGPropertyList &propList);
122  void drawPath(const librevenge::RVNGPropertyList &propList);
123  void drawConnector(const librevenge::RVNGPropertyList &propList);
124 
125  void openFrame(const librevenge::RVNGPropertyList &propList);
126  void closeFrame();
127 
128  void insertBinaryObject(const librevenge::RVNGPropertyList &propList);
129  void insertEquation(const librevenge::RVNGPropertyList &propList);
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.13