OdtGenerator.hxx
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
00002 /* libodfgen
00003  * Version: MPL 2.0 / LGPLv2.1+
00004  *
00005  * This Source Code Form is subject to the terms of the Mozilla Public
00006  * License, v. 2.0. If a copy of the MPL was not distributed with this
00007  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
00008  *
00009  * Major Contributor(s):
00010  * Copyright (C) 2002-2004 William Lachance (wrlach@gmail.com)
00011  * Copyright (C) 2004 Fridrich Strba (fridrich.strba@bluewin.ch)
00012  *
00013  * For minor contributions see the git repository.
00014  *
00015  * Alternatively, the contents of this file may be used under the terms
00016  * of the GNU Lesser General Public License Version 2.1 or later
00017  * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
00018  * applicable instead of those above.
00019  *
00020  * For further information visit http://libwpd.sourceforge.net
00021  */
00022 
00023 /* "This product is not manufactured, approved, or supported by
00024  * Corel Corporation or Corel Corporation Limited."
00025  */
00026 
00027 #ifndef _ODTGENERATOR_HXX_
00028 #define _ODTGENERATOR_HXX_
00029 
00030 #include <librevenge/librevenge.h>
00031 
00032 #include "libodfgen-api.hxx"
00033 #include "OdfDocumentHandler.hxx"
00034 
00035 class OdtGeneratorPrivate;
00036 class OdfGenerator;
00037 
00043 class ODFGENAPI OdtGenerator : public librevenge::RVNGTextInterface
00044 {
00045 public:
00046         OdtGenerator();
00047         ~OdtGenerator();
00048         void addDocumentHandler(OdfDocumentHandler *pHandler, const OdfStreamType streamType);
00049         librevenge::RVNGStringVector getObjectNames() const;
00050         bool getObjectContent(librevenge::RVNGString const &objectName, OdfDocumentHandler *pHandler);
00051 
00052         void setDocumentMetaData(const librevenge::RVNGPropertyList &propList);
00053         void startDocument(const librevenge::RVNGPropertyList &);
00054         void endDocument();
00055 
00056         void defineEmbeddedFont(const librevenge::RVNGPropertyList &propList);
00057 
00058         void definePageStyle(const librevenge::RVNGPropertyList &);
00059         void openPageSpan(const librevenge::RVNGPropertyList &propList);
00060         void closePageSpan();
00061 
00062         void defineSectionStyle(const librevenge::RVNGPropertyList &);
00063         void openSection(const librevenge::RVNGPropertyList &propList);
00064         void closeSection();
00065 
00066         void openHeader(const librevenge::RVNGPropertyList &propList);
00067         void closeHeader();
00068         void openFooter(const librevenge::RVNGPropertyList &propList);
00069         void closeFooter();
00070 
00071         void defineParagraphStyle(const librevenge::RVNGPropertyList &propList);
00072         void openParagraph(const librevenge::RVNGPropertyList &propList);
00073         void closeParagraph();
00074 
00075         void defineCharacterStyle(const librevenge::RVNGPropertyList &propList);
00076         void openSpan(const librevenge::RVNGPropertyList &propList);
00077         void closeSpan();
00078 
00079         void openLink(const librevenge::RVNGPropertyList &propList);
00080         void closeLink();
00081 
00082         void insertTab();
00083         void insertSpace();
00084         void insertText(const librevenge::RVNGString &text);
00085         void insertLineBreak();
00086         void insertField(const librevenge::RVNGPropertyList &propList);
00087 
00088         void openOrderedListLevel(const librevenge::RVNGPropertyList &propList);
00089         void openUnorderedListLevel(const librevenge::RVNGPropertyList &propList);
00090         void closeOrderedListLevel();
00091         void closeUnorderedListLevel();
00092         void openListElement(const librevenge::RVNGPropertyList &propList);
00093         void closeListElement();
00094 
00095         void openFootnote(const librevenge::RVNGPropertyList &propList);
00096         void closeFootnote();
00097         void openEndnote(const librevenge::RVNGPropertyList &propList);
00098         void closeEndnote();
00099         void openComment(const librevenge::RVNGPropertyList &propList);
00100         void closeComment();
00101         void openTextBox(const librevenge::RVNGPropertyList &propList);
00102         void closeTextBox();
00103 
00104         void openTable(const librevenge::RVNGPropertyList &propList);
00105         void openTableRow(const librevenge::RVNGPropertyList &propList);
00106         void closeTableRow();
00107         void openTableCell(const librevenge::RVNGPropertyList &propList);
00108         void closeTableCell();
00109         void insertCoveredTableCell(const librevenge::RVNGPropertyList &propList);
00110         void closeTable();
00111 
00112         //
00113         // simple Graphic
00114         //
00115 
00116         void openGroup(const librevenge::RVNGPropertyList &propList);
00117         void closeGroup();
00118 
00119         void defineGraphicStyle(const librevenge::RVNGPropertyList &propList);
00120         void drawRectangle(const librevenge::RVNGPropertyList &propList);
00121         void drawEllipse(const librevenge::RVNGPropertyList &propList);
00122         void drawPolygon(const librevenge::RVNGPropertyList &propList);
00123         void drawPolyline(const librevenge::RVNGPropertyList &propList);
00124         void drawPath(const librevenge::RVNGPropertyList &propList);
00125         void drawConnector(const librevenge::RVNGPropertyList &propList);
00126 
00127         void openFrame(const librevenge::RVNGPropertyList &propList);
00128         void closeFrame();
00129 
00130         void insertBinaryObject(const librevenge::RVNGPropertyList &propList);
00131         void insertEquation(const librevenge::RVNGPropertyList &propList);
00132 
00139         void registerEmbeddedObjectHandler(const librevenge::RVNGString &mimeType, OdfEmbeddedObject objectHandler);
00140 
00150         void registerEmbeddedImageHandler(const librevenge::RVNGString &mimeType, OdfEmbeddedImage imageHandler);
00152         void initStateWith(OdfGenerator const &orig);
00153 
00154 private:
00155         OdtGenerator(OdtGenerator const &);
00156         OdtGenerator &operator=(OdtGenerator const &);
00157 
00158         OdtGeneratorPrivate *mpImpl;
00159 };
00160 #endif
00161 
00162 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */