STOFFGraphicEncoder.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_GRAPHIC_ENCODER_HXX
00037 #define STOFF_GRAPHIC_ENCODER_HXX
00038 
00039 #include <librevenge/librevenge.h>
00040 #include "libstaroffice_internal.hxx"
00041 
00042 class STOFFPropertyHandlerEncoder;
00043 
00044 namespace STOFFGraphicEncoderInternal
00045 {
00046 struct State;
00047 }
00055 class STOFFGraphicEncoder : public librevenge::RVNGDrawingInterface
00056 {
00057 public:
00059   STOFFGraphicEncoder();
00061   ~STOFFGraphicEncoder();
00063   bool getBinaryResult(STOFFEmbeddedObject &result);
00064 
00065   void startDocument(const ::librevenge::RVNGPropertyList &propList);
00066   void endDocument();
00067 
00068   void defineEmbeddedFont(const librevenge::RVNGPropertyList &propList);
00069 
00070   void setDocumentMetaData(const librevenge::RVNGPropertyList &propList);
00071   void startPage(const ::librevenge::RVNGPropertyList &propList);
00072   void endPage();
00073   void startMasterPage(const ::librevenge::RVNGPropertyList &propList);
00074   void endMasterPage();
00075 
00076   void setStyle(const ::librevenge::RVNGPropertyList &propList);
00077   void startLayer(const ::librevenge::RVNGPropertyList &propList);
00078   void endLayer();
00079   void startEmbeddedGraphics(const ::librevenge::RVNGPropertyList &propList);
00080   void endEmbeddedGraphics();
00081   void openGroup(const ::librevenge::RVNGPropertyList &propList);
00082   void closeGroup();
00083 
00084 
00085   void drawRectangle(const ::librevenge::RVNGPropertyList &propList);
00086   void drawEllipse(const ::librevenge::RVNGPropertyList &propList);
00087   void drawPolygon(const ::librevenge::RVNGPropertyList &vertices);
00088   void drawPolyline(const ::librevenge::RVNGPropertyList &vertices);
00089   void drawPath(const ::librevenge::RVNGPropertyList &path);
00090   void drawConnector(const ::librevenge::RVNGPropertyList &propList);
00091 
00092   void drawGraphicObject(const ::librevenge::RVNGPropertyList &propList);
00093 
00094   void startTextObject(const ::librevenge::RVNGPropertyList &propList);
00095   void endTextObject();
00096 
00097   void startTableObject(const librevenge::RVNGPropertyList &propList);
00098   void endTableObject();
00099   void openTableRow(const librevenge::RVNGPropertyList &propList);
00100   void closeTableRow();
00101   void openTableCell(const librevenge::RVNGPropertyList &propList);
00102   void closeTableCell();
00103   void insertCoveredTableCell(const librevenge::RVNGPropertyList &propList);
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 openLink(const librevenge::RVNGPropertyList &propList);
00112   void closeLink();
00113   void openOrderedListLevel(const librevenge::RVNGPropertyList &propList);
00114   void openUnorderedListLevel(const librevenge::RVNGPropertyList &propList);
00115   void closeOrderedListLevel();
00116   void closeUnorderedListLevel();
00117   void openListElement(const librevenge::RVNGPropertyList &propList);
00118   void closeListElement();
00119 
00120   void defineParagraphStyle(const librevenge::RVNGPropertyList &propList);
00121   void openParagraph(const librevenge::RVNGPropertyList &propList);
00122   void closeParagraph();
00123 
00124   void defineCharacterStyle(const librevenge::RVNGPropertyList &propList);
00125   void openSpan(const librevenge::RVNGPropertyList &propList);
00126   void closeSpan();
00127 
00128 protected:
00130   shared_ptr<STOFFGraphicEncoderInternal::State> m_state;
00131 };
00132 
00133 #endif
00134 
00135 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab: