OdsGenerator.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 _ODSGENERATOR_HXX_
00028 #define _ODSGENERATOR_HXX_
00029 
00030 #include <librevenge/librevenge.h>
00031 
00032 #include "libodfgen-api.hxx"
00033 #include "OdfDocumentHandler.hxx"
00034 
00035 class OdfGenerator;
00036 class OdsGeneratorPrivate;
00037 
00043 class ODFGENAPI OdsGenerator : public librevenge::RVNGSpreadsheetInterface
00044 {
00045 public:
00046         OdsGenerator();
00047         ~OdsGenerator();
00048 
00050         void addDocumentHandler(OdfDocumentHandler *pHandler, const OdfStreamType streamType);
00052         librevenge::RVNGStringVector getObjectNames() const;
00054         bool getObjectContent(librevenge::RVNGString const &objectName, OdfDocumentHandler *pHandler);
00055 
00056         void setDocumentMetaData(const librevenge::RVNGPropertyList &propList);
00057         void startDocument(const librevenge::RVNGPropertyList &);
00058         void endDocument();
00059 
00060         void defineEmbeddedFont(const librevenge::RVNGPropertyList &propList);
00061 
00062         void definePageStyle(const librevenge::RVNGPropertyList &) {}
00063         void openPageSpan(const librevenge::RVNGPropertyList &propList);
00064         void closePageSpan();
00065 
00066         void defineSectionStyle(const librevenge::RVNGPropertyList &) {}
00067         void openSection(const librevenge::RVNGPropertyList &propList);
00068         void closeSection();
00069 
00070         void openHeader(const librevenge::RVNGPropertyList &propList);
00071         void closeHeader();
00072         void openFooter(const librevenge::RVNGPropertyList &propList);
00073         void closeFooter();
00074 
00075         void defineSheetNumberingStyle(const librevenge::RVNGPropertyList &propList);
00076         void openSheet(const librevenge::RVNGPropertyList &propList);
00077         void closeSheet();
00078         void openSheetRow(const librevenge::RVNGPropertyList &propList);
00079         void closeSheetRow();
00080         void openSheetCell(const librevenge::RVNGPropertyList &propList);
00081         void closeSheetCell();
00082 
00083         void defineChartStyle(const librevenge::RVNGPropertyList &propList);
00084         void openChart(const librevenge::RVNGPropertyList &propList);
00085         void closeChart();
00086         void openChartTextObject(const librevenge::RVNGPropertyList &propList);
00087         void closeChartTextObject();
00088         void openChartPlotArea(const librevenge::RVNGPropertyList &propList);
00089         void closeChartPlotArea();
00090         void insertChartAxis(const librevenge::RVNGPropertyList &axis);
00091         void openChartSerie(const librevenge::RVNGPropertyList &series);
00092         void closeChartSerie();
00093 
00094         void defineParagraphStyle(const librevenge::RVNGPropertyList &propList);
00095         void openParagraph(const librevenge::RVNGPropertyList &propList);
00096         void closeParagraph();
00097 
00098         void defineCharacterStyle(const librevenge::RVNGPropertyList &propList);
00099         void openSpan(const librevenge::RVNGPropertyList &propList);
00100         void closeSpan();
00101 
00102         void openLink(const librevenge::RVNGPropertyList &propList);
00103         void closeLink();
00104 
00105         void insertTab();
00106         void insertSpace();
00107         void insertText(const librevenge::RVNGString &text);
00108         void insertLineBreak();
00109         void insertField(const librevenge::RVNGPropertyList &propList);
00110 
00111         void openOrderedListLevel(const librevenge::RVNGPropertyList &propList);
00112         void openUnorderedListLevel(const librevenge::RVNGPropertyList &propList);
00113         void closeOrderedListLevel();
00114         void closeUnorderedListLevel();
00115         void openListElement(const librevenge::RVNGPropertyList &propList);
00116         void closeListElement();
00117 
00118         void openFootnote(const librevenge::RVNGPropertyList &propList);
00119         void closeFootnote();
00120 
00121         void openComment(const librevenge::RVNGPropertyList &propList);
00122         void closeComment();
00123         void openTextBox(const librevenge::RVNGPropertyList &propList);
00124         void closeTextBox();
00125 
00126         void openTable(const librevenge::RVNGPropertyList &propList);
00127         void openTableRow(const librevenge::RVNGPropertyList &propList);
00128         void closeTableRow();
00129         void openTableCell(const librevenge::RVNGPropertyList &propList);
00130         void closeTableCell();
00131         void insertCoveredTableCell(const librevenge::RVNGPropertyList &propList);
00132         void closeTable();
00133 
00134         void openFrame(const librevenge::RVNGPropertyList &propList);
00135         void closeFrame();
00136 
00137         void insertBinaryObject(const librevenge::RVNGPropertyList &propList);
00138 
00139         //
00140         // simple Graphic
00141         //
00142 
00143         void openGroup(const librevenge::RVNGPropertyList &propList);
00144         void closeGroup();
00145 
00146         void defineGraphicStyle(const librevenge::RVNGPropertyList &propList);
00147         void drawRectangle(const librevenge::RVNGPropertyList &propList);
00148         void drawEllipse(const librevenge::RVNGPropertyList &propList);
00149         void drawPolygon(const librevenge::RVNGPropertyList &propList);
00150         void drawPolyline(const librevenge::RVNGPropertyList &propList);
00151         void drawPath(const librevenge::RVNGPropertyList &propList);
00152         void drawConnector(const librevenge::RVNGPropertyList &propList);
00153 
00154         void insertEquation(const librevenge::RVNGPropertyList &) {}
00155 
00162         void registerEmbeddedImageHandler(const librevenge::RVNGString &mimeType, OdfEmbeddedImage imageHandler);
00169         void registerEmbeddedObjectHandler(const librevenge::RVNGString &mimeType, OdfEmbeddedObject objectHandler);
00170 
00172         void initStateWith(OdfGenerator const &orig);
00173 
00174 private:
00175         OdsGenerator(OdsGenerator const &);
00176         OdsGenerator &operator=(OdsGenerator const &);
00177 
00178         OdsGeneratorPrivate *mpImpl;
00179 };
00180 #endif
00181 
00182 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */