RVNGCSVSpreadsheetGenerator.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
00002 /* librevenge
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 William Lachance (wrlach@gmail.com)
00011  * Copyright (C) 2002-2004 Marc Maurer (uwog@uwog.net)
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 
00021 #ifndef RVNGCSVSPREADSHEETGENERATOR_H
00022 #define RVNGCSVSPREADSHEETGENERATOR_H
00023 
00024 #include "librevenge-generators-api.h"
00025 
00026 #include <librevenge/librevenge.h>
00027 #include <librevenge-stream/librevenge-stream.h>
00028 
00029 namespace librevenge
00030 {
00031 
00032 struct RVNGCSVSpreadsheetGeneratorImpl;
00037 class REVENGE_GENERATORS_API RVNGCSVSpreadsheetGenerator : public RVNGSpreadsheetInterface
00038 {
00040         RVNGCSVSpreadsheetGenerator(const RVNGCSVSpreadsheetGenerator &other);
00042         RVNGCSVSpreadsheetGenerator &operator=(const RVNGCSVSpreadsheetGenerator &other);
00043 
00044 public:
00053         explicit RVNGCSVSpreadsheetGenerator(RVNGStringVector &sheets, bool generateFormula=false);
00055         ~RVNGCSVSpreadsheetGenerator();
00061         void setSeparators(char fieldSep=',', char textSep='"', char decimalSep='.');
00063         void setDTFormats(RVNGString const &date="%m/%d/%y", RVNGString const &time="%H:%M:%S");
00064         void setDocumentMetaData(const RVNGPropertyList &propList);
00065         void defineEmbeddedFont(const RVNGPropertyList &propList);
00066 
00067         void startDocument(const RVNGPropertyList &propList);
00068         void endDocument();
00069 
00070         // sheet
00071         void defineSheetNumberingStyle(const RVNGPropertyList &propList);
00072         void openSheet(const RVNGPropertyList &propList);
00073         void closeSheet();
00074         void openSheetRow(const RVNGPropertyList &propList);
00075         void closeSheetRow();
00076         void openSheetCell(const RVNGPropertyList &propList);
00077         void closeSheetCell();
00078 
00079         // chart
00080         void defineChartStyle(const RVNGPropertyList &propList);
00081         void openChart(const RVNGPropertyList &propList);
00082         void closeChart();
00083         void openChartTextObject(const RVNGPropertyList &propList);
00084         void closeChartTextObject();
00085         void openChartPlotArea(const RVNGPropertyList &propList);
00086         void closeChartPlotArea();
00087         void insertChartAxis(const RVNGPropertyList &axis);
00088         void openChartSerie(const librevenge::RVNGPropertyList &series);
00089         void closeChartSerie();
00090 
00091         void definePageStyle(const RVNGPropertyList &propList);
00092         void openPageSpan(const RVNGPropertyList &propList);
00093         void closePageSpan();
00094         void openHeader(const RVNGPropertyList &propList);
00095         void closeHeader();
00096         void openFooter(const RVNGPropertyList &propList);
00097         void closeFooter();
00098 
00099         void defineParagraphStyle(const RVNGPropertyList &propList);
00100         void openParagraph(const RVNGPropertyList &propList);
00101         void closeParagraph();
00102 
00103         void defineCharacterStyle(const RVNGPropertyList &propList);
00104         void openSpan(const RVNGPropertyList &propList);
00105         void closeSpan();
00106 
00107         void openLink(const RVNGPropertyList &propList);
00108         void closeLink();
00109 
00110         void defineSectionStyle(const RVNGPropertyList &propList);
00111         void openSection(const RVNGPropertyList &propList);
00112         void closeSection();
00113 
00114         void insertTab();
00115         void insertSpace();
00116         void insertText(const RVNGString &text);
00117         void insertLineBreak();
00118         void insertField(const RVNGPropertyList &propList);
00119 
00120         void openOrderedListLevel(const RVNGPropertyList &propList);
00121         void openUnorderedListLevel(const RVNGPropertyList &propList);
00122         void closeOrderedListLevel();
00123         void closeUnorderedListLevel();
00124         void openListElement(const RVNGPropertyList &propList);
00125         void closeListElement();
00126 
00127         void openFootnote(const RVNGPropertyList &propList);
00128         void closeFootnote();
00129         void openEndnote(const RVNGPropertyList &propList);
00130         void closeEndnote();
00131         void openComment(const RVNGPropertyList &propList);
00132         void closeComment();
00133 
00134         void openTextBox(const RVNGPropertyList &propList);
00135         void closeTextBox();
00136 
00137         void openTable(const RVNGPropertyList &propList);
00138         void openTableRow(const RVNGPropertyList &propList);
00139         void closeTableRow();
00140         void openTableCell(const RVNGPropertyList &propList);
00141         void closeTableCell();
00142         void insertCoveredTableCell(const RVNGPropertyList &propList);
00143         void closeTable();
00144 
00145         void openFrame(const RVNGPropertyList &propList);
00146         void closeFrame();
00147 
00148         void insertBinaryObject(const RVNGPropertyList &propList);
00149 
00150         // drawing function
00151         void openGroup(const RVNGPropertyList &propList);
00152         void closeGroup();
00153 
00154         void defineGraphicStyle(const RVNGPropertyList &propList);
00155         void drawRectangle(const RVNGPropertyList &propList);
00156         void drawEllipse(const RVNGPropertyList &propList);
00157         void drawPolygon(const RVNGPropertyList &propList);
00158         void drawPolyline(const RVNGPropertyList &propList);
00159         void drawPath(const RVNGPropertyList &propList);
00160         void drawConnector(const RVNGPropertyList &propList);
00161 
00162         void insertEquation(const RVNGPropertyList &propList);
00163 
00164 private:
00166         RVNGCSVSpreadsheetGeneratorImpl *m_impl;
00167 };
00168 
00169 }
00170 
00171 #endif /* RVNGCSVSPREADSHEETGENERATOR_H */
00172 
00173 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */