00001 /* -*- mode: C++; tab-width: 4; c-basic-offset: 4; -*- */ 00002 00003 /* AbiSource 00004 * 00005 * Copyright (C) 2008 Firat Kiyak <firatkiyak@gmail.com> 00006 * 00007 * This program is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU General Public License 00009 * as published by the Free Software Foundation; either version 2 00010 * of the License, or (at your option) any later version. 00011 * 00012 * This program is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with this program; if not, write to the Free Software 00019 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 00020 * 02110-1301 USA. 00021 */ 00022 00023 #ifndef _OXML_LIST_H_ 00024 #define _OXML_LIST_H_ 00025 00026 // Internal includes 00027 #include <OXML_Types.h> 00028 #include <OXML_ObjectWithAttrProp.h> 00029 00030 // AbiWord includes 00031 #include <ut_types.h> 00032 #include <pd_Document.h> 00033 #include <fl_AutoNum.h> 00034 00035 // External includes 00036 #include <memory> 00037 #include <string> 00038 00039 //bullet characters 00040 #define BULLET "•" 00041 #define SQUARE "■" 00042 #define TRIANGLE "" 00043 #define DIAMOND "" 00044 #define BOX "□" 00045 #define HAND "☞" 00046 #define HEART "♥" 00047 #define STAR "*" 00048 #define IMPLIES "⇒" 00049 #define DASH "–" 00050 #define TICK "" 00051 00052 class IE_Exp_OpenXML; 00053 00054 class OXML_List : public OXML_ObjectWithAttrProp 00055 { 00056 00057 public: 00058 OXML_List(); 00059 virtual ~OXML_List(); 00060 00061 virtual void setId(UT_uint32 id); 00062 virtual void setParentId(UT_uint32 id); 00063 virtual void setLevel(UT_uint32 id); 00064 virtual void setDelim(const std::string & delim); 00065 virtual void setDecimal(const std::string & decimal); 00066 virtual void setStartValue(UT_uint32 id); 00067 virtual void setType(FL_ListType type); 00068 00069 UT_uint32 getId(); 00070 UT_uint32 getParentId(); 00071 UT_uint32 getLevel(); 00072 UT_uint32 getStartValue(); 00073 const gchar* getDelim(); 00074 const gchar* getDecimal(); 00075 FL_ListType getType(); 00076 00077 UT_Error serialize(IE_Exp_OpenXML* exporter); 00078 UT_Error serializeNumbering(IE_Exp_OpenXML* exporter); 00079 UT_Error addToPT(PD_Document * pDocument); 00080 00081 private: 00082 UT_uint32 id; 00083 UT_uint32 parentId; 00084 UT_uint32 level; 00085 UT_uint32 startValue; 00086 std::string delim; 00087 std::string decimal; 00088 FL_ListType type; 00089 }; 00090 00091 typedef std::shared_ptr<OXML_List> OXML_SharedList; 00092 00093 #endif //_OXML_LIST_H_ 00094