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 <libwpd/libwpd.h>
31 
32 #include "OdfDocumentHandler.hxx"
33 
40 typedef bool (*OdfEmbeddedObject)(const WPXBinaryData &data, OdfDocumentHandler *pHandler, const OdfStreamType streamType);
41 
48 typedef bool (*OdfEmbeddedImage)(const WPXBinaryData &input, WPXBinaryData &output);
49 
50 class OdtGeneratorPrivate;
51 
57 class OdtGenerator : public WPXDocumentInterface
58 {
59 public:
60  OdtGenerator(OdfDocumentHandler *pHandler, const OdfStreamType streamType);
61  ~OdtGenerator();
62 
63  void setDocumentMetaData(const WPXPropertyList &propList);
64  void startDocument();
65  void endDocument();
66 
67  void definePageStyle(const WPXPropertyList &);
68  void openPageSpan(const WPXPropertyList &propList);
69  void closePageSpan();
70 
71  void defineSectionStyle(const WPXPropertyList &, const WPXPropertyListVector &);
72  void openSection(const WPXPropertyList &propList, const WPXPropertyListVector &columns);
73  void closeSection();
74 
75  void openHeader(const WPXPropertyList &propList);
76  void closeHeader();
77  void openFooter(const WPXPropertyList &propList);
78  void closeFooter();
79 
80  void defineParagraphStyle(const WPXPropertyList &, const WPXPropertyListVector &);
81  void openParagraph(const WPXPropertyList &propList, const WPXPropertyListVector &tabStops);
82  void closeParagraph();
83 
84  void defineCharacterStyle(const WPXPropertyList &);
85  void openSpan(const WPXPropertyList &propList);
86  void closeSpan();
87 
88  void insertTab();
89  void insertSpace();
90  void insertText(const WPXString &text);
91  void insertLineBreak();
92  void insertField(const WPXString &type, const WPXPropertyList &propList);
93 
94  void defineOrderedListLevel(const WPXPropertyList &propList);
95  void defineUnorderedListLevel(const WPXPropertyList &propList);
96  void openOrderedListLevel(const WPXPropertyList &propList);
97  void openUnorderedListLevel(const WPXPropertyList &propList);
98  void closeOrderedListLevel();
100  void openListElement(const WPXPropertyList &propList, const WPXPropertyListVector &tabStops);
101  void closeListElement();
102 
103  void openFootnote(const WPXPropertyList &propList);
104  void closeFootnote();
105  void openEndnote(const WPXPropertyList &propList);
106  void closeEndnote();
107  void openComment(const WPXPropertyList &propList);
108  void closeComment();
109  void openTextBox(const WPXPropertyList &propList);
110  void closeTextBox();
111 
112  void openTable(const WPXPropertyList &propList, const WPXPropertyListVector &columns);
113  void openTableRow(const WPXPropertyList &propList);
114  void closeTableRow();
115  void openTableCell(const WPXPropertyList &propList);
116  void closeTableCell();
117  void insertCoveredTableCell(const WPXPropertyList &propList);
118  void closeTable();
119 
120  void openFrame(const WPXPropertyList &propList);
121  void closeFrame();
122 
123  void insertBinaryObject(const WPXPropertyList &propList, const WPXBinaryData &data);
124  void insertEquation(const WPXPropertyList &propList, const WPXString &data);
125 
132  void registerEmbeddedObjectHandler(const WPXString &mimeType, OdfEmbeddedObject objectHandler);
133 
143  void registerEmbeddedImageHandler(const WPXString &mimeType, OdfEmbeddedImage imageHandler);
144 
145 private:
146  OdtGenerator(OdtGenerator const &);
148 
149  OdtGeneratorPrivate *mpImpl;
150 };
151 #endif
152 
153 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
void registerEmbeddedObjectHandler(const WPXString &mimeType, OdfEmbeddedObject objectHandler)
Registers a handler for embedded objects.
void insertCoveredTableCell(const WPXPropertyList &propList)
void openFootnote(const WPXPropertyList &propList)
void definePageStyle(const WPXPropertyList &)
void openFrame(const WPXPropertyList &propList)
void openFooter(const WPXPropertyList &propList)
void openSpan(const WPXPropertyList &propList)
void setDocumentMetaData(const WPXPropertyList &propList)
void closeFooter()
void closeSection()
void startDocument()
OdtGeneratorPrivate * mpImpl
Definition: OdtGenerator.hxx:149
OdtGenerator(OdfDocumentHandler *pHandler, const OdfStreamType streamType)
bool(* OdfEmbeddedImage)(const WPXBinaryData &input, WPXBinaryData &output)
Handler for embedded images.
Definition: OdtGenerator.hxx:48
void openParagraph(const WPXPropertyList &propList, const WPXPropertyListVector &tabStops)
void closePageSpan()
void insertField(const WPXString &type, const WPXPropertyList &propList)
void closeUnorderedListLevel()
XML writer.
Definition: OdfDocumentHandler.hxx:42
void closeEndnote()
void closeSpan()
void insertLineBreak()
void insertTab()
void closeTableRow()
void openTable(const WPXPropertyList &propList, const WPXPropertyListVector &columns)
void insertEquation(const WPXPropertyList &propList, const WPXString &data)
void closeTable()
OdfStreamType
Type of ODF content a generator should produce.
Definition: OdfDocumentHandler.hxx:33
OdtGenerator & operator=(OdtGenerator const &)
void openUnorderedListLevel(const WPXPropertyList &propList)
void registerEmbeddedImageHandler(const WPXString &mimeType, OdfEmbeddedImage imageHandler)
Registers a handler for embedded images.
void closeFrame()
void openComment(const WPXPropertyList &propList)
bool(* OdfEmbeddedObject)(const WPXBinaryData &data, OdfDocumentHandler *pHandler, const OdfStreamType streamType)
Handler for embedded objects.
Definition: OdtGenerator.hxx:40
void closeParagraph()
void openOrderedListLevel(const WPXPropertyList &propList)
void insertText(const WPXString &text)
void closeTableCell()
void closeOrderedListLevel()
void openEndnote(const WPXPropertyList &propList)
void openHeader(const WPXPropertyList &propList)
void insertBinaryObject(const WPXPropertyList &propList, const WPXBinaryData &data)
void closeFootnote()
void openTableRow(const WPXPropertyList &propList)
void openSection(const WPXPropertyList &propList, const WPXPropertyListVector &columns)
void openTextBox(const WPXPropertyList &propList)
A generator for text documents.
Definition: OdtGenerator.hxx:57
void defineUnorderedListLevel(const WPXPropertyList &propList)
void insertSpace()
void defineSectionStyle(const WPXPropertyList &, const WPXPropertyListVector &)
void defineParagraphStyle(const WPXPropertyList &, const WPXPropertyListVector &)
void defineCharacterStyle(const WPXPropertyList &)
void openPageSpan(const WPXPropertyList &propList)
void closeTextBox()
void openTableCell(const WPXPropertyList &propList)
void closeHeader()
void defineOrderedListLevel(const WPXPropertyList &propList)
void closeListElement()
void endDocument()
void closeComment()
void openListElement(const WPXPropertyList &propList, const WPXPropertyListVector &tabStops)

Generated for libodfgen by doxygen 1.8.7