• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

ODi_Abi_Data.h

Go to the documentation of this file.
00001 /* AbiSource
00002  *
00003  * Copyright (C) 2005 Daniel d'Andrada T. de Carvalho
00004  * <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., 59 Temple Place - Suite 330, Boston, MA
00019  * 02111-1307, USA.
00020  */
00021 
00022 #ifndef _ODI_ABI_DATA_H_
00023 #define _ODI_ABI_DATA_H_
00024 
00025 #include <map>
00026 #include <set>
00027 #include <string>
00028 
00029 // External includes
00030 #include <gsf/gsf.h>
00031 
00032 #include "ut_types.h"
00033 // AbiWord classes
00034 class PD_Document;
00035 class UT_String;
00036 class UT_ByteBuf;
00037 
00042 class ODi_Abi_Data {
00043 
00044 public:
00045 
00046     ODi_Abi_Data(PD_Document* pDocument, GsfInfile* pGsfInfile);
00047 
00054     bool addImageDataItem(UT_String& rDataId, const gchar** ppAtts);
00055 
00056     bool addObjectDataItem(UT_String& rDataId, const gchar** ppAtts, int& pto_Type);
00057 
00058 private:
00059 
00060     UT_Error _loadStream (GsfInfile* oo, const char* stream, UT_ByteBuf& buf);
00061     void _splitDirectoryAndFileName(const gchar* pHRef, UT_String& dirName, UT_String& fileName) const;
00062 
00063     PD_Document* m_pAbiDocument;
00064     GsfInfile* m_pGsfInfile;
00065 
00066     // Stores all added data items id's, given its hrefs.
00067     // Used to avoid adding multiple data items for the same picture.
00068     typedef std::map<std::string, std::string> href_id_map_t;
00069     href_id_map_t m_href_to_id;
00070 
00071   public:
00072     std::set< std::string > m_openAnnotationNames;
00073     std::set< std::string > m_rangedAnnotationNames;
00074 };
00075 
00076 #endif //_ODI_ABI_DATA_H_

Generated on Sat May 26 2012 for AbiWord by  doxygen 1.7.1