STOFFSpreadsheetEncoder.hxx
Go to the documentation of this file.
00001 /* -*- Mode: C++; c-default-style: "k&r"; indent-tabs-mode: nil; tab-width: 2; c-basic-offset: 2 -*- */
00002 
00003 /* libstaroffice
00004 * Version: MPL 2.0 / LGPLv2+
00005 *
00006 * The contents of this file are subject to the Mozilla Public License Version
00007 * 2.0 (the "License"); you may not use this file except in compliance with
00008 * the License or as specified alternatively below. You may obtain a copy of
00009 * the License at http://www.mozilla.org/MPL/
00010 *
00011 * Software distributed under the License is distributed on an "AS IS" basis,
00012 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00013 * for the specific language governing rights and limitations under the
00014 * License.
00015 *
00016 * Major Contributor(s):
00017 * Copyright (C) 2006 Ariya Hidayat (ariya@kde.org)
00018 * Copyright (C) 2004 Marc Oude Kotte (marc@solcon.nl)
00019 * Copyright (C) 2002 William Lachance (wrlach@gmail.com)
00020 * Copyright (C) 2002,2004 Marc Maurer (uwog@uwog.net)
00021 * Copyright (C) 2004-2006 Fridrich Strba (fridrich.strba@bluewin.ch)
00022 * Copyright (C) 2006, 2007 Andrew Ziem
00023 * Copyright (C) 2011, 2012 Alonso Laurent (alonso@loria.fr)
00024 *
00025 *
00026 * All Rights Reserved.
00027 *
00028 * For minor contributions see the git repository.
00029 *
00030 * Alternatively, the contents of this file may be used under the terms of
00031 * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
00032 * in which case the provisions of the LGPLv2+ are applicable
00033 * instead of those above.
00034 */
00035 
00036 #ifndef STOFF_SPREADSHEET_ENCODER_HXX
00037 #define STOFF_SPREADSHEET_ENCODER_HXX
00038 
00039 #include <librevenge/librevenge.h>
00040 #include "libstaroffice_internal.hxx"
00041 
00042 class STOFFPropertyHandlerEncoder;
00043 
00044 namespace STOFFSpreadsheetEncoderInternal
00045 {
00046 struct State;
00047 }
00055 class STOFFSpreadsheetEncoder : public librevenge::RVNGSpreadsheetInterface
00056 {
00057 public:
00059   STOFFSpreadsheetEncoder();
00061   ~STOFFSpreadsheetEncoder();
00063   bool getBinaryResult(STOFFEmbeddedObject &object);
00064 
00065   void setDocumentMetaData(const librevenge::RVNGPropertyList &propList);
00066 
00067   void startDocument(const librevenge::RVNGPropertyList &propList);
00068   void endDocument();
00069 
00070   void definePageStyle(const librevenge::RVNGPropertyList &propList);
00071   void defineEmbeddedFont(const librevenge::RVNGPropertyList &propList);
00072 
00073   void openPageSpan(const librevenge::RVNGPropertyList &propList);
00074   void closePageSpan();
00075 
00076   void openHeader(const librevenge::RVNGPropertyList &propList);
00077   void closeHeader();
00078 
00079   void openFooter(const librevenge::RVNGPropertyList &propList);
00080   void closeFooter();
00081 
00082   void defineSheetNumberingStyle(const librevenge::RVNGPropertyList &propList);
00083   void openSheet(const librevenge::RVNGPropertyList &propList);
00084   void closeSheet();
00085   void openSheetRow(const librevenge::RVNGPropertyList &propList);
00086   void closeSheetRow();
00087   void openSheetCell(const librevenge::RVNGPropertyList &propList);
00088   void closeSheetCell();
00089 
00090   void defineChartStyle(const librevenge::RVNGPropertyList &propList);
00091 
00092   void openChart(const librevenge::RVNGPropertyList &propList);
00093   void closeChart();
00094 
00095   void openChartTextObject(const librevenge::RVNGPropertyList &propList);
00096   void closeChartTextObject();
00097 
00098   void openChartPlotArea(const librevenge::RVNGPropertyList &propList);
00099   void closeChartPlotArea();
00100   void insertChartAxis(const librevenge::RVNGPropertyList &axis);
00101   void openChartSerie(const librevenge::RVNGPropertyList &series);
00102   void closeChartSerie();
00103 
00104   void defineParagraphStyle(const librevenge::RVNGPropertyList &propList);
00105 
00106   void openParagraph(const librevenge::RVNGPropertyList &propList);
00107   void closeParagraph();
00108 
00109   void defineCharacterStyle(const librevenge::RVNGPropertyList &propList);
00110 
00111   void openSpan(const librevenge::RVNGPropertyList &propList);
00112   void closeSpan();
00113   void openLink(const librevenge::RVNGPropertyList &propList);
00114   void closeLink();
00115 
00116   void defineSectionStyle(const librevenge::RVNGPropertyList &propList);
00117 
00118   void openSection(const librevenge::RVNGPropertyList &propList);
00119   void closeSection();
00120 
00121   void insertTab();
00122   void insertSpace();
00123   void insertText(const librevenge::RVNGString &text);
00124   void insertLineBreak();
00125 
00126   void insertField(const librevenge::RVNGPropertyList &propList);
00127 
00128   void openOrderedListLevel(const librevenge::RVNGPropertyList &propList);
00129   void openUnorderedListLevel(const librevenge::RVNGPropertyList &propList);
00130   void closeOrderedListLevel();
00131   void closeUnorderedListLevel();
00132   void openListElement(const librevenge::RVNGPropertyList &propList);
00133   void closeListElement();
00134 
00135   void openFootnote(const librevenge::RVNGPropertyList &propList);
00136   void closeFootnote();
00137 
00138   void openComment(const librevenge::RVNGPropertyList &propList);
00139   void closeComment();
00140 
00141   void openFrame(const librevenge::RVNGPropertyList &propList);
00142   void closeFrame();
00143   void insertBinaryObject(const librevenge::RVNGPropertyList &propList);
00144 
00145   //
00146   // specific text/table
00147   //
00148 
00149   void openTextBox(const librevenge::RVNGPropertyList &propList);
00150   void closeTextBox();
00151 
00152   void openTable(const librevenge::RVNGPropertyList &propList);
00153   void closeTable();
00154   void openTableRow(const librevenge::RVNGPropertyList &propList);
00155   void closeTableRow();
00156   void openTableCell(const librevenge::RVNGPropertyList &propList);
00157   void closeTableCell();
00158   void insertCoveredTableCell(const librevenge::RVNGPropertyList &propList);
00159 
00160   //
00161   // simple Graphic
00162   //
00163 
00164   void openGroup(const librevenge::RVNGPropertyList &propList);
00165   void closeGroup();
00166 
00167   void defineGraphicStyle(const librevenge::RVNGPropertyList &propList);
00168 
00169   void drawRectangle(const librevenge::RVNGPropertyList &propList);
00170   void drawEllipse(const librevenge::RVNGPropertyList &propList);
00171   void drawPolygon(const librevenge::RVNGPropertyList &propList);
00172   void drawPolyline(const librevenge::RVNGPropertyList &propList);
00173   void drawPath(const librevenge::RVNGPropertyList &propList);
00174   void drawConnector(const ::librevenge::RVNGPropertyList &propList);
00175 
00176   //
00177   // Equation
00178   //
00179 
00180   void insertEquation(const librevenge::RVNGPropertyList &propList);
00181 
00182 protected:
00184   shared_ptr<STOFFSpreadsheetEncoderInternal::State> m_state;
00185 };
00186 
00187 #endif
00188 
00189 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab: