diff options
Diffstat (limited to 'src/lib/SW602SpreadsheetEncoder.h')
-rw-r--r-- | src/lib/SW602SpreadsheetEncoder.h | 170 |
1 files changed, 170 insertions, 0 deletions
diff --git a/src/lib/SW602SpreadsheetEncoder.h b/src/lib/SW602SpreadsheetEncoder.h new file mode 100644 index 0000000..b36e0cb --- /dev/null +++ b/src/lib/SW602SpreadsheetEncoder.h @@ -0,0 +1,170 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* + * This file is part of the libsw602 project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef INCLUDED_SW602_SPREADSHEET_ENCODER_H +#define INCLUDED_SW602_SPREADSHEET_ENCODER_H + +#include <librevenge/librevenge.h> + +#include "SW602Types.h" + +namespace libsw602 +{ + +class SW602PropertyHandlerEncoder; + +namespace SW602SpreadsheetEncoderInternal +{ +struct State; +} + +/** main class used to define store librevenge::RVNGSpreadsheetInterface + lists of command in a librevenge::RVNGBinaryData. \see SW602SpreadsheetDecoder + can be used to decode back the spreadsheet... + + \note as this class implements the functions librevenge::RVNGSpreadsheetInterface, + the documentation is not duplicated.. +*/ +class SW602SpreadsheetEncoder : public librevenge::RVNGSpreadsheetInterface +{ +public: + /// constructor + SW602SpreadsheetEncoder(); + /// destructor + ~SW602SpreadsheetEncoder(); + /// return the final spreadsheet + bool getBinaryResult(SW602EmbeddedObject &object); + + void setDocumentMetaData(const librevenge::RVNGPropertyList &propList); + + void startDocument(const librevenge::RVNGPropertyList &propList); + void endDocument(); + + void definePageStyle(const librevenge::RVNGPropertyList &propList); + void defineEmbeddedFont(const librevenge::RVNGPropertyList &propList); + + void openPageSpan(const librevenge::RVNGPropertyList &propList); + void closePageSpan(); + + void openHeader(const librevenge::RVNGPropertyList &propList); + void closeHeader(); + + void openFooter(const librevenge::RVNGPropertyList &propList); + void closeFooter(); + + void defineSheetNumberingStyle(const librevenge::RVNGPropertyList &propList); + void openSheet(const librevenge::RVNGPropertyList &propList); + void closeSheet(); + void openSheetRow(const librevenge::RVNGPropertyList &propList); + void closeSheetRow(); + void openSheetCell(const librevenge::RVNGPropertyList &propList); + void closeSheetCell(); + + void defineChartStyle(const librevenge::RVNGPropertyList &propList); + + void openChart(const librevenge::RVNGPropertyList &propList); + void closeChart(); + + void openChartTextObject(const librevenge::RVNGPropertyList &propList); + void closeChartTextObject(); + + void openChartPlotArea(const librevenge::RVNGPropertyList &propList); + void closeChartPlotArea(); + void insertChartAxis(const librevenge::RVNGPropertyList &axis); + void openChartSerie(const librevenge::RVNGPropertyList &series); + void closeChartSerie(); + + void defineParagraphStyle(const librevenge::RVNGPropertyList &propList); + + void openParagraph(const librevenge::RVNGPropertyList &propList); + void closeParagraph(); + + void defineCharacterStyle(const librevenge::RVNGPropertyList &propList); + + void openSpan(const librevenge::RVNGPropertyList &propList); + void closeSpan(); + void openLink(const librevenge::RVNGPropertyList &propList); + void closeLink(); + + void defineSectionStyle(const librevenge::RVNGPropertyList &propList); + + void openSection(const librevenge::RVNGPropertyList &propList); + void closeSection(); + + void insertTab(); + void insertSpace(); + void insertText(const librevenge::RVNGString &text); + void insertLineBreak(); + + void insertField(const librevenge::RVNGPropertyList &propList); + + void openOrderedListLevel(const librevenge::RVNGPropertyList &propList); + void openUnorderedListLevel(const librevenge::RVNGPropertyList &propList); + void closeOrderedListLevel(); + void closeUnorderedListLevel(); + void openListElement(const librevenge::RVNGPropertyList &propList); + void closeListElement(); + + void openFootnote(const librevenge::RVNGPropertyList &propList); + void closeFootnote(); + + void openComment(const librevenge::RVNGPropertyList &propList); + void closeComment(); + + void openFrame(const librevenge::RVNGPropertyList &propList); + void closeFrame(); + void insertBinaryObject(const librevenge::RVNGPropertyList &propList); + + // + // specific text/table + // + + void openTextBox(const librevenge::RVNGPropertyList &propList); + void closeTextBox(); + + void openTable(const librevenge::RVNGPropertyList &propList); + void closeTable(); + void openTableRow(const librevenge::RVNGPropertyList &propList); + void closeTableRow(); + void openTableCell(const librevenge::RVNGPropertyList &propList); + void closeTableCell(); + void insertCoveredTableCell(const librevenge::RVNGPropertyList &propList); + + // + // simple Graphic + // + + void openGroup(const librevenge::RVNGPropertyList &propList); + void closeGroup(); + + void defineGraphicStyle(const librevenge::RVNGPropertyList &propList); + + void drawRectangle(const librevenge::RVNGPropertyList &propList); + void drawEllipse(const librevenge::RVNGPropertyList &propList); + void drawPolygon(const librevenge::RVNGPropertyList &propList); + void drawPolyline(const librevenge::RVNGPropertyList &propList); + void drawPath(const librevenge::RVNGPropertyList &propList); + void drawConnector(const ::librevenge::RVNGPropertyList &propList); + + // + // Equation + // + + void insertEquation(const librevenge::RVNGPropertyList &propList); + +protected: + //! the actual state + boost::shared_ptr<SW602SpreadsheetEncoderInternal::State> m_state; +}; + +} + +#endif + +/* vim:set shiftwidth=2 softtabstop=2 expandtab: */ |