OdgGenerator.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) 2006 Ariya Hidayat (ariya@kde.org)
11 *
12 * For minor contributions see the git repository.
13 *
14 * Alternatively, the contents of this file may be used under the terms
15 * of the GNU Lesser General Public License Version 2.1 or later
16 * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
17 * applicable instead of those above.
18 *
19 * For further information visit http://libwpd.sourceforge.net
20 */
21
22 /* "This product is not manufactured, approved, or supported by
23 * Corel Corporation or Corel Corporation Limited."
24 */
25 #ifndef __ODGGENERATOR_HXX__
26 #define __ODGGENERATOR_HXX__
27
28 #include <librevenge/librevenge.h>
29
30 #include "libodfgen-api.hxx"
31 #include "OdfDocumentHandler.hxx"
32
33 class OdfGenerator;
34 class OdgGeneratorPrivate;
35
41 class ODFGENAPI OdgGenerator : public librevenge::RVNGDrawingInterface
42 {
43 public:
44 OdgGenerator();
45 ~OdgGenerator() override;
46 void addDocumentHandler(OdfDocumentHandler *pHandler, const OdfStreamType streamType);
47 librevenge::RVNGStringVector getObjectNames() const;
48 bool getObjectContent(librevenge::RVNGString const &objectName, OdfDocumentHandler *pHandler);
49 void setDocumentMetaData(const librevenge::RVNGPropertyList &) override;
50
51 void defineEmbeddedFont(const librevenge::RVNGPropertyList &propList) override;
52
53 void startPage(const librevenge::RVNGPropertyList &) override;
54 void endPage() override;
55 void startMasterPage(const librevenge::RVNGPropertyList &) override;
56 void endMasterPage() override;
57 void startLayer(const ::librevenge::RVNGPropertyList &propList) override;
58 void endLayer() override;
59 void openGroup(const ::librevenge::RVNGPropertyList &propList) override;
60 void closeGroup() override;
61 void startEmbeddedGraphics(const ::librevenge::RVNGPropertyList &propList) override;
62 void endEmbeddedGraphics() override;
63
64 void setStyle(const ::librevenge::RVNGPropertyList &propList) override;
65
66 void drawRectangle(const ::librevenge::RVNGPropertyList &propList) override;
67 void drawEllipse(const ::librevenge::RVNGPropertyList &propList) override;
68 void drawPolyline(const ::librevenge::RVNGPropertyList &propList) override;
69 void drawPolygon(const ::librevenge::RVNGPropertyList &propList) override;
70 void drawPath(const ::librevenge::RVNGPropertyList &propList) override;
71 void drawGraphicObject(const ::librevenge::RVNGPropertyList &propList) override;
72 void drawConnector(const ::librevenge::RVNGPropertyList &propList) override;
73
74 void startTableObject(const ::librevenge::RVNGPropertyList &propList) override;
75 void openTableRow(const ::librevenge::RVNGPropertyList &propList) override;
76 void closeTableRow() override;
77 void openTableCell(const ::librevenge::RVNGPropertyList &propList) override;
78 void closeTableCell() override;
79 void insertCoveredTableCell(const ::librevenge::RVNGPropertyList &propList) override;
80 void endTableObject() override;
81
82 void startTextObject(const ::librevenge::RVNGPropertyList &propList) override;
83 void endTextObject() override;
84
85 void defineParagraphStyle(const librevenge::RVNGPropertyList &propList) override;
86 void openParagraph(const librevenge::RVNGPropertyList &propList) override;
87 void closeParagraph() override;
88
89 void defineCharacterStyle(const librevenge::RVNGPropertyList &propList) override;
90 void openSpan(const librevenge::RVNGPropertyList &propList) override;
91 void closeSpan() override;
92
93 void openLink(const librevenge::RVNGPropertyList &propList) override;
94 void closeLink() override;
95
96 void insertText(const librevenge::RVNGString &text) override;
97 void insertTab() override;
98 void insertSpace() override;
99 void insertLineBreak() override;
100 void insertField(const librevenge::RVNGPropertyList &propList) override;
101
102 void openOrderedListLevel(const librevenge::RVNGPropertyList &propList) override;
103 void openUnorderedListLevel(const librevenge::RVNGPropertyList &propList) override;
104 void closeOrderedListLevel() override;
105 void closeUnorderedListLevel() override;
106 void openListElement(const librevenge::RVNGPropertyList &propList) override;
107 void closeListElement() override;
108
109 void startDocument(const librevenge::RVNGPropertyList &) override;
110 void endDocument() override;
111
118 void registerEmbeddedImageHandler(const librevenge::RVNGString &mimeType, OdfEmbeddedImage imageHandler);
125 void registerEmbeddedObjectHandler(const librevenge::RVNGString &mimeType, OdfEmbeddedObject objectHandler);
126
128 void initStateWith(OdfGenerator const &orig);
129 private:
130 OdgGenerator(OdgGenerator const &);
131 OdgGenerator &operator=(OdgGenerator const &);
132
133 OdgGeneratorPrivate *mpImpl;
134 };
135
136 #endif // __ODGGENERATOR_HXX__
137
138 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
OdgGenerator
A generator for vector drawings.
Definition: OdgGenerator.hxx:41
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
OdfDocumentHandler.hxx
OdfEmbeddedObject
bool(* OdfEmbeddedObject)(const librevenge::RVNGBinaryData &data, OdfDocumentHandler *pHandler, const OdfStreamType streamType)
Handler for embedded objects.
Definition: OdfDocumentHandler.hxx:45
OdgGenerator::mpImpl
OdgGeneratorPrivate * mpImpl
Definition: OdgGenerator.hxx:133