00001 /* AbiSource 00002 * 00003 * Copyright (C) 2005 INdT 00004 * Author: Daniel d'Andrada T. de Carvalho <daniel.carvalho@indt.org.br> 00005 * 00006 * This program is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU General Public License 00008 * as published by the Free Software Foundation; either version 2 00009 * of the License, or (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 00019 * 02110-1301 USA. 00020 */ 00021 00022 #ifndef ODE_AUXILIARYDATA_H_ 00023 #define ODE_AUXILIARYDATA_H_ 00024 00025 // AbiWord includes 00026 #include <ut_vector.h> 00027 #include <ut_string_class.h> 00028 #include <gsf/gsf-output-memory.h> 00029 00030 #include "pd_DocumentRDF.h" 00031 00032 00046 class ODe_HeadingStyles { 00047 public: 00048 00049 virtual ~ODe_HeadingStyles(); 00050 00055 UT_uint8 getHeadingOutlineLevel(const UT_UTF8String& rStyleName) const; 00056 00057 void addStyleName(const gchar* pStyleName, UT_uint8 outlineLevel); 00058 00059 private: 00060 UT_GenericVector<UT_UTF8String*> m_styleNames; 00061 UT_GenericVector<UT_uint8> m_outlineLevels; 00062 }; 00063 00064 00068 class ODe_AuxiliaryData { 00069 public: 00070 ODe_AuxiliaryData(); 00071 ~ODe_AuxiliaryData(); 00072 00073 ODe_HeadingStyles m_headingStyles; 00074 00075 // Content of the TOC 00076 // Note: we only support 1 TOC body per document right now. It's wasted 00077 // effort try to manually build up multiple different TOC bodies, 00078 // until we can get to the actual TOC data that AbiWord generates. 00079 GsfOutput* m_pTOCContents; 00080 00081 // The destination TOC style names for all levels 00082 std::map<UT_sint32, UT_UTF8String> m_mDestStyles; 00083 00084 // The number of tables already added to the document. 00085 UT_uint32 m_tableCount; 00086 00087 // The number of frames already added to the document. 00088 UT_uint32 m_frameCount; 00089 00090 // The number of notes (footnotes and endnotes) already added to the document. 00091 UT_uint32 m_noteCount; 00092 00093 // Any RDF that is generated during the save that should be stored into the 00094 // ODT file and then thrown away. 00095 PD_RDFModelHandle m_additionalRDF; 00096 }; 00097 00098 #endif /*ODE_AUXILIARYDATA_H_*/