OdgGenerator.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) 2006 Ariya Hidayat (ariya@kde.org)
00011  *
00012  * For minor contributions see the git repository.
00013  *
00014  * Alternatively, the contents of this file may be used under the terms
00015  * of the GNU Lesser General Public License Version 2.1 or later
00016  * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
00017  * applicable instead of those above.
00018  *
00019  * For further information visit http://libwpd.sourceforge.net
00020  */
00021 
00022 /* "This product is not manufactured, approved, or supported by
00023  * Corel Corporation or Corel Corporation Limited."
00024  */
00025 #ifndef __ODGGENERATOR_HXX__
00026 #define __ODGGENERATOR_HXX__
00027 
00028 #include <librevenge/librevenge.h>
00029 
00030 #include "libodfgen-api.hxx"
00031 #include "OdfDocumentHandler.hxx"
00032 
00033 class OdfGenerator;
00034 class OdgGeneratorPrivate;
00035 
00041 class ODFGENAPI OdgGenerator : public librevenge::RVNGDrawingInterface
00042 {
00043 public:
00044         OdgGenerator();
00045         ~OdgGenerator();
00046         void addDocumentHandler(OdfDocumentHandler *pHandler, const OdfStreamType streamType);
00047         librevenge::RVNGStringVector getObjectNames() const;
00048         bool getObjectContent(librevenge::RVNGString const &objectName, OdfDocumentHandler *pHandler);
00049         void setDocumentMetaData(const librevenge::RVNGPropertyList &);
00050 
00051         void defineEmbeddedFont(const librevenge::RVNGPropertyList &propList);
00052 
00053         void startPage(const librevenge::RVNGPropertyList &);
00054         void endPage();
00055         void startMasterPage(const librevenge::RVNGPropertyList &);
00056         void endMasterPage();
00057         void startLayer(const ::librevenge::RVNGPropertyList &propList);
00058         void endLayer();
00059         void openGroup(const ::librevenge::RVNGPropertyList &propList);
00060         void closeGroup();
00061         void startEmbeddedGraphics(const ::librevenge::RVNGPropertyList &propList);
00062         void endEmbeddedGraphics();
00063 
00064         void setStyle(const ::librevenge::RVNGPropertyList &propList);
00065 
00066         void drawRectangle(const ::librevenge::RVNGPropertyList &propList);
00067         void drawEllipse(const ::librevenge::RVNGPropertyList &propList);
00068         void drawPolyline(const ::librevenge::RVNGPropertyList &propList);
00069         void drawPolygon(const ::librevenge::RVNGPropertyList &propList);
00070         void drawPath(const ::librevenge::RVNGPropertyList &propList);
00071         void drawGraphicObject(const ::librevenge::RVNGPropertyList &propList);
00072         void drawConnector(const ::librevenge::RVNGPropertyList &propList);
00073 
00074         void startTableObject(const ::librevenge::RVNGPropertyList &propList);
00075         void openTableRow(const ::librevenge::RVNGPropertyList &propList);
00076         void closeTableRow();
00077         void openTableCell(const ::librevenge::RVNGPropertyList &propList);
00078         void closeTableCell();
00079         void insertCoveredTableCell(const ::librevenge::RVNGPropertyList &propList);
00080         void endTableObject();
00081 
00082         void startTextObject(const ::librevenge::RVNGPropertyList &propList);
00083         void endTextObject();
00084 
00085         void defineParagraphStyle(const librevenge::RVNGPropertyList &propList);
00086         void openParagraph(const librevenge::RVNGPropertyList &propList);
00087         void closeParagraph();
00088 
00089         void defineCharacterStyle(const librevenge::RVNGPropertyList &propList);
00090         void openSpan(const librevenge::RVNGPropertyList &propList);
00091         void closeSpan();
00092 
00093         void openLink(const librevenge::RVNGPropertyList &propList);
00094         void closeLink();
00095 
00096         void insertText(const librevenge::RVNGString &text);
00097         void insertTab();
00098         void insertSpace();
00099         void insertLineBreak();
00100         void insertField(const librevenge::RVNGPropertyList &propList);
00101 
00102         void openOrderedListLevel(const librevenge::RVNGPropertyList &propList);
00103         void openUnorderedListLevel(const librevenge::RVNGPropertyList &propList);
00104         void closeOrderedListLevel();
00105         void closeUnorderedListLevel();
00106         void openListElement(const librevenge::RVNGPropertyList &propList);
00107         void closeListElement();
00108 
00109         void startDocument(const librevenge::RVNGPropertyList &);
00110         void endDocument();
00111 
00118         void registerEmbeddedImageHandler(const librevenge::RVNGString &mimeType, OdfEmbeddedImage imageHandler);
00125         void registerEmbeddedObjectHandler(const librevenge::RVNGString &mimeType, OdfEmbeddedObject objectHandler);
00126 
00128         void initStateWith(OdfGenerator const &orig);
00129 private:
00130         OdgGenerator(OdgGenerator const &);
00131         OdgGenerator &operator=(OdgGenerator const &);
00132 
00133         OdgGeneratorPrivate *mpImpl;
00134 };
00135 
00136 #endif // __ODGGENERATOR_HXX__
00137 
00138 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */