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
35class OdtGeneratorPrivate;
36class OdfGenerator;
37
43 class ODFGENAPI OdtGenerator : public librevenge::RVNGTextInterface
44{
45public:
46 OdtGenerator();
47 ~OdtGenerator() override;
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) override;
53 void startDocument(const librevenge::RVNGPropertyList &) override;
54 void endDocument() override;
55
56 void defineEmbeddedFont(const librevenge::RVNGPropertyList &propList) override;
57
58 void definePageStyle(const librevenge::RVNGPropertyList &) override;
59 void openPageSpan(const librevenge::RVNGPropertyList &propList) override;
60 void closePageSpan() override;
61
62 void defineSectionStyle(const librevenge::RVNGPropertyList &) override;
63 void openSection(const librevenge::RVNGPropertyList &propList) override;
64 void closeSection() override;
65
66 void openHeader(const librevenge::RVNGPropertyList &propList) override;
67 void closeHeader() override;
68 void openFooter(const librevenge::RVNGPropertyList &propList) override;
69 void closeFooter() override;
70
71 void defineParagraphStyle(const librevenge::RVNGPropertyList &propList) override;
72 void openParagraph(const librevenge::RVNGPropertyList &propList) override;
73 void closeParagraph() override;
74
75 void defineCharacterStyle(const librevenge::RVNGPropertyList &propList) override;
76 void openSpan(const librevenge::RVNGPropertyList &propList) override;
77 void closeSpan() override;
78
79 void openLink(const librevenge::RVNGPropertyList &propList) override;
80 void closeLink() override;
81
82 void insertTab() override;
83 void insertSpace() override;
84 void insertText(const librevenge::RVNGString &text) override;
85 void insertLineBreak() override;
86 void insertField(const librevenge::RVNGPropertyList &propList) override;
87
88 void openOrderedListLevel(const librevenge::RVNGPropertyList &propList) override;
89 void openUnorderedListLevel(const librevenge::RVNGPropertyList &propList) override;
90 void closeOrderedListLevel() override;
91 void closeUnorderedListLevel() override;
92 void openListElement(const librevenge::RVNGPropertyList &propList) override;
93 void closeListElement() override;
94
95 void openFootnote(const librevenge::RVNGPropertyList &propList) override;
96 void closeFootnote() override;
97 void openEndnote(const librevenge::RVNGPropertyList &propList) override;
98 void closeEndnote() override;
99 void openComment(const librevenge::RVNGPropertyList &propList) override;
100 void closeComment() override;
101 void openTextBox(const librevenge::RVNGPropertyList &propList) override;
102 void closeTextBox() override;
103
104 void openTable(const librevenge::RVNGPropertyList &propList) override;
105 void openTableRow(const librevenge::RVNGPropertyList &propList) override;
106 void closeTableRow() override;
107 void openTableCell(const librevenge::RVNGPropertyList &propList) override;
108 void closeTableCell() override;
109 void insertCoveredTableCell(const librevenge::RVNGPropertyList &propList) override;
110 void closeTable() override;
111
112 //
113 // simple Graphic
114 //
115
116 void openGroup(const librevenge::RVNGPropertyList &propList) override;
117 void closeGroup() override;
118
119 void defineGraphicStyle(const librevenge::RVNGPropertyList &propList) override;
120 void drawRectangle(const librevenge::RVNGPropertyList &propList) override;
121 void drawEllipse(const librevenge::RVNGPropertyList &propList) override;
122 void drawPolygon(const librevenge::RVNGPropertyList &propList) override;
123 void drawPolyline(const librevenge::RVNGPropertyList &propList) override;
124 void drawPath(const librevenge::RVNGPropertyList &propList) override;
125 void drawConnector(const librevenge::RVNGPropertyList &propList) override;
126
127 void openFrame(const librevenge::RVNGPropertyList &propList) override;
128 void closeFrame() override;
129
130 void insertBinaryObject(const librevenge::RVNGPropertyList &propList) override;
131 void insertEquation(const librevenge::RVNGPropertyList &propList) override;
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
154private:
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: */
OdfDocumentHandler.hxx
OdfStreamType
OdfStreamType
Type of ODF content a generator should produce.
Definition OdfDocumentHandler.hxx:35
OdfEmbeddedObject
bool(* OdfEmbeddedObject)(const librevenge::RVNGBinaryData &data, OdfDocumentHandler *pHandler, const OdfStreamType streamType)
Handler for embedded objects.
Definition OdfDocumentHandler.hxx:45
OdfEmbeddedImage
bool(* OdfEmbeddedImage)(const librevenge::RVNGBinaryData &input, librevenge::RVNGBinaryData &output)
Handler for embedded images.
Definition OdfDocumentHandler.hxx:56
OdfDocumentHandler
XML writer.
Definition OdfDocumentHandler.hxx:66
OdtGenerator::openTableRow
void openTableRow(const librevenge::RVNGPropertyList &propList) override
OdtGenerator::openHeader
void openHeader(const librevenge::RVNGPropertyList &propList) override
OdtGenerator::defineCharacterStyle
void defineCharacterStyle(const librevenge::RVNGPropertyList &propList) override
OdtGenerator::getObjectContent
bool getObjectContent(librevenge::RVNGString const &objectName, OdfDocumentHandler *pHandler)
OdtGenerator::registerEmbeddedImageHandler
void registerEmbeddedImageHandler(const librevenge::RVNGString &mimeType, OdfEmbeddedImage imageHandler)
Registers a handler for embedded images.
OdtGenerator::closeLink
void closeLink() override
OdtGenerator::~OdtGenerator
~OdtGenerator() override
OdtGenerator::closeTableCell
void closeTableCell() override
OdtGenerator::drawConnector
void drawConnector(const librevenge::RVNGPropertyList &propList) override
OdtGenerator::insertEquation
void insertEquation(const librevenge::RVNGPropertyList &propList) override
OdtGenerator::drawPolygon
void drawPolygon(const librevenge::RVNGPropertyList &propList) override
OdtGenerator::closeSpan
void closeSpan() override
OdtGenerator::closeUnorderedListLevel
void closeUnorderedListLevel() override
OdtGenerator::closePageSpan
void closePageSpan() override
OdtGenerator::getObjectNames
librevenge::RVNGStringVector getObjectNames() const
OdtGenerator::openSpan
void openSpan(const librevenge::RVNGPropertyList &propList) override
OdtGenerator::openFooter
void openFooter(const librevenge::RVNGPropertyList &propList) override
OdtGenerator::defineParagraphStyle
void defineParagraphStyle(const librevenge::RVNGPropertyList &propList) override
OdtGenerator::openParagraph
void openParagraph(const librevenge::RVNGPropertyList &propList) override
OdtGenerator::insertBinaryObject
void insertBinaryObject(const librevenge::RVNGPropertyList &propList) override
OdtGenerator::closeEndnote
void closeEndnote() override
OdtGenerator::setDocumentMetaData
void setDocumentMetaData(const librevenge::RVNGPropertyList &propList) override
OdtGenerator::insertLineBreak
void insertLineBreak() override
OdtGenerator::closeComment
void closeComment() override
OdtGenerator::openLink
void openLink(const librevenge::RVNGPropertyList &propList) override
OdtGenerator::openGroup
void openGroup(const librevenge::RVNGPropertyList &propList) override
OdtGenerator::insertField
void insertField(const librevenge::RVNGPropertyList &propList) override
OdtGenerator::drawEllipse
void drawEllipse(const librevenge::RVNGPropertyList &propList) override
OdtGenerator::drawPath
void drawPath(const librevenge::RVNGPropertyList &propList) override
OdtGenerator::closeFootnote
void closeFootnote() override
OdtGenerator::OdtGenerator
OdtGenerator(OdtGenerator const &)
OdtGenerator::closeFrame
void closeFrame() override
OdtGenerator::openOrderedListLevel
void openOrderedListLevel(const librevenge::RVNGPropertyList &propList) override
OdtGenerator::closeListElement
void closeListElement() override
OdtGenerator::openPageSpan
void openPageSpan(const librevenge::RVNGPropertyList &propList) override
OdtGenerator::openUnorderedListLevel
void openUnorderedListLevel(const librevenge::RVNGPropertyList &propList) override
OdtGenerator::registerEmbeddedObjectHandler
void registerEmbeddedObjectHandler(const librevenge::RVNGString &mimeType, OdfEmbeddedObject objectHandler)
Registers a handler for embedded objects.
OdtGenerator::defineGraphicStyle
void defineGraphicStyle(const librevenge::RVNGPropertyList &propList) override
OdtGenerator::openEndnote
void openEndnote(const librevenge::RVNGPropertyList &propList) override
OdtGenerator::openFootnote
void openFootnote(const librevenge::RVNGPropertyList &propList) override
OdtGenerator::closeTableRow
void closeTableRow() override
OdtGenerator::insertTab
void insertTab() override
OdtGenerator::openSection
void openSection(const librevenge::RVNGPropertyList &propList) override
OdtGenerator::endDocument
void endDocument() override
OdtGenerator::closeTable
void closeTable() override
OdtGenerator::openFrame
void openFrame(const librevenge::RVNGPropertyList &propList) override
OdtGenerator::openComment
void openComment(const librevenge::RVNGPropertyList &propList) override
OdtGenerator::mpImpl
OdtGeneratorPrivate * mpImpl
Definition OdtGenerator.hxx:158
OdtGenerator::insertSpace
void insertSpace() override
OdtGenerator::closeParagraph
void closeParagraph() override
OdtGenerator::drawRectangle
void drawRectangle(const librevenge::RVNGPropertyList &propList) override
OdtGenerator::openTextBox
void openTextBox(const librevenge::RVNGPropertyList &propList) override
OdtGenerator::closeSection
void closeSection() override
OdtGenerator::insertCoveredTableCell
void insertCoveredTableCell(const librevenge::RVNGPropertyList &propList) override
OdtGenerator::operator=
OdtGenerator & operator=(OdtGenerator const &)
OdtGenerator::closeOrderedListLevel
void closeOrderedListLevel() override
OdtGenerator::addDocumentHandler
void addDocumentHandler(OdfDocumentHandler *pHandler, const OdfStreamType streamType)
OdtGenerator::defineSectionStyle
void defineSectionStyle(const librevenge::RVNGPropertyList &) override
OdtGenerator::closeHeader
void closeHeader() override
OdtGenerator::openTableCell
void openTableCell(const librevenge::RVNGPropertyList &propList) override
OdtGenerator::defineEmbeddedFont
void defineEmbeddedFont(const librevenge::RVNGPropertyList &propList) override
OdtGenerator::initStateWith
void initStateWith(OdfGenerator const &orig)
retrieve data from another odfgenerator ( the list and the embedded handler)
OdtGenerator::OdtGenerator
OdtGenerator()
OdtGenerator::closeFooter
void closeFooter() override
OdtGenerator::startDocument
void startDocument(const librevenge::RVNGPropertyList &) override
OdtGenerator::openListElement
void openListElement(const librevenge::RVNGPropertyList &propList) override
OdtGenerator::insertText
void insertText(const librevenge::RVNGString &text) override
OdtGenerator::drawPolyline
void drawPolyline(const librevenge::RVNGPropertyList &propList) override
OdtGenerator::closeTextBox
void closeTextBox() override
OdtGenerator::closeGroup
void closeGroup() override
OdtGenerator::openTable
void openTable(const librevenge::RVNGPropertyList &propList) override
OdtGenerator::definePageStyle
void definePageStyle(const librevenge::RVNGPropertyList &) override
libodfgen-api.hxx
ODFGENAPI
#define ODFGENAPI
Definition libodfgen-api.hxx:36