OdtGenerator.hxx Source File documentation

OdtGenerator.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2 /* libodfgen
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 _ODTGENERATOR_HXX_
28 #define _ODTGENERATOR_HXX_
29
30 #include <librevenge/librevenge.h>
31
32 #include "libodfgen-api.hxx"
33 #include "OdfDocumentHandler.hxx"
34
35 class OdtGeneratorPrivate;
36 class OdfGenerator;
37
43 class ODFGENAPI OdtGenerator : public librevenge::RVNGTextInterface
44 {
45 public:
46 OdtGenerator();
47 ~OdtGenerator();
48 void addDocumentHandler(OdfDocumentHandler *pHandler, const OdfStreamType streamType);
49 librevenge::RVNGStringVector getObjectNames() const;
50 bool getObjectContent(librevenge::RVNGString const &objectName, OdfDocumentHandler *pHandler);
51
52 void setDocumentMetaData(const librevenge::RVNGPropertyList &propList);
53 void startDocument(const librevenge::RVNGPropertyList &);
54 void endDocument();
55
56 void defineEmbeddedFont(const librevenge::RVNGPropertyList &propList);
57
58 void definePageStyle(const librevenge::RVNGPropertyList &);
59 void openPageSpan(const librevenge::RVNGPropertyList &propList);
60 void closePageSpan();
61
62 void defineSectionStyle(const librevenge::RVNGPropertyList &);
63 void openSection(const librevenge::RVNGPropertyList &propList);
64 void closeSection();
65
66 void openHeader(const librevenge::RVNGPropertyList &propList);
67 void closeHeader();
68 void openFooter(const librevenge::RVNGPropertyList &propList);
69 void closeFooter();
70
71 void defineParagraphStyle(const librevenge::RVNGPropertyList &propList);
72 void openParagraph(const librevenge::RVNGPropertyList &propList);
73 void closeParagraph();
74
75 void defineCharacterStyle(const librevenge::RVNGPropertyList &propList);
76 void openSpan(const librevenge::RVNGPropertyList &propList);
77 void closeSpan();
78
79 void openLink(const librevenge::RVNGPropertyList &propList);
80 void closeLink();
81
82 void insertTab();
83 void insertSpace();
84 void insertText(const librevenge::RVNGString &text);
85 void insertLineBreak();
86 void insertField(const librevenge::RVNGPropertyList &propList);
87
88 void openOrderedListLevel(const librevenge::RVNGPropertyList &propList);
89 void openUnorderedListLevel(const librevenge::RVNGPropertyList &propList);
90 void closeOrderedListLevel();
91 void closeUnorderedListLevel();
92 void openListElement(const librevenge::RVNGPropertyList &propList);
93 void closeListElement();
94
95 void openFootnote(const librevenge::RVNGPropertyList &propList);
96 void closeFootnote();
97 void openEndnote(const librevenge::RVNGPropertyList &propList);
98 void closeEndnote();
99 void openComment(const librevenge::RVNGPropertyList &propList);
100 void closeComment();
101 void openTextBox(const librevenge::RVNGPropertyList &propList);
102 void closeTextBox();
103
104 void openTable(const librevenge::RVNGPropertyList &propList);
105 void openTableRow(const librevenge::RVNGPropertyList &propList);
106 void closeTableRow();
107 void openTableCell(const librevenge::RVNGPropertyList &propList);
108 void closeTableCell();
109 void insertCoveredTableCell(const librevenge::RVNGPropertyList &propList);
110 void closeTable();
111
112 //
113 // simple Graphic
114 //
115
116 void openGroup(const librevenge::RVNGPropertyList &propList);
117 void closeGroup();
118
119 void defineGraphicStyle(const librevenge::RVNGPropertyList &propList);
120 void drawRectangle(const librevenge::RVNGPropertyList &propList);
121 void drawEllipse(const librevenge::RVNGPropertyList &propList);
122 void drawPolygon(const librevenge::RVNGPropertyList &propList);
123 void drawPolyline(const librevenge::RVNGPropertyList &propList);
124 void drawPath(const librevenge::RVNGPropertyList &propList);
125 void drawConnector(const librevenge::RVNGPropertyList &propList);
126
127 void openFrame(const librevenge::RVNGPropertyList &propList);
128 void closeFrame();
129
130 void insertBinaryObject(const librevenge::RVNGPropertyList &propList);
131 void insertEquation(const librevenge::RVNGPropertyList &propList);
132
139 void registerEmbeddedObjectHandler(const librevenge::RVNGString &mimeType, OdfEmbeddedObject objectHandler);
140
150 void registerEmbeddedImageHandler(const librevenge::RVNGString &mimeType, OdfEmbeddedImage imageHandler);
152 void initStateWith(OdfGenerator const &orig);
153
154 private:
155 OdtGenerator(OdtGenerator const &);
156 OdtGenerator &operator=(OdtGenerator const &);
157
158 OdtGeneratorPrivate *mpImpl;
159 };
160 #endif
161
162 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
OdtGenerator::mpImpl
OdtGeneratorPrivate * mpImpl
Definition: OdtGenerator.hxx:158
OdfDocumentHandler
XML writer.
Definition: OdfDocumentHandler.hxx:65
OdfEmbeddedImage
bool(* OdfEmbeddedImage)(const librevenge::RVNGBinaryData &input, librevenge::RVNGBinaryData &output)
Handler for embedded images.
Definition: OdfDocumentHandler.hxx:56
libodfgen-api.hxx
OdfStreamType
OdfStreamType
Type of ODF content a generator should produce.
Definition: OdfDocumentHandler.hxx:35
ODFGENAPI
#define ODFGENAPI
Definition: libodfgen-api.hxx:36
OdtGenerator
A generator for text documents.
Definition: OdtGenerator.hxx:43
OdfDocumentHandler.hxx
OdfEmbeddedObject
bool(* OdfEmbeddedObject)(const librevenge::RVNGBinaryData &data, OdfDocumentHandler *pHandler, const OdfStreamType streamType)
Handler for embedded objects.
Definition: OdfDocumentHandler.hxx:45