OdsGenerator.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 _ODSGENERATOR_HXX_
28 #define _ODSGENERATOR_HXX_
29
30 #include <librevenge/librevenge.h>
31
32 #include "libodfgen-api.hxx"
33 #include "OdfDocumentHandler.hxx"
34
35 class OdfGenerator;
36 class OdsGeneratorPrivate;
37
43 class ODFGENAPI OdsGenerator : public librevenge::RVNGSpreadsheetInterface
44 {
45 public:
46 OdsGenerator();
47 ~OdsGenerator() override;
48
50 void addDocumentHandler(OdfDocumentHandler *pHandler, const OdfStreamType streamType);
52 librevenge::RVNGStringVector getObjectNames() const;
54 bool getObjectContent(librevenge::RVNGString const &objectName, OdfDocumentHandler *pHandler);
55
56 void setDocumentMetaData(const librevenge::RVNGPropertyList &propList) override;
57 void startDocument(const librevenge::RVNGPropertyList &) override;
58 void endDocument() override;
59
60 void defineEmbeddedFont(const librevenge::RVNGPropertyList &propList) override;
61
62 void definePageStyle(const librevenge::RVNGPropertyList &) override {}
63 void openPageSpan(const librevenge::RVNGPropertyList &propList) override;
64 void closePageSpan() override;
65
66 void defineSectionStyle(const librevenge::RVNGPropertyList &) override {}
67 void openSection(const librevenge::RVNGPropertyList &propList) override;
68 void closeSection() override;
69
70 void openHeader(const librevenge::RVNGPropertyList &propList) override;
71 void closeHeader() override;
72 void openFooter(const librevenge::RVNGPropertyList &propList) override;
73 void closeFooter() override;
74
75 void defineSheetNumberingStyle(const librevenge::RVNGPropertyList &propList) override;
76 void openSheet(const librevenge::RVNGPropertyList &propList) override;
77 void closeSheet() override;
78 void openSheetRow(const librevenge::RVNGPropertyList &propList) override;
79 void closeSheetRow() override;
80 void openSheetCell(const librevenge::RVNGPropertyList &propList) override;
81 void closeSheetCell() override;
82
83 void defineChartStyle(const librevenge::RVNGPropertyList &propList) override;
84 void openChart(const librevenge::RVNGPropertyList &propList) override;
85 void closeChart() override;
86 void openChartTextObject(const librevenge::RVNGPropertyList &propList) override;
87 void closeChartTextObject() override;
88 void openChartPlotArea(const librevenge::RVNGPropertyList &propList) override;
89 void closeChartPlotArea() override;
90 void insertChartAxis(const librevenge::RVNGPropertyList &axis) override;
91 void openChartSerie(const librevenge::RVNGPropertyList &series) override;
92 void closeChartSerie() override;
93
94 void defineParagraphStyle(const librevenge::RVNGPropertyList &propList) override;
95 void openParagraph(const librevenge::RVNGPropertyList &propList) override;
96 void closeParagraph() override;
97
98 void defineCharacterStyle(const librevenge::RVNGPropertyList &propList) override;
99 void openSpan(const librevenge::RVNGPropertyList &propList) override;
100 void closeSpan() override;
101
102 void openLink(const librevenge::RVNGPropertyList &propList) override;
103 void closeLink() override;
104
105 void insertTab() override;
106 void insertSpace() override;
107 void insertText(const librevenge::RVNGString &text) override;
108 void insertLineBreak() override;
109 void insertField(const librevenge::RVNGPropertyList &propList) override;
110
111 void openOrderedListLevel(const librevenge::RVNGPropertyList &propList) override;
112 void openUnorderedListLevel(const librevenge::RVNGPropertyList &propList) override;
113 void closeOrderedListLevel() override;
114 void closeUnorderedListLevel() override;
115 void openListElement(const librevenge::RVNGPropertyList &propList) override;
116 void closeListElement() override;
117
118 void openFootnote(const librevenge::RVNGPropertyList &propList) override;
119 void closeFootnote() override;
120
121 void openComment(const librevenge::RVNGPropertyList &propList) override;
122 void closeComment() override;
123 void openTextBox(const librevenge::RVNGPropertyList &propList) override;
124 void closeTextBox() override;
125
126 void openTable(const librevenge::RVNGPropertyList &propList) override;
127 void openTableRow(const librevenge::RVNGPropertyList &propList) override;
128 void closeTableRow() override;
129 void openTableCell(const librevenge::RVNGPropertyList &propList) override;
130 void closeTableCell() override;
131 void insertCoveredTableCell(const librevenge::RVNGPropertyList &propList) override;
132 void closeTable() override;
133
134 void openFrame(const librevenge::RVNGPropertyList &propList) override;
135 void closeFrame() override;
136
137 void insertBinaryObject(const librevenge::RVNGPropertyList &propList) override;
138
139 //
140 // simple Graphic
141 //
142
143 void openGroup(const librevenge::RVNGPropertyList &propList) override;
144 void closeGroup() override;
145
146 void defineGraphicStyle(const librevenge::RVNGPropertyList &propList) override;
147 void drawRectangle(const librevenge::RVNGPropertyList &propList) override;
148 void drawEllipse(const librevenge::RVNGPropertyList &propList) override;
149 void drawPolygon(const librevenge::RVNGPropertyList &propList) override;
150 void drawPolyline(const librevenge::RVNGPropertyList &propList) override;
151 void drawPath(const librevenge::RVNGPropertyList &propList) override;
152 void drawConnector(const librevenge::RVNGPropertyList &propList) override;
153
154 void insertEquation(const librevenge::RVNGPropertyList &) override;
155
162 void registerEmbeddedImageHandler(const librevenge::RVNGString &mimeType, OdfEmbeddedImage imageHandler);
169 void registerEmbeddedObjectHandler(const librevenge::RVNGString &mimeType, OdfEmbeddedObject objectHandler);
170
172 void initStateWith(OdfGenerator const &orig);
173
174 private:
175 OdsGenerator(OdsGenerator const &);
176 OdsGenerator &operator=(OdsGenerator const &);
177
178 OdsGeneratorPrivate *mpImpl;
179 };
180 #endif
181
182 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
OdsGenerator::defineSectionStyle
void defineSectionStyle(const librevenge::RVNGPropertyList &) override
Definition: OdsGenerator.hxx:66
OdsGenerator::definePageStyle
void definePageStyle(const librevenge::RVNGPropertyList &) override
Definition: OdsGenerator.hxx:62
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
OdsGenerator
A generator for text documents.
Definition: OdsGenerator.hxx:43
ODFGENAPI
#define ODFGENAPI
Definition: libodfgen-api.hxx:36
OdfDocumentHandler.hxx
OdsGenerator::mpImpl
OdsGeneratorPrivate * mpImpl
Definition: OdsGenerator.hxx:178
OdfEmbeddedObject
bool(* OdfEmbeddedObject)(const librevenge::RVNGBinaryData &data, OdfDocumentHandler *pHandler, const OdfStreamType streamType)
Handler for embedded objects.
Definition: OdfDocumentHandler.hxx:45